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
Creates new form MENU_ADMINISTRADOR
public MENU_ADMINISTRADOR() { this.setContentPane(fondo); initComponents(); Date date = new Date(); DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); this.textField1.setText(dateFormat.format(date)); System.out.println("almacenado DPI:" + datos_solicitud_seguro.getA()[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }", "public void createMenu() {\n deleteMenuGroupError = false;\n createMenuGroupError = true;\n if (menu.createMenu()) {\n updateMenuError = false;\n deleteMenuError = false;\n createMenuError = true;\n } else {\n createMenuError = false;\n }\n }", "public int create(Esysmeudef menu);", "public void ajouterNouveauMenu(int idLigneprecedente, Menu nouveauMenu);", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public FormMenu() {\n initComponents();\n menuController = new MenuController(this);\n menuController.nonAktif();\n }", "@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}", "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 }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "private void makeToolsMenu() {\r\n\t\tJMenu toolsMnu = new JMenu(\"Herramientas\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Usuarios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Manejo de Usuarios\",\r\n\t\t\t\t\timageLoader.getImage(\"users.png\"));\r\n\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'm',\r\n\t\t\t\t\t\"Manejar los usuarios del sistema\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F7, 0), Users.class);\r\n\r\n\t\t\ttoolsMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"FacturacionManual\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion Manual\",\r\n\t\t\t\t\timageLoader.getImage(\"kwrite.png\"));\r\n\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Manejar la Facturacion Manual\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F3, 0), ManualInvoice.class);\r\n\r\n\t\t\ttoolsMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\ttoolsMnu.setMnemonic('h');\r\n\t\t\tadd(toolsMnu);\r\n\t\t}\r\n\t}", "@Override\n public void buttonClick(ClickEvent event) {\n \n \ttry {\n\t\t\t\t\tUI.getCurrent().getNavigator().addView(_nombreSeccion + \"Adm/\" + _titulo.getCaption(), new AdministradorClase(new Lista_Mensaje_V_Administrador(it.getIdTema())));\n\t\t\t\t} catch (PersistentException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(_nombreSeccion+ \"Adm/\" + _titulo.getCaption());\n \t\n \t\n }", "IFormManager createFormManagerForMenu(IForm menu);", "public Menu createToolsMenu();", "private void nuevaLiga() {\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Nueva Liga\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tGestion.reset();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tGestion.reset();\r\n\t\tfrmLigaDeFtbol.setTitle(\"Liga de Fútbol\");\r\n\t}", "@Test\n public void testMenuFactoryCreate() {\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n assertEquals(1, menuController.getMenu().size());\n }", "public menuAddStasiun() {\n initComponents();\n }", "@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}", "private void addMenu(){\n //Where the GUI is created:\n \n Menu menu = new Menu(\"Menu\");\n MenuItem menuItem1 = new MenuItem(\"Lista de Libros\");\n MenuItem menuItem2 = new MenuItem(\"Nuevo\");\n\n menu.getItems().add(menuItem1);\n menu.getItems().add(menuItem2);\n \n menuItem1.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n cargarListaGeneradores( 2, biblioteca.getBiblioteca());\n }\n });\n \n menuItem2.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n addUIControls() ;\n }\n });\n \n menuBar.getMenus().add(menu);\n }", "private MenuManager createEditMenu() {\n\t\tMenuManager menu = new MenuManager(\"&Edition\", Messages.getString(\"IU.Strings.40\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tmenu.add(new GroupMarker(Messages.getString(\"IU.Strings.41\"))); //$NON-NLS-1$\n\n\t\tmenu.add(getAction(ActionFactory.UNDO.getId()));\n\t\tmenu.add(getAction(ActionFactory.REDO.getId()));;\n\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.CUT.getId()));\n\t\tmenu.add(getAction(ActionFactory.COPY.getId()));\n\t\tmenu.add(getAction(ActionFactory.PASTE.getId()));\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.DELETE.getId()));\n\t\tmenu.add(getAction(ActionFactory.SELECT_ALL.getId()));\n\t\tmenu.add(getAction(ActionFactory.FIND.getId()));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.PREFERENCES.getId()));\n\t\treturn menu;\n\t}", "public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }", "private void createMenu() {\n\t\tJMenuBar mb = new JMenuBar();\n\t\tsetJMenuBar(mb);\n\t\tmb.setVisible(true);\n\t\t\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmb.add(menu);\n\t\t//mb.getComponent();\n\t\tmenu.add(new JMenuItem(\"Exit\"));\n\t\t\n\t\t\n\t}", "private void makePOSMenu() {\r\n\t\tJMenu POSMnu = new JMenu(\"Punto de Venta\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Cotizaciones\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Cotizaciones\", \r\n\t\t\t\t\timageLoader.getImage(\"quote.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Ver el listado de cotizaciones\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F4, 0), Quote.class);\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Compra\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Compras\", \r\n\t\t\t\t\timageLoader.getImage(\"purchase.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F5, 0), Purchase.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Facturacion\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion\", \r\n\t\t\t\t\timageLoader.getImage(\"invoice.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F6, 0), Invoice.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tPOSMnu.setMnemonic('p');\r\n\t\t\tadd(POSMnu);\r\n\t\t}\r\n\t}", "public FRM_MenuPrincipal() {\n initComponents();\n archivos = new ArchivoUsuarios(); \n controlador = new CNTRL_MenuPrincipal(this, archivos);\n agregarControlador(controlador);\n setResizable(false);\n ordenarVentanas();\n }", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "@Override\n\tpublic void create() {\n\t\tAssets.load();\n\t\t\n\t\t//creo pantallas y cargo por defecto menuPrincipal\n\t\tscreenJuego = new JuegoScreen(this);\n\t\tmenuPrincipal = new MenuPrincipal(this);\n\t\tsetScreen(menuPrincipal);\n\t}", "private void setearOpcionesMenuAdministracion()\r\n\t{\r\n\t\tArrayList<FormularioVO> lstFormsMenuAdmin = new ArrayList<FormularioVO>();\r\n\t\t\r\n\t\t/*Buscamos los Formulairos correspondientes a este TAB*/\r\n\t\tfor (FormularioVO formularioVO : this.permisos.getLstPermisos().values()) {\r\n\t\t\t\r\n\t\t\tif(formularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_USUARIO)\r\n\t\t\t\t|| formularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_GRUPO))\r\n\t\t\t{\r\n\t\t\t\tlstFormsMenuAdmin.add(formularioVO);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t/*Si hay formularios para el tab*/\r\n\t\tif(lstFormsMenuAdmin.size()> 0)\r\n\t\t{\r\n\t\t\t//TODO\r\n\t\t\t//this.tabAdministracion = new VerticalLayout();\r\n\t\t\t//this.tabAdministracion.setMargin(true);\r\n\t\t\t\r\n\t\t\tthis.lbAdministracion.setVisible(true);\r\n\t\t\tthis.layoutMenu.addComponent(this.lbAdministracion);\r\n\t\t\t\r\n\t\t\tfor (FormularioVO formularioVO : lstFormsMenuAdmin) {\r\n\t\t\t\t\r\n\t\t\t\tswitch(formularioVO.getCodigo())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_USUARIO : \r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_USUARIO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarUserButton();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.userButton);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_GRUPO :\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_GRUPO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarGrupoButton();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.gruposButton);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//TODO\r\n\t\t\t//this.acordion.addTab(tabAdministracion, \"Administración\", null);\r\n\t\t\t\r\n\t\t}\r\n\t\t//TODO\r\n\t\t//acordion.setHeight(\"75%\"); /*Seteamos alto del accordion*/\r\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Empregados m1= new Menu_Empregados();\r\n \r\n }", "@GetMapping(\"/restaurante/new\")\n\tpublic String newRestaurante(Model model) {\n\t\tmodel.addAttribute(\"restaurante\", new Restaurante());\n\t\tControllerHelper.setEditMode(model, false);\n\t\tControllerHelper.addCategoriasToRequest(categoriaRestauranteRepository, model);\n\t\t\n\t\treturn \"restaurante-cadastro\";\n\t\t\n\t}", "public Menu createViewMenu();", "public FormFuncionario(FormMenu telaPai) {\n initComponents();\n this.telaPai = telaPai;\n\n txtNome.setText(\"Nome\");\n lblNome.setVisible(false);\n txtSobrenome.setText(\"Sobrenome\");\n lblSobrenome.setVisible(false);\n campoMensagem.setVisible(false);\n lblMensagem.setVisible(false);\n\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADMLE.Admin_DDL_Create();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Produtos m2= new Menu_Produtos();\r\n \r\n }", "public FrmGestion(FrmMenu menu) {\n this.menu=menu;\n initComponents();\n ConstruyeTablaGestion();\n }", "private void createMenu(){\n \n menuBar = new JMenuBar();\n \n game = new JMenu(\"Rummy\");\n game.setMnemonic('R');\n \n newGame = new JMenuItem(\"New Game\");\n newGame.setMnemonic('N');\n newGame.addActionListener(menuListener);\n \n \n \n exit = new JMenuItem(\"Exit\");\n exit.setMnemonic('E');\n exit.addActionListener(menuListener); \n \n \n \n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Contabilidade m3= new Menu_Contabilidade();\r\n \r\n }", "private void creaPannelli() {\n /* variabili e costanti locali di lavoro */\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n pan = this.creaPanDate();\n this.addPannello(pan);\n\n /* pannello coperti */\n PanCoperti panCoperti = new PanCoperti();\n this.setPanCoperti(panCoperti);\n this.addPannello(panCoperti);\n\n\n /* pannello placeholder per il Navigatore risultati */\n /* il navigatore vi viene inserito in fase di inizializzazione */\n pan = new PannelloFlusso(Layout.ORIENTAMENTO_ORIZZONTALE);\n this.setPanNavigatore(pan);\n this.addPannello(pan);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_new, menu);\r\n\t\treturn true;\r\n\t}", "private JMenu createLanguageMenu() {\n\t\tAction nestoAction = new AbstractAction() {\n\n\t\t\t/** The generated serial user ID */\n\t\t\tprivate static final long serialVersionUID = -4439263551767223123L;\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJMenuItem src = (JMenuItem) e.getSource();\n\t\t\t\tString arg = src.getText();\n\t\t\t\tLocalizationProvider.getInstance().setLanguage(arg);\n\t\t\t\tLocalizationProvider.getInstance().fire();\n\t\t\t}\n\t\t};\n\n\t\titemHR = new JMenuItem(nestoAction);\n\t\titemHR.setText(\"hr\");\n\t\titemEN = new JMenuItem(nestoAction);\n\t\titemEN.setText(\"en\");\n\t\titemDE = new JMenuItem(nestoAction);\n\t\titemDE.setText(\"de\");\n\n\t\tlangMenu = new JMenu(flp.getString(\"lang\"));\n\n\t\tlangMenu.add(itemHR);\n\t\tlangMenu.add(itemEN);\n\t\tlangMenu.add(itemDE);\n\n\t\treturn langMenu;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.expense_add_new, menu);\r\n\t\treturn true;\r\n\t}", "public void createMenu() {\n\t\tmenuBar.add(createGameMenuColumn());\n\t\tmenuBar.add(createTestsMenuColumn());\n\t\tmenuBar.add(createCheatsMenuColumn());\n\n\t\tparentMainView.setJMenuBar(menuBar);\n\t}", "private LoginMenu() {\n\n\t\t\n\t\t/**\n\t\t * Fenêtre positionnée comme tableau de ligne/colonne avec un espace en hauteur\n\t\t * et largeur\n\t\t **/\n\n\t\tmenuLogin = new JPanel(new GridLayout(2, 1, 0, 0));\n\t\tmenuLogin.setBackground(new Color(200, 100, 100));\n\n\t\t/**\n\t\t * Ajout du login et mot de passe via un tableau\n\t\t **/\n\n\t\tmenuLogin.add(InitialisationDuMenu());\n\t\tmenuLogin.add(InitDesBouttons());\n\t}", "public void buildAndShowMenuForm() {\n SimpleForm.Builder builder =\n SimpleForm.builder()\n .translator(MinecraftLocale::getLocaleString, session.locale())\n .title(\"gui.advancements\");\n\n List<String> rootAdvancementIds = new ArrayList<>();\n for (Map.Entry<String, GeyserAdvancement> advancement : storedAdvancements.entrySet()) {\n if (advancement.getValue().getParentId() == null) { // No parent means this is a root advancement\n builder.button(MessageTranslator.convertMessage(advancement.getValue().getDisplayData().getTitle(), session.locale()));\n rootAdvancementIds.add(advancement.getKey());\n }\n }\n\n if (rootAdvancementIds.isEmpty()) {\n builder.content(\"advancements.empty\");\n }\n\n builder.validResultHandler((response) -> {\n String id = rootAdvancementIds.get(response.clickedButtonId());\n if (!id.equals(\"\")) {\n if (id.equals(currentAdvancementCategoryId)) {\n // The server thinks we are already on this tab\n buildAndShowListForm();\n } else {\n // Send a packet indicating that we intend to open this particular advancement window\n ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);\n session.sendDownstreamPacket(packet);\n // Wait for a response there\n }\n }\n });\n\n session.sendForm(builder);\n }", "public CrearGrupoDeContactosMenuActionListener() {\n }", "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_inserir_desejos , menu);\n return true;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n pnlPrincipal = new javax.swing.JPanel();\n mnbRestaurante = new javax.swing.JMenuBar();\n mnuPersonal = new javax.swing.JMenu();\n mniAltaPersonal = new javax.swing.JMenuItem();\n mniModificarPersonal = new javax.swing.JMenuItem();\n mniBajaPersonal = new javax.swing.JMenuItem();\n mnuVentas = new javax.swing.JMenu();\n mniRegistroVentas = new javax.swing.JMenuItem();\n mnuInventario = new javax.swing.JMenu();\n mnuNomina = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n pnlPrincipal.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n mnuPersonal.setText(\"Personal\");\n\n mniAltaPersonal.setText(\"Alta\");\n mniAltaPersonal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniAltaPersonalActionPerformed(evt);\n }\n });\n mnuPersonal.add(mniAltaPersonal);\n\n mniModificarPersonal.setText(\"Modificar\");\n mnuPersonal.add(mniModificarPersonal);\n\n mniBajaPersonal.setText(\"Baja\");\n mnuPersonal.add(mniBajaPersonal);\n\n mnbRestaurante.add(mnuPersonal);\n\n mnuVentas.setText(\"Ventas\");\n\n mniRegistroVentas.setText(\"Registro Ventas\");\n mniRegistroVentas.setToolTipText(\"\");\n mnuVentas.add(mniRegistroVentas);\n\n mnbRestaurante.add(mnuVentas);\n\n mnuInventario.setText(\"Inventario\");\n mnbRestaurante.add(mnuInventario);\n\n mnuNomina.setText(\"Nomina\");\n mnbRestaurante.add(mnuNomina);\n\n setJMenuBar(mnbRestaurante);\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(pnlPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pnlPrincipal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE)\n );\n\n pack();\n }", "public MenuPrincipal() {\n initComponents();\n \n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.admin_create_user, menu);\r\n\t\treturn true;\r\n\t}", "private MenuItem getNewMenuItem() {\r\n\t\tif (newMenuItem == null) {\r\n\t\t\tnewMenuItem = new MenuItem(\"Creat new DB\");\r\n\t\t\tnewMenuItem.addActionListener(new ActionListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tfinal String dbname = JOptionPane.showInputDialog(\"New database name:\");\r\n\t\t\t\t\tif (dbname == null)\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tMenuItem item = new MenuItem(dbname);\r\n\t\t\t\t\titem.addActionListener(new ActionListener() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\t\t\tstopDB();\r\n\t\t\t\t\t\t\tstartDB(dbname);\r\n\t\t\t\t\t\t\tgetStopMenuItem().setEnabled(true);\r\n\t\t\t\t\t\t\tgetNewMenuItem().setEnabled(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tstartMenuItem.add(item);\r\n\t\t\t\t\tstartDB(dbname);\r\n\t\t\t\t\tgetNewMenuItem().setEnabled(false);\r\n\t\t\t\t\tgetStartMenuItem().setEnabled(true);\r\n\t\t\t\t\tgetStopMenuItem().setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn newMenuItem;\r\n\t}", "public PanelMenuPrincipal() {\r\n\t\tinitComponents();\r\n\t\tif (((Usuario) Util.usuarioCommon).getUsrAccPanelControlSn()\r\n\t\t\t\t.equals(\"N\")) {\r\n\t\t\tbtnAdmGral.setVisible(false);\r\n\t\t\tjSeparator4.setVisible(false);\r\n\t\t}\r\n\t\tagregarEscuchas();\r\n\t\t//panelSubMenu.setLayout(null);\r\n\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_creatuser, menu);\n return true;\n }", "private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}", "private void createMenu()\n\t{\n\t\tfileMenu = new JMenu(\"File\");\n\t\thelpMenu = new JMenu(\"Help\");\n\t\ttoolsMenu = new JMenu(\"Tools\");\n\t\t\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\texit = new JMenuItem(\"Exit\");\t\t\n\t\treadme = new JMenuItem(\"Readme\");\n\t\tabout = new JMenuItem(\"About\");\n\t\tsettings = new JMenuItem(\"Settings\");\n\t\t\t\t\n\t\tfileMenu.add (exit);\n\t\t\n\t\thelpMenu.add (readme);\n\t\thelpMenu.add (about);\t\n\t\t\n\t\ttoolsMenu.add (settings);\n\t\t\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(helpMenu);\t\t\n\t\t\t\t\n\t\tdefaultMenuBackground = menuBar.getBackground();\n\t\tdefaultMenuForeground = fileMenu.getForeground();\n\t\t\n\t}", "private void adicionaMateria(){\n\n FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n AlertDialog.Builder alertBuilder = new AlertDialog.Builder(MainActivity.this); // mostra um alert dialog\n View view2 = getLayoutInflater().inflate(R.layout.tela_adiciona_materia,null);\n final EditText nomeMateria = (EditText) view2.findViewById(R.id.nomeMateria);\n Button addMateria = (Button) view2.findViewById(R.id.button);\n\n alertBuilder.setView(view2);\n\n final AlertDialog dialog = alertBuilder.create();\n dialog.show();\n\n addMateria.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if(!nomeMateria.getText().toString().isEmpty()){\n NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);\n menu = navigationView.getMenu();\n String materia = nomeMateria.getText().toString();\n subMenu.add(materia);\n adicionaSQL(materia);\n //.setOnMenuItemClickListener(clicaMenu(\"Disciplinas\"));\n Snackbar.make(view, \"Matéria adicionada com sucesso!\", Snackbar.LENGTH_LONG)\n .show();\n\n dialog.dismiss();\n\n\n } else{\n nomeMateria.setError(\"Adicione uma materia para inserir!\");\n Snackbar.make(view, \"Campo vazio!\", Snackbar.LENGTH_LONG)\n .show();\n }\n\n }\n });\n }\n });\n }", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_cliente_fornecedor, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add_admin, menu);\n return true;\n }", "private void makeUtilitiesMenu() {\r\n\t\tJMenu utilitiesMnu = new JMenu(\"Utilidades\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Reportes\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Reportes\",\r\n\t\t\t\t\timageLoader.getImage(\"reports.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'r',\r\n\t\t\t\t\t\"Ver los reportes del sistema\", null,\r\n\t\t\t\t\tReports.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"ConsultarPrecios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Consultar Precios\",\r\n\t\t\t\t\timageLoader.getImage(\"money.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'p',\r\n\t\t\t\t\t\"Consultar los precios de los productos\", null,\r\n\t\t\t\t\tPriceRead.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Calculadora\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Calculadora Impuesto\",\r\n\t\t\t\t\timageLoader.getImage(\"pc.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Calculadora de impuesto\", null, Calculator.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tutilitiesMnu.addSeparator();\r\n\t\tif (StoreCore.getAccess(\"Categorias\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Categorias Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"group.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'i',\r\n\t\t\t\t\t\"Manejar las categorias del inventario\", null, Groups.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Impuestos\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Impuestos\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Manejar el listado de impuestos\", null, Tax.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Ciudades\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ciudades\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'u',\r\n\t\t\t\t\t\"Manejar el listado de ciudades\", null, City.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tutilitiesMnu.setMnemonic('u');\r\n\t\t\tadd(utilitiesMnu);\r\n\t\t}\r\n\t}", "public Menu() {\r\n \r\n ingresaVehiculo (); \r\n }", "@Override\n public String createMenu(Menu parMenu) {\n try {\n this.connect();\n String sql = \"INSERT INTO Menu(MenuId, MenuNombre, MenuFechaVisualizacion VALUES (?,?,?)\";\n try (PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setString(1, parMenu.getMenuId());\n pstmt.setString(2, parMenu.getMenuNom());\n pstmt.setDate(3, (Date) parMenu.getMenuFecVi());\n\n pstmt.executeUpdate();\n }\n this.disconnect();\n } catch (SQLException ex) {\n Logger.getLogger(IOrderRepository.class.getName()).log(Level.SEVERE, \"Error al insertar el registro\", ex);\n }\n return (parMenu.getMenuId());\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }", "@Command\n public void nuevaMateria() {\n\t\t\n\t\tWindow window = (Window)Executions.createComponents(\n \"/WEB-INF/include/Mantenimiento/Materias/vtnMaterias.zul\", null, null);\n window.doModal();\n }", "UIFormMenu toUIFormMenu(String heading);", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.web_formularia, menu);\n return true;\n }", "public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }", "public static void imprimirMenuAdmin() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción taquilla\");\r\n System.out.println(\"B: despliega la opción informacion cliente\");\r\n\tSystem.out.println(\"C: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n }", "public Menu createFileMenu();", "public JMTMenuBar createMenu() {\r\n \t\tJMTMenuBar menu = new JMTMenuBar(JMTImageLoader.getImageLoader());\r\n \t\t// File menu\r\n \t\tMenuAction action = new MenuAction(\"File\", new AbstractJmodelAction[] { newModel, openModel, saveModel, saveModelAs, closeModel, null, exit });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Edit menu\r\n \t\taction = new MenuAction(\"Edit\", new AbstractJmodelAction[] {\r\n \t\t// editUndo, editRedo, null\r\n \t\t\t\tactionCut, actionCopy, actionPaste, actionDelete, null, takeScreenShot });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Define menu\r\n \t\taction = new MenuAction(\"Define\",\r\n \t\t\t\tnew AbstractJmodelAction[] { editUserClasses, editMeasures, editSimParams, editPAParams, null, editDefaults });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Solve menu\r\n \t\taction = new MenuAction(\"Solve\", new AbstractJmodelAction[] { simulate, pauseSimulation, stopSimulation, null, switchToExactSolver, null,\r\n \t\t\t\tshowResults });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Help menu\r\n \t\taction = new MenuAction(\"Help\", new AbstractJmodelAction[] { openHelp, null, about });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\treturn menu;\r\n \t}", "protected abstract List<OpcionMenu> inicializarOpcionesMenu();", "public FormPermisos() {\n initComponents();\n setLocationRelativeTo(null);\n setTitle(\"INTERFACE-PERMISOS\");\n }", "private JMenuItem getAjoutjMenuItem() {\r\n\t\tif (AjoutjMenuItem == null) {\r\n\t\t\tAjoutjMenuItem = new JMenuItem();\r\n\t\t\tAjoutjMenuItem.setText(\"Nouvelle Fiche\");\r\n\t\t\tAjoutjMenuItem.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\t\tAjoutjMenuItem.setIcon(new ImageIcon(getClass().getResource(\"/nouveau_petit.png\")));\r\n\t\t\tAjoutjMenuItem.setActionCommand(\"Nouvelle Fiche\");\r\n\t\t\t\r\n\t\t\tAjoutjMenuItem.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t//System.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\r\n\t\t\t\t\tif (e.getActionCommand().equals(\"Nouvelle Fiche\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_Ajout();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn AjoutjMenuItem;\r\n\t}", "private static JMenuBar createMenu() {\r\n JMenuBar mb = new JMenuBar();\r\n JMenu menu = new JMenu(\"File\");\r\n JMenuItem item = new JMenuItem(\"Save\");\r\n item.addActionListener((ActionEvent evt) -> {\r\n saveActionPerformed();\r\n });\r\n menu.add(item);\r\n mb.add(menu);\r\n\r\n menu = new JMenu(\"Help\");\r\n item = new JMenuItem(\"Show how-to\");\r\n item.addActionListener((ActionEvent evt) -> {\r\n showHelp();\r\n });\r\n menu.add(item);\r\n\r\n mb.add(menu);\r\n\r\n return mb;\r\n }", "@RequestMapping(value = { \"/newModule\" }, method = RequestMethod.GET)\n\t\tpublic String newModule(ModelMap model) {\n\t\t\tModule module = new Module();\n\t\t\tmodel.addAttribute(\"module\", module);\n\t\t\tmodel.addAttribute(\"edit\", false);\n\t\t\t\n\t\t\treturn \"addNewModule\";\n\t\t}", "@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}", "public MenuUsuario(ControladorUsuario1 controladorUsuario) {\n initComponents();\n controladorU=controladorUsuario;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create, menu);\n return true;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n lblUsuario = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jMenuBar1 = new javax.swing.JMenuBar();\n jmInicio = new javax.swing.JMenu();\n jmiCerrar = new javax.swing.JMenuItem();\n jmUsuario = new javax.swing.JMenu();\n jmiRegistrar = new javax.swing.JMenuItem();\n jmiEliminar = new javax.swing.JMenuItem();\n jMenu1 = new javax.swing.JMenu();\n JmiRegistrarServ = new javax.swing.JCheckBoxMenuItem();\n JmiModificarServ = new javax.swing.JMenuItem();\n JmiEliminarServ = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n JmenuIApps = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setName(\"JfMenuPrincipal\"); // NOI18N\n setResizable(false);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosed(java.awt.event.WindowEvent evt) {\n formWindowClosed(evt);\n }\n });\n getContentPane().setLayout(null);\n\n jLabel1.setFont(new java.awt.Font(\"Kristen ITC\", 1, 36)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(153, 255, 255));\n jLabel1.setText(\"MENÚ PRINCIPAL.\");\n jLabel1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n getContentPane().add(jLabel1);\n jLabel1.setBounds(90, 150, 410, 49);\n\n lblUsuario.setFont(new java.awt.Font(\"Kristen ITC\", 1, 18)); // NOI18N\n lblUsuario.setForeground(new java.awt.Color(255, 255, 255));\n lblUsuario.setText(\" \");\n lblUsuario.setToolTipText(\"Usuario con sesión activa.\");\n lblUsuario.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n getContentPane().add(lblUsuario);\n lblUsuario.setBounds(190, 250, 210, 56);\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/MenuPrincipal/common/Bio-Grid_Computing.jpg\"))); // NOI18N\n jLabel2.setText(\"jLabel2\");\n jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n getContentPane().add(jLabel2);\n jLabel2.setBounds(0, 0, 570, 370);\n\n jMenuBar1.setBackground(new java.awt.Color(102, 255, 255));\n jMenuBar1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 102)));\n jMenuBar1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n\n jmInicio.setForeground(new java.awt.Color(0, 0, 153));\n jmInicio.setText(\"INICIO\");\n jmInicio.setToolTipText(\"Seleccione para ver las opciones del menú de Inicio.\");\n jmInicio.setFont(new java.awt.Font(\"Kristen ITC\", 1, 12)); // NOI18N\n\n jmiCerrar.setFont(new java.awt.Font(\"Kristen ITC\", 0, 12)); // NOI18N\n jmiCerrar.setForeground(new java.awt.Color(0, 0, 153));\n jmiCerrar.setText(\"Cerrar Sesión\");\n jmiCerrar.setToolTipText(\"Seleccione para cerrar la sesión del usuario.\");\n jmiCerrar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jmiCerrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jmiCerrarActionPerformed(evt);\n }\n });\n jmInicio.add(jmiCerrar);\n\n jMenuBar1.add(jmInicio);\n\n jmUsuario.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 153)));\n jmUsuario.setForeground(new java.awt.Color(0, 0, 153));\n jmUsuario.setText(\"USUARIOS\");\n jmUsuario.setToolTipText(\"Seleccione para ver las opciones del menú de Usuarios.\");\n jmUsuario.setFont(new java.awt.Font(\"Kristen ITC\", 1, 12)); // NOI18N\n\n jmiRegistrar.setFont(new java.awt.Font(\"Kristen ITC\", 0, 12)); // NOI18N\n jmiRegistrar.setForeground(new java.awt.Color(0, 0, 153));\n jmiRegistrar.setText(\"Registrar\");\n jmiRegistrar.setToolTipText(\"Seleccione para registrar usuarios.\");\n jmiRegistrar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jmiRegistrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jmiRegistrarActionPerformed(evt);\n }\n });\n jmUsuario.add(jmiRegistrar);\n\n jmiEliminar.setFont(new java.awt.Font(\"Kristen ITC\", 0, 12)); // NOI18N\n jmiEliminar.setForeground(new java.awt.Color(0, 0, 153));\n jmiEliminar.setText(\"Eliminar\");\n jmiEliminar.setToolTipText(\"Seleccione para eliminar usuarios.\");\n jmiEliminar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jmiEliminar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jmiEliminarActionPerformed(evt);\n }\n });\n jmUsuario.add(jmiEliminar);\n\n jMenuBar1.add(jmUsuario);\n\n jMenu1.setBackground(new java.awt.Color(0, 51, 153));\n jMenu1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 102)));\n jMenu1.setForeground(new java.awt.Color(0, 0, 153));\n jMenu1.setText(\"SERVIDORES\");\n jMenu1.setToolTipText(\"Seleccione para ver las opciones del menú de Servidores.\");\n jMenu1.setFont(new java.awt.Font(\"Kristen ITC\", 1, 12)); // NOI18N\n\n JmiRegistrarServ.setFont(new java.awt.Font(\"Kristen ITC\", 0, 12)); // NOI18N\n JmiRegistrarServ.setForeground(new java.awt.Color(0, 0, 153));\n JmiRegistrarServ.setText(\"Registrar\");\n JmiRegistrarServ.setToolTipText(\"Seleccione para registrar servidores.\");\n JmiRegistrarServ.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n JmiRegistrarServ.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JmiRegistrarServActionPerformed(evt);\n }\n });\n jMenu1.add(JmiRegistrarServ);\n\n JmiModificarServ.setFont(new java.awt.Font(\"Kristen ITC\", 0, 12)); // NOI18N\n JmiModificarServ.setForeground(new java.awt.Color(0, 0, 153));\n JmiModificarServ.setText(\"Modificar\");\n JmiModificarServ.setToolTipText(\"Seleccione para modificar los servidores existentes.\");\n JmiModificarServ.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n JmiModificarServ.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JmiModificarServActionPerformed(evt);\n }\n });\n jMenu1.add(JmiModificarServ);\n\n JmiEliminarServ.setFont(new java.awt.Font(\"Kristen ITC\", 0, 12)); // NOI18N\n JmiEliminarServ.setForeground(new java.awt.Color(0, 0, 153));\n JmiEliminarServ.setText(\"Eliminar\");\n JmiEliminarServ.setToolTipText(\"Seleccione para eliminar seridores.\");\n JmiEliminarServ.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n JmiEliminarServ.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JmiEliminarServActionPerformed(evt);\n }\n });\n jMenu1.add(JmiEliminarServ);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Apps\");\n\n JmenuIApps.setText(\"Registrar Apps\");\n JmenuIApps.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JmenuIAppsActionPerformed(evt);\n }\n });\n jMenu2.add(JmenuIApps);\n\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\n\n setBounds(0, 0, 587, 424);\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmenu.add(0,context_class_test_menu1, 0, \"newmenu\"+Math.random());\r\n\t\t\t\tLog.e(\"test\", \"完成添加\");\r\n\r\n\t\t\t}", "private void makeMenu() {\r\n int i = 0;\r\n int j = 0;\r\n final JMenuBar bar = new JMenuBar();\r\n final Action[] menuActions = {new NewItemAction(MENU_ITEM_STRINGS[i++]),\r\n new ExitAction(MENU_ITEM_STRINGS[i++], myFrame),\r\n new AboutAction(MENU_ITEM_STRINGS[i++], myFrame)};\r\n i = 0;\r\n\r\n final JMenu fileMenu = new JMenu(MENU_STRINGS[j++]);\r\n fileMenu.setMnemonic(KeyEvent.VK_F);\r\n fileMenu.add(menuActions[i++]);\r\n fileMenu.addSeparator();\r\n fileMenu.add(menuActions[i++]);\r\n\r\n final JMenu optionsMenu = new JMenu(MENU_STRINGS[j++]);\r\n optionsMenu.setMnemonic(KeyEvent.VK_O);\r\n\r\n final JMenu helpMenu = new JMenu(MENU_STRINGS[j++]);\r\n helpMenu.setMnemonic(KeyEvent.VK_H);\r\n helpMenu.add(menuActions[i++]);\r\n\r\n bar.add(fileMenu);\r\n bar.add(optionsMenu);\r\n bar.add(helpMenu);\r\n\r\n myFrame.setJMenuBar(bar);\r\n }", "public Principal() {\n initComponents();\n this.setLocationRelativeTo(null);\n inicio.setEnabled(false);\n this.setTitle(\"Menu Principal\");\n menuA=\"Inicio\";\n menuB=\"\";\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_template, menu);\n\t\treturn true;\n\t}", "public VentanaPrincipal() {\r\n\t\t\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 643, 414);\r\n\t\t\r\n\t\tmenuBar = new JMenuBar();\r\n\t\tsetJMenuBar(menuBar);\r\n\t\t\r\n\t\tmnPersona = new JMenu(\"Persona\");\r\n\t\tmenuBar.add(mnPersona);\r\n\t\t\r\n\t\tmntmAgregar = new JMenuItem(\"Agregar\");\r\n\t\tmnPersona.add(mntmAgregar);\r\n\t\t\r\n\t\tmntmModificar = new JMenuItem(\"Modificar\");\r\n\t\tmnPersona.add(mntmModificar);\r\n\t\t\r\n\t\tmntmListar=new JMenuItem(\"Listar\");\r\n\t\tmnPersona.add(mntmListar);\r\n\t\t\r\n\t\tmntmEliminar = new JMenuItem(\"Eliminar\");\r\n\t\tmnPersona.add(mntmEliminar);\r\n\t\t\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\t\r\n\r\n\t}", "private void createMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(flp.getString(\"file\"));\n\t\tmenuBar.add(fileMenu);\n\n\t\tfileMenu.add(new JMenuItem(new ActionNewDocument(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionOpen(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSave(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSaveAs(flp, this)));\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(new JMenuItem(new ActionExit(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionStatistics(flp, this)));\n\n\t\teditMenu = new JMenu(flp.getString(\"edit\"));\n\n\t\teditMenu.add(new JMenuItem(new ActionCut(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionCopy(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionPaste(flp, this)));\n\n\t\ttoolsMenu = new JMenu(flp.getString(\"tools\"));\n\n\t\titemInvert = new JMenuItem(new ActionInvertCase(flp, this));\n\t\titemInvert.setEnabled(false);\n\t\ttoolsMenu.add(itemInvert);\n\n\t\titemLower = new JMenuItem(new ActionLowerCase(flp, this));\n\t\titemLower.setEnabled(false);\n\t\ttoolsMenu.add(itemLower);\n\n\t\titemUpper = new JMenuItem(new ActionUpperCase(flp, this));\n\t\titemUpper.setEnabled(false);\n\t\ttoolsMenu.add(itemUpper);\n\n\t\tsortMenu = new JMenu(flp.getString(\"sort\"));\n\t\tsortMenu.add(new JMenuItem(new ActionSortAscending(flp, this)));\n\t\tsortMenu.add(new JMenuItem(new ActionSortDescending(flp, this)));\n\n\t\tmenuBar.add(editMenu);\n\t\tmenuBar.add(createLanguageMenu());\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(sortMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}", "private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {\n Seleccion_Insertar insert = new Seleccion_Insertar();\n insert.setVisible(true);\n this.setVisible(false);\n }", "static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_dbcreate, menu);\n return true;\n }", "public String modificar() {\n\n\t\tLOG.info(\"accion crear alumno\");\n\t\tString view = VIEW_LISTADO;\n\t\tview = VIEW_FORM_ALTA;\n\t\tthis.alumnos.add(this.alumno);\n\t\treturn view;\n\t}", "public frmAdministracion() {\n initComponents();\n skin();\n DaoAdministracion da = new DaoAdministracion();\n da.setAdministracion(txtMedioAdministracion.getText());\n tblAdministracion.setModel(da.listar());\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_new_notice_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create_edit, menu);\n return true;\n }", "protected void createContextMenu() {\n\t\t// TODO : XML Editor 에서 Query Editor 관련 Action 삭제~~\n\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\"); //$NON-NLS-1$\n\t\tcontextMenu.add(new Separator(\"additions\")); //$NON-NLS-1$\n\t\tcontextMenu.setRemoveAllWhenShown(true);\n\t\tcontextMenu.addMenuListener(new NodeActionMenuListener());\n\t\tMenu menu = contextMenu.createContextMenu(getControl());\n\t\tgetControl().setMenu(menu);\n\t\t// makeActions();\n\t\t// hookSingleClickAction();\n\n\t}", "public NewAction() {\n\t\tsuper(\"New...\", null);\n\t\tputValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, MAIN_MENU_MASK));\n\t}", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\thome = new AdminDashboardForm();\r\n\t\t\tRootPanel.get(\"details\").add(home);\r\n\t\t}", "@Override\r\n\tprotected MenuManager createMenuManager() {\r\n\t\tMenuManager menuManager = new MenuManager(\"menu\");\r\n\t\treturn menuManager;\r\n\t}", "public TextController createMenu(ControllerCore genCode) {\n\t\tmenuTXT = new TextController(\"menu\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(menu$1LBL);\n\t\t\t\tsetProperty(\"menu\");\n\t\t\t\tsuper.initialize();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tif (null != fieldBindManager)\n\t\t\t\t\t\tfieldBindManager = new XjcFieldBindingManager(this);\n\t\t\t\t\tgetControl().addFocusListener(new XjcFocusListener(this));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn menuTXT;\n\t}", "@RequestMapping(value = { \"/new\"}, method = RequestMethod.GET)\n\tpublic String newEntity(ModelMap model) {\n\t\tENTITY entity = createEntity();\n\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}", "private void createMenusNow()\n {\n JMenu debugMenu = myToolbox.getUIRegistry().getMenuBarRegistry().getMenu(MenuBarRegistry.MAIN_MENU_BAR,\n MenuBarRegistry.DEBUG_MENU);\n debugMenu.add(SwingUtilities.newMenuItem(\"DataTypeInfo - Print Summary\", e -> printSummary()));\n debugMenu.add(SwingUtilities.newMenuItem(\"DataTypeInfo - Tag Data Type\", e -> tagDataType()));\n }" ]
[ "0.68718207", "0.68005645", "0.662302", "0.6605793", "0.65613776", "0.64822584", "0.6481497", "0.64279264", "0.6201245", "0.6163001", "0.61563116", "0.61400115", "0.61203736", "0.6118874", "0.61132675", "0.6110327", "0.61098135", "0.6072316", "0.6059912", "0.6043534", "0.60229033", "0.60227495", "0.6020774", "0.6010748", "0.60087526", "0.5985059", "0.59819436", "0.5959423", "0.5925143", "0.59122586", "0.5893733", "0.5890397", "0.587756", "0.5872073", "0.586266", "0.58612645", "0.5859761", "0.58556235", "0.5852257", "0.5848072", "0.5845938", "0.5845639", "0.58431345", "0.58376276", "0.5829673", "0.58271724", "0.582567", "0.5823649", "0.5817512", "0.5811719", "0.58076996", "0.58044034", "0.5795574", "0.5792323", "0.57907706", "0.57899654", "0.5785672", "0.5779103", "0.5773982", "0.57707775", "0.5766532", "0.57612985", "0.57541436", "0.57327247", "0.5722977", "0.57193136", "0.57180554", "0.5716398", "0.5713997", "0.57097673", "0.57092613", "0.5706445", "0.57025474", "0.56972444", "0.569648", "0.5688894", "0.56864226", "0.56793624", "0.5677737", "0.5675098", "0.5671329", "0.56701624", "0.5666801", "0.5663925", "0.5663543", "0.5658449", "0.56538284", "0.56535035", "0.5653426", "0.56506413", "0.56455857", "0.5643359", "0.5640043", "0.5637044", "0.56334263", "0.56323683", "0.563219", "0.5631778", "0.562912", "0.5629005" ]
0.5896395
30
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jButton5 = new javax.swing.JButton(); jButton6 = new javax.swing.JButton(); jButton7 = new javax.swing.JButton(); jButton8 = new javax.swing.JButton(); jButton9 = new javax.swing.JButton(); jButton10 = new javax.swing.JButton(); jButton11 = new javax.swing.JButton(); jButton12 = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jButton13 = new javax.swing.JButton(); jButton14 = new javax.swing.JButton(); jButton15 = new javax.swing.JButton(); textField1 = new java.awt.TextField(); jLabel2 = new javax.swing.JLabel(); jButton16 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("MENU ADMINISTRADOR"); jButton5.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton5.setForeground(new java.awt.Color(0, 0, 153)); jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/escudo.png"))); // NOI18N jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton5ActionPerformed(evt); } }); jButton6.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton6.setForeground(new java.awt.Color(0, 0, 153)); jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/peligro.png"))); // NOI18N jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); jButton7.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton7.setForeground(new java.awt.Color(0, 0, 153)); jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/herramientas.png"))); // NOI18N jButton7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton7ActionPerformed(evt); } }); jButton8.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton8.setForeground(new java.awt.Color(0, 0, 153)); jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/hospital.png"))); // NOI18N jButton8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton8ActionPerformed(evt); } }); jButton9.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton9.setForeground(new java.awt.Color(0, 0, 153)); jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/asegurados.png"))); // NOI18N jButton9.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton9ActionPerformed(evt); } }); jButton10.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton10.setForeground(new java.awt.Color(0, 0, 153)); jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/sin seguro.png"))); // NOI18N jButton10.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton10ActionPerformed(evt); } }); jButton11.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton11.setForeground(new java.awt.Color(0, 0, 153)); jButton11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/reporte.png"))); // NOI18N jButton11.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton11ActionPerformed(evt); } }); jButton12.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton12.setForeground(new java.awt.Color(0, 0, 153)); jButton12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/calendar.png"))); // NOI18N jButton12.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton12ActionPerformed(evt); } }); jButton1.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton1.setForeground(new java.awt.Color(0, 0, 153)); jButton1.setText("<html><center>solicitudes seguro<html>"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton2.setForeground(new java.awt.Color(0, 0, 153)); jButton2.setText("<html><center>reportar incidente<html>"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jButton3.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton3.setForeground(new java.awt.Color(0, 0, 153)); jButton3.setText("cola taller"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jButton4.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton4.setForeground(new java.awt.Color(0, 0, 153)); jButton4.setText("cola clinica"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); jButton13.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton13.setForeground(new java.awt.Color(0, 0, 153)); jButton13.setText("asegurados"); jButton13.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton13ActionPerformed(evt); } }); jButton14.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton14.setForeground(new java.awt.Color(0, 0, 153)); jButton14.setText("no Asegurados"); jButton14.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton14ActionPerformed(evt); } }); jButton15.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton15.setForeground(new java.awt.Color(0, 0, 153)); jButton15.setText("reportes"); jButton15.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton15ActionPerformed(evt); } }); jLabel2.setFont(new java.awt.Font("GothicE", 1, 16)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("Fecha:"); jButton16.setFont(new java.awt.Font("Algerian", 0, 16)); // NOI18N jButton16.setForeground(new java.awt.Color(0, 0, 153)); jButton16.setText("cerrar sesion"); jButton16.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton16ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(24, 24, 24) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addGap(6, 6, 6) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jButton13, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton16, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGap(6, 6, 6) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(13, 13, 13)) .addGroup(layout.createSequentialGroup() .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(6, 6, 6) .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton10, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE) .addComponent(jButton14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(6, 6, 6) .addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(31, 31, 31) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(textField1, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addContainerGap(24, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jButton16) .addGap(4, 4, 4) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(30, 30, 30) .addComponent(textField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(16, 16, 16)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2))) .addContainerGap(20, Short.MAX_VALUE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public Soru1() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public quotaGUI() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public PatientUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Magasin() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public kunde() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public MusteriEkle() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "public sinavlar2() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public P0405() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73195183", "0.7290407", "0.7290407", "0.7290407", "0.72855854", "0.7248445", "0.7213232", "0.72084314", "0.7195551", "0.71902007", "0.71835697", "0.7158979", "0.71473545", "0.70928645", "0.70807934", "0.70575565", "0.6987147", "0.6976941", "0.69544566", "0.69541115", "0.6943778", "0.6942792", "0.6935224", "0.6931817", "0.6928287", "0.69246083", "0.6924253", "0.69117594", "0.6910518", "0.68936557", "0.68927425", "0.6891522", "0.68911785", "0.6889459", "0.68826854", "0.68823767", "0.6880858", "0.6878632", "0.68753785", "0.68741786", "0.68710285", "0.68593234", "0.6856001", "0.6855885", "0.685485", "0.68537056", "0.68532616", "0.68519884", "0.68519884", "0.6843908", "0.6836617", "0.68361354", "0.68289286", "0.68281245", "0.6826939", "0.682426", "0.68220174", "0.68170464", "0.6816829", "0.68109316", "0.6808785", "0.6808737", "0.6808307", "0.6807784", "0.6801649", "0.67936075", "0.67933095", "0.67924714", "0.67911524", "0.67894745", "0.67889065", "0.6787865", "0.6781763", "0.6766413", "0.67660075", "0.6765137", "0.6756547", "0.6756297", "0.67528564", "0.6752207", "0.67416096", "0.67398196", "0.6737052", "0.6736384", "0.6734045", "0.67276424", "0.6726131", "0.6721189", "0.6715488", "0.671506", "0.67148006", "0.6708023", "0.67061347", "0.67027885", "0.6701509", "0.670121", "0.6699335", "0.66989076", "0.6694664", "0.6690946", "0.6688705" ]
0.0
-1
Get the identifier of the TajoContainerId.
@Public @Stable public abstract int getId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getId(NameSpaceContainer container) {\n EntityId entityId;\n switch (container.getType()) {\n case SOURCE:\n entityId = container.getSource().getId();\n break;\n case SPACE:\n entityId = container.getSpace().getId();\n break;\n case HOME:\n entityId = container.getHome().getId();\n break;\n case FOLDER:\n entityId = container.getFolder().getId();\n break;\n case DATASET:\n entityId = container.getDataset().getId();\n break;\n default:\n throw new RuntimeException(\"Invalid container type\");\n }\n\n return entityId != null ? entityId.getId() : null;\n }", "public String getContainerId() {\n return containerId;\n }", "public long generateContainerId() {\n return this.containerIdCounter.incrementAndGet();\n }", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "String getIdentityId();", "Object getId();", "protected String getContainerId(Response response) {\r\n\t\treturn response.getRequest().getId();\r\n\t}", "private Id getViewContainerID() {\n if (semantic == null) {\n return Id.invalid();\n }\n return new Id(RefreshIDFactory.getOrCreateID(viewContainer));\n }", "Identifier getId();", "UUID getId();", "public Integer getId() {\n return id.get();\n }", "public final String getId() {\r\n\t\treturn id;\r\n\t}", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "public String getId()\n\t{\n\t\treturn getId( getSession().getSessionContext() );\n\t}", "Short getId();", "public final String getId() {\n return id;\n }", "java.lang.String getID();", "public Object getId() {\n\t\treturn null;\r\n\t}", "@NonNull\n public final synchronized String getId() {\n if (id == null) {\n id = UUID.randomUUID().toString();\n }\n return id;\n }", "public static String getContainerKey() {\r\n\t\treturn ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME;\r\n\t}", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "public String getDataStoreContainerId() {\n return dataStoreContainerId;\n }", "@Nonnull\n String getId();", "public String getID(){\n return this.getKey().getTenantId(this.getTenantName());\n }", "public long getId() {\n\t\treturn getTo(true).getId();\n\t}", "public String getId() {\n\t\treturn Integer.toString(this.hashCode());\n\t}", "Integer getId();", "Integer getId();", "Integer getId();", "public Object getId() {\n return id;\n }", "public Object getId() {\n return id;\n }", "public static String id()\n {\n return _id;\n }", "long getEncounterId();", "String getContextId();", "public String getId() {\n if (id == null)\n return \"\"; //$NON-NLS-1$\n return id;\n }", "public String getId()\n\t{\n\t\treturn Id;\n\t}", "public final long getId() {\r\n return id;\r\n }", "public String getId ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"getId\", true);\n $in = _invoke ($out);\n String $result = $in.read_string ();\n return $result;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n return getId ( );\n } finally {\n _releaseReply ($in);\n }\n }", "java.lang.String getConnectionId();", "java.lang.String getConnectionId();", "java.lang.String getConnectionId();" ]
[ "0.7414463", "0.73801655", "0.72618246", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.6403092", "0.63663155", "0.632961", "0.6306494", "0.6263343", "0.6256816", "0.6252181", "0.62304604", "0.62163615", "0.6214194", "0.61919516", "0.618306", "0.6135232", "0.6106957", "0.610411", "0.6102998", "0.60915595", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.6049402", "0.60480297", "0.60405695", "0.60369223", "0.60330594", "0.60259813", "0.60218495", "0.60218495", "0.60218495", "0.6018908", "0.6018908", "0.60141003", "0.6014095", "0.6010728", "0.6008052", "0.60028505", "0.6002561", "0.6000503", "0.5988566", "0.5988566", "0.5988566" ]
0.0
-1
The interface that all plugins must implement to tell the framework about themselves. After instantiating each plugin via its noarg constructor, the framework also makes several lifecycle method calls into the plugin, in order: getApplicationContexts() allows the plugin to register any custom XML application context files provided as resources ...all plugins' application contexts are then loaded... setSpringLoader() is called after all plugins' application contexts have been bound to the SpringLoader. getName() and getVersion() are called The following calls are then made to obtain metadata about the plugin for binding into the pluginregistry they can also be called at any time during normal operation: getSchemaVersion() is called when this plugin's database schema is being checked or stored in the database. Upon system shutdown, the following calls will be made, in order: shutdown() when the framework is closing down.
public interface Plugin { /** * What is the name of this plugin? * * The framework will use this name when storing the versions * (code version and schema version) in the database, and, if * this is the Application Plugin, in the help menu, main frame * title bar, and other displays wherever the application name * is shown. * * The column used to store this in the database is 40 * characters wide. * * @return the name of this plugin */ String getName(); /** * What is the version number of this plugin's code? * * The framework will use this name when storing the versions * in the database. * * @return the code version of this plugin */ String getVersion(); /** * Allow a plugin to provide any plugin-specific application * context files. * * Can return null or an empty list if there are none. * The elements of the list are paths to resources inside the * plugin's jar, e.g. org/devzendo/myapp/app.xml * * @return a list of any application contexts that the plugin * needs to add to the SpringLoader, or null, or empty list. */ List<String> getApplicationContextResourcePaths(); /** * Give the SpringLoader to the plugin, after the * application contexts for all plugins have been loaded * @param springLoader the SpringLoader */ void setSpringLoader(final SpringLoader springLoader); /** * Obtain the SpringLoader for plugin use * @return the SpringLoader */ SpringLoader getSpringLoader(); /** * What is the database schema version of this plugin? * * The framework will use this name when storing the versions * in the database. * * @return the database schema version of this plugin */ String getSchemaVersion(); /** * Shut down the plugin, freeing any resources. Called by the * framework upon system shutdown. */ void shutdown(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PostConstruct\n public void init() {\n String[] commandPathPatterns = new String[]{\"classpath*:/commands/**\",\n \"classpath*:/crash/commands/**\"};\n\n // Patterns to use to look for configurations.\n String[] configPathPatterns = new String[]{\"classpath*:/crash/*\"};\n\n // Comma-separated list of commands to disable.\n String[] disabledCommands = new String[]{\"jpa*\", \"jdbc*\", \"jndi*\"};\n\n // Comma-separated list of plugins to disable. Certain plugins are disabled by default\n // based on the environment.\n String[] disabledPlugins = new String[0];\n\n FS commandFileSystem = createFileSystem(\n commandPathPatterns,\n disabledCommands);\n FS configurationFileSystem = createFileSystem(\n configPathPatterns, new String[0]);\n\n PluginDiscovery discovery = new BeanFactoryFilteringPluginDiscovery(\n this.resourceLoader.getClassLoader(), this.beanFactory,\n disabledPlugins);\n\n PluginContext context = new PluginContext(discovery,\n createPluginContextAttributes(), commandFileSystem,\n configurationFileSystem, this.resourceLoader.getClassLoader());\n\n context.refresh();\n start(context);\n }", "public void loadPluginsStartup();", "protected void pluginInitialize() {}", "void bootPlugins() {\n\t\tList<List<String>>vals = (List<List<String>>)properties.get(\"PlugInConnectors\");\n\t\tif (vals != null && vals.size() > 0) {\n\t\t\tString name, path;\n\t\t\tIPluginConnector pc;\n\t\t\tList<String>cntr;\n\t\t\tIterator<List<String>>itr = vals.iterator();\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tcntr = itr.next();\n\t\t\t\tname = cntr.get(0);\n\t\t\t\tpath = cntr.get(1);\n\t\t\t\ttry {\n\t\t\t\t\tpc = (IPluginConnector)Class.forName(path).newInstance();\n\t\t\t\t\tpc.init(this, name);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogError(e.getMessage(), e);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public interface PluginBase {\n void init();\n void run();\n}", "@Override\n public void initialize() {\n for (final PluginInfo<AbstractVolumeManagerPlugin> info : getPlugins()) {\n String name = info.getName();\n if (name == null || name.isEmpty()) {\n name = info.getClassName();\n }\n // Add the plugin to the list of known animals.\n plugins.put(name, info);\n }\n }", "@Override\n protected void pluginInitialize() {\n // init();\n }", "private PluginsInternal() {}", "public interface Plugin\n{\n\tpublic String getPluginName();\n}", "public interface Plugin {\n\n /**************************************************************************\n * Method: starting\n * <p>\n * Starting a plugin requires this method.\n **************************************************************************/\n public void starting();\n\n /**************************************************************************\n * Method: stopping\n * <p>\n * Stopping a plugin will happen with this method. Be it an 'emergency-stopping'\n * or you just want to turn it off.\n **************************************************************************/\n public void stopping();\n\n /**************************************************************************\n * Method: setPluginManager\n * <p>\n * To let the Plugin interact with the program we need to give something\n * with what it can work. The PluginManager is the best 'something' because\n * it knows what kind of information the Plugins are allowed to get. And\n * with the plugin manager We have specified what information the plugins\n * are allowed to use.\n **************************************************************************/\n public void setPluginManager(PluginManager pluginManager);\n}", "public interface Plugin {\n\n /**\n * Invoked when plugin is loaded\n */\n void Initialize();\n\n /**\n * Get plugin name\n * @return plugin name\n */\n String getName();\n\n /**\n * Show the issue management window\n * @param pmsIssue Notification for which the window should be displayed\n * @see PMSIssue\n * @param pmsUser User data\n * @see PMSUser\n *\n * @return window instance\n * @see Stage\n */\n Stage getIssueWindow(PMSIssue pmsIssue, PMSUser pmsUser);\n\n /**\n * Get a PMSManage object to control the project management system\n * @return PMSManage object\n */\n PMSManage getPMSManage();\n\n\n /**\n * When program is shutting down\n */\n void Free();\n}", "@Override\r\n\tpublic void configPlugin(Plugins me) {\n\r\n\t}", "private static void initPlugins() {\n \tJSPFProperties props = new JSPFProperties();\n PluginManager pm = PluginManagerFactory.createPluginManager(props);\n pm.addPluginsFrom(new File(\"plugins/\").toURI());\n JavaBot.plugins = new PluginManagerUtil(pm).getPlugins(javaBotPlugin.class);\n }", "Plugin getPlugin();", "public interface IPluginManager {\n\tpublic BasePluginPackage initPlugin(String pluginPath);\n\n\tpublic BasePluginPackage getPluginPackage(String packageName);\n\n\tpublic Class loadPluginClass(BasePluginPackage basePluginPackage, String className);\n}", "public interface FJPluginInterface\r\n{\r\n\t/**\r\n\t * When the plugin is loaded, the pluin's implementation of this method\r\n\t * will be invoked. If nothing needs to be done on startup in a plugin,\r\n\t * keep the method empty. For instance you might do all the work in the\r\n\t * constructor, or you could wait for user input, which will make this\r\n\t * method unnecessary.\r\n\t */\r\n\tpublic void start();\r\n\t\r\n\t/**\r\n\t * Invoked when a plugin is unloaded and another plugin is loaded or when\r\n\t * Flask Jaws is terminated. Useful for shutting down sockets and readers\r\n\t * when you exit your plugin. If nothing needs to be done upon exit or no\r\n\t * cleaning needs to be done, this method may be left empty.\r\n\t * <p>\r\n\t * If a plugin supports networking of any kind, it should call\r\n\t * {@link se.mansehr.flaskjaws.pluginclasses.FJNetwork#close()} in this method.\r\n\t */\r\n\tpublic void stop();\r\n\t\r\n\t/**\r\n\t * Whenever there's a plugin loaded and you select a menu item from the\r\n\t * menu bar, this method will be called. It should pause the plugin\r\n\t * implementing this method. If no pausing is neccessary, it can be\r\n\t * implemented as an emtpy method.\r\n\t */\r\n\tpublic void pause();\r\n\t\r\n\t/**\r\n\t * Has the opposite function as {@link #pause()}, it resumes the plugin\r\n\t * once the actions invoked by selecting a menu item is done.\r\n\t */\r\n\tpublic void resume();\r\n}", "public void loadPlugins() {\n\n ServiceLoader<Pump> serviceLoader = ServiceLoader.load(Pump.class);\n for (Pump pump : serviceLoader) {\n availablePumps.put(pump.getPumpName(), pump);\n }\n\n Pump dummy = new DummyControl();\n availablePumps.put(dummy.getName(), dummy);\n\n Pump lego = new LegoControl();\n availablePumps.put(lego.getName(), lego);\n }", "public void loadPlugins()\n throws Exception\n {\n SecurityClassLoader securityClassLoader = new SecurityClassLoader(Plugin.class.getClassLoader(),\n ImmutableList.of(\"ideal.sylph.\", \"com.github.harbby.gadtry.\")); //raed only sylph-api deps\n this.loader = ModuleLoader.<Plugin>newScanner()\n .setPlugin(Plugin.class)\n .setScanDir(pluginDir)\n .setLoader(OperatorManager::serviceLoad)\n .setClassLoaderFactory(urls -> new VolatileClassLoader(urls, securityClassLoader)\n {\n @Override\n protected void finalize()\n throws Throwable\n {\n super.finalize();\n logger.warn(\"Jvm gc free ClassLoader: {}\", Arrays.toString(urls));\n }\n })\n .setLoadHandler(module -> {\n logger.info(\"loading module {} find {} Operator\", module.getName(), module.getPlugins().size());\n ModuleInfo moduleInfo = new ModuleInfo(module, new ArrayList<>());\n analyzeModulePlugins(moduleInfo);\n ModuleInfo old = userExtPlugins.put(module.getName(), moduleInfo);\n if (old != null) {\n Try.of(old::close).onFailure(e -> logger.warn(\"free old module failed\", e)).doTry();\n }\n }).load();\n }", "public DemoPluginFactory() {}", "public void initialize(DefaultPluginsCollector collector);", "private void loadPlugins(){\r\n\t\tKomorebiCoreConfig config = new KomorebiCoreConfig();\r\n\t\t\r\n\t\tif(config.getRootNode().getChildrenCount(\"plugins\") < 1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tList<ConfigurationNode> pluginNodes = config.getRootNode().getChildren(\"plugins\").get(0).getChildren(\"plugin\");\r\n\t\tfor(int pos=0; pos<pluginNodes.size(); ++pos){\r\n\t\t\tString name = config.getString(\"plugins.plugin(\"+pos+\")[@name]\");\r\n\t\t\tString version = config.getString(\"plugins.plugin(\"+pos+\")[@version]\");\r\n\t\t\tif(version == null || name == null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tloadPluginsJar(name+\"-\"+version); // check all classes in jar\r\n\t\t}\r\n\t}", "public static void setup()\n\t{\n\t\tregisterEvent(calico.plugins.events.clients.ClientConnect.class);\n\t\tregisterEvent(calico.plugins.events.clients.ClientDisconnect.class);\n\n\t\tregisterEvent(calico.plugins.events.scraps.ScrapCreate.class);\n\t\tregisterEvent(calico.plugins.events.scraps.ScrapDelete.class);\n\t\tregisterEvent(calico.plugins.events.scraps.ScrapReload.class);\n\t\t\n\t\t\n\t\t//System.out.println(\"LOAD PLUGINS: \"+COptions.server.plugins);\n\t\t\n\t\tlogger.debug(\"Loading plugins\");\n\t\t\n\t\ttry\n\t\t{\n\t\t\tPluginFinder pluginFinder = new PluginFinder();\n\t\t\tpluginFinder.search(\"plugins/\");\n\t\t\tList<Class<?>> pluginCollection = pluginFinder.getPluginCollection();\n\t\t\tfor (Class<?> plugin: pluginCollection)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Loading \" + plugin.getName());\n\t\t\t\tregisterPlugin(plugin);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tString[] pluginsToLoad = COptions.server.plugins.split(\",\");\n\t\t\n//\t\tif(pluginsToLoad.length>0)\n//\t\t{\n//\t\t\tfor(int i=0;i<pluginsToLoad.length;i++)\n//\t\t\t{\n//\t\t\t\ttry\n//\t\t\t\t{\n//\t\t\t\t\tClass<?> pluginClass = Class.forName(pluginsToLoad[i].trim());\n//\t\t\t\t\tregisterPlugin(pluginClass);\n//\t\t\t\t}\n//\t\t\t\tcatch(Exception e)\n//\t\t\t\t{\n//\t\t\t\t\tlogger.error(\"Could not load plugin \"+pluginsToLoad[i].trim());\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\t\n\t\n\t}", "Plugin getPlugin( );", "@Override\n public PluginInformation getPluginInformation() {\n return super.getPluginInformation();\n }", "public interface Plugin<T> {\n\t/**\n\t * Method returns the hashmap with loaded plugins. </p> Hashmap is inside\n\t * PluginManager class.\n\t * \n\t * @return hashmap with loaded plugins\n\t */\n\tpublic HashMap<String, T> getStorage();\n\n\t/**\n\t * Method adds the plugin specified in pluginClass param into hashmap with\n\t * param key. </p> Hashmap is inside PluginManager class.\n\t * \n\t * @param key\n\t * to hashmap with added plugin\n\t * @param pluginClass\n\t * of type class to save into hashmap\n\t */\n\tpublic void addPlugin(String key, T pluginClass);\n\n\t/**\n\t * Name of the plugin.\n\t * \n\t * @return name of plugin\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Tests if the plugin has any error\n\t * \n\t * @return true if there is any error.\n\t */\n\tpublic boolean hasError();\n}", "public AbstractPlugin() { }", "private void locateDefaultPlugins() {\n \t\tHashMap runtimeImport = getRuntimeImport();\n \n \t\t// locate runtime plugin matching the import from boot\n \t\tURL runtimePluginPath = getPluginPath(runtimeImport);\n \t\tif (runtimePluginPath == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.runtime\")); //$NON-NLS-1$\n \n \t\t// get boot descriptor for runtime plugin\n \t\truntimeDescriptor = createPluginBootDescriptor(runtimePluginPath);\n \n \t\t// determine the xml plugin for the selected runtime\n \t\tHashMap xmlImport = getImport(runtimePluginPath, XML_PLUGIN_ID);\n \n \t\t// locate xml plugin matching the import from runtime plugin\n \t\tURL xmlPluginPath = getPluginPath(xmlImport);\n \t\tif (xmlPluginPath == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.xerces\")); //$NON-NLS-1$\n \n \t\t// get boot descriptor for xml plugin\n \t\txmlDescriptor = createPluginBootDescriptor(xmlPluginPath);\n \t}", "public interface PluginProvider {\n\n /**\n * Returns an instance of the specified plugin by loading the plugin class through the specified class loader.\n *\n * @param type plugin type class\n * @param className plugin class name\n * @param classLoader class loader to be used to load the plugin class\n * @param <T> plugin type\n * @return instance of the plugin\n * @throws PluginLoadingException if en error occurred when loading or instantiation of the plugin\n */\n <T> T getPluginInstance(Class<T> type, String className, ClassLoader classLoader) throws PluginLoadingException;\n}", "private PluginAPI() {\r\n\t\tsuper();\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n mPluginMgr = PluginManager.getInstance(this);\n mPluginMgr.setLoaderListener(getPluginPackageName(), this);\n super.onCreate(savedInstanceState);\n mSavedInstanceState = savedInstanceState;\n load();\n\n }", "public interface IPluginLibrary {\n \n /*\n * Initializes the library\n */\n public void initialize(DefaultPluginsCollector collector);\n \n /*\n * Start the module and initialize components\n */\n public void startLibrary();\n \n /*\n * Fetches all extensions for the given extension point qualifiers.\n * \n * @param extPointId The extension point id to gather plugins for\n * \n * @return The gathered plugins in a LinkedList\n */\n public void loadAllPlugins(final String extPointId);\n \n /*\n * Fetches new extensions for the given extension point qualifiers.\n * \n * @param extPointId The extension point id to gather plugins for\n * \n * @return A human readable string\n */\n public String loadNewPlugin(final String extPointId); \n \n /**\n * Checks a plugin for validity.\n * \n * @param plugin The plugin to check\n * @param The level to test against, this method will return true if the result is greater or\n * equal than the testLevel\n * @return true or false\n */\n public boolean isValidPlugin(MartinPlugin plugin, MartinAPITestResult testLevel);\n\n /**\n * Answer a request by searching plugin-library for function and executing\n * them.\n * \n * @param req The {@link ExtendedQequest} to answer.\n * \n * @return The generated {@link MResponse}.\n */\n public MResponse executeRequest(ExtendedRequest req);\n\n \n public List<PluginInformation> getPluginInformation();\n \n /**\n * Returns a list of example calls read from the plugin database. Is usually\n * only called from the AI controller when the user first loads the MArtIn\n * frontend.\n * \n * @return a list of example calls\n */\n public List<MExampleCall> getExampleCalls();\n \n /**\n * Returns a list of 5 randomly choosen example calls read from the plugin database. Is usually\n * only called from the AI controller when the user first loads the MArtIn\n * frontend.\n * \n * @return a list of 5 randomly choosen example calls\n */\n public List<MExampleCall> getRandomExampleCalls();\n \n public Map<String, Pair<Boolean, MartinPlugin> > getPluginExtentions();\n}", "public interface PluginManager<P extends REIPlugin<?>> extends ParentReloadable<P> {\n @Environment(EnvType.CLIENT)\n static PluginManager<REIClientPlugin> getClientInstance() {\n return ClientInternals.getPluginManager();\n }\n \n static PluginManager<REIPlugin<?>> getInstance() {\n return Internals.getPluginManager();\n }\n \n static PluginManager<REIServerPlugin> getServerInstance() {\n return Internals.getServerPluginManager();\n }\n \n static List<PluginManager<? extends REIPlugin<?>>> getActiveInstances() {\n return EnvExecutor.getEnvSpecific(() -> () -> Arrays.asList(getInstance(), getClientInstance(), getServerInstance()),\n () -> () -> Arrays.asList(getInstance(), getServerInstance()));\n }\n \n static boolean areAnyReloading() {\n return CollectionUtils.anyMatch(getActiveInstances(), PluginManager::isReloading);\n }\n \n boolean isReloading();\n \n <T extends Reloadable<? super P>> T get(Class<T> reloadableClass);\n \n List<REIPluginProvider<P>> getPluginProviders();\n \n Iterable<P> getPlugins();\n \n @ApiStatus.Internal\n PluginView<P> view();\n}", "public abstract ApplicationLoader.Context context();", "public interface GeoServerPluginConfigurator {\r\n \r\n /**\r\n * Get the list of Resources used by the plugin.\r\n * \r\n * @return\r\n * @throws IOException\r\n */\r\n public List<Resource> getFileLocations() throws IOException;\r\n \r\n /**\r\n * Allows the plugin to store its configuration on the target {@link GeoServerResourceLoader}.\r\n * This way we delegate the plugin to save its configuration since it is the only\r\n * on who knows how to do it better.\r\n * \r\n * @param resourceLoader\r\n * @throws IOException\r\n */\r\n public void saveConfiguration(GeoServerResourceLoader resourceLoader) throws IOException;\r\n \r\n /**\r\n * Allows the plugin to reload its configuration from the target {@link GeoServerResourceLoader}.\r\n * This way we delegate the plugin to load its configuration since it is the only\r\n * on who knows how to do it better.\r\n * \r\n * @param resourceLoader\r\n * @throws IOException\r\n */\r\n public void loadConfiguration(GeoServerResourceLoader resourceLoader) throws IOException;\r\n\r\n}", "protected abstract PluginManager<String, BaseType> getPluginManager();", "private PluginLoader<Object> createPluginLoader() {\n return PluginLoader.forType(Object.class)\n .ifVersionGreaterOrEqualTo(JAVA_9).load(pluginTypeBetweenJava9AndJava13.getName())\n .ifVersionGreaterOrEqualTo(JAVA_14).load(pluginTypeAfterJava13.getName())\n .fallback(newInstance(pluginTypeBeforeJava9));\n }", "public void setPluginName(String pluginName);", "protected abstract void onPluginEnable();", "public BuildAnalyzerPlugin() {\n\t\tsuper();\n\t\tmonitor.register();\n\t\tplugin = this;\n\t}", "public void startPlugin() {\n\t\t// add a new ResourceChangeListener\n\t\tCheops.getInstance().addResourceChangeListener();\n\t}", "public interface IPlugin {\n void setParam(IParam param);\n\n IParam getParam();\n\n void setMonitor(IPluginMonitor monitor);\n\n IPluginMonitor getMonitor();\n\n void init();\n\n void connection();\n\n void finish();\n\n Map<String, String> getMonitorInfo();\n}", "public interface PluginInterface {\n\n public void attach(Activity proxyActivity);\n\n public void onCreate(Bundle saveInstanceState);\n\n public void onStart();\n\n public void onResume();\n\n public void onPause();\n\n public void onStop();\n\n public void onDestroy();\n\n public void onSaveInstanceState(Bundle outSate);\n\n public boolean onTouchEvent(MotionEvent event);\n\n public void onBackPressed();\n\n\n}", "private void initPluginComponents()\n {\n // Make sure that we don't miss any event.\n GuiActivator.getUIService().addPluginComponentListener(this);\n\n pluginPanelEast.setLayout(\n new BoxLayout(pluginPanelEast, BoxLayout.Y_AXIS));\n pluginPanelSouth.setLayout(\n new BoxLayout(pluginPanelSouth, BoxLayout.Y_AXIS));\n pluginPanelWest.setLayout(\n new BoxLayout(pluginPanelWest, BoxLayout.Y_AXIS));\n\n this.getContentPane().add(pluginPanelEast, BorderLayout.EAST);\n this.getContentPane().add(pluginPanelWest, BorderLayout.WEST);\n this.mainPanel.add(pluginPanelSouth, BorderLayout.SOUTH);\n\n // Search for plugin components registered through the OSGI bundle\n // context.\n Collection<ServiceReference<PluginComponentFactory>> serRefs;\n String osgiFilter\n = \"(|(\" + Container.CONTAINER_ID + \"=\"\n + Container.CONTAINER_CHAT_WINDOW.getID() + \")(\"\n + Container.CONTAINER_ID + \"=\"\n + Container.CONTAINER_CHAT_STATUS_BAR.getID() + \"))\";\n\n try\n {\n serRefs\n = GuiActivator.bundleContext.getServiceReferences(\n PluginComponentFactory.class,\n osgiFilter);\n }\n catch (InvalidSyntaxException ex)\n {\n serRefs = null;\n logger.error(\"Could not obtain plugin component reference.\", ex);\n }\n\n if ((serRefs != null) && !serRefs.isEmpty())\n {\n for (ServiceReference<PluginComponentFactory> serRef : serRefs)\n {\n PluginComponentFactory factory\n = GuiActivator.bundleContext.getService(serRef);\n Component comp\n = (Component)\n factory\n .getPluginComponentInstance(ChatWindow.this)\n .getComponent();\n\n // If this component has been already added, we have nothing\n // more to do here.\n if (comp.getParent() != null)\n return;\n\n Object borderLayoutConstraints\n = UIServiceImpl.getBorderLayoutConstraintsFromContainer(\n factory.getConstraints());\n\n addPluginComponent(\n comp,\n factory.getContainer(),\n borderLayoutConstraints);\n }\n }\n }", "public interface Plugin {\n\n\t/**\n\t * Returns a description of the plugin, to be shown as a tooltip and/or in the\n\t * help menu.\n\t * \n\t * @return\n\t */\n\tString getDescription();\n\n\t/**\n\t * A label for buttons and menu entries\n\t * \n\t * @return\n\t */\n\tString getName();\n\n\tIkon getIkon();\n\n}", "public void startPlugin() {\n classesDisponibles = new HashMap[types.length];\n try { // enregistrer le service d'acces aux depot de jars\n ServicesRegisterManager.registerService(Parameters.JAR_REPOSITORY_MANAGER, this);\n rescanRepository(); // creer les listes de classes disponibles a partir du depot\n }\n catch (ServiceInUseException mbiue) {\n System.err.println(\"Jar Repository Manager service created twice\");\n }\n }", "public interface Plugin {\n void doUsefil();\n}", "@Override\n\tpublic void addPlugin(ComponentPlugin plugin) throws Exception {\n\n\t}", "@Override\n public String getPluginName() {\n return null;\n }", "@Override\n public String getPluginName() {\n return null;\n }", "@Override\n public PluginDescription getPluginDetails() {\n return new PluginDescription(this);\n }", "public PluginManager( Path pluginDir )\n {\n this.pluginDirectory = pluginDir;\n pluginMonitor = new PluginMonitor( this );\n }", "public ContextPlugin getPlug() {\n\t\treturn plug;\n\t}", "private List<IUserLoginPlugin> getLoginPlugins()\n/* */ {\n/* 341 */ if (this.plugins == null)\n/* 342 */ this.plugins = PluginManager.newIns().getExtInstances(\"loginplugin\", IUserLoginPlugin.class);\n/* 343 */ return this.plugins;\n/* */ }", "public static IP_Main getPluginInstance() { return pluginInstance; }", "public interface BootLoaderManager {\n\n /**\n * 注入上下文\n * @param atlasWrapperApplicationContext\n */\n BootLoaderManager attachContext(AtlasWrapperApplicationContext atlasWrapperApplicationContext);\n\n /**\n * 获取上下文环境\n * @return\n */\n AtlasWrapperApplicationContext getContext();\n\n /**\n * 启动加载\n */\n void load();\n}", "public Object GetPlugin()\r\n\t{\r\n\t\tif (_isSingleton)\r\n\t\t{\r\n\t\t\tif (_singletonPlugin == null)\r\n\t\t\t{\r\n\t\t\t\ttry {\r\n\t\t\t\t\t_singletonPlugin = ClassFactory.CreateObject(_pluginType);\r\n\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n if (_configuration != null && !_configuration.equals(\"\"))\r\n {\r\n \tPathUtilities.PushFilename(_filename);\r\n \ttry\r\n \t{\r\n XmlFramework.DeserializeXml(_configuration, _singletonPlugin);\r\n \t}\r\n catch(Exception e)\r\n {\r\n _singletonPlugin = null;\r\n }\r\n \tfinally\r\n \t{\r\n \t\tPathUtilities.PopFilename(_filename);\r\n \t}\r\n }\r\n\t\t\t}\r\n\t\t\treturn _singletonPlugin;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tObject plugin = null;\r\n\t\t\ttry {\r\n\t\t\t\tplugin = ClassFactory.CreateObject(_pluginType);\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n if (_configuration != null && !_configuration.equals(\"\"))\r\n {\r\n \tPathUtilities.PushFilename(_filename);\r\n try\r\n {\r\n XmlFramework.DeserializeXml(_configuration, plugin);\r\n }\r\n catch(Exception e)\r\n {\r\n plugin = null;\r\n }\r\n \tfinally\r\n \t{\r\n \tPathUtilities.PopFilename(_filename);\r\n \t}\r\n }\r\n return plugin;\r\n\t\t}\r\n\t}", "public interface Plugin\n{\n /**\n * Initialize the plug-in. Plug-ins need to know the text area in order to provide only those feature that are\n * supported.\n * \n * @param textArea the text area of the editor\n * @param config the configuration object\n */\n void init(RichTextArea textArea, Config config);\n\n /**\n * @return all the user interface extensions that are provided by this plug-in\n */\n UIExtension[] getUIExtensions();\n\n /**\n * Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.\n */\n void destroy();\n}", "@Override\n public List<Module> getPluginModules(ServletContext context) {\n List<Module> modules = new ArrayList<>();\n\n modules.add(new PushLiquibaseModule(context));\n modules.add(new PushPersistenceModule(context));\n modules.add(new PushRestModule());\n\n return modules;\n }", "public void initialize(Bundle arguments);", "protected void init() { \n ServletContext servletContext = getServletContext();\n applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\n String names[] = applicationContext.getBeanDefinitionNames();\n\n for (String name : names) {\n System.out.println(\"name:\" + name);\n }\n }", "protected DPlugin()\n\t{\n\t\t//Instantiate the DLogger object.\n\t\tlog \t\t = new DLogger();\n\t\t//Instantiate the DStorage object.\n\t\tstorageHandler = new DStorage();\n\t}", "SpringLoader getSpringLoader();", "public interface IntroPlugin extends MMPlugin {\n /**\n * Provide a \"splash\" image to display at the top of the intro dialog. If\n * this method returns null, then the default Micro-Manager logo will be\n * used.\n *\n * @return The image to use at the top of the intro dialog, or null.\n */\n Icon getSplashImage();\n\n /**\n * Provide a list of paths to config files to include in the config file\n * dropdown menu. These will be provided in addition to any config files\n * the user has used in the past. This list may be null or empty.\n *\n * @return List of config files to show to the user, or null.\n */\n List<String> getConfigFilePaths();\n}", "@Override\n public void init() {\n String[] args = this.getParameters().getRaw().toArray(new String[0]);\n // We run Spring context initialization at the time of JavaFX initialization:\n springContext = SpringApplication.run(MainApp.class, args);\n }", "@Override\n\tpublic void addRolePlugin(ComponentPlugin plugin) throws Exception {\n\n\t}", "synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public PluginInfo getInfo() {\r\n if(mPluginInfo == null) {\r\n String name = mLocalizer.msg(\"pluginName\", \"View List Plugin\");\r\n String desc = mLocalizer.msg(\"description\", \"Shows a List of current running Programs\");\r\n String author = \"Bodo Tasche\";\r\n \r\n mPluginInfo = new PluginInfo(ListViewPlugin.class, name, desc, author);\r\n }\r\n \r\n return mPluginInfo;\r\n }", "public Plugin getPlugin()\r\n\t{\r\n\t\treturn plugin;\r\n\t}", "public String getPluginName(){\n\t\treturn pluginName;\n\t}", "public String getPluginClass() {\n return pluginClass;\n }", "@Override\n public synchronized void load(Map<String, Object> parameters) {\n // fill properly the \"forGroups\" and \"forProjects\" fields\n processTargetGroupsAndProjects();\n\n if (!hasPlugin()) {\n LOGGER.log(Level.SEVERE, \"Configured plugin \\\"{0}\\\" has not been loaded into JVM (missing file?). \"\n + \"This can cause the authorization to fail always.\",\n getName());\n setFailed();\n LOGGER.log(Level.INFO, \"[{0}] Plugin \\\"{1}\\\" {2} and is {3}.\",\n new Object[]{\n getFlag().toString().toUpperCase(),\n getName(),\n hasPlugin() ? \"found\" : \"not found\",\n isWorking() ? \"working\" : \"failed\"});\n return;\n }\n\n setCurrentSetup(new TreeMap<>());\n getCurrentSetup().putAll(parameters);\n getCurrentSetup().putAll(getSetup());\n\n try {\n plugin.load(getCurrentSetup());\n setWorking();\n } catch (Throwable ex) {\n LOGGER.log(Level.SEVERE, \"Plugin \\\"\" + getName() + \"\\\" has failed while loading with exception:\", ex);\n setFailed();\n }\n\n LOGGER.log(Level.INFO, \"[{0}] Plugin \\\"{1}\\\" {2} and is {3}.\",\n new Object[]{\n getFlag().toString().toUpperCase(),\n getName(),\n hasPlugin() ? \"found\" : \"not found\",\n isWorking() ? \"working\" : \"failed\"});\n }", "public void load(Maussentials plugin);", "private Platform(Plugin plugin) {\n\t\tthis.plugin = plugin;\n\t\tobjectiveUpdater = ObjectiveUpdater.getInstance(plugin);\n\t\ttimeLine = new TimeLine(plugin);\n\n\t\tEventManager.registerListener(this);\n\t}", "@Override\n\tpublic void onLoad() {\n\t\tdescription = this.getDescription();\n\t\tpluginConfiguration = this.getConfig();\n\t\tLogHelper.initLogger(\"BukkitWebby\", \"Minecraft\");\n\t}", "public CommandFramework(Plugin plugin) {\n this.plugin = plugin;\n\n if (plugin.getServer().getPluginManager() instanceof SimplePluginManager) {\n SimplePluginManager manager = (SimplePluginManager) plugin.getServer().getPluginManager();\n\n try {\n Field field = SimplePluginManager.class.getDeclaredField(\"commandMap\");\n field.setAccessible(true);\n map = (CommandMap) field.get(manager);\n } catch (IllegalArgumentException | NoSuchFieldException | IllegalAccessException | SecurityException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\r\n public void init() throws Exception {\r\n context = SpringApplication.run(getClass(), savedArgs);\r\n context.getAutowireCapableBeanFactory().autowireBean(this);\r\n }", "@StartStep(localName=\"command-engineering\", after={\"config\"})\n public static void startCommandEngineering(LifecycleContext context) \n {\n // for each class that is a Catalog or Command, create an entry for those in the context.\n ClassScanner classScanner = new ClassScanner(context);\n classScanner.scan();\n }", "void loadMyDogPluginParams(MyDogPluginsParams myDogPluginsParams);", "public interface SystemContext {\n\n public Bukkit getBukkit();\n\n public DatabaseManager getDatabaseManager();\n}", "public static void initialize(){\r\n\t\tinitialize(new CurrentClassGetter().getClassName());\r\n\t}", "@Override\n\tpublic void addInitialDataPlugin(ComponentPlugin plugin) throws Exception {\n\n\t}", "public void initContext() {\n\t\tClassLoader originalContextClassLoader =\n\t\t\t\tThread.currentThread().getContextClassLoader();\n\t\tThread.currentThread().setContextClassLoader(MY_CLASS_LOADER);\n\t\t//this.setClassLoader(MY_CLASS_LOADER);\n\n\t\tcontext = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tsetParent(context);\n\n\n\t\t// reset the original CL, to try to prevent crashing with\n\t\t// other Java AI implementations\n\t\tThread.currentThread().setContextClassLoader(originalContextClassLoader);\n\t}", "public void onLoad() {\n // store jar path for plugin loader\n thisJar = this.getFile();\n }", "public MakePlugin() {\n super(\n new ExerciseBuilder(),\n new StudentFileAwareSubmissionProcessor(),\n new StudentFileAwareZipper(),\n new StudentFileAwareUnzipper());\n this.makeUtils = new MakeUtils();\n }", "public interface MultiversePlugin {\n\n /**\n * Gets the reference to MultiverseCore.\n *\n * @return A valid {@link MultiverseCore}.\n */\n @NotNull\n MultiverseCore getMultiverseCore();\n\n /**\n * Allows Multiverse or a plugin to query another Multiverse plugin to see what version its protocol is.\n *\n * This number should change when something will break the code. Generally your plugin should be checking the\n * Multiverse-Core's protocol version to ensure compatibility.\n *\n * @return The protocol version.\n */\n int getProtocolVersion();\n\n /**\n * Returns the version string of this Multiverse Plugin.\n *\n * @return the version string of this Multiverse Plugin.\n */\n String getVersion();\n}", "public KafkaBacksideEnvironment() {\n\t\tConfigPullParser p = new ConfigPullParser(\"kafka-props.xml\");\n\t\tproperties = p.getProperties();\n\t\tconnectors = new HashMap<String, IPluginConnector>();\n\t\t//chatApp = new SimpleChatApp(this);\n\t\t//mainChatApp = new ChatApp(this);\n\t\t//elizaApp = new ElizaApp(this);\n\t\tbootPlugins();\n\t\t//TODO other stuff?\n\t\tSystem.out.println(\"Booted\");\n\t\t//Register a shutdown hook so ^c will properly close things\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t public void run() { shutDown(); }\n\t\t});\n\t}", "public interface PluginGateway {\r\n ExecutionResult runPlugin(Object... inputs) throws Exception;\r\n}", "@JmeThread\n private void onAfterCreateJmeContext() {\n pluginSystem.getPlugins().stream()\n .filter(EditorPlugin.class::isInstance)\n .map(EditorPlugin.class::cast)\n .forEach(editorPlugin -> {\n\n editorPlugin.onAfterCreateJmeContext(pluginSystem);\n\n var container = editorPlugin.getContainer();\n var classLoader = container.getClassLoader();\n var assetManager = EditorUtil.getAssetManager();\n assetManager.addClassLoader(classLoader);\n });\n }", "@Override\n protected void addCustomArguments(List<String> args) {\n extraPluginDependencyArtifactId = \"camel-cdi\";\n\n // if no mainClass configured then try to find it from camel-maven-plugin\n if (mainClass == null && project.getBuildPlugins() != null) {\n for (Object obj : project.getBuildPlugins()) {\n Plugin plugin = (Plugin) obj;\n if (\"org.apache.camel\".equals(plugin.getGroupId()) && \"camel-maven-plugin\".equals(plugin.getArtifactId())) {\n Object config = plugin.getConfiguration();\n if (config instanceof Xpp3Dom) {\n Xpp3Dom dom = (Xpp3Dom) config;\n Xpp3Dom child = dom.getChild(\"mainClass\");\n if (child != null) {\n mainClass = child.getValue();\n }\n }\n }\n }\n }\n\n if (mainClass != null) {\n getLog().info(\"Using custom \" + mainClass + \" to initiate Camel\");\n } else {\n mainClass = \"org.apache.camel.cdi.Main\";\n // use CDI by default\n getLog().info(\"Using \" + mainClass + \" to initiate a CamelContext\");\n }\n }", "public String getPluginClass() {\n return pluginClass;\n }", "public APlugin getPlugin() {\n return plugin;\n }", "@Override\n public void prepare() {\n applicationDeployer.initialize();\n this.initialize();\n }", "@Override\n public StartupCommand[] initialize() {\n return null;\n }", "public interface PluginAdapterBuild extends PluginAdapterBase {\n\n /**\n * Defines the project frontend directory from where resources should be\n * copied from for use with webpack.\n *\n * @return {@link File}\n */\n\n File frontendResourcesDirectory();\n\n /**\n * Whether to generate a bundle from the project frontend sources or not.\n *\n * @return boolean\n */\n\n boolean generateBundle();\n\n /**\n * Whether to generate embeddable web components from WebComponentExporter\n * inheritors.\n *\n * @return boolean\n */\n\n boolean generateEmbeddableWebComponents();\n\n /**\n * Whether to use byte code scanner strategy to discover frontend\n * components.\n *\n * @return boolean\n */\n boolean optimizeBundle();\n\n /**\n * Whether to run <code>npm install</code> after updating dependencies.\n *\n * @return boolean\n */\n boolean runNpmInstall();\n\n}", "@Override\n public void shutdown() throws PluginException {\n\n }", "public interface AppLifecycles {\n void attachBaseContext(Context base);\n\n void onCreate(Application application);\n\n void onTerminate(Application application);\n}", "public SARLEclipsePlugin() {\n\t\tsetDefault(this);\n\t}", "public PAServiceImpl (BundleContext bc) {\n this.bc = bc;\n \n // Read the default configuration file\n // TODO: Refactor the XSD schema and XML data file name constructors\n configReader = new XMLConfigParser(\n CWD_PATH + FILE_SEP + CONF_DIR + FILE_SEP + \"plugins.xml\",\n CWD_PATH + FILE_SEP + CONF_DIR + FILE_SEP + \"plugins.xsd\");\n // ... and retrieve all available metrics configurations\n if (configReader != null) {\n metricConfigurations = configReader.getMetricsConfiguration();\n }\n \n // Collect information about pre-existing metric services\n this.collectMetricsInfo();\n \n // Attach this object as a listener for metric services\n try {\n bc.addServiceListener(this, SREF_FILTER_METRIC);\n } catch (InvalidSyntaxException e) {\n logError(INVALID_FILTER_SYNTAX);\n }\n \n // Register an extension to the Equinox console, in order to\n // provide commands for managing metric services\n bc.registerService(\n CommandProvider.class.getName(),\n new PACommandProvider(this) ,\n null);\n }", "public Type getPluginType()\r\n\t{\r\n\t\treturn _pluginType; \r\n\t}", "@FxThread\n private void onAfterCreateJavaFxContext() {\n pluginSystem.getPlugins().stream()\n .filter(EditorPlugin.class::isInstance)\n .map(EditorPlugin.class::cast)\n .forEach(editorPlugin -> editorPlugin.onAfterCreateJavaFxContext(pluginSystem));\n }" ]
[ "0.6931616", "0.6722338", "0.6567433", "0.62097627", "0.61930907", "0.611024", "0.6104505", "0.60889906", "0.60337883", "0.6016847", "0.59978664", "0.5994256", "0.58985883", "0.5888414", "0.5857869", "0.5856007", "0.5819118", "0.57962126", "0.57703614", "0.57584274", "0.57385683", "0.5695481", "0.56791854", "0.56572485", "0.5626268", "0.5617058", "0.56056774", "0.55999976", "0.55999094", "0.55788565", "0.5565659", "0.55619586", "0.55604225", "0.55487216", "0.5534958", "0.55300224", "0.5514491", "0.5505631", "0.5477471", "0.54263806", "0.54144406", "0.5403553", "0.5393492", "0.5388545", "0.5377445", "0.53773874", "0.53583354", "0.53479564", "0.53479564", "0.533898", "0.5338089", "0.5337041", "0.5319741", "0.5307415", "0.53058594", "0.52817214", "0.52708006", "0.5267624", "0.52654946", "0.5265442", "0.5262227", "0.52611184", "0.52588046", "0.5252005", "0.5240741", "0.5229315", "0.5223045", "0.5220395", "0.5209288", "0.51800734", "0.51765966", "0.5176087", "0.5162768", "0.515223", "0.5148942", "0.51417744", "0.5140053", "0.5134518", "0.5133233", "0.5132298", "0.513126", "0.5126583", "0.5124109", "0.51214105", "0.5119267", "0.5105777", "0.5092424", "0.5091461", "0.50909656", "0.5087685", "0.50860023", "0.50832766", "0.50769275", "0.5069086", "0.50680196", "0.50634474", "0.50586313", "0.5051698", "0.50495934", "0.50477386" ]
0.81699276
0
What is the name of this plugin? The framework will use this name when storing the versions (code version and schema version) in the database, and, if this is the Application Plugin, in the help menu, main frame title bar, and other displays wherever the application name is shown. The column used to store this in the database is 40 characters wide.
String getName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPluginName(){\n\t\treturn pluginName;\n\t}", "@Override\n public String getPluginName() {\n return null;\n }", "@Override\n public String getPluginName() {\n return null;\n }", "public String getShortAppName();", "public void setPluginName(String pluginName);", "public String getName() {\r\n try {\r\n return PirolPlugInMessages.getString(this.getShortClassName());\r\n } catch (RuntimeException e) {\r\n return super.getName();\r\n }\r\n\r\n }", "@Override\n public String getPluginName() {\n return \"Unify server-exporter\";\n }", "java.lang.String getAppName();", "java.lang.String getAppName();", "java.lang.String getAppName();", "public String getAppName();", "public static String getAppName(){\r\n return getProperty(\"name\", \"Jin\");\r\n }", "public interface Plugin {\n /**\n * What is the name of this plugin?\n *\n * The framework will use this name when storing the versions\n * (code version and schema version) in the database, and, if\n * this is the Application Plugin, in the help menu, main frame\n * title bar, and other displays wherever the application name\n * is shown.\n *\n * The column used to store this in the database is 40\n * characters wide.\n *\n * @return the name of this plugin\n */\n String getName();\n\n /**\n * What is the version number of this plugin's code?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the code version of this plugin\n */\n String getVersion();\n\n /**\n * Allow a plugin to provide any plugin-specific application\n * context files.\n *\n * Can return null or an empty list if there are none.\n * The elements of the list are paths to resources inside the\n * plugin's jar, e.g. org/devzendo/myapp/app.xml\n *\n * @return a list of any application contexts that the plugin\n * needs to add to the SpringLoader, or null, or empty list.\n */\n List<String> getApplicationContextResourcePaths();\n\n /**\n * Give the SpringLoader to the plugin, after the\n * application contexts for all plugins have been loaded\n * @param springLoader the SpringLoader\n */\n void setSpringLoader(final SpringLoader springLoader);\n\n /**\n * Obtain the SpringLoader for plugin use\n * @return the SpringLoader\n */\n SpringLoader getSpringLoader();\n\n /**\n * What is the database schema version of this plugin?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the database schema version of this plugin\n */\n String getSchemaVersion();\n\n /**\n * Shut down the plugin, freeing any resources. Called by the\n * framework upon system shutdown.\n */\n void shutdown();\n}", "protected abstract String getPluginId();", "@Override\n\tpublic String getPluginVersion() {\n\t\treturn null;\n\t}", "public interface Plugin\n{\n\tpublic String getPluginName();\n}", "private String getVersionName() {\n\n\t\tString versionName = \"\";\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager\n\t\t\t\t\t.getPackageInfo(getPackageName(), 0);// 获取包的内容\n\t\t\t// int versionCode = packageInfo.versionCode;\n\t\t\tversionName = packageInfo.versionName;\n\t\t\tSystem.out.println(\"versionName = \" + versionName);\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn versionName;\n\t}", "public String getName() {\n return Utility.getInstance().getPackageName();\n }", "public static String[] getInfo(){\n\t\n\t\treturn new String[]{\n\t\t\t\t\"plugin_name\",\n\t\t\t\t\"plugin_host\",\n\t\t\t\t\"plugin_version\",\n\t\t\t\t\"plugin_author\"\n\t\t};\n\t\t\t\t\n\t}", "public final String getAppName( )\n\t{\n\t\treturn this.data.getString( \"applicationName\" );\n\t}", "public String getDisplayName() {\n\t\t\tlogger.debug(\"### DescriptorImpl::getDisplayName\");\n\t\t\treturn \"Determine Semantic Version for project\";\n\t\t}", "public PluginInfo getInfo() {\r\n if(mPluginInfo == null) {\r\n String name = mLocalizer.msg(\"pluginName\", \"View List Plugin\");\r\n String desc = mLocalizer.msg(\"description\", \"Shows a List of current running Programs\");\r\n String author = \"Bodo Tasche\";\r\n \r\n mPluginInfo = new PluginInfo(ListViewPlugin.class, name, desc, author);\r\n }\r\n \r\n return mPluginInfo;\r\n }", "public static String getAppName()\n\t{\n\t\treturn APP_NAME;\n\t}", "public String getBundleId() {\n\t return PLUGIN_ID;\n\t}", "public String getName() {\n return mBundle.getString(KEY_NAME);\n }", "@Override\n public String getPluginId() {\n return PLUGIN_ID;\n }", "public String getVersionname() {\r\n return versionname;\r\n }", "@AutoEscape\n\tpublic String getAppName();", "@Override\n\tpublic String getPluginName() {\n\t\treturn \"TextareaPlugin\";\n\t}", "public String getAPP_NAME() {\r\n return APP_NAME;\r\n }", "public String getAPP_NAME() {\r\n return APP_NAME;\r\n }", "public void setPluginVersion(String pluginVersion);", "public String getName() {\n return \"Database_adapter-\"+this.name;\n }", "private String m5297b() {\n String str = \"\";\n try {\n return getPackageManager().getPackageInfo(getPackageName(), 0).versionName;\n } catch (NameNotFoundException e) {\n e.printStackTrace();\n return str;\n }\n }", "public static String findIdeInfo() {\n\n\t\tStringBuilder infoStringBuilder = new StringBuilder();\n\n\t\tIProduct eclipseProduct = Platform.getProduct();\n\n\t\t// IDE name.\n\t\tString ideName = eclipseProduct.getName();\n\t\tinfoStringBuilder.append(\"IDE Name: \").append(ideName).append(\"\\n\");\n\n\t\t// IDE version.\n\t\t// Here we use the way\n\t\t// org.eclipse.ui.internal.ProductProperties.getAboutText() has used to\n\t\t// find version number.\n\n\t\tURL location = FileLocator.find(eclipseProduct.getDefiningBundle(), new Path(\"$nl$/about.mappings\"), null);\n\n\t\tif (location != null) {\n\n\t\t\tStringBuilder ideVersionBuilder = new StringBuilder();\n\n\t\t\ttry (InputStream is = location.openStream()) {\n\n\t\t\t\tPropertyResourceBundle bundle = new PropertyResourceBundle(is);\n\n\t\t\t\ttry {\n\t\t\t\t\tString versionName = bundle.getString(\"1\");\n\t\t\t\t\tideVersionBuilder.append(versionName);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tString versionNumber = null;\n\n\t\t\t\ttry {\n\t\t\t\t\tversionNumber = bundle.getString(\"2\");\n\t\t\t\t\tideVersionBuilder.append(\" (\").append(versionNumber).append(\")\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t// Sometimes this above step doesn't capture the version number.\n\t\t\t\t// Then we try the bellow option.\n\t\t\t\tif (versionNumber == null) {\n\t\t\t\t\tVersion version = eclipseProduct.getDefiningBundle().getVersion();\n\t\t\t\t\tideVersionBuilder.append(\" (\").append(version.toString()).append(\")\");\n\t\t\t\t}\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tString ideVersion = ideVersionBuilder.toString();\n\t\t\tinfoStringBuilder.append(\"IDE Version: \").append(ideVersion).append(\"\\n\");\n\n\t\t}\n\n\t\t// Plugin version.\n\t\tString pluginVersion = Platform.getBundle(Activator.PLUGIN_ID).getVersion().toString();\n\t\tinfoStringBuilder.append(\"LakJ Plugin Version: \").append(pluginVersion).append(\"\\n\");\n\n\t\t// System user name.\n\t\tString username = System.getProperty(\"user.name\");\n\t\tinfoStringBuilder.append(\"System Username: \").append(username);\n\n\t\treturn infoStringBuilder.toString();\n\n\t}", "private String getPluginName(HttpServletRequest request) {\n String url = request.getRequestURI();\n\n // /report/PluginName\n if (url.startsWith(\"//report/\")) {\n return url.substring(\"//report/\".length());\n }\n\n else if (url.startsWith(\"/report/\")) {\n return url.substring(\"/report/\".length());\n }\n\n // /report.php?plugin=PluginName\n else if (url.startsWith(\"/report.php?plugin=\")) {\n return url.substring(\"/report.php?plugin=\".length());\n }\n\n return null;\n }", "abstract public String getApplicationName();", "private static String getVerName(Context context) {\r\n String verName = \"unKnow\";\r\n try {\r\n verName = context.getPackageManager().\r\n getPackageInfo(context.getPackageName(), 0).versionName;\r\n } catch (PackageManager.NameNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n return verName;\r\n }", "String getSdkName();", "private boolean pluginInformation(PluginCommandManager manager, CommandSender player, String pluginName) {\r\n Plugin plugin = getPlugin(pluginName);\r\n if (plugin == null) {\r\n manager.sendMessage(player, \"A plugin with the name '\" + pluginName + \"' could not be found.\");\r\n return true;\r\n }\r\n\r\n PluginDescriptionFile discription = plugin.getDescription();\r\n String authors = \"\";\r\n List<String> authorsList = discription.getAuthors();\r\n for (int authorIndex = 0; authorIndex < authorsList.size(); ++authorIndex) {\r\n String author = authorsList.get(authorIndex);\r\n authors += author + \", \";\r\n }\r\n if (authorsList.size() > 0) {\r\n authors = authors.substring(0, authors.length() - 2);\r\n } else {\r\n authors = \"Unknown\";\r\n }\r\n \r\n String key = \"plugin.\" + m_plugin.pluginNameToKey(plugin.getName());\r\n boolean showUrl = m_plugin.getSetting(key + \".webpage.url\", true);\r\n String url = m_plugin.getSetting(key + \".webpage.url\", discription.getWebsite());\r\n \r\n manager.sendMessage(player, ChatColor.GOLD + \"||======================================||\");\r\n manager.sendMessage(player, ChatColor.DARK_GREEN + \"Name: \" + ChatColor.WHITE + plugin.getName());\r\n manager.sendMessage(player, ChatColor.DARK_GREEN + \"Version: \" + ChatColor.WHITE + discription.getVersion());\r\n manager.sendMessage(player, ChatColor.DARK_GREEN + \"Authors: \" + ChatColor.WHITE + authors);\r\n if (showUrl) { manager.sendMessage(player, ChatColor.DARK_GREEN + \"Website: \" + ChatColor.BLUE + url); }\r\n manager.sendMessage(player, ChatColor.DARK_GREEN + \"Enabled: \" + ChatColor.WHITE + (plugin.isEnabled() ? \"True\" : \"False\"));\r\n manager.sendMessage(player, ChatColor.GOLD + \"||======================================||\");\r\n return true;\r\n }", "@Override\n public int getPluginId() {\n return 10202;\n }", "public String getFormatName() {\n\t\tString name = getName();\n\t\tif (name.startsWith(SpotlessPlugin.EXTENSION)) {\n\t\t\tString after = name.substring(SpotlessPlugin.EXTENSION.length());\n\t\t\tif (after.endsWith(SpotlessPlugin.CHECK)) {\n\t\t\t\treturn after.substring(0, after.length() - SpotlessPlugin.CHECK.length()).toLowerCase(Locale.US);\n\t\t\t} else if (after.endsWith(SpotlessPlugin.APPLY)) {\n\t\t\t\treturn after.substring(0, after.length() - SpotlessPlugin.APPLY.length()).toLowerCase(Locale.US);\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}", "public String getProjectName() { return DBCurrent.getInstance().projectName(); }", "public String getProjectName() { return DBCurrent.getInstance().projectName(); }", "String getPlatformName();", "public java.lang.String getBundleName(){\n return localBundleName;\n }", "public String infoName();", "public static String getProductType(String name)\n {\n return PLUGIN_MAP.get(name) + \".\" + name;\n }", "public String getName() {\r\n\t\treturn GDAssemblerUI.getText(UI_TEXT);\r\n\t}", "public PluginInfo getInfo() {\r\n return new devplugin.PluginInfo(TvBrowserDataService.class,\r\n mLocalizer.msg(\"name\",\"EPGfree data\"),\r\n mLocalizer.msg(\"description\", \"Data that is available for free with mostly German, Swiss, Austrian and Danish channels.\"),\r\n \"Til Schneider, www.murfman.de\",\r\n mLocalizer.msg(\"license\",\"Terms of Use:\\n=============\\nAll TV/Radio listings provided by TV-Browser (http://www.tvbrowser.org) are protected by copyright laws and may only be used within TV-Browser or other name like applications authorizied by the manufacturer of TV-Browser (http://www.tvbrowser.org) for information about the upcoming program of the available channels.\\nEvery other manner of using, reproducing or redistributing of the TV/Radio listings is illegal and may be prosecuted on civil or criminal law.\\n\\nOn downloading the TV/Radio listings you declare your agreement to these terms.\\n\\nIf you have any questions concerning these terms please contact [email protected]\"));\r\n }", "String getCatalogName();", "public String getPlugin() {\n\t\treturn adaptee.getPlugin();\n\t}", "public static String getVersionName(Context context) {\n String versionName = \"unknown\";\n try {\n versionName = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_ACTIVITIES).versionName;\n } catch (PackageManager.NameNotFoundException ignore) {\n QUFactory.QLog.debug(ignore.getMessage());\n }\n return versionName;\n }", "@Override\n public String getName() {\n return \"Custom - \" + getTitle();\n }", "@Override\n\tpublic java.lang.String getName() {\n\t\treturn _scienceApp.getName();\n\t}", "private static String getMetaDataString(Context context, String name) {\r\n\t\tString value = null;\r\n\t\tPackageManager pm = context.getPackageManager();\r\n\t\ttry {\r\n\t\t ApplicationInfo ai = pm.getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);\r\n\t\t value = ai.metaData.getString(name);\r\n\t\t} catch (Exception e) {\r\n\t\t Log.d(\"EasyLite\", \"Couldn't find config value: \" + name);\r\n\t\t}\r\n\t\treturn value;\r\n }", "String kpiName() {\n\t\treturn kpiName;\n\t}", "public String getDisplayName() {\n return \"Rhapsody Build\";\n }", "protected String getName(){\n return \"Chinmay Garg\";\n //TODO return roll number obtained from the app's shared preference\n }", "String getIntegApplicationName();", "public static String getAppVersionNameOld(Context context) {\n String versionName = \"\";\n try {\n // ---get the package info---\n PackageManager pm = context.getPackageManager();\n PackageInfo pi = pm.getPackageInfo(context.getPackageName(), 0);\n versionName = pi.versionName;\n if (TextUtils.isEmpty(versionName)) {\n return \"\";\n }\n } catch (NameNotFoundException e) {\n e.printStackTrace();\n }\n return versionName;\n }", "String getVersionLabel();", "public static String getAppVersionName(Context ctx) {\n String mAppVer = \"1.0\";\n /*try {\n PackageManager pm = ctx.getPackageManager();\n PackageInfo pi = pm.getPackageInfo(ctx.getPackageName(), 0);\n mAppVer = pi.versionName != null ? pi.versionName : mAppVer ;\n } catch (Exception e) {\n }*/\n return mAppVer;\n }", "public String getVersionName() {\n return versionName;\n }", "public interface Plugin {\n\n\t/**\n\t * Returns a description of the plugin, to be shown as a tooltip and/or in the\n\t * help menu.\n\t * \n\t * @return\n\t */\n\tString getDescription();\n\n\t/**\n\t * A label for buttons and menu entries\n\t * \n\t * @return\n\t */\n\tString getName();\n\n\tIkon getIkon();\n\n}", "public String getAppName( )\n\t{\n\t\treturn appName;\n\t}", "public void setBundleName(java.lang.String param){\n localBundleNameTracker = true;\n \n this.localBundleName=param;\n \n\n }", "@Override\n public String displayInfo() {\n String str = getPluginName() + \"\\n\";\n str += \"Status: \";\n if (isRunning())\n str += \"running\";\n else\n str += \"stop\";\n str += \"\\nPort:\" + params.getUnifyExportPort();\n return str;\n }", "public String getVersionTitle()\r\n\t{\r\n\t\treturn versionTitle;\r\n\t}", "@Override \r\n\tpublic String getName() {\r\n\t\treturn \"Bazooka\";\r\n\t}", "public String getVersionName() {\n return this.versionName;\n }", "@Override\n public String getHelp() {\n return name;\n }", "public static String specifyApplicationName() {\n return holder.format(\"specifyApplicationName\");\n }", "String getShortName() throws RemoteException;", "private String getModuleName() {\n \t\t// If there is an autoconnect page then it has the module name\n \t\tif (autoconnectPage != null) {\n \t\t\treturn autoconnectPage.getSharing().getRepository();\n \t\t}\n \t\tString moduleName = modulePage.getModuleName();\n \t\tif (moduleName == null) moduleName = project.getName();\n \t\treturn moduleName;\n \t}", "public String getName()\n {\n return MODULE_NAME;\n }", "public String getSystemName();", "private static String discoverPackageName( PluginDescriptor pluginDescriptor )\n {\n Map packageNames = new HashMap();\n for ( Iterator it = pluginDescriptor.getMojos().iterator(); it.hasNext(); )\n {\n MojoDescriptor descriptor = (MojoDescriptor) it.next();\n \n String impl = descriptor.getImplementation();\n if ( impl.lastIndexOf( '.' ) != -1 )\n {\n String name = impl.substring( 0, impl.lastIndexOf( '.' ) );\n if ( packageNames.get( name ) != null )\n {\n int next = ( (Integer) packageNames.get( name ) ).intValue() + 1;\n packageNames.put( name, Integer.valueOf( \"\" + next ) );\n }\n else\n {\n packageNames.put( name, Integer.valueOf( \"\" + 1 ) );\n }\n }\n else\n {\n packageNames.put( \"\", Integer.valueOf( \"\" + 1 ) );\n }\n }\n \n String packageName = \"\";\n int max = 0;\n for ( Iterator it = packageNames.keySet().iterator(); it.hasNext(); )\n {\n String key = it.next().toString();\n int value = ( (Integer) packageNames.get( key ) ).intValue();\n if ( value > max )\n {\n max = value;\n packageName = key;\n }\n }\n \n return packageName;\n }", "private String getPkgName () {\n return context.getPackageName();\n }", "public String getName() {\n return m_module.getConfiguration().getName();\n }", "public String databaseName();", "public static String getName(){\n return \"VoIP\";\n }", "String getVersionNamePrefix();", "String getExternalToolName();", "public String getVerName() {\n return verName;\n }", "@VTID(7)\r\n java.lang.String name();", "java.lang.String getApplicationVersion();", "public String getAppPathname();", "public String getAppName(PackageInfo packageInfo) {\n return (String) packageInfo.applicationInfo.loadLabel(packageManager);\n }", "String getModuleDisplayName();", "private RLabel getDbVersionLabel() {\n if (dbVersionLabel == null) {\n dbVersionLabel = new RLabel();\n dbVersionLabel.setText(\"<%= ivy.cms.co(\\\"/Dialogs/about/databaseVersion\\\") %>\");\n dbVersionLabel.setStyleProperties(\"{/insetsTop \\\"2\\\"}\");\n dbVersionLabel.setName(\"dbVersionLabel\");\n }\n return dbVersionLabel;\n }", "public String getPluginVersion(CDisable main, CommandSender sender)\n {\n return color(\"&fHello, &a&n\"+sender.getName() +\".&r\\nYou are currently running version &b&n\"+main.pdfFile.getVersion() + \"&r of &e&n\"+main.pdfFile.getName() +\"&r\\n \\n&6Your server is running version &c&n\"+ main.getServer().getBukkitVersion());\n }", "public static String getName() {\n\t\treturn ProjectMain._name;\n\t}", "public String getName()\r\n \t{\n \t\treturn (explicit ? (module.length() > 0 ? module + \"`\" : \"\") : \"\")\r\n \t\t\t\t+ name + (old ? \"~\" : \"\"); // NB. No qualifier\r\n \t}", "public String getApp();", "@Override\n public PluginDescription getPluginDetails() {\n return new PluginDescription(this);\n }", "public String getStrKpiName() {\n return strKpiName;\n }", "public String getDisplayName() {\n return DatadogBuildListener.DISPLAY_NAME;\n }", "String getComponentName();", "String getComponentName();", "public String getBundleName()\n {\n return _bundleName;\n }" ]
[ "0.7047606", "0.6782183", "0.6782183", "0.6496552", "0.6491467", "0.6413291", "0.62025326", "0.61851895", "0.61851895", "0.61851895", "0.61845005", "0.6103332", "0.59783536", "0.5961527", "0.5950763", "0.59416413", "0.59284127", "0.5913907", "0.58851254", "0.5878529", "0.58682203", "0.58586216", "0.583526", "0.58345205", "0.582718", "0.5816366", "0.5814683", "0.5807069", "0.5795759", "0.5776755", "0.5776755", "0.57732326", "0.57711315", "0.57657397", "0.5743341", "0.57364774", "0.5728336", "0.57233965", "0.5711161", "0.5710758", "0.5700901", "0.569645", "0.5688385", "0.5688385", "0.56852525", "0.5675236", "0.56691986", "0.56612825", "0.56596625", "0.5657174", "0.56475437", "0.56228966", "0.5618792", "0.561795", "0.5611347", "0.557864", "0.5571675", "0.55609834", "0.5541146", "0.5538948", "0.553889", "0.55368257", "0.5528497", "0.55161107", "0.55143183", "0.549527", "0.5489082", "0.5485887", "0.5478744", "0.5473737", "0.5473712", "0.5473287", "0.546861", "0.546005", "0.54566526", "0.5446786", "0.54467404", "0.54370284", "0.5434976", "0.5432071", "0.54318064", "0.5431385", "0.5429731", "0.54264915", "0.54231995", "0.5420267", "0.5413563", "0.5413295", "0.5410818", "0.54077387", "0.54049593", "0.5399566", "0.53989345", "0.53891444", "0.53883886", "0.5383156", "0.5379007", "0.53789824", "0.5376369", "0.5376369", "0.53755593" ]
0.0
-1
What is the version number of this plugin's code? The framework will use this name when storing the versions in the database.
String getVersion();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getVersionNumber ();", "public String getVersionNum();", "String getModuleVersionNumber();", "long getVersionNumber();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "public String getVersionname() {\r\n return versionname;\r\n }", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "String offerVersion();", "default String getVersion()\n {\n return getString( \"version\", \"Unknown Version\");\n }", "private String getVersionName() {\n\n\t\tString versionName = \"\";\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager\n\t\t\t\t\t.getPackageInfo(getPackageName(), 0);// 获取包的内容\n\t\t\t// int versionCode = packageInfo.versionCode;\n\t\t\tversionName = packageInfo.versionName;\n\t\t\tSystem.out.println(\"versionName = \" + versionName);\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn versionName;\n\t}", "public static String getVersion() {\n\t\treturn version;\r\n\t}", "public static String getVersion() {\r\n\t\treturn VERSION;\r\n\t}", "public String getVersion(){\r\n return version;\r\n }", "public static String getVersion() {\n\t\treturn version;\n\t}", "public String getProductVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public String getVersionNumber() {\n return versionNumber;\n }", "public static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "public String getVersion () {\r\n return version;\r\n }", "public String getVersion()\n {\n return ver;\n }", "public int getVersionNumber() {\n return versionNumber;\n }", "int getCurrentVersion();", "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n return version;\n }", "long getVersion();", "long getVersion();", "long getVersion();", "long getVersion();", "String version();", "public static String getVersion()\n {\n return \"$Id$\";\n }", "public abstract double getVersionNumber();", "public String getVersionName() {\n return versionName;\n }", "public abstract int getVersion();", "public static String getVersion() {\n\t\treturn \"1.0.3\";\n\t}", "public String getVerName() {\n return verName;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "private String m5297b() {\n String str = \"\";\n try {\n return getPackageManager().getPackageInfo(getPackageName(), 0).versionName;\n } catch (NameNotFoundException e) {\n e.printStackTrace();\n return str;\n }\n }", "Integer getVersion();", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public String getVersion() {\n\t\treturn (VERSION);\n\t}", "public String getVersion()\n {\n return version;\n }", "public int getVersion() { return 1; }", "public int getLibVersionNumber();", "public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}", "public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}", "Version getVersion();", "Version getVersion();", "Version getVersion();", "Version getVersion();", "String buildVersion();", "public String getVersion() {\r\n return version;\r\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public java.lang.String getVersionNumber() {\n return versionNumber;\n }", "public String getVersionName() {\n return this.versionName;\n }", "public static String getVersion()\n {\n return \"\";\n }", "public static String getVersion()\n {\n return \"\";\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public long getVersionNo() {\r\n return versionNo;\r\n }", "public default String getVersion() {\n return Constants.VERSION_1;\n }", "public String GetVersion() {\n\t\tString adapter_version = \"version: \" + adapter_version_;\n\t\treturn adapter_version;\n\t}" ]
[ "0.76562417", "0.76348984", "0.7492364", "0.7419131", "0.7244665", "0.72078305", "0.72078305", "0.72078305", "0.72078305", "0.72078305", "0.72078305", "0.72078305", "0.72078305", "0.7160705", "0.71432954", "0.71432954", "0.71432954", "0.71432954", "0.71408796", "0.7016694", "0.6993009", "0.6970348", "0.6966542", "0.6961744", "0.69485515", "0.69289494", "0.6904941", "0.6904941", "0.6904941", "0.69034314", "0.6898833", "0.6898833", "0.6870232", "0.6860146", "0.6849785", "0.68468374", "0.6837083", "0.6837083", "0.68266916", "0.68266916", "0.68266916", "0.68266916", "0.68259", "0.6825085", "0.68195677", "0.6819013", "0.6814606", "0.67947304", "0.679433", "0.67839426", "0.67839426", "0.67839426", "0.67839426", "0.6783923", "0.6775405", "0.675741", "0.67468244", "0.67345715", "0.6734064", "0.673182", "0.6711622", "0.6711622", "0.67070466", "0.67070466", "0.67070466", "0.67070466", "0.67053366", "0.67052877", "0.67049277", "0.67049277", "0.6688236", "0.6681726", "0.6657919", "0.6657919", "0.6645161", "0.6645161", "0.6643243", "0.6643243", "0.6643243", "0.6643243", "0.6643243", "0.6643243", "0.6643243", "0.6643243", "0.6643243", "0.6643243", "0.6643243", "0.664318", "0.66394544", "0.663591" ]
0.72325295
15
Allow a plugin to provide any pluginspecific application context files. Can return null or an empty list if there are none. The elements of the list are paths to resources inside the plugin's jar, e.g. org/devzendo/myapp/app.xml
List<String> getApplicationContextResourcePaths();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<String> externalResources();", "List<String> getConfigFilePaths();", "public IPath[] getAdditionalResources();", "@Override\r\n\tpublic ArrayList<String> readResourceFiles(String packageName,\r\n\t\t\tArrayList<String> resourceList) {\n\t\treturn null;\r\n\t}", "public PluginLocation[] getBuiltinPluginLocations()\r\n {\r\n java.lang.String conf = \"/net/sf/xpontus/plugins/plugins.txt\";\r\n\r\n InputStream is = null;\r\n LineIterator it = null;\r\n\r\n List<PluginLocation> locations = new ArrayList<PluginLocation>();\r\n\r\n try\r\n {\r\n is = getClass().getResourceAsStream(conf);\r\n it = IOUtils.lineIterator(is, \"UTF-8\");\r\n\r\n while (it.hasNext())\r\n {\r\n String line = it.nextLine();\r\n\r\n PluginLocation loc = getPluginLocation(line);\r\n locations.add(loc);\r\n }\r\n }\r\n catch (IOException ex)\r\n {\r\n LOG.error(ex.getMessage(), ex);\r\n }\r\n finally\r\n {\r\n if (is != null)\r\n {\r\n IOUtils.closeQuietly(is);\r\n }\r\n\r\n if (it != null)\r\n {\r\n LineIterator.closeQuietly(it);\r\n }\r\n }\r\n\r\n return (PluginLocation[]) locations.toArray(new PluginLocation[0]);\r\n }", "String getApplicationContextPath();", "public boolean supportsSeparateContextFiles();", "java.util.List<java.lang.String>\n getBootclasspathList();", "java.util.List<java.lang.String>\n getBootclasspathList();", "abstract public String getMspluginsDir();", "protected abstract String getXmppConfigResources();", "String getContextPath();", "String getContextPath();", "String getContextPath();", "java.util.List<com.google.wireless.android.sdk.stats.CriticalPathAnalyzerData.PluginBuildData>\n getPluginsCriticalPathList();", "List<QuestionPlugin> getQuestionPlugins();", "public List<Resource> getFileLocations() throws IOException;", "protected ValidatorResources loadResources(ServletContext ctx)\n throws IOException, ServletException {\n if ((pathnames == null) || (pathnames.length() <= 0)) {\n return null;\n }\n\n StringTokenizer st = new StringTokenizer(pathnames, RESOURCE_DELIM);\n\n List urlList = new ArrayList();\n ValidatorResources resources = null;\n try {\n while (st.hasMoreTokens()) {\n String validatorRules = st.nextToken().trim();\n\n if (LOG.isInfoEnabled()) {\n LOG.info(\"Loading validation rules file from '\"\n + validatorRules + \"'\");\n }\n\n URL input =\n ctx.getResource(validatorRules);\n\n // If the config isn't in the servlet context, try the class\n // loader which allows the config files to be stored in a jar\n if (input == null) {\n input = getClass().getResource(validatorRules);\n }\n\n if (input != null) {\n urlList.add(input);\n } else {\n throw new ServletException(\n \"Skipping validation rules file from '\"\n + validatorRules + \"'. No url could be located.\");\n }\n }\n\n int urlSize = urlList.size();\n String[] urlArray = new String[urlSize];\n\n for (int urlIndex = 0; urlIndex < urlSize; urlIndex++) {\n URL url = (URL) urlList.get(urlIndex);\n\n urlArray[urlIndex] = url.toExternalForm();\n }\n\n resources = new ValidatorResources(urlArray);\n } catch (SAXException sex) {\n LOG.error(\"Skipping all validation\", sex);\n throw new StrutsException(\"Skipping all validation because the validation files cannot be loaded\", sex);\n }\n return resources;\n }", "@Override\n public void scan() throws Exception {\n if (getContexts() == null) {\n throw new IllegalArgumentException(\"No HandlerContainer\");\n }\n\n Resource r = Resource.newResource(getWebAppDir());\n if (!r.exists()) {\n throw new IllegalArgumentException(\"No such webapps resource \" + r);\n }\n\n if (!r.isDirectory()) {\n throw new IllegalArgumentException(\"Not directory webapps resource \" + r);\n }\n\n String[] files = r.list();\n\n files:\n for (int f = 0; (files != null) && (f < files.length); f++) {\n String context = files[f];\n\n if (context.equalsIgnoreCase(\"CVS/\") || context.equalsIgnoreCase(\"CVS\") || context.startsWith(\".\")) {\n continue;\n }\n\n Resource app = r.addPath(r.encode(context));\n\n if (context.toLowerCase().endsWith(\".war\") || context.toLowerCase().endsWith(\".jar\")) {\n context = context.substring(0, context.length() - 4);\n Resource unpacked = r.addPath(context);\n\n if ((unpacked != null) && unpacked.exists() && unpacked.isDirectory()) {\n Log.debug(context + \" already exists.\");\n continue;\n }\n } else if (!app.isDirectory()) {\n Log.debug(app + \" Not directory\");\n continue;\n }\n\n if (context.equalsIgnoreCase(\"root\") || context.equalsIgnoreCase(\"root/\")) {\n context = URIUtil.SLASH;\n } else {\n context = \"/\" + context;\n }\n if (context.endsWith(\"/\") && (context.length() > 0)) {\n context = context.substring(0, context.length() - 1);\n }\n\n // Check the context path has not already been added or the webapp\n // itself is not already deployed\n if (!getAllowDuplicates()) {\n Handler[] installed = getContexts().getChildHandlersByClass(ContextHandler.class);\n for (int i = 0; i < installed.length; i++) {\n ContextHandler c = (ContextHandler) installed[i];\n\n if (context.equals(c.getContextPath())) {\n if (Log.isDebugEnabled()) {\n Log.debug(context + \" Context were equal; duplicate!\");\n }\n continue files;\n }\n\n String path;\n if (c instanceof WebAppContext) {\n path = Resource.newResource(((WebAppContext) c).getWar()).getFile().getAbsolutePath();\n } else {\n path = c.getBaseResource().getFile().getAbsolutePath();\n }\n\n if ((path != null) && path.equals(app.getFile().getAbsolutePath())) {\n if (Log.isDebugEnabled()) {\n Log.debug(path + \" Paths were equal; duplicate!\");\n }\n continue files;\n }\n\n }\n }\n\n // create a webapp\n WebAppContext wah = null;\n HandlerCollection contexts = getContexts();\n if ((contexts instanceof ContextHandlerCollection)\n && WebAppContext.class.isAssignableFrom(((ContextHandlerCollection) contexts).getContextClass())) {\n try {\n wah = (WebAppContext) ((ContextHandlerCollection) contexts).getContextClass().newInstance();\n } catch (Exception e) {\n throw new Error(e);\n }\n } else {\n wah = new WebAppContext();\n }\n\n // configure it\n wah.setContextPath(context);\n\n if (getConfigurationClasses() != null) {\n wah.setConfigurationClasses(getConfigurationClasses());\n }\n\n if (getDefaultsDescriptor() != null) {\n wah.setDefaultsDescriptor(getDefaultsDescriptor());\n }\n wah.setExtractWAR(isExtract());\n wah.setWar(app.toString());\n wah.setParentLoaderPriority(isParentLoaderPriority());\n\n Enumeration<?> names = _attributes.getAttributeNames();\n while (names.hasMoreElements()) {\n String name = (String) names.nextElement();\n wah.setAttribute(name, _attributes.getAttribute(name));\n }\n\n // add it\n Log.debug(\"AndroidWebAppDeployer: prepared \" + app.toString());\n contexts.addHandler(wah);\n _deployed.add(wah);\n //jetty-7.3.0 onwards need to start explicitly due to different startup time ordering\n wah.start();\n }\n }", "@Classpath\n @Incremental\n public abstract ConfigurableFileCollection getFeatureJavaResourceFiles();", "private String[] detectPlugins() {\n \t\t\tchangeStampIsValid = false;\n \t\t\tpluginsChangeStampIsValid = false;\n \t\t\tparent.changeStampIsValid = false;\n \t\t\tparent.pluginsChangeStampIsValid = false;\n \n \t\t\tplugins = new ArrayList();\n \n \t\t\tif (!supportsDetection(resolvedURL))\n \t\t\t\treturn new String[0];\n \n \t\t\t// locate plugin entries on site\n \t\t\tFile root = new File(resolvedURL.getFile().replace('/', File.separatorChar) + PLUGINS);\n \t\t\tString[] list = root.list();\n \t\t\tString path;\n \t\t\tFile plugin;\n \t\t\tfor (int i = 0; list != null && i < list.length; i++) {\n \t\t\t\tpath = list[i] + File.separator + PLUGIN_XML;\n \t\t\t\tplugin = new File(root, path);\n \t\t\t\tif (!plugin.exists()) {\n \t\t\t\t\tpath = list[i] + File.separator + FRAGMENT_XML;\n \t\t\t\t\tplugin = new File(root, path);\n \t\t\t\t\tif (!plugin.exists())\n \t\t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\tplugins.add(PLUGINS + \"/\" + path.replace(File.separatorChar, '/')); //$NON-NLS-1$\n \t\t\t}\n \t\t\tif (DEBUG) {\n \t\t\t\tdebug(resolvedURL.toString() + \" located \" + plugins.size() + \" plugin(s)\"); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\t}\n \n \t\t\treturn (String[]) plugins.toArray(new String[0]);\n \t\t}", "@Experimental\n default Collection<String> getGeneratedResources() {\n info(\"EXPERIMENTAL: Compile time resource contribution to the context is experimental\", null);\n return Collections.emptyList();\n }", "java.util.List<java.lang.String>\n getResourcePatternsList();", "public Map<String, String> getAllAssets(Context context) throws Exception;", "private HashMap getRuntimeImport() {\n \t\tURL url = InternalBootLoader.class.getProtectionDomain().getCodeSource().getLocation();\n \t\tString path = InternalBootLoader.decode(url.getFile());\n \t\tFile base = new File(path);\n \t\tif (!base.isDirectory())\n \t\t\tbase = base.getParentFile(); // was loaded from jar\n \n \t\t// find the plugin.xml (need to search because in dev mode\n \t\t// we can have some extra directory entries)\n \t\tFile xml = null;\n \t\twhile (base != null) {\n \t\t\txml = new File(base, BOOT_XML);\n \t\t\tif (xml.exists())\n \t\t\t\tbreak;\n \t\t\tbase = base.getParentFile();\n \t\t}\n \t\tif (xml == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.boot\")); //$NON-NLS-1$\n \n \t\ttry {\n \t\t\treturn getImport(xml.toURL(), RUNTIME_PLUGIN_ID);\n \t\t} catch (MalformedURLException e) {\n \t\t\treturn null;\n \t\t}\n \t}", "java.util.List<java.lang.String>\n getExtraJavacoptsList();", "private ArrayList<String> gettemplates(){\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\ttry {\n\t\t String[] cmd = {\n\t\t \t\t\"/bin/sh\",\n\t\t \t\t\"-c\",\n\t\t \t\t\"ls -p | grep -v / | grep -v 'pom.xml' \"\n\t\t \t\t};\n\n\t\t Process p = Runtime.getRuntime().exec(cmd); //Runtime r = Runtime.getRuntime(); Process p = r.exec(cmd);\n\t\t BufferedReader in =\n\t\t new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t\t String inputLine;\n\t\t while ((inputLine = in.readLine()) != null) {\n\t\t result.add(inputLine);\n\t\t }\n\t\t in.close();\n\n\t\t} catch (IOException e) {\n\t\t System.out.println(e);\n\t\t}\n\t\t\n\t\treturn result;\n\t\t}", "public List<IResource> getResources();", "private static List getPackages(Context param0) {\n }", "File getBundle();", "protected List<String> configurationArguments() {\n List<String> args = new ArrayList<String>();\n return args;\n }", "public List<String> getResources() {\n return resources;\n }", "@Classpath\n @Incremental\n public abstract ConfigurableFileCollection getJavaResourceFiles();", "List<Resource> resources();", "public interface Plugin {\n /**\n * What is the name of this plugin?\n *\n * The framework will use this name when storing the versions\n * (code version and schema version) in the database, and, if\n * this is the Application Plugin, in the help menu, main frame\n * title bar, and other displays wherever the application name\n * is shown.\n *\n * The column used to store this in the database is 40\n * characters wide.\n *\n * @return the name of this plugin\n */\n String getName();\n\n /**\n * What is the version number of this plugin's code?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the code version of this plugin\n */\n String getVersion();\n\n /**\n * Allow a plugin to provide any plugin-specific application\n * context files.\n *\n * Can return null or an empty list if there are none.\n * The elements of the list are paths to resources inside the\n * plugin's jar, e.g. org/devzendo/myapp/app.xml\n *\n * @return a list of any application contexts that the plugin\n * needs to add to the SpringLoader, or null, or empty list.\n */\n List<String> getApplicationContextResourcePaths();\n\n /**\n * Give the SpringLoader to the plugin, after the\n * application contexts for all plugins have been loaded\n * @param springLoader the SpringLoader\n */\n void setSpringLoader(final SpringLoader springLoader);\n\n /**\n * Obtain the SpringLoader for plugin use\n * @return the SpringLoader\n */\n SpringLoader getSpringLoader();\n\n /**\n * What is the database schema version of this plugin?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the database schema version of this plugin\n */\n String getSchemaVersion();\n\n /**\n * Shut down the plugin, freeing any resources. Called by the\n * framework upon system shutdown.\n */\n void shutdown();\n}", "private Resources getLocalizedResources(Context context) {\n Configuration conf = context.getResources().getConfiguration();\n conf = new Configuration(conf);\n conf.setLocale(new Locale(LocaleHelper.getLocaleCode(context)));\n Context localizedContext = context.createConfigurationContext(conf);\n return localizedContext.getResources();\n }", "protected Iterable<JStachioExtension> extensions(Jooby application) {\n return ServiceLoader.load(\n JStachioExtension.class, application.getEnvironment().getClassLoader());\n }", "List<File> getSystemDescriptionFiles();", "java.util.List<java.lang.String>\n getClasspathList();", "abstract public String getTopResourcesDir();", "java.util.List<java.lang.String>\n getClasspathList();", "AppConfiguration getApplicationList()\n throws SAXException, IOException;", "@SuppressWarnings(\"unchecked\")\n @Override\n public Object[] resolvePath(String path) {\n if (path.startsWith( WEB_APP )) {\n String webpath = \"/\" + path.split( \":\" )[1];\n\n if (isJar( webpath )) {\n logger.debug( \"Found jar: {}\", webpath );\n\n return new InputStream[] { servletContext.getResourceAsStream( webpath ) };\n }\n\n Set<String> paths = servletContext.getResourcePaths( webpath );\n\n if (paths.size() > 0) {\n Iterator<String> itr = paths.iterator();\n List<InputStream> streams = new ArrayList<InputStream>();\n\n while (itr.hasNext()) {\n String source = itr.next();\n\n if (isJar( source )) {\n InputStream stream = servletContext.getResourceAsStream( source );\n\n if (stream != null) {\n logger.debug( \"Found jar: {}\", source );\n\n streams.add( stream );\n }\n }\n }\n\n return streams.toArray( new InputStream[streams.size()] );\n }\n\n }\n\n return null;\n }", "private List<String> loadLanguages() {\n\t\tFile directory = new File(\"./src/resources/languages\");\t// load current directory\n\t\t\n\t\tFilenameFilter textFilter = new FilenameFilter() {\n\t\t\tpublic boolean accept(File dir, String name) {\n\t\t\t\tif(!name.startsWith(\"Syntax\") && !name.startsWith(\"LanguageCodes\")) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\t\n\t\tResourceFilter filter = new ResourceFilter(directory, textFilter);\n\t\t\n\t\tList<String> languages = (List<String>) filter.getFilteredList();\n\t\t\n\t\tlanguages = languages.stream()\n\t\t\t\t\t\t\t .map(m -> m.replace(UNWANTED_EXTENSION, \"\"))\n\t\t\t\t \t\t\t .collect(Collectors.toList());\n\t\t\n\t\treturn languages;\n\t}", "private static Hashtable<? super String, Object> getApplicationResources() throws NamingException {\n\n ClassLoader cl = helper.getContextClassLoader();\n\n synchronized (propertiesCache) {\n Hashtable<? super String, Object> result = propertiesCache.get(cl);\n if (result != null) {\n return result;\n }\n\n try {\n NamingEnumeration<InputStream> resources = helper.getResources(cl, APP_RESOURCE_FILE_NAME);\n try {\n while (resources.hasMore()) {\n Properties props = new Properties();\n InputStream istream = resources.next();\n try {\n props.load(istream);\n } finally {\n istream.close();\n }\n\n if (result == null) {\n result = props;\n } else {\n mergeTables(result, props);\n }\n }\n } finally {\n while (resources.hasMore()) {\n resources.next().close();\n }\n }\n\n // Merge in properties from file in <java.home>/lib.\n InputStream istream = helper.getJavaHomeLibStream(JRELIB_PROPERTY_FILE_NAME);\n if (istream != null) {\n try {\n Properties props = new Properties();\n props.load(istream);\n\n if (result == null) {\n result = props;\n } else {\n mergeTables(result, props);\n }\n } finally {\n istream.close();\n }\n }\n\n } catch (IOException e) {\n NamingException ne = new ConfigurationException(\"Error reading application resource file\");\n ne.setRootCause(e);\n throw ne;\n }\n if (result == null) {\n result = new Hashtable<>(11);\n }\n propertiesCache.put(cl, result);\n return result;\n }\n }", "public static String[] getCacheFileList(Context context) {\n return context.fileList();\n }", "public static List<String> getTemplates() {\n\t\tFile templatesDir = new File(PathUtils.getExtensionsTemplatePath());\n\t\tList<String> templates = Arrays.stream(templatesDir.listFiles(File::isDirectory)).map(File::getName)\n\t\t\t\t.collect(Collectors.toList());\n\t\tIProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();\n\t\tList<String> customTemplates = Arrays.stream(projects).filter(ExtensionUtils::isTemplate)\n\t\t\t\t.map(IProject::getName).collect(Collectors.toList());\n\t\ttemplates.addAll(customTemplates);\n\t\treturn templates;\n\t}", "public void loadPluginsStartup();", "private FilterChain loadFilters() {\n\t\ttry {\n\t\t\tAnnotation.scan(\"src/main/java/com/qa/app\");\n\t\t} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IllegalArgumentException\n\t\t\t\t| InvocationTargetException | NoSuchMethodException | SecurityException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@Experimental\n default @NonNull Iterable<URL> getClasspathResources(@NonNull String path) {\n return Collections.emptyList();\n }", "public Path getPluginsDirectory()\n {\n return pluginDirectory;\n }", "java.util.List<java.lang.String>\n getSourcepathList();", "File getPluginDirectory(String pluginId);", "java.util.List<java.lang.String>\n getSourcepathList();", "public List<String> getExecutableFilePatterns() {\n if (!executableFilePatterns.isEmpty()) {\n if (!executableFileRes.isEmpty()) {\n throw new InvalidProject(\n \"executable_file_res is a deprecated configuration field. it is replaced with \"\n + \"executable_file_patterns. Only one of these should be set.\");\n }\n return executableFilePatterns;\n }\n return executableFileRes;\n }", "public List<FxDropApplication> getDropApplicationsWithContext() {\n final ArrayList<FxDropApplication> apps = Lists.newArrayList(FxSharedUtils.getDropApplications());\n final Iterator<FxDropApplication> iter = apps.iterator();\n while (iter.hasNext()) {\n final FxDropApplication application = iter.next();\n if (!application.isWebContextAvailable()\n // drop flexive backend application form list\n || \"flexive\".equals(application.getName())\n || \"flexive-backend-war\".equals(application.getName())) {\n iter.remove();\n }\n }\n return apps;\n }", "java.util.List<java.lang.String>\n getSourceFileList();", "java.util.List<? extends com.google.wireless.android.sdk.stats.CriticalPathAnalyzerData.PluginBuildDataOrBuilder>\n getPluginsCriticalPathOrBuilderList();", "@Override\n protected FilterClassLoader.Filter getExtensionParentClassLoaderFilter() {\n return new FilterClassLoader.Filter() {\n @Override\n public boolean acceptResource(String resource) {\n return ALLOWED_RESOURCES.contains(resource);\n }\n\n @Override\n public boolean acceptPackage(String packageName) {\n return ALLOWED_PACKAGES.contains(packageName);\n }\n };\n }", "private File[] getFiles() {\n\n if (mPPTFilePath == null) {\n mPPTFilePath = getArguments().getString(PPTPathString);\n }\n\n String Path = mPPTFilePath;\n File mFile = new File(Path);\n if (mFile.exists() && mFile.isDirectory() && mFile.listFiles()!=null) {\n\n return mFile.listFiles();\n } else {\n Log.d(TAG, \"File==null\");\n return null;\n }\n }", "public abstract ApplicationLoader.Context context();", "private void locateDefaultPlugins() {\n \t\tHashMap runtimeImport = getRuntimeImport();\n \n \t\t// locate runtime plugin matching the import from boot\n \t\tURL runtimePluginPath = getPluginPath(runtimeImport);\n \t\tif (runtimePluginPath == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.runtime\")); //$NON-NLS-1$\n \n \t\t// get boot descriptor for runtime plugin\n \t\truntimeDescriptor = createPluginBootDescriptor(runtimePluginPath);\n \n \t\t// determine the xml plugin for the selected runtime\n \t\tHashMap xmlImport = getImport(runtimePluginPath, XML_PLUGIN_ID);\n \n \t\t// locate xml plugin matching the import from runtime plugin\n \t\tURL xmlPluginPath = getPluginPath(xmlImport);\n \t\tif (xmlPluginPath == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.xerces\")); //$NON-NLS-1$\n \n \t\t// get boot descriptor for xml plugin\n \t\txmlDescriptor = createPluginBootDescriptor(xmlPluginPath);\n \t}", "private void loadRegistratedResources() {\n \t\tFile kbPluginLocation = KbPlugin.getDefault().getLocation();\r\n \t\tif(kbPluginLocation!=null) {\r\n \t IExtensionRegistry registry = Platform.getExtensionRegistry();\r\n \t\t\tIExtensionPoint extensionPoint = registry.getExtensionPoint(\"org.jboss.tools.common.kb.tldResource\");\r\n \t\t\tIExtension[] extensions = extensionPoint.getExtensions();\r\n \t\t\tfor (int i=0; i<extensions.length; i++) {\r\n \t\t\t\tIExtension extension = extensions[i];\r\n \t\t\t\tIConfigurationElement[] elements = extension.getConfigurationElements();\r\n \t\t\t\tfor(int j=0; j<elements.length; j++) {\r\n \t\t\t\t\tString uri = elements[j].getAttribute(\"uri\");\r\n \t\t\t\t\tString location = elements[j].getAttribute(\"schema-location\");\r\n \t\t\t\t\tString version = elements[j].getAttribute(\"version\");\r\n \t\t\t\t\tString jsf = elements[j].getAttribute(\"jsf\");\r\n \t\t\t\t\tif(uri==null || uri.length()==0 || location==null || location.length()==0) {\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tFile shemaLocation = new File(kbPluginLocation, location);\r\n \t\t\t\t\tif(shemaLocation.isFile()) {\r\n \t\t\t\t\t\tKbTldResource resource = new KbTldResource(uri, null, null, null);\r\n \t\t\t\t\t\tresource.setSchemaLocation(shemaLocation);\r\n \t\t\t\t\t\tif(version!=null && version.length()>0) {\r\n \t\t\t\t\t\t\tresource.setVersion(version);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tresource.setCustomTld(false);\r\n \t\t\t\t\t\tresource.setJsfResource(\"true\".equals(jsf));\r\n \t\t\t\t\t\tregistratedResources.put(resource, resource);\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tString message = \"Can't load KB schema: \" + shemaLocation;\r\n \t\t\t\t\t\tKbPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, KbPlugin.PLUGIN_ID, IStatus.WARNING, message, null));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// Get custom schemas.\r\n \t\tFile schemaFolder = new File(schemaLocation); \r\n \t\tif(!schemaFolder.exists()) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tFile[] schemas = schemaFolder.listFiles(new FileFilter(){\r\n \t\t\tpublic boolean accept(File file) {\r\n \t\t\t\tif(file.isFile()) {\r\n \t\t\t\t\treturn true;\r\n \t\t\t\t}\r\n \t\t\t\treturn false;\r\n \t\t\t}\r\n \t\t});\r\n \r\n \t\tfor(int i=0; i<schemas.length; i++) {\r\n \t\t\tDocument document = null;\r\n \t\t\ttry {\r\n \t\t\t\tdocument = KbDocumentBuilderFactory.createDocumentBuilder(false).parse(schemas[i]);\r\n \t\t\t} catch (Exception e) {\r\n \t\t\t\tKbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID, IStatus.OK, \"Can't parse Schema (location: \" + schemas[i] + \")\", e));\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n //\t\t\tString tldLocation = schemas[i].getAbsolutePath();\r\n \t\t\tString tldLocation = document.getDocumentElement().getAttribute(SchemaNodeFactory.LOCATION_ATTRIBUTE);\r\n \t\t\tString tldUri = document.getDocumentElement().getAttribute(SchemaNodeFactory.URI_ATTRIBUTE);\r\n \t\t\tString tldVersion = document.getDocumentElement().getAttribute(SchemaNodeFactory.VERSION_ATTRIBUTE);\r\n \t\t\tString jsf = document.getDocumentElement().getAttribute(SchemaNodeFactory.JSF_ATTRIBUTE);\r\n \t\t\tString tldContent = null; \r\n \t\t\tNodeList children = document.getDocumentElement().getChildNodes();\r\n \t\t\tfor(int j=0; j<children.getLength(); j++) {\r\n \t\t\t\tNode node = children.item(j);\r\n \t\t\t\tif(node.getNodeName().equals(SchemaNodeFactory.TLD_CONTENT_NODE)) {\r\n \t\t\t\t\tNode child = node.getFirstChild();\r\n \t\t\t\t\tif(child instanceof CDATASection) {\r\n \t\t\t\t\t\ttldContent = ((CDATASection)child).getData();\r\n \t\t\t\t\t}\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tKbTldResource resource = new KbTldResource(tldUri, tldLocation, null, tldVersion);\r\n \t\t\tresource.setTldContent(tldContent);\r\n \t\t\tresource.setSchemaLocation(schemas[i]);\r\n \t\t\tresource.setCustomTld(true);\r\n \t\t\tresource.setJsfResource(\"true\".equals(jsf));\r\n \t\t\tregistratedResources.put(resource, resource);\r\n \t\t}\r\n \t}", "private void loadExtensionResources() {\n\n for (String extensionType : ExtensionMgtUtils.getExtensionTypes()) {\n Path path = ExtensionMgtUtils.getExtensionPath(extensionType);\n if (log.isDebugEnabled()) {\n log.debug(\"Loading default templates from: \" + path);\n }\n\n // Check whether the given extension type directory exists.\n if (!Files.exists(path) || !Files.isDirectory(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Default templates directory does not exist: \" + path);\n }\n continue;\n }\n\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addExtensionType(extensionType);\n\n // Load extensions from the given extension type directory.\n try (Stream<Path> directories = Files.list(path).filter(Files::isDirectory)) {\n directories.forEach(extensionDirectory -> {\n try {\n // Load extension info.\n ExtensionInfo extensionInfo = loadExtensionInfo(extensionDirectory);\n if (extensionInfo == null) {\n throw new ExtensionManagementException(\"Error while loading extension info from: \"\n + extensionDirectory);\n }\n extensionInfo.setType(extensionType);\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addExtension(extensionType,\n extensionInfo.getId(), extensionInfo);\n // Load templates.\n JSONObject template = loadTemplate(extensionDirectory);\n if (template != null) {\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addTemplate(extensionType,\n extensionInfo.getId(), template);\n }\n // Load metadata.\n JSONObject metadata = loadMetadata(extensionDirectory);\n if (metadata != null) {\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addMetadata(extensionType,\n extensionInfo.getId(), metadata);\n }\n } catch (ExtensionManagementException e) {\n log.error(\"Error while loading resource files in: \" + extensionDirectory, e);\n }\n });\n } catch (IOException e) {\n log.error(\"Error while loading resource files in: \" + path, e);\n }\n }\n }", "public String getApplicationContext()\n {\n return configfile.getApplicationPath(getASPManager().getCurrentHostIndex());\n }", "java.util.List<java.lang.String>\n getProcessorpathList();", "public List<String> getSupportedSchemaVersions() {\n // Taken from https://stackoverflow.com/a/20073154/\n List<String> supportedSchemaVersions = new ArrayList<>();\n File jarFile = new File(getClass().getProtectionDomain().getCodeSource().getLocation().getPath());\n try {\n if (jarFile.isFile()) { // Run with JAR file\n final JarFile jar = new JarFile(jarFile);\n final Enumeration<JarEntry> entries = jar.entries(); //gives ALL entries in jar\n while (entries.hasMoreElements()) {\n final String name = entries.nextElement().getName();\n if (name.startsWith(RESOURCES_PATH)) { //filter according to the path\n if (name.split(\"/\").length == 2) {\n supportedSchemaVersions.add(name.split(\"/\")[1]);\n }\n }\n }\n jar.close();\n } else {\n supportedSchemaVersions = getSupportedSchemaVersionsFromResources();\n }\n } catch (IOException ignored) {\n\n }\n return supportedSchemaVersions;\n }", "private List<IFile> getAllBeansXmls() {\r\n \t\tList<IFile> beansXmls = new ArrayList<IFile>();\r\n \t\t// From source folders\r\n \t\tSet<IFolder> sourceFolders = getSourceFoldersForProjectsSet();\r\n \t\tfor (IFolder source : sourceFolders) {\r\n \t\t\tIResource beansXml = source.findMember(new Path(\"/META-INF/beans.xml\")); //$NON-NLS-1$\r\n \t\t\tif(beansXml!=null && beansXml instanceof IFile) {\r\n \t\t\t\tbeansXmls.add((IFile)beansXml);\r\n \t\t\t}\r\n \t\t}\r\n \t\t// From WEB-INF folder\r\n \t\tIVirtualComponent com = ComponentCore.createComponent(validatingProject);\r\n \t\tif(com!=null) {\r\n \t\t\tIVirtualFile beansXml = com.getRootFolder().getFile(new Path(\"/WEB-INF/beans.xml\")); //$NON-NLS-1$\r\n \t\t\tif(beansXml!=null && beansXml.getUnderlyingFile().isAccessible()) {\r\n \t\t\t\tbeansXmls.add(beansXml.getUnderlyingFile());\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn beansXmls;\r\n \t}", "@Override\n protected Resource[] getTestBundles() {\n List<Resource> resources = new ArrayList<Resource>(Arrays.asList(super.getTestBundles()));\n for (Iterator<Resource> it = resources.iterator(); it.hasNext(); ) {\n String fn = it.next().getFilename();\n if (fn.startsWith(\"cxf-dosgi-ri-dsw-cxf\") && fn.endsWith(\".jar\")) {\n it.remove();\n }\n }\n return resources.toArray(new Resource[resources.size()]);\n }", "List<String> getSystemPackages();", "@Override\n public List<Module> getPluginModules(ServletContext context) {\n List<Module> modules = new ArrayList<>();\n\n modules.add(new PushLiquibaseModule(context));\n modules.add(new PushPersistenceModule(context));\n modules.add(new PushRestModule());\n\n return modules;\n }", "public List getRuntimeClasspath(IPath installPath, IPath configPath);", "Map<String, Object> getContext();", "public List<File> getClasspathElements() {\n\t\tthis.parseSystemClasspath();\n\t return classpathElements;\n\t}", "public List<String> getFiles();", "List<IDirectory> getSourcePath();", "public String getResourcePath();", "private File extractResources() {\r\n\t\tif (org.opensourcephysics.display.OSPRuntime.appletMode)\r\n\t\t\treturn null;\r\n\t\tFile descTempDirectory = new File(getTemporaryDir() + \"DescriptionPages/\");\r\n\t\tif (!descTempDirectory.exists()) {\r\n\t\t\tif (!descTempDirectory.mkdirs()) {\r\n\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\"DescriptionPages : Could not create directory : \" + descTempDirectory.getAbsolutePath());\r\n\t\t\t\tJOptionPane.showMessageDialog(openPageButton, Memory.getResource(\"DescriptionPages.CannotExtractFiles\"),\r\n\t\t\t\t\t\tMemory.getResource(\"Error\"), JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// System.err.println (\"Extracting description pages to folder :\r\n\t\t// \"+descTempDirectory.getAbsolutePath());\r\n\t\tfor (String filename : model._getClassEjsResources()) {\r\n\t\t\tif (extractToDirectory(filename, descTempDirectory, false) == null)\r\n\t\t\t\treturn null;\r\n\t\t}\r\n\t\textractToDirectory(\"/_ejs_library/css/ejss.css\", descTempDirectory, false); // New in %.3Failure to do this does\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// not invalidate the process\r\n\t\treturn descTempDirectory;\r\n\t}", "public void loadAllPlugins(final String extPointId);", "int getPluginsCriticalPathCount();", "private List<ExtensionClassLoader> getClassLoaders() {\n final List<ExtensionClassLoader> classLoaders = new ArrayList<>();\n\n // start with the class loader that loaded ExtensionManager, should be WebAppClassLoader for API WAR\n final ExtensionClassLoader frameworkClassLoader = new ExtensionClassLoader(\"web-api\", new URL[0], this.getClass().getClassLoader());\n classLoaders.add(frameworkClassLoader);\n\n // we want to use the system class loader as the parent of the extension class loaders\n ClassLoader systemClassLoader = FlowPersistenceProvider.class.getClassLoader();\n\n // add a class loader for each extension dir\n final Set<String> extensionDirs = properties.getExtensionsDirs();\n for (final String dir : extensionDirs) {\n if (!StringUtils.isBlank(dir)) {\n final ExtensionClassLoader classLoader = createClassLoader(dir, systemClassLoader);\n if (classLoader != null) {\n classLoaders.add(classLoader);\n }\n }\n }\n\n return classLoaders;\n }", "ImportOption[] getImports();", "abstract public String getDataResourcesDir();", "private static ArrayList<File> getLocalRootHiveXmlDirectories(\n Context ctx,\n NwdDb db) {\n\n HiveRoot localRoot = UtilsHive.getLocalHiveRoot(ctx, db);\n\n return getFoldersForHiveRoot(localRoot, true, false);\n }", "Collection<? extends Resource> getResources();", "public interface ResourcePaths {\n String imageFolderPath();\n String imageResourcePath();\n String videoFolderPath();\n String videoResourcePath();\n}", "public TestGenericWebXmlContextLoader() {\r\n\t\tsuper(\"/src/main/wepapp\", false);\r\n\t}", "List<String> getAllowedExtensions();", "public String[] getExtensions()\r\n {\r\n return new String[] {\"\"};\r\n }", "public String searchExportedPlugins()\n\t{\n\t\tFile parent = null;\n\t\tif (System.getProperty(\"eclipse.home.location\") != null)\n\t\t\tparent = new File(URI.create(System.getProperty(\"eclipse.home.location\").replaceAll(\" \", \"%20\")));\n\t\telse parent = new File(System.getProperty(\"user.dir\"));\n\n\t\tList<String> pluginLocations = exportModel.getPluginLocations();\n\t\tfor (String libName : NG_LIBS)\n\t\t{\n\t\t\tint i = 0;\n\t\t\tboolean found = false;\n\t\t\twhile (!found && i < pluginLocations.size())\n\t\t\t{\n\t\t\t\tFile pluginLocation = new File(pluginLocations.get(i));\n\t\t\t\tif (!pluginLocation.isAbsolute())\n\t\t\t\t{\n\t\t\t\t\tpluginLocation = new File(parent, pluginLocations.get(i));\n\t\t\t\t}\n\t\t\t\tFileFilter filter = new WildcardFileFilter(libName);\n\t\t\t\tFile[] libs = pluginLocation.listFiles(filter);\n\t\t\t\tif (libs != null && libs.length > 0)\n\t\t\t\t{\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (!found) return libName;\n\t\t}\n\t\treturn null;\n\t}", "public String[] getAllDependencyExtensions();", "String getApplicationDependencies();", "private void setNeedHookPackage(Context context) {\n ArrayList<String> NeedHookPackage = new ArrayList<String>();\n try {\n// 根据context对象获取当前apk路径\n String path = findApkFile(context, modulePackage).toString();\n// 简单暴力使用zip来解包获取config文件,之前采用getSource发现加入免重启功能后导致获取原包路径失败,因此换用这种方案\n ZipFile zipFile = new ZipFile(path);\n ZipEntry zipEntry = zipFile.getEntry(\"assets/config\");\n// 读流数据转化成arraylist\n InputStream inputStream = zipFile.getInputStream(zipEntry);\n InputStreamReader in = new InputStreamReader(inputStream);\n BufferedReader br = new BufferedReader(in);\n String line;\n StringBuilder sb = new StringBuilder();\n while ((line = br.readLine()) != null) {\n sb.append(line);\n if (line.contains(\".name\")) {\n String[] new_line = line.split(\"=\");\n NeedHookPackage.add(new_line[1]);\n }\n }\n hookPackages = NeedHookPackage;\n } catch (Exception e) {\n Logger.loge(e.toString());\n }\n }", "public ListOfOnixElement<ResourceFileFeatureDescription, String> resourceFileFeatureDescriptions() {\n _initialize();\n return resourceFileFeatureDescriptions;\n }", "private void updateConfigurationFromPlugins(URL file) throws IOException {\n \n \t\t// get the actual plugin path\n \t\tURL[] pluginPath = BootLoader.getPluginPath(file);\n \t\tif (pluginPath == null || pluginPath.length == 0)\n \t\t\treturn;\n \n \t\t// create a temp configuration and populate it based on plugin path\n \t\tPlatformConfiguration tempConfig = new PlatformConfiguration((URL) null);\n \t\tfor (int i = 0; i < pluginPath.length; i++) {\n \t\t\tString entry = pluginPath[i].toExternalForm();\n \t\t\tString sitePortion;\n \t\t\tString pluginPortion;\n \t\t\tint ix;\n \t\t\tif (entry.endsWith(\"/\")) { //$NON-NLS-1$\n \t\t\t\t// assume directory path in the form <site>/plugins/\n \t\t\t\t// look for -------------------------------^\n \t\t\t\tix = findEntrySeparator(entry, 2); // second from end\n \t\t\t\tsitePortion = entry.substring(0, ix + 1);\n \t\t\t\tpluginPortion = entry.substring(ix + 1);\n \t\t\t\tif (!pluginPortion.equals(\"plugins/\")) //$NON-NLS-1$\n \t\t\t\t\tcontinue; // unsupported entry ... skip it (\"fragments/\" are handled)\n \t\t\t\tpluginPortion = null;\n \t\t\t} else {\n \t\t\t\t// assume full path in the form <site>/<pluginsDir>/<some.plugin>/plugin.xml\n \t\t\t\t// look for --------------------------^\n \t\t\t\tix = findEntrySeparator(entry, 3); // third from end\n \t\t\t\tsitePortion = entry.substring(0, ix + 1);\n \t\t\t\tpluginPortion = entry.substring(ix + 1);\n \t\t\t}\n \t\t\tif (ix == -1)\n \t\t\t\tcontinue; // bad entry ... skip it\n \n \t\t\tURL siteURL = null;\n \t\t\ttry {\n \t\t\t\tsiteURL = new URL(sitePortion);\n \t\t\t\tif (siteURL.getProtocol().equals(\"file\")) { //$NON-NLS-1$\n \t\t\t\t\tFile sf = new File(siteURL.getFile());\n \t\t\t\t\tString sfn = sf.getAbsolutePath().replace(File.separatorChar, '/');\n \t\t\t\t\tif (!sfn.endsWith(\"/\")) //$NON-NLS-1$\n \t\t\t\t\t\tsfn += \"/\"; //$NON-NLS-1$\n \t\t\t\t\tsiteURL = new URL(\"file:\" + sfn); //$NON-NLS-1$\n \t\t\t\t}\n \t\t\t} catch (MalformedURLException e) {\n \t\t\t\tcontinue; // bad entry ... skip it\n \t\t\t}\n \n \t\t\t// configure existing site or create a new one for the entry\n \t\t\tISiteEntry site = tempConfig.findConfiguredSite(siteURL);\n \t\t\tISitePolicy policy;\n \t\t\tif (site == null) {\n \t\t\t\t// new site\n \t\t\t\tif (pluginPortion == null)\n \t\t\t\t\tpolicy = tempConfig.createSitePolicy(ISitePolicy.USER_EXCLUDE, null);\n \t\t\t\telse\n \t\t\t\t\tpolicy = tempConfig.createSitePolicy(ISitePolicy.USER_INCLUDE, new String[] { pluginPortion });\n \t\t\t\tsite = tempConfig.createSiteEntry(siteURL, policy);\n \t\t\t\ttempConfig.configureSite(site);\n \t\t\t} else {\n \t\t\t\t// existing site\n \t\t\t\tpolicy = site.getSitePolicy();\n \t\t\t\tif (policy.getType() == ISitePolicy.USER_EXCLUDE)\n \t\t\t\t\tcontinue; // redundant entry ... skip it\n \t\t\t\tif (pluginPortion == null) {\n \t\t\t\t\t// directory entry ... change policy to exclusion (with empty list)\n \t\t\t\t\tpolicy = tempConfig.createSitePolicy(ISitePolicy.USER_EXCLUDE, null);\n \t\t\t\t} else {\n \t\t\t\t\t// explicit entry ... add it to the inclusion list\n \t\t\t\t\tArrayList list = new ArrayList(Arrays.asList(policy.getList()));\n \t\t\t\t\tlist.add(pluginPortion);\n \t\t\t\t\tpolicy = tempConfig.createSitePolicy(ISitePolicy.USER_INCLUDE, (String[]) list.toArray(new String[0]));\n \t\t\t\t}\n \t\t\t\tsite.setSitePolicy(policy);\n \t\t\t}\n \t\t}\n \n \t\t// merge resulting site(s) into the specified configuration\n \t\tISiteEntry[] tempSites = tempConfig.getConfiguredSites();\n \t\tfor (int i = 0; i < tempSites.length; i++) {\n \t\t\tconfigureSite(tempSites[i], true /*replace*/\n \t\t\t);\n \t\t}\n \t}", "@Override\n\t\tpublic String getContextPath() {\n\t\t\treturn null;\n\t\t}", "public static List<String> getProviderExist() {\n\t\tList<String> providerExist = new ArrayList<String>();\n\t\ttry {\n\t\t\t// load provider found previous\n\t\t\tString providerFound = Utils.getValueFromConfig(Utils.KEY_PROVIDER_FOUND);\n\t\t\tString[] providerFoundArr = providerFound == null ? null : providerFound.split(\",\");\n\t\t\tif (providerFoundArr != null && providerFoundArr.length > 0)\n\t\t\t{\n\t\t\t\tfor (String provider : providerFoundArr) {\n\t\t\t\t\tString providerPath = IsFileExistInSystem(provider);\n\t\t\t\t\tif (null != providerPath) {\n\t\t\t\t\t\tproviderExist.add(providerPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// load a properties file\n\t\t\tString providerList = Utils.getValueFromConfig(Utils.KEY_PROVIDER_LIST);\n\t\t\t// get from string\n\t\t\tString[] providerArr = providerList.split(\",\");\n\t\t\tfor (String provider : providerArr) {\n\t\t\t\tif (providerFoundArr != null && !Arrays.asList(providerFoundArr).contains(provider))\n\t\t\t\t{\n\t\t\t\t\tString providerPath = IsFileExistInSystem(provider);\n\t\t\t\t\tif (null != providerPath && !providerExist.contains(providerPath)) {\n\t\t\t\t\t\tproviderExist.add(providerPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t// get from system\n\t\t\tList<String> listOnSystem = GetDriverOnSystem();\n\t\t\tfor (String path : listOnSystem) {\n\t\t\t\tif (!providerExist.contains(path)) {\n\t\t\t\t\tproviderExist.add(path);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tLOG.write(\"CryptoTokenHelper\", e.getMessage());\n\t\t}\n\t\treturn providerExist;\n\t}", "@Override\n public URL getTemplateLocation() {\n try {\n String[] candidates = getDirectoryCandidates();\n for (int i = 0; i < candidates.length; i++) {\n if (Activator.getDefault().getBundle().getEntry(candidates[i]) != null) {\n URL candidate = new URL(getInstallURL(), candidates[i]);\n return candidate;\n }\n }\n } catch (MalformedURLException e) { // do nothing\n }\n return null;\n }", "String[] getVDBResourcePaths() throws Exception;", "static Resources m61429a(Context context, C18846s sVar) throws FileNotFoundException {\n if (sVar.f50795e != 0 || sVar.f50794d == null) {\n return context.getResources();\n }\n String authority = sVar.f50794d.getAuthority();\n if (authority != null) {\n try {\n return context.getPackageManager().getResourcesForApplication(authority);\n } catch (NameNotFoundException unused) {\n StringBuilder sb = new StringBuilder(\"Unable to obtain resources for package: \");\n sb.append(sVar.f50794d);\n throw new FileNotFoundException(sb.toString());\n }\n } else {\n StringBuilder sb2 = new StringBuilder(\"No package provided: \");\n sb2.append(sVar.f50794d);\n throw new FileNotFoundException(sb2.toString());\n }\n }" ]
[ "0.62384814", "0.5998289", "0.5996777", "0.57799536", "0.56554216", "0.5639584", "0.55796725", "0.5570208", "0.5568652", "0.5530908", "0.5454863", "0.5445675", "0.5445675", "0.5445675", "0.5443382", "0.53952503", "0.5370776", "0.5367006", "0.534933", "0.53177387", "0.5316762", "0.529671", "0.52941424", "0.52699864", "0.524747", "0.52453166", "0.52348566", "0.5232516", "0.5211733", "0.51859915", "0.5181615", "0.5179057", "0.5174986", "0.51735437", "0.5167634", "0.5161502", "0.515924", "0.51111174", "0.5109661", "0.5084439", "0.50755394", "0.5052419", "0.50417536", "0.5038264", "0.50308794", "0.5027243", "0.50097764", "0.49814487", "0.4980395", "0.49756706", "0.49724054", "0.49467063", "0.49328974", "0.49315873", "0.49016848", "0.48939106", "0.48937076", "0.48848543", "0.48836258", "0.48602843", "0.48336607", "0.48233366", "0.48225984", "0.48214132", "0.48053917", "0.48047563", "0.48034352", "0.4801594", "0.47913837", "0.47909027", "0.478397", "0.47837934", "0.47815707", "0.4775528", "0.4769486", "0.47622195", "0.47569034", "0.47475967", "0.47417572", "0.47411674", "0.47389552", "0.4732935", "0.4732196", "0.47309735", "0.47275305", "0.47267365", "0.47083947", "0.47051874", "0.47026587", "0.4687079", "0.4681467", "0.46811208", "0.46711066", "0.466662", "0.4663713", "0.4658218", "0.46575594", "0.46530998", "0.46514562", "0.46478316" ]
0.6911077
0
Give the SpringLoader to the plugin, after the application contexts for all plugins have been loaded
void setSpringLoader(final SpringLoader springLoader);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SpringLoader getSpringLoader();", "@Override\n\tpublic void afterSpringLoad(AfterSpringLoadSupplierExtensionContext context) throws Exception {\n\t\tcontext.addThreadSynchroniser(() -> new SpringDataThreadSynchroniser());\n\t}", "protected void initSpring() {\n\t\tgetComponentInstantiationListeners().add(new SpringComponentInjector(this));\n\t}", "@PostConstruct\n public void init() {\n String[] commandPathPatterns = new String[]{\"classpath*:/commands/**\",\n \"classpath*:/crash/commands/**\"};\n\n // Patterns to use to look for configurations.\n String[] configPathPatterns = new String[]{\"classpath*:/crash/*\"};\n\n // Comma-separated list of commands to disable.\n String[] disabledCommands = new String[]{\"jpa*\", \"jdbc*\", \"jndi*\"};\n\n // Comma-separated list of plugins to disable. Certain plugins are disabled by default\n // based on the environment.\n String[] disabledPlugins = new String[0];\n\n FS commandFileSystem = createFileSystem(\n commandPathPatterns,\n disabledCommands);\n FS configurationFileSystem = createFileSystem(\n configPathPatterns, new String[0]);\n\n PluginDiscovery discovery = new BeanFactoryFilteringPluginDiscovery(\n this.resourceLoader.getClassLoader(), this.beanFactory,\n disabledPlugins);\n\n PluginContext context = new PluginContext(discovery,\n createPluginContextAttributes(), commandFileSystem,\n configurationFileSystem, this.resourceLoader.getClassLoader());\n\n context.refresh();\n start(context);\n }", "public void initContext() {\n\t\tClassLoader originalContextClassLoader =\n\t\t\t\tThread.currentThread().getContextClassLoader();\n\t\tThread.currentThread().setContextClassLoader(MY_CLASS_LOADER);\n\t\t//this.setClassLoader(MY_CLASS_LOADER);\n\n\t\tcontext = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tsetParent(context);\n\n\n\t\t// reset the original CL, to try to prevent crashing with\n\t\t// other Java AI implementations\n\t\tThread.currentThread().setContextClassLoader(originalContextClassLoader);\n\t}", "public void loadPluginsStartup();", "public interface BootLoaderManager {\n\n /**\n * 注入上下文\n * @param atlasWrapperApplicationContext\n */\n BootLoaderManager attachContext(AtlasWrapperApplicationContext atlasWrapperApplicationContext);\n\n /**\n * 获取上下文环境\n * @return\n */\n AtlasWrapperApplicationContext getContext();\n\n /**\n * 启动加载\n */\n void load();\n}", "@Override\r\n public void init() throws Exception {\r\n context = SpringApplication.run(getClass(), savedArgs);\r\n context.getAutowireCapableBeanFactory().autowireBean(this);\r\n }", "void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\tObject activityThread = null;\n\t\ttry {\n\t\t\tactivityThread = Reflection.getField(contextImpl, \"mMainThread\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get package container\n\t\tMap mPackages = null;\n\t\ttry {\n\t\t\tmPackages = (Map) Reflection.getField(activityThread, \"mPackages\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//To obtain a weak reference object, the standard reflection\n\t\tWeakReference weakReference = (WeakReference) mPackages.get(pkgName);\n\t\tif (weakReference == null) {\n\t\t\tlog.e(\"loadedApk is null\");\n\t\t} else {\n\t\t\t//Get apk need to be loaded\n\t\t\tObject loadedApk = weakReference.get();\n\t\t\t\n\t\t\tif (loadedApk == null) {\n\t\t\t\tlog.e(\"loadedApk is null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (appClassLoader == null) {\n\t\t\t\t//Access to the original class loader\n\t\t\t\tClassLoader old = null;\n\t\t\t\ttry {\n\t\t\t\t\told = (ClassLoader) Reflection.getField(loadedApk,\n\t\t\t\t\t\t\t\"mClassLoader\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//According to the default class loader instantiate a plug-in class loader\n\t\t\t\tappClassLoader = new SyknetAppClassLoader(old, this);\n\t\t\t}\n\t\t\t//Replace the new plug-in loader loader by default\n\t\t\ttry {\n\t\t\t\tReflection.setField(loadedApk, \"mClassLoader\", appClassLoader);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public interface Plugin {\n /**\n * What is the name of this plugin?\n *\n * The framework will use this name when storing the versions\n * (code version and schema version) in the database, and, if\n * this is the Application Plugin, in the help menu, main frame\n * title bar, and other displays wherever the application name\n * is shown.\n *\n * The column used to store this in the database is 40\n * characters wide.\n *\n * @return the name of this plugin\n */\n String getName();\n\n /**\n * What is the version number of this plugin's code?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the code version of this plugin\n */\n String getVersion();\n\n /**\n * Allow a plugin to provide any plugin-specific application\n * context files.\n *\n * Can return null or an empty list if there are none.\n * The elements of the list are paths to resources inside the\n * plugin's jar, e.g. org/devzendo/myapp/app.xml\n *\n * @return a list of any application contexts that the plugin\n * needs to add to the SpringLoader, or null, or empty list.\n */\n List<String> getApplicationContextResourcePaths();\n\n /**\n * Give the SpringLoader to the plugin, after the\n * application contexts for all plugins have been loaded\n * @param springLoader the SpringLoader\n */\n void setSpringLoader(final SpringLoader springLoader);\n\n /**\n * Obtain the SpringLoader for plugin use\n * @return the SpringLoader\n */\n SpringLoader getSpringLoader();\n\n /**\n * What is the database schema version of this plugin?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the database schema version of this plugin\n */\n String getSchemaVersion();\n\n /**\n * Shut down the plugin, freeing any resources. Called by the\n * framework upon system shutdown.\n */\n void shutdown();\n}", "protected void setUpClassloader() throws Exception\n {\n threadContextClassLoader = Thread.currentThread()\n .getContextClassLoader();\n Thread.currentThread()\n .setContextClassLoader(\n new URLClassLoader(new URL[0], this.getClass()\n .getClassLoader()));\n classLoaderSet = true;\n }", "@Before\n\tpublic void onBefore() {\n\t\tcontext = new ClassPathXmlApplicationContext(\n\t\t \"classpath:test-spring-post-processor-with-annotation-config.xml\");\n\n\t\tcontext.registerShutdownHook();\n\n\t}", "public abstract ApplicationLoader.Context context();", "public void onLoad() {\n // store jar path for plugin loader\n thisJar = this.getFile();\n }", "protected void pluginInitialize() {}", "private SpringApplicationContextProvider() {\r\n\t}", "private void manageLoaders() {\n\n // note: null is used in place of a Bundle object since all additional\n // parameters for Loader are global variables\n\n // get LoaderManager and initialise the loader\n if (getSupportLoaderManager().getLoader(LOADER_ID_01) == null) {\n getSupportLoaderManager().initLoader(LOADER_ID_01, null, this);\n } else {\n getSupportLoaderManager().restartLoader(LOADER_ID_01, null, this);\n }\n }", "public void initClassLoader() {\n FileClassLoadingService classLoader = new FileClassLoadingService();\n\n // init from preferences...\n Domain classLoaderDomain = getPreferenceDomain().getSubdomain(\n FileClassLoadingService.class);\n\n Collection details = classLoaderDomain.getPreferences();\n if (details.size() > 0) {\n\n // transform preference to file...\n Transformer transformer = new Transformer() {\n\n public Object transform(Object object) {\n DomainPreference pref = (DomainPreference) object;\n return new File(pref.getKey());\n }\n };\n\n classLoader.setPathFiles(CollectionUtils.collect(details, transformer));\n }\n\n this.modelerClassLoader = classLoader;\n }", "public void initApplicationContext()\r\n/* 32: */ throws BeansException\r\n/* 33: */ {\r\n/* 34:103 */ super.initApplicationContext();\r\n/* 35:104 */ registerHandlers(this.urlMap);\r\n/* 36: */ }", "public void before()\n {\n adapter = context.getBean(HandlerAdapter.class);\n }", "public void loadAndWait()\n {\n injector.addConfigurationInstances(this.configClassInstances);\n\n // load all @Services from @Configuration classes\n injector.activateFailOnNullInstance();\n injector.load();\n\n // detect duplicates and crash on matches\n injector.crashOnDuplicates();\n\n // branch out the dependencies, such that Service A, with dependency B, is\n // aware of all dependencies of B.\n injector.branchOutDependencyTree();\n\n // sort the services, based on dependency requirements\n injector.sortByDependencies();\n\n // instantiate services/clients and crash if any nil instances are detected\n injector.instantiateComponents();\n injector.crashOnNullInstances();\n\n // add the component instances to the ServiceContext\n injector.installServices(ctx);\n\n // instantiate clients\n //injector.instantiateClients();\n\n // invoke DepWire methods with required services & clients\n injector.findDepWireMethodsAndPopulate();\n }", "protected void after() {\n System.clearProperty(DandelionConfig.BUNDLE_PRE_LOADERS.getName());\n }", "protected void init()\n {\n context.setConfigured(false);\n ok = true;\n\n if (!context.getOverride())\n {\n processContextConfig(\"context.xml\", false);\n processContextConfig(getHostConfigPath(org.apache.catalina.startup.Constants.HostContextXml), false);\n }\n // This should come from the deployment unit\n processContextConfig(context.getConfigFile(), true);\n }", "public ApplicationContextAwareProcessor(ConfigurableApplicationContext applicationContext) {\n\t\tthis.applicationContext = applicationContext;\n\t}", "public void afterBeanDiscovery(@Observes AfterBeanDiscovery event, BeanManager manager) {\r\n\t\t//register ZK contexts\r\n\t\tevent.addContext(new DesktopContext());\r\n\t\tevent.addContext(new PageContext());\r\n\t\tevent.addContext(new IdSpaceContext());\r\n\t\tevent.addContext(new ComponentContext());\r\n\t\tevent.addContext(new ExecutionContext());\r\n\t\tlog.info(\"ZK Weld Extension \"+Version.UID);\r\n\t}", "protected void registerPreLoad(ConfigurationSection configuration) {\n PreLoadEvent loadEvent = new PreLoadEvent(this);\n Bukkit.getPluginManager().callEvent(loadEvent);\n\n blockBreakManagers.addAll(loadEvent.getBlockBreakManagers());\n blockBuildManagers.addAll(loadEvent.getBlockBuildManagers());\n pvpManagers.addAll(loadEvent.getPVPManagers());\n teamProviders.addAll(loadEvent.getTeamProviders());\n castManagers.addAll(loadEvent.getCastManagers());\n targetingProviders.addAll(loadEvent.getTargetingManagers());\n teamProviders.addAll(loadEvent.getTeamProviders());\n playerWarpManagers.putAll(loadEvent.getWarpManagers());\n\n // Vault currency must be registered after VaultController initialization\n ConfigurationSection currencyConfiguration = configuration.getConfigurationSection(\"builtin_currency\");\n addCurrency(new VaultCurrency(this, currencyConfiguration.getConfigurationSection(\"currency\")));\n\n // Custom currencies can override the defaults\n for (Currency currency : loadEvent.getCurrencies()) {\n addCurrency(currency);\n }\n\n if (aureliumSkillsManager != null) {\n aureliumSkillsManager.register(currencyConfiguration);\n }\n if (tokenManager != null) {\n tokenManager.register(currencyConfiguration);\n }\n\n // Configured currencies override everything else\n currencyConfiguration = configuration.getConfigurationSection(\"custom_currency\");\n Set<String> keys = currencyConfiguration.getKeys(false);\n for (String key : keys) {\n addCurrency(new CustomCurrency(this, key, currencyConfiguration.getConfigurationSection(key)));\n }\n\n log(\"Registered currencies: \" + StringUtils.join(currencies.keySet(), \",\"));\n\n // Register any attribute providers that were in the PreLoadEvent.\n for (AttributeProvider provider : loadEvent.getAttributeProviders()) {\n externalProviders.add(provider);\n }\n\n // Re-register any providers previously registered by external plugins via register()\n for (MagicProvider provider : externalProviders) {\n registerAndUpdate(provider);\n }\n\n // Don't allow overriding Magic requirements\n checkMagicRequirements();\n }", "protected void delayedInit() throws ServletException {\n\t\tThread currentThread = Thread.currentThread();\n\t\tClassLoader tccl = currentThread.getContextClassLoader();\n\t\tcurrentThread.setContextClassLoader(WebSocketServlet.class.getClassLoader());\n\t\ttry {\n\t\t\tsuper.init();\n\t\t} finally {\n\t\t\tcurrentThread.setContextClassLoader(tccl);\n\t\t}\n\t}", "private synchronized void loadProcessors() {\n if (loaded)\n return;\n\n // Get the processor service declarations\n Set<ServiceDeclaration> processorDeclarations; \n try {\n processorDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(URLArtifactProcessor.class);\n } catch (IOException e) {\n \tIllegalStateException ie = new IllegalStateException(e);\n \terror(\"IllegalStateException\", staxProcessor, ie);\n throw ie;\n }\n \n for (ServiceDeclaration processorDeclaration: processorDeclarations) {\n Map<String, String> attributes = processorDeclaration.getAttributes();\n // Load a URL artifact processor\n String artifactType = attributes.get(\"type\");\n String modelTypeName = attributes.get(\"model\");\n \n // Create a processor wrapper and register it\n URLArtifactProcessor processor = new LazyURLArtifactProcessor(artifactType, modelTypeName, \n \t\tprocessorDeclaration, extensionPoints, staxProcessor, monitor);\n addArtifactProcessor(processor);\n }\n \n loaded = true;\n }", "@JmeThread\n private void onAfterCreateJmeContext() {\n pluginSystem.getPlugins().stream()\n .filter(EditorPlugin.class::isInstance)\n .map(EditorPlugin.class::cast)\n .forEach(editorPlugin -> {\n\n editorPlugin.onAfterCreateJmeContext(pluginSystem);\n\n var container = editorPlugin.getContainer();\n var classLoader = container.getClassLoader();\n var assetManager = EditorUtil.getAssetManager();\n assetManager.addClassLoader(classLoader);\n });\n }", "protected void initSpringResourceLoader(VelocityEngine velocityEngine,\n\t\t\tString resourceLoaderPath, ResourceLoader resourceLoader) {\n\t\tvelocityEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, SpringResourceLoader.NAME);\n\t\tvelocityEngine.setProperty(SpringResourceLoader.SPRING_RESOURCE_LOADER_CLASS,\n\t\t\t\tSpringResourceLoader.class.getName());\n\t\t// 缓存vm\n\t\tvelocityEngine.setProperty(SpringResourceLoader.SPRING_RESOURCE_LOADER_CACHE, \"false\");\n\t\tvelocityEngine.setApplicationAttribute(SpringResourceLoader.SPRING_RESOURCE_LOADER,\n\t\t\t\tresourceLoader);\n\t\tvelocityEngine.setApplicationAttribute(SpringResourceLoader.SPRING_RESOURCE_LOADER_PATH,\n\t\t\t\tresourceLoaderPath);\n\t}", "@Override\n public void setLoadOnStartup(int los) {\n }", "public void configureContextInitializationComponents(AppConfiguration appConfig,\n\t SpringBeansXMLBuilder builder);", "@Override\n protected void pluginInitialize() {\n // init();\n }", "@Override\n public void onStartup(ServletContext container) {\n AnnotationConfigWebApplicationContext rootContext =\n new AnnotationConfigWebApplicationContext();\n rootContext.register(ApplicationConfig.class);\n rootContext.setConfigLocation(\"example.spring\");\n\n // Manage the lifecycle of the root application context\n container.addListener(new ContextLoaderListener(rootContext));\n container.addListener(new RequestContextListener());\n\n // The following line is required to avoid having jersey-spring3 registering it's own Spring root context.\n container.setInitParameter(\"contextConfigLocation\", \"\");\n\n }", "@Override\n public void init() {\n String[] args = this.getParameters().getRaw().toArray(new String[0]);\n // We run Spring context initialization at the time of JavaFX initialization:\n springContext = SpringApplication.run(MainApp.class, args);\n }", "public void initializeAfterLoad(URL location) {\n \t\tthis.location = location;\n \t\tif (mapper == null)\n \t\t\tmapper = new Mapper();\n \t\tmapper.initialize(Activator.getContext(), mappingRules);\n \t}", "public void loadPlugins()\n throws Exception\n {\n SecurityClassLoader securityClassLoader = new SecurityClassLoader(Plugin.class.getClassLoader(),\n ImmutableList.of(\"ideal.sylph.\", \"com.github.harbby.gadtry.\")); //raed only sylph-api deps\n this.loader = ModuleLoader.<Plugin>newScanner()\n .setPlugin(Plugin.class)\n .setScanDir(pluginDir)\n .setLoader(OperatorManager::serviceLoad)\n .setClassLoaderFactory(urls -> new VolatileClassLoader(urls, securityClassLoader)\n {\n @Override\n protected void finalize()\n throws Throwable\n {\n super.finalize();\n logger.warn(\"Jvm gc free ClassLoader: {}\", Arrays.toString(urls));\n }\n })\n .setLoadHandler(module -> {\n logger.info(\"loading module {} find {} Operator\", module.getName(), module.getPlugins().size());\n ModuleInfo moduleInfo = new ModuleInfo(module, new ArrayList<>());\n analyzeModulePlugins(moduleInfo);\n ModuleInfo old = userExtPlugins.put(module.getName(), moduleInfo);\n if (old != null) {\n Try.of(old::close).onFailure(e -> logger.warn(\"free old module failed\", e)).doTry();\n }\n }).load();\n }", "public void afterInit(){\n System.out.println(\"## afterInit() - After Init - called by Bean Post Processor\");\n }", "@Override\n\tpublic void init(BundleContext context, DependencyManager manager)\n\t\t\tthrows Exception {\n\t\t\n\t}", "private void mapContext(ManagedPlugin managedPlugin) {\n RequestMappingHandlerMapping mapper = new RequestMappingHandlerMapping();\n mapper.setApplicationContext(managedPlugin.getPluginContext());\n mapper.afterPropertiesSet();\n this.handlerMappings.add(mapper);\n this.pluginMappings.put(managedPlugin.getPlugin().getDescriptor().getId(), mapper);\n }", "public void loadPluginFileBean(){\n\t\tthis.broadcastManager.registerBroadcastReceiver(new String[]{ACTION_PLUGIN_FILE_FINISHED}, this);\n\t\tfor(PluginFileBean pluginFileBean:this.pluginFileBeanList){\n\t\t\tif(pluginFileBean!=null){\n\t\t\t\tpluginFileBean.setBroadcastManager(this.broadcastManager);\n\t\t\t\tpluginFileBean.setJarClassLoader(this.jarClassLoader);\n\t\t\t\tif(pluginFileBean.getPluginDownloader()==null){\n\t\t\t\t\tpluginFileBean.setPluginDownloader(defaultPluginDownloader);\n\t\t\t\t}\n\t\t\t\tpluginFileBean.loadPluginBean();\n\t\t\t}\n\t\t}\n\t}", "public void postInitAfterConfiguration() {\n\t\t// each configuration are only supporting one log handler\n\t\tcrawlerRecordHandler = new CrawlerRecord(this);\n\t\t// TODO: other configurations needs to be added after all configurations are set\n\t}", "private void initClassloaders() {\n\t\tthis.commonloader = createClassloader(\"common\",null);\n\t\tthis.sharedloader = createClassloader(\"shared\", commonloader);\n\t\tthis.catalinaloader = createClassloader(\"server\", commonloader);\n\t}", "@Override\n\tpublic void onStartup(ServletContext servletContext)\n\t\t\tthrows ServletException {\n\t\tsuper.onStartup(servletContext);//master line where whole framework works\n\t\t//configure global objects/tasks if required\n\t}", "public void contextInitialized(ServletContextEvent event) {\n\t\tthis.contextLoader = createContextLoader();\n\t\tif (this.contextLoader == null) {\n\t\t\tthis.contextLoader = this;\n\t\t}\n\t\tthis.contextLoader.initWebApplicationContext(event.getServletContext());\n\t\tUserBuffer.getInstance();\n\t}", "public void setClassLoader(ComponentInitializer extClassLoader){\n\t\t\n\t\tthis.extClassLoader = extClassLoader;\n\t}", "@PostConstruct\r\n\tprivate void init()\r\n\t{\r\n\t\tSet<Method> freeMarkerMethods = classScannerService.getMethodsAnnotatedWith(FreeMarkerMethod.class);\r\n\t\t\r\n\t\tif(freeMarkerMethods == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSet<Class<?>> fmarkerClasses = new HashSet<Class<?>>();\r\n\t\t\r\n\t\tfor(Method method : freeMarkerMethods)\r\n\t\t{\r\n\t\t\tif(fmarkerClasses.contains(method.getDeclaringClass()))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\r\n\t\t\tfreeMarkerEngine.loadClass(method.getDeclaringClass());\r\n\t\t}\r\n\t}", "public void environmentStart(EnvironmentClassLoader loader)\n {\n }", "public void init() {\n\t\tregisterBeanDefinitionParser(\"component-scan\", new AutoComponentScanBeanDefinitionParser());\n\t}", "public Class<?> initializeClassLoader(Class<?> clazz, ClassLoaderSystem system, ClassFilter beforeFilter, ClassFilter afterFilter, ClassLoaderPolicy policy)\n {\n ParentPolicy parentPolicy = new ParentPolicy(beforeFilter, afterFilter);\n return initializeClassLoader(clazz, system, parentPolicy, policy);\n }", "@Initializer(after = InitMilestone.EXTENSIONS_AUGMENTED)\r\n public static void onLoaded() {\n\r\n DescriptorImpl descriptor = (DescriptorImpl) Jenkins.get().getDescriptor(SurroundSCMSource.class);\r\n if (descriptor == null) {\r\n logger.severe(\"Jenkins has no registered Descriptor for SurroundSCMSource.\");\r\n }\r\n }", "void bootPlugins() {\n\t\tList<List<String>>vals = (List<List<String>>)properties.get(\"PlugInConnectors\");\n\t\tif (vals != null && vals.size() > 0) {\n\t\t\tString name, path;\n\t\t\tIPluginConnector pc;\n\t\t\tList<String>cntr;\n\t\t\tIterator<List<String>>itr = vals.iterator();\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tcntr = itr.next();\n\t\t\t\tname = cntr.get(0);\n\t\t\t\tpath = cntr.get(1);\n\t\t\t\ttry {\n\t\t\t\t\tpc = (IPluginConnector)Class.forName(path).newInstance();\n\t\t\t\t\tpc.init(this, name);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogError(e.getMessage(), e);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void init() {\n eachModule(ModuleHandler.INSTANCE::depends);\n \n // init, only enabled modules are run\n eachEnabledModule(ModuleHandler.INSTANCE::init);\n \n // listen for server world loading events\n // LoadWorldCallback.EVENT.register(server -> eachEnabledModule(m ->\n // m.loadWorld(server)));\n }", "protected void init() { \n ServletContext servletContext = getServletContext();\n applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\n String names[] = applicationContext.getBeanDefinitionNames();\n\n for (String name : names) {\n System.out.println(\"name:\" + name);\n }\n }", "public void activate(Bundle bundle) {\n if (! m_enabled && Extender.getIPOJOBundleContext().getBundle().getBundleId() == bundle.getBundleId()) {\n // Fast return if the configuration tracking is disabled, or if we are iPOJO\n return;\n }\n\n // It's not required to process bundle not importing the configuration package.\n final String imports = bundle.getHeaders().get(Constants.IMPORT_PACKAGE);\n if (imports == null || ! imports.contains(\"org.apache.felix.ipojo.configuration\")) {\n // TODO Check dynamic imports to verify if the package is not imported lazily.\n return;\n }\n\n BundleWiring wiring = bundle.adapt(BundleWiring.class);\n if (wiring == null) {\n // Invalid state.\n m_logger.log(Log.ERROR, \"The bundle \" + bundle.getBundleId() + \" (\" + bundle.getSymbolicName() + \") \" +\n \"cannot be adapted to BundleWiring, state: \" + bundle.getState());\n return;\n }\n\n // Only lookup for local classes, parent classes will be analyzed on demand.\n Collection<String> resources = wiring.listResources(\"/\", \"*.class\",\n BundleWiring.FINDENTRIES_RECURSE + BundleWiring.LISTRESOURCES_LOCAL);\n if (resources == null) {\n m_logger.log(Log.ERROR, \"The bundle \" + bundle.getBundleId() + \" (\" + bundle.getSymbolicName() + \") \" +\n \" does not have any classes to be analyzed\");\n return;\n }\n m_logger.log(Log.DEBUG, resources.size() + \" classes found\");\n handleResources(bundle, resources, wiring.getClassLoader());\n }", "@FxThread\n private void onFinishLoading() {\n pluginSystem.getPlugins().stream()\n .filter(EditorPlugin.class::isInstance)\n .map(EditorPlugin.class::cast)\n .forEach(editorPlugin -> editorPlugin.onFinishLoading(pluginSystem));\n }", "@FxThread\n private void onAfterCreateJavaFxContext() {\n pluginSystem.getPlugins().stream()\n .filter(EditorPlugin.class::isInstance)\n .map(EditorPlugin.class::cast)\n .forEach(editorPlugin -> editorPlugin.onAfterCreateJavaFxContext(pluginSystem));\n }", "@Override\n public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {\n return bean;\n }", "public abstract void init(ResourceLoader loader);", "public void beforeInit(){\n System.out.println(\"## beforeInit() - Before Init - Called by Bean Post Processor\");\n }", "@Override\n public void contextInitialized(ServletContextEvent servletContextEvent) {\n super.contextInitialized(servletContextEvent);\n\n try {\n ServletContext servletContext = servletContextEvent.getServletContext();\n RemotingServlet remotingServlet = new RemotingServlet();\n try {\n remotingServlet.init(new CubaServletConfig(\"remoting\", servletContext));\n } catch (ServletException e) {\n throw new RuntimeException(\"An error occurred while initializing remoting servlet\", e);\n }\n ServletRegistration.Dynamic remotingReg = servletContext.addServlet(\"remoting\", remotingServlet);\n remotingReg.addMapping(\"/remoting/*\");\n remotingReg.setLoadOnStartup(0);\n\n FilterRegistration.Dynamic filterReg = servletContext.addFilter(\"CoreSingleWarHttpFilter\", new SetClassLoaderFilter());\n filterReg.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, \"/remoting/*\");\n\n } catch (RuntimeException e) {\n log.error(\"Error initializing core servlets\", e);\n\n try {\n ApplicationContext springContext = AppContext.getApplicationContext();\n if (springContext != null) {\n ((ConfigurableApplicationContext) springContext).close();\n }\n } catch (Exception e1) {\n log.debug(\"Error closing application context: {}\", e1.toString());\n }\n\n throw e;\n }\n }", "public synchronized void waitUntilApplicationContextIsReady() {\n // if we are in the same thread, waiting probably doesn't make sense, so we have to check\n // this.\n if (Thread.currentThread().getId() != this.m_creatorThreadId) {\n // access from another thread -> wait\n while (!this.m_applicationContextIsReady) {\n try {\n DefaultDaoRegistry.s_logger\n .debug(\"Waiting for Spring context to be fully initialized.\");\n this.wait();\n } catch (final InterruptedException e) {\n DefaultDaoRegistry.s_logger\n .debug(\"Interrupted: Application context might be ready now.\");\n }\n }\n }\n // context might be ready but caller got the contextRefreshed-event earlier than we did.\n if (!this.m_applicationContextIsReady) {\n if (this.m_applicationContext instanceof RefreshableModuleApplicationContext) {\n final RefreshableModuleApplicationContext context = (RefreshableModuleApplicationContext) this.m_applicationContext;\n this.m_applicationContextIsReady = context.isRefreshed();\n }\n }\n if (!this.m_applicationContextIsReady) {\n CoreNotificationHelper\n .notifyMisconfiguration(\"Trying to get DAOs before Spring context is \"\n + \"fully initialized. Some DAOs might not be found. \"\n + \"Implement ch.vd.seven.semis.dao.el4j.core.context.ModuleApplicationListener to get notified as soon \"\n + \"Spring context is fully initialized\");\n }\n }", "@ServiceInit\n public void init() {\n }", "@Override\n\tprotected void initHook() {\n\t}", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "@Override\n public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {\n return bean;\n }", "public void merge(BundleClassLoadersContext other) {\n\n extensionDirs = ImmutableList.copyOf(Stream.concat(extensionDirs.stream(),\n other.extensionDirs.stream().filter((x) -> !extensionDirs.contains(x)))\n .collect(Collectors.toList()));\n bundles = ImmutableMap.copyOf(\n Stream.of(bundles, other.bundles).map(Map::entrySet).flatMap(Collection::stream)\n .collect(Collectors.toMap(Entry::getKey, Entry::getValue, (s, a) -> s)));\n }", "@PostConstruct\n public void init() {\n }", "public void loadAllPlugins(final String extPointId);", "@Override\n public void onApplicationEvent(ContextRefreshedEvent event) {\n if(event.getApplicationContext().getDisplayName().equals(\"Root WebApplicationContext\")){\n System.out.println(\"避免spring-servlet.xml跟appicationContext.xml两次加载\");\n }\n if(event.getApplicationContext().getParent()==null){\n System.out.println(\"执行context上下文初始化\");\n ApplicationContextUtil.instance.init(event.getApplicationContext());\n }\n }", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tinit();\n\t}", "protected Spring() {}", "@Override\n\tpublic void init() {\n\t\tregisterBeanDefinitionParser(\"processorEventMulticaster\",\n\t\t\t\tnew ProcessorEventMulticasterDefinitionParser());\n\t\tregisterBeanDefinitionParser(\"processorEventListener\",\n\t\t\t\tnew ProcessorEventListenerDefinitionParser());\n\t}", "@Override\n\tpublic void earlyStartup() {\n\t}", "@Override\n protected void injectDependencies(Context context) {\n }", "@Override\n protected final void initializeSpecific() {\n initializeSpringSpecific();\n\n // Once the subclasses have had their opportunity, compute configurations belonging to SpringTemplateEngine\n super.initializeSpecific();\n\n final MessageSource messageSource =\n this.templateEngineMessageSource == null ? this.messageSource : this.templateEngineMessageSource;\n\n final IMessageResolver messageResolver;\n if (messageSource != null) {\n final SpringMessageResolver springMessageResolver = new SpringMessageResolver();\n springMessageResolver.setMessageSource(messageSource);\n messageResolver = springMessageResolver;\n } else {\n messageResolver = new StandardMessageResolver();\n }\n\n super.setMessageResolver(messageResolver);\n\n }", "private void configurePhotoLoaders() {\n String themePhotosUrl = null;\n String myPhotosUrl = null;\n String friendPhotosUrl = null;\n\n if (mTheme != null) {\n themePhotosUrl = String.format(Endpoints.THEME_PHOTO_LIST, mTheme.id);\n\n if (!isAuthenticating() && mPhotoUser != null) {\n myPhotosUrl = String.format(Endpoints.USER_THEME_PHOTO_LIST, Endpoints.ME_ID,\n mTheme.id);\n\n friendPhotosUrl = String.format(Endpoints.FRIENDS_PHOTO_LIST, Endpoints.ME_ID,\n mTheme.id);\n }\n }\n\n mThemePhotosLoader = restartLoader(mLoaderMgr, THEME_PHOTOS_ID, mThemePhotosLoader,\n new PhotoCallbacks(THEME_PHOTOS_ID, mThemePhotos), themePhotosUrl);\n mMyPhotosLoader = restartLoader(mLoaderMgr, MY_PHOTOS_ID, mMyPhotosLoader,\n new PhotoCallbacks(MY_PHOTOS_ID, mMyPhotos), myPhotosUrl);\n mFriendPhotosLoader = restartLoader(mLoaderMgr, FRIEND_PHOTOS_ID, mFriendPhotosLoader,\n new PhotoCallbacks(FRIEND_PHOTOS_ID, mFriendPhotos), friendPhotosUrl);\n }", "public ContainerLoader getLoader();", "private SpringApplicationContext() {}", "@Before\n public void init() throws IOException {\n ApplicationContext context = new ClassPathXmlApplicationContext(\"config/applicationContext.xml\");\n //this.test();\n bookMapper = context.getBean(BookMapper.class);\n }", "private void initializeHandler() {\n if (handler == null) {\n handler = AwsHelpers.initSpringBootHandler(Application.class);\n }\n }", "@PostConstruct\n\tpublic void init() {\n\t}", "@PostConstruct\n\tpublic void init() {\n\t}", "public void onAfterLoad()\n\t{\n\t\tJLog.info(\" --- POSTINIT --- \");\n\n\t}", "@Override\n\tpublic void loadService() {\n\t\t\n\t}", "public void loadWorldGuardSupport()\n\t{\n\t\tif (worldGuardListener == null)\n\t\t{\n\t\t\tPlugin wg = getServer().getPluginManager().getPlugin(\"WorldGuard\");\n\t\t\tPlugin wgFlag = getServer().getPluginManager().getPlugin(\"WGCustomFlags\");\n\t\t\tif (wg != null)\n\t\t\t{\n\t\t\t\tif (wgFlag != null)\n\t\t\t\t{\n\t\t\t\t\tlogger().info(\"WorldGuard support loaded\");\n\t\t\t\t\tworldGuardListener = new WorldGuardSupport(this);\n\t\t\t\t\tsupportHandler.register(worldGuardListener);\n\t\t\t\t\tgetServer().getPluginManager().registerEvents(this.worldGuardListener, this);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlogger().info(\"WGCustomFlags plugin not installed! Skipping WorldGuard support!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlogger().info(\"WorldGuard plugin not installed! Skipping WorldGuard support!\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void initialize(ConfigurableApplicationContext applicationContext) {\n\n System.out.println(\"========ApplicationContextInitializer===================\");\n\n ConfigurableEnvironment environment = applicationContext.getEnvironment();\n\n\n MutablePropertySources propertySources = environment.getPropertySources();\n\n // 模拟远程拉配置信息\n Map<String, Object> config = ConfigServer.getRemoteConfig();\n\n MapPropertySource propertySource = new MapPropertySource(\"test-config\", config);\n propertySources.addFirst(propertySource);\n }", "@Bean\r\n\tpublic ServletContextInitializer initializer() {\r\n\t return new ServletContextInitializer() {\r\n\r\n\t\t\tpublic void onStartup(ServletContext servletContext) throws ServletException {\r\n\t\t\t\tservletContext.setInitParameter(\"log4jConfigLocation\", \"classes/log4j.properties\");\r\n\t\t\t\tservletContext.addListener(\"org.springframework.web.util.Log4jConfigListener\");\r\n\t\t\t\tservletContext.addListener(\"org.springframework.web.util.IntrospectorCleanupListener\");\r\n\t\t\t}\r\n\t \t\r\n\t };\r\n\t}", "protected void forceLazyInitialization() {\n getExchangeConverter();\n getInjector();\n getLanguageResolver();\n getTypeConverter();\n }", "@PostConstruct\r\n\tvoid init() {\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n mPluginMgr = PluginManager.getInstance(this);\n mPluginMgr.setLoaderListener(getPluginPackageName(), this);\n super.onCreate(savedInstanceState);\n mSavedInstanceState = savedInstanceState;\n load();\n\n }", "@Override\n\tpublic void onLoad() {\n\t\tdescription = this.getDescription();\n\t\tpluginConfiguration = this.getConfig();\n\t\tLogHelper.initLogger(\"BukkitWebby\", \"Minecraft\");\n\t}", "public interface BeanProcessor {\n\n\n void process(Object bean, Class<?> clazz) throws Exception;\n\n //before all beans loaded.\n void beforeInit(Object bean, Class<?> clazz) throws Exception;\n\n //after all beans loaded.\n void afterInit(Object bean, Class<?> clazz) throws Exception;\n}", "@Override\n public synchronized void load(Map<String, Object> parameters) {\n // fill properly the \"forGroups\" and \"forProjects\" fields\n processTargetGroupsAndProjects();\n\n if (!hasPlugin()) {\n LOGGER.log(Level.SEVERE, \"Configured plugin \\\"{0}\\\" has not been loaded into JVM (missing file?). \"\n + \"This can cause the authorization to fail always.\",\n getName());\n setFailed();\n LOGGER.log(Level.INFO, \"[{0}] Plugin \\\"{1}\\\" {2} and is {3}.\",\n new Object[]{\n getFlag().toString().toUpperCase(),\n getName(),\n hasPlugin() ? \"found\" : \"not found\",\n isWorking() ? \"working\" : \"failed\"});\n return;\n }\n\n setCurrentSetup(new TreeMap<>());\n getCurrentSetup().putAll(parameters);\n getCurrentSetup().putAll(getSetup());\n\n try {\n plugin.load(getCurrentSetup());\n setWorking();\n } catch (Throwable ex) {\n LOGGER.log(Level.SEVERE, \"Plugin \\\"\" + getName() + \"\\\" has failed while loading with exception:\", ex);\n setFailed();\n }\n\n LOGGER.log(Level.INFO, \"[{0}] Plugin \\\"{1}\\\" {2} and is {3}.\",\n new Object[]{\n getFlag().toString().toUpperCase(),\n getName(),\n hasPlugin() ? \"found\" : \"not found\",\n isWorking() ? \"working\" : \"failed\"});\n }", "public void startPlugin() {\n\t\t// add a new ResourceChangeListener\n\t\tCheops.getInstance().addResourceChangeListener();\n\t}", "ProviderManagerExt()\n {\n load();\n }", "@EventListener(ContextRefreshedEvent.class)\n public void contextRefreshEvent() {\n\n MapConfigurationRegistrySingleton.getSingleton()\n .merge(mapConfigurationRegistry);\n }", "@Override\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tloadRules2();\r\n\t}", "@Subscribe\n public void load(FMLInitializationEvent event) {\n Log.printFinest(\"container Load event\");\n\n // core checks\n if (!CoreTransformer.created) {\n printDebugDataAndCrash(CoreTransformer.class.getSimpleName() + \" is not being created!\");\n }\n\n if (!CoreTransformer.lightningHookApplied) {\n printDebugDataAndCrash(\"Unable to install a lightning hook!\");\n }\n\n if (!CoreTransformer.gameDataHookApplied) {\n printDebugDataAndCrash(\"Unable to install gamedata hooks!\");\n }\n\n if (MonnefCorePlugin.debugEnv && MonnefCorePlugin.jaffasEnv) {\n try {\n Log.printInfo(\"calling item dumping procedure\");\n ObfuscationHelper.dumpUsedItemsToConfig();\n Log.printInfo(\"item dumping procedure finished\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n FMLCommonHandler.instance().bus().register(new CoreTickHandler());\n\n MinecraftForge.EVENT_BUS.register(new WolfFoodRegistry());\n\n MonnefCorePlugin.initialized = true;\n MonnefCorePlugin.Log.printInfo(\"Final checks passed.\");\n }", "private void load() {\n if (loaded) {\n return;\n }\n loaded = true;\n\n if(useDefault){\n ConfigFileLoader.setSource(\n new MhttpdBaseConfigurationSource(\n Bootstrap.getMhttpdBaseFile(), \"server-embed.xml\"));\n }else {\n ConfigFileLoader.setSource(\n new MhttpdBaseConfigurationSource(\n Bootstrap.getMhttpdBaseFile(), getConfigFile()));\n }\n Digester digester = createStartDigester();\n try (ConfigurationSource.Resource resource = ConfigFileLoader.getSource().getServerXml()) {\n InputStream inputStream = resource.getInputStream();\n InputSource inputSource = new InputSource(resource.getUri().toURL().toString());\n inputSource.setByteStream(inputStream);\n digester.push(this);\n digester.parse(inputSource);\n } catch (Exception e) {\n return;\n }\n\n }" ]
[ "0.6901187", "0.67489696", "0.646005", "0.64030486", "0.62463456", "0.59355336", "0.5933617", "0.58487356", "0.57194144", "0.5682246", "0.5647921", "0.5584947", "0.55719036", "0.5562511", "0.54131246", "0.54032564", "0.5384129", "0.5383455", "0.5378234", "0.5342479", "0.533634", "0.5322662", "0.5312778", "0.52692056", "0.52634007", "0.52555054", "0.5254318", "0.5249296", "0.5223091", "0.5192284", "0.5179973", "0.51647776", "0.51641655", "0.5152806", "0.5141095", "0.5118307", "0.51133734", "0.5104618", "0.5089973", "0.5084982", "0.50832313", "0.5080791", "0.5062135", "0.5056345", "0.5052832", "0.50518554", "0.50505", "0.5038298", "0.5015158", "0.5005899", "0.49953955", "0.499449", "0.49690372", "0.49545", "0.49469185", "0.49466154", "0.49450228", "0.49377498", "0.49215695", "0.49184513", "0.491268", "0.49052122", "0.4905105", "0.4903533", "0.49031913", "0.49025598", "0.48986092", "0.4890125", "0.48883557", "0.48809528", "0.48757556", "0.48657653", "0.48601213", "0.48588154", "0.4854566", "0.48543987", "0.4847906", "0.4845298", "0.484432", "0.48409796", "0.48373112", "0.48350215", "0.48350215", "0.48311082", "0.48258635", "0.48222855", "0.4815892", "0.48143458", "0.48105243", "0.48100984", "0.4808041", "0.48073125", "0.48071402", "0.48069185", "0.48047897", "0.48032114", "0.47886908", "0.4785593", "0.47852853", "0.47841305" ]
0.6700025
2
Obtain the SpringLoader for plugin use
SpringLoader getSpringLoader();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setSpringLoader(final SpringLoader springLoader);", "@Override\n public Loader getClassLoader() {\n\treturn this.classLoader;\n }", "protected WjrConfigLoader getConfigLoader() {\r\n\t\treturn new WjrConfigLoader();\r\n\t}", "public ContainerLoader getLoader();", "public ClassLoader getClassLoader () { return _classLoader; }", "protected ClassLoader getClassLoader()\n {\n return m_classLoader;\n }", "private ClassLoader getClassLoader() {\r\n return this.getClass().getClassLoader();\r\n }", "public String getSharedLoader(IPath baseDir);", "EnvironmentLoader getEnvironmentLoader();", "public ClassLoader getBootClassLoader ()\n {\n return bootLoader;\n }", "public IClassLoader getClassLoader();", "private static ClassLoader getClassLoader() {\n return LoggerProviders.class.getClassLoader();\n }", "public ClassLoader getClassLoader() {\r\n return _classLoader;\r\n }", "public interface BootLoaderManager {\n\n /**\n * 注入上下文\n * @param atlasWrapperApplicationContext\n */\n BootLoaderManager attachContext(AtlasWrapperApplicationContext atlasWrapperApplicationContext);\n\n /**\n * 获取上下文环境\n * @return\n */\n AtlasWrapperApplicationContext getContext();\n\n /**\n * 启动加载\n */\n void load();\n}", "public ClassLoader getClassLoader() {\n return new BundleClassLoader(bundle);\n }", "public ScriptingClassLoader getClassLoader()\n {\n return vm.getClassLoader();\n }", "public ClassLoader getClassLoader() {\n return classLoader;\n }", "protected WjrStoreLoader getStoreLoader() {\r\n\t\treturn WjrJUnitLogicFactory.getStoreLoader();\r\n\t}", "public Loader getLoader() {\n\t\treturn loader;\n\t}", "public synchronized PluginClassLoader getPluginClassloader( Plugin plugin )\n {\n return classloaders.get( plugin );\n }", "private PluginLoader<Object> createPluginLoader() {\n return PluginLoader.forType(Object.class)\n .ifVersionGreaterOrEqualTo(JAVA_9).load(pluginTypeBetweenJava9AndJava13.getName())\n .ifVersionGreaterOrEqualTo(JAVA_14).load(pluginTypeAfterJava13.getName())\n .fallback(newInstance(pluginTypeBeforeJava9));\n }", "public ClassLoader getClassLoader() {\n\t\treturn classLoader;\n\t}", "public ClassLoader getClassLoader() {\n\t\treturn classLoader;\n\t}", "public ClassLoader getCoreLoader() {\n return coreLoader;\n }", "public static ClassLoader getCurrentClassLoader() {\n ClassLoader classLoader = Thread.currentThread()\n .getContextClassLoader();\n if (classLoader == null) {\n classLoader = ConsumerTest.class.getClassLoader();\n }\n return classLoader;\n }", "public ClassLoader getClassLoader() {\n return null;\n }", "public static XML.ObjectLoader getLoader() {\n return new Loader();\n }", "public ClassLoader getClassLoader ()\n {\n return Thread.currentThread ().getContextClassLoader ();\n }", "public String getCustomLoaderName();", "@Override\n public ClassLoader getClassLoader() {\n return null;\n }", "public Object lookup()\r\n {\n if (applicationInstance != null)\r\n return applicationInstance;\r\n\r\n ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(flex.messaging.FlexContext.getServletConfig().getServletContext());\r\n if (appContext == null)\r\n {\r\n if (Log.isError())\r\n Log.getLogger(\"Configuration\").error(\r\n \"SpringFactory - not able to look up the WebApplicationContext for Spring. Check your web.xml to ensure Spring is installed properly in this web application.\");\r\n return null;\r\n }\r\n String beanName = getSource();\r\n\r\n try\r\n {\r\n Object inst;\r\n if (appContext.isSingleton(beanName))\r\n {\r\n if (Log.isDebug())\r\n Log.getLogger(\"Configuration\").debug(\r\n \"SpringFactory creating singleton component with spring id: \" + beanName + \" for destination: \" + getId());\r\n // We have a singleton instance but no one has initialized it yet.\r\n // We need to sync to prevent two threads from potentially initializing\r\n // the instance at the same time and to ensure we only return\r\n // initialized instances.\r\n synchronized (this)\r\n {\r\n // Someone else got to this before us\r\n if (applicationInstance != null)\r\n return applicationInstance;\r\n inst = appContext.getBean(beanName);\r\n if (inst instanceof FlexConfigurable)\r\n ((FlexConfigurable) inst).initialize(getId(), getProperties());\r\n applicationInstance = inst;\r\n }\r\n }\r\n else\r\n {\r\n if (Log.isDebug())\r\n Log.getLogger(\"Configuration\").debug(\r\n \"SpringFactory creating non-singleton component with spring id: \" + beanName + \" for destination: \" + getId());\r\n inst = appContext.getBean(beanName);\r\n if (inst instanceof FlexConfigurable)\r\n ((FlexConfigurable) inst).initialize(getId(), getProperties());\r\n }\r\n return inst;\r\n }\r\n catch (NoSuchBeanDefinitionException nexc)\r\n {\r\n ServiceException e = new ServiceException();\r\n String msg = \"Spring service named '\" + beanName + \"' does not exist.\";\r\n e.setMessage(msg);\r\n e.setRootCause(nexc);\r\n e.setDetails(msg);\r\n e.setCode(\"Server.Processing\");\r\n throw e;\r\n }\r\n catch (BeansException bexc)\r\n {\r\n ServiceException e = new ServiceException();\r\n String msg = \"Unable to create Spring service named '\" + beanName + \"' \";\r\n e.setMessage(msg);\r\n e.setRootCause(bexc);\r\n e.setDetails(msg);\r\n e.setCode(\"Server.Processing\");\r\n throw e;\r\n }\r\n }", "protected ClassLoader getClassLoader() throws PortletException {\n return getClass().getClassLoader();\n }", "public static AppConfigLoader getInstance() {\r\n\t\tif (_myInstance == null) {\r\n\t\t\t_myInstance = new AppConfigLoader();\r\n\t\t}\r\n\t\treturn _myInstance;\r\n\t}", "public ClassLoader getClassLoader() {\n\t\treturn ClassLoader.getSystemClassLoader();\n\t}", "protected void initSpringResourceLoader(VelocityEngine velocityEngine,\n\t\t\tString resourceLoaderPath, ResourceLoader resourceLoader) {\n\t\tvelocityEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, SpringResourceLoader.NAME);\n\t\tvelocityEngine.setProperty(SpringResourceLoader.SPRING_RESOURCE_LOADER_CLASS,\n\t\t\t\tSpringResourceLoader.class.getName());\n\t\t// 缓存vm\n\t\tvelocityEngine.setProperty(SpringResourceLoader.SPRING_RESOURCE_LOADER_CACHE, \"false\");\n\t\tvelocityEngine.setApplicationAttribute(SpringResourceLoader.SPRING_RESOURCE_LOADER,\n\t\t\t\tresourceLoader);\n\t\tvelocityEngine.setApplicationAttribute(SpringResourceLoader.SPRING_RESOURCE_LOADER_PATH,\n\t\t\t\tresourceLoaderPath);\n\t}", "@Override\r\n\tpublic ResourceLocator getResourceLocator() {\r\n\t\treturn SpringConfigDslEditPlugin.INSTANCE;\r\n\t}", "public void initClassLoader() {\n FileClassLoadingService classLoader = new FileClassLoadingService();\n\n // init from preferences...\n Domain classLoaderDomain = getPreferenceDomain().getSubdomain(\n FileClassLoadingService.class);\n\n Collection details = classLoaderDomain.getPreferences();\n if (details.size() > 0) {\n\n // transform preference to file...\n Transformer transformer = new Transformer() {\n\n public Object transform(Object object) {\n DomainPreference pref = (DomainPreference) object;\n return new File(pref.getKey());\n }\n };\n\n classLoader.setPathFiles(CollectionUtils.collect(details, transformer));\n }\n\n this.modelerClassLoader = classLoader;\n }", "protected void initSpring() {\n\t\tgetComponentInstantiationListeners().add(new SpringComponentInjector(this));\n\t}", "public ClassLoader getClassLoaderFor(ObjectName mbeanName)\n throws InstanceNotFoundException{\n return mbsInterceptor.getClassLoaderFor(cloneObjectName(mbeanName));\n }", "ClassLoader getClassLoader() throws GeDARuntimeException;", "@Deprecated\n\tpublic ContextLoader getContextLoader() {\n\t\treturn this.contextLoader;\n\t}", "static ClassLoader contextClassLoader() {\n return Thread.currentThread().getContextClassLoader();\n }", "ClassLoader getWebComponentClassLoader(URI componentId);", "public Object GetPlugin()\r\n\t{\r\n\t\tif (_isSingleton)\r\n\t\t{\r\n\t\t\tif (_singletonPlugin == null)\r\n\t\t\t{\r\n\t\t\t\ttry {\r\n\t\t\t\t\t_singletonPlugin = ClassFactory.CreateObject(_pluginType);\r\n\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n if (_configuration != null && !_configuration.equals(\"\"))\r\n {\r\n \tPathUtilities.PushFilename(_filename);\r\n \ttry\r\n \t{\r\n XmlFramework.DeserializeXml(_configuration, _singletonPlugin);\r\n \t}\r\n catch(Exception e)\r\n {\r\n _singletonPlugin = null;\r\n }\r\n \tfinally\r\n \t{\r\n \t\tPathUtilities.PopFilename(_filename);\r\n \t}\r\n }\r\n\t\t\t}\r\n\t\t\treturn _singletonPlugin;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tObject plugin = null;\r\n\t\t\ttry {\r\n\t\t\t\tplugin = ClassFactory.CreateObject(_pluginType);\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n if (_configuration != null && !_configuration.equals(\"\"))\r\n {\r\n \tPathUtilities.PushFilename(_filename);\r\n try\r\n {\r\n XmlFramework.DeserializeXml(_configuration, plugin);\r\n }\r\n catch(Exception e)\r\n {\r\n plugin = null;\r\n }\r\n \tfinally\r\n \t{\r\n \tPathUtilities.PopFilename(_filename);\r\n \t}\r\n }\r\n return plugin;\r\n\t\t}\r\n\t}", "public interface ResourceLoader {\n\n\t/** Pseudo URL prefix for loading from the class path: \"classpath:\" */\n\tpublic static final String CLASSPATH_URL_PREFIX = \"classpath:\";\n\n\t/** URL prefix for loading from the file system: \"file:\" */\n\tpublic static final String FILE_URL_PREFIX = \"file:\";\n\n\tResource getResource(String location);\n\n}", "void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\tObject activityThread = null;\n\t\ttry {\n\t\t\tactivityThread = Reflection.getField(contextImpl, \"mMainThread\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get package container\n\t\tMap mPackages = null;\n\t\ttry {\n\t\t\tmPackages = (Map) Reflection.getField(activityThread, \"mPackages\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//To obtain a weak reference object, the standard reflection\n\t\tWeakReference weakReference = (WeakReference) mPackages.get(pkgName);\n\t\tif (weakReference == null) {\n\t\t\tlog.e(\"loadedApk is null\");\n\t\t} else {\n\t\t\t//Get apk need to be loaded\n\t\t\tObject loadedApk = weakReference.get();\n\t\t\t\n\t\t\tif (loadedApk == null) {\n\t\t\t\tlog.e(\"loadedApk is null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (appClassLoader == null) {\n\t\t\t\t//Access to the original class loader\n\t\t\t\tClassLoader old = null;\n\t\t\t\ttry {\n\t\t\t\t\told = (ClassLoader) Reflection.getField(loadedApk,\n\t\t\t\t\t\t\t\"mClassLoader\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//According to the default class loader instantiate a plug-in class loader\n\t\t\t\tappClassLoader = new SyknetAppClassLoader(old, this);\n\t\t\t}\n\t\t\t//Replace the new plug-in loader loader by default\n\t\t\ttry {\n\t\t\t\tReflection.setField(loadedApk, \"mClassLoader\", appClassLoader);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static ClassLoader getClassLoader() {\n ClassLoader loader = Ruby.class.getClassLoader();\n if (loader == null) {\n loader = ClassLoader.getSystemClassLoader();\n }\n \n return loader;\n }", "public static ClassLoader getClassLoader() {\n ClassLoader loader = Ruby.class.getClassLoader();\n if (loader == null) {\n loader = ClassLoader.getSystemClassLoader();\n }\n \n return loader;\n }", "public static ImageLoader getImageLoader() {\n return ImageLoader.IMAGE;\n }", "private SpringApplicationContextProvider() {\r\n\t}", "public abstract ApplicationLoader.Context context();", "public synchronized ClassLoader getClassLoader() {\n return new BrainClassLoader(buildClassLoader(projectCP), \n buildClassLoader(buildCP), \n buildClassLoader(projectFilesCP), \n buildClassLoader(externalFilesCP), \n buildClassLoader(extraCP));\n }", "@Deprecated\n@ConsumerType\npublic interface DynamicClassLoaderProvider {\n\n /**\n * Return the class loader used for dynamic class loading.\n * The returned class loader should use the provided parent class loader\n * as one of its parent class loaders. This ensures that the returned\n * class loader has access to all dynamically loaded classes that\n * are not part of this class loader.\n * When the class loader is not needed anymore, it is released by\n * calling the {@link #release(ClassLoader)} method.\n * @param parent The parent class loader for this dynamic class loader.\n * @return The class loader.\n * @see #release(ClassLoader)\n */\n ClassLoader getClassLoader(ClassLoader parent);\n\n /**\n * Release the provided class loader.\n * When the class loader is not needed anymore, e.g. when the dynamic class\n * loader is shutdown, it is released with this method.\n * The implementation can use this hook to free any allocated resources etc.\n * @param classLoader The class loader.\n * @see #getClassLoader(ClassLoader)\n * @since 2.0\n */\n void release(ClassLoader classLoader);\n}", "public synchronized JRubyClassLoader getJRubyClassLoader() {\n if (!Ruby.isSecurityRestricted() && jrubyClassLoader == null) {\n jrubyClassLoader = new JRubyClassLoader(config.getLoader());\n }\n \n return jrubyClassLoader;\n }", "public synchronized JRubyClassLoader getJRubyClassLoader() {\n if (!Ruby.isSecurityRestricted() && jrubyClassLoader == null) {\n jrubyClassLoader = new JRubyClassLoader(config.getLoader());\n }\n \n return jrubyClassLoader;\n }", "public URI getClassLoaderId() {\n return classLoaderId;\n }", "@Deprecated\n\tprotected ContextLoader createContextLoader() {\n\t\treturn null;\n\t}", "<T> T getPluginInstance(Class<T> type, String className, ClassLoader classLoader) throws PluginLoadingException;", "public static ClassLoader getDefaultClassLoader() {\n ClassLoader cl = null;\n try {\n cl = Thread.currentThread().getContextClassLoader();\n } finally {\n if (cl == null) {\n cl = ClassUtils.class.getClassLoader();\n }\n if (cl == null) {\n cl = ClassLoader.getSystemClassLoader();\n }\n }\n return cl;\n }", "public WorldLoader getWorldLoader() {\n\t\treturn loader;\n\t}", "protected FXMLLoader getFxmlLoader(String fxmlPage) {\n\t\tFXMLLoader loader = new FXMLLoader();\n\t\tloader.setLocation(getClass().getResource(fxmlPage));\n\t\treturn loader;\n\t}", "public static NativeLibraryLoader getInstance() {\n return instance;\n }", "public interface Plugin {\n /**\n * What is the name of this plugin?\n *\n * The framework will use this name when storing the versions\n * (code version and schema version) in the database, and, if\n * this is the Application Plugin, in the help menu, main frame\n * title bar, and other displays wherever the application name\n * is shown.\n *\n * The column used to store this in the database is 40\n * characters wide.\n *\n * @return the name of this plugin\n */\n String getName();\n\n /**\n * What is the version number of this plugin's code?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the code version of this plugin\n */\n String getVersion();\n\n /**\n * Allow a plugin to provide any plugin-specific application\n * context files.\n *\n * Can return null or an empty list if there are none.\n * The elements of the list are paths to resources inside the\n * plugin's jar, e.g. org/devzendo/myapp/app.xml\n *\n * @return a list of any application contexts that the plugin\n * needs to add to the SpringLoader, or null, or empty list.\n */\n List<String> getApplicationContextResourcePaths();\n\n /**\n * Give the SpringLoader to the plugin, after the\n * application contexts for all plugins have been loaded\n * @param springLoader the SpringLoader\n */\n void setSpringLoader(final SpringLoader springLoader);\n\n /**\n * Obtain the SpringLoader for plugin use\n * @return the SpringLoader\n */\n SpringLoader getSpringLoader();\n\n /**\n * What is the database schema version of this plugin?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the database schema version of this plugin\n */\n String getSchemaVersion();\n\n /**\n * Shut down the plugin, freeing any resources. Called by the\n * framework upon system shutdown.\n */\n void shutdown();\n}", "private URLClassLoader getURLClassLoader(URL jarURL) {\n \t\tClassLoader baseClassLoader = AGLoader.class.getClassLoader();\n \t\tif (baseClassLoader == null)\n \t\t\tbaseClassLoader = ClassLoader.getSystemClassLoader();\n \t\treturn new URLClassLoader(new URL[] { jarURL }, baseClassLoader);\n \t}", "ClassLoaderConfigType createClassLoaderConfigType();", "Plugin getPlugin();", "private HashMap getRuntimeImport() {\n \t\tURL url = InternalBootLoader.class.getProtectionDomain().getCodeSource().getLocation();\n \t\tString path = InternalBootLoader.decode(url.getFile());\n \t\tFile base = new File(path);\n \t\tif (!base.isDirectory())\n \t\t\tbase = base.getParentFile(); // was loaded from jar\n \n \t\t// find the plugin.xml (need to search because in dev mode\n \t\t// we can have some extra directory entries)\n \t\tFile xml = null;\n \t\twhile (base != null) {\n \t\t\txml = new File(base, BOOT_XML);\n \t\t\tif (xml.exists())\n \t\t\t\tbreak;\n \t\t\tbase = base.getParentFile();\n \t\t}\n \t\tif (xml == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.boot\")); //$NON-NLS-1$\n \n \t\ttry {\n \t\t\treturn getImport(xml.toURL(), RUNTIME_PLUGIN_ID);\n \t\t} catch (MalformedURLException e) {\n \t\t\treturn null;\n \t\t}\n \t}", "private ClassLoader getCompileClassLoader() throws MojoExecutionException {\n\t\ttry {\n\t\t\tList<String> runtimeClasspathElements = project.getRuntimeClasspathElements();\n\t\t\tList<String> compileClasspathElements = project.getCompileClasspathElements();\n\t\t\tArrayList<URL> classpathURLs = new ArrayList<>();\n\t\t\tfor (String element : runtimeClasspathElements) {\n\t\t\t\tclasspathURLs.add(new File(element).toURI().toURL());\n\t\t\t}\n\t\t\tfor (String element : compileClasspathElements) {\n\t\t\t\tclasspathURLs.add(new File(element).toURI().toURL());\n\t\t\t}\n\t\t\tURL[] urlArray = classpathURLs.toArray(new URL[classpathURLs.size()]);\n\t\t\treturn new URLClassLoader(urlArray, Thread.currentThread().getContextClassLoader());\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new MojoExecutionException(\"Unable to load project runtime !\", e);\n\t\t}\n\t}", "Plugin getPlugin( );", "private List<ExtensionClassLoader> getClassLoaders() {\n final List<ExtensionClassLoader> classLoaders = new ArrayList<>();\n\n // start with the class loader that loaded ExtensionManager, should be WebAppClassLoader for API WAR\n final ExtensionClassLoader frameworkClassLoader = new ExtensionClassLoader(\"web-api\", new URL[0], this.getClass().getClassLoader());\n classLoaders.add(frameworkClassLoader);\n\n // we want to use the system class loader as the parent of the extension class loaders\n ClassLoader systemClassLoader = FlowPersistenceProvider.class.getClassLoader();\n\n // add a class loader for each extension dir\n final Set<String> extensionDirs = properties.getExtensionsDirs();\n for (final String dir : extensionDirs) {\n if (!StringUtils.isBlank(dir)) {\n final ExtensionClassLoader classLoader = createClassLoader(dir, systemClassLoader);\n if (classLoader != null) {\n classLoaders.add(classLoader);\n }\n }\n }\n\n return classLoaders;\n }", "public void loadPluginsStartup();", "public ConfigurationLoader getConfigurationLoader(ConfigurationNode node) throws MyConfigurationException {\n return new ClientLoader(node);\n }", "private ClassLoader makeClassLoader() throws MojoExecutionException {\n final List<URL> urls = new ArrayList<URL>();\n try {\n for (String cp: project.getRuntimeClasspathElements()) {\n urls.add(new File(cp).toURI().toURL());\n }\n } catch (DependencyResolutionRequiredException e) {\n throw new MojoExecutionException(\"dependencies not resolved\", e);\n } catch (MalformedURLException e) {\n throw new MojoExecutionException(\"invalid classpath element\", e);\n }\n return new URLClassLoader(urls.toArray(new URL[urls.size()]),\n getClass().getClassLoader());\n }", "public interface ContributionLoader {\n\n /**\n * Performs the load operation. This includes resolution of dependent contributions if necessary, and constructing a\n * classloader with access to resources contained in and required by the contribution.\n *\n * @param contribution the contribution to load\n * @return the classloader with access to the contribution and dependent resources\n * @throws ContributionLoadException if an error occurs during load\n * @throws MatchingExportNotFoundException\n * if matching export could not be found\n */\n ClassLoader loadContribution(Contribution contribution)\n throws ContributionLoadException, MatchingExportNotFoundException;\n}", "public static Activator getDefault() {\n\treturn plugin;\n }", "protected final TemplateLoader getTemplateLoader(Configuration config, String themeDir) {\n \n ServletContext context = getServletContext();\n String themeTemplateDir = context.getRealPath(themeDir) + \"/templates\";\n String vitroTemplateDir = context.getRealPath(\"/templates/freemarker\");\n\n try {\n FileTemplateLoader themeFtl = new FileTemplateLoader(new File(themeTemplateDir));\n FileTemplateLoader vitroFtl = new FileTemplateLoader(new File(vitroTemplateDir));\n ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), \"\");\n TemplateLoader[] loaders = new TemplateLoader[] { themeFtl, vitroFtl, ctl };\n MultiTemplateLoader mtl = new MultiTemplateLoader(loaders);\n return mtl;\n } catch (IOException e) {\n log.error(\"Error loading templates\");\n return null;\n }\n \n }", "public static synchronized StylesheetsLoader getInstance() {\r\n\t\t\r\n\t\tif (ref==null)\r\n\t\t\tref = new StylesheetsLoader();\r\n\t\treturn ref;\r\n\t\t\r\n\t}", "public static Activator getDefault() {\r\n return plugin;\r\n }", "protected StoryClassLoader createStoryClassLoader() throws MalformedURLException {\n return new StoryClassLoader(classpathElements());\n }", "public static Activator getDefault() {\n return plugin;\n }", "LoadGenerator createLoadGenerator();", "LoadGenerator createLoadGenerator();", "static BundleContext getBundleContextFromClassLoader(\n\t\t\tClassLoader classLoader) {\n\t\tBundleReference bundleRef = (BundleReference) classLoader;\n\t\tif (bundleRef.getBundle() != null) {\n\t\t return bundleRef.getBundle().getBundleContext();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public abstract void init(ResourceLoader loader);", "protected ClassLoader getRestrictedClassloader(Profile profile) throws MalformedURLException\n {\n StringContainsClassRestrictor recipeLoader = null;\n URL libUrl = servletContext.getResource(\"/WEB-INF/\" + RECIPE_LIBRARY_PATH + \"/\" + profile.getRecipeLibraryFile());\n recipeLoader = new StringContainsClassRestrictor(new URL[] { libUrl }, servletContext.getClassLoader(), RESTRICTED_PACKAGES);\n return recipeLoader;\n }", "public Class<?> initializeClassLoader(Class<?> clazz, ClassLoaderSystem system, ClassFilter beforeFilter, ClassFilter afterFilter, ClassLoaderPolicy policy)\n {\n ParentPolicy parentPolicy = new ParentPolicy(beforeFilter, afterFilter);\n return initializeClassLoader(clazz, system, parentPolicy, policy);\n }", "public static Activator getDefault()\r\n\t{\r\n\t\treturn plugin;\r\n\t}", "public interface BundleLoader {\n /**\n * Returns the bundle referred to by the given path, for the given locale, or null if the\n * bundle could not be loaded.\n */\n ResourceBundle loadBundle (String path, Locale locale);\n }", "protected SchemaTypeLoader getSchemaTypeLoader() {\n return Connector15DCBRoot.SCHEMA_TYPE_LOADER;\n }", "public SpringTemplateLoader(ResourceLoader resourceLoader, String templateLoaderPath)\r\n/* 20: */ {\r\n/* 21:55 */ this.resourceLoader = resourceLoader;\r\n/* 22:56 */ if (!templateLoaderPath.endsWith(\"/\")) {\r\n/* 23:57 */ templateLoaderPath = templateLoaderPath + \"/\";\r\n/* 24: */ }\r\n/* 25:59 */ this.templateLoaderPath = templateLoaderPath;\r\n/* 26:60 */ if (this.logger.isInfoEnabled()) {\r\n/* 27:61 */ this.logger.info(\"SpringTemplateLoader for FreeMarker: using resource loader [\" + this.resourceLoader + \r\n/* 28:62 */ \"] and template loader path [\" + this.templateLoaderPath + \"]\");\r\n/* 29: */ }\r\n/* 30: */ }", "@Bean(name = {\"actorSystemConfiguration\"})\n public InternalActorSystemConfiguration getConfiguration(\n ResourceLoader resourceLoader,\n Environment env) throws IOException\n {\n Resource configResource = resourceLoader.getResource(env.getProperty(\"ea.node.config.location\",\"classpath:ea-test.yaml\"));\n // yaml mapper\n ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory());\n return objectMapper.readValue(configResource.getInputStream(), DefaultConfiguration.class);\n }", "@Override\n\tpublic ResourceLocator getResourceLocator() {\n\t\treturn QFDDPlugin.INSTANCE;\n\t}", "public Object lookup(FactoryInstance inst)\r\n {\r\n SpringFactoryInstance factoryInstance = (SpringFactoryInstance) inst;\r\n return factoryInstance.lookup();\r\n }", "public static Activator getDefault() {\r\n\t\treturn plugin;\r\n\t}", "public static Activator getDefault() {\r\n\t\treturn plugin;\r\n\t}", "public IPluginResource load( URI path ) throws LoaderException;", "public String getSystemClassPath();", "public interface Loader {\n\t\tpublic void load();\n\t}", "ContentLoader getContentLoader(ClientRequestContext context);", "public static Activator getDefault() {\n\t\treturn plugin;\n\t}" ]
[ "0.6957472", "0.67036325", "0.66276085", "0.6590747", "0.6548559", "0.64988214", "0.6470319", "0.6413078", "0.63735896", "0.634268", "0.6338293", "0.6337457", "0.6299777", "0.6282581", "0.6206067", "0.6128453", "0.611491", "0.6022353", "0.5986491", "0.597692", "0.59595865", "0.5958376", "0.5958376", "0.59440637", "0.59128845", "0.58939487", "0.5885523", "0.58631295", "0.58593374", "0.5837211", "0.58337086", "0.5819477", "0.57809037", "0.5721129", "0.5711583", "0.57073855", "0.5690584", "0.5646463", "0.5632803", "0.5613012", "0.5612898", "0.5601928", "0.55896527", "0.55625135", "0.55268854", "0.55215544", "0.54990345", "0.54990345", "0.5495789", "0.549279", "0.5474516", "0.5465022", "0.5449116", "0.54315555", "0.54315555", "0.54259866", "0.53907734", "0.5369954", "0.53654796", "0.5356733", "0.53508854", "0.53440183", "0.53208214", "0.5312545", "0.53104967", "0.5284305", "0.52745694", "0.5273113", "0.52707386", "0.52342427", "0.52341515", "0.5198582", "0.51757497", "0.51724017", "0.5164704", "0.5156003", "0.51547235", "0.51513314", "0.51370996", "0.5118093", "0.5113515", "0.5113515", "0.5112369", "0.51001555", "0.50993824", "0.50982213", "0.50971013", "0.50884", "0.50883317", "0.5084499", "0.5084127", "0.50777036", "0.5065883", "0.5063069", "0.5063069", "0.50598156", "0.5055444", "0.50489795", "0.50385475", "0.5030401" ]
0.89029354
0
What is the database schema version of this plugin? The framework will use this name when storing the versions in the database.
String getSchemaVersion();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public int dbVersion();", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "public int getSchemaVersion() {\n return SCHEMA_VERSION;\n }", "public int getVersionForSchema() {\n try (ITransaction tx = transactionProvider.getTransaction()) {\n try (Connection c = connectionProvider.getConnection()) {\n GetSchemaVersion cmd = new GetSchemaVersion(this.schemaName);\n return cmd.run(translator, c);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n }\n }", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n public int getCurrentSchemaVersion(DBRProgressMonitor monitor, Connection connection, String schemaName) throws DBException, SQLException {\n try {\n int version = CommonUtils.toInt(JDBCUtils.executeQuery(connection,\n normalizeTableNames(\"SELECT VERSION FROM {table_prefix}CB_SCHEMA_INFO\")));\n return version == 0 ? 1 : version;\n } catch (SQLException e) {\n try {\n Object legacyVersion = CommonUtils.toInt(JDBCUtils.executeQuery(connection,\n normalizeTableNames(\"SELECT SCHEMA_VERSION FROM {table_prefix}CB_SERVER\")));\n // Table CB_SERVER exist - this is a legacy schema\n return LEGACY_SCHEMA_VERSION;\n } catch (SQLException ex) {\n // Empty schema. Create it from scratch\n return -1;\n }\n }\n }", "public Integer getSchemaVersion() {\n return this.schemaVersion;\n }", "public Integer getSchemaVersion() {\n return this.schemaVersion;\n }", "BigDecimal getLqncoreSchemaVersion();", "public String getCurrentVersion() {\r\n\t\tAssert.notNull( dbVersion, \"default database may not have been configured\" );\r\n\t\treturn dbVersion.getVersion();\r\n\t}", "BigDecimal getLqnSchemaVersion();", "public int getDatabaseVersion() {\n if(mdb == null) {\n return -1;\n }\n return mdb.getInt(\"courierdatabaseversion\", -1);\n }", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "public String getDatabaseSchemaName() {\n return databaseSchemaName;\n }", "public String getDbDriverVersion() {\n return dbDriverVersion;\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "public int getLatestCreationScriptVersion(String databaseName, String schemaName) {\n return getLatestCreationScript(databaseName, schemaName).getSecond();\n }", "public String schema() {\n return schemaName;\n }", "public String schema() {\n return schemaName;\n }", "public String databaseName();", "String getSchemaName();", "String getSchemaName();", "public String getProductVersion();", "public void setSchemaVersion(int version) {\n this.SCHEMA_VERSION = version;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getSchemaName() { return schemaName; }", "public String schemaName() {\n return this.schemaName;\n }", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "private static void printMySqlVersion(String serverName, int port, String databaseName, String databaseUser, String databasePassword) {\n try {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setServerName(serverName);\n dataSource.setPort(port);\n dataSource.setDatabaseName(databaseName);\n dataSource.setUser(databaseUser);\n dataSource.setPassword(databasePassword);\n // time zone should be configured in server\n //dataSource.setServerTimezone(\"GMT+1\");\n\n Connection connection = dataSource.getConnection();\n\n ResultSet resultSet = connection.createStatement().executeQuery(\"SELECT @@version\");\n resultSet.next();\n String mySqlVersion = resultSet.getString(\"@@version\");\n resultSet.close();\n\n connection.close();\n\n System.out.println(\"MySQL version: \" + mySqlVersion);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic String getPluginVersion() {\n\t\treturn null;\n\t}", "public String getVersionname() {\r\n return versionname;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getMajorSchemaVersion() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(MAJORSCHEMAVERSION_PROP.get());\n }", "public abstract String getDatabaseName();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getMajorSchemaVersion() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(MAJORSCHEMAVERSION_PROP.get());\n }", "public int getVersion() { return 1; }", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "public PluginVersion getVersion() {\n return version;\n }", "public void setSchemaVersion(Integer schemaVersion) {\n this.schemaVersion = schemaVersion;\n }", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "public String getVersion(){\r\n return version;\r\n }", "public String GetVersion() {\n\t\tString adapter_version = \"version: \" + adapter_version_;\n\t\treturn adapter_version;\n\t}", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "public String getDatabaseName()\n {\n return \"product\";\n }", "public String getDatabaseName () {\n return databaseName;\n }", "protected String getDatabaseName() {\n\t\treturn database;\n\t}", "public String getVersionConstraint() {\n return version;\n }", "public String getDatabase();", "public String getVersion () {\r\n return version;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getExtensionsSchemaVersion() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(EXTENSIONSSCHEMAVERSION_PROP.get());\n }", "public String getVersionNumber ();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getExtensionsSchemaVersion() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(EXTENSIONSSCHEMAVERSION_PROP.get());\n }", "public String getVersionName() {\n return versionName;\n }", "Builder addSchemaVersion(String value);", "public String getSchemaName() {\r\n\t\treturn this.tableMetaDataContext.getSchemaName();\r\n\t}", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "Version getVersion();", "Version getVersion();", "Version getVersion();", "Version getVersion();", "public String getDatabaseName() {\n return databaseName;\n }", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public int promoteVersion() {\n return dbVersion.incrementAndGet();\n }", "public String getDatabaseName() {\n return dbName;\n }", "public String getVersion() {\r\n return version;\r\n }", "public String getVersion() {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "int getCurrentVersion();" ]
[ "0.7036778", "0.7008443", "0.6993627", "0.69310737", "0.685849", "0.6801583", "0.67795014", "0.6726422", "0.6726422", "0.6718125", "0.66854763", "0.6568821", "0.6516801", "0.64443815", "0.6353237", "0.6312464", "0.62805563", "0.6263639", "0.6241638", "0.6089683", "0.6089683", "0.6087191", "0.6068558", "0.6068558", "0.6045695", "0.604272", "0.60263395", "0.5979816", "0.59277725", "0.5925616", "0.5925616", "0.5925616", "0.5925616", "0.5924063", "0.5924063", "0.5924063", "0.5924063", "0.5916194", "0.5906122", "0.58646053", "0.5858511", "0.5845749", "0.5842815", "0.58194876", "0.5801496", "0.5801496", "0.5801496", "0.5801496", "0.5801496", "0.5801496", "0.5801496", "0.5801496", "0.5801299", "0.57966787", "0.5794192", "0.5784636", "0.5782357", "0.57632947", "0.57632947", "0.57632947", "0.57632947", "0.57616735", "0.57616735", "0.57616735", "0.57616735", "0.57616735", "0.57616735", "0.57616735", "0.57616735", "0.57616735", "0.57616735", "0.57616735", "0.57505256", "0.5729864", "0.57167274", "0.5715016", "0.5696323", "0.5693586", "0.568187", "0.56709045", "0.5670465", "0.5667693", "0.5667544", "0.5661822", "0.56577533", "0.56577533", "0.5650379", "0.5650379", "0.5650379", "0.5650379", "0.5647705", "0.5644654", "0.5644654", "0.5644654", "0.56288016", "0.562567", "0.5624427", "0.562289", "0.562042", "0.5619168" ]
0.74901795
0
Shut down the plugin, freeing any resources. Called by the framework upon system shutdown.
void shutdown();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void shutdown()\n {\n Log.info( \"Shutting down. Unloading all loaded plugins...\" );\n\n // Stop the plugin monitoring service.\n pluginMonitor.stop();\n\n // Shutdown all loaded plugins.\n for ( Map.Entry<String, Plugin> plugin : pluginsLoaded.entrySet() )\n {\n try\n {\n plugin.getValue().destroyPlugin();\n Log.info( \"Unloaded plugin '{}'.\", plugin.getKey() );\n }\n catch ( Exception e )\n {\n Log.error( \"An exception occurred while trying to unload plugin '{}':\", plugin.getKey(), e );\n }\n }\n pluginsLoaded.clear();\n pluginDirs.clear();\n pluginMetadata.clear();\n classloaders.clear();\n childPluginMap.clear();\n failureToLoadCount.clear();\n }", "public void shutdown() {\n\t\tInput.cleanUp();\n\t\tVAO.cleanUp();\n\t\tTexture2D.cleanUp();\n\t\tResourceLoader.cleanUp();\n\t}", "@Override\n public void shutdown() throws PluginException {\n\n }", "public synchronized void shutdown() {\n try {\n stop();\n } catch (Exception ex) {\n }\n \n try {\n cleanup();\n } catch (Exception ex) {\n }\n }", "public void shutdown() {\r\n System.exit(0);\r\n }", "public static void shutdown() {\n\t}", "public static void shutdown()\n\t{\n\t\tinstance = null;\n\t}", "public void shutdown() {\n shutdown(false);\n }", "public void shutdown();", "public void shutdown();", "public void shutdown();", "public void shutdown();", "public void shutDown();", "void shutDown();", "public void shutdown()\n {\n // todo\n }", "public void stopPlugin() {\n try {\n ServicesRegisterManager.removeService(Parameters.JAR_REPOSITORY_MANAGER);\n }\n catch (ServiceClosedException sce) {}\n }", "public void shutdown() {\n }", "public static void shutdown ()\n\t{\n\t\tif (m_interpreter != null)\n\t\t{\n\t\t\tm_console.dispose ();\n\t\t\tm_interpreter.cleanup ();\n\t\t}\n\t}", "public void shutdown() {\n\t\t\n\t}", "public void cleanShutDown () {\n shutdown = true;\n }", "public void abnormalShutDown() {\n\t}", "public void shutdown(){\n\t\tAndroidSensorDataManagerSingleton.cleanup();\n\t}", "public void shutDown()\n {\n // Runtime.getRuntime().removeShutdownHook(shutdownListener);\n //shutdownListener.run();\n }", "public void teardown() {\n LOGGER.info(\"Shutting down driver\");\n driver.quit();\n }", "void internalShutdown() {\n\t\tsynchronized(this.hookedPlugins) {\n\t\t\tIterator<String> it = this.hookedPlugins.keySet().iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tString id = it.next(); \n\t\t\t\tPluginLogListener listener = this.hookedPlugins.get(id);\n\t\t\t\tlistener.dispose(); \n\t\t\t}\n\t\t\tthis.hookedPlugins.clear(); \n\t\t}\t\n\t\tthis.hierarchy.shutdown();\n\t}", "public void shutdown() {\n // For now, do nothing\n }", "@Override\n public void shutDown() {\n }", "public synchronized void shutDown() {\n\t state.shutDown();\n\t}", "public void shutdown() {\n // no-op\n }", "public void shutdown() {\n\t\tinternalShutdown();\n\t\tC4JPluginLogging.getDefault().removeLogManager(this); \n\t}", "public void run() {\n\t\tnew UsageCheckAdapter(EventSourceID.CD_PLUGIN_UNINSTALL);\n\t\t\n\t\tInstallationView view = CodeGeneratorActivator.getDefault().getInstallationView();\n\t\tview.uninstallPlugin();\n\t}", "protected abstract void shutdown();", "@Override\r\n\tpublic void stop(BundleContext context) throws Exception {\r\n\t\tsuper.stop(context);\r\n\t\tplugin = null;\r\n\t\tresourceBundle = null;\r\n\t}", "public static void shutdown() {\n\t\t// Ignore\n\t}", "@Override\n public synchronized void unload() {\n if (hasPlugin()) {\n try {\n plugin.unload();\n plugin = null;\n } catch (Throwable ex) {\n LOGGER.log(Level.SEVERE, \"Plugin \\\"\" + getName() + \"\\\" has failed while unloading with exception:\", ex);\n }\n }\n }", "@Override\n protected void shutDown() {\n }", "@Programmatic\n public void shutdown() {\n LOG.info(\"shutting down {}\", this);\n\n cache.clear();\n }", "public void cleanup();", "public void shutdown() {\n mGameHandler.shutdown();\n mTerminalNetwork.terminate();\n }", "public abstract void shutdown();", "public abstract void shutdown();", "public abstract void shutdown();", "public abstract void shutdown();", "public void shutdown() {\n fsManager.getOpenFileSystems().forEach(JGitFileSystem::close);\n shutdownSSH();\n forceStopDaemon();\n fsManager.clear();\n }", "public final void destroy()\n {\n processDestroy();\n super.destroy();\n }", "@Override\n public void stop(BundleContext context) throws Exception {\n super.stop(context);\n plugin = null;\n }", "public void shutdown() {\n if (configurations.isRegisterMXBeans()) {\n JmxConfigurator.get().removeMXBean(this);\n }\n configurations.shutdown();\n }", "public void shutdown()\n {\n // nothing to do here\n }", "public void shutdown() {\n this.isShutdown = true;\n }", "public static void destroy() {\n\t}", "public void shutdown()\n {\n shutdown = true;\n cil.shutdown();\n }", "private void cleanUp(){\n\t\tSSHUtil sSHUtil=(SSHUtil) SpringUtil.getBean(\"sSHUtil\");\n\t\ttry {\n\t\t\tsSHUtil.disconnect();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void stop(BundleContext context) throws Exception {\n\t\tm_plugin = null;\n\t\tsuper.stop(context);\n\t}", "@Override\n protected void shutdown() {\n super.shutdown();\n // Now perform any other shutdown tasks you need.\n // ...\n }", "public final void destroy()\n {\n log.info(\"PerformanceData Servlet: Done shutting down!\");\n }", "protected void shutdown() {\n\r\n }", "public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}", "@After\n public void cleanup()\n throws Exception\n {\n moduleManager.stop();\n }", "public void shutdown() {\n YbkService.stop(ErrorDialog.this);\r\n System.runFinalizersOnExit(true);\r\n // schedule actual shutdown request on a background thread to give the service a chance to stop on the\r\n // foreground thread\r\n new Thread(new Runnable() {\r\n\r\n public void run() {\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException e) {\r\n }\r\n System.exit(-1);\r\n }\r\n }).start();\r\n }", "public void shutdown() {\n try {\n infoServer.stop();\n } catch (Exception e) {\n }\n this.shouldRun = false;\n ((DataXceiveServer) this.dataXceiveServer.getRunnable()).kill();\n try {\n this.storage.closeAll();\n } catch (IOException ie) {\n }\n }", "public void shutdown() {\n if (this.service instanceof PicassoExecutorService) {\n this.service.shutdown();\n }\n this.downloader.shutdown();\n this.dispatcherThread.quit();\n Picasso.HANDLER.post(new Runnable() {\n /* class com.squareup.picasso.Dispatcher.AnonymousClass1 */\n\n public void run() {\n Dispatcher.this.receiver.unregister();\n }\n });\n }", "public void shutdown() {\n\tif (publisher != null)\n\t publisher.shutdown();\n\n\tif (handle != null) {\n\t handle.shutdown();\n\t}\n }", "public void cleanup()\n {\n \tsuper.cleanup();\n _channelHandler.cleanup();\n }", "public void cleanup() {\r\n }", "public void shutdown() {\n logger.info(\"Shutting down modules.\");\n for (Module module : modules) {\n module.stop();\n }\n logger.info(\"Shutting down reporters.\");\n for (Reporter reporter : reporters.values()) {\n reporter.stop();\n }\n }", "public void shutDown()\n\t{\n\t\tthis.threadPool.shutdown();\n\t}", "public void shutdown() {\n/* 188 */ this.shutdown = true;\n/* */ }", "@Override\n\tpublic void shutdown()\n\t{\n\t}", "@After\n\tpublic void teardown() {\n\t\tdrv.quit();\n\t}", "@Deactivate\n public void deactivate()\n {\n m_PluginFactoryTracker.close();\n if (m_RegistryComponent != null)\n {\n m_RegistryComponent.dispose();\n }\n }", "public void stop()\n {\n _panel.cleanup();\n _appContext.cleanup();\n }", "public void shutdown()\r\n {\r\n debug(\"shutdown() the application module\");\r\n\r\n // Shutdown all the Timers\r\n shutdownWatchListTimers();\r\n // Save Our WatchLists\r\n saveAllVectorData();\r\n // Our Container vectors need to be emptied and clear. \r\n modelVector.removeAllElements();\r\n modelVector = null;\r\n\r\n tableVector.removeAllElements();\r\n tableVector = null;\r\n\r\n // Delete any additional Historic Data that is Serialized to disk\r\n expungeAllHistoricFiles();\r\n\r\n // Shutdown the task that monitors the update tasks\r\n if ( this.monitorTask != null )\r\n {\r\n this.monitorTask.cancel();\r\n this.monitorTask = null;\r\n }\r\n // Null out any reference to this data that may be present\r\n stockData = null;\r\n debug(\"shutdown() the application module - complete\");\r\n\r\n }", "void prepareForShutdown();", "public void shutdown(){\n \tSystem.out.println(\"SHUTTING DOWN..\");\n \tSystem.exit(0);\n }", "@Override\n\t\tprotected void shutdown() {\n\n\t\t}", "public final void destroy() {\n requestExit();\n }", "public void shutdown() {\n if (pipelineExecutor != null) {\n ExecutorUtil.shutdownAndAwaitTermination(pipelineExecutor);\n }\n\n if (mHandler != null) {\n mHandler.removeCallbacksAndMessages(null);\n }\n }", "public void stop(BundleContext context) throws Exception {\n\t\tsuper.stop(context);\n\t\tplugin = null;\n\t}", "@Override\n public void shutdown() {\n }", "@Override\n public void shutdown() {\n }", "@Override\n public void shutdown() {\n }", "public void ShutDown()\n {\n bRunning = false;\n \n LaunchLog.Log(COMMS, LOG_NAME, \"Shut down instruction received...\");\n\n for(LaunchServerSession session : Sessions.values())\n {\n LaunchLog.Log(COMMS, LOG_NAME, \"Closing session...\");\n session.Close();\n }\n \n LaunchLog.Log(COMMS, LOG_NAME, \"...All sessions are closed.\");\n }", "public static void destroy() {\n handler = null;\n initialized = false;\n }", "@AfterClass\n public void stop() throws Exception {\n super.finalize();\n }" ]
[ "0.757001", "0.7432339", "0.7375962", "0.72463137", "0.70292056", "0.69903225", "0.697279", "0.69445634", "0.68909377", "0.68909377", "0.68909377", "0.68909377", "0.68591607", "0.6855403", "0.6852033", "0.68287534", "0.6797097", "0.67560154", "0.67380106", "0.67314446", "0.6728797", "0.66930085", "0.6675071", "0.6609785", "0.6609501", "0.6577588", "0.65673363", "0.65510386", "0.65398335", "0.6532013", "0.64982635", "0.64875036", "0.64834136", "0.6478716", "0.64733225", "0.64649165", "0.6454731", "0.6442476", "0.6430356", "0.6429218", "0.6429218", "0.6429218", "0.6429218", "0.642674", "0.64210314", "0.64193374", "0.6405414", "0.6400863", "0.6383274", "0.6370893", "0.636803", "0.63618505", "0.63466567", "0.63212234", "0.6319178", "0.6312885", "0.6312431", "0.6312117", "0.63081455", "0.63035864", "0.63009244", "0.62985146", "0.6296021", "0.6294207", "0.6293143", "0.6289765", "0.6287142", "0.628253", "0.6280636", "0.6280443", "0.6278951", "0.6278471", "0.6277923", "0.6256316", "0.6255008", "0.62465364", "0.6243605", "0.62424815", "0.6241109", "0.6241109", "0.6241109", "0.6233209", "0.62330645", "0.62312824" ]
0.66435444
39
Return set of successors for each instruction in a function
IndexList[] successors() { SortedMap<String,Integer> labelMap = new TreeMap<String,Integer>(); for (int i = 0; i < code.length; i++) { Inst c = code[i]; if (c instanceof LabelDec) labelMap.put(((LabelDec) c).name, i); } IndexList[] allSuccs = new IndexList[code.length]; for (int i = 0; i < code.length-1; i++) { // there's always a label at the end Inst inst = code[i]; IndexList succs = new IndexList(); if (inst instanceof CJump) { succs.add(labelMap.get(((CJump) inst).lab.name)); succs.add(i+1); // safe because there's always a label at the end } else if (inst instanceof Jump) succs.add(labelMap.get(((Jump) inst).lab.name)); else succs.add(i+1); allSuccs[i] = succs; } allSuccs[code.length-1] = new IndexList(); // label at the end has no successors return allSuccs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HashSet<N> getSuccessors(N node)\r\n/* 26: */ {\r\n/* 27: 56 */ assert (checkRep());\r\n/* 28: 57 */ return new HashSet(((Map)this.map.get(node)).keySet());\r\n/* 29: */ }", "public abstract LinkedList<Node> getSuccessors();", "Set<? extends IRBasicBlock> getSuccessors(IRBasicBlock block);", "public Set<String> getEnteringFunctionNames() {\n Set<String> results = new HashSet<>();\n Set<CFANode> visited = new HashSet<>();\n Queue<CFANode> waitlist = new ArrayDeque<>();\n waitlist.offer(this);\n while (!waitlist.isEmpty()) {\n CFANode current = waitlist.poll();\n if (visited.add(current)) {\n if (current.getFunctionName()\n .equals(CFASingleLoopTransformation.ARTIFICIAL_PROGRAM_COUNTER_FUNCTION_NAME)) {\n waitlist.addAll(CFAUtils.allPredecessorsOf(current).toList());\n } else {\n results.add(current.getFunctionName());\n }\n }\n }\n return results;\n }", "public abstract Collection<Node> getAllSuccessors();", "public List<Integer> getSuccessors(int v);", "private void writeSuccessors(INode prev, Collection<Node> succs) {\n Label prevKey = trapwriter.localID(prev);\n for (Node succ : succs) writeSuccessor(prevKey, succ);\n }", "public State[] getSuccessors(State curr) {\n State [] successors = new State [6];\r\n \r\n if(currjug1!=0) {\r\n //e1\r\n successors[0] = new State(capjug1, capjug2, 0, currjug2, goal,depth);\r\n successors[0].parentPt = curr;\r\n successors[0].depth = curr.depth+1;\r\n //p12\r\n int pour = pour(currjug1, currjug2, capjug2);\r\n successors[1] = new State(capjug1, capjug2, currjug1-pour, currjug2+pour, goal,depth);\r\n successors[1].parentPt = curr;\r\n successors[1].depth = curr.depth+1;\r\n }\r\n \r\n if(currjug2!=0) {\r\n //e2\r\n successors[2] = new State(capjug1, capjug2, currjug1, 0, goal,depth);\r\n successors[2].parentPt = curr;\r\n successors[2].depth = curr.depth+1;\r\n }\r\n \r\n //f2\r\n successors[3] = new State(capjug1, capjug2, currjug1, capjug2, goal,depth);\r\n successors[3].parentPt = curr;\r\n successors[3].depth = curr.depth+1;\r\n \r\n if(currjug2!=0) {\r\n //p21\r\n int pour = pour(currjug2, currjug1, capjug1);\r\n successors[4] = new State(capjug1, capjug2, currjug1+pour, currjug2-pour, goal,depth);\r\n successors[4].parentPt = curr;\r\n successors[4].depth = curr.depth+1;\r\n }\r\n \r\n //f1\r\n successors[5] = new State(capjug1, capjug2, capjug1, currjug2, goal,depth);\r\n successors[5].parentPt = curr;\r\n successors[5].depth = curr.depth+1;\r\n \r\n return successors;\r\n }", "public Vector<BasicSet> AllClosure(){\r\n\r\n\t\tVector<BasicSet> fermes=new Vector<BasicSet>();\r\n\t\tboolean success=false;\r\n\t\tint i=0;\r\n\t\t//BasicSet b=new BasicSet();\r\n\t\tfermes.add(FirstClosure());\r\n\t\tBasicSet attributs=new BasicSet();\r\n\t\tattributs.addAll(context.getAttributes());\r\n\t\twhile(success==false){\r\n\t\t\t//System.out.println(\"fermeeees iiii \"+fermes.get(i));\r\n\t\t\tBasicSet clone=(BasicSet) fermes.get(i).clone();\r\n\t\t\tfermes.add(NextClosure(attributs,clone));\r\n\t\t\t//System.out.println(\"fermeeees \"+fermes);\t\r\n\t\t\tif(fermes.lastElement().size()==context.getAttributeCount()){\r\n\t\t\t\tsuccess=true;\r\n\t\t\t\t//System.out.println(\"iiiii \"+i);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn fermes;\r\n\t}", "public List<Integer> succ(int n) {\n // Don't generate a non-existent \"next\" instruction for the last in a block.\n // For sensibly generated code, this ought not even to be possible,\n // as the last operation will be return or unconditional jump.\n boolean last = (n == this.code.size() - 1) ? true : false;\n TACOp op = this.code.get(n);\n\n switch (op.getType()) {\n // Unconditional jumps can't fall through to the next operation.\n case JMP:\n return Collections.singletonList(this.labelLocs.get(op.getLabel()));\n // Conditional jumps can fall through.\n case JZ:\n int dest = this.labelLocs.get(op.getLabel());\n if (last) {\n return Collections.singletonList(dest);\n }\n else {\n return pairList(dest, n+1);\n }\n // Returns can't go anywhere (within the block).\n case RET:\n return Collections.emptyList();\n // All other operations fall through.\n // (Even for calls, execution resumes at the following operation.)\n default:\n if (last) {\n return Collections.emptyList();\n }\n else {\n return Collections.singletonList(n+1);\n }\n }\n }", "public abstract Collection<Node> getGuardedSuccessors(Expression guard);", "public List<AllocatableAction> getOptimizingSuccessors() {\n return this.optimizingSuccessors;\n }", "public static HashSet<Transition> makeTransitions(Set<Operation> ops, State tail){\n HashSet<Transition> set = new HashSet<Transition>();\n// 调用enabledOperations方法\n Set<Operation> op = enabledOperations(ops , tail);\n// 遍历op\n for(Operation o : op){\n State s = o.execute(tail);\n Transition t = new Transition(o.name , tail , s , 1);\n set.add(t);\n }\n return set ;\n\n\n\n // throw new NotImplementedException();\n }", "public static ImmutableSet<Worker<?, ?>> getAllSuccessors(Worker<?, ?> worker) {\n\t\tQueue<Worker<?, ?>> frontier = new ArrayDeque<>();\n\t\tfrontier.addAll(Workers.getSuccessors(worker));\n\t\tSet<Worker<?, ?>> closed = new HashSet<>(frontier);\n\t\twhile (!frontier.isEmpty()) {\n\t\t\tWorker<?, ?> cur = frontier.remove();\n\t\t\tfor (Worker<?, ?> w : Workers.getSuccessors(cur))\n\t\t\t\tif (!closed.contains(w)) {\n\t\t\t\t\tfrontier.add(w);\n\t\t\t\t\tclosed.add(w);\n\t\t\t\t}\n\t\t}\n\t\treturn ImmutableSet.copyOf(closed);\n\t}", "@Override\r\n protected List<Point> generateSuccessors(Point node) {\r\n List<Point> ret = new LinkedList<>();\r\n int x = node.x;\r\n int y = node.y;\r\n if (y < field.getHeight()\r\n && (field.isFree(new Point(x, y + 1))\r\n || (finish.x == x && finish.y == y + 1)))\r\n ret.add(new Point(x, y + 1));\r\n\r\n if (x < field.getWidth()\r\n && (field.isFree(new Point(x + 1, y))\r\n || (finish.x == x + 1 && finish.y == y)))\r\n ret.add(new Point(x + 1, y));\r\n\r\n if (y > 0\r\n && (field.isFree(new Point(x, y - 1))\r\n || (finish.x == x && finish.y == y - 1)))\r\n ret.add(new Point(x, y - 1));\r\n\r\n if (x > 0\r\n && (field.isFree(new Point(x - 1, y))\r\n || (finish.x == x - 1 && finish.y == y)))\r\n ret.add(new Point(x - 1, y));\r\n\r\n return ret;\r\n }", "Set<JflowModel.Node> simplify(ModelState start)\n{\n Set<JflowModel.Node> states = new HashSet<JflowModel.Node>();\n\n updateState(start,states,new HashMap<ModelState,Vector<Set<JflowModel.Node>>>());\n\n if (removeExtraReturns(states)) {\n states = new HashSet<JflowModel.Node>();\n updateState(start,states,new HashMap<ModelState,Vector<Set<JflowModel.Node>>>());\n }\n\n return states;\n}", "public static Seq<BackEdges.Edge> getControlFlowSuccessors(Block block) {\n return seq(BackEdges.getOuts(block))\n .map(be -> be.node)\n .filter(n -> n.getMode().equals(Mode.getX()))\n .map(BackEdges::getOuts)\n .flatMap(Seq::seq)\n .filter(be -> be.node instanceof Block);\n }", "public abstract List<Instruction> getPossibleActions();", "boolean[] bitwiseChangeList();", "protected HashSet<GoapAction> extractPossibleActions() {\r\n\t\tHashSet<GoapAction> possibleActions = new HashSet<GoapAction>();\r\n\r\n\t\ttry {\r\n\t\t\tfor (GoapAction goapAction : this.goapUnit.getAvailableActions()) {\r\n\t\t\t\tif (goapAction.checkProceduralPrecondition(this.goapUnit)) {\r\n\t\t\t\t\tpossibleActions.add(goapAction);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn possibleActions;\r\n\t}", "public Function[] getFunctionSet() {\n Function[] copyFunctionSet = new Function[functionSet.length];\n for(int i = 0; i < functionSet.length; i++){\n copyFunctionSet[i] = functionSet[i].softClone();\n }\n return copyFunctionSet;\n }", "public Object[] getSuccessorNodes (Object node) throws InvalidComponentException;", "private static FunctionCycle findCycleWithHashingInternal(IntUnaryOperator func, int x0) {\n\n IntHashSet detectedValues = new IntHashSet();\n int curValue = x0;\n\n while (!detectedValues.contains(curValue)) {\n detectedValues.add(curValue);\n curValue = func.applyAsInt(curValue);\n }\n\n final int startPoint = curValue;\n\n curValue = func.applyAsInt(curValue);\n int length = 1;\n\n while (curValue != startPoint) {\n curValue = func.applyAsInt(curValue);\n ++length;\n }\n\n return new FunctionCycle(startPoint, length);\n }", "@Override\n\tpublic Set<NFAState> eClosure(NFAState s) {\n\t\tSet<NFAState> visited = new TreeSet<NFAState>();\n\t\t//invoke recursive helper\n\t\tvisited = eClosureHelper(s, visited);\n\t\t\n\t\treturn visited;\n\t}", "public ArrayList<UUSearchNode> getSuccessors() {\n\n ArrayList<UUSearchNode> successors = new ArrayList<UUSearchNode>();//this will be returned\n ArrayList<CannibalNode> helper = new ArrayList<CannibalNode>();\n\n if (this.state[2]==1){ //if the boat is on the starting shore\n helper.add(new CannibalNode(this.state[0] - 2, this.state[1],\n this.state[2] - 1, this.depth + 1)); //subtracting <201>\n helper.add(new CannibalNode(this.state[0], this.state[1] - 2,\n this.state[2] - 1, this.depth + 1)); //subtracting <021>\n helper.add(new CannibalNode(this.state[0] - 1, this.state[1] - 1,\n this.state[2] - 1, this.depth + 1)); //subtracting <111>\n helper.add(new CannibalNode(this.state[0] - 1, this.state[1],\n this.state[2] - 1, this.depth + 1)); //subtracting <101>\n helper.add(new CannibalNode(this.state[0], this.state[1] - 1,\n this.state[2] - 1, this.depth + 1)); //subtracting <011>\n }else{ //if the boat is on the opposite shore\n helper.add(new CannibalNode(this.state[0] + 2, this.state[1],\n this.state[2] + 1, this.depth + 1)); //adding <201>\n helper.add(new CannibalNode(this.state[0], this.state[1] + 2,\n this.state[2] + 1, this.depth + 1)); //adding <021>\n helper.add(new CannibalNode(this.state[0] + 1, this.state[1] + 1,\n this.state[2] + 1, this.depth + 1)); //adding <111>\n helper.add(new CannibalNode(this.state[0] + 1, this.state[1],\n this.state[2] + 1, this.depth + 1)); //adding <101>\n helper.add(new CannibalNode(this.state[0], this.state[1] + 1,\n this.state[2] + 1, this.depth + 1)); //adding <011>\n }\n\n //now we check for feasibility and legality\n for(CannibalNode n : helper){\n if(isFeasibleState(n.state) && isLegalState(n.state)){\n successors.add(n);\n }\n }\n return successors;\n }", "private List<Matrix> obtainTransitions(List<Matrix>probs){\n\t\tList<Matrix> output = new ArrayList<Matrix>();\n\t\tfor (int i =0;i<probs.size();i++) {\n\t\t\toutput.add(genTransFunction(probs.get(i)));\n\t\t}\n\t\treturn output;\n\t}", "public List<AllocatableAction> getSuccessors() {\n return this.resourceSuccessors;\n }", "Set<? extends IRBasicBlock> getPredecessors(IRBasicBlock block);", "private boolean[] markAllComposites(int initial) {\n boolean[] primes = new boolean[initial + 1];\n //Mark all indexes as true initially\n Arrays.fill(primes, true);\n\n //Start marking the array indexes as false if divisible by the number in iteration, starting from 2\n IntStream.rangeClosed(2, (int) Math.sqrt(initial))\n .filter(num -> primes[num])\n .forEach(num -> {\n //Mark multiples of num as false as this number will be composite.\n //i.e. all the multiples of 2, 3, 4 and so on in the iteration will be marked false if not already marked\n //All the indexes which are not marked at the end of loop will be primes\n for (int i = num * 2; i <= initial; i += num) {\n primes[i] = false;\n }\n });\n return primes;\n }", "private Collection<? extends AbstractState> getFollowStates(AutomatonState state, List<AbstractState> otherElements, CFAEdge edge, boolean failOnUnknownMatch) throws CPATransferException {\n Preconditions.checkArgument(!(state instanceof AutomatonUnknownState));\n if (state == cpa.getBottomState()) {\n //return Collections.singleton(state);\n return Collections.emptySet();\n }\n\n if (state.getInternalState().getTransitions().isEmpty()) {\n // shortcut\n return Collections.singleton(state);\n }\n\n Collection<AbstractState> lSuccessors = new HashSet<AbstractState>(2);\n AutomatonExpressionArguments exprArgs = new AutomatonExpressionArguments(state.getVars(), otherElements, edge, logger);\n boolean edgeMatched = false;\n boolean nonDetState = state.getInternalState().isNonDetState();\n\n // these transitions cannot be evaluated until last, because they might have sideeffects on other CPAs (dont want to execute them twice)\n // the transitionVariables have to be cached (produced during the match operation)\n // the list holds a Transition and the TransitionVariables generated during its match\n List<Pair<AutomatonTransition, Map<Integer, String>>> transitionsToBeTaken = new ArrayList<Pair<AutomatonTransition, Map<Integer, String>>>(2);\n\n for (AutomatonTransition t : state.getInternalState().getTransitions()) {\n exprArgs.clearTransitionVariables();\n\n matchTime.start();\n ResultValue<Boolean> match = t.match(exprArgs);\n matchTime.stop();\n if (match.canNotEvaluate()) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition condition could not be evaluated: \" + match.getFailureMessage());\n }\n // if one transition cannot be evaluated the evaluation must be postponed until enough information is available\n return Collections.singleton(new AutomatonUnknownState(state));\n } else {\n if (match.getValue()) {\n edgeMatched = true;\n assertionsTime.start();\n ResultValue<Boolean> assertionsHold = t.assertionsHold(exprArgs);\n assertionsTime.stop();\n\n if (assertionsHold.canNotEvaluate()) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition assertions could not be evaluated: \" + assertionsHold.getFailureMessage());\n }\n // cannot yet be evaluated\n return Collections.singleton(new AutomatonUnknownState(state));\n\n } else if (assertionsHold.getValue()) {\n if (!t.canExecuteActionsOn(exprArgs)) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition action could not be executed\");\n }\n // cannot yet execute, goto UnknownState\n return Collections.singleton(new AutomatonUnknownState(state));\n }\n\n // delay execution as described above\n Map<Integer, String> transitionVariables = ImmutableMap.copyOf(exprArgs.getTransitionVariables());\n transitionsToBeTaken.add(Pair.of(t, transitionVariables));\n\n } else {\n // matching transitions, but unfulfilled assertions: goto error state\n AutomatonState errorState = AutomatonState.automatonStateFactory(Collections.<String, AutomatonVariable>emptyMap(), AutomatonInternalState.ERROR, cpa);\n logger.log(Level.INFO, \"Automaton going to ErrorState on edge \\\"\" + edge.getDescription() + \"\\\"\");\n lSuccessors.add(errorState);\n }\n\n if (!nonDetState) {\n // not a nondet State, break on the first matching edge\n break;\n }\n }\n // do nothing if the edge did not match\n }\n }\n\n if (edgeMatched) {\n // execute Transitions\n for (Pair<AutomatonTransition, Map<Integer, String>> pair : transitionsToBeTaken) {\n // this transition will be taken. copy the variables\n AutomatonTransition t = pair.getFirst();\n Map<Integer, String> transitionVariables = pair.getSecond();\n actionTime.start();\n Map<String, AutomatonVariable> newVars = deepCloneVars(state.getVars());\n exprArgs.setAutomatonVariables(newVars);\n exprArgs.putTransitionVariables(transitionVariables);\n t.executeActions(exprArgs);\n actionTime.stop();\n AutomatonState lSuccessor = AutomatonState.automatonStateFactory(newVars, t.getFollowState(), cpa);\n //if (!(lSuccessor instanceof AutomatonState.BOTTOM)) {\n lSuccessors.add(lSuccessor);\n //} // else add nothing\n }\n return lSuccessors;\n } else {\n // stay in same state, no transitions to be executed here (no transition matched)\n return Collections.singleton(state);\n }\n }", "private void initSuccessorList() {\n this.successorList = new ArrayList<TNode>(Constants.SUCCESSOR_LIST_SIZE);\n\n // Adds the initial successor\n for (int i = 0; i < Constants.SUCCESSOR_LIST_SIZE; i++)\n this.successorList.add(tNode);\n }", "@Override\r\n\tpublic ArrayList<Integer> generateSuccessors(int lastMove, int[] takenList) //this method should be fine\r\n\t{\r\n\t\tArrayList <Integer> myList = new ArrayList <Integer>();\r\n\t\tif (lastMove == -1) //must choose an odd-numbered stone that is less than n/2\r\n\t\t{\r\n\t\t\tfor (int i = ((takenList.length - 2)/2); i > 0; i--)\r\n\t\t\t{\r\n\t\t\t\tif (i % 2 != 0 && takenList[i] == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tmyList.add(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor (int i = takenList.length - 1; i > 0; i--)\r\n\t\t\t{ \r\n\t\t\t\tif (takenList[i] == 0 && (i % lastMove == 0 || lastMove % i == 0))\r\n\t\t\t\t{\r\n\t\t\t\t\tmyList.add(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn myList;\r\n\r\n\t}", "private static Iterable<String> calcClosure(List<String> classes) {\n Set<String> ret = new HashSet<String>();\n\n List<String> newClasses = new ArrayList<String>();\n for (String cName : classes) {\n newClasses.add(cName);\n ret.add(cName);\n }\n\n boolean updating = true;\n while (updating) {\n updating = false;\n classes = newClasses;\n newClasses = new ArrayList<String>();\n for (String cName : classes) {\n Set<String> nC = new HashSet<String>();\n Analysis as = new Analysis() {\n @Override\n public ClassVisitor getClassVisitor() {\n return new ReachingClassAnalysis(Opcodes.ASM5, null, nC);\n }\n };\n\n try {\n as.analyze(cName);\n } catch (IOException ex) {\n System.err.println(\"WARNING: IOError handling: \" + cName);\n System.err.println(ex);\n }\n\n for (String cn : nC) {\n if (!ret.contains(cn) &&\n !cn.startsWith(\"[\")) {\n ret.add(cn);\n newClasses.add(cn);\n updating = true;\n }\n }\n }\n }\n\n System.err.println(\"Identified \" + ret.size() +\n \" potentially reachable classes\");\n\n return ret;\n }", "public InstructionHandle physicalSuccessor() {\n/* 95 */ InstructionHandle ih = this.target;\n/* */ \n/* */ \n/* 98 */ while (ih.getPrev() != null) {\n/* 99 */ ih = ih.getPrev();\n/* */ }\n/* */ \n/* 102 */ while (ih.getInstruction() != this) {\n/* 103 */ ih = ih.getNext();\n/* */ }\n/* 105 */ InstructionHandle toThis = ih;\n/* */ \n/* 107 */ while (ih != null) {\n/* 108 */ ih = ih.getNext();\n/* 109 */ if (ih != null && ih.getInstruction() == this) {\n/* 110 */ throw new RuntimeException(\"physicalSuccessor() called on a shared JsrInstruction.\");\n/* */ }\n/* */ } \n/* */ \n/* 114 */ return toThis.getNext();\n/* */ }", "private Set<Integer> getStatesFromWichReachableAccepting(LabelledTransitionSystem ret) {\n\t\tMap<Integer, Set<Integer>> reversedReachable = this.computeInverseTransitionRelation(ret);\n\n\t\tSet<Integer> reachable = new HashSet<>();\n\n\t\tlogger.debug(\"Accepting states: \" + ret.getAccepting());\n\t\tSet<Integer> current = ret.getAccepting();\n\n\t\tboolean[] visited = new boolean[ret.getStates().length];\n\n\t\twhile (!current.isEmpty()) {\n\t\t\tInteger evaluated = current.iterator().next();\n\t\t\tcurrent.remove(evaluated);\n\t\t\tif (!visited[evaluated]) {\n\t\t\t\tvisited[evaluated] = true;\n\t\t\t\treachable.add(evaluated);\n\t\t\t\tSet<Integer> prev = new HashSet<>(reversedReachable.get(evaluated));\n\t\t\t\tcurrent.addAll(prev);\n\t\t\t}\n\t\t}\n\n\t\treturn reachable;\n\t}", "private boolean noImpedingPredecessors(\r\n\t\t\tfinal List<Rule> sequence) {\r\n\t\t\r\n\t\tboolean result = true;\r\n\t\tfor (int i=1; i<sequence.size(); i++) {\r\n\t\t\tRule ri = sequence.get(i);\r\n\t\t\tboolean localResult = true;\r\n\t\t\tfinal Pair<Boolean, List<String>> \r\n\t\t\truleRes = this.ruleSequence.getRuleResult(i, ri.getName(), ApplicabilityConstants.NO_IMPEDING_PREDECESSORS);\r\n\t\t\tif (ruleRes != null) {\r\n\t\t\t\tlocalResult = ruleRes.first.booleanValue();\r\n\t\t\t} \r\n\t\t\telse {\r\n\t\t\t\tfor (int j=0; j<i; j++) {\r\n\t\t\t\t\tRule rj = sequence.get(j);\r\n\t\t\t\t\tfinal SimpleExcludePair excludePair = makeExcludePair();\r\n\t\t\t\t\tif(!asymParallelIndependentByCPA(excludePair, rj, j, ri, i)) {\t\t\t\t\t\r\n\t\t\t\t\t\tlocalResult = false;\r\n\t\t\t\t\t\tsetRuleResult(i, ri.getName(), false, ApplicabilityConstants.NO_IMPEDING_PREDECESSORS, rj.getName());\t\r\n\t\t\t\t\t\tbreak; // evntl. weiter machen!\r\n\t\t\t\t\t} \r\n\t\t\t\t\texcludePair.dispose();\r\n\t\t\t\t}\r\n\t\t\t\tif (localResult) {\r\n\t\t\t\t\tsetRuleResult(i, ri.getName(), true, ApplicabilityConstants.NO_IMPEDING_PREDECESSORS, \"\");\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t\t// rewrite result only if localResult is FALSE\r\n\t\t\tif (!localResult) {\r\n\t\t\t\tresult = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (!result) {\r\n\t\t\tsetApplicabilityResult(false, ApplicabilityConstants.NO_IMPEDING_PREDECESSORS);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private Set<BitSet> findMinimalSet(List<Set<BitSet>> pFunction) {\n\n\t\tSet<BitSet> minimalSet = new LinkedHashSet<>(pFunction.get(0));\n\t\tSet<BitSet> helpSet = new LinkedHashSet<>(pFunction.get(0));\n\t\tint pFunctionSize = pFunction.size();\n\n\t\tfor (int i = 0; i < pFunctionSize - 1; i++) {\n\t\t\tminimalSet.clear();\n\n\t\t\tfor (BitSet bitSet : helpSet) {\n\n\t\t\t\tSet<BitSet> set = pFunction.get(i + 1);\n\n\t\t\t\tfor (BitSet bitSet2 : set) {\n\t\t\t\t\tBitSet help = (BitSet) bitSet.clone();\n\t\t\t\t\thelp.or(bitSet2);\n\t\t\t\t\tminimalSet.add(help);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thelpSet.clear();\n\t\t\thelpSet.addAll(minimalSet);\n\t\t}\n\t\tlogSumOfProducts(minimalSet);\n\n\t\tint cardinality = minimalSet.stream().min((a, b) -> Integer.compare(a.cardinality(), b.cardinality()))\n\t\t\t\t.map(BitSet::cardinality).get();\n\n\t\tminimalSet = minimalSet.stream().filter(e -> e.cardinality() == cardinality)\n\t\t\t\t.collect(Collectors.toCollection(LinkedHashSet::new));\n\n\t\treturn minimalSet;\n\t}", "public static Set<Integer> getPossibleSuccessors(Map<Integer, ActivityPredictionEdge> followerPredictionEdgeMap) {\n double edgeSignificance = 0.0;\n double edgeCorrelation = 0.0;\n double targetSignificance = 0.0;\n Set<Integer> possibleSuccessors = new HashSet<>();\n int targetID = 0;\n for (ActivityPredictionEdge edge : followerPredictionEdgeMap.values()) {\n if (edgeCorrelation < edge.getEdgeCorrelation()) {\n edgeCorrelation = edge.getEdgeCorrelation();\n edgeSignificance = edge.getEdgeSignificance();\n targetSignificance = edge.getEdgeTargetSignificance();\n targetID = edge.getModelID();\n possibleSuccessors.clear();\n possibleSuccessors.add(targetID);\n } else if (edgeCorrelation == edge.getEdgeCorrelation() && edgeSignificance < edge.getEdgeSignificance()) {\n edgeCorrelation = edge.getEdgeCorrelation();\n edgeSignificance = edge.getEdgeSignificance();\n targetSignificance = edge.getEdgeTargetSignificance();\n targetID = edge.getModelID();\n possibleSuccessors.clear();\n possibleSuccessors.add(targetID);\n } else if (edgeCorrelation == edge.getEdgeCorrelation() && edgeSignificance == edge.getEdgeSignificance() && targetSignificance < edge.getEdgeTargetSignificance()) {\n edgeCorrelation = edge.getEdgeCorrelation();\n edgeSignificance = edge.getEdgeSignificance();\n targetSignificance = edge.getEdgeTargetSignificance();\n targetID = edge.getModelID();\n possibleSuccessors.clear();\n possibleSuccessors.add(targetID);\n } else {\n possibleSuccessors.add(targetID);\n }\n }\n return possibleSuccessors;\n }", "BasicSet NextClosure(BasicSet M,BasicSet A){\r\n\t\tConceptLattice cp=new ConceptLattice(context);\r\n\t\tApproximationSimple ap=new ApproximationSimple(cp);\r\n\t\tMap <String,Integer> repbin=this.RepresentationBinaire(M);\r\n\t\tVector<BasicSet> fermes=new Vector<BasicSet>();\r\n\t\tSet<String> key=repbin.keySet();\r\n\t\tObject[] items= key.toArray();\r\n\r\n\t\t/* on recupere la position i qui correspond a la derniere position de M*/\r\n\t\tint i=M.size()-1;\r\n\t\tboolean success=false;\r\n\t\tBasicSet plein=new BasicSet();\r\n\t\tVector <String> vv=context.getAttributes();\r\n\t\tplein.addAll(vv);\r\n\r\n\r\n\t\twhile(success==false ){\t\t\r\n\r\n\t\t\tString item=items[i].toString();\r\n\r\n\t\t\tif(!A.contains(item)){\t\r\n\r\n\t\t\t\t/* Ensemble contenant item associe a i*/\r\n\t\t\t\tBasicSet I=new BasicSet();\r\n\t\t\t\tI.add(item);\r\n\r\n\t\t\t\t/*A union I*/\t\r\n\t\t\t\tA=A.union(I);\r\n\t\t\t\tBasicSet union=(BasicSet) A.clone();\r\n\t\t\t\t//System.out.println(\" union \"+union);\r\n\r\n\t\t\t\t//fermes.add(union);\r\n\r\n\t\t\t\tfermes.add(union);\r\n\t\t\t\t//System.out.println(\"ll11 \"+fermes);\r\n\r\n\t\t\t\t/* Calcul du ferme de A*/\r\n\t\t\t\tBasicSet b=ap.CalculYseconde(A,context);\r\n\r\n\t\t\t\t//BasicSet b=this.LpClosure(A);\r\n\t\t\t\t//System.out.println(\"b procchain \"+b);\r\n\r\n\t\t\t\t//System.out.println(\"b sec \"+b);\r\n\t\t\t\tBasicSet diff=new BasicSet();\r\n\t\t\t\tdiff=b.difference(A);\r\n\t\t\t\tMap <String,Integer> repB=this.RepresentationBinaire(diff);\r\n\t\t\t\tBasicSet test=new BasicSet();\r\n\t\t\t\tMap <String,Integer> testt=RepresentationBinaire(test);\r\n\t\t\t\ttestt.put(item, 1);\r\n\r\n\t\t\t\t/* on teste si l ensemble B\\A est plus petit que l ensemble contenant i\r\n\t\t\t\t * Si B\\A est plus petit alors on affecte B à A.\r\n\t\t\t\t **/\r\n\r\n\t\t\t\tif(item.equals(b.first())||LecticOrder(repB,testt)){\r\n\t\t\t\t\t//System.out.println(\"A succes=true \"+ A);\r\n\t\t\t\t\tA=b;\r\n\t\t\t\t\tsuccess=true;\t \r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tA.remove(item);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tA.remove(item);\r\n\t\t\t}\t\t\t\r\n\t\t\ti--;\r\n\t\t}\t\t\r\n\t\treturn A;\r\n\t}", "private static HashMap<Method, Double> getActivableActions(FsmModel fsm, HashMap<Method, Double> actionsAndProbabilities) {\n // computation of activable methods\n HashMap<Method, Double> activableOnes = new HashMap<Method, Double>();\n double sum = 0;\n for (Method act : actionsAndProbabilities.keySet()) {\n try {\n Method actGuard = fsm.getClass().getDeclaredMethod(act.getName() + \"Guard\");\n if ((Boolean) actGuard.invoke(fsm)) {\n Method actProba = fsm.getClass().getDeclaredMethod(act.getName() + \"Proba\");\n double proba = (Double) actProba.invoke(fsm);\n activableOnes.put(act, proba);\n sum += proba; // checksum\n }\n } catch (NoSuchMethodException e) {\n System.err.println(\"Warning: method \" + act.getName() + \" is not guarded.\");\n System.err.println(\"Will be ignored. \");\n } catch (IllegalAccessException e) {\n System.err.println(\"Illegal access to \" + act.getName());\n System.err.println(\"Shouldn't have happened\");\n // e.printStackTrace(System.err);\n } catch (InvocationTargetException e) {\n System.err.println(\"Exception on target invocation on \" + act.getName());\n System.err.println(\"Shouldn't have happened\");\n // e.printStackTrace(System.err);\n } \n if (sum > 1) {\n System.err.println(\"Warning: sum of probabilities of activable actionsAndProbabilities is > 1 !\\n\" + activableOnes);\n }\n }\n return activableOnes;\n }", "private Map<S, List<Node<S>>> getAllOccurrences() {\n List<P> productions = slp.getOrderedProductions();\n Map<S, List<Node<S>>> predecessorMap = new HashMap<>();\n slp.getProductions().stream().map(p -> p.getLeft()).forEach(symbol -> predecessorMap.put(symbol, new ArrayList<>()));\n\n // gather all occurrence\n productions.stream()\n .map(rule -> rule.getRight())\n .flatMap(word -> word.nodeStream())\n .filter(node -> !node.getElement().isTerminal())\n .forEach(node -> predecessorMap.get(node.getElement()).add(node));\n\n return predecessorMap;\n }", "private void identifySuccessors(T node, T goal, Set<T> goals, Queue<T> open, Set<T> closed, Map<T, T> parentMap,\n Map<T, Double> fMap, Map<T, Double> gMap, Map<T, Double> hMap) {\n // get all neighbors to the current node\n Collection<T> neighbors = findNeighbors(node, parentMap);\n\n double d;\n double ng;\n for (T neighbor : neighbors) {\n // jump in the direction of our neighbor\n T jumpNode = jump(neighbor, node, goals);\n\n // don't add a node we have already gotten to quicker\n if (jumpNode == null || closed.contains(jumpNode)) continue;\n\n // determine the jumpNode's distance from the start along the current path\n d = graph.getDistance(jumpNode, node);\n ng = gMap.getOrDefault(node, 0d) + d;\n\n // if the node has already been opened and this is a shorter path, update it\n // if it hasn't been opened, mark as open and update it\n if (!open.contains(jumpNode) || ng < gMap.getOrDefault(jumpNode, 0d)) {\n gMap.put(jumpNode, ng);\n hMap.put(jumpNode, graph.getHeuristicDistance(jumpNode, goal));\n fMap.put(jumpNode, gMap.getOrDefault(jumpNode, 0d) + hMap.getOrDefault(jumpNode, 0d));\n //System.out.println(\"jumpNode: \" + jumpNode.x + \",\" + jumpNode.y + \" f: \" + fMap.get(jumpNode));\n parentMap.put(jumpNode, node);\n\n if (!open.contains(jumpNode)) {\n open.offer(jumpNode);\n }\n }\n }\n }", "public abstract List<ThingNode> getFutureWorldStates(Instruction action);", "Set<Object> getBeforeProcessors();", "private boolean partialEnablingPredecessor(\r\n\t\t\tfinal Rule ri,\r\n\t\t\tfinal int i,\r\n\t\t\tfinal List<Rule> sequence, \r\n\t\t\tfinal Graph g) {\r\n//\t\tSystem.out.println(\"\\n=== >>> ApplicabilityChecker.partialEnablingPredecessor ... of \"+ri.getName());\r\n\t\t\r\n\t\tboolean result = false;\r\n\t\t\r\n\t\tfor (int j=i-1; j>=0; j--) {\r\n\t\t\tRule rj = sequence.get(j);\r\n\t\t\tthis.info = rj.getName();\t\r\n\t\t\t\t\r\n\t\t\tPair<Boolean, List<String>> pair = this.ruleSequence.getRuleResult(j, rj.getName(), ApplicabilityConstants.PREDECESSOR_NOT_NEEDED);\r\n\t\t\tif (pair == null)\r\n\t\t\t\tpair = this.ruleSequence.getRuleResult(j, rj.getName(), ApplicabilityConstants.INITIALIZATION);\r\n\t\t\t\r\n\t\t\tif (pair != null && pair.first.booleanValue()) {\r\n//\t\t\t\tSystem.out.println(\"=== >>> ApplicabilityChecker.partialEnablingPredecessor :: applicable: \"+rj.getName());\r\n\t\t\t\t// rule rj is applicable to graph g\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t// get new list of concurrent rules of the current rule ri\r\n\t\t\t\tList<List<ConcurrentRule>> concurRuleLists = this.ruleSequence.getListsOfConcurrentRules(ri, i);\r\n\t\t\t\tif (concurRuleLists == null) {\r\n\t\t\t\t\tconcurRuleLists = new Vector<List<ConcurrentRule>> ();\r\n\t\t\t\t\tthis.ruleSequence.putListsOfConcurrentRules(ri, i, concurRuleLists);\r\n\t\t\t\t}\r\n\t\t\t\t// make concurrent rule(s) due to dependency pair overlapping\r\n\t\t\t\tList<ConcurrentRule> list = this.makeJointlyConcurrentRule(rj, j, ri, i);\r\n\t\t\t\t\r\n\t\t \t\tif (list != null && !list.isEmpty()) {\r\n\t\t \t\t\tconcurRuleLists.add(list);\r\n\t\t \t\t\tint d = 1;\r\n\t\t \t\t\t\r\n\t\t \t\t\t// set match of concurrent rule, (check due to ObjectFlow?)\r\n\t\t\t\t\tfinal Hashtable<GraphObject, GraphObject> \r\n\t\t\t\t\trjMatch = this.ruleSequence.getMatchSequence().getDirectMatch(j, rj);\r\n\t\t\t\t\tif (rjMatch != null) {\t\t\t\t\t\t\r\n\t\t \t\t\t\tfor (int c=0; c<list.size(); c++) {\r\n\t\t \t\t\t\t\tfinal ConcurrentRule cr = list.get(c);\r\n\t\t \t\t\t\t\tif (!rjMatch.isEmpty() &&\r\n\t\t \t\t\t\t\t\t\t!cr.forwardMatchMappingOfFirstSourceRule(rjMatch, this.ruleSequence.getGraph())) {\r\n\t\t \t\t\t\t\t\tlist.remove(c);\r\n\t\t \t\t\t\t\t\tc--;\r\n\t\t \t\t\t\t\t} \r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\tfor (int k = 0; k<list.size(); k++) {\r\n\t\t \t\t\t\t\tConcurrentRule cr = list.get(k);\t\t\t\t\r\n\t\t \t\t\t\t\tif (isConcurrentRuleApplicable(i, ri, \r\n\t\t \t\t\t\t\t\t\tthis.ruleSequence.getRules(), g, \r\n\t\t \t\t\t\t\t\t\tcr, d, ApplicabilityConstants.PARTIAL_ENABLING_PREDECESSOR)) {\r\n\t\t \t\t\t\t\t\tresult = true;\r\n\t\t \t\t\t\t\t\tSystem.out.println(\"=== >>> ApplicabilityChecker.partialEnablingPredecessor: of rule: \"+ri.getName()+\" is rule: \"+rj.getName());\r\n\t\t \t\t\t\t\t\tbreak;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t}\t\t\t\r\n\t\t \t\t\t\tif (result)\r\n\t\t \t\t\t\t\tbreak;\t\t \t\t\t\t\r\n\t\t \t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (result) {\r\n\t\t\tsetRuleResult(i, ri.getName(), true, ApplicabilityConstants.PARTIAL_ENABLING_PREDECESSOR, this.info);\r\n//\t\t\tsetRuleResult(i, ri.getName(), true, ApplicabilityConstants.DIRECT_ENABLING_PREDECESSOR, \"\");\r\n\t\t\tsetRuleResult(i, ri.getName(), false, ApplicabilityConstants.NO_ENABLING_PREDECESSOR, \"(partial)\");\t\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "public State[] getSuccessors(char player) {\n\t\t// TO DO: get all successors and return them in proper order\r\n\t\tchar[][] board = convert2D(this.board);\r\n\r\n\t\tchar opponent;\r\n\t\tif(player == '2')\r\n\t\t\topponent = '1';\r\n\t\telse \r\n\t\t\topponent = '2';\r\n\r\n\t\tArrayList<State> successors = new ArrayList<State>();\r\n\r\n\t\tArrayList<Integer> row = new ArrayList<Integer>();\r\n\r\n\t\tArrayList<Integer> col = new ArrayList<Integer>();\r\n\t\t//ArrayList<Integer[]> indices = new ArrayList<Integer[]>();\r\n\r\n\t\tfor(int i = 0;i < 4; ++i){\r\n\r\n\t\t\tfor(int j = 0;j < 4; ++j){\r\n\r\n\t\t\t\tif(board[i][j] == opponent){\r\n\r\n\t\t\t\t\tint I = i, J = j; \r\n\t\t\t\t\t//upper left diag\r\n\t\t\t\t\tif(i-1 >= 0 && j-1 >= 0 && board[i-1][j-1] == '0'){ \r\n\r\n\t\t\t\t\t\ti = i+1; \r\n\t\t\t\t\t\tj = j+1;\r\n\r\n\t\t\t\t\t\twhile(i < 3 && j < 3 && board[i][j] == opponent)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ti++;j++;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(i <= 3 && j <= 3 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I-1,J-1)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I-1);\r\n\t\t\t\t\t\t\t\tcol.add(J-1);\r\n\r\n\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\ti=I;j=J;\r\n\t\t\t\t\t//left\r\n\t\t\t\t\tif(i-1>=0 && board[i-1][j] == '0'){\r\n\t\t\t\t\t\ti = i+1;\r\n\r\n\t\t\t\t\t\twhile(i < 3 && board[i][j] == opponent) \r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tif(i<=3 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I-1,J)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I-1);\r\n\t\t\t\t\t\t\t\tcol.add(J);\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\ti=I;\r\n\r\n\t\t\t\t\t//lower left diag\r\n\t\t\t\t\tif(i-1 >= 0 && j+1 <= 3 && board[i-1][j+1] == '0'){\r\n\r\n\t\t\t\t\t\ti = i+1; j = j-1;\r\n\r\n\t\t\t\t\t\twhile(i<3 && j>0 && board[i][j] == opponent)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ti++;j--;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(i<=3 && j>=0 && board[i][j] == player) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(!exists(row,col,I-1,J+1)) {\r\n\t\t\t\t\t\t\t\trow.add(I-1);\r\n\t\t\t\t\t\t\t\tcol.add(J+1);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\r\n\t\t\t\t\ti=I;\r\n\t\t\t\t\tj=J;\r\n\r\n\t\t\t\t\t//up\r\n\t\t\t\t\tif(j-1>=0 && board[i][j-1] == '0'){\r\n\t\t\t\t\t\tj = j+1;\r\n\r\n\t\t\t\t\t\twhile(j < 3 && board[i][j] == opponent)\r\n\t\t\t\t\t\t\tj++;\r\n\r\n\t\t\t\t\t\tif(j <= 3 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I,J-1)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I);\r\n\t\t\t\t\t\t\t\tcol.add(J-1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tj=J;\r\n\t\t\t\t\t//down\r\n\t\t\t\t\tif(j+1 <= 3 && board[i][j+1] == '0'){\r\n\r\n\t\t\t\t\t\tj=j-1;\r\n\r\n\t\t\t\t\t\twhile(j > 0 && board[i][j] == opponent)\r\n\t\t\t\t\t\t\tj--;\r\n\r\n\t\t\t\t\t\tif(j >= 0 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I,J+1)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I);\r\n\t\t\t\t\t\t\t\tcol.add(J+1);\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\tj=J;\r\n\t\t\t\t\t//upper right\r\n\t\t\t\t\tif(i+1<=3 && j-1>=0 && board[i+1][j-1] == '0'){\r\n\r\n\t\t\t\t\t\ti=i-1;\r\n\t\t\t\t\t\tj=j+1;\r\n\r\n\t\t\t\t\t\twhile(i > 0 && j < 3 && board[i][j] == opponent){\r\n\r\n\t\t\t\t\t\t\ti--;\r\n\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(i >= 0 && j <= 3 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I+1,J-1)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I+1);\r\n\t\t\t\t\t\t\t\tcol.add(J-1);\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ti=I;\r\n\t\t\t\t\tj=J;\r\n\t\t\t\t\t//right\r\n\t\t\t\t\tif(i+1 <= 3 && board[i+1][j] == '0'){\r\n\t\t\t\t\t\ti=i-1;\r\n\r\n\t\t\t\t\t\twhile(i > 0 && board[i][j] == opponent) \r\n\t\t\t\t\t\t\ti--;\r\n\r\n\t\t\t\t\t\tif(i >= 0 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row,col,I+1,J)) {\r\n\r\n\t\t\t\t\t\t\t\trow.add(I+1);\r\n\t\t\t\t\t\t\t\tcol.add(J);\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\ti=I;\r\n\t\t\t\t\t//lower right diag\r\n\t\t\t\t\tif(i+1 <= 3 && j+1 <=3 && board[i+1][j+1] == '0'){\r\n\r\n\t\t\t\t\t\ti=i-1;\r\n\t\t\t\t\t\tj=j-1;\r\n\r\n\t\t\t\t\t\twhile(i > 0 && j > 0 && board[i][j] == opponent)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ti--;\r\n\t\t\t\t\t\t\tj--;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(i >= 0 && j >= 0 && board[i][j] == player) {\r\n\r\n\t\t\t\t\t\t\tif(!exists(row, col, I+1, J+1)) {\t\r\n\r\n\t\t\t\t\t\t\t\trow.add(I+1);\r\n\t\t\t\t\t\t\t\tcol.add(J+1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ti=I;\r\n\t\t\t\t\tj=J;\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t} \r\n\t\t//Adding to successors\r\n\t\tfor(int i = 0; i < row.size(); i++) {\r\n\r\n\t\t\tsuccessors.add(move(player, row.get(i), col.get(i)));\r\n\t\t}\r\n\r\n\t\t//Create an array,\r\n\t\tState[] succsArray = new State[successors.size()];\r\n\t\t//get data in array\r\n\t\tsuccsArray = successors.toArray(succsArray);\r\n\r\n\t\treturn succsArray;\t\r\n\t}", "private BDD reachableStates(BDD i, BDD t, BDD x, Map<Integer, Integer> renaming){\n\t\tSystem.out.println(\"\\n\" + \"[*] Computing reachable states\" + \"\\n\");\n\n\t\tBDD result = this.factory.makeZero();\n\t\tBDD rCopy = null;\n\n\t\tint counter = 1;\n\t\tdo{\n\n\t\t\tSystem.out.println(\" - iteration K = \" + counter++);\n\n\t\t\tif(rCopy != null)\n\t\t\t\trCopy.free();\n\n\t\t\trCopy = result;\t\n\n\t\t\tBDD and = t.and(result);\t\t\t\n\t\t\tBDD exist = and.exist(x);\n\t\t\tand.free();\n\n\t\t\tBDD replace = exist.replace(renaming);\n\t\t\tresult = i.or(replace);\n\n\t\t\treplace.free();\n\n\t\t}while(!result.isEquivalentTo(rCopy));\n\n\t\trCopy.free();\n\n\t\tSystem.out.println(\"\\n\" + \"[*] Done computing reachable states\" + \"\\n\");\n\n\t\treturn result;\n\t}", "public static void predecessorAndSuccessor(Node node, int data) {\n if(state==0){\n if(node.data==data)\n state++;\n else\n predecessor=node;\n }\n else if(state==1){\n successor=node;\n state++;\n return;\n }\n for(Node n:node.children)\n {\n if(state<2)\n predecessorAndSuccessor(n,data);\n }\n }", "public List<Funcion> getConjuntoFunciones() {\n\t\treturn conjuntoFunciones;\n\t}", "private static boolean checkFunct(String funct){\n int[][] mas = new int[5][32];\n for(int i=0;i<5;i++){\n switch (i){\n case 0:\n for(int j=0;j<16;j++){\n checkForX(funct, mas, i, j,16);\n }\n break;\n case 1:\n for(int j=0;j<8;j++){\n checkForX(funct, mas, i, j,8);\n }\n for(int j=16;j<24;j++){\n checkForX(funct, mas, i, j,8);\n }\n break;\n case 2:\n for(int j=0;j<4;j++){\n checkForX(funct, mas, i, j,4);\n }\n for(int j=8;j<12;j++){\n checkForX(funct, mas, i, j,4);\n }\n for(int j=16;j<20;j++){\n checkForX(funct, mas, i, j,4);\n }\n for(int j=24;j<28;j++){\n checkForX(funct, mas, i, j,4);\n }\n break;\n case 3:\n for(int j=0;j<2;j++){\n checkForX(funct, mas, i, j,2);\n }\n for(int j=4;j<6;j++){\n checkForX(funct, mas, i, j,2);\n }\n for(int j=8;j<10;j++){\n checkForX(funct, mas, i, j,2);\n }\n for(int j=12;j<14;j++){\n checkForX(funct, mas, i, j,2);\n }\n for(int j=16;j<18;j++){\n checkForX(funct, mas, i, j,2);\n }\n for(int j=20;j<22;j++){\n checkForX(funct, mas, i, j,2);\n }\n for(int j=24;j<26;j++){\n checkForX(funct, mas, i, j,2);\n }\n for(int j=28;j<30;j++){\n checkForX(funct, mas, i, j,2);\n }\n break;\n case 4:\n for(int j=0;j<32;j+=2){\n checkForX(funct, mas, i, j,1);\n }\n break;\n }\n }\n int[] sums = new int[5];\n for (int i=0;i<32;i++){\n for(int j=0;j<5;j++){\n sums[j]+=mas[j][i];\n }\n }\n return (sums[0] == 16 && sums[1] == 16 && sums[2] == 16 && sums[3] == 16 && sums[4] == 16)&&checkBalance(funct);\n }", "private static List<State<StepStateful>> getStates() {\n List<State<StepStateful>> states = new LinkedList<>();\n states.add(s0);\n states.add(s1);\n states.add(s2);\n states.add(s3);\n states.add(s4);\n states.add(s5);\n states.add(s6);\n return states;\n }", "private void reachable(Set s) {\n for (Iterator i = this.succ.iterator(); i.hasNext(); ) {\n IdentityHashCodeWrapper ap = (IdentityHashCodeWrapper)i.next();\n if (!s.contains(ap)) {\n s.add(ap);\n ((AccessPath)ap.getObject()).reachable(s);\n }\n }\n }", "private List<Set<BitSet>> buildPFunction(boolean[][] table, boolean[] coveredMinterms) {\n\n\t\tList<Set<BitSet>> pFunction = new ArrayList<>();\n\n\t\tfor (int i = 0; i < coveredMinterms.length; i++) {\n\n\t\t\tSet<BitSet> currentColumn = new LinkedHashSet<>();\n\n\t\t\tfor (int j = 0; j < table.length; j++) {\n\n\t\t\t\tif (table[j][i] && !coveredMinterms[i]) {\n\t\t\t\t\tBitSet current = new BitSet();\n\t\t\t\t\tcurrent.set(j);\n\t\t\t\t\tcurrentColumn.add(current);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentColumn.size() > 0) {\n\t\t\t\tpFunction.add(currentColumn);\n\t\t\t}\n\t\t}\n\t\treturn pFunction;\n\t}", "boolean hasHas_consequence();", "public HashSet<Point> getValidMoves(){\n HashSet<Point> set = new HashSet<Point>();\n if(this.validMove(this.x() + 2, this.y() + 1)){\n set.add(new Point(this.x() + 2, this.y() + 1));\n }\n if(this.validMove(this.x() + 2, this.y() - 1)){\n set.add(new Point(this.x() + 2, this.y() - 1));\n }\n if(this.validMove(this.x() - 2, this.y() + 1)){\n set.add(new Point(this.x() - 2, this.y() + 1));\n }\n if(this.validMove(this.x() - 2, this.y() - 1)){\n set.add(new Point(this.x() - 2, this.y() - 1));\n }\n if(this.validMove(this.x() + 1, this.y() + 2)){\n set.add(new Point(this.x() + 1, this.y() + 2));\n }\n if(this.validMove(this.x() + 1, this.y() - 2)){\n set.add(new Point(this.x() + 1, this.y() - 2));\n }\n if(this.validMove(this.x() - 1, this.y() + 2)){\n set.add(new Point(this.x() - 1, this.y() + 2));\n }\n if(this.validMove(this.x() - 1, this.y() - 2)){\n set.add(new Point(this.x() - 1, this.y() - 2));\n }\n return set;\n }", "private List<ParseTree> separateAND(ParseTree t){\n List<ParseTree> nodes = new ArrayList<ParseTree>();\n List<ParseTree> aux = getNodes(t, RulesParser.RULE_conjuncion);\n List<ParseTree> factores = getNodes(t, RulesParser.RULE_factor); // factors enclosed in parentheses, such as ((1+2)+3)\n int count = 0;\n for (int i = 0; i < factores.size(); i++) {\n if (((RulesParser.FactorContext) factores.get(i)).PA() != null){\n count++;\n }\n }\n int params = Trees.findAllRuleNodes(t, RulesParser.RULE_parametros).size();\n params = aux.size() == params ? 0 : params;\n for (int i = 0; i < aux.size() - params - count; i++) {\n if (aux.get(i).getChild(i) instanceof RulesParser.ConjuncionContext){\n nodes.add(((RulesParser.ConjuncionContext) aux.get(i)).igualdad());\n } else{\n nodes.add(aux.get(i));\n }\n }\n Collections.reverse(nodes);\n return nodes;\n }", "public static void main(String[] args) {\n\t\tfor (int i = 0; i<8; i++)\t\t\n\t\tsuccesscounter(i);\t\t\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(successCounter);\n\t}", "@Override\n public Set<DataFact> visitReturn(CGNode n, SSAReturnInstruction instruction, DataFact fact) {\n\n return Collections.singleton(fact);\n }", "public Set<Integer> want() {\n Set<Integer> wanted = new HashSet<>();\n if (incomplete[0] == incomplete[1]) {\n wanted.add(incomplete[0]);\n } else if (Math.abs(incomplete[0] - incomplete[1]) == 1) {\n int left = Math.min(incomplete[0], incomplete[1]);\n if (left - 1 >= 0) wanted.add(left - 1);\n if (left + 2 <= 8) wanted.add(left + 2);\n } else if (Math.abs(incomplete[0] - incomplete[1]) == 2) {\n wanted.add(Math.min(incomplete[0], incomplete[1]) + 1);\n }\n return wanted;\n }", "@Override\r\n\tpublic Set<NFAState> eClosure(NFAState s) {\r\n\t\tSet<NFAState> l = new HashSet<>();\r\n\t\treturn depthFirstSearch(l, s);\r\n\t}", "public void removeAllSuccessors() {\n\t\tfor (int idx=0; idx < this.successorNodes.length; idx++) {\n\t\t\tBaseNode bn = (BaseNode) this.successorNodes[idx];\n\t\t\tbn.removeAllSuccessors();\n\t\t}\n\t\tthis.successorNodes = new BaseNode[0];\n this.useCount = 0;\n\t}", "public void removeAllSuccessors() {\n\t\tfor (int idx=0; idx < this.successorNodes.length; idx++) {\n\t\t\tBaseNode bn = (BaseNode) this.successorNodes[idx];\n\t\t\tbn.removeAllSuccessors();\n\t\t}\n\t\tthis.successorNodes = new BaseNode[0];\n this.useCount = 0;\n\t}", "Iterable<T> getFunctions();", "private static Triple<SetFormula, Literal, Set<AtomicFormula>> getEquisatisfiableCNFRec(Formula f, Set<AtomicFormula> occurences) {\n\t\tif (f instanceof AtomicFormula) {\n\t\t\tLiteral l = new Literal((AtomicFormula) f);\n\t\t\tSetFormula s = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\t// Just return essentially the inital formula\n\t\t\treturn new Triple<>(s,l, occurences);\n\t\t}\n\t\tif(f instanceof NOTFormula)\n\t\t{\n\t\t\tNOTFormula g = (NOTFormula)f;\n\t\t\tLiteral l = new Literal((AtomicFormula) g.getArgumentFormula(), false);\n\t\t\tSetFormula s = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\t// Just return essentially the inital formula\n\t\t\treturn new Triple<>(s,l, occurences);\n\t\t}\n\t\tif(f instanceof ORFormula)\n\t\t{\n\t\t\tORFormula g = (ORFormula)f;\n\t\t\tSetFormula setFormula = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\tHolder<SetFormula> setFormulaHolder = new Holder<SetFormula>(setFormula);\n\t\t\tSet<AtomicFormula> newOccurences = new HashSet<>(occurences);\n\t\t\tSet<Literal> leadingLiterals = new HashSet<>();\n\t\t\tg.getOrigList().forEach(e -> {\n\t\t\t\tTriple<SetFormula, Literal, Set<AtomicFormula>> triple = getEquisatisfiableCNFRec(e, newOccurences);\n\t\t\t\tnewOccurences.addAll(triple.getThird());\n\t\t\t\tleadingLiterals.add(triple.getSecond());\n\t\t\t\tsetFormulaHolder.set(setFormulaHolder.get().and(triple.getFirst()));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder.get();\n\t\t\tLiteral leadingLiteral = new Literal(Formula.getNewAtomicFormula(newOccurences));\n\t\t\tnewOccurences.add(leadingLiteral.getFormula());\n\t\t\tSet<Literal> firstSet = new HashSet<>(leadingLiterals);\n\t\t\tfirstSet.add(leadingLiteral.negate());\n\t\t\tsetFormula = setFormula.and(new SetFormula(LogicHelper.createSet(firstSet), Type.CNF));\n\t\t\tHolder<SetFormula> setFormulaHolder2 = new Holder<SetFormula>(setFormula);\n\t\t\tleadingLiterals.forEach(l -> {\n\t\t\t\tsetFormulaHolder2.set(setFormulaHolder2.get().and(new SetFormula(LogicHelper.createSet(LogicHelper.createSet(leadingLiteral, l.negate())),Type.CNF)));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder2.get();\n\t\t\treturn new Triple<>(setFormula, leadingLiteral, newOccurences);\n\t\t}\n\t\tif(f instanceof ANDFormula)\n\t\t{\n\t\t\tANDFormula g = (ANDFormula)f;\n\t\t\tSetFormula setFormula = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\tHolder<SetFormula> setFormulaHolder = new Holder<SetFormula>(setFormula);\n\t\t\tSet<AtomicFormula> newOccurences = new HashSet<>(occurences);\n\t\t\tSet<Literal> leadingLiterals = new HashSet<>();\n\t\t\tg.getOrigList().forEach(e -> {\n\t\t\t\tTriple<SetFormula, Literal, Set<AtomicFormula>> triple = getEquisatisfiableCNFRec(e, newOccurences);\n\t\t\t\tnewOccurences.addAll(triple.getThird());\n\t\t\t\tleadingLiterals.add(triple.getSecond());\n\t\t\t\tsetFormulaHolder.set(setFormulaHolder.get().and(triple.getFirst()));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder.get();\n\t\t\tLiteral leadingLiteral = new Literal(Formula.getNewAtomicFormula(newOccurences));\n\t\t\tnewOccurences.add(leadingLiteral.getFormula());\n\t\t\tSet<Literal> firstSet = new HashSet<>(LogicHelper.convert(leadingLiterals, l -> l.negate()));\n\t\t\tfirstSet.add(leadingLiteral);\n\t\t\tsetFormula = setFormula.and(new SetFormula(LogicHelper.createSet(firstSet), Type.CNF));\n\t\t\tHolder<SetFormula> setFormulaHolder2 = new Holder<SetFormula>(setFormula);\n\t\t\tLiteral leadingLiteralNegation = leadingLiteral.negate();\n\t\t\tleadingLiterals.forEach(l -> {\n\t\t\t\tsetFormulaHolder2.set(setFormulaHolder2.get().and(new SetFormula(LogicHelper.createSet(LogicHelper.createSet(leadingLiteralNegation, l)),Type.CNF)));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder2.get();\n\t\t\treturn new Triple<>(setFormula, leadingLiteral, newOccurences);\n\t\t}\n\t\tthrow new IllegalArgumentException(\"Formula type not supported\");\n\t}", "List<Ranking> calculateOutcomeRanks(List<Instruction> instructions);", "<R> MultiSet<R> map(Function<X, R> f);", "public List<AllocatableAction> replaceSuccessors(List<AllocatableAction> newSuccessors) {\n List<AllocatableAction> oldSuccessors = this.resourceSuccessors;\n this.resourceSuccessors = newSuccessors;\n return oldSuccessors;\n }", "public void solveGame4() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\t\t\t\tcurrentSet.add(s);\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\t\t\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t}\n\n\t\t// Handle the pending states\n\t\twhile (!losing.isEmpty()) {\n\t\t\tS state = losing.poll();\n\n\t\t\t\n\t\t\tlosingStates.add(state);\n\n\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\tfor (S pred : predecessors) {\n\t\t\t\tif(losing.contains(pred) || losingStates.contains(pred))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t//if(i == -1)\n\t\t\t\t\t//continue;\n\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}else{\n\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "public FunctionIterator getFunctions(boolean forward);", "static <S, F> Function<Result<Stream<S>, F>, Stream<Result<S, F>>> unwrapSuccesses() {\n return r -> r.either(\n successes -> successes.map(Result::success),\n failure -> Stream.of(Result.failure(failure))\n );\n }", "@Test public void hofCont() {\n check(\"declare function local:f($n) { if($n eq 0) then 42 else local:f($n - 1) };\" +\n \"distinct-values(fn:for-each((1 to 10) ! 1000, function($x) { local:f($x) }))\",\n\n 42\n );\n }", "private HashSet<ForestAutomaton> onlyOneFinalRule(ForestAutomaton srcFa, TreeAutomaton srcTA) throws Exception {\n \tsrcTA.unwindTA_fromRoot();\n \tsrcFa.removeDeadTransitions();\n \tHashSet<ForestAutomaton> ret=new HashSet<ForestAutomaton>();\n \tHashSet<Transition> trans=srcTA.getTransTo(srcTA.getFinal());\n \tfor(Transition tran:trans){\n \t\tsrcTA.delTrans(tran);\n \t}\n \tfor(Transition tran:trans){\n\t\t\tForestAutomaton fa=new ForestAutomaton(srcFa);\n\t\t\tTreeAutomaton ta=fa.getTreeAutomataWithRoot(srcTA.getFinal());\n\t\t\tta.addTrans(tran);\n\t\t\tfa.removeDeadTransitions();\n\t\t\tret.add(fa);\n \t}\n \treturn ret; \n }", "boolean getProbables();", "private BasicBlock getUniqueNext(ControlFlowGraph graph, HashSet<BasicBlock[]> setNext) {\n\t\t\n\t\tBasicBlock next = null;\n\t\tboolean multiple = false;\n\t\t\n\t\tfor(BasicBlock[] arr : setNext) {\n\t\t\t\n\t\t\tif(arr[2] != null) {\n\t\t\t\tnext = arr[1];\n\t\t\t\tmultiple = false;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tif(next == null) {\n\t\t\t\t\tnext = arr[1];\n\t\t\t\t} else if(next != arr[1]) {\n\t\t\t\t\tmultiple = true;\n\t\t\t\t}\n\n\t\t\t\tif(arr[1].getPreds().size() == 1) {\n\t\t\t\t\tnext = arr[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(multiple) { // TODO: generic solution\n\t\t\tfor(BasicBlock[] arr : setNext) {\n\t\t\t\tBasicBlock block = arr[1];\n\t\t\t\t\n\t\t\t\tif(block != next) {\n\t\t\t\t\tif(InterpreterUtil.equalSets(next.getSuccs(), block.getSuccs())) {\n\t\t\t\t\t\tInstructionSequence seqNext = next.getSeq();\n\t\t\t\t\t\tInstructionSequence seqBlock = block.getSeq();\n\n\t\t\t\t\t\tif(seqNext.length() == seqBlock.length()) {\n\t\t\t\t\t\t\tfor(int i=0;i<seqNext.length();i++) {\n\t\t\t\t\t\t\t\tInstruction instrNext = seqNext.getInstr(i);\n\t\t\t\t\t\t\t\tInstruction instrBlock = seqBlock.getInstr(i);\n\n\t\t\t\t\t\t\t\tif(instrNext.opcode != instrBlock.opcode || instrNext.wide != instrBlock.wide\n\t\t\t\t\t\t\t\t\t\t|| instrNext.operandsCount() != instrBlock.operandsCount()) {\n\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfor(int j=0;i<instrNext.getOperands().length;j++) {\n\t\t\t\t\t\t\t\t\tif(instrNext.getOperand(j) != instrBlock.getOperand(j)) {\n\t\t\t\t\t\t\t\t\t\treturn null;\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} else {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n//\t\t\ttry {\n//\t\t\t\tDotExporter.toDotFile(graph, new File(\"c:\\\\Temp\\\\fern5.dot\"), true);\n//\t\t\t} catch(IOException ex) {\n//\t\t\t\tex.printStackTrace();\n//\t\t\t}\n\t\t\t\n\t\t\tfor(BasicBlock[] arr : setNext) {\n\t\t\t\tif(arr[1] != next) {\n\t\t\t\t\t// FIXME: exception edge possible?\n\t\t\t\t\tarr[0].removeSuccessor(arr[1]);\n\t\t\t\t\tarr[0].addSuccessor(next);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tDeadCodeHelper.removeDeadBlocks(graph);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn next;\n\t}", "public FunctionIterator getFunctions(Address start, boolean forward);", "public double[][] activateFunction(){\n\t\n\t\tboolean run = true;\n\t\tint count = 0;\n\t\tdouble[][] output = null;\n\t\twhile(run){\n\t\t\toutput = sign(subtract(multiply(weights, entryCoord), thresholds));\n\t\t\t\tfor(int i = 0; i < trainingList.size(); i++){\n\t\t\t\t\tfor(int j = 0; j < (XDIMENSION * YDIMENSION); j++){\n\t\t\t\t\t\tif(trainingList.get(i)[j][0] == output[j][0]){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(count == (XDIMENSION * YDIMENSION)){\n\t\t\t\t\t\t\trun = false;\n\t\t\t\t\t\t\tfor(int k = 0; k < output.length; k++){\n\t\t\t\t\t\t\t\tSystem.out.print(output[k][0] + \" \");\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\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcount = 0;\n\t\t\t\t}\t\n\t\n\t\t}\n\t\treturn makeGrid(output);\n\t}", "Set<Object> getAfterProcessors();", "Iterable<Callable<?>> getCommands(Class<? extends Annotation> transition);", "public static void predecessorAndSuccessor(Node node, int data) {\r\n if(state == 0){\r\n if(node.data == data){\r\n state++;\r\n }\r\n else{\r\n predecessor = node;\r\n }\r\n \r\n }\r\n \r\n //Now if state = 1, then we are on successor element, as we found data on last element and then just increased state and\r\n // moved ahead. So now here we update successor and increase state. Now state is > 2. So further calls will not take place.\r\n else if(state == 1){\r\n successor = node;\r\n state++;\r\n return;\r\n }\r\n \r\n for(Node child : node.children){\r\n if(state < 2){\r\n predecessorAndSuccessor(child, data);\r\n }\r\n }\r\n }", "private void writeSuccessor(INode prev, Node succ) {\n if (succ == null) {\n return;\n }\n Label prevKey = trapwriter.localID(prev);\n writeSuccessor(prevKey, succ);\n }", "private void writeSuccessor(Label prevKey, Node succ) {\n trapwriter.addTuple(\"successor\", prevKey, trapwriter.localID(succ));\n }", "public void clearOptimizingSuccessors() {\n this.optimizingSuccessors.clear();\n }", "LinkedList<Loop> getCommonEnclosingLoops();", "static <T> Predicate<T> compose(Predicate<T>... functions) {\n return Stream.of(functions).reduce(__ -> true, Predicate::and);\n }", "@FunctionalInterface\npublic interface TriFunction<T, U, V, R> {\n /**\n * Invokes the function with the specified arguments and returns the result.\n * \n * @param input1 the first argument\n * @param input2 the second argument\n * @param input3 the third argument\n * @return the function's result\n */\n R apply(T input1, U input2, V input3);\n\n /**\n * Returns a composed function that first applies this function to its input, and then applies\n * the {@code after} function to the result. If evaluation of either function throws an\n * exception, it is relayed to the caller of the composed function.\n *\n * @param <W> the type of output of the {@code after} function, and of the composed function\n * @param after the function to apply after this function is applied\n * @return a composed function that first applies this function and then applies the\n * {@code after} function\n * @throws NullPointerException if after is null\n */\n default <W> TriFunction<T, U, V, W> andThen(Function<? super R, ? extends W> after) {\n Objects.requireNonNull(after);\n return (T t, U u, V v) -> after.apply(apply(t, u, v));\n }\n}", "private void buildFunctionCreation(IFunction nd, SuccessorInfo i) {\n // `tail` is the last CFG node in the function creation\n INode tail = nd;\n if (!(nd instanceof AFunctionExpression) && !hoistedFns.contains(nd.getId())) {\n writeSuccessor(tail, nd.getId());\n tail = nd.getId();\n }\n writeSuccessors(tail, nd instanceof AFunctionExpression ? i.getSuccessors(true) : i.getAllSuccessors());\n }", "@Test\n public void shouldSequenceListOfSuccessValidations() {\n\n final List<Validation<Failure, String>> validations = Arrays.asList(success(\"a\"), success(\"b\"), success(\"c\"));\n final Validation<Failure, List<String>> sequenced = Validation.sequence(validations);\n\n assertThat(sequenced, isSuccessOf(Arrays.asList(\"a\", \"b\", \"c\")));\n }", "public static List<String> getFunctionalOpFirstChild(String function) {\n\t\tList<String> childList = new ArrayList<>();\n\t\tif (AGE_AT.equalsIgnoreCase(function)) {\n\t\t\tchildList.add(SUB_TREE_REF);\n\t\t\tchildList.add(RELATIONAL_OP);\n\t\t\tchildList.add(FUNCTIONAL_OP);\n\t\t\tchildList.add(ELEMENT_REF);\n\t\t} else {\n\t\t\tchildList.add(ELEMENT_REF);\n\t\t\tchildList.add(SET_OP);\n\t\t\tchildList.add(SUB_TREE_REF);\n\t\t\tchildList.add(RELATIONAL_OP);\n\t\t}\n\t\treturn childList;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic BasicSet LpClosure(BasicSet x){\r\n\r\n\t\tint used_imps=0;\r\n\t\tBasicSet old_closure = null;\r\n\t\tBasicSet new_closure;\r\n\t\tBasicSet T;\r\n\t\tint usable_imps;\r\n\t\tint use_now_imps;\r\n\t\tVector<String> att=context.getAttributes();\r\n\t\tBasicSet M = new BasicSet();\r\n\t\tM.addAll(att);\r\n\r\n\r\n\t\tint [] avoid=new int[M.size()];\r\n\t\tif(getImp().isEmpty())\r\n\t\t\treturn x;\r\n\t\tfor(int i=0;i<M.size();i++){\r\n\t\t\t//int a=(int)Math.pow(6,4);\r\n\t\t\tint entier =( 1 << getImp().size())-1;\r\n\r\n\t\t\tavoid[i]= entier;\r\n\t\t\t//System.out.println(\"L size \"+Limps.size()+\" entier \"+entier+\" i \"+i+ \" avoid \"+avoid[i]);\r\n\t\t\tfor(int k=0;k<getImp().size();k++){\r\n\t\t\t\tVector<Rule> rrr=(Vector<Rule>) getImp().clone();\r\n\r\n\t\t\t\tRule r=rrr.get(k);\r\n\r\n\t\t\t\tObject [] tt= M.toArray();\r\n\t\t\t\tString ite=(String) tt[i];\r\n\t\t\t\tBasicSet xx=new BasicSet();\r\n\t\t\t\txx.add(ite);\r\n\r\n\t\t\t\tBasicSet ant= (BasicSet) r.getAntecedent().clone();\r\n\r\n\t\t\t\tif(ant.contains(ite)){\r\n\r\n\t\t\t\t\tint bin=1 << k;\r\n\t\t\t\t\tavoid[i] &= ~bin;\t\t\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tused_imps=0;\r\n\t\told_closure=new BasicSet();\r\n\t\told_closure.add(\"-1\");\r\n\t\tnew_closure=x;\r\n\t\tint inter;\r\n\t\tint union;\r\n\r\n\t\twhile(!new_closure.equals(old_closure)){\r\n\t\t\told_closure=(BasicSet) new_closure.clone();\r\n\r\n\t\t\tT=M.difference(new_closure);\r\n\t\t\tint ent=1 << (getImp().size());\r\n\t\t\tinter=ent-1;\r\n\t\t\tunion =0;\r\n\r\n\t\t\tfor(int ii=0; ii<M.size(); ii++){\r\n\r\n\t\t\t\tObject[] tt=M.toArray();\r\n\t\t\t\tString ite=(String) tt[ii];\r\n\t\t\t\tif(T.contains(ite))\r\n\t\t\t\t\tinter &= avoid[ii];\r\n\t\t\t\tif(new_closure.contains(ite))\r\n\t\t\t\t\tunion |= avoid[ii];\r\n\t\t\t}\r\n\r\n\t\t\tusable_imps = inter & union;\r\n\r\n\t\t\tuse_now_imps = usable_imps & (~used_imps);\r\n\t\t\tused_imps = usable_imps;\r\n\r\n\t\t\tfor(int ii=0;ii<getImp().size();ii++){\r\n\r\n\t\t\t\tint enti=use_now_imps & (1 << ii);\r\n\r\n\t\t\t\t//System.out.println(\"enti \"+enti+\"basicset \"+old_closure);\r\n\t\t\t\tif( enti!= 0){\r\n\t\t\t\t\tVector<Rule> rrr=(Vector<Rule>) getImp().clone();\r\n\t\t\t\t\tRule r=rrr.get(ii);\r\n\t\t\t\t\tnew_closure=new_closure.union(r.getConsequence());\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn new_closure;\r\n\r\n\t}", "public HashSet<State> statesReachableOn(State from, Character on) {\n \t\tHashSet<State> reachable = new HashSet<State>();\n \t\tIterator<Transition> iter = from.getTransitions().iterator();\n \t\twhile (iter.hasNext()) {\n \t\t\tTransition t = iter.next();\n \n \t\t\t// Do they want the epsilon transitions?\n \t\t\tboolean equals = false;\n \t\t\tif (on == null)\n \t\t\t\tequals = on == t.c;\n \t\t\telse\n \t\t\t\tequals = on.equals(t.c);\n \n \t\t\t// Add all matching transitions\n \t\t\t// Skip if already added to prevent loops\n \t\t\tif (equals && !reachable.contains(t.to)) {\n \t\t\t\t// Add this state\n \t\t\t\treachable.add(t.to);\n \n \t\t\t\t// Recurse and add all reachable from this state (epsilon transitions)\n \t\t\t\treachable.addAll(statesReachableFrom(t.to));\n \t\t\t}\n \t\t}\n \n \t\treturn reachable;\n \t}", "public DiscoveryActionsFunction() {\n\t\trf = new DiscoveryRewardFunction();\n\t\tfor ( DiscoveryDutyCycle dc : DiscoveryDutyCycle.values() ) {\n\t\t\tallActions.add( dc );\n\t\t}\n\t}", "public InstructionIterator getInstructions(boolean forward);", "public void minimize() {\n D = new boolean[states.length][states.length];\r\n S = new ArrayList<ArrayList<HashSet<Point>>>(); // lol\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int i = 0; i < states.length; i++) {\r\n ArrayList<HashSet<Point>> innerList = new ArrayList<HashSet<Point>>();\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int j = 0; j < states.length; j++) {\r\n Arrays.fill(D[i], false);\r\n innerList.add(new HashSet<Point>());\r\n }\r\n S.add(innerList);\r\n }\r\n\r\n // 2. states with different acceptances are distinguishable\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n if (acceptStates.contains(i) != acceptStates.contains(j)) {\r\n D[i][j] = true;\r\n }\r\n }\r\n }\r\n\r\n // 3. mark as possibly indistinguishable, enforce distinguishability\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n // only pairs that are as of yet indistinguishable\r\n if (D[i][j]) {\r\n continue;\r\n }\r\n\r\n DFAState qi = states[i];\r\n DFAState qj = states[j];\r\n\r\n // one of the things being compared is unreachable\r\n if (qi == null || qj == null) {\r\n continue;\r\n }\r\n\r\n // helps emulate \"for any\"\r\n boolean distinguished = false;\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n // if on the same letter, qm and qn move to distinguishable states\r\n if (D[m][n] || D[n][m]) {\r\n dist(i, j);\r\n distinguished = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!distinguished) {\r\n // qm and qn are indistinguishable\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n if (m < n && !(i == m && j == n)) {\r\n S.get(m).get(n).add(new Point(i, j));\r\n } else if (m > n && !(i == n && j == m)) {\r\n S.get(n).get(m).add(new Point(i, j));\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n mergeStates();\r\n }", "public Object[] getFilteredSuccessorNodes (Object node) throws InvalidComponentException;", "public int getCirculations()\r\n {\r\n return circulations;\r\n }", "private void getUnaryCode(int number) {\r\n\t\tfor (int i = 0; i<number; i++) {\r\n\t\t\toutput.add(true);\r\n\t\t}\r\n\t\toutput.add(false);\r\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n private Collection<Node> visitSequence(Object... rawNodes) {\n List<Collection<Node>> nodes = new ArrayList<>();\n for (Object node : rawNodes) {\n if (node == null) {\n nodes.add(Collections.<Node>emptySet());\n } else if (node instanceof Node) {\n nodes.add(Collections.<Node>singleton((Node) node));\n } else {\n nodes.add((Collection<Node>)node);\n }\n }\n\n Collection<Node> fst = nodes.get(nodes.size() - 1);\n for (int i = nodes.size() - 2; i >= 0; --i) {\n for (Node node : reverse(nodes.get(i))) {\n Node ffst = visitWithSuccessors(node, fst);\n if (ffst != null) fst = Collections.<Node>singleton(ffst);\n }\n }\n return fst;\n }", "private boolean checkAllMapsTo(\n Set<BooleanFormula> from,\n SSAMap startSSA,\n Set<BooleanFormula> to,\n SSAMap finishSSA,\n BooleanFormula transition\n ) throws SolverException, InterruptedException {\n return solver.isUnsat(bfmgr.and(\n fmgr.instantiate(bfmgr.and(from), startSSA),\n transition,\n fmgr.instantiate(bfmgr.not(bfmgr.and(to)), finishSSA)\n ));\n }", "public CheckedInstruction[] codeCheck() throws CodeCheckException {\n\t\tLinkedList next = new LinkedList();\n\t\tCheckedInstruction[] stackArray = new CheckedInstruction[instructions\n\t\t\t\t.size()];\n\n\t\t/*\n\t\t * Initialize next collection with the start point of the method and\n\t\t * with any exception handlers\n\t\t */\n\t\tnext.add(new InstructionPointer(0));\n\t\tstackArray[0] = new CheckedInstruction(instructions.get(0), new Stack());\n\t\tfor (Iterator<CodeException> i = exceptions.iterator(); i.hasNext();) {\n\t\t\tint handler = i.next().handler;\n\t\t\tInstructionPointer ip = new InstructionPointer(handler);\n\t\t\tnext.add(ip);\n\t\t\tint index = indexAtOffset(ip);\n\t\t\tstackArray[index] = new CheckedInstruction(instructions.get(index),\n\t\t\t\t\tnew Stack());\n\t\t\tstackArray[index].stack.push(ProcessStack.CAT1);\n\t\t}\n\t\twhile (!next.isEmpty()) {\n\t\t\tInstructionPointer ip = (InstructionPointer) next.getFirst();\n\t\t\tnext.removeFirst();\n\t\t\ttry {\n\t\t\t\tint index = indexAtOffset(ip);\n\t\t\t\tCheckedInstruction currentCheckedInstruction = stackArray[index];\n\t\t\t\tif (currentCheckedInstruction == null) {\n\t\t\t\t\tthrow new CodeCheckException(\n\t\t\t\t\t\t\t\"Instruction with undefined stack\");\n\t\t\t\t}\n\t\t\t\tStack old_stack = currentCheckedInstruction.stack;\n\t\t\t\tInstruction instruction = currentCheckedInstruction.instruction;\n\t\t\t\tStack new_stack = instruction.opCode.stackUpdate(instruction,\n\t\t\t\t\t\told_stack, this);\n\t\t\t\tArrayList new_pointers = new ArrayList(20);\n\t\t\t\tinstruction.opCode.traverse(instruction, new_pointers, this);\n\t\t\t\tfor (Iterator i = new_pointers.iterator(); i.hasNext();) {\n\t\t\t\t\tip = (InstructionPointer) i.next();\n\t\t\t\t\tindex = indexAtOffset(ip);\n\t\t\t\t\tif (stackArray[index] == null) {\n\t\t\t\t\t\tstackArray[index] = new CheckedInstruction(instructions\n\t\t\t\t\t\t\t\t.get(index), new_stack);\n\t\t\t\t\t\tnext.add(ip);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!new_stack.equals(stackArray[index].stack))\n\t\t\t\t\t\t\tthrow new CodeCheckException(\"Stacks don't match\");\n\t\t\t\t\t}\n\t\t\t\t\tstackArray[index].previousCheckedInstructions\n\t\t\t\t\t\t\t.add(currentCheckedInstruction);\n\t\t\t\t}\n\t\t\t\t// Special processing for jsr opcodes\n\t\t\t\tif (instruction.opCode.getMnemonic().startsWith(\"jsr\")) {\n\t\t\t\t\tip = new InstructionPointer(instruction\n\t\t\t\t\t\t\t.getOffsetDestination());\n\t\t\t\t\tindex = indexAtOffset(ip);\n\t\t\t\t\tif (stackArray[index] == null) {\n\t\t\t\t\t\tnew_stack = (Stack) new_stack.clone();\n\t\t\t\t\t\tnew_stack.push(ProcessStack.CAT1);\n\t\t\t\t\t\tstackArray[index] = new CheckedInstruction(instructions\n\t\t\t\t\t\t\t\t.get(index), new_stack);\n\t\t\t\t\t\tnext.add(ip);\n\t\t\t\t\t}\n\t\t\t\t\tstackArray[index].previousCheckedInstructions\n\t\t\t\t\t\t\t.add(currentCheckedInstruction);\n\t\t\t\t}\n\t\t\t} catch (CodeCheckException cce) {\n\t\t\t\tcce.printStackTrace();\n\t\t\t\tthrow new CodeCheckException(cce.getMessage() + \" at offset \"\n\t\t\t\t\t\t+ ip.currentPos);\n\t\t\t}\n\t\t}\n\t\tint max_stack = 0;\n\t\tfor (int i = 0; i < stackArray.length; i++) {\n\t\t\tif (stackArray[i] == null)\n\t\t\t\tthrow new CodeCheckException(\"Unvisited opcode at offset \"\n\t\t\t\t\t\t+ instructions.get(i).instructionStart);\n\t\t\tint depth = stackArray[i].getStackDepth();\n\t\t\tif (depth > max_stack)\n\t\t\t\tmax_stack = depth;\n\t\t}\n\t\tmaxStack = max_stack;\n\n\t\treturn stackArray;\n\t}", "boolean generateAutomata()\n{\n empty_calls = new HashSet<JflowMethod>();\n event_calls = new HashSet<JflowMethod>();\n complete_calls = new LinkedHashMap<JflowMethod,ModelMethod>();\n methods_todo = new LinkedHashSet<JflowMethod>();\n return_set = new HashMap<JflowMethod,Boolean>();\n\n start_set = new HashSet<JflowMethod>();\n for (JflowMethod cm : model_master.getStartMethods()) {\n methods_todo.add(cm);\n start_set.add(cm);\n }\n\n while (!methods_todo.isEmpty()) {\n Iterator<JflowMethod> it = methods_todo.iterator();\n if (!it.hasNext()) break;\n JflowMethod cm = it.next();\n it.remove();\n if (!empty_calls.contains(cm) && !complete_calls.containsKey(cm)) {\n\t if (!model_master.checkUseMethod(cm) || !model_master.isMethodAccessible(cm.getMethod()) ||\n\t\tcm.getMethod().isAbstract()) {\n\t if (model_master.doDebug()) {\n\t System.err.println(\"Ignore method: \" + cm.getMethodName() + \" \" +\n\t\t\t\t cm.getMethodSignature() + \" \" +\n\t\t\t\t model_master.checkUseMethod(cm) + \" \" +\n\t\t\t\t model_master.isMethodAccessible(cm.getMethod()));\n\t }\n\t empty_calls.add(cm);\n\t }\n\t else {\n\t ModelBuilder bld = new ModelBuilder(model_master,this,cm);\n\t complete_calls.put(cm,null);\n\t ModelMethod cs = bld.createAutomata();\n\t if (cs == null) empty_calls.add(cm);\n\t else complete_calls.put(cm,cs);\n\t }\n }\n }\n\n Set<JflowMethod> workq = new LinkedHashSet<JflowMethod>();\n for (Map.Entry<JflowMethod,ModelMethod> ent : complete_calls.entrySet()) {\n JflowMethod bm = ent.getKey();\n ModelMethod cs = ent.getValue();\n if (cs == null) continue;\n Set<JflowModel.Node> states = simplify(cs.getStartState());\n int ctr = 0;\n boolean hasrtn = false;\n for (JflowModel.Node st1 : states) {\n\t if (st1.getEvent() != null) event_calls.add(bm);\n\t else if (st1.getFieldSet() != null) event_calls.add(bm);\n\t if (!hasrtn && st1.getReturnValue() != null) hasrtn = true;\n\t JflowMethod cm = st1.getCall();\n\t if (cm != null) {\n\t if (event_calls.contains(cm)) event_calls.add(bm);\n\t else {\n\t ++ctr;\n\t ModelMethod ncs = complete_calls.get(cm);\n\t if (ncs != null) ncs.addUser(bm);\n\t else System.err.println(\"Call to \" + cm.getMethodName() + \" not found\");\n\t }\n\t }\n }\n return_set.put(bm,Boolean.valueOf(hasrtn));\n\n if (model_master.doDebug()) {\n\t System.err.println(\"First pass method \" + bm.getMethodName() + \" \" +\n\t\t\t bm.getMethodSignature() + \" \" + ctr + \" \" +\n\t\t\t states.size() + \" \" + event_calls.contains(bm));\n }\n if (ctr == 0) {\n\t if (!event_calls.contains(bm)) empty_calls.add(bm);\n }\n else {\n\t workq.add(bm);\n }\n }\n if (model_master.doDebug()) System.err.println(\"Work queue size = \" + workq.size());\n if (event_calls.size() == 0) return false;\n\n Set<JflowMethod> returnused = null;\n boolean chng = true;\n while (chng) {\n chng = false;\n returnused = new HashSet<JflowMethod>();\n while (!workq.isEmpty()) {\n\t Iterator<JflowMethod> it = workq.iterator();\n\t if (!it.hasNext()) break;\n\t JflowMethod bm = it.next();\n\t it.remove();\n\t ModelMethod cs = complete_calls.get(bm);\n\t boolean chkit = !event_calls.contains(bm);\n\n\t if (cs == null || empty_calls.contains(bm)) continue;\n\n\t int ctr = 0;\n\t Set<JflowModel.Node> states = simplify(cs.getStartState());\n\t boolean mchng = false;\n\t boolean hasrtn = false;\n\t for (JflowModel.Node st1 : states) {\n\t if (!hasrtn && st1.getReturnValue() != null) hasrtn = true;\n\t JflowMethod cm = st1.getCall();\n\t if (cm != null) {\n\t if (st1.getUseReturn()) returnused.add(cm);\n\t if (!event_calls.contains(cm)) {\n\t\t ++ctr;\n\t\t}\n\t else if (chkit) {\n\t\t if (model_master.doDebug()) {\n\t\t System.err.println(\"Method required: \" + bm.getMethodName() + \" \" +\n\t\t\t\t\t bm.getMethodSignature() + \" :: \" + cm.getMethodName() +\n\t\t\t\t\t \" \" + cm.getMethodSignature());\n\t\t }\n\t\t event_calls.add(bm);\n\t\t chkit = false;\n\t\t mchng = true;\n\t\t}\n\t }\n\t }\n\n\t if (return_set.get(bm) != Boolean.FALSE) {\n\t return_set.put(bm,Boolean.valueOf(hasrtn));\n\t if (!hasrtn) mchng = true;\n\t }\n\n\t if (ctr == 0 && !event_calls.contains(bm)) {\n\t empty_calls.add(bm);\n\t mchng = true;\n\t }\n\n\t if (model_master.doDebug()) System.err.println(\"Consider method \" + bm.getMethodName() + \" \" + bm.getMethodSignature() + \" \" + ctr + \" \" + states.size() + \" \" + mchng);\n\n\t if (mchng) {\n\t for (Iterator<?> it1 = cs.getUsers(); it1.hasNext(); ) {\n\t JflowMethod cm = (JflowMethod) it1.next();\n\t if (model_master.doDebug()) System.err.println(\"\\tQueue \" + cm.getMethodName() + \" \" + cm.getMethodSignature());\n\t workq.add(cm);\n\t }\n\t }\n }\n\n for (Map.Entry<JflowMethod,ModelMethod> ent : complete_calls.entrySet()) {\n\t JflowMethod bm = ent.getKey();\n\t ModelMethod cs = ent.getValue();\n\t if (cs != null && !empty_calls.contains(bm) && !event_calls.contains(bm)) {\n\t empty_calls.add(bm);\n\t chng = true;\n\t for (Iterator<JflowMethod> it1 = cs.getUsers(); it1.hasNext(); ) {\n\t JflowMethod cm = it1.next();\n\t if (model_master.doDebug()) System.err.println(\"\\tQueue \" + cm.getMethodName() + \" \" + cm.getMethodSignature());\n\t workq.add(cm);\n\t }\n\t }\n }\n }\n\n for (JflowMethod cm : empty_calls) {\n complete_calls.remove(cm);\n }\n\n chng = true;\n boolean needsync = true;\n while (chng) {\n chng = false;\n boolean nextsync = false;\n for (ModelMethod em : complete_calls.values()) {\n\t Set<JflowModel.Node> sts = simplify(em.getStartState());\n\t if (!needsync) {\n\t for (JflowModel.Node nms : sts) {\n\t ModelState ms = (ModelState) nms;\n\t if (ms.getWaitType() != ModelWaitType.NONE) {\n\t\t ms.clearCall();\n\t\t chng = true;\n\t\t}\n\t }\n\t }\n\t else if (!nextsync) {\n\t for (JflowModel.Node ms : sts) {\n\t if (ms.getCall() != null && ms.isAsync()) nextsync = true;\n\t }\n\t }\n\t if (return_set.get(em.getMethod()) != Boolean.FALSE && returnused != null && \n\t\t!returnused.contains(em.getMethod())) {\n\t for (JflowModel.Node nms : sts) {\n\t ModelState ms = (ModelState) nms;\n\t if (ms.getReturnValue() != null) {\n\t\t ms.clearCall();\n\t\t chng = true;\n\t\t}\n\t }\n\t return_set.put(em.getMethod(),Boolean.FALSE);\n\t }\n }\n if (nextsync != needsync) chng = true;\n needsync = nextsync;\n }\n\n for (ModelMethod em : complete_calls.values()) {\n ModelMinimizer.minimize(model_master,em.getStartState());\n }\n\n ModelSynch msynch = new ModelSynch(complete_calls.values());\n msynch.establishPartitions();\n\n if (model_master.doDebug()) {\n IvyXmlWriter nxw = new IvyXmlWriter(new OutputStreamWriter(System.err));\n nxw.begin(\"DEBUG\");\n outputEvents(nxw);\n outputProgram(nxw);\n nxw.end();\n nxw.flush();\n }\n\n boolean retfg = true;\n\n Collection<JflowEvent> c = model_master.getRequiredEvents();\n if (c != null && !c.isEmpty()) {\n Set<JflowEvent> evts = new HashSet<JflowEvent>();\n for (ModelMethod cs : complete_calls.values()) {\n\t Set<JflowModel.Node> states = simplify(cs.getStartState());\n\t for (JflowModel.Node ms : states) {\n\t JflowEvent ev = ms.getEvent();\n\t if (ev != null) evts.add(ev);\n\t }\n }\n for (JflowEvent ev : c) {\n\t if (!evts.contains(ev)) {\n\t System.err.println(\"JFLOW: Required event \" + ev + \" not found\");\n\t retfg = false;\n\t break;\n\t }\n }\n }\n\n empty_calls = null;\n event_calls = null;\n methods_todo = null;\n return_set = null;\n\n return retfg;\n}" ]
[ "0.6457827", "0.6419115", "0.6281472", "0.61855537", "0.5953585", "0.57778054", "0.5597042", "0.5360185", "0.53026825", "0.5299987", "0.52824265", "0.5133889", "0.5088792", "0.50799984", "0.50397265", "0.49998283", "0.49894047", "0.4854156", "0.48460755", "0.484422", "0.48216403", "0.48209244", "0.4811088", "0.48007774", "0.47838643", "0.47644052", "0.4762445", "0.4756848", "0.47460845", "0.47450462", "0.4722738", "0.471015", "0.47062144", "0.47003132", "0.46965542", "0.4695388", "0.4692913", "0.46900672", "0.46786895", "0.46484184", "0.4634706", "0.46332866", "0.45867103", "0.45796588", "0.45643976", "0.4543537", "0.4535603", "0.452579", "0.45248696", "0.4522209", "0.45217836", "0.4520024", "0.4511242", "0.45003337", "0.44978884", "0.449691", "0.4492325", "0.44922504", "0.4489152", "0.4485685", "0.4481845", "0.4481845", "0.44773465", "0.44647253", "0.44524115", "0.44490325", "0.4448397", "0.44323894", "0.44319117", "0.44157508", "0.44110322", "0.44104484", "0.43948734", "0.43781644", "0.43760422", "0.43760106", "0.4362437", "0.4359606", "0.43584248", "0.4351788", "0.43500042", "0.434669", "0.43453676", "0.43392143", "0.43368313", "0.43368253", "0.43296322", "0.4326106", "0.4325389", "0.43245727", "0.4322995", "0.43203288", "0.431606", "0.42931053", "0.4291915", "0.42914033", "0.42812777", "0.42795545", "0.42767465", "0.42764688" ]
0.64065766
2
Return sets of operands used by each Inst
RegSet[] used() { RegSet[] used = new RegSet[code.length]; for (int i = 0; i < code.length; i++) used[i] = code[i].used(); return used; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Deque<Operand> getOperands();", "public Collection<IOperator> getAllOperators()\r\n\t{\r\n\t\treturn expressionRegistry.getAllOperators();\r\n\t}", "public Map<String, AttributeDescriptor.Operator> getOperators()\n {\n \n Map<String, AttributeDescriptor.Operator> optrMap = \n new LinkedHashMap<String, AttributeDescriptor.Operator>();\n \n List<DemoPageDef.OperatorDef> operatorList = _searchFieldDef.getOperators();\n\n for(DemoPageDef.OperatorDef operator : operatorList)\n {\n AttributeDescriptor.Operator optr = \n ((DemoAttributeDescriptor) _attrDesc).getOperator(operator);\n optrMap.put(optr.getLabel(), optr);\n }\n return optrMap;\n }", "public abstract Operand<T> result();", "boolean isActiveOperandSet();", "public List<OperatorImpl> getChildOperators() {\n\t\treturn Collections.emptyList();\n\t}", "OperandList createOperandList();", "public Set<NounPhrase> getOpSet(){\n\t\tSet<NounPhrase> opSet = this.getEntConsiderPass(\"O\");\n\t\treturn opSet;\n\t}", "protected <Ty> HashSet<Ty> evaluate(ArrayList<HashSet<Ty>> setList, String opDescriptor) {\n if (setList == null || setList.isEmpty()) {\n return new HashSet<>();\n }\n if (setList.size() > 1) {\n for (char c : opDescriptor.toCharArray()) {\n if (c == '&') {\n setList.set(0, this.intersection(setList.get(0), setList.get(1)));\n setList.remove(1);\n } else if (c == '|') {\n setList.set(0, this.union(setList.get(0), setList.get(1)));\n setList.remove(1);\n }\n if (setList.size() == 1) {\n break;\n }\n }\n }\n return setList.get(0);\n }", "public static List<Operator> getList(){\n\t\tList<Operator> supportedOperators = new ArrayList<Operator>();\n\t\t\n\t\t// add each operator to list\n\t\tsupportedOperators.add(new AdditionOperator());\n\t\tsupportedOperators.add(new SubtractionOperator());\n\t\tsupportedOperators.add(new MultiplicationOperator());\n\t\tsupportedOperators.add(new DivisionOperator());\n\t\tsupportedOperators.add(new ExponentiationOperator());\n\t\tsupportedOperators.add(new NegationOperator());\n\t\tsupportedOperators.add(new AbsoluteValueOperator());\n\t\tsupportedOperators.add(new SineOperator());\n\t\tsupportedOperators.add(new CoseOperator());\n\t\treturn supportedOperators;\n\t}", "public List<String> getOperators() {\n return operators;\n }", "@Override\n\tpublic Set<Operator> determinization(Set<Operator> ops)\n\t{\n\t\tif (DEBUG)\n\t\t\tSystem.out.println(\"Determinize following operators: \" + ops);\n\t\tSet<Operator> result = new HashSet<Operator>(ops.size() * 2);\n\t\t// Processing of explicit Operators.\n\t\tfor (Operator op : ops)\n\t\t{\n\t\t\tExplicitOperator explicitOp = (ExplicitOperator) op;\n\t\t\tassert !op.isDeterminized();\n\t\t\tSet<Set<ExplicitEffect>> nondeterministicEffect = explicitOp\n\t\t\t\t\t.getNondeterministicEffect();\n\t\t\tif (nondeterministicEffect == null\n\t\t\t\t\t|| nondeterministicEffect.size() == 1)\n\t\t\t{\n\t\t\t\t// Operator is already deterministic, since it has only an empty\n\t\t\t\t// effect or only a single deterministic effect.\n\t\t\t\tresult.add(new ExplicitOperator(op.getName() + \"_det\",\n\t\t\t\t\t\texplicitOp.precondition, explicitOp\n\t\t\t\t\t\t\t\t.getNondeterministicEffect(), op.observation,\n\t\t\t\t\t\top.isAbstracted, true, op.getCost()));\n\t\t\t} else\n\t\t\t{\n\t\t\t\t// There is more than one deterministic effect.\n\t\t\t\tint i = 0;\n\t\t\t\tif (DEBUG)\n\t\t\t\t\tSystem.out.println(\"Operator \" + op + \" has \"\n\t\t\t\t\t\t\t+ nondeterministicEffect.size() + \" choices.\");\n\t\t\t\tfor (Set<ExplicitEffect> choice : nondeterministicEffect)\n\t\t\t\t{\n\t\t\t\t\tif (choice.isEmpty())\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tSet<Set<ExplicitEffect>> modifiedNondeterministicEffect = new HashSet<Set<ExplicitEffect>>();\n\t\t\t\t\tmodifiedNondeterministicEffect.add(choice);\n\t\t\t\t\tString name = op.getName() + \"_det_\" + i++;\n\t\t\t\t\tresult.add(new ExplicitOperator(name,\n\t\t\t\t\t\t\texplicitOp.precondition,\n\t\t\t\t\t\t\tmodifiedNondeterministicEffect, op.observation,\n\t\t\t\t\t\t\top.isAbstracted, true, op.getCost()));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (DEBUG)\n\t\t{\n\t\t\tSystem.out.println(\"Result of determinization: \" + result);\n\t\t\tSystem.out.println();\n\t\t}\n\t\tassert (Operator.assertNoDuplicateInNames(result));\n\t\treturn result;\n\t}", "Operands createOperands();", "public XbaseGrammarAccess.OpEqualityElements getOpEqualityAccess() {\r\n\t\treturn gaXbase.getOpEqualityAccess();\r\n\t}", "public static List<String> getRelationalOperators()\r\n\t{\r\n\t\tList<String> relationalOperatorsList = new ArrayList<String>();\r\n\t\tfor (RelationalOperator operator : RelationalOperator.values())\r\n\t\t{\r\n\t\t\tString opStr = operator.getStringRepresentation();\r\n\t\t\tif ((!opStr.equals(AQConstants.Contains))\r\n\t\t\t\t\t&& (!opStr.equals(AQConstants.STRATS_WITH))\r\n\t\t\t\t\t&& (!opStr.equals(AQConstants.ENDS_WITH))\r\n\t\t\t\t\t&& (!opStr.equals(AQConstants.IN_OPERATOR))\r\n\t\t\t\t\t&& (!opStr.equals(AQConstants.Between))\r\n\t\t\t\t\t&& (!opStr.equals(AQConstants.Not_In))\r\n\t\t\t\t\t&& (!opStr.equalsIgnoreCase(AQConstants.IS_NULL))\r\n\t\t\t\t\t&& (!opStr.equalsIgnoreCase(AQConstants.IS_NOT_NULL))\r\n\t\t\t\t\t&& (!opStr.equalsIgnoreCase(AQConstants.NOT_BETWEEN)))\r\n\r\n\t\t\t{\r\n\t\t\t\trelationalOperatorsList.add(opStr);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn relationalOperatorsList;\r\n\t}", "Object findOperatorNeedCheck();", "public XbaseGrammarAccess.OpEqualityElements getOpEqualityAccess() {\n\t\treturn gaXbase.getOpEqualityAccess();\n\t}", "public XbaseGrammarAccess.OpEqualityElements getOpEqualityAccess() {\n\t\treturn gaXbase.getOpEqualityAccess();\n\t}", "@Override\n\tpublic OpIterator[] getChildren() {\n\t\tOpIterator[] childOperators = new OpIterator[1];\n\t\tchildOperators[0] = childOperator;\n\t\treturn childOperators;\n\t}", "public Collection<Element> getOperations() {\n Stream<Element> combinedStream = Stream.of(aCollection, cCollection)\n .flatMap(Collection::stream);\n return combinedStream.collect(Collectors.toList());\n }", "public HOp[] ops()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n return OPS;\r\n }", "@Override\r\n public Collection getOperators() throws Exception\r\n {\n return null;\r\n }", "void assignOperators(Object rgID, List<Object> operIDs);", "public int getOperandA();", "Operator.Type getOperation();", "@Override\n public List<Operand> getOperands(RegisterDump registers) {\n var mbreg = (MicroBlazeRegisterDump) registers;\n return MicroBlazeAsmOperandGetter.getFrom(this, mbreg);\n }", "private void initOperators(Set<String> s) {\n\t\ts.add(\"=\");\n\t\ts.add(\"+\");\n\t\ts.add(\"-\");\n\t\ts.add(\"*\");\n\t\ts.add(\"/\");\n\t\ts.add(\"(\");\n\t\ts.add(\")\");\n\t\ts.add(\";\");\n }", "public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\r\n\t\treturn gaXbase.getOpMultiAccess();\r\n\t}", "public SymbolicElement<T> getAddition();", "public int getOperandCount()\n {\n if (_operator != null) \n {\n int operandCount = _operator.getOperandCount();\n if (operandCount != -1)\n return operandCount;\n }\n return 1;\n }", "public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\n\t\treturn gaXbase.getOpMultiAccess();\n\t}", "public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\n\t\treturn gaXbase.getOpMultiAccess();\n\t}", "public static Collection<QueryStringOperator> values() {\n return values(QueryStringOperator.class);\n }", "public final ExprOrOpArgNode[] getArgs() { return this.operands; }", "private List<ParseTree> separateAND(ParseTree t){\n List<ParseTree> nodes = new ArrayList<ParseTree>();\n List<ParseTree> aux = getNodes(t, RulesParser.RULE_conjuncion);\n List<ParseTree> factores = getNodes(t, RulesParser.RULE_factor); // factors enclosed in parentheses, such as ((1+2)+3)\n int count = 0;\n for (int i = 0; i < factores.size(); i++) {\n if (((RulesParser.FactorContext) factores.get(i)).PA() != null){\n count++;\n }\n }\n int params = Trees.findAllRuleNodes(t, RulesParser.RULE_parametros).size();\n params = aux.size() == params ? 0 : params;\n for (int i = 0; i < aux.size() - params - count; i++) {\n if (aux.get(i).getChild(i) instanceof RulesParser.ConjuncionContext){\n nodes.add(((RulesParser.ConjuncionContext) aux.get(i)).igualdad());\n } else{\n nodes.add(aux.get(i));\n }\n }\n Collections.reverse(nodes);\n return nodes;\n }", "@UML(identifier=\"geometryOperand\", obligation=MANDATORY, specification=ISO_19143)\n Collection<? extends ScopedName> getGeometryOperands();", "public List<OperationImplementation> getOperations() {\n List<?> operationsUnknown = (List<?>) properties.get(XPATH_OPERATIONS);\n List<OperationImplementation> operations = new ArrayList<OperationImplementation>();\n if (operationsUnknown != null) {\n \t for (Object operationUnknown : operationsUnknown) {\n \t Map<?, ?> operationMap = (Map<?, ?>) operationUnknown;\n \t operations.add(new OperationImplementation(\n \t (String) operationMap.get(OPERATION_NAME),\n \t (String) operationMap.get(OPERATION_PARAMETERS),\n \t (String) operationMap.get(OPERATION_DOCUMENTATION)));\n \t }\n }\n return operations;\n }", "public Integer getIops() {\n return this.iops;\n }", "protected List<Integer> getUsedRegistersNums() {\n if (instruction instanceof Instruction35mi) {\n return getUsedRegistersNums((Instruction35mi) instruction);\n } else if (instruction instanceof Instruction3rmi) {\n return getUsedRegistersNums((Instruction3rmi) instruction);\n }\n throw new RuntimeException(\"Instruction is not an ExecuteInline\");\n }", "@Override\r\n public DSCP opBrackets() {\r\n /*put codegen here.*/\r\n return elementType.pushStack();\r\n }", "public int getOperandB();", "public String operate() {\r\n\r\n\t\t// Logger log = Logger.getLogger(IterationFactory.class);\r\n\t\tDecimalFormat form = new DecimalFormat(\"0.0000\");\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tOperationFactory operateF;\r\n\t\tList<Integer> valueList;\r\n\r\n\t\tIterator<String> inputItr = this.getInputList().iterator();\r\n\r\n\t\tIterator<Character> opItr = this.getOperator().iterator();\r\n\r\n\t\ttry {\r\n\t\t\t/* Domain check */\r\n\t\t\tif (this.getInputList().size() <= 1 && this.getInputList().size() >= 10) {\r\n\t\t\t\tthrow new ValuePairOutOfLimit(this.getInputList().size());\r\n\t\t\t}\r\n\r\n\t\t\twhile (inputItr.hasNext()) {\r\n\r\n\t\t\t\t/* To get individual operands from operand sets */\r\n\t\t\t\tvalueList = u.toValueList(inputItr.next());\r\n\t\t\t\tIterator<Integer> valItr = valueList.iterator();\r\n\r\n\t\t\t\t/* Check for validity of operands and string format */\r\n\t\t\t\tif (valueList.size() < Constant.TWO)\r\n\t\t\t\t\tthrow new OperandException();\r\n\t\t\t\tif (valueList.size() > Constant.TWO)\r\n\t\t\t\t\tthrow new StringFormatException();\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * If there is empty operator string default operator sets to\r\n\t\t\t\t * plus\r\n\t\t\t\t */\r\n\t\t\t\tif (operator.size() == 0)\r\n\t\t\t\t\toperateF = new OperationFactory(valItr.next(), valItr.next(), Constant.PLUS);\r\n\t\t\t\telse\r\n\t\t\t\t\toperateF = new OperationFactory(valItr.next(), valItr.next(), opItr.next());\r\n\r\n\t\t\t\t/* Output */\r\n\t\t\t\tsb.append(operateF.getmOp().getmOperand1() + operateF.getmOp().getmWord()\r\n\t\t\t\t\t\t+ operateF.getmOp().getmOperand2() + \" = \" + form.format(operateF.operate()) + \"\\n\");\r\n\r\n\t\t\t\t/*To reset operator iterator.*/\r\n\t\t\t\tif (!opItr.hasNext())\r\n\t\t\t\t\topItr = this.getOperator().iterator();\r\n\t\t\t}\r\n\t\t} catch (IntegerOutOfLimit e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (InvalidOperator e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (OperandException e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (StringFormatException e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (ValuePairOutOfLimit e) {\r\n\t\t\tsb.append(e);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "String getOp();", "String getOp();", "String getOp();", "public Collection getOperations()\n {\n return Collections.unmodifiableCollection(operations);\n }", "public Map<String, OperationSet> getSupportedOperationSets()\n {\n return new Hashtable<>(supportedOperationSets);\n }", "public static List<String> splitByLogicOperators(String str){\n Matcher matcher = logicOperatorPattern.matcher(str);\n List<String> result = new ArrayList<>();\n int start = 0;\n while (matcher.find()) {\n result.add(str.substring(start, matcher.start()).trim());\n result.add(str.substring(matcher.start(), matcher.end()).trim());\n start = matcher.end();\n }\n result.add(str.substring(start, str.length()).trim());\n return result;\n }", "public ILatticeOperations<TupleLatticeElement<Variable, NullLatticeElement>> getLatticeOperations() {\n\t\treturn ops;\n\t}", "List<OperatorDTO> getRelAssociationsOperators();", "public java.lang.String getInstrumentedOps(int index) {\n return instrumentedOps_.get(index);\n }", "public List<Expression> getSubExpressions();", "public static Iterable<PcodeOpAST> getPcodeOps(final HighFunction hfunc) {\n\t\treturn new Iterable<PcodeOpAST>() {\n\n\t\t\t@Override\n\t\t\tpublic Iterator<PcodeOpAST> iterator() {\n\t\t\t\treturn hfunc.getPcodeOps();\n\t\t\t}\n\t\t};\n\t}", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public boolean isOp(){\n return opSet.contains(symbol());\n }", "String getOperator();", "public Expression commutativeExp() {\r\n return this;\r\n }", "public java.lang.String getInstrumentedOps(int index) {\n return instrumentedOps_.get(index);\n }", "public Set<ICommunicate> getICommunicates();", "public XbaseGrammarAccess.OpMultiAssignElements getOpMultiAssignAccess() {\r\n\t\treturn gaXbase.getOpMultiAssignAccess();\r\n\t}", "private void checkArithmeticOperands(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n checkBinaryOperation(in, d, out);\n }", "public AllInstanceExpressionElements getAllInstanceExpressionAccess() {\r\n\t\treturn pAllInstanceExpression;\r\n\t}", "private HashSet < Symbol > getUsedSymbols ()\n {\n HashSet < Symbol > symbols = new HashSet < Symbol > ();\n for ( LeafNode l : this.regexNode.getTokenNodes () )\n {\n if ( l instanceof TokenNode )\n {\n TokenNode t = ( TokenNode ) l;\n symbols.add ( new DefaultSymbol ( t.getName () ) );\n }\n }\n return symbols;\n }", "public XbaseGrammarAccess.OpMultiAssignElements getOpMultiAssignAccess() {\n\t\treturn gaXbase.getOpMultiAssignAccess();\n\t}", "public XbaseGrammarAccess.OpMultiAssignElements getOpMultiAssignAccess() {\n\t\treturn gaXbase.getOpMultiAssignAccess();\n\t}", "OperandListGroup createOperandListGroup();", "public List<Character> getOperator() {\r\n\t\treturn operator;\r\n\t}", "public OperandStack() {\r\n\t\t\r\n\t\tthis.num = new ArrayList<>(); \r\n\t\tthis.observers = new ArrayList<>(); \r\n\t}", "private OperandStack stack(){\n\t\treturn frame.getStack();\n\t}", "public IMutateExprTree getBaseOp() \r\n\t{\r\n\t\treturn baseOp;\r\n\t}", "@Override\n public TreeNode parse() {\n TreeNode first = ArithmeticSubexpression.getAdditive(environment).parse();\n if (first == null) return null;\n\n // Try to parse something starting with an operator.\n List<Wrapper> wrappers = RightSideSubexpression.createKleene(\n environment, ArithmeticSubexpression.getAdditive(environment),\n BemTeVicTokenType.EQUAL, BemTeVicTokenType.DIFFERENT,\n BemTeVicTokenType.GREATER_OR_EQUALS, BemTeVicTokenType.GREATER_THAN,\n BemTeVicTokenType.LESS_OR_EQUALS, BemTeVicTokenType.LESS_THAN\n ).parse();\n\n // If did not found anything starting with an operator, return the first node.\n if (wrappers.isEmpty()) return first;\n\n // Constructs a binary operator node containing the expression.\n Iterator<Wrapper> it = wrappers.iterator();\n Wrapper secondWrapper = it.next();\n BinaryOperatorNode second = new BinaryOperatorNode(secondWrapper.getTokenType(), first, secondWrapper.getOutput());\n\n if (wrappers.size() == 1) return second;\n\n // If we reach this far, the expression has more than one operator. i.e. (x = y = z),\n // which is a shortcut for (x = y AND y = z).\n\n // Firstly, determine if the operators are compatible.\n RelationalOperatorSide side = RelationalOperatorSide.NONE;\n for (Wrapper w : wrappers) {\n side = side.next(w.getTokenType());\n }\n if (side.isMixed()) {\n environment.emitError(\"XXX\");\n }\n\n // Creates the other nodes. In the expression (a = b = c = d), The \"a = b\"\n // is in the \"second\" node. Creates \"b = c\", and \"c = d\" nodes.\n List<BinaryOperatorNode> nodes = new LinkedList<BinaryOperatorNode>();\n nodes.add(second);\n\n TreeNode prev = secondWrapper.getOutput();\n while (it.hasNext()) {\n Wrapper w = it.next();\n BinaryOperatorNode current = new BinaryOperatorNode(w.getTokenType(), prev, w.getOutput());\n prev = w.getOutput();\n nodes.add(current);\n }\n\n // Combines all of the nodes in a single one using AND.\n return new VariableArityOperatorNode(BemTeVicTokenType.AND, nodes);\n }", "@Override\n\tprotected void addRequestedOperators() {\n\t}", "public int getInstrumentedOpsCount() {\n return instrumentedOps_.size();\n }", "public int getInstrumentedOpsCount() {\n return instrumentedOps_.size();\n }", "public static HashSet<Transition> makeTransitions(Set<Operation> ops, State tail){\n HashSet<Transition> set = new HashSet<Transition>();\n// 调用enabledOperations方法\n Set<Operation> op = enabledOperations(ops , tail);\n// 遍历op\n for(Operation o : op){\n State s = o.execute(tail);\n Transition t = new Transition(o.name , tail , s , 1);\n set.add(t);\n }\n return set ;\n\n\n\n // throw new NotImplementedException();\n }", "private static Conditional[] getOperators(Class<?> clazz)\n {\n Conditional[] operators = Conditional.STRING_VALUES;\n if (clazz != null && Number.class.isAssignableFrom(clazz))\n {\n operators = Conditional.NUMBER_VALUES;\n }\n return operators;\n }", "Map<Element, Map<Element, Element>> getOperationMap();", "java.lang.String getOperator();", "@RequestMapping(value=\"/operators\",method=RequestMethod.GET)\n public FieldOperator[] getAllOperators(){\n return FieldOperator.values();\n }", "public void setOperators(List<Operator> operators){\n _operators = operators;\n }", "public void buildSymbols() \n {\n scalars = new ArrayList <ScalarSymbol>();\n arrays = new ArrayList <ArraySymbol>();\n Stack <String> symbols = new Stack <String>();\n StringTokenizer st = new StringTokenizer(expr, delims, true); \n String token = \"\";\n \n while (st.hasMoreTokens())\n {\n token = st.nextToken();\n if ((token.charAt(0) >= 'a' && token.charAt(0) <= 'z') || (token.charAt(0) >= 'A' && token.charAt(0) <= 'Z' || token.equals(\"[\")))\n symbols.push(token); \n }\n while(!symbols.isEmpty())\n {\n token = symbols.pop();\n if (token.equals(\"[\"))\n {\n token = symbols.pop();\n ArraySymbol aSymbol = new ArraySymbol(token);\n if(arrays.indexOf(aSymbol) == -1)\n arrays.add(aSymbol);\n }\n else \n {\n ScalarSymbol sSymbol = new ScalarSymbol(token);\n if (scalars.indexOf(sSymbol) == -1)\n scalars.add(sSymbol);\n }\n }\n System.out.println(arrays);\n System.out.println(scalars);\n }", "boolean hasOperator();", "void removeOperators(Object rgID, List<Object> operIDs);", "public interface PerlTokenSets extends PerlElementTypes, MooseElementTypes {\n TokenSet OPERATORS_TOKENSET = TokenSet.create(\n OPERATOR_CMP_NUMERIC,\n OPERATOR_LT_NUMERIC,\n OPERATOR_GT_NUMERIC,\n\n OPERATOR_CMP_STR,\n OPERATOR_LE_STR,\n OPERATOR_GE_STR,\n OPERATOR_EQ_STR,\n OPERATOR_NE_STR,\n OPERATOR_LT_STR,\n OPERATOR_GT_STR,\n\n OPERATOR_HELLIP,\n OPERATOR_FLIP_FLOP,\n OPERATOR_CONCAT,\n\n OPERATOR_PLUS_PLUS,\n OPERATOR_MINUS_MINUS,\n OPERATOR_POW,\n\n OPERATOR_RE,\n OPERATOR_NOT_RE,\n\n //\t\t\tOPERATOR_HEREDOC, // this is an artificial operator, not the real one; fixme uncommenting breaks parsing of print $of <<EOM\n OPERATOR_SHIFT_LEFT,\n OPERATOR_SHIFT_RIGHT,\n\n OPERATOR_AND,\n OPERATOR_OR,\n OPERATOR_OR_DEFINED,\n OPERATOR_NOT,\n\n OPERATOR_ASSIGN,\n\n QUESTION,\n COLON,\n\n OPERATOR_REFERENCE,\n\n OPERATOR_DIV,\n OPERATOR_MUL,\n OPERATOR_MOD,\n OPERATOR_PLUS,\n OPERATOR_MINUS,\n\n OPERATOR_BITWISE_NOT,\n OPERATOR_BITWISE_AND,\n OPERATOR_BITWISE_OR,\n OPERATOR_BITWISE_XOR,\n\n OPERATOR_AND_LP,\n OPERATOR_OR_LP,\n OPERATOR_XOR_LP,\n OPERATOR_NOT_LP,\n\n COMMA,\n FAT_COMMA,\n\n OPERATOR_DEREFERENCE,\n\n OPERATOR_X,\n OPERATOR_FILETEST,\n\n // syntax operators\n OPERATOR_POW_ASSIGN,\n OPERATOR_PLUS_ASSIGN,\n OPERATOR_MINUS_ASSIGN,\n OPERATOR_MUL_ASSIGN,\n OPERATOR_DIV_ASSIGN,\n OPERATOR_MOD_ASSIGN,\n OPERATOR_CONCAT_ASSIGN,\n OPERATOR_X_ASSIGN,\n OPERATOR_BITWISE_AND_ASSIGN,\n OPERATOR_BITWISE_OR_ASSIGN,\n OPERATOR_BITWISE_XOR_ASSIGN,\n OPERATOR_SHIFT_LEFT_ASSIGN,\n OPERATOR_SHIFT_RIGHT_ASSIGN,\n OPERATOR_AND_ASSIGN,\n OPERATOR_OR_ASSIGN,\n OPERATOR_OR_DEFINED_ASSIGN,\n\n OPERATOR_GE_NUMERIC,\n OPERATOR_LE_NUMERIC,\n OPERATOR_EQ_NUMERIC,\n OPERATOR_NE_NUMERIC,\n OPERATOR_SMARTMATCH\n );\n\n TokenSet DEFAULT_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_MY,\n RESERVED_OUR,\n RESERVED_STATE,\n RESERVED_LOCAL,\n RESERVED_ELSIF,\n RESERVED_ELSE,\n RESERVED_GIVEN,\n RESERVED_DEFAULT,\n RESERVED_CONTINUE,\n RESERVED_FORMAT,\n RESERVED_SUB,\n RESERVED_PACKAGE,\n RESERVED_USE,\n RESERVED_NO,\n RESERVED_REQUIRE,\n RESERVED_UNDEF,\n RESERVED_PRINT,\n RESERVED_PRINTF,\n RESERVED_SAY,\n RESERVED_GREP,\n RESERVED_MAP,\n RESERVED_SORT,\n RESERVED_DO,\n RESERVED_EVAL,\n RESERVED_GOTO,\n RESERVED_REDO,\n RESERVED_NEXT,\n RESERVED_LAST,\n RESERVED_RETURN,\n\n RESERVED_Y,\n RESERVED_TR,\n RESERVED_Q,\n RESERVED_S,\n RESERVED_M,\n RESERVED_QW,\n RESERVED_QQ,\n RESERVED_QR,\n RESERVED_QX,\n\n RESERVED_IF,\n RESERVED_UNTIL,\n RESERVED_UNLESS,\n RESERVED_FOR,\n RESERVED_FOREACH,\n RESERVED_WHEN,\n RESERVED_WHILE\n );\n\n TokenSet TRY_CATCH_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_TRY,\n RESERVED_CATCH,\n RESERVED_FINALLY,\n RESERVED_CATCH_WITH,\n RESERVED_EXCEPT,\n RESERVED_OTHERWISE,\n RESERVED_CONTINUATION\n );\n\n TokenSet METHOD_SIGNATURES_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_METHOD,\n RESERVED_FUNC\n );\n\n TokenSet KEYWORDS_TOKENSET = TokenSet.orSet(\n DEFAULT_KEYWORDS_TOKENSET,\n MOOSE_RESERVED_TOKENSET,\n METHOD_SIGNATURES_KEYWORDS_TOKENSET,\n TRY_CATCH_KEYWORDS_TOKENSET\n );\n\n TokenSet ANNOTATIONS_KEYS = TokenSet.create(\n ANNOTATION_DEPRECATED_KEY,\n ANNOTATION_RETURNS_KEY,\n ANNOTATION_OVERRIDE_KEY,\n ANNOTATION_METHOD_KEY,\n ANNOTATION_ABSTRACT_KEY,\n ANNOTATION_INJECT_KEY,\n ANNOTATION_NOINSPECTION_KEY,\n ANNOTATION_TYPE_KEY\n\n );\n\n TokenSet STRING_CONTENT_TOKENSET = TokenSet.create(\n STRING_CONTENT,\n STRING_CONTENT_XQ,\n STRING_CONTENT_QQ\n );\n\n TokenSet HEREDOC_BODIES_TOKENSET = TokenSet.create(\n HEREDOC,\n HEREDOC_QQ,\n HEREDOC_QX\n );\n\n\n TokenSet QUOTE_MIDDLE = TokenSet.create(REGEX_QUOTE, REGEX_QUOTE_E);\n\n TokenSet QUOTE_OPEN_ANY = TokenSet.orSet(\n TokenSet.create(REGEX_QUOTE_OPEN, REGEX_QUOTE_OPEN_E),\n PerlParserUtil.OPEN_QUOTES,\n QUOTE_MIDDLE\n );\n\n TokenSet QUOTE_CLOSE_FIRST_ANY = TokenSet.orSet(\n TokenSet.create(REGEX_QUOTE_CLOSE),\n QUOTE_MIDDLE,\n CLOSE_QUOTES\n );\n\n TokenSet QUOTE_CLOSE_PAIRED = TokenSet.orSet(\n CLOSE_QUOTES,\n TokenSet.create(REGEX_QUOTE_CLOSE)\n );\n\n TokenSet SIGILS = TokenSet.create(\n SIGIL_SCALAR, SIGIL_ARRAY, SIGIL_HASH, SIGIL_GLOB, SIGIL_CODE, SIGIL_SCALAR_INDEX\n );\n\n TokenSet STATEMENTS = TokenSet.create(\n STATEMENT, USE_STATEMENT, NO_STATEMENT\n );\n\n TokenSet LAZY_CODE_BLOCKS = TokenSet.create(LP_CODE_BLOCK, LP_CODE_BLOCK_WITH_TRYCATCH);\n\n TokenSet LAZY_PARSABLE_REGEXPS = TokenSet.create(\n LP_REGEX_REPLACEMENT,\n LP_REGEX,\n LP_REGEX_X,\n LP_REGEX_XX\n );\n\n TokenSet HEREDOC_ENDS = TokenSet.create(HEREDOC_END, HEREDOC_END_INDENTABLE);\n /**\n * Quote openers with three or four quotes\n */\n TokenSet COMPLEX_QUOTE_OPENERS = TokenSet.create(\n RESERVED_S,\n RESERVED_TR,\n RESERVED_Y\n );\n TokenSet SIMPLE_QUOTE_OPENERS = TokenSet.create(\n RESERVED_Q,\n RESERVED_QQ,\n RESERVED_QX,\n RESERVED_QW,\n RESERVED_QR,\n RESERVED_M\n );\n}", "public abstract List<Instruction> getPossibleActions();", "public Set<String> getVariablesWithin(String exp) {\r\n Set<String> all=new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);\r\n String add=null;\r\n\r\n for(StringTokenizer tkz=new StringTokenizer(exp,SYMBOLS,true); tkz.hasMoreTokens(); ) {\r\n String tkn=tkz.nextToken().trim();\r\n\r\n if (tkn.length()!=0 && Character.isLetter(tkn.charAt(0))) { add=tkn; }\r\n else if(tkn.length()==1 && tkn.charAt(0)=='(' ) { add=null; }\r\n else if(add!=null && !constants.containsKey(add) ) { all.add(add); }\r\n }\r\n if(add!=null && !constants.containsKey(add)) { all.add(add); }\r\n return all;\r\n }", "private void findConceptsForInstances() {\n\t\tSet<String> temp = new HashSet<String>();\n\n\t\tfor (String s : taskInput)\n\t\t\ttemp.add(taxonomyMap.get(s).parents.get(0).value);\n\t\ttaskInput.clear();\n\t\ttaskInput.addAll(temp);\n\n\t\ttemp.clear();\n\t\tfor (String s : taskOutput)\n\t\t\ttemp.add(taxonomyMap.get(s).parents.get(0).value);\n\t\ttaskOutput.clear();\n\t\ttaskOutput.addAll(temp);\n\n\t\tfor (Node s : serviceMap.values()) {\n\t\t\ttemp.clear();\n\t\t\tSet<String> inputs = s.getInputs();\n\t\t\tfor (String i : inputs)\n\t\t\t\ttemp.add(taxonomyMap.get(i).parents.get(0).value);\n\t\t\tinputs.clear();\n\t\t\tinputs.addAll(temp);\n\n\t\t\ttemp.clear();\n\t\t\tSet<String> outputs = s.getOutputs();\n\t\t\tfor (String o : outputs)\n\t\t\t\ttemp.add(taxonomyMap.get(o).parents.get(0).value);\n\t\t\toutputs.clear();\n\t\t\toutputs.addAll(temp);\n\t\t}\n\t}", "public XbaseGrammarAccess.OpUnaryElements getOpUnaryAccess() {\r\n\t\treturn gaXbase.getOpUnaryAccess();\r\n\t}", "Map<String, OperationalSets> getSets();", "OpList createOpList();", "private void findConceptsForInstances() {\n\t\tfor (int i = 0; i < INPUT.length; i++)\n\t\t\tINPUT[i] = taxonomyMap.get(INPUT[i]).parent.value;\n\n\t\tfor (int i = 0; i < OUTPUT.length; i++)\n\t\t\tOUTPUT[i] = taxonomyMap.get(OUTPUT[i]).parent.value;\n\n\t\tavailableInputs = new HashSet<String>(Arrays.asList(INPUT));\n\t\trequiredOutputs = new HashSet<String>(Arrays.asList(OUTPUT));\n\n\t\tfor (ServiceNode s : serviceMap.values()) {\n\t\t\tSet<String> inputs = s.getInputs();\n\t\t\tSet<String> newInputs = new HashSet<String>();\n\n\t\t\tfor (String i : inputs)\n\t\t\t\tnewInputs.add(taxonomyMap.get(i).parent.value);\n\t\t\ts.setInputs(newInputs);\n\n\t\t\tSet<String> outputs = s.getOutputs();\n\t\t\tSet<String> newOutputs = new HashSet<String>();\n\n\t\t\tfor (String i : outputs)\n\t\t\t\tnewOutputs.add(taxonomyMap.get(i).parent.value);\n\t\t\ts.setOutputs(newOutputs);\n\t\t}\n\t}", "public Set getNodesThatCall(PassedParameter pp) {\n if (USE_PARAMETER_MAP) {\n Set s = (Set)passedParamToNodes.get(pp);\n if (s == null) return Collections.EMPTY_SET;\n return s;\n }\n Set s = NodeSet.FACTORY.makeSet();\n getNodesThatCall(pp, s);\n return s;\n }", "public static Entry[] getUserDefinedConversionOperatorsOf(final TypeSpec t) {\n // Debug.WriteLine(\"getUserDefinedConversionOperatorsOf(\"+t+\")\");\n if (!t.isClass() && !t.isBuiltinClass()) {\n return new Entry[0]; // only classes have conversion operators\n }\n\n final ArrayList entries = new ArrayList();\n final Scope classScope = new ClassScope(t);\n\n // gather all constructors that take a single argument and all instance\n // or static\n // operator-> methods\n\n if (!t.isAbstractClassOrInterface()) { // t is concrete (otherwise\n // ignore constructors)\n\n final Entry[] ctors = classScope.getEntries(\".ctor\", null);\n\n for (final Entry entry : ctors) {\n Debug.Assert(entry.type.isFunc(), \".ctor isn't a func! type:\"\n + entry.type);\n if (entry.type.getFuncInfo().numRequiredArgs() == 1) {\n if (!entry.type.getFuncInfo().getParamTypes()[0].equals(t)) {\n entries.add(entry);\n }\n }\n }\n\n }\n\n // now operator->\n final Entry[] ops = classScope.getEntries(\"operator->\", null);\n // Debug.WL(\" got entries #=\"+ops.Length+\" t=\"+t);\n // //.classInfo.ToStringFull());\n for (final Entry entry : ops) {\n Debug.Assert(entry.type.isFunc(),\n \"entry for operator-> isn't a func; type:\" + entry.type);\n final FuncInfo fi = entry.type.getFuncInfo();\n // is it an instance operator-> that takes a single arg?\n final boolean isInstanceOp = (!entry.isStatic() && (fi\n .numRequiredArgs() == 0));\n // is it a static operator-> that takes a single arg where either\n // the arg type of the\n // return type is t?\n final boolean isStaticOp = (entry.isStatic()\n && (fi.numRequiredArgs() == 1) && (fi.getParamTypes()[0]\n .equals(t) || fi.getReturnType().equals(t)));\n\n // Debug.WL(\" considering \"+entry.name+\" \"+fi+\" isInstanceOp=\"+isInstanceOp+\" isStaticOp=\"+isStaticOp+\" entry.index=\"+entry.index);\n if (!entry.isAbstract() && (entry.index >= 0)) { // !!!currently,\n // methods\n // inherited from\n // Java types can't\n // be called - so\n // don't consider\n // them!!!\n if (isInstanceOp) {\n // don't bother with operator->(->self) - not useful\n if (!fi.getReturnType().equals(t)) {\n entries.add(entry);\n // Debug.WriteLine(\" got op:\"+entry.type.funcInfo+\" of \"+t);\n }\n } else if (isStaticOp) {\n // don't bother with operator->(a->a) either\n if (!fi.getParamTypes()[0].equals(fi.getReturnType())) {\n entries.add(entry);\n // Debug.WriteLine(\" got op:\"+entry.type.funcInfo+\" of \"+t);\n }\n }\n }\n }\n\n return Entry.toArray(entries);\n }", "@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }", "@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }", "public final int getNumberOfOperands() {\n return this.operands.length;\n }", "List getExpressions();", "public XbaseGrammarAccess.OpUnaryElements getOpUnaryAccess() {\n\t\treturn gaXbase.getOpUnaryAccess();\n\t}", "public XbaseGrammarAccess.OpUnaryElements getOpUnaryAccess() {\n\t\treturn gaXbase.getOpUnaryAccess();\n\t}", "public String getOperator()\r\n\t{\r\n\t\tSystem.out.println(\"Choose the any operation from the following operations:\");\r\n System.out.println(\"1.+\");\r\n System.out.println(\"2.-\");\r\n System.out.println(\"3.*\");\r\n System.out.println(\"4./\");\r\n \r\n\t\tString op=sc.next();\r\n\t\treturn op;\r\n\t}" ]
[ "0.60299873", "0.5835678", "0.57223684", "0.57193416", "0.5688111", "0.55986613", "0.55705893", "0.54988396", "0.54977125", "0.5487793", "0.5376851", "0.53451", "0.53251106", "0.531633", "0.53125733", "0.5283456", "0.5274759", "0.5274759", "0.52595204", "0.5258948", "0.52112055", "0.5182839", "0.51583546", "0.5108354", "0.5108172", "0.50990546", "0.50923747", "0.503437", "0.503163", "0.5028697", "0.50265527", "0.50265527", "0.502222", "0.50057095", "0.4998561", "0.4955929", "0.4953247", "0.49472514", "0.49357292", "0.49200854", "0.49097717", "0.489778", "0.48974416", "0.48974416", "0.48974416", "0.48898607", "0.48777944", "0.48746085", "0.48680508", "0.48609152", "0.4843227", "0.4835006", "0.48349535", "0.48338023", "0.48315096", "0.4831177", "0.48280933", "0.48258176", "0.48096582", "0.48072606", "0.48013005", "0.47953823", "0.47937623", "0.47915617", "0.47915617", "0.47847077", "0.47772148", "0.4775597", "0.4766575", "0.476397", "0.47612116", "0.47596264", "0.47476646", "0.47475144", "0.4745559", "0.4731439", "0.4729782", "0.4719629", "0.47150514", "0.47134733", "0.47020075", "0.46978572", "0.46921015", "0.46862414", "0.4683561", "0.46827316", "0.46766347", "0.46700376", "0.4665382", "0.46620128", "0.4647293", "0.46420035", "0.4640546", "0.46398553", "0.46398553", "0.4636513", "0.46269", "0.46253678", "0.46253678", "0.4623236" ]
0.49456233
38
Return sets of operands defined by each Inst
RegSet[] defined() { RegSet[] defined = new RegSet[code.length]; for (int i = 0; i < code.length; i++) defined[i] = code[i].defined(); // Parameters are implicitly defined at top of function for (String var : params) defined[0].add(new Id(var)); return defined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Deque<Operand> getOperands();", "public abstract Operand<T> result();", "OperandList createOperandList();", "public Collection<IOperator> getAllOperators()\r\n\t{\r\n\t\treturn expressionRegistry.getAllOperators();\r\n\t}", "Operands createOperands();", "public Map<String, AttributeDescriptor.Operator> getOperators()\n {\n \n Map<String, AttributeDescriptor.Operator> optrMap = \n new LinkedHashMap<String, AttributeDescriptor.Operator>();\n \n List<DemoPageDef.OperatorDef> operatorList = _searchFieldDef.getOperators();\n\n for(DemoPageDef.OperatorDef operator : operatorList)\n {\n AttributeDescriptor.Operator optr = \n ((DemoAttributeDescriptor) _attrDesc).getOperator(operator);\n optrMap.put(optr.getLabel(), optr);\n }\n return optrMap;\n }", "public static List<Operator> getList(){\n\t\tList<Operator> supportedOperators = new ArrayList<Operator>();\n\t\t\n\t\t// add each operator to list\n\t\tsupportedOperators.add(new AdditionOperator());\n\t\tsupportedOperators.add(new SubtractionOperator());\n\t\tsupportedOperators.add(new MultiplicationOperator());\n\t\tsupportedOperators.add(new DivisionOperator());\n\t\tsupportedOperators.add(new ExponentiationOperator());\n\t\tsupportedOperators.add(new NegationOperator());\n\t\tsupportedOperators.add(new AbsoluteValueOperator());\n\t\tsupportedOperators.add(new SineOperator());\n\t\tsupportedOperators.add(new CoseOperator());\n\t\treturn supportedOperators;\n\t}", "protected <Ty> HashSet<Ty> evaluate(ArrayList<HashSet<Ty>> setList, String opDescriptor) {\n if (setList == null || setList.isEmpty()) {\n return new HashSet<>();\n }\n if (setList.size() > 1) {\n for (char c : opDescriptor.toCharArray()) {\n if (c == '&') {\n setList.set(0, this.intersection(setList.get(0), setList.get(1)));\n setList.remove(1);\n } else if (c == '|') {\n setList.set(0, this.union(setList.get(0), setList.get(1)));\n setList.remove(1);\n }\n if (setList.size() == 1) {\n break;\n }\n }\n }\n return setList.get(0);\n }", "boolean isActiveOperandSet();", "public List<OperatorImpl> getChildOperators() {\n\t\treturn Collections.emptyList();\n\t}", "void assignOperators(Object rgID, List<Object> operIDs);", "public static List<String> getRelationalOperators()\r\n\t{\r\n\t\tList<String> relationalOperatorsList = new ArrayList<String>();\r\n\t\tfor (RelationalOperator operator : RelationalOperator.values())\r\n\t\t{\r\n\t\t\tString opStr = operator.getStringRepresentation();\r\n\t\t\tif ((!opStr.equals(AQConstants.Contains))\r\n\t\t\t\t\t&& (!opStr.equals(AQConstants.STRATS_WITH))\r\n\t\t\t\t\t&& (!opStr.equals(AQConstants.ENDS_WITH))\r\n\t\t\t\t\t&& (!opStr.equals(AQConstants.IN_OPERATOR))\r\n\t\t\t\t\t&& (!opStr.equals(AQConstants.Between))\r\n\t\t\t\t\t&& (!opStr.equals(AQConstants.Not_In))\r\n\t\t\t\t\t&& (!opStr.equalsIgnoreCase(AQConstants.IS_NULL))\r\n\t\t\t\t\t&& (!opStr.equalsIgnoreCase(AQConstants.IS_NOT_NULL))\r\n\t\t\t\t\t&& (!opStr.equalsIgnoreCase(AQConstants.NOT_BETWEEN)))\r\n\r\n\t\t\t{\r\n\t\t\t\trelationalOperatorsList.add(opStr);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn relationalOperatorsList;\r\n\t}", "@Override\n\tpublic OpIterator[] getChildren() {\n\t\tOpIterator[] childOperators = new OpIterator[1];\n\t\tchildOperators[0] = childOperator;\n\t\treturn childOperators;\n\t}", "public Collection<Element> getOperations() {\n Stream<Element> combinedStream = Stream.of(aCollection, cCollection)\n .flatMap(Collection::stream);\n return combinedStream.collect(Collectors.toList());\n }", "@Override\n\tpublic Set<Operator> determinization(Set<Operator> ops)\n\t{\n\t\tif (DEBUG)\n\t\t\tSystem.out.println(\"Determinize following operators: \" + ops);\n\t\tSet<Operator> result = new HashSet<Operator>(ops.size() * 2);\n\t\t// Processing of explicit Operators.\n\t\tfor (Operator op : ops)\n\t\t{\n\t\t\tExplicitOperator explicitOp = (ExplicitOperator) op;\n\t\t\tassert !op.isDeterminized();\n\t\t\tSet<Set<ExplicitEffect>> nondeterministicEffect = explicitOp\n\t\t\t\t\t.getNondeterministicEffect();\n\t\t\tif (nondeterministicEffect == null\n\t\t\t\t\t|| nondeterministicEffect.size() == 1)\n\t\t\t{\n\t\t\t\t// Operator is already deterministic, since it has only an empty\n\t\t\t\t// effect or only a single deterministic effect.\n\t\t\t\tresult.add(new ExplicitOperator(op.getName() + \"_det\",\n\t\t\t\t\t\texplicitOp.precondition, explicitOp\n\t\t\t\t\t\t\t\t.getNondeterministicEffect(), op.observation,\n\t\t\t\t\t\top.isAbstracted, true, op.getCost()));\n\t\t\t} else\n\t\t\t{\n\t\t\t\t// There is more than one deterministic effect.\n\t\t\t\tint i = 0;\n\t\t\t\tif (DEBUG)\n\t\t\t\t\tSystem.out.println(\"Operator \" + op + \" has \"\n\t\t\t\t\t\t\t+ nondeterministicEffect.size() + \" choices.\");\n\t\t\t\tfor (Set<ExplicitEffect> choice : nondeterministicEffect)\n\t\t\t\t{\n\t\t\t\t\tif (choice.isEmpty())\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tSet<Set<ExplicitEffect>> modifiedNondeterministicEffect = new HashSet<Set<ExplicitEffect>>();\n\t\t\t\t\tmodifiedNondeterministicEffect.add(choice);\n\t\t\t\t\tString name = op.getName() + \"_det_\" + i++;\n\t\t\t\t\tresult.add(new ExplicitOperator(name,\n\t\t\t\t\t\t\texplicitOp.precondition,\n\t\t\t\t\t\t\tmodifiedNondeterministicEffect, op.observation,\n\t\t\t\t\t\t\top.isAbstracted, true, op.getCost()));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (DEBUG)\n\t\t{\n\t\t\tSystem.out.println(\"Result of determinization: \" + result);\n\t\t\tSystem.out.println();\n\t\t}\n\t\tassert (Operator.assertNoDuplicateInNames(result));\n\t\treturn result;\n\t}", "private void initOperators(Set<String> s) {\n\t\ts.add(\"=\");\n\t\ts.add(\"+\");\n\t\ts.add(\"-\");\n\t\ts.add(\"*\");\n\t\ts.add(\"/\");\n\t\ts.add(\"(\");\n\t\ts.add(\")\");\n\t\ts.add(\";\");\n }", "public Set<ICommunicate> getICommunicates();", "public List<String> getOperators() {\n return operators;\n }", "List<OperatorDTO> getRelAssociationsOperators();", "@Override\n public List<Operand> getOperands(RegisterDump registers) {\n var mbreg = (MicroBlazeRegisterDump) registers;\n return MicroBlazeAsmOperandGetter.getFrom(this, mbreg);\n }", "public static Collection<QueryStringOperator> values() {\n return values(QueryStringOperator.class);\n }", "public static Iterable<PcodeOpAST> getPcodeOps(final HighFunction hfunc) {\n\t\treturn new Iterable<PcodeOpAST>() {\n\n\t\t\t@Override\n\t\t\tpublic Iterator<PcodeOpAST> iterator() {\n\t\t\t\treturn hfunc.getPcodeOps();\n\t\t\t}\n\t\t};\n\t}", "public Set<NounPhrase> getOpSet(){\n\t\tSet<NounPhrase> opSet = this.getEntConsiderPass(\"O\");\n\t\treturn opSet;\n\t}", "public static List<String> splitByLogicOperators(String str){\n Matcher matcher = logicOperatorPattern.matcher(str);\n List<String> result = new ArrayList<>();\n int start = 0;\n while (matcher.find()) {\n result.add(str.substring(start, matcher.start()).trim());\n result.add(str.substring(matcher.start(), matcher.end()).trim());\n start = matcher.end();\n }\n result.add(str.substring(start, str.length()).trim());\n return result;\n }", "public List<OperationImplementation> getOperations() {\n List<?> operationsUnknown = (List<?>) properties.get(XPATH_OPERATIONS);\n List<OperationImplementation> operations = new ArrayList<OperationImplementation>();\n if (operationsUnknown != null) {\n \t for (Object operationUnknown : operationsUnknown) {\n \t Map<?, ?> operationMap = (Map<?, ?>) operationUnknown;\n \t operations.add(new OperationImplementation(\n \t (String) operationMap.get(OPERATION_NAME),\n \t (String) operationMap.get(OPERATION_PARAMETERS),\n \t (String) operationMap.get(OPERATION_DOCUMENTATION)));\n \t }\n }\n return operations;\n }", "private List<ParseTree> separateAND(ParseTree t){\n List<ParseTree> nodes = new ArrayList<ParseTree>();\n List<ParseTree> aux = getNodes(t, RulesParser.RULE_conjuncion);\n List<ParseTree> factores = getNodes(t, RulesParser.RULE_factor); // factors enclosed in parentheses, such as ((1+2)+3)\n int count = 0;\n for (int i = 0; i < factores.size(); i++) {\n if (((RulesParser.FactorContext) factores.get(i)).PA() != null){\n count++;\n }\n }\n int params = Trees.findAllRuleNodes(t, RulesParser.RULE_parametros).size();\n params = aux.size() == params ? 0 : params;\n for (int i = 0; i < aux.size() - params - count; i++) {\n if (aux.get(i).getChild(i) instanceof RulesParser.ConjuncionContext){\n nodes.add(((RulesParser.ConjuncionContext) aux.get(i)).igualdad());\n } else{\n nodes.add(aux.get(i));\n }\n }\n Collections.reverse(nodes);\n return nodes;\n }", "public final ExprOrOpArgNode[] getArgs() { return this.operands; }", "@Override\r\n public Collection getOperators() throws Exception\r\n {\n return null;\r\n }", "public int getOperandA();", "public static HashSet<Transition> makeTransitions(Set<Operation> ops, State tail){\n HashSet<Transition> set = new HashSet<Transition>();\n// 调用enabledOperations方法\n Set<Operation> op = enabledOperations(ops , tail);\n// 遍历op\n for(Operation o : op){\n State s = o.execute(tail);\n Transition t = new Transition(o.name , tail , s , 1);\n set.add(t);\n }\n return set ;\n\n\n\n // throw new NotImplementedException();\n }", "private void checkArithmeticOperands(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n checkBinaryOperation(in, d, out);\n }", "@UML(identifier=\"geometryOperand\", obligation=MANDATORY, specification=ISO_19143)\n Collection<? extends ScopedName> getGeometryOperands();", "public List<Expression> getSubExpressions();", "OperandListGroup createOperandListGroup();", "Object findOperatorNeedCheck();", "@Override\r\n public DSCP opBrackets() {\r\n /*put codegen here.*/\r\n return elementType.pushStack();\r\n }", "@RequestMapping(value=\"/operators\",method=RequestMethod.GET)\n public FieldOperator[] getAllOperators(){\n return FieldOperator.values();\n }", "Operator.Type getOperation();", "public String operate() {\r\n\r\n\t\t// Logger log = Logger.getLogger(IterationFactory.class);\r\n\t\tDecimalFormat form = new DecimalFormat(\"0.0000\");\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tOperationFactory operateF;\r\n\t\tList<Integer> valueList;\r\n\r\n\t\tIterator<String> inputItr = this.getInputList().iterator();\r\n\r\n\t\tIterator<Character> opItr = this.getOperator().iterator();\r\n\r\n\t\ttry {\r\n\t\t\t/* Domain check */\r\n\t\t\tif (this.getInputList().size() <= 1 && this.getInputList().size() >= 10) {\r\n\t\t\t\tthrow new ValuePairOutOfLimit(this.getInputList().size());\r\n\t\t\t}\r\n\r\n\t\t\twhile (inputItr.hasNext()) {\r\n\r\n\t\t\t\t/* To get individual operands from operand sets */\r\n\t\t\t\tvalueList = u.toValueList(inputItr.next());\r\n\t\t\t\tIterator<Integer> valItr = valueList.iterator();\r\n\r\n\t\t\t\t/* Check for validity of operands and string format */\r\n\t\t\t\tif (valueList.size() < Constant.TWO)\r\n\t\t\t\t\tthrow new OperandException();\r\n\t\t\t\tif (valueList.size() > Constant.TWO)\r\n\t\t\t\t\tthrow new StringFormatException();\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * If there is empty operator string default operator sets to\r\n\t\t\t\t * plus\r\n\t\t\t\t */\r\n\t\t\t\tif (operator.size() == 0)\r\n\t\t\t\t\toperateF = new OperationFactory(valItr.next(), valItr.next(), Constant.PLUS);\r\n\t\t\t\telse\r\n\t\t\t\t\toperateF = new OperationFactory(valItr.next(), valItr.next(), opItr.next());\r\n\r\n\t\t\t\t/* Output */\r\n\t\t\t\tsb.append(operateF.getmOp().getmOperand1() + operateF.getmOp().getmWord()\r\n\t\t\t\t\t\t+ operateF.getmOp().getmOperand2() + \" = \" + form.format(operateF.operate()) + \"\\n\");\r\n\r\n\t\t\t\t/*To reset operator iterator.*/\r\n\t\t\t\tif (!opItr.hasNext())\r\n\t\t\t\t\topItr = this.getOperator().iterator();\r\n\t\t\t}\r\n\t\t} catch (IntegerOutOfLimit e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (InvalidOperator e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (OperandException e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (StringFormatException e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (ValuePairOutOfLimit e) {\r\n\t\t\tsb.append(e);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public HOp[] ops()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n return OPS;\r\n }", "public XbaseGrammarAccess.OpEqualityElements getOpEqualityAccess() {\r\n\t\treturn gaXbase.getOpEqualityAccess();\r\n\t}", "public interface Operator {\n public Object operate(List<LispStatement> operands);\n\n}", "Operand createOperand();", "protected abstract List<Individual> binaryOperation(List<Individual> acceptedFromLeft,\n List<Individual> acceptedFromRight);", "public static Entry[] getUserDefinedConversionOperatorsOf(final TypeSpec t) {\n // Debug.WriteLine(\"getUserDefinedConversionOperatorsOf(\"+t+\")\");\n if (!t.isClass() && !t.isBuiltinClass()) {\n return new Entry[0]; // only classes have conversion operators\n }\n\n final ArrayList entries = new ArrayList();\n final Scope classScope = new ClassScope(t);\n\n // gather all constructors that take a single argument and all instance\n // or static\n // operator-> methods\n\n if (!t.isAbstractClassOrInterface()) { // t is concrete (otherwise\n // ignore constructors)\n\n final Entry[] ctors = classScope.getEntries(\".ctor\", null);\n\n for (final Entry entry : ctors) {\n Debug.Assert(entry.type.isFunc(), \".ctor isn't a func! type:\"\n + entry.type);\n if (entry.type.getFuncInfo().numRequiredArgs() == 1) {\n if (!entry.type.getFuncInfo().getParamTypes()[0].equals(t)) {\n entries.add(entry);\n }\n }\n }\n\n }\n\n // now operator->\n final Entry[] ops = classScope.getEntries(\"operator->\", null);\n // Debug.WL(\" got entries #=\"+ops.Length+\" t=\"+t);\n // //.classInfo.ToStringFull());\n for (final Entry entry : ops) {\n Debug.Assert(entry.type.isFunc(),\n \"entry for operator-> isn't a func; type:\" + entry.type);\n final FuncInfo fi = entry.type.getFuncInfo();\n // is it an instance operator-> that takes a single arg?\n final boolean isInstanceOp = (!entry.isStatic() && (fi\n .numRequiredArgs() == 0));\n // is it a static operator-> that takes a single arg where either\n // the arg type of the\n // return type is t?\n final boolean isStaticOp = (entry.isStatic()\n && (fi.numRequiredArgs() == 1) && (fi.getParamTypes()[0]\n .equals(t) || fi.getReturnType().equals(t)));\n\n // Debug.WL(\" considering \"+entry.name+\" \"+fi+\" isInstanceOp=\"+isInstanceOp+\" isStaticOp=\"+isStaticOp+\" entry.index=\"+entry.index);\n if (!entry.isAbstract() && (entry.index >= 0)) { // !!!currently,\n // methods\n // inherited from\n // Java types can't\n // be called - so\n // don't consider\n // them!!!\n if (isInstanceOp) {\n // don't bother with operator->(->self) - not useful\n if (!fi.getReturnType().equals(t)) {\n entries.add(entry);\n // Debug.WriteLine(\" got op:\"+entry.type.funcInfo+\" of \"+t);\n }\n } else if (isStaticOp) {\n // don't bother with operator->(a->a) either\n if (!fi.getParamTypes()[0].equals(fi.getReturnType())) {\n entries.add(entry);\n // Debug.WriteLine(\" got op:\"+entry.type.funcInfo+\" of \"+t);\n }\n }\n }\n }\n\n return Entry.toArray(entries);\n }", "public SymbolicElement<T> getAddition();", "Double executeOperation(List<Double> operands);", "public XbaseGrammarAccess.OpEqualityElements getOpEqualityAccess() {\n\t\treturn gaXbase.getOpEqualityAccess();\n\t}", "public XbaseGrammarAccess.OpEqualityElements getOpEqualityAccess() {\n\t\treturn gaXbase.getOpEqualityAccess();\n\t}", "public Integer getIops() {\n return this.iops;\n }", "public void setOperators(List<Operator> operators){\n _operators = operators;\n }", "private static Conditional[] getOperators(Class<?> clazz)\n {\n Conditional[] operators = Conditional.STRING_VALUES;\n if (clazz != null && Number.class.isAssignableFrom(clazz))\n {\n operators = Conditional.NUMBER_VALUES;\n }\n return operators;\n }", "void removeOperators(Object rgID, List<Object> operIDs);", "public int getOperandB();", "List<OperatorDTO> getAllOperators();", "private void findConceptsForInstances() {\n\t\tfor (int i = 0; i < INPUT.length; i++)\n\t\t\tINPUT[i] = taxonomyMap.get(INPUT[i]).parent.value;\n\n\t\tfor (int i = 0; i < OUTPUT.length; i++)\n\t\t\tOUTPUT[i] = taxonomyMap.get(OUTPUT[i]).parent.value;\n\n\t\tavailableInputs = new HashSet<String>(Arrays.asList(INPUT));\n\t\trequiredOutputs = new HashSet<String>(Arrays.asList(OUTPUT));\n\n\t\tfor (ServiceNode s : serviceMap.values()) {\n\t\t\tSet<String> inputs = s.getInputs();\n\t\t\tSet<String> newInputs = new HashSet<String>();\n\n\t\t\tfor (String i : inputs)\n\t\t\t\tnewInputs.add(taxonomyMap.get(i).parent.value);\n\t\t\ts.setInputs(newInputs);\n\n\t\t\tSet<String> outputs = s.getOutputs();\n\t\t\tSet<String> newOutputs = new HashSet<String>();\n\n\t\t\tfor (String i : outputs)\n\t\t\t\tnewOutputs.add(taxonomyMap.get(i).parent.value);\n\t\t\ts.setOutputs(newOutputs);\n\t\t}\n\t}", "Map<Element, Map<Element, Element>> getOperationMap();", "List getExpressions();", "@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 }", "Set<Condition> getInstanceInvariantConditions();", "public abstract List<Instruction> getPossibleActions();", "public OperandStack() {\r\n\t\t\r\n\t\tthis.num = new ArrayList<>(); \r\n\t\tthis.observers = new ArrayList<>(); \r\n\t}", "public void buildSymbols() \n {\n scalars = new ArrayList <ScalarSymbol>();\n arrays = new ArrayList <ArraySymbol>();\n Stack <String> symbols = new Stack <String>();\n StringTokenizer st = new StringTokenizer(expr, delims, true); \n String token = \"\";\n \n while (st.hasMoreTokens())\n {\n token = st.nextToken();\n if ((token.charAt(0) >= 'a' && token.charAt(0) <= 'z') || (token.charAt(0) >= 'A' && token.charAt(0) <= 'Z' || token.equals(\"[\")))\n symbols.push(token); \n }\n while(!symbols.isEmpty())\n {\n token = symbols.pop();\n if (token.equals(\"[\"))\n {\n token = symbols.pop();\n ArraySymbol aSymbol = new ArraySymbol(token);\n if(arrays.indexOf(aSymbol) == -1)\n arrays.add(aSymbol);\n }\n else \n {\n ScalarSymbol sSymbol = new ScalarSymbol(token);\n if (scalars.indexOf(sSymbol) == -1)\n scalars.add(sSymbol);\n }\n }\n System.out.println(arrays);\n System.out.println(scalars);\n }", "public Collection getOperations()\n {\n return Collections.unmodifiableCollection(operations);\n }", "public int getOperandCount()\n {\n if (_operator != null) \n {\n int operandCount = _operator.getOperandCount();\n if (operandCount != -1)\n return operandCount;\n }\n return 1;\n }", "static String arithmeticExpressions(int[] arr) {\n String result = \"\";\n String[] operation = {\"+\", \"-\", \"*\"};\n boolean done = false;\n Map<Integer, String> outputToExpression = new HashMap<>();\n outputToExpression.put(arr[0], String.valueOf(arr[0]));\n for(int i = 1; i < arr.length; i++) {\n Map<Integer, String> tempOutputToExpression = new HashMap<>();\n int currentInteger = arr[i];\n final Set<Map.Entry<Integer, String>> entry2 = outputToExpression.entrySet();\n for(int entry : outputToExpression.keySet()) {\n for(int k = 0; k < operation.length; k++) {\n int tempOutput = entry;\n if(operation[k].equals(\"+\")) {\n tempOutput = tempOutput + currentInteger;\n tempOutputToExpression.put(tempOutput, outputToExpression.get(entry) + \"+\" + currentInteger);\n }\n if(operation[k].equals(\"-\")) {\n tempOutput = tempOutput - currentInteger;\n tempOutputToExpression.put(tempOutput, outputToExpression.get(entry) + \"-\" + currentInteger);\n }\n if(operation[k].equals(\"*\")) {\n tempOutput = (tempOutput * currentInteger) % 101;\n tempOutputToExpression.put(tempOutput, outputToExpression.get(entry) + \"*\" + currentInteger);\n }\n if(tempOutput % 101 == 0) {\n result = tempOutputToExpression.get(tempOutput);\n for(int j = i + 1; j < arr.length; j++) {\n result += \"*\" + arr[j];\n }\n done = true;\n }\n if(done) break;\n }\n if(done) break;\n }\n if(done) break;\n outputToExpression = tempOutputToExpression;\n }\n\n\n return result;\n }", "public void execute(){\n\t\tfor(Instruction currentInstn:this.instns){\n\t\t\tcurrentInstn.execute();\n\t\t}\n\t}", "Map<ParameterInstance, SetType> getInstanceSetTypes();", "@Override\n public TreeNode parse() {\n TreeNode first = ArithmeticSubexpression.getAdditive(environment).parse();\n if (first == null) return null;\n\n // Try to parse something starting with an operator.\n List<Wrapper> wrappers = RightSideSubexpression.createKleene(\n environment, ArithmeticSubexpression.getAdditive(environment),\n BemTeVicTokenType.EQUAL, BemTeVicTokenType.DIFFERENT,\n BemTeVicTokenType.GREATER_OR_EQUALS, BemTeVicTokenType.GREATER_THAN,\n BemTeVicTokenType.LESS_OR_EQUALS, BemTeVicTokenType.LESS_THAN\n ).parse();\n\n // If did not found anything starting with an operator, return the first node.\n if (wrappers.isEmpty()) return first;\n\n // Constructs a binary operator node containing the expression.\n Iterator<Wrapper> it = wrappers.iterator();\n Wrapper secondWrapper = it.next();\n BinaryOperatorNode second = new BinaryOperatorNode(secondWrapper.getTokenType(), first, secondWrapper.getOutput());\n\n if (wrappers.size() == 1) return second;\n\n // If we reach this far, the expression has more than one operator. i.e. (x = y = z),\n // which is a shortcut for (x = y AND y = z).\n\n // Firstly, determine if the operators are compatible.\n RelationalOperatorSide side = RelationalOperatorSide.NONE;\n for (Wrapper w : wrappers) {\n side = side.next(w.getTokenType());\n }\n if (side.isMixed()) {\n environment.emitError(\"XXX\");\n }\n\n // Creates the other nodes. In the expression (a = b = c = d), The \"a = b\"\n // is in the \"second\" node. Creates \"b = c\", and \"c = d\" nodes.\n List<BinaryOperatorNode> nodes = new LinkedList<BinaryOperatorNode>();\n nodes.add(second);\n\n TreeNode prev = secondWrapper.getOutput();\n while (it.hasNext()) {\n Wrapper w = it.next();\n BinaryOperatorNode current = new BinaryOperatorNode(w.getTokenType(), prev, w.getOutput());\n prev = w.getOutput();\n nodes.add(current);\n }\n\n // Combines all of the nodes in a single one using AND.\n return new VariableArityOperatorNode(BemTeVicTokenType.AND, nodes);\n }", "public ArrayList<Predicate> expandInConjunctiveFormula(){\n\t\tArrayList<Predicate> formula = new ArrayList<Predicate>();\n\t\t\n\t\t// (x, (0,2)) (y,1) \n\t\t//holds positions of the vars\n\t\tHashtable<String,ArrayList<String>> pos = new Hashtable<String,ArrayList<String>>();\n\t\t//(const3, \"10\")\n\t\t//holds vars that have constants assigned\n\t\tHashtable<String,String> constants = new Hashtable<String,String>();\n\t\t\n\t\tRelationPredicate p = this.clone();\n\t\t//rename each term to a unique name\n\t\tfor(int i=0; i<p.terms.size(); i++){\n\t\t\tTerm t = p.terms.get(i);\n\t\t\tt.changeVarName(i);\n\n\t\t}\n\t\tformula.add(p);\n\n\t\tArrayList<String> attrsOld = getVarsAndConst();\n\t\tArrayList<String> attrsNew = p.getVarsAndConst();\n\n\t\t\n\t\tfor(int i=0; i<attrsOld.size(); i++){\n\t\t\tTerm t = terms.get(i);\n\t\t\tif(t instanceof ConstTerm){\n\t\t\t\t//get the constant value\n\t\t\t\tconstants.put(attrsNew.get(i),t.getVal());\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> posVals = pos.get(attrsOld.get(i));\n\t\t\tif(posVals==null){\n\t\t\t\tposVals=new ArrayList<String>();\n\t\t\t\tpos.put(attrsOld.get(i),posVals);\n\t\t\t}\n\t\t\tposVals.add(String.valueOf(i));\n\n\t\t}\n\t\t\n\t\t//System.out.println(\"Position of attrs=\" + pos + \" Constants= \" + constants);\n\t\n\t\t//deal with var equality x0=x2\n\t\tIterator<String> it = pos.keySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString key = (String)it.next();\n\t\t\tArrayList<String> vals = pos.get(key);\n\t\t\tif(vals.size()>1){\n\t\t\t\t//add x0=x2 & x2=x9, etc\n\t\t\t\tfor(int i=1; i<vals.size(); i++){\n\t\t\t\t\tBuiltInPredicate p1 = new BuiltInPredicate(MediatorConstants.EQUALS);\n\t\t\t\t\t//p1.addTerm(new VarTerm(key+vals.get(i)));\n\t\t\t\t\t//p1.addTerm(new VarTerm(key+vals.get(i+1)));\n\t\t\t\t\tVarTerm v1 = new VarTerm(key);\n\t\t\t\t\tv1.changeVarName(Integer.valueOf(vals.get(i-1)).intValue());\n\t\t\t\t\tp1.addTerm(v1);\n\t\t\t\t\tVarTerm v2 = new VarTerm(key);\n\t\t\t\t\tv2.changeVarName(Integer.valueOf(vals.get(i)).intValue());\n\t\t\t\t\tp1.addTerm(v2);\n\t\t\t\t\tformula.add(p1);\n\t\t\t\t\t//i=i+1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//deal with constants\n\t\tit = constants.keySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString key = (String)it.next();\n\t\t\tString val = constants.get(key);\n\t\t\t//it's a constant\n\t\t\t//add const3=\"10\"\n\t\t\tBuiltInPredicate p1 = new BuiltInPredicate(MediatorConstants.EQUALS);\n\t\t\tp1.addTerm(new VarTerm(key));\n\t\t\tp1.addTerm(new ConstTerm(val));\n\t\t\tformula.add(p1);\n\t\t}\n\t\treturn formula;\n\t}", "private void checkLogicOperands(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n checkBinaryOperation(in, d, out);\n }", "@Override\n public SetInterface<T> union(SetInterface<T> rhs) {\n //create return SetInterface\n SetInterface<T> result = new LinkedSet();\n //add the items from the calling set to the result set\n Node n = first;\n while(n != null){\n result.addItem(n.value);\n n = n.next;\n }\n \n //convert rhs to an array so we know what we're dealing with\n T[] rhsArr = rhs.toArray();\n //add the items from rhsArr to result\n for(int i = 0; i < rhsArr.length; i++){\n result.addItem(rhsArr[i]);\n }\n \n return result;\n }", "public Collection<String> getPredicates() {\n HashSet<String> fullURISet = new HashSet<>();\n StmtIterator si = model.listStatements();\n while (si.hasNext()) {\n fullURISet.add(si.nextStatement().getPredicate().toString());\n }\n return fullURISet;\n }", "public static final int[] get_OR(){\n\t\treturn get_AND();\n\t}", "public Expression commutativeExp() {\r\n return this;\r\n }", "public static Set<IExplodedBasicBlock> extractInvokeBlocks(final ControlFlowGraph<SSAInstruction, IExplodedBasicBlock> cfg) {\n final HashSet<IExplodedBasicBlock> invokeBlocks = new HashSet<>();\n\n for (final IExplodedBasicBlock block : cfg) {\n if (block.getInstruction() instanceof SSAAbstractInvokeInstruction) {\n invokeBlocks.add(block);\n }\n }\n\n return invokeBlocks;\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "Set<String> getExpressionElementAndOptionComboIds(String expression, ParseType parseType);", "private Set<String> getOperationIds(final Operation... operations) {\r\n\t\tSet<String> operationIds = null;\r\n\t\tif (operations != null) {\r\n\t\t\toperationIds = Stream.of(operations).filter(Objects::nonNull).map(o -> o.getOperationId()).collect(Collectors.toSet());\r\n\t\t}\r\n\t\treturn operationIds;\r\n\t}", "public ILatticeOperations<TupleLatticeElement<Variable, NullLatticeElement>> getLatticeOperations() {\n\t\treturn ops;\n\t}", "public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\r\n\t\treturn gaXbase.getOpMultiAccess();\r\n\t}", "public static List<int[]> childrenOperatorIndex(SqlNode sn){\r\n\t\tint size = sn.getChildren().size();\r\n\t\tList<int[]> idxRange = new ArrayList<>();\r\n\t\tfor(int i = 0; i < size; i++){\r\n\t\t\tint start = i;\r\n\t\t\twhile(start < size && sn.getChildren().get(start) instanceof Operator){\r\n\t\t\t\t++start;\r\n\t\t\t}\r\n\t\t\tif(start > i){\r\n\t\t\t\tidxRange.add(new int[]{i, start - 1});\r\n\t\t\t\ti = start;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn idxRange;\r\n\t}", "public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\n\t\treturn gaXbase.getOpMultiAccess();\n\t}", "public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\n\t\treturn gaXbase.getOpMultiAccess();\n\t}", "private void findConceptsForInstances() {\n\t\tSet<String> temp = new HashSet<String>();\n\n\t\tfor (String s : taskInput)\n\t\t\ttemp.add(taxonomyMap.get(s).parents.get(0).value);\n\t\ttaskInput.clear();\n\t\ttaskInput.addAll(temp);\n\n\t\ttemp.clear();\n\t\tfor (String s : taskOutput)\n\t\t\ttemp.add(taxonomyMap.get(s).parents.get(0).value);\n\t\ttaskOutput.clear();\n\t\ttaskOutput.addAll(temp);\n\n\t\tfor (Node s : serviceMap.values()) {\n\t\t\ttemp.clear();\n\t\t\tSet<String> inputs = s.getInputs();\n\t\t\tfor (String i : inputs)\n\t\t\t\ttemp.add(taxonomyMap.get(i).parents.get(0).value);\n\t\t\tinputs.clear();\n\t\t\tinputs.addAll(temp);\n\n\t\t\ttemp.clear();\n\t\t\tSet<String> outputs = s.getOutputs();\n\t\t\tfor (String o : outputs)\n\t\t\t\ttemp.add(taxonomyMap.get(o).parents.get(0).value);\n\t\t\toutputs.clear();\n\t\t\toutputs.addAll(temp);\n\t\t}\n\t}", "SEIntegerVariable getOperand1();", "OpList createOpList();", "Set<Condition> getDeclaredInstanceInvariantConditions();", "public AllInstanceExpressionElements getAllInstanceExpressionAccess() {\r\n\t\treturn pAllInstanceExpression;\r\n\t}", "Set<? extends IRBasicBlock> getBlocks();", "public List<Instruction> popInstructions() {\n return instructionsStack.pop();\n }", "String getOperator();", "public void executeAnd(){\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString operand1 = mRegisters[mIR.substring(7, 3).getValue()];\n\t\tchar[] andSolution = new char[16];\n\t\tBitString operand2 = new BitString();\n\t\tif(mIR.substring(10, 1).getValue() == 1){ //immediate mode\n\t\t\toperand2 = mIR.substring(11, 5); //imma5\n\t\t\tif(operand2.getValue2sComp() < 0){\n\t\t\t\tBitString negativeExtend = new BitString();\n\t\t\t\tnegativeExtend.setBits(\"11111111111\".toCharArray());\n\t\t\t\tnegativeExtend.append(operand2);\n\t\t\t\toperand2 = negativeExtend;\n\t\t\t} else {\n\t\t\t\tBitString positiveExtended = new BitString();\n\t\t\t\tpositiveExtended.setBits(\"00000000000\".toCharArray());\n\t\t\t\toperand2 = positiveExtended.append(operand2);\n\t\t\t}\n\t\t} else { \t\t\t\t\t\t\t\t\t\t\t\t//register mode\n\t\t\toperand2 = mRegisters[mIR.substring(13, 3).getValue()];\n\t\t}\n\n\n\t\tfor (int i = 0; i < operand1.getLength(); i++) {\n\t\t\tif(operand1.substring(i, 1).getValue() + operand2.substring(i, 1).getValue() ==2){\n\t\t\t\tandSolution[i] = '1';\n\t\t\t} else {\n\t\t\t\tandSolution[i] = '0';\n\t\t\t}\n\t\t}\n\n\t\tmRegisters[destBS.getValue()].setBits(andSolution);\n\n\t\tsetConditionalCode(mRegisters[destBS.getValue()]);\n\t}", "public Set getNodesThatCall(PassedParameter pp) {\n if (USE_PARAMETER_MAP) {\n Set s = (Set)passedParamToNodes.get(pp);\n if (s == null) return Collections.EMPTY_SET;\n return s;\n }\n Set s = NodeSet.FACTORY.makeSet();\n getNodesThatCall(pp, s);\n return s;\n }", "private static String[] getOperations(String input) {\n\t\treturn input.replaceAll(\"[ ]\", \"\").split(\"[;]\");\n\t}", "Map<String, OperationalSets> getSets();", "static List<List<Card>> multiply(List<List<Card>> runs, Set<Card> operand) {\n List<List<Card>> expandedRuns = new ArrayList<>();\n for (List<Card> run : runs) {\n for (Card card : operand) {\n List<Card> newRun = new ArrayList<>();\n newRun.addAll(run);\n newRun.add(card);\n expandedRuns.add(newRun);\n }\n }\n return expandedRuns;\n }", "public InstructionIterator getInstructions(boolean forward);", "SEIntegerVariable getOperand2();", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public interface Unary extends Expr \n{\n /** Unary expression operator. */\n public static enum Operator {\n BIT_NOT (\"~\", true),\n NEG (\"-\", true),\n POST_INC (\"++\", false),\n POST_DEC (\"--\", false),\n PRE_INC (\"++\", true),\n PRE_DEC (\"--\", true),\n POS (\"+\", true),\n NOT (\"!\", true),\n CARET (\"^\", true),\n BAR (\"|\", true),\n AMPERSAND(\"&\", true),\n STAR (\"*\", true),\n SLASH (\"/\", true),\n PERCENT (\"%\", true);\n\n protected boolean prefix;\n protected String name;\n\n private Operator(String name, boolean prefix) {\n this.name = name;\n this.prefix = prefix;\n }\n\n /** Returns true of the operator is a prefix operator, false if\n * postfix. */\n public boolean isPrefix() { return prefix; }\n\n @Override public String toString() { return name; }\n }\n\n public static final Operator BIT_NOT = Operator.BIT_NOT;\n public static final Operator NEG = Operator.NEG;\n public static final Operator POST_INC = Operator.POST_INC;\n public static final Operator POST_DEC = Operator.POST_DEC;\n public static final Operator PRE_INC = Operator.PRE_INC;\n public static final Operator PRE_DEC = Operator.PRE_DEC;\n public static final Operator POS = Operator.POS;\n public static final Operator NOT = Operator.NOT;\n public static final Operator CARET = Operator.CARET;\n public static final Operator BAR = Operator.BAR;\n public static final Operator AMPERSAND = Operator.AMPERSAND;\n public static final Operator STAR = Operator.STAR;\n public static final Operator SLASH = Operator.SLASH;\n public static final Operator PERCENT = Operator.PERCENT;\n\n /** The sub-expression on that to apply the operator. */\n Expr expr();\n /** Set the sub-expression on that to apply the operator. */\n Unary expr(Expr e);\n\n /** The operator to apply on the sub-expression. */\n Operator operator();\n /** Set the operator to apply on the sub-expression. */\n Unary operator(Operator o);\n}" ]
[ "0.5980625", "0.5683543", "0.56362736", "0.5582658", "0.5416905", "0.53993446", "0.53954846", "0.5354707", "0.5334715", "0.5271106", "0.5220952", "0.51819104", "0.51627696", "0.5113611", "0.5111106", "0.5046521", "0.504264", "0.503335", "0.5024702", "0.5020053", "0.5014366", "0.4981369", "0.4924076", "0.49215677", "0.4879806", "0.48687127", "0.48492652", "0.48425978", "0.4840374", "0.48278096", "0.48204923", "0.48164293", "0.48003626", "0.47859678", "0.47579366", "0.475695", "0.47559062", "0.47405377", "0.47191837", "0.4707958", "0.47053546", "0.46943083", "0.46898785", "0.46854144", "0.4683511", "0.4673769", "0.46667215", "0.46640375", "0.46640375", "0.46588305", "0.46495706", "0.4647491", "0.46347162", "0.46216327", "0.46147996", "0.46018827", "0.4595157", "0.4588969", "0.45834723", "0.45827764", "0.458211", "0.4572366", "0.45695186", "0.4569069", "0.45603105", "0.45589593", "0.45572656", "0.45534185", "0.45486093", "0.45462513", "0.45411232", "0.45390946", "0.45388746", "0.4535431", "0.4521923", "0.45086333", "0.44964385", "0.44851783", "0.44849324", "0.44840193", "0.44797805", "0.4476482", "0.44745678", "0.44745678", "0.44683725", "0.4457856", "0.44572914", "0.44559664", "0.44501078", "0.4449311", "0.4439885", "0.44375852", "0.4437005", "0.4432627", "0.44294298", "0.44277516", "0.44272703", "0.44216403", "0.44191524", "0.4407041", "0.44069597" ]
0.0
-1
Just fail if there are more than 6 args.
void gen() { int argCount = args.length; assert (argCount <= X86.argRegs.length); // If indirect jump through a register, make // sure this is not an argument register that // we're about to overwrite! X86.Operand call_target = null; if (ind) { if (tgt instanceof Reg) { call_target = env.get(tgt); assert (call_target != null); // dead value surely isn't used as a source for (int i = 0; i < argCount; i++) if (call_target.equals(X86.argRegs[i])) { X86.emitMov(X86.Size.Q,call_target,tempReg2); call_target = tempReg2; break; } } else // tgt instanceof Global call_target = new X86.AddrName(((Global)tgt).toString()); } // Move arguments into the argument regs. // First do parallel move of register sources. X86.Reg src[] = new X86.Reg[argCount]; X86.Reg dst[] = new X86.Reg[argCount]; boolean moved[] = new boolean[argCount]; // initialized to false int n = 0; for (int i = 0; i < argCount; i++) { IR.Src s = args[i]; if (s instanceof Reg) { X86.Operand rand = env.get((Reg) s); if (rand instanceof X86.Reg) { src[n] = (X86.Reg) rand; dst[n] = X86.argRegs[i]; n++; moved[i] = true; } } } new X86.ParallelMover(n,src,dst,tempReg1).move(); // Now handle any immediate sources. for (int i = 0; i < argCount; i++) if (!moved[i]) { X86.Operand r = args[i].gen_source_operand(true,X86.argRegs[i]); X86.emitMov(X86.Size.Q,r,X86.argRegs[i]); } if (ind) { X86.emit1("call *", call_target); } else X86.emit1("call", new X86.GLabel((((Global)tgt).toString()))); if (rdst != null) { X86.Reg r = rdst.gen_dest_operand(); X86.emitMov(X86.Size.Q,X86.RAX,r); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void checkNumOfArguments(String[] args) throws IllegalArgumentException{\n\t\ttry{\n\t\t\tif(args.length != App.numberOfExpectedArguments ) {\t\n\t\t\t\tthrow new IllegalArgumentException(\"Expected \" + App.numberOfExpectedArguments + \" arguments but received \" + args.length);\n\t\t\t}\n }\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\texitArgumentError();\n\t\t}\n\t\t\n\t}", "abstract public boolean argsNotFull();", "private static void checkCmdArgs(int numberOfArgs, String[] args) {\n\t\tif (args.length != numberOfArgs) {\n\t\t\tSystem.out.println(\"Wrong number of command line arguments!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}", "@Test\r\n public void testTooManyArgs() {\r\n String[] str = {\"curl\", \"http://www.cs.cmu.edu/~spok/grimmtmp/073.txt\", \r\n \"http://omarmateen.me/experience.html\"};\r\n\r\n curl.run(str);\r\n assertTrue(ErrorHandler.checkIfErrorOccurred());\r\n assertEquals(\"too many arguments\\n\", Output.getLastPrinted());\r\n }", "protected static boolean ensureNumArgs( String param[], int n ) {\n\t\tif ( n >= 0 && param.length != n || n < 0 && param.length < -n ) {\n\t\t\tSystem.err.println( \"Wrong number (\" + param.length + \") of arguments.\" );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "static Boolean verifyArguments(String[] args)\n {\n if (args.length < 2)\n {\n return false;\n }\n \n return true;\n }", "@Test\r\n public void testTooFewArgs() {\r\n String[] str = {\"curl\"};\r\n\r\n curl.run(str);\r\n assertTrue(ErrorHandler.checkIfErrorOccurred());\r\n assertEquals(\"not enough arguments\\n\", Output.getLastPrinted());\r\n }", "public static void checkNumArgs(String[] args, int n) {\r\n if (args.length != n) {\r\n throw new GitletException(\"Incorrect operands.\");\r\n }\r\n return;\r\n }", "@Override\n protected boolean hasValidNumberOfArguments(int numberOfParametersEntered) {\n return numberOfParametersEntered == 3;\n }", "public void checkNumberOfArguments3() {\n logger.info(\"Hello {}, {}, {}, {}, {}, {}, {}\", \"world\", 2, \"third argument\", 4, 5, 6, new String(\"last arg\"));\n }", "abstract public int maxArgs();", "public void checkNumberArgs(int argNum) throws WrongNumberArgsException {\n/* 79 */ if (argNum < 2) {\n/* 80 */ reportWrongNumberArgs();\n/* */ }\n/* */ }", "@Override\n public int getArgLength() {\n return 4;\n }", "@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "private void checkArguments(ArrayList<String> applicationArguments) throws JshException {\n if (applicationArguments.size() > 1) {\n throw new JshException(\"history: too many arguments\");\n }\n }", "public static boolean validateInputLength(String[] args) {\n return args.length == 3;\n }", "private void argumentChecker(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tif (args.length != 2) {\n\t\t\tSystem.out.println(\"Invalid arguments. \\nExpected:\\tDriver inputFile.txt outputFile.txt\");\n\t\t}\n\t}", "int getNumberOfArguments();", "protected void reportWrongNumberArgs() throws WrongNumberArgsException {\n/* 90 */ throw new WrongNumberArgsException(XSLMessages.createXPATHMessage(\"gtone\", null));\n/* */ }", "@Override\n public int getNumberArguments() {\n return 1;\n }", "@Test\n public void AppNoParams() {\n try{\n App.main(new String[]{});\n }catch(RuntimeException re){\n assertEquals(re.getMessage(),\"Insufficient arguments given. Needs [input file] [# processors]\");\n }\n }", "public abstract int getMaximumArguments();", "@Test\n\tpublic void test_ArgumentCount_0_InvalidInput() {\n\t\tString[] args = {};\n\t\tTypeFinder.main(args);\n\t\tString expected = TypeFinder.INVALID_ARGUMENT_ERROR_MESSAGE + FileManager.lineSeparator;\n\t\tString results = errContent.toString();\n\t\tassertEquals(expected, results);\n\t}", "private static void verifyArgs()\r\n\t{\r\n\t\tif(goFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GO file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(annotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input annotation file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(goSlimFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GOslim file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(slimAnnotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an output file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t}", "public void analyseArguments(String[] args) throws ArgumentsException {\n \t\t\n for (int i=0;i<args.length;i++){ \n \n \n if (args[i].matches(\"-s\")){\n affichage = true;\n }\n else if (args[i].matches(\"-seed\")) {\n aleatoireAvecGerme = true;\n i++; \n \t// traiter la valeur associee\n try { \n seed =new Integer(args[i]);\n \n }\n catch (Exception e) {\n throw new ArgumentsException(\"Valeur du parametre -seed invalide :\" + args[i]);\n } \t\t\n }\n \n else if (args[i].matches(\"-mess\")){\n i++; \n \t// traiter la valeur associee\n messageString = args[i];\n if (args[i].matches(\"[0,1]{7,}\")) {\n messageAleatoire = false;\n nbBitsMess = args[i].length();\n \n } \n else if (args[i].matches(\"[0-9]{1,6}\")) {\n messageAleatoire = true;\n nbBitsMess = new Integer(args[i]);\n if (nbBitsMess < 1) \n throw new ArgumentsException (\"Valeur du parametre -mess invalide : \" + nbBitsMess);\n }\n else \n throw new ArgumentsException(\"Valeur du parametre -mess invalide : \" + args[i]);\n }\n \n else throw new ArgumentsException(\"Option invalide :\"+ args[i]);\n \n }\n \n }", "@java.lang.Override\n public int getArgsCount() {\n return args_.size();\n }", "public void testGetInputArguments() {\n List<String> args = mb.getInputArguments();\n assertNotNull(args);\n for (String string : args) {\n assertNotNull(string);\n assertTrue(string.length() > 0);\n }\n }", "int getArgumentsCount();", "private void parseArgs(String[] object) throws IllegalArgumentException {\n Object object2;\n int n;\n int n2;\n int n3 = 0;\n boolean bl = false;\n boolean bl2 = true;\n block6 : do {\n int n4 = ((Object)object).length;\n n2 = 0;\n n = ++n3;\n if (n3 >= n4) break;\n object2 = object[n3];\n if (((String)object2).equals(\"--\")) {\n n = n3 + 1;\n break;\n }\n if (((String)object2).startsWith(\"--setuid=\")) {\n if (this.mUidSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mUidSpecified = true;\n this.mUid = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).startsWith(\"--setgid=\")) {\n if (this.mGidSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mGidSpecified = true;\n this.mGid = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).startsWith(\"--target-sdk-version=\")) {\n if (this.mTargetSdkVersionSpecified) throw new IllegalArgumentException(\"Duplicate target-sdk-version specified\");\n this.mTargetSdkVersionSpecified = true;\n this.mTargetSdkVersion = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).equals(\"--runtime-args\")) {\n bl = true;\n continue;\n }\n if (((String)object2).startsWith(\"--runtime-flags=\")) {\n this.mRuntimeFlags = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).startsWith(\"--seinfo=\")) {\n if (this.mSeInfoSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mSeInfoSpecified = true;\n this.mSeInfo = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).startsWith(\"--capabilities=\")) {\n if (this.mCapabilitiesSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mCapabilitiesSpecified = true;\n if (((String[])(object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1).split(\",\", 2))).length == 1) {\n this.mPermittedCapabilities = this.mEffectiveCapabilities = Long.decode((String)object2[0]).longValue();\n continue;\n }\n this.mPermittedCapabilities = Long.decode((String)object2[0]);\n this.mEffectiveCapabilities = Long.decode((String)object2[1]);\n continue;\n }\n if (((String)object2).startsWith(\"--rlimit=\")) {\n String[] arrstring = ((String)object2).substring(((String)object2).indexOf(61) + 1).split(\",\");\n if (arrstring.length != 3) throw new IllegalArgumentException(\"--rlimit= should have 3 comma-delimited ints\");\n object2 = new int[arrstring.length];\n for (n = 0; n < arrstring.length; ++n) {\n object2[n] = Integer.parseInt(arrstring[n]);\n }\n if (this.mRLimits == null) {\n this.mRLimits = new ArrayList();\n }\n this.mRLimits.add((int[])object2);\n continue;\n }\n if (((String)object2).startsWith(\"--setgroups=\")) {\n if (this.mGids != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1).split(\",\");\n this.mGids = new int[((String[])object2).length];\n n = ((Object[])object2).length - 1;\n do {\n if (n < 0) continue block6;\n this.mGids[n] = Integer.parseInt((String)object2[n]);\n --n;\n } while (true);\n }\n if (((String)object2).equals(\"--invoke-with\")) {\n if (this.mInvokeWith != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n ++n3;\n try {\n this.mInvokeWith = object[n3];\n }\n catch (IndexOutOfBoundsException indexOutOfBoundsException) {\n throw new IllegalArgumentException(\"--invoke-with requires argument\");\n }\n }\n if (((String)object2).startsWith(\"--nice-name=\")) {\n if (this.mNiceName != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mNiceName = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).equals(\"--mount-external-default\")) {\n this.mMountExternal = 1;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-read\")) {\n this.mMountExternal = 2;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-write\")) {\n this.mMountExternal = 3;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-full\")) {\n this.mMountExternal = 6;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-installer\")) {\n this.mMountExternal = 5;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-legacy\")) {\n this.mMountExternal = 4;\n continue;\n }\n if (((String)object2).equals(\"--query-abi-list\")) {\n this.mAbiListQuery = true;\n continue;\n }\n if (((String)object2).equals(\"--get-pid\")) {\n this.mPidQuery = true;\n continue;\n }\n if (((String)object2).startsWith(\"--instruction-set=\")) {\n this.mInstructionSet = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).startsWith(\"--app-data-dir=\")) {\n this.mAppDataDir = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).equals(\"--preload-app\")) {\n this.mPreloadApp = object[++n3];\n continue;\n }\n if (((String)object2).equals(\"--preload-package\")) {\n this.mPreloadPackage = object[++n3];\n this.mPreloadPackageLibs = object[++n3];\n this.mPreloadPackageLibFileName = object[++n3];\n this.mPreloadPackageCacheKey = object[++n3];\n continue;\n }\n if (((String)object2).equals(\"--preload-default\")) {\n this.mPreloadDefault = true;\n bl2 = false;\n continue;\n }\n if (((String)object2).equals(\"--start-child-zygote\")) {\n this.mStartChildZygote = true;\n continue;\n }\n if (((String)object2).equals(\"--set-api-blacklist-exemptions\")) {\n this.mApiBlacklistExemptions = (String[])Arrays.copyOfRange(object, n3 + 1, ((Object)object).length);\n n3 = ((Object)object).length;\n bl2 = false;\n continue;\n }\n if (((String)object2).startsWith(\"--hidden-api-log-sampling-rate=\")) {\n object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n try {\n this.mHiddenApiAccessLogSampleRate = Integer.parseInt((String)object2);\n bl2 = false;\n }\n catch (NumberFormatException numberFormatException) {\n object = new StringBuilder();\n ((StringBuilder)object).append(\"Invalid log sampling rate: \");\n ((StringBuilder)object).append((String)object2);\n throw new IllegalArgumentException(((StringBuilder)object).toString(), numberFormatException);\n }\n }\n if (((String)object2).startsWith(\"--hidden-api-statslog-sampling-rate=\")) {\n object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n try {\n this.mHiddenApiAccessStatslogSampleRate = Integer.parseInt((String)object2);\n bl2 = false;\n }\n catch (NumberFormatException numberFormatException) {\n object = new StringBuilder();\n ((StringBuilder)object).append(\"Invalid statslog sampling rate: \");\n ((StringBuilder)object).append((String)object2);\n throw new IllegalArgumentException(((StringBuilder)object).toString(), numberFormatException);\n }\n }\n if (((String)object2).startsWith(\"--package-name=\")) {\n if (this.mPackageName != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mPackageName = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n n = n3;\n if (!((String)object2).startsWith(\"--usap-pool-enabled=\")) break;\n this.mUsapPoolStatusSpecified = true;\n this.mUsapPoolEnabled = Boolean.parseBoolean(((String)object2).substring(((String)object2).indexOf(61) + 1));\n bl2 = false;\n } while (true);\n if (!this.mAbiListQuery && !this.mPidQuery) {\n if (this.mPreloadPackage != null) {\n if (((Object)object).length - n > 0) throw new IllegalArgumentException(\"Unexpected arguments after --preload-package.\");\n } else if (this.mPreloadApp != null) {\n if (((Object)object).length - n > 0) throw new IllegalArgumentException(\"Unexpected arguments after --preload-app.\");\n } else if (bl2) {\n if (!bl) {\n object2 = new StringBuilder();\n ((StringBuilder)object2).append(\"Unexpected argument : \");\n ((StringBuilder)object2).append((String)object[n]);\n throw new IllegalArgumentException(((StringBuilder)object2).toString());\n }\n this.mRemainingArgs = new String[((Object)object).length - n];\n object2 = this.mRemainingArgs;\n System.arraycopy(object, n, object2, 0, ((String[])object2).length);\n }\n } else if (((Object)object).length - n > 0) throw new IllegalArgumentException(\"Unexpected arguments after --query-abi-list.\");\n if (!this.mStartChildZygote) return;\n bl = false;\n object = this.mRemainingArgs;\n n = ((Object)object).length;\n n3 = n2;\n do {\n bl2 = bl;\n if (n3 >= n) break;\n if (((String)object[n3]).startsWith(\"--zygote-socket=\")) {\n bl2 = true;\n break;\n }\n ++n3;\n } while (true);\n if (!bl2) throw new IllegalArgumentException(\"--start-child-zygote specified without --zygote-socket=\");\n }", "private static void validateInputArguments(String args[]) {\n\n\t\tif (args == null || args.length != 2) {\n\t\t\tthrow new InvalidParameterException(\"invalid Parameters\");\n\t\t}\n\n\t\tString dfaFileName = args[DFA_FILE_ARGS_INDEX];\n\t\tif (dfaFileName == null || dfaFileName.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid file name\");\n\t\t}\n\n\t\tString delimiter = args[DELIMITER_SYMBOL_ARGS_INDEX];\n\t\tif (delimiter == null || delimiter.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid delimiter symbol\");\n\t\t}\n\t}", "private static void checkPassedInArguments(String[] args, EquationManipulator manipulator) {\n // Convert arguments to a String\n StringBuilder builder = new StringBuilder();\n for (String argument: args) {\n builder.append(argument + \" \");\n }\n \n // check if equation is valid\n String[] equation = manipulator.getEquation(builder.toString());\n if (equation.length == 0) {\n // unable to parse passed in arguments\n printErrorMessage();\n handleUserInput(manipulator);\n } else {\n // arguments were passed in correctly\n System.out.println(\"Wohoo! It looks like everything was passed in correctly!\"\n + \"\\nYour equation is: \" + builder.toString() + \"\\n\");\n handleArguments(equation, manipulator);\n }\n }", "public final void invalidArgLength(Player player, String name) {\n \t\tplugin.sendWarning(player, \"Invalid Argument Length\");\n \t\t\n \t\tMethod method = plugin.getCommandManager().getCommandExecutor(name).getMethod();\n \t\t\n \t\tif (method.getAnnotation(CommandInfo.class) != null)\n \t\t\tplugin.sendInfo(player, \"Usage: /titanchat \" + method.getAnnotation(CommandInfo.class).usage());\n \t}", "private static boolean validOptionalArgs (String[] args){\n boolean validChar;\n // Iterate over args\n for (int i = 0; i < args.length; i++){\n if (args[i].charAt(0)!='-')\n \treturn false;\n // Iterate over characters (to read combined arguments)\n for (int charPos = 1; charPos < args[i].length(); charPos++){\n \tvalidChar = false;\n \tfor (int j = 0; j < VALID_OPTIONAL_ARGS.length; j++){\n\t if (args[i].charAt(charPos) == VALID_OPTIONAL_ARGS[j]){\n\t validChar = true;\n\t break;\n\t }\n \t}\n \tif (!validChar)\n \t\treturn false;\n \t}\n }\n return true;\n }", "public static boolean checkArgs(String[] args) {\n\t\tboolean valid = true;\n\t\t\n\t\tfor (int index = 0; valid && index < args.length; index++) {\n\t\t\tif (args[index].equals(\"-help\") || args[index].equals(\"--help\"))\n\t\t\t\tvalid = false;\n\n\t\t\t// All following arguments should have one value that follows each argument\n\t\t\tif (index+1 >= args.length || args[index+1] == null)\n\t\t\t\tvalid = false;\n\n\t\t\telse if (valid && args[index].equals(\"-dir\"))\n\t\t\t\targsMap.put(\"dir\", args[++index]);\n\t\t}\n\t\treturn valid;\n\t}", "private void checkMandatoryArguments() throws ArgBoxException {\n\t\tfinal List<String> errors = registeredArguments.stream()\n\t\t\t\t.filter(arg -> arg.isMandatory())\n\t\t\t\t.filter(arg -> !parsedArguments.containsKey(arg))\n\t\t\t\t.map(arg -> String.format(\"The argument %1s is required !\", arg.getLongCall()))\n\t\t\t\t.collect(Collectors.toList());\n\t\tthrowException(() -> !errors.isEmpty(), getArgBoxExceptionSupplier(\"Some arguments are missing !\", errors));\n\t}", "private void scanArgs(String [] args)\n{\n for (int i = 0; i < args.length; ++i) {\n if (args[i].startsWith(\"-\")) {\n\t badArgs();\n }\n else badArgs();\n }\n}", "public abstract int getMinimumArguments();", "private void checkArgTypes() {\n Parameter[] methodParams = method.getParameters();\n if(methodParams.length != arguments.length + 1) {\n throw new InvalidCommandException(\"Incorrect number of arguments on command method. Commands must have 1 argument for the sender and one argument per annotated argument\");\n }\n\n Class<?> firstParamType = methodParams[0].getType();\n\n boolean isFirstArgValid = true;\n if(requiresPlayer) {\n if(firstParamType.isAssignableFrom(IPlayerData.class)) {\n usePlayerData = true; // Command methods annotated with a player requirement can also use IPlayerData as their first argument\n } else if(!firstParamType.isAssignableFrom(Player.class)) {\n isFirstArgValid = false; // Otherwise, set it to invalid if we can't assign it from a player\n }\n } else if(!firstParamType.isAssignableFrom(CommandSender.class)) { // Non player requirement annotated commands must just take a CommandSender\n isFirstArgValid = false;\n }\n\n if(!isFirstArgValid) {\n throw new InvalidCommandException(\"The first argument for a command must be a CommandSender. (or a Player/IPlayerData if annotated with a player requirement)\");\n }\n }", "public void testValidateArgs() {\n\t\tString[] args = new String[]{\"name\",\"bob\",\"jones\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 1 argument, should fail\n\t\targs = new String[]{\"name\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 0 arguments, should be a problem\n\t\targs = new String[]{};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with null arguments, should be a problem\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with correct arguments, first one is zero, should work\n\t\targs = new String[]{\"name\",\"bob\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tfail(\"An InvalidFunctionArguements exception should have NOT been thrown by the constructor!\");\n\t\t}\n\t}", "@Test\r\n public void testCheckInput() throws Exception {\r\n System.out.println(\"checkInput\");\r\n System.out.println(\"test1\");\r\n String[] arguments = {\"1k2h3u\",\"test.txt\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\"};\r\n CommandLineArgumentParser instance =new CommandLineArgumentParser(arguments);\r\n String expResult = \"correct\";\r\n String result = instance.checkInput(arguments);\r\n assertEquals(expResult, result);\r\n \r\n System.out.println(\"test 2\");\r\n String[] arguments2 = {\"1k\",\"test.txt\",\"1\"};\r\n String expResult2 = \"correct\";\r\n String result2 = instance.checkInput(arguments2);\r\n assertEquals(expResult2, result2);\r\n \r\n System.out.println(\"test 3\");\r\n String[] arguments3 = {\"chat.txt\"};\r\n String expResult3 = \"correct\";\r\n String result3 = instance.checkInput(arguments3);\r\n assertEquals(expResult3, result3);\r\n \r\n System.out.println(\"test 4\");\r\n String[] arguments4 = {\"1k2h3u\",\"test.txt\",\"1\",\"2\",\"3\",\"4\",\"5\"};\r\n String expResult4 = \"Incorrect number of arguments\";\r\n String result4 = instance.checkInput(arguments4);\r\n assertEquals(expResult4, result4);\r\n \r\n System.out.println(\"test 5\");\r\n String[] arguments5 = {};\r\n String expResult5 = \"Need at least one argument with input file path\";\r\n String result5 = instance.checkInput(arguments5);\r\n assertEquals(expResult5, result5);\r\n }", "private boolean checkingAllArguments() {\n\t\t\n\t\t// test if the four player types have been selected\n\t\tfor(int i=0;i<allButtons.size();i++) {\n\t\t\tif(allButtons.get(i)==null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// test if the seed is in the correct format\n\t\tif(!(seed.textProperty().get().isEmpty())){\n\t\t\ttry {\n\t\t\t\tgameSeed = Long.parseLong(seed.getText());\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tmenuMessage.setText(\"Given seed is not a valid number\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t// test if for each of the players the given arguments are correct\n\t\tfor(int i = 0; i < allButtons.size(); ++i) {\n\t\t\tchar playerType = allButtons.get(i).getText().charAt(0);\n\t\t\tString argument = texts.get(2 * i + 1).getText();\n\t\t\t\n\t\t\tif(!argument.isEmpty()) {\n\t\t\t\tswitch(playerType) {\n\t\t\t\t\n\t\t\t\tcase 'S' : \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlong l = Long.parseLong(texts.get(2 * i + 1).getText());\n\t\t\t\t\t\tif(l < 9) {\n\t\t\t\t\t\t\tmenuMessage.setText(\"The iteration value must be at least 9\");\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tmenuMessage.setText(\"One of the iteration number is not a valid number\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'R' :\n\t\t\t\t\t\n\t\t\t\t\tString[] parts = StringSerializer.split(\"\\\\.\", argument); \n\t\t\t\t\t\n\t\t\t\t\tif (parts.length != 4) { \n\t\t\t\t\t\tmenuMessage.setText(\"One of the IP Address is not a valid address\");\n\t\t\t\t\t\treturn false; \n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tfor (String str : parts) { \n\t\t\t\t\t\tint j = Integer.parseInt(str); \n\t\t\t\t\t\tif ((j < 0) || (j > 255)) { \n\t\t\t\t\t\t\tmenuMessage.setText(\"One of the IP Address is not a valid address\");\n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isValid(String args[]){\n \n if(args.length < 2){\n System.out.println(\"Not enough arguments detected. Please enter two\"\n + \" integer arguments.\");\n return false;\n }\n \n Scanner scanin = new Scanner(args[0]);\n Scanner scanin2 = new Scanner(args[1]);\n\t \n if(!scanin.hasNextInt() || !scanin2.hasNextInt()){\n System.out.println(\"Invalid argument type detected. Please enter two\"\n + \" integer arguments.\");\n return false;\n }\n\t else\n return true;\n }", "@Override public int getNumArguments()\t\t\t{ return arg_list.size(); }", "public static void main(String[] args){\n for(String s : args){\n boolean a = validateGroup(\"team2\",s);\n boolean b = validateEIT(\"kate\",\"team2\",s);\n boolean c = validateFellow(\"kate\");\n boolean d = checkGroupSize(1);\n\n System.out.println(\"The validateGroup test (expecting false) \" + a);\n System.out.println(\"The validateEIT test (expecting false) \" + b);\n System.out.println(\"The validateFellow test (expecting false) \" + c);\n System.out.println(\"The checkGroupSize test (expecting false) \" + d);\n\n }\n }", "private boolean isValidQuestionsArgument(ArrayList<String> argArray) {\n boolean isValid = true;\n if (argArray.size() != ADD_NOTE_ARGUMENTS) {\n TerminusLogger.warning(String.format(\"Failed to find %d arguments: %d arguments found\",\n ADD_NOTE_ARGUMENTS, argArray.size()));\n isValid = false;\n } else if (CommonUtils.hasEmptyString(argArray)) {\n TerminusLogger.warning(\"Failed to parse arguments: some arguments found is empty\");\n isValid = false;\n }\n return isValid;\n }", "private static boolean argsAreValid(String[] args) {\n try {\n if (args.length != NUM_OF_ARGS) {\n System.err.println(TypeTwoErrorException.TYPE_II_GENERAL_MSG +\n BAD_COMMAND_LINE_ARGUMENTS);\n return false;\n }\n File sourceDirectory = new File(args[0]);\n File commandFile = new File(args[1]);\n if ((!sourceDirectory.isDirectory()) || (!commandFile.isFile())) {\n System.err.println(TypeTwoErrorException.TYPE_II_GENERAL_MSG +\n BAD_COMMAND_LINE_ARGUMENTS);\n return false;\n }\n } catch (Exception e) {\n System.err.println(TypeTwoErrorException.TYPE_II_GENERAL_MSG +\n UNKNOWN_ERROR_COMMAND_LINE_ARGUMENTS);\n return false;\n }\n return true;\n }", "boolean isVarargs();", "boolean isVarargs();", "boolean isVarargs();", "@Override\r\n public boolean isValidParameterCount(int parameterCount) {\n return parameterCount> 0;\r\n }", "@Override\n\tprotected void checkNumberOfInputs(int length) {\n\n\t}", "public static void main(String[] args) {\n\t\tif (!processArguments(args)) {\n\t\t\tSystem.out.println(\"Invalid Arguments! Please try again..\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "static void tryReadArgs(String args[]){\n\t\tif(args.length > 0) {\n\t\t\tip = args[0];\n\t\t}\n\t\tif(args.length > 1) {\n\t\t\tport = Integer.parseInt(args[1]);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tcheckNumber(-1);\n\n\t\t}", "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}", "@Override\n public void validateArgs(String[] args, ArgsValidation check) throws ArgsException\n {\n try\n {\n check.validateTwoArgs(args);\n }\n catch(ArgsException exception)\n {\n throw exception;\n }\n }", "public int getArgsCount() {\n return args_.size();\n }", "public int getArgsCount() {\n return args_.size();\n }", "public static void m3983a(String[] args) {\n }", "public boolean isExpectedNumberOfParameters(long numberOfParameters);", "private static void validateCommandLineArguments(AutomationContext context, String extendedCommandLineArgs[])\r\n\t{\r\n\t\t//fetch the argument configuration types required\r\n\t\tCollection<IPlugin<?, ?>> plugins = PluginManager.getInstance().getPlugins();\r\n \t\tList<Class<?>> argBeanTypes = plugins.stream()\r\n\t\t\t\t.map(config -> config.getArgumentBeanType())\r\n\t\t\t\t.filter(type -> (type != null))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\t\r\n\t\targBeanTypes = new ArrayList<>(argBeanTypes);\r\n\t\t\r\n\t\t//Add basic arguments type, so that on error its properties are not skipped in error message\r\n\t\targBeanTypes.add(AutoxCliArguments.class);\r\n\r\n\t\t//if any type is required creation command line options and parse command line arguments\r\n\t\tCommandLineOptions commandLineOptions = OptionsFactory.buildCommandLineOptions(argBeanTypes.toArray(new Class<?>[0]));\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tcommandLineOptions.parseBeans(extendedCommandLineArgs);\r\n\t\t} catch(MissingArgumentException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\r\n\t\t\tSystem.err.println(commandLineOptions.fetchHelpInfo(COMMAND_SYNTAX));\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch(Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.err.println(commandLineOptions.fetchHelpInfo(COMMAND_SYNTAX));\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "private void checkLeftovers(final boolean forbidLeftovers) throws ArgBoxException {\n\t\tif (forbidLeftovers) {\n\t\t\tfinal List<String> leftoverMessages = leftovers.stream()\n\t\t\t\t\t.map(str -> String.format(\"The argument %s was not used.\", str))\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\tthrowException(() -> CollectionUtils.isNotEmpty(leftovers),\n\t\t\t\t\tgetArgBoxExceptionSupplier(\"There are unused arguments on the command line !\", leftoverMessages));\n\t\t}\n\t}", "static int size_of_call(String passed){\n\t\treturn 3;\n\t}", "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 }", "@Test\n\tpublic void test_ArgumentCount_2_InvalidPath() {\n\t\tString[] args = { \"\", \"\" };\n\t\tTypeFinder.main(args);\n\t\tString expected = TypeFinder.INVALID_PATH_ERROR_MESSAGE + FileManager.lineSeparator;\n\t\tString results = errContent.toString();\n\t\tassertEquals(expected, results);\n\t}", "@Test(expectedExceptions=InvalidArgumentValueException.class)\n public void argumentValidationTest() {\n String[] commandLine = new String[] {\"--value\",\"521\"};\n\n parsingEngine.addArgumentSource( ValidatingArgProvider.class );\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n ValidatingArgProvider argProvider = new ValidatingArgProvider();\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.value.intValue(), 521, \"Argument is not correctly initialized\");\n\n // Try some invalid arguments\n commandLine = new String[] {\"--value\",\"foo\"};\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n }", "public int getArgsCount() {\n return args_.size();\n }", "public int getArgsCount() {\n return args_.size();\n }", "private boolean validateParams(int amount) {\n\t\tString paramArray[] = {param1,param2,param3,param4,param5,param6};\r\n\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\tif(paramArray[i] == null) {\r\n\t\t\t\t//Error\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean hasValidArgs() {\r\n // if it has has zero argument, it is valid\r\n boolean zeroArgs = this.getCmd().getArguments().size() == 0;\r\n // return the boolean value\r\n return zeroArgs;\r\n }", "@Test(expectedExceptions=ArgumentsAreMutuallyExclusiveException.class)\n public void mutuallyExclusiveArgumentsTest() {\n String[] commandLine = new String[] {\"--foo\",\"5\"};\n\n parsingEngine.addArgumentSource( MutuallyExclusiveArgProvider.class );\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n MutuallyExclusiveArgProvider argProvider = new MutuallyExclusiveArgProvider();\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.foo.intValue(), 5, \"Argument is not correctly initialized\");\n\n // But when foo and bar come together, danger!\n commandLine = new String[] {\"--foo\",\"5\",\"--bar\",\"6\"};\n\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n }", "@Override\n\tpublic void implementionSeven(String[] args) throws Exception {\n\n\t}", "@Test(expected = MissingArgumentException.class)\n\tpublic void testMainEmptyParameters() throws Exception {\n\t\tString[] arguments = new String[0];\n\t\tAutomaticMowerMain.main(arguments);\n\t}", "public static void main (String[] args) throws java.lang.Exception\n {\n int[][] input = getArgs();\n int[] expectedOutput = new int[]{10, 21, 23, 16};\n\n Motku motku = new Motku(input);\n check(motku,5,2,10);\n check(motku,6, 3, 21);\n check(motku,4, 3, 23);\n check(motku,4, 2, 16);\n }", "protected void parseArgs(String[] args) throws BuildException {\n for (int i = 0; i != args.length; ++i) {\n String arg = args[i];\n boolean parsed = parseArg(arg, args, i);\n if (!parsed) {\n String message = \"Unknown option: \" + arg;\n usage(message, System.out);\n throw new BuildException(message);\n }\n }\n }", "public abstract ValidationResults validArguments(String[] arguments);", "public boolean hasArgs() {\n return fieldSetFlags()[3];\n }", "@Test(expected = InvalidInputLineException.class)\n\tpublic void testValidateTypeCCommandTooManyParameters() throws InvalidInputLineException {\n\t\t\n\t\tString[] expWords = new String[]{\"Q\", \"4\", \"5\"};\n\t\tinputValidator.validate(expWords);\n\t}", "@Test\n public void parse_multipleInvalidArgs_throwsParseException() {\n assertParseFailure(parser, MULTIPLE_VALID_PARAM, String.format(MESSAGE_INVALID_COMMAND_FORMAT,\n SortCommand.MESSAGE_USAGE));\n }", "@Test(expected = BoundedQueueException.class)\r\n\tpublic void permutationsTestSize6() throws BoundedQueueException {\r\n\t\tbq.enqueue(1);\r\n\t\tbq.enqueue(2);\r\n\t\tbq.enqueue(3);\r\n\t\tbq.enqueue(4);\r\n\t\tbq.enqueue(5);\r\n\t\tbq.enqueue(6);\r\n\t\tbq.permutations();\r\n\t}", "protected boolean checkFirstSix(ArrayList<ReturnValue> rvs) {\n\t\tfor (int i = 1; i <= 6; i++) {\n\t\t\tcheckNumbers(i, rvs.get(i - 1));\n\t\t}\n\t\treturn true;\n\t}", "public static boolean compruebaArgumentos(String[] args) {\n\t\t\n\t\tArrayList<String> ids = new ArrayList<String>();\n\t\tInteger i = 0, j = 0;\n\t\t\n\t\tif (args.length % 2 != 0 || args.length == 0) {\n\t\t\tmensajeDepuracion(\"El numero de argumentos es invalido\");\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tfor(i = 0; i<args.length; i++) {\n\t\t\t\tif (i%2 == 0) { //este tiene que ser un ID\n\t\t\t\t if(ids.contains(args[i]) == true || Integer.parseInt(args[i]) < 0) {// Esta linea comprueba ademas que los ids sean positivos\n\t\t\t\t\t\tmensajeDepuracion(String.join(\"El id: \", args[i], \" es invalido o esta repetido\"));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tids.add(args[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif ( args[i].equals(\"127.0.0.1\") || args[i].split(\"\\\\.\").length != 4) {\n\t\t\t\t\t\tmensajeDepuracion(String.join(\"El argumento \", args[i], \" esta repetido o mal formado\"));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfor(j = 0; j < 4; j++) {\n\t\t\t\t\t\t\tif(Integer.parseInt(args[i].split(\"\\\\.\")[j]) < 0 || Integer.parseInt(args[i].split(\"\\\\.\")[j]) > 255) {\n\t\t\t\t\t\t\t\tmensajeDepuracion(String.join(\"El elemento \", args[i].split(\"\\\\.\")[j], \" de la direccion \", args[i], \" es invalido\") );\n\t\t\t\t\t\t\t\treturn false;\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 true;\n\t\t}\n\t}", "private boolean parseArguments(final String[] args) {\r\n final Args arg = new Args(args);\r\n boolean ok = true;\r\n try {\r\n while(arg.more() && ok) {\r\n if(arg.dash()) {\r\n final char ca = arg.next();\r\n if(ca == 'u') {\r\n final String[] s = new String[args.length - 1];\r\n System.arraycopy(args, 1, s, 0, s.length);\r\n updateTimes(s);\r\n return false;\r\n } else if(ca == 'x') {\r\n convertTopics();\r\n return false;\r\n }\r\n\r\n ok = false;\r\n }\r\n }\r\n session = new ClientSession(ctx);\r\n session.execute(new Set(Prop.INFO, true));\r\n } catch(final Exception ex) {\r\n ok = false;\r\n Main.errln(\"Please run BaseXServer for using server mode.\");\r\n ex.printStackTrace();\r\n }\r\n \r\n if(!ok) {\r\n Main.outln(\"Usage: \" + Main.name(this) + \" [options]\" + NL +\r\n \" -u[...] update submission times\" + NL +\r\n \" -x convert queries\");\r\n }\r\n return ok;\r\n }", "public int getArgsCount() {\n\t\t\t\treturn args_.size();\n\t\t\t}", "public static void main(String[] args) throws MiExcepcion {\n\t\tint []arr={2,-4,-1,5,7};\n\t\tTestExcepcion.validar(arr);\n\n\t}", "private Arguments validateAndReturnType(String[] arguments) {\n\t\tif(arguments == null || arguments.length == 0 || arguments.length > 3)\n \t\treturn Arguments.INVALID;\n\t\tString arg1 = arguments[0].toLowerCase();\n\t\tif(arg1.equals(\"increase\") || arg1.equals(\"reduce\") || arg1.equals(\"inrange\")){\n\t\t\tif(arguments.length != 3)\n\t\t\t\treturn Arguments.INVALID;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(arg1.equals(\"increase\"))\n\t\t\t\t\treturn Arguments.INCREASE;\n\t\t\t\telse if(arg1.equals(\"reduce\"))\n\t\t\t\t\treturn Arguments.REDUCE;\n\t\t\t\telse if(arg1.equals(\"inrange\"))\n\t\t\t\t\treturn Arguments.INRANGE;\n\t\t\t}\n\t\t} else if(arg1.equals(\"next\") || arg1.equals(\"previous\") || arg1.equals(\"count\")) {\n\t\t\tif(arguments.length != 2)\n\t\t\t\treturn Arguments.INVALID;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(arg1.equals(\"next\"))\n\t\t\t\t\treturn Arguments.NEXT;\n\t\t\t\telse if(arg1.equals(\"previous\"))\n\t\t\t\t\treturn Arguments.PREVIOUS;\n\t\t\t\telse if(arg1.equals(\"count\"))\n\t\t\t\t\treturn Arguments.COUNT;\n\t\t\t}\n\t\t} else if(arg1.equals(\"quit\")) {\n\t\t\treturn Arguments.QUIT;\n\t\t} else\n\t\t\treturn Arguments.INVALID;\n\t\t\t\n\t\treturn null;\n\t}", "private boolean validateArguments() {\n return !isEmpty(getWsConfig()) && !isEmpty(getVirtualServer()) && !isEmpty(getVirtualServer()) && !isEmpty(getAppContext()) && !isEmpty(getWarFile()) && !isEmpty(getUser()) && !isEmpty(getPwdLocation());\n }", "public static void main(String[] args) {\n\t\t\n\t\tint[] nums = {1,0};\n\t\tSol_376.wiggleMaxLength(nums);\n\n\t}", "public int getNumArgs()\n {\n return numArgs;\n }", "private void checkForEmptyLine() throws OutmatchingParametersToMethodCall {\n if (this.params.isEmpty() && method.getParamAmount() != 0) {\n throw new OutmatchingParametersToMethodCall();\n } else if (method.getParamAmount() == 0 && !this.params.isEmpty()) {\n throw new OutmatchingParametersToMethodCall();\n }\n }", "private void checkMandatoryArgs(UserResource target, Errors errors) {\n final String proc = PACKAGE_NAME + \".checkMandatoryArgs.\";\n final String email = target.getEmail();\n final String password = target.getPassword();\n final String lastName = target.getLastName();\n\n logger.debug(\"Entering: \" + proc + \"10\");\n\n if (TestUtils.isEmptyOrWhitespace(email)) {\n errors.rejectValue(\"email\", \"user.email.required\");\n }\n logger.debug(proc + \"20\");\n\n if (TestUtils.isEmptyOrWhitespace(password)) {\n errors.rejectValue(\"password\", \"user.password.required\");\n }\n logger.debug(proc + \"30\");\n\n if (TestUtils.isEmptyOrWhitespace(lastName)) {\n errors.rejectValue(\"lastName\", \"userLastName.required\");\n }\n logger.debug(\"Leaving: \" + proc + \"40\");\n }", "public static void main(String[] args) throws Exception {\n if (args.length != 1) {\n usage();\n } else {\n\n }\n }", "@Test\n @Ignore\n public void testAdd_3args() {\n System.out.println(\"add\");\n int[] number = null;\n int start = 0;\n int end = 0;\n AbstractMethod instance = new AbstractMethodImpl();\n int expResult = 0;\n int result = instance.add(number, start, end);\n assertEquals(expResult, result);\n // TODO Test muss noch erstellt werden..\n fail(\"Test muss noch erstellt werden.\");\n }", "public int getArgsCount() {\n\t\t\treturn args_.size();\n\t\t}", "@Test\n public void addMultipleNonEmptyTest() {\n Set<String> s = this.createFromArgsTest(\"zero\", \"three\");\n Set<String> sExpected = this.createFromArgsRef(\"zero\", \"one\", \"two\",\n \"three\");\n\n s.add(\"two\");\n s.add(\"one\");\n\n assertEquals(sExpected, s);\n }", "public static void parseArgs(String[] args) {\n int argc = args.length,\n i = 0;\n\n for (; i < argc; i++) {\n if (args[i].equals(\"-d\")) {\n debug = true;\n } \n else if(args[i].equals(\"-m\")) {\n try {\n maxRandInt = Integer.parseInt(args[++i]);\n } catch(NumberFormatException e) {\n System.out.println(\n \"Maximum random value must be a valid integer!\"\n );\n usage();\n }\n } else if(args[i].equals(\"-n\")) {\n try {\n iterations = Integer.parseInt(args[++i]);\n } catch(NumberFormatException e) {\n System.out.println(\n \"Iteration value must be a valid integer!\"\n );\n usage();\n }\n } else {\n filename = args[i];\n }\n }\n\n if (filename.equals(\"\")) {\n System.out.println(\"Must supply a filename!\\n\");\n usage();\n }\n \n }" ]
[ "0.7719321", "0.7470385", "0.7459556", "0.72672457", "0.7130899", "0.7046224", "0.7034773", "0.69644123", "0.6952488", "0.68052065", "0.67347026", "0.6690214", "0.6513953", "0.6420336", "0.6411889", "0.6411889", "0.6411889", "0.6411889", "0.6411889", "0.64066035", "0.6341141", "0.6295126", "0.6256346", "0.62539333", "0.62041765", "0.613562", "0.61180776", "0.61012405", "0.6097731", "0.6046939", "0.60061854", "0.59902537", "0.5987762", "0.5910736", "0.5904154", "0.5894939", "0.58550286", "0.5844926", "0.5835992", "0.582197", "0.5801782", "0.5796267", "0.5786851", "0.57434195", "0.57181495", "0.57134056", "0.56937224", "0.56885594", "0.56881", "0.56776243", "0.56773394", "0.56759804", "0.56759804", "0.56759804", "0.5671797", "0.5668007", "0.5667194", "0.56460804", "0.56388575", "0.562429", "0.56076515", "0.55873936", "0.55873936", "0.55823225", "0.5557911", "0.5546877", "0.55307925", "0.5525289", "0.5517318", "0.550973", "0.5496788", "0.54945105", "0.54945105", "0.54932", "0.5485714", "0.54799384", "0.5478914", "0.54764605", "0.54704344", "0.5469341", "0.5466906", "0.54651636", "0.54615486", "0.5460403", "0.54529154", "0.544834", "0.5447008", "0.54437643", "0.5440338", "0.54219615", "0.54206157", "0.5420006", "0.54156905", "0.53988117", "0.5398772", "0.53942746", "0.53902656", "0.53895706", "0.53883606", "0.53608334", "0.5355262" ]
0.0
-1
return value if any
void gen() { if (val != null) { X86.Operand r = val.gen_source_operand(true,X86.RAX); X86.emitMov(X86.Size.Q,r,X86.RAX); } // exit sequence // pop the frame if (frameSize != 0) X86.emit2("addq",new X86.Imm(frameSize),X86.RSP); // restore any callee save registers for (int i = X86.calleeSaveRegs.length-1; i >= 0; i--) { X86.Reg r = X86.calleeSaveRegs[i]; if (env.containsValue(r)) X86.emit1("popq",r); } // and we're done X86.emit0("ret"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getElseValue();", "default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}", "boolean hasVal();", "boolean hasVal();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "public Object getAny() {\n return any;\n }", "IfaceValue findAnyValue(IfaceType typ);", "public boolean hasValue() {\n return result.hasValue();\n }", "public boolean hasValue() {\n return result.hasValue();\n }", "public int getAny() {\n\t\treturn any;\n\t}", "public boolean hasValue() { return false; }", "default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }", "@Override\n\tpublic T get(T elem) {\n\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\tif (values[i].equals(elem)) {\n\t\t\t\treturn values[i];\n\t\t\t} else if (comp.compare(values[i],elem) < 0) { // finds the set of children that can possibly contain elem\n\t\t\t\treturn children[i].get(elem);\n\t\t\t}\n\t\t}\n\t\tif (childCount > 1) { // check final set of children\n\t\t\treturn children[valCount - 1].get(elem);\n\t\t}\n\t\treturn null;\n\t}", "public boolean matchesAny() {\n return value == ANY;\n }", "@Override\n\tpublic boolean containsValue(Object arg0) {\n\t\treturn false;\n\t}", "public Object getResult()\n/* */ {\n/* 129 */ Object resultToCheck = this.result;\n/* 130 */ return resultToCheck != RESULT_NONE ? resultToCheck : null;\n/* */ }", "String getOne_or_more();", "public T getIfPresent()\n\t{\n\t\treturn cache.getIfPresent(KEY);\n\t}", "boolean hasCustomValue();", "ReturnedValueEvaluationCondition getReturnedValue();", "public static boolean getFound(){\n return found;\n }", "public boolean hasResult()\n/* */ {\n/* 119 */ return this.result != RESULT_NONE;\n/* */ }", "default boolean isPresent() {\n return get() != null;\n }", "default boolean isPresent() {\n return get() != null;\n }", "boolean isAny();", "boolean hasSearchValue();", "public boolean containsValue(Object v) {\n/* 119 */ return false;\n/* */ }", "boolean hasUnknown1();", "boolean hasUnknown1();", "boolean hasUnknown1();", "boolean hasUnknown1();", "boolean hasUnknown1();", "boolean hasUnknown1();", "public abstract Any value();", "@MethodContract(post = @Expression(\"result != null ? contains(result\"))\n public PropertyException getAnElement() {\n if (isEmpty()) {\n return null;\n }\n else {\n Iterator<Set<PropertyException>> iter1 = getElementExceptions().values().iterator();\n Set<PropertyException> s = iter1.next();\n Iterator<PropertyException> iter2 = s.iterator();\n return iter2.next();\n }\n }", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "boolean containsValue(Object value) throws NullPointerException;", "public Optional<E> one() {\n return Optional.ofNullable(queryOne());\n }", "T getOrElse(T value);", "boolean getValue();", "Object getContainedValue();", "boolean isValue();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "public abstract Optional<A> val();", "protected abstract Optional<T> getSingleSelection();", "public AnyType get(AnyType key) {\n \tif (contains(key)) {\n \t\tint currentPos = findPos( key );\n \t\t\treturn ((array[currentPos] != null) ? array[currentPos].value : null); \n \t}\n \telse {\n \t\treturn null;\n \t}\n }", "Optional<X> elem();", "private V get(K key) {\n\t\t\tif (keySet.contains(key)) {\n\t\t\t\treturn valueSet.get(keySet.indexOf(key));\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tprotected Object getValue(Object element) {\r\n\t\treturn true;\r\n\t}", "@java.lang.Override\n public boolean hasVal() {\n return val_ != null;\n }", "public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }", "boolean hasEresult();", "public boolean hasValue() {\n return value_ != null;\n }", "String getZero_or_one();", "public boolean existsAnyMissingValue(){\r\n\t\treturn (anyMissingValue[0] || anyMissingValue[1]);\r\n\t}", "boolean hasVarValue();", "boolean hasUnknown();", "public boolean getResult() {\n\t\tif (stack.size() != 1) {\n\t\t\tthrow new IllegalStateException(\"Stack size mismatch\");\n\t\t}\n\t\t\n\t\treturn stack.peek();\n\t}", "public boolean hasValue() {\n return valueBuilder_ != null || value_ != null;\n }", "Optional<ValueType> getSingle(KeyType key);", "String getIfElse();", "boolean hasUnknown2();", "boolean hasUnknown2();", "boolean hasUnknown2();", "boolean getSearchValueNull();", "protected T getFirstValue(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "static private boolean isFirstOfValue(Token.Code code) {\r\n \t\t\t\treturn isFirstOfLiteral(code) || isFirstOfObject(code) || isFirstOfArray(code);\r\n \t\t\t}", "public boolean existsOutputMissingValues(){\r\n\t\treturn anyMissingValue[1];\r\n\t}", "public boolean containsAtMostOneItem() {\n boolean contains;\n if (start==null | start.next==null) {\n contains = true;\n }\n return contains;\n }", "@Override\r\n\t\tpublic T getFirst() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.getFirst();\r\n\t\t\t}\r\n\t\t}", "public static Value makeAnyBool() {\n return theBoolAny;\n }", "T getOrElse(Supplier<T> fn);", "public boolean getFound() {\n\t\treturn found;\n\t}", "boolean getVarReturn();", "public int anySetBit()\n \t{\n \t\tint numbytes = getLengthInBytes();\n \t\tint bitpos;\n \n \t\tfor (int i = 0; i < numbytes-1; i++)\n \t\t{\n \t\t\tif (value[i] != 0)\n \t\t\t{\n \t\t\t\tfor (int j = 0; j < 8; j++)\n \t\t\t\t{\n \t\t\t\t\tbitpos = 7-j;\n \t\t\t\t\tif (((1 << bitpos) & value[i]) != 0)\n \t\t\t\t\t\treturn ((i*8)+j);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \n \t\t// only the top part of the last byte is relevant\n \t\tbyte mask = (byte)(0xFF << (8-bitsInLastByte));\n \t\tif ((value[numbytes-1] & mask) != 0)\n \t\t{\n \t\t\tfor (int j = 0; j < bitsInLastByte; j++)\n \t\t\t{\n \t\t\t\tbitpos = 7-j;\n \t\t\t\tif (((1 << bitpos) & value[numbytes-1]) != 0)\n \t\t\t\t\treturn ((numbytes-1)*8)+j;\n \t\t\t}\n \t\t}\n \n \t\treturn -1;\n \t}", "boolean getResult();", "boolean getResult();" ]
[ "0.61102813", "0.603066", "0.60262907", "0.60262907", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.60075814", "0.6006767", "0.5896271", "0.58954394", "0.58954394", "0.5828379", "0.5774152", "0.5761269", "0.5728786", "0.5690465", "0.5645755", "0.5636951", "0.55887467", "0.556918", "0.5548746", "0.55252886", "0.55236524", "0.54987097", "0.54894847", "0.54894847", "0.5486143", "0.5470646", "0.54671365", "0.545091", "0.545091", "0.545091", "0.545091", "0.545091", "0.545091", "0.5450114", "0.54403037", "0.5438123", "0.54360914", "0.5430108", "0.5429335", "0.5414423", "0.53982574", "0.53944296", "0.5389151", "0.5389151", "0.5389151", "0.5389151", "0.5389151", "0.5389151", "0.5389151", "0.5389151", "0.5389151", "0.5389151", "0.5389151", "0.5389151", "0.5378027", "0.5365689", "0.53274643", "0.5307759", "0.5295687", "0.5293411", "0.52809125", "0.52752906", "0.5270348", "0.5269923", "0.5267932", "0.526238", "0.52550554", "0.5235562", "0.52353674", "0.52192616", "0.52136385", "0.5207037", "0.52060354", "0.52060354", "0.52060354", "0.5191052", "0.51854914", "0.5162179", "0.51621693", "0.5162013", "0.516195", "0.5159104", "0.5158445", "0.5155507", "0.51538825", "0.51527804", "0.5145212", "0.5145212" ]
0.0
-1
remember: left and right are switched under gnu assembler
void gen() { X86.Operand mleft = src1.gen_source_operand(false,tempReg1); X86.Operand mright = src2.gen_source_operand(true,tempReg2); X86.emit2("cmp" + X86.Size.Q,mright,mleft); X86.emit0("j" + op.X86_name() + " F" + funcNumber + "_" + lab.name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setLeftToRight(boolean ltor);", "boolean getLeftToRight();", "protected int left(int i ) { return 2 * i + 1; }", "public void switchSides() {\n\t\tint temp = 0;\r\n\t\ttemp = leftValue;\r\n\t\tleftValue = rightValue;\r\n\t\trightValue = temp;\r\n\t}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "protected int right(int i) { return 2 * i + 2; }", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "public static BinaryExpression leftShift(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public void right() {\n\t\tstate.right();\n\t}", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "private void right() {\n lastMovementOp = Op.RIGHT;\n rotate(TURNING_ANGLE);\n }", "public Integer perform (IExpression left, IExpression right);", "public static BinaryExpression assign(Expression left, Expression right) { throw Extensions.todo(); }", "int left(int i) { return i<<1; }", "protected static int left(int i){\n return 2*i+1;\n }", "public static short getAdversarySide(short side) {\r\n\treturn (short) Math.abs(side - 1);\r\n }", "AndExp getRight();", "private byte l() {\r\n\t\treturn left_map;\r\n\t}", "public void setLeft(boolean b){ left = b; }", "public void setLeft(boolean b){ left = b; }", "public static BinaryExpression leftShift(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public boolean isRightToLeft() {\n/* 493 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean leftDistributive( Operator op){\n\t return false;\n }", "private void LeftRightRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t\n\t}", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}", "static int left(int i)\n {\n return (2*i+1);\n }", "OrExp getLeft();", "private int right(int parent) {\n\t\treturn parent*2+2;\n\t}", "private void leftRotateFixup(RedBlackNode x){\n\n // Przypadek 1: tylko x, x.right i x.right.right są nil.\n if (isNil(x.left) && isNil(x.right.left)){\n x.numLeft = 0;\n x.numRight = 0;\n x.right.numLeft = 1;\n }\n\n // Przypadek 2: x.right.left istnieje w dodatku do przypadku 1\n else if (isNil(x.left) && !isNil(x.right.left)){\n x.numLeft = 0;\n x.numRight = 1 + x.right.left.numLeft +\n x.right.left.numRight;\n x.right.numLeft = 2 + x.right.left.numLeft +\n x.right.left.numRight;\n }\n\n // Przypadek 3: x.left także istnieje w dodatku do przypadku 1\n else if (!isNil(x.left) && isNil(x.right.left)){\n x.numRight = 0;\n x.right.numLeft = 2 + x.left.numLeft + x.left.numRight;\n\n }\n\n // Przypadek 4: x.left i x.right.left istnieją w dodatku do przypadku 1\n else{\n x.numRight = 1 + x.right.left.numLeft +\n x.right.left.numRight;\n x.right.numLeft = 3 + x.left.numLeft + x.left.numRight +\n x.right.left.numLeft + x.right.left.numRight;\n }\n }", "private static int LEFT(int i) {\n return (2 * i + 1);\n }", "private int left(int i) {\r\n\t\treturn 2 * i + 1;\r\n\t}", "public void moveShiftLeft();", "private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public int upright();", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public void moveShiftRight();", "void hasLeft();", "public void setLeft() {\n\t\tstate = State.LEFT;\n\t}", "public boolean rightDistributive( Operator op){\n\t return false;\n }", "private int left(int index) {\r\n\t\treturn 2 * index + 1;\r\n\t}", "public void left() {\n\t\tstate.left();\n\t}", "void setLeft(boolean left) {\n myLeft = left;\n }", "public void rotateLeft() {\n // I fucked up? Rotations are reversed, just gonna switch em\n// tileLogic = getRotateLeft();\n tileLogic = getRotateRight();\n// rotateLeftTex();\n rotateRightTex();\n }", "protected static int right(int i){\n return 2*(i+1);\n }", "private int right(int i) {\r\n\t\treturn 2 * i + 2;\r\n\t}", "void keyRight();", "void changeTargetMode(boolean goRight);", "private void nextState() {\n int x;\n int y;\n y = st3;\n x = (st0 & MASK) ^ st1 ^ st2;\n x ^= (x << SH0);\n y ^= (y >>> SH0) ^ x;\n st0 = st1;\n st1 = st2;\n st2 = x ^ (y << SH1);\n st3 = y;\n st1 ^= parameter.getMat1(y);\n st2 ^= parameter.getMat2(y);\n }", "public void setRight(boolean b){ right = b; }", "public void setRight(boolean b){ right = b; }", "public void driveRaw (double left, double right) {\n leftBackMotor.set(left);\n leftMiddleMotor.set(left);\n leftFrontMotor.set(left);\n rightBackMotor.set(right);\n rightMiddleMotor.set(right);\n rightFrontMotor.set(right);\n }", "@Override\r\n\tpublic int plus(int left, int right) {\n\t\treturn left + right; \r\n\t\t//return 0;\r\n\t}", "private int right(int index) {\r\n\t\treturn 2 * index + 2;\r\n\t}", "private void rightRotateFixup(RedBlackNode y){\n\n // Przypadek 1: tylko y, y.left i y.left.left są nil.\n if (isNil(y.right) && isNil(y.left.right)){\n y.numRight = 0;\n y.numLeft = 0;\n y.left.numRight = 1;\n }\n\n // Przypadek 2: y.left.right istnieje w dodatku do przypadku 1\n else if (isNil(y.right) && !isNil(y.left.right)){\n y.numRight = 0;\n y.numLeft = 1 + y.left.right.numRight +\n y.left.right.numLeft;\n y.left.numRight = 2 + y.left.right.numRight +\n y.left.right.numLeft;\n }\n\n // Przypadek 3: y.right istnieje w dodatku do przypadku 1\n else if (!isNil(y.right) && isNil(y.left.right)){\n y.numLeft = 0;\n y.left.numRight = 2 + y.right.numRight +y.right.numLeft;\n\n }\n\n // Przypadek 4: y.right i y.left.right istnieją w dodatku do przypadku 1\n else{\n y.numLeft = 1 + y.left.right.numRight +\n y.left.right.numLeft;\n y.left.numRight = 3 + y.right.numRight +\n y.right.numLeft +\n y.left.right.numRight + y.left.right.numLeft;\n }\n\n }", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\t\tint g = 15;\r\n\t\t\r\n\t\tint m = g++ + ++g - --g;\r\n\t\t\r\n\t\tSystem.out.println(m);\r\n\t\tSystem.out.println(g);\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}", "private void leftRotate(WAVLNode y) {\n\t WAVLNode x=y.parent;\r\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=y.left;\r\n\t WAVLNode c = y.right;\r\n\t y.left=x;\r\n\t x.right=b;\r\n\t \r\n\t if (x.parent!=null) {\r\n\t\t WAVLNode d=x.parent;\r\n\t\t String side=parentside(d,x);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t y.parent=null;\r\n\t\t this.root=y;\r\n\t }\r\n\t x.parent=y;\r\n\t b.parent=x;\r\n\t x.rank=x.rank-1;\r\n\t x.sizen=a.sizen+b.sizen+1;\r\n\t y.sizen=x.sizen+c.sizen+1;\r\n\t \r\n }", "public void setLeft(boolean left) {\n\t\tthis.left = left;\n\t}", "private static int getPivot(int left, int right) {\n\t\treturn (left+right)/2;\n\t}", "public Velocity changeSigns(Side side) {\n Velocity v;\n switch (side) {\n case TOP:\n case BOTTOM:\n v = this.changeDirection(1, -1);\n break;\n case LEFT:\n case RIGHT:\n v = this.changeDirection(-1, 1);\n break;\n case CORNER:\n v = this.changeDirection(-1, -1);\n break;\n case NONE:\n default:\n v = this.changeDirection(1, 1);\n break;\n }\n return v;\n }", "public Squarelotron leftRightFlip(int ring);", "public void moveLeft() {\n\t\t\n\t}", "public static void main(String []args){\n int x =10;\n System.out.println(x);\n System.out.println(x++);\n System.out.println(++x);\n System.out.println(x--);\n System.out.println(--x);\n //Example of a ternary operator\n int a= 20;\n int b=10;\n int min=(a<b)?a:b;\n System.out.println(\"This is the min value:\"+min);\n int max=(a>b)?a:b;\n System.out.println(\"This is the max value:\"+max);\n //Demonstrating Shift operator\n int c= 20 << 2;\n int d=20 >> 2;\n System.out.println(\"This is left shift:\"+c);\n System.out.println(\"This is right shift:\"+d);\n\n\n }", "private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }", "public Binary left(Expr left) {\n\tBinary_c n = (Binary_c) copy();\n\tn.left = left;\n\treturn n;\n }", "public void moveRight() {\n\t\t\n\t}", "private int left(int parent) {\n\t\treturn (parent*2)+1;\n\t}", "static long andOperator(long x, long y)\n {\n long res = 0; // Initialize result\n while (x > 0 && y > 0) {\n // Find positions of MSB in x and y\n int msb_p1 = msbPos(x);\n int msb_p2 = msbPos(y);\n // If positions are not same, return\n if (msb_p1 != msb_p2)\n break;\n // Add 2^msb_p1 to result\n long msb_val = (1 << msb_p1);\n res = res + msb_val;\n // subtract 2^msb_p1 from x and y.\n x = x - msb_val;\n y = y - msb_val;\n }\n return res;\n }", "public void setLeft(int x) {\r\n leftSide = x;\r\n }", "public void strafeLeftEnc()\r\n\t{\r\n//\t\tdrive.setPos(0, 0, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);\r\n//\t\tif(Math.abs(drive.getFrontEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance)\r\n//\t\t{\r\n//\t\t\tdrive.setPos(-Config.Auto.encDistanceBetweenTotes, -Config.Auto.encDistanceBetweenTotes, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);\r\n//\t\t\t\r\n//\t\t\tif(Math.abs(drive.getLeftEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance && Math.abs(drive.getRightEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance)\r\n//\t\t\t{\r\n//\t\t\t\tdrive.setPos(-Config.Auto.encDistanceBetweenTotes, -Config.Auto.encDistanceBetweenTotes, 0, 0);\r\n//\t\t\t\t\r\n//\t\t\t\tif((Math.abs(drive.getFrontEncDist()) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist()) < Config.Auto.encTolerance))\r\n//\t\t\t\t\tendRoutine();\t\t\t\t\r\n//\t\t\t}\r\n//\t\t}\r\n\t}", "public void goRight()\r\n\t{\r\n\t\tthis.X++;\r\n\t}", "public static void setLeft(char left) {\n\t\t\tGamePreferences.left = left;\n\t\t}", "void moveRight();", "public static void main(String[] args) {\nint a=10;\nint b=13; // For right shift of b:b >> 1\n//int c = a | b; //For OR gate\n//int c= a & b;// For AND gate\nint c=b<<1;//For left shift of b is multiply of b\na >>= 2; //Assignment Operator\nSystem.out.println(c);\nSystem.out.println(a);\nSystem.out.println(a>b);//comparision operator\n\n\t}", "public static char getsLeft() {\n\t\t\treturn sLeft;\n\t\t}", "public void setRight(int x) {\r\n rightSide = x;\r\n }", "void moveRight() {\n\t\tsetX(x+1);\r\n\t\tdx=1;\r\n\t\tdy=0;\r\n\t}", "protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }", "static int right(int i)\n {\n return (2*i+2);\n }", "private int leftIndex(int i) {\n return i * 2;\n }", "private void rightRightCase(NodeRB<K, V> x) {\n\t\t// Swap colors of g and p\n\t\tboolean aux = x.parent.color;\n\t\tx.parent.color = x.getGrandParent().color;\n\t\tx.getGrandParent().color = aux;\n\n\t\t// Left Rotate g\n\t\tNodeRB<K, V> g = x.getGrandParent();\n\t\tif (g.parent == null) {\n\t\t\troot = rotateLeft(g);\n\t\t} else {\n\t\t\trotateLeft(g);\n\t\t}\n\t}", "public void setLeft(Lane left) {\r\n\t\tthis.left = left;\r\n\t}", "public void strafeRightEnc()\r\n\t{\r\n//\t\tdrive.setPos(0, 0, Config.Auto.encStrafeDistance, Config.Auto.encStrafeDistance);\r\n//\t\tif(Math.abs(drive.getFrontEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance)\r\n//\t\t{\r\n//\t\t\tdrive.setPos(Config.Auto.encDistanceBetweenTotes, Config.Auto.encDistanceBetweenTotes, Config.Auto.encStrafeDistance, Config.Auto.encStrafeDistance);\r\n//\t\t\t\r\n//\t\t\tif(Math.abs(drive.getLeftEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance && Math.abs(drive.getRightEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance)\r\n//\t\t\t{\r\n//\t\t\t\tdrive.setPos(Config.Auto.encDistanceBetweenTotes, Config.Auto.encDistanceBetweenTotes, 0, 0);\r\n//\t\t\t\t\r\n//\t\t\t\tif((Math.abs(drive.getFrontEncDist()) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist()) < Config.Auto.encTolerance))\r\n//\t\t\t\t\tendRoutine();\t\t\t\t\r\n//\t\t\t}\r\n//\t\t}\r\n\t}", "private boolean hasLeft ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}", "public void calRightMove() {\n }", "void keyLeft();", "public double Left(){\n\t\treturn (x);\n\t}", "protected void right() {\n move(positionX + 1, positionY);\n orientation = 0;\n }", "public void rotateRight() {\n// tileLogic = getRotateRight();\n tileLogic = getRotateLeft();\n// rotateRightTex();\n rotateLeftTex();\n }", "public void rightPressed() {\n System.out.println(\"rightPressed()\");\n current.translate(0, 1);\n display.showBlocks();\n }", "static void lwl_be(UINT32 op)\n\t{\n\t\toffs_t offs = SIMMVAL + RSVAL32;\n\t\tdata32_t temp = RLONG(offs & ~3);\n\t\tif (RTREG)\n\t\t{\n\t\t\tif (!(offs & 3)) RTVAL64 = (INT32)temp;\n\t\t\telse\n\t\t\t{\n\t\t\t\tint shift = 8 * (offs & 3);\n\t\t\t\tRTVAL64 = (INT32)((RTVAL32 & (0x00ffffff >> (24 - shift))) | (temp << shift));\n\t\t\t}\n\t\t}\n\t}", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "public void checkLeftAndRightXs() {\r\n this.leftX = (int) this.enemies.get(0).getCollisionRectangle().getBoundaries().getLeftX();\r\n this.rightX = (int) (this.enemies.get(0).getCollisionRectangle().getBoundaries().getRightX());\r\n for (Enemy e : enemies) {\r\n if (e.getCollisionRectangle().getBoundaries().getLeftX() < this.leftX) {\r\n this.leftX = (int) e.getCollisionRectangle().getBoundaries().getLeftX();\r\n }\r\n if (e.getCollisionRectangle().getBoundaries().getRightX() > this.rightX) {\r\n this.rightX = (int) e.getCollisionRectangle().getBoundaries().getRightX();\r\n }\r\n }\r\n }", "public Direction left() {\r\n\t\tint newDir = this.index - 1;\r\n\r\n\t\tnewDir = (newDir == 0) ? 4 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}", "public void tankDrive(double left, double right) {\n leftMaster.set(left * 12.0);\n rightMaster.set(right * -12.0);\n }", "void rightInv() {\n startAnimation(rightSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n rightCubeSwap();\n rightCubeSwap();\n rightCubeSwap();\n }", "private void RightRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t}\n\t}", "public boolean moveLeft()\n {\n\tboolean update;\n\tboolean action = false;\n\t\t\n\tdo\n\t{\n update = false;\n\t\t\t\n for (int y=0; y<cases.length-1; y++)\n {\n for (int x=0; x<cases[y].length; x++)\n\t\t{\n boolean merge;\n boolean move;\n\t\t\t\t\t\n do\n {\n merge = merge(cases[x][y+1],cases[x][y]);\n move = move(cases[x][y+1],cases[x][y]);\n\t\t\tupdate = (update || merge || move);\n if(!action && update)\n {\n action = update; \n }\n } while (merge || move);\n }\n }\n } while (update);\n \n return action;\n }", "public Object visitShiftExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if (op.equals(\"<<\")) {\n result = (Long) a << (Long) b;\n }\n else if (op.equals(\">>\")) {\n result = (Long) a >> (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }" ]
[ "0.6335791", "0.611763", "0.6017292", "0.5987947", "0.59463704", "0.5761737", "0.56704813", "0.56598157", "0.56218183", "0.5609304", "0.55939126", "0.55871665", "0.5577637", "0.5554504", "0.54726183", "0.5469508", "0.546769", "0.545785", "0.54570925", "0.5446966", "0.5446966", "0.54404885", "0.54215944", "0.5413114", "0.54115576", "0.5405106", "0.54034483", "0.53727543", "0.53611714", "0.5347871", "0.5331711", "0.5329087", "0.5326804", "0.53044707", "0.5298016", "0.5272881", "0.52570873", "0.52550876", "0.52408427", "0.5238003", "0.52196276", "0.5201494", "0.5199143", "0.5196748", "0.5188651", "0.51866996", "0.51803035", "0.5162434", "0.514476", "0.5142833", "0.5142106", "0.5142106", "0.5141549", "0.514122", "0.5140243", "0.5139007", "0.51238364", "0.5114132", "0.51072747", "0.51052845", "0.50991666", "0.5095636", "0.50946605", "0.50818956", "0.50758016", "0.5070754", "0.5042999", "0.5039968", "0.50382644", "0.50356084", "0.5035234", "0.503192", "0.5020424", "0.50180465", "0.50129646", "0.500911", "0.5007976", "0.50076795", "0.50066197", "0.5003476", "0.49971154", "0.4994496", "0.4988521", "0.49822214", "0.49805543", "0.497603", "0.49745363", "0.49687305", "0.49615476", "0.49513197", "0.4946835", "0.49444842", "0.49421513", "0.49392653", "0.49376315", "0.49363354", "0.49358392", "0.49349952", "0.49260646", "0.49258295" ]
0.50586283
66
Generate a source operand. If imm_ok is true, returning an immediate is ok; otherwise, result is definitely a register (possibly temp). Not all operands can return an immediate, so it is always possible that temp will be used even if imm_ok is true.
X86.Operand gen_source_operand(boolean imm_ok, X86.Reg temp);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "X86.Reg gen_dest_operand();", "ExpOperand createExpOperand();", "Operand createOperand();", "public abstract Operand<T> result();", "OpFunctionArgOperand createOpFunctionArgOperand();", "@Override\n public OperandWithCode generateIntermediateCode(Executable executable) {\n \treturn integerExpression.generateIntermediateCode(executable);\n }", "SEIntegerVariable getOperand2();", "SEIntegerVariable getOperand1();", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 407,\n FQN=\"llvm::Module::materialize\", NM=\"_ZN4llvm6Module11materializeEPNS_11GlobalValueE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module11materializeEPNS_11GlobalValueE\")\n //</editor-fold>\n public std.error_code materialize(GlobalValue /*P*/ GV) {\n if (!Materializer.$bool()) {\n return new std.error_code();\n }\n \n return Materializer.$arrow().materialize(GV);\n }", "BinaryImmToReg(@NotNull String name, @NotNull Immediate source, @NotNull X64Register destination,\n @NotNull X64InstructionSize size) {\n\n\t\tsuper('\\t' + name + size + \" \" + source + \", \" + destination.assemblyRep(size));\n }", "private Value immediate(Unit unit, Immediate v) {\n if (v instanceof soot.Local) {\n Local local = (Local) v;\n Type type = getLocalType(v.getType());\n VariableRef var = new VariableRef(local.getName(), new PointerType(type));\n Variable tmp = function.newVariable(type);\n function.add(new Load(tmp, var, !sootMethod.getActiveBody().getTraps().isEmpty()));\n return new VariableRef(tmp);\n } else if (v instanceof soot.jimple.IntConstant) {\n return new IntegerConstant(((soot.jimple.IntConstant) v).value);\n } else if (v instanceof soot.jimple.LongConstant) {\n return new IntegerConstant(((soot.jimple.LongConstant) v).value);\n } else if (v instanceof soot.jimple.FloatConstant) {\n return new FloatingPointConstant(((soot.jimple.FloatConstant) v).value);\n } else if (v instanceof soot.jimple.DoubleConstant) {\n return new FloatingPointConstant(((soot.jimple.DoubleConstant) v).value);\n } else if (v instanceof soot.jimple.NullConstant) {\n return new NullConstant(OBJECT_PTR);\n } else if (v instanceof soot.jimple.StringConstant) {\n String s = ((soot.jimple.StringConstant) v).value;\n Trampoline trampoline = new LdcString(className, s);\n trampolines.add(trampoline);\n return call(trampoline.getFunctionRef(), env);\n } else if (v instanceof soot.jimple.ClassConstant) {\n // ClassConstant is either the internal name of a class or the descriptor of an array\n String targetClassName = ((soot.jimple.ClassConstant) v).getValue();\n if (isArray(targetClassName) && isPrimitiveComponentType(targetClassName)) {\n String primitiveDesc = targetClassName.substring(1);\n Variable result = function.newVariable(OBJECT_PTR);\n function.add(new Load(result, new ConstantBitcast(\n new GlobalRef(\"array_\" + primitiveDesc, CLASS_PTR), new PointerType(OBJECT_PTR))));\n return result.ref();\n } else {\n FunctionRef fn = null;\n if (targetClassName.equals(this.className)) {\n fn = FunctionBuilder.ldcInternal(sootMethod.getDeclaringClass()).ref();\n } else {\n Trampoline trampoline = new LdcClass(className, ((soot.jimple.ClassConstant) v).getValue());\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n return call(fn, env);\n }\n }\n throw new IllegalArgumentException(\"Unknown Immediate type: \" + v.getClass());\n }", "ScalarOperand createScalarOperand();", "Operands createOperands();", "void gen() {\n X86.Operand mleft = src1.gen_source_operand(false,tempReg1); \r\n X86.Operand mright = src2.gen_source_operand(true,tempReg2); \r\n X86.emit2(\"cmp\" + X86.Size.Q,mright,mleft);\r\n X86.emit0(\"j\" + op.X86_name() + \" F\" + funcNumber + \"_\" + lab.name);\r\n }", "POperand createPOperand();", "private static Instruction create(byte opcode, boolean wide)\n {\n switch (opcode)\n {\n // Simple instructions.\n case InstructionConstants.OP_NOP:\n case InstructionConstants.OP_ACONST_NULL:\n case InstructionConstants.OP_ICONST_M1:\n case InstructionConstants.OP_ICONST_0:\n case InstructionConstants.OP_ICONST_1:\n case InstructionConstants.OP_ICONST_2:\n case InstructionConstants.OP_ICONST_3:\n case InstructionConstants.OP_ICONST_4:\n case InstructionConstants.OP_ICONST_5:\n case InstructionConstants.OP_LCONST_0:\n case InstructionConstants.OP_LCONST_1:\n case InstructionConstants.OP_FCONST_0:\n case InstructionConstants.OP_FCONST_1:\n case InstructionConstants.OP_FCONST_2:\n case InstructionConstants.OP_DCONST_0:\n case InstructionConstants.OP_DCONST_1:\n\n case InstructionConstants.OP_BIPUSH:\n case InstructionConstants.OP_SIPUSH:\n\n case InstructionConstants.OP_IALOAD:\n case InstructionConstants.OP_LALOAD:\n case InstructionConstants.OP_FALOAD:\n case InstructionConstants.OP_DALOAD:\n case InstructionConstants.OP_AALOAD:\n case InstructionConstants.OP_BALOAD:\n case InstructionConstants.OP_CALOAD:\n case InstructionConstants.OP_SALOAD:\n\n case InstructionConstants.OP_IASTORE:\n case InstructionConstants.OP_LASTORE:\n case InstructionConstants.OP_FASTORE:\n case InstructionConstants.OP_DASTORE:\n case InstructionConstants.OP_AASTORE:\n case InstructionConstants.OP_BASTORE:\n case InstructionConstants.OP_CASTORE:\n case InstructionConstants.OP_SASTORE:\n case InstructionConstants.OP_POP:\n case InstructionConstants.OP_POP2:\n case InstructionConstants.OP_DUP:\n case InstructionConstants.OP_DUP_X1:\n case InstructionConstants.OP_DUP_X2:\n case InstructionConstants.OP_DUP2:\n case InstructionConstants.OP_DUP2_X1:\n case InstructionConstants.OP_DUP2_X2:\n case InstructionConstants.OP_SWAP:\n case InstructionConstants.OP_IADD:\n case InstructionConstants.OP_LADD:\n case InstructionConstants.OP_FADD:\n case InstructionConstants.OP_DADD:\n case InstructionConstants.OP_ISUB:\n case InstructionConstants.OP_LSUB:\n case InstructionConstants.OP_FSUB:\n case InstructionConstants.OP_DSUB:\n case InstructionConstants.OP_IMUL:\n case InstructionConstants.OP_LMUL:\n case InstructionConstants.OP_FMUL:\n case InstructionConstants.OP_DMUL:\n case InstructionConstants.OP_IDIV:\n case InstructionConstants.OP_LDIV:\n case InstructionConstants.OP_FDIV:\n case InstructionConstants.OP_DDIV:\n case InstructionConstants.OP_IREM:\n case InstructionConstants.OP_LREM:\n case InstructionConstants.OP_FREM:\n case InstructionConstants.OP_DREM:\n case InstructionConstants.OP_INEG:\n case InstructionConstants.OP_LNEG:\n case InstructionConstants.OP_FNEG:\n case InstructionConstants.OP_DNEG:\n case InstructionConstants.OP_ISHL:\n case InstructionConstants.OP_LSHL:\n case InstructionConstants.OP_ISHR:\n case InstructionConstants.OP_LSHR:\n case InstructionConstants.OP_IUSHR:\n case InstructionConstants.OP_LUSHR:\n case InstructionConstants.OP_IAND:\n case InstructionConstants.OP_LAND:\n case InstructionConstants.OP_IOR:\n case InstructionConstants.OP_LOR:\n case InstructionConstants.OP_IXOR:\n case InstructionConstants.OP_LXOR:\n\n case InstructionConstants.OP_I2L:\n case InstructionConstants.OP_I2F:\n case InstructionConstants.OP_I2D:\n case InstructionConstants.OP_L2I:\n case InstructionConstants.OP_L2F:\n case InstructionConstants.OP_L2D:\n case InstructionConstants.OP_F2I:\n case InstructionConstants.OP_F2L:\n case InstructionConstants.OP_F2D:\n case InstructionConstants.OP_D2I:\n case InstructionConstants.OP_D2L:\n case InstructionConstants.OP_D2F:\n case InstructionConstants.OP_I2B:\n case InstructionConstants.OP_I2C:\n case InstructionConstants.OP_I2S:\n case InstructionConstants.OP_LCMP:\n case InstructionConstants.OP_FCMPL:\n case InstructionConstants.OP_FCMPG:\n case InstructionConstants.OP_DCMPL:\n case InstructionConstants.OP_DCMPG:\n\n case InstructionConstants.OP_IRETURN:\n case InstructionConstants.OP_LRETURN:\n case InstructionConstants.OP_FRETURN:\n case InstructionConstants.OP_DRETURN:\n case InstructionConstants.OP_ARETURN:\n case InstructionConstants.OP_RETURN:\n\n case InstructionConstants.OP_NEWARRAY:\n case InstructionConstants.OP_ARRAYLENGTH:\n case InstructionConstants.OP_ATHROW:\n\n case InstructionConstants.OP_MONITORENTER:\n case InstructionConstants.OP_MONITOREXIT:\n return new SimpleInstruction();\n\n // Instructions with a contant pool index.\n case InstructionConstants.OP_LDC:\n case InstructionConstants.OP_LDC_W:\n case InstructionConstants.OP_LDC2_W:\n\n case InstructionConstants.OP_GETSTATIC:\n case InstructionConstants.OP_PUTSTATIC:\n case InstructionConstants.OP_GETFIELD:\n case InstructionConstants.OP_PUTFIELD:\n\n case InstructionConstants.OP_INVOKEVIRTUAL:\n case InstructionConstants.OP_INVOKESPECIAL:\n case InstructionConstants.OP_INVOKESTATIC:\n case InstructionConstants.OP_INVOKEINTERFACE:\n case InstructionConstants.OP_INVOKEDYNAMIC:\n\n case InstructionConstants.OP_NEW:\n case InstructionConstants.OP_ANEWARRAY:\n case InstructionConstants.OP_CHECKCAST:\n case InstructionConstants.OP_INSTANCEOF:\n case InstructionConstants.OP_MULTIANEWARRAY:\n return new ConstantInstruction();\n\n // Instructions with a local variable index.\n case InstructionConstants.OP_ILOAD:\n case InstructionConstants.OP_LLOAD:\n case InstructionConstants.OP_FLOAD:\n case InstructionConstants.OP_DLOAD:\n case InstructionConstants.OP_ALOAD:\n case InstructionConstants.OP_ILOAD_0:\n case InstructionConstants.OP_ILOAD_1:\n case InstructionConstants.OP_ILOAD_2:\n case InstructionConstants.OP_ILOAD_3:\n case InstructionConstants.OP_LLOAD_0:\n case InstructionConstants.OP_LLOAD_1:\n case InstructionConstants.OP_LLOAD_2:\n case InstructionConstants.OP_LLOAD_3:\n case InstructionConstants.OP_FLOAD_0:\n case InstructionConstants.OP_FLOAD_1:\n case InstructionConstants.OP_FLOAD_2:\n case InstructionConstants.OP_FLOAD_3:\n case InstructionConstants.OP_DLOAD_0:\n case InstructionConstants.OP_DLOAD_1:\n case InstructionConstants.OP_DLOAD_2:\n case InstructionConstants.OP_DLOAD_3:\n case InstructionConstants.OP_ALOAD_0:\n case InstructionConstants.OP_ALOAD_1:\n case InstructionConstants.OP_ALOAD_2:\n case InstructionConstants.OP_ALOAD_3:\n\n case InstructionConstants.OP_ISTORE:\n case InstructionConstants.OP_LSTORE:\n case InstructionConstants.OP_FSTORE:\n case InstructionConstants.OP_DSTORE:\n case InstructionConstants.OP_ASTORE:\n case InstructionConstants.OP_ISTORE_0:\n case InstructionConstants.OP_ISTORE_1:\n case InstructionConstants.OP_ISTORE_2:\n case InstructionConstants.OP_ISTORE_3:\n case InstructionConstants.OP_LSTORE_0:\n case InstructionConstants.OP_LSTORE_1:\n case InstructionConstants.OP_LSTORE_2:\n case InstructionConstants.OP_LSTORE_3:\n case InstructionConstants.OP_FSTORE_0:\n case InstructionConstants.OP_FSTORE_1:\n case InstructionConstants.OP_FSTORE_2:\n case InstructionConstants.OP_FSTORE_3:\n case InstructionConstants.OP_DSTORE_0:\n case InstructionConstants.OP_DSTORE_1:\n case InstructionConstants.OP_DSTORE_2:\n case InstructionConstants.OP_DSTORE_3:\n case InstructionConstants.OP_ASTORE_0:\n case InstructionConstants.OP_ASTORE_1:\n case InstructionConstants.OP_ASTORE_2:\n case InstructionConstants.OP_ASTORE_3:\n\n case InstructionConstants.OP_IINC:\n\n case InstructionConstants.OP_RET:\n return new VariableInstruction(wide);\n\n // Instructions with a branch offset operand.\n case InstructionConstants.OP_IFEQ:\n case InstructionConstants.OP_IFNE:\n case InstructionConstants.OP_IFLT:\n case InstructionConstants.OP_IFGE:\n case InstructionConstants.OP_IFGT:\n case InstructionConstants.OP_IFLE:\n case InstructionConstants.OP_IFICMPEQ:\n case InstructionConstants.OP_IFICMPNE:\n case InstructionConstants.OP_IFICMPLT:\n case InstructionConstants.OP_IFICMPGE:\n case InstructionConstants.OP_IFICMPGT:\n case InstructionConstants.OP_IFICMPLE:\n case InstructionConstants.OP_IFACMPEQ:\n case InstructionConstants.OP_IFACMPNE:\n case InstructionConstants.OP_GOTO:\n case InstructionConstants.OP_JSR:\n\n case InstructionConstants.OP_IFNULL:\n case InstructionConstants.OP_IFNONNULL:\n\n case InstructionConstants.OP_GOTO_W:\n case InstructionConstants.OP_JSR_W:\n return new BranchInstruction();\n\n // The tableswitch instruction.\n case InstructionConstants.OP_TABLESWITCH:\n return new TableSwitchInstruction();\n\n // The lookupswitch instruction.\n case InstructionConstants.OP_LOOKUPSWITCH:\n return new LookUpSwitchInstruction();\n\n default:\n throw new IllegalArgumentException(\"Unknown instruction opcode [\"+opcode+\"]\");\n }\n }", "private StringBuilder getOperand() {\r\n\t\tif (\"\".equals(operator)) {\r\n\t\t\treturn firstNumber;\r\n\t\t} else {\r\n\t\t\treturn secondNumber;\r\n\t\t}\r\n\t}", "private static Instruction getSRCFromRegister(Instruction instruction)\n\t{\n\t\tRegisgerName_Value<String, Integer> src1 = instruction.getSrc1();\n\t\tRegisgerName_Value<String, Integer> src2 = instruction.getSrc2();\n\t\tRegisgerName_Value<String, Integer> destination = instruction.getDestination();\n\t\tboolean isSrc1Valid = true, isSrc2Valid = true, isDestValid = true;\n\t\tboolean isBalValid = true;\n\n\t\tif (src1 != null)\n\t\t{\n\t\t\tisSrc1Valid = checkFlowDependencies(src1, \"E\");\n\t\t\tinstruction.setSrc1(readRegister(src1));\n\t\t}\n\t\tif (src2 != null)\n\t\t{\n\t\t\tisSrc2Valid = checkFlowDependencies(src2, \"E\");\n\t\t\tinstruction.setSrc2(readRegister(src2));\n\t\t}\n\t\tif (instruction.getOperation().equals(TypesOfOperations.BAL))\n\t\t{\n\t\t\tisBalValid = checkFlowDependencies(destination, \"E\");\n\t\t\tinstruction.setDestination(-1);\n\t\t}\n\t\tif (instruction.getOperation().equals(TypesOfOperations.STORE))\n\t\t{\n\t\t\tisDestValid = checkFlowDependencies(destination, \"E\") && checkFlowDependencies(destination, \"E2\")\n\t\t\t\t\t&& checkFlowDependencies(destination, \"M\");\n\t\t\tif (!isDestValid)\n\t\t\t{\n\t\t\t\tisDestValid = true;\n\t\t\t\tinstruction.setDestination(-1);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tinstruction.setDestination(readRegister(destination));\n\t\t\t}\n\t\t\tisValidSource = isSrc1Valid && isSrc2Valid && isDestValid;\n\t\t\treturn instruction;\n\t\t}\n\t\tisValidSource = isSrc1Valid && isSrc2Valid && isBalValid;\n\t\treturn instruction;\n\t}", "protected SimulatorValue giveResult() {\n\tthis.evalExpression();\n\treturn value;\n }", "private int packImmediate(int immVal) {\r\n\t\tint val = Integer.numberOfLeadingZeros(immVal);\r\n\t\tval -= val % 2;\t// make even\r\n\t\tint shift = (24 - val);\r\n\t\tif (shift > 0) {\r\n\t\t\tint baseVal = Integer.rotateRight(immVal, shift);\r\n\t\t\timmVal = baseVal | ((16 - shift / 2) << 8);\r\n\t\t}\r\n\t\treturn immVal;\r\n\t}", "public void visit(Operand operand);", "<C> IfExp<C> createIfExp();", "public Object visitUnaryPlusExpression(GNode n) {\n nonboolean = true;\n \n return dispatch(n.getGeneric(0));\n }", "ColumnOperand createColumnOperand();", "Instruction asInstruction();", "public String getOperand(int operandNumber);", "public String getRightOperand()\r\n {\r\n if (rightOperand == null)\r\n {\r\n return null;\r\n }\r\n if (rightOperand.contains(\"+1i\"))\r\n {\r\n return rightOperand.replace(\"+1i\", \"+i\");\r\n }\r\n else if (rightOperand.contains(\"-1i\"))\r\n {\r\n return rightOperand.replace(\"-1i\", \"-i\");\r\n }\r\n return rightOperand;\r\n }", "@Override\n\tpublic void execute(Machine m) {\n\t\tint value1 = m.getRegisters().getRegister(op1);\n\t\tint value2 = m.getRegisters().getRegister(op2);\n\t\tm.getRegisters().setRegister(result, value1 + value2);\n\t}", "public IntLit createIntLit(int val) {\n try {\n return (IntLit) xnf.IntLit(Position.COMPILER_GENERATED, IntLit.INT, val).typeCheck(this);\n } catch (SemanticException e) {\n throw new InternalCompilerError(\"Int literal with value \"+val+\" would not typecheck\", e);\n }\n }", "IfExp createIfExp();", "RealLiteralExp createRealLiteralExp();", "CriteriaExpression<?> getLeftHandOperand();", "@Override\n\t\t\tpublic Ast unaryOp(UnaryOp ast, Void dummy) {\n\t\t\t\tsuper.unaryOp(ast, dummy);\n\t\t\t\ttry {\n\t\t\t\t\tInteger intValue = null;\n\t\t\t\t\tBoolean boolValue = null;\n\n\t\t\t\t\tswitch (ast.operator) {\n\t\t\t\t\tcase U_BOOL_NOT:\n\t\t\t\t\t\tboolValue = !asBool(ast.arg());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase U_MINUS:\n\t\t\t\t\t\tintValue = -asInt(ast.arg());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase U_PLUS:\n\t\t\t\t\t\tintValue = asInt(ast.arg());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn replace(ast, intValue, boolValue);\n\t\t\t\t} catch (NotConstantException e) {\n\t\t\t\t\t// non-constant argument, no effect\n\t\t\t\t\treturn ast;\n\t\t\t\t}\n\t\t\t}", "public boolean isOperand(){\n return false;\n }", "@Override public JannotTreeJCExpression getLeftOperand()\n{\n return createTree(getNode().getLeftOperand()); \n}", "Instruction createInstruction();", "public final LLVMParser.operator_return operator() throws RecognitionException {\r\n LLVMParser.operator_return retval = new LLVMParser.operator_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n Instruction t =null;\r\n\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:240:5: (t= binary_op |t= vector_op |t= aggregate_op |t= memory_op |t= conversion_op |t= icmp_op |t= fcmp_op |t= select_op |t= call_op )\r\n int alt37=9;\r\n switch ( input.LA(1) ) {\r\n case GLOBAL_VARIABLE:\r\n {\r\n int LA37_1 = input.LA(2);\r\n\r\n if ( (LA37_1==47) ) {\r\n switch ( input.LA(3) ) {\r\n case BINARY_OP:\r\n {\r\n alt37=1;\r\n }\r\n break;\r\n case VOLATILE:\r\n case 53:\r\n case 66:\r\n case 74:\r\n {\r\n alt37=4;\r\n }\r\n break;\r\n case CONVERSION_OP:\r\n {\r\n alt37=5;\r\n }\r\n break;\r\n case 68:\r\n {\r\n alt37=6;\r\n }\r\n break;\r\n case 65:\r\n {\r\n alt37=7;\r\n }\r\n break;\r\n case 79:\r\n {\r\n alt37=8;\r\n }\r\n break;\r\n case 63:\r\n case 71:\r\n case 80:\r\n {\r\n alt37=2;\r\n }\r\n break;\r\n case 64:\r\n case 72:\r\n {\r\n alt37=3;\r\n }\r\n break;\r\n case 57:\r\n case 84:\r\n {\r\n alt37=9;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 37, 6, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 37, 1, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case LOCAL_VARIABLE:\r\n {\r\n int LA37_2 = input.LA(2);\r\n\r\n if ( (LA37_2==47) ) {\r\n switch ( input.LA(3) ) {\r\n case BINARY_OP:\r\n {\r\n alt37=1;\r\n }\r\n break;\r\n case VOLATILE:\r\n case 53:\r\n case 66:\r\n case 74:\r\n {\r\n alt37=4;\r\n }\r\n break;\r\n case CONVERSION_OP:\r\n {\r\n alt37=5;\r\n }\r\n break;\r\n case 68:\r\n {\r\n alt37=6;\r\n }\r\n break;\r\n case 65:\r\n {\r\n alt37=7;\r\n }\r\n break;\r\n case 79:\r\n {\r\n alt37=8;\r\n }\r\n break;\r\n case 63:\r\n case 71:\r\n case 80:\r\n {\r\n alt37=2;\r\n }\r\n break;\r\n case 64:\r\n case 72:\r\n {\r\n alt37=3;\r\n }\r\n break;\r\n case 57:\r\n case 84:\r\n {\r\n alt37=9;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 37, 6, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 37, 2, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case UNDEF:\r\n {\r\n int LA37_3 = input.LA(2);\r\n\r\n if ( (LA37_3==47) ) {\r\n switch ( input.LA(3) ) {\r\n case BINARY_OP:\r\n {\r\n alt37=1;\r\n }\r\n break;\r\n case VOLATILE:\r\n case 53:\r\n case 66:\r\n case 74:\r\n {\r\n alt37=4;\r\n }\r\n break;\r\n case CONVERSION_OP:\r\n {\r\n alt37=5;\r\n }\r\n break;\r\n case 68:\r\n {\r\n alt37=6;\r\n }\r\n break;\r\n case 65:\r\n {\r\n alt37=7;\r\n }\r\n break;\r\n case 79:\r\n {\r\n alt37=8;\r\n }\r\n break;\r\n case 63:\r\n case 71:\r\n case 80:\r\n {\r\n alt37=2;\r\n }\r\n break;\r\n case 64:\r\n case 72:\r\n {\r\n alt37=3;\r\n }\r\n break;\r\n case 57:\r\n case 84:\r\n {\r\n alt37=9;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 37, 6, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 37, 3, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case VOLATILE:\r\n case 82:\r\n {\r\n alt37=4;\r\n }\r\n break;\r\n case 57:\r\n case 84:\r\n {\r\n alt37=9;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 37, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt37) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:240:7: t= binary_op\r\n {\r\n pushFollow(FOLLOW_binary_op_in_operator1321);\r\n t=binary_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:241:7: t= vector_op\r\n {\r\n pushFollow(FOLLOW_vector_op_in_operator1332);\r\n t=vector_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:242:7: t= aggregate_op\r\n {\r\n pushFollow(FOLLOW_aggregate_op_in_operator1342);\r\n t=aggregate_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:243:7: t= memory_op\r\n {\r\n pushFollow(FOLLOW_memory_op_in_operator1352);\r\n t=memory_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 5 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:244:7: t= conversion_op\r\n {\r\n pushFollow(FOLLOW_conversion_op_in_operator1362);\r\n t=conversion_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 6 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:245:7: t= icmp_op\r\n {\r\n pushFollow(FOLLOW_icmp_op_in_operator1372);\r\n t=icmp_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 7 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:246:7: t= fcmp_op\r\n {\r\n pushFollow(FOLLOW_fcmp_op_in_operator1383);\r\n t=fcmp_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 8 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:247:7: t= select_op\r\n {\r\n pushFollow(FOLLOW_select_op_in_operator1394);\r\n t=select_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 9 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:248:7: t= call_op\r\n {\r\n pushFollow(FOLLOW_call_op_in_operator1405);\r\n t=call_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n\r\n retval.inst = t;\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "void gen() {\n int argCount = args.length;\r\n assert (argCount <= X86.argRegs.length);\r\n // If indirect jump through a register, make\r\n // sure this is not an argument register that\r\n // we're about to overwrite!\r\n X86.Operand call_target = null;\r\n if (ind) {\r\n\tif (tgt instanceof Reg) {\r\n\t call_target = env.get(tgt);\r\n\t assert (call_target != null); // dead value surely isn't used as a source\r\n\t for (int i = 0; i < argCount; i++)\r\n\t if (call_target.equals(X86.argRegs[i])) {\r\n\t X86.emitMov(X86.Size.Q,call_target,tempReg2);\r\n\t call_target = tempReg2;\r\n\t break;\r\n\t }\r\n\t} else // tgt instanceof Global \r\n\t call_target = new X86.AddrName(((Global)tgt).toString());\r\n }\r\n // Move arguments into the argument regs.\r\n // First do parallel move of register sources.\r\n X86.Reg src[] = new X86.Reg[argCount];\r\n X86.Reg dst[] = new X86.Reg[argCount];\r\n boolean moved[] = new boolean[argCount]; // initialized to false\r\n int n = 0;\r\n for (int i = 0; i < argCount; i++) {\r\n\tIR.Src s = args[i];\r\n\tif (s instanceof Reg) {\r\n\t X86.Operand rand = env.get((Reg) s);\r\n\t if (rand instanceof X86.Reg) {\r\n\t src[n] = (X86.Reg) rand;\r\n\t dst[n] = X86.argRegs[i];\r\n\t n++;\r\n\t moved[i] = true; \r\n\t }\r\n\t}\r\n }\r\n new X86.ParallelMover(n,src,dst,tempReg1).move();\r\n // Now handle any immediate sources.\r\n for (int i = 0; i < argCount; i++) \r\n\tif (!moved[i]) {\r\n\t X86.Operand r = args[i].gen_source_operand(true,X86.argRegs[i]);\r\n\t X86.emitMov(X86.Size.Q,r,X86.argRegs[i]);\r\n\t}\r\n if (ind) {\r\n\tX86.emit1(\"call *\", call_target);\r\n } else\r\n\tX86.emit1(\"call\", new X86.GLabel((((Global)tgt).toString())));\r\n if (rdst != null) {\r\n\tX86.Reg r = rdst.gen_dest_operand();\r\n\tX86.emitMov(X86.Size.Q,X86.RAX,r);\r\n }\r\n }", "CriteriaExpression<?> getRightHandOperand();", "private Object eval(Fact expr) {\n if (expr.getBool() != null) {\n if (\"true\".equals(expr.getBool())) {\n return true;\n } else {\n return false;\n }\n } else if (expr.getString() != null) {\n return expr.getString();\n } else if (expr.getIdent() != null) {\n if (RESULT_TYPE_VARIABLE.equals(resultType)) {\n return expr.getIdent();\n }\n return scope.getVariable(expr.getIdent());\n } else if (expr.getExpr() != null) {\n return eval(expr.getExpr(), resultType);\n } else if (expr.getLocator() != null) {\n return evalLocator(expr.getLocator());\n } else {\n return expr.getNumber();\n }\n }", "@Test\r\n public void testGetOperandValueType() {\r\n System.out.println(\"getOperandValueType\");\r\n Assignment instance = new Assignment();\r\n Value.Type expResult = Value.Type.UNDEFINED;\r\n Value.Type result = instance.getOperandValueType();\r\n assertEquals(expResult, result);\r\n }", "@Override\n\tpublic String visitExpr(MicroParser.ExprContext ctx) {\n\t\tString prefix = visit(ctx.expr_prefix());\n\t\tString expr = prefix + visit(ctx.term());\n\t\t\n\t\t//System.out.println(\"in visit expr: \"+expr);\n\t\t//System.out.println(\"in visit expr: prefix is: \"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return expr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = expr.split(\"\\\\-|\\\\+\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> addops = new ArrayList<Character>();\n\t \n\t for(int i=0;i<expr.length();i++) {\n\t \tif(expr.charAt(i)=='+' || expr.charAt(i)=='-')\n\t \t\taddops.add(expr.charAt(i));\n\t }\n\t //create a list of addops\n\t \n\t //create a list of operands \n\t for(String i:ids) \n\t \t operands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t temp = new Temporary(type);\n\t result = temp.fullName;\n\t tempList.addT(temp);\n\t //System.out.println(\"in visit expr, ops are: \"+op1+\" \"+ op2);\n\t //System.out.println(\"in visit expr, result is: \"+ result);\n\t if(addops.get(0)=='+') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t \n\t for(int i=0; i<operands.size();i++) {\n\t \top1 = result;\n\t \top2 = operands.get(i);\n\t \ttemp = new Temporary(type);\n\t \tresult = temp.fullName;\n\t \ttempList.addT(temp);\n\t \tif(addops.get(0)=='+') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result; \n\t\t\n\t}", "@Test\n public void operator_literal() {\n OutputNode output = new OutputNode(\"testing\", typeOf(Result.class), typeOf(String.class));\n OperatorNode operator = new OperatorNode(\n classOf(SimpleOp.class), typeOf(Result.class), typeOf(String.class),\n output, new ValueElement(valueOf(\"???\")));\n InputNode root = new InputNode(operator);\n MockContext context = new MockContext();\n testing(root, context, op -> {\n op.process(\"Hello, world!\");\n });\n assertThat(context.get(\"testing\"), contains(\"Hello, world!???\"));\n }", "public int getOperandType(String operand) {\n\t\t// empty\n\t\tif (operand == null) {\n\t\t\treturn Op.NULL;\n\t\t}\n\t\tif (operand.equals(\"\")) {\n\t\t\treturn Op.NULL;\n\t\t}\n\t\t// comma\n\t\tif (operand.equals(\",\")) {\n\t\t\treturn Op.COMMA;\n\t\t}\n\t\t// memory address\n\t\tif (pMemory.matcher(operand).matches()) {\n\t\t\treturn Op.MU;\n\t\t}\n\t\t// register\n\t\tif (CalculatedAddress.pRegisters.matcher(operand).matches()) {\n\t\t\treturn Op.getDefinition(Op.REG, dataspace.getRegisterSize(operand));\n\t\t}\n\t\t// (decimal) immediate\n\t\tif (pDecimal.matcher(operand).matches()) {\n\t\t\ttry {\n\t\t\t\tLong.valueOf(operand);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\treturn Op.ERROR;\n\t\t\t}\n\t\t\treturn Op.getDefinition(Op.IMM, getOperandSize(Long.parseLong(operand)));\n\t\t}\n\t\t// floating-point constant\n\t\tif (pFloat.matcher(operand).matches()) {\n\t\t\ttry {\n\t\t\t\tDouble.valueOf(operand);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\treturn Op.ERROR;\n\t\t\t}\n\t\t\treturn Op.FLOAT;\n\t\t}\n\t\t// variable\n\t\tif (dataspace.isVariable(operand)) {\n\t\t\treturn Op.VARIABLE;\n\t\t}\n\t\t// constant (defined by EQU)\n\t\tif (dataspace.isConstant(operand)) {\n\t\t\treturn Op.CONST;\n\t\t}\n\t\t// label (target for jump-commands)\n\t\tif (doc.getLabelLine(operand) != -1) {\n\t\t\treturn Op.LABEL;\n\t\t}\n\t\t// size qualifier\n\t\tif (pSizeQuali.matcher(operand).matches()) {\n\t\t\treturn Op.SIZEQUALI;\n\t\t}\n\t\t// prefix\n\t\tif (DataSpace.prefixesMatchingPattern.matcher(operand).matches()) {\n\t\t\treturn Op.PREFIX;\n\t\t}\n\t\t// string/character constant\n\t\tif (pString.matcher(operand).matches()) {\n\t\t\t// string: up to four characters (short) or arbitrarily long\n\t\t\tif (operand.length() <= 6) {\n\t\t\t\treturn Op.CHARS;\n\t\t\t} else {\n\t\t\t\treturn Op.STRING;\n\t\t\t}\n\t\t}\n\t\t// FPU register\n\t\tif (Fpu.pRegisters.matcher(operand).matches()) {\n\t\t\treturn Op.FPUREG;\n\t\t}\n\t\t// FPU qualifier\n\t\tif (Fpu.pQualifiers.matcher(operand).matches()) {\n\t\t\treturn Op.FPUQUALI;\n\t\t}\n\t\treturn Op.ERROR;\n\t}", "@Override\n public Expression visit(LogicalOpNode node) {\n\n Label trueLabel = new Label ();\n Label falseLabel = new Label ();\n Label endLabel = new Label ();\n\n process(node, trueLabel, falseLabel);\n\n cat.footoredo.mx.entity.Variable variable = tmpVariable(node.getType());\n\n label (trueLabel);\n assign (node.getLocation(), ref(variable), new Integer(Type.INT8, 1));\n jump (endLabel);\n\n label (falseLabel);\n assign (node.getLocation(), ref(variable), new Integer(Type.INT8, 0));\n jump (endLabel);\n\n label (endLabel);\n\n return isStatement() ? null : ref (variable);\n }", "RealConstant createRealConstant();", "IntExpression explicitMask(Expression p) {\n\t\treturn ones.shl(implicitMask(p));\n\t}", "public Node typeCheck(ContextVisitor tc) throws SemanticException {\n Type l = left.type();\n\tType r = right.type();\n\n\tTypeSystem ts = tc.typeSystem();\n\tContext context = tc.context();\n\n\tif (op == GT || op == LT || op == GE || op == LE) {\n\t if (! l.isNumeric()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have numeric operands, not type \" +\n l + \".\", left.position());\n\t }\n\n if (! r.isNumeric()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have numeric operands, not type \" +\n r + \".\", right.position());\n\t }\n\n\t return type(ts.Boolean());\n\t}\n\n\tif (op == EQ || op == NE) {\n if (! ts.isCastValid(l, r, context) && ! ts.isCastValid(r, l, context)) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have operands of similar type.\",\n\t\t position());\n\t }\n\n\t return type(ts.Boolean());\n\t}\n\n\tif (op == COND_OR || op == COND_AND) {\n\t if (! l.isBoolean()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have boolean operands, not type \" +\n l + \".\", left.position());\n\t }\n\n\t if (! r.isBoolean()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have boolean operands, not type \" +\n r + \".\", right.position());\n\t }\n\n\t return type(ts.Boolean());\n\t}\n\n\tif (op == ADD) {\n\t if (ts.isSubtype(l, ts.String(), context) || ts.isSubtype(r, ts.String(), context)) {\n if (!ts.canCoerceToString(r, tc.context())) {\n throw new SemanticException(\"Cannot coerce an expression \" + \n \"of type \" + r + \" to a String.\", \n right.position());\n }\n if (!ts.canCoerceToString(l, tc.context())) {\n throw new SemanticException(\"Cannot coerce an expression \" + \n \"of type \" + l + \" to a String.\", \n left.position());\n }\n\n return precedence(Precedence.STRING_ADD).type(ts.String());\n }\n\t}\n\n\tif (op == BIT_AND || op == BIT_OR || op == BIT_XOR) {\n\t if (l.isBoolean() && r.isBoolean()) {\n\t\treturn type(ts.Boolean());\n\t }\n\t}\n\n if (op == ADD) {\n if (! l.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or String operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! r.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or String operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n if (op == BIT_AND || op == BIT_OR || op == BIT_XOR) {\n if (! ts.isImplicitCastValid(l, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or boolean operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! ts.isImplicitCastValid(r, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or boolean operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n if (op == SUB || op == MUL || op == DIV || op == MOD) {\n if (! l.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! r.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n if (op == SHL || op == SHR || op == USHR) {\n if (! ts.isImplicitCastValid(l, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! ts.isImplicitCastValid(r, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n\tif (op == SHL || op == SHR || op == USHR) {\n\t // For shift, only promote the left operand.\n\t return type(ts.promote(l));\n\t}\n\n\treturn type(ts.promote(l, r));\n }", "public Object getResult()\n/* */ {\n/* 129 */ Object resultToCheck = this.result;\n/* 130 */ return resultToCheck != RESULT_NONE ? resultToCheck : null;\n/* */ }", "double getActiveOperand();", "<C> RealLiteralExp<C> createRealLiteralExp();", "public Object visitBitwiseOrExpression(GNode n) {\n Object a, b, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(1));\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n result = (Long) a | (Long) b;\n }\n else {\n result = parens(a) + \" | \" + parens(b);\n }\n \n return result;\n }", "public final Object expression() throws RecognitionException {\n Object result = null;\n\n\n CommonTree INTEGER15=null;\n CommonTree BOOL16=null;\n CommonTree IDENT17=null;\n Object op1 =null;\n\n Object op2 =null;\n\n Object call18 =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:322:3: ( ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:323:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n {\n OperationExecuter oe = null;\n\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:324:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n int alt14=19;\n switch ( input.LA(1) ) {\n case 32:\n {\n alt14=1;\n }\n break;\n case 34:\n {\n alt14=2;\n }\n break;\n case 31:\n {\n alt14=3;\n }\n break;\n case 35:\n {\n alt14=4;\n }\n break;\n case 29:\n {\n alt14=5;\n }\n break;\n case ARITH_NEGATION:\n {\n alt14=6;\n }\n break;\n case 50:\n {\n alt14=7;\n }\n break;\n case 30:\n {\n alt14=8;\n }\n break;\n case 39:\n {\n alt14=9;\n }\n break;\n case 28:\n {\n alt14=10;\n }\n break;\n case 41:\n {\n alt14=11;\n }\n break;\n case 37:\n {\n alt14=12;\n }\n break;\n case 40:\n {\n alt14=13;\n }\n break;\n case 36:\n {\n alt14=14;\n }\n break;\n case BOOL_NEGATION:\n {\n alt14=15;\n }\n break;\n case INTEGER:\n {\n alt14=16;\n }\n break;\n case BOOL:\n {\n alt14=17;\n }\n break;\n case IDENT:\n {\n alt14=18;\n }\n break;\n case CALL:\n {\n alt14=19;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt14) {\n case 1 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:325:4: ^( '+' op1= expression op2= expression )\n {\n match(input,32,FOLLOW_32_in_expression564); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression570);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression576);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"+\"); \n\n }\n break;\n case 2 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:326:6: ^( '-' op1= expression op2= expression )\n {\n match(input,34,FOLLOW_34_in_expression590); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression596);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression602);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"-\"); \n\n }\n break;\n case 3 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:327:6: ^( '*' op1= expression op2= expression )\n {\n match(input,31,FOLLOW_31_in_expression614); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression620);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression626);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"*\"); \n\n }\n break;\n case 4 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:328:6: ^( '/' op1= expression op2= expression )\n {\n match(input,35,FOLLOW_35_in_expression638); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression644);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression650);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"/\"); \n\n }\n break;\n case 5 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:329:6: ^( '%' op1= expression op2= expression )\n {\n match(input,29,FOLLOW_29_in_expression662); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression668);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression674);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"%\"); \n\n }\n break;\n case 6 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:330:6: ^( ARITH_NEGATION op1= expression )\n {\n match(input,ARITH_NEGATION,FOLLOW_ARITH_NEGATION_in_expression686); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression692);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"ARITH_NEGATION\"); \n\n }\n break;\n case 7 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:331:6: ^( '||' op1= expression op2= expression )\n {\n match(input,50,FOLLOW_50_in_expression710); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression716);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression722);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"||\"); \n\n }\n break;\n case 8 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:332:6: ^( '&&' op1= expression op2= expression )\n {\n match(input,30,FOLLOW_30_in_expression733); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression739);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression745);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"&&\"); \n\n }\n break;\n case 9 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:333:6: ^( '==' op1= expression op2= expression )\n {\n match(input,39,FOLLOW_39_in_expression756); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression762);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression768);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"==\"); \n\n }\n break;\n case 10 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:334:6: ^( '!=' op1= expression op2= expression )\n {\n match(input,28,FOLLOW_28_in_expression779); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression785);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression791);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"!=\"); \n\n }\n break;\n case 11 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:335:6: ^( '>=' op1= expression op2= expression )\n {\n match(input,41,FOLLOW_41_in_expression802); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression808);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression814);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">=\"); \n\n }\n break;\n case 12 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:336:6: ^( '<=' op1= expression op2= expression )\n {\n match(input,37,FOLLOW_37_in_expression825); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression831);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression837);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<=\"); \n\n }\n break;\n case 13 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:337:6: ^( '>' op1= expression op2= expression )\n {\n match(input,40,FOLLOW_40_in_expression848); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression854);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression860);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">\"); \n\n }\n break;\n case 14 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:338:6: ^( '<' op1= expression op2= expression )\n {\n match(input,36,FOLLOW_36_in_expression872); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression878);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression884);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<\"); \n\n }\n break;\n case 15 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:339:6: ^( BOOL_NEGATION op1= expression )\n {\n match(input,BOOL_NEGATION,FOLLOW_BOOL_NEGATION_in_expression896); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression902);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"BOOL_NEGATION\"); \n\n }\n break;\n case 16 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:340:6: INTEGER\n {\n INTEGER15=(CommonTree)match(input,INTEGER,FOLLOW_INTEGER_in_expression920); \n\n oe = new OperationExecuter(localScope, (INTEGER15!=null?INTEGER15.getText():null),\"INTEGER\"); \n\n }\n break;\n case 17 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:341:6: BOOL\n {\n BOOL16=(CommonTree)match(input,BOOL,FOLLOW_BOOL_in_expression964); \n\n oe = new OperationExecuter(localScope, (BOOL16!=null?BOOL16.getText():null),\"BOOL\"); \n\n }\n break;\n case 18 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:342:6: IDENT\n {\n IDENT17=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_expression1010); \n\n oe = new OperationExecuter(localScope, (IDENT17!=null?IDENT17.getText():null),\"IDENT\"); \n\n }\n break;\n case 19 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:343:6: call\n {\n pushFollow(FOLLOW_call_in_expression1055);\n call18=call();\n\n state._fsp--;\n\n\n result = call18;\n\n }\n break;\n\n }\n\n\n if (oe != null) result = oe.doOperation();\n if (result == null)\n BFlatGUI.debugPrint(0, \"result of expression is null!\");\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return result;\n }", "Expression getExp();", "Unary operator(Operator o);", "public MIPSInstruction spillRegister(Register sourceReg, String irVariableName) {\n\t\tthis.variableName = irVariableName;\n\t\t// spillRegister(instList, sourceReg);\n\t\treturn spillRegister(sourceReg);\n\t}", "private static NodeValue calcReturn(String result, Node arg) {\n Node n2 = NodeFactory.createLiteral(result, arg.getLiteralLanguage(), arg.getLiteralDatatype()) ;\n return NodeValue.makeNode(n2) ;\n }", "SQLCaseOperand createSQLCaseOperand();", "public int getOperandA();", "UOp createUOp();", "T getResult();", "T getResult();", "private void createMovw(Code32 code, int op, int cond, int Rd, int imm16) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | (1 << 25) | op | (Rd << 12) | ((imm16 & 0xf000) << 4) | (imm16 & 0xfff);\r\n\t\tcode.incInstructionNum();\r\n\t}", "public final JavaliParser.expr_return expr() throws RecognitionException {\n\t\tJavaliParser.expr_return retval = new JavaliParser.expr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tParserRuleReturnScope leftExpr =null;\n\t\tParserRuleReturnScope op =null;\n\t\tParserRuleReturnScope rightExpr =null;\n\n\t\tRewriteRuleSubtreeStream stream_simpleExpr=new RewriteRuleSubtreeStream(adaptor,\"rule simpleExpr\");\n\t\tRewriteRuleSubtreeStream stream_compOp=new RewriteRuleSubtreeStream(adaptor,\"rule compOp\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:427:2: (leftExpr= simpleExpr ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) ) )\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:427:4: leftExpr= simpleExpr ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) )\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_simpleExpr_in_expr1531);\n\t\t\tleftExpr=simpleExpr();\n\t\t\tstate._fsp--;\n\n\t\t\tstream_simpleExpr.add(leftExpr.getTree());\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:428:3: ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) )\n\t\t\tint alt25=2;\n\t\t\tint LA25_0 = input.LA(1);\n\t\t\tif ( (LA25_0==70||LA25_0==73||LA25_0==77) ) {\n\t\t\t\talt25=1;\n\t\t\t}\n\t\t\telse if ( (LA25_0==66||(LA25_0 >= 78 && LA25_0 <= 79)||(LA25_0 >= 81 && LA25_0 <= 83)) ) {\n\t\t\t\talt25=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 25, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt25) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:429:4: \n\t\t\t\t\t{\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: leftExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: leftExpr, retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_leftExpr=new RewriteRuleSubtreeStream(adaptor,\"rule leftExpr\",leftExpr!=null?leftExpr.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 429:4: -> $leftExpr\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, stream_leftExpr.nextTree());\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:430:5: op= compOp rightExpr= simpleExpr\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_compOp_in_expr1552);\n\t\t\t\t\top=compOp();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_compOp.add(op.getTree());\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_expr1556);\n\t\t\t\t\trightExpr=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(rightExpr.getTree());\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: compOp, leftExpr, rightExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: leftExpr, retval, rightExpr\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_leftExpr=new RewriteRuleSubtreeStream(adaptor,\"rule leftExpr\",leftExpr!=null?leftExpr.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_rightExpr=new RewriteRuleSubtreeStream(adaptor,\"rule rightExpr\",rightExpr!=null?rightExpr.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 431:4: -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr)\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:431:7: ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(BinaryOp, (op!=null?(op.start):null), \"BinaryOp\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_leftExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_compOp.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_rightExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public Op getResult() {\n if (result.size() == 0) {\n return OpNull.create();\n }\n if (result.size() == 1) {\n return result.get(0);\n }\n return result;\n\n }", "public void tox86(Genx86 generate) throws IOException{\n \texpr.register = register;\n \tString expReg = generate.regName(expr.register);\n \n \texpr.tox86(generate);\n \n \tgenerate.write(generate.push(\"rdi\"));\n \n \tif (expr.type.getType() instanceof IntType){\n \t generate.write(generate.movInt(\"rdi\",expReg));\n\t generate.write(\"call print_int\\n\");\n \t}\n \telse if (expr.type.getType() instanceof BoolType){\n \t generate.write(generate.movBool(\"rdi\",expReg));\n\t generate.write(\"call print_int\\n\");\n \t}\n \telse if (expr.type.getType() instanceof FloatType){\n \t generate.write(generate.movReal(\"rdi\",expReg));\n\t generate.write(\"call print_float\\n\");\n \t}\n \telse if (expr.type.getType() instanceof CharType){\n \t generate.write(generate.movChar(\"rdi\",expReg));\n\t generate.write(\"call print_char\\n\");\n \t}\n \telse{\n \t generate.write(\"print de \"+expr.type.getType()+\" no implementado\");\n \t System.out.println(\"====================\");\n \t System.out.println(\"print de \"+expr.type.getType()+\" no implementado\");\n \t System.out.println(\"====================\");\n \t}\n \t\n\tgenerate.write(generate.pop(\"rdi\"));\n \t// // Por ahora se asume que todas las expresiones son numeros enteros\n \t// //de un solo digito.\n \t// String code = \"\";\n \t// String expReg = generate.current_reg();\n \n \t// expr.tox86(generate);\n \n \t// //\"Transformo\" a ASCII\n \t// code += generate.add(expReg,\"48\");\n \n \t// code += generate.save_print_regs();\n \n \t// code += generate.mov(\"[\"+generate.stack_pointer()+\"]\",expReg);\n \t// // Pongo el valor de la expresion en la pila, ya que la llamada\n // //sys_write necesita que el String este en memoria.\n \t\n \t// code += generate.setup_print(generate.stack_pointer(),\"1\",\"4\");\n \t// code += generate.syscall();\n \t// code += generate.restore_print_regs();\n \t \t \n \t// generate.write(code);\n }", "@Override\n\t\t\tpublic Ast binaryOp(BinaryOp ast, Void arg) {\n\t\t\t\tsuper.binaryOp(ast, arg);\n\n\t\t\t\ttry {\n\t\t\t\t\tExpr left = ast.left();\n\t\t\t\t\tExpr right = ast.right();\n\t\t\t\t\tInteger intValue = null;\n\t\t\t\t\tBoolean boolValue = null;\n\n\t\t\t\t\tswitch (ast.operator) {\n\t\t\t\t\tcase B_TIMES:\n\t\t\t\t\t\tintValue = asInt(left) * asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_DIV:\n\t\t\t\t\t\tintValue = asInt(left) / asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MOD:\n\t\t\t\t\t\tintValue = asInt(left) % asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_PLUS:\n\t\t\t\t\t\tintValue = asInt(left) + asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MINUS:\n\t\t\t\t\t\tintValue = asInt(left) - asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_AND:\n\t\t\t\t\t\tboolValue = asBool(left) && asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_OR:\n\t\t\t\t\t\tboolValue = asBool(left) || asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) < asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) <= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) > asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) >= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_NOT_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tif (boolValue != null)\n\t\t\t\t\t\t\tboolValue = !boolValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn replace(ast, intValue, boolValue);\n\t\t\t\t} catch (NotConstantException exc) {\n\t\t\t\t\t// non-constant operands: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t} catch (ArithmeticException exc) {\n\t\t\t\t\t// division by zero etc: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t}\n\t\t\t}", "private int emitInstruction(int var1_1, int var2_2, int var3_3) {\n var4_4 = this.mg;\n if (var2_2 == -1) {\n throw new Compiler$Exn(\"insn is -1\");\n }\n var5_5 = 0;\n var6_6 = var2_2 >>> 26 & 255;\n var7_7 = var2_2 >>> 21 & 31;\n var8_8 = var2_2 >>> 16 & 31;\n var9_9 = var2_2 >>> 16 & 31;\n var10_10 = var2_2 >>> 11 & 31;\n var11_11 = var2_2 >>> 11 & 31;\n var12_12 = var2_2 >>> 6 & 31;\n var13_13 = var2_2 >>> 6 & 31;\n var14_14 = var2_2 & 63;\n var15_15 = var2_2 >>> 6 & 1048575;\n var16_16 = var2_2 & 67108863;\n var17_17 = var2_2 & 65535;\n var19_19 = var18_18 = var2_2 << 16 >> 16;\n switch (var6_6) {\n case 0: {\n switch (var14_14) {\n case 0: {\n if (var2_2 == 0) {\n return var5_5;\n }\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(18, var12_12);\n var4_4.add(120);\n this.setReg();\n return var5_5;\n }\n case 2: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(18, var12_12);\n var4_4.add(124);\n this.setReg();\n return var5_5;\n }\n case 3: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(18, var12_12);\n var4_4.add(122);\n this.setReg();\n return var5_5;\n }\n case 4: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(120);\n this.setReg();\n return var5_5;\n }\n case 6: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(124);\n this.setReg();\n return var5_5;\n }\n case 7: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(122);\n this.setReg();\n return var5_5;\n }\n case 8: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.emitInstruction(-1, var3_3, -1);\n this.preSetPC();\n this.pushRegWZ(0 + var7_7);\n this.setPC();\n this.leaveMethod();\n return var5_5 |= 1;\n }\n case 9: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.emitInstruction(-1, var3_3, -1);\n this.link(var1_1);\n this.preSetPC();\n this.pushRegWZ(0 + var7_7);\n this.setPC();\n this.leaveMethod();\n return var5_5 |= 1;\n }\n case 12: {\n this.preSetPC();\n var4_4.add(18, var1_1);\n this.setPC();\n this.restoreChangedRegs();\n this.preSetReg(2);\n var4_4.add(42);\n this.pushRegZ(2);\n this.pushRegZ(4);\n this.pushRegZ(5);\n this.pushRegZ(6);\n this.pushRegZ(7);\n this.pushRegZ(8);\n this.pushRegZ(9);\n var4_4.add(-74, (Object)this.me.method(\"syscall\", Type.INT, new Type[]{Type.INT, Type.INT, Type.INT, Type.INT, Type.INT, Type.INT, Type.INT}));\n this.setReg();\n var4_4.add(42);\n var4_4.add(-76, (Object)this.me.field(\"state\", Type.INT));\n var20_20 = var4_4.add(-103);\n this.preSetPC();\n var4_4.add(18, var1_1 + 4);\n this.setPC();\n this.leaveMethod();\n var4_4.setArg(var20_20, var4_4.size());\n return var5_5;\n }\n case 13: {\n var4_4.add(-69, (Object)Type.Class.instance((String)\"org.ibex.nestedvm.Runtime$ExecutionException\"));\n var4_4.add(89);\n var4_4.add(18, (Object)new StringBuffer().append(\"BREAK Code \").append(ClassFileCompiler.toHex(var15_15)).toString());\n var4_4.add(-73, (Object)Type.Class.instance((String)\"org.ibex.nestedvm.Runtime$ExecutionException\").method(\"<init>\", Type.VOID, new Type[]{Type.STRING}));\n var4_4.add(-65);\n return var5_5 |= 1;\n }\n case 16: {\n this.preSetReg(0 + var10_10);\n this.pushReg(64);\n this.setReg();\n return var5_5;\n }\n case 17: {\n this.preSetReg(64);\n this.pushRegZ(0 + var7_7);\n this.setReg();\n return var5_5;\n }\n case 18: {\n this.preSetReg(0 + var10_10);\n this.pushReg(65);\n this.setReg();\n return var5_5;\n }\n case 19: {\n this.preSetReg(65);\n this.pushRegZ(0 + var7_7);\n this.setReg();\n return var5_5;\n }\n case 24: {\n this.pushRegWZ(0 + var7_7);\n var4_4.add(-123);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(-123);\n var4_4.add(105);\n var4_4.add(92);\n var4_4.add(-120);\n if (this.preSetReg(65)) {\n var4_4.add(95);\n }\n this.setReg();\n var4_4.add(18, 32);\n var4_4.add(125);\n var4_4.add(-120);\n if (this.preSetReg(64)) {\n var4_4.add(95);\n }\n this.setReg();\n return var5_5;\n }\n case 25: {\n this.pushRegWZ(0 + var7_7);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n var4_4.add(105);\n var4_4.add(92);\n var4_4.add(-120);\n if (this.preSetReg(65)) {\n var4_4.add(95);\n }\n this.setReg();\n var4_4.add(18, 32);\n var4_4.add(125);\n var4_4.add(-120);\n if (this.preSetReg(64)) {\n var4_4.add(95);\n }\n this.setReg();\n return var5_5;\n }\n case 26: {\n this.pushRegWZ(0 + var7_7);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(92);\n var4_4.add(108);\n if (this.preSetReg(65)) {\n var4_4.add(95);\n }\n this.setReg();\n var4_4.add(112);\n if (this.preSetReg(64)) {\n var4_4.add(95);\n }\n this.setReg();\n return var5_5;\n }\n case 27: {\n this.pushRegWZ(0 + var8_8);\n var4_4.add(89);\n this.setTmp();\n var20_21 = var4_4.add(-103);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n var4_4.add(92);\n this.pushTmp();\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n var4_4.add(94);\n var4_4.add(109);\n var4_4.add(-120);\n if (this.preSetReg(65)) {\n var4_4.add(95);\n }\n this.setReg();\n var4_4.add(113);\n var4_4.add(-120);\n if (this.preSetReg(64)) {\n var4_4.add(95);\n }\n this.setReg();\n var4_4.setArg(var20_21, var4_4.size());\n return var5_5;\n }\n case 32: {\n throw new Compiler$Exn(\"ADD (add with oveflow trap) not suported\");\n }\n case 33: {\n this.preSetReg(0 + var10_10);\n if (var8_8 != 0 && var7_7 != 0) {\n this.pushReg(0 + var7_7);\n this.pushReg(0 + var8_8);\n var4_4.add(96);\n } else if (var7_7 != 0) {\n this.pushReg(0 + var7_7);\n } else {\n this.pushRegZ(0 + var8_8);\n }\n this.setReg();\n return var5_5;\n }\n case 34: {\n throw new Compiler$Exn(\"SUB (add with oveflow trap) not suported\");\n }\n case 35: {\n this.preSetReg(0 + var10_10);\n if (var8_8 != 0 && var7_7 != 0) {\n this.pushReg(0 + var7_7);\n this.pushReg(0 + var8_8);\n var4_4.add(100);\n } else if (var8_8 != 0) {\n this.pushReg(0 + var8_8);\n var4_4.add(116);\n } else {\n this.pushRegZ(0 + var7_7);\n }\n this.setReg();\n return var5_5;\n }\n case 36: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var7_7);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(126);\n this.setReg();\n return var5_5;\n }\n case 37: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var7_7);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(-128);\n this.setReg();\n return var5_5;\n }\n case 38: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var7_7);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(-126);\n this.setReg();\n return var5_5;\n }\n case 39: {\n this.preSetReg(0 + var10_10);\n if (var7_7 != 0 || var8_8 != 0) {\n if (var7_7 != 0 && var8_8 != 0) {\n this.pushReg(0 + var7_7);\n this.pushReg(0 + var8_8);\n var4_4.add(-128);\n } else if (var7_7 != 0) {\n this.pushReg(0 + var7_7);\n } else {\n this.pushReg(0 + var8_8);\n }\n var4_4.add(2);\n var4_4.add(-126);\n } else {\n var4_4.add(18, -1);\n }\n this.setReg();\n return var5_5;\n }\n case 42: {\n this.preSetReg(0 + var10_10);\n if (var7_7 != var8_8) {\n this.pushRegZ(0 + var7_7);\n this.pushRegZ(0 + var8_8);\n var20_22 = var4_4.add(-95);\n var4_4.add(3);\n var21_31 = var4_4.add(-89);\n var4_4.setArg(var20_22, var4_4.add(4));\n var4_4.setArg(var21_31, var4_4.size());\n } else {\n var4_4.add(18, 0);\n }\n this.setReg();\n return var5_5;\n }\n case 43: {\n this.preSetReg(0 + var10_10);\n if (var7_7 != var8_8) {\n if (var7_7 != 0) {\n this.pushReg(0 + var7_7);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n this.pushReg(0 + var8_8);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n var4_4.add(-108);\n var20_23 = var4_4.add(-101);\n } else {\n this.pushReg(0 + var8_8);\n var20_23 = var4_4.add(-102);\n }\n var4_4.add(3);\n var21_32 = var4_4.add(-89);\n var4_4.setArg(var20_23, var4_4.add(4));\n var4_4.setArg(var21_32, var4_4.size());\n } else {\n var4_4.add(18, 0);\n }\n this.setReg();\n return var5_5;\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Illegal instruction 0/\").append(var14_14).toString());\n }\n case 1: {\n switch (var8_8) {\n case 0: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n return this.doIfInstruction(-101, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 1: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n return this.doIfInstruction(-100, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 16: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n var20_24 = var4_4.add(-100);\n this.emitInstruction(-1, var3_3, -1);\n this.link(var1_1);\n this.branch(var1_1, var1_1 + var19_19 * 4 + 4);\n var4_4.setArg(var20_24, var4_4.size());\n return var5_5;\n }\n case 17: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n var20_25 = -1;\n if (var7_7 != 0) {\n this.pushRegWZ(0 + var7_7);\n var20_25 = var4_4.add(-101);\n }\n this.emitInstruction(-1, var3_3, -1);\n this.link(var1_1);\n this.branch(var1_1, var1_1 + var19_19 * 4 + 4);\n if (var20_25 != -1) {\n var4_4.setArg(var20_25, var4_4.size());\n }\n if (var20_25 != -1) return var5_5;\n return var5_5 |= 1;\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Illegal Instruction 1/\").append(var8_8).toString());\n }\n case 2: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.emitInstruction(-1, var3_3, -1);\n this.branch(var1_1, var1_1 & -268435456 | var16_16 << 2);\n return var5_5 |= 1;\n }\n case 3: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n var22_35 = var1_1 & -268435456 | var16_16 << 2;\n this.emitInstruction(-1, var3_3, -1);\n this.link(var1_1);\n this.branch(var1_1, var22_35);\n return var5_5 |= 1;\n }\n case 4: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n if (var7_7 == var8_8) {\n this.emitInstruction(-1, var3_3, -1);\n this.branch(var1_1, var1_1 + var19_19 * 4 + 4);\n return var5_5 |= 1;\n }\n if (var7_7 != 0 && var8_8 != 0) {\n this.pushReg(0 + var7_7);\n this.pushReg(0 + var8_8);\n return this.doIfInstruction(-97, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n this.pushReg(var8_8 == 0 ? 0 + var7_7 : 0 + var8_8);\n return this.doIfInstruction(-103, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 5: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n if (var8_8 == 0) {\n return this.doIfInstruction(-102, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n this.pushReg(0 + var8_8);\n return this.doIfInstruction(-96, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 6: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n return this.doIfInstruction(-98, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 7: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n return this.doIfInstruction(-99, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 8: {\n throw new Compiler$Exn(\"ADDI (add immediate with oveflow trap) not suported\");\n }\n case 9: {\n if (var7_7 != 0 && var18_18 != 0 && var7_7 == var8_8 && this.doLocal(var8_8) && var18_18 >= -32768 && var18_18 <= 32767) {\n this.regLocalWritten[var8_8] = true;\n var4_4.add(-124, (Object)new MethodGen.Pair(this.getLocalForReg(var8_8), var18_18));\n return var5_5;\n }\n this.preSetReg(0 + var8_8);\n this.addiu(var7_7, var18_18);\n this.setReg();\n return var5_5;\n }\n case 10: {\n this.preSetReg(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(18, var18_18);\n var20_26 = var4_4.add(-95);\n var4_4.add(3);\n var21_33 = var4_4.add(-89);\n var4_4.setArg(var20_26, var4_4.add(4));\n var4_4.setArg(var21_33, var4_4.size());\n this.setReg();\n return var5_5;\n }\n case 11: {\n this.preSetReg(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n var4_4.add(18, (Object)new Long((long)var18_18 & 0xFFFFFFFFL));\n var4_4.add(-108);\n var20_27 = var4_4.add(-101);\n var4_4.add(3);\n var21_34 = var4_4.add(-89);\n var4_4.setArg(var20_27, var4_4.add(4));\n var4_4.setArg(var21_34, var4_4.size());\n this.setReg();\n return var5_5;\n }\n case 12: {\n this.preSetReg(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(18, var17_17);\n var4_4.add(126);\n this.setReg();\n return var5_5;\n }\n case 13: {\n this.preSetReg(0 + var8_8);\n if (var7_7 != 0 && var17_17 != 0) {\n this.pushReg(0 + var7_7);\n var4_4.add(18, var17_17);\n var4_4.add(-128);\n } else if (var7_7 != 0) {\n this.pushReg(0 + var7_7);\n } else {\n var4_4.add(18, var17_17);\n }\n this.setReg();\n return var5_5;\n }\n case 14: {\n this.preSetReg(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(18, var17_17);\n var4_4.add(-126);\n this.setReg();\n return var5_5;\n }\n case 15: {\n this.preSetReg(0 + var8_8);\n var4_4.add(18, var17_17 << 16);\n this.setReg();\n return var5_5;\n }\n case 16: {\n throw new Compiler$Exn(\"TLB/Exception support not implemented\");\n }\n case 17: {\n switch (var7_7) {\n case 0: {\n this.preSetReg(0 + var8_8);\n this.pushReg(32 + var10_10);\n this.setReg();\n return var5_5;\n }\n case 2: {\n if (var11_11 != 31) {\n throw new Compiler$Exn(new StringBuffer().append(\"FCR \").append(var11_11).append(\" unavailable\").toString());\n }\n this.preSetReg(0 + var8_8);\n this.pushReg(66);\n this.setReg();\n return var5_5;\n }\n case 4: {\n this.preSetReg(32 + var10_10);\n if (var8_8 != 0) {\n this.pushReg(0 + var8_8);\n } else {\n var4_4.add(3);\n }\n this.setReg();\n return var5_5;\n }\n case 6: {\n if (var11_11 != 31) {\n throw new Compiler$Exn(new StringBuffer().append(\"FCR \").append(var11_11).append(\" unavailable\").toString());\n }\n this.preSetReg(66);\n this.pushReg(0 + var8_8);\n this.setReg();\n return var5_5;\n }\n case 8: {\n this.pushReg(66);\n var4_4.add(18, 8388608);\n var4_4.add(126);\n if ((var2_2 >>> 16 & 1) == 0) {\n v0 = -103;\n return this.doIfInstruction(v0, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n v0 = -102;\n return this.doIfInstruction(v0, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 16: \n case 17: {\n var22_36 = var7_7 == 17;\n switch (var14_14) {\n case 0: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushDouble(32 + var9_9, var22_36);\n var4_4.add(var22_36 != false ? 99 : 98);\n this.setDouble(var22_36);\n return var5_5;\n }\n case 1: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushDouble(32 + var9_9, var22_36);\n var4_4.add(var22_36 != false ? 103 : 102);\n this.setDouble(var22_36);\n return var5_5;\n }\n case 2: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushDouble(32 + var9_9, var22_36);\n var4_4.add(var22_36 != false ? 107 : 106);\n this.setDouble(var22_36);\n return var5_5;\n }\n case 3: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushDouble(32 + var9_9, var22_36);\n var4_4.add(var22_36 != false ? 111 : 110);\n this.setDouble(var22_36);\n return var5_5;\n }\n case 5: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n var4_4.add(var22_36 != false ? 92 : 89);\n var4_4.add(var22_36 != false ? 14 : 11);\n var4_4.add(var22_36 != false ? -104 : -106);\n var20_28 = var4_4.add(-99);\n var4_4.add(var22_36 != false ? 14 : 11);\n if (var22_36) {\n var4_4.add(94);\n var4_4.add(88);\n } else {\n var4_4.add(95);\n }\n var4_4.add(var22_36 != false ? 103 : 102);\n var4_4.setArg(var20_28, var4_4.size());\n this.setDouble(var22_36);\n return var5_5;\n }\n case 6: {\n this.preSetReg(32 + var13_13);\n this.pushReg(32 + var11_11);\n this.setReg();\n if (var22_36 == false) return var5_5;\n this.preSetReg(32 + var13_13 + 1);\n this.pushReg(32 + var11_11 + 1);\n this.setReg();\n return var5_5;\n }\n case 7: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n var4_4.add(var22_36 != false ? 119 : 118);\n this.setDouble(var22_36);\n return var5_5;\n }\n case 32: {\n this.preSetFloat(32 + var13_13);\n this.pushDouble(32 + var11_11, var22_36);\n if (var22_36) {\n var4_4.add(-112);\n }\n this.setFloat();\n return var5_5;\n }\n case 33: {\n this.preSetDouble(32 + var13_13);\n this.pushDouble(32 + var11_11, var22_36);\n if (!var22_36) {\n var4_4.add(-115);\n }\n this.setDouble();\n return var5_5;\n }\n case 36: {\n var23_37 = new MethodGen.Switch.Table(0, 3);\n this.preSetReg(32 + var13_13);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushReg(66);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(-86, (Object)var23_37);\n var23_37.setTarget(2, var4_4.size());\n if (!var22_36) {\n var4_4.add(-115);\n }\n var4_4.add(-72, (Object)Type.Class.instance((String)\"java.lang.Math\").method(\"ceil\", Type.DOUBLE, new Type[]{Type.DOUBLE}));\n if (!var22_36) {\n var4_4.add(-112);\n }\n var20_29 = var4_4.add(-89);\n var23_37.setTarget(0, var4_4.size());\n var4_4.add(18, (Object)(var22_36 != false ? ClassFileCompiler.POINT_5_D : ClassFileCompiler.POINT_5_F));\n var4_4.add(var22_36 != false ? 99 : 98);\n var23_37.setTarget(3, var4_4.size());\n if (!var22_36) {\n var4_4.add(-115);\n }\n var4_4.add(-72, (Object)Type.Class.instance((String)\"java.lang.Math\").method(\"floor\", Type.DOUBLE, new Type[]{Type.DOUBLE}));\n if (!var22_36) {\n var4_4.add(-112);\n }\n var23_37.setTarget(1, var4_4.size());\n var23_37.setDefaultTarget(var4_4.size());\n var4_4.setArg(var20_29, var4_4.size());\n var4_4.add(var22_36 != false ? -114 : -117);\n this.setReg();\n return var5_5;\n }\n case 50: \n case 60: \n case 62: {\n this.preSetReg(66);\n this.pushReg(66);\n var4_4.add(18, -8388609);\n var4_4.add(126);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushDouble(32 + var9_9, var22_36);\n var4_4.add(var22_36 != false ? -104 : -106);\n switch (var14_14) {\n case 50: {\n var20_30 = var4_4.add(-102);\n ** break;\n }\n case 60: {\n var20_30 = var4_4.add(-100);\n ** break;\n }\n case 62: {\n var20_30 = var4_4.add(-99);\n ** break;\n }\n }\n var20_30 = -1;\nlbl643: // 4 sources:\n var4_4.add(18, 8388608);\n var4_4.add(-128);\n var4_4.setArg(var20_30, var4_4.size());\n this.setReg();\n return var5_5;\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Invalid Instruction 17/\").append(var7_7).append(\"/\").append(var14_14).toString());\n }\n case 20: {\n switch (var14_14) {\n case 32: {\n this.preSetFloat(32 + var13_13);\n this.pushReg(32 + var11_11);\n var4_4.add(-122);\n this.setFloat();\n return var5_5;\n }\n case 33: {\n this.preSetDouble(32 + var13_13);\n this.pushReg(32 + var11_11);\n var4_4.add(-121);\n this.setDouble();\n return var5_5;\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Invalid Instruction 17/\").append(var7_7).append(\"/\").append(var14_14).toString());\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Invalid Instruction 17/\").append(var7_7).toString());\n }\n case 18: \n case 19: {\n throw new Compiler$Exn(\"coprocessor 2 and 3 instructions not available\");\n }\n case 32: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(-111);\n this.setReg();\n return var5_5;\n }\n case 33: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(5);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(-109);\n this.setReg();\n return var5_5;\n }\n case 34: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.pushRegWZ(0 + var8_8);\n var4_4.add(18, 16777215);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(126);\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(-128);\n this.setReg();\n return var5_5;\n }\n case 35: {\n this.preSetReg(0 + var8_8);\n this.memRead(0 + var7_7, var18_18);\n this.setReg();\n return var5_5;\n }\n case 36: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(18, 255);\n var4_4.add(126);\n this.setReg();\n return var5_5;\n }\n case 37: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(5);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(-110);\n this.setReg();\n return var5_5;\n }\n case 38: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.pushRegWZ(0 + var8_8);\n var4_4.add(18, -256);\n this.pushTmp();\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(126);\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(-128);\n this.setReg();\n return var5_5;\n }\n case 40: {\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead(true);\n this.pushTmp();\n this.memRead(true);\n var4_4.add(18, -16777216);\n this.pushTmp();\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(126);\n if (var8_8 != 0) {\n this.pushReg(0 + var8_8);\n var4_4.add(18, 255);\n var4_4.add(126);\n } else {\n var4_4.add(18, 0);\n }\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(-128);\n this.memWrite();\n return var5_5;\n }\n case 41: {\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead(true);\n this.pushTmp();\n this.memRead(true);\n var4_4.add(18, 65535);\n this.pushTmp();\n var4_4.add(5);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(126);\n if (var8_8 != 0) {\n this.pushReg(0 + var8_8);\n var4_4.add(18, 65535);\n var4_4.add(126);\n } else {\n var4_4.add(18, 0);\n }\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(5);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(-128);\n this.memWrite();\n return var5_5;\n }\n case 42: {\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead(true);\n this.pushTmp();\n this.memRead(true);\n var4_4.add(18, -256);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(126);\n this.pushRegWZ(0 + var8_8);\n this.pushTmp();\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(-128);\n this.memWrite();\n return var5_5;\n }\n case 43: {\n this.preMemWrite1();\n this.preMemWrite2(0 + var7_7, var18_18);\n this.pushRegZ(0 + var8_8);\n this.memWrite();\n return var5_5;\n }\n case 46: {\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead(true);\n this.pushTmp();\n this.memRead(true);\n var4_4.add(18, 16777215);\n this.pushTmp();\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(126);\n this.pushRegWZ(0 + var8_8);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(-128);\n this.memWrite();\n return var5_5;\n }\n case 48: {\n this.preSetReg(0 + var8_8);\n this.memRead(0 + var7_7, var18_18);\n this.setReg();\n return var5_5;\n }\n case 49: {\n this.preSetReg(32 + var8_8);\n this.memRead(0 + var7_7, var18_18);\n this.setReg();\n return var5_5;\n }\n case 56: {\n this.preSetReg(0 + var8_8);\n this.preMemWrite1();\n this.preMemWrite2(0 + var7_7, var18_18);\n this.pushReg(0 + var8_8);\n this.memWrite();\n var4_4.add(18, 1);\n this.setReg();\n return var5_5;\n }\n case 57: {\n this.preMemWrite1();\n this.preMemWrite2(0 + var7_7, var18_18);\n this.pushReg(32 + var8_8);\n this.memWrite();\n return var5_5;\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Invalid Instruction: \").append(var6_6).append(\" at \").append(ClassFileCompiler.toHex(var1_1)).toString());\n }", "Expression getRValue();", "Expression createExpression();", "AndExp getRight();", "public Object visitBitwiseAndExpression(GNode n) {\n Object a, b, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(1));\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n result = (Long) a & (Long) b;\n }\n else {\n result = parens(a) + \" & \" + parens(b);\n }\n \n return result;\n }", "UndefinedLiteralExp createUndefinedLiteralExp();", "private boolean CarryFromResult(int dvalue, int rvalue, int result)\n {\n return (Utils.bit7(dvalue) && Utils.bit7(rvalue)) || (Utils.bit7(rvalue) && !Utils.bit7(result)) || (!Utils.bit7(result) && Utils.bit7(dvalue));\n }", "Expr expr();", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 223,\n FQN=\"llvm::Module::getOrInsertGlobal\", NM=\"_ZN4llvm6Module17getOrInsertGlobalENS_9StringRefEPNS_4TypeE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getOrInsertGlobalENS_9StringRefEPNS_4TypeE\")\n //</editor-fold>\n public Constant /*P*/ getOrInsertGlobal(StringRef Name, Type /*P*/ Ty) {\n // See if we have a definition for the specified global already.\n GlobalVariable /*P*/ GV = dyn_cast_or_null_GlobalVariable(getNamedValue(new StringRef(Name)));\n if (!(GV != null)) {\n // Nope, add it\n GlobalVariable /*P*/ New = /*NEW_EXPR [GlobalVariable::new]*/GlobalVariable.$new_GlobalVariable((type$ptr<?> New$Mem)->{\n return new GlobalVariable(/*Deref*/this, Ty, false, GlobalVariable.LinkageTypes.ExternalLinkage, \n (Constant /*P*/ )null, new Twine(Name));\n });\n return New; // Return the new declaration.\n }\n \n // If the variable exists but has the wrong type, return a bitcast to the\n // right type.\n Type /*P*/ GVTy = GV.getType();\n PointerType /*P*/ PTy = PointerType.get(Ty, GVTy.getPointerAddressSpace());\n if (GVTy != PTy) {\n return ConstantExpr.getBitCast(GV, PTy);\n }\n \n // Otherwise, we just found the existing function or a prototype.\n return GV;\n }", "private void createFPregMove(Code32 code, int opCode, int cond, int Vm, int Rt, int Rt2, boolean toArm, boolean single) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | opCode;\r\n\t\tif (single) code.instructions[code.iCount] |= (((Vm>>1)&0xf) << 16) | ((Vm&1) << 7) | (Rt << 12);\r\n\t\telse code.instructions[code.iCount] |= (Vm&0xf) | ((Vm>>4) << 5) | (Rt << 12) | (Rt2 << 16);\r\n\t\tif (toArm) code.instructions[code.iCount] |= (1 << 20);\r\n\t\tcode.incInstructionNum();\r\n\t}", "public String isValidOperand(FullArgument operand, boolean executeNow) {\n\t\tif (operand.address.type == Op.ERROR) {\n\t\t\treturn \"Invalid Expression\";\n\t\t}\n\t\tif ((operand.address.type & Op.MEM) != 0) {\n\t\t\treturn isValidAddress(operand.arg, operand.address.size, executeNow);\n\t\t}\n\t\treturn null;\n\t}", "public final java_cup.runtime.Symbol CUP$Parser$do_action(\n int CUP$Parser$act_num,\n java_cup.runtime.lr_parser CUP$Parser$parser,\n java.util.Stack CUP$Parser$stack,\n int CUP$Parser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$Parser$result;\n\n /* select the action based on the action number */\n switch (CUP$Parser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 87: // literal ::= NULL \n {\n Literal RESULT =null;\n\t\tint nleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint nright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tObject n = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new Literal(nleft, LiteralTypes.NULL); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"literal\",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 86: // literal ::= FALSE \n {\n Literal RESULT =null;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tObject f = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new Literal(fleft, LiteralTypes.FALSE); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"literal\",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 85: // literal ::= TRUE \n {\n Literal RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tObject t = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new Literal(tleft, LiteralTypes.TRUE); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"literal\",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 84: // literal ::= QUOTE \n {\n Literal RESULT =null;\n\t\tint qleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint qright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tString q = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new Literal(qleft, LiteralTypes.STRING, q); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"literal\",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 83: // literal ::= INTEGER \n {\n Literal RESULT =null;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tInteger i = (Integer)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new Literal(ileft, LiteralTypes.INTEGER, i); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"literal\",20, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 82: // unop ::= LNEG expr \n {\n UnaryOp RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new LogicalUnaryOp(UnaryOps.LNEG, e); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"unop\",19, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 81: // unop ::= MINUS expr \n {\n UnaryOp RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new MathUnaryOp(UnaryOps.UMINUS, e); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"unop\",19, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 80: // binop ::= expr NEQUAL expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new LogicalBinaryOp(e1, BinaryOps.NEQUAL, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 79: // binop ::= expr EQUAL expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new LogicalBinaryOp(e1, BinaryOps.EQUAL, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 78: // binop ::= expr GTE expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new LogicalBinaryOp(e1, BinaryOps.GTE, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 77: // binop ::= expr GT expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new LogicalBinaryOp(e1, BinaryOps.GT, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 76: // binop ::= expr LTE expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new LogicalBinaryOp(e1, BinaryOps.LTE, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 75: // binop ::= expr LT expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new LogicalBinaryOp(e1, BinaryOps.LT, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 74: // binop ::= expr LOR expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new LogicalBinaryOp(e1, BinaryOps.LOR, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 73: // binop ::= expr LAND expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new LogicalBinaryOp(e1, BinaryOps.LAND, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 72: // binop ::= expr MOD expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new MathBinaryOp(e1, BinaryOps.MOD, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 71: // binop ::= expr DIVIDE expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new MathBinaryOp(e1, BinaryOps.DIVIDE, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 70: // binop ::= expr MULTIPLY expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new MathBinaryOp(e1, BinaryOps.MULTIPLY, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 69: // binop ::= expr MINUS expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new MathBinaryOp(e1, BinaryOps.MINUS, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 68: // binop ::= expr PLUS expr \n {\n BinaryOp RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new MathBinaryOp(e1, BinaryOps.PLUS, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"binop\",18, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 67: // location ::= expr LB expr RB \n {\n Location RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new ArrayLocation(e1, e2); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"location\",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 66: // location ::= expr DOT ID \n {\n Location RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new VariableLocation(idleft, e, id); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"location\",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 65: // location ::= ID \n {\n Location RESULT =null;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new VariableLocation(idleft, id); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"location\",12, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 64: // expr_list ::= expr_list COMMA expr \n {\n List<Expression> RESULT =null;\n\t\tint elleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint elright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tList<Expression> el = (List<Expression>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tel.add(e);\n\t\tRESULT = el; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr_list\",14, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 63: // expr_list ::= expr \n {\n List<Expression> RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tList<Expression> l = new ArrayList<Expression>();\n\t\tl.add(e);\n\t\tRESULT = l; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr_list\",14, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 62: // virtual_call ::= expr DOT ID LP expr_list RP \n {\n VirtualCall RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value;\n\t\tint elleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint elright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Expression> el = (List<Expression>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new VirtualCall(idleft, e, id, el); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"virtual_call\",17, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 61: // virtual_call ::= expr DOT ID LP RP \n {\n VirtualCall RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\t\tRESULT = new VirtualCall(idleft, e, id, new ArrayList<Expression>()); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"virtual_call\",17, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 60: // virtual_call ::= ID LP expr_list RP \n {\n VirtualCall RESULT =null;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value;\n\t\tint elleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint elright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Expression> el = (List<Expression>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new VirtualCall(idleft, id, el); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"virtual_call\",17, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 59: // virtual_call ::= ID LP RP \n {\n VirtualCall RESULT =null;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\t\tRESULT = new VirtualCall(idleft, id, new ArrayList<Expression>()); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"virtual_call\",17, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 58: // static_call ::= CLASS_ID DOT ID LP expr_list RP \n {\n StaticCall RESULT =null;\n\t\tint cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left;\n\t\tint ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right;\n\t\tString ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value;\n\t\tint elleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint elright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Expression> el = (List<Expression>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new StaticCall(cileft, ci, id, el); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"static_call\",16, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 57: // static_call ::= CLASS_ID DOT ID LP RP \n {\n StaticCall RESULT =null;\n\t\tint cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left;\n\t\tint ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right;\n\t\tString ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\t\tRESULT = new StaticCall(cileft, ci, id, new ArrayList<Expression>()); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"static_call\",16, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 56: // call ::= virtual_call \n {\n Call RESULT =null;\n\t\tint vcleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint vcright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tVirtualCall vc = (VirtualCall)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = vc; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"call\",15, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 55: // call ::= static_call \n {\n Call RESULT =null;\n\t\tint scleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint scright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tStaticCall sc = (StaticCall)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = sc; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"call\",15, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 54: // expr ::= LP expr RP \n {\n Expression RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = e; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr\",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 53: // expr ::= literal \n {\n Expression RESULT =null;\n\t\tint lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tLiteral l = (Literal)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = l; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr\",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 52: // expr ::= unop \n {\n Expression RESULT =null;\n\t\tint uleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint uright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tUnaryOp u = (UnaryOp)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = u; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr\",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 51: // expr ::= binop \n {\n Expression RESULT =null;\n\t\tint bleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint bright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tBinaryOp b = (BinaryOp)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = b; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr\",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 50: // expr ::= expr DOT LENGTH \n {\n Expression RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\t\tRESULT = new Length(e); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr\",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 49: // expr ::= NEW type LB expr RB \n {\n Expression RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right;\n\t\tType t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new NewArray(t, e); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr\",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 48: // expr ::= NEW CLASS_ID LP RP \n {\n Expression RESULT =null;\n\t\tint cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tString ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\t\tRESULT = new NewClass(cileft, ci); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr\",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 47: // expr ::= THIS \n {\n Expression RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tObject t = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new This(tleft); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr\",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 46: // expr ::= call \n {\n Expression RESULT =null;\n\t\tint cleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint cright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tCall c = (Call)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = c; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr\",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // expr ::= location \n {\n Expression RESULT =null;\n\t\tint lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tLocation l = (Location)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = l; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"expr\",13, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // stmt ::= type ID ASSIGN expr SEMI \n {\n Statement RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right;\n\t\tType t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new LocalVariable(t, id, e); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // stmt ::= type ID SEMI \n {\n Statement RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tType t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new LocalVariable(t, id); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // stmt ::= LCBR stmt_list RCBR \n {\n Statement RESULT =null;\n\t\tint lcbrleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint lcbrright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tObject lcbr = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new StatementsBlock(lcbrleft, sl); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // stmt ::= CONTINUE SEMI \n {\n Statement RESULT =null;\n\t\tint cleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint cright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tObject c = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new Continue(cleft); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // stmt ::= BREAK SEMI \n {\n Statement RESULT =null;\n\t\tint bleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint bright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tObject b = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new Break(bleft); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // stmt ::= WHILE LP expr RP stmt \n {\n Statement RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tStatement s = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new While(e, s); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // stmt ::= IF LP expr RP stmt \n {\n Statement RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tStatement s = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new If(e, s); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // stmt ::= IF LP expr RP stmt ELSE stmt \n {\n Statement RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value;\n\t\tint sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tStatement s = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint esleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint esright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tStatement es = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tRESULT = new If(e, s, es); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // stmt ::= RETURN expr SEMI \n {\n Statement RESULT =null;\n\t\tint rleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint rright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tObject r = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new Return(rleft, e); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // stmt ::= RETURN SEMI \n {\n Statement RESULT =null;\n\t\tint rleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint rright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tObject r = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new Return(rleft); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // stmt ::= call SEMI \n {\n Statement RESULT =null;\n\t\tint cleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint cright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tCall c = (Call)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new CallStatement(c); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // stmt ::= location ASSIGN expr SEMI \n {\n Statement RESULT =null;\n\t\tint lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left;\n\t\tint lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right;\n\t\tLocation l = (Location)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t\tRESULT = new Assignment(l, e); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt\",10, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // stmt_list ::= stmt_list stmt \n {\n List<Statement> RESULT =null;\n\t\tint slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\tint sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tStatement s = (Statement)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t\tsl.add(s);\n\t\tRESULT = sl; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt_list\",11, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // stmt_list ::= \n {\n List<Statement> RESULT =null;\n\t\t RESULT = new ArrayList<Statement>(); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"stmt_list\",11, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // type ::= type LB RB \n {\n Type RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tType t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\t t.incrementDimension(); RESULT = t; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"type\",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // type ::= CLASS_ID \n {\n Type RESULT =null;\n\t\tint cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tString ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t RESULT = new UserType(cileft, ci); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"type\",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // type ::= STRING \n {\n Type RESULT =null;\n\t\tint sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tObject s = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t RESULT = new PrimitiveType(sleft, DataTypes.STRING); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"type\",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // type ::= BOOLEAN \n {\n Type RESULT =null;\n\t\tint bleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint bright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tObject b = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t RESULT = new PrimitiveType(bleft, DataTypes.BOOLEAN); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"type\",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // type ::= INT \n {\n Type RESULT =null;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t RESULT = new PrimitiveType(ileft, DataTypes.INT); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"type\",9, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // formal ::= type ID \n {\n Formal RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tType t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t RESULT = new Formal(t, id);\n\t // System.out.println(\"Reduced rule t id for t=\" + t + \" and id=\" + id); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"formal\",7, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // formal_list ::= formal_list COMMA formal \n {\n List<Formal> RESULT =null;\n\t\tint flleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint flright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tList<Formal> fl = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tFormal f = (Formal)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t fl.add(f);\n\t RESULT = fl;\n\t // System.out.println(\"Added f to list of Formal for f=\" + f); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // formal_list ::= formal \n {\n List<Formal> RESULT =null;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tFormal f = (Formal)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t List<Formal> l = new ArrayList<Formal>();\n\t l.add(f);\n\t RESULT = l;\n\t // System.out.println(\"Created new list of Formal, added f=\" + f); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",8, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // method ::= type ID LP formal_list RP LCBR stmt_list RCBR \n {\n Method RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).right;\n\t\tType t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-7)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right;\n\t\tList<Formal> f = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value;\n\t\tint slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t RESULT = new VirtualMethod(t, id, f, sl);\n\t // System.out.println(\"Reduced rule t id(f){sl} for t=\" + t + \", id=\" + id + \", f=\" + f + \" and sl=\" + sl); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"method\",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // method ::= VOID ID LP formal_list RP LCBR stmt_list RCBR \n {\n Method RESULT =null;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right;\n\t\tList<Formal> f = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value;\n\t\tint slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t RESULT = new VirtualMethod(new PrimitiveType(idleft, DataTypes.VOID), id, f, sl);\n\t // System.out.println(\"Reduced rule void id(f){sl} for id=\" + id + \", f=\" + f + \" and sl=\" + sl); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"method\",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // method ::= type ID LP RP LCBR stmt_list RCBR \n {\n Method RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right;\n\t\tType t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value;\n\t\tint slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t RESULT = new VirtualMethod(t, id, new ArrayList<Formal>(), sl);\n\t // System.out.println(\"Reduced rule t id(){sl} for t=\" + t + \", id=\" + id + \" and sl=\" + sl); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"method\",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // method ::= VOID ID LP RP LCBR stmt_list RCBR \n {\n Method RESULT =null;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value;\n\t\tint slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t RESULT = new VirtualMethod(new PrimitiveType(idleft, DataTypes.VOID), id, new ArrayList<Formal>(), sl);\n\t // System.out.println(\"Reduced rule void id(){sl} for id=\" + id + \" and sl=\" + sl); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"method\",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // method ::= STATIC type ID LP formal_list RP LCBR stmt_list RCBR \n {\n Method RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).right;\n\t\tType t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-7)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right;\n\t\tList<Formal> f = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value;\n\t\tint slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t RESULT = new StaticMethod(t, id, f, sl);\n\t // System.out.println(\"Reduced rule static t id(f){sl} for t=\" + t + \", id=\" + id + \", f=\" + f + \" and sl=\" + sl); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"method\",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-8)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // method ::= STATIC VOID ID LP formal_list RP LCBR stmt_list RCBR \n {\n Method RESULT =null;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right;\n\t\tList<Formal> f = (List<Formal>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value;\n\t\tint slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t RESULT = new StaticMethod(new PrimitiveType(idleft, DataTypes.VOID), id, f, sl);\n\t // System.out.println(\"Reduced rule static void id(f){sl} for id=\" + id + \", f=\" + f + \" and sl=\" + sl); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"method\",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-8)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // method ::= STATIC type ID LP RP LCBR stmt_list RCBR \n {\n Method RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right;\n\t\tType t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value;\n\t\tint slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t RESULT = new StaticMethod(t, id, new ArrayList<Formal>(), sl);\n\t // System.out.println(\"Reduced rule static t id(){sl} for t=\" + t + \", id=\" + id + \" and sl=\" + sl); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"method\",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // method ::= STATIC VOID ID LP RP LCBR stmt_list RCBR \n {\n Method RESULT =null;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value;\n\t\tint slleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint slright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<Statement> sl = (List<Statement>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t RESULT = new StaticMethod(new PrimitiveType(idleft, DataTypes.VOID), id, new ArrayList<Formal>(), sl);\n\t // System.out.println(\"Reduced rule static void id(){sl} for id=\" + id + \" and sl=\" + sl); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"method\",6, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // id_list ::= id_list COMMA ID \n {\n List<String> RESULT =null;\n\t\tint idlleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint idlright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tList<String> idl = (List<String>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t idl.add(id);\n\t RESULT = idl; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"id_list\",5, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // id_list ::= ID \n {\n List<String> RESULT =null;\n\t\tint idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tString id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t List<String> idl = new ArrayList<String>();\n\t idl.add(id);\n\t RESULT = idl; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"id_list\",5, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // field ::= type id_list SEMI \n {\n List<Field> RESULT =null;\n\t\tint tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tType t = (Type)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\tint idlleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint idlright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<String> idl = (List<String>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t List<Field> lf = new ArrayList<Field>();\n\t for (String id: idl){\n\t lf.add(new Field(t, id));\n\t }\n\t RESULT = lf; \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"field\",4, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // field_or_method ::= field_or_method method \n {\n FieldOrMethod RESULT =null;\n\t\tint fomleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint fomright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tFieldOrMethod fom = (FieldOrMethod)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\tint mleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint mright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tMethod m = (Method)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t fom.addMethod(m);\n\t RESULT = fom;\n\t // System.out.println(\"Added m to list of fields and methods for m=\" + m); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"field_or_method\",2, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // field_or_method ::= field_or_method field \n {\n FieldOrMethod RESULT =null;\n\t\tint fomleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint fomright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tFieldOrMethod fom = (FieldOrMethod)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tList<Field> f = (List<Field>)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t fom.addField(f);\n\t RESULT = fom;\n\t // System.out.println(\"Added f to list of fields and methods for f=\" + f); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"field_or_method\",2, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // field_or_method ::= method \n {\n FieldOrMethod RESULT =null;\n\t\tint mleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint mright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tMethod m = (Method)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t RESULT = new FieldOrMethod(m);\n\t // System.out.println(\"Created new list of fields and methods, added m=\" + m); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"field_or_method\",2, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // field_or_method ::= field \n {\n FieldOrMethod RESULT =null;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tList<Field> f = (List<Field>)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t RESULT = new FieldOrMethod(f);\n\t // System.out.println(\"Created new list of fields and methods, added f=\" + f); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"field_or_method\",2, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // classDecl ::= CLASS CLASS_ID EXTENDS CLASS_ID LCBR field_or_method RCBR \n {\n ICClass RESULT =null;\n\t\tint cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left;\n\t\tint ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right;\n\t\tString ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value;\n\t\tint ecileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left;\n\t\tint eciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right;\n\t\tString eci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value;\n\t\tint fomleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint fomright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tFieldOrMethod fom = (FieldOrMethod)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t RESULT = new ICClass(cileft, ci, eci, fom.getFieldList(), fom.getMethodList()); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"classDecl\",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // classDecl ::= CLASS CLASS_ID EXTENDS CLASS_ID LCBR RCBR \n {\n ICClass RESULT =null;\n\t\tint cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left;\n\t\tint ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right;\n\t\tString ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value;\n\t\tint ecileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint eciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tString eci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\t RESULT = new ICClass(cileft, ci, eci, new ArrayList<Field>(), new ArrayList<Method>()); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"classDecl\",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // classDecl ::= CLASS CLASS_ID LCBR field_or_method RCBR \n {\n ICClass RESULT =null;\n\t\tint cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left;\n\t\tint ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right;\n\t\tString ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value;\n\t\tint fomleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint fomright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tFieldOrMethod fom = (FieldOrMethod)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\t RESULT = new ICClass(cileft, ci, fom.getFieldList(), fom.getMethodList()); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"classDecl\",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // classDecl ::= CLASS CLASS_ID LCBR RCBR \n {\n ICClass RESULT =null;\n\t\tint cileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left;\n\t\tint ciright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right;\n\t\tString ci = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;\n\t\t RESULT = new ICClass(cileft, ci, new ArrayList<Field>(), new ArrayList<Method>()); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"classDecl\",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // classDecl_list ::= classDecl_list classDecl \n {\n List<ICClass> RESULT =null;\n\t\tint cdlstleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint cdlstright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tList<ICClass> cdlst = (List<ICClass>)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\tint cdleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint cdright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tICClass cd = (ICClass)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t cdlst.add(cd);\n\t RESULT = cdlst;\n\t // System.out.println(\"Added cd to list of ICClass for cd=\" + cd); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"classDecl_list\",3, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // classDecl_list ::= classDecl \n {\n List<ICClass> RESULT =null;\n\t\tint cdleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint cdright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tICClass cd = (ICClass)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t List<ICClass> l = new ArrayList<ICClass>();\n\t l.add(cd);\n\t RESULT = l;\n\t // System.out.println(\"Created new list of ICClass, added cd=\" + cd); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"classDecl_list\",3, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // $START ::= program EOF \n {\n Object RESULT =null;\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right;\n\t\tProgram start_val = (Program)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n /* ACCEPT */\n CUP$Parser$parser.done_parsing();\n return CUP$Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // program ::= classDecl_list \n {\n Program RESULT =null;\n\t\tint cdlstleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).left;\n\t\tint cdlstright = ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()).right;\n\t\tList<ICClass> cdlst = (List<ICClass>)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;\n\t\t RESULT = new Program(cdlst); \n CUP$Parser$result = parser.getSymbolFactory().newSymbol(\"program\",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);\n }\n return CUP$Parser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number found in internal parse table\");\n\n }\n }", "public String getLeftOperand()\r\n {\r\n if (leftOperand == null)\r\n {\r\n return null;\r\n }\r\n if (leftOperand.contains(\"+1i\"))\r\n {\r\n return leftOperand.replace(\"+1i\", \"+i\");\r\n }\r\n else if (leftOperand.contains(\"-1i\"))\r\n {\r\n return leftOperand.replace(\"-1i\", \"-i\");\r\n }\r\n return leftOperand;\r\n }", "public final smaliTreeWalker.registers_directive_return registers_directive() throws RecognitionException {\n smaliTreeWalker.registers_directive_return retval = new smaliTreeWalker.registers_directive_return();\n retval.start = input.LT(1);\n\n short short_integral_literal83 = 0;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:519:3: ( ^( ( I_REGISTERS | I_LOCALS ) short_integral_literal ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:519:5: ^( ( I_REGISTERS | I_LOCALS ) short_integral_literal )\n {\n retval.registers = 0;\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:520:7: ( I_REGISTERS | I_LOCALS )\n int alt18 = 2;\n int LA18_0 = input.LA(1);\n if ((LA18_0 == I_REGISTERS)) {\n alt18 = 1;\n } else if ((LA18_0 == I_LOCALS)) {\n alt18 = 2;\n } else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 18, 0, input);\n throw nvae;\n }\n\n switch (alt18) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:520:9: I_REGISTERS\n {\n match(input, I_REGISTERS, FOLLOW_I_REGISTERS_in_registers_directive1236);\n retval.isLocalsDirective = false;\n }\n break;\n case 2:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:521:9: I_LOCALS\n {\n match(input, I_LOCALS, FOLLOW_I_LOCALS_in_registers_directive1248);\n retval.isLocalsDirective = true;\n }\n break;\n\n }\n\n match(input, Token.DOWN, null);\n pushFollow(FOLLOW_short_integral_literal_in_registers_directive1266);\n short_integral_literal83 = short_integral_literal();\n state._fsp--;\n\n retval.registers = short_integral_literal83;\n match(input, Token.UP, null);\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return retval;\n }", "protected ASTree make(Object arg) throws IllegalArgumentException {\n try {\n return make0(arg);\n } catch (IllegalArgumentException e1) {\n throw e1;\n } catch (Exception e2) {\n throw new RuntimeException(e2); // compiler is broken\n }\n }", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public void emitWithOperand(OpCode opcode, int operandAddress){\n\t\t\n\t}", "private void createLSExtReg(Code32 code, int opCode, int cond, int Vd, int Rn, int imm, boolean single) {\r\n\t\timm >>= 2;\t// immediates are multiples of 4\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | opCode | (Rn << 16) | (imm & 0xff) | ((imm>=0)?(1<<23):0);\r\n\t\tif (single) code.instructions[code.iCount] |= (((Vd>>1)&0xf) << 12) | ((Vd&1) << 22);\r\n\t\telse code.instructions[code.iCount] |= (1 << 8) | ((Vd&0xf) << 12) | ((Vd>>4) << 22);\r\n\t\tcode.incInstructionNum();\r\n\t}", "public void executeAnd(){\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString operand1 = mRegisters[mIR.substring(7, 3).getValue()];\n\t\tchar[] andSolution = new char[16];\n\t\tBitString operand2 = new BitString();\n\t\tif(mIR.substring(10, 1).getValue() == 1){ //immediate mode\n\t\t\toperand2 = mIR.substring(11, 5); //imma5\n\t\t\tif(operand2.getValue2sComp() < 0){\n\t\t\t\tBitString negativeExtend = new BitString();\n\t\t\t\tnegativeExtend.setBits(\"11111111111\".toCharArray());\n\t\t\t\tnegativeExtend.append(operand2);\n\t\t\t\toperand2 = negativeExtend;\n\t\t\t} else {\n\t\t\t\tBitString positiveExtended = new BitString();\n\t\t\t\tpositiveExtended.setBits(\"00000000000\".toCharArray());\n\t\t\t\toperand2 = positiveExtended.append(operand2);\n\t\t\t}\n\t\t} else { \t\t\t\t\t\t\t\t\t\t\t\t//register mode\n\t\t\toperand2 = mRegisters[mIR.substring(13, 3).getValue()];\n\t\t}\n\n\n\t\tfor (int i = 0; i < operand1.getLength(); i++) {\n\t\t\tif(operand1.substring(i, 1).getValue() + operand2.substring(i, 1).getValue() ==2){\n\t\t\t\tandSolution[i] = '1';\n\t\t\t} else {\n\t\t\t\tandSolution[i] = '0';\n\t\t\t}\n\t\t}\n\n\t\tmRegisters[destBS.getValue()].setBits(andSolution);\n\n\t\tsetConditionalCode(mRegisters[destBS.getValue()]);\n\t}", "Expression getValue();", "Expression getValue();", "void gen() {\n if (val != null) {\r\n\tX86.Operand r = val.gen_source_operand(true,X86.RAX); \r\n\tX86.emitMov(X86.Size.Q,r,X86.RAX);\r\n }\r\n // exit sequence\r\n // pop the frame\r\n if (frameSize != 0)\r\n\tX86.emit2(\"addq\",new X86.Imm(frameSize),X86.RSP);\r\n // restore any callee save registers\r\n for (int i = X86.calleeSaveRegs.length-1; i >= 0; i--) {\r\n\tX86.Reg r = X86.calleeSaveRegs[i]; \r\n\tif (env.containsValue(r))\r\n\t X86.emit1(\"popq\",r);\r\n }\r\n // and we're done\r\n X86.emit0(\"ret\");\r\n }", "public Local getRegisterLocal(int num) throws InvalidDalvikBytecodeException {\n int totalRegisters = registerLocals.length;\n if (num > totalRegisters) {\n throw new InvalidDalvikBytecodeException(\n \"Trying to access register \"\n + num\n + \" but only \"\n + totalRegisters\n + \" is/are available.\");\n }\n return registerLocals[num];\n }", "LogicExpression getRightExp();", "private Object eval(NotFact expr) {\n if (expr.getOpt() != null) {\n Object res = eval(expr.getExpr());\n if (res instanceof Boolean) {\n return !(Boolean) res;\n } else {\n throw new RaydenScriptException(\"Expression error: NotFact result is no boolean\");\n }\n } else {\n return eval(expr.getExpr());\n }\n }", "Expression simplifyForSideEffect();", "protected abstract O getResult();", "public Type getType(ConstantPoolGen cp) {\n/* 79 */ return new ReturnaddressType(physicalSuccessor());\n/* */ }", "protected SyntaxNode simplify(SyntaxNode operand) {\n return snFactory_.makeSyntaxNode(operand);\n }", "public int evaluateAsInt();", "public Object visitShiftExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if (op.equals(\"<<\")) {\n result = (Long) a << (Long) b;\n }\n else if (op.equals(\">>\")) {\n result = (Long) a >> (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public static Temp evalExpression(CommonTree tree){\n\t\t// leaf node, int/float/id\n\n\t\tif (tree.getChildCount() == 0){\n\t\t\tTemp temp = new Temp(temperaryNum++,tree.getType(),tree.getText());\n\t\t\tif (tree.getType() == LittleParser.INTLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREI\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse if(tree.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREF\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse{ // look up the variable in the symbol table to set type, use var_name instead of $Tx and recycle $Tx\n\t\t\t\ttemp.setType(allTables.lookupType(temp.getValue().trim()));\n\t\t\t\ttemp.setName(tree.getText());\n\t\t\t\ttemperaryNum--;\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\t\t// Not a leaf node, evaluate children expressions\n\t\telse{\n\t\t\t// test for function call\n\t\t\tif (tree.getType() == LittleParser.FUNC_CALL){\n\t\t\t\t// add IR for evaluating the function and return temperary for return value\n\t\t\t\t// after it has been popped off the stack\n\t\t\t\treturn evalFunction(tree);\n\t\t\t}\n\t\t\t//\t\t\tif (tree.getChild(0).getChildCount() == 0 && tree.getChild(1).getChildCount() == 0){\n\t\t\t//\t\t\t\tif ()\n\t\t\t//\t\t\t}\n\t\t\tTemp left = evalExpression((CommonTree) tree.getChild(0));\n\t\t\tTemp right = evalExpression((CommonTree) tree.getChild(1));\n\n\t\t\tTemp temp = new Temp(temperaryNum++,left.getType(), \"EXP\");\n\t\t\tif (tree.getText().contains(\"+\")){ // add\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t} //both parameters\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"-\")){ // subtract\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"*\")){ // multiply\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{ // divide\n\t\t\t\tif (right.getType() == LittleParser.INTLITERAL && left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (right.getType() == LittleParser.FLOATLITERAL || left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\n\t}", "public Item evaluateItem(XPathContext context) throws XPathException {\n Item item = operand.evaluateItem(context);\n if (item==null) return null;\n return ((AtomicValue)item).convert(requiredPrimitiveType, context);\n }" ]
[ "0.6458342", "0.5486528", "0.5364428", "0.5298549", "0.5198395", "0.46770617", "0.46025613", "0.45617107", "0.45590287", "0.45272675", "0.45166832", "0.4515093", "0.44842777", "0.4464076", "0.44612208", "0.44550478", "0.44288984", "0.44018754", "0.4376961", "0.43300682", "0.42706153", "0.4250768", "0.42335325", "0.42001396", "0.41964248", "0.41929823", "0.4174917", "0.41531214", "0.41489455", "0.4147035", "0.4145028", "0.41395286", "0.41240746", "0.4123012", "0.41217268", "0.41141906", "0.4095851", "0.40956524", "0.40917408", "0.40905705", "0.40897915", "0.40813783", "0.40625057", "0.40543014", "0.40421528", "0.40386", "0.4032277", "0.40220279", "0.40117365", "0.40048376", "0.40009996", "0.3996473", "0.39961097", "0.39926717", "0.39818144", "0.3979186", "0.39765906", "0.39726052", "0.39604706", "0.39437816", "0.39422292", "0.39422292", "0.39359492", "0.39318982", "0.39302942", "0.39183003", "0.3902007", "0.39003047", "0.3898995", "0.38964686", "0.38952374", "0.38840577", "0.388099", "0.3880048", "0.38782513", "0.38776705", "0.3872102", "0.38711694", "0.3867508", "0.38660142", "0.38657433", "0.3863114", "0.38498086", "0.38344562", "0.38310137", "0.38275987", "0.38246554", "0.38246554", "0.38229328", "0.38193884", "0.38101318", "0.38076758", "0.38022172", "0.38015085", "0.38000005", "0.3798076", "0.37966248", "0.37961745", "0.37948275", "0.3789362" ]
0.853805
0
Generate a destination operand of the specified size. Returns null if dest wasn't given a location or if we are outside its live range; either way, it is dead at this point.
X86.Reg gen_dest_operand();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int size_dest() {\n return (8 / 8);\n }", "public static int offset_dest() {\n return (0 / 8);\n }", "public int getDest(){\r\n\t\treturn this.dest;\r\n\t}", "public Position destination(Position ep) throws InvalidPositionException;", "BinaryImmToReg(@NotNull String name, @NotNull Immediate source, @NotNull X64Register destination,\n @NotNull X64InstructionSize size) {\n\n\t\tsuper('\\t' + name + size + \" \" + source + \", \" + destination.assemblyRep(size));\n }", "public Square destination() {\n return destination;\n }", "public static void copy(final long originAddress, final long destinationAddress, final long size) {\n\t\tUnsafe.get().copyMemory(originAddress, destinationAddress, size);\n\t}", "public static int sizeBits_dest() {\n return 8;\n }", "public static int genIndex(int size, String dst) {\n\t\t// System.out.println(\"DST\" + dst);\n\t\tint index = 0;\n\t\tlong ipDecimalDst = ipToLong(dst);\n\t\tlong hashedDecimal = MurmurHash.hashLong(ipDecimalDst);\n\t\tindex = (int) Math.abs((hashedDecimal % size));\n\t\treturn index;\n\t\t// TODO Auto-generated method stub\n\n\t}", "public int getNextDest() {\n\t\treturn nextDestination;\n\t}", "static public NewMovement create(PosRotScale originLoc,Vector3 destination_loc, int duration) {\n\t\tPosRotScale destinationState = originLoc.copy(); //make a new PosRotScale from the original location\n\t\t\n\t\t//but we change its position\n\t\tdestinationState.setToPosition(destination_loc);\n\n\t\tGdx.app.log(logstag, \"_______________requested pos :\"+destination_loc);\n\t\t\n\t\t\t\t\n\t\tNewMovement newmovement= new NewMovement(destinationState,duration);\n\t\tnewmovement.currenttype = MovementTypes.Absolute;\n\n\t\tGdx.app.log(logstag, \"_______________destination pos after creation:\"+newmovement.destination.position);\n\t\t\t\n\t\treturn newmovement;\n\t}", "public int drainStack(int store, int load, StackSize size) {\n if (current.isEmpty()) {\n return 0;\n }\n int difference = current.get(current.size() - 1).getSize() - size.getSize();\n if (current.size() == 1 && difference == 0) {\n return 0;\n } else {\n super.visitVarInsn(store, freeIndex);\n if (difference == 1) {\n super.visitInsn(Opcodes.POP);\n } else if (difference != 0) {\n throw new IllegalStateException(\"Unexpected remainder on the operand stack: \" + difference);\n }\n doDrain(current.subList(0, current.size() - 1));\n super.visitVarInsn(load, freeIndex);\n return freeIndex + size.getSize();\n }\n }", "X86.Operand gen_source_operand(boolean imm_ok, X86.Reg temp);", "public static int offsetBits_dest() {\n return 0;\n }", "public Element getNextDestination(Element destination, Element location)\n\t{\n\t\tif (destination.equals(location)) // Als dit waar is, zijn we klaar.\n\t\t\treturn location;\n\n\t\tSignpost sp_loc = this.getPointingSignpost(location);\n\t\tSignpost sp_goal = this.getPointingSignpost(destination);\n\n\t\t// Controle: Kan ik vanaf dit punt wel naar het doel toe?\n\t\tif (this.isSignpostPointingTo(sp_loc, destination))\n\t\t{\n\t\t\t// STAP 1: Ben ik al bij een signpost?\n\t\t\tif (location instanceof Signpost)\n\t\t\t{\n\t\t\t\t// STAP 1 == JA: ga verder >>\n\n\t\t\t\t// STAP 2: Is de signpost die naar het doel wijst, gelijk aan de\n\t\t\t\t// signpost die naar mijn location wijst?\n\t\t\t\tif (sp_loc.equals(sp_goal))\n\t\t\t\t{\n\t\t\t\t\t// STAP 2 == JA: Dan gaan we rechtstreeks naar het doel!\n\t\t\t\t\treturn destination;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// STAP 2 == NEE: Dan gaan we een Signpost dichter naar het\n\t\t\t\t\t// doel.\n\t\t\t\t\treturn this.getCloserSignPost(sp_loc, destination);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// STAP 1 == NEE: Ga hier eerst naar toe.\n\t\t\t\treturn sp_loc;\n\t\t\t}\n\t\t}\n\t\treturn sp_goal;\n\t}", "String getDest();", "com.google.protobuf.ByteString getDestRangeBytes();", "public int getProcessedDataLength() { return destPos; }", "private static void put(ByteString source, int offset, int size, ByteBuffer dest) {\n ByteString croppedSource = source.substring(offset, offset + size);\n for (ByteBuffer sourcePiece : croppedSource.asReadOnlyByteBufferList()) {\n dest.put(sourcePiece);\n }\n }", "private T generateShifted(Vector2 origin, int quantity) {\n Vector2 direction = new Vector2(random(), random());\n float r = getSize(quantity);\n return generate(origin, direction, quantity, r);\n }", "@Override\r\n\tpublic MemoryConstant toConstant() {\r\n\t\treturn new LocationConstant(getTarget(), getBitSize(),\r\n\t\t\t\tgetAddressStridePolicy());\r\n\t}", "protected void moveToDestination(){\n\t\tqueue.clear();\n\t\twhile (destination[0] < 0){\n\t\t\tqueue.add(\"MOVE S\");\n\t\t\tdestination[0] += 1;\n\t\t}\n\t\twhile (destination[0] > 0){\n\t\t\tqueue.add(\"MOVE N\");\n\t\t\tdestination[0] -= 1;\n\t\t}\n\t\twhile (destination[1] < 0){\n\t\t\tqueue.add(\"MOVE E\");\n\t\t\tdestination[1] += 1;\n\t\t}\n\t\twhile (destination[1] > 0){\n\t\t\tqueue.add(\"MOVE W\");\n\t\t\tdestination[1] -= 1;\n\t\t}\n\t\tdestination = null;\n\t}", "public Integer getDestination() {\n\t\treturn new Integer(destination);\n\t}", "public int getSizedOperandType(String operand, int unsizedType, int size) {\n\t\tif (Op.matches(unsizedType, Op.MEM)) {\n\t\t\treturn Op.getDefinition(Op.MEM, size);\n\t\t}\n\t\tif (Op.matches(unsizedType, Op.FLOAT)) {\n\t\t\ttry {\n\t\t\t\tif (size == 4) {\n\t\t\t\t\tFloat.valueOf(operand);\n\t\t\t\t} else if ((size == 8) || (size == -1)) {\n\t\t\t\t\tDouble.valueOf(operand);\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\treturn Op.ERROR;\n\t\t\t}\n\t\t\treturn Op.FLOAT;\n\t\t}\n\t\treturn unsizedType;\n\t}", "public short get_dest() {\n return (short)getUIntElement(offsetBits_dest(), 8);\n }", "public char next_Hop(char dest) {\n if (main_rtab == null) {\n return ' ';\n }\n return main_rtab.nextHop(dest);\n }", "T getDestination(T nodeOrigin, F flow);", "public String dest(String s) {\n\t\tif(s.equals(\"M\")) {\n\t\t\treturn \"001\";\n\t\t} else if(s.equals(\"D\")) {\n\t\t\treturn \"010\";\n\t\t} else if(s.equals(\"MD\")) {\n\t\t\treturn \"011\";\n\t\t} else if(s.equals(\"A\")) {\n\t\t\treturn \"100\";\n\t\t} else if(s.equals(\"AM\")) {\n\t\t\treturn \"101\";\n\t\t} else if(s.equals(\"AD\")) {\n\t\t\treturn \"110\";\n\t\t} else if(s.equals(\"AMD\")) {\n\t\t\treturn \"111\";\n\t\t} else {\n\t\t\treturn \"000\";\n\t\t}\n\t}", "com.google.protobuf.ByteString\n getRouteDestBytes();", "int getDestination();", "public void destMethod(){\n\t}", "io.opencannabis.schema.commerce.OrderDelivery.DeliveryDestination getDestination();", "public Size(Size toDuplicate)\r\n {\r\n assert(true);\r\n \tamount = toDuplicate.amount;\r\n type = toDuplicate.type;\r\n }", "void copy(int offset, int size);", "public TPDestination pushToStack(Location loc) {\r\n plugin.debug(\"Location: \" + loc.getWorld().getName() + \"{x=\" + (int) loc.getX() + \",y=\" + (int) loc.getY() + \",z=\" + (int) loc.getZ() + \"}\");\r\n TPDestination dest = new TPDestination(plugin, loc);\r\n if (stack.size() > 0 && stack.get(0) != null && stack.get(0).equals(dest)) {\r\n return dest;\r\n }\r\n stack.add(0, dest);\r\n if (stack.size() > 5) {\r\n stack = stack.subList(0, 4);\r\n }\r\n return dest;\r\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp\", line = 6969,\n FQN=\"(anonymous namespace)::SparcV9ABIInfo::CoerceBuilder::pad\", NM=\"_ZN12_GLOBAL__N_114SparcV9ABIInfo13CoerceBuilder3padEy\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp -nm=_ZN12_GLOBAL__N_114SparcV9ABIInfo13CoerceBuilder3padEy\")\n //</editor-fold>\n public void pad(long/*uint64_t*/ ToSize) {\n assert ($greatereq_ulong(ToSize, Size)) : \"Cannot remove elements\";\n if (ToSize == Size) {\n return;\n }\n \n // Finish the current 64-bit word.\n long/*uint64_t*/ Aligned = llvm.alignTo(Size, $int2ulong(64));\n if ($greater_ulong(Aligned, Size) && $lesseq_ulong(Aligned, ToSize)) {\n Elems.push_back(IntegerType.get(Context, $ullong2uint(Aligned - Size)));\n Size = Aligned;\n }\n \n // Add whole 64-bit words.\n while ($lesseq_ullong_ulong(Size + $int2ullong(64), ToSize)) {\n Elems.push_back(Type.getInt64Ty(Context));\n Size += $int2ullong(64);\n }\n \n // Final in-word padding.\n if ($less_ulong(Size, ToSize)) {\n Elems.push_back(IntegerType.get(Context, $ullong2uint(ToSize - Size)));\n Size = ToSize;\n }\n }", "private Point getMoveDestination(Building b)\n\t{\n\t\tObjectType buildType = b.getObjectType();\n\t\tPoint workPoint = b.getPosition();\n\t\tfor (int i = workPoint.getX(); i < workPoint.getX()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType) - 1; i++)\n\t\t{\n\t\t\tPoint p1 = new Point(i, workPoint.getY() - 1);\n\t\t\tif (p1.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p1.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p1.getY()])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(i, workPoint.getY()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType));\n\t\t\tif ((p2.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length)\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p2.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p2.getY()])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\tfor (int j = workPoint.getY(); j < workPoint.getY()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType); j++)\n\t\t{\n\t\t\tPoint p1 = new Point(workPoint.getX() - 1, j);\n\t\t\tif (p1.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p1.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p1.getX()][j])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(workPoint.getX()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType), j);\n\t\t\tif (p2.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p2.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p2.getX()][j])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\treturn null;\n\t}", "public Object getDestination() { return this.d; }", "private void memorization(Direction d){\n\t\tcurrent.setExit(d);\n\t\tvisited.add(current);\n\t\tswitch(d){\n\t\tcase NORTH:\n\t\t\tcurrent = new Square(current.x,current.y+1);\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tcurrent = new Square(current.x,current.y-1);\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tcurrent = new Square(current.x-1,current.y);\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tcurrent = new Square(current.x+1,current.y);\n\t\t}\n\t}", "java.lang.String getDestRange();", "private Integer newDestination(Move m, int v, Graph g, Board B) {\n\n int final_dest_R = 0, final_dest_C = 0;\n\n int temp_id = 0;\n\n final_dest_R = (m.getY() + (v / B.width));\n final_dest_C = (m.getX() + (v % B.width));\n\n if (final_dest_R < B.height && final_dest_R >= 0\n && final_dest_C < B.width && final_dest_C >= 0) {\n\n\n temp_id = B.a.get(final_dest_R).get(final_dest_C).id;\n\n }\n\n return temp_id;\n }", "Operand createOperand();", "public GrowSheetCommand(final String direction, final int size) {\n this.direction = direction;\n this.size = size;\n }", "private long getRandomDestination() {\n long randomId;\n do {\n randomId = nextLong(aggregateVertices);\n } while (!destVertices.add(randomId));\n return randomId;\n }", "public Builder setRouteDestBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n routeDest_ = value;\n onChanged();\n return this;\n }", "static protected void copyMemory(int source[],int soffset,int dest[],int doffset,int size)\n\t{\n\t\tSystem.arraycopy(source,soffset,dest,doffset,size);\n\t}", "public Location getDestination()\r\n\t{ return this.destination; }", "void setDestBitDepth(Integer myDestBitDepth);", "public Sommet destination() {\n return destination;\n }", "private Solution getNeighbourSolution(int size) {\n Solution solution = new Solution(currentSol);\n // Choose a random item to take/leave\n int index = generator.nextInt(size);\n solution.set(index, Math.abs(currentSol.get(index) - 1));\n\n return solution;\n }", "public void bouger(int origine, int destination) {\n\t\t\n\t}", "Destination getDestination();", "public Builder setRouteDest(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n routeDest_ = value;\n onChanged();\n return this;\n }", "public Move calculateMove(Location location) {\r\n\t\tDirection newDirection;\r\n\r\n\t\tArrayList<Location> neighbors = location.getNeighbors(location, map, 2);\r\n\t\t// remove neighbors that are mine or neutral\r\n\t\tneighbors = location.getEnemies(location, map, myID);\r\n\r\n\t\tif (location.getSite().strength == 0) {\r\n\t\t\tLocation.planMove(location, Direction.STILL);\r\n\t\t\treturn new Move(location, Direction.STILL);\r\n\t\t}\r\n\t\tif ((location.getSite().strength < 5 || location.getSite().strength < 4 * location.getSite().production)\r\n\t\t\t\t&& location.getSite().isAllowed(location.getSite().production)) {\r\n\t\t\tLocation.planMove(location, Direction.STILL);\r\n\t\t\treturn new Move(location, Direction.STILL);\r\n\t\t}\r\n\r\n\t\tif(neighbors.size() == 0) {\r\n\r\n\t\t\tif (isSafe(location)) {\r\n\t\t\t\tnewDirection = getClosestBoundary(location);\r\n\t\t\t\tLocation.planMove(location, newDirection);\r\n\t\t\t\treturn new Move(location, newDirection);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tnewDirection = getBestNeighbor(location);\r\n\t\t\tif (newDirection != Direction.STILL) {\r\n\t\t\t\tLocation.planMove(location, newDirection);\r\n\t\t\t\treturn new Move(location, newDirection);\r\n\t\t\t}\r\n\t\t\tnewDirection = chooseBestDirection(location);\r\n\t\t\tLocation.planMove(location, newDirection);\r\n\t\t\treturn new Move(location, newDirection);\r\n\t\t}\r\n\t\tnewDirection = getClosestEnemy(location);\r\n\t\tLocation.planMove(location, newDirection);\r\n\t\treturn new Move(location, newDirection);\r\n\t}", "public com.google.protobuf.ByteString\n getRouteDestBytes() {\n Object ref = routeDest_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n routeDest_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "int move(int pileSize) ;", "@Override\n\tpublic String getDest() {\n\t\treturn dest;\n\t}", "public static Direction offsetTarget(MapLocation target) throws GameActionException {\n\t\tfloat offsetDistMax = 2.5f;\n\t\tMapLocation newTarget = null;\n\t\tint c = 0;\n\t\twhile (newTarget == null) {\n\t\t\tc++;\n\t\t\ttry{\n\t\t\t\tDirection dir = myLoc.directionTo(target);\n\t\t\t\t\n\t\t\t\tif (c > 5) {\n\t\t\t\t\tdir = myLoc.directionTo(target);\n\t\t\t\t\tnewTarget = target;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (Math.random() > 0.5) dir = dir.rotateLeftDegrees(90);\n\t\t\t\telse dir = dir.rotateRightDegrees(90);\n\t\t\t\t\n\t\t\t\tfloat offsetDist = (float) (Math.random()*offsetDistMax);\n\n\t\t\t\tnewTarget = target.add(dir, offsetDist);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tdebug_print(\"blah: \" + e.getMessage());\n\t\t\t\te.getMessage();\n\t\t\t}\n\n\t\t}\n\t\tdebug_dot(newTarget, 225, 100, 0);\n\t\treturn myLoc.directionTo(newTarget);\n\t}", "public String dest() {\n\t\tif ((new File(destination)).exists()) {\n\t\t\tString destinationS = \"C:\\\\Users\\\\Sanja\\\\workspace\\\\hw6\\\\src\\\\com\\\\sourceit\\\\radchenko\\\\hw6\\\\\";\n\t\t\tint destinationF = 0;\n\t\t\tdo {\n\t\t\t\tdestinationF++;\n\t\t\t\tdestination1 = destinationS + destinationF + \".txt\";\n\t\t\t} while ((new File(destination)).exists() == (new File(destination1))\n\t\t\t\t\t.exists());\n\t\t\treturn destination1;\n\t\t} else {\n\t\t\tdestination1 = destination;\n\t\t}\n\t\treturn destination1;\n\t}", "public Size plus(Size other) {\n if (isZero()) {\n return other;\n } else if (other.isZero()) {\n return this;\n } else {\n return new Size(mJavaSize + other.mJavaSize,\n mRegisteredNativeSize + other.mRegisteredNativeSize);\n }\n }", "public com.google.protobuf.ByteString\n getRouteDestBytes() {\n Object ref = routeDest_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n routeDest_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Optional<Boolean> isDestinationPositionAfter();", "OpFunctionArgOperand createOpFunctionArgOperand();", "@Override\r\n\tpublic String toShortString() {\r\n\t\treturn \"->F: \" + destination;\r\n\t}", "private int valueOfMove(Field origin, Field destination) {\n return distance(origin, destinationField) - distance(destination, destinationField);\n }", "public com.google.protobuf.ByteString\n getDestinationBytes() {\n java.lang.Object ref = destination_;\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 destination_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public PathDestination a(double var0, double var2, double var4) {\n/* 47 */ return new PathDestination(a(MathHelper.floor(var0), MathHelper.floor(var2 + 0.5D), MathHelper.floor(var4)));\n/* */ }", "void makeMove(Location loc);", "public com.google.protobuf.ByteString\n getDestinationBytes() {\n java.lang.Object ref = destination_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n destination_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public NewMovement(PosRotScale destination,float durationMSEachMove, float durationTotalMS){\n\t\t\n\t\tthis.durationTotalMS=durationTotalMS;\n\t\tthis.destination=destination;\n\t\tthis.durationMSEachMove=durationMSEachMove;\n\t\t\t\t\n\t\tLog.info(\"destination.position set to: \"+destination.position); //Z not updating??!?\n\t\t\n\t}", "public String copy(SQLGenerator dstGen, String srcConstraint,\n boolean includeDstGenFields) throws SQLException{\n \n if (dstGen==null) return null;\n srcConstraint = srcConstraint==null ? \"\" : \" where \" + srcConstraint;\n \n String q = \"select * from \" + dstGen.getTableName() + srcConstraint;\n \n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(q);\n ResultSetMetaData rsmd = rs.getMetaData();\n int colCount = rsmd.getColumnCount();\n \n while (rs.next()){\n SQLGenerator gen = (SQLGenerator)dstGen.clone();\n for (int i=1; i<=colCount; i++){\n String colName = rsmd.getColumnName(i);\n String colValue = rs.getString(i);\n if ((dstGen.getFieldValue(colName))==null){\n if (colValue!=null)\n gen.setField(colName, colValue);\n }\n else if (!includeDstGenFields){\n if(dstGen.getFieldValue(colName).equals(\"\"))\n gen.removeField(colName);\n }\n }\n \n log(gen.insertStatement());\n stmt.executeUpdate(gen.insertStatement());\n }\n \n if (includeDstGenFields)\n return null;\n else\n return searchEngine.getLastInsertID();\n }", "public Location getDestination() {\r\n return destination;\r\n }", "private static Tile findBorderLocation(Entity mover, Entity destination) {\r\n\t\tint size = destination.getSize();\r\n\t\tTile centerDest = destination.getCurrentTile().copyNew(size >> 1, size >> 1, 0);\r\n\t\tTile center = mover.getCurrentTile().copyNew(mover.getSize() >> 1, mover.getSize() >> 1, 0);\r\n\t\tDirection direction = Direction.getLogicalDirection(centerDest, center);\r\n\t\tTile delta = Tile.getDelta(destination.getCurrentTile(), mover.getCurrentTile());\r\n\t\tmain: for (int i = 0; i < 4; i++) {\r\n\t\t\tint amount = 0;\r\n\t\t\tswitch (direction) {\r\n\t\t\tcase NORTH:\r\n\t\t\t\tamount = size - delta.getY();\r\n\t\t\t\tbreak;\r\n\t\t\tcase EAST:\r\n\t\t\t\tamount = size - delta.getX();\r\n\t\t\t\tbreak;\r\n\t\t\tcase SOUTH:\r\n\t\t\t\tamount = mover.getSize() + delta.getY();\r\n\t\t\t\tbreak;\r\n\t\t\tcase WEST:\r\n\t\t\t\tamount = mover.getSize() + delta.getX();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tfor (int j = 0; j < amount; j++) {\r\n\t\t\t\tfor (int s = 0; s < mover.getSize(); s++) {\r\n\t\t\t\t\tswitch (direction) {\r\n\t\t\t\t\tcase NORTH:\r\n\t\t\t\t\t\tif (!direction.canMove(mover.getCurrentTile().copyNew(s, j + mover.getSize(), 0))) {\r\n\t\t\t\t\t\t\tdirection = Direction.get((direction.toInteger() + 1) & 3);\r\n\t\t\t\t\t\t\tcontinue main;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase EAST:\r\n\t\t\t\t\t\tif (!direction.canMove(mover.getCurrentTile().copyNew(j + mover.getSize(), s, 0))) {\r\n\t\t\t\t\t\t\tdirection = Direction.get((direction.toInteger() + 1) & 3);\r\n\t\t\t\t\t\t\tcontinue main;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase SOUTH:\r\n\t\t\t\t\t\tif (!direction.canMove(mover.getCurrentTile().copyNew(s, -(j + 1), 0))) {\r\n\t\t\t\t\t\t\tdirection = Direction.get((direction.toInteger() + 1) & 3);\r\n\t\t\t\t\t\t\tcontinue main;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase WEST:\r\n\t\t\t\t\t\tif (!direction.canMove(mover.getCurrentTile().copyNew(-(j + 1), s, 0))) {\r\n\t\t\t\t\t\t\tdirection = Direction.get((direction.toInteger() + 1) & 3);\r\n\t\t\t\t\t\t\tcontinue main;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tTile location = mover.getCurrentTile().copyNew(direction, amount);\r\n\t\t\treturn location;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Edge applyInvoke(Quad q, Edge clrPE, Loc loc, jq_Method tgtM) {\n\t\tif (clrPE.dstNode == null)\n\t\t\treturn null;\n\t\t\n\t\t// Replace the actual parameters with formal parameters\n\t\tArraySet<AccessPath> clrMS = AliasUtilities.handleParametersTD(\n\t\t\t\tclrPE.dstNode.ms, q, tgtM);\n\t\tAbstractState tranDstNode = new AbstractState(clrPE.dstNode.ts, clrMS,\n\t\t\t\tclrPE.dstNode.canReturn, clrPE.dstNode.may);\n\t\tEdge exitEdge = apply(new Edge(clrPE.srcNode, tranDstNode, clrPE.type,\n\t\t\t\tclrPE.h), loc);\n\n\t\tif (exitEdge == null)\n\t\t\treturn null;\n//\t\tRegister tgtRetReg = (Invoke.getDest(q) != null) ? Invoke.getDest(q)\n//\t\t\t\t.getRegister() : null;\n\t\tArraySet<AccessPath> newMS = exitEdge.dstNode.ms;\n\t\tnewMS = AliasUtilities.killLocalRegisterTD(newMS, tgtM);\n\t\t Register tgtRetReg = (Invoke.getDest(q) != null) ? Invoke.getDest(q)\n\t\t .getRegister() : null;\n\t\t if (tgtRetReg != null) {\n\t\t\t newMS = AliasUtilities.killRegisterTD(newMS, tgtRetReg);\n\t\t\t ArraySet<AccessPath> newMS1 = new ArraySet<AccessPath>();\n\t\t\t for (AccessPath ap : newMS) {\n\t\t\t\t if (ap instanceof RegisterAccessPath) {\n\t\t\t\t\t RegisterAccessPath rap = (RegisterAccessPath) ap;\n\t\t\t\t\t if (rap.isRet) {\n\t\t\t\t\t\t newMS1.add(new RegisterAccessPath(tgtRetReg, rap.fields));\n\t\t\t\t\t } else\n\t\t\t\t\t\t newMS1.add(ap);\n\t\t\t\t } else\n\t\t\t\t\t newMS1.add(ap);\n\t\t\t }\n\t\t\t newMS = newMS1;\n\t\t }\n\t\t newMS = AliasUtilities.killRetRegisterTD(newMS);\n//\t\tif (this.ret != null && tgtRetReg != null)\n//\t\t\tnewMS = AliasUtilities.handleMoveTD(newMS, ret, tgtRetReg);\n\t\tAbstractState newDstNode = new AbstractState(exitEdge.dstNode.ts,\n\t\t\t\tnewMS, exitEdge.dstNode.canReturn, exitEdge.dstNode.may);\n//\t\tSystem.out.println(\"Incoming edges: \"+clrPE);\n//\t\tSystem.out.println(\"Current BU: \"+this);\n//\t\tSystem.out.println(\"Output state: \"+newDstNode);\n\t\treturn new Edge(clrPE.srcNode, newDstNode, clrPE.type, clrPE.h);\n\t}", "@Override\n public Location getDestination() {\n return _destinationLocation != null ? _destinationLocation : getOrigin();\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 int getDestination() {\n\t\treturn finalDestination;\n\t}", "public static int getNextSize(int targetSize) {\n\t\t/* This over-allocates proportional to the list size, making room\n\t\t * for additional growth. The over-allocation is mild, but is\n\t\t * enough to give linear-time amortized behavior over a long\n\t\t * sequence of appends() in the presence of a poorly-performing\n\t\t * system realloc().\n\t\t * The growth pattern is: 0, 4, 8, 16, 25, 35, 46, 58, 72, 88, ...\n\t\t */\n\t\treturn (targetSize >> 3) + (targetSize < 9 ? 3 : 6) + targetSize;\n\t}", "public void generation(String srcWord, int length)\n\t{\n\t\tgenerated.add(srcWord);\n\t\tSystem.out.println(srcWord);\n\t\t//processQueue(srcWord);\n\t\tcheckOneLetterOff(srcWord);\n\t\t\n\t\tif(length != 0)\n\t\t{\n\t\t\tif(tmp4.size() > location)\n\t\t\t{\n\t\t\t\tif(!(tmp4.get(location).isEmpty()) && location <tmp4.size()-1)\n\t\t\t\t{\n\t\t\t\t\tlocation++;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Can generate: \" + generated.size() + \" Links\");\n\t\t\t\tSystem.out.println(generated);\n\t\t\t\tuserInter.optionSelect();\n\t\t\t}\n\t\t\tString tempWrd = tmp4.get(location);\n\t\t\tlength--;\n\t\t\ttmp4.clear();\n\t\t//\tSystem.out.println(tempWrd);\n\t\t\t\n\t\t\tgeneration(tempWrd, length);\n\t\t}\n\t\t\t\n\t\tSystem.out.println(\"Can generate: \" + generated.size() + \" Links\");\n\t\tSystem.out.println(generated);\n\t\tuserInter.optionSelect();\n\t}", "public V getDestination() {\r\n\r\n\t\tV result = null;\r\n\t\tif ((counter <= links.size()) && (counter > 0)) {\r\n\t\t\tresult = succNodes.get(counter - 1);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public void setDestination(int destination) {\r\n\t\tthis.destination = destination;\r\n\t}", "private int relayPayloadDestination(OverlayNodeSendsData event) {\n\t\tint destination = event.getDestID();\n\t\tif (nodesToSendTo.getConnections().containsKey(destination))\n\t\t\treturn destination;\n\t\telse { // determine which routing entry to send it to\n\t\t\tint bestHopLen = 128;\n\t\t\tint bestHop = 0;\n\t\t\tboolean increasedHopDist = false;\n\t\t\tboolean finalFlag = false;\n\t\t\tif (event.getDestID() < myAssignedID)\n\t\t\t\tdestination += 128; // previously 127\n\t\t\tfor (Map.Entry<Integer, TCPConnection> entry : nodesToSendTo.getConnections()\n\t\t\t\t\t.entrySet()) {\n\t\t\t\tint possibleHop = entry.getKey();\n\t\t\t\tif (possibleHop < myAssignedID) {\n\t\t\t\t\tpossibleHop += 128;\n\t\t\t\t\tincreasedHopDist = true;\n\t\t\t\t} else {\n\t\t\t\t\tincreasedHopDist = false;\n\t\t\t\t}\n\t\t\t\tif (possibleHop < destination\n\t\t\t\t\t\t&& ((destination - possibleHop) < bestHopLen)) {\n\t\t\t\t\tbestHopLen = destination - possibleHop;\n\t\t\t\t\tbestHop = possibleHop;\n\t\t\t\t\tfinalFlag = increasedHopDist;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (finalFlag)\n\t\t\t\tbestHop -= 128;\n\t\t\treturn bestHop;\n\t\t}\n\t}", "private JCStatement makeInvalidateSize() {\n // Initialize the singleton synthetic item vars (during IS_VALID phase)\n // Bound sequences don't have a value\n ListBuffer<JCStatement> stmts = ListBuffer.lb();\n for (int i = 0; i < length; ++i) {\n if (!isSequence(i)) {\n stmts.append(SetStmt(vsym(i), CallGetter(i)));\n }\n }\n JCStatement varInits = Block(stmts);\n \n return\n Block(\n If(IsTriggerPhase(),\n setSequenceValid(),\n varInits\n ),\n SetStmt(sizeSymbol, cummulativeSize(length)),\n CallSeqInvalidate(Int(0), Int(0), Get(sizeSymbol))\n );\n }", "public void setDest(Point dest){\n System.out.println(\"hit\");\n this.dest = dest;\n }", "@Override\n Figure move(Cell dest) {\n return new Bishop(dest, this.strategy);\n }", "public int getDestination() {\r\n\t\treturn destination;\r\n\t}", "public double shortestPathDist(int src, int dest);", "PrioritizedMove getBestMoveFor(int player, int desiredLength);", "public Coordinate getDestination() {\n return cDestination;\n }", "public Location getDestination(){\n\t\treturn destination;\n\t}", "@Override\n public String getDestination() {\n return this.dest;\n }", "public Ship(int size, boolean direction){\n this.size = size;\n this.location = null;\n this.orientation = direction;\n }", "public Builder clearRouteDest() {\n bitField0_ = (bitField0_ & ~0x00000100);\n routeDest_ = getDefaultInstance().getRouteDest();\n onChanged();\n return this;\n }", "boolean hasDestRange();", "@Override\n public byte[] request(int destination, byte type, int startAddress, int size) {\n if (!Packet.isRequest(type)) {\n throw new RuntimeException(\"(bugcheck): \" + Integer.toHexString(type) + \n \" is not a request\");\n }\n Packet response = doTrip(destination, type, startAddress, size, null, 0, 0);\n if (response == null) return null;\n if (!Packet.isTransfer(response.getType())) {\n logger.error(\"no transfer type received on request\");\n return null;\n }\n AddressContents contents = new AddressContents(response.getContents());\n return contents.getData();\n }", "@Override\r\n\tpublic LogicalValue copy() {\r\n\t\treturn new Pointer(target);\r\n\t}", "String getRouteDest();", "public io.opencannabis.schema.commerce.OrderDelivery.DeliveryDestination.Builder getDestinationBuilder() {\n \n onChanged();\n return getDestinationFieldBuilder().getBuilder();\n }", "private static char[] growBuffer(char[] dest, int index, int size) {\n char[] copy = new char[size];\n if (index > 0) {\n System.arraycopy(dest, 0, copy, 0, index);\n }\n return copy;\n }", "private Destination createDestination(String originCode, TopRoute route) {\n\t\tString countryCode = cityService.getCountry(originCode);\n\t\tFlight flight = flightService.cheapestFlightReader(countryCode, route.getFrom(), route.getTo());\n\t\tDestination destination = new Destination(route.getTo(), flight);\n\t\treturn destination;\n\t}" ]
[ "0.54353434", "0.51006687", "0.4992364", "0.49162215", "0.49016792", "0.48346388", "0.4722427", "0.45809317", "0.45566976", "0.45564497", "0.45291433", "0.45119563", "0.45109665", "0.44848374", "0.4469435", "0.4434819", "0.44312507", "0.4429744", "0.44187355", "0.44077823", "0.43945578", "0.4383839", "0.43738216", "0.4353481", "0.43439823", "0.43244478", "0.43225867", "0.4306929", "0.43005082", "0.42781493", "0.42714635", "0.42695764", "0.4266126", "0.42432752", "0.42382026", "0.4231442", "0.42181772", "0.42126116", "0.4194504", "0.41924742", "0.41916874", "0.4187385", "0.41740462", "0.4172284", "0.41676107", "0.41631827", "0.41528553", "0.41474098", "0.41402394", "0.41372824", "0.4100276", "0.40886128", "0.40845713", "0.40582275", "0.40448388", "0.40391353", "0.40372264", "0.40326294", "0.40312436", "0.40284684", "0.40253466", "0.402316", "0.4018677", "0.40163258", "0.40161702", "0.4013204", "0.40087023", "0.40043393", "0.39873722", "0.39870185", "0.39849135", "0.3983364", "0.3979529", "0.3978407", "0.39783075", "0.39767593", "0.3968095", "0.39606315", "0.39574447", "0.3957314", "0.3957254", "0.39536023", "0.39431074", "0.39425597", "0.39324912", "0.39309186", "0.39239493", "0.39149815", "0.39109004", "0.3910132", "0.3909169", "0.39082786", "0.3906893", "0.39044625", "0.39042133", "0.39040264", "0.39010057", "0.38911152", "0.38911107", "0.38892534" ]
0.56911904
0
should be environment dependent
public void gen_const() { X86.emit1(".quad", new X86.GLabel(toString())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "File prepareEnvironment();", "private void randomizeEnvironment() {\n }", "protected void setupLocal() {}", "@Override\n public void execute(IEnvironment env)\n {\n \n }", "public interface RealEnvironment extends Environment {\n\n}", "Environment createEnvironment();", "Environment createEnvironment();", "@Before\n public void setupEnvironment() {\n TestEnvironment testEnvironment;\n switch (mode) {\n case CLUSTER:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEnvironment = MINI_CLUSTER_RESOURCE.getTestEnvironment();\n testEnvironment.getConfig().disableObjectReuse();\n testEnvironment.setAsContext();\n break;\n case CLUSTER_OBJECT_REUSE:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEnvironment = MINI_CLUSTER_RESOURCE.getTestEnvironment();\n testEnvironment.getConfig().enableObjectReuse();\n testEnvironment.setAsContext();\n break;\n case COLLECTION:\n new CollectionTestEnvironment().setAsContext();\n break;\n }\n }", "String getEnvironment();", "public interface EnvironmentAware extends Aware{\n void setEnvironment(Environment ev);\n}", "@Override\n public Environment getEnvironment(XYCoord coord)\n {\n return master.getEnvironment(coord);\n }", "public envio() {\r\n }", "EnvironmentmmFactory getEnvironmentmmFactory();", "@Override\n\tpublic Environment<String, V> getEnvironment() {\n\t\treturn null;\n\t}", "public interface EnvironmentProvider {\n\n /**\n * Query if user provided input stream (e.g. stdin) has queued input.\n *\n * @return True if input has queued input.\n * @throws JVMIOException Thrown in case of IO errors.\n */\n public abstract boolean inReady() throws JVMIOException;\n\n /**\n * Read a single line without termination character(s) from user provided\n * input stream (e.g. stdin).\n *\n * @return Contents of the line read.\n * @throws JVMIOException Thrown in case of IO errors.\n */\n public abstract String inReadLine() throws JVMIOException;\n\n /**\n * Write to standard output.\n *\n * @param msg Message to write.\n */\n public abstract void outWrite(final String msg);\n\n /**\n * Write to standard error.\n *\n * @param msg Message to write.\n */\n public abstract void errWrite(final String msg);\n\n /**\n * Display a message to the user, before querying for input.\n *\n * @param msg Message to display.\n */\n public abstract void promptForInput(final String msg);\n\n /**\n * Display a question to the user, before forcing to select one of the\n * provided answers.\n *\n * @param question Question to display.\n * @param answers Non-empty list of questions to select from.\n * @return Answer selected by the user.\n * @throws JVMIOException Thrown in case of IO errors.\n */\n public abstract String promptSelectionFromAnswers(final String question, final List<String> answers) throws JVMIOException;\n\n /**\n * Get the tabulator character to use.\n *\n * @return Tabulator character.\n */\n public abstract String getTab();\n\n /**\n * Get system dependent newline character sequence.\n *\n * @return Newline character sequence.\n */\n public abstract String getEndl();\n\n /**\n * Get identifier for the operating system that setlX runs on.\n *\n * @return Identifier for the operating system executing setlX.\n */\n public abstract String getOsID();\n\n /**\n * Allows modification of filename/path when reading files from within setlX.\n *\n * @param fileName Filename as passed to setlX via input/source code.\n * @return Filename to use when opening for read/write.\n */\n public abstract String filterFileName(final String fileName);\n\n /**\n * Allows modification of library-path when loading libraries from within setlX.\n *\n * @param name Filename as expected by setlX.\n * @return Filename to use when opening for read/write.\n */\n public abstract String filterLibraryName(final String name);\n\n /**\n * Get the stack size in kb to request from the VM for each new thread.\n *\n * @return Stack size in kb to request from the VM.\n */\n public abstract int getStackSizeWishInKb();\n\n /**\n * Get the stack size in kb to request from the VM for each new 'medium' thread.\n *\n * @return Stack size in kb to request from the VM.\n */\n public abstract int getMediumStackSizeWishInKb();\n\n /**\n * Get the stack size in kb to request from the VM for each new 'small' thread.\n *\n * @return Stack size in kb to request from the VM.\n */\n public abstract int getSmallStackSizeWishInKb();\n}", "@Override\n public void init(ProcessingEnvironment env) {\n // Not working at the moment.\n // myEnv = env;\n filer = env.getFiler();\n }", "@PostConstruct\n\tpublic void init() {\n\t\tEnvironmentUtils.setEnvironment(env);\n\t}", "boolean check (Env env) {\n return true;\n }", "@BeforeTest\r\n\tpublic void setupenvi() throws IOException {\r\n\t\tsetup();\r\n\t\tinit();\r\n\t}", "private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }", "public Factory(BaseProcessingEnvImpl env) {\n _env = env;\n }", "private void setupEnvironment() {\n // Create mocks for configurations\n bgpConfig = createMock(BgpConfig.class);\n participantsConfig = createMock(SdxParticipantsConfig.class);\n\n // Create mocks for services\n coreService = new TestCoreService();\n configService = new TestNetworkConfigService();\n registry = new NetworkConfigRegistryAdapter();\n interfaceService = createMock(InterfaceService.class);\n interfaceService.addListener(anyObject(InterfaceListener.class));\n expectLastCall().anyTimes();\n intentSynchronizer = createMock(IntentSynchronizationService.class);\n }", "EnvironmentLoader getEnvironmentLoader();", "private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }", "@Override\n\tpublic ServerServices upstreamGlobalVarsInit() throws Exception {\n\t\treturn null;\n\t}", "public void create(Environment environment);", "@SuppressWarnings(\"unused\")\n private void unused_getEnvSupplier() {\n new Supplier<Map<String,String>>() {\n @Override\n public Map<String, String> get() {\n Map<String,String> result = MutableMap.of();\n for (Supplier<Map<String, String>> envS: dynamicEnvironmentSupplier) {\n if (envS!=null) {\n Map<String, String> envM = envS.get();\n if (envM!=null) {\n mergeEnvMaps(envM, result);\n }\n }\n }\n return result;\n }\n private void mergeEnvMaps(Map<String,String> supplied, Map<String,String> target) {\n if (supplied==null) return;\n // as the value is a string there is no need to look at deep merge behaviour\n target.putAll(supplied);\n }\n };\n }", "private void getEnvironment(Environment env, FileProcess file) {\n\t\tint t = 0;\n\t\tboolean setReg = false, setFlag = false, setMem = false;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn;\n\t\t\t} else if (temp.contains(\"Register\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\n\t\t\t\t\tenv.getRegister().setRegisterValue(r[0], new LongValue(Long.parseLong(r[1], 16)));\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tsetReg = true;\n\t\t\t} else if (temp.contains(\"Flag\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\n\t\t\t\t\tif (r[1].toLowerCase().contains(\"true\")) {\n\t\t\t\t\t\tenv.getFlag().setFlagValue(r[0], new BooleanValue(true));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tenv.getFlag().setFlagValue(r[0], new BooleanValue(false));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetFlag = true;\n\t\t\t} else if (temp.contains(\"Memory\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\t\t\t\t\tString addr = r[0].replace(\"0x\", \"\");\n\t\t\t\t\tlong x = Long.parseLong(addr, 16);\n\t\t\t\t\tbyte y = (byte) Long.parseLong(reduce(r[1], 8), 16);\n\t\t\t\t\tenv.getMemory().setByteMemoryValue(x, new LongValue(y));\n\t\t\t\t}\n\t\t\t\tsetMem = true;\n\t\t\t} \n\t\t\tt++;\n\t\t\t\n\t\t\tif (setReg && setFlag && setMem) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public Verif() {\n\t\tenv = new Environ();\n\t}", "public abstract Map<String, String> getEnvironment(NIOWorker nw);", "abstract boolean check(Env env);", "Properties getEnvironment();", "Properties getEnvironment();", "protected void setup() {\r\n }", "public Map<String, String> getEnvironment();", "boolean k2h_load_debug_env();", "@Override\n\tpublic void init(SynapseEnvironment arg0) {\n\t}", "boolean initializeOrbEnvirement(String args[]){\n\t\t// create and initialize the ORB\n\t\tORB orb = ORB.init(args, null);\n\n\t\ttry {\n\t\t\t// get the root naming context\n\t\t\torg.omg.CORBA.Object objRef;\n\t\t\tobjRef = orb.resolve_initial_references(\"NameService\");\n\t\t\t// Use NamingContextExt instead of NamingContext. This is part of the Interoperable naming Service. \n\t\t\tnamingContextRef = NamingContextExtHelper.narrow(objRef);\n\t\t\treturn true;\n\t\t} catch (InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to resolve NameService!\");\n\t\t\t//e.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public void intServerEnv() {\n\t\tServerUtils serverUtils = new ServerUtils();\n\t\tTouchstoneParsers parsers = new TouchstoneParsers();\n\n\t\tString CONFIGFILE = psoResourcePkg + \"/configs/server.properties\";\n\t\tString testConfigFile = ServerUtils.class.getResource(CONFIGFILE).getFile();\n\n\t\tHashMap<String, HashMap<String, String>> configPropsMap = parsers.readPropsFile(new File(testConfigFile));\n\t\thostIP = (configPropsMap.get(\"URL_PARAMS\").get(\"LOCAL_ENV\").equalsIgnoreCase(\"yes\") ? \"localhost\" : serverUtils.getHostIp());\n\n\t\t// JDBC driver name and database URL\n\t\tJDBC_DRIVER=\"com.mysql.jdbc.Driver\";\n\t\tDB_URL=\"jdbc:mysql://\" + hostIP + \"/psotest\";\n\n\t\t// Database credentials\n\t\tUSERID = configPropsMap.get(\"SERVER_ENV\").get(\"USERID\");\n\t\tPASSWORD = configPropsMap.get(\"SERVER_ENV\").get(\"PASSWORD\");\n\n\t\t// Database tables:\n\t\tCLICKS_TABLE = configPropsMap.get(\"SERVER_ENV\").get(\"CLICKS_TABLE\");\n\t\tBEACON_TABLE = configPropsMap.get(\"SERVER_ENV\").get(\"BEACON_TABLE\");\n\n\t}", "@Before\n\tpublic void setup() {\n\t\tinit(rule.getProcessEngine());\n\t}", "@Override\n public Environment getEnvironment(int w, int h)\n {\n return master.getEnvironment(w, h);\n }", "public interface EnvironmentRunner {\n void run(Environment environment, Config config);\n}", "public void setup() {\r\n\r\n\t}", "public Environment environment()\n {\n return theEnv;\n }", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "public void createEnvironment() {\n //create a list of collidable objects and a list of sprite objects\n List<Collidable> collidables = new ArrayList<Collidable>();\n List<Sprite> spriteList = new ArrayList<Sprite>();\n //update the game's environment to be the collidables list.\n this.environment = new GameEnvironment(collidables);\n //update the game's sprites collection to be the list of sprites.\n this.sprites = new SpriteCollection(spriteList);\n }", "protected abstract void setup();", "abstract void setup();", "@Before\r\n\tpublic void setup() {\r\n\t}", "private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }", "public interface IRemoteEnvProxyManager extends IRemoteProxyManager {\n \t/**\n \t * Method to get system's environment variables.\n \t *\n\t * @param Project\n\t * IProject\n \t * @return Mapping of environment variables\n \t * @since 2.1\n\t*/\t\n \tpublic Map<String, String> getEnv(IProject project) throws CoreException;\n /**\n * Method to get system's environment variables.\n * \n * @param Resource URI\n * URI\n * @return Mapping of environment variables\n * @since 2.1\n */\n \tpublic Map<String, String> getEnv(URI uri) throws CoreException;\n }", "public static TrackableEnvironment createEnvironment() {\n return null;\n }", "public void setup() {\n }", "private void initSharedPre() {\n\t}", "protected HashSet<String> getEnvironmentDependentSystems() {\r\n\t\tif (environmentDependentSystems==null) {\r\n\t\t\tenvironmentDependentSystems = new HashSet<String>();\r\n\t\t}\r\n\t\treturn environmentDependentSystems;\r\n\t}", "@Override\n public void postEnvCall() {\n shutdown(this.getEnvironment());\n }", "@BeforeClass(alwaysRun = true)\n\t@Parameters(\"Environment\")\n\tpublic void startEnvironment(String sEnv) {\n\t\ttry {\n\t\t\tcs = null;\n\t\t\tal = new AppLib(cs);\n\t\t\tal.setEnvironmentInfo(sEnv);\n\t\t\tproxy = al.getHttpProxy();\n\t\t\tapi = new API();\n\t\t\tapi.setProxy(proxy);\n\t\t\tmydb = al.getMongoDbConnection();\n\t\t\tma = new MemberAPIs();\n\t\t\tmember = new TC01_FindMemberFromDB();\n\t\t\t} catch (Exception e) {\n\t\t\t\tfail(e.toString());\n\t\t\t\t}\n\t}", "private void setupEnvironment(Execute exe) {\r\n String[] environment = env.getVariables();\r\n if (environment != null) {\r\n for (int i = 0; i < environment.length; i++) {\r\n log(\"Setting environment variable: \" + environment[i], Project.MSG_VERBOSE);\r\n }\r\n }\r\n exe.setNewenvironment(newEnvironment);\r\n exe.setEnvironment(environment);\r\n }", "void setEnvironment(Environment environment) {\n this.environment = environment;\n }", "public Continuous2D getEnvironment() {\n return environment;\n }", "private void loadEnvironment () {\r\n Factory forceFactory = new ForceFactory(mySimulation);\r\n int response = INPUT_CHOOSER.showDialog(null, \"Environment file\");\r\n if (response == JFileChooser.APPROVE_OPTION) {\r\n forceFactory.loadFile(INPUT_CHOOSER.getSelectedFile());\r\n }\r\n }", "@Before\n public void setup() {\n }", "private void initialDeploy() {\n }", "Environment getEnvironment() {\n return recordingEnv;\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Override\n\tpublic Environment getEnvironment() {\n\t\tif (environment == null) {\n\t\t\tenvironment = new StandardEnvironment();\n\t\t}\n\t\treturn environment;\n\t}", "public interface Environment {\n\tpublic Object resolveVariable(String name);\n\tpublic List<String> getRegisteredVariableNames();\n}", "public Script() {\n\n fs = System.getProperty(\"file.separator\");\n ps = System.getProperty(\"path.separator\");\n\n try {\n env = new Environment();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void setup() throws Exception {\n\t}", "public synchronized Map<String, String> getEnvironment() throws Fault {\n if (env == null) {\n // reconstitute environment\n // this may result in a Fault, which is okay\n reload();\n }\n return PropertyArray.getProperties(env);\n }", "public Environment getEnvironment() {\n \n \t\treturn this.environment;\n \t}", "public abstract void setupSeamEnvironment();", "public Environment getEnvironment()\n\t{\n\t\treturn environment;\n\t}", "public interface IALEVOSEnvironment extends IEnvironment{\n \n public AnnotatedTransitionSystem getATS();\n \n\n}", "abstract void apply(Env e);", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@BeforeClass(alwaysRun = true)\n public void setEnvironment() throws Exception {\n \n esbRequestHeadersMap = new HashMap<String, String>();\n \n apiRequestHeadersMap = new HashMap<String, String>();\n \n init(\"agilezen-connector-1.0.2-SNAPSHOT\");\n \n esbRequestHeadersMap.put(\"Accept\", \"application/json\");\n esbRequestHeadersMap.put(\"Content-Type\", \"application/json\");\n \n apiRequestHeadersMap.putAll(esbRequestHeadersMap);\n \n apiRequestHeadersMap.put(\"X-Zen-ApiKey\", connectorProperties.getProperty(\"apiKey\"));\n apiRequestUrl = connectorProperties.getProperty(\"apiUrl\") + \"/api/v1\";\n \n }", "private Platform() {\n\t\t\n\t}", "public String getEnvironment() {\n return environment;\n }", "public void environmentStart(EnvironmentClassLoader loader)\n {\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected final SituatedEnvironment<?,?,?,?,IT> getEnvironment() {\n\t\tEnvironment env = Kernel.getSingleton().getEnvironment();\n\t\tif (env instanceof SituatedEnvironment) {\n\t\t\treturn (SituatedEnvironment<?,?,?,?,IT>)env;\n\t\t}\n\t\treturn null;\n\t}", "public static void initPackage() {\n\t\t(new Branch()).getCache();\n\t\t(new Change()).getCache();\n\t\t(new Client()).getCache();\n\t\t(new DirEntry()).getCache();\n\t\t(new FileEntry()).getCache();\n\t\t(new Job()).getCache();\n\t\t(new Label()).getCache();\n\t\t(new User()).getCache();\n\t\tProperties props = System.getProperties();\n\t}", "@BeforeTest\n public void setupEnv() {\n CLUSTER.start();\n endpoints = CLUSTER.getClientEndpoints();\n Client client = Client.builder()\n .endpoints(endpoints)\n .build();\n\n this.authDisabledKVClient = client.getKVClient();\n this.authDisabledAuthClient = client.getAuthClient();\n }", "protected void setEnvironment(Map<String, String> env) {\n\t\tthis.environment = env;\n\t}", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "public static void setup() {\n/* 78 */ s_envCurrentJRE = getProperty(\"jnlpx.jpda.env\");\n/* 79 */ o_envCurrentJRE = decodeJpdaEnv(s_envCurrentJRE);\n/* */ \n/* */ \n/* */ \n/* 83 */ if (getProperty(\"jpda.notification\") != null) {\n/* 84 */ showJpdaNotificationWindow(o_envCurrentJRE);\n/* 85 */ Main.systemExit(0);\n/* */ } \n/* */ }", "protected void onFirstUse() {}", "@Override\n protected void setup() {\n }", "@Override\n protected void startUp() {\n }", "static void setupDefaultEnvironment() throws IOException {\n String rioHomeDirectory = getRioHomeDirectory();\n File logDir = new File(rioHomeDirectory+\"logs\");\n checkAccess(logDir, false);\n }", "@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "@Override\n\tpublic String getEnvironmentVars() {\n\t\treturn model.getEnvironmentVars();\n\t}", "void setup() throws Exception;" ]
[ "0.67165613", "0.66387624", "0.66168565", "0.65408725", "0.64615846", "0.6357986", "0.6357986", "0.61085767", "0.6044606", "0.60092735", "0.5990866", "0.59803325", "0.59125346", "0.58969235", "0.58911145", "0.5889441", "0.5862482", "0.58401626", "0.582415", "0.5779928", "0.57372403", "0.5727291", "0.57114744", "0.5706479", "0.5696619", "0.56962556", "0.56879693", "0.56822324", "0.56775135", "0.56762516", "0.5668396", "0.5642785", "0.5642785", "0.56283575", "0.56186", "0.56100076", "0.5603698", "0.5603497", "0.5580465", "0.5579838", "0.55776936", "0.5569104", "0.5553889", "0.5537952", "0.55310863", "0.55282295", "0.55236757", "0.55220854", "0.5513587", "0.5510153", "0.5501308", "0.54793483", "0.5473265", "0.5472929", "0.5451498", "0.5444317", "0.5443633", "0.5441535", "0.5434119", "0.5426472", "0.54144", "0.54120314", "0.5405528", "0.5404204", "0.5403601", "0.5403601", "0.5403601", "0.5395493", "0.5389512", "0.53842056", "0.5384191", "0.5384109", "0.5383657", "0.5378528", "0.5372097", "0.5371056", "0.5362097", "0.5352502", "0.5352502", "0.5352502", "0.5352502", "0.5352502", "0.53523326", "0.53490627", "0.5345432", "0.53414124", "0.53365797", "0.5334549", "0.5321169", "0.53190655", "0.5316603", "0.53098446", "0.5306703", "0.53029025", "0.53021675", "0.52990645", "0.52948195", "0.52948195", "0.5286543", "0.5283408", "0.52823824" ]
0.0
-1
Defines the weapon object to associate with the ship
public ESWeapon addESGun() { return new ESUFOGun(); // Specific to regular UFO }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }", "public void setWeapon(int weapon)\n\t{\n\t\tthis.weapon = weapon;\n\t}", "public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }", "public Weapon ()\r\n\t{\r\n\t\t//no default values for Weapon attributes are set here as the specific weapon type unspecified at super level\r\n\t}", "public void setEquippedWeapon(String w)\n\t{\n\t\tstrEquippedWeapon = w;\n\t\t\n\t}", "public ShotgunWeapon() {\n description = \" Weapon: Shotgun has\";\n }", "public void addWeapon(Weapon x){\n\t\tplayerWeapon=new Weapon(x);\n\t\tHealth+=x.gethealthStat();\n\t\tAttackForce+=x.getafStat();\n\t\tDefense+=x.getdefenseStat();\n\t}", "private void createWeapons()\n {\n woodSword = new Weapon(\"wood sword\", \" | does 12 damage\", 10, true); \n rustedSword = new Weapon(\"rusted sword\", \" | does 17 damage\", 15, true);\n silverSword = new Weapon(\"silver sword\", \" | does 32 damage\", 30, true);\n goldSword = new Weapon(\"gold sword\", \" | does 22 damage\", 20, true);\n titaniumSword = new Weapon(\"titanium sword\", \" | does 52 damage\", 50, true);\n silverSpear = new Weapon(\"silver spear\", \" | does 25 damage\", 23, true);\n infantryBow = new Weapon(\"infantry bow\", \" | does 30 damage\", 28, true);\n }", "public PickupWeaponBase(Vec2 position, WeaponBase weaponBarrel) {\n super(position, Vec2.ZERO, new Sprite(\"items/weaponBody\"));\n setSize(new Vec2(0.7, 0.7));\n setRenderLayer(RenderLayer.RenderLayerName.HIGH_BLOCKS);\n\n this.cli = weaponBarrel;\n\n collider = new CircleCollider(this, 30);\n collider.setTag(\"Item\");\n collider.addInteractionLayer(\"Walk\");\n\n }", "public Weapon (Player player) {\n\t\tthis.player = player;\n\t}", "public Weapon()\n {\n name = \"None\";\n speed = 2;\n damage = 1;\n range = 1;\n }", "@Override\n public void equip(@NotNull IWeapon weapon) {\n weapon.equipToMage(this);\n }", "public Weapon(Weapon weapon) \n\t{\n\t\tsuper(weapon.getName());\n\t\tweaponDamage = weapon.getWeaponDamage();\n\t}", "private void setWeapons()\n {\n sewers.setWeapon(woodSword);\n promenade.setWeapon(woodSword);\n depths.setWeapon(rustedSword);\n forest.setWeapon(goldSword);\n bridge.setWeapon(silverSpear);\n ramparts.setWeapon(infantryBow);\n }", "public Weapon() {\n this(Weapon.defaultName, 0, new Level(0), 0, 0);\n }", "public void weaponAbility() {\n \tlogger.info(\"weapon abilities aren't implemented yet. Using slash ability\");\n \t//ability(map.getCurrentTurnHero().getWeaponAbility());\n \tability(new Slash());\n }", "public void add(Weapon weapon) {\n\t\tweaponList.add(weapon);\n\t}", "public void equipSelectedWeapon() {\n }", "@Override\n public Type getItemType() {\n return Type.WEAPON;\n }", "public Weapon getWeapon(){\n return this.weaponPos;\n }", "public String getWeapon() {\n return weapon1;\n }", "static void weapon(char item)\r\n {\r\n \tString pClass = MainApp.playerClass;\r\n \tif(MainApp.alreadyEquipped == false)\r\n\t\t{\r\n\t\t\tif(pClass == \"Warrior\")\r\n\t\t\t{\r\n\t \t\tif(item == '0')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Warrior Equipped!\");\r\n\t \t\t}\r\n\t \t\t//System.out.print(\"Post Equip Warrior\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Archer\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '&')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Archer Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Archer\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Rogue\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '!')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Rogue Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Rogue\");\r\n\t\t\t}\r\n\t }\r\n }", "public void setCurrentWeapon(Pair<Byte,Short> weapon){\n currentWeapon = weapon;\n }", "AbstractWeapon createWeaponController(WeaponCard weaponCard);", "public void addSpawnpointWeapon(Weapon w) {\n this.weaponSpawnpoint.addWeapon(w);\n }", "public Weapon getWeapon() {\n\t\treturn weapon;\n\t}", "public sword ( )\r\n\t{\r\n\t\t// TODO Auto-generated constructor stub\r\n\t\tsuper();\r\n\t\tthis.setDamageBuff (3);\r\n\t\tthis.setDurability (15);\r\n\t\tthis.setWeaponName (\"Sword\");\r\n\t}", "public static Weapon spawnWeapon()\r\n\t{\r\n\t\tfinal int numberOfWeapons = 5; //update as weapons are added\r\n\t\t\r\n\t\t//Create weapons in order to access attributes / randomly select a weapon\r\n\t\tSword sword = new Sword();\r\n\t\tStick stick = new Stick();\r\n\t\tBazooka bazooka = new Bazooka();\r\n\t\tAtomicBomb atomicBomb = new AtomicBomb();\r\n\t\tPotatoCannon potatoCannon = new PotatoCannon();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tWeapon[] weapons = new Weapon[] {sword, stick,bazooka,atomicBomb,potatoCannon}; //store weapons in an array to randomly grab one to use in Game\r\n\t\t\r\n\t\tint randomWeapon; //weapon chosen\t\t\r\n\t\tRandom rng = new Random (); //create generator based upon current number of weapons\r\n\t\trandomWeapon = rng.nextInt(numberOfWeapons); //get a weapon object at random from array\r\n\r\n\t\treturn (weapons[randomWeapon]); //we have no need to create separate instance\r\n\t}", "public ItemWeapon(float x, float y, int width, int height) { \r\n\t\tsuper(x, y, width, height);\r\n\t}", "public void add(Weapon weapon) {\n\t\tif (weaponList.size() < 2) {\n\t\t\tweaponList.add(weapon);\n\t\t}\n\t}", "private Weapon() {\n\t\t\tname = \"\";\n\t\t\tdamage = 0;\n\t\t\tcrippleDamage = 0;\n\t\t\tflavors = new HashMap<>();\n\t\t}", "private void getWeaponItem(double x, double y, String option,\r\n\t\t\tBufferedImage itemimage, SpriteGroup items) {\r\n\t\tint weaponoption = Resources.getInt(option);\r\n\t\tItem newGun = new WeaponItem(player, new Sprite(itemimage),\r\n\t\t\t\tweaponoption, x, y);\r\n\t\titems.add(newGun);\r\n\t\tnewGun.setActive(true);\r\n\t}", "public WeaponTest() {\r\n\r\n }", "@POST(\"/UpdateWeapon\")\n\tWeapon updateWeapon(@Body Weapon weapon,@Body int id) throws GameNotFoundException;", "public void toSelectingWeapon() {\n }", "public void equipWeaponToCharacter (IPlayerCharacter character) {\n if (lenInventory > 1){\n character.equip(this.weaponsInventory.get(this.pointInventory));\n }\n }", "public interface Iship {\t\n\t\n//gunpoints, places where the cannons stick out of a model, cannot have more than 2?\t\n\tpublic static final int[] PLAYER_GUNPOINTS = {3,60};\n\tpublic static final int[] GUNSHIP_GUNPOINTS = {8, 40};\n\tpublic static final int[] SIDEWAYS_GUNPOINTS = {12, 36};\n\tpublic static final int[] ADVANCED_GUNPOINTS = {0};\n\tpublic static final int[] MOTHERSHIP_GUNPOINTS = {36, 190, 56, 168, 84, 140};\n\tpublic static final int[] SUIBOSS_GUNPOINTS = {10, 200, 145, 60};\n\t\n//bullet destruction vals\npublic static final int PLAYER_BULLET_VAL = 50;\n\n//ship score vals\npublic static final int SUICIDE_SCORE_VAL = 15;\npublic static final int SHOOTER_SCORE_VAL = 25;\npublic static final int SIDEWAYS_SCORE_VAL = 50;\n\n//health values:\npublic static final int PLAYER_MAX_HEALTH = 100;\n\n//standard collision health value\npublic static final int COLLISION_DAMAGE = 10;\npublic static final int BULLET_DAMAGE = 15;\n\n//enemy type ids \npublic static final int SUICIDE_ID = 0;\npublic static final int GUNSHIP_ID = 1;\n\n//enemy health\npublic static final int REGULAR_ENEM_HEALTH = 1;\npublic static final int ELEVATED_ENEM_HEALTH = 2;\n\n//speeds \npublic static final float SHIP_SPEED_NORMAL = 0.2f;\n\n//methods\n\t\n\tpublic int[] getGunpoints(); //returns gun-barrel pixels\n\tpublic int getHealth(); //gets health\n\tpublic void setHealth(int newHealth); //sets the health\n}", "public Weapon(DropType dropType) {\n\t\tthis(WeaponType.getRandom().toString());\n\t\t// TODO Auto-generated constructor stub\n\t}", "public void addWeapon(Weapon weapon) {\n setAttack(getAttack() + weapon.getDamage());\n setWeaponSlots(getWeaponSlots() - 1);\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "public interface Weapon {\n\n /**\n * method which is used when one war participant attacks other\n *\n * @param target target war participant\n * @param attacker attacker war participant\n */\n void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);\n\n}", "public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }", "public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }", "public void addWeapon(CardWeapon cw)\n {\n this.weapons.add(cw);\n }", "@Test\r\n public void test_weapon() {\r\n Weapon weapon1 = new Weapon(\"gun\", \"that a weapon for sure\", 7);\r\n assertEquals(\"gun\", weapon1.getInformation().getName());\r\n assertEquals(\"that a weapon for sure\", weapon1.getInformation().getDescription());\r\n assertEquals(7, weapon1.getDamage());\r\n }", "public IntrinsicWeapon getIntrinsicWeapon() {\r\n\t\treturn new IntrinsicWeapon(10, \"bombard\");\r\n\t}", "public void giveWeapon(Weapon weapon) throws RuntimeException {\n if (weaponList.size() > 2)\n throw new RuntimeException(\"This player can't receive any more weapons\");\n weaponList.add(weapon);\n }", "public Weapon(String name, int weaponDamage) \n\t{\n\t\tsuper(name);\n\t\tif(weaponDamage > 0) \n\t\t{\n\t\t\tthis.weaponDamage = weaponDamage;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tthis.weaponDamage = 1;\n\t\t}\n\t}", "public EnemyShipBody(World world, Ship obj) {\n super(world, obj);\n\n float density = 0.1f, friction = 0.2f, restitution = 0.5f;\n int width = 200, height = 166;\n\n // Body\n createFixture(body, new float[]{\n 74,24, 96,8, 106,8, 125,24, 120,79, 100,86, 80,79\n }, width, height, density, friction, restitution, ENEMY_SHIP_BODY, (short) (USER_SHIP_BODY| USER_BULLET_BODY));\n\n // Right Wing\n createFixture(body, new float[]{\n 126,29, 152,37, 158,32, 176,63, 163,157, 147,150, 143,75, 118,78\n }, width, height, density, friction, restitution, ENEMY_SHIP_BODY, (short) (USER_SHIP_BODY| USER_BULLET_BODY));\n\n // Left Wing\n createFixture(body, new float[]{\n 74,29, 48,37, 41,32, 24,63, 37,157, 53,150, 57,75, 83, 78\n }, width, height, density, friction, restitution, ENEMY_SHIP_BODY, (short) (USER_SHIP_BODY| USER_BULLET_BODY));\n\n\n }", "public void assignEnergyToShip(Ship ship, AbstractObject source) {\n\t\tenergyToShip.put(source.getId(), ship);\n\t}", "@POST(\"/AddWeapon\")\n\tint addWeapon(@Body Weapon weapon,@Body int id) throws GameNotFoundException;", "public String getWeaponName()\r\n\t{\r\n\t\treturn this.weaponName;\r\n\t}", "public interface Blacksmith {\n Weapon manufactureWeapon(WeaponType weaponType);\n}", "public Weapon(String name, String description,\n URL link,\n int cost, boolean exclusive,\n int mt, int rng, WeaponClass type, WeaponRefine refine) {\n super(name, description,\n link, new Color(0xDE1336), 'W',\n cost, exclusive, rng);\n this.mt = mt;\n this.type = type;\n int[] statModifiers = StatModifier.parseStatModifiers(description);\n statModifiers[1]+= mt;\n this.statModifiers = statModifiers;\n this.refine = refine;\n }", "public String randWeapon() {\n\n\t\t// Generates a random number.\n\t\tRandom rand = new Random();\n\n\t\t// A random number between 0 and 2 is generated, and the value at that index in\n\t\t// the Choice array is then saved to the variable compChoice\n\t\tString compChoice = weapArray[rand.nextInt(3)];\n\n\t\t// Makes the users weapon equal to whichever weapon they inputed\n\t\tswitch (compChoice) {\n\n\t\tcase \"Rock\":\n\t\t\tweapon = new Rock();\n\t\t\tbreak;\n\t\tcase \"Paper\":\n\t\t\tweapon = new Paper();\n\t\t\tbreak;\n\t\tcase \"Scissors\":\n\t\t\tweapon = new Scissors();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn compChoice;\n\t}", "protected void addAllowedWeapon(Material weapon) {\r\n\t\tthis.allowedWeapons.add(weapon);\r\n\t}", "public void setBase(Ship base) {\n this.base = base;\n }", "public void setShip (Ship s){\n \tthis.ship=s;\n }", "public void shootIntoCargoShip(){\n shoot.set(SHIP_SHOOT);\n }", "public Weapon (String name) {\n\t\tsuper(name, weight, itemDamage, 0, 0, quantity);\n\t}", "public Ships(ShipTypes type) {\n this.type = type;\n }", "public void addWeapon(Pair<Byte,Short> weapon){\n //Total number of weapons player can carry is 5 (inc. default weapon)\n //If player has <3 weapons, simply add weapon.\n //Otherwise, first remove oldest weapon in inventory then add at that\n //position.\n //oldest weapon tracked by linked list of weapon entries.\n if(this.weapons.size() < 3) {\n this.weapons.add(weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n }else{\n //Checks for duplicates, if duplicate weapons\n //found, new weapons ammo is just added to the current\n //weapon already in inventory\n for(Pair<Byte,Short> w : this.weapons){\n if(Objects.equals(w.getKey(), weapon.getKey())){\n if(weaponEntryTracker.size() == 1){\n weaponEntryTracker = new LinkedList<>();\n }\n else{\n for(int tracker : weaponEntryTracker){\n if(tracker == this.weapons.indexOf(w)){\n weaponEntryTracker.remove((Integer) tracker);\n }\n }\n }\n Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue()));\n if(this.currentWeapon == w){\n this.setCurrentWeapon(newWeapon);\n }\n this.weapons.set(this.weapons.indexOf(w),newWeapon);\n weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon));\n return;\n }\n }\n //check for any no weapon entries - indicates\n //player dropped weapon.\n for(Pair<Byte,Short> w : this.weapons){\n if(w.getKey() == NO_WEAPON_ID){\n this.weapons.set(this.weapons.indexOf(w),weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n return;\n }\n }\n //If no null entries are found, remove oldest weapon\n int oldestWeapon = this.weaponEntryTracker.poll();\n byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey();\n this.weapons.set(oldestWeapon, weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n if(oldestWeaponKey == currentWeapon.getKey()){\n setCurrentWeapon(weapon);\n }\n\n }\n }", "private static Weapon randomWeapon() {\r\n Random rand = new Random();\r\n int weaponType = rand.nextInt(7);\r\n switch (weaponType) {\r\n case 0: \r\n return new FryingPan();\r\n case 1:\r\n return new SubmachineGun();\r\n case 2:\r\n return new AssaultRifle();\r\n case 3:\r\n return new Pistol();\r\n case 4:\r\n return new Axe();\r\n case 5:\r\n return new Crowbar();\r\n default:\r\n return new Shotgun();\r\n }\r\n }", "public void pickUp(Item item) {\n this.curItem = item;\n this.curItem.setNonDamagablePlayer(this);\n if (item instanceof PickupableWeaponHolder) {\n this.weapon = ((PickupableWeaponHolder)(item)).getWeapon();\n }\n }", "public void add(Weapon weapon){\n\t\tsetCount(getCount() + weapon.getCount());\n\t\tweapon.expire();\n\t}", "public interface WeaponBehavior {\n\n int useWeapon(int strong);\n\n int getDamageValue(int strong);\n}", "public Weapon(String name, List<String> warnings, FireMode fireMode, ConnectionStatus connectionStatus, String ip, String mac) {\n super(name);\n this.warnings = warnings;\n this.fireMode = fireMode;\n this.connectionStatus = connectionStatus;\n this.setIp(ip);\n this.setMac(mac);\n }", "public PowerUp(Sprite sprite, int x, int y) {\n super(x, y);\n newSprite(sprite);\n setNewDimensions();\n name = sprite.name();\n }", "public void equip(Hero h) {\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.getName().equals(this.getName())) {\n\t\t\t\tw.setEquipped(true);\n\t\t\t\tw.statsIncrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t} else {\n\t\t\t\tw.unequip(h);\n\t\t\t}\n\t\t}\n\t}", "public WeaponType getEquippedWeaponType() {\n return WeaponType.NULL;\n }", "public void selectWeaponFromInventory(int weaponIndex) {\n }", "public Characters() {\n setWeapon(weapon);\n }", "public String getEquippedWeapon()\n\t{\n\t\treturn strEquippedWeapon;\n\t\t\n\t}", "public String getEquippedWeaponName() {\n return \"\";\n }", "@Override\n public void useWeapon(ResponseInput responseMessage)\n {\n basicMode(((ResponseRocketLauncher) responseMessage).getTargetPlayerBasicMode(), ((ResponseRocketLauncher) responseMessage).getTargetSquareCoordinatesAsStringPlayerToMove(), ((ResponseRocketLauncher) responseMessage).getTargetSquareCoordinatesAsStringTargetToMove(), ((ResponseRocketLauncher) responseMessage).isWithFragWarhead() ) ;\n }", "public interface EnemyShipPartsFactory {\n ESWeapon addESGun();\n ESEngine addESEngine();\n}", "public Weapon useWeapon() {\n\t\tWeapon weapon = weaponList.get(weaponList.size() - 1);\n\t\tif(weaponList.size() > 1){\n\t\t\tweaponList.remove(weaponList.size() - 1);\n\t\t}\n\t\telse {\n\t\t}\n\t\treturn weapon;\n\t}", "public Sheep()\n {\n super(\"Sheep\",3,2,0); \n \n // tagline = \"Whatever\";\n maxHealth = 5;\n currentHealth = maxHealth;\n equip(new Cloth());\n equip(new SheepClaws());\n \n \n \n engaged = false;\n aggression = 1;\n special = 0;\n hostileRange = 2;\n }", "public Melee(ScrGame game, Player player){\n super();\n this.game = game;\n this.player = player;\n isPlayer = true;\n\n nSpray = 0;\n nShotsPerFire = 1;\n nAmmo = 1;\n nAmmoMax = nAmmo;\n }", "@Override\n public void setEquippedItem(IEquipableItem item) {}", "public Weapon(Player player)\n\t{\n\t\tthis.bullets=new ArrayList<Bullet>();\n\t\tthis.player=player;\n\t\tpause = cooldown;\n\t}", "private Card murderWeapon(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"weapons\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the weapon you think \" + murderer.getName() + \" killed Gunther in \" + location.getName() + \". Listed Below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < WEAPON_NAMES.length; i++) {\n ui.getInfo().addText(WEAPON_NAMES[i].toString().substring(0,1) + WEAPON_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n WeaponTypes murderWeapon = null;\n String weapon;\n\n // check the input from the user whether it is a weapon, help command, notes command or the wrong input\n do {\n weapon = ui.getCmd().getCommand().toLowerCase();\n switch (weapon) {\n case \"rope\":\n murderWeapon = WeaponTypes.ROPE;\n break;\n case \"dagger\":\n murderWeapon = WeaponTypes.DAGGER;\n break;\n case \"wrench\":\n murderWeapon = WeaponTypes.WRENCH;\n break;\n case \"pistol\":\n murderWeapon = WeaponTypes.PISTOL;\n break;\n case \"candlestick\":\n murderWeapon = WeaponTypes.CANDLESTICK;\n break;\n case \"pipe\":\n murderWeapon = WeaponTypes.PIPE;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Select a weapon from the list above for the questioning!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter a weapon from the list above for the questioning!\");\n break;\n }\n } while (murderWeapon == null); // while the player input was not a weapon\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderWeapon.toString()); // return a card with the murder weapon selected by the user\n }", "private Set<BoardObject> createWeapons(){\r\n\t\tSet<BoardObject> weaps = new HashSet<BoardObject>();\r\n\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/revolver1.png\"), new Coordinate(3,12), \"Revolver\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/candlestick3.png\"), new Coordinate(2,3), \"Candlestick\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/knife1.png\"), new Coordinate(12,3), \"Knife\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/leadpipe1.png\"), new Coordinate(20,3), \"LeadPipe\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/rope1.png\"), new Coordinate(20,10), \"Rope\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/spanner1.png\"), new Coordinate(20,16), \"Wrench\"));\r\n\t\treturn weaps;\r\n\t}", "public void setWeaponSlots(int weaponSlots) {\n base.setWeaponSlots(weaponSlots);\n }", "private FireWeaponScreenFactory() {\n\t}", "public RocketLauncher( Color color, int weaponID, boolean isLoaded) {\n super(color, weaponID, isLoaded);\n this.name = \"Lanciarazzi\";\n yellowAmmoCost = 0;\n blueAmmoCost = 0;\n redAmmoCost = 2;\n }", "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea implicita(normala)\r\n normalBounds.x = 16;\r\n normalBounds.y = 16;\r\n normalBounds.width = 16;\r\n normalBounds.height = 32;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea de atac\r\n attackBounds.x = 10;\r\n attackBounds.y = 10;\r\n attackBounds.width = 38;\r\n attackBounds.height = 38;\r\n\r\n jumpingTimer = new Timer();\r\n\r\n lista_dinamic_element = new ArrayList<CollisionItem>();\r\n\r\n lista_static_element = new ArrayList<CollisionItem>();\r\n list_fire = new ArrayList<CollisionItem>();\r\n }", "public void switchWeapon() {\n\t\tif (type == 0) {\n\t\t\ttype = 1;\n\t\t\tthis.setImage(getFilename(type, held));\n\t\t\tsetFocus();\n\t\t} else {\n\t\t\ttype = 0;\n\t\t\tthis.setImage(getFilename(type, held));\n\t\t\tsetFocus();\n\t\t} // end else\n\t}", "public void assignBaseToShip(Ship ship, Base base) {\n\t\tbaseToShip.put(base.getId(), ship);\n\t}", "public Weapon(float x, float y, float laserSpeed, float laserWidth) {\n\t\tthis.x = x - (HALF * laserWidth);\n\t\tthis.y = y;\n\t\tthis.laserSpeed = laserSpeed;\n\t\tthis.width = laserWidth;\n\t\tthis.height = 0;\n\t\tthis.visible = true;\n\t}", "public Weapon(WeaponType type, int level) {\n \tthis.effects = new ArrayList<>();\n this.type = type;\n this.level = level;\n this.effects.add(new AttackEffect(getWeaponDamage(), getWeaponSpeed(), getWeaponRange(), Target.SELF));\n }", "public Weapon(int id, String name, List<String> warnings, FireMode fireMode, ConnectionStatus connectionStatus, String ip, String mac, int batteryLevel) {\n super(id, name);\n this.warnings = warnings;\n this.fireMode = fireMode;\n this.connectionStatus = connectionStatus;\n this.setIp(ip);\n this.setMac(mac);\n this.setBatteryLevel(batteryLevel);\n }", "public void setWeaponDamage (int weaponDamage)\r\n\t{\r\n\t\tthis.weaponDamage = weaponDamage;\r\n\t}", "public void weaponInformation() {\n System.out.println(\"Weapon Name: \" + super.name() );\r\n System.out.println(\"Desc:\" + super.description() );\r\n System.out.println(\"Mobility: \" + super.mobility() ); \r\n }", "public void pickUpWeapon(CardWeapon weapon, CardWeapon weaponToWaste, List<CardPower> powerUp) throws InsufficientAmmoException, NoCardWeaponSpaceException {\n List <Color> tmp = new ArrayList<>(weapon.getPrice());\n List <CardPower> tmpPU = new ArrayList<>();\n if(this.weapons.size()== 3)\n if(weaponToWaste==null)\n throw new NoCardWeaponSpaceException();\n if(tmp.size() > 1)\n {\n tmp = tmp.subList(1, tmp.size());\n pay(tmp, powerUp);\n }\n if (weapons.size() == 3){\n this.position.getWeapons().add(weaponToWaste);\n this.weapons.remove(weaponToWaste);\n }\n this.weapons.add(weapon);\n weapon.setShooter(this);\n this.position.getWeapons().remove(weapon);\n if(game != null)\n game.notifyGrabWeapon(this,weapon, weaponToWaste);\n\n }", "private void setArmor() {\n\n if (VersionChecker.currentVersionIsUnder(12, 2)) return;\n if (!ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_ARMOR)) return;\n\n eliteMob.getEquipment().setItemInMainHandDropChance(0);\n eliteMob.getEquipment().setHelmetDropChance(0);\n eliteMob.getEquipment().setChestplateDropChance(0);\n eliteMob.getEquipment().setLeggingsDropChance(0);\n eliteMob.getEquipment().setBootsDropChance(0);\n\n if (hasCustomArmor) return;\n\n if (!(eliteMob instanceof Zombie || eliteMob instanceof PigZombie ||\n eliteMob instanceof Skeleton || eliteMob instanceof WitherSkeleton)) return;\n\n eliteMob.getEquipment().setBoots(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.AIR));\n\n if (eliteMobLevel >= 12)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.LEATHER_HELMET));\n\n if (eliteMobLevel >= 14)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));\n\n if (eliteMobLevel >= 16)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));\n\n if (eliteMobLevel >= 18)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));\n\n if (eliteMobLevel >= 20)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.CHAINMAIL_HELMET));\n\n if (eliteMobLevel >= 22)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));\n\n if (eliteMobLevel >= 24)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));\n\n if (eliteMobLevel >= 26)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.CHAINMAIL_CHESTPLATE));\n\n if (eliteMobLevel >= 28)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));\n\n if (eliteMobLevel >= 30)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));\n\n if (eliteMobLevel >= 32)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));\n\n if (eliteMobLevel >= 34)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));\n\n if (eliteMobLevel >= 36)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));\n\n if (eliteMobLevel >= 38)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));\n\n if (eliteMobLevel >= 40)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));\n\n if (eliteMobLevel >= 42)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));\n\n }", "private void default_init(){\n id = 0;\n xPos = 0;\n yPos = 0;\n hp = 100;\n name=\"\";\n character_id = 1;\n weapons = new ArrayList<>();\n weaponEntryTracker = new LinkedList<>();\n isJumping = false;\n isFalling = false;\n initial_y= -1;\n stateOfMovement = 0;\n for(int i = 0; i < 3; i++){\n this.weapons.add(new Pair<>(NO_WEAPON_ID, (short) 0));\n }\n this.weapons.set(0,new Pair<>(PISTOL_ID,DEFAULT_PISTOL_AMMO));\n currentWeapon = this.weapons.get(0);\n bulletsFired = new ArrayList<>();\n shootingDirection = 1;\n energy = 0;\n sprint = false;\n score = 0;\n roundsWon = 0;\n ready = false;\n audioHandler = new AudioHandler();\n }", "public void assignAsteroidToShip(Ship ship, Asteroid asteroid) {\n\t\tasteroidToShip.put(asteroid.getId(), ship);\n\t}", "public ArtilleryTracker() {\n weapons = new Hashtable<Mounted, Vector<ArtilleryModifier>>();\n }", "public void equip(Equipment e){\n equipment.add(e);\n }" ]
[ "0.70769095", "0.6950972", "0.6785672", "0.67705435", "0.67546564", "0.6716965", "0.6693164", "0.66781044", "0.65941906", "0.6445932", "0.64320296", "0.642758", "0.64029497", "0.6372284", "0.63653815", "0.63168675", "0.63157195", "0.6291676", "0.6268407", "0.62532145", "0.62499857", "0.6229422", "0.6213516", "0.61925733", "0.6183379", "0.6119762", "0.61035186", "0.60882616", "0.60690737", "0.6038843", "0.6030714", "0.60215783", "0.6018526", "0.6009004", "0.59900075", "0.5973997", "0.5962343", "0.5944155", "0.5934245", "0.5932863", "0.5925779", "0.5925634", "0.5887838", "0.58820647", "0.5878363", "0.58479595", "0.5841419", "0.58235896", "0.58230317", "0.5815877", "0.5798075", "0.5786666", "0.5785444", "0.57711643", "0.57684684", "0.57679164", "0.57648075", "0.5764471", "0.57422775", "0.57361287", "0.5728702", "0.57281566", "0.5714311", "0.571261", "0.57108283", "0.5706662", "0.5700791", "0.5696273", "0.5694672", "0.5693614", "0.5684752", "0.5681052", "0.5680176", "0.567578", "0.56582505", "0.5649275", "0.56470954", "0.56239533", "0.561002", "0.5605005", "0.5603723", "0.5599476", "0.559834", "0.5592977", "0.5569065", "0.55473346", "0.5546315", "0.5545293", "0.55414003", "0.55283767", "0.5523275", "0.55190885", "0.55174094", "0.5517371", "0.5511437", "0.54995054", "0.5492712", "0.54841685", "0.54674685", "0.5459369" ]
0.5829079
47
Defines the engine object to associate with the ship
public ESEngine addESEngine() { return new ESUFOEngine(); // Specific to regular UFO }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEngine(Engine engine);", "public Engine() {\n super(0,0,0,0,null, \"ENGINE\");\n }", "public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }", "public void setEngine(Engine engine) {\n this.engine = engine;\n }", "public void setEngine(String engine) {\n this.engine = engine;\n }", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "void setEngine(ImpotEngine engine) {\n this.engine = engine;\n }", "public EngineClass(EngineClass inEngine)\n {\n cyl = inEngine.getCyl();\n fuel = inEngine.getFuel();\n }", "public RobotEngine (){\r\n\t\tthis.fuel = 100;\r\n\t\tthis.recycledMaterial = 0;\r\n\t\tthis.container = new ItemContainer ();\r\n\t\tthis.direction = Direction.NORTH;\r\n\t\tthis.navega = new NavigationModule();\r\n\t}", "public EngineClass()\n {\n cyl = 10;\n fuel = new String( BATT );\n }", "public String getEngine() {\n return this.engine;\n }", "@Override\r\n\tpublic void engine() {\n\t\t\r\n\t}", "public EngineSwitch() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = EnginePackage.eINSTANCE;\n\t\t}\n\t}", "public Engine getEngine() {\n return engine;\n }", "public interface EnemyShipPartsFactory {\n ESWeapon addESGun();\n ESEngine addESEngine();\n}", "public void setEngine(Engine e) {\n engine = e;\n if (e.engineValid) {\n setOriginalWalkMP(calculateWalk());\n }\n }", "private Engine() {\n\n }", "public RenderEngine() {\n\t\twindow = Window.getInstance();\n\t\t\n\t\ttestEntity = new Entity(\"skull/skull.obj\", \"./res/models/skull/skull.png\", new Vector3f(0,0,0), new Vector3f(0,0,0));\n\t\ttestEntity.getWorldTransform().setScaling(new Vector3f(0.01f,0.01f,0.01f));\n\t\t\n\t\ttestEntity2 = new Entity(\"dummy/dummy.obj\", \"./res/models/dummy/dummy.jpg\", new Vector3f(0,8,0), new Vector3f(0,0,0));\n\t\ttestEntity2.getWorldTransform().setScaling(new Vector3f(0.05f,0.05f,0.05f));\n\t\t\n\t\ttestLight = new Light(new Vector3f(-5,5,-5), new Vector3f(1,1,1));\n\t\ttestLight.getWorldTransform().setScaling(new Vector3f(0.1f,0.1f,0.1f));\n\t\t\n\t\tsky = new SkyDome();\n\t\t\n\t}", "public static Engine getEngine(){\n Engine engine = null;\n try {\n engine = mapper.readValue(new File(Constants.ENGINE_FILE_PATH), Engine.class);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n return engine;\n }", "public void gameEngineInitializer() {\n\t\t\r\n\t\tthis.sputacchioGameEngine = new SputacchioGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber);// da implementare alla fine\r\n\t\tthis.classicGameEngine = new ClassicGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber, engineUtility, filter);\r\n\t\t\r\n\t\tthis.gamestate.setCurrentGameType(GameType.CLASSICGAME);//si dovrebbe iniziare dal cucù ma facciamo dopo\r\n\t\tthis.gamestate.setCurrentHandNumber(INITIALHANDNUMBER);\r\n\t\tthis.givePersonalJolly();\r\n\t\t\r\n\t\tthis.classicGameEngine.distributeHands();//queste due si fanno all'inizio di ogni mano, non sono da fare solo la prima volta e basta\r\n\t\tthis.classicGameEngine.substituteJolly();\r\n\t\t\r\n\t\tmainEngine();\r\n\t\t//TODO ci vuole un metodo che, a parte la prima chiamata di Server Room, chiama il sotto-engine giusto in base a game type. Se classic game engine fa una return per segnalare\r\n\t\t//che la mano è finita perchè nessuno ha carte in mano, game engine deve ridare le 6 carte o settare l'ultima mano, o la mano della scala obbligatoria, e cambiare chi inizia a cucù.\r\n\t\t//Poi penso che debba chiamare Filter per mostrare a entrambi cosa accade, stampare le nuove carte e dichiarare l'inizio del cucù.\r\n\t}", "void init(@NotNull final AIEngine engine);", "public void setEndogenousEngine(EnvironmentEndogenousEngine engine) {\n\t\tthis.endogenousEngine = engine;\n\t}", "public void initializeEngines() {\n\t\tfor (int i=0; i < _engineNumber; i++) {\n\t\t\tengineList.add(new Engine(\"Engine_\" + i, \"\", 0.0, 0.0, 0.0, _theAircraft));\n\t\t}\n\t}", "@Override\r\n public EngineInjection createEngineInjection() {\r\n return new Turbofan();\r\n }", "public interface Engine {\n\n String run();\n\n}", "public void engineOn(){\n engine = true;\n }", "@Override\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}", "public void setEngineOn();", "public void setTurboEngine(Engine engine) {\n System.out.println(\"Car.setEngine\");\n this.engine = engine;\n }", "public interface Engine {\n public void fire();\n}", "private WrappedEngine() {\n logger = new ONDEXCoreLogger();\n addONDEXListener(logger);\n pluginLogger = new ONDEXPluginLogger();\n EnvironmentVariable ev = new EnvironmentVariable(\"ONDEX VAR=\" + Config.ondexDir);\n ev.setLog4jLevel(Level.INFO);\n fireEventOccurred(ev);\n }", "public EngineClass( int inCyl, String inFuel )\n {\n setCyl( inCyl );\n setFuel( inFuel );\n }", "public final void setGameEngine(GameEngine engine) {\n this.engine = engine;\n }", "public interface EngineInterface<T> {\n\tpublic T run (Mower mower);\n}", "void start() throws EngineException;", "@Override\n\tpublic void hasEngine() {\n\t\t\n\t}", "public StartupHandler(){\r\n\t\tloadGameFiles();\r\n\t\tnew Engine();\r\n\t}", "public GameEngine getEngine() {\n\t\treturn engine;\n\t}", "@Override\n\tpublic Engine onLoadEngine(){\n\t\tmEngine=new Engine(new EngineOptions(true, ScreenOrientation.PORTRAIT, new FillResolutionPolicy(), new Camera(0, 0, MoveBackground.WIDTH, MoveBackground.height)));\n\t\treturn mEngine;\n\t}", "public Engine toEngine(SbiEngines hibEngine){\r\n\t\tEngine eng = new Engine();\r\n\t\teng.setCriptable(new Integer(hibEngine.getEncrypt().intValue()));\r\n\t\teng.setDescription(hibEngine.getDescr());\r\n\t\teng.setDirUpload(hibEngine.getObjUplDir());\r\n\t\teng.setDirUsable(hibEngine.getObjUseDir());\r\n\t\teng.setDriverName(hibEngine.getDriverNm());\r\n\t\teng.setId(hibEngine.getEngineId());\r\n\t\teng.setName(hibEngine.getName());\r\n\t\teng.setLabel(hibEngine.getLabel());\r\n\t\teng.setSecondaryUrl(hibEngine.getSecnUrl());\r\n\t\teng.setUrl(hibEngine.getMainUrl());\r\n\t\teng.setLabel(hibEngine.getLabel());\r\n\t\treturn eng;\r\n\t}", "@Override\r\n\tpublic void configEngine(Engine me) {\n\r\n\t}", "@Override\r\n\tpublic String setEngineType() {\n\t\treturn null;\r\n\t}", "public SimulationWorld( SimulationEngine engine )\n {\n this.engine = engine;\n this.gravity = new Vector3f( 0f, -9.81f, 0f );\n }", "public void init(GameEngine engine) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {\n\t\tif(this.engine != null) {\n\t\t\tthrow new IllegalStateException(\"The world has already been initialised.\");\n\t\t} else {\n\t\t\tthis.engine = engine;\n\t\t\tthis.eventManager = new EventManager(engine);\n\t\t\tthis.tickManager = new TickManager();\n\t\t\tthis.registerGlobalEvents();\n\t\t\tthis.loadConfiguration();\n\t\t}\n\t}", "public void setEngineId(String engineId)\n {\n this.engineId = engineId;\n }", "public static void saveEngine(Engine engine){\n if (engine != null) {\n try {\n mapper.writeValue(new File(Constants.ENGINE_FILE_PATH), engine);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "private PhysicsEngine() {\n\n }", "public static IXccdfEngine createEngine(IPlugin plugin, SystemEnumeration... systems) {\r\n \treturn new OEMEngine(plugin, systems);\r\n }", "public String getEngineName() {\n return engineName;\n }", "@Override\n\tpublic void carEngine() {\n\n\t}", "public String getEngineQualifiedName()\n {\n return engineQualifiedName;\n }", "public static Engine getEngineInstance(String from, String to)\r\n\t\t\tthrows InitializeException {\r\n\t\tif (engineInstance == null) {\r\n\t\t\tEngineContext context = new EngineContext();\r\n\t\t\tProperties prop = loadConfig();\r\n\t\t\tcontext.config(prop);\r\n\t\t\tcontext.init(from, to);\r\n\t\t\tengineInstance = new Engine(context);\r\n\t\t}\r\n\t\treturn engineInstance;\r\n\t}", "public void setEngineSize(int _engineSize)\r\n {\r\n engineSize = _engineSize;\r\n }", "public String getEngineId()\n {\n return engineId;\n }", "private void initializeEngine() {\n engine.setDecayDelay(emotionalAgent.decayTimeMillis());\n\n // Get decay steps parameter from ADF if exists and set decay steps in engine\n engine.setDecaySteps(emotionalAgent.decayStepsToMin());\n\n // Set engine initialized\n engine.setInitialized(true);\n }", "public Appliance() {\n universe = SmartGridUniverse.getInstance();\n\n }", "public interface CEPEngineAdvanced extends CEPEngine {\n\n public <T extends Object>void insertObject(String name,T variable) throws UnsupportedOperationException;\n /**\n * Add additional package used in the engine\n * @param canonicalNameClassOrPkg String representing a class or a package path containing classes (e.g. my.package.*).\n *\n * @return <code>true</code> if the Class or Package Path was loaded into the CEP engine. <code>false</code> otherwise.\n * */\n public boolean loadAdditionalPackages( String canonicalNameClassOrPkg) throws Exception;\n public boolean setEngineTimeTo( Date date)throws Exception;\n public Date getEngineCurrentDate();\n}", "public JseBaseSynthesizer(final SynthesizerMode engineMode) {\n super(engineMode);\n }", "public static interface Engine\n\t\t{\n\t\t\tpublic void spinWheels();\n\t\t}", "private void setImpl() {\n Object obj = getConfigManager().getObject(\"SERVER_IMPL\");\n if (null == obj) {\n LoggingServices.getCurrent().logMsg(getClass().getName(), \"setImpl()\"\n , \"Could not instantiate SERVER_IMPL.\", \"Make sure loyalty.cfg contains SERVER_IMPL\"\n , LoggingServices.MAJOR);\n }\n LoyaltyServices.setCurrent((LoyaltyServices)obj);\n }", "public static IXccdfEngine createEngine(IPlugin plugin) {\r\n \treturn new OEMEngine(plugin, SystemEnumeration.ANY);\r\n }", "public void setEngineQualifiedName(String engineQualifiedName)\n {\n this.engineQualifiedName = engineQualifiedName;\n }", "public void initializeEngines(AircraftEnum aircraftName) {\n\t\t\n\t\tswitch(aircraftName) {\n\t\tcase ATR72:\n\t\t\t_engineNumber = 2;\n\t\t\t_engineType = EngineTypeEnum.TURBOPROP;\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\", \"\",8.6100, 4.0500, 1.3200, _theAircraft));\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_2\", \"\",8.6100, -4.0500, 1.3200, _theAircraft));\n\t\t\tbreak;\n\t\tcase B747_100B:\n\t\t\t_engineNumber = 4;\n\t\t\t_engineType = EngineTypeEnum.TURBOFAN;\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\" , \"\", 23.770, 11.820, -2.462, _theAircraft));\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\" , \"\", 31.693, 21.951, -2.462, _theAircraft));\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\" , \"\", 23.770, -11.820, -2.462, _theAircraft));\n\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\" , \"\", 31.693, -21.951, -2.462, _theAircraft));\n\t\t\t\t\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase AGILE_DC1:\n\t\t\t_engineNumber = 2;\n\t\t\t_engineType = EngineTypeEnum.TURBOFAN;\n//\t\t\tfor (int i=0; i < _engineNumber; i++) {\n//\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_\" + i, \"\", 0.0, 0.0, 0.0, _theAircraft));\n\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\", \"\", 12.891, 4.869, -1.782, _theAircraft));\n\t\t\tengineList.add(new Engine(aircraftName, \"Engine_2\", \"\", 12.891, -4.869, -1.782, _theAircraft));\n//\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase IRON:\n\t\t\t_engineNumber = 2;\n\t\t\t_engineType = EngineTypeEnum.TURBOPROP;\n//\t\t\tfor (int i=0; i < _engineNumber; i++) {\n//\t\t\t\tengineList.add(new Engine(aircraftName, \"Engine_\" + i, \"\", 0.0, 0.0, 0.0, _theAircraft));\n\t\t\tengineList.add(new Engine(aircraftName, \"Engine_1\", \"\", 31.22, 4.4375, 1.65, _theAircraft));\n\t\t\tengineList.add(new Engine(aircraftName, \"Engine_2\", \"\", 31.22, -4.4375, 1.65, _theAircraft));\n//\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\t\tpublic Engine onLoadEngine() {\n\t\t\tToast.makeText(this, \"Touch the screen to add objects.\", Toast.LENGTH_LONG).show();\n\t\t\tfinal Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\t\t\tfinal EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera);\n\t\t\tengineOptions.getTouchOptions().setRunOnUpdateThread(true);\n\t\t\treturn new Engine(engineOptions);\n\t\t}", "public void startEngine(){\r\n isEngineRunning = true;\r\n System.out.println(\"[i] Engine is running.\");\r\n }", "public interface Engine {\n\n int fps = 30;\n\n void paint(Graphics g);\n void update();\n}", "public GameEnvironment() {\r\n this.collidObj = new ArrayList<Collidable>();\r\n }", "public void setGameEnvironment(GameEnvironment ge) {\n this.gameEnvironment = ge;\n }", "public GameEnvironment() {\r\n this.collidables = new ArrayList<Collidable>();\r\n }", "protected TKExecutable(Engine pEngine) {\n\t\tsuper(pEngine);\n\t}", "@Override\n public void turnOnEngine() {\n engine.on();\n System.out.println(\"Engine is turned on.\");\n }", "public Game()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1, false); \n Greenfoot.start(); //Autostart the game\n Greenfoot.setSpeed(50); // Set the speed to 30%\n setBackground(bgImage);// Set the background image\n \n //Create instance\n \n Airplane gameplayer = new Airplane ();\n addObject (gameplayer, 100, getHeight()/2);\n \n }", "public Engine getEngine_test() {\n\t\treturn engine;\n\t}", "public void createEnvironment() {\n //create a list of collidable objects and a list of sprite objects\n List<Collidable> collidables = new ArrayList<Collidable>();\n List<Sprite> spriteList = new ArrayList<Sprite>();\n //update the game's environment to be the collidables list.\n this.environment = new GameEnvironment(collidables);\n //update the game's sprites collection to be the list of sprites.\n this.sprites = new SpriteCollection(spriteList);\n }", "Analytics_Engine createAnalytics_Engine();", "public void setEngineNum(String engineNum) {\n\t\tthis.engineNum = engineNum;\n\t}", "protected abstract void defineEnemy();", "@Override\n\tpublic Engine onLoadEngine() {\n\t\tthis.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\t\treturn new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), this.mCamera));\n\t}", "TransportTruck() {\n x = 0;\n y = 0;\n nrDoors = 2;\n enginePower = 1000;\n currentSpeed = 0;\n color = Color.red;\n modelName = \"Transport Truck\";\n\n storage = new StorageUnit(this, 5);\n\n stopEngine();\n }", "protected void setupTerrain(Engine engine, SceneManager sceneManager, Invocable invocableEngine) {\n\t\tgroundTessellation = sceneManager.createTessellation(\"groundTessellationEntity, 8\");\n\t\tgroundTessellation.setSubdivisions(32.0f);\n\n\t\tgroundNode = sceneManager.getRootSceneNode().createChildSceneNode(groundTessellation.getName() + \"Node\");\n\t\tgroundNode.attachObject(groundTessellation);\n\t\tgroundNode.setLocalPosition(0.0f, 0.0f, 0.0f);\n\t\tgroundNode.scale(10000.0f, 1.0f, 10000.0f);\n\t\tgroundTessellation.setHeightMap(engine, \"waterHeight.jpg\");\n\t\tgroundTessellation.setTexture(engine, \"waterTexture.jpg\");\n\t\tgroundTessellation.setQuality(8);\n\n\t\tsetupTerrain = new File(\"setupTerrain.js\");\n\t\tthis.runScript(jsEngine, setupTerrain);\n\t\ttry {\n\t\t\tinvocableEngine.invokeFunction(\"setupTessellation\", this);\n\t\t} catch (ScriptException e1) {\n\t\t\tSystem.out.println(\"ScriptException in \" + setupTerrain + e1);\n\t\t} catch (NoSuchMethodException e2) {\n\t\t\tSystem.out.println(\"No such method in \" + setupTerrain + e2);\n\t\t} catch (NullPointerException e3) {\n\t\t\tSystem.out.println(\"Null pointer exception reading \" + setupTerrain + e3);\n\t\t}\n\t\ttessellationEntity = (Tessellation) jsEngine.get(\"tessellationEntity\");\n\t\ttessellationNode = (SceneNode) jsEngine.get(\"tessellationNode\");\n\t}", "public void startEngine(){\n currentSpeed = 0.1;\n }", "public static Engine getInstance() {\n if (engineInstance == null) {\n synchronized (Engine.class) {\n if (engineInstance == null) {\n engineInstance = new Engine();\n }\n }\n }\n return engineInstance;\n }", "@Override\n protected void postProcessEngineInitialisation() {\n }", "public DynamicShipClass() {\n\t\tthis.ts = new Long(ts);\n\t}", "public Artemis(){\r\n super(\"Artemis\",\r\n new StandardWinCondition(),\r\n new DoubleNoBackMove(new StandardMove()), new StandardBuild(),\r\n false,\r\n false\r\n );\r\n }", "public static void main(String[] args) {\n \t\tnew CoreEngine();\n \t}", "GamePlayAbstract(GameEngine1 p_ge) {\r\n super(p_ge);\r\n }", "public boolean isEngineOn();", "public RenderSystem() {\n super(SystemType.RENDER);\n bufferBuffer =\n new MasterBuffer(\n voide.resources.Resources\n .get()\n .getResource(\"voide.packed_texture\", Texture.class)\n .getTextureId()\n );\n master =\n new MasterRenderer(Constants.GAME_WIDTH, Constants.GAME_HEIGHT);\n }", "public UserInterface( final GameEngine pGameEngine )\n {\n\n\n this.aEngine = pGameEngine;\n this.createGUI();\n\n }", "public Launcher() {\n //instantiate motors and djustment value using robot map constants\n m_masterMotor = new TalonSRX(RobotMap.MASTER_LAUNCHER_ID);\n m_closeSlaveMotor = new VictorSPX(RobotMap.CLOSE_LAUNCHER_SLAVE_ID);\n m_farSlaveMotor1 = new VictorSPX(RobotMap.FAR_LAUNCHER_SLAVE1_ID);\n m_farSlaveMotor2 = new VictorSPX(RobotMap.FAR_LAUNCHER_SLAVE2_ID);\n\n //Sets the far motors to be inverted so that they don't work against the close ones\n m_farSlaveMotor1.setInverted(RobotMap.LAUNCHER_FAR_SLAVE1_INVERTED);\n m_farSlaveMotor2.setInverted(RobotMap.LAUNCHER_FAR_SLAVE2_INVERTED);\n\n //Instantiates the encoder as the encoder plugged into the master\n m_encoder = new SensorCollection(m_masterMotor);\n\n //run the config methods to set up velocity control\n configVelocityControl();\n }", "@StartStep(localName=\"command-engineering\", after={\"config\"})\n public static void startCommandEngineering(LifecycleContext context) \n {\n // for each class that is a Catalog or Command, create an entry for those in the context.\n ClassScanner classScanner = new ClassScanner(context);\n classScanner.scan();\n }", "protected void setupPhysics() {\n\t\tString engine = \"ray.physics.JBullet.JBulletPhysicsEngine\";\n\t\tfloat[] gravity = { 0.0f, -9.8f, 0.0f };\n\n\t\tphysicsEngine = PhysicsEngineFactory.createPhysicsEngine(engine);\n\t\tphysicsEngine.initSystem();\n\t\tphysicsEngine.setGravity(gravity);\n\t}", "public abstract void execute(GameEngine pGameEngine);", "public Engine() throws Exception {\n\t\t// User interface initialization\n\t\tif (Setting.LOCAL_MODE) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Initializing the user interface\");\n\t\t\t\tui = new UserInterface(this);\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}\n\n\t\t// Scenario initialization\n\t\tscenario = new Scenario(ui);\n\n\t\t// load tool, drug and patient through scenario\n\t\tTool[] tools = scenario.readTool();\n\t\tDrug[] drugMap = scenario.readDrug();\n\t\tPatient patient = scenario.readPatient();\n\t\tif (Setting.LOCAL_MODE) {\n\t\t\tfor (Tool tool : tools) {\n\t\t\t\tui.addTool(tool);\n\t\t\t}\n\t\t\tui.addDrug(drugMap);\n\t\t\tui.setPatientInfo(patient);\n\t\t}\n\n\t\t// set simulator and evaluator\n\t\tsimulator = new Simulator(patient);\n\t\tevaluator = new Evaluator(this);\n\t\t// Start looping\n\t\ttimer.scheduleAtFixedRate(new CoreTimerTask(1000, this), 0, 1000);\n\t}", "@Override\n public void engineStart(String engineType, boolean isKeyLess) {\n System.out.println(\"This is the implementation\");\n }", "public static GameEngine getInstance() {\n return INSTANCE;\n }", "void updateRenderEngine() {\n if (renderEngine == null)\n renderEngine = this.game.p;\n }", "public static synchronized Engine resetEngine() {\n if (engineInstance != null) {\n engineInstance = new Engine();\n }\n return engineInstance;\n }" ]
[ "0.7235996", "0.71791303", "0.695845", "0.67989427", "0.649796", "0.6449297", "0.6449297", "0.638831", "0.62413704", "0.62285054", "0.618092", "0.6160238", "0.61412257", "0.6121669", "0.60848826", "0.60767883", "0.6064954", "0.60472244", "0.6026554", "0.60050476", "0.59981376", "0.5997372", "0.5994518", "0.5958192", "0.5941667", "0.5907999", "0.5905657", "0.58530587", "0.58391243", "0.58244985", "0.581197", "0.578501", "0.57771933", "0.5776869", "0.57630324", "0.5758965", "0.57511544", "0.57388777", "0.573492", "0.56958807", "0.5673691", "0.5640371", "0.5582179", "0.5569171", "0.55403274", "0.55362225", "0.55160224", "0.5513782", "0.5495078", "0.5492144", "0.5488972", "0.54860044", "0.5468838", "0.5459578", "0.54234433", "0.542071", "0.54156524", "0.54016876", "0.53838044", "0.53792024", "0.53771615", "0.53744453", "0.5368158", "0.5366827", "0.53631157", "0.5349712", "0.5347085", "0.5325763", "0.527161", "0.52457076", "0.52249676", "0.5199231", "0.51888454", "0.5188021", "0.5186775", "0.51867664", "0.518385", "0.5177985", "0.5176899", "0.5175964", "0.51659584", "0.51509404", "0.51502496", "0.5141444", "0.5134908", "0.51334184", "0.5129374", "0.51279885", "0.5110648", "0.5108425", "0.5094175", "0.508246", "0.5077398", "0.50741124", "0.50711", "0.5049084", "0.50463426", "0.5036827", "0.50359935", "0.5034838" ]
0.60907
14
Must be called before creating JDialog for the desired effect JDialog.setDefaultLookAndFeelDecorated(true);
private void createAndShowGUI(String str) throws IOException { setUndecorated(true); setAlwaysOnTop(true); // Set some layout setLayout(new BorderLayout()); closeButton = new JButton("Ok."); closeButton.addActionListener(this); add(closeButton, BorderLayout.SOUTH); JLabel ico = new JLabel(str); ico.setIcon(new ImageIcon(ImageIO.read(new File("icons\\rarenep.png")))); add(ico, BorderLayout.CENTER); pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); //setSize(sizeX,sizeY); Dimension dialogSize = getSize(); setLocation(screenSize.width/2-dialogSize.width/2, screenSize.height/2-dialogSize.height/2); setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void configuraInterface() {\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\t\ttry\t{\n\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tSystem.out.println(\"Falhou o carregamento do L&F: \");\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t}", "private static void setLook() {\r\n try {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n } catch (IllegalAccessException ex) {\r\n ex.printStackTrace();\r\n } catch (UnsupportedLookAndFeelException ex) {\r\n ex.printStackTrace();\r\n } catch (ClassNotFoundException ex) {\r\n ex.printStackTrace();\r\n } catch (InstantiationException ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "private void LookAndFeel() {\n try {\n // Set System L&F\n BasicLookAndFeel darcula = new DarculaLaf();\n UIManager.setLookAndFeel(darcula);\n } catch (UnsupportedLookAndFeelException e) {\n // handle exception\n }\n }", "private void nativeLookAndFeel() {\n\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException | IllegalAccessException e) {\n e.printStackTrace();\n }\n }", "public static void windowLookAndFeel(){\r\n\t try{\r\n\t UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t }catch (Exception e) {\r\n\t System.out.println(\"Look and Feel error: \" + e);\r\n\t }\r\n\t}", "public static void LookAndFeel() {\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); // uniformed\n\t\t} catch (Exception exc) {\n\t\t}\n\t}", "public void lookandfeel(){\n \n try{\n UIManager.setLookAndFeel(seta_look);\n SwingUtilities.updateComponentTreeUI(this);\n }\n catch(Exception erro){\n JOptionPane.showMessageDialog(null, erro);\n \n }\n}", "private void setNativeLAndF() {\r\n\t\ttry {\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (Exception e) {\r\n\t\t\t//do nothing. It will default to normal\r\n\t\t}\r\n\t}", "private static void setLookAndFeel() { \r\n try {\r\n UIManager.setLookAndFeel(\"javax.swing.plaf.metal.MetalLookAndFeel\"); \r\n } catch (final UnsupportedLookAndFeelException e) {\r\n System.out.println(\"UnsupportedLookAndFeelException\");\r\n } catch (final ClassNotFoundException e) {\r\n System.out.println(\"ClassNotFoundException\");\r\n } catch (final InstantiationException e) {\r\n System.out.println(\"InstantiationException\");\r\n } catch (final IllegalAccessException e) {\r\n System.out.println(\"IllegalAccessException\");\r\n } \r\n }", "public static void setLookAndFeel(){\n\t\t\n\t\tUIManager.put(\"nimbusBase\", new Color(0,68,102));\n\t\tUIManager.put(\"nimbusBlueGrey\", new Color(60,145,144));\n\t\tUIManager.put(\"control\", new Color(43,82,102));\n\t\tUIManager.put(\"text\", new Color(255,255,255));\n\t\tUIManager.put(\"Table.alternateRowColor\", new Color(0,68,102));\n\t\tUIManager.put(\"TextField.font\", new Font(\"Font\", Font.BOLD, 12));\n\t\tUIManager.put(\"TextField.textForeground\", new Color(0,0,0));\n\t\tUIManager.put(\"PasswordField.foreground\", new Color(0,0,0));\n\t\tUIManager.put(\"TextArea.foreground\", new Color(0,0,0));\n\t\tUIManager.put(\"FormattedTextField.foreground\", new Color(0,0,0));\n\t\t\n\t\tUIManager.put(\"ComboBox:\\\"ComboBox.listRenderer\\\".background\", new Color(0,68,102));\n\t\tUIManager.put(\"ComboBox:\\\"ComboBox.listRenderer\\\"[Selected].background\", new Color(0,0,0));\n\t\t\n\t\t//TODO nie chca dzialac tooltipy na mapie\n\t\tBorder border = BorderFactory.createLineBorder(new Color(0,0,0)); //#4c4f53\n\t\tUIManager.put(\"ToolTip.border\", border);\n\n\t\t//UIManager.put(\"ToolTip.foregroundInactive\", new Color(0,0,0));\n\t\t//UIManager.put(\"ToolTip.backgroundInactive\", new Color(0,0,0));\n\t\t//UIManager.put(\"ToolTip.background\", new Color(0,0,0)); //#fff7c8\n\t\t//UIManager.put(\"ToolTip.foreground\", new Color(0,0,0));\n\t\t Painter<Component> p = new Painter<Component>() {\n\t\t public void paint(Graphics2D g, Component c, int width, int height) {\n\t\t g.setColor(new Color(20,36,122));\n\t\t //and so forth\n\t\t }\n\t\t };\n\t\t \n\t\tUIManager.put(\"ToolTip[Enabled].backgroundPainter\", p);\n\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foregroundInactive\", new Color(255, 255, 255));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"backgroundInactive\", new Color(255, 255, 255));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.background\", new Color(255, 255, 255)); //#fff7c8\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foreground\", new Color(255, 255, 255));\n//\t\t\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foregroundInactive\",new ColorUIResource(new Color(255, 255, 255)));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"backgroundInactive\", new ColorUIResource((new Color(255, 255, 255))));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.background\", new ColorUIResource(new Color(255, 255, 255))); //#fff7c8\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foreground\", new ColorUIResource(new Color(255, 255, 255)));\n\t\t\n\t \n\t\ttry {\n\t\t for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n\t\t if (\"Nimbus\".equals(info.getName())) {\n\t\t UIManager.setLookAndFeel(info.getClassName());\n\t\t break;\n\t\t }\n\t\t }\n\t\t} catch (Exception e) {\n\t\t // If Nimbus is not available, you can set the GUI to another look and feel.\n\t\t}\n\n\t\tUIManager.getLookAndFeelDefaults().put(\"Table:\\\"Table.cellRenderer\\\".background\", new ColorUIResource(new Color(74,144,178)));\n\t\tUIManager.getLookAndFeelDefaults().put(\"Table.background\", new ColorUIResource(new Color(74,144,178)));\n\t\t\n\n\t}", "private static void setLookAndFeel() {\n\tSystem.setProperty(\"apple.laf.useScreenMenuBar\", \"true\");\n\n\ttry {\n\t UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\n\t //copy progress bar of System LAF\n\t HashMap<Object, Object> progressDefaults = new HashMap<Object, Object>();\n\t for (Map.Entry<Object, Object> entry : UIManager.getDefaults()\n\t\t .entrySet()) {\n\t\tif (entry.getKey().getClass() == String.class\n\t\t\t&& ((String) entry.getKey()).startsWith(\"ProgressBar\")) {\n\t\t progressDefaults.put(entry.getKey(), entry.getValue());\n\t\t}\n\t }\n\n\t prepareLayout();\n\n\t UIManager\n\t\t .setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n\n\t // copy back progress bar of metal Look and Feel\n\t for (Map.Entry<Object, Object> entry : progressDefaults.entrySet()) {\n\t\tUIManager.getDefaults().put(entry.getKey(), entry.getValue());\n\t }\n\t} catch (ClassNotFoundException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (InstantiationException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (IllegalAccessException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (UnsupportedLookAndFeelException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t}\n\n }", "private static void createAndShowGUI() {\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\n\t\tLevelEditor le = new LevelEditor();\n\t}", "private static void initLookAndFeel()\n {\n try \n {\n UIManager.setLookAndFeel(\"de.javasoft.plaf.synthetica.SyntheticaAluOxideLookAndFeel\");\n }\n \n catch(ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e)\n {\n JOptionPane.showMessageDialog(null, \"Failed to load resource package\");\n }\n }", "public final static void setDesign() {\n\t\t\ttry{\n\t\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.out.println(\"Prob with setDesign()\");\n\t\t\t}\n\t\t\t\n\t\t}", "private void configureUI() {\r\n // UIManager.put(\"ToolTip.hideAccelerator\", Boolean.FALSE);\r\n\r\n Options.setDefaultIconSize(new Dimension(18, 18));\r\n\r\n Options.setUseNarrowButtons(settings.isUseNarrowButtons());\r\n\r\n // Global options\r\n Options.setTabIconsEnabled(settings.isTabIconsEnabled());\r\n UIManager.put(Options.POPUP_DROP_SHADOW_ENABLED_KEY,\r\n settings.isPopupDropShadowEnabled());\r\n\r\n // Swing Settings\r\n LookAndFeel selectedLaf = settings.getSelectedLookAndFeel();\r\n if (selectedLaf instanceof PlasticLookAndFeel) {\r\n PlasticLookAndFeel.setPlasticTheme(settings.getSelectedTheme());\r\n PlasticLookAndFeel.setTabStyle(settings.getPlasticTabStyle());\r\n PlasticLookAndFeel.setHighContrastFocusColorsEnabled(\r\n settings.isPlasticHighContrastFocusEnabled());\r\n } else if (selectedLaf.getClass() == MetalLookAndFeel.class) {\r\n MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());\r\n }\r\n\r\n // Work around caching in MetalRadioButtonUI\r\n JRadioButton radio = new JRadioButton();\r\n radio.getUI().uninstallUI(radio);\r\n JCheckBox checkBox = new JCheckBox();\r\n checkBox.getUI().uninstallUI(checkBox);\r\n\r\n try {\r\n UIManager.setLookAndFeel(selectedLaf);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't change L&F: \" + e);\r\n }\r\n\r\n }", "private void setupLookAndFeel() {\n SwingUtilities.invokeLater(() -> {\n model.getUserPreferences().getThemeSubject().subscribe((skin) -> {\n try {\n UIManager.setLookAndFeel(new SubstanceLookAndFeel(\n (SubstanceSkin) skin.getTheme().newInstance()\n ) {\n });\n if (frame != null) {\n frame.repaint();\n }\n } catch (UnsupportedLookAndFeelException | InstantiationException | IllegalAccessException e) {\n ExceptionHandler.get().handle(e);\n }\n });\n });\n }", "protected static void initLnF() {\r\n try {\r\n if (!\"com.sun.java.swing.plaf.motif.MotifLookAndFeel\".equals(UIManager.getSystemLookAndFeelClassName())\r\n && !\"com.sun.java.swing.plaf.gtk.GTKLookAndFeel\".equals(UIManager.getSystemLookAndFeelClassName())\r\n && !UIManager.getSystemLookAndFeelClassName().equals(UIManager.getLookAndFeel().getClass().getName())) {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setForeground(new java.awt.Color(255, 255, 255));\n setUndecorated(true);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }", "protected abstract JDialog createDialog();", "public JFind2() {\n try {\n String metal = \"javax.swing.plaf.metal.MetalLookAndFeel\";\n String synth = \"javax.swing.plaf.synth.SynthLookAndFeel\"; // --> since JDK-1.5\n\n String gtk = \"com.sun.java.swing.plaf.gtk.GTKLookAndFeel\"; // -> since JDK-1.4\n\n String motif = \"com.sun.java.swing.plaf.motif.MotifLookAndFeel\";\n String windows = \"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\";\n\n String os = System.getProperty(\"os.name\");\n if (os.startsWith(\"Linux\")) {\n try // Install client system look and feel.\n {\n UIManager.setLookAndFeel(metal);\n } catch (Exception e) {\n }\n } else {\n try // Install client system look and feel.\n {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (Exception e) {\n }\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n preInit();\n initComponents();\n postInit();\n\n }", "public void applyLookAndFeel() {\n\r\n\t\tLookAndFeelInfo[] infos = UIManager.getInstalledLookAndFeels();\r\n\r\n\t\tif (look < 0) {\r\n\t\t\tfor (int i = 0; i < infos.length; i++) {\r\n\t\t\t\tif (infos[i].getName().toUpperCase().contains(\"NIMBUS\")) {\r\n\t\t\t\t\tlook = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (look < 0) {\r\n\t\t\tfor (int i = 0; i < infos.length; i++) {\r\n\t\t\t\tif (infos[i].getName().toUpperCase().contains(\"WINDOW\")) {\r\n\t\t\t\t\tlook = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlook = (Math.abs(look) % infos.length);\r\n\r\n\t\tString lookName = infos[look].getName();\r\n\r\n\t\ttry {\r\n \t\tUIManager.setLookAndFeel(infos[look].getClassName());\r\n \t\tsetTitle(JMTKResizer.ABOUT + \" - \" + lookName);\r\n \tSwingUtilities.updateComponentTreeUI(this);\r\n \t\t//pack();\r\n\r\n \t} catch (Exception e) {\r\n \t\te.printStackTrace();\r\n \t}\r\n\t}", "private LookAndFeelManager() {}", "public examreports() {\n dblogincred();\n initComponents();\n try {\n for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n} catch (Exception e) {\n // If Nimbus is not available, you can set the GUI to another look and feel.\n}\n }", "public void inicializar() {\r\n\t\ttry {\r\n\t\t\tsetDefaultLookAndFeelDecorated(true);\r\n\t\t\tcom.jtattoo.plaf.hifi.HiFiLookAndFeel.setTheme(\"Large-Font\", \"INSERT YOUR LICENSE KEY HERE\",\r\n\t\t\t\t\t\"Gallery of Fantastic Puzzles\");\r\n\t\t\tUIManager.setLookAndFeel(\"com.jtattoo.plaf.hifi.HiFiLookAndFeel\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Configuración del JDialog\r\n\t\tsetBounds(100, 100, 450, 300);\r\n\t\tthis.setLocationRelativeTo(null);\r\n\t\t\r\n\t\tgetContentPane().setLayout(new BorderLayout());\r\n\t\tcontentPanel.setLayout(new FlowLayout());\r\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\r\n\t\t\r\n\t\t//Componentes del JDialog\r\n\t\t{\r\n\t\t\t//TEXTO DE BIENVENIDA\r\n\t\t\tdtrpnBienve = new JEditorPane();\r\n\t\t\tdtrpnBienve.setOpaque(false);\r\n\t\t\tdtrpnBienve.setEditable(false);\r\n\t\t\tdtrpnBienve.setPreferredSize(new Dimension(400, 130));\r\n\t\t\tdtrpnBienve.setFont(new Font(\"Segoe UI\", Font.BOLD, 15));\r\n\t\t\tdtrpnBienve.setText(\r\n\t\t\t\t\t\"Bienvenido/a a GFPuzzles, la aplicación desarrollada por \\r\\nAlige Development para la Gestión de su Galería de Arte\\r\\n\\r\\nPara más información, consulte los siguientes \\r\\napartados del menú Ayuda.\");\r\n\t\t\tcontentPanel.add(dtrpnBienve);\r\n\t\t}\r\n\t\t{\r\n\t\t\t//ICONO CORPORATIVO\r\n\t\t\tlblNewLabel = new JLabel(\"\");\r\n\t\t\tlblNewLabel.setVerticalAlignment(SwingConstants.BOTTOM);\r\n\t\t\tlblNewLabel.setIcon(new ImageIcon(DialogBienve.class.getResource(\"/images/19-70x70.png\")));\r\n\t\t\tcontentPanel.add(lblNewLabel);\r\n\t\t}\r\n\t\t{\r\n\t\t\t//PANEL DESTINADO PARA LOS BOTONES\r\n\t\t\tbuttonPane = new JPanel();\r\n\t\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\r\n\t\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\r\n\t\t\t{\r\n\t\t\t\t//BOTON OK\r\n\t\t\t\tbtnOkBienve = new JButton(\"OK\");\r\n\t\t\t\tbtnOkBienve.addActionListener(new ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\t\tDialogBienve.this.dispose();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tbtnOkBienve.setActionCommand(\"OK\");\r\n\t\t\t\tbuttonPane.add(btnOkBienve);\r\n\t\t\t\tgetRootPane().setDefaultButton(btnOkBienve);\r\n\t\t\t}\r\n\t\t\t{\r\n\t\t\t\t//etiqueta utilizada para separar el icono del cuadro de texto\r\n\t\t\t\tlblNewLabel_1 = new JLabel(\"\");\r\n\t\t\t\tlblNewLabel_1.setPreferredSize(new Dimension(30, 14));\r\n\t\t\t\tlblNewLabel_1.setMinimumSize(new Dimension(246, 14));\r\n\t\t\t\tlblNewLabel_1.setMaximumSize(new Dimension(246, 14));\r\n\t\t\t\tbuttonPane.add(lblNewLabel_1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public static JDialog createDialog(JFrame owner) {\n PlatformInfoPanel panel = new PlatformInfoPanel();\n JDialog dialog = new JDialog(owner, ResourceManager.getResource(PlatformInfoPanel.class, \"Dialog_title\"));\n dialog.getContentPane().add(panel);\n dialog.setSize(panel.getWidth() + 10, panel.getHeight() + 30);\n return dialog;\n}", "public FrmConvertDocScan()\n {\n try\n {\n javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme(new Theme());\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n java.awt.Font aFont = new java.awt.Font(\"Tahoma\", 0, 14);\n UIManager.put(\"OptionPane.font\", aFont);\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n\n initComponents();\n }", "private void applyInitialLook() {\r\n\t\tthis.control.setFont(this.initialFont);\r\n\t\tthis.control.setBackground(this.initialBackgroundColor);\r\n\t\tthis.control.setForeground(this.initialForegroundColor);\r\n\t}", "public static void setLookAndFeel() {\n try {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n\n // TODO: Configure theming colors. UIManager.put(property, new Color(...));\n // {@see http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html}\n\n\t\t\tfinal NimbusLookAndFeel laf = new NimbusLookAndFeel();\n UIManager.setLookAndFeel(laf);\n UIDefaults defaults = laf.getDefaults();\n defaults.put(\"List[Selected].textForeground\",\n laf.getDerivedColor(\"nimbusLightBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List[Selected].textBackground\",\n laf.getDerivedColor(\"nimbusSelectionBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List[Disabled+Selected].textBackground\",\n laf.getDerivedColor(\"nimbusSelectionBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List[Disabled].textForeground\",\n laf.getDerivedColor(\"nimbusDisabledText\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List:\\\"List.cellRenderer\\\"[Disabled].background\",\n laf.getDerivedColor(\"nimbusSelectionBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n\n } catch (Exception e) {}\n }", "public SelectColorDialog(JFrame parent) {\n\t\tsuper(parent, ModalityType.APPLICATION_MODAL);\n\t\tint size = 190;\n\t\tsetUndecorated(true);\n\t\tsetLocationRelativeTo(null);\n\t\tsetLocation(100, 100);\n\t\tsetIconImage(new ImageIcon(new ImageIcon(ViewSettings.class.getResource(\"/images/uno_logo.png\")).getImage()\n\t\t\t\t.getScaledInstance(40, 40, Image.SCALE_SMOOTH)).getImage());\n\t\tsetSize(size, size);\n\t\tDimension resoltion = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tsetLocation((int) (resoltion.getWidth() / 2 - size / 2), (int) (resoltion.getHeight() / 2 - size / 2));\n\t\tViewSettings.setupPanel(contentPanel);\n\n\t\tcontentPanel.addMouseMotionListener(new MouseMotionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\tint x = e.getXOnScreen();\n\t\t\t\tint y = e.getYOnScreen();\n\t\t\t\tSelectColorDialog.this.setLocation(x - xx, y - xy);\n\t\t\t}\n\t\t});\n\t\tcontentPanel.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\txx = e.getX();\n\t\t\t\txy = e.getY();\n\t\t\t}\n\t\t});\n\t\tint gap = 4;\n\t\tint boxSize = ((size - (gap * 2)) / 2) - 2;\n\t\tJButton red = ViewSettings.createButton(gap, gap, boxSize, boxSize, new Color(245, 100, 98), \"\");\n\t\tred.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcolor = \"red\";\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tcontentPanel.add(red);\n\n\t\tJButton blue = ViewSettings.createButton(size / 2, gap, boxSize, boxSize, new Color(0, 195, 229), \"\");\n\t\tblue.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcolor = \"blue\";\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tcontentPanel.add(blue);\n\n\t\tJButton green = ViewSettings.createButton(gap, size / 2, boxSize, boxSize, new Color(47, 226, 155), \"\");\n\t\tgreen.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcolor = \"green\";\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tcontentPanel.add(green);\n\n\t\tJButton yellow = ViewSettings.createButton(size / 2, size / 2, boxSize, boxSize, new Color(247, 227, 89), \"\");\n\t\tyellow.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcolor = \"yellow\";\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tcontentPanel.add(yellow);\n\n\t\tgetContentPane().add(contentPanel);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\n\t}", "private void menuClassicActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuClassicActionPerformed\n try {\n UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel\");\n SwingUtilities.updateComponentTreeUI(this);\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "protected void setLightBoxBackground() { Console.setBackground(Console.BLUE); }", "private void applyBackgroundColor() {\r\n\t\tthis.control.setBackground(PromptSupport.getBackground(this.control));\r\n\t}", "public Q4() {\n initComponents();\n looks=UIManager.getInstalledLookAndFeels();\n }", "void openDialog()\n {\n if(main.copyCmd.listEvCopy.size() >0){\n widgCopy.setBackColor(GralColor.getColor(\"rd\"), 0);\n } else {\n widgCopy.setBackColor(GralColor.getColor(\"wh\"), 0);\n }\n \n windStatus.setFocus(); //setWindowVisible(true);\n\n }", "private void initialization() {\n this.setLocationRelativeTo(null);\n this.setDefaultCloseOperation(HIDE_ON_CLOSE);\n inputSearch.setBackground(new Color(0,0,0,0));\n inputSearch.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 0, new Color(12,152,232)));\n }", "@Override\n\t\tpublic void popupMenuWillBecomeInvisible(PopupMenuEvent e) {\n\t\t\tif (cbx.getSelectedIndex()==0)\n\t\t\t\treturn;\n\t\t\ttry{\n\t\t\t\tif (cbx.getSelectedItem().equals(\"Windows (Initial)\")){\n\t\t\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n\t\t\t\t}\n\t\t\t\telse if (cbx.getSelectedItem().equals(\"WindowsClassic\")){\n\t\t\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel\");\n\t\t\t\t}\n\t\t\t\telse if (cbx.getSelectedItem().equals(\"Motif\")){\n\t\t\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.motif.MotifLookAndFeel\");\n\t\t\t\t}\n\t\t\t\t//else if (cbx.getSelectedItem().equals(\"Nimbus\")){\n\t\t\t\t//\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n\t\t\t\t//}\n\t\t\t\tSwingUtilities.updateComponentTreeUI(f);\n\t\t\t\tSwingUtilities.updateComponentTreeUI(main);\n\t\t\t} catch (Exception ex){}\n\t\t}", "private void setDialog()\n {\n //this.setSize(350,500);\n this.setTitle(Constant.getTextBundle(\"ปฏิกิริยาต่อกัน\"));\n Toolkit thekit = this.getToolkit(); \n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation((screenSize.width-this.getSize().width)/2, (screenSize.height-this.getSize().height)/2);\n }", "public Libreta() {\n\n this.setUndecorated(true);\n initComponents();\n this.setLocationRelativeTo(null);\n transparenciButton();\n }", "private void setupSwing() {\r\n SwingUtilities.invokeLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n \r\n try {\r\n for (LookAndFeelInfo info: UIManager.getInstalledLookAndFeels()) {\r\n if (info.getName().equals(\"Windows\")) {\r\n UIManager.setLookAndFeel(info.getClassName());\r\n }\r\n }\r\n } catch (ClassNotFoundException \r\n | InstantiationException\r\n | IllegalAccessException \r\n | UnsupportedLookAndFeelException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n \r\n window = new ManagerWindow(MetagridManager.this);\r\n window.pack();\r\n window.setVisible(true);\r\n }\r\n });\r\n }", "private static void createAndShowGUI() {\r\n //Make sure we have nice window decorations.\r\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n JDialog.setDefaultLookAndFeelDecorated(true);\r\n\r\n //Create and set up the window.\r\n JFrame frame = new SplitPaneDemo2();\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "private static void JGUI() {\n\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\"Eggs are not supposed to be green.\");\n\t\t// custom title, warning icon\n\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\"Eggs are not supposed to be green.\",\n\t\t\t\t\"Inane warning\",\n\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t\t// custom title, error icon*/\n\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\"Eggs are not supposed to be green.\",\n\t\t\t\t\"Inane error\",\n\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t// custom title, no icon\n\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\"Eggs are not supposed to be green.\",\n\t\t\t\t\"A plain message\",\n\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\tIcon icon = null;\n\t\t// custom title, custom icon\n\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\"Eggs are not supposed to be green.\",\n\t\t\t\t\"Inane custom dialog\",\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE,\n\t\t\ticon);\n\t}", "public Egresos() {\n this.setUndecorated(true);\n initComponents();\n }", "public static void setupDialogSkinsDefaults()\n\t{\n\n\t\tif(! dialogSkins.containsKey(\"default\"))\n\t\t\taddDialogSkin(\"default\", new StandardDialogSkin());\n\n\t\tif(! dialogSkins.containsKey(\"hand-held\"))\n\t\t\taddDialogSkin(\"hand-held\", new HandHeldDialogSkin());\n\n\t\thaveDialogSkinsDefaults = true;\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setOpaque(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public LetJDialog(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents(); \n }", "public TiffTestFrame() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n JDialog.setDefaultLookAndFeelDecorated(true);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n initComponents();\n fc = new JFileChooser();\n //fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n //fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n }", "public MainWindowAlt() {\n initComponents();\n //this.getContentPane().setBackground(Color.CYAN);\n }", "public static void main(String args[]) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(ExtensionPicker.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(ExtensionPicker.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(ExtensionPicker.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(ExtensionPicker.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ExtensionPicker.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n Logger.getLogger(ExtensionPicker.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n Logger.getLogger(ExtensionPicker.class.getName()).log(Level.SEVERE, null, ex);\n } catch (UnsupportedLookAndFeelException ex) {\n Logger.getLogger(ExtensionPicker.class.getName()).log(Level.SEVERE, null, ex);\n }\n new ExtensionPicker();\n }\n });\n\n }", "public MyDialog(){\n\t\t\n\t\tsuper();\n\t\t\n\t\tthis.getContentPane().setBackground(Color.GRAY);\n//\t\tthis.setLayout(new GridLayout(0,1));\n//\t\tthis.setLayout(new FlowLayout());\n//\t\tthis.setBackground(new Color(250, 240, 230));\n//\t\tcomp.setSize(icon.getIconWidth(),icon.getIconHeight());\n//\t\tcomp.setLocation(0, 0);\n//\t\tcomp.setOpaque(false);\n//\t\tthis.add(comp);\n\t}", "public CalculatorGUI() {\n initComponents();\n setTitle(\"Calculator\");\n //setLookAndFeel(\"Windows\");\n }", "private void configureWindow() {\n\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n background.setBackground(Color.BLACK);\n setSize(initialWindowWidth, initialWindowHeight);\n setVisible(true);\n }", "@Override\n\tpublic LookAndFeelMenu createLookAndFeelMenu() {\n\t\treturn null;\n\t}", "public static void main(String args[]) {\n try {\n UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n }\n });\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n \n new MainFrame().setVisible(true);\n \n }\n });\n }", "private static void createAndShowGUI() {\n //Make sure we have nice window decorations.\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"MRALD Color Chooser\");\n\n //Create and set up the content pane.\n JComponent newContentPane = new MraldColorChooser(coloringItems);\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n ventanaReset = new javax.swing.JDialog();\n botonReiniciar = new javax.swing.JButton();\n labelGanador = new javax.swing.JLabel();\n labelPerdedor = new javax.swing.JLabel();\n\n ventanaReset.getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n botonReiniciar.setText(\"Reiniciar\");\n botonReiniciar.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n botonReiniciarMousePressed(evt);\n }\n });\n ventanaReset.getContentPane().add(botonReiniciar, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 120, -1, -1));\n\n labelGanador.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n labelGanador.setText(\"HAS GANADO, FELICIDADES\");\n labelGanador.setPreferredSize(new java.awt.Dimension(400, 20));\n ventanaReset.getContentPane().add(labelGanador, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 10, -1, -1));\n\n labelPerdedor.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n labelPerdedor.setText(\"HAS PERDIDO POR IMBECIL\");\n labelPerdedor.setPreferredSize(new java.awt.Dimension(400, 20));\n labelPerdedor.setRequestFocusEnabled(false);\n ventanaReset.getContentPane().add(labelPerdedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 10, -1, -1));\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 780, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 364, Short.MAX_VALUE)\n );\n\n pack();\n }", "ColorSelectionDialog() {\n initComponents();\n }", "private void Settings(){\n setUndecorated(true); \r\n\t setSize(250,70);\r\n\t setLocationRelativeTo(null);\r\n setAlwaysOnTop(true);\r\n\t setVisible(true);\r\n \r\n addMouseListener(new HandleStatusDialog());\r\n addWindowListener(new HandleStatusDialog());\r\n }", "public TestDialog(java.awt.Frame parent, boolean modal)\n {\n super(parent, modal);\n initComponents();\n setLocationByPlatform(true);\n\n }", "public StandardDialog() {\n super();\n init();\n }", "public void paintWheel() {\n \t\n //initialColor is the initially-selected color to be shown in the rectangle on the left of the arrow.\n //for example, 0xff000000 is black, 0xff0000ff is blue. Please be aware of the initial 0xff which is the alpha.\n AmbilWarnaDialog dialog = new AmbilWarnaDialog(c, currentColor, new OnAmbilWarnaListener() {\n \n // Executes, when user click Cancel button\n @Override\n public void onCancel(AmbilWarnaDialog dialog){\n }\n \n // Executes, when user click OK button\n @Override\n public void onOk(AmbilWarnaDialog dialog, int color) {\n \t\n \tcurrentColor=color;\n \t//convert RGB values to float(0-1) for OpenGL use\n \tfloat r=(float)Color.red(color)/255;\n \tfloat g=(float)Color.green(color)/255;\n \tfloat b=(float)Color.blue(color)/255;\n \t\n \tsetModelColor(r,g,b);\n }\n });\n dialog.show();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public void setup() {\n self.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n // make dialog background unselectable\n self.setCanceledOnTouchOutside(false);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(102, 102, 102));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 600, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 600, Short.MAX_VALUE)\n );\n }", "private JFrame makeOptionsFrame(){\n MenuBarHandler menuBarHandler = new MenuBarHandler();\n JFrame optionsFrame = new JFrame(\"Options\");\n optionsFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n optionsFrame.setResizable(false);\n optionsFrame.setLocationRelativeTo(frame);\n followRedirect = new JCheckBox(\"follow redirect\");\n followRedirect.setSelected(true);\n followRedirect.addActionListener(menuBarHandler);\n hideOnSystemTray = new JCheckBox(\"Hide to tray\");\n hideOnSystemTray.addActionListener(menuBarHandler);\n ButtonGroup themes = new ButtonGroup();\n JRadioButton light = new JRadioButton(\"Light theme\");\n light.setSelected(true);\n JRadioButton dark = new JRadioButton(\"Dark theme\");\n light.addActionListener(menuBarHandler);\n dark.addActionListener(menuBarHandler);\n themes.add(light);\n themes.add(dark);\n optionsFrame.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n optionsFrame.add(hideOnSystemTray, c);\n optionsFrame.add(followRedirect, c);\n c.gridy = 1;\n optionsFrame.add(light, c);\n c.gridy = 2;\n optionsFrame.add(dark, c);\n optionsFrame.pack();\n return optionsFrame;\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the dialog */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n DialogUsuarioView dialog = new DialogUsuarioView(new javax.swing.JFrame(), true);\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent e) {\n System.exit(0);\n }\n });\n dialog.setVisible(true);\n } catch (DAOException ex) {\n Logger.getLogger(DialogUsuarioView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n });\n }", "private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(DlgConsultarAluno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(DlgConsultarAluno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(DlgConsultarAluno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(DlgConsultarAluno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n java.awt.EventQueue.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n DlgConsultarAluno dialog = new DlgConsultarAluno(new javax.swing.JFrame(), true);\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent e) {\n System.exit(0);\n }\n });\n dialog.setVisible(true);\n }\n });\n }", "public ReplayDialog(JFrame owner, boolean modal) {\n\t\tjd = new JDialog(owner, modal);\n\t\tjd.setContentPane(new RepalyPanel());\n\t\tjd.setUndecorated(true);\n\t\tjd.setBackground(new Color(0f, 0f, 0f, 0f));\n\t\tjd.setSize(912, 513);\n\t\tjd.setLocation(owner.getLocation());\n\t\tjd.setVisible(true);\n\t}", "public GUI() {\n initComponents();\n this.jComboBox1.setEnabled(false);\n this.jButton2.setEnabled(false);\n this.jButton3.setEnabled(false);\n this.jTextArea1.setEnabled(false);\n getContentPane().setBackground(java.awt.Color.getHSBColor((float) 0.62, (float) 0.55, (float) 0.55));\n }", "public Colaborador() {\n\n this.setUndecorated(true);\n initComponents();\n this.setLocationRelativeTo(null);\n transparenciButton();\n }", "private void setAppearance(String className) {\n DweezilUIManager.setLookAndFeel(className, new Component[]{MainFrame.getInstance(), StatusWindow.getInstance(),\n PrefsSettingsPanel.this.getParent().getParent()});\n\n }", "private void initComponents() {\n\t\ttext = new JTextField(9);\n\t\ttext.setEditable(false);\n\t\ttext.setFont(new Font(Font.DIALOG, Font.PLAIN, FONT_SIZE));\n\t\ttext.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\n\t\tthis.add(text);\n\t\tthis.pack();\n\t}", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(TelaConfiguracoes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(TelaConfiguracoes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(TelaConfiguracoes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(TelaConfiguracoes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the dialog */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n TelaConfiguracoes dialog = new TelaConfiguracoes(new javax.swing.JFrame(), true);\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent e) {\n System.exit(0);\n }\n });\n dialog.setVisible(true);\n }\n });\n }", "public Nouveau(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n getContentPane().setBackground(Color.white);\n }", "protected void installDefaults() {\n\t\tColor bg = this.controlPanel.getBackground();\n\t\tif (bg == null || bg instanceof UIResource) {\n\t\t\tthis.controlPanel.setBackground(FlamingoUtilities.getColor(\n\t\t\t\t\tColor.lightGray, \"ControlPanel.background\",\n\t\t\t\t\t\"Panel.background\"));\n\t\t}\n\n\t\tBorder b = this.controlPanel.getBorder();\n\t\tif (b == null || b instanceof UIResource) {\n\t\t\tBorder toSet = UIManager.getBorder(\"ControlPanel.border\");\n\t\t\tif (toSet == null)\n\t\t\t\tnew BorderUIResource.EmptyBorderUIResource(1, 2, 1, 2);\n\t\t\tthis.controlPanel.setBorder(toSet);\n\t\t}\n\t\t\n\t\tFont font = this.controlPanel.getFont();\n if (font == null || font instanceof UIResource) {\n Font toSet = UIManager.getFont(\"Panel.font\");\n this.controlPanel.setFont(toSet);\n }\n\t}", "private void applyTermOptions() {\n\tif (term == null)\n\t return;\n\n term.setFixedFont(true);\n term.setFont(termOptions().getFont());\n\n\tterm.setBackground(termOptions().getBackground());\n\tterm.setForeground(termOptions().getForeground());\n\tterm.setHighlightColor(termOptions().getSelectionBackground());\n\tterm.setHistorySize(termOptions().getHistorySize());\n\tterm.setTabSize(termOptions().getTabSize());\n\n\tterm.setClickToType(termOptions().getClickToType());\n\tterm.setScrollOnInput(termOptions().getScrollOnInput());\n\tterm.setScrollOnOutput(termOptions().getScrollOnOutput());\n\tterm.setHorizontallyScrollable(!termOptions().getLineWrap());\n\n\t// If we change the font from smaller to bigger, the size\n\t// calculations go awry and the last few lines are forever hidden. \n\t//\n\t// One usually uses 'pack()' but it doesn't work because it\n\t// applies only to JFrames an under vulcan in MDI mode it had\n\t// catastrophic results (the whole window gets maximized, etc.)\n\t//\n\t// The following is a workaround used in the Rtc windows' \n\t// componentShown() as a fix for\n\t// 4652678 (Memory Usage window and Access Errors window are ...)\n\n\tsetSize(getPreferredSize());\n\tvalidate();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \n private void initComponents() {\n\n setBackground(new java.awt.Color(102, 0, 102));\n setForeground(new java.awt.Color(153, 0, 102));\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(0, 300, Short.MAX_VALUE)\n );\n }", "protected void installDefaults()\n {\n String prefix = getPropertyPrefix();\n Font f = editor.getFont();\n if ((f == null) || (f instanceof UIResource)) {\n editor.setFont(UIManager.getFont(prefix + \".font\"));\n }\n\n Color bg = editor.getBackground();\n if ((bg == null) || (bg instanceof UIResource)) {\n editor.setBackground(UIManager.getColor(prefix + \".background\"));\n }\n\n Color fg = editor.getForeground();\n if ((fg == null) || (fg instanceof UIResource)) {\n editor.setForeground(UIManager.getColor(prefix + \".foreground\"));\n }\n\n Color color = editor.getCaretColor();\n if ((color == null) || (color instanceof UIResource)) {\n editor.setCaretColor(UIManager.getColor(prefix + \".caretForeground\"));\n }\n\n Color s = editor.getSelectionColor();\n if ((s == null) || (s instanceof UIResource)) {\n editor.setSelectionColor(UIManager.getColor(prefix + \".selectionBackground\"));\n }\n\n Color sfg = editor.getSelectedTextColor();\n if ((sfg == null) || (sfg instanceof UIResource)) {\n editor.setSelectedTextColor(UIManager.getColor(prefix + \".selectionForeground\"));\n }\n\n Color dfg = editor.getDisabledTextColor();\n if ((dfg == null) || (dfg instanceof UIResource)) {\n editor.setDisabledTextColor(UIManager.getColor(prefix + \".inactiveForeground\"));\n }\n\n Border b = editor.getBorder();\n if ((b == null) || (b instanceof UIResource)) {\n editor.setBorder(UIManager.getBorder(prefix + \".border\"));\n }\n\n Insets margin = editor.getMargin();\n if (margin == null || margin instanceof UIResource) {\n editor.setMargin(UIManager.getInsets(prefix + \".margin\"));\n }\n\n updateCursor();\n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "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}", "private void initComponents() {\n\n setBackground(java.awt.Color.lightGray);\n setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 394, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 294, Short.MAX_VALUE)\n );\n }", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (Exception ex) {\r\n\t\t}\r\n\t}", "protected void setBoxBackground() { Console.setBackground(Console.RED); }", "protected void installDefaults() {\n this.controlPanel.setBackground(null);\n\n Font font = this.controlPanel.getFont();\n if (font == null || font instanceof UIResource) {\n Font toSet = RadianceThemingCortex.GlobalScope.getFontPolicy().getFontSet().\n getControlFont();\n this.controlPanel.setFont(toSet);\n }\n }", "private JDialog getJDialog() {\r\n\t\tif (jDialog == null) {\r\n\t\t\tjDialog = new JDialog(this);\r\n\t\t\tjDialog.setSize(new Dimension(227, 154));\r\n\t\t\tjDialog.setTitle(\"Add Proxy\");\r\n\r\n\t\t\tjDialog.setContentPane(getJContentPane1());\r\n\r\n\t\t}\r\n\t\treturn jDialog;\r\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\ttry{\n\t\t\t\tUIManager.setLookAndFeel(className);\n\t\t\t\tSwingUtilities.updateComponentTreeUI(PlatFrame.this);\n\t\t\t\tpack();\n\t\t\t}catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "private void initComponents() {\n\n setFocusLostBehavior(javax.swing.JFormattedTextField.COMMIT);\n }", "protected void installDefaults() {\n spinner.setLayout(createLayout());\n LookAndFeel.installBorder(spinner, \"Spinner.border\");\n LookAndFeel.installColorsAndFont(spinner, \"Spinner.background\", \"Spinner.foreground\", \"Spinner.font\"); }", "public HoloJFrame() {\n Java2.setSystemLookAndFeel();\n initComponents();\n initFileList(holoCB);\n initFileList(refCB);\n\t\t\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n TextCrmv = new javax.swing.JTextField();\n TextSenha = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n Exit = new javax.swing.JLabel();\n IconeUser = new javax.swing.JLabel();\n IconeUser1 = new javax.swing.JLabel();\n Senha = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n User = new javax.swing.JLabel();\n Telinha = new javax.swing.JLabel();\n BG = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n TextCrmv.setBackground(new java.awt.Color(232, 235, 244));\n TextCrmv.setBorder(null);\n getContentPane().add(TextCrmv, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 370, 160, 30));\n\n TextSenha.setBackground(new java.awt.Color(232, 235, 244));\n TextSenha.setBorder(null);\n getContentPane().add(TextSenha, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 460, 150, 30));\n\n jLabel1.setBackground(new java.awt.Color(232, 235, 244));\n jLabel1.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(0, 51, 51));\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/BotAlterar_1.png\"))); // NOI18N\n jLabel1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel1MouseClicked(evt);\n }\n });\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 540, 170, 60));\n\n Exit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/Sair2.png\"))); // NOI18N\n getContentPane().add(Exit, new org.netbeans.lib.awtextra.AbsoluteConstraints(990, 650, -1, -1));\n\n IconeUser.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/Senha .png\"))); // NOI18N\n getContentPane().add(IconeUser, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 460, -1, -1));\n\n IconeUser1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/User.png\"))); // NOI18N\n getContentPane().add(IconeUser1, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 370, -1, -1));\n\n Senha.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/Botao.png\"))); // NOI18N\n getContentPane().add(Senha, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 450, -1, -1));\n\n jLabel2.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n jLabel2.setText(\"NOVA SENHA\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 430, 100, -1));\n\n jLabel3.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n jLabel3.setText(\"CRMV\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 340, 50, -1));\n\n User.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/Botao.png\"))); // NOI18N\n getContentPane().add(User, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 360, -1, -1));\n\n Telinha.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/Telinha_1.png\"))); // NOI18N\n Telinha.setAlignmentX(360.0F);\n Telinha.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n Telinha.setVerifyInputWhenFocusTarget(false);\n Telinha.setVerticalTextPosition(javax.swing.SwingConstants.TOP);\n getContentPane().add(Telinha, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 60, -1, -1));\n\n BG.setBackground(new java.awt.Color(102, 255, 102));\n BG.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icones/BG_1.png\"))); // NOI18N\n BG.setPreferredSize(new java.awt.Dimension(1080, 720));\n getContentPane().add(BG, new org.netbeans.lib.awtextra.AbsoluteConstraints(-20, 0, 1100, -1));\n\n pack();\n setLocationRelativeTo(null);\n }", "public void paintComponent(Graphics g) {\r\n\t\tGraphics2D g2 = (Graphics2D) g;\r\n\t\tg2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\r\n\r\n\t\tRectangle text_field_rect = new Rectangle(0, 0, DEFAULT_WIDTH\r\n\t\t\t\t- DEFAULT_HEIGHT - 1, DEFAULT_HEIGHT);\r\n\t\tRectangle button_rect = new Rectangle(DEFAULT_WIDTH - DEFAULT_HEIGHT,\r\n\t\t\t\t0, DEFAULT_HEIGHT, DEFAULT_HEIGHT);\r\n\r\n\t\tif (this.enabled)\r\n\t\t g2.setColor(Color.white);\r\n\t\telse\r\n\t\t g2.setColor(this.colorDisabled);\t\r\n\t\t\r\n\t\tg2.fillRect(text_field_rect.x, text_field_rect.y,\r\n\t\t\t\ttext_field_rect.width, text_field_rect.height);\r\n\r\n\t\tFont font = new Font(\"Dialog\", Font.PLAIN, 10);\r\n\t\tg2.setFont(font);\r\n\r\n\t\tFontMetrics metrics = getFontMetrics(font);\r\n\t\tint str_height = metrics.getHeight();\r\n\t\tint str_descent = metrics.getDescent();\r\n\r\n\t\tg2.setColor(Color.black);\r\n\t\tg2.drawString(this.label, 4, text_field_rect.height / 2 + str_height\r\n\t\t\t\t/ 2 - str_descent);\r\n\r\n\t\tg2.setColor(Color.gray);\r\n\t\tg2.draw3DRect(text_field_rect.x, text_field_rect.y,\r\n\t\t\t\ttext_field_rect.width, text_field_rect.height, false);\r\n\r\n\t\tg2.translate(button_rect.x, button_rect.y);\r\n\t\tint w = button_rect.width;\r\n\t\tint h = button_rect.height;\r\n\r\n\t\tg2.setColor(Color.black);\r\n\t\tg2.drawRect(0, 0, w - 1, h - 1);\r\n\t\tg2.setColor(Color.lightGray);\r\n\t\tg2.fill3DRect(0, 0, w - 1, h - 1, !selected);\r\n\r\n\t\tint w_3 = (int) ((float) w / (float) 3);\r\n\t\tint w_3_times_2 = 2 * w_3;\r\n\t\tint w_2 = (int) ((float) w / (float) 2);\r\n\t\tint h_3 = (int) ((float) h / (float) 3);\r\n\t\tint h_3_times_2 = 2 * (int) h / 3;\r\n\r\n\t\tPolygon p = new Polygon();\r\n\t\tp.addPoint(w_3, h_3);\r\n\t\tp.addPoint(w_3_times_2, h_3);\r\n\t\tp.addPoint(w_2, h_3_times_2);\r\n\r\n\t\tg2.setColor(Color.black);\r\n\t\tg2.fillPolygon(p);\r\n\r\n\t\tg2.translate(-button_rect.x, -button_rect.y);\r\n\t}", "@SuppressWarnings(\"unused\")\n private static void activateNimbus() //just for testing reasons\n {\n try {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (Exception e) {\n log.warn(\"error in nimbus activation?\", e);\n }\n }", "protected void uninstallDefaults() {\n LookAndFeel.uninstallBorder(this.controlPanel);\n }", "private static void createAndShowGUI() {\r\n //Make sure we have nice window decorations.\r\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n JDialog.setDefaultLookAndFeelDecorated(true);\r\n\r\n //Create and set up the window.\r\n JFrame frame = new JFrame(\"SplitPaneDemo\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n SplitPaneDemo splitPaneDemo = new SplitPaneDemo();\r\n frame.getContentPane().add(splitPaneDemo.getSplitPane());\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "public void setLAF(String lookAndFeelStr) {\n String exceptionNotice = \"\";\n try {\n // Set the font for Metal LAF to non-bold, in case Metal is used\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n if (lookAndFeelStr == null || lookAndFeelStr.equalsIgnoreCase(\"Metal\")) {\n UIManager.setLookAndFeel(new MetalLookAndFeel());\n } else\n if (lookAndFeelStr.equalsIgnoreCase(\"Nimbus\")) {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (info.getName().equals(\"Nimbus\")) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } else {\n UIManager.setLookAndFeel(lookAndFeelStr);\n }\n } catch (UnsupportedLookAndFeelException e) {\n exceptionNotice = \"UnsupportedLookAndFeelException\";\n } catch (ClassNotFoundException e) {\n exceptionNotice = \"ClassNotFoundException\";\n } catch (InstantiationException e) {\n exceptionNotice = \"InstantiationException\";\n } catch (IllegalAccessException e) {\n exceptionNotice = \"IllegalAccessException\";\n } finally {\n if (! exceptionNotice.isEmpty()) {\n try {\n // The desired LAF was not created, so try to use the Metal LAF as a default.\n UIManager.setLookAndFeel(new MetalLookAndFeel());\n } catch (UnsupportedLookAndFeelException e) {\n logger.error(\"Could not initialize the Swing Look and Feel settings, MCT is closing.\");\n System.exit(1);\n }\n }\n }\n // Look and Feel has been successfully created, now set colors\n initializeColors(UIManager.getLookAndFeel());\n Properties props = new Properties();\n String filename = System.getProperty(viewColor,\"resources/properties/viewColor.properties\");\n FileReader reader = null;\n try {\n \treader = new FileReader(filename);\n \tprops.load(reader);\n BASE_PROPERTIES = new ColorScheme(props);\n BASE_PROPERTIES.applyColorScheme(); // Apply top-level color bindings\n } catch (Exception e) {\n logger.warn(\"Using default color and font properties because could not open viewColor properties file :\"+filename);\n BASE_PROPERTIES = new ColorScheme();\n } finally {\n \ttry {\n if (reader != null) reader.close();\n } catch(IOException ioe1){ }\n }\n }", "@Override\r\n\tpublic void run() {\n\t\ttry {\r\n\t\t\tLookAndFeelInfo look[] = UIManager.getInstalledLookAndFeels();\r\n\t\t\tfor (LookAndFeelInfo lookAndFeelInfo : look) {\r\n\r\n\t\t\t\tSystem.out.println(lookAndFeelInfo.getClassName());\r\n\t\t\t}\r\n\t\t\tUIManager.setLookAndFeel(this.config.getLookAndFeel());\r\n\t\t} catch (ClassNotFoundException | InstantiationException\r\n\t\t\t\t| IllegalAccessException | UnsupportedLookAndFeelException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tsetVisible(true);\r\n\t}", "public ConfDialog(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n\n setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n\tsetModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);\n initComponents();\n reset();\n }", "public Main() throws FileNotFoundException, IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {\n\n setIconImage(new javax.swing.ImageIcon(getClass().getResource(\"/images/receiptsList.png\")).getImage());\n createDirs();\n // if (Options.toBoolean(Options.DEBUG)) {\n createLogger();\n // }\n Options.getOptions();\n Fonts f = new Fonts();\n f.setDefaultFont(\"Arial\");\n LookAndFeels laf = new LookAndFeels();\n try {\n laf.setLookAndFeel(Options.toString(Options.LOOK_FEEL));\n } catch (Exception ex) {\n try {\n laf.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());\n } catch (Exception ex1) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex1);\n }\n }\n SwingUtilities.updateComponentTreeUI(this);\n\n \n //Skin skin = new Skin(Color.yellow);\n //Skin.applySkin();\n\n logger.log(Level.INFO, \"Initializing components\");\n initComponents();\n\n glassPane = new MyDisabledGlassPane();\n JRootPane root = SwingUtilities.getRootPane(this);\n root.setGlassPane(glassPane);\n logger.log(Level.FINE, \"Components initialized\");\n logger.log(Level.INFO, \"Creating connection to database\");\n Database.createConnection(false);\n if (Options.toBoolean(Options.START_UP_BACKUP)) {\n backUpDb();\n }\n logger.log(Level.FINE, \"Connected to database: {0}\", Options.toString(Options.DATABASE));\n logger.log(Level.INFO, \"Setting the year\");\n setYear();\n logger.log(Level.FINE, \"Year set to : {0}\", Options.YEAR);\n setAppTitle();\n logger.log(Level.INFO, \"Updating panels\");\n updateReceiptPanel();\n updateTotalsPanel();\n logger.log(Level.FINE, \"Panels updated\");\n setLocationRelativeTo(null);\n if (Options.toBoolean(Options.AUTO_UPDATE)) {\n CheckUpdate c = new CheckUpdate(true);\n }\n setVisible(true);\n\n }", "public MainFrame() throws Exception {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n //SynthLookAndFeel laf = new SynthLookAndFeel();\r\n //UIManager.setLookAndFeel(laf);\r\n initComponents();\r\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(VModalReimprimirFactura.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(VModalReimprimirFactura.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(VModalReimprimirFactura.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(VModalReimprimirFactura.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new VModalReimprimirFactura().setVisible(true);\n }\n });\n }" ]
[ "0.7193437", "0.7158969", "0.71535635", "0.7116911", "0.70807356", "0.7001731", "0.69937813", "0.69882953", "0.6497923", "0.6493928", "0.6371413", "0.63059676", "0.6302983", "0.6259267", "0.6246148", "0.62306", "0.62269914", "0.6186905", "0.6161793", "0.6160322", "0.6131184", "0.61131793", "0.60981005", "0.60848814", "0.6080817", "0.60735214", "0.6031171", "0.6019372", "0.6017079", "0.6012625", "0.6003062", "0.5973203", "0.59485024", "0.59257185", "0.5914267", "0.58894145", "0.58782357", "0.5848525", "0.5830079", "0.5809863", "0.5783271", "0.5775972", "0.57645166", "0.57336676", "0.5719999", "0.5698489", "0.56867343", "0.5682694", "0.56823015", "0.5679071", "0.5674148", "0.5652349", "0.562512", "0.5623215", "0.56149036", "0.5613222", "0.5607403", "0.5599049", "0.5581033", "0.557985", "0.5566599", "0.5557458", "0.555386", "0.5552756", "0.5527247", "0.5518856", "0.5515891", "0.5514085", "0.5511576", "0.5505945", "0.5502256", "0.5500421", "0.5493934", "0.5491961", "0.5488348", "0.5484075", "0.5470258", "0.5467417", "0.5462573", "0.54453325", "0.5443488", "0.5436697", "0.54059595", "0.5402405", "0.5392188", "0.53744715", "0.5371445", "0.5370959", "0.5370006", "0.5369225", "0.53589815", "0.535469", "0.5342746", "0.5340151", "0.5338043", "0.5327271", "0.53252953", "0.5320935", "0.5318288", "0.53160256", "0.5310153" ]
0.0
-1
Execute action of tracker.
public abstract void execute(InputCalc input, Calculator calculator);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void executeAction( String actionInfo );", "void executeAction(String action, Map params,\n IPSAgentHandlerResponse response);", "@Override\n\tpublic void execute() {\n\t\tempfaengerA.doAction1();\n\t\tempfaengerA.doAction2();\n\t\tempfaengerA.doAction3();\n\n\t}", "protected void execute() {\n\n\t\t// SmartDashboard.putString(\"DB/String 0\", \"Vision was reached = \" +\n\t\t// Vision.getInstance().reached());\n\n\t\t// checks to see if the trigger is pressed, and sends diff variables\n\t\t// accordingly\n\n\t\tif (DriveTrain.getInstance().orientationTriggerGet()) {\n\t\t\tDriveTrain.getInstance().tankDrive(getLeftStick(), -getRightStick(), squaredInputs);\n\n\t\t} else {\n\t\t\tDriveTrain.getInstance().tankDrive(-getRightStick(), getLeftStick(), squaredInputs);\n\t\t}\n\n\t}", "@Override\n\tprotected void execute() {\n\t\tRobot.collector.setMawOpen(Robot.oi.getCollectorOpen());\n\t\tRobot.collector.setIntakeSpeed(Robot.oi.getCollectorSpeed());\n\t\tRobot.collector.setWristStageOneRetracted(Robot.oi.getWristStageOneRetracted());\n\t\tRobot.collector.setWristStageTwoRetracted(Robot.oi.getWristStageTwoRetracted());\n\t}", "public void execute() {\n\t\tString userID = clientMediator.getUserName();\n\t\tString id = reactToController.communicateWith(userID);\n\t\tif(id != null){\n\t\t\tclientMediator.setReactTo(id);\n\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tString message = reactToController.reactToEntity(id,userID);\n\t\t\tString result = \"You just interacted with \" + id + \", so you \" + message + \" at \" + df.format(new Date()).toString();\n\t\t\tclientMediator.setReactResult(result);\n\t\t\tclientMediator.getEventQueue().add(new ReactToEvent(id,userID));\n\t\t}\n\t}", "@Override\r\n\tpublic void execute(ActionContext ctx) {\n\t\t\r\n\t}", "<T> T execute(ZabbixCallback<T> action);", "public void handleAction(Action action){\n\t\tSystem.out.println(action.getActionType().getName() + \" : \" + action.getValue());\n\t\tDroneClientMain.runCommand(\"python george_helper.py \" + action.getActionType().getName().toLowerCase() + \" \" + action.getValue());\n\t}", "Action execute(Context context);", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "public void performAction(HandlerData actionInfo) throws ActionException;", "public void action() {\n action.action();\n }", "public void execute() {\n setExecuted(true);\n }", "@Override\n\tpublic void doExecute(Runnable action) {\n\t\t\n\t}", "public void run() {\n long startTime = 0;\n if (action.getClass().getName().contains(\"TooAction\")) {\n startTime = System.currentTimeMillis();\n LOG.log(Level.WARNING, \"Sending a ToO alert...\");\n }\n\n action.doTriggerAction(change, handback);\n\n // Record the end time and warn if it took too long.\n if (startTime != 0) {\n long curTime = System.currentTimeMillis();\n LOG.log(Level.WARNING, \"Sent ToO alert\");\n\n long elapsed = curTime - startTime;\n if (elapsed > 5000) {\n LOG.log(Level.WARNING, \"Long delay sending ToO alert: \" + elapsed);\n }\n }\n\n }", "protected abstract void actionExecuted(SUT system, State state, Action action);", "protected void execute() {\n \t\n }", "protected void execute() {\n \t\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}", "public void execute() {\r\n\t\r\n\t}", "protected void execute() {\r\n }", "protected void execute() {\n\t\t//execution handled by pid thread\n\t}", "public void execute() {\n\n\t}", "protected void execute() {\n \tRobot.drive.driveWithTarget(target);\n \tSmartDashboard.putNumber(\"Desired target\", target);\n \tSmartDashboard.putNumber(\"current left position\", Robot.drive.left.motor1.getSelectedSensorPosition(0));\n \tSmartDashboard.putNumber(\"current right position\", Robot.drive.right.motor1.getSelectedSensorPosition(0));\n \tSmartDashboard.putNumber(\"Left sped\", Robot.drive.left.motor1.getSelectedSensorVelocity(0));\n \tSmartDashboard.putNumber(\"count\", count);\n \tif (Math.abs(target - Robot.drive.left.getEncoderTicks()) < tolerance) {\n \t\tcount++;\n \t}\n }", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "protected void execute()\n\t{\n\t}", "protected void execute() {\n\t}", "public void executeAction()\n\t{\t\t\n\t\tthis.getUser().setHealth(this.getUser().getHealth()+HEALTH);\n\t}", "abstract public void performAction();", "protected void execute() {\n\n\t}", "public void execute() {\n }", "public void execute() {\n\t\tlaunch();\n\t}", "public void act()\n {\n trackTime();\n showScore();\n \n }", "public void doAction(){}", "protected void execute() {\t\n \ttarget = Robot.trackingCamera.getTargetPosition();\n \t\n \tSmartDashboard.putNumber(\"targetX\", target[0]);\n \tSmartDashboard.putNumber(\"targetY\", target[1]);\n \t\n \tif(target[0] == TrackingCamera.NOTFOUND || lastDistance < 28){\n \t\tsuper.execute();\n \t\treturn;\n \t}\n \t\n \ttargetX = target[0];\n \ttargetY = target[1];\n \t\n \tsuper.execute();\n \t//System.out.println(distance);\n }", "public void performAction();", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "public void execute() {\n _plugin.openNavigator();\n }", "public void execute() {\n\t\t\n\t}", "public void run(IAction action) {\n\t\tMessageDialog.openInformation(window.getShell(), \"AccTrace\",\n\t\t\t\t\"Hello, Eclipse world\");\n\t}", "public void execute() {\n\t\t\n\t\tdrivetrain.updateAnglePID();\n\t\t\n//\t\tif (drivetrain.currentControl()) {\n//\t\t\tdrivetrain.shiftGears();\n//\t\t}\n\t}", "@Override\n public void run() {\n chosenActionUnit.run(getGame(), inputCommands);\n }", "public void processAction(CIDAction action);", "protected void execute() {\n\t\t\n\t}", "protected void execute()\n {\n }", "public void execute() {\n for (CoordAction<PCEData,PCEData> pce : this) {\n pce.setRequestData(this.getRequestData());\n // Aggregators trigger the execution of its children PCE's before they are\n // executed themselves.\n pce.process();\n }\n }", "@Override\n\tpublic void execute() {\n\t\t// TODO Auto-generated method stub\n\t\tstate.setTimeForLastEvent(state.getCurrentTime());\n\t\tstate.setCurrentEvent(this);\n\t\tstate.setCurrentTime(startTime);\n\t\tstate.updateIdleTime();\n\t\tstate.updateQueueTime();\n\t\t\n\t\tstate.setCurrentCustomer(cust);\n\t\tstate.callChanged();\n\t\t\n\t\t\n\t\t\n\t\tif (state.isQueueEmpty()) {\n\t\t\tstate.increaseIdleChairs();\n\t\t}else {\n\t\t\tdouble timeForNext = state.getHairdresserFinishTime();\n\t\t\tHairSalonEvent finished = new HaircutFinishedEvent(timeForNext,state,store, state.getFirst());\n\t\t\tstore.add(finished);\n\t\t\tstate.removeFirst();\n\t\t\tstate.increaseCuttinTime(timeForNext);\n\t\t\tstate.setLatestCustomerFinishTime(timeForNext);\n\t\t\t\n\n\t\t}\n\t\tif (state.checkHaircut(cust)){\n\t\t\t\n\t\t\tdouble timeForNext = state.getUnsatisfiedCustomerArrivalTime();\n\t\t\tHairSalonEvent returning = new PriorityCustomerEntersEvent(timeForNext,state,store,cust);\n\t\t\tstore.add(returning);\n\t\t\t\n\t\t\t\n\t\t}else {\n\t\t\tstate.increaseNumberOfCust();\n\t\t}\n\t\t\n\t}", "protected void execute() {\n \tRobot.telemetry.setAutonomousStatus(\"Running \" + commandName + \": \" + distance);\n \tRobot.drivetrain.arcadeDrive(Robot.driveDistancePID.getOutput(), 0.0, false);\n }", "public void Execute() {\n\n }", "abstract protected QaIOReporter performAction(Node[] nodes);", "protected void execute() {\n \tint POV_value = Robot.m_oi.operator.getPOV();\n \tboolean input = true; \n \t//SmartDashboard.putNumber(\"POV Value\", POV_value);\n\t\tSmartDashboard.putNumber(\"Col Speed\", Robot.ss_Collector.getOutSpeed());\n \tswitch (POV_value){\n \tcase 0:\n \t\tthis.speed = .60;\n \t\tbreak;\n \tcase 45:\n \t\tthis.speed = .50;\n \t\tbreak;\n \tcase 90:\n \t\tthis.speed = .40; \n \t\tbreak;\n \tcase 135:\n \t\tthis.speed = .30;\n \t\tbreak;\n \tcase 180:\n \t\tthis.speed = .20;\n \t\tbreak;\n \tcase 270:\n \t\tthis.speed = .80;\n \t\tbreak;\n \tcase 315: \n \t\tthis.speed = .70;\n \t\tbreak;\n \tdefault:\n \t\tinput = false; \n \t\tbreak;\n \t}\n \t\n \tif (!running && input) {\n\t \trunning = true;\n \t\tthis.c_Drive = new C_CollectorDrive(false, -1, speed);\n \t\tc_Drive.start();\n \t}\n \t\n \telse if (running && !input) {\n \t\trunning = false;\n \t\tthis.c_Drive.cancel();\n \t}\n }", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "protected void execute() {\n \tRecordMotorMovement.getInstance().RecordMotors();\n }", "protected void execute() {\n\t\tshooter.runShooter(power);\n\t}", "protected void execute() {\n \tSmartDashboard.putBoolean(\"Close?\", isClose());\n \tif (isClose()) {\n \t\tRobotMap.DRIVETRAIN_SUBSYSTEM.drive(0.0, MIN_SPEED, 0.0);\n \t}\n }", "public void execute(){\n\t\t\n\t}", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "protected void execute() {\n this.setSetpoint(OI.getAdjustedThrottle()*RobotMap.maxRPM);\n ScraperBike.debugToTable(\"PIDSetpoint\", OI.getAdjustedThrottle()*RobotMap.maxRPM);\n \n }", "public CompletableFuture<Void> execute() {\n\t\tAsyncFence fence = new AsyncFence();\n\t\tfor (BreakpointActionItem item : this) {\n\t\t\tfence.include(item.execute());\n\t\t}\n\t\treturn fence.ready();\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 void performActions(){\n GameInformation gi = this.engine.getGameInformation();\n\n if(gi.getTeam() == 0)\n this.engine.performPlayerAction(\n new MoveAction(src, dst)\n );\n\n }", "protected void execute() {\n \toi.updateToggleLift();\n if(oi.toggleOnLift){\n \t// The commands here will occur if the TorqueLift toggle switch\n \t// is activated. All code here will only run after the button\n \t// has been toggled.\n \tif (limitswitch.getReadyState()) { \n \ttorquelift.swap();\n \ttorquelift.moveAllMotors(oi.getLiftSpeed());\n \t} else {\n \t\t// activates when the limit switch is pressed\n \t\ttorquelift.moveAllMotors(oi.getLiftYUpSpeed());\n \t}\n } else {\n \t// The commands here will occur normally, when the TorqueLift is\n \t// not activated.\n \treturn;\n }\n }", "public void actionSuccessful() {\n System.out.println(\"Action performed successfully!\");\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 }", "@Override\n protected boolean executeAction(SUT system, State state, Action action){\n // adding the action that is going to be executed into HTML report:\n htmlReport.addSelectedAction(state.get(Tags.ScreenshotPath), action);\n return super.executeAction(system, state, action);\n }", "protected void execute() {\n\t\tif (joystickControl) {\n\t\t\tdouble spitPower = Robot.oi.driverController.triggers.getLeft();\n\t\t\ttargetSpeed = -(spitPower * spitPower);\n\t\t\tRobot.cubeCollector.setCubeCollector(ControlMode.PercentOutput, targetSpeed);\n\t\t} else {\n\t\t\tRobot.cubeCollector.setCubeCollector(ControlMode.PercentOutput, targetSpeed);\n\t\t}\n\n\t}", "protected void execute() {}", "public void execute() {\n if (hasError())\n return;\n\n runLocally();\n runRemotely();\n }", "@Override\n public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {\n this.callbackContext = callbackContext;\n\n if (action.equals(\"scan\")) {\n scan();\n \n } else {\n return false;\n }\n return true;\n }", "protected void execute(Runnable evt) {\n executor.execute(evt);\n }", "public static void performAction(int action) {\n\t\tArrayList<Double> data;\n\t\tswitch (action) {\n\t\tcase MANUAL_INPUT:\n\t\t\tdata = manualInput();\n\t\t\tbreak;\n\t\tcase AUTO_INPUT:\n\t\t\tdata = autoInput();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tanalyze(data);\n\t}", "public void execute() {\n execute0();\n }", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "protected void execute() {\n \t\n \tcurrent_time = System.currentTimeMillis();\n \t\n \tlift.liftDown(LIFT_SPEED);\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "protected void execute ()\n\t{\n\t\t//Take and process new image every .5 seconds\n\t\tif (System.currentTimeMillis() % 500 == 0)\n\t\t{\n\t\t\tSubsystems.goalVision.processNewImage();\n\t\t}\n\n\t\tif (Subsystems.goalVision.getProportionalGoalX() < X_OFFSET\n\t\t - DEADBAND)\n\t\t//the goal is to the left\n\t\t{\n\t\t\t//turn left\n\t\t\tSubsystems.transmission.drive(motorRatio, -motorRatio);\n\t\t}\n\t\t//the goal is to the right\n\t\telse if (Subsystems.goalVision.getProportionalGoalX() > X_OFFSET\n\t\t + DEADBAND)\n\t\t{\n\t\t\t//turn right\n\t\t\tSubsystems.transmission.drive(-motorRatio, motorRatio);\n\t\t}\n\t}", "public abstract void executeFightButton();", "@Override\r\n\tpublic void performAction(Client client, RentUnit rentUnit) {\n\t\tSystem.err.println(\"Program was not implemented\");\r\n\t}", "@Override\r\n public void execute() {\r\n Execute l_ex = new Execute(d_playerList);\r\n l_ex.execute();\r\n }", "void perform() {\r\n\t\tSystem.out.println(\"I sing in the key of - \" + key + \" - \"\r\n\t\t\t\t+ performerID);\r\n\t}", "@Override\n\tpublic void execute() {\n\t\tSystem.out.println(\"==STATISTICS FOR THE RESTAURANT==\");\n\t\tSystem.out.println(\"Most used Ingredients:\");\n\t\tmanager.printIngredients();\n\t\tSystem.out.println(\"Most ordered items:\");\n\t\tmanager.printMenuItems();\n\t\tSystem.out.println(\"==END STATISTICS==\");\n\t}", "public abstract boolean execute(ActionContext actionContext)\n throws Exception;", "@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}" ]
[ "0.6873495", "0.67426425", "0.6503973", "0.63541675", "0.63282275", "0.63119715", "0.62775993", "0.62665105", "0.62012404", "0.61972433", "0.6185752", "0.61534035", "0.61312765", "0.6120857", "0.6092826", "0.60877603", "0.6077031", "0.6074772", "0.6074772", "0.6065669", "0.6065669", "0.6065669", "0.60452574", "0.603502", "0.60289526", "0.60236526", "0.601294", "0.5998696", "0.5986728", "0.5950545", "0.5943756", "0.5942797", "0.59296286", "0.5926105", "0.5913062", "0.5911235", "0.59027505", "0.5898124", "0.5880182", "0.58555996", "0.58555996", "0.58555996", "0.58555996", "0.58555996", "0.58555996", "0.58555996", "0.58555996", "0.58555996", "0.58555996", "0.58555996", "0.58555996", "0.5852063", "0.58519", "0.58489674", "0.58414584", "0.58387333", "0.5830561", "0.5830131", "0.5820619", "0.5807962", "0.5793025", "0.57925403", "0.57779455", "0.5776702", "0.57763493", "0.57594585", "0.5758342", "0.57450366", "0.5742075", "0.57420576", "0.573965", "0.57103217", "0.5708006", "0.5700422", "0.56952786", "0.56939656", "0.5691146", "0.5682509", "0.56654733", "0.5657616", "0.5650819", "0.5642986", "0.56415445", "0.5637579", "0.5634394", "0.5633595", "0.5629074", "0.5629074", "0.5629074", "0.5629074", "0.56233996", "0.56190306", "0.56190306", "0.561786", "0.55974287", "0.5594243", "0.55926555", "0.5587733", "0.55857295", "0.55836594", "0.5565586" ]
0.0
-1
Member only kwota za jedno spotkanie rady (uczestnictwo) / Gettery i settery
public String getAssistant() { return assistant; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Member getMember() {\n\t\treturn member; ////changed 'MeMbEr' to 'member'\r\n\t}", "@Test\r\n public void testisMenber1() {\r\n Assert.assertEquals(true, set1.isMember(4));\r\n }", "public abstract Member mo23408O();", "@Test\r\n\tpublic void testGetMembers() {\r\n\t\tassertTrue(meetingu1.getMembers().contains(teach1));\r\n\t\tassertTrue(meetingu1.getMembers().contains(teach2));\r\n\t}", "public void test5() {\n\t\tSet<String> keySet = member.keySet();\n\t\tfor(String key : keySet) {\n\t\t\tif(key ==\"leess\") {\n\t\t\t\tmember.remove(key);\n\t\t\t}\n\t\t}\n\t}", "public static boolean testPokemomGetSet() {\r\n Pokemon inst = new Pokemon(\"name\", \"type1\", \"type2\", 2, 3, 4, 5, 6, 7, 8, false, false);\r\n if (!Objects.equals(inst.getName(), \"name\") || !Objects.equals(inst.getType1(), \"type1\")\r\n || !Objects.equals(inst.getType2(), \"type2\") || !Objects.equals(inst.getHp(), 2)\r\n || !Objects.equals(inst.getAttack(), 3) || !Objects.equals(inst.getDefense(), 4)\r\n || !Objects.equals(inst.getSpAttack(), 5) || !Objects.equals(inst.getSpDefense(), 6)\r\n || !Objects.equals(inst.getSpeed(), 7) || !Objects.equals(inst.getTotal(), 8)\r\n || !Objects.equals(inst.isLegendary(), false) || !Objects\r\n .equals(inst.getFavorite(), false)) {\r\n return false;\r\n }\r\n inst.setName(\"sName\");\r\n inst.setType1(\"ttype1\");\r\n inst.setType2(\"ttype2\");\r\n inst.setHp(11);\r\n inst.setAttack(10);\r\n inst.setDefense(33);\r\n inst.setSpAttack(44);\r\n inst.setSpDefense(41);\r\n inst.setSpeed(1);\r\n inst.setTotal(222);\r\n inst.setLegendary(true);\r\n inst.setFavorite(true);\r\n if (!Objects.equals(inst.getName(), \"sName\") || !Objects.equals(inst.getType1(), \"ttype1\")\r\n || !Objects.equals(inst.getType2(), \"ttype2\") || !Objects.equals(inst.getHp(), 11)\r\n || !Objects.equals(inst.getAttack(), 10) || !Objects.equals(inst.getDefense(), 33)\r\n || !Objects.equals(inst.getSpAttack(), 44) || !Objects.equals(inst.getSpDefense(), 41)\r\n || !Objects.equals(inst.getSpeed(), 1) || !Objects.equals(inst.getTotal(), 222)\r\n || !Objects.equals(inst.isLegendary(), true) || !Objects\r\n .equals(inst.getFavorite(), true)) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Test\r\n public void NegativeTestisMember1() {\r\n Assert.assertNotEquals(true, set1.isMember(10));\r\n }", "public void setMemberID(String memberID){ this.memberID=memberID; }", "public com.jspgou.cms.entity.ShopMember getMember () {\r\n\t\treturn member;\r\n\t}", "@Override\r\n\tpublic List<Member> selectWinner(int no) {\n\t\treturn membersDAO.selectWinner(no);\r\n\t}", "default Member getNormalMember(Long memberSn) {\n return new Member();\n }", "boolean isMember();", "public Member getMember()\n {\n return m_member;\n }", "@Test\n\tpublic void testIsMember() {\n\t\tresetTestVars();\n\t\t\n\t\tassertFalse(\"Nothing in list\", sn.isMember(\"Hello\"));\n\t\tuser1.setID(\"1\");\n\t\tsn.addUser(user1);\n\t\tassertTrue(\"User with given ID exists\", sn.isMember(\"1\"));\n\t}", "String getMemberOf();", "@Test\r\n\tpublic void testsetMembers() {\r\n\t\tSet<Person> persons1 = new HashSet<Person>();\r\n\t\tmeetingu1.setMembers(persons1);\r\n\t\tassertTrue(meetingu1.getMembers().equals(persons1));\r\n\t}", "@Test\n public void testSetDor() {\n System.out.println(\"setDor\");\n Member instance = member;\n \n String dor = \"2019-11-01\";\n instance.setDor(dor);\n \n String expResult = dor;\n String result = instance.getDor();\n \n assertEquals(expResult,result);\n }", "@Override\n\tpublic List<Member> getAllMember() {\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n\n\t\tArrayList<MemberVO> members = new ArrayList<MemberVO>();\n\n\t\t// 회원이름을 추가\n\t\tmembers.add(new MemberVO(\"홍길동\", \"111\"));\n\t\tmembers.add(new MemberVO(\"이몽룡\", \"112\"));\n\t\tmembers.add(new MemberVO(\"성춘향\",\"113\"));\n\t\tmembers.add(new MemberVO(\"장보고\",\"114\"));\n\t\tmembers.add(new MemberVO(\"장영실\",\"115\"));\n\t\tmembers.add(new MemberVO(\"임꺽정\",\"116\"));\n\t\tmembers.add(new MemberVO(\"정도전\",\"117\"));\n\t\tmembers.add(new MemberVO(\"장보고\",\"118\"));\n\t\tmembers.add(new MemberVO(\"장영실\",\"119\"));\n\t\tmembers.add(new MemberVO(\"임꺽정\",\"120\"));\n\t\tmembers.add(new MemberVO(\"정도전\",\"121\"));\n\t\t\n\t\tMemberVO vo = new MemberVO(\"장보고\",\"122\");\n\t\tmembers.add(vo);\n\t\tvo = new MemberVO(\"장영실\",\"123\");\n\t\tmembers.add(vo);\n\t\tvo = new MemberVO(\"임꺽정\",\"124\");\n\t\tmembers.add(vo);\n\t\t\n\t\tCollections.shuffle(members);\n\t\tfor(int i = 0 ; i < 3 ; i ++) {\n\t\t\tSystem.out.println((i+1)+\"번째 당첨자 : \"+members.get(i) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// = members.get(i).toString()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// memgers.get(i)는 members에 포함된\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 어떤 VO가 추출된다.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 객체를 println()으로 콘솔에 출력하도록 하면\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 자동으로 객체.toString() 메서드를 호출한다.\n\t\t\t\n\t\t}\n\t}", "public Object getMyidForPassword(Object obj) {\n\t\tMemberVO requestMemberVO = (MemberVO)obj;\r\n\t\tString id = requestMemberVO.getId();\r\n\r\n\t\tMemberVO memberVO = new MemberVO();\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new FileReader(\"member.txt\"));\r\n\t\t\tString[] tempStringArray; \r\n\t\t\tString[] temp2StringArray; \r\n\t\t\tArrayList<String> favoriteList = new ArrayList<String>();\r\n\r\n\t\t\tString line = \"\";\r\n\t\t\twhile((line = br.readLine()) != null) {\r\n\t\t\t\ttempStringArray = line.split(\"§§\");\r\n\t\t\t\tmemberVO.setUserNumber(Integer.parseInt(tempStringArray[0]));\r\n\t\t\t\tmemberVO.setId(tempStringArray[1]);\r\n\t\t\t\tmemberVO.setBirth(tempStringArray[2]);\r\n\t\t\t\tmemberVO.setPhoneNumber(tempStringArray[3]);\r\n\t\t\t\tmemberVO.setEmail(tempStringArray[4]);\r\n\t\t\t\tmemberVO.setPassword(tempStringArray[5]);\r\n\t\t\t\tmemberVO.setName(tempStringArray[6]);\r\n\t\t\t\tmemberVO.setGender(tempStringArray[7]);\r\n\t\t\t\tmemberVO.setAddress(tempStringArray[8]);\r\n\t\t\t\tmemberVO.setPoint(Integer.parseInt(tempStringArray[9]));\r\n\t\t\t\ttemp2StringArray = tempStringArray[10].split(\",\");\r\n\t\t\t\tfor(String favorite : temp2StringArray) {\r\n\t\t\t\t\tfavoriteList.add(favorite);\r\n\t\t\t\t}\r\n\t\t\t\tmemberVO.setFavorite(favoriteList);\r\n\t\t\t\tmemberVO.setProfilePhotoPath(tempStringArray[11]);\r\n\r\n\t\t\t\tif(id.equals(memberVO.getId())) {\r\n\t\t\t\t\tSystem.out.println(\"아이디 찾기 완료 : \" + memberVO.toString());\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tfavoriteList.clear();\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(br != null) {\r\n\t\t\t\t\tbr.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"아이디 찾기 실패\");\r\n\t\treturn false;\r\n\t}", "@Override\n public int hashCode() {\n \tif (member == null) {\n \t\treturn base.hashCode();\n \t}\n return (base.hashCode() ^ member.hashCode());\n }", "IMemberDto getMember(/*old :String searchMember*/Integer id);", "public void setMember (com.jspgou.cms.entity.ShopMember member) {\r\n\t\tthis.member = member;\r\n\t}", "public int getMember(){\n String memberString = member.getSelectedItem().toString();\n int memberId = this.memberMap.get(memberString);\n \n System.out.println(\"getMember2: \"+ memberString +\",\"+ memberId);\n return memberId;\n }", "protected abstract Set method_1559();", "@Override\n\tpublic Member getMember(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<GymMember> getMyMember(int tid) {\n\t\t@SuppressWarnings({ \"deprecation\", \"rawtypes\" })\n\t\tQuery query = factory.getCurrentSession().createSQLQuery(\"CALL getMember(:tid1)\").setParameter(\"tid1\",tid).addEntity(GymMember.class);\n\t\t@SuppressWarnings({ \"deprecation\", \"unchecked\" })\n\t\tList<GymMember> list = query.list();\n\t\treturn list;\n\t}", "protected GuiTestObject member_No() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"member_No\"));\n\t}", "public void findMutual(){\n\n }", "public ArrayList<Member> getMemberWholeList() {\n\t\t return dao.selectMemberwholeList();\r\n\t}", "private static void getMember() {\n\t\toutput(\"\");\r\n\t\tfor (member member : library.getMember()) {// variable name LIB to library and MEMBER to getMember()\r\n\t\t\toutput(member + \"\\n\");\r\n\t\t}\t\t\r\n\t}", "@Test\n\tpublic void testFind_Value_Negative() throws Exception {\n\t\t\t SET setarray= new SET( new int[]{1,2,3,4,5});\n\t\t\t assertFalse(setarray.isMember(8) );\t \n\t}", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "List<S> memberOf(String memberUuid);", "@Test\n public void testGetNearbyFriendsInAgivenDistance02() {\n System.out.println(\"getNearbyFriendsInAgivenDistance\");\n User user = null;\n for (User user1 : sn10.getUsersList()) {\n if (user1.getNickname().equals(\"nick0\")) {\n user = user1;\n }\n }\n Double distance = 70.0;\n HashSet<User> expResult = new HashSet();\n expResult.add(new User(\"nick4\", \"[email protected]\"));\n\n HashSet<User> result = sn10.getNearbyFriendsInAgivenDistance(user, distance);\n assertFalse(expResult.equals(result));\n }", "private void updateMemberList(Set<ChatRoomUser> chatRoomUserSet,\n boolean removeMember)\n {\n Iterator<ChatRoomUser> it = chatRoomUserSet.iterator();\n\n while (it.hasNext())\n {\n ChatRoomUser user = it.next();\n String uid = user.getScreenname().getFormatted();\n\n // we want to add a member and he/she is not in our member list\n if (!removeMember && !participants.containsKey(uid)\n && !uid.equals(provider.getAccountID().getUserID()))\n {\n OperationSetPersistentPresenceIcqImpl presenceOpSet =\n (OperationSetPersistentPresenceIcqImpl) getParentProvider()\n .getOperationSet(OperationSetPersistentPresence.class);\n\n Contact participant =\n presenceOpSet.getServerStoredContactList()\n .findContactByScreenName(uid);\n\n participants.put(uid, participant);\n\n fireParticipantPresenceEvent(participant,\n AdHocChatRoomParticipantPresenceChangeEvent.CONTACT_JOINED,\n null);\n }\n // we want to remove a member and found him/her in our member list\n if (removeMember && participants.containsKey(uid))\n {\n Contact participant = participants.get(uid);\n\n participants.remove(uid);\n\n fireParticipantPresenceEvent(participant,\n AdHocChatRoomParticipantPresenceChangeEvent.CONTACT_LEFT,\n null);\n }\n }\n }", "public void setRua(String rua) {this.rua = rua;}", "@Override\n\tpublic MemberDTO getMember(MemberDTO mdto) {\n\t\treturn mdao.getMember(mdto);\n\t}", "@Test\n public void getMese() {\n EAMese eaMesePrevisto;\n EAMese eaMeseOttenuto;\n\n eaMesePrevisto = EAMese.maggio;\n sorgente = \"maggio\";\n eaMeseOttenuto = EAMese.getMese(sorgente);\n assertNotNull(eaMeseOttenuto);\n assertEquals(eaMesePrevisto, eaMeseOttenuto);\n\n eaMesePrevisto = EAMese.ottobre;\n sorgente = \"ott\";\n eaMeseOttenuto = EAMese.getMese(sorgente);\n assertNotNull(eaMeseOttenuto);\n assertEquals(eaMesePrevisto, eaMeseOttenuto);\n }", "@Override\n\tpublic MemberDTO confirmMember(MemberDTO mdto) {\n\t\treturn mdao.getMember(mdto);\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tMember m1 = new Member(\"홍길동\", 25);\n\t\tMember m2 = new Member(\"홍길동\", 25);\n\t\t\n\t\t// 내용은 같으나 참조값이 틀린 멤버\n\t\tHashSet<Member> hs = new HashSet<Member>();\n\t\ths.add(m1);\n\t\ths.add(m2);\n\t\t\n\t\tSystem.out.println(hs.size());\n\t}", "public void RuchyKlas() {\n\t\tSystem.out.println(\"RuchyKlas\");\n\t\tPlansza.getNiewolnikNaPLanszy().Ruch();\n\t\tPlansza.getRzemieslnikNaPlanszy().Ruch();\n\t\tPlansza.getArystokrataNaPlanszy().Ruch();\n\t}", "public String searchPlanet(Planet planet, CrewMember member) {\n\t\t\n\t\tmember.minusAction();\n\t\tmember.addFullness(50);\n\t\t\n\t\tRandom rand = new Random();\n\t\tint randomElement = rand.nextInt(100) + 1;\n\t\t\n\t\tif (! (member instanceof Captain)) {\n\t\t\tmember.addTiredness(25);\n\t\t\n\t\t\t} \n\t\t\n\t\tif (member.getSearch() >= randomElement) {\n\t\t\t\n\t\t\tint pickUpListLength = planet.getPickUpListLength();\n\t\t\t\n\t\t\tif(pickUpListLength <= 0) {\n\t\t\t\treturn \"No items on the planet\";\n\t\t\t}\n\t\t\t\n\t\t\tint index = rand.nextInt(pickUpListLength);\n\t\t\t\n\t\t\tItem itemFound = planet.giveRandomItem(index);\n\t\t\t\n\t\t\tif(itemFound instanceof Part){\n\t\t\t\tshieldLevel += 1;\n\t\t\t\tpartsCollected.add((Part)itemFound);\n\t\t\t\tplanet.removePickUpItem(itemFound);\n\t\t\t\treturn itemFound.getItemInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(itemFound instanceof Money) {\n\t\t\t\tcurrentMoney.addMoney(((Money) itemFound).getAmount());\n\t\t\t\tplanet.removePickUpItem(itemFound);\n\t\t\t\treturn itemFound.getItemInfo();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinventoryList.add(itemFound);\n\t\t\t\treturn itemFound.getItemInfo();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn \"Couldn't find anything\";\n\t\t}\n\t}", "protected void addMember(MondrianMember member) {\r\n aMembers.add(member);\r\n }", "static boolean allMembersArePartOf(Set<NuState> members, NuAutomaton nua) {\n\t\tfor (final NuState member : members)\n\t\t\tif (member.nua != nua)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "public void setMember_id(String member_id) {\r\n this.member_id = member_id;\r\n }", "public void setMember_id(String member_id) {\r\n this.member_id = member_id;\r\n }", "public String getMember_id() {\r\n return member_id;\r\n }", "public String getMember_id() {\r\n return member_id;\r\n }", "@Test\n\tpublic void testGetMentee() {\n\t\tassertThat(mentor.getMentees().get(0)).isEqualTo(mentee);\n\t}", "public Vector<MakhlukHidup> get_daftar();", "public void setOtherMembers(String value) {\r\n \r\n \t\t_otherMembersList = new ArrayList<String>();\r\n \r\n \t\tif (value.matches(\"\"))\r\n \t\t\treturn;\r\n \r\n \t\tLog.d(\"DEBUG\", value);\r\n \r\n \t\tString[] others = value.split(\"(\\\\s+)?,(\\\\s+)?\");\r\n \r\n \t\tfor (String member : others) {\r\n \t\t\t_otherMembersList.add(member);\r\n \t\t}\r\n \r\n \t\tCollections.sort(_otherMembersList);\r\n \t}", "@Override\r\n\tpublic List<Member> getAllMember() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tList<Member> list = session.createCriteria(Member.class).list();\r\n\t\treturn list;\r\n\t}", "private void addTeamMembers(IInternalContest contest, int count, int numberOnMtea) {\n\n Account[] accounts = getTeamAccounts(contest);\n\n for (int tid = 0; tid < accounts.length && tid < count; tid++) {\n\n Account account = accounts[tid];\n if (account.getMemberNames() == null || account.getMemberNames().length == 0) {\n\n List<String> names = new ArrayList<>();\n\n for (int i = 0; i < numberOnMtea; i++) {\n String name = pickRandom(SampleContest.GIRL_NAMES);\n names.add(name);\n }\n\n String[] newNames = (String[]) names.toArray(new String[names.size()]);\n account.setMemberNames(newNames);\n }\n contest.updateAccount(account);\n }\n }", "public Genotype rouletteSelection() {\n // get a number between 0 and 1 to compare against\n double slice = rnd.nextDouble();\n // keep track of the cumulative fitness\n double cumulativeFitness = 0;\n\n // loop through the population to pick a mate\n for (Genotype g : population) {\n // increment the cumulative fitness with the member's normalized fitness\n cumulativeFitness += g.getNormalizedFitness();\n // if the cumulative fitness is greater than the random number,\n if (cumulativeFitness > slice) {\n // select the member for mating\n return g;\n }\n }\n\n // if no members are chosen, pick the one with the highest fitness score\n return population.get(0);\n }", "@Test\n public void testSetName() {\n System.out.println(\"setName\");\n Member instance = member;\n \n String name = \"new Name\";\n instance.setName(name);\n \n String expResult = \"new Name\";\n String result = instance.getName();\n \n assertEquals(expResult,result);\n }", "protected IntHashSet getMemberHashSet() {\n\t\treturn memberHashSet;\n\t}", "@Test\r\n public void lookProfileByOwner() {\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n\r\n // Our member looked at his own profile\r\n member.lookedBy(member);\r\n \r\n // Still no activity for member\r\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n }", "public final List<Member> getSlicerMembers() {\n return slicerMembers;\n }", "public MemberPo findMember(final String id);", "private BonusMember findMember(int memberNo) {\n\t\tfor (BonusMember member : members) {\n\t\t\tif (member.getMemberNo() == memberNo)\n\t\t\t\treturn member;\n\t\t}\n\t\treturn null;\n\t}", "@Override public String getMasa(){\n return \"gruesa \";\n }", "public List<StaffMember> getTeamMembers(){\n\t\tSet<StaffMember> team = teamleader.getDirectSubordinates();\n\t\tStaffMemberIterator iterator = new StaffMemberIterator(team);\n\t\tList<StaffMember> listOfMembers = iterator.listOfStaffMember;\n\t\tlistOfMembers.add(teamleader);\n\t\tCollections.sort(listOfMembers);\n\t\treturn listOfMembers;\n\t}", "public Rechnung warenkorbKaufen(Person p) throws AccessRestrictedException, InvalidAmountException{\r\n\t\tif(istKunde(p)){\r\n\t\t\r\n\t\t\t//Warenkorb des Benutzers abfragen\r\n\t\t\tWarenkorb wk = kv.gibWarenkorbVonKunde(p);\r\n\t\t\t\r\n\t\t\t//Bestand der Artikel im Warenkorb reduzieren und Gesamtpreis errechnen\r\n\t\t\tint gesamt = 0;\r\n\t\t\tMap<Artikel,Integer> inhalt = wk.getArtikel();\r\n\t\t\tfor(Map.Entry<Artikel, Integer> ent : inhalt.entrySet()){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tav.erhoeheBestand(ent.getKey().getArtikelnummer(), -1 * ent.getValue());\r\n\t\t\t\t\t//Ereignis erstellen\r\n\t\t\t\t\tev.ereignisErstellen(p, Typ.KAUF, ent.getKey(), (int) ent.getValue());\r\n\t\t\t\t} catch (ArticleNonexistantException anne){\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tgesamt += (ent.getValue() * ent.getKey().getPreis());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Warenkorb für Rechnung erzeugen\r\n\t\t\tWarenkorb temp = new Warenkorb();\r\n\t\t\ttemp.setArtikel(wk.getArtikel());\r\n\t\t\t\r\n\t\t\t//Rechnung erzeugen\r\n\t\t\tRechnung re = rv.rechnungErzeugen((Kunde) p, new Date(), temp, gesamt);\r\n\t\t\t\r\n\t\t\t//Warenkorb von Kunde leeren\r\n\t\t\twv.leereWarenkorb(wk);\r\n\t\t\t\r\n\t\t\t//Rechnungsobjekt an C/GUI zurückgeben\r\n\t\t\treturn re;\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tthrow new AccessRestrictedException(p, \"\\\"Warenkorb bezahlen\\\"\");\r\n\t\t}\r\n\t}", "@Override\n\t@Transactional\n\tpublic List<IoMember> filterMemberByTelephone(String telephone) {\n\t\treturn memberDao.filterMemberByTelephone(telephone);\n\t}", "public void addMember(Member m) {\r\n\t\tint index=isDuplicate(m);\r\n\t\tif((index==-1)&&(!m.getName().equals(\"000\"))) {ms.add(m);}\r\n\t\tif(index!=-1) {\r\n\t\t\tif(!m.getName().equals(\"000\")) {ms.get(index).setName(m.getName());}\r\n\t\t\tif(m.hasAddress()) {ms.get(index).setAddress(m.getAddress());ms.get(index).setHasAddress();}\r\n\t\t\tif(m.hasBirthday()) {ms.get(index).setBirthday(Member.updateBirthday(m.getBirthday()));ms.get(index).setHasBirthday();}\r\n\t\t\tif(m.hasPoints()) {ms.get(index).setPoints(m.getPoints());ms.get(index).setHasPoints();}\r\n\t\t\tif(m.hasMileage()) {ms.get(index).setMileage(m.getMileage());ms.get(index).setHasMileage();}\r\n\t\t\tif(m.hasTier()) {ms.get(index).setTier(m.getTier());ms.get(index).setHasTier();}\r\n\t\t}\r\n\t}", "private int findMutual(String me, String stranger){\r\n\t\tint num = 0;\r\n\t\tAdjVertex myfriend = myGraph[getId(me)].adjVertexHead;\r\n\t\twhile(myfriend != null){\r\n\t\t\t if(areFriends(myfriend.name, stranger)){\r\n\t\t\t\t num++;\r\n\t\t\t }\r\n\t\t\t myfriend = myfriend.next;\r\n\t\t}\r\n\t\treturn num;\r\n\t}", "@Test\n public void testSetId() {\n System.out.println(\"setId\");\n Member instance = member;\n \n String id = \"new Id\";\n instance.setId(id);\n \n String expResult = id;\n String result = instance.getId();\n \n assertEquals(expResult,result);\n }", "public int getWorth() { return 1; }", "Member getWidenedMatchingMember(String[] memberPath);", "@Override\n\tpublic List<Member> getMemberList() {\n\t\treturn null;\n\t}", "public List<String> getMembersVerboseList(List<Member> members) throws WorkShopException {\n List<String> verboseList = new ArrayList<String>();\n try {\n for (Member member : members) {\n String verboseInfo = \"member name : \" + member.getName() + \", personal number: \" + member.getPersonalNumber() + \", member id: \" + member.getMemberId() + \", boats info: \\n\";\n Iterator<Boat> boatIterator = member.getBoats();\n while ( boatIterator.hasNext()) {\n Boat boat = boatIterator.next();\n verboseInfo += \"boat id: \" + boat.getId() + \", boat size: \" + boat.getSize() + \", boat type: \" + boat.getType() + \"\\n\";\n }\n verboseList.add(verboseInfo);\n }\n } catch (Exception e) {\n throw new WorkShopException(e);\n }\n return verboseList;\n }", "public int getNickel () {\n return NNickel;\n }", "boolean isMember(Item item) throws AccessManagementException;", "public static boolean testGuset() {\n // Reset the guest index\n Guest.resetNextGuestIndex();\n // Create two new guests, one is with a dietary restriction\n Guest shihan = new Guest();\n Guest cheng = new Guest(\"no milk\");\n\n // Check the guest's information\n if (!shihan.toString().equals(\"#1\")) {\n System.out.println(\"Return value is \" + shihan.toString());\n return false;\n }\n // Check if the dietary restriction implement\n if (cheng.hasDietaryRestriction() != true) {\n return false;\n }\n if (!cheng.toString().equals(\"#2(no milk)\")) {\n System.out.println(\"Return value is \" + cheng.toString());\n return false;\n }\n // Reset the guest index again\n Guest.resetNextGuestIndex();\n // Create two new guests again, the index should be 1 and 2\n Guest ruoxi = new Guest();\n Guest shen = new Guest(\"no cookie\");\n // Check the new guests' information with new indices\n if (!ruoxi.toString().equals(\"#1\")) {\n System.out.println(\"Return value is \" + ruoxi.toString());\n return false;\n }\n if (!shen.toString().equals(\"#2(no cookie)\")) {\n System.out.println(\"Return value is \" + shen.toString());\n return false;\n }\n // Reset the guest index for next time or other classes' call\n Guest.resetNextGuestIndex();\n // No bug, return true\n return true;\n }", "public void setMine()\n {\n mine = true;\n }", "public DataSetMember<t> getRandomMember()\n\t{\n\t\tRandom R = new Random();\n\t\tint i = R.nextInt(_data.size());\n\t\treturn _data.get(i);\n\t}", "public Boolean getOtaMember() {\n\t\treturn otaMember;\n\t}", "protected Member getMembersData() {\r\n String firstName = txtFieldFirstName.getText();\r\n String lastName = txtFieldLastName.getText();\r\n String dateOfBirth = txtFieldDateOfBirth.getText();\r\n String iban = txtFieldIBAN.getText();\r\n String entranceDate = txtFieldEntranceDate.getText();\r\n String leavingDate = txtFieldLeavingDate.getText();\r\n String disabilities = txtAreaDisabilities.getText();\r\n String notes = txtAreaNotes.getText();\r\n String sex = comBoxSexSelection.getItemAt(comBoxSexSelection.getSelectedIndex());\r\n int boardMember = (comBoxBoardMember.getItemAt(comBoxBoardMember.getSelectedIndex()) == \"Ja\") ? 1 : 0;\r\n\r\n Member member = new Member.Builder()\r\n .firstName(firstName)\r\n .lastName(lastName)\r\n .dateOfBirth(dateOfBirth)\r\n .iban(iban)\r\n .sex(sex)\r\n .disabilities(disabilities)\r\n .boardMember(boardMember)\r\n .entranceDate(entranceDate)\r\n .leavingDate(leavingDate)\r\n .notes(notes)\r\n .build();\r\n\r\n return member;\r\n }", "public final int getSarakeMuuttujatAihe() {\r\n return sarakeMuuttujatAihe;\r\n }", "@Override\n public ArrayList<ClanMember> getClanMembers(int hitPoints)\n {\n ArrayList<ClanMember> fullClanMembers = new ArrayList<>();\n\n PeekeWarriorMember Warrior = new PeekeWarriorMember(getClanID());\n PeekeHealerMember Healer = new PeekeHealerMember(getClanID());\n\n fullClanMembers.addAll(Warrior.getClanMembers(hitPoints));\n fullClanMembers.addAll(Healer.getClanMembers(hitPoints));\n\n return fullClanMembers;\n }", "public static void main( String[] args )\r\n {\n \tMember member;\r\n \tList<Member> members = new ArrayList<Member>();\r\n \tmember = new Member(\"홍길동\",\"대구\",13);\r\n \tmembers.add(member); //리스트에 한명의 데이터를 담겠다\r\n \tmember = new Member(\"강동원\",\"대구\",20);\r\n \tmembers.add(member);\r\n \tmember = new Member(\"신세경\",\"대구\",30);\r\n \tmembers.add(member);\r\n \t\r\n \tfor(Member m : members) {\r\n \t\tm.toString();\r\n \t}\r\n \t\r\n }", "public static int getLicznikTur() { return LicznikTur; }", "public void test_hk_02() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null); // ProfileRegistry.OWL_LANG);\n ontModel.createAllDifferent();\n assertTrue(ontModel.listAllDifferent().hasNext());\n AllDifferent allDifferent = (AllDifferent) ontModel.listAllDifferent().next();\n //allDifferent.setDistinct(ontModel.createList());\n assertFalse(allDifferent.listDistinctMembers().hasNext());\n }", "@Override\n\tpublic List<Member> getAllMember() {\n\t\tSession session =sessionFactory.getCurrentSession();\n\t\tString hql = \"from Member\";\n\t\tList<Member> listMember = session.createQuery(hql).list();\n\t\t\n\t\tif(listMember.isEmpty()) {\n\t\t\t\treturn new ArrayList<>();\n\t\t}\n\t\t\n\t\treturn listMember;\n\t}", "public Member getMember(int index) {\n return members.get(index);\n }", "private static void testPlayer() {\r\n\t\t\tnew AccessChecker(Player.class).pM(\"getName\").pM(\"getMark\").pM(\"toString\").checkAll();\r\n\t\t\tPlayer p = new Player(\"Test\", 'X');\r\n\t\t\tcheckEq(p.getName(), \"Test\", \"Player.getName\");\r\n\t\t\tcheckEq(p.getMark(), 'X', \"Player.getMark\");\r\n\t\t\tcheckEqStr(p, \"Test(X)\", \"Player.toString\");\t\t\r\n\t\t}", "protected int getTreinAantal(){\r\n return treinaantal;\r\n }", "public int getAantalWerkers()\n {\n return aantalWerkers;\n }", "@Test\n public void shouldSerializeOnlyMemberWhenUseMemberView() throws JsonProcessingException {\n log.debug(\"Should serialized only member when use member view\");\n\n Item item = new Item(2, \"book\", \"John\", \"Description\");\n\n ObjectMapper mapper = new ObjectMapper();\n String result = mapper.writerWithView(Views.Member.class).writeValueAsString(item);\n log.debug(\"Result json string: {}\", result);\n\n assertThat(result, containsString(\"book\"));\n assertThat(result, containsString(\"2\"));\n assertThat(result, not(Matchers.containsString(\"John\")));\n assertThat(result, containsString(\"Description\"));\n }", "private boolean checkUserNameExists(ArrayList<Member> members) throws Exception {\nfor(Member member:members) {\nif(this.userName.equals(member.userName)){\nreturn true;\n}\n}\nreturn false;\n}", "public Boolean sismember(final String key, final String member) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n Boolean sismember = jedis.sismember(key, member);\n return sismember;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "Member getWidenedMatchingMember(String memberPath);", "public void obliczSzanseWykolejenia(Tramwaj tramwaj, Pogoda pogoda, Motorniczy motorniczy, Przystanek przystanek){\r\n RegulyWykolejen regulyWykolejen= new RegulyWykolejen();\r\n this.szansaWykolejenia = pogoda.getRyzyko() + przystanek.getStanTechnicznyPrzystanku() + tramwaj.getStanTechTramwaju() + regulyWykolejen.regulaWiek(motorniczy.getWiek()) + regulyWykolejen.regulaDoswiadczenie(motorniczy.getDoswiadczenie());\r\n }", "public Member getMember(int id){\n super.open();\n\n // 2. build query\n Cursor cursor =\n db.query(TABLE_MEMBER, // a. table\n COLUMNS, // b. column names\n \" id = ?\", // c. selections\n new String[] { String.valueOf(id) }, // d. selections args\n null, // e. group by\n null, // f. having\n null, // g. order by\n null); // h. limit\n\n // 3. if we got results get the first one\n if (cursor != null)\n cursor.moveToFirst();\n\n // 4. build Member object\n Member member = new Member();\n member.id = Integer.parseInt(cursor.getString(0));\n member.nickName = cursor.getString(1);\n member.type = cursor.getInt(2);\n member.joinDate = cursor.getString(3);\n\n\n Log.d(\"getNotice(\" + id + \")\", member.toString());\n\n // 5. return member\n return member;\n }", "@Override\r\n\tpublic int compareTo(Member o) {\n\t\treturn 0;\r\n\t}", "public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}", "@Test\n public void testGetDor() {\n System.out.println(\"getDor\");\n Member instance = member;\n \n String expResult = \"2019-11-25\";\n String result = instance.getDor();\n \n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testFind_Value_Positive() throws Exception {\n\t\t\t SET setarray= new SET( new int[]{1,2,3,4,5});\n\t\t\t assertTrue(setarray.isMember(4) );\t \n\t}", "@Override\n public String toString() {\n return \"Member{\" +\n \"memberId='\" + memberId + '\\'' +\n \", name='\" + name + '\\'' +\n \", membershipDuration=\" + membershipDuration +\n \", noOfMembers=\" + noOfMember +\n '}';\n }", "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);" ]
[ "0.5964604", "0.5759667", "0.570933", "0.56986153", "0.55318916", "0.5519549", "0.5485572", "0.5461925", "0.54587257", "0.54326904", "0.53609973", "0.5351331", "0.53033614", "0.5293823", "0.5292075", "0.52742666", "0.5260873", "0.52353245", "0.52172375", "0.5170435", "0.5162823", "0.5161685", "0.51531273", "0.5138594", "0.51096165", "0.50919515", "0.5079518", "0.5075283", "0.5059453", "0.50464773", "0.50441104", "0.5039812", "0.503512", "0.5035074", "0.50322473", "0.49687284", "0.49446025", "0.49437475", "0.49358907", "0.4934584", "0.49200448", "0.49153656", "0.49024165", "0.49011987", "0.48966455", "0.48948565", "0.48948565", "0.48867333", "0.48867333", "0.48861057", "0.48769918", "0.48768625", "0.48733664", "0.48728615", "0.4869763", "0.4869417", "0.48677042", "0.48668563", "0.48655152", "0.48632044", "0.4859771", "0.48434854", "0.4841747", "0.48412353", "0.48369604", "0.48336262", "0.48320243", "0.4829018", "0.48220304", "0.48220134", "0.48188603", "0.48168314", "0.48167706", "0.48167422", "0.48042703", "0.48033774", "0.4802876", "0.48021922", "0.4799726", "0.4794655", "0.4786348", "0.47845358", "0.47824848", "0.4780395", "0.47790506", "0.47690788", "0.47676426", "0.47675055", "0.4764122", "0.4760694", "0.47601342", "0.47599393", "0.4756707", "0.4755202", "0.47513837", "0.47490168", "0.4745692", "0.47364977", "0.47358721", "0.47343972", "0.47281316" ]
0.0
-1
TODO Autogenerated method stub
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String username = request.getParameter("username"); UserDao userDao = new UserDaoImpl(); boolean flag = userDao.checkUsername(username); response.setContentType("text/html;charset=UTF-8"); // System.out.println(flag); if(flag) { response.getWriter().write("<font color ='red'><b>用户名已存在</b></font>"); }else { response.getWriter().write("<font color ='green'>用户名可用! </font>"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
This method loops through the file and creates processes and cycles for each process
private Queue<PCB> loadToJobQueue() throws FileNotFoundException { try { br = new BufferedReader(new FileReader(FILENAME)); fr = new FileReader(FILENAME); br = new BufferedReader(fr); int pid = 0; int cpuBurst = 0; int memory = 0; int IOBurst = 0; int counter = 0; String sCurrentLine; br.readLine(); // first Line "Name CPU Memory IO " etc.. // Cycle contains: // cpuBurst, memory, IOBurst while ((sCurrentLine = br.readLine()) != null ) { String[] PCBInfo = sCurrentLine.split(" "); pid = Integer.parseInt(PCBInfo[0]); // Name of Process PCB pcb1 = new PCB(pid); cpuBurst = Integer.parseInt(PCBInfo[1]); memory = Math.abs(Integer.parseInt(PCBInfo[2])); //First memory should be positive IOBurst = Integer.parseInt(PCBInfo[3]); pcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 1 cpuBurst = Integer.parseInt(PCBInfo[4]); memory = Integer.parseInt(PCBInfo[5]); IOBurst = Integer.parseInt(PCBInfo[6]); pcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 2 cpuBurst = Integer.parseInt(PCBInfo[7]); memory = Integer.parseInt(PCBInfo[8]); IOBurst = Integer.parseInt(PCBInfo[9]); pcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 3 if (PCBInfo.length == 10) { JobQueue.enqueue(pcb1); continue; } cpuBurst = Integer.parseInt(PCBInfo[10]); memory = Integer.parseInt(PCBInfo[11]); IOBurst = Integer.parseInt(PCBInfo[12]); pcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 4 if (PCBInfo.length == 14) { // Has only 5 Cycles cpuBurst = Integer.parseInt(PCBInfo[13]); memory = 0; IOBurst = 0; pcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 5 } if (PCBInfo.length == 17) { // if it has a 6th cycles cpuBurst = Integer.parseInt(PCBInfo[13]); memory = Integer.parseInt(PCBInfo[14]); IOBurst = Integer.parseInt(PCBInfo[15]); pcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 5 cpuBurst = Integer.parseInt(PCBInfo[16]); memory = 0; IOBurst = 0; pcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 6 } JobQueue.enqueue(pcb1); counter++; } } catch ( IOException e) { e.printStackTrace(); } finally { try { if (br != null) br.close(); if (fr != null) fr.close(); } catch (IOException ex) { ex.printStackTrace(); } } return JobQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public AlgorithmProcess createProcess() {\n return new FileLoaderProcess(file);\n }", "public void processFile() throws Exception {\n InputStream cwlFile = new FileInputStream( CWL_FILE );\n Yaml yaml = new Yaml();\n Map contents = (Map) yaml.load(cwlFile);\n for( Object key : contents.keySet() ) {\n \tprocessContents( (String) key, contents.get(key) );\n }\n\t}", "private static void readFile(ArrayList<Process> processList, int availableRes[]){\n String processInfo;\n Scanner inputFile = openFile();\n if(inputFile == null){System.exit(-1);}\n\n initializeResArray(availableRes, inputFile);\n\n int processID = 0;\n while(inputFile.hasNextLine()){\n processInfo = inputFile.nextLine();\n Process toAdd = createProcessFromInput(processInfo);\n toAdd.setPID(processID);\n processList.add(toAdd);\n processID++;\n }\n inputFile.close();\n }", "@Override\n protected void process() {\n final List<File> srtFiles = new FileFinder().collect(new File(Constants.FILEFIXER_ROOT_DIR), Constants.SRT_EXTENSION);\n\n // process each file, making a backup first if it is enabled\n for (final File srtFile : srtFiles) {\n System.out.println(\"Processing subtitle file :: \" + srtFile.getName());\n\n if (Constants.MAKE_BACKUPS) {\n backupFile(srtFile);\n }\n\n fix(srtFile);\n }\n }", "public void readFile() {\r\n\t\tBufferedReader br = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tString currentLine;\r\n\r\n\t\t\tbr = new BufferedReader(new FileReader(fileName));\r\n\r\n\t\t\twhile ((currentLine = br.readLine()) != null) {\r\n\r\n\t\t\t\tif (!currentLine.equals(\"\")) {\r\n\t\t\t\t\tString[] paragraphs = currentLine.split(\"\\\\n\\\\n\");\r\n\r\n\t\t\t\t\tfor (String paragraphEntry : paragraphs) {\r\n\t\t\t\t\t\t//process(paragraphEntry);\r\n\t\t\t\t\t\t//System.out.println(\"Para:\"+paragraphEntry);\r\n\t\t\t\t\t\tParagraph paragraph = new Paragraph();\r\n\t\t\t\t\t\tparagraph.process(paragraphEntry);\r\n\t\t\t\t\t\tthis.paragraphs.add(paragraph);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (br != null)br.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void processIndividualFile(File file, InputStream is,\n ConnectionUtilities connections) throws IOException, InterruptedException,\n ClientWriteException, NumberFormatException {\n\n SimpleDateFormat sdf = new SimpleDateFormat( \"yyyy-MM-dd HH:mm:ss.SSS\" );\n LOG.debug( \"The file: \" + file.getAbsolutePath() + \" was last modified at \"\n + sdf.format( file.lastModified() ) );\n\n int filelength = ( int ) file.length();\n int numberOfChunks =\n ( int ) Math.ceil( ( double ) filelength / Constants.CHUNK_SIZE );\n\n routes = new String[ numberOfChunks ][];\n\n WriteFileRequest request = new WriteFileRequest( file.getAbsolutePath(), 0,\n filelength, numberOfChunks );\n for ( int sequence = 0; sequence < numberOfChunks; ++sequence )\n {\n request.setSequence( sequence );\n this.node.getControllerConnection().getTCPSender()\n .sendData( request.getBytes() );\n }\n // wait for response from controller containing routing information.\n synchronized ( lock )\n {\n lock.wait();\n }\n if ( !ableToWrite )\n {\n throw new ClientWriteException( \"The controller has not\"\n + \" received file chunk locations for the original file yet.\" );\n }\n sendWriteChunkRequest( file, is, connections, numberOfChunks );\n }", "@Override\n @SneakyThrows\n public void process() {\n process(new FileReader(new File(fileName)));\n }", "private void processDir(final String filename) throws FileNotFoundException, IOException, RepositoryException,\n RDFHandlerException\n {\n final File dataDir = new File(filename);\n System.out.println(\"Using data directory: \" + dataDir);\n\n // get the data files\n final File[] dataFiles = dataDir.listFiles(new FilenameFilter()\n {\n @Override\n public boolean accept(final File dir, final String name)\n {\n return name.contains(\"heartrate\") && (name.endsWith(\"csv\") || name.endsWith(\"CSV\"));\n }\n });\n // want to make sure we only create each person and sensor once\n Arrays.sort(dataFiles);\n\n // FIXME testing with just 1 file to start\n final File[] testFiles = dataFiles;\n // testFiles[0] = dataFiles[0];\n\n int count = 0;\n\n for (final File file : testFiles)\n {\n final String oldPid = currentPid;\n\n System.out.println(\"processing \" + file);\n\n try\n {\n parseFilename(file);\n\n // did we change people?\n if (oldPid != currentPid)\n {\n createNewPersonHeartRate();\n }\n\n repoConn.begin();\n count += processFileHeartRate(file);\n repoConn.commit();\n\n System.out.println(String.format(\" %,d records\", Integer.valueOf(count)));\n }\n catch (final NumberFormatException e)\n {\n System.err.println(\"Cannot read the date from the file format\");\n }\n }\n }", "void process(boolean process, Integer frequency) {\r\n\r\n\t\t// Folder iterator\r\n\t\tfor (File file : folder.listFiles()) {\r\n\t\t\tString fileName = file.getName();\r\n\r\n\t\t\tif (DEBUG) {\r\n\t\t\t\tSystem.out.println(\"\\t\" + fileName);\r\n\t\t\t}\r\n\r\n\t\t\tMap<String, Integer> wordCount = new HashMap<String, Integer>();\r\n\t\t\tMap<Map<String, Integer>, Integer> classification = new HashMap<Map<String, Integer>, Integer>();\r\n\t\t\ttry {\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\tString line = br.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tStringTokenizer tokenizer;\r\n\t\t\t\t\tif (process) {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line,\r\n\t\t\t\t\t\t\t\t\" \\t\\n\\r\\f,.:;?![]'->@()/+-\\\"#\\\\<*_=&~`{}$%|^0123456789\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line);\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\t\tString word = tokenizer.nextToken();\r\n\t\t\t\t\t\tif (vocabulary.containsKey(word)) {\r\n\t\t\t\t\t\t\tvocabulary.put(word, vocabulary.get(word) + 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tUpdated word: \"\r\n\t\t\t\t\t\t\t// + word);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvocabulary.put(word, 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tAdded new word:\r\n\t\t\t\t\t\t\t// \" + word);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// for (int i = 0; i < word.length(); i++) {\r\n\t\t\t\t\t\t// if (!characters.contains(word.charAt(i))) {\r\n\t\t\t\t\t\t// characters.add(word.charAt(i));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\t// Add to the spam or not spam vocab;\r\n\t\t\t\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\t\t\t\tif (spamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, spamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(SPAM) + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (notSpamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word,\r\n\t\t\t\t\t\t\t\t\t\tnotSpamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(NOT_SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(NOT_SPAM) + 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Document index\r\n\t\t\t\t\t\tif (wordCount.containsKey(word)) {\r\n\t\t\t\t\t\t\twordCount.put(word, wordCount.get(word) + 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tUpdated word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\twordCount.put(word, 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tAdded new word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\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\ttotalWordCount++;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// load next line\r\n\t\t\t\t\tline = br.readLine();\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException fNFE) {\r\n\t\t\t\tfNFE.printStackTrace();\r\n\t\t\t} catch (IOException iOE) {\r\n\t\t\t\tiOE.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// classify\r\n\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\tclassification.put(wordCount, SPAM);\r\n\t\t\t} else {\r\n\t\t\t\tclassification.put(wordCount, NOT_SPAM);\r\n\t\t\t}\r\n\r\n\t\t\tdocuments.put(fileName, classification);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\t// for (char c : characters) {\r\n\t\t\t// System.out.print(c);\r\n\t\t\t// }\r\n\t\t}\r\n\r\n\t\tInteger numWords;\r\n\t\tif (process) {\r\n\t\t\tnumWords = eliminateWordByFreq(frequency);\r\n\t\t} else {\r\n\t\t\tnumWords = eliminateWordByFreq(0);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\tSystem.out.println(\"Eliminated \" + numWords + \" words\");\r\n\t\t\tSystem.out.println(\"VOCABULARY:\\t\\t\" + vocabulary);\r\n\t\t\tSystem.out.println(\"SPAM VOCABULARY:\\t\" + spamVocab);\r\n\t\t\tSystem.out.println(\"REGULAR VOCABULARY:\\t\" + notSpamVocab);\r\n\t\t}\r\n\t}", "Workload(String filename) {\n this.workload = new ArrayList<>();\n try {\n FileReader fileReader = new FileReader(filename);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n String line;\n // for each line in CSV, create a Process and add to workload\n while ((line = bufferedReader.readLine()) != null) {\n String[] splitLine = line.split(\",\");\n int PID = Integer.parseInt(splitLine[0]);\n int CBT = Integer.parseInt(splitLine[1]);\n int AAT = Integer.parseInt(splitLine[2]);\n Process process = new Process(PID, CBT, AAT);\n this.workload.add(process);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public TaskList openFile() throws MonicaException {\n File file = new File(path);\n\n if (!file.exists()) {\n try {\n file.getParentFile().mkdir();\n file.createNewFile();\n } catch (IOException e) {\n throw new MonicaException(\"File cannot be created.\");\n }\n }\n\n try {\n Scanner sc = new Scanner(file);\n while (sc.hasNext()) {\n String txtLine = sc.nextLine();\n Task task = processContent(txtLine);\n taskList.addTask(task);\n }\n return taskList;\n } catch (FileNotFoundException e) {\n throw new MonicaException(\"File cannot be found.\");\n }\n }", "public void parseFile(String fileName) {\n LineIterator it = null;\n try {\n it = FileUtils.lineIterator(new File(fileName), \"UTF-8\");\n while (it.hasNext()) {\n String line = it.nextLine();\n Runnable task = () -> sendEventsToSaveInDb(line);\n executor.submit(task);\n }\n } catch (IOException e) {\n logger.error(\"error while reading file : \", e);\n System.exit(1);\n } finally {\n LineIterator.closeQuietly(it);\n executor.shutdown();\n try {\n executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);\n saveEventsInBatch(true);\n } catch (InterruptedException e) {\n logger.error(\" exception while waiting for termination \", e);\n }\n System.exit(0);\n }\n }", "protected void parseProcessDefinitions() {\n\n List<XmlElement> processes = rootElement.getElements(\"process\");\n\n if (processes.size() == 0) {\n String errorMessage = \"No process have been defined in the BPMN serialized XMl file.\";\n throw new JodaEngineRuntimeException(errorMessage);\n }\n if (processes.size() > 1) {\n String errorMessage = \"Joda Engine cannot read more than one process in a BPMN serialized XMl file.\";\n throw new JodaEngineRuntimeException(errorMessage);\n }\n\n parseProcess(processes.get(0));\n }", "@Override\n\tprotected void processFile(File file) {\n tagLogger.log(new String[]{serviceCode,file.getName()},\"Split \"+file.getName());\n StaticFileInfo staticFileInfo = fileLister.getFileInfo(file.getName());\n if(staticFileInfo==null){\n tagLogger.log(new String[]{serviceCode,file.getName()}, \"Skip unknown file \" + file.getName());\n }\n\n //2. If file is known then we split it\n if(staticFileInfo!=null){\n FileInfo fileInfo = new FileInfo(staticFileInfo.getApp(), staticFileInfo.getFileId(), staticFileInfo.getFileName());\n try {\n tagLogger.log(new String[]{serviceCode,file.getName()},\"Start splitting \"+file);\n fileInfo.setFileLength(file.length());\n boolean finished = splitAndLoad(fileInfo,file);\n if(!finished){\n tagLogger.log(\"Cancelled while splitting \"+file);\n return;\n }\n } catch (Exception e) {\n \tgetDatapowerNotificationLogger().addGenStaticFileEvent(fileInfo.getName(), ActionState.STATUS_COMPLETED_ERROR, getLocalhostName());\n e.printStackTrace();\n } finally {\n tagLogger.log(new String[]{serviceCode,file.getName()},\"Finish splitting \"+file);\n }\n }\n\n //3. Anyway file shoud be moved to archive\n //System.out.println(\"Start archiving\");\n File archiveFile = new File(archiveFolder, file.getName());\n tagLogger.log(new String[]{serviceCode,file.getName()},\"Start moving \"+file+\" to \"+archiveFile);\n FileCopyHelper.reliableMove(file, archiveFile);\n tagLogger.log(new String[]{serviceCode,file.getName()}, \"Moved \" + file + \" to \" + archiveFile);\n\t}", "protected void preprocess() {\n log.info(\"Processing files. Max size is {} bytes\", max);\n\n int idx = 0;\n boolean closed = false;\n\n Bag current = new Bag();\n PayloadManifest currentManifest = new PayloadManifest();\n\n for (PayloadFile file : b.getFiles().values()) {\n closed = false;\n current.addFile(file);\n currentManifest.addPayloadFile(file);\n\n if (current.getSize() >= max) {\n finishProcessing(current, currentManifest, idx++);\n\n closed = true;\n current = new Bag();\n currentManifest = new PayloadManifest();\n }\n }\n\n // Close out the final bag\n if (!closed) {\n finishProcessing(current, currentManifest, idx);\n }\n }", "public void ProcessFiles() {\n LOG.info(\"Processing SrcML files ...\");\n final Collection<File> allFiles = ctx.files.AllFiles();\n int processed = 0;\n final int numAllFiles = allFiles.size();\n final int logDiv = Math.max(1, Math.round(numAllFiles / 100f));\n\n for (File file : allFiles) {\n final String filePath = file.filePath;\n final FilePath fp = ctx.internFilePath(filePath);\n\n Document document = readSrcmlFile(filePath);\n DocWithFileAndCppDirectives extDoc = new DocWithFileAndCppDirectives(file, fp, document, ctx);\n\n internAllFunctionsInFile(file, document);\n processFeatureLocationsInFile(extDoc);\n\n if ((++processed) % logDiv == 0) {\n int percent = Math.round((100f * processed) / numAllFiles);\n LOG.info(\"Parsed SrcML file \" + processed + \"/\" + numAllFiles\n + \" (\" + percent + \"%) (\" + (numAllFiles - processed) + \" to go)\");\n }\n }\n\n LOG.info(\"Parsed all \" + processed + \" SrcML file(s).\");\n }", "protected void parseProcess(XmlElement processElement) {\n\n // Reset all mappings that are related to one process definition\n // sequenceFlows = new HashMap<String, TransitionImpl>();\n\n // The name of the ProcessDefinition is the value of 'name' attribute, in case that it is defined.\n String processName;\n if (processElement.getAttribute(\"name\") == null || processElement.getAttribute(\"name\").isEmpty()) {\n\n processName = processElement.getAttribute(\"id\");\n } else {\n\n processName = processElement.getAttribute(\"name\");\n }\n processBuilder.setName(processName);\n\n processBuilder.setDescription(parseDocumentation(processElement));\n processBuilder.setAttribute(\"targetNamespace\", rootElement.getAttribute(\"targetNamespace\"));\n\n parseElements(processElement);\n\n //\n // preserve original attributes\n //\n parseGeneralInformation(processElement, processBuilder);\n\n try {\n\n BpmnProcessDefinitionModifier.decorateWithDefaultBpmnInstantiationPattern(processBuilder);\n this.finishedProcessDefinition = processBuilder.buildDefinition();\n } catch (IllegalStarteventException buildingDefinitionException) {\n\n String errorMessage = \"The processDefintion could be built.\";\n logger.error(errorMessage, buildingDefinitionException);\n }\n\n // Doing the afterwork\n for (BpmnXmlParseListener parseListener : parseListeners) {\n parseListener.parseProcess(processElement, finishedProcessDefinition);\n }\n }", "private void processFromLastRun() {\n for (String configId : dirsFromLastRunToProcess.keySet()) {\r\n File dirToProcess = dirsFromLastRunToProcess.get(configId);\r\n processContentFiles(dirToProcess, configId);\r\n }\r\n \r\n dirsFromLastRunToProcess = new HashMap<String, File>();\r\n }", "public void run() {\n\t\t\twhile (parent.getFileStack().size() > 0) {\n\t\t\t\tFile file = parent.getFileStack().pop();\n\t\t\t\tthis.processFile(file);\n\t\t\t}\n\t\t}", "@SuppressWarnings(\"resource\")\n\tprivate ArrayList<Process> processInput(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tArrayList<Process> processes = new ArrayList<Process>();\n\t\tint count = 0;\n\t\tint index = count % 4;\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tint numOfProcesses, A = 0, B = 0, C = 0, IO;\n\t\tFile file = new File(args[0]);\n\t\ttry {\n\t\t\tscan = new Scanner(file);\n\t\t\tnumOfProcesses = scan.nextInt();\n\t\t\twhile (scan.hasNextInt()) {\n\t\t\t\tindex = count % 4;\n\t\t\t\tint n = scan.nextInt();\n\t\t\t\tif (index == 0)\n\t\t\t\t\tA = n;\n\t\t\t\telse if (index == 1)\n\t\t\t\t\tB = n;\n\t\t\t\telse if (index == 2)\n\t\t\t\t\tC = n;\n\t\t\t\telse {\n\t\t\t\t\tIO = n;\n\t\t\t\t\tProcess p = new Process(A,B,C,IO);\n\t\t\t\t\tp.setCpuTime(C);\n\t\t\t\t\tprocesses.add(p);\n\t\t\t\t}\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tscan.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn processes;\n\t\t\n\t}", "public void proccessLogFile() throws IOException {\n \n for(int i = 0; i < numberOfThreads; i++){\n Thread t = new LookupThread(entries, this);\n t.start();\n }//end for\n \n String entry = in.readLine();\n while(entry != null){\n if(entries.size() > numberOfThreads){\n try{\n Thread.sleep((long)1000.0 / numberOfThreads);\n }//end try \n catch(InterruptedException iex){\n continue;\n }//end catch\n \n synchronized(entries){\n entries.add(0, entry);\n entries.notifyAll();\n }//end synchronized\n \n entry = in.readLine();\n Thread.yield(); \n }//end if\n }//end while\n \n }", "void processFile(File file);", "@Override\n\tprotected void process(List<Integer> chunks){\n\t\tString[] s= fileName.split(\"/\");\n\t\tthis.statuslbl.setText(\"Creating \"+s[s.length-1]+\", please wait...\");\n\t\tprogressBar.setValue(n);\n\t}", "@Override\n public void run()\n {\n logger.info(\"Starting the producer \" + Thread.currentThread().getName());\n /*\n * Process all files inside this directory\n */\n if (file.isDirectory())\n {\n logger.debug(file.getAbsolutePath() + \" is a directory. Processing directory files (one level only)\");\n\n File[] files = file.listFiles(new FilenameFilter()\n {\n @Override\n public boolean accept(File dir, String name)\n {\n if (name.startsWith(\".\"))\n return false;\n else\n return true;\n }\n });\n\n for (File f : files)\n {\n this.processFile(f);\n }\n }\n /*\n * Process the file\n */\n else\n {\n this.processFile(this.file);\n }\n\n try\n {\n // Sleep a second to wait other threads to finish their processes\n Thread.sleep(1000);\n }\n catch (InterruptedException e)\n {\n\n e.printStackTrace();\n }\n\n logger.info(\"Finishing producer \" + Thread.currentThread().getName());\n\n /*\n * Generates a dummy Entity to stop the consumers\n */\n Entity e = new Entity(ImporterConstants.CANCEL_ENTITY_URI, null);\n\n try\n {\n queue.put(e);\n }\n catch (InterruptedException e1)\n {\n e1.printStackTrace();\n }\n\n }", "private void processNewFile(String filename) throws IOException {\n \n /*read posture information from file*/\n Posture posture = new Posture(filename);\n /* keep the predictions made by each activity HMM to later choose the best one*/\n Map<Activity, Prediction> predictions = new EnumMap<Activity, Prediction>(Activity.class);\n Prediction prediction;\n Map.Entry<Activity, Prediction> bestPrediction;\n String predictedActivity;\n int preds[], predictedActivityIndex;\n int frameNumber = FileNameComparator.getFileNumber(filename);\n \n for (Activity activity : Activity.values()) {\n /* make a prediction using an activity's HMM*/\n prediction = predictActivity(activity, posture, filename);\n predictions.put(activity, prediction);\n }\n \n /* select the best prediction */\n bestPrediction = chooseBestPrediction(predictions);\n \n preds = bestPrediction.getValue().getPredictions();\n \n /* check to see if no activity has been detected */\n if (preds[preds.length - 1] == 1) {\n predictedActivity = bestPrediction.getKey().getName();\n predictedActivityIndex = bestPrediction.getKey().getIndex();\n } else {\n predictedActivity = \"no activity\";\n predictedActivityIndex = 0;\n }\n \n \n System.out.println(\"Activity from frame \" + frameNumber + \": \" + predictedActivity);\n \n /* log activity prediction to file */\n appendActivityToFile(frameNumber, predictedActivityIndex, bestPrediction.getValue().getProbability());\n \n \n }", "public void startProcess() throws InterruptedException\r\n\t{\r\n\t\twhile (true)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tConceptCodeManager.logger.info(\"Concept Coding process started at \"\r\n\t\t\t\t\t\t+ new Date().toString());\r\n\t\t\t\tfinal List deidReportIDList = this.getReportIDList();\r\n\t\t\t\tthis.processReports(deidReportIDList);\r\n\t\t\t}\r\n\t\t\tcatch (final Exception ex)\r\n\t\t\t{\r\n\t\t\t\tConceptCodeManager.logger.error(\r\n\t\t\t\t\t\"Unexpected Exception in Concept Code Pipeline\"+ex.getMessage(), ex);\r\n\t\t\t\tConceptCodeManager.logger.info(\"Concept Coding process finished at \"\r\n\t\t\t\t\t\t+ new Date().toString()\r\n\t\t\t\t\t\t+ \". Thread is going to sleep.\");\r\n\t\t\t\tThread.sleep(Integer.parseInt(CaTIESProperties\r\n\t\t\t\t\t\t.getValue(CaTIESConstants.CONCEPT_CODER_SLEEPTIME)));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void doProcess() throws Exception {\n boolean continueProcessing = true;\n while (continueProcessing) {\n continueProcessing = processFollowUpsRecords();\n }\n commitRecords();\n }", "public void generate() throws FileNotFoundException, UnsupportedEncodingException {\n\t\twriter = new PrintWriter(outputFile, \"UTF-8\");\n\t\tFile file = new File(inputFile);\n\t\treader = new Scanner(file);\n\t\tinitializeFile();\n\t\t\n\t\tString line = readLine();\n\t\twhile (line != null) {\n\t\t\tprocess(line);\n\t\t\tline = readLine();\n\t\t}\n\t\t\n\t\tfinishFile();\n\t\twriter.close();\n\t}", "private void processBulk()\n {\n File inDir = new File(m_inDir);\n String [] fileList = inDir.list();\n \n for (int j=0; j<fileList.length; j++)\n {\n String file = fileList[j];\n if (file.endsWith(\".xml\"))\n {\n m_inFile = m_inDir + \"/\" + file;\n m_localeStr = Utilities.extractLocaleFromFilename(file);\n processSingle();\n }\n }\n }", "public void processFile() {\r\n\t\t//process word count here\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\tString line;\r\n\t\twordCount = customFile.getWordCount();\r\n\t\tList<Future<Long>> listOfFutures = new ArrayList<Future<Long>>();\r\n\t\t// Choose the executor and the number of threads that best suits the processor and purpose\r\n\t\t// work stealing pool took about 875 ms, cached threadpool too about 1100 ms\r\n\t\t// fixed thread pool took about 1000 ms with 10 threads and 840ms with 4 threads\r\n\t\t\r\n\t\t// ExecutorService executor = Executors.newCachedThreadPool();\r\n\t\t// ExecutorService executor = Executors.newWorkStealingPool();\r\n\t\t ExecutorService executor = Executors.newFixedThreadPool(4); \r\n\t\t\r\n\t\ttry (BufferedReader bufferedReader = new BufferedReader(new FileReader(customFile.getFile()))) {\r\n\t\t\twhile((line= bufferedReader.readLine()) != null) {\r\n\t\t\t\tline = line.trim();\r\n\t\t\t\tline = line.toLowerCase();\r\n\t\t\t\tif(line == \"\") continue;\r\n\t\t\t\tsetOfLines.put(line);\r\n\t\t\t\tFuture<Long> future = executor.submit(this);\r\n\t\t\t\tlistOfFutures.add(future);\r\n\t\t\t\t}\r\n\t\t\t// wait until all the futures return.\r\n\t\t\tfor (Future <Long> future : listOfFutures) {\r\n\t\t\t\tfuture.get();\r\n\t\t\t}\r\n\t\t\t// stop accepting new tasks, close the executor\r\n\t\t\texecutor.shutdown();\r\n\t\t}\r\n\t\tcatch (IOException e1) {\r\n\t\t\tcustomFile.setErrorString(\"There was an error reading this file, the file could be open or\"\r\n\t\t\t\t\t+ \" blocked by other resources\");\r\n\t\t\tlogger.error(e1);\r\n\t\t}\r\n\t\tcatch (ExecutionException |InterruptedException e1) { \r\n\t\t\tcustomFile.setErrorString(\"Unknown error occured while reading this file\");\r\n\t\t\tlogger.error(e1);\r\n\t\t}\r\n\r\n\t\tfor(String word : wordCount.keySet() ) {\r\n\t\t\ttotalWords = totalWords + wordCount.get(word);\r\n\t\t\tif(wordCount.get(word)<thresholdForWordRepetition) {\r\n\t\t\t\t\twordCount.remove(word);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tlogger.debug(\"total words = \" + totalWords) ;\r\n\t\tcustomFile.setTotalWords(totalWords);\r\n\t\tif(totalWords>thresholdForLongFile) {\r\n\t\t\tcustomFile.setWordCount(wordCount);\r\n\t\t\tparentLongFilesList.add(customFile);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcustomFile.setWordCount(null);\r\n\t\t\tparentShortFilesList.add(customFile);\r\n\t\t}\r\n\t\tlong stopTime = System.currentTimeMillis();\r\n\t long elapsedTime = stopTime - startTime;\r\n\t logger.debug(\"processed file \"+ customFile.getName() + \" in \" + elapsedTime + \"ms\");\r\n\t}", "public void getJobMixAndMakeProcesses(){\n if(jobType == 1){\n //type 1: there is only one process, with A=1 and B=C=0\n //since there is only one process, no the currentWord is 111%processSize\n processes.add(new process(1, 1, 0, 0, 111 % processSize));\n\n }else if(jobType ==2){\n //type 2: there are four processes, each with A=1, B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i, 1, 0, 0, (111*i) % processSize));\n }\n\n\n }else if(jobType ==3){\n //type 3: there are four processes, each with A=B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i,0, 0, 0, (111*i) % processSize));\n }\n\n }else{\n System.out.println(\"job type 4!!\");\n //process 1 with A=0.75, B=0.25, C=0\n processes.add(new process(1, 0.75, 0.25, 0, (111) % processSize));\n //process 2 with A=0.75, B= 0, C=0.25\n processes.add(new process(2, 0.75, 0, 0.25, (111*2) % processSize));\n //process 3 with A=0.75, B=0.125, C=0.125\n processes.add(new process(3, 0.75, 0.125, 0.125, (111*3) % processSize));\n //process 4 with A=0.5, B=0.125, C=0.125\n processes.add(new process(4, 0.5, 0.125, 0.125, (111*4) % processSize));\n\n }\n\n }", "public void incrementFileProcess() {\n this.setCurrFileName(files.elementAt(\n this.currFileProgressValue).toString());\n this.currFileProgressValue++;\n this.pbarFileProcess.setValue(this.currFileProgressValue);\n this.lblFileProcessCaption.setText(processCaption+\" \"+currFileProgressValue+\" of \"+\n maxfiles); \n }", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\tpublic void run() {\n\t\t\n\t\t\n\t\tswitch(processID)\n\t\t{\n\t\tcase 1:process1();break;\n\t\tcase 2:process2();break;\n\t\tcase 3:process3();break;\n\t\tcase 4:process4();break;\n\t\tcase 5:process5();break;\n\t\t}\n\n\t}", "@Override public void process()\n{\n readLockData(lock_file);\n\n pattern_builder = new DylockPatternBuilder(this);\n processInput();\n\n try {\n IvyXmlWriter xw = new IvyXmlWriter(output_file);\n xw.begin(\"PATTERNS\");\n pattern_builder.outputPatterns(xw);\n xw.end(\"PATTERNS\");\n xw.close();\n }\n catch (IOException e) { }\n}", "@Override\r\n public void run() {\r\n Path dir = propsPath.getParent();\r\n for (;;) {\r\n try {\r\n WatchService watcher = dir.getFileSystem().newWatchService();\r\n dir.register(watcher, StandardWatchEventKinds.ENTRY_MODIFY);\r\n WatchKey watckKey = watcher.take();\r\n List<WatchEvent<?>> events = watckKey.pollEvents();\r\n events.stream().filter((event) -> (event.kind() == StandardWatchEventKinds.ENTRY_MODIFY)).forEach((event) -> {\r\n WatchEvent.Kind<?> kind = event.kind();\r\n if (kind != OVERFLOW) {\r\n // The filename is the\r\n // context of the event.\r\n WatchEvent<Path> ev = (WatchEvent<Path>) event;\r\n Path filename = ev.context();\r\n final Path fileName = propsPath.getFileName();\r\n if (filename.equals(fileName)) {\r\n HierarchicalProperties reloadedProps = HierarchicalPreprocessorFactory.createInstance(propsPath);\r\n props.setRoot(reloadedProps.getRoot());\r\n }\r\n }\r\n });\r\n } catch (IOException | InterruptedException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }\r\n }", "public void processFiles(){\n\t\tfor(String fileName : files) {\n\t\t\ttry {\n\t\t\t\tloadDataFromFile(fileName);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"Can't open file: \" + fileName);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tprintInOrder();\n\t\t\tstudents.clear();\n\t\t}\n\t}", "public static void main(String[] args)\n\t{\n\t\tString fullFile = \"\";\n\t\tint lineAmount = 0;\n\t\ttry\n\t\t{\n\t\t\tBufferedReader br = new BufferedReader(\n\t\t\t\t\tnew FileReader(\"alice.txt\"));\n\t\t\t\n\t\t\tString st = br.readLine();\n\t\t\t//int counter = 0;\n\t\t while (st != null)\n\t\t {\n\t\t \t//fullFile[counter] = st;\n\t\t \tfullFile += st;\n\t\t \t//System.out.println(st);\n\t\t \tst = br.readLine();\n\t\t \tlineAmount++;\n\t\t \t//counter++;\n\t\t }\n\t\t br.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint processors = Runtime.getRuntime().availableProcessors();\n\t\tSystem.out.println(\"Num of processors: \" + processors);\n\t\t\n\t\tForkJoinPool forkJoinPool = new ForkJoinPool(processors);\n\t\t\n\t\tint x = fullFile.length() / processors;\n\t\t\n//\t\tint count = 0;\n//\t\tint stoppingPointForLastThread = 0;\n\t\t\n//\t\tfor(int i = 0; i < fullFile.length(); i++)\n//\t\t{\n//\t\t\tif(fullFile.charAt(i) == '\\n')\n//\t\t\t{\n//\t\t\t\tcount++;\n//\t\t\t}\n//\t\t\t\n//\t\t\tif(count >= processors)\n//\t\t\t{\n//\t\t\t\tThread t = new Thread( fullFile.substring(\n//\t\t\t\t\t\tstoppingPointForLastThread, i) );\n//\t\t\t\t\n//\t\t\t\tstoppingPointForLastThread = i;\n//\t\t\t\tcount = 0;\n//\t\t\t}\n//\t\t}\n\t\t\n\t\tint divisionOfWork = (lineAmount * 40) / processors;\n\t\t\n//\t\tThread t = new Thread( fullFile.substring(0, \n//\t\t\t\tdivisionOfWork) );\n//\t\tThread t = new Thread( \n//\t\t\t\tfullFile.substring(divisionOfWork, \n//\t\t\t\tdivisionOfWork * 2) );\n\t\t\n\t\t//FORKJOIN\n\t\tAtomicInteger wordCount = new AtomicInteger(0);\n\t\tfor(int i = 0; i < processors; i++)\n\t\t{\n\t\t\tDataParallelThread t = new DataParallelThread( \n\t\t\t\t\tfullFile.substring(divisionOfWork * i, \n\t\t\t\t\tdivisionOfWork + (divisionOfWork * i)) );\n\t\t\t\n\t\t\twordCount.getAndAdd(\n\t\t\t\t\tforkJoinPool.invoke(t).get()\n\t\t\t\t\t);\n\t\t}\n\t\tSystem.out.println(\"Word count of \\\"the\\\" is: \" + \n\t\t\t\twordCount);\n\t\t\n\t\t//THREAD\n\t\tMyThread[] threads = new MyThread[processors];\n\t\tfor(int i = 0; i < processors; i++)\n\t\t{\n\t\t\tMyThread t = new MyThread( \n\t\t\t\t\tfullFile.substring(divisionOfWork * i, \n\t\t\t\t\tdivisionOfWork + (divisionOfWork * i)) );\n\t\t\t\n\t\t\tt.run();\n\t\t\tthreads[i] = t;\n\t\t}\n\t\t\n\t\tint wordCount2 = 0;\n\t\tfor(int i = 0; i < processors; i++)\n\t\t{\n\t\t\twordCount2 += threads[i].WordCount();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Word count of \\\"the\\\" is: \" + \n\t\t\t\t\twordCount2);\n\t\t\n\t\t\n\t\t\n//\t\tint wordCount = 0;\n//\t\tfor(int i = 0; i < processors; i++)\n//\t\t{\n//\t\t\twordCount += forkJoinPool.\n//\t\t}\n\t}", "public void process(final IFile file) {\n try { \n \t\n \tIRunnableWithProgress runnable = new IRunnableWithProgress(){\n \t\tpublic void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n \t\t\ttry {\n \t\t\t\tSubMonitor progress = SubMonitor.convert(monitor, 100);\n \t\t\t\tResource csResource = getResource(file);\n \n \t\t\t\tMarkerHelper.unmark(csResource);\n \t\t\t\tif (containsProblems(csResource)) {\n \t\t\t\t\tMarkerHelper.mark(csResource);\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t \n \t\t\t\tfinal ConcreteSyntax concreteSyntax = (ConcreteSyntax) csResource.getContents().get(0);\n \t\t\t\tfinal String csPackageName = getPackageName(concreteSyntax);\n \t\t\t\tfinal String projectName = csPackageName;\n \t\t\t \n \t\t\t\tif (projectName == null) { \n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t//create a project\n \t\t\t\tIProject project = createProject(progress, projectName);\n \t\t\t \n \t\t\t\t//generate the resource class, parser, and printer\n \t\t\t\tResourcePackage pck = new ResourcePackage(concreteSyntax, csPackageName, getSrcFolder(project), copyMapFromPreferenceStore());\n \t\t\t\tResourcePackageGenerator.generate(pck, progress.newChild(TICKS_GENERATE_RESOURCE));\n \t\t\t \n \t\t\t\t//errors from parser generator?\n \t\t\t\tif (containsProblems(csResource)) {\n \t\t\t\t\tMarkerHelper.mark(csResource);\n \t\t\t\t}\n \t\t\t \n \t\t\t boolean overridePluginConfig = EMFTextEditUIPlugin.getDefault().getPreferenceStore().getBoolean(EMFTextEditUIPlugin.OVERRIDE_PLUGIN_CONFIG_NAME);\n \t\t\t \n \t\t\t\tcreateMetaFolder(progress, project);\n \t\t\t\tcreateManifest(progress, concreteSyntax, projectName, overridePluginConfig, project);\n \t\t\t\tcreatePluginXML(progress, concreteSyntax, projectName, overridePluginConfig, project, file);\n \t\t\t\t\n \t\t\t\tmarkErrors(concreteSyntax);\n \t\t\t\t\n \t\t\t\tcreateMetaModelCode(progress, concreteSyntax);\n \t\t\t\t\n \t\t\t\tproject.refreshLocal(IProject.DEPTH_INFINITE, progress.newChild(TICKS_REFRESH_PROJECT));\n \t\t\t}\n \t\t\t catch (CoreException e) {\n \t\t\t \tthrow new InvocationTargetException(e);\n \t\t\t }\n \t\t}\n \n \t\t\t\tprivate String getPackageName(final ConcreteSyntax cSyntax) {\n \t\t\t\t\treturn (cSyntax.getPackage().getBasePackage() == null ? \"\" : cSyntax.getPackage().getBasePackage() + \".\") + cSyntax.getPackage().getEcorePackage().getName() + \".resource.\" + cSyntax.getName();\n \t\t\t\t}\n \n \t};\n \t\n \tPlatformUI.getWorkbench().getProgressService().busyCursorWhile(runnable);\n }\n catch (InvocationTargetException e){\n \te.getTargetException().printStackTrace();\n }\n catch (InterruptedException e){\n \te.printStackTrace();\n }\n }", "public static void createAllPackets() throws IOException {\r\n fileReader = new FileInputStream(filePath); // open file\r\n\r\n // // uncomment this part for checking\r\n // File outFile = new File(\"out\");\r\n // FileOutputStream fos = new FileOutputStream(outFile);\r\n\r\n while (!isDone) {\r\n // while there are still bytes to read from file\r\n byte[] data = new byte[MAX_LENGTH];\r\n\r\n int bytesRead = fileReader.read(data);\r\n\r\n if (bytesRead == -1) {\r\n isDone = true;\r\n break;\r\n } else {\r\n byte[] packet = createPacket(data);\r\n packets.add(packet); // add packet to list of packets, its sequence num is index+1 because list is zero based\r\n\r\n // // uncomment this part for checking\r\n // byte[] temp = new byte[1022];\r\n // System.arraycopy(packet, 2, temp, 0, 1022); // out.png\r\n // fos.write(temp);\r\n }\r\n }\r\n\r\n //fos.close();\r\n fileReader.close();\r\n }", "private static void preprocess() {\n \tLOG.info(\"Begin preprocessing of data.\");\n \t\n \tLOG.debug(\"Create a IterativeDirectoryReader.\");\n \t// Create a reader for directories\n \tIterativeDirectoryReader iterativeDirectoryReader = (IterativeDirectoryReader) ReaderFactory.instance().getIterativeDirectoryReader();\n \titerativeDirectoryReader.setDirectoryName(clArgs.preprocessInDir);\n \titerativeDirectoryReader.setPathInChildDirectory(clArgs.preprocessPathInChildDir);\n \t\n \tLOG.debug(\"Create a IterativeFileReader.\");\n \t// Create a reader for text files and set an appropriate file filter\n \tIterativeFileReader iterativeFileReader = (IterativeFileReader) ReaderFactory.instance().getIterativeFileReader();\n \titerativeFileReader.setFileFilter(FileUtil.acceptVisibleFilesFilter(false, true));\n \t\n \tLOG.debug(\"Create a TextFileLineReader.\");\n \t// Create a reader for text files, the first six lines are not relevant in this data set\n \tTextFileLineReader textFileLineReader = (TextFileLineReader) ReaderFactory.instance().getTextFileLineReader();\n \ttextFileLineReader.setOffset(clArgs.preprocessLineOffset);\n \t\n \tLOG.debug(\"Create a GpsLogLineProcessor.\");\n \t// Create a processor for user points\n \tGpsLogLineProcessor processor = new GpsLogLineProcessor(clArgs.preprocessOutFile);\n \t\n \t// Build reader chain\n \titerativeDirectoryReader.setReader(iterativeFileReader);\n \titerativeFileReader.setReader(textFileLineReader);\n \ttextFileLineReader.setProcessor(processor);\n \t\n \titerativeDirectoryReader.attach(processor, \n \t\t\t\tnew Interests[] {\n \t\t\t\t\tInterests.NewChildDirectory,\n \t\t\t\t\tInterests.HasFinished\n \t\t\t\t});\n \t\n \tLOG.debug(\"Read GPS logs. Save the data in a new file {}.\", clArgs.preprocessOutFile);\n \t// Read and save the data\n \titerativeDirectoryReader.read();\n\n \tLOG.info(\"Finished preprocessing of data.\");\n }", "@Override\r\n\tprotected void process(List<String> chunks) {\r\n\t\tfor (String data: chunks) {\r\n\t\t\thandleData(data);\r\n\t\t}\r\n\t}", "public void getFile(){\n\t\t\n\t\tParser parser = new Parser(f, this, taskPool);\n\t\tWorker w;\n\t\tfor (int i = 0; i < this.getTasks().getNumWorker(); i++){\n\t\t\t w = new Worker(position, this);\n\t\t\t w.setWorkerNum(i);\n\t\t\t workers.add(w);\n\t\t\t} \n\t\t\n\t\tworkPanel = new WorkPanel(tasks, this, workers);\n\t\tworkPanel.setBounds(0, 0, 600, 600);\n\t\tThread twp = new Thread(workPanel);\n\t\ttwp.start();\n\n\t\tmainPanel.add(workPanel);\n\t\t\n\t\t\tfor (int k = 0; k < workers.size(); k++){\n\t\t\t\tworkers.get(k).start();\n\t\t\t}\n\n\t}", "public void process() {\n\t}", "@Override\n\tpublic void run() {\n\t\tIterable<Page> allPages = new Pages(this.numPages, this.fileName);\n\t\tfor (Page pg : allPages) {\n\t\t\ttry {\n\t\t\t\tqueue.put(pg);\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\tfor(int i=0;i<this.numThread;i++){\n\t\t\ttry {\n\t\t\t\tqueue.put(new PoisonPill());\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}", "@Override\n public void run() {\n MemUsage memUsage = new MemUsage();\n Runtime run = Runtime.getRuntime();\n String memPath = \"/proc/\" + processId + \"/status\";\n LOG.info(\"Reading the file for memory: \" + memPath);\n String currentTime;\n File statusFile;\n float pcpu;\n int pmem;\n ProcessInfoBean processInfoBean = new ProcessInfoBean();\n processInfoBean.setLocalHostIp(ip);\n processInfoBean.setProceeName(processName);\n while (running) {\n pcpu = getCPUUsageByTopCommond(run, cmd);\n if (pcpu != -1) {\n statusFile = new File(memPath);\n if (statusFile.exists()) {\n pmem = memUsage.getMemUsage(statusFile);\n if (pmem != -1) {\n currentTime = TimeUtils.getCurrentTime();//获取系统当前时间\n processInfoBean.setUpdateTime(currentTime);\n processInfoBean.setCpuUsage(pcpu);\n processInfoBean.setMemUsage(pmem);\n processInfoBean.setPid(Integer.parseInt(processId));\n processInfoDao.insert_process_monitor(processInfoBean);\n MybatisUtils.session.commit();\n try {\n Thread.sleep(intervalTime);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }\n }\n }\n }", "@ServiceActivator\r\n public Map<String, String> manageProcessDataFile(@Payload File file) {\r\n log.debug(\"~int.manageProcessDataFile() : Invoked.\");\r\n log.trace(\"~int.manageProcessDataFile() : Thread '\" + Thread.currentThread().getName() + \"'.\");\r\n\r\n String fileCanonicalPath = null;\r\n try {\r\n fileCanonicalPath = file.getCanonicalPath();\r\n log.debug(\"~int.manageProcessDataFile() : File canonical path '\" + fileCanonicalPath + \"'\");\r\n } catch (IOException e) {\r\n final String errorMessage = \"IO Exception retrieving file canonical path : '\" + e.getMessage() + \"'\";\r\n log.warn(\"~int.manageProcessDataFile() : \" + errorMessage);\r\n e.printStackTrace();\r\n throw new UnsupportedOperationException(errorMessage);\r\n }\r\n\r\n /*\r\n * Read in the process data file contents\r\n */\r\n Scanner scanner = null;\r\n try {\r\n scanner = new Scanner(file);\r\n } catch (FileNotFoundException fileNotFoundException) {\r\n final String errorMessage = \"Failed to read file '\" + file.toString() + \"' - error '\" + fileNotFoundException.getMessage() + \"'\";\r\n log.fatal(\"~int.manageProcessDataFile() : \" + errorMessage);\r\n fileNotFoundException.printStackTrace();\r\n throw new UnsupportedOperationException(errorMessage);\r\n }\r\n\r\n final StringBuilder fileContents = new StringBuilder((int) file.length());\r\n String procFileContents = null;\r\n try {\r\n while(scanner.hasNextLine()) {\r\n fileContents.append(scanner.nextLine());\r\n }\r\n procFileContents = fileContents.toString();\r\n log.debug(\"~int.manageProcessDataFile() : Contents '\" + procFileContents + \"'\");\r\n } finally {\r\n scanner.close();\r\n }\r\n\r\n /*\r\n * Process the contents of the process data file then delete the file.\r\n */\r\n final Map<String, String> processInfo = new HashMap<String, String>(2);\r\n if (procFileContents != null) {\r\n String appManagerId = null;\r\n String processId = null;\r\n\r\n if (procFileContents.contains(DELIMETER)) {\r\n if (procFileContents.startsWith(DELIMETER)) {\r\n log.error(\"~int.manageProcessDataFile() : Cannot determine AppManagerId from process data file content.\");\r\n processId = procFileContents.split(SPLITTER)[1];\r\n } else if (procFileContents.endsWith(DELIMETER)) {\r\n log.error(\"~int.manageProcessDataFile() : Cannot determine ProcessId from process data file content.\");\r\n appManagerId = procFileContents.split(SPLITTER)[0];\r\n } else {\r\n final String[] procData = procFileContents.split(SPLITTER);\r\n appManagerId = procData[0];\r\n processId = procData[1];\r\n }\r\n } else {\r\n log.error(\"~int.manageProcessDataFile() : Cannot determine AppManagerId or ProcessId from process data file content.\");\r\n }\r\n\r\n if (appManagerId != null)\r\n processInfo.put(PROCESS_INFO_APP_MANAGER_ID, appManagerId);\r\n if (processId != null)\r\n processInfo.put(PROCESS_INFO_PROCESS_ID, processId);\r\n\r\n log.debug(\"~int.manageProcessDataFile() : Deleting process data file\");\r\n // delete the file as it's no longer required\r\n try {\r\n final FileSystemManager fileSystemManager = VFS.getManager();\r\n final FileObject fileObject = fileSystemManager.resolveFile(fileCanonicalPath);\r\n fileObject.delete(Selectors.SELECT_SELF);\r\n } catch (FileSystemException e) {\r\n log.warn(\"~int.manageProcessDataFile() : FS Exception during process data file deletion : '\" + e.getMessage() + \"'\");\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n /*\r\n * Determine if overall success and persist the status (if there's enough information to do so). \r\n */\r\n boolean processingFailure = false;\r\n if (processInfo.containsKey(PROCESS_INFO_APP_MANAGER_ID)) {\r\n final long appManagerId = new Long(processInfo.get(PROCESS_INFO_APP_MANAGER_ID));\r\n\r\n String statusMessage = null;\r\n String level = null;\r\n\r\n final String processId = processInfo.get(PROCESS_INFO_PROCESS_ID); \r\n if (processId == null) {\r\n statusMessage = \"No process id was found in process data file - simulation failure!\";\r\n processingFailure = true;\r\n //level = RunStatus.ERROR_PREFIX;\r\n } else {\r\n //appManagerDAO.saveSimulationProcessId(appManagerId, processId);\r\n\r\n statusMessage = \"Process data file read and processed successfully\";\r\n //level = RunStatus.DEBUG_PREFIX;\r\n }\r\n //final RunStatus runStatus = new RunStatus(appManagerId, null, level, statusMessage);\r\n //appManagerDAO.addStatus(runStatus);\r\n } else {\r\n // can't even persist a status update\r\n processingFailure = true;\r\n }\r\n\r\n if (processingFailure) {\r\n /*\r\n * TODO : Improve failure recovery procedure, e.g...\r\n * 1) Return VRE_INFO or VRE_OUTPUT?!\r\n * 2) Remove ~/vre_run/<port>/<app manager id>\r\n */\r\n final String errorMessage = \"Simulation processing failure problem\";\r\n log.error(\"~int.manageProcessDataFile() : \" + errorMessage);\r\n }\r\n\r\n return processInfo;\r\n }", "static void processFile(File xmlFile) {\n Document doc = null;\n try {\n doc = builder.parse(xmlFile);\n }\n catch (IOException e) {\n e.printStackTrace();\n System.exit(3);\n }\n catch (SAXException e) {\n System.out.println(\"Parsing error on file \" + xmlFile);\n System.out.println(\" (not supposed to happen with supplied XML files)\");\n e.printStackTrace();\n System.exit(3);\n }\n \n /* At this point 'doc' contains a DOM representation of an 'Items' XML\n * file. Use doc.getDocumentElement() to get the root Element. */\n System.out.println(\"Successfully parsed - \" + xmlFile);\n \n /* Fill in code here (you will probably need to write auxiliary\n methods). */\n \n Element[] elems = getElementsByTagNameNR(doc.getDocumentElement(), \"Item\");\n for(Element e : elems) {\n\n String itemId = e.getAttribute(\"ItemID\");\n String name = getElementTextByTagNameNR(e, \"Name\");\n String currently = strip(getElementTextByTagNameNR(e, \"Currently\"));\n String buy_price = strip(getElementTextByTagNameNR(e, \"Buy_Price\"));\n String first_bid = strip(getElementTextByTagNameNR(e, \"First_Bid\"));\n String number_of_bids = getElementTextByTagNameNR(e, \"Number_of_Bids\");\n String country = getElementTextByTagNameNR(e, \"Country\");\n String started = changeTime(getElementTextByTagNameNR(e, \"Started\"));\n String ends = changeTime(getElementTextByTagNameNR(e, \"Ends\"));\n Element seller = getElementByTagNameNR(e, \"Seller\");\n String sellerId = seller.getAttribute(\"UserID\");\n String sellerRatings = seller.getAttribute(\"Rating\");\n String location = getElementTextByTagNameNR(e, \"Location\");\n Element locate = getElementByTagNameNR(e, \"Location\");\n String latitude = locate.getAttribute(\"Latitude\");\n String longitude = locate.getAttribute(\"Longitude\");\n String description = getElementTextByTagNameNR(e, \"Description\");\n if(description.length() > 4000)\n description = description.substring(0, 4001);\n\n // add the record to the list\n items.add(itemRecord(itemId, name, currently, buy_price, first_bid, number_of_bids, country,\n started, ends, sellerId, location, latitude, longitude, description));\n\n // add the category infomation and belongsTo information\n Element[] cates = getElementsByTagNameNR(e, \"Category\");\n for(Element c : cates) {\n String cate = getElementText(c);\n if(category.containsKey(cate) == false) {\n int cnt = category.size();\n category.put(cate, cnt);\n }\n int index = category.get(cate);\n String caterecord = itemId + columnSeparator + index;\n belongsTo.add(caterecord);\n }\n\n // add the user information\n if(users.containsKey(sellerId)) {\n users.get(sellerId).sellRating = sellerRatings;\n }\n else {\n User u = new User(sellerId);\n u.sellRating = sellerRatings;\n users.put(sellerId, u);\n }\n\n // add the bid infromation and bider inforamtion\n Element[] ebids = getElementsByTagNameNR(getElementByTagNameNR(e, \"Bids\"), \"Bid\");\n for(Element b : ebids) {\n Element bidder = getElementByTagNameNR(b, \"Bidder\");\n String bidderId = bidder.getAttribute(\"UserID\");\n String bidderRating = bidder.getAttribute(\"Rating\");\n String bidderloc = getElementTextByTagNameNR(bidder, \"Location\");\n String biddercoun = getElementTextByTagNameNR(bidder, \"Country\");\n String amount = strip(getElementTextByTagNameNR(b, \"Amount\"));\n String time = changeTime(getElementTextByTagNameNR(b, \"Time\"));\n\n\n if(users.containsKey(bidderId) == false) {\n User u = new User(bidderId);\n users.put(bidderId, u);\n }\n users.get(bidderId).location = bidderloc;\n users.get(bidderId).country = biddercoun;\n users.get(bidderId).bidRating = bidderRating;\n bids.add(bidRecord(itemId, bidderId, time, amount));\n }\n\n }\n \n \n /**************************************************************/\n \n }", "public ProcessSequence(ProcessCreator[] pcs) {\n _creators = pcs;\n _processes = new Process[_creators.length];\n for(int i=0; i<_processes.length; ++i) { _processes[i] = null; }\n _combinedInputStream = new PipedInputStream();\n try {\n _combinedStdOutStream = new PipedOutputStream(_combinedInputStream);\n _combinedInputStream.connect(_combinedStdOutStream);\n }\n catch(IOException e) { /* ignore, no output if this goes wrong */ }\n _combinedErrorStream = new PipedInputStream();\n try {\n _combinedStdErrStream = new PipedOutputStream(_combinedErrorStream);\n _combinedErrorStream.connect(_combinedStdErrStream);\n }\n catch(IOException e) { /* ignore, no output if this goes wrong */ }\n \n _deathThread = new Thread(new Runnable() {\n public void run() {\n GeneralProcessCreator.LOG.log(\"ProcessSequence._deathThread running\");\n boolean interrupted = false;\n // wait for the completion of each of the subprocesses\n while(_index<_processes.length) {\n GeneralProcessCreator.LOG.log(\"Waiting for process \"+_index);\n do {\n interrupted = false;\n try {\n _processes[_index].waitFor();\n }\n catch(InterruptedException e) { interrupted = true; }\n } while(interrupted);\n GeneralProcessCreator.LOG.log(\"Process \"+_index+\" terminated\");\n // a process has just terminated\n if (_index<_processes.length-1) {\n // increase index;\n ++_index;\n try {\n _processes[_index] = _creators[_index].start();\n GeneralProcessCreator.LOG.log(\"Process \"+_index+\" started\");\n connectProcess(_processes[_index]);\n }\n catch(IOException e) {\n // could not start the process, record error but continue\n // TODO: find a way to record the error in the ExternalProcessPanel\n// DrJavaErrorHandler.record(e);\n _processes[_index] = DUMMY_PROCESS;\n }\n }\n else {\n ++_index;\n GeneralProcessCreator.LOG.log(\"Closing StdOut and StdErr streams.\");\n try {\n stopAllRedirectors();\n _combinedStdOutStream.flush();\n _combinedStdOutStream.close();\n _combinedStdErrStream.flush();\n _combinedStdErrStream.close();\n }\n catch(IOException e) { /* ignore, just don't close the streams */ }\n }\n }\n }\n },\"Process Sequence Death Thread\");\n _index = 0;\n try {\n _processes[_index] = _creators[_index].start();\n }\n catch(IOException e) {\n // could not start the process, record error but continue\n // TODO: find a way to record the error in the ExternalProcessPanel\n _processes[_index] = DUMMY_PROCESS;\n// DrJavaErrorHandler.record(e);\n }\n connectProcess(_processes[_index]);\n _deathThread.start();\n }", "public static void processFile(File f) throws Exception {\n\t\ttry {\r\n\t\t\tBufferedReader bufRead = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tnew FileInputStream(f)));\r\n\t\t\tString S1 = \"\";\r\n\t\t\twhile ((S1 = bufRead.readLine()) != null) {\r\n\t\t\t\t//System.out.println(S1);\r\n\t\t\t\tgetPubTypes(S1);\r\n\t\t\t\t//System.out.println();\r\n\t\t\t}\r\n\t\t\tbufRead.close();\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(\"Something is wrong with reading file! \"\r\n\t\t\t\t\t+ \"Can't find the appropriate file!\");\r\n\t\t}\r\n\r\n\t\t// return allDiseases;\r\n\r\n\t}", "private static void plusProcessPath (final String psFileName) throws IOException {\r\n\t\tvar path = Paths.get (DIR.toString (), psFileName);\r\n\t\tvar lines = Files.readAllLines (path);\r\n\t\tif (lines.size () <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tlines.set (0, lines.get (0) + \" cwd exe cmdline\");\r\n\t\tfor (int i = 1 ; i < lines.size () ; i++) {\r\n\t\t\tvar s = new Scanner (lines.get (i));\r\n\t\t\ts.next (); // USER\r\n\t\t\tvar pid = s.next ();\r\n\t\t\tvar proc = Paths.get (\"/proc/\", pid);\r\n\t\t\tString cwd = \"\", exe = \"\", cmdline = \"\";\r\n\t\t\ttry { cwd = proc.resolve (\"cwd\").toRealPath ().toString (); }\r\n\t\t\tcatch (NoSuchFileException e) { /* ignore */ }\r\n\t\t\ttry { exe = proc.resolve (\"exe\").toRealPath ().toString (); }\r\n\t\t\tcatch (NoSuchFileException e) { /* ignore */ }\r\n\t\t\ttry { cmdline = Files.readString (proc.resolve (\"cmdline\")); }\r\n\t\t\tcatch (NoSuchFileException e) { /* ignore */ }\r\n\t\t\tlines.set (i, String.format (\"%s %s %s %s\", lines.get (i), cwd, exe, cmdline));\r\n\t\t}\r\n\t\tFiles.write (path, lines);\r\n\t}", "public void simulate() {\n\n\n\n //read file into stream, try-with-resources\n try (Stream<String> stream = Files.lines(Paths.get(ClassLoader.getSystemResource(fileName).toURI()))) {\n\n stream.forEach(c -> { logger.info(\"Processing raw command :\" + c );\n String[] robotCmdArgs = c.split(DELIM_REG_EX);\n processSingleCmd(robotCmdArgs);\n\n }\n );\n\n } catch (IOException e) {\n e.printStackTrace();\n logger.info(\"IOException processing commands :\" );\n }\n catch (URISyntaxException e) {\n e.printStackTrace();\n logger.info(\"URISyntaxException processing commands :\" );\n }\n }", "public void process(File path) throws IOException {\n\t\tIterator<File> files = Arrays.asList(path.listFiles()).iterator();\n\t\twhile (files.hasNext()) {\n\t\t\tFile f = files.next();\n\t\t\tif (f.isDirectory()) {\n\t\t\t\tprocess(f);\n\t\t\t} else {\n\t\t\t\tif (startFile != null && startFile.equals(f.getName())) {\n\t\t\t\t\tstartFile = null;\n\t\t\t\t}\n\n\t\t\t\tif (startFile == null) {\n\t\t\t\t\tprocessFile(f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(true) {\n\t\t\t\t\tv.read(file);\n\t\t\t\t}\n\t\t\t}", "public void runSJF() {\n\n //init\n ArrayList<Processus> localProcess = new ArrayList<>(); //Creation of a local list of process\n for (Processus cpy : listOfProcess) { //Copy the list of process in the local list\n localProcess.add(cpy);\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()) { //As long as there are processes that are not done yet we keep going on\n\n //Determines the next process that will be executed\n for (Processus proc : localProcess) { //flow all remaining processes\n if (proc.getTime() <= currentTime) { //check if the currentTime of the process is below the currentTime\n if (localProcess.size() == 1) { //if there is only one process left\n executedProc = proc;\n } else if ((proc.getRessource(proc.getCurrentStep()) <= tmpProc.getRessource(tmpProc.getCurrentStep())) || (proc.getTime() < tmpProc.getTime())) {//shortest process selected\n executedProc = proc;\n tmpProc = proc;\n }\n }\n }\n\n //Check if the current process is assigned\n if (executedProc != null) {\n\n //execute the current ressource\n int tmpTime = 0;\n while (executedProc.getRessource(executedProc.getCurrentStep()) > tmpTime) { //As long as there is a resource\n for (Processus proc : localProcess) {\n if (proc.getTime() <= currentTime && !proc.equals(executedProc)) { //checking if there is another process waiting\n proc.setWaitingTime(1);\n }\n }\n currentTime++; //currentTime is updating at each loop\n occupancyTime++; //occupancyTime is updating at each loop\n tmpTime++;\n }\n\n executedProc.setCurrentStep(executedProc.getCurrentStep() + 1); //Update the currentStep to the next one (index of the lists of UC and inOut)\n\n if (executedProc.getCurrentStep() >= executedProc.getlistOfResource().size()) {//if it is the end of the process\n averageReturnTime += executedProc.getExecutedTime(); //update the average return time by adding the time that the process took\n localProcess.remove(executedProc); //remove the process from the list of process that needs to run\n }\n\n if (executedProc.getCurrentStep() <= executedProc.getListOfInOut().size()) { //If there is another inOut, it set the new time\n executedProc.setTime(executedProc.getInOut(executedProc.getCurrentStep() - 1) + currentTime);\n }\n\n executedProc = null;\n } else {\n currentTime++;\n }\n }\n //end of the algo\n\n //Calculation of the variables\n occupancyRate = ((double) occupancyTime / (double) currentTime) * 100;\n for (Processus proc : listOfProcess) {\n averageWaitingTime += proc.getWaitingTime();\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 }", "public abstract void process() throws IOException;", "public void doSimulation(){\n\n File randomNumFile = new File(\"../src/random_nums.txt\");\n\n try (Scanner inFile = new Scanner(randomNumFile)) {\n\n //\n while(!allProcessesDone()){\n\n //each process\n for(int i=0; i< processes.size(); i++){\n\n //processes are numbered starting at 1, although they're indexed starting at 0 within the process array\n process currentProcess = processes.get(i);\n int processNum = currentProcess.getProcessNum();\n\n\n for(int q=0; q<QUANTUM; q++){\n\n if(currentProcess.isFinished()){\n break;\n }\n\n int frameTableIndex = frameTable.checkForHit(processNum, currentProcess.getCurrentPage(pageSize));\n\n if(frameTableIndex != -1){ //hit!\n\n frameTableElement hitFrame = frameTable.getElement(frameTableIndex);\n hitFrame.setLoaded(true);\n hitFrame.setLastTimeReferenced(currentTime);\n\n\n }else{ //miss\n\n currentProcess.setNumPageFaults(currentProcess.getNumPageFaults() + 1);\n\n if(frameTable.isFull()){ //need to evict an element\n totalEvictions++;\n frameTableElement evictedElement = null;\n\n if(replacementType.equalsIgnoreCase(\"random\")){\n evictedElement = findVictimRandom(inFile.nextInt());\n }else{\n evictedElement = evictPage();\n }\n if(evictedElement == null){\n System.out.println(\"ERROR FINDING VICTIM!\");\n }\n\n\n int correspondingProcessNum = evictedElement.getProcessNum();\n int correspondingFrameIndex = evictedElement.getIndexInFrameTable();\n int correspondingProcessIndex = correspondingProcessNum - 1;\n\n //average residency time is said to be the time that the page was evicted minus the time it was loaded\n processes.get(correspondingProcessIndex).setTotalResidencyTime(processes.get(correspondingProcessIndex).getTotalResidencyTime()\n + (currentTime - evictedElement.getTimeLoaded()));\n\n //increment number of evictions\n processes.get(correspondingProcessIndex).setNumEvictions(processes.get(correspondingProcessIndex).getNumEvictions() + 1);\n\n //set new element\n frameTableElement newElement = new frameTableElement(processNum, currentProcess.getCurrentPage(pageSize), currentTime, correspondingFrameIndex, true);\n frameTable.setElement(correspondingFrameIndex, newElement);\n\n }else{\n //place the page in the highest numbered free frame based on lab instructions\n frameTableElement highestFreeFrame = null;\n int freeFrameIndex = -1;\n for(int frame = frameTable.getSize()- 1; frame>=0; frame--){\n if(!frameTable.getElement(frame).isActive()){\n highestFreeFrame = frameTable.getElement(frame);\n freeFrameIndex = frame;\n break;\n }\n }\n if(highestFreeFrame == null || freeFrameIndex == -1){\n System.out.println(\"error finding free frame\");\n }\n frameTableElement newElement = new frameTableElement(processNum, currentProcess.getCurrentPage(pageSize), currentTime, freeFrameIndex, true );\n frameTable.setElement(freeFrameIndex, newElement);\n }\n\n }\n\n //calculate next current reference word for next quantum turn\n processes.get(i).setNextCurrentReferenceWord(inFile, processSize, numReferencesPerProcess);\n\n currentTime++;\n }\n\n\n }\n\n }//end of simulation\n printFinishInfo();\n\n }\n catch (Exception e){\n System.out.println(e);\n }\n\n }", "public static void main(String[] args) throws IOException \n\t{\n\tFile file= new File(\"C:\\\\Users\\\\gurnoor.singh\\\\Downloads\\\\prob1.txt\");\n\tSystem.out.println(file);\n\tBufferedReader br = new BufferedReader(new FileReader(file));\n\n\t// making thread pool of 5 threads to perform execution\n\tExecutorService pool = Executors.newFixedThreadPool(5);\n\n\tString st;\n\t while ((st = br.readLine()) != null) \n\t {\n\t Runnable r=new newClass(st);\n\t pool.execute(r);\n\n\t }\n\n\n\tbr.close();\n\tpool.shutdown();\n\t}", "protected void parseSequenceFlow(XmlElement processElement) {\n \n for (XmlElement sequenceFlowElement : processElement.getElements(\"sequenceFlow\")) {\n \n String id = sequenceFlowElement.getAttribute(\"id\");\n String sourceRef = sequenceFlowElement.getAttribute(\"sourceRef\");\n String destinationRef = sequenceFlowElement.getAttribute(\"targetRef\");\n \n if (sourceRef == null && destinationRef == null) {\n String errorMessage = \"Each SequenceFlow XML tag must have a sourceRef\"\n + \" and a destinationRef corresponding to a XML activity.\"\n + \" One of these attributes are not set correctly. Please do that!!\";\n \n getProblemLogger().addError(errorMessage, sequenceFlowElement);\n return;\n }\n\n Node sourceNode = getNodeXmlIdTable().get(sourceRef);\n Node destinationNode = getNodeXmlIdTable().get(destinationRef);\n\n if (sourceNode == null || destinationNode == null) {\n if (sourceNode == null) {\n String errorMessage = \"The source '\" + sourceRef + \"' is not available in the XML.\";\n getProblemLogger().addError(errorMessage, sequenceFlowElement);\n }\n if (destinationNode == null) {\n String errorMessage = \"The destination '\" + destinationRef + \"' is not available in the XMl.\";\n getProblemLogger().addError(errorMessage, sequenceFlowElement);\n }\n return;\n }\n\n Condition controlFlowCondition = parseSequenceFlowCondition(sequenceFlowElement);\n \n ControlFlowBuilder controlFlowBuilder = processBuilder.getControlFlowBuilder().controlFlowGoesFromTo(\n sourceNode, destinationNode);\n \n controlFlowBuilder.setId(id);\n \n if (controlFlowCondition != null) {\n controlFlowBuilder.setCondition(controlFlowCondition);\n }\n \n ControlFlow controlFlow = controlFlowBuilder.buildControlFlow();\n \n for (BpmnXmlParseListener parseListener : parseListeners) {\n parseListener.parseSequenceFlow(sequenceFlowElement, controlFlow, processBuilder);\n }\n }\n }", "private void processIn() throws IOException {\n for (; ; ) {\n var status = fr.process(bbin);\n switch (status) {\n case ERROR:\n silentlyClose();\n return;\n case REFILL:\n return;\n case DONE:\n Frame frame = fr.get();\n fr.reset();\n treatFrame(frame);\n break;\n }\n }\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public static void main(String[] args) throws FileNotFoundException {\n final File inputFile = new File(\"C:/Users/David Dunkel/IdeaProjects/Advent of Code/2020/Day 07/src/input.txt\");\n final Pattern parentPattern = Pattern.compile(\"^\\\\w+ \\\\w+\");\n final Pattern childPattern = Pattern.compile(\"\\\\d+ \\\\w+ \\\\w+\");\n final Map<String, List<String>> bagContainers = new HashMap<>();\n final Scanner scanner = new Scanner(inputFile);\n\n while (scanner.hasNext()) {\n final String nextLine = scanner.nextLine();\n final Matcher parentMatch = parentPattern.matcher(nextLine);\n\n parentMatch.find();\n\n final String parent = parentMatch.group();\n final Matcher childMatch = childPattern.matcher(nextLine);\n final List<String> child = new LinkedList<>();\n\n while (childMatch.find())\n child.add(childMatch.group());\n\n bagContainers.put(parent, child);\n }\n\n System.out.println(totalBags(bagContainers));\n }", "public void getAllFSMProcess() {\n IReadFile readFile = new ReadFile();\n List<String> list = readFile.readFsmFile(path);\n for(String s : list) {\n FSMContent content = readFile.saveFSMContent(readFile.splitFsmLine(s));\n if(currentState == null) {\n currentState = content.getCurrentState();\n }\n current_state.add(content.getCurrentState());\n next_state.add(content.getNextState());\n solution_set.add(content.getInputSymbol());\n contentsMap.put(content.getCurrentState() + content.getInputSymbol(), content);\n }\n }", "@Override\n public void run() {\n\n\n try {\n WatchService watchService = FileSystems.getDefault().newWatchService();\n Path path = Paths.get(INPUT_FILES_DIRECTORY);\n\n path.register( watchService, StandardWatchEventKinds.ENTRY_CREATE); //just on create or add no modify?\n\n WatchKey key;\n while ((key = watchService.take()) != null) {\n for (WatchEvent<?> event : key.pollEvents()) {\n\n String fileName = event.context().toString();\n notifyController.processDetectedFile(fileName);\n\n }\n key.reset();\n }\n\n } catch (Exception e) {\n //Logger.getGlobal().setUseParentHandlers(false);\n //Logger.getGlobal().log(Level.SEVERE, e.toString(), e);\n\n }\n }", "private void processFolder(File folder) {\n \t\tFile[] subFolders = folder.listFiles(new FileFilter() {\n \t\t\t@Override\n \t\t\tpublic boolean accept(File pathname) {\n \t\t\t\treturn pathname.isDirectory();\n \t\t\t}\n \t\t});\n \t\tfor (File subFolder : subFolders){\n \t\t\tprocessFolder(subFolder); \n \t\t}\n \t\tPattern nameRegex = Pattern.compile(\"([\\\\d-]+)\\\\.(pdf|epub)\", Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);\n \t\tFile[] files = folder.listFiles();\n \t\tfor (File file : files) {\n \t\t\tlogger.info(\"Processing file \" + file.getName());\n \t\t\tprocessLog.addNote(\"Processing file \" + file.getName());\n \t\t\tif (file.isDirectory()) {\n \t\t\t\t//TODO: Determine how to deal with nested folders?\n \t\t\t\t//processFolder(file);\n \t\t\t} else {\n \t\t\t\t// File check to see if it is of a known type\n \t\t\t\tMatcher nameMatcher = nameRegex.matcher(file.getName());\n \t\t\t\tif (nameMatcher.matches()) {\n \t\t\t\t\tImportResult importResult = new ImportResult();\n \t\t\t\t\tString isbn = nameMatcher.group(1);\n \t\t\t\t\tString fileType = nameMatcher.group(2).toLowerCase();\n \t\t\t\t\timportResult.setBaseFilename(isbn);\n \t\t\t\t\tisbn = isbn.replaceAll(\"-\", \"\");\n \t\t\t\t\timportResult.setISBN(isbn);\n \t\t\t\t\timportResult.setCoverImported(\"\");\n \t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Get the record for the isbn\n \t\t\t\t\t\tgetRelatedRecords.setString(1, \"%\" + isbn + \"%\");\n \t\t\t\t\t\tResultSet existingRecords = getRelatedRecords.executeQuery();\n \t\t\t\t\t\tif (!existingRecords.next()){\n \t\t\t\t\t\t\t//No record found \n \t\t\t\t\t\t\tlogger.info(\"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\tprocessLog.addNote(\"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t}else{\n \t\t\t\t\t\t\tlogger.info(\"Found at least one record for \" + isbn);\n \t\t\t\t\t\t\tif (existingRecords.last()){\n \t\t\t\t\t\t\t\tif (existingRecords.getRow() >= 2){\n \t\t\t\t\t\t\t\t\tlogger.info(\"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t//We have an existing record\n \t\t\t\t\t\t\t\t\texistingRecords.first();\n \t\t\t\t\t\t\t\t\tString recordId = existingRecords.getString(\"id\");\n \t\t\t\t\t\t\t\t\tString accessType = existingRecords.getString(\"accessType\");\n \t\t\t\t\t\t\t\t\tString source = existingRecords.getString(\"source\");\n \t\t\t\t\t\t\t\t\tlogger.info(\" Attaching file to \" + recordId + \" accessType = \" + accessType + \" source=\" + source);\n \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t// Copy the file to the library if it does not exist already\n \t\t\t\t\t\t\t\t\tFile resultsFile = new File(libraryDirectory + source + \"_\" + file.getName());\n \t\t\t\t\t\t\t\t\tif (resultsFile.exists()) {\n \t\t\t\t\t\t\t\t\t\tlogger.info(\"Skipping file because it already exists in the library\");\n \t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"skipped\" ,\"File has already been copied to library\");\n \t\t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Skipping file \" + file.getName() + \" because it already exists in the library\");\n \t\t\t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\t\t\tlogger.info(\"Importing file \" + file.getName());\n \t\t\t\t\t\t\t\t\t\t//Check to see if the file has already been added to the library.\n \t\t\t\t\t\t\t\t\t\tdoesItemExist.setString(1, file.getName());\n \t\t\t\t\t\t\t\t\t\tdoesItemExist.setString(2, recordId);\n \t\t\t\t\t\t\t\t\t\tResultSet existingItems = doesItemExist.executeQuery();\n \t\t\t\t\t\t\t\t\t\tif (existingItems.next()){\n \t\t\t\t\t\t\t\t\t\t\t//The item already exists\n \t\t\t\t\t\t\t\t\t\t\tlogger.info(\" the file has already been attached to this record\");\n \t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"skipped\" ,\"The file has already been aded as an eContent Item\");\n \t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Skipping file \" + file.getName() + \" because has already been attached to this record\");\n \t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" copying the file to library source=\" + file + \" dest=\" + resultsFile);\n \t\t\t\t\t\t\t\t\t\t\t\t//Copy the pdf file to the library\n \t\t\t\t\t\t\t\t\t\t\t\tUtil.copyFile(file, resultsFile);\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\t//Add file to acs server\n \t\t\t\t\t\t\t\t\t\t\t\tboolean addedToAcs = true;\n \t\t\t\t\t\t\t\t\t\t\t\tif (accessType.equals(\"acs\")){\n \t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Adding file to the ACS server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\taddedToAcs = addFileToAcsServer(fileType, resultsFile, importResult);\n \t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\tif (addedToAcs){\n \t\t\t\t\t\t\t\t\t\t\t\t\t//filename, acsId, recordId, item_type, addedBy, date_added, date_updated\n \t\t\t\t\t\t\t\t\t\t\t\t\tlong curTimeSec = new Date().getTime() / 1000;\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(1, resultsFile.getName());\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(2, importResult.getAcsId());\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(3, recordId);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(4, fileType);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(5, -1);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(6, curTimeSec);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(7, curTimeSec);\n \t\t\t\t\t\t\t\t\t\t\t\t\tint rowsInserted = addEContentItem.executeUpdate();\n \t\t\t\t\t\t\t\t\t\t\t\t\tif (rowsInserted == 1){\n \t\t\t\t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"success\", \"\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" file could not be added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(file.getName() + \" could not be added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" the file could not be added to the acs server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(file.getName() + \" could not be added to the acs server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\tif (importResult.getSatus(fileType).equals(\"failed\")){\n \t\t\t\t\t\t\t\t\t\t\t\t\t//If we weren't able to add the file correctly, remove it so it will be processed next time. \n \t\t\t\t\t\t\t\t\t\t\t\t\tresultsFile.delete();\n \t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n \t\t\t\t\t\t\t\t\t\t\t\tlogger.error(\"Error copying file to record\", e);\n \t\t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Error copying file \" + e.toString());\n \t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t} catch (SQLException e) {\n \t\t\t\t\t\tlogger.error(\"Error finding related records\", e);\n \t\t\t\t\t\timportResult.setStatus(\"pdf\", \"failed\", \"SQL error processing file \" + e.toString());\n \t\t\t\t\t}\n \t\t\t\t\timportResults.add(importResult);\n \t\t\t\t\t//Update that another file has been processed.\n \t\t\t\t\tprocessLog.incUpdated();\n \t\t\t\t\ttry {\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(1, processLog.getNumUpdates());\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(2, processLog.getNumErrors());\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(3, logEntryId);\n \t\t\t\t\t\tupdateRecordsProcessed.executeUpdate();\n \t\t\t\t\t} catch (SQLException e) {\n \t\t\t\t\t\tlogger.error(\"Error updating number of records processed.\", e);\n \t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tprocessLog.addNote(\" Skipping because the name is not an ISBN\");\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t}", "public void run() {\n\t\tprocesses.forEach( p -> pQueue.add(p));\n\t\t\n\t\twhile(!pQueue.isEmpty() || currentP != null) {\n\t\t\t\n\t\t\t/*My first options. Works fine but can be improved.*/\n\t\t\t/*while(!pQueue.isEmpty() && (currentP == null)) {\t\t\t\t\t\n\t\t\t\tif(counter >= pQueue.peek().getArrivalTime()) {\t\t\t\t\t\n\t\t\t\t\tcurrentP = pQueue.poll();\n\t\t\t\t\tcurrentBurst = currentP.getBurstTime();\n\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t}*/\n\t\t\t\n\t\t\t/*Improved code from above. If there is no current process running, and \n\t\t\t * the first in queue has hit counter time, then poll it from queue. \n\t\t\t * */\t\t\t\n\t\t\tif(currentP == null && counter >= pQueue.peek().getArrivalTime()) {\n\t\t\t\tcurrentP = pQueue.poll();\n\t\t\t\tcurrentBurst = currentP.getBurstTime();\n\t\t\t}\n\t\t\t\n\t\t\t/*If there was no process ready in queue, nor a process already running, \n\t\t\t * increment the counter and loop again.*/\n\t\t\tif(currentP == null) {\n\t\t\t\tcounter++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/*If there is a process running: Add one to counter and decrease the \n\t\t\t * burst time. \n\t\t\t * If burst time reached 0, the process terminated. Set timers, release\n\t\t\t * current process and reset current process burst time counter. */\n\t\t\telse if(currentP != null) {\n\t\t\t\tcounter++;\n\t\t\t\tcurrentBurst--;\n\t\t\t\n\t\t\t\tif(currentBurst <= 0) {\n\t\t\t\t\t//Helper method to encapsulate arithmetic. \n\t\t\t\t\tthis.setTimers(currentP);\n\t\t\t\t\tcurrentP = null;\n\t\t\t\t\tcurrentBurst=0;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\tprintGanttChart();\n\t\tprintTable();\n\t}", "public void process();", "public void run() throws IOException {\n \n try {\n \n File file = new File(\"jobs.txt\");\n FileReader fileReader = new FileReader(file);\n \n BufferedReader bufferedReader = new BufferedReader(fileReader); \n StringBuffer stringBuffer = new StringBuffer();\n \n String line;\n \n // reading the first line = number of jobs and skipping it since\n // I do not need that information \n line = bufferedReader.readLine();\n \n //this.numOfjobs = Integer.parseInt(line);\n \n // read a line:\n while ((line = bufferedReader.readLine()) != null ) {\n \n int weight,length;\n \n String[] arr = line.split(\"\\\\s+\");\n \n // weight and length are\n weight = Integer.parseInt(arr[0]);\n length = Integer.parseInt(arr[1]);\n \n // putting into the priority queue\n this.putJob(weight, length);\n }\n \n // closing the fileReader:\n fileReader.close();\n \n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\tint M = Integer.parseInt(args[0]);\n\t\tint P = Integer.parseInt(args[1]);\n\t\tint S = Integer.parseInt(args[2]);\n\t\tint J = Integer.parseInt(args[3]);\n\t\tint N = Integer.parseInt(args[4]);\n\t\tString algorithm = args[5];\n\t\t\n\t\t//this is to match the output\n\t\tSystem.out.println(\"The machine size is \"+M);\n\t\tSystem.out.println(\"The page size is \"+P);\n\t\tSystem.out.println(\"The process size is \"+S);\n\t\tSystem.out.println(\"The job mix number is \"+J);\n\t\tSystem.out.println(\"The number of references per process is \"+N);\n\t\tSystem.out.println(\"The replacement algorithm is \"+algorithm+\"\\n\\n\");\n\t\t\n\t\t\n\t\t//attempt to read in the RandomInts.txt file\n\t\tScanner intScanner = null; \n\t\ttry {\n\t\t\tintScanner = new Scanner(new File(\"random-ints.txt\"));\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.printf(\"Error: there was a problem reading the random file\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\tint quantum = 3;\n\t\t\n\t\tProcess currentProcess;\n\t\tArrayList<Process> processList = new ArrayList<Process>();\n\t\t\n\t\t//check now to see the job mix\n\t\tif(J == 1){\t\n\t\t\t//int processNumber, double a, double b, double c, int size, int numberOfReferences, int numberOfPages,Scanner randInt, String replacementAlgo\n\t\t\tcurrentProcess = new Process(1,1,0,0,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t}\n\t\telse if(J ==2) {\n\t\t\t\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tcurrentProcess = new Process(i+1,1,0,0,S,N,S/P,intScanner,algorithm);\n\t\t\t\tprocessList.add(currentProcess);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\telse if (J == 3){\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tcurrentProcess = new Process(i+1,0,0,0,S,N,S/P,intScanner,algorithm);\n\t\t\t\tprocessList.add(currentProcess);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\telse {\n\t\t\t//1,2,3,4\n\t\t\tcurrentProcess = new Process(1,0.75,0.25,0,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\tcurrentProcess = new Process(2,0.75,0,0.25,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\tcurrentProcess = new Process(3,0.75,0.125,0.125,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\tcurrentProcess = new Process(4,0.5,0.125,0.125,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\t\n\t\t}\n\t\t\n\t\t//get the size of the frame table depending upon machine size and page size\n\t\t//remember we are also going to use the highest most frame as the first one\n\t\tint sizeOfFrame = M/P -1;\n\t\t\n\t\t\n\t\t//these are going to simply help us determine which frame is to be evicted if neccesary\n //linked list for LRU replacement algorithm\n LinkedList<Integer> LRUList = new LinkedList<Integer>();\n\n // we do not need a data structure for LIFO either because we will always replace the last frame\n \n //we do not need to use one for random since we do not need to keep track of which page we are getting rid of\n \n\t\t//this is going to hold the current process,page pair in each index so it will look like <1,{Process,page}>\n //having the Integer array will help us replace and update the frame easier then just maintaining if there's something in the map\n\t\tHashMap<Integer, Integer[]> frame = new HashMap<Integer, Integer[]>(); \n\t\t\n\t\tint time = 1;\n\t\t\n\t\tfor(int i=0; i < processList.size() * N; i++) {\n\t\t\t//get the current process\n\t\t\tProcess runningProcess = processList.get(i%processList.size());\n\t\t\t\n\t\t\tif(runningProcess.numberOfReferences <= 0) {\n\t\t\t\t//then the process is done running\n\t\t\t\ttime++;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t// this is simply to simulate the round robin simulation\n\t\t\tfor(int j=0; j < quantum; j++) {\n\t\t\t\t\n\t\t\t\tif(runningProcess.numberOfReferences <= 0) {\n\t\t\t\t\t//then the process is done running\t\t\t\t\t\n\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\tint currentRef = runningProcess.currentReference;\n\t\t\t\t\n\t\t\t\t//now get the page index then check if it is MAX_VALUE or within the frame\n\t\t\t\tint pageIndex = currentRef/P;\n\t\t\t\tint processFrameIndex = runningProcess.pages[pageIndex];\n\t\t\t\t\n\n\t\t\t\t//we know we had a miss because the page table is not in the frame\n\t\t\t\tif(processFrameIndex == Integer.MAX_VALUE) {\n\t\t\t\t\t\n\t\t\t\t\trunningProcess.pageFaults++;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//now we determine where to place the pageTable in the frame\n\t\t\t\t\t//we know that if it is less than zero then there is no room on the frame table since we start from highest index\n\t\t\t\t\tif(sizeOfFrame < 0) {\n\t\t\t\t\t\t//then we must use some sort of replacement algorithm\n\t\t\t\t\t\tif(runningProcess.replacementAlgo.equalsIgnoreCase(\"LIFO\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//pop the last frame and get the necessary information\n\t\t\t\t\t\t\tInteger[] removeProcessPagePair = frame.remove(0);\n\t\t\t\t\t\t\tint removeIndex = removeProcessPagePair[0];\n\t\t\t\t\t\t\tint nullifyPageIndex = removeProcessPagePair[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the actual process from the process list and update its values\n\t\t\t\t\t\t\tProcess updateProcess = processList.get(removeIndex);\n\t\t\t\t\t\t\tupdateProcess.pages[nullifyPageIndex] = Integer.MAX_VALUE;\n\t\t\t\t\t\t\tupdateProcess.numberOfEvictions++;\n\t\t\t\t\t\t\tupdateProcess.residencyTime += time - updateProcess.pageLoadTime[nullifyPageIndex];\n\t\t\t\t\t\t\tupdateProcess.pageLoadTime[nullifyPageIndex] = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsizeOfFrame++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//update the pages array\n\t\t\t\t\t\t\trunningProcess.pages[pageIndex] = sizeOfFrame;\n\t\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\t\tframe.put(sizeOfFrame, processPagePair);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsizeOfFrame--;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(runningProcess.replacementAlgo.equalsIgnoreCase(\"LRU\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//remove the top of the LRULinked List and get the index of the frame\n\t\t\t\t\t\t\tint indexRemoveFrame = LRUList.remove();\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//pop the index of the frame and get the necessary information\n\t\t\t\t\t\t\tInteger[] removeProcessPagePair = frame.remove(indexRemoveFrame);\n\t\t\t\t\t\t\tint removeIndex = removeProcessPagePair[0];\n\t\t\t\t\t\t\tint nullifyPageIndex = removeProcessPagePair[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the actual process from the process list and update its values\n\t\t\t\t\t\t\tProcess updateProcess = processList.get(removeIndex);\n\t\t\t\t\t\t\tupdateProcess.pages[nullifyPageIndex] = Integer.MAX_VALUE;\n\t\t\t\t\t\t\tupdateProcess.numberOfEvictions++;\n\t\t\t\t\t\t\tupdateProcess.residencyTime += time - updateProcess.pageLoadTime[nullifyPageIndex];\n\t\t\t\t\t\t\tupdateProcess.pageLoadTime[nullifyPageIndex] = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//now add to the back of the linked list the most newly updated indexFrame\n\t\t\t\t\t\t\tLRUList.add(indexRemoveFrame);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//update the running process\n\t\t\t\t\t\t\trunningProcess.pages[pageIndex] = indexRemoveFrame;\n\t\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\t\tframe.put(indexRemoveFrame, processPagePair);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//this indicates it is random replacement algorithm\n\t\t\t\t\t\telse if(runningProcess.replacementAlgo.equalsIgnoreCase(\"RANDOM\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the random int and then find out which random frame you are taking out\n\t\t\t\t\t\t\tint randomInt = intScanner.nextInt();\n\t\t\t\t\t\t\t//since it is probably some big number we have to accommodate it for our frame size\n\t\t\t\t\t\t\tint randomIntIndex = (randomInt + M/P)%(M/P);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//and pretty much do the same as the above but with the randomIntIndex\n\t\t\t\t\t\t\t//pop the index of the frame and get the necessary information\n\t\t\t\t\t\t\tInteger[] removeProcessPagePair = frame.remove(randomIntIndex);\n\t\t\t\t\t\t\tint removeIndex = removeProcessPagePair[0];\n\t\t\t\t\t\t\tint nullifyPageIndex = removeProcessPagePair[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the actual process from the process list and update its values\n\t\t\t\t\t\t\tProcess updateProcess = processList.get(removeIndex);\n\t\t\t\t\t\t\tupdateProcess.pages[nullifyPageIndex] = Integer.MAX_VALUE;\n\t\t\t\t\t\t\tupdateProcess.numberOfEvictions++;\n\t\t\t\t\t\t\tupdateProcess.residencyTime += time - updateProcess.pageLoadTime[nullifyPageIndex];\n\t\t\t\t\t\t\tupdateProcess.pageLoadTime[nullifyPageIndex] = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/////DO IF CYCLE IS IN 38 DEBUGG IN HERE/////\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//update the running process\n\t\t\t\t\t\t\trunningProcess.pages[pageIndex] = randomIntIndex;\n\t\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\t\tframe.put(randomIntIndex, processPagePair);\n\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\t\n\t\t\t\t\t}\n\t\t\t\t\t//otherwise we will now place the pageTable into the frame\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update the pages array\n\t\t\t\t\t\trunningProcess.pages[pageIndex] = sizeOfFrame;\n\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\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//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\tframe.put(sizeOfFrame, processPagePair);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update the LRU if the process is using the algorithm\n\t\t\t\t\t\tif(runningProcess.replacementAlgo.equalsIgnoreCase(\"LRU\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//sizeOfFrame is also essentially the index of the frame\n\t\t\t\t\t\t\tLRUList.add(sizeOfFrame);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//now there is one less frame available\n\t\t\t\t\t\tsizeOfFrame--;\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//there was a page hit\n\t\t\t\telse {\n\n\t\t\t\t\t//update the most recently used page for LRU\n\t\t\t\t\tif(runningProcess.replacementAlgo.equalsIgnoreCase(\"LRU\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t //to get it back to 0 in case we are on the last frame\n\t\t\t\t\t\t\n\t\t\t\t\t\tint removeIndex = LRUList.indexOf(processFrameIndex);\n\n\t\t\t\t\t\t//put to the end of the list\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tint updatePage = LRUList.remove(removeIndex);\n\t\t\t\t\t\tLRUList.add(updatePage);\n\t\t\t\t\t\t //to indicate we have no more frames incase the next reference needs a new one\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//remember this also decrements the amount of references that the process has left \n\t\t\t\trunningProcess.getNextReference();\n\t\t\t\ttime++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\tint totalFaults = 0;\n\t\tint totalEvictions = 0;\n\t\tdouble totalResidency = 0;\n\t\t\n\t\tfor(int i=0; i<processList.size();i++) {\n\t\t\t\n\t\t\tif(processList.get(i).numberOfEvictions != 0) {\n\t\t\t\ttotalFaults += processList.get(i).pageFaults;\n\t\t\t\ttotalResidency += processList.get(i).residencyTime;\n\t\t\t\ttotalEvictions += processList.get(i).numberOfEvictions;\n\t\t\t\tSystem.out.printf(\"Process Number: %d had %d faults and an average residency of %f\",processList.get(i).processNumber,processList.get(i).pageFaults,processList.get(i).residencyTime/processList.get(i).numberOfEvictions);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttotalFaults += processList.get(i).pageFaults;\n\t\t\t\tSystem.out.printf(\"Process Number: %d had %d faults and with no evictions an average residency of undefined\",processList.get(i).processNumber,processList.get(i).pageFaults);\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t\n\t\t\n\t\tif(totalEvictions != 0) {\n\t\t\tdouble avgTotalResidency = totalResidency/totalEvictions;\n\t\t\tSystem.out.printf(\"The total number of faults is %d and the overall average residency is %f\", totalFaults,avgTotalResidency);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"The total number of faults is %d and the overall average residency is undefined\", totalFaults);\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\t\n\n\t}", "public ArrayList<Process> generateProcesses() {\n int letterCounter = 65;\n int firstNumber = 1;\n float arrivalTime;\n float expectedTime;\n int priority;\n \n\n generator = new Random(RandomSeed); //paramater is seed used for random number generator\n\n for (int i = 0; i < numProcesses; i++) {\n String name = \"\";\n //create random number for arrival time\n arrivalTime = (float) (generator.nextDouble() * 99.0);\n //create random number for expected run time\n expectedTime = (float) (generator.nextDouble() * 9.9 + 0.1);\n //create random number for priority\n priority = generator.nextInt(4) + 1;\n //create new Process object and pass in these four\n\n if (letterCounter < 91) {\n name += firstNumber + \"-\" + (char) (letterCounter);\n letterCounter++;\n } else {\n letterCounter = 65;\n firstNumber++;\n name += firstNumber + \"-\" + (char) (letterCounter);\n letterCounter++;\n }\n \n\n newProcess = new Process(arrivalTime, expectedTime, priority, name);\n //put the Process object in array processArray using i as index\n processArrayList.add(newProcess);\n\n //System.out.print(newProcess.toString());\n /*System.out.println(processArrayList.get(i).getArrivalTime()\n + \" \" + processArrayList.get(i).getExpectedTime()\n + \" \" + processArrayList.get(i).getPriority());\n */\n }\n //System.out.println(\"\\n \");\n\n unsortedArrayList = new ArrayList<>();\n unsortedArrayList = (ArrayList<Process>)processArrayList.clone();\n \n Collections.sort(processArrayList, new Comparator<Process>() {\n @Override\n public int compare(Process process1, Process process2) {\n if (process1.getArrivalTime() < process2.getArrivalTime()) {\n return -1;\n }\n if (process1.getArrivalTime() > process2.getArrivalTime()) {\n return +1;\n }\n return 0;\n }\n });\n\n /* for(int i = 0; i < numProcesses; i++){\n \n System.out.println(\"arrival time: \" + processArrayList.get(i).getArrivalTime()\n + \" \" + processArrayList.get(i).getExpectedTime()\n + \" \" + processArrayList.get(i).getPriority());\n }*/\n return processArrayList;\n }", "private void parseFile(String fileName) {\n Set<String> inputs = new HashSet<String>();\n Set<String> outputs = new HashSet<String>();\n double[] qos = new double[4];\n\n Properties p = new Properties(inputs, outputs, qos);\n\n try {\n Scanner scan = new Scanner(new File(fileName));\n while(scan.hasNext()) {\n\t\t\t\tString name = scan.next();\n\t\t\t\tString inputBlock = scan.next();\n\t\t\t\tString outputBlock = scan.next();\n\n\t\t\t\tqos[TIME] = scan.nextDouble();\n\t\t\t\tqos[COST] = scan.nextDouble();\n\t\t\t\tqos[AVAILABILITY] = scan.nextDouble()/100;\n\t\t\t\tqos[RELIABILITY] = scan.nextDouble()/100;\n\t\t\t\t// Throw the other two away;\n\t\t\t\tscan.nextDouble();\n\t\t\t\tscan.nextDouble();\n\n\t\t\t\tfor (String s :inputBlock.split(\",\"))\n\t\t\t\t\tinputs.add(s);\n\t\t\t\tfor (String s :outputBlock.split(\",\"))\n\t\t\t\toutputs.add(s);\n\n p = new Properties(inputs, outputs, qos);\n\n ServiceNode ws = new ServiceNode(name, p);\n serviceMap.put(name, ws);\n inputs = new HashSet<String>();\n outputs = new HashSet<String>();\n qos = new double[4];\n }\n scan.close();\n }\n catch(IOException ioe) {\n System.out.println(\"File parsing failed...\");\n }\n\t\tnumServices = serviceMap.size();\n }", "private static void processFile(String directoryPath) {\n File[] lstFiles = Utility.getFiles(directoryPath);\n Arrays.sort(lstFiles);\n if (lstFiles.length == 0)\n System.out.println(\"Error loading the directory\");\n else {\n System.out.println(\"Uncompressed Index Version 1 started...\");\n long startTime = System.currentTimeMillis();\n iProcessor = new UncompressedLemmaProcessor(lstFiles);\n iProcessor.execute();\n iProcessor.writeFile();\n long endTime = System.currentTimeMillis();\n System.out.println(\"Uncompressed Index Version 1 completed...\");\n System.out.println(\"Time taken to complete Uncompressed Version 1 is \" + (endTime - startTime) + \" ms\");\n\n System.out.println(\"Uncompressed Index Version 2 started...\");\n startTime = System.currentTimeMillis();\n iProcessor = new UncompressedStemProcessor(lstFiles);\n iProcessor.execute();\n iProcessor.writeFile();\n endTime = System.currentTimeMillis();\n System.out.println(\"Uncompressed Index Version 2 completed...\");\n System.out.println(\"Time taken to complete Uncompressed Version 2 is \" + (endTime - startTime) + \" ms\");\n\n System.out.println(\"Compressed Index Version 1 started...\");\n startTime = System.currentTimeMillis();\n iProcessor = new CompressedLemmaProcessor();\n iProcessor.execute();\n iProcessor.writeFile();\n endTime = System.currentTimeMillis();\n System.out.println(\"Compressed Index Version 1 completed...\");\n System.out.println(\"Time taken to complete Compressed Version 1 is \" + (endTime - startTime) + \" ms\");\n\n System.out.println(\"Compressed Index Version 2 started...\");\n startTime = System.currentTimeMillis();\n iProcessor = new CompressedStemProcessor();\n iProcessor.execute();\n iProcessor.writeFile();\n endTime = System.currentTimeMillis();\n System.out.println(\"Compressed Index Version 2 completed...\");\n System.out.println(\"Time taken to complete Compressed Version 2 is \" + (endTime - startTime) + \" ms\");\n\n printInformation();\n }\n }", "public static void RR(boolean verbose, ArrayList<Process> list, int numProcesses) throws FileNotFoundException {\n\tint randomNum=1;\n\tSystem.out.println(\"ROUND ROBIN\");\n\n\tSystem.out.print(\"The original output is: \" + numProcesses+ \" \");\n\n\tfor(int i=0;i<numProcesses;i++) {\n\t\tlist.get(i).processdetails();\n\t \n\t}\n\tSystem.out.println();\n\tint AVGIO=0;\n\tCollections.sort(list);\n\tSystem.out.print(\"The sort output is: \" + numProcesses + \" \");\n\n\tfor(Process iterate: list) {\n\t\t \n\t\titerate.processdetails();\n\t}\n\tSystem.out.println();\n\tArrayList<Process> terminated= new ArrayList<Process>();\n HashMap<Process, Integer> runinng = new HashMap<Process, Integer>();\n\n int cycleNum=0;\n\n \nHashMap<Process, Integer> waitTime = new HashMap<Process, Integer>();\nHashMap<Process, Integer> finishTime = new HashMap<Process, Integer>();\n\nHashMap<Process, Integer> IOTime = new HashMap<Process, Integer>();\nCopyOnWriteArrayList<Process> blocked= new CopyOnWriteArrayList<Process>();\n \n Queue<Process> readyQ = new LinkedList<Process>(); \n\tArrayList<Integer> AVGwait=new ArrayList<Integer>();\n\tArrayList<Integer> IOUtilization=new ArrayList<Integer>();\n\n Queue<Process> unstartedQ = new LinkedList<Process>(); \n\n\nint CPUTime=0;\n\nint finishingTime=0;\nint quantum=2;\ndouble contextSwitching=0;\n Process running=null;\nfor(int i=0; i<list.size();i++) {\n\t\n\t\tlist.get(i).currentState=\"unstarted\";\n\t\tunstartedQ.add(list.get(i));\n\t\n}\n\nif(verbose==true) {\n\tSystem.out.println(\"This detailed printout gives the state and remaining burst for each process\\n\");\n\tSystem.out.print(\"Before cycle \\t\" + cycleNum + \":\\t\");\n\tfor (int iterator=0; iterator<list.size();iterator++) {\n \t\tlist.get(iterator).cycleStatus();\n\t\tSystem.out.print(\"\\t \");\n\t}\n\tSystem.out.print(\"\\n\");\n}\n\nwhile (terminated.size()!=list.size()) {\n \n\tfor(Process iterator: unstartedQ) {\n\t\tif (iterator.A==cycleNum) {\n\t\tint in=\tlist.indexOf(iterator);\n\t\tlist.get(in).currentState=\"ready\";\n\t\t \n\t\treadyQ.add(iterator);\n\t\titerator.setCurrentState(\"ready\");\n\t\t \n\t\twaitTime.put(iterator, 0);\n\t\t}\n\t\telse {\n\t\t\t\n\t\t}\n\t}\n\t\n\tcycleNum++;\n\t\n\t \n\tif(running==null ){\n\t\t \n\t\t\n\t\tcontextSwitching++;\n\t\t running=readyQ.poll();\n \t\tif(running!=null) {\n\t\t\tif(running.getRuntime()<=0) {\n\t\t\tint randomBurst= randomOS(running.getB(), randomNum);\n\t\t\trandomNum++;\n\t\t\trunning.setrunTime(randomBurst);\n\t\t\trunning.setburst(2);\n\t\t\trunning.setIOBurst(randomBurst);\n\t\t\n \n\t\tfor(Process iterator: list) {\n\t\tif(iterator.getID()==running.getID()) {\n\t \t\titerator.setCurrentState(\"running\");\n\t\t\truninng.put(running,randomBurst);\n\t\t}\n\t\t}\n\t\t}\n\t\telse {\n\n\t\t\tfor(Process iterator: list) {\n\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\titerator.setCurrentState(\"running\");\n\t\t\t\t \n\t\t\t\tif(running.getRuntime()==1) {\n\t\t\t\t\trunning.setburst(1);\n\t\t\t\t}\n\t\t\t\telse {\n \t\t\trunning.setburst(2);\n \t\t}\n\t\t}\n\n\t\t}\n\t\t}\n\t\t}\n \t\t\n \t\n \n\n\n\t}\n\n\tif(!readyQ.isEmpty()&& !waitTime.isEmpty()) {\n\t\tfor(Process process: readyQ) {\n \t\t\tfor(Process p :list) {\n\t\t\t\tif(p.getID()==process.getID()) {\n\t\t\t\t\tint set= p.getWaitingTime();\n\t\t\t\t\tp.setWaitingTime(set+1);\n\t\t\t\t}\n\t\t\t}\n\t\t\twaitTime.put(process, waitTime.get(process) + 1);\n\t\t}\n \t}\n\t\n\t\n\tquantum--;\n\tif(verbose==true) {\n\t\tSystem.out.print(\"Before cycle \\t\" + cycleNum + \":\\t\");\n\t\tfor(Process iterator: list) {\n\t\t\titerator.cycleStatus();\n\t\t\tSystem.out.print(\"\\t\");\n\t\t}\n\t\tSystem.out.print(\"\\n\");\n\t}\n\n \tif(running!=null) {\n \t\tCPUTime++;\n\t \n\t\trunning.setrunTime(running.getRuntime()-1);\n\t\trunning.setC(running.getC()-1);\n\t\trunning.setburst(running.getBurst()-1);\n\t}\n\t\n \tArrayList<Process> ready= new ArrayList<Process>();\n\tif(!blocked.isEmpty()) {\n\t\tAVGIO++;\n\t\tfor(Process iterator: blocked) {\n\t\t\t\n\t\t\titerator.setIOBurst(iterator.getIOBurst()-1);\n\t\t\t\n \t\t\tIOTime.put(iterator, IOTime.get(iterator)+1);\n\t\t\tif(iterator.getIOBurst()<=0) {\n\t\t\t\tready.add(iterator);\n \n\t\t\n\t\t\t}}\n\t\t\n\t\t\n\t\t\n\t\tCollections.sort(ready);\n\t\t \t\tfor(Process in :ready ) {\n \t\t\t\t\tin.setCurrentState(\"ready\");\n\t\t\t\t\tblocked.remove(in);\n\t\t\t\t \n\t\t\t\t\tfor(Process process: list) {\n\t\t\t\t\t\tif(process.getID()==in.getID()) {\n\t\t\t\t\t\t\tprocess.setCurrentState(\"ready\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\n\t}\t\n\n\t\n \t\nif( quantum<=0 ) {\n\t \n\t\n\t\n\tif(running!=null && running.getC()!=0 && running.getRuntime()<=0) {\n\t \n\t\tint val=0;\n\t\n\t\tfor(Process iterator: list) {\n\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\titerator.setCurrentState(\"blocked\");\n\t\t\t\t \n\t\t\t\tif(IOTime.containsKey(iterator)) {\n\t\t\t\t \n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\tIOTime.put(iterator, 0);\n\t\t\t\t}\n\t\t\t\tval=runinng.get(iterator)*iterator.getM();\n\t\t\t\t\n\t\t\t\titerator.setIOBurst(val);\n\t\t\t \n\t\t\t}\n\t\t}\n\t\t\t\n\t\t \n\t\trunning.setIOBurst(val);\n\n\t\tblocked.add(running);\n\t\trunning=null;\n\t\tquantum=2;\n\t \n\t}\n\telse if(running!=null && running.getC()==0 ){\n\t\tfor(Process iterator: list) {\n\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\titerator.setCurrentState(\"terminated\");\n\t\t\t\titerator.setburst(0);\n\t\t\t\n\t\t\t}\n\t\t\t}\n\t\tterminated.add(running);\n\t\tfinishTime.put(running, cycleNum);\n\t\trunning=null;\n\t\tquantum=2;\n\t}\n\telse {\n\t\tready.add(running);\n\t\tfor(Process l: list) {\n\t\t\tif(l.getID()==running.getID()) {\n\t\twaitTime.put(running, 0);\n\t\t}}\n\t\trunning=null;\n\t\tquantum=2;\n\t\n\t\n\t}\n\tArrayList<Process> re=new ArrayList<Process> ();\n\tCollections.sort(ready);\n\tint [] numbers = {10, 20, 30, 40, 50};\n\tif(!ready.isEmpty()) {\n\tint smallest = ready.get(0).getID();\n\tProcess index;\n\tfor(Process x : ready ){\n\t if (x.getID() < smallest) {\n\t smallest = x.getID();\n\t index=x;\n\t }\n\t}\n\t \n\t}\n\t \n\tfor(Process in :ready ) {\n\t\t\n\t\tin.setCurrentState(\"ready\");\n\t\tblocked.remove(in);\n\t\t \n\t\tfor(Process process: list) {\n\t\t\tif(process.getID()==in.getID()) {\n\t\t\t\tprocess.setCurrentState(\"ready\");\n\t\t\t\tprocess.setburst(0);\n\t\t\t\t\n\t\t}\n\t\t\n\t\t\n\t \n\t}\n}\n\t\n}\n\t\n\t\n\telse {\n\t\t\n\t\tif(running!=null && running.getC()!=0 && running.getRuntime()<=0) {\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\tint val=0;\n\t\t\n\t\t\tfor(Process iterator: list) {\n\t\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\t\titerator.setCurrentState(\"blocked\");\n\t\t\t\t\t \n\t\t\t\t\tif(IOTime.containsKey(iterator)) {\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\tIOTime.put(iterator, 0);\n\t\t\t\t\t}\n\t\t\t\t\tval=runinng.get(iterator)*iterator.getM();\n\t\t\t\t\t\n\t\t\t\t\titerator.setIOBurst(val);\n \t\t\t\t}\n\t\t\t}\n\t\t\t\t\n \t\t\trunning.setIOBurst(val);\n\n\t\t\tblocked.add(running);\n\t\t\trunning=null;\n\t\t\tquantum=2;\n \t\t}\n\t\telse if(running!=null && running.getC()==0 ){\n\t\t\tfor(Process iterator: list) {\n\t\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\t\titerator.setCurrentState(\"terminated\");\n\t\t\t\t\titerator.setburst(0);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t}\n\t\t\tterminated.add(running);\n\t\t\tfinishTime.put(running, cycleNum);\n\t\t\trunning=null;\n\t\t\tquantum=2;\n\t\t}\t\n\t\telse if(running==null){\n\t\t\tquantum=2;\n\t\t}\n\t}\n\n\tfinishingTime++;\n\t\n\tfor(Process in: ready) {\n\t\treadyQ.add(in);\n\t}\n\n\t\n}\nArrayList<Integer> AVGturnaroundTime= new ArrayList<Integer>();\nSystem.out.println(\"\\nThe scheduling algorithm used was Round Robin\\n\");\nint counter=0;\nfor(Process values: list) {\n\tSystem.out.println(\"Process \"+ counter + \": \");\n\tSystem.out.print(\"\\t(A, B, C, M) =\" +\" \" );\n\t values.processdetails();\n\tfor(Process proc: finishTime.keySet()) {\n\t\tif (proc.getID()==values.getID()) {\n\t\t\tSystem.out.println(\"\\n\\tFinishing Time: \" + finishTime.get(proc));\n\t\t\tSystem.out.println(\"\\tTurnaround Time: \"+ (finishTime.get(proc)- proc.getA()));\n\t\t\tAVGturnaroundTime.add( (finishTime.get(proc)- proc.getA()));\n\t\t}\n\t\n\t\n\t\n\t\t//System.out.println(waitTime);\n\t\t\n\t\t\t\n\t\t}\n\t\n\tfor(Process proc: IOTime.keySet()) { \n\t\t//System.out.println(waitTime);\n\t\tif (proc.getID()==values.getID()) {\n\t\t\tSystem.out.println(\"\\tIO Time: \" + IOTime.get(proc));\n\t\t\tIOUtilization.add(IOTime.get(proc));\n\t\t}\n\t\n\t\n\t}\n\tSystem.out.println(\"\\tWaiting Time: \" + values.getWaitingTime());\n\tAVGwait.add(values.getWaitingTime());\n\n\t\n\tSystem.out.println();\n\t\n\tcounter++;\n\t}\nint o=0;\nfor(Process l: list) {\n\to+=l.getCPUtime();\n }\nSystem.out.print(\"\\nSummary Data:\");\nSystem.out.println(\"\\n\\tFinishing Time: \" + finishingTime);\n System.out.println(\"\\tCPU Utilization: \" + ((double)CPUTime/(double)(cycleNum)));\n int IOU=0;\ndouble ioUtilization=0;\n\nfor(int i =0; i<IOUtilization.size();i++) {\n\tIOU+=IOUtilization.get(i);\n}\nioUtilization=(double)AVGIO/((double) cycleNum);\nSystem.out.println(\"\\tI/O Utilization:: \" + ioUtilization);\nSystem.out.println(\"\\tThroughput: \" + ((double)((double)100*list.size()/(double)(cycleNum))) + \" processes per hundred cycles\");\nint avg=0;\ndouble TAT1=0;\nfor(int i =0; i<AVGturnaroundTime.size();i++) {\n\tavg+=AVGturnaroundTime.get(i);\n}\nTAT1= (double)avg/(double)list.size();\n\nSystem.out.println(\"\\tAverage turnaround time: \" + TAT1);\nint avgWait=0;\ndouble AVGW=0;\nfor(int i =0; i<AVGwait.size();i++) {\n\tavgWait+=AVGwait.get(i);\n}\nAVGW=(double)avgWait/(double) list.size();\nSystem.out.println(\"\\tAverage Wait time: \" + AVGW);\n\n}", "@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t}", "@Override\n\t\t\tpublic void onProcess(int process) {\n\t\t\t}", "public static void main(String[] args) throws FileNotFoundException {Main receives two arguments: path to input file and path to output file.\n\t\t// You can assume that they will always be provided, so no need to check them.\n\t\t// Scanner and PrintStream are already defined for you.\n\t\t// Use them to read input and write output.\n\t\t// \n\t\t// Good Luck!\n\t\t// \n\t\t\n\t\tScanner in = new Scanner(new File(args[0]));\n\t\t\n\t\tint N = in.nextInt();\n\t\tin.nextLine();\n\t\tString[] myFileData = new String[N];\n\t\tint keepPortID = 0;\n\t\tint keepShipID = 0;\n\t\tint keepContainerID = 0;\n\t\tArrayList<Port> myPorts = new ArrayList<Port>();\n\t\tArrayList<Ship> myShips = new ArrayList<Ship>();\n\t\tArrayList<Container> myContainers = new ArrayList<Container>();\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tmyFileData[i] = in.nextLine();\n\t\t}\n\t\t\n\t\tfor(int j = 0; j < N; j++) {\n\t\t\tString[] myLines = myFileData[j].split(\" \");\n\t\t\t\n\t\t\tif(myLines[0].equals(\"1\")) { //create a container\n\t\t\t\tPort containerPort = myPorts.get(Integer.parseInt(myLines[1]));\n\t\t\t\tif(myLines[myLines.length - 1].contains(\"L\") || myLines[myLines.length - 1].contains(\"R\")) {\n\t\t\t\t\tswitch(myLines[myLines.length-1]) {\n\t\t\t\t\tcase \"L\":\n\t\t\t\t\t\tLiquidContainer myNewLiquidContainer = new LiquidContainer(keepContainerID, Integer.parseInt(myLines[2]));\n\t\t\t\t\t\tmyNewLiquidContainer.setPortID(Integer.parseInt(myLines[1]));\n\t\t\t\t\t\tcontainerPort.containers.add(myNewLiquidContainer);\n\t\t\t\t\t\tcontainerPort.portLiquidContainers += 1;\n\t\t\t\t\t\tmyContainers.add(myNewLiquidContainer);\n\t\t\t\t\t\tkeepContainerID += 1;\n\t\t\t\t\tcase \"R\":\n\t\t\t\t\t\tRefrigeratedContainer myNewRefrigeratedContainer = new RefrigeratedContainer(keepContainerID, Integer.parseInt(myLines[2]));\n\t\t\t\t\t\tmyNewRefrigeratedContainer.setPortID(Integer.parseInt(myLines[1]));\n\t\t\t\t\t\tcontainerPort.containers.add(myNewRefrigeratedContainer);\n\t\t\t\t\t\tcontainerPort.portRefrigeratedContainers += 1;\n\t\t\t\t\t\tmyContainers.add(myNewRefrigeratedContainer);\n\t\t\t\t\t\tkeepContainerID += 1;\n\t\t\t\t\t} \n\t\t\t\t} else if(Integer.parseInt(myLines[2]) > 3000) {\n\t\t\t\t\tHeavyContainer myNewHeavyContainer = new HeavyContainer(keepContainerID, Integer.parseInt(myLines[2]));\n\t\t\t\t\tmyNewHeavyContainer.setPortID(Integer.parseInt(myLines[1]));\n\t\t\t\t\tcontainerPort.containers.add(myNewHeavyContainer);\n\t\t\t\t\tcontainerPort.portHeavyContainers += 1;\n\t\t\t\t\tmyContainers.add(myNewHeavyContainer);\n\t\t\t\t\tkeepContainerID += 1;\n\t\t\t\t} else {\n\t\t\t\t\tBasicContainer myNewBasicContainer = new BasicContainer(keepContainerID, Integer.parseInt(myLines[2]));\n\t\t\t\t\tmyNewBasicContainer.setPortID(Integer.parseInt(myLines[1]));\n\t\t\t\t\tcontainerPort.containers.add(myNewBasicContainer);\n\t\t\t\t\tcontainerPort.portBasicContainers += 1;\n\t\t\t\t\tmyContainers.add(myNewBasicContainer);\n\t\t\t\t\tkeepContainerID += 1;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t} else if(myLines[0].equals(\"2\")) { //create a ship\n\t\t\t\tint myPortID = Integer.parseInt(myLines[1]);\n\t\t\t\tint myWeightLimit = Integer.parseInt(myLines[2]);\n\t\t\t\tint maxAllCont = Integer.parseInt(myLines[3]);\n\t\t\t\tint maxHeavyCont = Integer.parseInt(myLines[4]);\n\t\t\t\tint maxRefCont = Integer.parseInt(myLines[5]);\n\t\t\t\tint maxLiqCont = Integer.parseInt(myLines[6]);\n\t\t\t\tdouble fuelConsumption = Double.parseDouble(myLines[7]);\n\t\t\t\tShip myNewShip = new Ship(keepShipID, myPorts.get(myPortID), myWeightLimit, maxAllCont, maxHeavyCont, maxRefCont, maxLiqCont, fuelConsumption);\n\t\t\t\tmyNewShip.currentPort.current.add(myNewShip);\n\t\t\t\tkeepShipID += 1;\n\t\t\t\tmyShips.add(myNewShip);\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else if(myLines[0].equals(\"3\")) { //create a port\n\t\t\t\tdouble x = Double.parseDouble(myLines[1]);\n\t\t\t\tdouble y = Double.parseDouble(myLines[2]);\n\t\t\t\tPort myNewPort = new Port(keepPortID, x, y);\n\t\t\t\tkeepPortID += 1;\n\t\t\t\tmyPorts.add(myNewPort);\n\t\t\t\t\n\t\t\t} else if(myLines[0].equals(\"4\")) { //loading a container\n\t\t\t\tint shipLoadID = Integer.parseInt(myLines[1]);\n\t\t\t\tint contLoadID = Integer.parseInt(myLines[2]);\n\t\t\t\tmyShips.get(shipLoadID).load(myContainers.get(contLoadID));\n\t\t\t\t\n\t\t\t} else if(myLines[0].equals(\"5\")) { //unloading a container\n\t\t\t\tint shipLoadID = Integer.parseInt(myLines[1]);\n\t\t\t\tint contLoadID = Integer.parseInt(myLines[2]);\n\t\t\t\tmyShips.get(shipLoadID).unLoad(myContainers.get(contLoadID));\n\t\t\t\t\n\t\t\t} else if(myLines[0].equals(\"6\")) { //sailing to another port\n\t\t\t\tint shipID = Integer.parseInt(myLines[1]);\n\t\t\t\tint portID = Integer.parseInt(myLines[2]);\n\t\t\t\tShip myShip = myShips.get(shipID);\n\t\t\t\tPort destinationPort = myPorts.get(portID);\n\t\t\t\tdouble contConsumption = 0.00;\n\t\t\t\tfor(Container cont : myShip.containersInShip) {\n\t\t\t\t\tcontConsumption += cont.consumption();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble consumptionPerKM = contConsumption + myShip.getFuelConsumptionPerKM();\n\t\t\t\tdouble distance = myShip.currentPort.getDistance(myPorts.get(portID));\n\t\t\t\tdouble totalFuelRequired = distance*consumptionPerKM;\n\t\t\t\tif(myShip.getFuel() >= totalFuelRequired) {\n\t\t\t\t\tmyShip.setFuel(myShip.getFuel() - totalFuelRequired);\n\t\t\t\t\tmyShip.currentPort.current.remove(myShip);\n\t\t\t\t\tmyShip.currentPort.outgoingShip(myShip);\n\t\t\t\t\tdestinationPort.incomingShip(myShip);\n\t\t\t\t\tmyShip.currentPort = destinationPort;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if(myLines[0].equals(\"7\")) {\n\t\t\t\tint shipID = Integer.parseInt(myLines[1]);\n\t\t\t\tdouble fuel = Double.parseDouble(myLines[2]);\n\t\t\t\tmyShips.get(shipID).reFuel(fuel);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\t\tPrintStream out = new PrintStream(new File(args[1]));\n\t\t\n\t\tint portNumbers = myPorts.size();\n\t\tint shipNumbers;\n\t\tfor(int n = 0; n < portNumbers; n++ ) {\n\t\t\tPort printingPort = myPorts.get(n);\n\t\t\tout.print(\"Port \" + n + \":(\" + printingPort.getX() + \", \" + printingPort.getY() + \")\");\n\t\t\tArrayList<Integer> basicPortList = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> heavyPortList = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> liquidPortList = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> refrigeratedPortList = new ArrayList<Integer>();\n\t\t\tfor(Container c : printingPort.containers) {\n\t\t\t\tif(c instanceof BasicContainer) {\n\t\t\t\t\tbasicPortList.add(c.ID);\n\t\t\t\t} else if(c instanceof LiquidContainer) {\n\t\t\t\t\tliquidPortList.add(c.ID);\n\t\t\t\t} else if(c instanceof RefrigeratedContainer) {\n\t\t\t\t\trefrigeratedPortList.add(c.ID);\n\t\t\t\t} else {\n\t\t\t\t\theavyPortList.add(c.ID);\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.sort(basicPortList); Collections.sort(heavyPortList); Collections.sort(liquidPortList); Collections.sort(refrigeratedPortList);\n\t\t\tif(!(basicPortList.size() == 0)) {\n\t\t\t\tout.println();\n\t\t\t\tout.print(\" BasicContainer: \");\t\n\t\t\t\tfor(int b = 0; b < basicPortList.size(); b ++) {\t\n\t\t\t\t\tout.print(basicPortList.get(b) + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!(heavyPortList.size() == 0)) {\n\t\t\t\tout.println();\n\t\t\t\tout.print(\" HeavyContainer: \");\n\t\t\t\tfor(int h = 0; h < heavyPortList.size(); h++) {\n\t\t\t\t\tout.print(heavyPortList.get(h) + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!(refrigeratedPortList.size() == 0)) {\n\t\t\t\tout.println();\n\t\t\t\tout.print(\" RefrigeratedContainer: \");\n\t\t\t\tfor(int r = 0; r < refrigeratedPortList.size(); r++) {\n\t\t\t\t\tout.print(refrigeratedPortList.get(r) + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!(liquidPortList.size() == 0)) {\n\t\t\t\tout.println();\n\t\t\t\tout.print(\" LiquidContainer: \");\n\t\t\t\tfor(int l = 0; l < liquidPortList.size(); l++) {\n\t\t\t\t\tout.print(liquidPortList.get(l) + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<Integer> portShipList = new ArrayList<Integer>();\n\t\t\tfor(Ship s : printingPort.current) {\n\t\t\t\tportShipList.add(s.getID());\n\t\t\t}\n\t\t\tCollections.sort(portShipList);\n\t\t\tfor(int p : portShipList) {\n\t\t\t\tout.println();\n\t\t\t\tout.print(\" Ship\" + p + \": \" + myShips.get(p).getFuel());\n\t\t\t\tArrayList<Integer> basicShipList = new ArrayList<Integer>();\n\t\t\t\tArrayList<Integer> heavyShipList = new ArrayList<Integer>();\n\t\t\t\tArrayList<Integer> liquidShipList = new ArrayList<Integer>();\n\t\t\t\tArrayList<Integer> refrigeratedShipList = new ArrayList<Integer>();\n\t\t\t\tfor(Container co : myShips.get(p).containersInShip) {\n\t\t\t\t\tif(co instanceof BasicContainer) {\n\t\t\t\t\t\tbasicShipList.add(co.ID);\n\t\t\t\t\t} else if(co instanceof LiquidContainer) {\n\t\t\t\t\t\tliquidShipList.add(co.ID);\n\t\t\t\t\t} else if(co instanceof RefrigeratedContainer) {\n\t\t\t\t\t\trefrigeratedShipList.add(co.ID);\n\t\t\t\t\t} else {\n\t\t\t\t\t\theavyShipList.add(co.ID);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t\tif(!(basicShipList.size() == 0)) {\n\t\t\t\t\tout.println();\n\t\t\t\t\tout.print(\" BasicContainer:\");\n\t\t\t\t\tfor(int b : basicShipList) {\n\t\t\t\t\t\tout.print(\" \" + b);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!(heavyShipList.size() == 0)) {\n\t\t\t\t\tout.println();\n\t\t\t\t\tout.print(\" HeavyContainer:\");\n\t\t\t\t\tfor(int h : heavyShipList) {\n\t\t\t\t\tout.print(\" \" + h);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!(refrigeratedShipList.size() == 0)) {\n\t\t\t\t\tout.println();\n\t\t\t\t\tout.print(\" RefrigeratedContainer:\");\n\t\t\t\t\tfor(int r : refrigeratedShipList) {\n\t\t\t\t\t\tout.print(\" \" + r);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!(liquidShipList.size() == 0)) {\n\t\t\t\t\tout.println();\n\t\t\t\t\tout.print(\" LiquidContainer:\");\n\t\t\t\t\tfor(int l : liquidShipList) {\n\t\t\t\t\t\tout.print(\" \" + l);\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\tCollections.sort(basicShipList); Collections.sort(heavyShipList); Collections.sort(liquidShipList); Collections.sort(refrigeratedShipList);\n\t\t\t}\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tout.println();\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tin.close();\n\t\tout.close();\n\t}", "public void runFIFO() {\n\n //init\n ArrayList<Processus> localProcess = new ArrayList<>(); //Creation of a local list of process\n for (Processus cpy : listOfProcess) { //Copy the list of process in the local list\n localProcess.add(cpy);\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 int counter = 1;\n\n //beginning of the algo\n while (!localProcess.isEmpty()) { //As long as there are processes that are not done yet we keep going on\n\n //Determines the next process that will be executed\n for (Processus proc : localProcess) { //flow all remaining processes\n if (proc.getTime() <= currentTime) { //check if the currentTime of the process is below the currentTime\n if (localProcess.size() == 1) { //if there is only one process left\n executedProc = proc;\n } else if (proc.getCurrentOrder() <= tmpProc.getCurrentOrder()) { //selection of the older process (FIFO selection)\n executedProc = proc;\n tmpProc = proc;\n }\n }\n }\n\n //Check if the current process is assigned\n if (executedProc != null) {\n\n //execute the current ressource\n int tmpTime = 0;\n while (executedProc.getRessource(executedProc.getCurrentStep()) > tmpTime) { //As long as there is a resource\n for (Processus proc : localProcess) {\n if (proc.getTime() <= currentTime && !proc.equals(executedProc)) { //checking if there is another process waiting and set the new waiting time\n proc.setWaitingTime(1);\n }\n }\n currentTime++; //currentTime is updating at each loop\n occupancyTime++; //occupancyTime is updating at each loop\n tmpTime++;\n }\n\n executedProc.setCurrentStep(executedProc.getCurrentStep() + 1); //Update the currentStep to the next one (index of the lists of UC and inOut)\n\n if (executedProc.getCurrentStep() >= executedProc.getlistOfResource().size()) {//if it is the end of the process\n averageReturnTime += executedProc.getExecutedTime(); //update the average return time by adding the time that the process took\n localProcess.remove(executedProc); //remove the process from the list of process that needs to run\n }\n\n if (executedProc.getCurrentStep() <= executedProc.getListOfInOut().size()) { //If there is another inOut, it set the new time\n executedProc.setTime(executedProc.getInOut(executedProc.getCurrentStep() - 1) + currentTime);\n }\n\n //put the process at the end of the list (fifo order)\n executedProc.setCurrentOrder(counter);\n counter++;\n executedProc = null;\n } else {\n currentTime++;\n }\n }\n //end of the algo\n\n //Calculation of the variables\n occupancyRate = ((double) occupancyTime / (double) currentTime) * 100;\n for (Processus proc : listOfProcess) {\n averageWaitingTime += proc.getWaitingTime();\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 }", "public void readInstFromFile(int exeCycle, String fileName){\n\t\ttry (FileReader fp = new FileReader(fileName)) {\n\t\t\tBufferedReader lineReader = new BufferedReader(fp);\n\t\t\tinstructions = new ArrayList<>();\n\t\t\textraCycle += exeCycle;\n\t\t\tint instrCount = 0;\n\t\t\tString line;\n\t\t\t//readline untill new line found\n\t\t\tfor(int i=0; (line = lineReader.readLine()) != null; i++){\n\t\t\t\tline = line.replaceAll(\"[\\\\,\\\\#]\",\"\"); //regex to remove commas in the instructions\n\t\t\t\tString[] instParts = line.split(\" \");\n\t\t\t\tInstructionStructure inst = new InstructionStructure();\n\t\t\t\tinst.setInst_number(instrCount); //set the instruction number which helps in execution order \n\t\t\t\tinstrCount += 1;\n\t\t\t\tinstructions.add(inst);\n\t\t\t\tinst.setLogicOpSign(instParts[0]);\n\t\t\t\tinst.setStage(\"Read\"); \n\t\t\t\t//Based on the operation available instructions \n\t\t\t\t// the instructions is split and assign to the Instruction structure POJO\n\t\t\t\tswitch(instParts[0]){\n\t\t\t\t\tcase \"ADD\":\n\t\t\t\t\tcase \"SUB\":\n\t\t\t\t\tcase \"AND\":\n\t\t\t\t\tcase \"OR\":\n\t\t\t\t\tcase \"EXOR\":\n\t\t\t\t\tcase \"MUL\":\n\t\t\t\t\t\tinst.setDest(instParts[1]);\n\t\t\t\t\t\tinst.setSrc1(instParts[2]);\n\t\t\t\t\t\tinst.setSrc2(instParts[3]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"MOVC\":\n\t\t\t\t\t\tinst.setDest(instParts[1]);\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tint literal = Integer.parseInt(instParts[2]);\n\t\t\t\t\t\t\tinst.setLiteral(literal);\n\t\t\t\t\t\t\tinst.decodedSrc1 = literal;\n\t\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\t\tinst.setSrc1(instParts[2]);\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"BZ\":\n\t\t\t\t\tcase \"BNZ\":\n\t\t\t\t\t\tInstructionStructure lastInst = instructions.get(i-1); // getting the previous instruction in pipeline\n\t\t\t\t\t\tif(lastInst != null){\n\t\t\t\t\t\t\tint literal2 = Integer.parseInt(instParts[1]);\n\t\t\t\t\t\t\tinst.setSrc1(lastInst.getDest()); // set previous instruction destination register as source\n\t\t\t\t\t\t\tinst.setLiteral(literal2);\n\t\t\t\t\t\t\tinst.decodedSrc2 = literal2;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tSystem.out.println(\"Branch without any last Instruction\");\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"JUMP\":\n\t\t\t\t\t\tinst.setSrc1(instParts[1]);\n\t\t\t\t\t\tint literal3 = Integer.parseInt(instParts[2]);\n\t\t\t\t\t\tinst.setLiteral(literal3);\n\t\t\t\t\t\tinst.decodedSrc2 = literal3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"STORE\":\n\t\t\t\t\t\tinst.setSrc1(instParts[1]);\n\t\t\t\t\t\tinst.setSrc2(instParts[2]);\n\t\t\t\t\t\tint literal = Integer.parseInt(instParts[3]);\n\t\t\t\t\t\tinst.setLiteral(literal);\n\t\t\t\t\t\tinst.decodedDest = literal;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"LOAD\":\n\t\t\t\t\t\tinst.setDest(instParts[1]);\n\t\t\t\t\t\tinst.setSrc1(instParts[2]);\n\t\t\t\t\t\tint literal1 = Integer.parseInt(instParts[3]);\n\t\t\t\t\t\tinst.setLiteral(literal1);\n\t\t\t\t\t\tinst.decodedSrc2 = literal1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlineReader.close();\n\t\t\t//check the looping cycle(extracycle) with in cycle limit\n\t\t\twhile (extraCycle >= cycles){\n\t\t\t\tInstructionExecution instructionExecution = new InstructionExecution();\n\t\t\t\tMap<String, InstructionStructure> pipelineStatus = ApexSimulatorHelper.INSTANCE.getPipelineStatus();\n\t\t\t\tnew StageExecution().ExeInstructionInStages();\n\n\t\t\t\tif(pipelineStatus.get(\"WB\") != null ){\n\t\t\t\t\tInstructionStructure instr = pipelineStatus.get(\"WB\");\n\t\t\t\t\tString destRegister = instr.getDest();\n\t\t\t\t\tRegisterHandler registerOp = ApexSimulatorHelper.INSTANCE.getRegister(destRegister);\n\t\t\t\t\tRegisterHandler PSWreg = ApexSimulatorHelper.INSTANCE.getRegister(\"PSW\");\n\n\t\t\t\t\tif(registerOp != null){\n\t\t\t\t\t\tregisterOp.setStatus(false);\n\t\t\t\t\t}\n\t\t\t\t\tif(instr.isCurrentValue()){\n\t\t\t\t\t\tregisterOp.setValue(instr.getResult());\n\t\t\t\t\t\tif(!instr.getLogicOpSign().equals(\"MOVC\")){\n\t\t\t\t\t\t\tif(instr.getResult() == 0){\n\t\t\t\t\t\t\t\tPSWreg.setValue(1); // set psw zero flag because the computed result is 0.\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tPSWreg.setValue(0);\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\tif(pipelineStatus.get(\"MEM\") != null){\n\t\t\t\t\tInstructionStructure instr = pipelineStatus.get(\"MEM\");\n\t\t\t\t\tinstructionExecution.ExecuteInstr(instr);\n\t\t\t\t\tswitch(instr.getLogicOpSign()){\n\t\t\t\t\t\tcase \"LOAD\":\n\t\t\t\t\t\t\tif(instr.getDest() != null){\n\t\t\t\t\t\t\t\tRegisterHandler destination = ApexSimulatorHelper.INSTANCE.getRegister(instr.getDest());\n\t\t\t\t\t\t\t\tdestination.setStatus(true);\n\t\t\t\t\t\t\t\tint src1 = instr.decodedSrc1;\n\t\t\t\t\t\t\t\tint literal = instr.decodedSrc2;\n\t\t\t\t\t\t\t\tint address = src1 + literal;\n\t\t\t\t\t\t\t\tdestination.setValue(memoryOp.get(address));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STORE\":\n\t\t\t\t\t\t\tif(instr.getSrc2()!=null){\n\t\t\t\t\t\t\t\tint lit = instr.decodedDest;\n\t\t\t\t\t\t\t\tint src1 = instr.decodedSrc1;\n\t\t\t\t\t\t\t\tint dest1 = instr.decodedSrc2;\n\t\t\t\t\t\t\t\tint address = dest1 + lit;\n\t\t\t\t\t\t\t\tmemoryOp.set(address, src1);\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}\n\t\t\t\tif(pipelineStatus.get(\"MUL1\") != null){\n\t\t\t\t\tInstructionStructure instr = pipelineStatus.get(\"MUL1\");\n\t\t\t\t\tinstructionExecution.ExecuteInstr(instr);\n\t\t\t\t\tinstructionExecution.Mul1Execution(instr);\n\t\t\t\t}\n\t\t\t\tif(pipelineStatus.get(\"MUL2\") != null){\n\t\t\t\t\tInstructionStructure instr = pipelineStatus.get(\"MUL2\");\n\t\t\t\t\tinstructionExecution.ExecuteInstr(instr);\n\t\t\t\t\tinstructionExecution.Mul2Execution(instr);\n\t\t\t\t}\n\t\t\t\tif(pipelineStatus.get(\"IFU\") != null){\n\t\t\t\t\tInstructionStructure instr = pipelineStatus.get(\"IFU\");\n\t\t\t\t\tinstructionExecution.ExecuteInstr(instr);\n\t\t\t\t\tinstructionExecution.IntegerFUExecution(instr);\n\t\t\t\t}\n\t\t\t\tif(pipelineStatus.get(\"DECODE\") != null){\n\t\t\t\t\tInstructionStructure instr = pipelineStatus.get(\"DECODE\");\n\t\t\t\t\tString src1 = instr.getSrc1();\n\t\t\t\t\tString src2 = instr.getSrc2();\n\t\t\t\t\tif(src1 != null){\n\t\t\t\t\t\tif(!ApexSimulatorHelper.INSTANCE.getRegister(src1).isStatus()){\n\t\t\t\t\t\t\tinstr.decode_source1();\n\t\t\t\t\t\t\tif(src2 != null){\n\t\t\t\t\t\t\t\tif(!ApexSimulatorHelper.INSTANCE.getRegister(src2).isStatus()){\n\t\t\t\t\t\t\t\t\tinstr.setStage(\"ready\");\n\t\t\t\t\t\t\t\t\tinstr.decode_source2();\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tinstr.setStage(\"stalled\");\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\tinstr.setStage(\"ready\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tinstr.setStage(\"stalled\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tinstr.setStage(\"ready\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tApexSimulatorHelper.INSTANCE.printState();\n\t\t\t\tcycles += 1;\n\t\t\t\tStageExecution stageExecution = new StageExecution();\n\t\t\t\tif(!stageExecution.allInstructionsExecuted()){\n\t\t\t\t\tif(cycles > extraCycle){\n\t\t\t\t\t\tApexSimulatorHelper.INSTANCE.printArchState();\n\t\t\t\t\t\tSystem.out.println(\"Do you want to Simulate for some more cycles?Y/N\");\n\t\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\t\t\tif(br.readLine().equalsIgnoreCase(\"Y\")){\n\t\t\t\t\t\t\tSystem.out.println(\"Please enter the number of cycles you want to simulate more\");\n\t\t\t\t\t\t\textraCycle = extraCycle + Integer.parseInt(br.readLine());\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tApexSimulatorHelper.INSTANCE.actualCycle = cycles;\n\t\t\t\t\t\t\tcycles = 1;\n\t\t\t\t\t\t\tStageExecution.pc = 4000;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tApexSimulatorHelper.INSTANCE.actualCycle = cycles; \n\t\t\t\t\tApexSimulatorHelper.INSTANCE.printArchState();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "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 }", "@Override\n\t\tprotected void process() throws Exception {\n\t\t\tthis.status = \"{\\\"status\\\":\\\"Now processing - Initializing Models...\\\",\\\"starttime\\\":\"\n\t\t\t\t\t+ start_time + \",\\\"uuid\\\":\\\"\" + this.uuid + \"\\\"}\";\n\t\t\tGlobalVars.initialize();\n\n\t\t\t// Processing Step 1. - CoreNLP\n\t\t\tthis.status = \"{\\\"status\\\":\\\"Now processing CoreNLP.\\\",\\\"starttime\\\":\"\n\t\t\t\t\t+ start_time + \",\\\"uuid\\\":\\\"\" + this.uuid + \"\\\"}\";\n\t\t\tString processed_text = Filter\n\t\t\t\t\t.filterdata(GlobalVars.pipeline, text);\n\n\t\t\t// Processing Step 2. - Openie\"\n\t\t\tthis.status = \"{\\\"status\\\":\\\"Now processing Openie.\\\",\\\"starttime\\\":\"\n\t\t\t\t\t+ start_time + \",\\\"uuid\\\":\\\"\" + this.uuid + \"\\\"}\";\n\t\t\tStringBuilder openIEOutput = new StringBuilder();\n\t\t\tString temp = \"\";\n\t\t\tfor (String sentence : processed_text.split(\"\\\\. \")) {\n\n\t\t\t\tSeq<Instance> extractions = GlobalVars.openIE.extract(sentence);\n\n\t\t\t\tInstance[] arr = new Instance[extractions.length()];\n\t\t\t\textractions.copyToArray(arr);\n\n\t\t\t\tfor (Instance inst : arr) {\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tsb.append(inst.sentence() + \"\\n\");\n\t\t\t\t\tDouble conf = inst.confidence();\n\t\t\t\t\tString stringConf = conf.toString().substring(0, 4);\n\t\t\t\t\tsb.append(stringConf).append(\" (\")\n\t\t\t\t\t\t\t.append(inst.extr().arg1().text()).append(\"; \")\n\t\t\t\t\t\t\t.append(inst.extr().rel().text()).append(\"; \");\n\n\t\t\t\t\ttemp += inst.extr().arg1().text() + \"\\n\"\n\t\t\t\t\t\t\t+ inst.extr().rel().text() + \"\\n\";\n\n\t\t\t\t\tPart[] arr2 = new Part[inst.extr().arg2s().length()];\n\t\t\t\t\tinst.extr().arg2s().copyToArray(arr2);\n\t\t\t\t\t/*\n\t\t\t\t\t * for (Part arg : arr2) { sb.append(arg.text()).append(\"\");\n\t\t\t\t\t * System.out.println(\"%\" + arg.text() + \"%\"); }\n\t\t\t\t\t */\n\t\t\t\t\tif (arr2.length != 0) {\n\t\t\t\t\t\tSystem.out.println(\"Hats: \" + arr2[0]);\n\t\t\t\t\t\ttemp += arr2[0] + \"\\n\";\n\t\t\t\t\t\tsb.append(arr2[0]);\n\t\t\t\t\t\tsb.append(\")\\n\\n\");\n\t\t\t\t\t\topenIEOutput.append(sb.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Processing Step 3. - Rewrite\n\t\t\tthis.status = \"{\\\"status\\\":\\\"Now processing Rewrite.\\\",\\\"starttime\\\":\"\n\t\t\t\t\t+ start_time + \",\\\"uuid\\\":\\\"\" + this.uuid + \"\\\"}\";\n\t\t\t// Load load = new Load();\n\t\t\t// result = load.Loadfilter(openIEOutput.toString());\n\t\t\tresult = temp;\n\t\t}", "@Override\n public void run() {\n try (BufferedReader reader = new BufferedReader(new FileReader(file.getAbsoluteFile()))) {\n String lineFromFile = reader.readLine();\n String[] splitLine;\n String userName;\n String url;\n long time;\n while ((lineFromFile = reader.readLine()) != null) {\n splitLine = lineFromFile.split(\";\");\n userName = splitLine[3];\n url = splitLine[1];\n time = Long.parseLong(splitLine[2]);\n if (userNamesAndCorrespondingContent.containsKey(userName)) {\n Content content = userNamesAndCorrespondingContent.get(userName);\n if (content.getUrlAndCorrespondingTime().containsKey(url)) {\n content.updateTimeForCorrespondingUrl(url, time);\n } else {\n content.updateUrlAndTimeInfoForCorrespondingUsername(url, time);\n }\n } else {\n Map<String, Long> newUrlAndTime = new ConcurrentSkipListMap<>();\n newUrlAndTime.put(url, time);\n userNamesAndCorrespondingContent.put(userName, new Content(newUrlAndTime));\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void process() throws Exception {\n\n\t}", "@Override\n\tpublic void startProcessing() {\n\n\t}", "void process() throws Exception {\n\t\n\n\t\t\tFile inputFile=new File(round+\"/\"+exercice+\"-small-attempt1.in\");\n\t\t\tPrintWriter outputFile= new PrintWriter(round+\"/\"+exercice+\"-small-attempt1.out\",\"UTF-8\");\n\n\t\t\n\t//\tFile inputFile=new File(round+\"/\"+exercice+\"-large.in\");\n\t//\tPrintWriter outputFile= new PrintWriter(round+\"/\"+exercice+\"-large.out\",\"UTF-8\");\n\n\n\t\tScanner scanner=new Scanner(inputFile);\n\t\tscanner.useLocale(Locale.US);\n\t\tint T = scanner.nextInt();\n\t\tSystem.out.println(\"Doing \"+T+\" cases\");\n\n\t\t\n\n\t\tfor (int t=1;t<=T;t++) {\n\t\n\t\t\t// do Something\n\t\t\tN=scanner.nextInt();\n\t\t\tS=new String[N];\n\t\t\n\t\t\t\n\t\t\tfor (int i=0;i<N;i++){\n\t\t\t\tS[i]=scanner.next();\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\tString ss=\"\"+solve();\n\t\t\n\t\t\tSystem.out.println(\"Case #\"+t+\": \"+ss);\n\t\t\toutputFile.println(\"Case #\"+t+\": \"+ss);\n\t\t\t\n\t\t}\n\t\tscanner.close();\n\t\toutputFile.close();\n\n\t}", "public static void setUser() throws FileNotFoundException {\n\t\tusertext.getParentFile().mkdirs();\n\t\tScanner search = new Scanner(usertext);\n\t\twhile (search.hasNextLine()) {\n\t\t\tString phrase = search.nextLine().trim();\n\t\t\tString[] user = phrase.split(\";\");\n\t\t\tworkers.add(new EachUser(user[0], user[1]));\n\t\t}\n\t\tsearch.close();\n\t}", "@Override\n\tpublic void run() {\n\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n\t\t\tString line = null;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] record = line.trim().split(\"@\");\n\t\t\t\tif (record.length != 2)\n\t\t\t\t\tcontinue;\n\t\t\t\tparse(record[0], record[1]);\n\n\t\t\t}\n\t\t\t// close buffer reader\n\t\t\tbr.close();\n\t\t\t// Debug catch An exception\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}", "private void startProcess() {\r\n \t\tstartCount++;\r\n \t\tString threadName = Thread.currentThread().getName() + \"-starter-\" + startCount;\r\n \t\tThread starter = new Thread(threadName) {\r\n \t\t\t@Override\r\n \t\t\tpublic void run() {\r\n \t\t\t\tstartupThrotle.acquireUninterruptibly();\r\n \t\t\t\tlong startTime = System.currentTimeMillis();\r\n \t\t\t\tMaximaProcess mp = makeProcess();\r\n \t\t\t\tstartupTimeHistory.add(System.currentTimeMillis() - startTime);\r\n \t\t\t\tmp.deactivate();\r\n \t\t\t\tpool.add(mp);\r\n \t\t\t\tstartupThrotle.release();\r\n \t\t\t}\r\n \t\t};\r\n \t\tstarter.start();\r\n \t}", "private void processCourseFile(final String fileDir) throws IOException {\n mapReducer.preFillMap(cntMap, fileDir + File.separator + COURSE_FILE);\n }", "@Override\n public void run() {\n\tprocess();\n }", "@Override\n\tpublic void run()\n\t{\n\t\twhile (true)\n\t\t{\n\t\t\tif (f.lastModified() > lastModified)\n\t\t\t{\n\t\t\t\tprocessFile(false);\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\tThread.sleep(60000);\n\t\t\t}\n\t\t\tcatch (InterruptedException ex)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t}", "public static void HPRN(boolean verbose,ArrayList<Process> list, int numProcesses ) throws FileNotFoundException {\n\tSystem.out.println(\"Highest Penalty Ratio Next\");\n\tint totalCPU=0;\n\tint randomNum=1;\n\tPriorityQueue<Process> priorityQ = new PriorityQueue<Process>(10, new The_Comparator_Ratio()); \n \tSystem.out.print(\"The original output is: \" + numProcesses+ \" \");\n\n\tfor(int i=0;i<numProcesses;i++) {\n\t\tlist.get(i).processdetails();\n \t}\n\tSystem.out.println();\n\tCollections.sort(list);\n\tSystem.out.print(\"The sort output is: \" + numProcesses + \" \");\n\n\tfor(Process iterate: list) {\n\t\t\n\t\titerate.processdetails();\n\t}\n\tSystem.out.println();\n \n\t \n\t ArrayList<Process> terminated= new ArrayList<Process>();\n\t ArrayList<Process> InSystem= new ArrayList<Process>();\n\t HashMap<Process, Integer> runinng = new HashMap<Process, Integer>();\n \n\t int cycleNum=0;\n \n \n \n HashMap<Process, Integer> waitTime = new HashMap<Process, Integer>();\n \n HashMap<Process, Integer> finishTime = new HashMap<Process, Integer>();\n HashMap<Process, Integer> cycleReady = new HashMap<Process, Integer>();\n\n HashMap<Process, Integer> IOTime = new HashMap<Process, Integer>();\n CopyOnWriteArrayList<Process> blocked= new CopyOnWriteArrayList<Process>();\n\t \n\t Queue<Process> readyQ = new LinkedList<Process>(); \n\tArrayList<Process> ProcessesInCycle=new ArrayList<Process>();\n\tint AVGIO=0;\n\tArrayList<Integer> IOUtilization=new ArrayList<Integer>();\n\n\tQueue<Process> unstartedQ = new LinkedList<Process>(); \n\n\tint finishingTime=0;\n \n \n\t//Current running process\n\tProcess running=null;\n\tfor(int i=0; i<list.size();i++) {\n\t\t\n\t\t\tlist.get(i).currentState=\"unstarted\";\n\t\t\tunstartedQ.add(list.get(i));\n\t\t\n\t}\n\t\n\tif(verbose==true) {\n\t\tSystem.out.println(\"This detailed printout gives the state and remaining burst for each process\\n\");\n\t\tSystem.out.print(\"Before cycle \\t\" + cycleNum + \":\\t\");\n\t\tfor (int iterator=0; iterator<list.size();iterator++) {\n\t\t\t//System.out.println(\"Here 0000 \");\n\t\t\tlist.get(iterator).cycleStatus();\n\t\t\tSystem.out.print(\"\\t \");\n\t\t}\n\t\tSystem.out.print(\"\\n\");\n\t}\n\t\n\twhile (terminated.size()!=list.size()) {\n\t\tif(!InSystem.isEmpty()) {\n\t\t\tfor(Process p: InSystem) {\n\t\t\t\t \n\t\t\t\tp.setInSystem(p.getInSystem()+1);\n\t\t\t}\n\t\t\tfor(Process p: priorityQ) {\n\t\t\t\t//p.Cycle();\n\t\t\t\t//System.out.println(p.getRuning());\n\t\t\t\t//System.out.println(\"IN the System \" + p.getInSystem());\n\t\t\t\t//System.out.println(\"Actually Running \" + p.getRuning());\n\t\t\t\t//p.setInSystem(p.getInSystem()+1);\n\t\t\t}\n\t\t}\n\t\tif(!ProcessesInCycle.isEmpty()) {\n\t\t\t \n\t\t\t\tfor(Process in: ProcessesInCycle) {\n\t\t\t\t\tin.setCycleTracker(in.getCycleTracker()+1);\n\t\t\t\t}\n\t\t\t\tArrayList<Process> resort = new ArrayList<Process>();\n\t\t\t\tif(!priorityQ.isEmpty()) {\n\t\t\t\tfor(Process in : priorityQ) {\n\t\t\t\t\tresort.add(in);\n\t\t\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t\t\tpriorityQ.clear();\n\t\t\t\tfor(Process in: resort) {\n\t\t\t\t\tpriorityQ.add(in);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\tProcess[] events = priorityQ.toArray(new Process[priorityQ.size()]);\n\t\t\t\tArrays.sort(events, priorityQ.comparator());\n\t\t\t\tfor (Process e : events) {\n\t\t\t\t\t//e.Cycle();\n\t\t\t\t //System.out.println( \" \" + ratioTest(e, cycleNum));\n\t\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\tfor(Process iterator: unstartedQ) {\n\t\t\tif (iterator.A==cycleNum) {\n\t\t\t\tInSystem.add(iterator);\n\t\t\tint in=\tlist.indexOf(iterator);\n\t\t\tlist.get(in).currentState=\"ready\";\n\t\t\t\n\t\t\titerator.setCycleTracker(0);\n\t\t\treadyQ.add(iterator);\n\t\t\titerator.setCurrentState(\"ready\");\n\t\t\titerator.setCycleTracker(0);\n\t\t\tProcessesInCycle.add(iterator);\n\t\t\tcycleReady.put(iterator, 0);\n\t\t\tpriorityQ.add(iterator);\n\t\t\twaitTime.put(iterator, 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t \n\t\tcycleNum++;\n\t\tif(running==null ){\n\t\t \n\t\t\t \n\t\t\tint i=0;\n\t\t\t\n\t\t\t\n \t\t\trunning=priorityQ.poll();\n \t\t\t \n \t\t\tint minCycle= Collections.min(cycleReady.values());\n \t\t\t\n \t\t\treadyQ.remove(running);\n\t\t\tif(running!=null &&running.getRuntime()==0) {\n\t\t\tint randomBurst= randomOS(running.getB(), randomNum);\n\t\t\trandomNum++;\n\t\t\trunning.setburst(randomBurst);\n\t\t\trunning.setIOBurst(randomBurst);\n\t\t\t \n\t\tint x=0;\n\t\tfor(Process iterator: list) {\n\t\tif(iterator.getID()==running.getID()) {\n\t\t\titerator.setCurrentState(\"running\");\n\t\t\truninng.put(running,randomBurst);\n\t\t}\n\t}\n\t\t\t}\n\t\n\n\t\t}\n\t\n\t\tfor(Process iterator: readyQ) {\n\t\t\tint in= list.indexOf(iterator);\n\t\t\tlist.get(in).setWaitingTime(list.get(in).getWaitingTime()+1);\n\t\t}\n\t\t\n\t\tif(verbose==true) {\n\t\t\n\t\t\tSystem.out.print(\"Before cycle \\t\" + cycleNum + \":\\t\");\n\t\t\t\n\t\t\tfor(Process iterator: list) {\n\t\t\t\titerator.cycleStatus();\n\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t\t\n\t\tif(running!=null) {\n\t\t\ttotalCPU++;\n\t\t\trunning.setC(running.getC()-1);\n\t\t\trunning.setburst(running.getBurst()-1);\n\t\t\tfor(Process p: list) {\n\t\t\t\tif(p.getID()==running.getID())\n\t\t\t\tp.setRuning(p.getRuning()+1);\n\t\t\t}\n\t\t\trunning.setRuning(running.getRuning()+1);\n\t\t}\n\t\t\n\n\t\tif(!blocked.isEmpty()) {\n\t\t\tAVGIO++;\n\t\t\tArrayList<Process> ready= new ArrayList<Process>();\n\t\t\tfor(Process iterator: blocked) {\n\t\t\t\titerator.setBlocked(iterator.getBlocked()+1);\n \t\t\t\titerator.setIOBurst(iterator.getIOBurst()-1);\n\t\t\t\t\n \t\t\t\tIOTime.put(iterator, IOTime.get(iterator)+1);\n\t\t\t\tif(iterator.getIOBurst()<=0) {\n\t\t\t\t\tready.add(iterator);\n\t\t\t\n\t\t\t\t}}\n\t\t\t\n\t\t\tCollections.sort(ready);\n\t\t\tfor(Process in :ready ) {\n\t\t\t\tif(!ProcessesInCycle.contains(in)) {\n\t\t\t\tProcessesInCycle.add(in);\n\t\t\t\t}\n\t\t\t\t in.setCurrentState(\"ready\");\n\t\t\t\t\t\tblocked.remove(in);\n\t\t\t\t\t\treadyQ.add(in);\n\t\t\t\t\t\tif(!priorityQ.contains(in)) {\n\t\t\t\t\t\t\tpriorityQ.add(in);\n\t\t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t\t\tfor(Process process: list) {\n\t\t\t\t\t\t\tif(process.getID()==in.getID()) {\n\t\t\t\t\t\t\t\tprocess.setCurrentState(\"ready\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//terminated.add(iterator);\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t}\t\n\t\n\t\n\t\tif(running!=null && running.getC()!=0 && running.getBurst()<=0) {\n\t\n\t\t\tint val=0;\n\t\t\n\t\t\tfor(Process iterator: list) {\n\t\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\t\titerator.setCurrentState(\"blocked\");\n\t\t\t\t\t\n\t\t\t\t\tif(IOTime.containsKey(iterator)) {\n \t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\tIOTime.put(iterator, 0);\n\t\t\t\t\t}\n\t\t\t\t\tval=runinng.get(iterator)*iterator.getM();\n\t\t\t\t\t\n\t\t\t\t\titerator.setIOBurst(val);\n \t\t\t\t}\n\t\t\t}\n\t\t\t\t\n \t\t\trunning.setIOBurst(val);\n\t\n\t\t\tblocked.add(running);\n\t\t\trunning=null;\n \t\t}\n\t\telse if(running!=null && running.getC()==0 ){\n\t\t\tfor(Process iterator: list) {\n\t\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\t\titerator.setCurrentState(\"terminated\");\n\t\t\t\t\titerator.setburst(0);\n\t\t\t\t\tProcessesInCycle.remove(iterator);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t}\n\t\t\tterminated.add(running);\n\t\t\tfinishTime.put(running, cycleNum);\n\t\t\trunning=null;\n\t\t\t\n\t} \n\t\tfinishingTime++;\n\t}\n\tArrayList<Integer> AVGturnaroundTime= new ArrayList<Integer>();\n\tArrayList<Integer> AVGWaitTIme= new ArrayList<Integer>();\n\n\tSystem.out.println(\"\\nThe scheduling algorithm used was Highest Penalty Ratio Next\\n\");\n\tint counter=0;\n\tfor(Process values: list) {\n \t\tSystem.out.println(\"Process \"+ counter + \": \");\n\t \tSystem.out.print(\"\\t(A, B, C, M) =\" +\" \" );\n\t \t values.processdetails();\n\t\tfor(Process proc: finishTime.keySet()) {\n\t\t\tif (proc.getID()==values.getID()) {\n\t\t\t\tSystem.out.println(\"\\n\\tFinishing Time: \" + finishTime.get(proc));\n\t\t\t\tSystem.out.println(\"\\tTurnaround Time: \"+ (finishTime.get(proc)- proc.getA()));\n\t\t\t\tAVGturnaroundTime.add( (finishTime.get(proc)- proc.getA()));\n\t\t\t}\n\t\t}\n\t\t \n\t\t\n\t\t\n\t\tfor(Process proc: IOTime.keySet()) {\n \t\t\tif (proc.getID()==values.getID()) {\n\t\t\t\tSystem.out.println(\"\\tIO Time: \" + IOTime.get(proc));\n\t\t\t\tIOUtilization.add(IOTime.get(proc));\n\t\t\t}\n\t\t\n\t\t\n\t\t}\n\t\tSystem.out.println(\"\\tWaiting Time: \" +values.getWaitingTime());\n\t\tAVGWaitTIme.add(values.getWaitingTime());\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tcounter++;\n\t\t}\n\tint o=0;\n\tfor(Process l: list) {\n\t\to+=l.getCPUtime();\n\t\t \n\t}\n\tSystem.out.print(\"\\nSummary Data:\");\n\tSystem.out.println(\"\\n\\tFinishing Time: \" + finishingTime);\n \tSystem.out.println(\"\\tCPU Utilization: \" + (double)totalCPU/((double)cycleNum));\n \tint IOU=0;\n\tdouble ioUtilization=0;\n\t\n\tfor(int i =0; i<IOUtilization.size();i++) {\n\t\tIOU+=IOUtilization.get(i);\n\t}\n\tioUtilization=(double)AVGIO/((double) cycleNum);\n\tSystem.out.println(\"\\tI/O Utilization:: \" + ioUtilization);\n\tSystem.out.println(\"\\tThroughput: \" + ((double)((double)100*list.size()/(double)(cycleNum))) + \" processes per hundred cycles\");\n\tint avg=0;\n\tdouble TAT1=0;\n\tfor(int i =0; i<AVGturnaroundTime.size();i++) {\n\t\tavg+=AVGturnaroundTime.get(i);\n\t}\n\tTAT1= (double)avg/(double)list.size();\n\t\n\tSystem.out.println(\"\\tAverage turnaround time: \" + TAT1);\n\tint avgWait=0;\n\tdouble AVGW=0;\n\tfor(int i =0; i<AVGWaitTIme.size();i++) {\n\t\tavgWait+=AVGWaitTIme.get(i);\n\t}\n\tAVGW=(double)avgWait/(double) list.size();\n\tSystem.out.println(\"\\tAverage Wait time: \" + AVGW);\n\t\n\t\n\t\n\t\n\t\n}", "void separateOut() {\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n if (outputType.equals(\"Text\")) {\n FileWriter writer = new FileWriter(outputDir\n + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".txt\", false);\n BufferedWriter bWriter = new BufferedWriter(writer);\n for (int j = 1; j < images.length; j++) {\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n }\n bWriter.close();\n } else if (outputType.equals(\"PDF\")) {\n PDDocument document = new PDDocument();\n for (int j = 1; j < images.length; j++) {\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n document.save(outputDir + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".pdf\");\n document.close();\n }\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n if (outputType.equals(\"Text\")) {\n FileWriter writer = new FileWriter(outputDir + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".txt\", false);\n BufferedWriter bWriter = new BufferedWriter(writer);\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n bWriter.close();\n } else if (outputType.equals(\"PDF\")) {\n PDDocument document = new PDDocument();\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n document.save(outputDir + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".pdf\");\n document.close();\n }\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }" ]
[ "0.6110314", "0.5945318", "0.59439677", "0.5897032", "0.58111995", "0.58034235", "0.57094663", "0.5706792", "0.56878626", "0.5682878", "0.5658501", "0.56380546", "0.559925", "0.5571104", "0.55617636", "0.5557798", "0.5495904", "0.54662", "0.5439444", "0.5430116", "0.5424498", "0.5396915", "0.53867525", "0.5379548", "0.5364704", "0.53174525", "0.53150517", "0.5312877", "0.5307144", "0.5307092", "0.529755", "0.52919483", "0.5287893", "0.5287893", "0.5287893", "0.5287893", "0.5287893", "0.5287893", "0.5287893", "0.5280507", "0.5280507", "0.52786386", "0.527511", "0.52749145", "0.5265487", "0.52582854", "0.52542865", "0.524732", "0.5247195", "0.5236755", "0.52356744", "0.5233823", "0.52270854", "0.5204654", "0.5196648", "0.5184674", "0.5181891", "0.5179369", "0.5178086", "0.5176006", "0.51735187", "0.51682436", "0.51613176", "0.51587707", "0.5158536", "0.5150535", "0.5141487", "0.5116198", "0.51137084", "0.50926155", "0.50923127", "0.50852436", "0.5083557", "0.50790733", "0.5067946", "0.5067691", "0.5047023", "0.50307155", "0.50271565", "0.5021512", "0.50110435", "0.5010326", "0.49804634", "0.497759", "0.49757713", "0.49721077", "0.49671644", "0.49639535", "0.49614987", "0.4955289", "0.49518254", "0.49442226", "0.49397516", "0.4934522", "0.49343956", "0.492866", "0.4928024", "0.492712", "0.49261558", "0.4922699" ]
0.53691465
24
Returns the job queue with loaded processes from the file
public Queue<PCB> getProcesses() { try { return this.loadToJobQueue(); } catch (FileNotFoundException e) { System.err.println("File not found!!"); } return JobQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Queue<PCB> loadToJobQueue() throws FileNotFoundException {\r\n\t\ttry {\r\n\r\n\t\t\tbr = new BufferedReader(new FileReader(FILENAME));\r\n\t\t\tfr = new FileReader(FILENAME);\r\n\t\t\tbr = new BufferedReader(fr);\r\n\t\t\tint pid = 0;\r\n\t\t\tint cpuBurst = 0;\r\n\t\t\tint memory = 0;\r\n\t\t\tint IOBurst = 0;\r\n\t\t\tint counter = 0;\r\n\r\n\t\t\tString sCurrentLine;\r\n\t\t\tbr.readLine(); // first Line \"Name CPU Memory IO \" etc..\r\n\t\t\t// Cycle contains:\r\n\t\t\t// cpuBurst, memory, IOBurst\r\n\t\t\twhile ((sCurrentLine = br.readLine()) != null ) {\r\n\r\n\t\t\t\t\r\n\t\t\t\tString[] PCBInfo = sCurrentLine.split(\"\t\");\t\t\r\n\t\t\t\tpid = Integer.parseInt(PCBInfo[0]); // Name of Process\r\n\t\t\t\tPCB pcb1 = new PCB(pid);\r\n\t\t\t\tcpuBurst = Integer.parseInt(PCBInfo[1]);\r\n\t\t\t\tmemory = Math.abs(Integer.parseInt(PCBInfo[2])); //First memory should be positive\r\n\t\t\t\tIOBurst = Integer.parseInt(PCBInfo[3]);\r\n\t\t\t\tpcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 1\r\n\t\t\t\tcpuBurst = Integer.parseInt(PCBInfo[4]);\r\n\t\t\t\tmemory = Integer.parseInt(PCBInfo[5]);\r\n\t\t\t\tIOBurst = Integer.parseInt(PCBInfo[6]);\r\n\t\t\t\tpcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 2\r\n\t\t\t\tcpuBurst = Integer.parseInt(PCBInfo[7]);\r\n\t\t\t\tmemory = Integer.parseInt(PCBInfo[8]);\r\n\t\t\t\tIOBurst = Integer.parseInt(PCBInfo[9]);\r\n\t\t\t\tpcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 3\r\n\t\t\t\tif (PCBInfo.length == 10) {\r\n\t\t\t\t\tJobQueue.enqueue(pcb1);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcpuBurst = Integer.parseInt(PCBInfo[10]);\r\n\t\t\t\tmemory = Integer.parseInt(PCBInfo[11]);\r\n\t\t\t\tIOBurst = Integer.parseInt(PCBInfo[12]);\r\n\t\t\t\tpcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 4\r\n\r\n\t\t\t\tif (PCBInfo.length == 14) { // Has only 5 Cycles\r\n\t\t\t\t\t\r\n\t\t\t\t\tcpuBurst = Integer.parseInt(PCBInfo[13]);\r\n\t\t\t\t\tmemory = 0;\r\n\t\t\t\t\tIOBurst = 0;\r\n\t\t\t\t\tpcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 5\r\n\r\n\t\t\t\t}\r\n\t\t\t\tif (PCBInfo.length == 17) { // if it has a 6th cycles\r\n\t\t\t\t\t\r\n\t\t\t\t\tcpuBurst = Integer.parseInt(PCBInfo[13]);\r\n\t\t\t\t\tmemory = Integer.parseInt(PCBInfo[14]);\r\n\t\t\t\t\tIOBurst = Integer.parseInt(PCBInfo[15]);\r\n\t\t\t\t\tpcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 5\r\n\t\t\t\t\tcpuBurst = Integer.parseInt(PCBInfo[16]);\r\n\t\t\t\t\tmemory = 0;\r\n\t\t\t\t\tIOBurst = 0;\r\n\t\t\t\t\tpcb1.addCycle(cpuBurst, memory, IOBurst);// Cycle 6\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tJobQueue.enqueue(pcb1);\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\r\n\t\t} catch (\r\n\r\n\t\tIOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} finally {\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tif (br != null)\r\n\t\t\t\t\tbr.close();\r\n\r\n\t\t\t\tif (fr != null)\r\n\t\t\t\t\tfr.close();\r\n\r\n\t\t\t} catch (IOException ex) {\r\n\r\n\t\t\t\tex.printStackTrace();\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn JobQueue;\r\n\r\n\t}", "public void run() throws IOException {\n \n try {\n \n File file = new File(\"jobs.txt\");\n FileReader fileReader = new FileReader(file);\n \n BufferedReader bufferedReader = new BufferedReader(fileReader); \n StringBuffer stringBuffer = new StringBuffer();\n \n String line;\n \n // reading the first line = number of jobs and skipping it since\n // I do not need that information \n line = bufferedReader.readLine();\n \n //this.numOfjobs = Integer.parseInt(line);\n \n // read a line:\n while ((line = bufferedReader.readLine()) != null ) {\n \n int weight,length;\n \n String[] arr = line.split(\"\\\\s+\");\n \n // weight and length are\n weight = Integer.parseInt(arr[0]);\n length = Integer.parseInt(arr[1]);\n \n // putting into the priority queue\n this.putJob(weight, length);\n }\n \n // closing the fileReader:\n fileReader.close();\n \n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "public List<Task> load(){\n try {\n List<Task> tasks = getTasksFromFile();\n return tasks;\n }catch (FileNotFoundException e) {\n System.out.println(\"☹ OOPS!!! There is no file in the path: \"+e.getMessage());\n List<Task> tasks = new ArrayList();\n return tasks;\n }\n }", "Workload(String filename) {\n this.workload = new ArrayList<>();\n try {\n FileReader fileReader = new FileReader(filename);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n String line;\n // for each line in CSV, create a Process and add to workload\n while ((line = bufferedReader.readLine()) != null) {\n String[] splitLine = line.split(\",\");\n int PID = Integer.parseInt(splitLine[0]);\n int CBT = Integer.parseInt(splitLine[1]);\n int AAT = Integer.parseInt(splitLine[2]);\n Process process = new Process(PID, CBT, AAT);\n this.workload.add(process);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public int Load(String filepath) throws IOException {\n \t\tint AddeCounter = 0;\n \t\tPath path = Paths.get(filepath);\n \t\ttry (Scanner scanner = new Scanner(path, ENCODING.name())) {\n \t\t\twhile (scanner.hasNextLine()) {\n \t\t\t\t// Read each line into the array list\n \t\t\t\tString line = scanner.nextLine();\n \t\t\t\tif (line != null && !line.isEmpty()) {\n \t\t\t\t\tJobs jobUnit = new Jobs(line);\n \t\t\t\t\tjobqueue.add(jobUnit);\n \t\t\t\t\tAddeCounter++;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn AddeCounter;\n \t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<IJobQueue> getJobs() throws IOException {\n\t\tfinal String sql = \"SELECT * from jobqueue order by id\";\n\t\tList<? extends IJobQueue> result = this.queryDataList(JobQueue.class,IJobQueue.Props.class, sql);\n\t\treturn (List<IJobQueue>) result;\t\t\n\t}", "private List<Task> getTasksFromFile() throws FileNotFoundException{\n List<Task> loadedTasks = new ArrayList<>();\n Ui a=new Ui();\n try {\n List<String> lines = getLine() ;\n for (String line : lines) {\n if (line.trim().isEmpty()) { //ignore empty lines\n continue;\n }\n loadedTasks.add(createTask(line)); //convert the line to a task and add to the list\n }\n System.out.println(\"File successfully loaded\");\n } catch (DukeException e1) {\n System.out.println(\"☹ OOPS!!! Problem encountered while loading data: \" +e1.getMessage());\n }\n return loadedTasks;\n }", "public ArrayList<jobqueue> getqueue() {\n\t\tArrayList<jobqueue> job = new ArrayList<jobqueue>();\n\t\tMysqlConnPool.getInstance();\n\t\tConnection connection = MysqlConnPool.getConnection();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from jobqueue\";\n\t\trs = MysqlHelper.executeQuery(connection, sql, ps, rs);\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tjobqueue queue = new jobqueue();\n\t\t\t\tqueue.setId(rs.getInt(\"id\"));\n\t\t\t\tqueue.setUrl(rs.getString(\"url\"));\n\t\t\t\tqueue.setUrlname(rs.getString(\"sitename\"));\n\t\t\t\tqueue.setTitlerule(rs.getString(\"titlerule\"));\n\t\t\t\tqueue.setSourcerule(rs.getString(\"sourcerule\"));\n\t\t\t\tqueue.setPublishtimerule(rs.getString(\"publishtimerule\"));\n\t\t\t\tqueue.setContentrule(rs.getString(\"contentrule\"));\n\t\t\t\tqueue.setState(rs.getInt(\"state\"));\n\t\t\t\tqueue.setSitetype(rs.getInt(\"sitetype\"));\n\t\t\t\tqueue.setRuletype(rs.getInt(\"ruletype\"));\n\t\t\t\tqueue.setContentwebtype(rs.getInt(\"contentwebtype\"));\n\t\t\t\tjob.add(queue);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tMysqlUtil.realeaseResource(rs, ps, connection);\n\t\t}\n\t\treturn job;\n\n\t}", "public void loadQueue(){\n for (Block block : this.blocks) {\n this.queue.add(block.getID());\n }\n this.queue_set = true;\n }", "public static TaskList loadExistingTaskList(String fileName) {\n TaskList taskList = new TaskList();\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(fileName));\n String line;\n while ((line = br.readLine()) != null) {\n try {\n // process the line\n taskList.addItem(TaskItem.getItemFromLine(line, \"\\\\|\"));\n }\n catch(Exception e1) {\n System.out.println(e1.getMessage());\n }\n }\n }\n catch (IOException e) {\n System.out.println(\"File not found\");\n }\n finally {\n if (br != null) {\n try {\n br.close();\n }\n catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n }\n return taskList;\n }", "Collection<QueuedPrintJob> getQueue();", "public List< IJob > getJobs( int maxAmount )\n {\n String fileName;\n String refFileName;\n URI fileURI;\n byte[] referenceData = null;\n InputStream ISrefData = null;\n DocumentBuilderFactory docBuilderFactory;\n DocumentBuilder docBuilder = null;\n Document doc;\n \n docBuilderFactory = DocumentBuilderFactory.newInstance();\n try\n {\n docBuilder = docBuilderFactory.newDocumentBuilder();\n }\n catch( ParserConfigurationException pce )\n {\n log.error( pce.getMessage() );\n }\n doc = docBuilder.newDocument();\n \n List<IJob> list = new ArrayList<IJob>();\n for( int i = 0; i < maxAmount && iter.hasNext() ; i++ )\n {\n fileName = (String)iter.next();\n refFileName = fileName.substring( 0, fileName.lastIndexOf( \".\" ) ) + \".ref\";\n //System.out.println( String.format( \"created ref name %s for file %s\", refFileName, fileName ) );\n File refFile = FileHandler.getFile( refFileName );\n if ( refFile.exists() )\n {\n try\n {\n ISrefData = FileHandler.readFile( refFileName );\n }\n catch( FileNotFoundException fnfe )\n {\n log.error( String.format( \"File for path: %s couldnt be read\", refFileName ) );\n }\n try\n {\n doc = XMLUtils.getDocument( new InputSource( ISrefData ) );\n }\n catch( ParserConfigurationException ex )\n {\n log.error( ex.getMessage() );\n }\n catch( SAXException ex )\n {\n log.error( ex.getMessage() );\n }\n catch( IOException ex )\n {\n log.error( ex.getMessage() );\n }\n \n File theFile = FileHandler.getFile( fileName );\n \n list.add( (IJob) new Job( new FileIdentifier( theFile.toURI() ), doc ) );\n }\n else\n {\n log.warn( String.format( \"the file: %s has no .ref file\", fileName ) );\n i--;\n }\n }\n return list;\n \n }", "public void loadJobDataFromFile(File file) {\n try {\n\n JAXBContext context = JAXBContext.newInstance(JobListWrapper.class);\n Unmarshaller um = context.createUnmarshaller();\n\n // Reading XML from the file and unmarshalling.\n JobListWrapper wrapper = (JobListWrapper) um.unmarshal(file);\n\n jobData.clear();\n jobData.addAll(wrapper.getJobs());\n\n // Save the file path to the registry.\n setJobFilePath(file);\n\n } catch (Exception e) { // catches ANY exception\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(\"Could not load data\");\n alert.setContentText(\"Could not load data from file:\\n\" + file.getPath());\n\n alert.showAndWait();\n }\n }", "private List<Task> readFromFile() {\n if (file.exists()) {\n try {\n return objectmapper.readValue(file,TaskList.class);\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n } else {\n return new ArrayList<>();\n }\n }", "public Queue<JobInProgress> findQueue(String name) {\n return queues.get(name);\n }", "public PCB_block getJob(int i) {\n return jobQueue.get(i);\n }", "public WaitingProcessQueue() {\r\n this.data = new CustomProcess[INITIAL_CAPACITY];\r\n }", "FileLoader createJob(Reader reader);", "public Collection<FastqSequence> parse(File file)throws IOException{\n\t\tCollection<FastqSequence> rtrn=new ArrayList<FastqSequence>();\n\t\tString nextLine;\n while ((nextLine = reader.readLine()) != null && (nextLine.trim().length() > 0)) {\n \tif(nextLine.startsWith(\"@\")){\n \t\tString firstLine=nextLine;\n \t\tString secondLine=reader.readLine();\n \t\tString thirdLine=reader.readLine();\n \t\tString fourthLine=reader.readLine();\n \t\t\n \t\tFastqSequence seq=new FastqSequence(firstLine, secondLine,thirdLine, fourthLine);\n \t\t\t\n \t\trtrn.add(seq);\n \t}\n \t\n \t\n }\n return rtrn;\n\t}", "public List<Task> load() throws DukeException {\n List<Task> tasks = new ArrayList<>();\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(filePath));\n\n String line;\n while ((line = reader.readLine()) != null) {\n String[] tokens = line.split(\"\\\\|\");\n\n Task task = StorageSerializer.deserialize(tokens);\n tasks.add(task);\n }\n\n reader.close();\n } catch (FileNotFoundException e) {\n throw new IoDukeException(\"Error opening task file for reading\");\n } catch (IOException e) {\n throw new IoDukeException(\"Error closing file reader\");\n } catch (ParseException e) {\n throw new IoDukeException(\"Error parsing date in task file\");\n }\n\n return tasks;\n }", "@Override\n public AlgorithmProcess createProcess() {\n return new FileLoaderProcess(file);\n }", "public static List<ClientWorker> LoadServer(String fileName) throws FileNotFoundException, IOException{\n List<ClientWorker> connection = new LinkedList<ClientWorker>();\n \n // FileReader reads text files in the default encoding.\n FileReader fileReader = new FileReader(fileName);\n\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n connection.add(new ClientWorker(line));\n // System.out.println(line);\n }\n bufferedReader.close();\n \n return connection;\n }", "public ArrayList<Task> load() throws FileNotFoundException {\n Scanner sc = new Scanner(file);\n String currLine;\n ArrayList<Task> tasks = new ArrayList<>();\n while (sc.hasNextLine()) {\n currLine = sc.nextLine();\n String taskDescription = currLine.substring(5);\n boolean isDone = currLine.charAt(2) == '1';\n String[] arr = taskDescription.split(Pattern.quote(\"|\"));\n String description = arr[0];\n if (currLine.charAt(0) == 'T') {\n Todo todo = new Todo(description);\n todo.setState(isDone);\n tasks.add(todo);\n } else if (currLine.charAt(0) == 'E') {\n Event event = new Event(description, (arr.length == 1 ? \" \" : arr[1]));\n event.setState(isDone);\n tasks.add(event);\n } else {\n Deadline deadline = new Deadline(description, (arr.length == 1 ? \" \" : arr[1]));\n deadline.setState(isDone);\n tasks.add(deadline);\n }\n }\n return tasks;\n }", "void processQueue();", "Set<Class<? extends ScheduledProcess>> getScheduledProcessQueue();", "public ArrayList<BigInteger> read(String fileName) {\n String line = null; // current line from text file\n String[] numbers = null;\n try {\n BufferedReader lineReader = new BufferedReader\n ( (fileName == null || fileName.length() <= 0 || fileName.equals(\"-\"))\n ? new InputStreamReader(System.in)\n : new FileReader(fileName)\n );\n while ((line = lineReader.readLine()) != null) { // read and process lines\n if (! line.matches(\"\\\\s*#.*\") && ! line.matches(\"\\\\s*\")) { // no comment line, no empty line\n numbers = line.trim().split(\"\\\\s+\");\n int last = numbers.length - 1;\n /*\n try {\n int index = Integer.parseInt(numbers[0]);\n } catch (Exception exc) {\n }\n */\n sequence.add(new BigInteger(numbers[last]));\n } else {\n // ignore comment line\n }\n } // while ! eof\n lineReader.close();\n } catch (Exception exc) {\n log.error(exc.getMessage(), exc);\n } // try\n return sequence;\n }", "public static void readTasks(String filename,\n ArrayList<Task> task1, ArrayList<Task> task2,\n ArrayList<Task> task3) {\n int start;\n int deadline;\n int mins;\n int id = 0;\n File file = new File(\"src/\" + filename);\n try{\n Scanner sc = new Scanner(file);\n while(sc.hasNextInt()){\n id += 1;\n start = Integer.parseInt(sc.next());\n deadline = Integer.parseInt(sc.next());\n mins = Integer.parseInt(sc.next());\n //for each set of three numbers, create three tasks\n Task t1 = new Task1(id, start, deadline, mins);\n Task t2 = new Task2(id, start, deadline, mins);\n Task t3 = new Task3(id, start, deadline, mins);\n //add each to their respected queues\n task1.add(t1);\n task2.add(t2);\n task3.add(t3);\n }\n }catch(FileNotFoundException e){\n e.printStackTrace();\n }\n\n\n }", "public List<Task> readFile() throws FileNotFoundException, DukeException {\n List<Task> output = new ArrayList<>();\n Scanner sc = new Scanner(file);\n while (sc.hasNext()) {\n output.add(readTask(sc.nextLine()));\n }\n return output;\n }", "public LinkedBlockingQueue<Run> getStartQueue() {\n\t\treturn new LinkedBlockingQueue<Run>(startQueue);\n\t}", "public synchronized FileMetadata getMetadataFromQueue(){\n FileMetadata fileMetadata = queue.pollFirst();\n while(fileMetadata ==null){\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n fileMetadata = queue.pollFirst();\n }\n return fileMetadata;\n }", "protected abstract List<BlockingQueue<CallRunner>> getQueues();", "public ArrayList<Task> load() throws DukeException {\n ArrayList<Task> tasks = new ArrayList<>();\n try {\n File f = new File(filePath);\n if (f.exists()) {\n Scanner sc = new Scanner(f);\n while (sc.hasNext()) {\n String next = sc.nextLine();\n Task t = parseLine(next);\n tasks.add(t);\n }\n sc.close();\n } else {\n if (!f.getParentFile().exists()) {\n f.getParentFile().mkdir();\n }\n }\n f.createNewFile();\n } catch (IOException e) {\n throw new DukeException(\"Error retrieving/reading from data file, creating new file instead.\");\n }\n return tasks;\n }", "public LocalMessageQueue getMessageQueue() \n\t{\n\t\t// lazy\n\t\tif (mqueue == null) {\n\t\t\tmqueue = new LocalMessageQueue(project.getFile(MESSAGES_FILENAME));\n\t\t}\n\t\t\n\t\treturn mqueue;\n\t}", "public static Queue<ClosedShape> readDataFile(String filename) throws FileNotFoundException {\r\n File file = new File(filename);\r\n Scanner in = new Scanner(file);\r\n\r\n return ReadShapeFile.readDataFile(in);\r\n }", "public static Queue<ClosedShape> readDataFile(String filename) {\n\t\tFile file = new File(filename);\n\t\tScanner in = null;\n\n\t\ttry {\n\t\t\tin = new Scanner(file);\n\t\t} catch (Exception FileNotFoundException) {\n\t\t\tSystem.out.println(\"The file \" + file.getName() + \" could not be found.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\treturn ReadShapeFile.readDataFile(in);\n\t}", "private void loadDataFromMemory(String filename){\n shoppingList.clear();\n new ReadFromMemoryAsync(filename, getCurrentContext(), new ReadFromMemoryAsync.AsyncResponse(){\n\n @Override\n public void processFinish(List<ShoppingItem> output) {\n shoppingList.addAll(output);\n sortItems();\n }\n }).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n// for (ShoppingItem item: items) {\n// shoppingList.add(item);\n// }\n// sortItems();\n }", "public TaskList openFile() throws MonicaException {\n File file = new File(path);\n\n if (!file.exists()) {\n try {\n file.getParentFile().mkdir();\n file.createNewFile();\n } catch (IOException e) {\n throw new MonicaException(\"File cannot be created.\");\n }\n }\n\n try {\n Scanner sc = new Scanner(file);\n while (sc.hasNext()) {\n String txtLine = sc.nextLine();\n Task task = processContent(txtLine);\n taskList.addTask(task);\n }\n return taskList;\n } catch (FileNotFoundException e) {\n throw new MonicaException(\"File cannot be found.\");\n }\n }", "public void getFile(){\n\t\t\n\t\tParser parser = new Parser(f, this, taskPool);\n\t\tWorker w;\n\t\tfor (int i = 0; i < this.getTasks().getNumWorker(); i++){\n\t\t\t w = new Worker(position, this);\n\t\t\t w.setWorkerNum(i);\n\t\t\t workers.add(w);\n\t\t\t} \n\t\t\n\t\tworkPanel = new WorkPanel(tasks, this, workers);\n\t\tworkPanel.setBounds(0, 0, 600, 600);\n\t\tThread twp = new Thread(workPanel);\n\t\ttwp.start();\n\n\t\tmainPanel.add(workPanel);\n\t\t\n\t\t\tfor (int k = 0; k < workers.size(); k++){\n\t\t\t\tworkers.get(k).start();\n\t\t\t}\n\n\t}", "public Set<ProcessReader> getProcesses();", "static Schedules load(String fileName) throws RBEConfigObjectException\n {\n\n try\n {\n FileReader fis = new FileReader(fileName);\n\t\t return new Schedules(fis);\n } catch (Exception ioe) {\n throw new RBEConfigObjectException(ioe.toString());\n }\n }", "public static void readObject() {\r\n try {\r\n if (new File(FILE).exists()) {\r\n LoggingService.getInstance().serverLog(\"Reading cron table.\");\r\n ChunkedCharBuffer buf = new ChunkedCharBuffer();\r\n buf.append(new InputStreamReader(new FileInputStream(FILE)));\r\n String contents = buf.toString();\r\n String[] lines = contents.split(\"[\\n\\r]+\");\r\n for (String line : lines) {\r\n String[] splitLine = line.split(\"\\\\|\");\r\n int index = 0;\r\n scheduleJob(\r\n new CronJob(\r\n splitLine[index++], //identifier\r\n Long.valueOf(splitLine[index++]), //interval\r\n new Date(Long.valueOf(splitLine[index++]).longValue()), //start time\r\n splitLine[index++], //command string\r\n splitLine[index++], //user\r\n splitLine[index++] //user service\r\n )\r\n );\r\n }\r\n } else {\r\n LoggingService.getInstance().serverLog(\"No cron table\");\r\n }\r\n } catch (Exception e) {\r\n LoggingService.getInstance().serverLog(\"Error reading cron table: \" + e);\r\n }\r\n }", "private void loadJobs(){\n\t\tsuperJobsList.clear();\n\t\tsuperJobs=jdbc.getProjectsAndJobs();\n\t\tfor(Job j: superJobs){\n\t\t\tsuperJobsList.addElement(j.jobname);\n\t\t}\n\t\t\n\t}", "MaximaProcess getProcess() {\r\n \t\trequestTimeHistory.add(System.currentTimeMillis());\r\n \r\n \t\t// Start a new one as we are going to take one...\r\n \t\tif (startupThrotle.availablePermits() > 0) {\r\n \t\t\tstartProcess();\r\n \t\t}\r\n \r\n \t\tMaximaProcess mp = null;\r\n \t\twhile (mp == null) {\r\n \t\t\ttry {\r\n \t\t\t\tmp = pool.take();\r\n \t\t\t} catch (InterruptedException e) {\r\n \t\t\t\t// If we failed to get one, wait a bit.\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t\ttry {\r\n \t\t\t\t\tThread.sleep(3);\r\n \t\t\t\t} catch (InterruptedException ee) {\r\n \t\t\t\t\tee.printStackTrace();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\tusedPool.add(mp);\r\n \t\tmp.activate();\r\n \r\n \t\treturn mp;\r\n \t}", "private static Queue<ClosedShape> readDataFile(Scanner in) {\r\n Queue<ClosedShape> shapeQueue = new Queue<ClosedShape>();\r\n\r\n ArrayList<String[]> dataList = new ArrayList<>();\r\n while (in.hasNextLine()) {\r\n dataList.add(lineSplit(in.nextLine()));\r\n }\r\n\r\n for (int i = 0; i < dataList.size(); i++) {\r\n shapeQueue.enqueue(createShape(dataList.get(i)));\r\n }\r\n\r\n in.close();\r\n return shapeQueue;\r\n }", "public void getJobMixAndMakeProcesses(){\n if(jobType == 1){\n //type 1: there is only one process, with A=1 and B=C=0\n //since there is only one process, no the currentWord is 111%processSize\n processes.add(new process(1, 1, 0, 0, 111 % processSize));\n\n }else if(jobType ==2){\n //type 2: there are four processes, each with A=1, B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i, 1, 0, 0, (111*i) % processSize));\n }\n\n\n }else if(jobType ==3){\n //type 3: there are four processes, each with A=B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i,0, 0, 0, (111*i) % processSize));\n }\n\n }else{\n System.out.println(\"job type 4!!\");\n //process 1 with A=0.75, B=0.25, C=0\n processes.add(new process(1, 0.75, 0.25, 0, (111) % processSize));\n //process 2 with A=0.75, B= 0, C=0.25\n processes.add(new process(2, 0.75, 0, 0.25, (111*2) % processSize));\n //process 3 with A=0.75, B=0.125, C=0.125\n processes.add(new process(3, 0.75, 0.125, 0.125, (111*3) % processSize));\n //process 4 with A=0.5, B=0.125, C=0.125\n processes.add(new process(4, 0.5, 0.125, 0.125, (111*4) % processSize));\n\n }\n\n }", "public ConcurrentLinkedQueue<CollidingSection> getCollidingSectionsLoadedQueue() {\n\t\treturn collidingSectionsLoadedQueue;\n\t}", "public Schedule loadSchedules(File file) {\n\n return readWrite.loadSchedules(file, this);\n }", "public GetJobs() {\r\n\t\tsuper();\r\n\t}", "public String[] getJobsWaiting();", "@Override\n public D loadInBackground() {\n mData = SerializeUtils.readSerializableObject(mContext, mFilename);\n return mData;\n }", "private static void readFile(ArrayList<Process> processList, int availableRes[]){\n String processInfo;\n Scanner inputFile = openFile();\n if(inputFile == null){System.exit(-1);}\n\n initializeResArray(availableRes, inputFile);\n\n int processID = 0;\n while(inputFile.hasNextLine()){\n processInfo = inputFile.nextLine();\n Process toAdd = createProcessFromInput(processInfo);\n toAdd.setPID(processID);\n processList.add(toAdd);\n processID++;\n }\n inputFile.close();\n }", "@Override\n public ArrayList<RunnerThread> getRunners() {\n \tArrayList<RunnerThread> runners = new ArrayList<RunnerThread>();\n \ttry {\n \t\tString line = data.readLine();\n \t\twhile(line != null) {\n \t\t\tRunnerThread runner = getData(line);\n \t\t\trunners.add(runner); \n \t\t\tline = data.readLine();\n \t\t}\n \t}\n \tcatch (IOException e) {\n \t\tSystem.out.println(\"The following error occured while reading the file.\");\n \t\te.printStackTrace();\n \t\tSystem.exit(3);\n \t}\n\t\treturn runners;\n \t}", "private SgfReader load(File file)\n {\n \tFileInputStream in;\n \ttry {\n \t in = new FileInputStream(file);\n \t}\n \tcatch(FileNotFoundException e) {\n \t showError(\"File not found!\");\n \t return null;\n \t}\n \n \tSgfReader sgf;\n \ttry {\n \t sgf = new SgfReader(in);\n \t}\n \tcatch (SgfReader.SgfError e) {\n \t showError(\"Error reading SGF file:\\n \\\"\" + e.getMessage() + \"\\\"\");\n \t return null;\n \t}\n \t\n \treturn sgf;\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void processQueue() throws DatabaseException {\n\t\tString qs = \"from PendingTask pt order by pt.created\";\n\t\tGson gson = new Gson();\n\t\tSession session = null;\n\t\t\n\t\ttry {\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\tQuery q = session.createQuery(qs);\n\t\t\t\n\t\t\tfor (PendingTask pt : (List<PendingTask>) q.list()) {\n\t\t\t\tif (!runningTasks.contains(pt.getId())) {\n\t\t\t\t\tlog.info(\"Processing {}\", pt);\n\t\t\t\t\t\n\t\t\t\t\tif (PendingTask.TASK_UPDATE_PATH.equals(pt.getTask())) {\n\t\t\t\t\t\tif (Config.STORE_NODE_PATH) {\n\t\t\t\t\t\t\texecutor.execute(new PendingTaskThread(pt, new UpdatePathTask()));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (PendingTask.TASK_CHANGE_SECURITY.equals(pt.getTask())) {\n\t\t\t\t\t\tChangeSecurityParams params = gson.fromJson(pt.getParams(), ChangeSecurityParams.class);\n\t\t\t\t\t\texecutor.execute(new PendingTaskThread(pt, new ChangeSecurityTask(params)));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.warn(\"Unknown pending task: {}\", pt.getTask());\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlog.info(\"Task already running: {}\", pt);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (HibernateException e) {\n\t\t\tthrow new DatabaseException(e.getMessage(), e);\n\t\t} finally {\n\t\t\tHibernateUtil.close(session);\n\t\t}\n\t}", "public static void main (String[] args) throws FileNotFoundException {\t\n\t\t// declare local variables\n\t\tInteger time = new Integer(0);\n\t\tFile infile = new File(args[0]);\n parser = new Scanner(infile);\n int intValue = 0;\n Double priority = 0.0;\n Integer val = 0;\n\n String result = \"\"; \n int count = 0;\n \n // add the first 5 jobs\n while (count<5) {\n\t\t\t\ttoken = parser.next();\n\t\t\t\ttime = Integer.parseInt(token);\n\t\t\t\tintValue = time.intValue();\n\t\t\t\tpriority = 1.0/intValue;\n\t\t\t\tentry = new Entry<>(priority, time, 0);\n\t\t\t\tdata.add(entry);\n\t\t\t\tcount ++;\n\t\t}\n\t\t// if there is still jobs in the queue\n\t\twhile (!data.isEmpty()) {\n\t\t\t// remove the 1st job in the queue\n\t\t\tresult = result +\" \"+ data.remove();\n\n\t\t\t// update the age and priority of the jobs left in the queue\t\n\t\t\tfor (int i =0; i < data.size(); i++){\n\t\t\t\tupdateAge();\n\t\t\t\tif (data.get(i).getAge()>3) {\n\t\t\t\t\tdata.get(i).setPriority(data.get(i).getPriority() + 0.2);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t// rearrange the queue\n\t\t\tdata.siftDown(data.size()/2);\n\n\t\t\t// add another job\n\t\t\tif (parser.hasNext()) {\n\t\t\t\ttoken = parser.next();\n\t\t\t\ttime = Integer.parseInt(token);\n\t\t\t\tintValue = time.intValue();\n\t\t\t\tpriority = 1.0/intValue;\n\t\t\t\tentry = new Entry<>(priority, time, 0);\n\t\t\t\tdata.add(entry);\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t// 12, 35, 75, 250, 400, 1000, 600, 378, 957\n\t\tSystem.out.print(result);\n\t\tSystem.out.println();\n\t\t\n\t}", "public ArrayList<String> parseFile(String fileName) throws IOException {\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t\tFileInputStream inFile = null;\n\n\t\tinFile = new FileInputStream(mngr.getPath() + fileName);\n\t\tDataInputStream in = new DataInputStream(inFile);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n\t\tString strLine;\n\n\t\twhile ((strLine = reader.readLine()) != null && strLine.length() > 0) {\n\t\t\t// Print the content on the console\n\t\t\tparrsedArray.add(strLine);\n\t\t}\n\n\t\tinFile.close();\n\n\t\treturn parrsedArray;\n\n\t}", "public abstract List<C_result> processJob(C_request processing_cmd);", "public Process getProcessToRun() {\n if (readyQueue.isEmpty()) {\n return null;\n }\n if (readyQueue.get(0).remainingTime() == 0) {\n readyQueue.remove(0);\n }\n\n //now we need to age all the processes that don't get to run\n for(int i=0; i<readyQueue.size(); i++) {\n Process p = readyQueue.get(i);\n p.agingCounter++;\n if(p.agingCounter == TIME_TO_WAIT_BEFORE_AGING) {\n p.ageProcess(AMOUNT_TO_AGE);\n p.agingCounter = 0;\n }\n }\n Collections.sort(readyQueue, this);\n\n //return the process to run\n if(readyQueue.isEmpty()) {\n return null;\n }\n return readyQueue.get(0);\n }", "public void run() {\n Gson gson = new Gson();\n try {\n InputStream is = new FileInputStream(new File(filename));\n JsonReader reader = new JsonReader(new InputStreamReader(is));\n reader.setLenient(true);\n // Leggo la parentesi quadra aperta \"[\".\n reader.beginArray();\n while (reader.hasNext()) {\n String owner = null;\n List<Record> records = null;\n // Leggo la parentesi graffa aperta \"{\".\n reader.beginObject();\n while (reader.hasNext()) {\n String name = reader.nextName();\n if (name.equals(\"owner\")) {\n owner = reader.nextString();\n } else if (name.equals(\"records\")) {\n records = readRecords(reader);\n } else {reader.skipValue();}\n }\n // Leggo la parentesi graffa aperta \"}\".\n reader.endObject();\n // Inserisco nella coda condivisa il conto appena letto.\n queue.put(new Account(owner, records));\n }\n // Leggo la parentesi quadra chiusa \"]\".\n reader.endArray();\n reader.close();\n // Inserisco in coda gli oggetti poison per far terminare\n // i consumer.\n for (int i = 0; i < poison; i++) queue.put(new Account(null));\n } catch (Exception e) {\n System.err.println(\"Errore nel Producer: \" + e.getMessage());\n }\n finally {\n System.err.println(\"Producer terminato!\");\n }\n }", "public static void loadDatabase(){\n\t\ttry(BufferedReader reader = new BufferedReader(new FileReader(filePath))){\n\t\t\tfor(String line; (line = reader.readLine()) != null; ){\n\t\t\t\tString[] info = line.split(Pattern.quote(\"|\"));\n\t\t\t\tString path = info[0].trim();\n\t\t\t\tString fileID = info[1];\n\t\t\t\tInteger nOfChunks = Integer.parseInt(info[2]);\n\t\t\t\tPair<FileID, Integer> pair = new Pair<FileID, Integer>(new FileID(fileID), nOfChunks);\n\t\t\t\tPeer.fileList.put(path, pair);\n\t\t\t}\n\t\t\treader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*\n\t\t * LOAD THE CHUNK LIST\n\t\t */\n\t\ttry(BufferedReader reader = new BufferedReader(new FileReader(chunkPath))){\n\t\t\tfor(String line; (line = reader.readLine()) != null; ){\n\t\t\t\tString[] info = line.split(Pattern.quote(\"|\"));\n\t\t\t\tString fileID = info[0].trim();\n\t\t\t\tInteger chunkNo = Integer.parseInt(info[1]);\n\t\t\t\tInteger drd = Integer.parseInt(info[2]);\n\t\t\t\tInteger ard = Integer.parseInt(info[3]);\n\t\t\t\tChunkInfo ci = new ChunkInfo(fileID,chunkNo,drd,ard);\n\t\t\t\tPeer.chunks.add(ci);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private JobScheduler\n\t\t(String configfile)\n\t\tthrows IOException\n\t\t{\n\t\tlong now = System.currentTimeMillis();\n\t\tmyStartDateTime = now;\n\n\t\t// Parse configuration file.\n\t\tConfiguration config = new Configuration (configfile);\n\t\tmyClusterName = config.getClusterName();\n\t\tmyLog =\n\t\t\tnew PrintStreamLogger\n\t\t\t\t(new PrintStream\n\t\t\t\t\t(new FileOutputStream (config.getLogFile(), true),\n\t\t\t\t\t true));\n\t\tmyWebHost = config.getWebHost();\n\t\tmyWebPort = config.getWebPort();\n\t\tmySchedulerHost = config.getSchedulerHost();\n\t\tmySchedulerPort = config.getSchedulerPort();\n\t\tmyFrontendHost = config.getFrontendHost();\n\t\tmyJobTime = config.getJobTime();\n\t\tmyBackendCount = config.getBackendCount();\n\t\tmyBackendInfo = new BackendInfo [myBackendCount];\n\t\tfor (int i = 0; i < myBackendCount; ++ i)\n\t\t\t{\n\t\t\tBackendInfo backendinfo = config.getBackendInfo (i);\n\t\t\tmyNameToBackendMap.put (backendinfo.name, backendinfo);\n\t\t\tmyBackendInfo[i] = backendinfo;\n\t\t\t}\n\n\t\t// Log startup.\n\t\tmyLog.log (now, \"Started \" + Version.PJ_VERSION);\n\n\t\t// Set up shutdown hook.\n\t\tRuntime.getRuntime().addShutdownHook (new Thread()\n\t\t\t{\n\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\tshutdown();\n\t\t\t\t}\n\t\t\t});\n\n\t\t// Set up lease timer thread.\n\t\tmyLeaseTimerThread = new TimerThread();\n\t\tmyLeaseTimerThread.setDaemon (true);\n\t\tmyLeaseTimerThread.start();\n\n\t\t// Set up channel group.\n\t\tmyChannelGroup =\n\t\t\tnew ChannelGroup\n\t\t\t\t(new InetSocketAddress (mySchedulerHost, mySchedulerPort),\n\t\t\t\t myLog);\n\t\tmyLog.log (now, \"Job Scheduler at \" + myChannelGroup.listenAddress());\n\t\tmyChannelGroup.setConnectListener (new ConnectListener()\n\t\t\t{\n\t\t\tpublic void nearEndConnected\n\t\t\t\t(ChannelGroup theChannelGroup,\n\t\t\t\t Channel theChannel)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\tpublic void farEndConnected\n\t\t\t\t(ChannelGroup theChannelGroup,\n\t\t\t\t Channel theChannel)\n\t\t\t\t{\n\t\t\t\tcreateJob (theChannel);\n\t\t\t\t}\n\t\t\t});\n\n\t\t// Set up server for web interface.\n\t\tmyHttpServer =\n\t\t\tnew HttpServer (new InetSocketAddress (myWebHost, myWebPort), myLog)\n\t\t\t\t{\n\t\t\t\tprotected void process\n\t\t\t\t\t(HttpRequest request,\n\t\t\t\t\t HttpResponse response)\n\t\t\t\t\tthrows IOException\n\t\t\t\t\t{\n\t\t\t\t\tprocessHttpRequest (request, response);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\tmyLog.log (now, \"Web interface at \" + myHttpServer.getAddress());\n\n\t\t// Log backend nodes.\n\t\tfor (BackendInfo backend : myBackendInfo)\n\t\t\t{\n\t\t\tmyLog.log\n\t\t\t\t(now,\n\t\t\t\t \"Backend \" + backend.name + \" at \" + backend.host +\n\t\t\t\t\t\", \" + backend.totalCpus +\n\t\t\t\t\t\" CPU\" + (backend.totalCpus==1?\"\":\"s\"));\n\t\t\t}\n\n\t\t// Start accepting jobs.\n\t\tmyChannelGroup.startListening();\n\t\t}", "public ByteArrayInputStream loadFile(MultipartFile file) {\n\t\tlong heapSize = Runtime.getRuntime().totalMemory(); \n\n\t\t// Get maximum size of heap in bytes. The heap cannot grow beyond this size.// Any attempt will result in an OutOfMemoryException.\n\t\tlong heapMaxSize = Runtime.getRuntime().maxMemory();\n\n\t\t // Get amount of free memory within the heap in bytes. This size will increase // after garbage collection and decrease as new objects are created.\n\t\tlong heapFreeSize = Runtime.getRuntime().freeMemory(); \n\t\t\n\t\tSystem.out.println(\"heap Size = \"+heapSize);\n\t\tSystem.out.println(\"heap max size = \"+heapMaxSize);\n\t\tSystem.out.println(\"heap free size = \"+heapFreeSize);\n\n\t\tArrayList<MaterialData> material_datas = new ArrayList<MaterialData>();\n\n//\t\t 1. Read all data convert them into material object\n\t\ttry {\n\t\t\tmaterial_datas = parseExcelFile(file.getInputStream());\n//\t\t\t\tSystem.out.println(lst_data.toString());\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\t\t 2. Process and Store the result data into output excel \n\t\ttry {\n\t\t\tByteArrayInputStream in = ClassificationDataToExcel(material_datas);\n\t\t\treturn in;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\n\t}", "public interface FileParserPool<T> extends AutoCloseable {\n\n ListenableFuture<T> getManifest(\n BuckEventBus buckEventBus,\n Cell cell,\n Watchman watchman,\n Path parseFile,\n ListeningExecutorService executorService);\n}", "public java.lang.Integer getJobsInQueue() {\n return jobsInQueue;\n }", "public void loadFromSortedFile(String file) throws Exception{\n if(file == null){\n throw new Exception(\"file is null\");\n }\n try{\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n\n String s = null;\n while((s = br.readLine()) != null) {\n QueryItem qi = null;\n try{\n qi = new QueryItem(s);\n }catch(Exception e){\n System.out.println(\"[\"+s+\"] load error\");\n continue;\n }\n updateMobile(qi);\n }\n\n br.close();\n fr.close();\n }catch(IOException e){\n e.printStackTrace();\n }\n System.out.println(\"load finished\");\n }", "public List<PGPSecretKeyRing> load(File file)\r\n\t\t\tthrows IOException, PGPException {\r\n\t\tInputStream stream = null;\r\n\t\ttry {\r\n\t\t\tstream = new BufferedInputStream(new FileInputStream(file), 0x1000);\r\n\t\t\treturn load(stream);\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tstream.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@ServiceActivator\r\n public Map<String, String> manageProcessDataFile(@Payload File file) {\r\n log.debug(\"~int.manageProcessDataFile() : Invoked.\");\r\n log.trace(\"~int.manageProcessDataFile() : Thread '\" + Thread.currentThread().getName() + \"'.\");\r\n\r\n String fileCanonicalPath = null;\r\n try {\r\n fileCanonicalPath = file.getCanonicalPath();\r\n log.debug(\"~int.manageProcessDataFile() : File canonical path '\" + fileCanonicalPath + \"'\");\r\n } catch (IOException e) {\r\n final String errorMessage = \"IO Exception retrieving file canonical path : '\" + e.getMessage() + \"'\";\r\n log.warn(\"~int.manageProcessDataFile() : \" + errorMessage);\r\n e.printStackTrace();\r\n throw new UnsupportedOperationException(errorMessage);\r\n }\r\n\r\n /*\r\n * Read in the process data file contents\r\n */\r\n Scanner scanner = null;\r\n try {\r\n scanner = new Scanner(file);\r\n } catch (FileNotFoundException fileNotFoundException) {\r\n final String errorMessage = \"Failed to read file '\" + file.toString() + \"' - error '\" + fileNotFoundException.getMessage() + \"'\";\r\n log.fatal(\"~int.manageProcessDataFile() : \" + errorMessage);\r\n fileNotFoundException.printStackTrace();\r\n throw new UnsupportedOperationException(errorMessage);\r\n }\r\n\r\n final StringBuilder fileContents = new StringBuilder((int) file.length());\r\n String procFileContents = null;\r\n try {\r\n while(scanner.hasNextLine()) {\r\n fileContents.append(scanner.nextLine());\r\n }\r\n procFileContents = fileContents.toString();\r\n log.debug(\"~int.manageProcessDataFile() : Contents '\" + procFileContents + \"'\");\r\n } finally {\r\n scanner.close();\r\n }\r\n\r\n /*\r\n * Process the contents of the process data file then delete the file.\r\n */\r\n final Map<String, String> processInfo = new HashMap<String, String>(2);\r\n if (procFileContents != null) {\r\n String appManagerId = null;\r\n String processId = null;\r\n\r\n if (procFileContents.contains(DELIMETER)) {\r\n if (procFileContents.startsWith(DELIMETER)) {\r\n log.error(\"~int.manageProcessDataFile() : Cannot determine AppManagerId from process data file content.\");\r\n processId = procFileContents.split(SPLITTER)[1];\r\n } else if (procFileContents.endsWith(DELIMETER)) {\r\n log.error(\"~int.manageProcessDataFile() : Cannot determine ProcessId from process data file content.\");\r\n appManagerId = procFileContents.split(SPLITTER)[0];\r\n } else {\r\n final String[] procData = procFileContents.split(SPLITTER);\r\n appManagerId = procData[0];\r\n processId = procData[1];\r\n }\r\n } else {\r\n log.error(\"~int.manageProcessDataFile() : Cannot determine AppManagerId or ProcessId from process data file content.\");\r\n }\r\n\r\n if (appManagerId != null)\r\n processInfo.put(PROCESS_INFO_APP_MANAGER_ID, appManagerId);\r\n if (processId != null)\r\n processInfo.put(PROCESS_INFO_PROCESS_ID, processId);\r\n\r\n log.debug(\"~int.manageProcessDataFile() : Deleting process data file\");\r\n // delete the file as it's no longer required\r\n try {\r\n final FileSystemManager fileSystemManager = VFS.getManager();\r\n final FileObject fileObject = fileSystemManager.resolveFile(fileCanonicalPath);\r\n fileObject.delete(Selectors.SELECT_SELF);\r\n } catch (FileSystemException e) {\r\n log.warn(\"~int.manageProcessDataFile() : FS Exception during process data file deletion : '\" + e.getMessage() + \"'\");\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n /*\r\n * Determine if overall success and persist the status (if there's enough information to do so). \r\n */\r\n boolean processingFailure = false;\r\n if (processInfo.containsKey(PROCESS_INFO_APP_MANAGER_ID)) {\r\n final long appManagerId = new Long(processInfo.get(PROCESS_INFO_APP_MANAGER_ID));\r\n\r\n String statusMessage = null;\r\n String level = null;\r\n\r\n final String processId = processInfo.get(PROCESS_INFO_PROCESS_ID); \r\n if (processId == null) {\r\n statusMessage = \"No process id was found in process data file - simulation failure!\";\r\n processingFailure = true;\r\n //level = RunStatus.ERROR_PREFIX;\r\n } else {\r\n //appManagerDAO.saveSimulationProcessId(appManagerId, processId);\r\n\r\n statusMessage = \"Process data file read and processed successfully\";\r\n //level = RunStatus.DEBUG_PREFIX;\r\n }\r\n //final RunStatus runStatus = new RunStatus(appManagerId, null, level, statusMessage);\r\n //appManagerDAO.addStatus(runStatus);\r\n } else {\r\n // can't even persist a status update\r\n processingFailure = true;\r\n }\r\n\r\n if (processingFailure) {\r\n /*\r\n * TODO : Improve failure recovery procedure, e.g...\r\n * 1) Return VRE_INFO or VRE_OUTPUT?!\r\n * 2) Remove ~/vre_run/<port>/<app manager id>\r\n */\r\n final String errorMessage = \"Simulation processing failure problem\";\r\n log.error(\"~int.manageProcessDataFile() : \" + errorMessage);\r\n }\r\n\r\n return processInfo;\r\n }", "public void parse(final Path path) {\n try (FileChannel fileChannel = FileChannel.open(path, StandardOpenOption.READ)) {\n // map class file to the memory\n // by choosing big endian, high order bytes must be put to the buffer before low order bytes\n ByteBuffer byteBuffer = fileChannel.map(FileChannel.MapMode.READ_ONLY, 0, fileChannel.size())\n .order(ByteOrder.BIG_ENDIAN);\n System.out.printf(\"Classfile %s\\n\", path.toString());\n parseConstantPool(byteBuffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void loadWorkflow(String filename);", "private List<DiscoveredPrinter> load() {\n List<DiscoveredPrinter> printers = new ArrayList<>();\n if (!mCacheFile.exists()) {\n return printers;\n }\n\n try (JsonReader reader = new JsonReader(new BufferedReader(new FileReader(mCacheFile)))) {\n reader.beginObject();\n while (reader.hasNext()) {\n String itemName = reader.nextName();\n if (PRINTER_LIST_NAMES.contains(itemName)) {\n reader.beginArray();\n while (reader.hasNext()) {\n printers.add(new DiscoveredPrinter(reader));\n }\n reader.endArray();\n }\n }\n reader.endObject();\n } catch (IllegalStateException | IOException ignored) {\n Log.w(TAG, \"Error while loading from \" + mCacheFile, ignored);\n }\n if (DEBUG) Log.d(TAG, \"Loaded size=\" + printers.size() + \" from \" + mCacheFile);\n return printers;\n }", "@Override\n public void run() {\n try {\n File file;\n while ((file = queue.poll(100, TimeUnit.MILLISECONDS)) != null) {\n BufferedReader reader = new BufferedReader(new FileReader(file));\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.contains(searchString)) {\n // Synchronization requires because of many threads are writing into results.\n synchronized (results) {\n results.add(file.getAbsolutePath());\n break;\n }\n }\n }\n }\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n }", "public static Map<String, Integer> getStartingPositions(File file)\n\t\t\tthrows IOException, FileNotFoundException {\n\t\tMap<String, Integer> startPositions = new HashMap<String, Integer>();\n\t\ttry {\n\t\t\tString line;\n\t\t\tBufferedReader in;\n\t\t\tString extension = PdbHelper.getFileExtension(file);\n\t\t\tif (extension.equals(\"gz\")) {\n\t\t\t\tin = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tnew GZIPInputStream(new FileInputStream(file))));\n\t\t\t} else {\n\t\t\t\tin = new BufferedReader(new FileReader(file));\n\t\t\t}\n\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tif (line.startsWith(\"DBREF \") || line.startsWith(\"DBREF1\")) {\n\t\t\t\t\tString chainLabel = line.substring(13 - 1, 13);\n\t\t\t\t\tint seqBegin = Integer.parseInt(line.substring(15 - 1, 18)\n\t\t\t\t\t\t\t.trim());\n\t\t\t\t\tstartPositions.put(chainLabel, seqBegin);\n\t\t\t\t\tif (line.startsWith(\"SEQADV \")) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn startPositions;\n\t}", "private Stream<ProcessHandle> getProcesses() {\n return ProcessHandle.allProcesses();\n }", "private static List<Employee> readWorkers(int arg) {\r\n\t\treturn WorkersLoader.readAllEmployyes(arg);\r\n\t}", "ITaskFactory<?> load(String classname);", "public List<MediaSessionCompat.QueueItem> getQueue() {\n }", "public void parseFile(String fileName) {\n LineIterator it = null;\n try {\n it = FileUtils.lineIterator(new File(fileName), \"UTF-8\");\n while (it.hasNext()) {\n String line = it.nextLine();\n Runnable task = () -> sendEventsToSaveInDb(line);\n executor.submit(task);\n }\n } catch (IOException e) {\n logger.error(\"error while reading file : \", e);\n System.exit(1);\n } finally {\n LineIterator.closeQuietly(it);\n executor.shutdown();\n try {\n executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);\n saveEventsInBatch(true);\n } catch (InterruptedException e) {\n logger.error(\" exception while waiting for termination \", e);\n }\n System.exit(0);\n }\n }", "public ArrayList<Task> load() {\n assert tasks != null : \"tasks cannot be null\";\n try {\n File myFile = new File(\"duke.txt\");\n myFile.createNewFile();\n decideTaskType(myFile);\n } catch (IOException e) {\n System.out.println(\"An error occurred\");\n e.printStackTrace();\n }\n return tasks;\n }", "@Override\n\tpublic void run() {\n\t\tIterable<Page> allPages = new Pages(this.numPages, this.fileName);\n\t\tfor (Page pg : allPages) {\n\t\t\ttry {\n\t\t\t\tqueue.put(pg);\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\tfor(int i=0;i<this.numThread;i++){\n\t\t\ttry {\n\t\t\t\tqueue.put(new PoisonPill());\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}", "private void process(String file, LinkedList<String> ll) {\r\n \ttry {\r\n \t\tFile currFile = openFile(file);\r\n \t\tStringBuilder sb;\r\n\r\n \t\tif (currFile == null) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tBufferedReader br = new BufferedReader(new FileReader(currFile));\r\n \t\tString line = null;\r\n \t\twhile ((line = br.readLine()) != null) {\r\n \t\t\tint length = line.length();\r\n \t\t\tif (length == 0) {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tint index = 0;\r\n \t\t\tLinkedList<String> newLL;\r\n \t\t\twhile (index < length && line.charAt(index) == ' ') {\r\n \t\t\t\t++index;\r\n \t\t\t}\r\n \t\t\tif (index > length-8 || line.substring(index, index+8).compareTo(\"#include\") != 0) {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tindex += 8;\r\n \t\t\twhile (line.charAt(index) == ' ') {\r\n \t\t\t\t++index;\r\n \t\t\t}\r\n \t\t\tif (line.charAt(index) != '\"') {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tindex++;\r\n \t\t\tint len = line.length();\r\n \t\t\tsb = new StringBuilder();\r\n \t\t\twhile (index < len) {\r\n \t\t\t\tif (line.charAt(index) == '\"') {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\tsb.append(line.charAt(index));\r\n \t\t\t\t++index;\r\n \t\t\t}\r\n \t\t\tString currName = sb.toString();\r\n \t\t\tll.add(currName);\r\n \t\t\tif (hashM.containsKey(currName)) {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tnewLL = new LinkedList<String>();\r\n \t\t\thashM.put(currName, newLL);\r\n \t\t\tworkQueue.add(currName);\r\n \t\t}\r\n \t}\r\n \tcatch (Exception x) {\r\n \t\tx.printStackTrace();\r\n \t}\r\n }", "public ArrayList<Task> loadData() throws IOException {\n DateTimeFormatter validFormat = DateTimeFormatter.ofPattern(\"MMM dd yyyy HH:mm\");\n ArrayList<Task> orderList = new ArrayList<>();\n\n try {\n File dataStorage = new File(filePath);\n Scanner s = new Scanner(dataStorage);\n while (s.hasNext()) {\n String curr = s.nextLine();\n String[] currTask = curr.split(\" \\\\| \");\n assert currTask.length >= 3;\n Boolean isDone = currTask[1].equals(\"1\");\n switch (currTask[0]) {\n case \"T\":\n orderList.add(new Todo(currTask[2], isDone));\n break;\n case \"D\":\n orderList.add(new Deadline(currTask[2],\n LocalDateTime.parse(currTask[3], validFormat), isDone));\n break;\n case \"E\":\n orderList.add(new Event(currTask[2],\n LocalDateTime.parse(currTask[3], validFormat), isDone));\n break;\n }\n }\n } catch (FileNotFoundException e) {\n if (new File(\"data\").mkdir()) {\n System.out.println(\"folder data does not exist yet.\");\n } else if (new File(filePath).createNewFile()) {\n System.out.println(\"File duke.txt does not exist yet.\");\n }\n }\n return orderList;\n\n }", "@Override\n public Map<String, PostList> getPostPack(int file) {\n CachedPostPack c = get(file);\n\n if (c == null) {\n return null;\n }\n\n return c.getPostPack();\n }", "private static List<Question> loadQuestions(String filePath) {\n List<Question> questions = new ArrayList<Question>();\n FileReader in;\n try {\n in = new FileReader(new File(filePath));\n BufferedReader bufferIn = new BufferedReader(in);\n\n String quizQuestion;\n while ((quizQuestion = bufferIn.readLine()) != null) {\n Question q = new Question();\n q.setQuestion(quizQuestion);\n questions.add(q);\n }\n bufferIn.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return questions;\n }", "public ArrayList<Task> loadData() throws FileNotFoundException {\n ArrayList<Task> dukeList = new ArrayList<>();\n Scanner sc = new Scanner(file);\n Task t;\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n String[] splitBySpace = line.split(\" \");\n String[] splitBySlash;\n String command = splitBySpace[0];\n\n if (command.equals(\"D\")) {\n splitBySlash = line.split(\"/\");\n\n //Splits String the second time to get the description of deadline task\n String[] splitBySpace2 = splitBySlash[0].split(\" \");\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace2.length; i++) {\n getDesc = getDesc + splitBySpace2[i] + \" \";\n }\n\n t = new Deadline(getDesc.trim(), splitBySlash[1]);\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n } else if (command.equals(\"E\")) {\n splitBySlash = line.split(\"/\");\n\n //Splits String the second time to get the description of event task\n String[] splitBySpace2 = splitBySlash[0].split(\" \");\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace2.length; i++) {\n getDesc = getDesc + splitBySpace2[i] + \" \";\n }\n\n t = new Event(getDesc.trim(), splitBySlash[1]);\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n } else {\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace.length; i++) {\n getDesc = getDesc + splitBySpace[i] + \" \";\n }\n\n t = new ToDo(getDesc.trim());\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n }\n }\n\n return dukeList;\n }", "public static ArrayList<Task> deser() {\n ArrayList<Task> taskList; // declaring the tasks ArrayList variable\n taskList = new ArrayList<Task>(); // giving this object a temporary pointer\n try {\n FileInputStream fileIn = new FileInputStream(\"taskList.ser\"); // searching for the file to deserialize\n ObjectInputStream in = new ObjectInputStream(fileIn); // object used for deserializing \n taskList = (ArrayList) in.readObject(); // reading the serialized ArrayList object and assigning it to tasks\n in.close(); // closing the object for deserializing\n fileIn.close(); // closing the file thats being read\n } catch (FileNotFoundException fnfe) { // if the file cannot be found\n // System.out.println(\"You have not created any tasks yet.\"); // tells the user they have not created any tasks\n } catch (IOException ioe) { // if an IO exception gets thrown\n // System.err.println(\"Java IO Exception: \" + ioe); // prints an error message\n } catch (ClassNotFoundException cnfe) { // if the class is not recognized\n // System.err.println(\"Class of object not found. Cannot deserialize.\"); // prints an error \n }\n return taskList;\n }", "public interface ReadJob {\n\n Map<String, Object> getSharedNodesInfo();\n\n String getSharedKey(String value);\n\n void setSharedNodesInfo(Map<String, Object> sharedNodesInfo);\n\n String[] getShareNodeIds();\n}", "public static void main(String[] args) \n\t{\n\t\tString fileName = args[1];\n \n\t\t// The number of threads from command line\n\t\tint Th=Integer.parseInt(args[0]);\n\t\t\n Queue queue = new LinkedList();\n \n //push tasks from the file\n queue=pushTask(fileName);\n \n //check if the queue is empty opr not\n System.out.println(\"Output of queue.isEmpty():\"+queue.isEmpty());\n \n //create a pool of threads\n ExecutorService executor = Executors.newFixedThreadPool(Th);\n \n //run the jobs as read from the file\n \n long startTime = System.currentTimeMillis(); //store start time\n \n //System.out.println(System.currentTimeMillis());\n \n while(queue.isEmpty()==false)\n {\n //pop tasks one by one and feed it into the executer service\n Runnable worker = new LocalThread(popTask(queue));\n executor.execute(worker);\n //System.out.println(queue.isEmpty());\n }\n \n executor.shutdown();\t\t//shutdown executor service\n \n while (!executor.isTerminated()); //wait till the executor service ends\n \n long estimatedTime = System.currentTimeMillis() - startTime; //calculate the total time taken\n //System.out.println(System.currentTimeMillis());\n \n //print the time \n System.out.println(\"Finished all \"+ Th + \" threads in time:\" + estimatedTime + \"ms\");//:\"+ watch.getTotalTimeMillis() + \"ms or \"+ watch.getTotalTimeMillis()/1000.0 +\"s\");\n \n\t}", "public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public FilesInputStreamLoad readFile() throws ArcException {\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\tFile toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\tFilesInputStreamLoad filesInputStreamLoadReturned = null;\r\n\ttry {\r\n\t\tfilesInputStreamLoadReturned = new FilesInputStreamLoad (toRead);\r\n\t} catch (IOException ioReadException) {\r\n\t\tthrow new ArcException(ioReadException, ArcExceptionMessage.FILE_READ_FAILED, toRead);\r\n\t}\r\n\treturn filesInputStreamLoadReturned;\r\n }", "public String[] ReadAllFileLines_FromClassPath(String sFileName) {\n String[] satemp = null;\n\n try {\n InputStream is = getClass().getClassLoader().getResourceAsStream(sFileName);\n satemp = getStringArrayFromInputStream(is);\n\n } catch (Exception e) {\n satemp = null;\n throw new Exception(\"ReadAllFileLines_FromClassPath : \" + e.toString());\n } finally {\n return satemp;\n }\n }", "public Process start() {\n\t\tif (ioQueue.isEmpty()) {\n\t\t\tcurrentProcess = null;\n\t\t\tgui.setIoActive(null);\n\t\t}else{\n\t\t\tcurrentProcess = (Process) ioQueue.removeNext();\n\t\t\tgui.setIoActive(currentProcess);\n\t\t}\n\t\treturn currentProcess;\n\t}", "private DistributedJobParameter[] deserializeJobParameters(String runnableID, byte[] rawdata) {\n //\n // mClassLoader.set(mTaskContextMap.get(mCurrentRunnableID).classLoader);\n ClassLoader cloader = mTaskCache.get(runnableID).classLoader;\n Log.i(TAG, \"ClassLoaderWrapper now is: \" + cloader.toString());\n //\n ObjectInputStream objInstream;\n Object obj = null;\n try {\n objInstream = new ClassloaderObjectInputStream(\n new ByteArrayInputStream(rawdata),\n cloader);\n obj = objInstream.readObject();\n objInstream.close();\n }\n catch (OptionalDataException ex) {\n Logger.getLogger(JobCenter.class.getName()).log(Level.SEVERE, null, ex);\n }\n catch (ClassNotFoundException ex) {\n Logger.getLogger(JobCenter.class.getName()).log(Level.SEVERE, null, ex);\n }\n catch (IOException ex) {\n Logger.getLogger(JobCenter.class.getName()).log(Level.SEVERE, null, ex);\n }\n return (DistributedJobParameter[]) obj;\n }", "public JPClass getParsedClass(File f) throws Exception;", "public Collection<FastqSequence> getSequences() throws IOException{\n\t\tif(this.sequences!=null){\n\t\treturn this.sequences;\n\t\t}\n\t\telse{this.sequences=this.parse(fastqFile); return this.sequences;}\n\t}", "public static Enumeration<URL> loadFileUsingClassLoaders(String filename) throws IOException {\n\n /*\n * TODO: perhaps desirable to move this code to\n * org.apache.wink.common.internal.utils.ClassUtils?\n */\n\n logger.trace(\"Searching for {} using thread context classloader.\", filename); //$NON-NLS-1$\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n Enumeration<URL> resources = loadFileUsingClassLoader(classLoader, filename);\n if (resources.hasMoreElements()) {\n return resources;\n }\n\n logger.trace(\"Searching for {} using current classloader.\", filename); //$NON-NLS-1$\n classLoader = FileLoader.class.getClassLoader();\n resources = loadFileUsingClassLoader(classLoader, filename);\n if (resources.hasMoreElements()) {\n return resources;\n }\n\n logger.trace(\"Searching for {} using system classloader.\", filename); //$NON-NLS-1$\n return ClassLoader.getSystemResources(filename);\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic static ArrayList<Message> loadMessages(String filename)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(new File(filename)));\r\n\t\t\tArrayList<Message> messages = (ArrayList<Message>)ois.readObject();\r\n\t\t\tois.close();\r\n\t\t\tSystem.out.println(\"Loaded messages from disk: \" + messages.size());\r\n\t\t\treturn messages;\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e2) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"No locally saved \"+filename+\" - creating a new one: \" + e2.getMessage());\r\n\t\t}\r\n\t\tcatch (IOException e2) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"IO Error: \" + e2.getMessage());\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e1) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"This copy of the program is missing some files: \" + e1.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static List<Job> findByQueueName(String queueName) {\n\t\treturn getPersistence().findByQueueName(queueName);\n\t}", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }", "private Process findClosestProcess(){\n\n //Ensure that the process queue is sorted by process ID for traversal.\n Collections.sort(this.unfinishedJobs,new PIDComparator());\n\n //If there was no process currently executing on the CPU,\n //the next process is simply the process queue's first item.\n if(this.activeJob == null){\n if(this.unfinishedJobs.size() > 0){\n return this.unfinishedJobs.get(0);\n } \n } else {\n\n //Find the first process with a higher process ID than the currently executing\n //process and set it as the new process to execute next.\n for(int i = 0; i < this.unfinishedJobs.size(); i++){\n Process temp = this.unfinishedJobs.get(i);\n if(temp.getPID() > this.activeJob.getPID()){\n return temp;\n }\n }\n\n //If there are no processes with a higher process ID than the current process, use the \n //process queue's first item as a default.\n if(this.unfinishedJobs.size() > 0){\n return this.unfinishedJobs.get(0);\n }\n }\n return null;\n }" ]
[ "0.72643274", "0.6114993", "0.59150755", "0.58837956", "0.584229", "0.5829511", "0.571936", "0.57192236", "0.5689709", "0.56415826", "0.561541", "0.5605079", "0.55744004", "0.5541271", "0.5533303", "0.5512496", "0.5504096", "0.5491552", "0.54557294", "0.5434235", "0.54312617", "0.54307014", "0.52688086", "0.5259381", "0.5246605", "0.5233882", "0.520075", "0.51866806", "0.5181407", "0.514202", "0.51164645", "0.50913364", "0.5090038", "0.5077889", "0.5061639", "0.50468075", "0.5017897", "0.5000479", "0.49954736", "0.49867004", "0.49819368", "0.49579677", "0.49239004", "0.49119845", "0.49113503", "0.49100003", "0.48925123", "0.4868516", "0.4862821", "0.48621485", "0.48563704", "0.48528337", "0.48521423", "0.48460555", "0.48300672", "0.48258835", "0.482404", "0.481125", "0.48078516", "0.47951338", "0.4789276", "0.47798786", "0.47797802", "0.47570133", "0.47495133", "0.47310373", "0.47300696", "0.4724277", "0.47192675", "0.471627", "0.47123733", "0.47035953", "0.470346", "0.4695147", "0.46868002", "0.4686734", "0.46764413", "0.46678832", "0.46660504", "0.46642274", "0.4664019", "0.46597356", "0.46574062", "0.46534672", "0.46524593", "0.46519792", "0.46479917", "0.4642678", "0.46295288", "0.4622027", "0.46195012", "0.4612918", "0.46105704", "0.46085498", "0.46077922", "0.4600565", "0.45939466", "0.45919427", "0.45914817", "0.4591244" ]
0.7698448
0
Add an item to the Mobile Service Table
public BookUser addItemInTable(BookUser item) throws ExecutionException, InterruptedException { BookUser entity = Azure.mbook.insert(item).get(); return entity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "private void addDeviceItem() throws SQLException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry{\r\n\t\t\tnameDevice = edtNameDevice.getText().toString().trim();\r\n\t\t\tportDevice = Integer.parseInt(edtPortDevice.getText().toString().trim());\r\n\t\t\troomID = getIntent().getExtras().getInt(\"room_id\");\r\n\t\t\t\r\n\t\t\tDeviceItem item = new DeviceItem(roomID, nameDevice, typeDevice, portDevice, statusDevice);\r\n\t\t\tDeviceItemController.getInstance(AddDeviceItemActivity.this).createDeviceItem(item);\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tToast.makeText(AddDeviceItemActivity.this, \"Add device item error. Please verify your device infomations!\", Toast.LENGTH_SHORT).show();\r\n\t\t}\r\n\t}", "void addItem(DataRecord record);", "void add(Item item);", "public void addItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n\n db.insert(TABLE_NAME, null, values); //Insert query to store the record in the database\n db.close();\n\n }", "public abstract void addItem(AbstractItemAPI item);", "public void serviceAdded(String serviceID, Remote service, List<?> itemList);", "public void addItems(String name, String mobile){\n\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\n\t\tContentValues values = new ContentValues();\n\n\t\tvalues.put(KEY_NAME, name);\n\t\tvalues.put(KEY_PRICE, mobile);\n\n\t\tlong id = db.insert(TABLE_SHOP, null, values); // insert to 1st row\n\t\tdb.close(); // Closing database connection\n\n\t\tLog.d(TAG, \"New products inserted into sqlite: \" + id);\n\n\t}", "@RequestMapping(method=RequestMethod.POST, value = \"/item/{id}\", produces = \"application/json\")\n public void addItem(@RequestBody Item itemToAdd)\n {\n this.itemRepository.addItem(itemToAdd);\n }", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public void insertItem(Item item) {\n SQLiteDatabase db = DataBaseManager.getInstance().openDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, item.getName());\n values.put(KEY_ARRAY_ID, item.getArrayId());\n values.put(KEY_DESCRIPTION, item.getDescription());\n\n // Inserting Row\n db.insert(TABLE_ITEMS, null, values);\n DataBaseManager.getInstance().closeDatabase();\n }", "public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Mobile Customer Add()\");\n\t}", "public boolean addItem(Item item) throws RemoteException, ClassNotFoundException, SQLException {\n Connection conn = DBConnection.getConnection();\n PreparedStatement stm = conn.prepareStatement(\"Insert into Item values(?,?,?,?)\");\n Object[] itemData = {item.getCode(), item.getDescription(), item.getUnitPrice(), item.getQtyOnHand()};\n for (int i = 0; i < itemData.length; i++) {\n stm.setObject(i + 1, itemData[i]);\n }\n return stm.executeUpdate() > 0;\n }", "public void addItem(SoldItem item) {\n\n items.add(item);\n log.debug(\"Added \" + item.getName() + \" quantity of \" + item.getQuantity());\n\n }", "public int addItem(Item i);", "public void addItem(String item){\n adapter.add(item);\n }", "public boolean add(Type item);", "public void add(IMobile mEntity) {\r\n\t\tthis.mEntity.add(mEntity);\r\n\t}", "public void addRow(Spedizione spedizione){\n spedizioni.add(spedizione);\n fireTableChanged(new TableModelEvent(this));\n }", "public void addToSale(ItemDTO item, int quantity){\n this.saleInfo.addItem(item, quantity);\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}", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "InvoiceItem addInvoiceItem(InvoiceItem invoiceItem);", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "@GET\n @Path(\"/addItem\")\n public Response addItemToTable(\n @QueryParam(\"tableName\") String tableName,\n @QueryParam(\"item\") String item\n ) throws UnsupportedEncodingException {\n\n List<String> missing = new ArrayList<String>();\n if(tableName == null) missing.add(\"table name\");\n if( item == null) missing.add(\"Item object\");\n\n if(!missing.isEmpty()){\n String msg = \"Missing parameters: \" + missing.toString();\n System.out.println(msg);\n Logging.getLOG().debug(\"user trying to add item, Missing parameters: \" + missing.toString());\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(msg)\n .build();\n }\n\n start();\n\n if(!tables.contains(tableName)){\n String msg = \"table not found\";\n System.out.println(msg);\n Logging.getLOG().debug(\"user trying to add item, doesn't contain table: \" + tableName);\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(msg)\n .build();\n }\n\n String decodedJSON = URLDecoder.decode(item, \"UTF-8\");\n Item row = new Item().fromJSON(decodedJSON);\n\n if(tableName.equals(ALGORITHMS_TABLE)){\n AlgorithmsTable algorithmsTable = AlgorithmsTable.openTable(ALGORITHMS_TABLE, dbConnector);\n\n if(algorithmsTable.validItem(row)){\n boolean status = algorithmsTable.put(row);\n if(status) {\n Logging.getLOG().debug(\"user trying to add item to algorithms, item: \" + item);\n return Response.ok(\"Success\").build();\n }\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(\"Unable to add to \" + ALGORITHMS_TABLE + \" table\")\n .build();\n }\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(\"invalid Item entered, does not meet the requirements for inserting value to \"\n + ALGORITHMS_TABLE + \" table\")\n .build();\n }\n else if(tableName.equals(DataStructuresTable.getTableName())){\n if(dataStructuresTable.validItem(row)){\n boolean status = dataStructuresTable.put(row);\n if(status) {\n Logging.getLOG().debug(\"user trying to add item to data structures, item: \" + item);\n return Response.ok(\"Success\").build();\n }\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(\"Unable to add to \" + DataStructuresTable.getTableName() + \" table\")\n .build();\n }\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(\"invalid Item entered, does not meet the requirements for inserting value to \"\n + DataStructuresTable.getTableName() + \" table\")\n .build();\n }\n else if(tableName.equals(SoftwareDesignTable.getTableName())){\n if(softwareDesignTable.validItem(row)){ //still need to create this function in the table class\n boolean status = softwareDesignTable.put(row); //fix attributes (i believe that is the issue with this 'put' function)\n\n if(status) {\n Logging.getLOG().debug(\"user trying to add item to software design, item: \" + item);\n return Response.ok(\"Success\").build();\n }\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(\"Unable to add to \" + SoftwareDesignTable.getTableName() + \" table\")\n .build();\n }\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(\"invalid Item entered, does not meet the requirements for inserting value to \"\n + SoftwareDesignTable.getTableName() + \" table\")\n .build();\n }\n\n System.out.println(\"Not a valid item\");\n Logging.getLOG().debug(\"user trying to add item, item not valid \");\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(\"wrong\")\n .build();\n }", "public void insert(Service servico){\n Database.servico.add(servico);\n }", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "void addCpItem(ICpItem item);", "public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }", "@Override\r\n\tpublic void addItem(Items item) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t List<Items> allItems = new ArrayList<Items>();\r\n\t\t int flag=0;\r\n\t\t try\r\n\t\t {\r\n\t\t\t allItems = session.createQuery(\"from Items\").list();\r\n\t\t\t for (Items item1 : allItems) {\r\n\t\t\t\t\tif(item1.getUserName().equals(item.getUserName()) && item1.getItemName().equals(item.getItemName())){\r\n\t\t\t\t\t\tflag=1;\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You need to choose other name for this task\", \"Error\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t break;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t} \r\n\t\t\t if(flag==0)\r\n\t\t\t {\r\n\t\t\t\t session.beginTransaction();\r\n\t\t\t\t session.save(item);\r\n\t\t\t\t session.getTransaction().commit();\r\n\t\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 }\t\r\n\t}", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "public void store(Item item) {\n this.items.add(item);\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public String addItem(Item item){\n EntityManager em = emf.createEntityManager();\n try{\n utx.begin();\n em.joinTransaction();\n for(Tag tag : item.getTags()) {\n tag.incrementRefCount();\n tag.getItems().add(item);\n em.merge(tag);\n }\n em.persist(item);\n utx.commit();\n // index item\n if(bDebug) System.out.println(\"\\n***Item id of new item is : \" + item.getItemID());\n indexItem(new IndexDocument(item));\n \n } catch(Exception exe){\n try {\n utx.rollback();\n } catch (Exception e) {}\n throw new RuntimeException(\"Error persisting item\", exe);\n } finally {\n em.close();\n }\n return item.getItemID();\n }", "@RequestMapping(value = \"/add\")\n\tpublic String addItem(Model model) {\n\t\tmodel.addAttribute(\"item\", new Item());\n\t\tmodel.addAttribute(\"shops\", srepository.findAll());\n\t\treturn \"additem\";\n\t}", "public boolean add(final OrderedItem item) {\n\t\t\tfinal int i = item.getIndex();\n\t\t\tif (table[index].get(i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttable[index].set(i);\n\t\t\treturn true;\n\t\t}", "public void addEvent() {\n TimetableUserItem event;\n try {\n String description = getDescription();\n String date = getDate();\n String startTime = getStartTime();\n String endTime = getEndTime();\n verifyCorrectTime(startTime, endTime);\n String location = getLocation();\n event = new TimetableUserItem(description, date, startTime, endTime, location);\n verifyNoConflict(event);\n timetable.addEvent(event.getDayOfWeek(), event);\n timetable.addToEvents(event);\n addUI.printEventMessage(event);\n } catch (AddException e) {\n e.printMessage();\n logger.log(Level.WARNING, \"Invalid event created, event has not been added to timetable\");\n }\n }", "public void addNewItem(DataHolder newRow) {\n this.add(newRow);\n\n // sends request to update ListAdapter\n notifyDataSetChanged();\n }", "public void insert(Object item)\n\t{\n\t\tif(item instanceof Journey)\n\t\t{\n\t\t\tJourney tmp = (Journey) item;\n\t\t\t\n\t\t\t/* Insertion dans la table Journey */\n\t\t\tContentValues toAdd = new ContentValues();\n\t\t\ttoAdd.put(DBContract.JourneyTable.DATE[0], df.format(tmp.getDate()));\n\t\t\ttoAdd.put(DBContract.JourneyTable.ROADNAME[0], tmp.getRoad().getName());\n\n\t\t\tlong id = mainDatabase.insert(DBContract.JourneyTable.TABLE_NAME, null, toAdd);\n\t\t\tif(id==-1)\n\t\t\t{\n\t\t\t\tLog.e(\"error\", \"Error while inserting new Journey in database\");\n\t\t\t}\n\t\t\t\n\t\t\t/* Insertion dans la table JourenyxContacts */\n\t\t\ttoAdd.clear();\n\t\t\tlong retval;\n\t\t\tfor(Contact contact:tmp.getContact())\n\t\t\t{\n\t\t\t\ttoAdd.put(DBContract.JourneyContactTable.JOURNEY_ID[0], id);\n\t\t\t\ttoAdd.put(DBContract.JourneyContactTable.CONTACT_ID[0], contact.getId());\n\t\t\t\t//TODO Debug print\n\t\t\t\tLog.i(\"info\", \"Inserted Journey id : \" + id);\n\t\t\t\tLog.i(\"info\", \"Inserted Contact id : \" + contact.getId());\n\t\t\t\tretval = mainDatabase.insert(DBContract.JourneyContactTable.TABLE_NAME, null, toAdd);\n\t\t\t\tif(retval==-1)\n\t\t\t\t{\n\t\t\t\t\tLog.e(\"error\", \"Error while inserting the Journey\" + id + \"in database\");\n\t\t\t\t}\n\t\t\t\ttoAdd.clear();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(item instanceof Contact)\n\t\t{\n\t\t\tContact tmp = (Contact) item;\n\t\t\t\n\t\t\t/* Insertion dans la table Contact */\n\t\t\tContentValues toAdd = new ContentValues();\n\t\t\ttoAdd.put(DBContract.ContactTable.NAME[0], tmp.getName());\n\t\t\ttoAdd.put(DBContract.ContactTable.SURNAME[0], tmp.getFirstName());\n\t\t\ttoAdd.put(DBContract.ContactTable.BILL[0], tmp.getbill());\n\t\t\t\n\t\t\tlong id = mainDatabase.insert(DBContract.ContactTable.TABLE_NAME, null, toAdd);\n\t\t\tif(id==-1)\n\t\t\t{\n\t\t\t\tLog.e(\"error\", \"Error while inserting new Contact in database\");\n\t\t\t}\n\t\t\t\n\t\t\t/* Mise a jour du contact */\n\t\t\ttmp.setId(id);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString command = insertCommand(item);\n\t\tif(command == null)\n\t\t{\n\t\t\tLog.e(\"error\", \"Trying to insert non database compliant object !\");\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t\tmainDatabase.execSQL(command);\n\t}", "public void addItem(Item item) {\n _items.add(item);\n }", "public void addProduct(Product item){\n inventory.add(item);\n }", "private void addItem(Movie item) {\n mDataset.add(item);\n notifyItemInserted(mDataset.size() );\n notifyDataSetChanged();\n }", "public synchronized void addItem(IJABXAdvertisementItem item) {\n\t\tidMap.put(item.getSerialNo(), item);\n\t\titemList.add(item);\n\t}", "@FXML\n public void buttonAddItem(ActionEvent actionEvent) {\n //adds a list item to the table\n }", "public void addTodoItem(TodoItem item) {\n todoItems.add(item);\n }", "void addService(Long orderId, Long serviceId);", "public void insertItemDetails(String itemName, Integer quantityOfItem, Double rateOfItem);", "public void AddData(String newEntry) {\n boolean insertData = mDatabaseHelper.addData(newEntry);\n if (insertData) {\n toastMessage(\"Item Added to Shopping List!\");\n } else {\n toastMessage(\"Sorry, Please Try Again\");\n }\n\n }", "public void addCostItem(CostItem item) throws CostManagerException;", "public void addItem() {\n Url url = new Url();\n Venue item = new Venue(venuename.getText().toString(), address.getText().toString(), venueimage.getText().toString(), details.getText().toString());\n Call<Void> additem = url.createInstanceofRetrofit().addNewVenue(item);\n additem.enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n Toast.makeText(VenueAdd.this, \"Venue Added Successfully\", Toast.LENGTH_SHORT).show();\n Intent intent=new Intent(VenueAdd.this, Dash.class);\n startActivity(intent);\n finish();\n }\n\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n Toast.makeText(VenueAdd.this, \"Error:\"+t, Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "public ItemsPk insert(Items dto) throws ItemsDaoException;", "public AddItem() {\n initComponents();\n loadAllToTable();\n tblItems.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tblItems.getSelectedRow() == -1) return;\n \n String itemId= tblItems.getValueAt(tblItems.getSelectedRow(), 0).toString();\n \n String des= tblItems.getValueAt(tblItems.getSelectedRow(), 1).toString();\n String qty= tblItems.getValueAt(tblItems.getSelectedRow(), 2).toString();\n String unitPrice= tblItems.getValueAt(tblItems.getSelectedRow(), 3).toString();\n \n txtItemCode.setText(itemId);\n txtDescription.setText(des);\n \n txtQtyOnHand.setText(qty);\n txtUnitPrice.setText(unitPrice);\n \n }\n \n });\n \n \n }", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "public String[] addItem(Session session) throws RemoteException{\n\t\tSystem.out.println(\"Server model invokes addItem() method\");\n\t\treturn null;\n\t\t\n\t}", "@Override\n\tpublic void addItems(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"+++++++++++Add items here+++++++++++\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id, name, price and quantity\n\t\t\tSystem.out.print(\"Enter Item Id: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\tSystem.out.print(\"Enter Item Name without space: \");\n\t\t\tString itemName = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Type without space: \");\n\t\t\tString itemType = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Price: \");\n\t\t\tString itemPrice = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Quantity: \");\n\t\t\tint itemQuantity = scanner.nextInt();\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.addItems(session,itemId,itemName,itemType,itemPrice,itemQuantity);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Items Exception: \" +e.getMessage());\n\t\t}\n\t}", "public void addItemAt(MySmsMessage itemTemp,int positionTemp){\n dataset.add(positionTemp,itemTemp);\n notifyItemInserted(positionTemp);\n }", "private void insertServiceSQLite(ArrayList<ServiceModel> servicesModel) {\n db.execSQL(\"DELETE FROM \" + DBSQLite.TABLE_PRICE_SERVICE\n + \" WHERE \" + DBSQLite.KEY_PRICE_SERVICE_IS_OFFER + \"=0\");\n db.execSQL(\"DELETE FROM \" + DBSQLite.TABLE_SERVICE);\n\n for (ServiceModel serviceModel : servicesModel) {\n ContentValues serviceContent = new ContentValues();\n\n serviceContent.put(DBSQLite.KEY_SERVICE_ID, serviceModel.getId());\n serviceContent.put(DBSQLite.KEY_SERVICE_NAME, serviceModel.getName());\n serviceContent.put(DBSQLite.KEY_SERVICE_DESCRIPTION, serviceModel.getDescription());\n serviceContent.put(DBSQLite.KEY_SERVICE_IMAGE, serviceModel.getImage());\n serviceContent.put(DBSQLite.KEY_SERVICE_RESERVED, serviceModel.getReserved());\n serviceContent.put(DBSQLite.KEY_SERVICE_ID_TYPE, serviceModel.getIdType());\n serviceContent.put(DBSQLite.KEY_SERVICE_NAME_TYPE, serviceModel.getNameType());\n serviceContent.put(DBSQLite.KEY_SERVICE_VALUE_TYPE, serviceModel.getValueType());\n\n if (db.insert(DBSQLite.TABLE_SERVICE, null, serviceContent) == -1)\n System.out.println(\"Ocurrio un error al inserar la consulta en ServiceModel\");\n\n serviceServicePrice.insertServicePriceSQLite(serviceModel.getServicePrice());\n }\n }", "public void addButtonClicked(View view) {\n\n Products product = new Products(johnsInput.getText().toString());\n\n dbHandler.addProduct(product);\n printDatabase();\n }", "void addMember(Item item) throws AccessManagementException;", "public int addItem(Itemset i);", "@Override\n\tpublic void add(Iphone phone) {\n\t\t\n\t}", "@Override\r\n\tpublic void insertEncoreItem(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item1\");\r\n\t}", "public void add(Item item) {\r\n\t\tcatalog.add(item);\r\n\t}", "long addMobilePhone(MobilePhone mobilePhone);", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "public void add(Customer c) {\n customers.add(c);\n\n fireTableDataChanged();\n }", "public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }", "public void addItem(String nameMeal, String quantity, String idOrder) {\n\n\t\ttry {\n\n\t\t\torderDetails.insertNewOrderDetail(idOrder, quantity, nameMeal);\n\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\t}", "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}", "void addService(ServiceInfo serviceInfo);", "@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}", "Item addItem(IDAOSession session, String title, String description,\n\t\t\tint userId);", "@Override\n public void addItem(P_CK t) {\n \n }", "public void addItem(Object item) {\r\n\t\tlistModel.addElement(item);\r\n\t}", "public void addItem(SalesItem salesItem)\n {\n this.salesItem[numItemsAdded] = salesItem;\n numItemsAdded = numItemsAdded + 1;\n }", "public void addItem(View v){\n //Creates a new IngredientModel, adds it to the List<IngredientModel>\n IngredientModel ingredientModel = new IngredientModel(ingredientEditText.getText().toString());\n ingredientModelList.add(ingredientModel);\n //Notifies the adapter the data set has changed in order to update the recyclerView\n ingredientSearchAdapter.notifyDataSetChanged();\n }", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "public void addItem(Item item){\n if(ChronoUnit.DAYS.between(LocalDate.now(), item.getBestBefore()) <= 2){\n //testInfoMessage = true; //ONLY FOR TESTING\n infoMessage(item.getName(), item.getBestBefore()); // DISABLE FOR TESTING\n }\n itemList.add(item);\n totalCost += item.getPrice();\n }", "void addMachine(MachineDataDetail machineDataDetail) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(KEY_ID, UUID.randomUUID().toString().replace(\"-\", \"\"));\r\n values.put(KEY_NAME, machineDataDetail.getName());\r\n values.put(KEY_TYPE, machineDataDetail.getType());\r\n values.put(KEY_QR, machineDataDetail.getQrnumber());\r\n// values.put(KEY_IMAGE, machineDataDetail.get());\r\n// // Inserting Row\r\n// db.insert(TABLE_KASIR, null, values);\r\n db.close(); // Closing database connection\r\n }", "public void addItem(Item i) {\n this.items.add(i);\n }", "public abstract void add(T item) throws RepositoryException;", "void add(T item);", "public void add(MeasurementItem mi)\r\n {\r\n if(this.measurementItems==null) this.measurementItems=new ArrayList();\r\n measurementItems.add(mi);\r\n \r\n itemsQuantity=(measurementItems!=null)?measurementItems.size():0;\r\n }", "public void addItemToSale(String productId, int quantity) {\r\n if (productId.isEmpty()) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id is missing - enter valid product id\");\r\n System.exit(1);\r\n }\r\n if (quantity <= 0) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"quantity is less than or equal to 0 - enter valid quantity\");\r\n System.exit(1);\r\n }\r\n FakeDatabase db = new FakeDatabase();\r\n Product product = db.findProduct(productId);\r\n\r\n if (product != null) { //product found in database\r\n receipt.addLineItem(product, quantity);\r\n } else {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id not found in database - enter valid product id\");\r\n System.exit(1);\r\n }\r\n }", "public void addItem(Item item) {\n\t\titems.add(item);\n\t}", "public static boolean addItem(item item) {\n try {\n PreparedStatement st = conn.prepareStatement(\"INSERT INTO iteminformation VALUES(?,?,?,?,?,?,?,?,?,?)\");\n st.setInt(1, item.getItemID());\n st.setString(2, item.getOwnerID());\n st.setString(3, item.getName());\n st.setInt(4, item.getStatus());\n st.setString(5, item.getDescription());\n st.setString(6, item.getCategory());\n st.setBlob(7, item.getImage1());\n st.setBlob(8, item.getImage2());\n st.setBlob(9, item.getImage3());\n st.setBlob(10, item.getImage4());\n st.execute();\n return true;\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "public void addItem(Item itemToAdd){\n\t\tif(!isFull()){\n\t\t\tint index = findFreeSlot();\n\t\t\tinventoryItems[index] = itemToAdd;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Inventory full.\");\n\t\t}\n\t\t\n\t}", "Map<String, Object> putItem(\n String tableName,\n MapStoreKey key,\n Map<String, Object> payload\n );", "public void add(ToDoItem item) {\n mItems.add(item);\n notifyDataSetChanged();\n }", "CatalogItem addCatalogItem(CatalogItem catalogItem);", "public int add(Item item) {\r\n Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n int id = 0;\r\n\r\n try {\r\n trans = session.beginTransaction();\r\n\r\n id = (int) session.save(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 return id;\r\n }", "protected void addInventoryItemType() {\n\t\tProperties props = new Properties();\n\n\t\t/* DEBUG\n\t\t\n\t\tSystem.out.println(typeNameTF.getText());\n\t\tSystem.out.println(unitsTF.getText());\n\t\tSystem.out.println(unitMeasureTF.getText());\n\t\tSystem.out.println(validityDaysTF.getText());\n\t\tSystem.out.println(reorderPointTF.getText());\n\t\tSystem.out.println(notesTF.getText());\n\t\tSystem.out.println(statusCB.getValue());\n\t\n\t\t*/ \n\n\t\t// Set the values.\n\t\tprops.setProperty(\"ItemTypeName\", typeNameTF.getText());\n\t\tprops.setProperty(\"Units\", unitsTF.getText());\n\t\tprops.setProperty(\"UnitMeasure\", unitMeasureTF.getText());\n\t\tprops.setProperty(\"ValidityDays\", validityDaysTF.getText());\n\t\tprops.setProperty(\"ReorderPoint\", reorderPointTF.getText());\n\t\tprops.setProperty(\"Notes\", notesTF.getText());\n\t\tprops.setProperty(\"Status\", (String) statusCB.getValue());\n\n\t\t// Create the inventory item type.\n\t\tInventoryItemType iit = new InventoryItemType(props);\n\n\t\t// Save it into the database.\n\t\tiit.update();\n\n\t\tpopulateFields();\n\t\t\n\t\t// Display message on GUI.\n\t\t//submitBTN.setVisible(false);\n\t\tcancelBTN.setText(\"Back\");\n\t\tmessageLBL.setText(\"Inventory Item Type added.\");\n\t}", "public void addRecord();", "public void add(IApsEntity entity) throws ApsSystemException;", "void addData();" ]
[ "0.68667614", "0.6807135", "0.6657028", "0.6419823", "0.63970464", "0.63755614", "0.6305549", "0.62932247", "0.6175392", "0.6153965", "0.6144336", "0.6141297", "0.6089684", "0.6088535", "0.60715735", "0.60693324", "0.6061114", "0.6060359", "0.60482025", "0.60451436", "0.6039832", "0.6034046", "0.60243446", "0.60175174", "0.5981269", "0.5981269", "0.5980623", "0.5970918", "0.59645534", "0.593913", "0.5937941", "0.5928308", "0.5924182", "0.5916626", "0.5900701", "0.58969736", "0.5891721", "0.58668745", "0.58652115", "0.5859316", "0.5845708", "0.5828767", "0.5822123", "0.58195287", "0.5814526", "0.58049273", "0.5803182", "0.579673", "0.5790306", "0.57698345", "0.5769432", "0.57598245", "0.5758264", "0.5758134", "0.574026", "0.57323486", "0.5729671", "0.57208437", "0.57165307", "0.57160974", "0.57118165", "0.5706678", "0.57061315", "0.5701142", "0.5697173", "0.5691839", "0.56875336", "0.5686639", "0.56795454", "0.5676077", "0.5670867", "0.5668769", "0.56664395", "0.56611836", "0.5659323", "0.56586075", "0.56570107", "0.565639", "0.56503713", "0.5648859", "0.5647294", "0.5644229", "0.5643892", "0.5628147", "0.5627931", "0.56142575", "0.56126523", "0.56083506", "0.5605759", "0.5600005", "0.55967414", "0.5593465", "0.5590012", "0.55837536", "0.55822873", "0.55735373", "0.5572386", "0.5567218", "0.55659366", "0.55597353" ]
0.62508637
8
Creates a dialog and shows it
private void createAndShowDialog(Exception exception, String title) { Throwable ex = exception; if(exception.getCause() != null){ ex = exception.getCause(); } createAndShowDialog(ex.getMessage(), title); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }", "public static void showNew() {\n\t\tif (DIALOG == null) {\n\t\t\tDIALOG = new NewDialog();\n\t\t}\n\t\tDIALOG.setVisible(true);\n\t\tDIALOG.toFront();\n\t}", "public void show() {\n listenerHandler.onShow(dialog);\n dialog.show();\n }", "public static void showDialog() {\n\t\tdialog.setLocationRelativeTo(Cytoscape.getDesktop());\n\t\tdialog.setVisible(true);\n\t}", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "private void showDialog() {\n if (!pDialog.isShowing())\n pDialog.show();\n }", "public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}", "protected abstract JDialog createDialog();", "public void openDialogCreateVisual(){\n DataHeader[] tabHeader = dataset.getListDataHeaderDouble(true);\n TypeVisualization[] tabVis = getListTypeVisualization(tabHeader.length);\n DataHeader[] tabHeaderLabel = dataset.getListDataHeaderDouble(false);\n CreateDataVisualDialog dialog = new CreateDataVisualDialog(this, tabVis, tabHeader, tabHeaderLabel);\n dialog.setVisible(true);\n }", "@Override\n\tpublic void show() {\n\t\tGameView.VIEW.addDialog(this);\n\t\tsuper.show();\n\t}", "private void createAndShowDialog(final String message, final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity ());\n\n builder.setMessage(message);\n builder.setTitle(title);\n builder.create().show();\n }", "private void creatDialog() {\n \t mDialog=new ProgressDialog(this);\n \t mDialog.setTitle(\"\");\n \t mDialog.setMessage(\"正在加载请稍后\");\n \t mDialog.setIndeterminate(true);\n \t mDialog.setCancelable(true);\n \t mDialog.show();\n \n\t}", "DialogResult show();", "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}", "public void display() {\n dialog.setVisible(true);\n }", "private void createAndShowDialog(final String message, final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setMessage(message);\n builder.setTitle(title);\n builder.create().show();\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 }", "void showDialog() {\n\t\tDFTimePicker dtf = DFTimePicker.newInstance();\n DialogFragment newFragment = dtf;\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "public void showDialog() {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n saveTemplate(mToastEdited);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, mTitle, mMessage, mTitleButtonOne, mTitleButtonTwo);\n mDialogInfoWithTwoButtons.getDialog().show();\n }", "protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }", "public void showLifeCycleDialog() {\n\t\t\tlifeCycleDialogBox = new DialogBox(true);\n\t\t\tlifeCycleDialogBox.setGlassEnabled(true);\n\t\t\tlifeCycleDialogBox.setText(\"Seguimiento del Documento\");\n\n\t\t\t// Vertical Panel\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"100%\", \"100%\");\n\t\t\tvp.add(lifeCycleCellTree);\n\t\t\tvp.add(new HTML(\"&nbsp;\"));\n\t\t\tvp.add(lifeCycleCloseButton);\n\n\t\t\t// Scroll Panel\n\t\t\tScrollPanel scrollPanel = new ScrollPanel();\n\t\t\tif (getUiParams().isMobile())\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() + \"px\", Window.getClientHeight() + \"px\");\n\t\t\telse\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() * .4 + \"px\", Window.getClientHeight() * .3 + \"px\");\n\t\t\tscrollPanel.setWidget(vp);\n\t\t\tlifeCycleDialogBox.setWidget(scrollPanel);\n\n\t\t\tDouble d = Window.getClientWidth() * .3;\n\t\t\tif (!getUiParams().isMobile()) \n\t\t\t\tlifeCycleDialogBox.setPopupPosition(d.intValue(), UiTemplate.NORTHSIZE * 3);\n\n\t\t\tlifeCycleDialogBox.show();\n\t\t}", "private void openCreateAccountDialog()\n {\n testDialog();\n\n }", "private void createDialog() {\r\n final AlertDialog dialog = new AlertDialog.Builder(getActivity()).setView(R.layout.dialog_recorder_details)\r\n .setTitle(\"Recorder Info\").setPositiveButton(\"Start\", (dialog1, which) -> {\r\n EditText width = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_width);\r\n EditText height = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_height);\r\n CheckBox audio = (CheckBox) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_audio_checkbox);\r\n EditText fileName = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_filename_name);\r\n mServiceHandle.start(new RecordingInfo(Integer.parseInt(width.getText().toString()), Integer.parseInt(height.getText().toString()),\r\n audio.isChecked(), fileName.getText().toString()));\r\n dialog1.dismiss();\r\n }).setNegativeButton(\"Cancel\", (dialog1, which) -> {\r\n dialog1.dismiss();\r\n }).show();\r\n Point size = new Point();\r\n getActivity().getWindowManager().getDefaultDisplay().getRealSize(size);\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_width)).setText(Integer.toString(size.x));\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_height)).setText(Integer.toString(size.y));\r\n }", "private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }", "void showDialog() {\n\t\tDialogFragment newFragment = MyAlertDialogFragment\n\t\t\t\t.newInstance(R.string.not_enoughth_information);\n\t\tnewFragment.show(getFragmentManager(), \"dialog\");\n\t}", "void showDialog() {\n DialogFragment newFragment = MyAlertDialogFragment.newInstance(R.string.alert_dialog_two_buttons_title);\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public void show() {\n dialog = new Dialog(mActivity);\n dialog.setCancelable(false);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_progess);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);\n\n ProgressBar progressBar = dialog.findViewById(R.id.progressBar);\n progressBar.getIndeterminateDrawable()\n .setColorFilter(0xFFFFFFFF, android.graphics.PorterDuff.Mode.MULTIPLY);\n\n dialog.show();\n }", "public void openDialog(){\n DialogforTheboysHeroImage dialogforTheboysHeroImage = new DialogforTheboysHeroImage();\n dialogforTheboysHeroImage.show(getSupportFragmentManager(), \"Heros info\");\n }", "private void showpDialog() {\n if (!pDialog.isShowing())\n pDialog.show();\n }", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "private void showDialog(int msgId, int buttonId) {\n AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);\n\n builder\n .setMessage(msgId)\n .setTitle(R.string.backup_dialog_title)\n .setPositiveButton(buttonId, this)\n .setNegativeButton(R.string.button_cancel, this);\n\n mDialog = builder.create();\n mDialog.show();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }", "public AlertDialog createSimpleDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Code with love by\")\n .setMessage(\"Alvaro Velasco & Jose Alberto del Val\");\n return builder.create();\n }", "public void working() {\n\t\t Dialog d = new Dialog(this);\r\n\t\t d.setTitle(\"hech yea!\");\r\n\t\t TextView tv = new TextView(this);\r\n\t\t tv.setText(\"Success\");\r\n\t\t d.setContentView(tv);\r\n\t\t d.show();\t\r\n\t}", "public void dialogoAgregarUsuario() {\n vAgregarUsuario = new V_AgregarUsuario(new JFrame(), true);\n vAgregarUsuario.setVisible(true);\n }", "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 }", "private void createForumDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_forum_title);\n dialog.setMessage(R.string.add_new_forum_description);\n\n View newForumDialog = getLayoutInflater().inflate(R.layout.new_forum_dialog, null);\n dialog.setView(newForumDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddForumButtonListener(alertDialog, newForumDialog);\n\n alertDialog.show();\n }", "private void showDialog() {\n if (!progressDialog.isShowing())\n progressDialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Done entering class?\")\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent tmp = new Intent(getContext(), course_info.class);\n startActivity(tmp);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void initDialog() {\n dialog = new Dialog(context);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_custom_ok);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }", "public StandardDialog() {\n super();\n init();\n }", "public void showDialogWindow(Stage primaryStage, VBox vbox, String title, Button done) {\n // Create layout\n BorderPane layout = new BorderPane();\n layout.setCenter(vbox);\n\n // Show Modal Dialog Window\n Scene inputScene = new Scene(layout, 350, 250);\n final Stage userInputs = new Stage();\n userInputs.initModality(Modality.APPLICATION_MODAL);\n userInputs.initOwner(primaryStage);\n userInputs.setScene(inputScene);\n userInputs.setTitle(title);\n userInputs.show();\n\n // Add functionality to upload button\n done.setOnAction(e -> userInputs.close());\n }", "public void actionPerformed(ActionEvent evt) {\r\n super.actionPerformed(evt);\r\n createDialog().show();\r\n }", "public void showDialog(Context context) {\n \n }", "public static JDialog createDialog(JFrame owner) {\n PlatformInfoPanel panel = new PlatformInfoPanel();\n JDialog dialog = new JDialog(owner, ResourceManager.getResource(PlatformInfoPanel.class, \"Dialog_title\"));\n dialog.getContentPane().add(panel);\n dialog.setSize(panel.getWidth() + 10, panel.getHeight() + 30);\n return dialog;\n}", "private void showDialog() {\n\n BaseBottomSheetDialog dialog = new BaseBottomSheetDialog(this);\n dialog.setContentView(R.layout.bottom_sheet);\n dialog.show();\n\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n // Use the Builder class for convenient dialog construction\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.title_add_to_shopping);\n\n // initialize itemcreation\n m_createItemDlg = new CreateItemDialog(this);\n\n // create item selection\n builder.setView(createItemSelection());\n\n // set buttonss\n builder.setPositiveButton(R.string.button_add, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if(m_callback != null) {\n m_callback.readAddToShoppingDlgAndUpdate();\n }\n }\n });\n builder.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) { }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void showInputCategoryCreateDialog() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_INPUT_CATEGORY_CREATE_DIALOG));\r\n\r\n Parent page;\r\n\r\n try {\r\n page = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_INPUT_CATEGORY_CREATE_DIALOG, ex);\r\n\r\n return;\r\n }\r\n\r\n // set the stage\r\n Stage stage = new Stage();\r\n stage.setTitle(\"Create Input Category\");\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.centerOnScreen();\r\n stage.initOwner(mainStage);\r\n\r\n Scene scene = new Scene(page);\r\n scene.getStylesheets().add(getClass().getResource(STYLESHEET_DEFAULT).toExternalForm());\r\n\r\n stage.setScene(scene);\r\n\r\n // Set the item into the controller.\r\n InputCategoryCreateDialogController controller = loader.getController();\r\n controller.setStage(stage);\r\n\r\n stage.showAndWait();\r\n }", "public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "private void showDialog() {\n try {\n pDialog.setMessage(getString(R.string.please_wait));\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.setCanceledOnTouchOutside(false);\n pDialog.show();\n } catch (Exception e) {\n // TODO: handle exception\n }\n\n }", "@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\treturn buildDialog(MainActivity.this);\n\t\t\n\t}", "private void showCustomDialog() {\n final Dialog dialog = new Dialog(getContext());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); //before\n // Include dialog.xml file\n dialog.setContentView(R.layout.success_dialog);\n TextView btn_home = dialog.findViewById(R.id.btn_home);\n dialog.setCanceledOnTouchOutside(false);\n dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n startActivity(new Intent(getContext(), MainActivity.class));\n getActivity().finish();\n }\n });\n btn_home.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getContext(), MainActivity.class));\n getActivity().finish();\n }\n });\n // Set dialog title\n\n dialog.show();\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //setting the message and the title of dialog\n builder.setTitle(R.string.dialog_title)\n .setMessage(R.string.dialog_message)\n .setPositiveButton(android.R.string.yes, (dialog, which) -> {\n getActivity().finish();\n })\n .setOnCancelListener(dialog -> getActivity().finish());\n\n //creating and returning the dialog\n return builder.create();\n }", "public void openOrderBalanceDialog() {\n\t\torderBalanceDialogBox = new DialogBox(true);\n\t\torderBalanceDialogBox.setGlassEnabled(true);\n\t\torderBalanceDialogBox.setText(\"Rentabilidad Pedido\");\n\t\torderBalanceDialogBox.setSize(\"250px\", \"150px\");\n\n\t\tVerticalPanel vp = new VerticalPanel();\n\t\tvp.setSize(\"250px\", \"150px\");\n\t\torderBalanceDialogBox.setWidget(vp);\n\n\t\tFlowPanel orderPanel = new FlowPanel();\n\t\torderPanel.setWidth(\"250px\");\n\n\t\t// Obten info del filtro forzado\n\t\tBmFilter forceFilter = getUiParams().getUiProgramParams(getBmObject().getProgramCode()).getForceFilter();\n\n\t\tUiRequisitionOrderView uiRequisitionOrderView = new UiRequisitionOrderView(getUiParams(), orderPanel, forceFilter.getValue());\n\t\tuiRequisitionOrderView.show();\t\t\t\t\t\n\n\t\tHorizontalPanel buttonPanel = new HorizontalPanel();\n\t\tbuttonPanel.add(orderBalanceCloseDialogButton);\n\n\t\tvp.add(orderPanel);\n\t\tvp.add(buttonPanel);\n\n\t\torderBalanceDialogBox.center();\n\t\torderBalanceDialogBox.show();\n\t}", "public void showModalWindow() {\n Stage dialog = new Stage();\n dialog.initOwner(stage);\n dialog.initModality(Modality.WINDOW_MODAL); \n dialog.showAndWait();\n }", "private void showDialog(String msg) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(msg)\n .setCancelable(false)\n .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }", "private void initDialog() {\n }", "public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "private void showInputDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"App info\");\n builder.setMessage(message);\n builder.setPositiveButton(\" Done \", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "private void newDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.addmark));\n\t\tfinal EditText input = new EditText(this);\n\t\tinput.setHint(getString(R.string.pleasemark));\n\t\tbuilder.setView(input);\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tif (input.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\t\taddTag(input.getText().toString());\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.successaddmark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.pleasemark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tnewDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "public PaySuccessDialog create() {\r\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n View layout = inflater.inflate(R.layout.paysucdialog, null);\r\n final PaySuccessDialog dialog = new PaySuccessDialog(context,R.style.Dialog);\r\n ImageView img_success = (ImageView)layout.findViewById(R.id.img_success);\r\n img_success.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\r\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}\r\n\t\t\t});\r\n \r\n dialog.setContentView(layout);\r\n return dialog;\r\n }", "protected void doDialog(int id) {\n BlindManDialogFragment.newInstance(id, centerDialogs).show(getFragmentManager(), \"dialog\");\n }", "protected Dialog onCreateDialog(int id) {\r\n switch(id) {\r\n case PROGRESS_DIALOG:\r\n progressDialog = new ProgressDialog(Suggestions.this);\r\n progressDialog.setMessage(\"Loading. Please wait.\");\r\n progressThread = new ProgressThread(handler);\r\n progressThread.start();\r\n return progressDialog;\r\n default:\r\n return null;\r\n }\r\n }", "@Override\n protected void onPrepareDialog(int id, Dialog dialog) {\n \tToast.makeText(this, dialog.toString(), Toast.LENGTH_SHORT).show();\n }", "private void createDialogBox(String title,Widget widget, final Function<Boolean, Void> function) {\n\t\tfinal DialogBox dialogBox = new DialogBox();\n\t\tdialogBox.ensureDebugId(\"cwDialogBox\");\n\t\tdialogBox.setText(title);\n\n\t\t// Create a table to layout the content\n\t\tVerticalPanel dialogContents = new VerticalPanel();\n\t\tdialogContents.setWidth(\"100%\");\n\t\tdialogContents.setSpacing(4);\n\t\tdialogBox.setWidget(dialogContents);\n\n\t\t// Add an image viewer to the dialog\n\t\t\n\t\tdialogContents.add(widget);\n\t\tdialogContents.setCellHorizontalAlignment(widget, HasHorizontalAlignment.ALIGN_CENTER);\n\n\t\t// Add a close button at the bottom of the dialog\n\t\tButton closeButton = new Button(constants.close());\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tdialogBox.hide();\n\t\t\t\tfunction.apply(true);\n\t\t\t}\n\t\t});\n\t\t\n\t\tdialogContents.add(closeButton);\n\t\tdialogContents.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT);\n\n\t\tdialogBox.setGlassEnabled(true);\n\t\tdialogBox.center();\n dialogBox.show();\n\t}", "private void showDialog(String tag) {\n \t\tFragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n \t\tFragment prev = getSupportFragmentManager().findFragmentByTag(tag);\n \t\tif (prev != null) {\n \t\t\tft.remove(prev);\n \t\t}\n \n \t\tDialogFragment newFragment = null;\n \n \t\t// Create and show the dialog.\n \t\tnewFragment = DownloadScannerDialog.newInstance();\n \n \t\tft.add(0, newFragment, tag);\n \t\tft.commit();\n \t}", "public void show_dialog_box (){\n //show the message of turning on the location\n Dialog dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.location_message_r);\n dialog.show();\n }", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n \r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n builder.setTitle(\"New Wallet\");\r\n \r\n\t final View view = inflater.inflate(R.layout.new_wallet_dialog, null);\r\n\t \r\n\t final EditText name = (EditText) view.findViewById(R.id.newWallet_text);\r\n\t \r\n builder.setPositiveButton(R.string.confirmRecord, new DialogInterface.OnClickListener() {\r\n \r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.comfirmPressed(name.getText().toString());\t\r\n \t\t}\r\n });\r\n builder.setNegativeButton(R.string.cancelRecord, new DialogInterface.OnClickListener() {\r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.cancelPressed();\r\n \t\t}\r\n \t});\r\n // Create the AlertDialog object and return it\r\n return builder.create();\r\n }", "private void showProgressDialog() {\n if (progressDialog == null) {\n progressDialog = new ProgressDialog(getContext());\n }\n\n progressDialog.setTitle(R.string.dialog_title);\n progressDialog.setMessage(getResources().getString(R.string.dialog_message));\n progressDialog.setCancelable(false);\n progressDialog.show();\n }", "public void showUserDefinedInputCreateDialog() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_USER_DEFINED_INPUT_CREATE_DIALOG));\r\n\r\n Parent page;\r\n\r\n try {\r\n page = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_USER_DEFINED_INPUT_CREATE_DIALOG, ex);\r\n\r\n return;\r\n }\r\n\r\n // set the stage\r\n Stage stage = new Stage();\r\n stage.setTitle(\"Create Custom Input\");\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.centerOnScreen();\r\n stage.initOwner(mainStage);\r\n\r\n Scene scene = new Scene(page);\r\n scene.getStylesheets().add(getClass().getResource(STYLESHEET_DEFAULT).toExternalForm());\r\n\r\n stage.setScene(scene);\r\n\r\n // Set the item into the controller.\r\n UserDefinedInputCreateDialogController controller = loader.getController();\r\n controller.setStage(stage);\r\n\r\n stage.showAndWait();\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(device.getName())\n \t\t.setTitle(R.string.bt_exchange_dialog_title)\n .setPositiveButton(R.string.bt_exchange_dialog_positive_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n \t //Add BT Device Activity\n \t performBTKeyExchange(device);\n }\n })\n .setNegativeButton(R.string.bt_exchange_dialog_negative_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n \t dismiss();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "protected Dialog onCreateDialog(int id) {\n\t\n\t// Arg value corresponds to showDialog(0)\n\t\tif (id != 0)\n\t\t\treturn null;\n\t\tmyProgressDialog = new ProgressDialog(this); \n\t\tmyProgressDialog.setMessage(\"Loading ...\"); \n\t\tmyProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); \n\t\tmyProgressDialog.setCancelable(false);\n\t\treturn myProgressDialog ;\n\t}", "@Override\n\t\tpublic final Dialog onCreateDialog(final Bundle savedInstanceState) {\n\t\t\tint title = getArguments().getInt(\"title\");\n\n\t\t\treturn new AlertDialog.Builder(getActivity())\n\t\t\t\t\t.setIcon(R.drawable.alert_dialog_icon)\n\t\t\t\t\t.setTitle(title)\n\t\t\t\t\t.setPositiveButton(R.string.alert_dialog_ok,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\tfinal DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tfinal int whichButton) {\n\t\t\t\t\t\t\t\t\t((AddingActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.doPositiveClick();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(R.string.alert_dialog_cancel,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\tfinal DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tfinal int whichButton) {\n\t\t\t\t\t\t\t\t\t((AddingActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.doNegativeClick();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).create();\n\t\t}", "protected Dialog onCreateDialog(int id) {\n if (id == 1) {\n AlertDialog.Builder adb = new AlertDialog.Builder(this);\n // заголовок\n adb.setTitle(\"PIN Removed\");\n // сообщение\n adb.setMessage(\"There will be no PIN entry screen when Application starts up.\");\n // иконка\n adb.setIcon(android.R.drawable.ic_dialog_info);\n adb.setNeutralButton(\"Ok\", myClickListener);\n // создаем диалог\n return adb.create();\n }\n return super.onCreateDialog(id);\n }", "public void addDialog(String text) {\n\t\tDialog d = new Dialog(text == null ? \"\" : text);\n\t\tcontainer.add(d);\n\t\td.setVisible(true);\n\t\trefreshView();\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog.show();\n\t\t}", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(getArguments().getString(\"title\"))\n .setMessage(getArguments().getString(\"message\"))\n .setCancelable(false)\n .setPositiveButton(R.string.OK, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n // call callback method\n // mListener.onInfoDialogOKClick(InfoDialog.this);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void showDialog(Dialog dialog) {\n activeDialog = dialog;\n activeDialog.center();\n }", "@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tsuper.onCreateDialog(id);\n\t\treturn visitor.instantiateDialog(id);\n\t}", "public void showAddCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/AddCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage dialogStage = new Stage();\n\t\t\tdialogStage.setTitle(\"Add Customer\");\n\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tdialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tdialogStage.setScene(scene);\n\t\t\tAddCustomerDialogController controller = loader.getController();\n\t\t\tcontroller.setDialogStage(dialogStage);\n\t\t\tdialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "@Override\n\t\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\t\treturn mDialog;\n\t\t}", "private void showRewardDialog() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\taddRewardDialogue = RewardsDialogFragment.newInstance(\"Some Title\");\n\t\taddRewardDialogue.show(fm, \"fragment_edit_task\");\n\t}", "private static void createWindow(final Serializable object) {\n\t\tDIALOG.setVisible(false);\n\t\tFrameFactory.createFrame(object);\n\t}", "private void showDialog(String tag, int dialogTitle, int dialogList, ListenerTypes requestedListener){\n\t\tFragmentTransaction ft = getFragmentManager().beginTransaction();\n\t\tFragment prev = getFragmentManager().findFragmentByTag(tag);\n\t\tif (prev != null) {\n\t\t\tft.remove(prev);\n\t\t}\n\t\tft.addToBackStack(null);\n\n\t\t// Create and show the dialog.\n\t\tDialogFragment newFragment = MenuDialogFragment.newInstance(\n\t\t\t\tdialogTitle, dialogList, requestedListener);\n\t\tnewFragment.show(ft, tag);\n\t}", "private void showAddImageDialog() {\n new AddImageDialog()\n .show(this, new AddImageDialog.OnCompleteListener() {\n @Override\n public void onImageAdded(Item item) {\n inflateViewForItem(item);\n }\n\n @Override\n public void onError(String error) {\n new MaterialAlertDialogBuilder(MainActivity.this)\n .setTitle(\"Error\")\n .setMessage(error)\n .show();\n }\n });\n }", "public void abrirDialogoEspecie() {\n ModalDialogoEspecie modalDialogoEspecie = new ModalDialogoEspecie();\n modalDialogoEspecie.show(getSupportFragmentManager(), \"especie dialog\");\n }", "public static void showDialog(JFrame parent) {\n try {\n JDialog dialog = new InvestmentReportDialog(parent);\n dialog.pack();\n dialog.setLocationRelativeTo(parent);\n dialog.setVisible(true);\n } catch (Exception exc) {\n Main.logException(\"Exception while displaying dialog\", exc);\n }\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\n }", "public Dialog createAddPersonDialog(String title, String msg) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getMyAcitivty());\n builder.setTitle(title);\n builder.setMessage(msg);\n\n // Use an EditText view to get user input.\n final EditText input = new EditText(getMyAcitivty());\n input.setText(\"\");\n builder.setView(input);\n\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int whichButton) {\n String value = input.getText().toString();\n Log.d(TAG, \"user input: \" + value);\n inputDialogResult = value;\n launchTrainingActivity();\n// AlertDialog dg =\n// SelectServerAlertDialog.createDialog(\n// getContext(),\n// \"Pick a Server\",\n// getAllIps(),\n// launchTrainingActivityAction,\n// cancelAction,\n// true);\n// dg.show();\n }\n });\n builder.setNegativeButton(\"Cancel\", SelectServerAlertDialog.cancelAction);\n return builder.create();\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }", "public static void newJFXDialogPopUp(String min, String sec, String dist, StackPane stP) {\n System.out.println(\"DialogBox Posted\");\n JFXDialogLayout jfxDialogLayout = new JFXDialogLayout();\n jfxDialogLayout.setHeading(new Text(\"Time Details\"));\n jfxDialogLayout.setBody(new Text(\"Time Estimate: \" + min + \" \" + sec +\"\\n\" + \"Distance Estimate: \" + dist));\n JFXDialog dialog = new JFXDialog(stP, jfxDialogLayout, JFXDialog.DialogTransition.CENTER);\n JFXButton okay = new JFXButton(\"Okay\");\n okay.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n dialog.close();\n\n }\n });\n jfxDialogLayout.setActions(okay);\n dialog.show();\n }", "public void open(){\n dialog.setLocation\n (parent.getLocation().x + 10, parent.getLocation().y + 10);\n dialog.setSize(PREF_SIZE);\n dialog.setResizable(false);\n dialog.setVisible(true);\n dialog.setResizable(true);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Limite mensal excedido! Na versão gratuita, o limite máximo de publicação de caronas mensais é 4 (quatro), atualize para a versão Pro e tenha publicações ilimitadas...\")\n .setPositiveButton(\"Ir\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String url = \"https://play.google.com/store/apps/details?id=com.xetelas.nova\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getContext().startActivity(i);\n }\n })\n .setNegativeButton(\"Voltar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public abstract void initDialog();", "@Override\n protected void onPreExecute()\n {\n dialog.show();\n super.onPreExecute();\n }", "private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a new one.\");\n dialog.button(\"OK\", true);\n dialog.show(stage);\n }", "public void open() {\n popupWindow = new Window(getTypeCaption());\n popupWindow.addStyleName(\"e-export-form-window\");\n popupWindow.addStyleName(\"opaque\");\n VerticalLayout layout = (VerticalLayout) popupWindow.getContent();\n layout.setMargin(true);\n layout.setSpacing(true);\n layout.setSizeUndefined();\n popupWindow.setSizeUndefined();\n popupWindow.setModal(false);\n popupWindow.setClosable(true);\n\n popupWindow.addComponent(this);\n getMainApplication().getMainWindow().addWindow(popupWindow);\n\n onDisplay();\n }" ]
[ "0.7344519", "0.7241187", "0.7218946", "0.7183877", "0.71538234", "0.71434057", "0.7088582", "0.7011126", "0.70048153", "0.6969636", "0.69431597", "0.6928362", "0.6927173", "0.68758285", "0.6865261", "0.6854176", "0.6838312", "0.6832828", "0.6830904", "0.6790587", "0.678631", "0.6769166", "0.6768155", "0.6756494", "0.6755535", "0.6750589", "0.67374426", "0.6713602", "0.6703682", "0.66969955", "0.66883135", "0.6684042", "0.66662824", "0.6639295", "0.66257197", "0.66062474", "0.6567585", "0.65259445", "0.6520288", "0.6487772", "0.6486707", "0.6482527", "0.6477968", "0.6471485", "0.64587134", "0.64575046", "0.6446607", "0.64390093", "0.64366704", "0.64244014", "0.6411347", "0.63782996", "0.63747287", "0.6372198", "0.636917", "0.6369113", "0.63659894", "0.6360292", "0.63496405", "0.63456887", "0.6339023", "0.633497", "0.6333755", "0.6331118", "0.63304085", "0.63299274", "0.6328353", "0.6309262", "0.6307637", "0.63074535", "0.63031924", "0.6302484", "0.6301867", "0.6299652", "0.62924886", "0.6289433", "0.6282529", "0.6268533", "0.6259062", "0.6255731", "0.6243297", "0.6242915", "0.62372077", "0.6237024", "0.62367195", "0.62346226", "0.6231674", "0.6229415", "0.6226814", "0.62261415", "0.62216", "0.6220511", "0.6215099", "0.62119913", "0.62097603", "0.62073576", "0.6207136", "0.6205012", "0.6201637", "0.61996835", "0.6197095" ]
0.0
-1
Creates a dialog and shows it
private void createAndShowDialog(final String message, final String title) { final AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(message); builder.setTitle(title); builder.create().show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }", "public static void showNew() {\n\t\tif (DIALOG == null) {\n\t\t\tDIALOG = new NewDialog();\n\t\t}\n\t\tDIALOG.setVisible(true);\n\t\tDIALOG.toFront();\n\t}", "public void show() {\n listenerHandler.onShow(dialog);\n dialog.show();\n }", "public static void showDialog() {\n\t\tdialog.setLocationRelativeTo(Cytoscape.getDesktop());\n\t\tdialog.setVisible(true);\n\t}", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "private void showDialog() {\n if (!pDialog.isShowing())\n pDialog.show();\n }", "public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}", "protected abstract JDialog createDialog();", "public void openDialogCreateVisual(){\n DataHeader[] tabHeader = dataset.getListDataHeaderDouble(true);\n TypeVisualization[] tabVis = getListTypeVisualization(tabHeader.length);\n DataHeader[] tabHeaderLabel = dataset.getListDataHeaderDouble(false);\n CreateDataVisualDialog dialog = new CreateDataVisualDialog(this, tabVis, tabHeader, tabHeaderLabel);\n dialog.setVisible(true);\n }", "@Override\n\tpublic void show() {\n\t\tGameView.VIEW.addDialog(this);\n\t\tsuper.show();\n\t}", "private void createAndShowDialog(final String message, final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity ());\n\n builder.setMessage(message);\n builder.setTitle(title);\n builder.create().show();\n }", "private void creatDialog() {\n \t mDialog=new ProgressDialog(this);\n \t mDialog.setTitle(\"\");\n \t mDialog.setMessage(\"正在加载请稍后\");\n \t mDialog.setIndeterminate(true);\n \t mDialog.setCancelable(true);\n \t mDialog.show();\n \n\t}", "DialogResult show();", "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}", "public void display() {\n dialog.setVisible(true);\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 }", "void showDialog() {\n\t\tDFTimePicker dtf = DFTimePicker.newInstance();\n DialogFragment newFragment = dtf;\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "public void showDialog() {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n saveTemplate(mToastEdited);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, mTitle, mMessage, mTitleButtonOne, mTitleButtonTwo);\n mDialogInfoWithTwoButtons.getDialog().show();\n }", "protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }", "public void showLifeCycleDialog() {\n\t\t\tlifeCycleDialogBox = new DialogBox(true);\n\t\t\tlifeCycleDialogBox.setGlassEnabled(true);\n\t\t\tlifeCycleDialogBox.setText(\"Seguimiento del Documento\");\n\n\t\t\t// Vertical Panel\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"100%\", \"100%\");\n\t\t\tvp.add(lifeCycleCellTree);\n\t\t\tvp.add(new HTML(\"&nbsp;\"));\n\t\t\tvp.add(lifeCycleCloseButton);\n\n\t\t\t// Scroll Panel\n\t\t\tScrollPanel scrollPanel = new ScrollPanel();\n\t\t\tif (getUiParams().isMobile())\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() + \"px\", Window.getClientHeight() + \"px\");\n\t\t\telse\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() * .4 + \"px\", Window.getClientHeight() * .3 + \"px\");\n\t\t\tscrollPanel.setWidget(vp);\n\t\t\tlifeCycleDialogBox.setWidget(scrollPanel);\n\n\t\t\tDouble d = Window.getClientWidth() * .3;\n\t\t\tif (!getUiParams().isMobile()) \n\t\t\t\tlifeCycleDialogBox.setPopupPosition(d.intValue(), UiTemplate.NORTHSIZE * 3);\n\n\t\t\tlifeCycleDialogBox.show();\n\t\t}", "private void openCreateAccountDialog()\n {\n testDialog();\n\n }", "private void createDialog() {\r\n final AlertDialog dialog = new AlertDialog.Builder(getActivity()).setView(R.layout.dialog_recorder_details)\r\n .setTitle(\"Recorder Info\").setPositiveButton(\"Start\", (dialog1, which) -> {\r\n EditText width = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_width);\r\n EditText height = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_height);\r\n CheckBox audio = (CheckBox) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_audio_checkbox);\r\n EditText fileName = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_filename_name);\r\n mServiceHandle.start(new RecordingInfo(Integer.parseInt(width.getText().toString()), Integer.parseInt(height.getText().toString()),\r\n audio.isChecked(), fileName.getText().toString()));\r\n dialog1.dismiss();\r\n }).setNegativeButton(\"Cancel\", (dialog1, which) -> {\r\n dialog1.dismiss();\r\n }).show();\r\n Point size = new Point();\r\n getActivity().getWindowManager().getDefaultDisplay().getRealSize(size);\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_width)).setText(Integer.toString(size.x));\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_height)).setText(Integer.toString(size.y));\r\n }", "private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }", "void showDialog() {\n\t\tDialogFragment newFragment = MyAlertDialogFragment\n\t\t\t\t.newInstance(R.string.not_enoughth_information);\n\t\tnewFragment.show(getFragmentManager(), \"dialog\");\n\t}", "void showDialog() {\n DialogFragment newFragment = MyAlertDialogFragment.newInstance(R.string.alert_dialog_two_buttons_title);\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public void show() {\n dialog = new Dialog(mActivity);\n dialog.setCancelable(false);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_progess);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);\n\n ProgressBar progressBar = dialog.findViewById(R.id.progressBar);\n progressBar.getIndeterminateDrawable()\n .setColorFilter(0xFFFFFFFF, android.graphics.PorterDuff.Mode.MULTIPLY);\n\n dialog.show();\n }", "public void openDialog(){\n DialogforTheboysHeroImage dialogforTheboysHeroImage = new DialogforTheboysHeroImage();\n dialogforTheboysHeroImage.show(getSupportFragmentManager(), \"Heros info\");\n }", "private void showpDialog() {\n if (!pDialog.isShowing())\n pDialog.show();\n }", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "private void showDialog(int msgId, int buttonId) {\n AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);\n\n builder\n .setMessage(msgId)\n .setTitle(R.string.backup_dialog_title)\n .setPositiveButton(buttonId, this)\n .setNegativeButton(R.string.button_cancel, this);\n\n mDialog = builder.create();\n mDialog.show();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }", "public AlertDialog createSimpleDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Code with love by\")\n .setMessage(\"Alvaro Velasco & Jose Alberto del Val\");\n return builder.create();\n }", "public void working() {\n\t\t Dialog d = new Dialog(this);\r\n\t\t d.setTitle(\"hech yea!\");\r\n\t\t TextView tv = new TextView(this);\r\n\t\t tv.setText(\"Success\");\r\n\t\t d.setContentView(tv);\r\n\t\t d.show();\t\r\n\t}", "public void dialogoAgregarUsuario() {\n vAgregarUsuario = new V_AgregarUsuario(new JFrame(), true);\n vAgregarUsuario.setVisible(true);\n }", "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 }", "private void createForumDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_forum_title);\n dialog.setMessage(R.string.add_new_forum_description);\n\n View newForumDialog = getLayoutInflater().inflate(R.layout.new_forum_dialog, null);\n dialog.setView(newForumDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddForumButtonListener(alertDialog, newForumDialog);\n\n alertDialog.show();\n }", "private void showDialog() {\n if (!progressDialog.isShowing())\n progressDialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Done entering class?\")\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent tmp = new Intent(getContext(), course_info.class);\n startActivity(tmp);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void initDialog() {\n dialog = new Dialog(context);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_custom_ok);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }", "public StandardDialog() {\n super();\n init();\n }", "public void showDialogWindow(Stage primaryStage, VBox vbox, String title, Button done) {\n // Create layout\n BorderPane layout = new BorderPane();\n layout.setCenter(vbox);\n\n // Show Modal Dialog Window\n Scene inputScene = new Scene(layout, 350, 250);\n final Stage userInputs = new Stage();\n userInputs.initModality(Modality.APPLICATION_MODAL);\n userInputs.initOwner(primaryStage);\n userInputs.setScene(inputScene);\n userInputs.setTitle(title);\n userInputs.show();\n\n // Add functionality to upload button\n done.setOnAction(e -> userInputs.close());\n }", "public void actionPerformed(ActionEvent evt) {\r\n super.actionPerformed(evt);\r\n createDialog().show();\r\n }", "public void showDialog(Context context) {\n \n }", "public static JDialog createDialog(JFrame owner) {\n PlatformInfoPanel panel = new PlatformInfoPanel();\n JDialog dialog = new JDialog(owner, ResourceManager.getResource(PlatformInfoPanel.class, \"Dialog_title\"));\n dialog.getContentPane().add(panel);\n dialog.setSize(panel.getWidth() + 10, panel.getHeight() + 30);\n return dialog;\n}", "private void showDialog() {\n\n BaseBottomSheetDialog dialog = new BaseBottomSheetDialog(this);\n dialog.setContentView(R.layout.bottom_sheet);\n dialog.show();\n\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n // Use the Builder class for convenient dialog construction\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.title_add_to_shopping);\n\n // initialize itemcreation\n m_createItemDlg = new CreateItemDialog(this);\n\n // create item selection\n builder.setView(createItemSelection());\n\n // set buttonss\n builder.setPositiveButton(R.string.button_add, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if(m_callback != null) {\n m_callback.readAddToShoppingDlgAndUpdate();\n }\n }\n });\n builder.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) { }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void showInputCategoryCreateDialog() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_INPUT_CATEGORY_CREATE_DIALOG));\r\n\r\n Parent page;\r\n\r\n try {\r\n page = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_INPUT_CATEGORY_CREATE_DIALOG, ex);\r\n\r\n return;\r\n }\r\n\r\n // set the stage\r\n Stage stage = new Stage();\r\n stage.setTitle(\"Create Input Category\");\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.centerOnScreen();\r\n stage.initOwner(mainStage);\r\n\r\n Scene scene = new Scene(page);\r\n scene.getStylesheets().add(getClass().getResource(STYLESHEET_DEFAULT).toExternalForm());\r\n\r\n stage.setScene(scene);\r\n\r\n // Set the item into the controller.\r\n InputCategoryCreateDialogController controller = loader.getController();\r\n controller.setStage(stage);\r\n\r\n stage.showAndWait();\r\n }", "public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "private void showDialog() {\n try {\n pDialog.setMessage(getString(R.string.please_wait));\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.setCanceledOnTouchOutside(false);\n pDialog.show();\n } catch (Exception e) {\n // TODO: handle exception\n }\n\n }", "@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\treturn buildDialog(MainActivity.this);\n\t\t\n\t}", "private void showCustomDialog() {\n final Dialog dialog = new Dialog(getContext());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); //before\n // Include dialog.xml file\n dialog.setContentView(R.layout.success_dialog);\n TextView btn_home = dialog.findViewById(R.id.btn_home);\n dialog.setCanceledOnTouchOutside(false);\n dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n startActivity(new Intent(getContext(), MainActivity.class));\n getActivity().finish();\n }\n });\n btn_home.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getContext(), MainActivity.class));\n getActivity().finish();\n }\n });\n // Set dialog title\n\n dialog.show();\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //setting the message and the title of dialog\n builder.setTitle(R.string.dialog_title)\n .setMessage(R.string.dialog_message)\n .setPositiveButton(android.R.string.yes, (dialog, which) -> {\n getActivity().finish();\n })\n .setOnCancelListener(dialog -> getActivity().finish());\n\n //creating and returning the dialog\n return builder.create();\n }", "public void openOrderBalanceDialog() {\n\t\torderBalanceDialogBox = new DialogBox(true);\n\t\torderBalanceDialogBox.setGlassEnabled(true);\n\t\torderBalanceDialogBox.setText(\"Rentabilidad Pedido\");\n\t\torderBalanceDialogBox.setSize(\"250px\", \"150px\");\n\n\t\tVerticalPanel vp = new VerticalPanel();\n\t\tvp.setSize(\"250px\", \"150px\");\n\t\torderBalanceDialogBox.setWidget(vp);\n\n\t\tFlowPanel orderPanel = new FlowPanel();\n\t\torderPanel.setWidth(\"250px\");\n\n\t\t// Obten info del filtro forzado\n\t\tBmFilter forceFilter = getUiParams().getUiProgramParams(getBmObject().getProgramCode()).getForceFilter();\n\n\t\tUiRequisitionOrderView uiRequisitionOrderView = new UiRequisitionOrderView(getUiParams(), orderPanel, forceFilter.getValue());\n\t\tuiRequisitionOrderView.show();\t\t\t\t\t\n\n\t\tHorizontalPanel buttonPanel = new HorizontalPanel();\n\t\tbuttonPanel.add(orderBalanceCloseDialogButton);\n\n\t\tvp.add(orderPanel);\n\t\tvp.add(buttonPanel);\n\n\t\torderBalanceDialogBox.center();\n\t\torderBalanceDialogBox.show();\n\t}", "public void showModalWindow() {\n Stage dialog = new Stage();\n dialog.initOwner(stage);\n dialog.initModality(Modality.WINDOW_MODAL); \n dialog.showAndWait();\n }", "private void showDialog(String msg) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(msg)\n .setCancelable(false)\n .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }", "private void initDialog() {\n }", "public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "private void showInputDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"App info\");\n builder.setMessage(message);\n builder.setPositiveButton(\" Done \", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "private void newDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.addmark));\n\t\tfinal EditText input = new EditText(this);\n\t\tinput.setHint(getString(R.string.pleasemark));\n\t\tbuilder.setView(input);\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tif (input.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\t\taddTag(input.getText().toString());\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.successaddmark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.pleasemark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tnewDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "public PaySuccessDialog create() {\r\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n View layout = inflater.inflate(R.layout.paysucdialog, null);\r\n final PaySuccessDialog dialog = new PaySuccessDialog(context,R.style.Dialog);\r\n ImageView img_success = (ImageView)layout.findViewById(R.id.img_success);\r\n img_success.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\r\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}\r\n\t\t\t});\r\n \r\n dialog.setContentView(layout);\r\n return dialog;\r\n }", "protected void doDialog(int id) {\n BlindManDialogFragment.newInstance(id, centerDialogs).show(getFragmentManager(), \"dialog\");\n }", "protected Dialog onCreateDialog(int id) {\r\n switch(id) {\r\n case PROGRESS_DIALOG:\r\n progressDialog = new ProgressDialog(Suggestions.this);\r\n progressDialog.setMessage(\"Loading. Please wait.\");\r\n progressThread = new ProgressThread(handler);\r\n progressThread.start();\r\n return progressDialog;\r\n default:\r\n return null;\r\n }\r\n }", "@Override\n protected void onPrepareDialog(int id, Dialog dialog) {\n \tToast.makeText(this, dialog.toString(), Toast.LENGTH_SHORT).show();\n }", "private void createDialogBox(String title,Widget widget, final Function<Boolean, Void> function) {\n\t\tfinal DialogBox dialogBox = new DialogBox();\n\t\tdialogBox.ensureDebugId(\"cwDialogBox\");\n\t\tdialogBox.setText(title);\n\n\t\t// Create a table to layout the content\n\t\tVerticalPanel dialogContents = new VerticalPanel();\n\t\tdialogContents.setWidth(\"100%\");\n\t\tdialogContents.setSpacing(4);\n\t\tdialogBox.setWidget(dialogContents);\n\n\t\t// Add an image viewer to the dialog\n\t\t\n\t\tdialogContents.add(widget);\n\t\tdialogContents.setCellHorizontalAlignment(widget, HasHorizontalAlignment.ALIGN_CENTER);\n\n\t\t// Add a close button at the bottom of the dialog\n\t\tButton closeButton = new Button(constants.close());\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tdialogBox.hide();\n\t\t\t\tfunction.apply(true);\n\t\t\t}\n\t\t});\n\t\t\n\t\tdialogContents.add(closeButton);\n\t\tdialogContents.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT);\n\n\t\tdialogBox.setGlassEnabled(true);\n\t\tdialogBox.center();\n dialogBox.show();\n\t}", "private void showDialog(String tag) {\n \t\tFragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n \t\tFragment prev = getSupportFragmentManager().findFragmentByTag(tag);\n \t\tif (prev != null) {\n \t\t\tft.remove(prev);\n \t\t}\n \n \t\tDialogFragment newFragment = null;\n \n \t\t// Create and show the dialog.\n \t\tnewFragment = DownloadScannerDialog.newInstance();\n \n \t\tft.add(0, newFragment, tag);\n \t\tft.commit();\n \t}", "public void show_dialog_box (){\n //show the message of turning on the location\n Dialog dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.location_message_r);\n dialog.show();\n }", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n \r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n builder.setTitle(\"New Wallet\");\r\n \r\n\t final View view = inflater.inflate(R.layout.new_wallet_dialog, null);\r\n\t \r\n\t final EditText name = (EditText) view.findViewById(R.id.newWallet_text);\r\n\t \r\n builder.setPositiveButton(R.string.confirmRecord, new DialogInterface.OnClickListener() {\r\n \r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.comfirmPressed(name.getText().toString());\t\r\n \t\t}\r\n });\r\n builder.setNegativeButton(R.string.cancelRecord, new DialogInterface.OnClickListener() {\r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.cancelPressed();\r\n \t\t}\r\n \t});\r\n // Create the AlertDialog object and return it\r\n return builder.create();\r\n }", "private void showProgressDialog() {\n if (progressDialog == null) {\n progressDialog = new ProgressDialog(getContext());\n }\n\n progressDialog.setTitle(R.string.dialog_title);\n progressDialog.setMessage(getResources().getString(R.string.dialog_message));\n progressDialog.setCancelable(false);\n progressDialog.show();\n }", "public void showUserDefinedInputCreateDialog() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_USER_DEFINED_INPUT_CREATE_DIALOG));\r\n\r\n Parent page;\r\n\r\n try {\r\n page = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_USER_DEFINED_INPUT_CREATE_DIALOG, ex);\r\n\r\n return;\r\n }\r\n\r\n // set the stage\r\n Stage stage = new Stage();\r\n stage.setTitle(\"Create Custom Input\");\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.centerOnScreen();\r\n stage.initOwner(mainStage);\r\n\r\n Scene scene = new Scene(page);\r\n scene.getStylesheets().add(getClass().getResource(STYLESHEET_DEFAULT).toExternalForm());\r\n\r\n stage.setScene(scene);\r\n\r\n // Set the item into the controller.\r\n UserDefinedInputCreateDialogController controller = loader.getController();\r\n controller.setStage(stage);\r\n\r\n stage.showAndWait();\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(device.getName())\n \t\t.setTitle(R.string.bt_exchange_dialog_title)\n .setPositiveButton(R.string.bt_exchange_dialog_positive_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n \t //Add BT Device Activity\n \t performBTKeyExchange(device);\n }\n })\n .setNegativeButton(R.string.bt_exchange_dialog_negative_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n \t dismiss();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "protected Dialog onCreateDialog(int id) {\n\t\n\t// Arg value corresponds to showDialog(0)\n\t\tif (id != 0)\n\t\t\treturn null;\n\t\tmyProgressDialog = new ProgressDialog(this); \n\t\tmyProgressDialog.setMessage(\"Loading ...\"); \n\t\tmyProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); \n\t\tmyProgressDialog.setCancelable(false);\n\t\treturn myProgressDialog ;\n\t}", "@Override\n\t\tpublic final Dialog onCreateDialog(final Bundle savedInstanceState) {\n\t\t\tint title = getArguments().getInt(\"title\");\n\n\t\t\treturn new AlertDialog.Builder(getActivity())\n\t\t\t\t\t.setIcon(R.drawable.alert_dialog_icon)\n\t\t\t\t\t.setTitle(title)\n\t\t\t\t\t.setPositiveButton(R.string.alert_dialog_ok,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\tfinal DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tfinal int whichButton) {\n\t\t\t\t\t\t\t\t\t((AddingActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.doPositiveClick();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(R.string.alert_dialog_cancel,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\tfinal DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tfinal int whichButton) {\n\t\t\t\t\t\t\t\t\t((AddingActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.doNegativeClick();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).create();\n\t\t}", "protected Dialog onCreateDialog(int id) {\n if (id == 1) {\n AlertDialog.Builder adb = new AlertDialog.Builder(this);\n // заголовок\n adb.setTitle(\"PIN Removed\");\n // сообщение\n adb.setMessage(\"There will be no PIN entry screen when Application starts up.\");\n // иконка\n adb.setIcon(android.R.drawable.ic_dialog_info);\n adb.setNeutralButton(\"Ok\", myClickListener);\n // создаем диалог\n return adb.create();\n }\n return super.onCreateDialog(id);\n }", "public void addDialog(String text) {\n\t\tDialog d = new Dialog(text == null ? \"\" : text);\n\t\tcontainer.add(d);\n\t\td.setVisible(true);\n\t\trefreshView();\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog.show();\n\t\t}", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(getArguments().getString(\"title\"))\n .setMessage(getArguments().getString(\"message\"))\n .setCancelable(false)\n .setPositiveButton(R.string.OK, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n // call callback method\n // mListener.onInfoDialogOKClick(InfoDialog.this);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void showDialog(Dialog dialog) {\n activeDialog = dialog;\n activeDialog.center();\n }", "@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tsuper.onCreateDialog(id);\n\t\treturn visitor.instantiateDialog(id);\n\t}", "public void showAddCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/AddCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage dialogStage = new Stage();\n\t\t\tdialogStage.setTitle(\"Add Customer\");\n\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tdialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tdialogStage.setScene(scene);\n\t\t\tAddCustomerDialogController controller = loader.getController();\n\t\t\tcontroller.setDialogStage(dialogStage);\n\t\t\tdialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "@Override\n\t\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\t\treturn mDialog;\n\t\t}", "private void showRewardDialog() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\taddRewardDialogue = RewardsDialogFragment.newInstance(\"Some Title\");\n\t\taddRewardDialogue.show(fm, \"fragment_edit_task\");\n\t}", "private static void createWindow(final Serializable object) {\n\t\tDIALOG.setVisible(false);\n\t\tFrameFactory.createFrame(object);\n\t}", "private void showDialog(String tag, int dialogTitle, int dialogList, ListenerTypes requestedListener){\n\t\tFragmentTransaction ft = getFragmentManager().beginTransaction();\n\t\tFragment prev = getFragmentManager().findFragmentByTag(tag);\n\t\tif (prev != null) {\n\t\t\tft.remove(prev);\n\t\t}\n\t\tft.addToBackStack(null);\n\n\t\t// Create and show the dialog.\n\t\tDialogFragment newFragment = MenuDialogFragment.newInstance(\n\t\t\t\tdialogTitle, dialogList, requestedListener);\n\t\tnewFragment.show(ft, tag);\n\t}", "private void showAddImageDialog() {\n new AddImageDialog()\n .show(this, new AddImageDialog.OnCompleteListener() {\n @Override\n public void onImageAdded(Item item) {\n inflateViewForItem(item);\n }\n\n @Override\n public void onError(String error) {\n new MaterialAlertDialogBuilder(MainActivity.this)\n .setTitle(\"Error\")\n .setMessage(error)\n .show();\n }\n });\n }", "public void abrirDialogoEspecie() {\n ModalDialogoEspecie modalDialogoEspecie = new ModalDialogoEspecie();\n modalDialogoEspecie.show(getSupportFragmentManager(), \"especie dialog\");\n }", "public static void showDialog(JFrame parent) {\n try {\n JDialog dialog = new InvestmentReportDialog(parent);\n dialog.pack();\n dialog.setLocationRelativeTo(parent);\n dialog.setVisible(true);\n } catch (Exception exc) {\n Main.logException(\"Exception while displaying dialog\", exc);\n }\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\n }", "public Dialog createAddPersonDialog(String title, String msg) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getMyAcitivty());\n builder.setTitle(title);\n builder.setMessage(msg);\n\n // Use an EditText view to get user input.\n final EditText input = new EditText(getMyAcitivty());\n input.setText(\"\");\n builder.setView(input);\n\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int whichButton) {\n String value = input.getText().toString();\n Log.d(TAG, \"user input: \" + value);\n inputDialogResult = value;\n launchTrainingActivity();\n// AlertDialog dg =\n// SelectServerAlertDialog.createDialog(\n// getContext(),\n// \"Pick a Server\",\n// getAllIps(),\n// launchTrainingActivityAction,\n// cancelAction,\n// true);\n// dg.show();\n }\n });\n builder.setNegativeButton(\"Cancel\", SelectServerAlertDialog.cancelAction);\n return builder.create();\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }", "public static void newJFXDialogPopUp(String min, String sec, String dist, StackPane stP) {\n System.out.println(\"DialogBox Posted\");\n JFXDialogLayout jfxDialogLayout = new JFXDialogLayout();\n jfxDialogLayout.setHeading(new Text(\"Time Details\"));\n jfxDialogLayout.setBody(new Text(\"Time Estimate: \" + min + \" \" + sec +\"\\n\" + \"Distance Estimate: \" + dist));\n JFXDialog dialog = new JFXDialog(stP, jfxDialogLayout, JFXDialog.DialogTransition.CENTER);\n JFXButton okay = new JFXButton(\"Okay\");\n okay.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n dialog.close();\n\n }\n });\n jfxDialogLayout.setActions(okay);\n dialog.show();\n }", "public void open(){\n dialog.setLocation\n (parent.getLocation().x + 10, parent.getLocation().y + 10);\n dialog.setSize(PREF_SIZE);\n dialog.setResizable(false);\n dialog.setVisible(true);\n dialog.setResizable(true);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Limite mensal excedido! Na versão gratuita, o limite máximo de publicação de caronas mensais é 4 (quatro), atualize para a versão Pro e tenha publicações ilimitadas...\")\n .setPositiveButton(\"Ir\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String url = \"https://play.google.com/store/apps/details?id=com.xetelas.nova\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getContext().startActivity(i);\n }\n })\n .setNegativeButton(\"Voltar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public abstract void initDialog();", "@Override\n protected void onPreExecute()\n {\n dialog.show();\n super.onPreExecute();\n }", "private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a new one.\");\n dialog.button(\"OK\", true);\n dialog.show(stage);\n }", "public void open() {\n popupWindow = new Window(getTypeCaption());\n popupWindow.addStyleName(\"e-export-form-window\");\n popupWindow.addStyleName(\"opaque\");\n VerticalLayout layout = (VerticalLayout) popupWindow.getContent();\n layout.setMargin(true);\n layout.setSpacing(true);\n layout.setSizeUndefined();\n popupWindow.setSizeUndefined();\n popupWindow.setModal(false);\n popupWindow.setClosable(true);\n\n popupWindow.addComponent(this);\n getMainApplication().getMainWindow().addWindow(popupWindow);\n\n onDisplay();\n }" ]
[ "0.7344519", "0.7241187", "0.7218946", "0.7183877", "0.71538234", "0.71434057", "0.7088582", "0.7011126", "0.70048153", "0.6969636", "0.69431597", "0.6928362", "0.6927173", "0.68758285", "0.6865261", "0.6838312", "0.6832828", "0.6830904", "0.6790587", "0.678631", "0.6769166", "0.6768155", "0.6756494", "0.6755535", "0.6750589", "0.67374426", "0.6713602", "0.6703682", "0.66969955", "0.66883135", "0.6684042", "0.66662824", "0.6639295", "0.66257197", "0.66062474", "0.6567585", "0.65259445", "0.6520288", "0.6487772", "0.6486707", "0.6482527", "0.6477968", "0.6471485", "0.64587134", "0.64575046", "0.6446607", "0.64390093", "0.64366704", "0.64244014", "0.6411347", "0.63782996", "0.63747287", "0.6372198", "0.636917", "0.6369113", "0.63659894", "0.6360292", "0.63496405", "0.63456887", "0.6339023", "0.633497", "0.6333755", "0.6331118", "0.63304085", "0.63299274", "0.6328353", "0.6309262", "0.6307637", "0.63074535", "0.63031924", "0.6302484", "0.6301867", "0.6299652", "0.62924886", "0.6289433", "0.6282529", "0.6268533", "0.6259062", "0.6255731", "0.6243297", "0.6242915", "0.62372077", "0.6237024", "0.62367195", "0.62346226", "0.6231674", "0.6229415", "0.6226814", "0.62261415", "0.62216", "0.6220511", "0.6215099", "0.62119913", "0.62097603", "0.62073576", "0.6207136", "0.6205012", "0.6201637", "0.61996835", "0.6197095" ]
0.6854176
15
Run an ASync task on the corresponding executor
private AsyncTask<Void, Void, Void> runAsyncTask(AsyncTask<Void, Void, Void> task) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { return task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } else { return task.execute(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void execute(Task t);", "@Override\n\tpublic void execute() {\n\t\tThreadPool pool=ThreadPool.getInstance();\n\t\tpool.beginTaskRun(this);\n\t}", "@SuppressWarnings({\"unused\", \"unchecked\"})\n public void execute(Executor executor, IN... ins) {\n asyncTask.executeOnExecutor(executor, ins);\n }", "public void runInExecutor() {\n this.executor.execute(this.callback);\n }", "public interface Executor {\n void setTask(Task task);\n Task getTask();\n void startTask();\n}", "@Override\n public void execute(final Task<T> task) {\n }", "public void runInThread() {\n\t\tTaskRunner taskRunner = Dep.get(TaskRunner.class);\n\t\tATask atask = new ATask<Object>(getClass().getSimpleName()) {\n\t\t\t@Override\n\t\t\tprotected Object run() throws Exception {\n\t\t\t\tBuildTask.this.run();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t};\n\t\ttaskRunner.submitIfAbsent(atask);\n\t}", "public void run(Task task) {\n try {\n // inject before serializing, to check that all fields are serializable as JSON\n injectionService.injectMembers(task);\n\n String s = objectMapper.writeValueAsString(task);\n log.info(\"Executing \" + s);\n\n // inject after deserializing, for proper execution\n AbstractTask deserialized = objectMapper.readValue(s, AbstractTask.class);\n injectionService.injectMembers(deserialized);\n setupTask(task);\n\n try {\n ((AbstractTask)deserialized).run(this);\n incCompletedTaskCount(task.getQueueName());\n } finally {\n teardownTask(task);\n }\n\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public static synchronized void execute(Task task) {\n Future<?> future = null;\n if (task.serial == null || !hasSerialRunning(task.serial)) {\n task.executionAsked = true;\n future = directExecute(task, task.remainingDelay);\n }\n if ((task.id != null || task.serial != null) && !task.managed.get()) {\n /* keep task */\n task.future = future;\n TASKS.add(task);\n }\n }", "<T> AsyncResult<T> startProcess(Callable<T> task);", "public void call(Runnable task) {\n if (asyncLogging) {\n executor.submit(task);\n } else {\n task.run();\n }\n }", "@Override\r\n\tvoid execute(Runnable task);", "private static void execute(EventExecutor executor, Runnable task)\r\n/* 592: */ {\r\n/* 593: */ try\r\n/* 594: */ {\r\n/* 595:670 */ executor.execute(task);\r\n/* 596: */ }\r\n/* 597: */ catch (Throwable t)\r\n/* 598: */ {\r\n/* 599:672 */ rejectedExecutionLogger.error(\"Failed to submit a listener notification task. Event loop shut down?\", t);\r\n/* 600: */ }\r\n/* 601: */ }", "public static void launchTask(Task tsk)\n {\n getInstance().doExecute(tsk);\n }", "public interface Task<T> {\n T execute();\n}", "abstract void doTaskOnRun();", "public static void executeAsyncTask(AsyncTask<Void, Void, Void> task) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n } else {\n task.execute();\n }\n }", "void executeAsync(long delayMs, Runnable task);", "public interface Task {\n void execute() ;\n}", "public interface RunnableTask {\n ProcessResult run();\n}", "public void execute(Executor executor, Runnable task) {\n if (executor instanceof SingleThreadExecutor) {\n // we can trust to own executor implementation and schedule task without advanced control\n executor.execute(task);\n return;\n }\n\n // We are having deal with unknown executor implementation in the unknown state.\n // So we need to execute task in current thread if executor failed to do it by itself,\n // but to avoid of twice execution we need to wrap around the task by AtomicBoolean\n AtomicBoolean alreadyExecuted = new AtomicBoolean(false);\n Runnable oneShotRunnable = () -> {\n if (alreadyExecuted.compareAndSet(false, true)) {\n task.run();\n }\n };\n try {\n executor.execute(oneShotRunnable);\n } catch (Throwable e) {\n // The executor can be stopped or overloaded,\n // just execute task in current thread and ignore exception\n oneShotRunnable.run();\n }\n }", "public void processTask(final EngineTask task, final TaskGroup group) {\n if (this.executor == null) {\n task.run();\n } else {\n if (this.threadError != null) {\n final Throwable t = this.threadError;\n this.threadError = null;\n throw new EncogError(t);\n }\n\n final PoolItem item = new PoolItem(task, group);\n if (group != null) {\n group.taskStarting();\n }\n this.executor.execute(item);\n }\n }", "@Override\n public void execute(final Task<T> task, final long wait, final TimeUnit unit) {\n }", "Future_<V> submit(Callable_<V> task);", "@Override\n public void run() {\n task.run();\n }", "public void execute(){\n if (pipeline != null){\n pipeline.addTask(this);\n } else {\n run();\n }\n }", "@Bean(APPLICATION_TASK_EXECUTOR_BEAN_NAME)\n @ConditionalOnMissingBean\n public AsyncTaskExecutor asyncTaskExecutor() {\n return new TaskExecutorAdapter(Executors\n .newVirtualThreadPerTaskExecutor());\n }", "public TaskReturnType Run();", "public final void execute() {\n\t\tLogUtils.i(TAG, \"execute\");\n\t\tpurelySetState(TaskState.Preparing);\n\t\tTaskQueue.addTask(this);\n\t}", "public synchronized void execute(Runnable task) throws Exception{\n \n if(threadPoolExecutor.isShutdown()){\n \tSystem.out.println(\"Thread pool \" + \"\" + \" is being Shutdown.\\n\"\n \t\t\t\t\t+ \"No tasks are allowed to be scheduled.\");\n \n }\n //add the task to the queue\n //this will cause a thread in the work pool to pick this up and execute\n queue.put(task);\n System.out.println(\"task has been added.\");\n }", "public void run(){\n try{\n doTask();\n } catch (IOException ex){\n throw new RuntimeException(ex);\n }\n }", "public abstract void task();", "<T> AsyncResult<T> startProcess(Callable<T> task, AsyncCallback<T> callback);", "private static void executeTask02() {\n }", "public abstract void doExecute(A a, TaskCompletionSource<ResultT> taskCompletionSource) throws RemoteException;", "public void collectAsync() throws IOException {\n rmiAcceptor = new RMIAcceptor(rmiPort);\n socketAcceptor = new SocketAcceptor(socketPort);\n // We prepare the task to get our first Future, it will then be overwritten once we get the promised result\n currentRMITask = threadPool.submit(rmiAcceptor);\n currentSocketTask = threadPool.submit(socketAcceptor);\n\n threadPool.execute(this::scheduledTask);\n }", "private void m1557a(Task task) {\n synchronized (f1826f) {\n if (f1827g == null) {\n f1827g = new SideChannelManager(this.f1828d.getApplicationContext());\n }\n f1827g.queueTask(task);\n }\n }", "void executeTask(org.apache.ant.common.antlib.Task task) throws org.apache.ant.common.util.ExecutionException;", "private static void threadPoolWithExecute() {\n\n Executor executor = Executors.newFixedThreadPool(3);\n IntStream.range(1, 10)\n .forEach((i) -> {\n executor.execute(() -> {\n System.out.println(\"started task for id - \"+i);\n try {\n if (i == 8) {\n Thread.sleep(4000);\n } else {\n Thread.sleep(1000);\n }\n System.out.println(\"In runnable task for id -\" + i);\n } catch (Exception e) {\n e.printStackTrace();\n }\n });\n });\n System.out.println(\"End of method .THis gets printed immdly since execute is not blocking call\");\n }", "public abstract T executor(@Nullable Executor executor);", "public void executeASync (ProcessInfo pi)\r\n\t {\r\n\t }", "void setThreadedAsyncMode(boolean useExecutor);", "public static void executeNewTask(Runnable command) {\n executorService.execute(command);\n }", "void executeStraight(Runnable task);", "public void setTaskExecutor(Executor taskExecutor) {\n this.taskExecutor = taskExecutor;\n }", "public void run()\r\n/* 996: */ {\r\n/* 997:838 */ if (DefaultPromise.this.listeners == null) {\r\n/* 998: */ for (;;)\r\n/* 999: */ {\r\n/* :00:840 */ GenericFutureListener<?> l = (GenericFutureListener)poll();\r\n/* :01:841 */ if (l == null) {\r\n/* :02: */ break;\r\n/* :03: */ }\r\n/* :04:844 */ DefaultPromise.notifyListener0(DefaultPromise.this, l);\r\n/* :05: */ }\r\n/* :06: */ }\r\n/* :07:849 */ DefaultPromise.execute(DefaultPromise.this.executor(), this);\r\n/* :08: */ }", "@Override\n\tpublic void run() {\n\t\tif (queue.size() > 0) {\n\t\t\tITask task = queue.poll();\n\t\t\tpool.execute(task);\n\t\t} else {\n\t\t\tqueue.setTaskRunning(false);\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\ttask();\n\t\t}", "@Override\r\n\tpublic void doTask() {\n\t}", "public interface TaskBase {\n public void executeTask();\n\n}", "public void execute() {\n\t\tlaunch();\n\t}", "public void execute(Runnable task) {\n Objects.requireNonNull(task, \"Task must not be null\");\n if (isStopped) {\n // throw new IllegalStateException(\"WorkerPoolExecutor has been stopped!\");\n System.out.println(\"WorkerPoolExecutor has been stopped!\");\n }\n taskQueue.add(task);\n }", "@Override\r\n\tpublic Executor getAsyncExecutor() {\n\t\treturn null;\r\n\t}", "public interface AsyncTask {\n\n\n /**\n * 这里判断任务是否需要停止,如是否超时\n */\n Boolean needStop();\n\n /**\n * 任务id\n */\n Long getTaskId();\n\n /**\n * 任务类型\n * @see com.pousheng.middle.task.enums.TaskTypeEnum\n */\n String getTaskType();\n\n ThreadPoolExecutor getTaskExecutor();\n\n Response<Long> init();\n\n void preStart();\n\n void start();\n\n void onStop();\n\n void onError(Exception e);\n\n void manualStop();\n\n AsyncTask getTask(TaskDTO task);\n}", "public void runTask(Runnable task) {\n\t\tthreadPool.execute(task);\r\n\t\t// System.out.println(\"Queue Size after assigning the\r\n\t\t// task..\"+queue.size() );\r\n\t\t// System.out.println(\"Pool Size after assigning the\r\n\t\t// task..\"+threadPool.getActiveCount() );\r\n\t\t// System.out.println(\"Task count..\"+threadPool.getTaskCount() );\r\n\t\tSystem.out.println(\"Task count..\" + queue.size());\r\n\r\n\t}", "@Override\n public void execute() {\n Task<Void> task = new Task<Void>() {\n @Override\n protected Void call() throws Exception {\n exportData();\n return null;\n }\n\n @Override\n protected void succeeded(){\n callback.onSuccess();\n super.succeeded();\n }\n\n @Override\n protected void failed(){\n callback.onFail(this.getException());\n super.failed();\n }\n };\n new Thread(task).start();\n }", "void startTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<java.lang.Boolean> callback );", "Callable<E> getTask();", "public void submitTask(WikiTask<?> task) {\n\n\t\t// get thread pool\n\t\tServletContext context = VaadinServlet.getCurrent().getServletContext();\n\t\tExecutorService threadPool = (ExecutorService) context.getAttribute(\"threadPool\");\n\n\t\t// submit task\n\t\tthreadPool.submit(task);\n\t}", "@Override\n public void run() {\n runTask();\n\n }", "public abstract void task() throws InterruptedException;", "public <T> List<T> massExec(Callable<? extends T> task);", "public static void main(String[] args) throws Exception {\n FutureTask<String> futureTask = new FutureTask<String>(new Callable<String>() {\n @Override\n public String call() throws Exception {\n Thread.sleep(10000);\n System.out.println(\"thread done ...\");\n return \"hello world\";\n }\n });\n futureTask.run();\n// executorService.submit(futureTask);\n System.out.println(futureTask.get());\n// executorService.shutdown();\n }", "protected abstract Version executeTaskLocal(Version theTask);", "protected void execute() {\n super.execute ();\n \n // processTasks is ordinarily only called when tasks have accumulated\n // in the buffer and the buffer dispatch condition has been met.\n // \n // This ensures that if there are delayed tasks, they are re-examined,\n // whether there's something in the buffer or not.\n //\n // Fix for bug #13455\n\n if (!delayedTasks.isEmpty ()) {\n processTasks (new ArrayList());\n }\n }", "public abstract TaskResult runTask(TaskKey taskKey) throws JobException;", "public void requestExtraSync()\n {\n executor.requestExtraSync();\n }", "public interface Task {\n public void run(Object o);\n}", "public void updateTask() {}", "public void runTasks() {\n promoteBlockedTasks();\n\n final AtomicInteger counter = new AtomicInteger(0);\n\n ExecutorService runners = threadPerCpuExecutor(stderr, \"TaskQueue\");\n\n for (int i = 0; i < Runtime.getRuntime().availableProcessors(); i++) {\n runners.execute(() -> {\n while (runOneTask()) {\n // running one task at a time\n counter.getAndIncrement();\n }\n });\n }\n\n runners.shutdown();\n\n try {\n runners.awaitTermination(FOREVER, TimeUnit.SECONDS);\n\n stdout.println(String.format(\"Executed tasks: %d\", counter.get()));\n\n } catch (InterruptedException e) {\n stdout.println(\"failed task: \" + e.getMessage());\n e.printStackTrace(stderr);\n throw new AssertionError();\n }\n }", "public <P,R> void executeAsyncTask(AsyncTask<P,R> task, P param, boolean showProgress, boolean lockUI) { }", "public <P,R> void executeAsyncTask(AsyncTask<P,R> task, P param, boolean showProgress, boolean lockUI) { }", "CompletableFuture<?> submit(Runnable request);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tAbsTaskAsynCallBack.this.run();\n\t\t\t\tAbsTaskAsynCallBack.this.callback();\n\t\t\t}", "public static AsyncResult async(Callable<Result> task) {\n return new AsyncResult(task);\n }", "@Asynchronous // SOLUTION\n\t//public Integer executeWorkItem(String workItem) { // INITIAL\n\tpublic Future<Integer> executeWorkItem(String workItem) { // SOLUTION\n\t\tint result = workItem.length();\n\t\tSystem.out.println(\"Worker \" + workerId + \": Start processing item '\" + workItem + \"'\");\n\t\t\n\t\tSystem.out.println(\"Worker \" + workerId + \": \" + Thread.currentThread().getName());\n\t\ttry {\n\t\t\tThread.sleep(100);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Worker \" + workerId + \": Item '\" + workItem + \"' done.\");\n\t\t\n\t\treturn new AsyncResult<Integer>(result); // SOLUTION\n//\t\treturn result; // INITIAL\n\t}", "public abstract boolean dispatch(final CallRunner callTask) throws InterruptedException;", "public void runSequential() {\n int exitVal = -101;\n try {\n exitVal = tsk.executeTask(ss == null ? null : ss.getHiveHistory());\n } catch (Throwable t) {\n if (tsk.getException() == null) {\n tsk.setException(t);\n }\n LOG.error(\"Error in executeTask\", t);\n }\n if (tsk.getException() != null) {\n result.setTaskError(tsk.getException());\n }\n result.setExitVal(exitVal);\n taskQueue.releaseRunnable();\n }", "void doWork(AbstractTaskList list);", "@SuppressWarnings({\"unused\", \"unchecked\"})\n public void execute(IN... ins) {\n asyncTask.execute(ins);\n }", "public static void async(Run runnable) {\n\t\tnew BukkitRunnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\trunnable.run();\n\t\t\t}\n\t\t}.runTaskAsynchronously(AreaShop.getInstance());\n\t}", "public interface IHttpThreadExecutor {\n public void addTask(Runnable runnable);\n}", "private void postTaskToExecutor(Runnable task) {\n try {\n mExecutor.execute(task);\n } catch (RejectedExecutionException failException) {\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception posting task to executor\",\n failException);\n // If posting a task throws an exception, then there is no choice\n // but to destroy the stream without invoking the callback.\n synchronized (mNativeStreamLock) {\n mReadState = mWriteState = State.ERROR;\n destroyNativeStreamLocked(false);\n }\n }\n }", "public void execute(){\n\t\tnew PayCarOrderTask().execute();\n\t}", "@Override\n public void run() {\n new ConnectBT().execute();\n }", "public static void main(String[] args) throws Exception {\n // construct a new executor that will run async tasks\n AsyncExecutor executor = new ThreadAsyncExecutor();\n\n // start few async tasks with varying processing times, two last with callback handlers\n AsyncResult<Integer> asyncResult1 = executor.startProcess(lazyval(10, 5000));\n AsyncResult<String> asyncResult2 = executor.startProcess(lazyval(\"test\", 3000));\n AsyncResult<Long> asyncResult3 = executor.startProcess(lazyval(50L, 7000));\n AsyncResult<Integer> asyncResult4 = executor.startProcess(lazyval(20, 4000), callback(9999));\n AsyncResult<String> asyncResult5 =\n executor.startProcess(lazyval(\"I am result5\", 6000), callback(\"Callback result 5\"));\n\n // emulate processing in the current thread while async tasks are running in their own threads\n Thread.sleep(3500); // Oh boy I'm working hard here\n log(\"Some hard work done\");\n\n // wait for completion of the tasks\n Integer result1 = executor.endProcess(asyncResult1);\n String result2 = executor.endProcess(asyncResult2);\n Long result3 = executor.endProcess(asyncResult3);\n asyncResult4.await();\n asyncResult5.await();\n\n // log the results of the tasks, callbacks log immediately when complete\n log(\"Result 1: \" + result1);\n log(\"Result 2: \" + result2);\n log(\"Result 3: \" + result3);\n log(\"Result 4: \" + asyncResult4.getValue());\n log(\"Result 5: \" + asyncResult5.getValue());\n }", "public void execute() {\n\t\t/* Create a new thread and kick it off */\n\t\tThread tempThread = new Thread(exec, \"ROSpec Executer\");\n\t\ttempThread.start();\n\t}", "public abstract ScheduledExecutorService getWorkExecutor();", "void saveTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );", "protected abstract void asyncExecuteWorkFlow(String queryId, LogicalWorkflow workflow, IResultHandler\n resultHandler) throws ConnectorException;", "private void scheduledTask() {\n connectToNewViews();\n removeDisconnectedViews();\n try {\n Thread.sleep(SCHEDULED_TASK_PERIOD);\n // Scheduling future execution\n\n synchronized (threadPool) {\n if (!threadPool.isShutdown()) {\n threadPool.execute(this::scheduledTask);\n }\n }\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }", "abstract void execute(TaskList tasks, Ui ui, Storage storage) throws IOException;", "public final void run() {\n final long contextID = Nodex.instance.getContextID();\n Runnable runner = new Runnable() {\n public void run() {\n try {\n final T result = execute();\n NodexInternal.instance.executeOnContext(contextID, new Runnable() {\n public void run() {\n completionHandler.onEvent(new Completion(result));\n }\n });\n } catch (final Exception e) {\n NodexInternal.instance.executeOnContext(contextID, new Runnable() {\n public void run() {\n completionHandler.onEvent(new Completion(e));\n }\n });\n } catch (Throwable t) {\n //Not much we can do, just log it\n t.printStackTrace(System.err);\n }\n }\n };\n\n NodexInternal.instance.executeInBackground(runner);\n }", "public interface ITaskHandler {\n\n\t/**\n\t * It is called in a separate thread to handle the task.\n\t * Parameters are thoes given in the addTask()\n\t * This method should not been called directly.\n\t * \n\t * @param pTaskType\n\t * @param pParam\n\t * @throws IllegalArgumentException\n\t */\n\tvoid handleTask(ITaskType pTaskType, Object pParam) throws IllegalArgumentException;\n}", "public final void run() {\n\t\ttask();\n\t\t_nextTaskHasRan = true;\n\t}", "public final void asyncExec( int outputs, Frame fr, boolean run_local){\n // Use first readable vector to gate home/not-home\n fr.checkCompatible(); // Check for compatible vectors\n if((_noutputs = outputs) > 0) _vid = fr.anyVec().group().reserveKeys(outputs);\n _fr = fr; // Record vectors to work on\n _nxx = (short)H2O.SELF.index(); _nhi = (short)H2O.CLOUD.size(); // Do Whole Cloud\n _run_local = run_local; // Run locally by copying data, or run globally?\n setupLocal0(); // Local setup\n H2O.submitTask(this); // Begin normal execution on a FJ thread\n }", "public Promise<Void> execute() {\n\t\tcheckInReactorThread(this);\n\t\tMap<Partition, List<Node>> nodesByPartition = getNodesByPartition();\n\t\tlong taskId = ThreadLocalRandom.current().nextInt() & (Integer.MAX_VALUE >>> 1);\n\t\treturn connect(nodesByPartition.keySet())\n\t\t\t.then(sessions ->\n\t\t\t\tPromises.all(\n\t\t\t\t\t\tsessions.stream()\n\t\t\t\t\t\t\t.map(session -> session.execute(taskId, nodesByPartition.get(session.partition))))\n\t\t\t\t\t.whenException(() -> sessions.forEach(PartitionSession::close)));\n\t}", "public synchronized void a() {\n Runnable runnable = (Runnable) this.a.poll();\n this.b = runnable;\n if (runnable != null) {\n AsyncTask.THREAD_POOL_EXECUTOR.execute(this.b);\n }\n }", "public void execute() throws InterruptedException;" ]
[ "0.6652846", "0.6461947", "0.6449219", "0.6384129", "0.6379582", "0.63616216", "0.63449717", "0.6315661", "0.63038236", "0.6200144", "0.6194103", "0.61933804", "0.61701936", "0.60813254", "0.60255086", "0.6024417", "0.6002302", "0.5988537", "0.59579504", "0.59514123", "0.5948964", "0.5909574", "0.58806866", "0.58587134", "0.585656", "0.58550036", "0.58410496", "0.58333385", "0.58186185", "0.57818264", "0.5774502", "0.5770679", "0.5768253", "0.57678", "0.5764303", "0.57262397", "0.5724774", "0.56760174", "0.56738675", "0.5664947", "0.5647635", "0.5623915", "0.56109357", "0.5608917", "0.5597379", "0.5597349", "0.55928355", "0.5589407", "0.5585677", "0.5578894", "0.5577958", "0.557754", "0.5571893", "0.5568284", "0.556461", "0.5553878", "0.5532589", "0.5521427", "0.5495307", "0.5480345", "0.5477959", "0.54728967", "0.54675967", "0.54557014", "0.545428", "0.5453188", "0.54492146", "0.54417765", "0.5439049", "0.54243153", "0.5416868", "0.5416868", "0.54048586", "0.5400065", "0.5393288", "0.5391364", "0.53910935", "0.5376639", "0.5370054", "0.53630024", "0.5357206", "0.53558064", "0.53523976", "0.53507006", "0.53503346", "0.53265435", "0.5325783", "0.53178066", "0.53139377", "0.5291998", "0.52846426", "0.5278469", "0.5274437", "0.5263458", "0.5263306", "0.5253896", "0.5252358", "0.5249136", "0.52488405" ]
0.6188229
13
Show an error message as a toast
void showError() { Toast.makeText(this, "Please select answers to all questions.", Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "private void showErrorToast() {\n }", "private void showErrorToast(String message) {\n Toast.makeText(CreateAccountActivity.this, message, Toast.LENGTH_LONG).show();\n }", "private void showErrorToast(String message) {\n Toast.makeText(CreateAccountActivity.this, message, Toast.LENGTH_LONG).show();\n }", "public void showErrorMessage(String message){\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }", "private void showErrorMessage(String message) {\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(this, message, duration);\n toast.show();\n\n }", "private void displayErrorToast()\n {\n Toast.makeText(\n getApplicationContext(),\n \"Connection to the server failed, please try again!\",\n Toast.LENGTH_LONG ).show();\n }", "void showError(String message);", "void showError(String message);", "@Override\n public void showError(Throwable throwable) {\n Toasts.show(throwable.getMessage());\n }", "public void showError(String error);", "public void toastError(String mensagem){\n\n Context context = getApplicationContext();\n CharSequence text = mensagem;\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n\n View view = toast.getView();\n\n //Obtém o plano de fundo oval real do Toast e, em seguida, define o filtro de cores\n view.getBackground().setColorFilter(getResources().getColor(R.color.colorError), PorterDuff.Mode.SRC_IN);\n\n //Obtém o TextView do Toast para que ele possa ser editado\n TextView newText = view.findViewById(android.R.id.message);\n newText.setShadowLayer(0, 0, 0, Color.TRANSPARENT);\n newText.setTextColor(getResources().getColor(R.color.colorWhite));\n\n toast.show();\n\n }", "@Override\n public void onError(ErrorObject error) {\n showToast(error.getErrorMessage());\n }", "private void showErrorOnToast(String msg) {\n mFailToLoadTextView.setVisibility(View.VISIBLE);\n mFailToLoadTextView.setText(R.string.error_msg_unable_to_load);\n Toast.makeText(MainActivity.this, msg, Toast.LENGTH_SHORT).show();\n }", "public void showError(String errorMessage);", "void showError(String errorMessage);", "protected void error(String error) {\n Toast.makeText(getApplicationContext(), error, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n showToast(\"ERROR\", Color.RED);\n e.printStackTrace();\n }", "void showErrorSnackbar();", "public void ErrorToast(IllegalArgumentException exception) {\n Toast.makeText(this, exception.getMessage(), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onError(ErrorObject error) {\n showToast(error.getErrorMessage());\n }", "@Override\r\n\t\t\t\t\tpublic void error(ResponseError error) {\n\t\t\t\t\t\tTools.toastShow(error.getMessage());\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tMaterialToast.fireToast(caught.getMessage());\n\t\t\t}", "void showErrorMsg(String string);", "private void showErrorAlert()\n {\n \tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n \tbuilder.setMessage(getResources().getString(R.string.app_error_str))\n \t .setCancelable(false)\n \t .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n \t public void onClick(DialogInterface dialog, int id) {\n \t dialog.cancel();\n \t }\n \t });\n \t \n \tAlertDialog alert = builder.create();\n \talert.show();\n }", "@Override\r\n\t\tpublic void error(ResponseError error) {\n\t\t\tTools.toastShow(error.getMessage());\r\n\t\t}", "@Override\r\n\t\tpublic void error(ResponseError error) {\n\t\t\tTools.toastShow(error.getMessage());\r\n\t\t}", "private void showToastRequired(String message) {\n Toast.makeText(this, getString(R.string.validation_required, message),\n Toast.LENGTH_SHORT).show();\n }", "public void showError (String message) {\r\n if(myAnimation != null){\r\n myAnimation.stop();\r\n }\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(ALERT_MESSAGE);\r\n alert.setContentText(message);\r\n alert.show();\r\n }", "void showToast(String message);", "void showToast(String message);", "void showError(@StringRes int errorMessage);", "private void showError(String message){\n\t\tsetupErrorState();\n\t\tsynapseAlert.showError(message);\n\t}", "public void displayError(String message){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(message);\n //alert.initOwner(owner);\n alert.show();\n }", "public void errorMessage(String CustomErrorMessage){\n Toast toast = Toast.makeText(this, CustomErrorMessage, Toast.LENGTH_SHORT);\n TextView v = (TextView) toast.getView().findViewById(android.R.id.message);\n if( v != null) v.setGravity(Gravity.CENTER);\n toast.show();\n\n return;\n }", "@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n\t\t\tpublic void onFailed(String str) {\n\t\t\t\tToast.makeText(MainActivity.this, str, Toast.LENGTH_LONG).show();\n\t\t\t}", "public void onError(Exception error) {\n Toast.makeText(getApplicationContext(),\n error.getMessage(),\n Toast.LENGTH_LONG\n ).show();\n }", "@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "private void displayToast(String message) {\n Toast.makeText(OptionActivity.this, message, Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void showError(String message) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}", "@Override\n public void onError(Status status) {\n createToast(\"Error occurred, please wait\");\n }", "public void showToast(Boolean usernameTaken) {\n String action = \"\";\n if (usernameTaken) {\n action = \"Username is already taken\";\n } else {\n action = \"An error has occurred. Please try again.\";\n }\n Toast t = Toast.makeText(this, action,\n Toast.LENGTH_SHORT);\n t.setGravity(Gravity.TOP, Gravity.CENTER, 150);\n t.show();\n }", "private void showErroAlert(String errorMessage) {\n LOGGER.log(Level.INFO, \"Showing Alert window with error message...\");\n Alert errorAlert = new Alert(Alert.AlertType.ERROR, errorMessage, ButtonType.OK);\n errorAlert.show();\n }", "void errorBox(String title, String message);", "@Override\n public void onError(Throwable e) {\n Log.e(TAG, e.getMessage());\n _view.showMessage(R.string.msg_erro);\n }", "private void displayError(String errorText) {\n\t\tMessageBox messageBox = new MessageBox(shell, SWT.OK);\n\t\tmessageBox.setMessage(errorText);\n\t\tmessageBox.setText(\"Alert\");\n\t\tmessageBox.open();\n\t}", "private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "private void showErrorView() {\n Log.d(\"lodd\", \"showSuccessView: hjfj91919515\");\n\n }", "private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"\"+e.getMessage(),Toast.LENGTH_SHORT).show();\n\n }", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onError(Status status) {\n Toast.makeText(getApplicationContext(), \"error\",\n Toast.LENGTH_SHORT).show();\n\n\n }", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "public void showErrorMessage(String message){\n System.out.println(LocalTime.now() + \": Error: \" + message);\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void showError(String error){\n errorInformation.setText(error);\n errorPane.setVisible(true);\n fadeEffect(0,1,150,errorPane);\n playSound(\"src/media/sound/error.mp3\");\n }", "private void handleError(String error, Exception exception) {\n Toast.makeText(this, error, Toast.LENGTH_SHORT)\n .show();\n if (exception != null)\n exception.printStackTrace();\n }", "@Override\n public void gotIngredientsError(String message) {\n Toast toast = Toast.makeText(this, message, Toast.LENGTH_SHORT);\n toast.show();\n }", "private void displayToast(String message) {\n Toast.makeText(getLayoutInflater().getContext(), message, Toast.LENGTH_SHORT).show();\n }", "private void doToast() {\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\t\r\n\t\t// Create and send toast\r\n\t\tContext context = getApplicationContext();\r\n\t\tint duration = Toast.LENGTH_SHORT;\r\n\t\tToast toast = Toast.makeText(context, message, duration);\r\n\t\ttoast.show();\r\n\t}", "@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "private void errorMessage(String message) {\n \tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n \tAlertDialog dialog = builder.setMessage(message).setTitle(\"Error\").create();\n \tdialog.show();\n }", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void showToast(final String message, final int toastLength) {\n post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getActivity(), message, toastLength).show();\n }\n });\n }", "private void error(String message) { \n Alert alert = new Alert(Alert.AlertType.ERROR, message);\n alert.setTitle(I18n.tr(\"imagesizedialog.error.title\"));\n alert.setContentText(message);\n alert.showAndWait();\n }", "protected void showToast(String message) {\n\tToast.makeText(this, message, Toast.LENGTH_SHORT).show();\n}", "private void toastMessage(String message) {\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void showError(@StringRes int messageId, @Nullable Object... args) {\n if (getView() != null) {\n //When we have the root view\n\n //Evaluating the message to be shown\n String messageToBeShown;\n if (args != null && args.length > 0) {\n //For the String Resource with args\n messageToBeShown = getString(messageId, args);\n } else {\n //For the String Resource without args\n messageToBeShown = getString(messageId);\n }\n\n if (!TextUtils.isEmpty(messageToBeShown)) {\n //Displaying the Snackbar message of indefinite time length\n //when we have the error message to be shown\n\n new SnackbarUtility(Snackbar.make(getView(), messageToBeShown, Snackbar.LENGTH_INDEFINITE))\n .revealCompleteMessage() //Removes the limit on max lines\n .setDismissAction(R.string.snackbar_action_ok) //For the Dismiss \"OK\" action\n .showSnack();\n }\n }\n }", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }", "public void showToast(String text)\n {\n Text icon = GlyphsDude.createIcon(FontAwesomeIconName.CHECK_CIRCLE,\"1.5em\");\n icon.setFill(Color.WHITE);\n Label l = new Label(text) ;\n l.setTextFill(Color.WHITE);\n l.setGraphic(icon);\n snackbar = new JFXSnackbar(PrinciplePane);\n snackbar.enqueue( new JFXSnackbar.SnackbarEvent(l));\n }", "public void toast (String msg)\n\t{\n\t\tToast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();\n\t}", "private void showErrorDialog(String message){\n new AlertDialog.Builder(this)\n .setTitle(\"Error\")\n .setMessage(message)\n .setPositiveButton(android.R.string.ok,null)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "void showError(Throwable throwable);", "private void showErrorMessage() {\n gridview.setVisibility(View.INVISIBLE);\n // Then, show the error\n errorTextView.setVisibility(View.VISIBLE);\n }", "private void logError(String message, Throwable error, boolean alertUser){\n // always log the error\n log.e(TAG, message, error);\n // alert the user to avoid silent errors\n if (alertUser){\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG).show();\n\n }\n\n }", "private void errorAlert(String msg) {\n Alert dialog = new Alert(Alert.AlertType.ERROR);\n dialog.setTitle(\"Error\");\n dialog.setHeaderText(\"!!\");\n dialog.setContentText(msg);\n dialog.show();\n }", "private void makeToast(String message){\n Toast.makeText(SettingsActivity.this, message, Toast.LENGTH_LONG).show();\n }", "private void errorPopUp() {\n new AlertDialog.Builder(mActivity)\n .setTitle(\"Oops\")\n .setMessage(\"Please choose an emotional state or enter a date and time\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Go back without changing anything\n dialogInterface.dismiss();\n }\n })\n .create()\n .show();\n }", "private void showErrorDialogue() {\n\t\ttry {\n\t\t\tnew AlertDialog.Builder(mContext)\n\t\t\t\t\t.setTitle(\"Something unfortunate happened...\")\n\t\t\t\t\t.setMessage(\"Your device was not able to verify activation. Please check your internet connection and ensure you are using the latest version of the application.\")\n\t\t\t\t\t.setNeutralButton(\"Close\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.show();\n\t\t} catch (Exception e) {\n\t\t\t//not in main activity, not a problem\n\t\t\tLog.w(TAG, e.getMessage());\n\t\t}\n\t}", "public void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message,\n Toast.LENGTH_SHORT).show();\n }", "public static void displayToast(Context context, String msg) {\n Toast.makeText(context, msg, Toast.LENGTH_LONG).show();\n\n }", "void showToast(String value);", "private void showError(String text, String title){\n JOptionPane.showMessageDialog(this,\n text, title, JOptionPane.ERROR_MESSAGE);\n }", "public void mensagemErro(String m) {\r\n Alert alerta = new Alert(Alert.AlertType.ERROR);\r\n alerta.setTitle(\"ERRO!\");\r\n alerta.setHeaderText(null);\r\n alerta.setContentText(m);\r\n alerta.showAndWait();\r\n }", "private void showErrorMessage(String title, String body)\r\n {\r\n MyLogger.log(Level.INFO, \"Error message initiated. Error Title: {0}\", title);\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n alert.initOwner(currentStage);\r\n alert.setTitle(title);\r\n alert.setHeaderText(null);\r\n alert.setContentText(body);\r\n alert.showAndWait();\r\n }", "void displayErrorMessage(String message);", "private void displayErrorDialog(String message) {\n AlertDialog.Builder builder;\n\n builder = new AlertDialog.Builder(this);\n builder.setTitle(getString(R.string.er_error))\n .setMessage(message)\n .setNegativeButton(getString(R.string.bt_close), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n }).setIcon(android.R.drawable.stat_notify_error).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Context context = getApplicationContext();\n CharSequence text = \"Erreur lors de la connexion ! Veuillez recommencer\";\n\n Toast toast = Toast.makeText(context, text, Toast.LENGTH_LONG);\n toast.show();\n }", "public abstract void showErrorBox(Throwable error);" ]
[ "0.8339651", "0.8273279", "0.8128142", "0.8128142", "0.7826262", "0.78077805", "0.77832043", "0.7680177", "0.7680177", "0.759481", "0.75799245", "0.7556874", "0.7487612", "0.7467888", "0.74477285", "0.74414325", "0.7434455", "0.74249345", "0.7412281", "0.7402347", "0.73978424", "0.73223567", "0.7263967", "0.72482777", "0.71846783", "0.71815836", "0.71815836", "0.7158617", "0.7137937", "0.7118033", "0.7118033", "0.70294696", "0.7026385", "0.70224863", "0.6984799", "0.697916", "0.69767094", "0.6965091", "0.6964349", "0.69539696", "0.69539696", "0.69008625", "0.6875318", "0.6871379", "0.6871379", "0.6871379", "0.68686354", "0.68623334", "0.6837331", "0.6834116", "0.68085164", "0.68019706", "0.68006754", "0.6799601", "0.67990154", "0.6795982", "0.6795646", "0.6793063", "0.6773238", "0.6772633", "0.67648286", "0.6763317", "0.673474", "0.67177147", "0.6709362", "0.6709362", "0.67013407", "0.6701222", "0.66950244", "0.66937816", "0.66918087", "0.6668096", "0.666314", "0.66519415", "0.6650441", "0.663839", "0.6635894", "0.66335124", "0.66315216", "0.66305137", "0.66177917", "0.6614447", "0.6598955", "0.6598747", "0.6593057", "0.6589237", "0.65870595", "0.6586136", "0.6581685", "0.65795696", "0.6566809", "0.6562673", "0.65574473", "0.6552754", "0.655076", "0.6537931", "0.65357393", "0.6533242", "0.65313476", "0.6527521" ]
0.6804522
51
Return a list the people
public List<People> getPeople();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Person> getListPeople() {\n\t\tList<Person> people = new ArrayList<>();\n\t\tpeople.add(new Person(\"Juan\", 25));\n\t\tpeople.add(new Person(\"Ana\", 30));\n\t\tpeople.add(new Person(\"Eva\", 42));\n\t\tpeople.add(new Person(\"Piter\", 27));\n\t\tLOG.info(\"HELLO FROM SERVICE\");\n\t\treturn people;\n\t}", "java.util.List<People>\n getUserList();", "@Override\r\n\tpublic List<Person> getPeople() {\n\t\tList<Person> personList = new ArrayList<Person>();\r\n\t\tpersonList.add(getPerson(234L));\r\n\t\tpersonList.add(getPerson(123L));\r\n\t\tpersonList.add(getPerson(345L));\r\n\t\tpersonList.add(getPerson(42L));\r\n\t\treturn personList ;\r\n\t}", "void getPeople();", "java.util.List<People>\n getFriendListList();", "public ArrayList<Person> getAllPeople()\r\n\t{\r\n\t\treturn dataService.getAllPeople();\r\n\t}", "public List<SamplePerson> getAllPeople() {\n //TODO\n throw new NotImplementedException();\n }", "public List<Person> getAllPerson() {\n \t\n //Collection<Person> c = personMap.values();\n List<Person> list = new ArrayList<Person>();\n //list.addAll(c);*/\n list = queryExecutor.selectAll();\n return list;\n }", "People getFriendList(int index);", "public List<Personname> getPersonnames() {\r\n\r\n if (this.personnames == null) {\r\n\r\n this.personnames = new ArrayList<Personname>();\r\n\r\n }\r\n\r\n return this.personnames;\r\n\r\n }", "java.util.List<com.ljzn.grpc.personinfo.PersoninfoMessage> \n getPersonInfoList();", "public static List<Person> getExamplePeople() {\n return Arrays.asList(\n new Person(\"1230\", \"John\", \"Smith\", LocalDate.of(1965, 1, 20), \"Some Street 3, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Home number\", \"+123 4567890\"),\n new PersonContact(PersonContactType.EMAIL, \"Personal e-mail\", \"[email protected]\")\n )\n ),\n new Person(\"1231\", \"Jack\", \"Tree\", LocalDate.of(1971, 3, 20), \"Some Street 9, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.MOBILE, \"Personal number\", \"+123 456789011\")\n )\n ),\n new Person(\"1232\", \"Mary\", \"Jones\", LocalDate.of(1980, 2, 20), \"Some Street 7, Some City, Some Country\", \n null\n ),\n new Person(\"1233\", \"Maria\", \"Johnson\", LocalDate.of(1991, 9, 12), \"Some Street 30, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Work number\", \"+123 4634563\")\n )\n ),\n new Person(\"1234\", \"Luke\", \"Miller\", LocalDate.of(1986, 12, 3), \"Some Street 87, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Home number\", \"+123 13433653\"),\n new PersonContact(PersonContactType.EMAIL, \"Personal e-mail\", \"[email protected]\"),\n new PersonContact(PersonContactType.MOBILE, \"Preferred contact\", \"+123 365346456\")\n )\n ),\n new Person(\"1235\", \"Michelle\", \"Smith\", LocalDate.of(1966, 6, 30), \"Some Street 3, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Home number\", \"+123 4567890\"),\n new PersonContact(PersonContactType.EMAIL, \"Personal e-mail\", \"[email protected]\")\n )\n )\n );\n }", "@Override\n public List<Person> getPeople() {\n return this.personRepository.findAll();\n }", "public List<Person> getPersonList(){\n return personList;\n }", "public ObservableList<peopleModel> returnPeople() {\n ObservableList<peopleModel> people = FXCollections.observableArrayList();\n people.add(new peopleModel(\"Jim\", \"Falcon\", 32));\n people.add(new peopleModel(\"Bob\", \"Thimson\", 65));\n people.add(new peopleModel(\"Carl\", \"Acusto\", 47));\n people.add(new peopleModel(\"Steven\", \"Ban\", 34));\n people.add(new peopleModel(\"Derp\", \"Derpina\", 72));\n return people;\n }", "public List<Person> getFamilyMembers(String name) {\n\t\tMap<String, Object> parameters = new HashMap<>();\n\t\tparameters.put(\"name\", name);\n\t\tString cypher = GraphQueries.GET_PERSONS_BY_FAMILY_NAME;\n\t\t\n\t\tResult result = session.query(cypher, parameters);\n\t\tIterator<Map<String, Object>> it = result.iterator();\n\t\tlogger.info(\"Cypher query [\" + cypher + \" with parameters \" + parameters);\n\t\tint n = 0;\n\t\tList<Person> list = new ArrayList<Person>();\n\t\twhile (it.hasNext()) {\n\t\t\tn++;\n\t\t\tMap<String, Object> row = it.next();\n\t\t\tlogger.debug(\"result row \" + n + \" \" + row);\n\t\t\tString key = \"n\";\n\t\t\tPerson p = Person.class.cast(row.get(key));\n\t\t\tlogger.debug(\"row has key (\" + key + \") with value \" + p + \" of \" + p.getClass()\n\t\t\t+ \" and id \" + p.getId());\n\t\t\tPerson x = session.load(Person.class, p.getId());\n\t\t\tlist.add(x);\n\t\t\tlogger.debug(\"person \" + x);\n\t\t}\n\t\treturn list;\n\t}", "public List<Persona> todasLasPersonas(){\n\n Iterable<Persona> ite=repo.findAll();\n Iterator<Persona> it=ite.iterator();\n List<Persona> actualList = new ArrayList<Persona>();\n while (it.hasNext()) {\n actualList.add(it.next());\n }\n\n return actualList;\n }", "public List<String> getListe()\n\t\t\t{\n\t\t\t\treturn personnes;\n\t\t\t}", "public List<Person> findAllUsers(){\n\t\t\n\t\tQuery q = em.createQuery(\"SELECT p FROM Person p \");\n\t\tList<Person> users = q.getResultList();\n\t\treturn users;\n\t}", "public java.util.List<People> getUserList() {\n return java.util.Collections.unmodifiableList(\n instance.getUserList());\n }", "public java.util.List<People> getUserList() {\n return user_;\n }", "@Override\r\n\tpublic ArrayList<Person> getAllPersons() {\n\t\treturn null;\r\n\t}", "public static Map<String, Person> GetPersons()\n {\n List<Person> persons = dataWraper.getAll(FrekenBok.class);\n Map<String, Person> personMap = new HashMap<>();\n\n persons.forEach( (i)->\n personMap.put(i.GetName(), i)\n );\n\n persons = dataWraper.getAll(LitleBoy.class);\n persons.forEach( (i)->\n personMap.put(i.GetName(), i)\n );\n\n return personMap;\n }", "@Override\n\tpublic List<Person> getAllPersons() {\n\t\treturn null;\n\t}", "public ArrayList<Person> getPeople(String descendant) {\n String sql = \"SELECT firstName, lastName, personId, AssociatedUsername,gender,father,mother,spouse FROM Person WHERE AssociatedUsername = ?\";\n Person output = null;\n ArrayList<Person> people = null;\n\n try {\n PreparedStatement pstmt = conn.prepareStatement(sql);\n pstmt.setString(1, descendant);\n ResultSet rs = pstmt.executeQuery();\n\n //input the data into model\n while (rs.next()) {\n output = new Person(rs.getString(\"personId\"), rs.getString(\"AssociatedUsername\"),\n rs.getString(\"firstName\"), rs.getString(\"lastName\"), rs.getString(\"gender\"),\n rs.getString(\"father\"), rs.getString(\"mother\"), rs.getString(\"spouse\"));\n\n\n if (people == null)\n people = new ArrayList<>();\n people.add(output);\n }\n\n rs.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return people;\n }", "public Enumeration<String> getPersonList() {\r\n\t\treturn this.persons.keys();\r\n\t}", "private List<Person> fetchingUtility() {\n List<Person> fetchedList = new ArrayList<>();\n fetchedList.add(new Person(-26.220616, 28.079329, \"PJ0\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.187616, 28.079329, \"PJ1\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.207616, 28.079329, \"PJ2\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.217616, 28.079329, \"PJ3\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.346316, 28.079329, \"PJ4\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.215896, 28.079329, \"PJ5\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.215436, 28.079129, \"PJ6\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.431461, 28.079329, \"PJ7\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.168879, 28.079329, \"PJ8\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.227616, 28.079329, \"PJ9\", \"https://twitter.com/pjapplez\", false));\n\n return fetchedList;\n }", "@GetMapping(path=\"/showData\")\n public List<Person> showData() {\n Iterable<Person> myPerson = personRepository.findAll();\n List<Person> listOfPersons = new ArrayList<>();\n myPerson.forEach((Person person) -> {\n listOfPersons.add(person);\n });\n return listOfPersons;\n }", "@GetMapping(\"/person\")\n\tpublic List<Person> get(){\n\t\treturn personService.get();\n\t}", "public static LinkedList<Person> allMalePerson() {\n LinkedList<Person> maleList = new LinkedList<>();\n maleList.add(BENSON);\n maleList.add(CARL);\n maleList.add(DANIEL);\n maleList.add(GEORGE);\n return maleList;\n }", "public List getAll(){\n\t\tList<Person> personList = personRepository.getAll();\n\t\treturn personList;\n\t}", "ObservableList<Person> getDisplayedPersonList();", "public ArrayList<Person> getPersons(String username) throws DataAccessException {\n Person person;\n ArrayList<Person> people = new ArrayList<>();\n ResultSet rs = null;\n String sql = \"SELECT * FROM persons WHERE assoc_username = ?;\";\n try(PreparedStatement stmt = conn.prepareStatement(sql)) {\n stmt.setString(1, username);\n rs = stmt.executeQuery();\n while (rs.next()) {\n person = new Person(rs.getString(\"person_id\"), rs.getString(\"assoc_username\"),\n rs.getString(\"first_name\"), rs.getString(\"last_name\"),\n rs.getString(\"gender\"), rs.getString(\"father_id\"),\n rs.getString(\"mother_id\"), rs.getString(\"spouse_id\"));\n people.add(person);\n }\n return people;\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Error encountered while finding person\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public String showAllPersons() {\n String string = \"\";\n for(Person person: getPersons().values()){\n string += person.toString();\n }\n return string;\n }", "public com.hps.july.persistence.People getPeople() throws java.rmi.RemoteException, javax.ejb.FinderException {\n\treturn (com.hps.july.persistence.People)this.getPeopleLink().value();\n}", "Collection<String> getUsernames();", "public ArrayList<Person> getAllPersons() throws IllegalArgumentException {\r\n\t\treturn this.personMapper.findAll();\r\n\t}", "public Optional<List<T>> returnPeople(){\n return Optional.of(people);\n }", "public static void personTest(){\n ArrayList<Person> people = new ArrayList<>();\n //people[0] = new Person(\"Fer\", \"Mendoza\", true);\n people.add(new Person(\"Fer\", \"Mendoza\", true));\n people.add(new Person(\"Stacy\", \"Malibu\", false));\n people.add(new Person(\"Ana\", \"Morton\", true));\n\n for (Person person : people) {\n System.out.println(\"person.getFullName() = \" + person.getFullName());\n }\n\n }", "public List<Person> UserSelect() {\n\t\t System.out.println(\"UserSelect\");\n\t\t return personDAO.getPersons();\n\t}", "@Override\n\tpublic List<Person> getAllPersons() {\n\t\treturn (List<Person>) personDao.findAll();\n\t}", "public List<User> getUserList();", "public DefaultListModel<Person> getAllPeopleDLM()\r\n\t{\r\n\t\tDefaultListModel<Person> list = new DefaultListModel<Person>();\r\n\t\t\r\n\t\tfor(Person person : this.getAllPeople())\r\n\t\t\tlist.addElement(person);\r\n\t\t\r\n\t\treturn list;\r\n\t}", "public ArrayList<Person> getAllPeopleFromEvent(Event event)\r\n\t{\r\n\t\treturn event.getPeopleList();\r\n\t}", "People getUser();", "InternalResultsResponse<Person> fetchAllPersons();", "public People getFriendList(int index) {\n return instance.getFriendList(index);\n }", "public Person[] getAllUsers() \r\n\t{\r\n\t\tString[][] stringArray = db.user_getUsers();\r\n\t\tPerson[] personArray = new Person[stringArray.length];\r\n\t\tfor(int i = 0; i < stringArray.length; i++) \r\n\t\t{\r\n\t\t\tString firstname = stringArray[i][0];\r\n\t\t\tString lastname = stringArray[i][1];\r\n\t\t\tString username = stringArray[i][2];\r\n\t\t\tString password = stringArray[i][3];\r\n\t\t\tchar type = stringArray[i][4].charAt(0);\r\n\t\t\tchar status = stringArray[i][5].charAt(0);\r\n\t\t\tString[][] savedArray = db.user_getUsernamesWithSavedSchools();\r\n\t\t\tArrayList<String> schoolsList = new ArrayList<String>(); \r\n\t\t\tfor (String[] pair : savedArray) {\r\n\t\t\t\tif (pair[0].equals(username))\r\n\t\t\t\t\tschoolsList.add(pair[1]);\r\n\t\t\t}\r\n\t\t\tString[] savedSchools = new String[0];\r\n\t\t\tsavedSchools = schoolsList.toArray(savedSchools);\r\n\t\t\tpersonArray[i] = new Person(firstname, lastname, username, password, type, status, savedSchools);\r\n\t\t}\r\n\t\treturn personArray;\r\n\t}", "public List<Person> read() {\n Session session = getSessionFactory().openSession();\n List<Person> persons = session.createQuery(\"FROM Person\").list();\n session.close();\n LOGGER.log(Level.INFO,\"Found \" + persons.size() + \" persons\");\n return persons;\n }", "public Map<String, Person> getPeople() {\n return people;\n }", "public List<Person> createPerson() throws ParseException {\n\t\tList<Person> lespersons = new ArrayList<Person>();\n\t\tint numOfPersons = manager.createQuery(\"Select p From Person p\", Person.class).getResultList().size();\n\n if (numOfPersons == 0) {\n \tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n \tPerson p1 = new Person(\"dupont\", \"paul\", \"[email protected]\", \"M\", \"http://\", simpleDateFormat.parse(\"06/12/1965\"));\n \tPerson p2 = new Person(\"durand\", \"gerard\", \"[email protected]\", \"F\", \"http://\", simpleDateFormat.parse(\"06/04/1965\"));\n \tPerson p3 = new Person(\"Pierre\", \"martin\", \"[email protected]\", \"M\", \"http://\", simpleDateFormat.parse(\"06/08/1965\"));\n \tp1.getListAmis().add(p2);\n \tp2.getListAmis().add(p1);\n \tp2.getListAmis().add(p3);\n manager.persist(p1);\n manager.persist(p2);\n manager.persist(p3);\n lespersons.add(p1);\n lespersons.add(p2);\n lespersons.add(p3);\n }\n return lespersons;\n\t}", "public List<String> getByName(String name) {\r\n List<String> listOfUser = new ArrayList<>();\r\n for(User user : userRepository.findByName(name)){\r\n listOfUser.add(user.toString());\r\n }\r\n return listOfUser;\r\n }", "@Override\r\n\tpublic List<Person> findAll(){\n\t\tQuery query=em.createQuery(\"Select p from Person p\");\r\n\t\tList<Person> list = query.getResultList();\r\n\t\treturn list;\r\n\t}", "public List<persona> listar() {\n\t\tList<persona>lista= new ArrayList<>();\n\t\t\n\t\tString sql=\"SELECT * FROM TABLA.TABLA;\";\n\t\ttry {\n\t\t\n\t\tcon = c.conectar();\n\t\tps= con.prepareStatement(sql);\n\t\trs=ps.executeQuery();\n\t\t\n\t\twhile(rs.next()) {\n\t\t\tPersona p= new persona();\n\t\t\tp.setId(rs.getString(1));\n\t\t\tp.setNom(rs.getString(2));\n\t\t\tlista.add(p);\n\t\t}\n\t}catch (Exception e) {\n\t\t\n\t}return lista;\n\t\n\t}", "@GetMapping(\"/listPeople\")\r\n public ModelAndView listPeople() {\r\n LOG.debug(\"listPeople\");\r\n ModelAndView mav = new ModelAndView(LIST_PEOPLE_VIEW);\r\n mav.addObject(\"people\", personService.getPeople());\r\n return mav;\r\n }", "@Test\n\tpublic void testGetListPersons_thenReturnListOfPersons() {\n\t\t// GIVEN\n\t\tPerson personJohnBoyd = new Person(\"John\", \"Boyd\", \"1509 Culver St\", \"Culver\", \"97451\", \"841-874-6512\",\n\t\t\t\t\"[email protected]\");\n\t\twhen(personDAOMock.getPersons()).thenReturn(mockList);\n\t\t// WHEN\n\t\tList<Person> resultListgetted = personServiceTest.getListPersons();\n\t\t// THEN\n\t\tassertEquals(personJohnBoyd, resultListgetted.get(0));\n\t\t// the list contain 4 elements\n\t\tassertEquals(4, resultListgetted.size());\n\t}", "public ArrayList<Person> getAll() throws IOException, JSONException {\n\t\tif(persons.isEmpty()){\n\t\t\tpersons=getAllFromServer();\n\t\t}\n\t\treturn persons;\n\t}", "List<User> getMembers(String companyId, String name);", "public ArrayList<Personne> getListPersonne() {\n\t\treturn listPersonne;\n\t}", "List<User> getUserByName(String name);", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "@Override\r\n\tpublic List<PersonneDTO> getAllPersonne() {\n\t\treturn daoPersonne.getAllPersonne();\r\n\t}", "public List<User> list();", "@Override\r\n\tpublic Map<String, MemberDto> nameList() {\n\t\tMap<String, MemberDto> list = new HashMap<>();\r\n\t\tfor (String email : emailList()) {\r\n\t\t\tlist.put(email, myInfo(email));\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "Iterable<Person> getList() throws DataAccessException;", "public List<PersonEntity> obtenerDatosPersonas() {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONAS(), PersonEntity.class);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONAS() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "List<User> getUsers();", "List<User> getUsers();", "public ReactorResult<InvolvedPerson> getAllInvolvedPerson_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), INVOLVEDPERSON, InvolvedPerson.class);\r\n\t}", "public static String[] getAllNames(){\n int size = getCountofPeople();\n String[] names = new String[size];\n\n try (Connection con = DriverManager.getConnection(url, user, password)){\n String query = \"SELECT name FROM \"+DATABASE_NAME+\".People;\";\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n int i = 0;\n\n while (rs.next()) {\n names[i] = rs.getString(1);\n i++;\n }\n \n con.close();\n }catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return names;\n }", "public static ArrayList<String> getNameFromPerson(ArrayList<Person> persons){\n ArrayList<String> nameList = new ArrayList<String>();\n for(Person person : persons){\n nameList.add(person.name);\n }\n return nameList;\n }", "@NonNull\n public String getPeople(List<ComicCharactersResponse.CreatorResponse> listOfPeople) {\n StringBuilder builder = new StringBuilder();\n for (ComicCharactersResponse.CreatorResponse creator : listOfPeople) {\n String role = \"\";\n if (!TextUtils.isEmpty(creator.getRoleOfCreator())) {\n role = creator.getRoleOfCreator() + \": \";\n }\n builder.append(role);\n builder.append(creator.getNameOfCreator());\n builder.append(\"\\n\");\n }\n return builder.toString();\n }", "private void loadExamplePeople(){\r\n\t\tpeople.add(new Person(\"Quiche\",\"Lorraine\",\"617-253-1000\",\"[email protected]\",Color.RED,this));\r\n\t\tpeople.add(new Person(\"Alice\",\"Whacker\",\"617-253-7788\",\"[email protected]\",Color.RED.darker().darker(),this));\r\n\t\tpeople.add(new Person(\"Zygorthian\",\"Space-Raiders\",\"617-253-1541\",\"[email protected]\",new Color(50,70,90),this));\r\n\t\tpeople.add(new Person(\"Opus\",\"\",\"617-253-1000\",\"[email protected]\",Color.RED.darker(),this));\r\n\t\tpeople.add(new Person(\"Rick\",\"Chang\",\"617-232-3257\",\"[email protected]\",Color.RED.darker().darker().darker(),this));\r\n\t\tpeople.add(new Person(\"Ben\",\"Bitdiddle\",\"303-494-4774\",\"[email protected]\",new Color(56,50,50),this));\r\n\t\t\r\n\t}", "List<String> getResponsibleDoctorNames();", "ImmutableList<SchemaOrgType> getAccountablePersonList();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "protected Collection<RS_User> selectUsersFromPersons(String query) {\n\t\tCollection<RS_User> users = new SortedArrayList<RS_User>();\n\t\t//TODO Robbert: is deze keuze hier ok???\n\t\t\n\t\tResultSet rs;\n\t\ttry {\n\t\t\tStatement stat = conn.createStatement();\n\t\t\trs = stat.executeQuery(query);\n\t\t\t\n\t\t\twhile (rs.next()) {\t\n\t\t\t\tString username = rs.getString(\"lfm_username\");\n\t\t\t\tint age = rs.getInt(\"age\");\n\t\t\t\tString country = rs.getString(\"country\");\n\t\t\t\tString language = rs.getString(\"language\");\n\t\t\t\tString gender = rs.getString(\"gender\");\n\t\t\t\tRS_User rsu = new RS_User(username, age, country, language, gender);\n\t\t\t\tusers.add(rsu);\n\t\t\t}\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Something went wrong selecting results from Persons\");\n\t\t}\n\t\treturn users;\n\t}", "List<Persona> obtenerTodasLasPersona();", "@RequestMapping(\"/programmers-list\")\n public List<Programmer> getProgrammerListMembers() {\n return programmerService.getProgrammersListMembers();\n\n }", "@GetMapping(\"/personas\")\n\tpublic List<Persona> allPersonas(){\n\t\treturn personaRepository.findAll();\n\t\t\n\t}", "public String returnPeople(int index)\n\t{\n\t\treturn(peopleList.get(index).toString());\n\t}", "public People getPeopleById(Long id);", "List<KingdomUser> getUsers();", "public List<PersonaDTO> consultarPersonas() ;", "public List<User> getUsers();", "People getUser(int index);", "public List<String > getNames(){\n List<String> names = new ArrayList<>();\n String fNameQuery = \"SELECT \" + _IDP + \",\" + COL_F_NAME + \",\" + COL_L_NAME + \" FROM \" + TPYTHONISTAS + \" ;\";\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(fNameQuery, null);\n String name;\n if (c.moveToFirst()) {\n do {\n // put together NameID#, period, Lastname, Firstname\n name = c.getString(0) + \". \" + c.getString(2) + \", \" + c.getString(1);\n names.add(name);\n } while (c.moveToNext());\n }\n c.close();\n db.close();\n return names;\n }", "public List<User> list();", "public static ArrayList<Member> findAll(){\n setConnection();\n \n ArrayList<Member> members = new ArrayList<>();\n \n try{\n //Preparing for DB query\n Statement statement = con.createStatement();\n \n ResultSet result = statement.executeQuery(\"SELECT * FROM member\");\n\n while(result.next()){\n int memberId = result.getInt(1);\n String name = result.getString(2);\n String email = result.getString(3);\n String phone = result.getString(4);\n String address = result.getString(5);\n String dob = result.getString(6);\n \n Member member = new Member(memberId, name, email, phone, address, dob);\n \n members.add(member);\n }\n \n con.close();\n } catch (SQLException e){\n System.out.println(e.getMessage());\n }\n \n return members;\n }", "public List <Person> getDetails(List <Person> listOfPerson)\n\t{\n\t\tSystem.out.println(\"Enter the First Name of the Person you want the details of:\");\n\t\tString name = Utility.inputString();\t\n\t\tfor(int i = 0; i < listOfPerson.size(); i++)\n\t\t{\n\t\t\tif(listOfPerson.get(i).getFname().equals(name))\n\t\t\t{\n\t\t\t\tPerson temp = listOfPerson.get(i);\n\t\t\t\tSystem.out.println(temp.toString());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Person not found\");\n\t\t\t}\n\t\t}\n\t\treturn listOfPerson;\n\t}", "public java.util.List<People> getFriendListList() {\n return java.util.Collections.unmodifiableList(\n instance.getFriendListList());\n }", "@Override\n\tpublic List<Professor> getProfessors() {\n\t\tList<Professor> pros=null;\n\t\tProfessor pro=null;\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tstmt=conn.prepareStatement(\"SELECT ssn,name,department,password FROM Professor\");\n\t\t\t/*stmt.setString(1, admin.getCname());\n\t\t\tstmt.setString(2, admin.getCplace());*/\n\t\t\tResultSet rs=stmt.executeQuery();\n\t\t\tpros=new ArrayList<Professor>();\n\t\t\twhile(rs.next()){\n\t\t\t\tpro=new Professor(rs.getString(\"name\"),rs.getString(\"ssn\"),\"\", rs.getString(\"department\"));\n\t\t\t\t\n\t\t\t\tpros.add(pro);\n\t\t\t}\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t\treturn pros;\n\t}", "@GetMapping(\"/list\")\n\tpublic String listPerson(Model theModel) {\n\t\tList<Person> thePerson = patientKeeperService.getPerson();\n\n\t\t// add to the spring model\n\t\ttheModel.addAttribute(\"person\", thePerson);\n\n\t\treturn \"list-person\";\n\t}", "public String memberList() {\n\treturn roomMembers.stream().map(id -> {\n\t try {\n\t\treturn api.getUserById(id).get().getNicknameMentionTag();\n\t } catch (InterruptedException | ExecutionException e) {\n\t\te.printStackTrace();\n\t }\n\t return \"\";\n\t}).collect(Collectors.joining(\"\\n\"));\n }", "public List<SickPerson> getSickPersonList(String lastNameSubString) throws SQLException;", "@Override\n\tpublic List<Personne> findAllPErsonne() {\n\t\treturn dao.findAllPErsonne();\n\t}", "Set<Person> getContacts();", "public List<Contributor> getAllForName(Long personNameId);", "public List<Person> readContactlist()\n {\n List<Person> personList=new ArrayList<Person>();\n\n ContentResolver resolver = getContentResolver();\n Cursor cursor = resolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\n Cursor phoneCursor = resolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"= ?\", new String[]{id}, null);\n\n\n while (phoneCursor.moveToNext()) {\n String phoneNumber = phoneCursor.getString(phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\n personList.add(new Person(name, phoneNumber));\n }\n }\n return personList;\n }" ]
[ "0.80342823", "0.80062425", "0.78918964", "0.7836486", "0.7684847", "0.7247407", "0.7243642", "0.714265", "0.71246105", "0.70975846", "0.70845413", "0.70813215", "0.7066812", "0.70435184", "0.7021119", "0.699512", "0.6970784", "0.6957893", "0.6957707", "0.69374585", "0.69363767", "0.691391", "0.68776006", "0.6847597", "0.68420243", "0.6833904", "0.68318546", "0.6808226", "0.6802806", "0.67964923", "0.6793665", "0.6777125", "0.67615", "0.6748119", "0.6741375", "0.67322993", "0.6688325", "0.66858286", "0.6679737", "0.6673642", "0.6668607", "0.666502", "0.6662302", "0.6617611", "0.6612526", "0.66078794", "0.6596518", "0.6593545", "0.6582342", "0.6550946", "0.65382385", "0.6533516", "0.65246737", "0.65222913", "0.6505615", "0.650406", "0.65027684", "0.6493085", "0.64921206", "0.64854413", "0.6480102", "0.64725715", "0.646069", "0.64574707", "0.6454278", "0.64362884", "0.6433667", "0.6433667", "0.6422699", "0.64110553", "0.64098716", "0.6409313", "0.63956237", "0.6394127", "0.6391113", "0.63903844", "0.6389425", "0.6383903", "0.6376647", "0.6369507", "0.6365666", "0.63652354", "0.6348474", "0.6344678", "0.63428485", "0.6326385", "0.63214767", "0.6307092", "0.63058007", "0.6299108", "0.62932974", "0.62920094", "0.6279683", "0.6278231", "0.6255004", "0.6254646", "0.62533915", "0.6252935", "0.62526935", "0.6249758" ]
0.7984965
2
Return a People by id
public People getPeopleById(Long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public People getPeopleById(ObjectId id) {\r\n if (id == null) {\r\n return null;\r\n }\r\n return datastore.getByKey(People.class, new Key<>(People.class, \"people\", id));\r\n }", "private static Person findPersonById(int id) {\n Person personReturn = null;\n\n for (Person person : persons) {\n if (id == person.getId()) {\n personReturn = person;\n }\n }\n\n return personReturn;\n }", "public PeoplePojo findPeopleById(String id) {\n\t\ttry {\n\n\t\t\t// find people\n\t\t\tvar uri = UriComponentsBuilder.fromUriString(url).uriVariables(Map.of(\"id\", id)).build().toUri();\n\t\t\tResponseEntity<PeoplePojo> responseEntity = restTemplate.getForEntity(uri, PeoplePojo.class);\n\n\t\t\treturn responseEntity.getBody();\n\t\t} catch (final Exception e) {\n\t\t\tthrow new BusinessException(\"An error occoured while find people by id: \" + id , e.getCause());\n\t\t}\n\t}", "public person findbyid(int id){\n\t\t\treturn j.queryForObject(\"select * from person where id=? \", new Object[] {id},new BeanPropertyRowMapper<person>(person.class));\r\n\t\t\r\n\t}", "public List<PersonManage> queryPersonById(String id) {\n\t\treturn getSqlSession().selectList(NAME_SPACE+\".findById\",id);\n\t}", "@Override\r\n\tpublic Person findbyid(int id) {\n\t\tQuery query=em.createQuery(\"Select p from Person p where p.id= \"+id);\r\n\t\tPerson p=(Person) query.getSingleResult();\r\n\t\treturn p;\r\n\t\r\n\t}", "public Person getPersonById(String id) {\n\t\tfor (Person person : persons) {\n\t\t\tif (person.getId().equals(id)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic Person getPerson(int id) {\n\t\treturn new Person(\"Philippe\", \"Peeters\");\n\t}", "@Override\n\tpublic List<Person> search(Integer id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Personne getPersonne(int id) {\n\t\treturn dao.getPersonne(id);\n\t}", "public Person getUserById(int id);", "PeopleDTO findOne(Long id);", "public ResultSet getPerson(int id) throws SQLException {\n\t\tquery = \"SELECT * FROM person WHERE id=\"+ id;\n\t\treturn stmt.executeQuery(query);\n\t}", "public Person get( Integer id ) {\n\t\t// Retrieve existing person\n\t\tPerson person = (Person) entityManager.createQuery(\"FROM Person p where p.id = :id\")\n \t.setParameter(\"id\", id).getSingleResult();\n\t\treturn person;\n\t}", "@Override\r\n\tpublic Personne find(int id) {\n\t\treturn null;\r\n\t}", "List<Person> findByIdAndName(int id,String name);", "@Override\n\tpublic Person findPersonById(long id){\n\t\tQuery q = em.createQuery(\"SELECT p FROM Person p WHERE p.id = :id\");\n\t\tq.setParameter(\"id\", id);\n\t\t\n\t\tList<Person> persons = q.getResultList();\n\t\t\n\t\tif(persons.size() == 1)\n\t\t\treturn persons.get(0);\n\t\telse return null;\n\t}", "public Person getPerson(String id) throws DataAccessException {\n Person person;\n ResultSet rs = null;\n String sql = \"SELECT * FROM persons WHERE person_id = ?;\";\n try(PreparedStatement stmt = conn.prepareStatement(sql)) {\n stmt.setString(1, id);\n rs = stmt.executeQuery();\n if (rs.next()) {\n person = new Person(rs.getString(\"person_id\"), rs.getString(\"assoc_username\"),\n rs.getString(\"first_name\"), rs.getString(\"last_name\"),\n rs.getString(\"gender\"), rs.getString(\"father_id\"),\n rs.getString(\"mother_id\"), rs.getString(\"spouse_id\"));\n return person;\n }\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Error encountered while finding person\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n return null;\n }", "public Personel findPersonelById(int id) {\n\t\treturn personelDao.findPersonelById(id);\r\n\t}", "Persona buscarPersonaPorId(Long id) throws Exception;", "public Person getOne(Integer id) {\n\t\tPerson person = personRepository.getOne(id);\n\t\treturn person;\n\t}", "public Person get( Integer id ) {\n\t\t\n\t\tSession session = sessionFactory.getCurrentSession();\t\t\n\t\t\n\t\treturn(Person) session.get(Person.class,id);\n\t}", "public Person findPerson(Long id) {\n\t\treturn personRepository.findById(id).orElse(null); \n\t}", "public Optional<Persona> findById(Long id);", "public Person findOne(Long id) {\n\t\treturn personRepository.findById(id).get();\n\t}", "public List<Personagem> findByMembroId(String id);", "@Override\n\tpublic List<PersonelContract> GetById(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Person get(int id) {\n\t\treturn null;\n\t}", "@Override\n public Person findById(Long idPerson) {\n return personRepository.findById(idPerson).get();\n }", "@Override\n public Person findByID(Long id) {\n Session session = getSessionFactory().openSession();\n Person p = session.load(Person.class, id);\n session.close();\n return p;\n }", "@Override\n\tpublic Person findOne(Integer id) {\n\t\treturn null;\n\t}", "public PersonManage queryPersonCnameById(String id) {\n\t\treturn getSqlSession().selectOne(NAME_SPACE+\".findById\",id);\n\t}", "private User findById(String id) {\n User result = new NullUserOfDB();\n for (User user : this.users) {\n if (user.getId().equals(id)) {\n result = user;\n break;\n }\n }\n return result;\n }", "public List<People> getPeople();", "public SamplePerson getPersonById(int id) {\n //TODO\n throw new NotImplementedException();\n }", "public PersonaDTO consultarPersona(Long idPersona) ;", "public Individual getIndividualById(Integer id) throws ObjectNotFoundException{\n \tList<Individual> individualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter = 0;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\t\t\tif (individual.getId().compareTo(id) == 0) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size == individualList.size() && counter == 0)\n\t\t\tthrow new ObjectNotFoundException(\"individual\", \"id\", id.toString());\n\n\t\treturn individual;\n\n }", "@GetMapping(\"/person/{id}\")\n public Person findById(@PathVariable(\"id\") Long id) {\n Person person = elasticsearchOperations.get(id.toString(), Person.class);\n return person;\n }", "@Transactional(readOnly = true)\n\t@Override\n\tpublic Optional<Persona> findById(Integer id) throws Exception {\n\t\treturn personaRepository.findById(id);\n\t}", "@Override\n\tpublic Personnes findOne(Long id) {\n\t\treturn null;\n\t}", "public Person getPerson(String idOrUrl) {\n return personMap.get(idOrUrl);\n }", "@Override\r\n\tpublic Person getPerson(String personId) {\r\n\t\treturn sql.getPerson(personId);\r\n\t}", "public Personne find(int id) {\n\t\tPersonne p= null;\n\t\ttry {\n\t\t\t\tString req = \"SELECT id,nom, prenom, evaluation FROM PERSONNE_1 WHERE ID=?\";\n\t\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\t\tps.setInt(1, id);\n\t\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\tp =new Personne (id, rs.getString(1),rs.getString(2));\n\t\t\t}catch (SQLException e) {e.printStackTrace();}\n\t\t\t\t\n\t\treturn p;\n\t\t\n\t}", "People(int id, String name, int age) {\n this.id = id;\n this.name = name;\n this.age = age;\n }", "public User getById(String id){\n List<User> users = userRepo.findAll();\n for (User user : users){\n if(user.getGoogleId().equals(id)){\n return user;\n }\n }\n throw new UserNotFoundException(\"\");\n }", "public Person findUserById(Integer id) {\n\t\treturn null;\n\t}", "Person fetchPersonById(Person person);", "public SickPerson getSickPerson(int id) throws SQLException;", "@SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdPerson(int idPerson);", "@RequestMapping(value = \"/{id}\", \n\tmethod = RequestMethod.GET,\n\theaders ={\"Accept=application/json,application/xml\"},\n\tproduces={\"application/json\", \"application/xml\"})\n\tpublic @ResponseBody PersonDTO getPerson(@PathVariable(\"id\") int id){\n\t\tif(log.isDebugEnabled()){\n\t\t\tlog.debug(\"going to query person: \" + id );\n\t\t}\n\t\tPerson person = personService.getPerson(id);\n\t\tif(person == null){\n\t\t\tif(log.isDebugEnabled()){\n\t\t\t\tlog.debug(\"can't find person for : \" + id );\n\t\t\t}\n\t\t\tthrow new EntityNotFoundException(\"can't find person for : \" + id);\n\t\t}else{\n\t\t\treturn new PersonDTO(person);\n\t\t}\n\t}", "@Override\r\n\tpublic Person getPerson(Long personId) {\n\r\n\r\n\t\tPerson person = new Person(\"bob\", String.format(\"Unit%d\", personId), \"carol\", \"alice\", \"42\");\r\n\t\tperson.setId(personId);\r\n\t\treturn person;\r\n\t}", "public User findById ( int id) {\n\t\t return users.stream().filter( user -> user.getId().equals(id)).findAny().orElse(null);\n\t}", "Collection<Patient> findByName(String name, int id);", "@Override\n\tpublic Personne affichagePersonne(int id) {\n\t\treturn dao.affichagePersonne(id);\n\t}", "public com.hps.july.persistence.People getPeople() throws java.rmi.RemoteException, javax.ejb.FinderException {\n\treturn (com.hps.july.persistence.People)this.getPeopleLink().value();\n}", "public PersonDto findById(String id) {\n Optional<Person> model = Optional.empty();\n return model\n .map(personMapper::toDto)\n .orElse(null);\n }", "public void findPersonById(int i) {\n\t\t\n\t}", "public Doctor findById(int id);", "@Override\n public Users get(Integer id) {\n String sql = sqlUsers.getGet();\n Users user = (Users) jdbcTemplate.queryForObject(sql, new Object[]{id}, new BeanPropertyRowMapper(Users.class));\n return user;\n }", "public static ArrayList<Member> findById(String id){\n setConnection();\n \n ArrayList<Member> members = new ArrayList<>();\n \n try{\n Statement statement = con.createStatement();\n \n //Query statement\n String query = \"SELECT * FROM member WHERE id LIKE ?\";\n\n //Create mysql prepared statement\n PreparedStatement preparedStatement = con.prepareStatement(query);\n preparedStatement.setString(1, \"%\"+id+\"%\");\n \n //Execute the prepared statement\n ResultSet result = preparedStatement.executeQuery();\n \n while(result.next()){\n int memberId = result.getInt(1);\n String name = result.getString(2);\n String email = result.getString(3);\n String phone = result.getString(4);\n String address = result.getString(5);\n String dob = result.getString(6);\n \n members.add(new Member(memberId, name, email, phone, address, dob));\n }\n\n con.close();\n } catch (SQLException e){\n System.out.println(e.getMessage());\n }\n \n return members;\n }", "@Override\r\n\tpublic PersonneDTO getOnePersonne(Long idPersonne) {\n\t\treturn daoPersonne.getOnePersonne(idPersonne);\r\n\t}", "public Data findById(Object id);", "void getPeople();", "public MemberPo findMember(final String id);", "@Override\n public User get(int id) {\n\n String sqlGet = sqlQuery + \" where u.id=:id\";\n //Этот класс предназначен для передачи в простой Map значений параметров методам NamedParameterJdbcTemplate класса.\n MapSqlParameterSource parameterSource = new MapSqlParameterSource()\n .addValue(\"id\",id);\n List<User> list = namedParameterJdbcTemplate.query(sqlGet,parameterSource, new UserRowMapper());\n\n return DataAccessUtils.singleResult(list);//Возвращает один объект результата из данной коллекции.\n }", "@Override\r\n\tpublic User getDocterById(int id) {\n\t\treturn docterMapper.selById(id);\r\n\t}", "@Override\n\tpublic Employee findById(int id) {\n\t\tList<Employee> employeeList= \n\t\tlistEmployee().stream().filter((e -> e.getId()==id)).collect(Collectors.toList());\n\t\t\n\t\treturn (Employee)employeeList.get(0);\n\t}", "public Users getUser(Integer id) {\r\n\t\treturn usDao.findById(id, true);\r\n\r\n\t}", "public Persona getPersonaById(Long id) throws Exception {\n\t\tDAOPersona dao = new DAOPersona();\n\t\tPersona persona = null;\n\t\ttry \n\t\t{\n\t\t\tthis.conn = darConexion();\n\t\t\tdao.setConn(conn);\n\t\t\tpersona = dao.findPersonaById(id);\n\t\t\tif(persona == null)\n\t\t\t\tthrow new Exception(\"La persona con el id = \" + id + \" no se encuentra persistida en la base de datos.\");\t\t\t\t\n\t\t} \n\t\tcatch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tthrow sqlException;\n\t\t} \n\t\tcatch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\n\t\treturn persona;\n\t}", "public Individual getIndividual(int id){\n for(Individual individual : individuals){\n if(individual.getId() == id){\n return individual;\n }\n }\n return null;\n }", "@Override\n\tpublic Users findByID(int id) {\n\t\treturn usersDAO.findByID(id);\n\t}", "public o selectById(long id);", "@Override\n public Pessoa buscar(int id) {\n try {\n for (Pessoa p : pessoa.getPessoas()){\n if(p.getCodPessoa()== id){\n return p;\n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AnimalDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public Users findById(int id) {\r\n return em.find(Users.class, id);\r\n }", "public Person login(int id) throws NoSuchPersonIdException{\n _person = getPersons().get(id);\n if(_person == null){\n throw new NoSuchPersonIdException(id);\n }\n return _person;\n }", "public Person GetPerson(int ID){\n //Override for \"ME\"\n if (ID == Person.Me.GetID()){ return Person.Me; }\n // Short circuit for deleted person\n if (ID == Person.Deleted.GetID()){ return Person.Deleted; }\n\n for (Person p : _people) {\n if (p.GetID() == ID) { return p; }\n }\n return null;\n }", "@Override\r\n\tpublic Person read(int id) {\n\t\treturn null;\r\n\t}", "@GET\n @Path(\"{id}\")\n @Produces(\"application/json\")\n public Response findById(@PathParam(\"id\") Integer id) {\n try {\n Dao dao;\n DynaActionForm form;\n List<DynaActionForm> resultSet;\n \n dao = DaoFactory.getDao(\"Profile\");\n form = new DynaActionForm();\n form.setItem(\"selector\", \"byId\");\n form.setItem(\"id\", id);\n resultSet = dao.select(form);\n \n if(resultSet.size() != 1){\n return Response.status(Response.Status.NOT_FOUND).build();\n }\n else {\n ProfileEntity profile = new ProfileEntity();\n profile.fromMap(resultSet.get(0).getItems());\n return Response.ok(profile).build();\n }\n } catch (Exception ex) {\n Logger.getLogger(ProfileResource.class.getName()).log(Level.SEVERE, null, ex);\n return Response.serverError().build();\n }\n }", "@GetMapping(\"/persona/{id_persona}\")\n public Persona getPersonaById(@PathVariable(value = \"id_persona\") Long personaId) {\n return personaRepository.findById(personaId)\n .orElseThrow(() -> new ResourceNotFoundException(\"Persona\", \"id\", personaId));\n }", "public Pessoa find(Long id){\n\t\treturn db.findOne(id);\n\t}", "public Users findByUserid(String id) {\n\tthis.createConnection();\n\n try {\n Connection con = this.getCon();\n PreparedStatement stmnt = con.prepareStatement(\"select * from user where id=?;\");\n stmnt.setString(1, id);\n ResultSet rs = stmnt.executeQuery();\n return get(rs);\n } catch (SQLException e) {\n System.out.println(\"SQLException: \");\n return new Users();\n }\n }", "People getUser(int index);", "Optional<Person> findByPersonId(String personId);", "Coach findById(long id);", "@Override\n public List<Person> getPeople() {\n return this.personRepository.findAll();\n }", "OrgMemberRecord selectByPrimaryKey(String id);", "@Override\r\n\tpublic Userinfo findbyid(int id) {\n\t\treturn userDAO.searchUserById(id);\r\n\t}", "PersonRegisterDo selectByPrimaryKey(Long id);", "@RequestMapping(value=\"/id/{personId}\", method=RequestMethod.GET)\r\n\tpublic ResponseEntity<?> getPersonById(@PathVariable int personId)\r\n\t{\r\n\t\treturn personService.getPersonById(personId);\r\n\r\n\t}", "@RequestMapping(value = \"/{id}\", method=RequestMethod.GET)\n public ResponseEntity<?> findById(@PathVariable final Integer id) {\n Team team = this.teamService.findById(id);\n return ResponseEntity.ok().body(team);\n }", "Optional<Person> findOne(Long id);", "public User getUserById(String id){\n\t\tUser e;\n\t\tfor (int i = 0 ; i < users.size() ; i++){\n\t\t\te = users.get(i);\n\t\t\tif (e.getId().equals(id))\n\t\t\t\treturn e;\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\tpublic User getUserById(int id) {\n\t\treturn userMapper.selById(id);\r\n\t}", "@GetMapping(path = \"{id}\")\n public Optional<Person> getSinglePerson(@PathVariable(\"id\") UUID id ) {\n return personService.getSinglePerson(id);\n }", "public User getUserFromID(String id) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"_id\", new ObjectId(id));\r\n\r\n // Loops over users found matching the details, returning the first one\r\n for (User user : users.find(query, User.class)) {\r\n return user;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }", "@Override\n public String toString() {\n return \"People{\" +\n \"id=\" + id +\n \", name='\" + name + '\\'' +\n \", age=\" + age +\n '}';\n }", "public Optional<Contact> findById(int id){\n return contactRepository.findById(id);\n }", "protected CompaniesContactsEntity findById(int id) {\n log.info(\"CompaniesContact => method : findById()\");\n\n FacesMessage msg;\n\n if (id == 0) {\n log.error(\"CompaniesContact ID is null\");\n msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"note.notExist\"), null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n throw new EntityNotFoundException(\n \"L ID de la note est incorrect\",\n ErrorCodes.COMPANY_NOT_FOUND\n );\n }\n\n EntityManager em = EMF.getEM();\n Optional<CompaniesContactsEntity> optionalCompaniesContactsEntity;\n try {\n optionalCompaniesContactsEntity = companiesContactsDao.findById(em, id);\n } finally {\n em.clear();\n em.close();\n }\n return optionalCompaniesContactsEntity.orElseThrow(() ->\n new EntityNotFoundException(\n \"Aucune Note avec l ID \" + id + \" n a ete trouvee dans la BDD\",\n ErrorCodes.CONTACT_NOT_FOUND\n ));\n }", "public ArrayList<Personne> findChilds(int id) {\n\t\tArrayList<Personne> pe = new ArrayList<Personne>();\n\t\ttry {\n\t\t\tString req = \"SELECT id,nom, prenom, evaluation FROM PERSONNE_1 WHERE ID=?\";\n\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tPersonne p;\n\t\t\tp =new Personne (id, rs.getString(1),rs.getString(2));\n\t\t\tpe.add(p);\n\t\t}catch (SQLException e) {e.printStackTrace();}\n\t\t\t\n\treturn pe;\n\t}", "public User fetchById(int id)\n {\n String query = \"SELECT * FROM user WHERE id = ?\";\n RowMapper<User> userRowMapper = new BeanPropertyRowMapper<>(User.class);\n User user; // a specific user that will be returned\n try\n {\n user = template.queryForObject(query, userRowMapper, id); // call the database\n } catch (EmptyResultDataAccessException e)\n {\n user = null; // return a null user\n }\n return user;\n }" ]
[ "0.8100138", "0.7870476", "0.7859427", "0.7519045", "0.7339572", "0.7239846", "0.72174895", "0.7207482", "0.71884257", "0.71687686", "0.7130501", "0.71164924", "0.709288", "0.7074634", "0.69906676", "0.6978161", "0.6973713", "0.69647044", "0.6954156", "0.6864669", "0.68210346", "0.68150014", "0.6800247", "0.6796412", "0.6732965", "0.6721987", "0.67135644", "0.6694063", "0.66437507", "0.66307247", "0.66055226", "0.65614545", "0.6516598", "0.6512163", "0.650262", "0.6500535", "0.6499288", "0.6493983", "0.64838713", "0.6481206", "0.6472085", "0.64637756", "0.6463198", "0.64612293", "0.64434403", "0.64397556", "0.6435315", "0.6405977", "0.639895", "0.6391", "0.63881713", "0.63733387", "0.6355341", "0.6345228", "0.632633", "0.6298448", "0.62972575", "0.62748057", "0.6263955", "0.6256166", "0.6255391", "0.62355447", "0.6234663", "0.6219726", "0.6213458", "0.62087286", "0.61822873", "0.6171472", "0.61706394", "0.615813", "0.61544865", "0.6148158", "0.6137212", "0.6136765", "0.6121156", "0.6118252", "0.6113897", "0.61099637", "0.6090181", "0.6088201", "0.60839456", "0.6073226", "0.6070123", "0.6068496", "0.6065074", "0.6059571", "0.60588604", "0.6050644", "0.6015042", "0.6008016", "0.6001798", "0.5997941", "0.5997897", "0.59875566", "0.598752", "0.5974314", "0.59732455", "0.5970156", "0.5969988", "0.5969907" ]
0.8781687
0
Create new People or update an existing one
public People savePeople(People people);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void lookupAndSaveNewPerson();", "private static Person updatePerson(Request req) {\n int id = Integer.parseInt(req.params(\"id\"));\n Person personRequested = gson.fromJson(req.body(), Person.class);\n \n // get the data from personRequested keeping the id\n Person personFound = findPersonById(id);\n int index = persons.lastIndexOf(personFound);\n\n personFound = personRequested;\n personFound.setId(id);\n\n persons.set(index, personRequested);\n\n System.out.println(personRequested);\n return personRequested;\n }", "public void setPeople(Set<PersonCreateRequest> people) {\n\t\tthis.people = people;\n\t}", "@PUT\n @Produces({ \"application/json\" })\n @Path(\"{id}\")\n @CommitAfter\n public abstract Response update(Person person);", "@PUT(\"/{id}\")\n @Consumes(\"application/json\")\n @PermitAll\n public Person upsert(String id, Person person) {\n logger.debug(\"upsert({}, {})\", id, person);\n Person upsert = personService.upsert(id, person);\n logger.debug(\"created/updated {}: {}\", id, upsert);\n return upsert;\n }", "@POST\n @Produces({ \"application/json\" })\n @CommitAfter\n public abstract Response addNew(Person person);", "public void CreatePerson(Person p){\n\t\tWeddingConnectionPoolManager con = new WeddingConnectionPoolManager(); \n\t\t Person p1 = new Person(p.getId(), p.getFirstName(), p.getLastName(), p.getRelationship(),\n\t\t\t\t p.getAddress(), p.getPhone(), p.getEmail(), p.getComment(), user.getId());\n\t\t System.out.println(\"p1 : \" + p1);\n\t\t System.out.println(\"p : \" + p);\n\t\t// TODO - should to iterate on the results that returns when calling to \"getpersons\" method.\n\t\tPersonDBManager.getInstance().CreateNewPerson(con.getConnectionFromPool(), p1);\t\n\t}", "public Person updatePerson(Person pr){\t\n\t\tPerson old_p = new Person(pr.getId());\n\t\tPerson new_p = new Person(pr.getId(), pr.getFirstName(), pr.getLastName(),\n\t\t\t\tpr.getRelationship(),pr.getAddress(),pr.getPhone(),pr.getEmail(),pr.getComment(),pr.getUser_id());\n\t\tSystem.out.println(\"new_p : \" +new_p);\n\t\tWeddingConnectionPoolManager con = new WeddingConnectionPoolManager();\n\t\ttry {\n\t\t\told_p = PersonDBManager.getInstance().GetPersonByID(con.getConnectionFromPool(), old_p.getId());\n\t\t\tSystem.out.println(\"old_p :\" + old_p);\n\t\t\tif(old_p !=null){\n\t\t\tSystem.out.println(\"second new_p to update :\" +new_p);\n\t\t\tPersonDBManager.getInstance().UpdateAPerson(con.getConnectionFromPool(), new_p);\n\t\t\tExpensesDBManager.getInstance().updatePersonParamOnExpensesTable(con.getConnectionFromPool(),\n\t\t\t\t\tnew_p.getFirstName(), new_p.getLastName(), new_p.getId(), new_p.getUser_id());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"GetPersonByID Not Found\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn old_p;\n\t\t\n\t}", "public void create(Person p) {\n\t\t\n\t}", "@Override\r\n\tpublic void create(Person p) \r\n\t{\n\t\t\r\n\t}", "public DaoResult createPerson(final Person person) {\n if (findPersonByFacebookId(person.getFacebookId()) != null) {\n return DaoResult.RECORD_ALREADY_EXIST;\n }\n //if no, find the city from City table, and create\n CityDataHandler cityDataHandler = new CityDataHandler();\n City fromCity = cityDataHandler.findCity(person.getFrom().getName());\n if (fromCity != null) {\n person.setFrom(fromCity);\n }\n City toCity = cityDataHandler.findCity(person.getTo().getName());\n if (toCity != null) {\n person.setTo(toCity);\n }\n\n EntityManager entityManager = CarPoolBuddyEntityManagerFactory.getInstance().makeEntityManager();\n EntityTransaction tx = entityManager.getTransaction();\n try {\n tx.begin();\n entityManager.persist(person);\n tx.commit();\n } finally {\n if (tx.isActive()) {\n tx.rollback();\n }\n entityManager.close();\n }\n\n //check if inserted\n if (findPersonByFacebookId(person.getFacebookId()) != null) {\n return DaoResult.RECORD_CREATED_SUCCESSFULLY;\n } else {\n return DaoResult.RECORD_CREATION_FAILED;\n }\n }", "Person createPerson();", "@Override\r\n\tpublic void create(Person person) {\n\r\n\t}", "public void savePerson() {\n\t\tthis.personService.savePerson();\n\t}", "public void create(Person person) {\n\t\tpersonRepository.save(person);\n\t}", "Department createOrUpdate(Department department);", "@Override\r\n public boolean create(Person person) {\n return false;\r\n }", "private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }", "public Person createPerson(Person p);", "public static void upsertPerson(NodePerson p) {\n ArangoDatabase db = client.db(dbName);\n db.query(p.upsertAql(vertexColls[1]), null);\n }", "public void saveEmployee(CreateOrEditEmployeeRequestDto employee);", "private void saveNewPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Save new Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), \"Passwort\", \"[email protected]\", \"Vorname\",\r\n\t\t\t\t\t\"Nachname\", \"Organisation\", \"Abteilung\", \"Fachrichtung\",\r\n\t\t\t\t\t\"Strasse\", \"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"New Patient saved!!\");\r\n\t}", "@Test(enabled = true)\n public void createPerson() {\n List <Account> accounts = new ArrayList<>();\n List<Subscription> sub = new ArrayList<>();\n \n Contact contact = new Contact.Builder().emailaddress(\"[email protected]\").phoneNumber(\"021345685\").build();\n Address address = new Address.Builder().location(\"Daveyton\").streetName(\"Phaswane Street\").houseNumber(45).build();\n \n repo = ctx.getBean(PersonsRepository.class);\n Person p = new Person.Builder()\n .firstname(\"Nobu\")\n .lastname(\"Tyokz\")\n .age(25)\n .account(accounts)\n .sub(sub)\n .contact(contact)\n .address(address)\n .build();\n repo.save(p);\n id = p.getId();\n Assert.assertNotNull(p);\n\n }", "public void update(Person p) {\n Session session = getSessionFactory().openSession();\n\n try {\n session.beginTransaction();\n Person person = session.load(Person.class, p.getId());\n person.setGivenName(p.getGivenName());\n person.setFamilyName(p.getFamilyName());\n session.getTransaction().commit();\n LOGGER.log(Level.INFO,\"Successfully updated \" + p.toString());\n }\n catch(Exception e){\n if (session.getTransaction() != null)\n session.getTransaction().rollback();\n LOGGER.log(Level.INFO, \"Upadate on \" + p.toString() + \" failed\");\n }\n finally {\n session.close();\n }\n }", "@Override\n public void update(Person p) throws SQLException, ClassNotFoundException\n {\n\n BasicDBObject query = new BasicDBObject();\n query.put(\"Id\", p.getId()); // old data, find key Id\n\n BasicDBObject newDocument = new BasicDBObject();\n\n// newDocument.put(\"Id\", p.getId()); // new data\n newDocument.put(\"FName\", p.getFName()); // new data\n newDocument.put(\"LName\", p.getLName()); // new data\n newDocument.put(\"Age\", p.getAge()); // new data\n System.out.println(newDocument);\n\n BasicDBObject updateObj = new BasicDBObject();\n updateObj.put(\"$set\", newDocument);\n System.out.println(updateObj);\n\n table.update(query, updateObj);\n }", "@RequestMapping(value = \"/profile/{id}\", method = RequestMethod.POST)\n\tpublic String createOrUpdateProfile(@PathVariable(value = \"id\") String id,\n\t\t\t@PathParam(value = \"firstname\") String firstname,\n\t\t\t@PathParam(value = \"lastname\") String lastname,\n\t\t\t@PathParam(value = \"email\") String email,\n\t\t\t@PathParam(value = \"address\") String address,\n\t\t\t@PathParam(value = \"organization\") String organization,\n\t\t\t@PathParam(value = \"aboutmyself\") String aboutmyself, Model model) {\n\t\ttry {\n\t\t\tProfile profile = profileDao.findById(id);\n\t\t\tif (profile == null) {\n\t\t\t\tprofile = new Profile();\n\t\t\t\tprofile.setId(id);\n\t\t\t}\n\t\t\tprofile.setFirstname(firstname);\n\t\t\tprofile.setLastname(lastname);\n\t\t\tprofile.setEmail(email);\n\t\t\tprofile.setAddress(address);\n\t\t\tprofile.setOrganization(organization);\n\t\t\tprofile.setAboutMyself(aboutmyself);\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\tthis.profileDao.save(profile);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"redirect:/profile/{id}?brief=false\";\n\t}", "@PostMapping(\"/person\")\r\n@ApiOperation( value = \"Save/Update Person\", notes = \"Save/Update the person detail in the database\", response = Person.class)\r\nprivate int savePerson(@RequestBody Person person)\r\n{\r\n personService.saveOrUpdate(person);\r\n return person.getId();\r\n}", "private void loadExistingPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Load existing Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), BCrypt.hashpw(\"admin\", BCrypt\r\n\t\t\t\t\t.gensalt()), \"[email protected]\", \"Vorname\", \"Nachname\",\r\n\t\t\t\t\t\"Organisation\", \"Abteilung\", \"Fachrichtung\", \"Strasse\",\r\n\t\t\t\t\t\"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tList<IPerson> possiblePersons = PersistenceService.getService()\r\n\t\t\t\t\t.getPersonsFromDB(\"admin\");\r\n\t\t\tIPerson p2 = null;\r\n\t\t\tfor (IPerson p : possiblePersons) {\r\n\t\t\t\tif (BCrypt.checkpw(\"admin\", p.getPassword()))\r\n\t\t\t\t\tp2 = p;\r\n\t\t\t}\r\n\r\n\t\t\t// Person p2=Person.getPerson(3);\r\n\r\n\t\t\tSystem.out.println(\"Person p1: \" + p1.toString());\r\n\t\t\tif (p2 != null)\r\n\t\t\t\tSystem.out.println(\"Person p2: \" + p2.toString());\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Person p2 nicht geladen.\");\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Patient loaded!!\");\r\n\t}", "public void updateUser(Person person){\n\t\tem.merge(person);\n\t}", "@Override\n public void savePerson() {\n this.personDao.savePerson();\n }", "public ResponseEntity<String> processAddingAPerson(AddPeopleRequest addPeopleRequest) {\n // check if person being added already exists\n if (personAlreadyExists(addPeopleRequest)) {\n // return user already exists\n logger.info(\"user already exists\");\n return new ResponseEntity(Utils.result(Constants.USER_ALREADY_EXISTS), HttpStatus.BAD_REQUEST);\n } else {\n // record should be saved..\n this.addPersonRequestMongoRepository.save(addPeopleRequest);\n return new ResponseEntity(Utils.result(Constants.RECEIVED), HttpStatus.OK);\n }\n }", "public void addPerson(String name){\n Person newPerson = new Person(name,this.x1,this.x2);\n for(Person p : personList){\n if(p.equals(newPerson)){\n System.out.println(\"Error! The person already exists.\");\n }\n }\n personList.add(newPerson);\n }", "public int update(person p){\n\t\t\treturn j.update(\" update person\"+ \" set name=?,location=?,birthdate=?\"+\" where id=? \", new Object[] {p.getName(),p.getLocation(),new Timestamp(p.getDate().getTime()),p.getId()});\r\n\t\t\r\n\t}", "private void init(){\r\n\t\tString fullName = this.person_.getFirstName()+\" \"+this.person_.getLastName();\r\n\t\tboolean alreadyExists = PersonModel.exists(fullName);\r\n\t\t\r\n\t\tif(alreadyExists == true){\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t//need to create person\r\n\t\t\tPersonModel pm = new PersonModel(fullName);\r\n\t\t\tpm.save();\r\n\t\t}\r\n\r\n\t}", "public int update(Person person) {\r\n\t\treturn jdbcTemplate.update(\"update person \" + \" set name = ?, location = ?, birthDate = ? \" + \" where id = ?\",\r\n\t\t\t\tnew Object[] { person.getName(), person.getLocation(), person.getBirthDate() , person.getId()});\r\n\t}", "void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;", "public void update(Person person) {\n\t\tpersonRepository.save(person);\n\t}", "public void savePerson(Person person) {\n\t\t\n\t}", "public Person create() {\n\t\treturn personRepository.create();\n\t}", "int updateByPrimaryKey(LawPerson record);", "@Override\r\n\tpublic boolean updatePerson(int id, String fieldName, String newValue) {\n\t\treturn false;\r\n\t}", "public void addPerson(Person p);", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "@Override\r\n\tpublic void update(Person p) \r\n\t{\n\t\t\r\n\t}", "public EmployeeDTO updateEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;", "public void savePerson()\r\n { \r\n\t/*get values from text fields*/\r\n\tname = tfName.getText();\r\n\taddress = tfAddress.getText();\r\n\tphone = Integer.parseInt(tfPhone.getText());\r\n\temail = tfEmail.getText();\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null, \"Please enter person name.\");\r\n\t}else\r\n {\r\n\r\n\t /*create a new PersonInfo object and pass it to PersonDAO to save it*/\r\n\t PersonInfo person = new PersonInfo(name, address, phone, email);\r\n\t pDAO.savePerson(person);\r\n\r\n\t JOptionPane.showMessageDialog(null, \"Record added\");\r\n }\r\n }", "@Override\r\n\tpublic void update(Person person) {\n\r\n\t}", "public interface PeopleService {\n\n /**\n * Save a people.\n *\n * @param peopleDTO the entity to save\n * @return the persisted entity\n */\n PeopleDTO save(PeopleDTO peopleDTO);\n\n /**\n * Get all the people.\n *\n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<PeopleDTO> findAll(Pageable pageable);\n\n /**\n * Get the \"id\" people.\n *\n * @param id the id of the entity\n * @return the entity\n */\n PeopleDTO findOne(Long id);\n\n /**\n * Delete the \"id\" people.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n\n PeopleDTO createPeople(PeopleDTO people, Long userId);\n\n PeopleDTO findOneByUserId(Long userId);\n\n void deleteByUserId(Long userId);\n\n void nullingPeopleUser(Long userId);\n}", "boolean store(List<Person> persons) throws ServiceException;", "int insertPerson(UUID id, Person person);", "public Address update(Address entity);", "@Path(\"/{ID}\")\n @PUT\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Response update(@PathParam(\"ID\") String ID, Person person) \n throws NotFoundException, MissingInformationException {\n if(person == null) \n throw new MissingInformationException(\"No Person were found\");\n \n Document found = fetchByObjectId(ID);\n \n UpdateResult result = getCollection().updateOne(found, \n new Document(\"$set\", toDocument(person)));\n if(result.getModifiedCount() == 0)\n return Response.status(Response.Status.GONE).build();\n \n // Indicates nothing was modified at all\n return Response.status(Response.Status.ACCEPTED).build();\n }", "@Override\n\tpublic void updateCreator(CreatorDTO creator) {\n\t\t\n\t}", "@PostMapping(\"/persona\")\n public Persona createPersona(@Valid @RequestBody Persona persona) {\n return personaRepository.save(persona);\n }", "public void setCreatePerson(String createPerson) {\n this.createPerson = createPerson;\n }", "public static void addUserToDb(Person person) {\n\n //converting person's data for SQL database\n String name = person.getName();\n int height = person.getHeight();\n double weight = person.getWeight();\n double waist = person.getWaistCircumference();\n int multiplier = person.getMultiplier();\n double calorieRate = person.getCalorieRate();\n String lastDate = getTodaysDate();\n\n //using data to create a query\n String dbQuery = \"INSERT INTO users(username, userheight, userweight, userwaist, usermultiplier, usercaloryrate, lastdate) \" +\n \"VALUES ('\" + name + \"', \" + height + \", \" + weight + \", \" + waist + \", \" +\n multiplier + \", \" + calorieRate + \", '\" + lastDate + \"')\";\n\n //sending a query and effectively adding user to the DB. Setting sql generated ID to the java object\n int personsId = DbConnector.addingNewRecordToDb(dbQuery);\n person.setId(personsId);\n }", "@PutMapping(\"/persona/{id}\")\n\tpublic Persona actualizarPersona(@PathVariable Long id, @RequestBody Persona persona){\n\t\treturn personaRepository.save(persona);\n\t\t\n\t}", "Builder addCreator(Person value);", "public PersonDto updatePerson(String id, PersonDto personDto) {\n Optional<Person> model = Optional.empty();\n return model\n .map(p -> {\n p.setFirstName(personDto.getFirstName());\n p.setLastName(personDto.getLastName());\n p.setAddress(personDto.getAddress());\n p.setAliases(personDto.getAliases());\n return p;\n })\n // TODO: Replace by a method in MongoPersonRepository to save a person and returns the saved person\n .map(Function.identity())\n .map(personMapper::toDto)\n .orElse(null);\n }", "@Transactional\n\t@Override\n\tpublic Persona update(Persona entity) throws Exception {\n\t\treturn personaRepository.save(entity);\n\t}", "CounselorBiographyTemp update(CounselorBiographyTemp entity);", "public void save(Person p) {\n\n\t}", "int updateByPrimaryKeySelective(PersonRegisterDo record);", "public void updatePerson(){\r\n\r\n // Generally update is performed after search \r\n // need to find out which record is going to update \r\n\r\n if (recordNumber >= 0 && recordNumber < personsList.size())\r\n {\r\n PersonInfo person = (PersonInfo)personsList.get(recordNumber);\r\n\r\n int id = person.getId();\r\n\r\n\t /*get values from text fields*/ \r\n\t name = tfName.getText();\r\n\t address = tfAddress.getText();\r\n\t phone = Integer.parseInt(tfPhone.getText());\r\n email = tfEmail.getText();\r\n\r\n\t /*update data of the given person name*/\r\n\t person = new PersonInfo(id, name, address, phone, email);\r\n pDAO.updatePerson(person);\r\n\r\n\t JOptionPane.showMessageDialog(null, \"Person info record updated successfully.\"); \r\n }\r\n else\r\n { \r\n JOptionPane.showMessageDialog(null, \"No record to Update\"); \r\n }\r\n }", "@Test\n\tpublic void testUpdatePerson_whenPersonExistFirstNameJonanthanLastNameMarrack_thenReturnPersonJonanathanMarrackWithTheFieldAdressUpdated() {\n\t\t// GIVEN\n\t\tPerson personRecordedInArray = new Person(\"Jonanathan\", \"Marrack\", \"29 15th St\", \"Culver\", \"97451\",\n\t\t\t\t\"841-874-6513\", \"[email protected]\");\n\t\tPerson personToUpdate = new Person(\"Jonanathan\", \"Marrack\", \"30 rue des Ursulines\", \"Culver\", \"97451\",\n\t\t\t\t\"841-874-6513\", \"[email protected]\");\n\t\twhen(personDAOMock.getPerson(anyString(), anyString())).thenReturn(personRecordedInArray);\n\t\twhen(personDAOMock.getPersons()).thenReturn(mockList);\n\t\twhen(personDAOMock.save(anyInt(), any())).thenReturn(personToUpdate);\n\t\t// WHEN\n\t\tPerson resultPersonUpdated = personServiceTest.updatePerson(personToUpdate);\n\t\t// THEN\n\t\tverify(personDAOMock, times(1)).getPersons();\n\t\tverify(personDAOMock, times(1)).getPerson(anyString(), anyString());\n\t\tverify(personDAOMock, times(1)).save(anyInt(), any());\n\t\t// the field address that was been modified has been updated\n\t\tassertEquals(\"30 rue des Ursulines\", resultPersonUpdated.getAddress());\n\t}", "public PersonName put(final PersonName newPersonName) throws ClientException {\n return send(HttpMethod.PUT, newPersonName);\n }", "public Person updatePerson(Person person) {\n \tqueryExecutor.updatePerson(person);\n \t\n \t//personMap.put(person.getName(), person);\n return person;\n }", "private boolean personAlreadyExists(AddPeopleRequest addPeopleRequest) {\n // query db for this user\n AddPeopleRequest matchingEntry =\n this.addPersonRequestMongoRepository\n .findPersonByFirstAndLastName(\n addPeopleRequest.getFirstName(),\n addPeopleRequest.getLastName());\n // if the value returned is null.. the value did not exist..\n if (matchingEntry == null) {\n return false;\n } else {\n return true;\n }\n }", "Patient update(Patient patient);", "int updateByPrimaryKey(PersonRegisterDo record);", "void addPhoneToPerson(Phone phone,int personId);", "private void updatePerson() {\n Statement statement = null;\n try {\n statement = this.connection.createStatement();\n System.out.print(\"What is the first name of the person you would like to update? \");\n Scanner scanner = new Scanner(System.in);\n String first = scanner.next();\n int id = Utils.selectPersonFromFirstName(first, connection);\n System.out.print(\"What do you want to update? LastName, FirstName, DOB, or DOD? \");\n String field = scanner.next();\n System.out.println(field);\n if (field.equalsIgnoreCase(\"LastName\")) {\n System.out.print(\"Enter the new last name of the person you wish to update: \");\n String newLastName = scanner.next();\n statement.executeUpdate(\"UPDATE person SET last_name = \" + \"\\'\" +\n newLastName + \"\\'\" + \"WHERE person_id = \" + id);\n }\n else if (field.equalsIgnoreCase(\"FirstName\")) {\n System.out.print(\"Enter the new first name of the person you wish to update: \");\n String newFirstName = scanner.next();\n statement.executeUpdate(\"UPDATE person SET first_name = \" + \"\\'\" +\n newFirstName + \"\\'\" + \"WHERE person_id = \" + id);\n }\n else if (field.equalsIgnoreCase(\"DOB\")) {\n System.out.print(\"Enter the new DOB of the person you wish to update: \");\n String newDOB = scanner.next();\n statement.executeUpdate(\"UPDATE person SET DoB = \" + \"\\'\" +\n newDOB + \"\\'\" + \"WHERE person_id = \" + id);\n }\n else if (field.equalsIgnoreCase(\"DOD\")) {\n System.out.print(\"Enter the new DOD of the person you wish to update: \");\n String newDOD = scanner.next();\n statement.executeUpdate(\"UPDATE person SET DoD = \" + \"\\'\" +\n newDOD + \"\\'\" + \"WHERE person_id = \" + id);\n }\n else {\n System.out.println(\"Field not identified. Enter again. \");\n this.updatePerson();\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "@FXML\n private void handleNewPerson() {\n Shops tempShops = new Shops();\n boolean okClicked = mainApp.showPersonEditDialog(tempShops);\n if (okClicked) {\n mainApp.getPersonData().add(tempShops);\n }\n }", "@POST\r\n @Path(\"/addPerson\")\r\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n @HEAD\r\n public Person addPerson(@FormParam(value = \"personId\")\r\n String personId, @FormParam(value = \"personName\")\r\n String personName, @FormParam(value = \"age\")\r\n int age, Person person) throws Exception {\n Person p = new Person();\r\n p.setAge(age);\r\n p.setPersonId(personId);\r\n p.setPersonName(personName);\r\n p.getHelper().save();\r\n return p;\r\n }", "public Person addPerson(Person person) {\n \tqueryExecutor.insertPerson(person);\n \t//personMap.put(person.getName(), person);\n return person;\n }", "public void edit(Person person) {\n\t\tlogger.debug(\"Editing existing person\");\n\t\t// Retrieve existing person via id\n\t\tPerson existingPerson = this.get(person.getId());\n\t\t// Assign updated values to this person\n\t\texistingPerson.setFirstName(person.getFirstName());\n\t\texistingPerson.setLastName(person.getLastName());\n\t\texistingPerson.setMoney(person.getMoney());\n\t // Save updates\n\t\tentityManager.merge(person);\n\t}", "@Override\n\tpublic void save(Person person) {\n\t\t\n\t}", "public void createPerson(String firstName, String lastName) throws LogicLayerException\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tdataService.createPerson(new Person(firstName, lastName));\r\n\t\t}\r\n\t\tcatch (DataLayerException e)\r\n\t\t{\r\n\t\t\tthrow new LogicLayerException(e.getMessage());\r\n\t\t}\t\t\t\t\t\r\n\t}", "User update(User userToUpdate, RegisterRequest registerRequest);", "public boolean ensureValidPerson(AddPeopleRequest addPeopleRequest) {\n // ensure we have first and last names\n if (addPeopleRequest.getFirstName() == null || addPeopleRequest.getLastName() == null) {\n return false;\n }\n return true;\n }", "void crearNuevaPersona(Persona persona);", "@Override\r\n\tpublic void ajouterPersonne(Personne p) {\r\n\t\tem.persist(p);\r\n\t}", "public boolean updateSickPerson(SickPerson sickPerson) throws SQLException;", "public Person save(Person person) {\n return personRepository.save(person.getId(), person);\n }", "@Override\n\tpublic void updatePerson(Person person) {\n\t\tsessionFactory.getCurrentSession().update(person);\n\t}", "public Future<Person> createRelationship( String personId, String friendId );", "public void setPeople(People people,String id)\n {\n myCamp = people;\n this.id = id;\n }", "public void edit(Person person) {\n\t\t\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\n\t\t// Retrieve existing person via id\n\t\tPerson existingPerson = (Person) session.get(Person.class, person.getId());\n\t\t\n\t\t// Assign updated values to this person\n\t\texistingPerson.setFirstName(person.getFirstName());\n\t\texistingPerson.setLastName(person.getLastName());\n\t\texistingPerson.setMoney(person.getMoney());\n\n\t\t// Save updates\n\t\tsession.merge(existingPerson);\n\t}", "@Override\n\tpublic String upsert(PersonKey key, Person person) {\n\t\tif (repo.save(person) != null) {\n\t\t\treturn (\"Data is successfully inserted/updated\");\n\t\t} else {\n\t\t\treturn (\"Data is not successfully inserted\");\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void Update(PersonelContract entity) {\n\n\t}", "public <T> void addPerson(Person p) {\n\t\tsession.save(p);\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription addNewControlPersons();", "public void add(Person person) {\n\t\t\t\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\n\t\tsession.save(person);\n\t}", "@Override\n public void put(Object o, Person person) {\n \n }", "public List <Person> editUser(List <Person> listOfPerson)\n\t{\n\t System.out.println(\"Enter the First Name you want to make changes in: \");\n\t String fname = Utility.inputString();\n\t for(int i = 0; i < listOfPerson.size(); i++)\n\t {\n\t \tif(listOfPerson.get(i).getFname().equals(fname))\n\t \t{\n\t \t\tPerson temp = listOfPerson.get(i);\n\t do {\n\t\t System.out.println(\"Enter the detail you want to edit: \");\n\t\t System.out.println(\"Enter 1 to edit Last Name: \");\n\t\t System.out.println(\"Enter 2 to edit Address: \");\n\t\t System.out.println(\"Enter 3 to edit City: \");\n\t\t System.out.println(\"Enter 4 to edit State: \");\n\t\t System.out.println(\"Enter 5 to edit Zip code: \");\n\t\t System.out.println(\"Enter 6 to edit Phone Number: \");\n\t\t int choice = Utility.inputInteger();\n\t\t switch(choice)\n\t\t {\n\t\t case 1:\n\t\t\t System.out.println(\"Enter the new Last Name\");\n\t\t\t temp.setLname(Utility.inputString()); \n\t\t\t System.out.println(\"Details saved successfully\");\n\t\t\t break;\n\t\t\t \n\t\t case 2:\n\t\t \t System.out.println(\"Enter the New Address\");\n\t\t \t temp.setAddress(Utility.inputString());\n\t\t \t System.out.println(\"Details saved successfully\");\n\t\t \t break;\n\t\t \t \n\t\t case 3:\n\t\t \t System.out.println(\"Enter the New City\");\n\t\t \t temp.setCity(Utility.inputString());\n\t\t \t System.out.println(\"Details saved successfully\");\n\t\t \t break;\n\t\t \t \n\t\t case 4:\n\t\t \t System.out.println(\"Enter the New State\");\n\t\t \t temp.setState(Utility.inputString());\n\t\t \t System.out.println(\"Details saved successfully\");\n\t\t \t break;\n\t\t \t \n\t\t case 5:\n\t\t \t System.out.println(\"Enter the new Zip code\");\n\t\t \t temp.setZip(Utility.inputInteger());\n\t\t \t System.out.println(\"Details saved successfully\");\n\t\t \t break;\n\t\t \t \n\t\t case 6:\n\t\t \t System.out.println(\"Enter the New Phone Number\");\n\t\t \t temp.setPhn(Utility.inputLong());\n\t\t \t System.out.println(\"Details saved successfully\");\n\t\t \t break;\n\t\t \t \n\t\t \t default:\n\t\t \t\t System.out.println(\"Invaild choice\");\n\t\t \t\t break;\n\t\t } \n\t\t listOfPerson.add(temp);\n\t\t return listOfPerson;\n\t }while(Utility.inputBoolean());\n\t }\n\t }\n\t return listOfPerson;\n\t}", "T createOrUpdate(final T domain) throws RequiredValueException, NoEntityFoundException;", "int updateByPrimaryKeySelective(LawPerson record);", "@Test\n public void testUpdatePerson() {\n final AuthenticationToken myToken = login(\"[email protected]\", \"finland\");\n final Group memberGroup = findMemberGroup(myToken);\n final FetchGroupRequest groupRequest = new FetchGroupRequest(memberGroup.getGroupId());\n groupRequest.setUsersToFetch(FetchGroupRequest.UserFetchType.ACTIVE);\n final FetchGroupResponse groupResponse1 = administration.fetchGroup(myToken, groupRequest);\n assertThat(groupResponse1.isOk(), is(true));\n assertThat(groupResponse1.getMembers().size(), is(1));\n\n // Now, let's update the Object, and send it into the IWS\n final User myself = groupResponse1.getMembers().get(0).getUser();\n final Person person = myself.getPerson();\n final Address address = new Address();\n address.setStreet1(\"Mainstreet 1\");\n address.setPostalCode(\"12345\");\n address.setCity(\"Cooltown\");\n address.setState(\"Coolstate\");\n person.setAddress(address);\n person.setFax(\"My fax\");\n person.setBirthday(new Date(\"01-JAN-1980\"));\n person.setMobile(\"+1 1234567890\");\n person.setGender(Gender.UNKNOWN);\n person.setPhone(\"+1 0987654321\");\n person.setUnderstoodPrivacySettings(true);\n person.setAcceptNewsletters(false);\n myself.setPerson(person);\n final UserRequest updateRequest = new UserRequest();\n updateRequest.setUser(myself);\n final Response updateResult = administration.controlUserAccount(myToken, updateRequest);\n assertThat(updateResult.isOk(), is(true));\n\n // Let's find the account again, and verify that the updates were applied\n final FetchUserRequest userRequest = new FetchUserRequest();\n userRequest.setUserId(myself.getUserId());\n final FetchUserResponse userResponse = administration.fetchUser(myToken, userRequest);\n assertThat(userResponse.isOk(), is(true));\n final User myUpdate = userResponse.getUser();\n final Person updatedPerson = myUpdate.getPerson();\n assertThat(updatedPerson.getAlternateEmail(), is(person.getAlternateEmail()));\n assertThat(updatedPerson.getBirthday(), is(person.getBirthday()));\n assertThat(updatedPerson.getFax(), is(person.getFax()));\n assertThat(updatedPerson.getGender(), is(person.getGender()));\n assertThat(updatedPerson.getMobile(), is(person.getMobile()));\n assertThat(updatedPerson.getPhone(), is(person.getPhone()));\n assertThat(updatedPerson.getUnderstoodPrivacySettings(), is(person.getUnderstoodPrivacySettings()));\n assertThat(updatedPerson.getAcceptNewsletters(), is(person.getAcceptNewsletters()));\n\n final Address updatedAddress = updatedPerson.getAddress();\n assertThat(updatedAddress.getStreet1(), is(address.getStreet1()));\n assertThat(updatedAddress.getStreet2(), is(address.getStreet2()));\n assertThat(updatedAddress.getPostalCode(), is(address.getPostalCode()));\n assertThat(updatedAddress.getCity(), is(address.getCity()));\n assertThat(updatedAddress.getState(), is(address.getState()));\n\n // Wrapup... logout\n logout(myToken);\n }", "UserDTO addNewData(UserDTO userDTO);", "public int insert(person p){\n\t\t\treturn j.update(\" insert into person (id,name,location,birthdate) \"+ \" values(?,?,?,?) \", new Object[] {p.getId(),p.getName(),p.getLocation(),new Timestamp(p.getDate().getTime())});\r\n\t\t\r\n\t}" ]
[ "0.70043266", "0.61598927", "0.61009663", "0.6047902", "0.6029754", "0.602656", "0.6013098", "0.6004133", "0.5945705", "0.59323895", "0.5918022", "0.5914143", "0.58967185", "0.58646315", "0.5858456", "0.585463", "0.58379513", "0.5834592", "0.58266014", "0.57928497", "0.5724439", "0.5719091", "0.57140446", "0.5690892", "0.5653275", "0.56395376", "0.56285673", "0.56169945", "0.56063575", "0.55648315", "0.55535203", "0.55361104", "0.553607", "0.5531713", "0.551375", "0.5489642", "0.54838824", "0.54810345", "0.54794866", "0.5475903", "0.54740727", "0.547334", "0.5470107", "0.5466106", "0.54619074", "0.5455743", "0.545214", "0.5443863", "0.54428816", "0.5439848", "0.54365724", "0.5428626", "0.542768", "0.54151064", "0.54138035", "0.54124475", "0.54123074", "0.5409126", "0.54059094", "0.5405115", "0.5402908", "0.53926975", "0.5391236", "0.5388412", "0.53879297", "0.53876936", "0.5379981", "0.5376588", "0.53744096", "0.5373072", "0.5371695", "0.53698784", "0.5369216", "0.5351677", "0.53367925", "0.5331563", "0.5330555", "0.53286165", "0.5324547", "0.5314708", "0.5312834", "0.5302235", "0.5296113", "0.5288097", "0.5286372", "0.52843696", "0.5283795", "0.52653676", "0.5256575", "0.52539676", "0.5245563", "0.52393854", "0.52364594", "0.5211393", "0.5209173", "0.5208842", "0.5207017", "0.5205052", "0.5204395", "0.5204363" ]
0.6814699
1
Delete People an existing one
public boolean deletePeople(Long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteAllPeople() {\n }", "@Override\n\tpublic void deletePerson(Person p) {\n\n\t}", "@Override\r\n\tpublic void delete(Person p) \r\n\t{\n\t\t\r\n\t}", "@DeleteMapping(\"/delete_person\")\n public void delete_user (@RequestParam(\"id\") int id){\n persons.remove(id);\n }", "void deletePersonById( final Long id );", "@Override\r\n\tpublic void delete(Person person) {\n\r\n\t}", "void deletePerson(ReadOnlyPerson target) throws UniquePersonList.PersonNotFoundException;", "@DeleteMapping(\"/delete_person/{id}\")\n public void delete(@PathVariable(\"id\") int id ){\n persons.remove(id);\n }", "public void deletePerson(){\r\n\r\n\t/*get values from text fields*/\r\n\tname = tfName.getText();\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null,\"Please enter person name to delete.\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/*remove Person of the given name*/\r\n\t\tint no = pDAO.removePerson(name);\r\n\t\tJOptionPane.showMessageDialog(null, no + \" Record(s) deleted.\");\r\n\t}\r\n }", "public void deletePerson() {\n\t\t\n\n\t\tString code = selectedPerson.getCode();\n\t\tString nameKey = selectedPerson.getName()+code;\n\t\tString lastnameKey = selectedPerson.getLastName()+code;\n\t\tString fullNameKey = nameKey+lastnameKey+code;\n\t\ttreeName.removeE(nameKey);\n\t\ttreeLastname.removeE(lastnameKey);\n\t\ttreeFullName.removeE(fullNameKey);\n\t\ttreeCode.removeE(code);\n\n\t\t\n\t}", "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}", "public void deletePerson(String personName) {\n \tqueryExecutor.delete(personName);\n \t//personMap.remove(personName);\n }", "void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;", "@Override\r\n\tpublic boolean deletePerson(int id) {\n\t\treturn false;\r\n\t}", "@Override\r\n public boolean delete(Person person) {\n return false;\r\n }", "@Test\r\n public void testDelete() throws Exception {\r\n bank.removePerson(p2);\r\n assertEquals(bank.viewAllPersons().size(), 1);\r\n assertEquals(bank.viewAllAccounts().size(), 1);\r\n }", "public String deleteContactPerson() {\n this.contactPersonService.deleteBy(this.id);\n return SUCCESS;\n }", "public void deleteUlIdPerson()\r\n {\r\n this._has_ulIdPerson= false;\r\n }", "public void removePerson(Person p);", "private void deleteFun() throws IOException {\n String jsonObject = \"{\\\"age\\\":10,\\\"dateOfBirth\\\":1471455886564,\\\"fullName\\\":\\\"Johan Doe\\\"}\";\n IndexRequest indexRequest = new IndexRequest(\"people\");\n indexRequest.source(jsonObject, XContentType.JSON);\n\n IndexResponse response = client.index(indexRequest, RequestOptions.DEFAULT);\n String id = response.getId();\n\t System.out.println(\"id = \" + id);\n\n GetRequest getRequest = new GetRequest(\"people\");\n getRequest.id(id);\n\n GetResponse getResponse = client.get(getRequest, RequestOptions.DEFAULT);\n System.out.println(getResponse.getSourceAsString());\n\n DeleteRequest deleteRequest = new DeleteRequest(\"people\");\n deleteRequest.id(id);\n\n DeleteResponse deleteResponse = client.delete(deleteRequest, RequestOptions.DEFAULT);\n\t System.out.println(\"deleteResponse = \" + deleteResponse.toString());\n }", "public void delete(Personne pers) {\n\t\ttry{\n\t\t\tString req = \"DELETE FROM PERSONNE WHERE id = ?\";\n\t\t\tPreparedStatement ps = connect.prepareStatement(req);\n\t\t\tps.setInt(1, pers.getId());\n\t\t\tps.executeUpdate();\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void delEmployee(String person){\n System.out.println(\"Attempt to delete \" + person);\n try {\n String delete =\"DELETE FROM JEREMY.EMPLOYEE WHERE NAME='\" + person+\"'\"; \n stmt.executeUpdate(delete);\n \n \n } catch (Exception e) {\n System.out.println(person +\" may not exist\" + e);\n }\n \n }", "int deleteByExample(LawPersonExample example);", "int deleteByPrimaryKey(Long personId);", "public static void deleteUserFromDb(Person person) {\n int id = person.getId();\n\n String query = \"DELETE FROM users WHERE idusers = \" + id + \";\";\n DbConnector.updateValueInDb(query);\n }", "@Override\n\tpublic void delete(ERS_USERS entity) {\n\t\t\n\t}", "@Override\n\tpublic void deleteBasicPeople(BasicPeopleEntity basicPeople) {\n\t\tbasicPeopleDao.deleteByEntity(basicPeople);\n\t\tdeleteEntity(basicPeople);\n\t\t\n\t}", "int deleteByPrimaryKey(PersonRegisterDo record);", "public void delete(Address entity);", "private void removePerson(){\r\n\t\t// can't remove a value if there's nothing there\r\n\t\tif (dataTable.getSelectedRow()== -1)\r\n\t\t\treturn;\r\n\t\tpeople.remove(dataTable.getSelectedRow());\r\n\t\tpersonTableModel.fireTableRowsDeleted(dataTable.getSelectedRow(),dataTable.getSelectedRow());\r\n\t}", "int deleteAllPhonesForPerson(int personId);", "@DeleteMapping(\"{id}\")\n public ResponseEntity<PersonResponse> delete(@PathVariable(name = \"id\") String id) {\n personService.delete(id);\n return ResponseEntity.status(HttpStatus.NO_CONTENT).build();\n }", "public void delete(Integer id) {\n\t\tpersonRepository.delete(id);\n\t}", "public void delete(PersonEntity person) {\n new Thread(new DeleteRunnable(dao, person)).start();\n }", "@Override\n\tpublic String deletePerson(Integer atId) {\n\t\treturn null;\n\t}", "void deletePerson(final PersonModel person) {\n DatabaseReference childRef = mDBRef.child(person.getID());\n childRef.setValue(null);\n }", "@Test\n public void deleteDoctor() {\n\t\tList<Doctor> doctors = drepository.findByName(\"Katri Halonen\");\n\t\tassertThat(doctors).hasSize(1);\n \tdrepository.deleteById((long) 3);\n \tdoctors = drepository.findByName(\"Katri Halonen\");\n \tassertThat(doctors).hasSize(0);\n }", "public void delete(int idPersona) throws SQLException, IOException {\n con = getConnection();\n\n cs = con.prepareCall(\"Call delete_persona(?)\");\n cs.setEscapeProcessing(true);\n cs.setInt(1, idPersona);\n cs.execute();\n con.close();\n }", "public void delete(final ICallback<? super PersonName> callback) {\n send(HttpMethod.DELETE, callback, null);\n }", "@Test\r\n\tpublic void testDeleteFriend() {\r\n\t\tPerson p1 = new Person(0);\r\n\t\tFriend p2 = new Friend(\"Dave\");\r\n\t\tassertTrue(p1.addFriend(p2));\r\n\t\tassertTrue(p1.deleteFriend(p2));\r\n\t\tassertFalse(p1.deleteFriend(p2));\r\n\t}", "public void delete(Long id) {\n\t\tpersonRepository.deleteById(id);\n\t}", "public void deleteUser(String name);", "@Override\n\tpublic void deletePerson(Serializable id) {\n\t\tPerson person = (Person)sessionFactory.getCurrentSession().get(Person.class, 1L);\n\t\tsessionFactory.getCurrentSession().delete(person);\n\t}", "@Override\n\tpublic void delete(Pessoa arg0) {\n\t\t\n\t}", "public void clearPeople() {\n personNames.clear();\n personIds.clear();\n personPhotos.clear();\n personSelections.clear();\n addDefaultPerson();\n }", "@Override\n\tpublic void deleteCreator(CreatorDTO creator) {\n\t\t\n\t}", "int deleteByExample(OrgMemberRecordExample example);", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete RmsPerson : {}\", id);\n rmsPersonRepository.deleteById(id);\n rmsPersonSearchRepository.deleteById(id);\n }", "public void delete(Integer id) {\n\t\tlogger.debug(\"Deleting existing person\");\n\t\t// Retrieve existing person\n\t\tPerson person = this.get(id);\n\t\t// Delete \n\t\tentityManager.remove(person);\n\t}", "public void clearPersons() throws DataAccessException {\n try (Statement stmt = conn.createStatement()) {\n String sql = \"DELETE FROM persons\";\n stmt.executeUpdate(sql);\n } catch (SQLException e) {\n throw new DataAccessException(\"SQL Error encountered while clearing persons table\");\n }\n }", "public boolean deleteUser(List <Person> listOfPerson) {\n\t\tdo \n\t\t{\n\t\t\tSystem.out.println(\"Enter the First Name of the person you want to delete: \");\n\t\t\tString firstName = Utility.inputString();\n\t\t\tfor (int i = 0; i < listOfPerson.size(); i++) \n\t\t\t{\n\t\t\t\tif (listOfPerson.get(i).getFname().equals(firstName)) \n\t\t\t\t{\n\t\t\t\t\tlistOfPerson.remove(i);\n\t\t\t\t\tSystem.out.println(\"Person's detail deleted successfully\");\n\t\t\t\t\tSystem.out.println(\"To delete more person \");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} while (Utility.inputBoolean());\n\t\treturn false;\n\t}", "@Override\n public <T extends JPABase> T delete() {\n for (Candidate candidate : candidates) {\n candidate.delete();\n }\n this.candidates.clear();\n\n for (User user : users) {\n user.delete();\n\n }\n this.users.clear();\n\n\n\n return super.delete();\n }", "int deleteByExample(AddressesExample example);", "int deleteByExample(organize_infoBeanExample example);", "void delete(User user);", "void delete(User user);", "int deleteByExample(ROmUsersExample example);", "@Nullable\n public PersonAnnotation delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }", "@Test\r\n\tpublic void deleteTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeam \r\n\t\tTeam team_1 = new wsdm.domain.Team();\r\n\t\tservice.deleteTeam(team_1);\r\n\t}", "@Delete\n void delete(UsersEntity usersEntity);", "@Override\n\tpublic PersonelContract Delete(PersonelContract entity) {\n\t\treturn null;\n\t}", "public void delete(Employeee em) {\n\t\temployeerepo.delete(em);\n\t}", "@Transactional\n\t@Override\n\tpublic void deleteById(Integer id) throws Exception {\n\t\tpersonaRepository.deleteById(id);\n\t}", "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 void deleteParticipacao(Integer id) {\n participacaoRepository.deleteById(id);\n //listClient();\n \n}", "void deletePatient(Patient target);", "@Test\r\n\tpublic void testDeleteFriendByUsername() {\r\n\t\tPerson p1 = new Person(0);\r\n\t\tp1.nonDatabase = true;\r\n\t\tFriend f = new Friend(\"Dave\");\r\n\t\tp1.addFriend(f);\r\n\t\tassertEquals(1, p1.getFriends().size());\r\n\t\tp1.deleteFriendByUsername(\"Dave\");\r\n\t\tassertEquals(0, p1.getFriends().size());\r\n\t}", "public User delete(User user);", "@Override\r\n\tpublic void deleteAdress(Adress adress) {\n\t\tem.remove(em.merge(adress));;\r\n\t}", "public void deleteUser(String id) {\n\t\tSystem.out.println(\"deleteUser\");\n\t\t personDAO.deleteUser(id);\n\t}", "@Override\n\tpublic void delete(CorsoDiLaurea corso) {\n\t\t\n\t}", "@Test\n public void testRemove() {\n System.out.println(\"remove\");\n Repositorio repo = new RepositorioImpl();\n Persona persona = new Persona();\n persona.setNombre(\"Ismael\");\n persona.setApellido(\"González\");\n persona.setNumeroDocumento(\"4475199\");\n repo.crear(persona);\n \n Persona personaAEliminar = (Persona) repo.buscar(persona.getId());\n assertNotNull(personaAEliminar);\n \n //eliminacion\n repo.eliminar(personaAEliminar);\n Persona personaEliminada = (Persona) repo.buscar(persona.getId());\n assertNull(personaEliminada);\n }", "private void deleteEmployee() {\n // Only perform the delete if this is an existing pet.\n if (mCurrentPetUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "public void del(String name) {\n\t\tfor (AddrBean ad : addrlist) {\n\t\t\tif (name.equals(ad.getUsername())) {\n\t\t\t\taddrlist.remove(ad);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void delete(Iterable<? extends Candidat> entities) {\n\r\n\t}", "int deleteByExample(CTipoPersonaExample example) throws SQLException;", "public void remove(Person person) {\n\t\tlistOfPeople.remove(person);\n\t}", "@Override\n\tpublic int supprimerPersonne(Personne p) {\n\t\treturn dao.supprimerPersonne(p);\n\t}", "@Override\n public Person del(Object o) {\n return myPerson;\n }", "int deleteByPrimaryKey(String idTipoPersona) throws SQLException;", "public void deletePersona ( Persona persona ) throws Exception \n\t{\n\t\tDAOPersona dao = new DAOPersona( );\n\t\ttry\n\t\t{\n\t\t\tthis.conn = darConexion();\n\t\t\tdao.setConn( conn );\n\t\t\tif ( this.getPersonaById(persona.getId()) == null )\n\t\t\t\tthrow new Exception(\"La persona con el id = \" + persona.getId() + \" no se encuentra persistido en la base de datos.\");\n\t\t\telse \n\t\t\t\tdao.deletePersona(persona);\n\n\t\t}\n\t\tcatch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tthrow sqlException;\n\t\t} \n\t\tcatch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\t\n\t}", "public void delete(User usuario);", "public boolean deleteAllPeople() throws SQLException {\r\n\t\treturn db.delete(DATABASE_TABLE, null, null) > 0;\r\n\t}", "public void removePerson(Person p){\n Iterator<Person> itr = personList.iterator();\n while(itr.hasNext()){\n Person x = itr.next();\n if(x.equals(p)){itr.remove();}\n }\n }", "public boolean removeSickPerson(int id) throws SQLException;", "public boolean deletePalvelupisteet();", "@Override\n public void delete(ArrayList<League> leagues) {\n\n }", "public void destroy() throws Exception {\n\t\tSystem.out.println(\"Antes de eliminar el bean Persona: \" + nombre);\n\t}", "int deleteByExample(ImMyFriendExample example);", "void deleteUser(int id);", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete(User user)throws Exception;", "public boolean deletePersonById(String id) {\n Optional<Person> model = Optional.empty();\n if (!model.isPresent()) {\n return false;\n }\n boolean deleted;\n try {\n // TODO: Create a method in MongoPersonRepository to delete a person by id\n deleted = true;\n } catch (Exception ex) {\n deleted = false;\n }\n return deleted;\n }", "@Override\r\n\tpublic void delete(FollowUp followup) {\n\t\t\r\n\t}", "public static void deleteContact() {\n System.out.println(\"Enter first name : \");\n String firstName = sc.nextLine();\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i).getFirstName().equalsIgnoreCase(firstName)) {\n list.remove(i);\n } else {\n System.out.println(\"No data found\");\n }\n }\n }" ]
[ "0.74193436", "0.7378385", "0.7327618", "0.7306552", "0.7305378", "0.7293789", "0.7205611", "0.7081901", "0.70276976", "0.7004814", "0.7004322", "0.69629353", "0.69574213", "0.69454324", "0.6944991", "0.6899757", "0.68991244", "0.68950135", "0.6852794", "0.6813162", "0.6659871", "0.66149133", "0.6580171", "0.656195", "0.6543761", "0.6473752", "0.6446057", "0.6433752", "0.6430183", "0.6424053", "0.6408861", "0.6406663", "0.64048946", "0.6390879", "0.63748425", "0.63632226", "0.6358864", "0.63583195", "0.6355207", "0.6334971", "0.63270265", "0.63264084", "0.6322448", "0.63158697", "0.63143593", "0.6301886", "0.63008136", "0.62934583", "0.62864184", "0.62855166", "0.625454", "0.6240779", "0.62338644", "0.62203354", "0.6212439", "0.6212439", "0.6210744", "0.6207835", "0.62046534", "0.619699", "0.61939156", "0.6193405", "0.61773056", "0.6168519", "0.6168378", "0.6168265", "0.61521316", "0.61503416", "0.6146782", "0.61444795", "0.6141973", "0.6135502", "0.6129106", "0.6122801", "0.6121259", "0.6111885", "0.610138", "0.60964274", "0.60728467", "0.6066077", "0.6060217", "0.60569346", "0.6056296", "0.6049781", "0.6034175", "0.60318303", "0.60287803", "0.60275316", "0.6027072", "0.60238475", "0.6023178", "0.6023178", "0.6023178", "0.6023178", "0.6023178", "0.6023178", "0.6020767", "0.60141647", "0.6011666", "0.5996281" ]
0.7717816
0
Initializes the metrics for delete operation.
public void initMetrics(MeterRegistry meterRegistry) { String metricName = String.join(".", "pap", "policy", "deployments"); String description = "Timer for HTTP request to deploy/undeploy a policy"; undeploySuccessTimer = Timer.builder(metricName).description(description) .tags(PrometheusUtils.OPERATION_METRIC_LABEL, PrometheusUtils.UNDEPLOY_OPERATION, PrometheusUtils.STATUS_METRIC_LABEL, PdpPolicyStatus.State.SUCCESS.name()) .register(meterRegistry); undeployFailureTimer = Timer.builder(metricName).description(description) .tags(PrometheusUtils.OPERATION_METRIC_LABEL, PrometheusUtils.UNDEPLOY_OPERATION, PrometheusUtils.STATUS_METRIC_LABEL, PdpPolicyStatus.State.FAILURE.name()) .register(meterRegistry); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearMetrics() {\n this.metrics_ = GeneratedMessageLite.emptyProtobufList();\n }", "@Override\n\tpublic synchronized void initialize(OperatorContext context)\n\t\t\tthrows Exception {\n\t\t// Must call super.initialize(context) to correctly setup an operator.\n\t\tsuper.initialize(context);\n\t\tif (batchSize > 0) {\n\t\t\tdeleteList = new ArrayList<Delete>(batchSize);\n\t\t}\n\t\tdeleteMode = DeleteMode.ROW;\n\t\tif (colFamBytes != null || columnFamilyAttr != null) {\n\t\t\tif (colQualBytes != null || columnQualifierAttr != null) {\n\t\t\t\tdeleteMode = DeleteMode.COLUMN;\n\t\t\t} else\n\t\t\t\tdeleteMode = DeleteMode.COLUMN_FAMILY;\n\t\t}\n\t}", "private void deletes() {\n \tDBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n for (Delete delete: deletes) {\n \tdelete.init();\n }\n \n //DBPeer.updateTableIndexes(); //Set min max of indexes not implemented yet\n }", "public static void initializeMetrics()\n {\n // Get the Java runtime\n Runtime runtime = Runtime.getRuntime();\n // Run the garbage collector\n runtime.gc();\n \tstartingMemory = runtime.totalMemory() - runtime.freeMemory();\n }", "private Delete() {}", "private Delete() {}", "@Delete\n void delete(Measurement measurement);", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "public DeleteRecord_Params() \n\t{\n\t\tbatch = null;\n\t}", "public void cleanStatistics() {\n\t\thasChildStopNominator = HashBasedTable.create();\n\t\thasChildStopDenominator = HashBasedTable.create();\n\t\tnoChildStopNominator = HashBasedTable.create();\n\t\tnoChildStopDenominator = HashBasedTable.create();\n\t\tleftAttachNominator = HashBasedTable.create();\n\t\tleftAttachDenominator = HashBasedTable.create();\n\t\trightAttachNominator = HashBasedTable.create();\n\t\trightAttachDenominator = HashBasedTable.create();\n\t}", "public void operationDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "@Test\n public void testMetricDeletion() throws Exception {\n Aggregation agg1 = new DefaultAggregation(ImmutableList.of(\"dim1\", \"dim2\", \"dim3\"),\n ImmutableList.of(\"dim1\"));\n Aggregation agg2 = new DefaultAggregation(ImmutableList.of(\"dim1\", \"dim3\"),\n ImmutableList.of(\"dim3\"));\n\n int resolution = 1;\n Cube cube = getCube(\"testDeletion\", new int[] {resolution},\n ImmutableMap.of(\"agg1\", agg1, \"agg2\", agg2));\n\n Map<String, String> agg1Dims = new LinkedHashMap<>();\n agg1Dims.put(\"dim1\", \"1\");\n agg1Dims.put(\"dim2\", \"1\");\n agg1Dims.put(\"dim3\", \"1\");\n\n Map<String, String> agg2Dims = new LinkedHashMap<>();\n agg2Dims.put(\"dim1\", \"1\");\n agg2Dims.put(\"dim3\", \"1\");\n\n\n // write some data\n writeInc(cube, \"metric1\", 1, 1, agg1Dims);\n writeInc(cube, \"metric2\", 3, 3, agg2Dims);\n\n // verify data is there\n verifyCountQuery(cube, 0, 15, resolution, \"metric1\", AggregationFunction.SUM,\n agg1Dims, ImmutableList.of(),\n ImmutableList.of(\n new TimeSeries(\"metric1\", new HashMap<>(), timeValues(1, 1))));\n verifyCountQuery(cube, 0, 15, resolution, \"metric2\", AggregationFunction.SUM,\n agg2Dims, ImmutableList.of(),\n ImmutableList.of(\n new TimeSeries(\"metric2\", new HashMap<>(), timeValues(3, 3))));\n\n // delete metrics from agg2\n Predicate<List<String>> predicate =\n aggregates -> Collections.indexOfSubList(aggregates, new ArrayList<>(agg2Dims.keySet())) == 0;\n CubeDeleteQuery query =\n new CubeDeleteQuery(0, 15, resolution, agg2Dims, Collections.emptySet(), predicate);\n cube.delete(query);\n\n // agg1 data should still be there\n verifyCountQuery(cube, 0, 15, resolution, \"metric1\", AggregationFunction.SUM,\n agg1Dims, ImmutableList.of(),\n ImmutableList.of(\n new TimeSeries(\"metric1\", new HashMap<>(), timeValues(1, 1))));\n // agg2 data should get deleted\n verifyCountQuery(cube, 0, 15, resolution, \"metric2\", AggregationFunction.SUM,\n agg2Dims, ImmutableList.of(), ImmutableList.of());\n\n // delete metrics remain for agg1\n predicate = aggregates -> Collections.indexOfSubList(aggregates, new ArrayList<>(agg1Dims.keySet())) == 0;\n query = new CubeDeleteQuery(0, 15, resolution, agg1Dims, Collections.emptySet(), predicate);\n cube.delete(query);\n verifyCountQuery(cube, 0, 15, resolution, \"metric1\", AggregationFunction.SUM,\n agg1Dims, ImmutableList.of(), ImmutableList.of());\n }", "private static void _reset() {\n // clear metrics\n HystrixCommandMetrics.reset();\n HystrixThreadPoolMetrics.reset();\n HystrixCollapserMetrics.reset();\n // clear collapsers\n HystrixCollapser.reset();\n // clear circuit breakers\n HystrixCircuitBreaker.Factory.reset();\n HystrixPlugins.reset();\n HystrixPropertiesFactory.reset();\n currentCommand.set(new LinkedList<HystrixCommandKey>());\n }", "@Override\n public void onStart() {\n if (SystemMetricsService.getProvider() == null)\n throw new IllegalStateException(\"SystemMetricsRecorderJob will not start as no SystemMetricsServiceProvider is registered for this platform\");\n\n DataSourceModel dataSourceModel = DataSourceModelService.getDefaultDataSourceModel();\n // Starting a periodic timer to capture metrics every seconds and record it in the database\n metricsCapturePeriodicTimer = Scheduler.schedulePeriodic(1000, () -> {\n // Creating an update store for metrics entity\n UpdateStore store = UpdateStore.create(dataSourceModel);\n // Instantiating a new system metrics entity and asking the system metrics service to fill that entity\n SystemMetricsService.takeSystemMetricsSnapshot(store.insertEntity(SystemMetricsEntity.class));\n // Submitting this new record into the database\n store.submitChanges().setHandler(asyncResult -> {\n if (asyncResult.failed())\n Logger.log(\"Inserting metrics in database failed!\", asyncResult.cause());\n });\n });\n\n // Deleting old metrics records (older than 1 day) regularly (every 12h)\n metricsCleaningPeriodicTimer = Scheduler.schedulePeriodic(12 * 3600 * 1000, () ->\n SubmitService.executeSubmit(SubmitArgument.builder()\n .setLanguage(\"DQL\")\n .setStatement(\"delete Metrics where LtTestSet is null and date < ?\")\n .setParameters(Instant.now().minus(1, ChronoUnit.DAYS))\n .setDataSourceId(dataSourceModel.getDataSourceId())\n .build()\n ).setHandler(ar -> {\n if (ar.failed())\n Logger.log(\"Deleting metrics in database failed!\", ar.cause());\n else\n Logger.log(\"\" + ar.result().getRowCount() + \" metrics records have been deleted from the database\");\n }));\n }", "@DELETE\n public void delete() {\n }", "@DELETE\n public void delete() {\n }", "private void delete() {\n\n\t}", "@DELETE\n public void delete() {\n }", "public void destroy() {\n //Write hit count to DB!!\n }", "public RequestDataBuilder delete() {\n\t\tRequest request = new Request(urlPattern, RequestMethod.DELETE);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}", "@Override\n\t\tprotected void _delete() {\n\t\t\toldValue = 0;\n\t\t\tnewValue = 0;\n\t\t}", "@Override\n public void delete()\n {\n }", "@Override\r\n\tpublic void reset() {\n\t\tthis.dcn = null;\r\n\t\tthis.pairs.clear();\r\n\t\tthis.successfulCount = 0;\r\n\t\tthis.failedCount = 0;\r\n\t\tthis.metrics.clear();\r\n\t}", "@Test\n public void deleteMeasurementUsingDELETETest() throws ApiException {\n Integer measurementId = null;\n api.deleteMeasurementUsingDELETE(measurementId);\n\n // TODO: test validations\n }", "public static void setDeleteAttributes(\n MiniBatchOperationInProgress<Mutation> miniBatchOp)\n throws IOException {\n for (int i = 0; i < miniBatchOp.size(); i++) {\n Mutation m = miniBatchOp.getOperation(i);\n if (!(m instanceof Delete)) {\n // Ignore if it is not Delete type.\n continue;\n }\n byte[] sourceOpAttr =\n m.getAttribute(QueryServices.SOURCE_OPERATION_ATTRIB);\n if (sourceOpAttr == null) {\n continue;\n }\n Tag sourceOpTag = new ArrayBackedTag(\n PhoenixTagType.SOURCE_OPERATION_TAG_TYPE, sourceOpAttr);\n List<Cell> updatedCells = new ArrayList<>();\n for (CellScanner cellScanner = m.cellScanner();\n cellScanner.advance();) {\n Cell cell = cellScanner.current();\n RawCell rawCell = (RawCell) cell;\n List<Tag> tags = new ArrayList<>();\n Iterator<Tag> tagsIterator = rawCell.getTags();\n while (tagsIterator.hasNext()) {\n tags.add(tagsIterator.next());\n }\n tags.add(sourceOpTag);\n // TODO: PrivateCellUtil's IA is Private.\n // HBASE-25328 adds a builder methodfor creating Tag which\n // will be LP with IA.coproc\n Cell updatedCell = PrivateCellUtil.createCell(cell, tags);\n updatedCells.add(updatedCell);\n }\n m.getFamilyCellMap().clear();\n // Clear and add new Cells to the Mutation.\n for (Cell cell : updatedCells) {\n Delete d = (Delete) m;\n d.add(cell);\n }\n }\n }", "public void delete() {\n Utils.inWriteLock(leaderIsrUpdateLock, () -> {\n assignedReplicaMap.clear();\n Set<Replica> inSyncReplicas = Sets.newHashSet();\n leaderReplicaIdOpt = Optional.empty();\n logManager.deleteLog(new TopicAndPartition(topic, partitionId));\n// error(String.format(\"Error deleting the log for partition <%s,%d>\", topic, partitionId), e);\n// Runtime.getRuntime().halt(1);\n return null;\n });\n }", "public void delete() {\n\n\t}", "@Override\n\tpublic void delete() {\n\n\t}", "public void unsetCount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(COUNT$8);\n }\n }", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "@Override\n public void delete() {\n }", "@Override\n public void delete(String reference) throws DataStoreException\n {\n numDeleteRequests.incrementAndGet();\n dataMap.remove(reference);\n }", "@Override\n\tpublic void initNode() {\n\t\tEFMonitorUtil.cleanAllInstance(false);\t\t\t\n\t}", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "default void deleteMetadataStore(\n com.google.cloud.aiplatform.v1.DeleteMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteMetadataStoreMethod(), responseObserver);\n }", "public void setUp() {\n deleteAllRecords();\n }", "public void clear() {\n counters.clear();\n }", "public Builder clearDeleteSensor() {\n if (deleteSensorBuilder_ == null) {\n deleteSensor_ = null;\n onChanged();\n } else {\n deleteSensor_ = null;\n deleteSensorBuilder_ = null;\n }\n\n return this;\n }", "@Override\n\tpublic int delete() {\n\t\treturn 0;\n\t}", "public void delete() {\n\t\tdeleted = true;\n\t}", "@Override\r\n\tpublic int delete(ActionContext arg0) throws Exception {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void delete() {\n\r\n\t}", "public void deleteRecord() {\n\n new BackgroundDeleteTask().execute();\n }", "@Override\n public void clear() {\n checkNotDeleted();\n super.clear();\n }", "private void init() {\n clearCaches();\n }", "public RecommendedActionMetricInfo() {\n }", "@Nullable\n public UserExperienceAnalyticsAnomalyDevice delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }", "public synchronized void deleteMonitoringDevice(int uniqueID)\n\t{\n\t\tsuper.configuationObjects.remove(uniqueID);\n\t}", "@Override\n\tpublic void deleteAll() {\n\n\t}", "@Override\n\tpublic void deleteAll() {\n\n\t}", "@Override\n\tpublic void deleteAll() {\n\n\t}", "public static void resetStatistics()\r\n {\r\n \t//System.out.println ( \"Resetting statistics\");\r\n count_ = 0; \r\n }", "public static void cleanseInits() {\n delayDuration = null;\n timerFrequency = null;\n numProcessorThreads = null;\n maxProcessorTasks = null;\n }", "public void resetStatistics()\n {\n }", "@Override\r\n\tpublic int delete() throws Exception {\n\t\treturn 0;\r\n\t}", "public void delete(){\r\n\r\n }", "@Override\n public void delete() {\n\n\n }", "void shutdown() {\n if (metricRegistry != null) {\n for (String metricName : gaugeMetricNames) {\n try {\n metricRegistry.remove(metricName);\n } catch (RuntimeException e) {\n // ignore\n }\n }\n }\n }", "private void discoverDelete(RoutingContext rctx) {\n rctx.response().end(new ObjectBuilder().build());\n }", "@After\n\tpublic void tearDown() {\n\t\theroRepository.delete(HERO_ONE_KEY);\n\t\theroRepository.delete(HERO_TWO_KEY);\n\t\theroRepository.delete(HERO_THREE_KEY);\n\t\theroRepository.delete(HERO_FOUR_KEY);\n\t\theroRepository.delete(\"hero::counter\");\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "public DeleteResource() {\n }", "@Override\n\tpublic int delete(int t) {\n\t\treturn 0;\n\t}", "void clear( final ResultProcs procs )\n {\n enqueue( new Runnable() {\n @Override\n public void run() {\n int result = getWritableDatabase()\n .delete( LOGS_TABLE_NAME, \"1\", null );\n procs.onCleared( result );\n }\n } );\n }", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"no goin\");\n\t\t\n\t}", "void delete(String resourceGroupName, String dataControllerName, Context context);", "public void delete()\n {\n if (this.data != null)\n {\n this.data.free();\n this.data = null;\n }\n \n this.width = 0;\n this.height = 0;\n \n this.mipmaps = 1;\n }", "@Override\r\n\tpublic void deleteAllInBatch() {\n\t\t\r\n\t}", "void deleteAllDiscounts();", "public void resetCounters()\n {\n cacheHits = 0;\n cacheMisses = 0;\n }", "@Override\n\tpublic void delete(Facture y) {\n\t\t\n\t}", "private void deleteResource() {\n }", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "private void metricUnregistering (ServiceReference srefMetric) {\n // Retrieve the service ID\n Long serviceId =\n (Long) srefMetric.getProperty(Constants.SERVICE_ID);\n logInfo(\n \"A metric service with ID \"\n + serviceId + \" is unregistering.\");\n \n // Remove this service from the list of available metric services\n if (registeredMetrics.containsKey(serviceId)) {\n registeredMetrics.remove(serviceId);\n }\n }", "public void setDeleted();", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 삭제를 하다.\");\n\t}", "public void unsetErrorcount()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(ERRORCOUNT$4);\r\n }\r\n }", "@Override\n\tpublic void delete(Medico i) throws Exception {\n\t\t\n\t}", "public Builder clearUpdateCounts() {\n updateCounts_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000004);\n onChanged();\n return this;\n }", "public void delete() {\n\n }", "public void resetCounters() {\n setErrorCounter(0);\n setDelayCounter(0);\n }", "@Override\n\tpublic void delete() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\r\n\t}", "public void delete()\n throws ROSRSException {\n annotation.deletePropertyValues(subject, property, merge ? null : value);\n if (annotation.getStatements().isEmpty()) {\n annotation.delete();\n } else {\n annotation.update();\n }\n value = null;\n }", "public Destroyer() {\n super(DS_SIZE);\n }", "public void clear()\n\t{\n\t\t_totalMsgsPerSec = 0;\n\t\t_latencyMsgsPerSec = 0;\n\t\t_ticksPerSec = 0;\n\t\t_arrayCount = 0;\n\t}", "public void resetAllIdCounts() {\n \t\tthis.userCounterIdCounter = 0;\n \t\tthis.questionIdCounter = 0;\n \t\tthis.answerIdCounter = 0;\n \t\tthis.commentIdCounter = 0;\n \t}", "public void attributDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "void clearStatistics();" ]
[ "0.5919001", "0.5838219", "0.5677664", "0.55797243", "0.5550191", "0.5550191", "0.5381961", "0.5370262", "0.5349716", "0.53493583", "0.53246045", "0.53187406", "0.52699846", "0.52699536", "0.526155", "0.526155", "0.52604705", "0.52189857", "0.5205505", "0.5193999", "0.5190648", "0.51891166", "0.51819855", "0.51654136", "0.51446694", "0.5126189", "0.5113557", "0.508904", "0.50675005", "0.50583273", "0.50583273", "0.50542516", "0.5050946", "0.5049279", "0.50181997", "0.5011741", "0.5006595", "0.5000514", "0.49995035", "0.4971875", "0.496273", "0.4958627", "0.49561226", "0.49507532", "0.49442464", "0.49282697", "0.4923603", "0.4920145", "0.49191514", "0.4909902", "0.4909902", "0.4909902", "0.4905664", "0.49028084", "0.49025857", "0.4870037", "0.48653966", "0.486431", "0.48530704", "0.48522446", "0.48521194", "0.4847065", "0.4847065", "0.4847065", "0.4847065", "0.48448566", "0.48410568", "0.4839476", "0.48312622", "0.48200074", "0.48179471", "0.48166662", "0.4813125", "0.4811554", "0.48042682", "0.47993332", "0.47935003", "0.47935003", "0.47935003", "0.47935003", "0.47935003", "0.47935003", "0.47935003", "0.47935003", "0.47923726", "0.47916123", "0.4791063", "0.47906467", "0.4789987", "0.47895488", "0.47884548", "0.478681", "0.4783876", "0.47807956", "0.47749716", "0.4771939", "0.47705486", "0.476632", "0.4760322", "0.4751257" ]
0.48370507
68
Deletes a PDP group.
@Override public ResponseEntity<PdpGroupDeleteResponse> deleteGroup(String groupName, UUID requestId) { return doOperation(requestId, () -> provider.deleteGroup(groupName)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteGroup(Group group);", "Result deleteGroup(String group);", "DeleteParameterGroupResult deleteParameterGroup(DeleteParameterGroupRequest deleteParameterGroupRequest);", "public void deleteGroup(GroupUser group) {\n try{\n PreparedStatement s = sql.prepareStatement(\"DELETE FROM Groups WHERE groupName=? AND id=?;\");\n s.setString(1, group.getId());\n s.setInt(2, group.getIdNum());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public void deleteGroup(int id) {\n\t\tgroupRepo.deleteById(id);\n\t\t\n\t}", "public synchronized void deleteGroup(String groupName) {\n\t\t\tgroupList.remove(groupName);\n\t\t}", "public void removeGroup(int groupId);", "public int deleteGroup(Integer gId) {\n\t\treturn groupMapper.deleteByPrimaryKey(gId);\r\n\t}", "int deleteByPrimaryKey(Long id_message_group);", "public void deleteGroup( GroupId groupId ) {\n String path = template.urlFor( UrlTemplate.GROUPS_ID_PATH ).replace( \"{groupId}\", groupId.getId() ).build();\n try {\n client.delete( path );\n } catch ( RequestException e ) {\n throw new EslServerException( \"Failed to delete Group.\", e );\n } catch ( Exception e ) {\n throw new EslException( \"Failed to delete Group.\", e );\n }\n }", "public void removeFromGroup () throws PPException{\n\t\tif (PPNative.Unit_SetGroup (id, -1) == -1)\n\t\t\tthrow new PPException (\"removeFromGroup -> \"+PPNative.GetError());\n\t}", "public int deleteCompGroup(CompGroupVO objCompGroupVO) throws EMDException,\n\tException;", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void deleteGroup(String groupId) {\n this.serviceClient.deleteGroup(groupId);\n }", "public void deleteGroup(String groupId) {\n deleteGroup(getGroup(groupId));\n }", "int deleteByPrimaryKey(SeGroupKey key);", "public String deleteProductGroupNew() {\n\t\tactionStartTime = new Date();\n\t\tresetToken(result);\n\t\ttry {\n\t\t\tProductGroup productGroupMua = promotionProgramMgr.getProductGroupById(groupMuaId);\n\t\t\tProductGroup productGroupKM = promotionProgramMgr.getProductGroupById(groupKMId);\n\t\t\tpromotionProgramMgr.deleteProductGroup(productGroupMua, getLogInfoVO());\n\t\t\tpromotionProgramMgr.deleteProductGroup(productGroupKM, getLogInfoVO());\n\t\t\tif (productGroupMua != null && productGroupMua.getPromotionProgram() != null) {\n\t\t\t\tpromotionProgramMgr.updateMD5ValidCode(productGroupMua.getPromotionProgram(), getLogInfoVO());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogUtility.logErrorStandard(e, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.deleteProductGroupNew\"), createLogErrorStandard(actionStartTime));\n\t\t\terrMsg = ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM);\n\t\t\tresult.put(\"errMsg\", errMsg);\n\t\t\tresult.put(ERROR, true);\n\t\t\treturn SUCCESS;\n\t\t}\n\t\treturn SUCCESS;\n\t}", "public boolean deletePeopleInGroup(int groupId) throws SQLException {\r\n\t\treturn db.delete(DATABASE_TABLE, KEY_GROUP_ID + \"=\" + groupId, null) > 0;\r\n\t}", "int deleteByPrimaryKey(Long id_user_group);", "@SuppressWarnings(\"serial\")\n\tpublic void delGroup(final String name) throws Exception{\n\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\tGroups groups = Groups.findOrCreate(ur);\n\t\tgroups.deleteChildren(Group.TAG,new HashMap<String,String>(){{\n\t\t\tput(\"name\",name);\n\t\t}});\n\t}", "@Override\n public boolean deleteGroup(String id) {\n if (this.identityService.findGroupById(id) != null) {\n this.identityService.deleteGroup(id);\n return true;\n } else {\n return false;\n }\n }", "void deleteByResourceGroup(String resourceGroupName, String dataControllerName);", "public boolean deleteProductGroup(\n\t\t\tProductGroup toDelete) {\n\t\tboolean success = this.productGroups\n\t\t\t\t.remove(toDelete);\n\n\t\treturn success;\n\t}", "@Override\n\tpublic synchronized void removeGroup(Group group) throws DataBackendException, UnknownEntityException\n {\n try\n {\n ((TorqueAbstractSecurityEntity)group).delete();\n }\n catch (TorqueException e)\n {\n throw new DataBackendException(\"Removing Group '\" + group.getName() + \"' failed\", e);\n }\n }", "@Test\n public void deleteSubjectGroupTest() throws Exception {\n createSubjectGroupTest();\n \n IPSubject ip = new IPSubject();\n Map<Long, SubjectGroup> result = ip.getSubjectGroupInfoByName(\"network\");\n Long groupId = result.keySet().toArray(new Long[1])[0];\n assertNotNull(groupId);\n \n ip.deleteSubjectGroup(groupId);\n\n EntityManagerContext.open(factory);\n try {\n org.ebayopensource.turmeric.policyservice.model.SubjectGroup savedSubjectGroup =\n EntityManagerContext.get().find(\n org.ebayopensource.turmeric.policyservice.model.SubjectGroup.class, \n groupId);\n assertNull(savedSubjectGroup);\n } finally {\n EntityManagerContext.close();\n }\n }", "private void deleteGroupImage(Group group) {\n trDeleteGroupImage.setUser(user);\n trDeleteGroupImage.setGroup(group);\n try {\n trDeleteGroupImage.execute();\n } catch (NotGroupOwnerException | GroupNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void removePaymentGroup(String pPaymentGroupName);", "public void removeGroup(String deleteGroupKey) {\n\n for (Iterator<Group> it = groups.iterator(); it.hasNext();){\n Group group = it.next();\n if (TextUtils.equals(group.key, deleteGroupKey)){\n it.remove();\n notifyDataSetChanged();\n }\n }\n }", "@DeleteMapping(\"/payment-groups/{id}\")\n @Timed\n public ResponseEntity<Void> deletePaymentGroup(@PathVariable Long id) {\n log.debug(\"REST request to delete PaymentGroup : {}\", id);\n paymentGroupService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "int deleteByExample(CmGroupRelIndustryExample example);", "public yandex.cloud.api.operation.OperationOuterClass.Operation deleteShardGroup(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.DeleteClusterShardGroupRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteShardGroupMethod(), getCallOptions(), request);\n }", "DeleteSubnetGroupResult deleteSubnetGroup(DeleteSubnetGroupRequest deleteSubnetGroupRequest);", "public static base_response delete(nitro_service client, clusternodegroup resource) throws Exception {\n\t\tclusternodegroup deleteresource = new clusternodegroup();\n\t\tdeleteresource.name = resource.name;\n\t\treturn deleteresource.delete_resource(client);\n\t}", "public void removeByGroupId(long groupId);", "public void removeByGroupId(long groupId);", "int deleteByExample(ProjGroupExample example);", "public void removeGroup(TvBrowserDataServiceChannelGroup group) {\r\n mAvailableChannelGroupsSet.remove(group);\r\n group.deleteAllFiles();\r\n }", "void remove(String group, String name);", "int deleteByExample(SeGroupExample example);", "void deleteByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);", "public void deleteShardGroup(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.DeleteClusterShardGroupRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteShardGroupMethod(), getCallOptions()), request, responseObserver);\n }", "@RequestMapping(value = \"/groupps/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Groupp : {}\", id);\n grouppRepository.delete(id);\n grouppSearchRepository.delete(id);\n }", "public void deleteConsistencyGroup(String cgName) throws VPlexApiException {\n s_logger.info(\"Request to delete consistency group on VPlex at {}\",\n _baseURI);\n _cgMgr.deleteConsistencyGroup(cgName);\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> deleteShardGroup(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.DeleteClusterShardGroupRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteShardGroupMethod(), getCallOptions()), request);\n }", "public static base_response delete(nitro_service client, String name) throws Exception {\n\t\tclusternodegroup deleteresource = new clusternodegroup();\n\t\tdeleteresource.name = name;\n\t\treturn deleteresource.delete_resource(client);\n\t}", "public void deleteShardGroup(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.DeleteClusterShardGroupRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteShardGroupMethod(), responseObserver);\n }", "int deleteByPrimaryKey(GrpTagKey key);", "@Override\n public DeleteMulticastGroupResult deleteMulticastGroup(DeleteMulticastGroupRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteMulticastGroup(request);\n }", "boolean removePortPairGroup(PortPairGroupId portPairGroupId);", "void deleteByResourceGroup(String resourceGroupName, String rackName);", "@Override\n\tpublic void delDevGroup(String devGroupId) {\n\t\tif (!CoreSvrUtil.IsNullOrEmpty(devGroupId)) {\n\t\t\tgetMongoDao().deleteObject(Constant.TABLE_DevGroup,\n\t\t\t\t\tnew ObjectId(devGroupId));\n\t\t}\n\t}", "String getDeletePlan(Object groupID) throws Exception;", "@Test (description = \"Delete a contact group use shortcut Del and verify toast message\",\n\t\t\tgroups = { \"functional-skip\" })\n\n\tpublic void DeleteContactGroup_04() throws HarnessException {\n\t\tContactGroupItem group = ContactGroupItem.createContactGroupItem(app.zGetActiveAccount());\n\n\t\t// Refresh\n\t\tapp.zPageContacts.zToolbarPressButton(Button.B_REFRESH);\n\n\t\t// Select the contact group\n\t\tapp.zPageContacts.zListItem(Action.A_LEFTCLICK, group.getName());\n\n\t\t// Delete contact group by click shortcut Del\n\t\tapp.zPageContacts.zKeyboardKeyEvent(Keys.DELETE);\n\n\t\t// Verifying the toaster message\n\t\tToaster toast = app.zPageMain.zGetToaster();\n\t\tString toastMessage = toast.zGetToastMessage();\n\t\tZAssert.assertStringContains(toastMessage, \"1 contact group moved to Trash\", \"Verify toast message: Contact group Moved to Trash\");\n\t}", "@Override\n\tpublic void deleteGroupList(Long id) {\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"******************** je suis dans DeleteGroup from group's list **********************************************\");\n\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\t\t\tContactGroup g = (ContactGroup) session.get(ContactGroup.class, id);\n\t\t\tsession.delete(g);\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void groupDeleted(long gid) throws RemoteException {\n\n\t\tlogger.create().block(\"groupDeleted\").info().level(1).msg(\n\t\t\t\t\"Adding deleteGroup request to update queue for gid: \" + gid).send();\n\t}", "int deleteByExample(GrpTagExample example);", "void remove(String group);", "public boolean removeGroup(VParticleGroup g) {\n\t\treturn groups.remove(g);\n\t}", "public boolean deleteScheduleGroup(int aId) throws ScheduleGroupException {\r\n boolean deleted = false;\r\n ScheduleGroup sGroup = new ScheduleGroup();\r\n sGroup.setId(aId);\r\n\r\n try {\r\n ScheduleGroupDAO sGroupDao = new ScheduleGroupDAO();\r\n\r\n deleted = sGroupDao.delete(sGroup);\r\n } catch (DataAccessException dae) {\r\n throw new ScheduleGroupException(dae);\r\n } catch (Exception e) {\r\n throw new ScheduleGroupException(e);\r\n }\r\n\r\n return deleted;\r\n }", "@Override\n\tpublic void deleteUserGroup(Integer id) {\n\t\tString hql = \"update HhGroup h set h.isDel = 1 where h.id = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\tquery.executeUpdate();\n\t}", "public void removeGroup(String id) {\r\n System.out.println(\"conectado con model ---> metodo removeGroup\");\r\n //TODO\r\n }", "public DeleteGroupsGroupIdResponse delete(Long groupId) throws ApiException {\n ApiResponse<DeleteGroupsGroupIdResponse> resp = deleteWithHttpInfo(groupId);\n return resp.getData();\n }", "public DeleteDiskReplicaGroupResponse deleteDiskReplicaGroup(DeleteDiskReplicaGroupRequest request) throws Exception {\n com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();\n return this.deleteDiskReplicaGroupWithOptions(request, runtime);\n }", "@DeleteMapping(\"/class-groups/{id}\")\n @Timed\n public ResponseEntity<Void> deleteClassGroup(@PathVariable Long id) {\n log.debug(\"REST request to delete ClassGroup : {}\", id);\n classGroupService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@VisibleForTesting\n void checkGroupDeletions() {\n final String METHOD = \"checkGroupDeletions\";\n LOGGER.entering(CLASS_NAME, METHOD);\n\n NotesView groupView = null;\n ArrayList<Long> groupsToDelete = new ArrayList<Long>();\n Statement stmt = null;\n try {\n groupView = directoryDatabase.getView(NCCONST.DIRVIEW_VIMGROUPS);\n groupView.refresh();\n stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_READ_ONLY);\n ResultSet rs = stmt.executeQuery(\n \"select groupid,groupname,pseudogroup from \" + groupTableName);\n while (rs.next()) {\n long groupId;\n String groupName;\n boolean pseudoGroup = false;\n try {\n groupId = rs.getLong(1);\n groupName = rs.getString(2);\n pseudoGroup = rs.getBoolean(3);\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING, \"Failure reading group table data\", e);\n continue;\n }\n\n if (pseudoGroup) {\n LOGGER.log(Level.FINEST,\n \"Skipping deletion check for pseudo-group: {0}\", groupName);\n continue;\n }\n try {\n if (Util.isCanonical(groupName)) {\n NotesName notesGroupName = notesSession.createName(groupName);\n groupName = notesGroupName.getAbbreviated();\n }\n NotesDocument notesGroupDoc = groupView.getDocumentByKey(groupName);\n if (notesGroupDoc == null) {\n // This group no longer exists.\n LOGGER.log(Level.INFO, \"Group no longer exists in source directory\"\n + \" and will be deleted: {0}\", groupName);\n groupsToDelete.add(groupId);\n }\n Util.recycle(notesGroupDoc);\n } catch (Exception e) {\n LOGGER.log(Level.WARNING,\n \"Error checking deletions for group: \" + groupName, e);\n }\n }\n } catch (Exception e) {\n LOGGER.log(Level.WARNING, \"Error checking deletions\", e);\n } finally {\n Util.recycle(groupView);\n Util.close(stmt);\n }\n\n for (Long groupId : groupsToDelete) {\n try {\n removeGroup(groupId);\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING, \"Error removing group: \" + groupId, e);\n }\n }\n LOGGER.exiting(CLASS_NAME, METHOD);\n }", "@DeleteMapping(\"/{groupId}\")\n public BaseResponse deleteGroupData(@PathVariable(\"groupId\") Integer groupId) {\n Instant startTime = Instant.now();\n BaseResponse baseResponse = new BaseResponse(ConstantCode.SUCCESS);\n log.warn(\"start deleteGroupData startTime:{}\", startTime.toEpochMilli());\n groupService.removeAllDataByGroupId(groupId);\n log.warn(\"end deleteGroupData useTime:{} result:{}\",\n Duration.between(startTime, Instant.now()).toMillis(),\n JsonTools.toJSONString(baseResponse));\n return baseResponse;\n }", "public void deregisterGroup(DataGroupInfo group)\n {\n group.activationProperty().removeListener(myDataGroupActivationListener);\n }", "public void removeGroup(String group) {\r\n\t\tif (this.groups == null) { return; }\r\n\t\tif (group == null) { return; }\r\n\t\tthis.groups.remove(group);\r\n\t\t\r\n\t\t// If the groups set is now empty, just set it to null\r\n\t\tif (this.groups.isEmpty()) { this.groups = null; }\r\n\t}", "public void removeGroup(String groupName) throws UnsupportedOperationException;", "@Override\n public int deleteGroup(String groupId) {\n return deleteContents(new File(getCacheDir(), groupId));\n }", "int deleteByPrimaryKey(Long groupRightId);", "public okhttp3.Call deleteGroupCall(String groupId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n Object localVarPostBody = new Object();\n\n // create path and map variables\n String localVarPath = \"/groups/{group_id}\"\n .replaceAll(\"\\\\{\" + \"group_id\" + \"\\\\}\", apiClient.escapeString(groupId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n if (progressListener != null) {\n apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {\n @Override\n public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {\n okhttp3.Response originalResponse = chain.proceed(chain.request());\n return originalResponse.newBuilder()\n .body(new ProgressResponseBody(originalResponse.body(), progressListener))\n .build();\n }\n }).build());\n }\n\n String[] localVarAuthNames = new String[] { \"pm_api_bearer\" };\n return apiClient.buildCall(localVarPath, \"DELETE\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);\n }", "public void deleteMapsGroup(Long groupId) {\n\t\tthis.deleteMapsGroup(this.getMapsGroupById(groupId));\r\n\t}", "@Test\n public void testAuthorizedRemoveGroup() throws IOException {\n testUserId2 = createTestUser();\n grantUserManagementRights(testUserId2);\n\n String groupId = createTestGroup();\n\n Credentials creds = new UsernamePasswordCredentials(testUserId2, \"testPwd\");\n\n String getUrl = String.format(\"%s/system/userManager/group/%s.json\", baseServerUri, groupId);\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data\n\n String postUrl = String.format(\"%s/system/userManager/group/%s.delete.html\", baseServerUri, groupId);\n List<NameValuePair> postParams = new ArrayList<>();\n assertAuthenticatedPostStatus(creds, postUrl, HttpServletResponse.SC_OK, postParams, null);\n\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_NOT_FOUND, null); //make sure the profile request returns some data\n }", "@Path (\"deleteGroupId\")\n @GET\n @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })\n @RedbackAuthorization (noPermission = true)\n ActionStatus deleteGroupId( @QueryParam (\"groupId\") String groupId, @QueryParam (\"repositoryId\") String repositoryId )\n throws ArchivaRestServiceException;", "@DELETE\n\t@Path(\"/{nameRessourceGrp}\")\n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic Response deleteResourceGroup(@PathParam(\"nameRessourceGrp\") String nameRessourceGrp) {\n\t\ttry {\n\t\t\tResourceGroup resourceGroup = resourceGrpLocal.retrieve(resourceGroupFilter.byName(nameRessourceGrp));\n\t\t\tresourceGrpLocal.delete(resourceGroup.getId());\n\t\t} catch (CannotDeleteResourceException e) {\n\t\t\treturn Response.status(Response.Status.CONFLICT).entity(e.getMessage()).build();\n\t\t} catch (Exception e) {\n\t\t\treturn Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).build();\n\t\t}\n\n\t\treturn Response.noContent().build();\n\t}", "public void delete() throws PortalException, SystemException, IOException {\n for (ModelInputGroupDisplayItem gchild:getChildGroups()) {\n gchild.setParent(null);\n }\n for (ModelInputDisplayItem item:getDisplayItems()) {\n ((ModelInputIndividualDisplayItem)item).setGroupId(null);\n }\n populateChildren();\n ModelInputGroupLocalServiceUtil.deleteModelInputGroup(group.getModelInputGroupPK());\n }", "public okhttp3.Call deleteGroupAsync(String groupId, final ApiCallback<Groups> callback) throws ApiException {\n\n ProgressResponseBody.ProgressListener progressListener = null;\n ProgressRequestBody.ProgressRequestListener progressRequestListener = null;\n\n if (callback != null) {\n progressListener = new ProgressResponseBody.ProgressListener() {\n @Override\n public void update(long bytesRead, long contentLength, boolean done) {\n callback.onDownloadProgress(bytesRead, contentLength, done);\n }\n };\n\n progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {\n @Override\n public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {\n callback.onUploadProgress(bytesWritten, contentLength, done);\n }\n };\n }\n\n okhttp3.Call call = deleteGroupValidateBeforeCall(groupId, progressListener, progressRequestListener);\n Type localVarReturnType = new TypeToken<Groups>(){}.getType();\n apiClient.executeAsync(call, localVarReturnType, callback);\n return call;\n }", "public void delete(Long id) {\n log.debug(\"Request to delete MsgReceiverGroup : {}\", id);\n msgReceiverGroupRepository.deleteById(id);\n }", "public DeleteDiskReplicaGroupResponse deleteDiskReplicaGroupWithOptions(DeleteDiskReplicaGroupRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {\n com.aliyun.teautil.Common.validateModel(request);\n java.util.Map<String, Object> query = new java.util.HashMap<>();\n if (!com.aliyun.teautil.Common.isUnset(request.clientToken)) {\n query.put(\"ClientToken\", request.clientToken);\n }\n\n if (!com.aliyun.teautil.Common.isUnset(request.regionId)) {\n query.put(\"RegionId\", request.regionId);\n }\n\n if (!com.aliyun.teautil.Common.isUnset(request.replicaGroupId)) {\n query.put(\"ReplicaGroupId\", request.replicaGroupId);\n }\n\n com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(\n new TeaPair(\"query\", com.aliyun.openapiutil.Client.query(query))\n ));\n com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(\n new TeaPair(\"action\", \"DeleteDiskReplicaGroup\"),\n new TeaPair(\"version\", \"2021-07-30\"),\n new TeaPair(\"protocol\", \"HTTPS\"),\n new TeaPair(\"pathname\", \"/\"),\n new TeaPair(\"method\", \"POST\"),\n new TeaPair(\"authType\", \"AK\"),\n new TeaPair(\"style\", \"RPC\"),\n new TeaPair(\"reqBodyType\", \"formData\"),\n new TeaPair(\"bodyType\", \"json\")\n ));\n return TeaModel.toModel(this.callApi(params, req, runtime), new DeleteDiskReplicaGroupResponse());\n }", "boolean removeDispatchedGroup(Group group);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Response<Void> deleteGroupWithResponse(String groupId, Context context) {\n return this.serviceClient.deleteGroupWithResponse(groupId, context);\n }", "@SuppressWarnings(\"serial\")\n\tpublic void delMember(final String name,String group) throws Exception{\n\t\tGroup grp=addGroup(group);\n\t\tgrp.deleteChildren(Member.TAG, new HashMap<String, String>(){{\n\t\t\tput(\"username\",name);\n\t\t}});\n\t}", "public void delete(SmsAgendaGrupoPk pk) throws SmsAgendaGrupoDaoException;", "public void deleteGroup(AdminBean adminBean, int index,\r\n\t\t\tUserAccountDTO currentUser) {\r\n\t\t\r\n\t\tUserGroupDTO dto = new UserGroupDTO();\r\n\t\ttry{\r\n\t\t\tadminBean.getGroupAssignmentList().get(index);\r\n\t\t\tdto.setGroup_Code(((UserGroupDTO)adminBean.getGroupAssignmentList().get(index)).getGroup_Code());\r\n\t\t\tdto.setAgency_Code(currentUser.getAgencyCode());\r\n\t\t\tdto.setBureau_Code(currentUser.getBureauCode());\r\n\t\t\tadminDAO.deleteGroup(dto);\r\n\t\t\tadminBean.setReturnMessage(\"Admin Group deleted successfully\");\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\tadminBean.setReturnMessage(\"Failed to delete admin group\");\r\n\t\t}\r\n\t}", "void removeServerStoredContactGroup(ContactGroup group)\n throws OperationFailedException;", "@Test (description = \"Delete a contact group by click Delete button on toolbar and verify toast message\",\n\t\t\tgroups = { \"sanity-skip\" })\n\n\tpublic void DeleteContactGroup_01() throws HarnessException {\n\t\tContactGroupItem group = ContactGroupItem.createContactGroupItem(app.zGetActiveAccount());\n\n\t\t// Refresh\n\t\tapp.zPageContacts.zToolbarPressButton(Button.B_REFRESH);\n\n\t\t// Select the contact group\n\t\tapp.zPageContacts.zListItem(Action.A_LEFTCLICK, group.getName());\n\n\t\t// Delete contact group by click Delete button on toolbar\n\t\tapp.zPageContacts.zToolbarPressButton(Button.B_DELETE);\n\n\t\t// Verifying the toaster message\n\t\tToaster toast = app.zPageMain.zGetToaster();\n\t\tString toastMessage = toast.zGetToastMessage();\n\t\tZAssert.assertStringContains(toastMessage, \"1 contact group moved to Trash\",\n\t\t\t\t\"Verify toast message: Contact group Moved to Trash\");\n\t}", "@DeleteMapping(\"/skillgroups/{id}\")\n @Timed\n public ResponseEntity<Void> deleteSkillgroup(@PathVariable Long id) {\n log.debug(\"REST request to delete Skillgroup : {}\", id);\n skillgroupService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Override\n\tpublic LinkGroup remove(Serializable primaryKey)\n\t\tthrows NoSuchLinkGroupException {\n\t\tSession session = null;\n\n\t\ttry {\n\t\t\tsession = openSession();\n\n\t\t\tLinkGroup linkGroup = (LinkGroup)session.get(LinkGroupImpl.class,\n\t\t\t\t\tprimaryKey);\n\n\t\t\tif (linkGroup == null) {\n\t\t\t\tif (_log.isDebugEnabled()) {\n\t\t\t\t\t_log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);\n\t\t\t\t}\n\n\t\t\t\tthrow new NoSuchLinkGroupException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +\n\t\t\t\t\tprimaryKey);\n\t\t\t}\n\n\t\t\treturn remove(linkGroup);\n\t\t}\n\t\tcatch (NoSuchLinkGroupException nsee) {\n\t\t\tthrow nsee;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow processException(e);\n\t\t}\n\t\tfinally {\n\t\t\tcloseSession(session);\n\t\t}\n\t}", "public void removeSettingsGroup(SettingsGroup group) {\n if (PROPS.remove(group)) {\n fireSettingsHandlerEvent(EventType.SETTINGS_GROUP_REMOVED, group);\n }\n }", "public void remove(Group sceneGroup) {\n\t setState(SpriteState.TO_BE_REMOVED);\n\t if (sceneGroup != null) {\n\t sceneGroup.getChildren().remove(getNode());\n\t }\n\t }", "public boolean deleteGroupUser(Connection cnn, FSeed seed) throws SQLException, EException\r\n {\r\n final String LOCATION = this.toString() + DELETE;\r\n boolean result = false;\r\n PreparedStatement prstm = null;\r\n try\r\n {\r\n FUser bean = (FUser)seed; \r\n return delete(cnn, TABLE_GROUP_USER, GROUP_USER_USER_ID + EQUAL + bean.getId())>0;\r\n }\r\n catch(EException ex)\r\n {\r\n if(AppConfigs.APP_DEBUG)throw new EException(LOCATION,ex);\r\n }\r\n finally\r\n {\r\n closePreparedStatement(prstm);\r\n }\r\n return result;\r\n }", "@Test (description = \"Delete a contact group by click Delete on Context Menu and verify toast message\",\n\t\t\tgroups = { \"functional\" })\n\n\tpublic void DeleteContactGroup_02() throws HarnessException {\n\t\tContactGroupItem group = ContactGroupItem.createContactGroupItem(app.zGetActiveAccount());\n\n\t\t// Refresh\n\t\tapp.zPageContacts.zToolbarPressButton(Button.B_REFRESH);\n\n\t\t// Delete contact group by click Delete on Context menu\n\t\tapp.zPageContacts.zListItem(Action.A_RIGHTCLICK, Button.B_DELETE, group.getName());\n\n\t\t// Verifying the toaster message\n\t\tToaster toast = app.zPageMain.zGetToaster();\n\t\tString toastMessage = toast.zGetToastMessage();\n\t\tZAssert.assertStringContains(toastMessage, \"1 contact group moved to Trash\", \"Verify toast message: Contact group Moved to Trash\");\n\t}", "void deleteTrackerGroups(final Integer id);", "public void delete(CrGrupoFormularioPk pk) throws CrGrupoFormularioDaoException;", "public Future<Void> deleteWorkforcemanagementBusinessunitPlanninggroupAsync(DeleteWorkforcemanagementBusinessunitPlanninggroupRequest request, final AsyncApiCallback<Void> callback) {\n try {\n final SettableFuture<Void> future = SettableFuture.create();\n final boolean shouldThrowErrors = pcapiClient.getShouldThrowErrors();\n pcapiClient.invokeAsync(request.withHttpInfo(), null, new AsyncApiCallback<ApiResponse<Void>>() {\n @Override\n public void onCompleted(ApiResponse<Void> response) {\n notifySuccess(future, callback, response.getBody());\n }\n\n @Override\n public void onFailed(Throwable exception) {\n if (shouldThrowErrors) {\n notifyFailure(future, callback, exception);\n }\n else {\n notifySuccess(future, callback, null);\n }\n }\n });\n return future;\n }\n catch (Throwable exception) {\n return Futures.immediateFailedFuture(exception);\n }\n }", "public void delete(Integer id) {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tboolean flag = true;\r\n\t\ttry {\r\n\t\t\tconn = JDBCUtil.getConnection();\r\n\t\t\tString sql = \"delete from group_info where id=?\";\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\tpstmt.setInt(1, id);\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t//throw new DAOException(e.getMessage(), e);\r\n\t\t} finally {\r\n\t\t\tJDBCUtil.close(null, pstmt, conn);\r\n\t\t}\r\n\r\n\t}", "@Bugs (ids = \"78829\")\n\t@Test (description = \"Delete multiple contact groups at once and verify toast message\",\n\t\t\tgroups = { \"functional-skip\" })\n\n\tpublic void DeleteContactGroup_05() throws HarnessException {\n\t\tContactGroupItem group1 = ContactGroupItem.createContactGroupItem(app.zGetActiveAccount());\n\t\tContactGroupItem group2 = ContactGroupItem.createContactGroupItem(app.zGetActiveAccount());\n\t\tContactGroupItem group3 = ContactGroupItem.createContactGroupItem(app.zGetActiveAccount());\n\n\t\t// Refresh\n\t\tapp.zPageContacts.zToolbarPressButton(Button.B_REFRESH);\n\n\t\t// Select the contact group\n\t\tapp.zPageContacts.zListItem(Action.A_CHECKBOX, group3.getName());\n\t\tapp.zPageContacts.zListItem(Action.A_CHECKBOX, group1.getName());\n\t\tapp.zPageContacts.zListItem(Action.A_CHECKBOX, group2.getName());\n\n\t\t// Delete contact group by click Delete button on toolbar\n\t\tapp.zPageContacts.zToolbarPressButton(Button.B_DELETE);\n\n\t\t// Verifying the toaster message\n\t\tToaster toast = app.zPageMain.zGetToaster();\n\t\tString toastMessage = toast.zGetToastMessage();\n\t\tZAssert.assertStringContains(toastMessage, \"3 contacts moved to Trash\", \"Verify toast message for moving contacts to contact group\");\n\t}", "public void delete(String id) {\n log.debug(\"Request to delete GroupMember : {}\", id);\n groupMemberRepository.deleteById(id);\n }", "List<MenuPermissionEntity> deleteByUserGroup(UserGroupEntity userGroup);", "public static base_responses delete(nitro_service client, clusternodegroup resources[]) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tclusternodegroup deleteresources[] = new clusternodegroup[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\tdeleteresources[i] = new clusternodegroup();\n\t\t\t\tdeleteresources[i].name = resources[i].name;\n\t\t\t}\n\t\t\tresult = delete_bulk_request(client, deleteresources);\n\t\t}\n\t\treturn result;\n\t}" ]
[ "0.7955283", "0.77564514", "0.71095306", "0.6877423", "0.6741202", "0.67086154", "0.6696798", "0.6686187", "0.66595113", "0.65750587", "0.65495557", "0.6539756", "0.6534372", "0.6504999", "0.6496133", "0.64090514", "0.6313128", "0.63033426", "0.6279533", "0.6276179", "0.62572914", "0.62555456", "0.6205916", "0.6182844", "0.6149226", "0.61425996", "0.6132123", "0.60963446", "0.6085353", "0.6067828", "0.60562366", "0.6054652", "0.6046248", "0.6046248", "0.6045213", "0.60388005", "0.59908897", "0.5982733", "0.59771985", "0.59693533", "0.59595543", "0.59487355", "0.59406227", "0.59156895", "0.590511", "0.5903785", "0.59036934", "0.58906794", "0.5826404", "0.5800534", "0.5793885", "0.5767692", "0.57658684", "0.5743172", "0.5738614", "0.5729546", "0.57194084", "0.57143474", "0.5707341", "0.5692714", "0.56907487", "0.5683489", "0.56508213", "0.5645766", "0.56453496", "0.5645034", "0.5632331", "0.5626959", "0.5624202", "0.5614288", "0.5581199", "0.55764455", "0.55707514", "0.5543993", "0.5543016", "0.55372095", "0.553329", "0.5510213", "0.55019337", "0.55002385", "0.548051", "0.5467934", "0.54370284", "0.5419578", "0.54068184", "0.5406291", "0.5395672", "0.5395202", "0.53730816", "0.5369627", "0.5364812", "0.53531903", "0.53480566", "0.5346172", "0.5341707", "0.53415936", "0.5325226", "0.53217876", "0.5311437", "0.5295014" ]
0.6672971
8
Undeploys the latest version of a policy from the PDPs.
@Override public ResponseEntity<PdpGroupDeployResponse> deletePolicy(String policyName, UUID requestId) { return doUndeployOperation(requestId, () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, null), getPrincipal())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "@Override\n public ResponseEntity<PdpGroupDeployResponse> deletePolicyVersion(\n String policyName,\n String version,\n UUID requestId) {\n return doUndeployOperation(requestId,\n () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, version), getPrincipal()));\n }", "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "void clearPolicy() {\n policy = new Policy();\n }", "public void unsetVersion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(VERSION$4, 0);\n }\n }", "void unregister(String policyId);", "public void unsetVersion()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(VERSION$6, 0);\r\n }\r\n }", "void removePolicyController(String name);", "@Override\r\n\tpublic void deletePolicy(Integer pid) {\n\t\tdao.deletePolicy(pid);\r\n\t\t\r\n\t}", "public void removeFromPolicyTransactions(entity.AppCritPolicyTransaction element);", "void removePolicyController(PolicyController controller);", "@Override\n public void undeploy(DeploymentUnit context) {\n \n }", "@Override\r\n\tpublic void updatePolicy(Policy policy) {\n\t\tdao.updatePolicy(policy);\r\n\t\t\r\n\t}", "private static List<OperationPolicy> extractAndDropAPILevelPoliciesFromAPI(API api) {\n List<OperationPolicy> policies = new ArrayList<>();\n if (api.getApiPolicies() != null && !api.getApiPolicies().isEmpty()) {\n policies = api.getApiPolicies();\n api.setApiPolicies(null);\n }\n return policies;\n }", "public void unpatchAfterRelease( UGen ugen )\n\t{\n\t unpatchAfterRelease = true;\n\t ugenOutput = ugen;\n\t}", "public void unsetPrf()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PRF$26, 0);\r\n }\r\n }", "private void updateDeploymentCounts(final List<ToscaConceptIdentifier> runningPolicies,\n final List<ToscaPolicy> policies) {\n final var statisticsManager = ApexPolicyStatisticsManager.getInstanceFromRegistry();\n if (statisticsManager == null || policies == null || policies.isEmpty()) {\n return;\n }\n var policiesToDeploy = policies.stream()\n .map(ToscaWithTypeAndObjectProperties::getIdentifier).collect(Collectors.toList());\n\n var policiesSuccessfullyDeployed = new ArrayList<>(policiesToDeploy);\n policiesSuccessfullyDeployed.retainAll(runningPolicies);\n policiesSuccessfullyDeployed.forEach(policy -> statisticsManager.updatePolicyDeployCounter(true));\n\n var policiesFailedToDeploy = new ArrayList<>(policiesToDeploy);\n policiesFailedToDeploy.removeIf(runningPolicies::contains);\n policiesFailedToDeploy.forEach(policy -> statisticsManager.updatePolicyDeployCounter(false));\n }", "public void delete() throws PolicyContextException\n {\n\tcheckSetPolicyPermission();\n\tsynchronized(refreshLock) {\n\t try {\n\t\tremovePolicy();\n\t } finally {\n\t\tsetState(DELETED_STATE);\n\t }\n\t}\n }", "public void disassociateProductTemplate() {\n productToolOperation.removeChildProductTree(selectProductNode, planConfigBehavior);\n }", "void unpublish(List<String> uuids) throws GWTJahiaServiceException;", "AgentPolicyBuilder clear();", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public void undeploy(Archive<?> archive) throws DeploymentException {\n jmxClient.undeploy(getDeploymentName(archive));\n }", "public void undo() throws ProvisioningException {\n try(ProvisioningLayout<FeaturePackRuntimeBuilder> layout = newConfigLayout(StateHistoryUtils.readUndoConfig(home, log), Collections.emptyMap())) {\n doProvision(layout, getFsDiff(), true);\n }\n }", "public void cleanOrphanDeployments() {\n log.info(\"Cleaning orphan Deployments...\");\n List<String> deploymentNames = getDeployments();\n for (String deploymentName : deploymentNames) {\n if (deploymentName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !serviceExists(deploymentName)) {\n log.info(\"Cleaning orphan Deployment [Name] \" + deploymentName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n if (!runtimeClient.deleteDeployment(deploymentName)) {\n log.error(\"Deployment deletion failed [Deployment Name] \" + deploymentName);\n }\n }\n }\n }", "void unpublish() {\n pendingOps.decrementAndGet();\n }", "private void dropOldTables(CopyTable table) throws SQLException\n\t{\n\t\tLOG.info(\"Dropping older versions of table '\" + table.getToName() + \"'...\");\n\t\t\n\t\tStatement q =\n\t\t\tCopyToolConnectionManager.getInstance().getMonetDbConnection().createStatement();\n\t\t\n\t\tResultSet result =\n\t\t\tq.executeQuery(\"SELECT name FROM sys.tables WHERE name LIKE '\" + table.getToName()\n\t\t\t\t+ \"_20%_%' AND name <> '\" + table.getToName() + \"' \"\n\t\t\t\t+ \"AND schema_id = (SELECT id from sys.schemas WHERE LOWER(name) = LOWER('\" + table.getSchema()\n\t\t\t\t+ \"')) AND query IS NULL ORDER BY name DESC\");\n\t\t\n\t\tint i = 0;\n\t\tint dropCount = 0;\n\t\tStatement stmtDrop =\n\t\t\tCopyToolConnectionManager.getInstance().getMonetDbConnection().createStatement();\n\t\twhile(result.next())\n\t\t{\n\t\t\ti++;\n\t\t\t\n\t\t\t// if table is a fast view-switching table then\n\t\t\t// \t\tskip first result -> is current table and referenced by view\n\t\t\t// \t\tskip second result -> as backup (TODO: perhaps make this configurable?)\n\t\t\tif (table.isUseFastViewSwitching())\n\t\t\t\tif (i == 1 || i == 2)\n\t\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// build DROP query\n\t\t\tStringBuilder query = new StringBuilder(\"DROP TABLE \");\n\t\t\t\n\t\t\tif (!StringUtils.isEmpty(table.getSchema()))\n\t\t\t\tquery.append(MonetDBUtil.quoteMonetDbIdentifier(table.getSchema())).append(\".\");\n\t\t\t\n\t\t\tquery.append(MonetDBUtil.quoteMonetDbIdentifier(result.getString(\"name\"))).append(\";\");\n\t\t\t\n\t\t\t// execute DROP query\n\t\t\tstmtDrop.executeUpdate(query.toString());\t\t\t\n\t\t\tdropCount++;\n\t\t}\n\t\t\n\t\tif (i == 0 || (table.isUseFastViewSwitching() && i <= 2))\n\t\t\tLOG.info(\"Table '\" + table.getToName() + \"' has no older versions\");\n\t\telse\n\t\t\tLOG.info(\"Dropped \" + dropCount + \" older versions of table '\" + table.getToName() + \"'\");\n\t\t\n\t\tresult.close();\n\t\tq.close();\n\t}", "public void unlinkProduct() {\n Product result;\n String supplierID = getToken(\"Enter supplier ID: \");\n if (warehouse.searchSupplier(supplierID) == null) {\n System.out.println(\"No such supplier!\");\n return;\n }\n do {\n String productID = getToken(\"Enter product ID: \");\n result = warehouse.unlinkProduct(supplierID, productID);\n if (result != null) {\n System.out.println(\"Product [\" + productID + \"] unassigned from supplier: [\" + supplierID + \"]\");\n }\n else {\n System.out.println(\"Product could not be unassigned\");\n }\n if (!yesOrNo(\"unassign more products from supplier: [\"+ supplierID + \"]\")) {\n break;\n }\n } while (true);\n }", "public void unsetTpd()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TPD$34, 0);\r\n }\r\n }", "public synchronized void execute(UnProvisionExtensionsCommand command) throws ExecutionException {\n List<URI> uninstall = new ArrayList<URI>();\n for (URI encoded : command.getExtensionUris()) {\n ContributionUriResolver resolver = getResolver(encoded);\n URI uri = resolver.decode(encoded);\n int count = resolver.getInUseCount(uri);\n if (count == 1) {\n try {\n // no longer in use, undeploy and uninstall the extension\n List<Deployable> deployables = contributionService.getDeployables(uri);\n List<Deployable> reverse = new ArrayList<Deployable>(deployables);\n // undeploy in reverse order\n Collections.reverse(reverse);\n for (Deployable deployable : reverse) {\n domain.undeploy(deployable.getName());\n }\n uninstall.add(uri);\n } catch (UndeploymentException e) {\n throw new ExecutionException(e);\n } catch (ContributionNotFoundException e) {\n throw new ExecutionException(e);\n }\n }\n try {\n resolver.release(uri);\n } catch (ResolutionException e) {\n throw new ExecutionException(e);\n }\n }\n try {\n contributionService.uninstall(uninstall);\n contributionService.remove(uninstall);\n } catch (ContributionNotFoundException e) {\n throw new ExecutionException(e);\n } catch (RemoveException e) {\n throw new ExecutionException(e);\n } catch (UninstallException e) {\n throw new ExecutionException(e);\n }\n }", "public void terminate(Payroll pr){\n while(!pr.getList().isEmpty()){\n payroll.remove(pr.getList().removeFirst());\n }\n }", "public void unsetRelease()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(RELEASE$4, 0);\r\n }\r\n }", "private void unpublish() {\n Log.i(TAG, \"Unpublishing.\");\n Nearby.Messages.unpublish(mGoogleApiClient, mPubMessage);\n }", "private void unloadPackages(Set<Drone> drones){\n\t\t//loop trough all the drones, check if they carry any packages\n\t\tfor(Drone drone: drones){\n\t\t\tif(drone.isDelivering()){\n\t\t\t\t//check if the drone can deliver the package\n\t\t\t\tif(canDeliverPackage(drone)){\n\t\t\t\t//unload the package\n\t\t\t\tdrone.unloadPackage();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//all the packages are unloaded\n\t}", "public static void removeOrderedPromotionalPackage() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out\n\t\t\t\t.println(\"************Removing ordered Promotional Package************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackages = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tOrderedPackage orderedPackage = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out\n\t\t\t\t\t.print(\"Select an order to remove the promotional package ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedPromotionalPackages = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tdo {\n\t\t\t\tSystem.out.println();\n\t\t\t\tif (listOfOrderedPromotionalPackages.size() == 0) {\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\n\t\t\t\t\t\t\t.println(\"There is no ordered promotional package!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < listOfOrderedPromotionalPackages.size(); i++) {\n\t\t\t\t\torderedPackage = (OrderedPackage) listOfOrderedPromotionalPackages\n\t\t\t\t\t\t\t.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print(\"Select an ordered promotional package to remove from order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\torderedPackage = (OrderedPackage) listOfOrderedPromotionalPackages\n\t\t\t\t\t\t\t.get(choice - 1);\n\n\t\t\t\t\tcheck = orderedPackageManager\n\t\t\t\t\t\t\t.removeOrderedPackage(orderedPackage);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Ordered promotional package removed from order successfully!\");\n\t\t\t\t\t\tlistOfOrderedPromotionalPackages.remove(orderedPackage);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Failed to remove ordered promotional package from order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out\n\t\t\t\t.println(\"************End of removing promotional Package************\");\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:42.027 -0500\", hash_original_method = \"143D937A228206F27207E7C61286CEC1\", hash_generated_method = \"99B4559BE7E71E3CAB365A2313295F80\")\n \n public void removePackageName(String packageName){\n \taddTaint(packageName.getTaint());\n }", "@Override\n public InferredOWLOntologyID unpublishArtifact(final InferredOWLOntologyID ontologyIRI) throws PoddClientException\n {\n return null;\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdDelete(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n if (apiProvider.hasAttachments(username, existingPolicy.getPolicyName(),\n PolicyConstants.POLICY_LEVEL_APP)) {\n String message = \"Policy \" + policyId + \" already attached to an application\";\n log.error(message);\n throw new APIManagementException(message);\n }\n apiProvider.deletePolicy(username, PolicyConstants.POLICY_LEVEL_APP, existingPolicy.getPolicyName());\n return Response.ok().build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while deleting Application level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "void removeHasDeployedAirbag(Integer oldHasDeployedAirbag);", "public void unsetOrganizationVersion()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(ORGANIZATIONVERSION$6, 0);\r\n }\r\n }", "public void unsetVerStmt()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(VERSTMT$22, 0);\n }\n }", "private void downgrade() {\n if (!major.isEmpty() && majorSize > maxSize / 2) {\n Map.Entry<K, V> next = major.entrySet().iterator().next();\n K downgradeKey = next.getKey();\n V downgradeValue = next.getValue();\n majorSize -= safeSizeOf(downgradeKey, downgradeValue);\n major.remove(downgradeKey);\n minor.put(downgradeKey, downgradeValue);\n }\n }", "public void unsetSoap()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SOAP$2, 0);\n }\n }", "public void unsetPeriod()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PERIOD$2, 0);\n }\n }", "public void undeploy(String filePath) throws DeploymentException {\n\n if (!undeployedTransportAdaptorFilePaths.contains(filePath)) {\n processUndeploy(filePath);\n } else {\n undeployedTransportAdaptorFilePaths.remove(filePath);\n }\n\n }", "void transactTo_uninstallPackage(int code, String transactName, ComponentName who, String packageName, boolean keepData, int userId) {\n int i = 1;\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n IBinder binder = ServiceManager.getService(\"device_policy\");\n if (binder != null) {\n if (HWFLOW) {\n Log.i(TAG, \"Transact:\" + transactName + \"to device policy manager service.\");\n }\n _data.writeInterfaceToken(ConstantValue.DESCRIPTOR);\n if (who != null) {\n _data.writeInt(1);\n who.writeToParcel(_data, 0);\n } else {\n _data.writeInt(0);\n }\n _data.writeString(packageName);\n if (!keepData) {\n i = 0;\n }\n _data.writeInt(i);\n _data.writeInt(userId);\n binder.transact(code, _data, _reply, 0);\n _reply.readException();\n }\n _reply.recycle();\n _data.recycle();\n } catch (RemoteException localRemoteException) {\n Log.e(TAG, \"transactTo \" + transactName + \" failed: \" + localRemoteException.getMessage());\n } catch (Throwable th) {\n _reply.recycle();\n _data.recycle();\n }\n }", "@Test\n\tpublic void testRemovedWPtoWS() {\n\t\tWorkPackage wp = new WorkPackage(null);\n\t\tWorkSpace ws = new WorkSpace(null);\n\t\tws.addWP(wp);\n\t\tAssert.assertTrue(ws.removeWP(wp));\n\t\tAssert.assertTrue(ws.getWpList().size()==0);\n\t}", "public void unsetSwissprot()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(SWISSPROT$14, 0);\r\n }\r\n }", "public void shudown()\n\t{\n\t\tsynchronized(pendingRequests)\n\t\t{\n\t\t\tfor(JavaClientRpcPendingRequest p:pendingRequests)\n\t\t\t{\n\t\t\t\tp.revoke();\n\t\t\t}\n\t\t}\n\t}", "void unsetNumberOfInstallments();", "public void downVote(Post p) {\n p.downvote();\n }", "private void movePackages(){\n\t\t//get the package set\n\t\tSet<Drone> droneSet = this.getDroneSet();\n\t\tPackageService packageService = this.getPackageService();\n\t\t//get all the packages that need to be delivered and are assigned a drone (these are the only\n\t\t//ones that need to be loaded and unloaded\n//\t\tSet<WorldDelivery> packages = packageService.getAllUndeliveredAssignedWorldDeliveries();\n\t\tSet<WorldDelivery> packages = packageService.getSubmittedWorldDeliveries();\n\t\t//first check if all the drones can unload their packages\n\n\t\tunloadPackages(droneSet);\n\t\t//then load all the packages\n\t\tloadPackages(droneSet, packages);\n\n\t}", "public void destroyApp(boolean unconditional) {\n }", "public void destroyApp(boolean unconditional) {\n }", "public void destroyApp(boolean unconditional) {\n }", "protected void dropDetachedPartitionTables() {\n\n TenantInfo tenantInfo = getTenantInfo(); \n \n FhirSchemaGenerator gen = new FhirSchemaGenerator(adminSchemaName, tenantInfo.getTenantSchema());\n PhysicalDataModel pdm = new PhysicalDataModel();\n gen.buildSchema(pdm);\n\n dropDetachedPartitionTables(pdm, tenantInfo);\n }", "public List<COPSDecision> getRemovePolicy(COPSPdpOSReqStateMan man);", "@RequestMapping(value = \"/{name}\", method = RequestMethod.DELETE)\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic void undeploy(@PathVariable(\"name\") String name) {\n\t\tstreamDeployer.undeployStream(name);\n\t}", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "@Override\r\n public void unfreeze(IAssignmentState state) {\n }", "public String undeploy(String name, String root)\n throws DeploymentException {\n \n String taskName = \"undeploy\";\n \n // make sure the service unit is properly shut down\n shutDown(name);\n \n \n if (mServiceUnits.containsKey(name)) {\n mServiceUnits.remove(name);\n }\n\n mLogger.info(NotificationEvent.SEVERITY_TYPE_INFO,\n NotificationEvent.OPERATIONAL_STATE_STARTED,\n I18n.msg(\"1050: Service Unit {0} undeployed from {1}.\",\n name,\n root));\n return createSuccessMessage(taskName, mContext.getComponentName());\n }", "@Override\n\tpublic Policy updatePolicy(Policy policy) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policy.getPolicyId()))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "@Override\r\n public void unsetup(SpigotImporter importer, Panel panel) {\n try{\r\n System.out.println(panels.length);\r\n //MavselWizardSwing2 \r\n ((MavselWizardSwing1) ((Panel) panels[0]).getComponent()).unsetup((MavselSpigot)importer); \r\n ((MavselWizardSwing2) ((Panel) panels[1]).getComponent()).unsetup((MavselSpigot)importer);\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n \r\n panels = null;\r\n }", "@Override\n\tpublic void uppdate() {\n\t\t\n\t}", "@Override\n\tpublic void uppdate() {\n\t\t\n\t}", "@Override\n\tpublic void delete(Policy obj) throws SQLException {\t\t\n\t\tString deletePolicy = \"DELETE FROM Policies WHERE pID = ?\";\n\t\ttry \n\t {\n\t\t\tPreparedStatement preparedStatement = DBConnection.GetDBConnection().prepareStatement(deletePolicy);\n\t\t\tpreparedStatement.setString(1, obj.pID);\n\t\t\tpreparedStatement.executeUpdate();\n\t\t} \n\t catch (SQLException e) \n\t {\n\t \tLogger.GetInstance().log(e.getMessage());\n\t\t\tLogger.GetInstance().log(\"Unable to delete the Following Policy:\\n\"\n\t\t\t\t\t+ \"First name: \"+ obj.firstName+\"\\n\"\n\t\t\t\t\t+ \"Last name: \"+obj.lastName+\"\\n\"\n\t\t\t\t\t+ \"ID: \"+obj.pID+\"\\n\"\n\t\t\t\t\t+ \"Insurance type: \"+obj.type+\"\\n\"\n\t\t\t\t\t+ \"Remarks: \"+obj.remarks+\"\\n\");\n\t\t}\n\n\t\tLogger.GetInstance().log(\"Successfully deleted the Following Policy:\\n\"\n\t\t\t\t+ \"Policy ID: \"+obj.pID+\"\\n\"\n\t\t\t\t+ \"First name: \"+ obj.firstName+\"\\n\"\n\t\t\t\t+ \"Last name: \"+obj.lastName+\"\\n\"\n\t\t\t\t+ \"Insurance type: \"+obj.type+\"\\n\"\n\t\t\t\t+ \"Remarks: \"+obj.remarks+\"\\n\");\n\n\t}", "@Override\r\n\tpublic void DeletePackage(PackageJour pj) {\n\t\tem.remove(em.contains(pj) ? pj : em.merge(pj));\r\n\t}", "private static void deletePackage(Path repoPath, Path pkgDirPath, String fullPkgPath, String pkgName) {\n try {\n Path path = repoPath.resolve(pkgDirPath);\n // Delete the package zip\n Files.deleteIfExists(path.resolve(pkgName + ProjectDirConstants.BLANG_COMPILED_PKG_EXT));\n\n // Delete the empty directories\n deleteEmptyParentDirs(path, repoPath);\n\n // Print that the package was successfully uninstalled\n outStream.println(fullPkgPath + \" successfully uninstalled\");\n } catch (IOException e) {\n throw LauncherUtils.createLauncherException(\"uninstalling module \" + fullPkgPath + \" was unsuccessful\");\n }\n }", "void unsetProbables();", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "public void pruneEnvironments(final int numToPrune) {\n final SQLiteDatabase db = this.helper.getWritableDatabase();\n db.beginTransaction();\n try {\n db.delete(\"environments\",\n \"id in (SELECT env \" +\n \" FROM events \" +\n \" GROUP BY env \" +\n \" ORDER BY MAX(date), env \" +\n \" LIMIT \" + numToPrune + \")\",\n null);\n db.setTransactionSuccessful();\n } finally {\n db.endTransaction();\n }\n }", "void unsetInstallmentType();", "@java.lang.Deprecated\n public void removeFromPolicyTransactions(gw.pl.persistence.core.Key elementID);", "private void removePolicyFile(boolean granted){\n\tString fileName = getPolicyFileName(granted);\n\tFile f = new File(fileName);\n\tif(f.exists()){\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy file: \"+fileName; \n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg,new Object []{ fileName} );\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy file removed: \"+fileName);\n\t }\n\t}\n }", "public void unsetPir()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PIR$12, 0);\r\n }\r\n }", "public void deletePromo() {\n\t\tviewPromoPackage();\n\t\t\n\t\tScanner dlSC = new Scanner(System.in);\n\t\tpp.clear();\n\t\t\n\t\tboolean checkRemove = true;\n\t\tboolean isRunning = true;\n\t\t\n\t\twhile (isRunning) {\n\t\t\tdo \n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t// Get data contents from saved file\n\t\t\t\t\tFileInputStream fis = new FileInputStream(\"promoData\");\n\t\t ObjectInputStream ois = new ObjectInputStream(fis);\n\t\t \n\t\t pp = (ArrayList<PromotionalPackage>) ois.readObject();\n\t\t \n\t\t ois.close();\n\t\t fis.close();\n\t\t \n\t\t System.out.println(\"Promotional Package to Delete (-1 to Complete):\");\n\t\t \t\tString promoPackID = dlSC.next();\n\t\t \n\t\t checkRemove = pp.removeIf(menuItem -> menuItem.getPackageID().equals(promoPackID.toUpperCase()));\n\t\t \n\t\t if (promoPackID.equals(\"-1\")) {\n\t\t\t\t\t\tisRunning = false;\n\t\t\t\t\t\tbreak;\n\t\t }\n\t\t \n\t\t if (checkRemove) {\n\t\t \ttry {\n\t\t \tFileOutputStream fos = new FileOutputStream(\"promoData\");\n\t\t \t\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t \t\t\t\toos.writeObject(pp);\n\t\t \t\t\t\toos.close();\n\t\t \t\t\t\tfos.close();\n\t\t }\n\t\t catch (IOException e) {\n\t\t \t\t\tSystem.out.println(\"Failed to delete promotion!\");\n\t\t \t\t\treturn;\n\t\t \t\t}\n\t\t \tbreak;\n\t\t }\n\t\t \n\t\t checkRemove = false;\n\t\t System.out.println(\"Promo Package not found. Please try again!\");\n\t\t\t\t} \n\t\t\t\tcatch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"No promotions to delete!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcatch (ClassNotFoundException c) {\n\t\t\t\t\tc.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (!checkRemove);\n\t\t}\n\t\t\n\t}", "public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeProductResponse unSubscribeProduct(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeProductRequest parameters) {\n throw new UnsupportedOperationException(\"Not implemented yet.\");\r\n }", "void unsetAppliesPeriod();", "public void _unlinkPresentation(PresentationElement presentation1);", "protected void manageFormVersionPostUnload(FormDescriptor form) {\r\n\t\tString seqid = form.getFormSeqId();\r\n\r\n\t\tlogger.debug(\"Form: \" + seqid + \"|\" + form.getFormSeqId() + \" unloaded\");\r\n\r\n\t\tif (!formV2Dao.isLatestVersionForForm(seqid) ||\r\n\t\t\t\t!FormDescriptor.LOAD_TYPE_NEW_VERSION.equals(form.getLoadType().trim()))\r\n\t\t\treturn; \r\n\r\n\t\tformV2Dao.updateLatestVersionIndicator(seqid, \"No\", DomainObjectTranslator.FORM_LOADER_DB_USER);\r\n\r\n\t\tfloat prevVersion = form.getPreviousLatestVersion();\r\n\t\tlogger.debug(\"Form: \" + seqid + \"|\" + form.getFormSeqId() + \" unloaded. Previous Lastest version was \" + prevVersion);\r\n\t\tif (prevVersion > 0) {\r\n\t\t\tint r = formV2Dao.updateLatestVersionIndicatorByPublicIdAndVersion(Integer.parseInt(form.getPublicId()), \r\n\t\t\t\t\tprevVersion, \"Yes\", DomainObjectTranslator.FORM_LOADER_DB_USER);\r\n\t\t\tform.addMessage(\"After unload, the latest version for the form with pulbic id [\" + form.getPublicId() +\r\n\t\t\t\t\t\"] is reset to \" + prevVersion);\r\n\t\t\tlogger.debug(\"Previous Lastest version was restored: \" + prevVersion + \". Response: \" + r);\r\n\t\t} else {\r\n\t\t\tform.addMessage(\"No valid previous latest version with form. Unable to restore previous latest \" +\r\n\t\t\t\t\t\"version after unloading a new version form\");\r\n\t\t\tlogger.debug(\"No valid previous latest version with form\");\r\n\t\t}\r\n\r\n\t}", "private void removePolicyContextDirectory(){\n\tString directoryName = getContextDirectoryName();\n\tFile f = new File(directoryName);\n\tif(f.exists()){\n\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] files = f.listFiles();\n if (files != null && files.length > 0) {\n for (int i = 0; i < files.length; i++) {\n files[i].delete();\n }\n }\n //WORKAROUND: End \n\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy context directory: \"+directoryName;\n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy context directory removed: \"+directoryName);\n\t }\n\n File appDir = f.getParentFile();\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] fs = appDir.listFiles();\n if (fs != null && fs.length > 0) {\n boolean hasDir = false;\n for (int i = 0; i < fs.length; i++) {\n if (fs[i].isDirectory()) {\n hasDir = true;\n break;\n }\n }\n if (!hasDir) {\n for (int i = 0; i < fs.length; i++) {\n fs[i].delete();\n }\n }\n }\n //WORKAROUND: End \n\n File[] moduleDirs = appDir.listFiles();\n if (moduleDirs == null || moduleDirs.length == 0) {\n if (!appDir.delete()) {\n String defMsg = \"Failure removing policy context directory: \" + appDir;\n String msg = localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\t logger.log(Level.SEVERE,msg);\n\t\t throw new RuntimeException(defMsg);\n }\n }\n\t}\n }", "private boolean deleteMonetizationPlan(SubscriptionPolicy subPolicy) throws APIManagementException {\n\n Monetization monetizationImplementation = getMonetizationImplClass();\n if (monetizationImplementation != null) {\n try {\n return monetizationImplementation.deleteBillingPlan(subPolicy);\n } catch (MonetizationException e) {\n APIUtil.handleException(\"Failed to delete monetization plan of : \" + subPolicy.getPolicyName(), e);\n }\n }\n return false;\n }", "private void deactivateOldEmploymentPeriod(EmploymentPeriod ep) {\r\n EmploymentPeriodPersistence mepp = new EmploymentPeriodPersistence();\r\n mepp.deactivateEmploymentPeriod(ep);\r\n }", "void unsetManifestHashAlgorithm();", "private void Drop(String[]p){\n List<DeputyTableItem> dti;\n dti = Drop1(p);\n for(DeputyTableItem item:dti){\n deputyt.deputyTable.remove(item);\n }\n }", "private void deAllocate() {\n if (getC_Order_ID() != 0) {\n setC_Order_ID(0);\n }\n //\tif (getC_Invoice_ID() == 0)\n //\t\treturn;\n //\tDe-Allocate all\n MAllocationHdr[] allocations = MAllocationHdr.getOfPayment(getCtx(),\n getC_Payment_ID(), get_TrxName());\n log.fine(\"#\" + allocations.length);\n for (int i = 0; i < allocations.length; i++) {\n allocations[i].set_TrxName(get_TrxName());\n allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct);\n allocations[i].processIt(DocAction.ACTION_Reverse_Correct);\n allocations[i].save();\n }\n\n // \tUnlink (in case allocation did not get it)\n if (getC_Invoice_ID() != 0) {\n //\tInvoice\n String sql = \"UPDATE C_Invoice \"\n + \"SET C_Payment_ID = NULL, IsPaid='N' \"\n + \"WHERE C_Invoice_ID=\" + getC_Invoice_ID()\n + \" AND C_Payment_ID=\" + getC_Payment_ID();\n int no = DB.executeUpdate(sql, get_TrxName());\n if (no != 0) {\n log.fine(\"Unlink Invoice #\" + no);\n }\n //\tOrder\n sql = \"UPDATE C_Order o \"\n + \"SET C_Payment_ID = NULL \"\n + \"WHERE EXISTS (SELECT * FROM C_Invoice i \"\n + \"WHERE o.C_Order_ID=i.C_Order_ID AND i.C_Invoice_ID=\" + getC_Invoice_ID() + \")\"\n + \" AND C_Payment_ID=\" + getC_Payment_ID();\n no = DB.executeUpdate(sql, get_TrxName());\n if (no != 0) {\n log.fine(\"Unlink Order #\" + no);\n }\n }\n //\n setC_Invoice_ID(0);\n setIsAllocated(false);\n }", "public void unfreeze() {\n frozen = false;\n }", "AgentPolicyBuilder buildUpon(AgentPolicy agentPolicy);", "protected void loadMediationPoliciesFromMigratedAPIToAPI(API api, String organization)\n throws APIManagementException {\n\n List<OperationPolicy> policiesList = (api.getApiPolicies() != null) ? api.getApiPolicies() : new ArrayList<>();\n // This method is used to handle the migration\n\n // Get all policies\n if (APIUtil.isSequenceDefined(api.getInSequence())) {\n OperationPolicyData existingPolicy = getAPISpecificOperationPolicyByPolicyName(api.getInSequence(),\n APIConstants.DEFAULT_POLICY_VERSION, api.getUuid(), null, organization, false);\n OperationPolicy inFlowPolicy = new OperationPolicy();\n inFlowPolicy.setPolicyName(api.getInSequence());\n inFlowPolicy.setDirection(APIConstants.OPERATION_SEQUENCE_TYPE_REQUEST);\n inFlowPolicy.setOrder(1);\n if (existingPolicy != null) {\n inFlowPolicy.setPolicyId(existingPolicy.getPolicyId());\n api.setInSequence(null);\n }\n policiesList.add(inFlowPolicy);\n }\n if (APIUtil.isSequenceDefined(api.getOutSequence())) {\n OperationPolicyData existingPolicy = getAPISpecificOperationPolicyByPolicyName(api.getOutSequence(),\n APIConstants.DEFAULT_POLICY_VERSION, api.getUuid(), null, organization, false);\n OperationPolicy outFlowPolicy = new OperationPolicy();\n outFlowPolicy.setPolicyName(api.getOutSequence());\n outFlowPolicy.setDirection(APIConstants.OPERATION_SEQUENCE_TYPE_RESPONSE);\n outFlowPolicy.setOrder(1);\n if (existingPolicy != null) {\n outFlowPolicy.setPolicyId(existingPolicy.getPolicyId());\n api.setOutSequence(null);\n }\n policiesList.add(outFlowPolicy);\n }\n if (APIUtil.isSequenceDefined(api.getFaultSequence())) {\n OperationPolicyData existingPolicy = getAPISpecificOperationPolicyByPolicyName(api.getFaultSequence(),\n APIConstants.DEFAULT_POLICY_VERSION, api.getUuid(), null, organization, false);\n OperationPolicy faultFlowPolicy = new OperationPolicy();\n faultFlowPolicy.setPolicyName(api.getFaultSequence());\n faultFlowPolicy.setDirection(APIConstants.OPERATION_SEQUENCE_TYPE_FAULT);\n faultFlowPolicy.setOrder(1);\n if (existingPolicy != null) {\n faultFlowPolicy.setPolicyId(existingPolicy.getPolicyId());\n api.setFaultSequence(null);\n }\n policiesList.add(faultFlowPolicy);\n }\n\n // Add as API level policies\n if (!policiesList.isEmpty()) {\n api.setApiPolicies(policiesList);\n }\n }", "public void unfreeze() {\n this.frozen = false;\n }", "public static void uninstallPackage(String fullPkgPath) {\n String orgName;\n String packageName;\n String version;\n // Get org-name\n int orgNameIndex = fullPkgPath.indexOf(\"/\");\n if (orgNameIndex == -1) {\n throw LauncherUtils.createLauncherException(\"no org-name is provided\");\n }\n orgName = fullPkgPath.substring(0, orgNameIndex);\n\n // Get package name\n int packageNameIndex = fullPkgPath.indexOf(\":\");\n if (packageNameIndex == -1) { // version is not provided\n throw LauncherUtils.createLauncherException(\"no module version is provided\");\n }\n packageName = fullPkgPath.substring(orgNameIndex + 1, packageNameIndex);\n version = fullPkgPath.substring(packageNameIndex + 1, fullPkgPath.length());\n\n Path homeRepoPath = BALLERINA_HOME_PATH.resolve(ProjectDirConstants.DOT_BALLERINA_REPO_DIR_NAME);\n Path cacheRepoPath = BALLERINA_HOME_PATH.resolve(ProjectDirConstants.CACHES_DIR_NAME)\n .resolve(ProjectDirConstants.BALLERINA_CENTRAL_DIR_NAME);\n Path pkgDirPath = Paths.get(orgName, packageName, version);\n\n // Check if module is installed locally\n if (Files.exists(homeRepoPath.resolve(pkgDirPath), LinkOption.NOFOLLOW_LINKS)) {\n deletePackage(homeRepoPath, pkgDirPath, fullPkgPath, packageName);\n } else if (Files.exists(cacheRepoPath.resolve(pkgDirPath), LinkOption.NOFOLLOW_LINKS)) {\n deletePackage(cacheRepoPath, pkgDirPath, fullPkgPath, packageName);\n } else {\n // module to be uninstalled doesn't exists\n throw LauncherUtils.createLauncherException(\"incorrect module signature provided \" + fullPkgPath);\n }\n }", "@Override\n public HttpResponseTemp<?> startRollback(int deployId, int versionId, int replicas, Policy policy)\n throws IOException, KubeResponseException, KubeInternalErrorException, DeploymentEventException, DaoException {\n Deployment deployment = deploymentBiz.getDeployment(deployId);\n if (deployment == null) {\n throw ApiException.wrapMessage(ResultStat.PARAM_ERROR, \"no such deployment:\" + deployId);\n }\n checkOpPermit(deployId, deployment.getClusterId());\n\n Version version = versionBiz.getVersion(deployId, versionId);\n if (version == null) {\n throw ApiException.wrapMessage(ResultStat.PARAM_ERROR, \"no such version:\" + versionId);\n }\n\n Cluster cluster = clusterBiz.getById(GlobalConstant.CLUSTER_TABLE_NAME, deployment.getClusterId(), Cluster.class);\n if (cluster == null) {\n throw ApiException.wrapMessage(ResultStat.PARAM_ERROR, \"no such clusterId: \" + deployment.getClusterId());\n }\n\n deploymentStatusManager.checkStateAvailable(DeploymentStatus.valueOf(deployment.getState()), DeploymentStatus.BACKROLLING);\n\n // check status\n RuntimeDriver driver = ClusterRuntimeDriver.getClusterDriver(cluster.getId());\n if (driver == null) {\n throw ApiException.wrapMessage(ResultStat.CLUSTER_NOT_EXIST, \"cluster: \" + cluster.toString());\n }\n try {\n List<EnvDraft> allExtraEnvs = buildExtraEnv(cluster);\n driver.rollbackDeploy(deployment, versionId, replicas, allExtraEnvs, CurrentThreadInfo.getUser(), policy);\n } catch (DeploymentEventException | KubeResponseException | KubeInternalErrorException e) {\n deploymentStatusManager.failedEventForDeployment(deployId, null, e.getMessage());\n ResultStat.DEPLOYMENT_UPDATE_FAILED.wrap(e.getMessage());\n }\n\n deployment.setLastUpdateTime(System.currentTimeMillis());\n deployment.setState(DeploymentStatus.BACKROLLING.name());\n deploymentBiz.update(deployment);\n\n return ResultStat.OK.wrap(null);\n }", "private void dropDBProcedure() {\r\n try {\r\n Class.forName(myDriver);\r\n Connection conn = DriverManager.getConnection(myUrl, myUser, myPass);\r\n DatabaseMetaData md = conn.getMetaData();\r\n String[] types = {\"TABLE\"};\r\n ResultSet rs = md.getTables(null, \"USERTEST\", \"%\", types);\r\n while (rs.next()) {\r\n String queryDrop\r\n = \"DROP TABLE \" + rs.getString(3);\r\n Statement st = conn.createStatement();\r\n st.executeQuery(queryDrop);\r\n System.out.println(\"TABLE \" + rs.getString(3).toLowerCase() + \" DELETED\");\r\n st.close();\r\n }\r\n rs.close();\r\n conn.close();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n System.out.println(ex.toString());\r\n }\r\n }", "private void upgradeFrom(UpdateUI ui, CurrentSchemaVersion curr, CiDb db)\n throws OrmException, SQLException {\n List<SchemaVersion> pending = pending(curr.versionNbr);\n updateSchema(pending, ui, db);\n migrateData(pending, ui, curr, db);\n\n JdbcSchema s = (JdbcSchema) db;\n final List<String> pruneList = Lists.newArrayList();\n s.pruneSchema(new StatementExecutor() {\n @Override\n public void execute(String sql) {\n pruneList.add(sql);\n }\n\n @Override\n public void close() {\n // Do nothing.\n }\n });\n\n try (JdbcExecutor e = new JdbcExecutor(s)) {\n if (!pruneList.isEmpty()) {\n ui.pruneSchema(e, pruneList);\n }\n }\n }", "@Override\n public void removeGroupPolicies(Context context, Item item, Group g) throws SQLException, AuthorizeException {\n // remove Group's policies from Item\n authorizeService.removeGroupPolicies(context, item, g);\n\n // remove all policies from bundles\n List<Bundle> bunds = item.getBundles();\n\n for (Bundle mybundle : bunds) {\n List<BundleBitstream> bs = mybundle.getBitstreams();\n\n for (BundleBitstream b : bs) {\n Bitstream bitstream = b.getBitstream();\n // remove bitstream policies\n authorizeService.removeGroupPolicies(context, bitstream, g);\n }\n\n // change bundle policies\n authorizeService.removeGroupPolicies(context, mybundle, g);\n }\n }", "void purge(String[] targetInstanceNames) throws DigitalAssetStoreException;", "public boolean downgrades(ApplicationVersion version) {\n return application.map(version::compareTo).orElse(0) > 0;\n }", "public boolean upgradeSoftwareInjector(SoftwareInjector injector) {\r\n if(injector.getCost() <= this.getBitcoins())\r\n {\r\n try {\r\n if(injector.upgrade()) \r\n { \r\n\r\n this.removeBitcoins(injector.getCost()); \r\n return true;\r\n\r\n }\r\n }\r\n catch (NotEnoughBitcoinsException | NoUpgradeAllowedException ex) {\r\n new Log(LogState.ERROR, ex.getMessage());\r\n }\r\n }\r\n return false;\r\n }", "@Override\n\tpublic String removePolicy(int policyId) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policyId))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\tpolicyDao.deleteById(policyId);\n\t\treturn \"Policy Deleted Successfully\";\n\t}", "public static WebElement lnk_clickUnvPPSPD() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"(//*[@id='unverifpparea']//dt//a)[position()=1]\"));\r\n \t\tAdd_Log.info(\"Unverified PP SPD is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Unverified PP SPD is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }" ]
[ "0.56174535", "0.5563818", "0.5489422", "0.51311016", "0.50421226", "0.49997494", "0.49136004", "0.48489663", "0.4809601", "0.4786654", "0.47570038", "0.47399366", "0.46363387", "0.46250325", "0.4615441", "0.46086997", "0.4556377", "0.45354447", "0.4503876", "0.44823262", "0.4477679", "0.4456145", "0.44561186", "0.4442442", "0.44206694", "0.43984938", "0.43870053", "0.4379957", "0.4379301", "0.43764144", "0.43603003", "0.43361586", "0.43217146", "0.43167123", "0.4311452", "0.42893136", "0.42816925", "0.42814732", "0.42677224", "0.42382592", "0.42355147", "0.42249912", "0.42169085", "0.42155084", "0.4206357", "0.41986883", "0.41961488", "0.419497", "0.41808045", "0.41771588", "0.41703033", "0.41686374", "0.41522852", "0.41522852", "0.41522852", "0.41366112", "0.4128508", "0.4126861", "0.41261926", "0.4123748", "0.41233066", "0.41212466", "0.4119046", "0.41137406", "0.41137406", "0.411037", "0.4109981", "0.4108358", "0.4107785", "0.41047335", "0.40970498", "0.40949905", "0.40818", "0.40805137", "0.40771005", "0.40747508", "0.40698484", "0.40621513", "0.40528992", "0.40518457", "0.40366894", "0.40361354", "0.40317413", "0.40308183", "0.4026975", "0.40240586", "0.40207", "0.4009059", "0.40082517", "0.4004098", "0.3999168", "0.3986856", "0.39835072", "0.3982079", "0.397938", "0.39761406", "0.39751053", "0.39725485", "0.39690733", "0.39585832" ]
0.54695815
3
Undeploys a specific version of a policy from the PDPs.
@Override public ResponseEntity<PdpGroupDeployResponse> deletePolicyVersion( String policyName, String version, UUID requestId) { return doUndeployOperation(requestId, () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, version), getPrincipal())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public ResponseEntity<PdpGroupDeployResponse> deletePolicy(String policyName, UUID requestId) {\n return doUndeployOperation(requestId,\n () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, null), getPrincipal()));\n }", "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public void unsetVersion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(VERSION$4, 0);\n }\n }", "void unregister(String policyId);", "void removePolicyController(String name);", "public void removeFromPolicyTransactions(entity.AppCritPolicyTransaction element);", "public void unsetVersion()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(VERSION$6, 0);\r\n }\r\n }", "void removePolicyController(PolicyController controller);", "@Override\n public void undeploy(DeploymentUnit context) {\n \n }", "@Override\r\n\tpublic void deletePolicy(Integer pid) {\n\t\tdao.deletePolicy(pid);\r\n\t\t\r\n\t}", "void clearPolicy() {\n policy = new Policy();\n }", "void transactTo_uninstallPackage(int code, String transactName, ComponentName who, String packageName, boolean keepData, int userId) {\n int i = 1;\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n IBinder binder = ServiceManager.getService(\"device_policy\");\n if (binder != null) {\n if (HWFLOW) {\n Log.i(TAG, \"Transact:\" + transactName + \"to device policy manager service.\");\n }\n _data.writeInterfaceToken(ConstantValue.DESCRIPTOR);\n if (who != null) {\n _data.writeInt(1);\n who.writeToParcel(_data, 0);\n } else {\n _data.writeInt(0);\n }\n _data.writeString(packageName);\n if (!keepData) {\n i = 0;\n }\n _data.writeInt(i);\n _data.writeInt(userId);\n binder.transact(code, _data, _reply, 0);\n _reply.readException();\n }\n _reply.recycle();\n _data.recycle();\n } catch (RemoteException localRemoteException) {\n Log.e(TAG, \"transactTo \" + transactName + \" failed: \" + localRemoteException.getMessage());\n } catch (Throwable th) {\n _reply.recycle();\n _data.recycle();\n }\n }", "public void unlinkProduct() {\n Product result;\n String supplierID = getToken(\"Enter supplier ID: \");\n if (warehouse.searchSupplier(supplierID) == null) {\n System.out.println(\"No such supplier!\");\n return;\n }\n do {\n String productID = getToken(\"Enter product ID: \");\n result = warehouse.unlinkProduct(supplierID, productID);\n if (result != null) {\n System.out.println(\"Product [\" + productID + \"] unassigned from supplier: [\" + supplierID + \"]\");\n }\n else {\n System.out.println(\"Product could not be unassigned\");\n }\n if (!yesOrNo(\"unassign more products from supplier: [\"+ supplierID + \"]\")) {\n break;\n }\n } while (true);\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:42.027 -0500\", hash_original_method = \"143D937A228206F27207E7C61286CEC1\", hash_generated_method = \"99B4559BE7E71E3CAB365A2313295F80\")\n \n public void removePackageName(String packageName){\n \taddTaint(packageName.getTaint());\n }", "public synchronized void execute(UnProvisionExtensionsCommand command) throws ExecutionException {\n List<URI> uninstall = new ArrayList<URI>();\n for (URI encoded : command.getExtensionUris()) {\n ContributionUriResolver resolver = getResolver(encoded);\n URI uri = resolver.decode(encoded);\n int count = resolver.getInUseCount(uri);\n if (count == 1) {\n try {\n // no longer in use, undeploy and uninstall the extension\n List<Deployable> deployables = contributionService.getDeployables(uri);\n List<Deployable> reverse = new ArrayList<Deployable>(deployables);\n // undeploy in reverse order\n Collections.reverse(reverse);\n for (Deployable deployable : reverse) {\n domain.undeploy(deployable.getName());\n }\n uninstall.add(uri);\n } catch (UndeploymentException e) {\n throw new ExecutionException(e);\n } catch (ContributionNotFoundException e) {\n throw new ExecutionException(e);\n }\n }\n try {\n resolver.release(uri);\n } catch (ResolutionException e) {\n throw new ExecutionException(e);\n }\n }\n try {\n contributionService.uninstall(uninstall);\n contributionService.remove(uninstall);\n } catch (ContributionNotFoundException e) {\n throw new ExecutionException(e);\n } catch (RemoveException e) {\n throw new ExecutionException(e);\n } catch (UninstallException e) {\n throw new ExecutionException(e);\n }\n }", "public void disassociateProductTemplate() {\n productToolOperation.removeChildProductTree(selectProductNode, planConfigBehavior);\n }", "void removeHasDeployedAirbag(Integer oldHasDeployedAirbag);", "void unpublish(List<String> uuids) throws GWTJahiaServiceException;", "public void unpatchAfterRelease( UGen ugen )\n\t{\n\t unpatchAfterRelease = true;\n\t ugenOutput = ugen;\n\t}", "public void delete() throws PolicyContextException\n {\n\tcheckSetPolicyPermission();\n\tsynchronized(refreshLock) {\n\t try {\n\t\tremovePolicy();\n\t } finally {\n\t\tsetState(DELETED_STATE);\n\t }\n\t}\n }", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public void unsetOrganizationVersion()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(ORGANIZATIONVERSION$6, 0);\r\n }\r\n }", "public void _unlinkPresentation(PresentationElement presentation1);", "@java.lang.Deprecated\n public void removeFromPolicyTransactions(gw.pl.persistence.core.Key elementID);", "public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeProductResponse unSubscribeProduct(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeProductRequest parameters) {\n throw new UnsupportedOperationException(\"Not implemented yet.\");\r\n }", "@Override\r\n\tpublic void DeletePackage(PackageJour pj) {\n\t\tem.remove(em.contains(pj) ? pj : em.merge(pj));\r\n\t}", "public void undeploy(Archive<?> archive) throws DeploymentException {\n jmxClient.undeploy(getDeploymentName(archive));\n }", "public void unsetVerStmt()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(VERSTMT$22, 0);\n }\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdDelete(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n if (apiProvider.hasAttachments(username, existingPolicy.getPolicyName(),\n PolicyConstants.POLICY_LEVEL_APP)) {\n String message = \"Policy \" + policyId + \" already attached to an application\";\n log.error(message);\n throw new APIManagementException(message);\n }\n apiProvider.deletePolicy(username, PolicyConstants.POLICY_LEVEL_APP, existingPolicy.getPolicyName());\n return Response.ok().build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while deleting Application level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public void unsetPrf()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PRF$26, 0);\r\n }\r\n }", "void removeApp(String bundleId);", "@Override\r\n\tpublic void updatePolicy(Policy policy) {\n\t\tdao.updatePolicy(policy);\r\n\t\t\r\n\t}", "public void undo() throws ProvisioningException {\n try(ProvisioningLayout<FeaturePackRuntimeBuilder> layout = newConfigLayout(StateHistoryUtils.readUndoConfig(home, log), Collections.emptyMap())) {\n doProvision(layout, getFsDiff(), true);\n }\n }", "public static void removeOrderedPromotionalPackage() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out\n\t\t\t\t.println(\"************Removing ordered Promotional Package************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackages = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tOrderedPackage orderedPackage = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out\n\t\t\t\t\t.print(\"Select an order to remove the promotional package ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedPromotionalPackages = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tdo {\n\t\t\t\tSystem.out.println();\n\t\t\t\tif (listOfOrderedPromotionalPackages.size() == 0) {\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\n\t\t\t\t\t\t\t.println(\"There is no ordered promotional package!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < listOfOrderedPromotionalPackages.size(); i++) {\n\t\t\t\t\torderedPackage = (OrderedPackage) listOfOrderedPromotionalPackages\n\t\t\t\t\t\t\t.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print(\"Select an ordered promotional package to remove from order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\torderedPackage = (OrderedPackage) listOfOrderedPromotionalPackages\n\t\t\t\t\t\t\t.get(choice - 1);\n\n\t\t\t\t\tcheck = orderedPackageManager\n\t\t\t\t\t\t\t.removeOrderedPackage(orderedPackage);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Ordered promotional package removed from order successfully!\");\n\t\t\t\t\t\tlistOfOrderedPromotionalPackages.remove(orderedPackage);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Failed to remove ordered promotional package from order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out\n\t\t\t\t.println(\"************End of removing promotional Package************\");\n\t}", "void unsetNumberOfInstallments();", "void unsetInstallmentType();", "public void undeploy(String filePath) throws DeploymentException {\n\n if (!undeployedTransportAdaptorFilePaths.contains(filePath)) {\n processUndeploy(filePath);\n } else {\n undeployedTransportAdaptorFilePaths.remove(filePath);\n }\n\n }", "AgentPolicyBuilder clear();", "@RequestMapping(value = \"/{name}\", method = RequestMethod.DELETE)\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic void undeploy(@PathVariable(\"name\") String name) {\n\t\tstreamDeployer.undeployStream(name);\n\t}", "private static List<OperationPolicy> extractAndDropAPILevelPoliciesFromAPI(API api) {\n List<OperationPolicy> policies = new ArrayList<>();\n if (api.getApiPolicies() != null && !api.getApiPolicies().isEmpty()) {\n policies = api.getApiPolicies();\n api.setApiPolicies(null);\n }\n return policies;\n }", "public List<COPSDecision> getRemovePolicy(COPSPdpOSReqStateMan man);", "public Package removePackage(int index) {\r\n return (Package) myPackages.remove(index);\r\n }", "public static native void unexport(int pin) throws RuntimeException;", "@Override\n\tpublic void removepro(int pnum) {\n\t\tsession.update(namespace+\".removepro\", pnum);\n\t}", "public void unsetVersionValue() throws JNCException {\n delete(\"version\");\n }", "public String undeploy(String name, String root)\n throws DeploymentException {\n \n String taskName = \"undeploy\";\n \n // make sure the service unit is properly shut down\n shutDown(name);\n \n \n if (mServiceUnits.containsKey(name)) {\n mServiceUnits.remove(name);\n }\n\n mLogger.info(NotificationEvent.SEVERITY_TYPE_INFO,\n NotificationEvent.OPERATIONAL_STATE_STARTED,\n I18n.msg(\"1050: Service Unit {0} undeployed from {1}.\",\n name,\n root));\n return createSuccessMessage(taskName, mContext.getComponentName());\n }", "private static void deletePackage(Path repoPath, Path pkgDirPath, String fullPkgPath, String pkgName) {\n try {\n Path path = repoPath.resolve(pkgDirPath);\n // Delete the package zip\n Files.deleteIfExists(path.resolve(pkgName + ProjectDirConstants.BLANG_COMPILED_PKG_EXT));\n\n // Delete the empty directories\n deleteEmptyParentDirs(path, repoPath);\n\n // Print that the package was successfully uninstalled\n outStream.println(fullPkgPath + \" successfully uninstalled\");\n } catch (IOException e) {\n throw LauncherUtils.createLauncherException(\"uninstalling module \" + fullPkgPath + \" was unsuccessful\");\n }\n }", "public void unsetSwissprot()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(SWISSPROT$14, 0);\r\n }\r\n }", "@Override\r\n public void unsetup(SpigotImporter importer, Panel panel) {\n try{\r\n System.out.println(panels.length);\r\n //MavselWizardSwing2 \r\n ((MavselWizardSwing1) ((Panel) panels[0]).getComponent()).unsetup((MavselSpigot)importer); \r\n ((MavselWizardSwing2) ((Panel) panels[1]).getComponent()).unsetup((MavselSpigot)importer);\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n \r\n panels = null;\r\n }", "private void Drop(String[]p){\n List<DeputyTableItem> dti;\n dti = Drop1(p);\n for(DeputyTableItem item:dti){\n deputyt.deputyTable.remove(item);\n }\n }", "public static void uninstallPackage(String fullPkgPath) {\n String orgName;\n String packageName;\n String version;\n // Get org-name\n int orgNameIndex = fullPkgPath.indexOf(\"/\");\n if (orgNameIndex == -1) {\n throw LauncherUtils.createLauncherException(\"no org-name is provided\");\n }\n orgName = fullPkgPath.substring(0, orgNameIndex);\n\n // Get package name\n int packageNameIndex = fullPkgPath.indexOf(\":\");\n if (packageNameIndex == -1) { // version is not provided\n throw LauncherUtils.createLauncherException(\"no module version is provided\");\n }\n packageName = fullPkgPath.substring(orgNameIndex + 1, packageNameIndex);\n version = fullPkgPath.substring(packageNameIndex + 1, fullPkgPath.length());\n\n Path homeRepoPath = BALLERINA_HOME_PATH.resolve(ProjectDirConstants.DOT_BALLERINA_REPO_DIR_NAME);\n Path cacheRepoPath = BALLERINA_HOME_PATH.resolve(ProjectDirConstants.CACHES_DIR_NAME)\n .resolve(ProjectDirConstants.BALLERINA_CENTRAL_DIR_NAME);\n Path pkgDirPath = Paths.get(orgName, packageName, version);\n\n // Check if module is installed locally\n if (Files.exists(homeRepoPath.resolve(pkgDirPath), LinkOption.NOFOLLOW_LINKS)) {\n deletePackage(homeRepoPath, pkgDirPath, fullPkgPath, packageName);\n } else if (Files.exists(cacheRepoPath.resolve(pkgDirPath), LinkOption.NOFOLLOW_LINKS)) {\n deletePackage(cacheRepoPath, pkgDirPath, fullPkgPath, packageName);\n } else {\n // module to be uninstalled doesn't exists\n throw LauncherUtils.createLauncherException(\"incorrect module signature provided \" + fullPkgPath);\n }\n }", "public void unsetSoap()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SOAP$2, 0);\n }\n }", "private void removePolicyFile(boolean granted){\n\tString fileName = getPolicyFileName(granted);\n\tFile f = new File(fileName);\n\tif(f.exists()){\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy file: \"+fileName; \n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg,new Object []{ fileName} );\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy file removed: \"+fileName);\n\t }\n\t}\n }", "public void removeWire(IPWire pres);", "public void removeUniverse(String name) throws ProvisioningException {\n ProvisioningConfig config = getProvisioningConfig();\n if(config == null || !config.hasUniverse(name)) {\n return;\n }\n config = ProvisioningConfig.builder(config).removeUniverse(name).build();\n try {\n ProvisioningXmlWriter.getInstance().write(config, PathsUtils.getProvisioningXml(home));\n } catch (Exception e) {\n throw new ProvisioningException(Errors.writeFile(PathsUtils.getProvisioningXml(home)), e);\n }\n this.provisioningConfig = config;\n }", "public void terminate(Payroll pr){\n while(!pr.getList().isEmpty()){\n payroll.remove(pr.getList().removeFirst());\n }\n }", "@Override\n public void removeGroupPolicies(Context context, Item item, Group g) throws SQLException, AuthorizeException {\n // remove Group's policies from Item\n authorizeService.removeGroupPolicies(context, item, g);\n\n // remove all policies from bundles\n List<Bundle> bunds = item.getBundles();\n\n for (Bundle mybundle : bunds) {\n List<BundleBitstream> bs = mybundle.getBitstreams();\n\n for (BundleBitstream b : bs) {\n Bitstream bitstream = b.getBitstream();\n // remove bitstream policies\n authorizeService.removeGroupPolicies(context, bitstream, g);\n }\n\n // change bundle policies\n authorizeService.removeGroupPolicies(context, mybundle, g);\n }\n }", "public SpaceShipValet remove(String license) \n\t{\n\t\tint index = license.hashCode() % chainedPortList.length;\n\t\tif(index<0)\n\t\t\tindex += chainedPortList.length;\n\t\tif(chainedPortList[index] == null)\n\t\t\treturn null;\n\t\tfor(SpacePort<String, SpaceShipValet> nextSpacePort : chainedPortList[index])//For all of the slots in the SpacePort\n\t\t{\n\t\t\tif(nextSpacePort.license.equals(license))//If there is a match\n\t\t\t{\n\t\t\t\tnextSpacePort.ship = DELETED;//Set that ship to null\n\t\t\t\tif(chainedPortList[index]==null)//If it has been set null\n\t\t\t\t\tnextSpacePort.setValue(null);//The value of the port is null as well. Theses three steps will allow us to dock ships in the future!\n\t\t\t\treturn nextSpacePort.ship;\n\t\t\t}\n\t\t}\n\t\treturn null;\t\n\t}", "private void dropOldTables(CopyTable table) throws SQLException\n\t{\n\t\tLOG.info(\"Dropping older versions of table '\" + table.getToName() + \"'...\");\n\t\t\n\t\tStatement q =\n\t\t\tCopyToolConnectionManager.getInstance().getMonetDbConnection().createStatement();\n\t\t\n\t\tResultSet result =\n\t\t\tq.executeQuery(\"SELECT name FROM sys.tables WHERE name LIKE '\" + table.getToName()\n\t\t\t\t+ \"_20%_%' AND name <> '\" + table.getToName() + \"' \"\n\t\t\t\t+ \"AND schema_id = (SELECT id from sys.schemas WHERE LOWER(name) = LOWER('\" + table.getSchema()\n\t\t\t\t+ \"')) AND query IS NULL ORDER BY name DESC\");\n\t\t\n\t\tint i = 0;\n\t\tint dropCount = 0;\n\t\tStatement stmtDrop =\n\t\t\tCopyToolConnectionManager.getInstance().getMonetDbConnection().createStatement();\n\t\twhile(result.next())\n\t\t{\n\t\t\ti++;\n\t\t\t\n\t\t\t// if table is a fast view-switching table then\n\t\t\t// \t\tskip first result -> is current table and referenced by view\n\t\t\t// \t\tskip second result -> as backup (TODO: perhaps make this configurable?)\n\t\t\tif (table.isUseFastViewSwitching())\n\t\t\t\tif (i == 1 || i == 2)\n\t\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// build DROP query\n\t\t\tStringBuilder query = new StringBuilder(\"DROP TABLE \");\n\t\t\t\n\t\t\tif (!StringUtils.isEmpty(table.getSchema()))\n\t\t\t\tquery.append(MonetDBUtil.quoteMonetDbIdentifier(table.getSchema())).append(\".\");\n\t\t\t\n\t\t\tquery.append(MonetDBUtil.quoteMonetDbIdentifier(result.getString(\"name\"))).append(\";\");\n\t\t\t\n\t\t\t// execute DROP query\n\t\t\tstmtDrop.executeUpdate(query.toString());\t\t\t\n\t\t\tdropCount++;\n\t\t}\n\t\t\n\t\tif (i == 0 || (table.isUseFastViewSwitching() && i <= 2))\n\t\t\tLOG.info(\"Table '\" + table.getToName() + \"' has no older versions\");\n\t\telse\n\t\t\tLOG.info(\"Dropped \" + dropCount + \" older versions of table '\" + table.getToName() + \"'\");\n\t\t\n\t\tresult.close();\n\t\tq.close();\n\t}", "void unpublish() {\n pendingOps.decrementAndGet();\n }", "void unsetProbables();", "@NotNull\n @Generated\n @Selector(\"dropVerdict\")\n public static native NEFilterNewFlowVerdict dropVerdict();", "void removePublicKey(PGPPublicKeyRing keyRing) throws IOException, PGPException;", "public void unsetTpd()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TPD$34, 0);\r\n }\r\n }", "public void unsetRelease()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(RELEASE$4, 0);\r\n }\r\n }", "public void destroyApp(boolean unconditional) {\n }", "public void destroyApp(boolean unconditional) {\n }", "public void destroyApp(boolean unconditional) {\n }", "private boolean deleteMonetizationPlan(SubscriptionPolicy subPolicy) throws APIManagementException {\n\n Monetization monetizationImplementation = getMonetizationImplClass();\n if (monetizationImplementation != null) {\n try {\n return monetizationImplementation.deleteBillingPlan(subPolicy);\n } catch (MonetizationException e) {\n APIUtil.handleException(\"Failed to delete monetization plan of : \" + subPolicy.getPolicyName(), e);\n }\n }\n return false;\n }", "@Override\n public InferredOWLOntologyID unpublishArtifact(final InferredOWLOntologyID ontologyIRI) throws PoddClientException\n {\n return null;\n }", "public static void removeJar(String jarName, boolean undeploy)\n\tthrows SQLException\n\t{\n\t\tassertJarName(jarName);\n\t\tAclId[] ownerRet = new AclId[1];\n\t\tint jarId = getJarId(jarName, ownerRet);\n\t\tif(jarId < 0)\n\t\t\tthrow new SQLException(\"No Jar named '\" + jarName\n\t\t\t\t+ \"' is known to the system\");\n\n\t\tAclId user = AclId.getSessionUser();\n\t\tif(!(user.isSuperuser() || user.equals(ownerRet[0])))\n\t\t\tthrow new SecurityException(\n\t\t\t\t\"Only super user or owner can remove a jar\");\n\n\t\tif(undeploy)\n\t\t\tdeployRemove(jarId, jarName);\n\n\t\tPreparedStatement stmt = SQLUtils\n\t\t\t.getDefaultConnection()\n\t\t\t.prepareStatement(\"DELETE FROM sqlj.jar_repository WHERE jarId = ?\");\n\t\ttry\n\t\t{\n\t\t\tstmt.setInt(1, jarId);\n\t\t\tif(stmt.executeUpdate() != 1)\n\t\t\t\tthrow new SQLException(\n\t\t\t\t\t\"Jar repository update did not update 1 row\");\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSQLUtils.close(stmt);\n\t\t}\n\t\tLoader.clearSchemaLoaders();\n\t}", "public OrglRoot unTransformedBy(Dsp externalDsp) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9734:OrglRoot methodsFor: 'operations'!\n{OrglRoot} unTransformedBy: externalDsp {Dsp}\n\t\"Return a copy with externalDsp removed from the receiver's dsp.\"\n\tself subclassResponsibility!\n*/\n}", "void remove(String installedAppId);", "public static WebElement lnk_clickUnvPPSPD() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"(//*[@id='unverifpparea']//dt//a)[position()=1]\"));\r\n \t\tAdd_Log.info(\"Unverified PP SPD is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Unverified PP SPD is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "protected void removePanel(PackagedPanelSB toRemove) {\n \t\n \tif(delivery.removePackaged(toRemove.getPackaged()) ) {\n \t\tvbox.getChildren().clear();\n\t \tparentPanel.decreaseCart();\n\t \tdelivery.setSellingPrice(0);\n\t \tfor(Packaged p : delivery.getPackages()) {\n\t \t\n\t \t\tdelivery.setSellingPrice(delivery.getSellingPrice() + p.getAmount() * p.getDrug().getSellingPrice());\n\t \t\t\n\t \t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/gui/clientPanel/PackagedPanel.fxml\"));\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tAnchorPane packagedPanel = loader.load();\n\t\t\t\t\tPackagedPanelSB controller = (PackagedPanelSB)loader.getController();\n\t\t\t\t\tcontroller.setPackaged(p);\n\t\t\t\t\tcontroller.setParent(this);\n\t\t\t\t\tvbox.getChildren().add(packagedPanel);\n\t\t\t\t\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tAlert alert=new Alert(AlertType.ERROR, \"Error loading packaged panels\");\n\t\t\t\t\talert.showAndWait();\n\t\t\t\t}\n\t \t}\n \t}else{\n \t\t\n \t\t//this should never happen\n \t\tSystem.out.println(\"That panel doesn't exist\");\n \t\t\n \t}\n \t\t\n\t\t\n \tpriceLabel.setText(\"Price: \" + delivery.getSellingPrice());\n \tpackagedScrollPanel.setContent(vbox);\n \t\n }", "@Override\n\tpublic String removePolicy(int policyId) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policyId))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\tpolicyDao.deleteById(policyId);\n\t\treturn \"Policy Deleted Successfully\";\n\t}", "public void destroy(App p){\n if(!p.getToRemove().contains(this)){\n p.addObjectToRemove(this);\n }\n }", "public void uninstall(FeaturePackLocation.FPID fpid, Map<String, String> pluginOptions) throws ProvisioningException {\n ProvisioningConfig config = getProvisioningConfig();\n if(config == null || !config.hasFeaturePackDeps()) {\n throw new ProvisioningException(Errors.unknownFeaturePack(fpid));\n }\n try(ProvisioningLayout<FeaturePackRuntimeBuilder> layout = getLayoutFactory().newConfigLayout(config, ProvisioningRuntimeBuilder.FP_RT_FACTORY, false)) {\n layout.uninstall(resolveUniverseSpec(fpid.getLocation()).getFPID(), pluginOptions);\n doProvision(layout, getFsDiff(), false);\n }\n }", "public void cleanOrphanDeployments() {\n log.info(\"Cleaning orphan Deployments...\");\n List<String> deploymentNames = getDeployments();\n for (String deploymentName : deploymentNames) {\n if (deploymentName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !serviceExists(deploymentName)) {\n log.info(\"Cleaning orphan Deployment [Name] \" + deploymentName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n if (!runtimeClient.deleteDeployment(deploymentName)) {\n log.error(\"Deployment deletion failed [Deployment Name] \" + deploymentName);\n }\n }\n }\n }", "@Test\n\tpublic void testRemovedWPtoWS() {\n\t\tWorkPackage wp = new WorkPackage(null);\n\t\tWorkSpace ws = new WorkSpace(null);\n\t\tws.addWP(wp);\n\t\tAssert.assertTrue(ws.removeWP(wp));\n\t\tAssert.assertTrue(ws.getWpList().size()==0);\n\t}", "private void updateDeploymentCounts(final List<ToscaConceptIdentifier> runningPolicies,\n final List<ToscaPolicy> policies) {\n final var statisticsManager = ApexPolicyStatisticsManager.getInstanceFromRegistry();\n if (statisticsManager == null || policies == null || policies.isEmpty()) {\n return;\n }\n var policiesToDeploy = policies.stream()\n .map(ToscaWithTypeAndObjectProperties::getIdentifier).collect(Collectors.toList());\n\n var policiesSuccessfullyDeployed = new ArrayList<>(policiesToDeploy);\n policiesSuccessfullyDeployed.retainAll(runningPolicies);\n policiesSuccessfullyDeployed.forEach(policy -> statisticsManager.updatePolicyDeployCounter(true));\n\n var policiesFailedToDeploy = new ArrayList<>(policiesToDeploy);\n policiesFailedToDeploy.removeIf(runningPolicies::contains);\n policiesFailedToDeploy.forEach(policy -> statisticsManager.updatePolicyDeployCounter(false));\n }", "void unsetProductGroup();", "void uncap();", "private void unpublish() {\n Log.i(TAG, \"Unpublishing.\");\n Nearby.Messages.unpublish(mGoogleApiClient, mPubMessage);\n }", "@Override\n\tpublic void delete(Policy obj) throws SQLException {\t\t\n\t\tString deletePolicy = \"DELETE FROM Policies WHERE pID = ?\";\n\t\ttry \n\t {\n\t\t\tPreparedStatement preparedStatement = DBConnection.GetDBConnection().prepareStatement(deletePolicy);\n\t\t\tpreparedStatement.setString(1, obj.pID);\n\t\t\tpreparedStatement.executeUpdate();\n\t\t} \n\t catch (SQLException e) \n\t {\n\t \tLogger.GetInstance().log(e.getMessage());\n\t\t\tLogger.GetInstance().log(\"Unable to delete the Following Policy:\\n\"\n\t\t\t\t\t+ \"First name: \"+ obj.firstName+\"\\n\"\n\t\t\t\t\t+ \"Last name: \"+obj.lastName+\"\\n\"\n\t\t\t\t\t+ \"ID: \"+obj.pID+\"\\n\"\n\t\t\t\t\t+ \"Insurance type: \"+obj.type+\"\\n\"\n\t\t\t\t\t+ \"Remarks: \"+obj.remarks+\"\\n\");\n\t\t}\n\n\t\tLogger.GetInstance().log(\"Successfully deleted the Following Policy:\\n\"\n\t\t\t\t+ \"Policy ID: \"+obj.pID+\"\\n\"\n\t\t\t\t+ \"First name: \"+ obj.firstName+\"\\n\"\n\t\t\t\t+ \"Last name: \"+obj.lastName+\"\\n\"\n\t\t\t\t+ \"Insurance type: \"+obj.type+\"\\n\"\n\t\t\t\t+ \"Remarks: \"+obj.remarks+\"\\n\");\n\n\t}", "public void removeSoftware(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SOFTWARE$20, i);\n }\n }", "public void removeWallet(Wallet wallet);", "public void deleteApp(String packageName) throws SQLException {\n\t\tString dburl = prop.getProperty(\"dburl\");\n\t\tString dbuser = prop.getProperty(\"dbuser\");\n\t\tString dbpw = prop.getProperty(\"dbpw\");\n\t\tmethods_snw.deleteAppFromServer(dburl, dbuser, dbpw, packageName);\n\t}", "public boolean upgradeSoftwareInjector(SoftwareInjector injector) {\r\n if(injector.getCost() <= this.getBitcoins())\r\n {\r\n try {\r\n if(injector.upgrade()) \r\n { \r\n\r\n this.removeBitcoins(injector.getCost()); \r\n return true;\r\n\r\n }\r\n }\r\n catch (NotEnoughBitcoinsException | NoUpgradeAllowedException ex) {\r\n new Log(LogState.ERROR, ex.getMessage());\r\n }\r\n }\r\n return false;\r\n }", "@Override\r\n\tpublic void DeletePackageZone(PackageZone pz) {\n\t\tem.remove(em.contains(pz) ? pz : em.merge(pz));\r\n\t}", "public void downVote(Post p) {\n p.downvote();\n }", "protected void uninstall() {\n\t\t//\n\t}", "public boolean downgrades(Version version) {\n return platform.map(version::compareTo).orElse(0) > 0;\n }", "public boolean downgrades(ApplicationVersion version) {\n return application.map(version::compareTo).orElse(0) > 0;\n }", "void purge(String[] targetInstanceNames) throws DigitalAssetStoreException;", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "public void releasePackwave(){\n libManhattanCommonFunctions.clickAnyElement(getPageElement(\"AllCheckBox\"), \"Select Wave\");\n libManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnMore\"), \"More Button\");\n libManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnPackWaves\"), \"Pack Waves Option\");\n libManhattanCommonFunctions.clickAnyElement(getPageElement(\"Packwavecheckbox\"), \"Select Pack Wave\");\n libManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnRelease\"), \"Release Button\");\n\n }", "void unsetManifestHashAlgorithm();", "public void rejectProduct() {\n self.increaseRejectCount();\n env.updateMachine(self);\n }" ]
[ "0.59061605", "0.56677973", "0.55020756", "0.5384261", "0.53770345", "0.5330545", "0.5313511", "0.52652466", "0.51768094", "0.5155016", "0.50624144", "0.48489594", "0.47881722", "0.47708678", "0.47477305", "0.47226858", "0.47110054", "0.4694187", "0.4678605", "0.4648431", "0.46057367", "0.4601771", "0.45708013", "0.45565358", "0.45552942", "0.4545149", "0.45450437", "0.4544336", "0.45281315", "0.45126218", "0.45108107", "0.45074615", "0.45023242", "0.4476421", "0.44759747", "0.4472495", "0.44694248", "0.44660378", "0.44332477", "0.44273397", "0.44057217", "0.4404614", "0.44007394", "0.4396835", "0.4391102", "0.4387412", "0.43862844", "0.43791255", "0.43785056", "0.43704522", "0.43692476", "0.43581107", "0.43486568", "0.43406358", "0.4335308", "0.43345043", "0.43314284", "0.43242335", "0.43235514", "0.43225583", "0.43224943", "0.43219236", "0.43187723", "0.43109146", "0.4306537", "0.42961732", "0.42837018", "0.42837018", "0.42837018", "0.42822513", "0.42820624", "0.42773676", "0.4263505", "0.42625296", "0.42600662", "0.4251129", "0.42486826", "0.4242987", "0.42421108", "0.42373595", "0.42366225", "0.42357713", "0.42330286", "0.422835", "0.42267403", "0.42240372", "0.42167038", "0.42152297", "0.42143723", "0.4211647", "0.42084113", "0.42003816", "0.4199485", "0.4195764", "0.41940776", "0.41902024", "0.4183082", "0.41691124", "0.4163054", "0.41620684" ]
0.63087404
0
Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: dir subdir1 subdir2 file.ext The directory dir contains an empty subdirectory subdir1 and a subdirectory subdir2 containing a file file.ext. The string "dir\n\tsubdir1\n\t\tfile1.ext\n\t\tsubsubdir1\n\tsubdir2\n\t\tsubsubdir2\n\t\t\tfile2.ext" represents: dir subdir1 file1.ext subsubdir1 subdir2 subsubdir2 file2.ext The directory dir contains two subdirectories subdir1 and subdir2. subdir1 contains a file file1.ext and an empty secondlevel subdirectory subsubdir1. subdir2 contains a secondlevel subdirectory subsubdir2 containing a file file2.ext. We are interested in finding the longest (number of characters) absolute path to a file within our file system. For example, in the second example above, the longest absolute path is "dir/subdir2/subsubdir2/file2.ext", and its length is 32 (not including the double quotes). Given a string representing the file system in the above format, return the length of the longest absolute path to file in the abstracted file system. If there is no file in the system, return 0. Note: The name of a file contains at least a . and an extension. The name of a directory or subdirectory will not contain a .. Time complexity required: O(n) where n is the size of the input string. Notice that a/aa/aaa/file1.txt is not the longest file path, if there is another path aaaaaaaaaaaaaaaaaaaaa/sth.png.
private boolean isDir(String fileName) { return !fileName.contains("."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int lengthOfLongestSubstring(String s) {\n return sol2a(s); \n //return sol3_WRONG(s); //NO! D & C (unlike LC53)\n }", "public int lengthOfLongestSubstring(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n int res = 0;\n boolean[] used = new boolean[128];//ASCII 表共能表示 256 个字符,但是由于键盘只能表示 128 个字符,所以用 128 也行\n int left = 0, right = 0; //维持[i, j) 滑动窗口\n while (right < s.length()) {\n if (!used[s.charAt(right)]) {\n used[s.charAt(right ++)] = true;\n } else {\n res = Math.max(res, right - left);\n while ( left < right && s.charAt(left) != s.charAt(right)) {\n used[s.charAt(left ++)] = false;\n }\n left ++;\n right ++;\n }\n }\n res = Math.max(res, right - left);\n return res;\n }", "public int lengthOfLongestSubstring(String s) {\n if(s == null || s.length() == 0){\n return 0;\n }\n int runner = 0;\n int walker = 0;\n int max = 0;\n HashSet<Character> set = new HashSet<Character>();\n while(runner < s.length()){\n if(set.contains(s.charAt(runner))){\n if(max < runner - walker){\n max = runner - walker;\n }\n while(s.charAt(walker) != s.charAt(runner)){\n set.remove(s.charAt(walker));\n walker++;\n }\n walker++;\n }else{\n set.add(s.charAt(runner));\n }\n runner++;\n }\n max = Math.max(max, runner - walker);\n return max;\n }", "private static int longestString(List<String> arr) {\n\t\tList<String> ll=new ArrayList();\r\n\t\tlongestString(arr,0,\"\",ll);\r\n\t\tint max=0;\r\n\t\tfor(String a:ll) {\r\n\t\t\tint len=a.length();\r\n\t\t\tif(len>max) {\r\n\t\t\t\tmax=len;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "public static int lengthOfLongestSubstring(String s) {\n int[] dp=new int[256];\n for(int i=0;i<dp.length;i++){\n dp[i]=-1;\n }\n int start=0,result=0;\n for(int i=0;i<s.length();i++){\n start=Math.max(dp[s.charAt(i)]+1,start);\n dp[s.charAt(i)]=i;\n result=Math.max(result,i-start+1);\n }\n return result;\n }", "public int lengthOfLongestSubstring(String s) {\n if (s == null) {\n return 0;\n }\n return helper(s, 0);\n }", "public int lengthOfLongestSubstring(String s) {\n\t\tif (s == null || s.length() == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint slow = 0, fast = 0;\n\t\tHashMap<Character, Integer> map = new HashMap<Character, Integer>();\n\t\tint maxLen = 0;\n\t\tint start = 0, end = 0;\n\t\twhile (fast < s.length()) {\n\t\t\tchar cur = s.charAt(fast);\n\t\t\tif (!map.containsKey(cur)) {\n\t\t\t\tmap.put(cur, 1);\n\t\t\t} else {\n\t\t\t\tmap.put(cur, map.get(cur) + 1);\n\t\t\t}\n\n\t\t\twhile (map.get(cur) > 1 && slow <= fast) {\n\t\t\t\tchar slow_char = s.charAt(slow);\n\t\t\t\tmap.put(slow_char, map.get(slow_char) - 1);\n\t\t\t\tslow++;\n\t\t\t}\n\t\t\tif (maxLen < fast - slow + 1) {\n\t\t\t\tmaxLen = fast - slow + 1;\n\t\t\t\tstart = slow;\n\t\t\t\tend = fast;\n\t\t\t}\n\t\t\tfast++;\n\t\t}\n\n\t\t// System.out.println(\"maxLen = \" + maxLen);\n\t\t// System.out.println(s.substring(start, end + 1));\n\t\treturn maxLen;\n\t}", "private static int lengthOfLongestSubstring2(String s) {\n int maxLength = 0;\n int currentlength = 0;\n int startIndex = -1;\n Map<Character, Integer> charMap = new HashMap<>();\n \n for(int index = 0; index < s.length(); index++){\n Character c = s.charAt(index);\n Integer currentIndex = charMap.get(c);\n if(currentIndex != null){\n \tcurrentlength = index - startIndex -1 ;\n if(maxLength < currentlength){\n maxLength = currentlength;\n }\n if(currentIndex > startIndex) {\n startIndex = currentIndex;\n }\n }\n charMap.put(c, index);\n }\n currentlength = s.length() - startIndex -1 ;\n if(maxLength < currentlength){\n maxLength = currentlength;\n }\n return maxLength;\n }", "public static int lengthOfLongestSubstring(String s) {\n if(s.length()==1)\n return 1;\n\n int sum=0;\n int left = 0, right = 0;\n boolean[] used = new boolean[128];\n\n while(right < s.length()){\n if(used[s.charAt(right)] == false){\n used[s.charAt(right)] = true;\n right++;\n }else{\n sum = Math.max(sum, right-left);\n while(left<right && s.charAt(right) != s.charAt(left)){\n used[s.charAt(left)] = false;\n left++;\n }\n left++;\n right++;\n }\n }\n sum = Math.max(sum, right - left);\n\n return sum;\n }", "public int lengthOfLongestSubstring(String s) {\r\n\r\n int answer = 0;\r\n int index = 0;\r\n while (index < s.length()) {\r\n String tmp = \"\";\r\n for (int i = index; i < s.length(); i++) {\r\n if (tmp.contains(String.valueOf(s.charAt(i)))) {\r\n break;\r\n } else {\r\n tmp += String.valueOf(s.charAt(i));\r\n }\r\n }\r\n if (tmp.length() > answer) {\r\n answer = tmp.length();\r\n }\r\n index++;\r\n }\r\n\r\n return answer;\r\n }", "public int lengthOfLongestSubstring(String s) {\n int[] chars = new int[128];\n\n int left = 0;\n int right = 0;\n\n int res = 0;\n while (right < s.length()) {\n char r = s.charAt(right);\n chars[r]++;\n\n while (chars[r] > 1) {\n char l = s.charAt(left);\n chars[l]--;\n left++;\n }\n\n res = Math.max(res, right - left + 1);\n\n right++;\n }\n return res;\n }", "public int lengthOfLongestSubstring(String s) {\n // Sanitization\n // Create a hashmap to save the character and the index\n // fast pointer - Move until it didn't find the duplicate\n // slow pointer - If the fast pointer pointed the duplicate, get that index and\n // place it next to it.\n\n if (s == null || s.length() == 0)\n return 0;\n int slowPointer = 0;\n int fastPointer = 0;\n int result = 0;\n HashMap<Character, Integer> map = new HashMap();\n while (fastPointer < s.length()) {\n char currentChar = s.charAt(fastPointer);\n if (map.containsKey(currentChar)) {\n int currentIndedx = map.get(currentChar);\n if (slowPointer <= currentIndedx) {\n slowPointer = currentIndedx + 1;\n }\n }\n int difference = fastPointer - slowPointer;\n result = Math.max(result, difference + 1);\n map.put(currentChar, fastPointer);\n fastPointer++;\n }\n return result;\n }", "public static long m35139a(String str) {\n try {\n File file = new File(Uri.parse(str).getPath());\n if (file.exists()) {\n return file.length();\n }\n return 0;\n } catch (Exception e) {\n return 0;\n }\n }", "public int lengthOfLongestSubstring(String s) {\n\t\tint n = s.length();\n\t\tint ans = 0;\n\t\tMap<Character, Integer> map = new HashMap<Character, Integer>();\n\t\tfor (int i = 0, j = 0; j < n; j++) {\n\t\t\tif (map.containsKey(s.charAt(j))) {\n\t\t\t\ti = Math.max(map.get(s.charAt(j)), i);\n\t\t\t}\n\t\t\tans = Math.max(ans, j - i + 1);\n\t\t\tmap.put(s.charAt(j), j + 1);\n\t\t}\n\t\treturn ans;\n\n\t}", "public int longestPath(TreeNode node) {\n if (node == null) {\n return 0;\n }\n // Get the max length from left and right\n int maxLeft = longestPath(node.left);\n int maxRight = longestPath(node.right);\n // Calculate the current max length\n int maxLeftSoFar = 0;\n int maxRightSoFar = 0;\n // Compare parent node with child node\n // If they are the same, extend the max length by one\n if (node.left != null && node.left.val == node.val) {\n maxLeftSoFar = maxLeft + 1;\n }\n if (node.right != null && node.right.val == node.val) {\n maxRightSoFar = maxRight + 1;\n }\n // Update the max with the sum of left and right length\n max = Math.max(max, maxLeftSoFar + maxRightSoFar);\n // Return the max from left and right to upper node\n // since only one side path is valid\n return Math.max(maxLeftSoFar, maxRightSoFar);\n }", "static int computeTheLongestSubstringWithMatchingParens(String string) {\n Deque<Integer> stack = new ArrayDeque<>();\n\n int length = 0;\n int endIndex = -1;\n\n for (int i = 0; i < string.length(); i++) {\n if (string.charAt(i) == '(') stack.push(i);\n else {\n if (stack.isEmpty()) {\n endIndex = i;\n } else {\n stack.pop();\n\n int start = stack.isEmpty() ? endIndex : stack.peek();\n length = Math.max(length, i - start);\n }\n }\n }\n\n return length;\n }", "public int lengthOfLongestSubstring(String s){\n\t\tif(s == null || s.length() == 0){\n\t\t\treturn 0;\n\t\t}\n\n\t\tchar[] ch = s.toCharArray();\n\t\tint[] map = new int[128];\n\t\tint start = 0, end = 0, count = 0, maxLen = 0;\n\n\t\twhile(end < s.length()){\n\t\t\t// If map[ch[end]] > 0, it means ch[end] is duplicated now.\n\t\t\tif(map[ch[end]] > 0){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tmap[ch[end]]++;\n\t\t\tend++;\n\n\t\t\t// deal with the duplicated cases\n\t\t\twhile(count > 0){\n\t\t\t\tif(map[ch[start]] > 1){\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tmap[ch[start]]--;\n\t\t\t\tstart++;\n\t\t\t}\n\n\t\t\tmaxLen = Math.max(maxLen, end - start);\n\t\t}\n\t\treturn maxLen;\n\t}", "public int lengthOfLongestSubstring(String s) {\n int len = s.length();\n HashMap map = new HashMap();\n int i = 0;\n for(; i<len; i++) {\n char c = s.charAt(i);\n // System.out.println(c);\n if (map.containsKey(c)) {\n return Math.max(i, lengthOfLongestSubstring(s.substring((int)map.get(c)+1, len)));\n }\n else {\n map.put(c, i);\n }\n }\n return i;\n }", "public int lengthOfLongestSubstring(String str) {\n \n if(str.compareTo(\"\") == 0)\n {\n \treturn 0;\n }\n \n if(str.length() == 1)\n {\n \treturn 1;\n }\n \t\t\n\t\tboolean charSet[] = new boolean[256];\n\t\tint begin = 0;\n\t\tint end = 0;\n\t\tint maxBegin = 0;\n\t\tint maxEnd = 0;\n\t\t\n\t\tfor(int i = 0; i < str.length(); i++)\n\t\t{\n\t\t\tint value = str.charAt(i);\n\t\t\tif(charSet[value])\n\t\t\t{\t\t\t\t\n\t\t\t\tfor(int j = begin; j <= end; j++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(str.charAt(j) == str.charAt(i))\n\t\t\t\t\t{\n\t\t\t\t\t\tbegin = j + 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcharSet[j] = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//begin = i;\n\t\t\t\tend = i;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcharSet[value] = true;\n\t\t\t\tend = i;\n\t\t\t}\n\t\t\t\n\t\t\tif((maxEnd - maxBegin + 1) < (end - begin + 1))\n\t\t\t{\n\t\t\t\tmaxBegin = begin;\n\t\t\t\tmaxEnd = end;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn (maxEnd - maxBegin + 1);\n\n }", "public int getPathLength();", "public int lengthOfLongestSubstring(String s)\n {\n\tif (s.length() < 2)\n\t return s.length();\n\n\tint max = 0, i = 0, j = 1;\n\n\tboolean[] cache = new boolean[128];\n\tcache[s.charAt(i) - ' '] = true;\n\n\twhile (i < s.length() && j < s.length())\n\t{\n\t while (cache[s.charAt(j)-' '])\n\t\t cache[s.charAt(i++)-' '] = false; \n\t cache[s.charAt(j++)-' '] = true;;\n\t max = Math.max(max, j - i);\n\t}\n\treturn max;\n }", "public int lengthOfLongestSubstring(String s) {\n HashMap<Character, Integer> charsVisit = new HashMap();\n int result = 0;\n int longest = 0;\n\n for (int i = 0; i < s.length(); i++) {\n\n if (charsVisit.containsKey(s.charAt(i))) {\n\n /* Start at repeat character to see if that is where the longest substring starts */\n i = charsVisit.get(s.charAt(i));\n\n charsVisit.clear(); // Clear hash map.\n result = 0;\n\n } else {\n result++;\n\n /* KEY/VALUE = char/index */\n charsVisit.put(s.charAt(i), i);\n }\n\n if (longest < result)\n longest = result;\n }\n return longest;\n }", "public int lengthOfLongestSubstring(String s) {\n if(s.length()<=1) return s.length();\n HashMap<Character,Integer> h=new HashMap<Character,Integer>();\n int curmax=0,max=0;\n for(int i=0;i<s.length();i++) {\n char c=s.charAt(i);\n if(h.containsKey(c)) { \n if(i-h.get(c)<curmax) { // previous is in the middle of curmax, then restart from the previous next char\n curmax=1; // otherwise previous is the start of curmax, then simply replace current with previous\n i=h.get(c)+1; \n c=s.charAt(i);\n h.clear();\n }\n }\n else {\n curmax++;\n }\n h.put(c,i);\n max=curmax>max?curmax:max;\n }\n return max;\n }", "public int lengthOfLongestSubstringE(String s)\n {\n\tif (s.length() < 2)\n\t return s.length();\n\n\tint max = 0, i = 0, j = 1;\n\n\tSet<Character> cache = new HashSet<Character>();\n\tcache.add(s.charAt(i));\n\n\twhile (i < s.length() && j < s.length())\n\t{\n\t while (cache.contains(s.charAt(j)))\n\t\tcache.remove(s.charAt(i++));\n\t cache.add(s.charAt(j++));\n\t max = Math.max(max, j - i);\n\t}\n\treturn max;\n }", "public int lengthOfLongestSubstring(String s) {\n int longest = 0;\n Set<Character> set = new HashSet<>();\n int i = 0, j = 0;\n while (j < s.length()) {\n if (set.contains(s.charAt(j))) {\n longest = getMax(set.size(), longest);\n set.remove(s.charAt(i));\n i++;\n } else {\n set.add(s.charAt(j));\n j++;\n }\n }\n return getMax(longest, set.size());\n }", "public int lengthOfLongestSubstring(String s) {\n\t\tint max=0;\n\t\tif (s == null )\n\t\t\treturn max;\n\n\t\tchar[] aChars = s.toCharArray();\n\t\tSet<Character> set=new HashSet<Character>();\n\t\tString slidingWindow =\"\";\n\t\tfor (int i = 0; i < aChars.length; i++) {\n\t\t\tset.add(aChars[i]);\n\t\t\tfor(int j=i+1;j<=aChars.length;j++) {\n\t\t\t\tslidingWindow = s.substring(i,j);\n\t\t\t\tif(j==aChars.length || set.contains(aChars[j])) {\n\t\t\t\t\tmax = max>slidingWindow.length()?max:slidingWindow.length();\n\t\t\t\t\tset.clear();\n\t\t\t\t\tbreak;\n\t\t\t\t}else {\n\t\t\t\t\tset.add(aChars[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max;\n\n\t}", "public int findLUSlength(String[] strs) { //O(n^2) time. O(1) space.\r\n\t\tif (strs.length == 0)\r\n\t\t\treturn 0;\r\n\t\tint max = -1;\r\n\t\tint i = 0;\r\n\t\t// Arrays.sort(strs, (a,b) -> b.length() - a.length());\r\n\t\tfor (int j = 0; j < strs.length; j++) {\r\n\t\t\tfor (i = 0; i < strs.length; i++) {\r\n\t\t\t\tif (j == i || !isSubsequence(strs[j], strs[i]))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (i == strs.length)\r\n\t\t\t\tmax = Math.max(strs[j].length(), max);\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "public static void main(String[] args) {\n String str = \"pwwkew\";\n// System.out.println(str.length());\n System.out.println(lengthOfLongestSubstring(str));\n\n\n }", "public int lengthOfLongestSubstring(String s) {\n HashMap<Character, Integer> hm = new HashMap<Character, Integer>();\n int counter = 0;\n int max = 0;\n char[] charArray = s.toCharArray();\n for (int i = 0; i < charArray.length; i++) {\n if (!hm.containsKey(charArray[i])) {\n hm.put(charArray[i], i);\n counter++;\n } else {\n max = (max > counter) ? max : counter;\n int index = hm.get(charArray[i]);\n for (int j = 0; j <= index; j++)\n hm.remove(charArray[j]);\n hm.put(charArray[i], i);\n counter = hm.size();\n }\n }\n max = (max > counter) ? max : counter;\n return max;\n }", "public abstract String getLongestRepeatedSubstring();", "public int lengthOfLongestSubstring(String s) {\n if(s.length() == 0) return 0;\r\n \r\n int windowEnd = 0;\r\n int windowStart = 0;\r\n int maxLen = 0;\r\n \r\n \r\n HashMap<Character, Integer> hm = new HashMap<>();\r\n \r\n for(windowEnd = 0;windowEnd < s.length(); windowEnd++){\r\n \r\n char ch = s.charAt(windowEnd);\r\n \r\n if(hm.containsKey(ch)){\r\n windowStart = Math.max(windowStart , hm.get(ch)+1);\r\n }\r\n \r\n hm.put(ch,windowEnd);\r\n maxLen = Math.max(maxLen, windowEnd-windowStart+1);\r\n }\r\n \r\n return maxLen; \r\n }", "public int lengthOfLongestSubstring2(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n int start=0;\n int max = 0;\n int[] map = new int[256];\n\n for (int i = 0; i < s.length(); i++) {\n int c = (int)s.charAt(i);\n start = Math.max(map[c], start);\n map[c] = i + 1;\n max = Math.max(max, i + 1 - start);\n }\n\n return max;\n }", "public static int lengthOfLongestSubstring(String s) \r\n {\r\n \tif (s.length()==0) \r\n \t\treturn 0;\r\n \t\r\n HashMap<Character, Integer> map = new HashMap<Character, Integer>();\r\n int length = 0;\r\n int start = 0;\r\n \r\n for (int end=0; end < s.length(); end++)\r\n {\r\n \t// When we have reached a repeated character, then the currently held string is potentially the largest string.\r\n \t// If the character is there in the map, start needs to be changed. \r\n \t// If it is not there, start remains the same so that it can increase the count\r\n if (map.containsKey(s.charAt(end)))\r\n {\r\n \t// Consider input as abba. For b[2], start < map.get(s.charAt(end)) + 1 \r\n \t// For b[3], start > map.get(s.charAt(end)) + 1. It means, if the character has occured towards the beginning, we dont want the start to be modified.\r\n \tstart = Math.max(start, map.get(s.charAt(end)) + 1);\r\n } \r\n \r\n map.put(s.charAt(end), end);\r\n \r\n // Why +1? Lets say start=2, end=5. Then the length will be 5-2=3. And, 3+1 = 4.\r\n length = Math.max(length, end-start+1);\r\n \r\n }\r\n return length;\r\n }", "public int lengthOfLongestSubstring2(String s) {\n int n = s.length(), ans = 0;\n int[] index = new int[128]; // current index of character\n // try to extend the range [i, j]\n for (int j = 0, i = 0; j < n; j++) {\n i = Math.max(index[s.charAt(j)], i);\n ans = Math.max(ans, j - i + 1);\n index[s.charAt(j)] = j + 1;\n }\n return ans;\n }", "public static int longestPath(int[] parent, String s) {\n int n = parent.length;\n\n Map<Integer, List<Integer>> graph = new HashMap<>();\n for (int i = 0; i < n; i++) {\n int father = parent[i];\n graph.computeIfAbsent(father, value -> new ArrayList<>()).add(i);\n }\n\n int ans = 0;\n for (int i = 0; i < n; i++) {\n ans = Math.max(ans, dfs(graph, i, s));\n }\n\n return ans;\n }", "public int lengthOfLongestSubstring(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n int n = s.length();\n\n int i=0, j=0, max=0;\n\n Set<Character> chars = new HashSet<>();\n while (i < n && j < n) {\n if (!chars.contains(s.charAt(j))) {\n chars.add(s.charAt(j));\n j++;\n max = Math.max(max, j - i);\n } else {\n chars.remove(s.charAt(i));\n i++;\n }\n }\n\n return max;\n }", "public static int lengthOfLongestSubstring(String s) {\n\t\tchar[] chars = s.toCharArray();\n\t\tint x = 0;\n\t\tint head = 0;\n\t\tHashMap<Character, Integer> map = new HashMap<Character, Integer>();\n\t\tfor (int i = 0; i < chars.length; i++) {\n\t\t\tif (!map.containsKey(chars[i])) {\n\t\t\t\tmap.put(chars[i], i);\n\t\t\t\tif (map.size() > x) {\n\t\t\t\t\tx = map.size();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (map.size() > x) {\n\t\t\t\t\tx = map.size();\n\t\t\t\t}\n\t\t\t\tint temp = map.get(chars[i]);\n\n\t\t\t\tfor (int j = head; j <= temp; j++) {\n\t\t\t\t\tmap.remove(chars[j]);\n\t\t\t\t}\n\t\t\t\thead = temp + 1;\n\t\t\t\tmap.put(chars[i], i);\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}", "public int lengthOfLongestSubstring(String s) {\n int l=s.length(),len=0,r=0;\n HashMap<Character,Integer> h=new HashMap<Character,Integer>();\n for(int i=0;i<l;) {\n char c=s.charAt(i);\n if(h.containsKey(c)) {\n i=h.get(c)+1; // we should restart and clear the hash map before the repeated c\n h.clear();\n len=0;\n }\n else {\n h.put(c,i);\n len++;\n r=Math.max(len,r);\n i++;\n }\n }\n return r;\n }", "public int longestPathInDiretion3dp(int[][] matrix) {\n int m = matrix.length, n = matrix[0].length;\n timeComplexityCount = 0;\n int[][] dp = new int[m][n+2];\n int max = 0;\n // initialize first line as 1\n for (int i = 0; i < n; i++) {\n if (matrix[0][i] == 0)\n dp[0][i+1] = 1;\n }\n for (int i = 0; i < m; i++) {\n int[] left = Arrays.copyOf(dp[i], n + 2), right = Arrays.copyOf(dp[i], n + 2);\n for (int j = 0; j < n; j++) {\n if (matrix[i][j] == 0)\n right[j+1] = Math.max(right[j+1], right[j] + 1);\n if (matrix[i][n-1-j] == 0)\n left[n-j] = Math.max(left[n-j], left[n-j+1] + 1);\n }\n for (int j = 0; j < n; j++) {\n dp[i][j + 1] = Math.max(left[j + 1], right[j + 1]);\n if (i < m - 1 && matrix[i+1][j] == 0)\n dp[i+1][j+1] = dp[i][j+1] + 1;\n else if (i == m - 1)\n max = Math.max(max, dp[i][j+1]);\n }\n }\n return max;\n }", "public int lengthOfLongestSubstring2(String s) {\n\n int res = 0;\n int len = s.length();\n Map<Character, Integer> map = new HashMap<Character, Integer>();\n\n for (int i = 0, j = 0; j < len; j++) {\n if (map.containsKey(s.charAt(j))) {\n i = Math.max(map.get(s.charAt(j)), i);// use Max mesas never looking back\n }\n res = Math.max(res, j - i + 1); // j not plus yet, need add 1 to get a real length ( indicate j itself)\n map.put(s.charAt(j), j + 1); // (j+1) means skip duplicate\n System.out.println(map.toString()); // will update the value of key ( union key)\n }\n\n\n return res;\n }", "public String longestPalindrome(String s) {\n String ans = \"\";\n int maxLen = 0;\n for (int i = 0; i < s.length(); i++) {\n int[] pair = expand(s, i, i);\n if (pair[1] - pair[0] + 1 > maxLen) {\n maxLen = pair[1] - pair[0] + 1;\n ans = s.substring(pair[0], pair[1] + 1);\n }\n pair = expand(s, i, i + 1);\n if (pair[1] - pair[0] + 1 > maxLen) {\n maxLen = pair[1] - pair[0] + 1;\n ans = s.substring(pair[0], pair[1] + 1);\n }\n }\n return ans;\n }", "public static int lengthOfLongestSubstring(String s) {\n int[] characters = new int[127];\n int longestSubstringLength = 0, subarrayStart = 0;\n \n for (int i = 0; i < s.length(); i++) {\n int characterValue = (int) s.charAt(i);\n if (characters[characterValue] != 0 && characters[characterValue] > subarrayStart) {\n subarrayStart = characters[characterValue];\n }\n\n characters[characterValue] = i + 1;\n\n int currentSubarrayLength = (i - subarrayStart) + 1;\n if (currentSubarrayLength > longestSubstringLength) {\n longestSubstringLength = currentSubarrayLength;\n }\n }\n \n return longestSubstringLength;\n }", "@Test\r\n public void testVeryVeryShortPath() {\r\n int[][] path =\r\n {{1}};\r\n assertEquals(1, RecursiveMethods.maxPathLength(path));\r\n }", "public int lengthOfLongestSubstring(String s) {\n\n int res = 0;\n int len = s.length();\n int i = 0, j = 0;\n Set<Character> set = new HashSet<>();\n while (i < len && j < len) {\n if (!set.contains(s.charAt(j))) {\n set.add(s.charAt(j++)); // here s.set an ele then j already plus\n res = Math.max(res, j - i); // so use j-i\n } else {\n set.remove(s.charAt(i++));\n }\n }\n\n return res;\n }", "@Test\r\n public void testVeryShortPath() {\r\n int[][] path =\r\n {{1, 0},\r\n {0, 0}};\r\n assertEquals(1, RecursiveMethods.maxPathLength(path));\r\n }", "public static String findLongestPalindromeSubstring(String s, int len){\n\n // variable to store max len palindromic substring\n // \"\" .. means string at start is empty\n String max_str= \"\",curr_str;\n\n // variable to store max len of palindromic substring\n // 0 means at start len is 0\n int max_len=0,curr_len;\n\n // now string can have length EVEN and ODD so\n // EVEN has two midpoint ans ODD has one midpoint\n //so we have to check both condition of even and odd\n\n\n //and now we have to take midpoint at every charachter\n //in string one by one and check palindromic substring\n // so loop will take one by one character from string and set it as midpoint\n for (int i=0; i < len; i++)\n {\n //find longest odd length palindrome str[i] as midpoint\n //as length is odd high and low pointer is at same position i(which is midpoint)\n // (s,i,i) bcoz same position pointer high and low at midpoint\n curr_str = expand(s,i,i);\n curr_len = curr_str.length();\n\n //update the substring and length of substring\n\n if ( curr_len > max_len ){\n\n max_len = curr_len;\n max_str = curr_str;\n }\n\n // now find even length longest palindrom Str[i] and str[i+1] as midpoint\n // as length is even there are two midpoint position of low and high at str[i] and str[i+1]\n //(s,i,i+1) bcoz two pos of two pointer high and low\n curr_str = expand(s,i,i+1);\n curr_len = curr_str.length();\n\n //update the substring and its length\n\n if (curr_len > max_len )\n {\n max_str = curr_str;\n max_len = curr_len;\n }\n }\n return max_str;\n }", "public String longestPalindrome(String s) {\n int start = 0;\n int end = 0;\n for (int i = 0; i < s.length(); i++) {\n int len1 = expand(s, i, i);\n int len2 = expand(s, i, i + 1);\n int len = Math.max(len1, len2);\n if (len > end - start) {\n start = i - (len - 1) / 2;\n end = i + len / 2;\n }\n }\n return s.substring(start, end + 1);\n }", "public static int lengthOfLongestSubstring2(String s) {\n if(s.length()==1)\n return 1;\n\n int sum = 0;\n\n Map<Character, Integer> map = new HashMap<>();\n int i=0;\n\n while(i<s.length()){\n char c = s.charAt(i);\n\n // map exists char c\n if(map.containsKey(c)){\n if(map.keySet().size() > sum) // replace sum\n sum = map.keySet().size();\n i = map.get(c);\n map = new HashMap<>(); // clear map\n }\n // map doesn't exist char c\n else\n map.put(c, i);\n i++;\n }\n\n if(map.keySet().size() > sum)\n return map.keySet().size();\n return sum;\n }", "@Test\n\tpublic void eg1() {\n\t\tString s=\"babad\";\n\t\tSystem.out.println(longestPalindromicSubString(s));\n\t\t\n\t}", "public static int maxRun(String str) {\n\t\tif(str.length() == 0) return 0;\n\t\tint max = 1, curLen = 1;\n\t\tchar lastChar = str.charAt(0);\n\t\tfor(int i = 1; i < str.length(); i++){\n\t\t\tif(str.charAt(i) == lastChar) {\n\t\t\t\tcurLen++;\n\t\t\t} else {\n\t\t\t\tlastChar = str.charAt(i);\n\t\t\t\tcurLen = 1;\n\t\t\t}\n\t\t\tif (curLen > max) max = curLen;\n\t\t}\n\t\treturn max;\n\t}", "public int lengthOfLongestSubstring1(String s) {\n\t\tint i = 0, j = 0, max = 0;\n\t\tSet<Character> set = new HashSet<>();\n\n\t\twhile (j < s.length()) {\n\t\t\tif (!set.contains(s.charAt(j))) {\n\t\t\t\tset.add(s.charAt(j++));\n\t\t\t\tmax = Math.max(max, set.size());\n\t\t\t} else {\n\t\t\t\tset.remove(s.charAt(i++));\n\t\t\t}\n\t\t}\n\n\t\treturn max;\n\t}", "public static void main(String[] args) {\n LongestUnivaluePath solution = new LongestUnivaluePath();\n // Example 1:\n //Input:\n //\n // 5\n // / \\\n // 4 5\n // / \\ \\\n // 1 1 5\n //Output: 2\n TreeNode root = new TreeNode(5);\n root.left = new TreeNode(4);\n root.left.left = new TreeNode(1);\n root.left.right = new TreeNode(1);\n root.right = new TreeNode(5);\n root.right.right = new TreeNode(5);\n System.out.println(solution.longestUnivaluePath(root));\n\n // Example 2:\n //Input:\n //\n // 1\n // / \\\n // 4 5\n // / \\ \\\n // 4 4 5\n //Output: 2\n root = new TreeNode(1);\n root.left = new TreeNode(4);\n root.left.left = new TreeNode(4);\n root.left.right = new TreeNode(4);\n root.right = new TreeNode(5);\n root.right.right = new TreeNode(5);\n System.out.println(solution.longestUnivaluePath(root));\n\n\n // 1\n // 2 2\n // 2 2 2\n // 2\n // output: 3\n root = new TreeNode(1);\n root.left = new TreeNode(2);\n root.left.left = new TreeNode(2);\n root.left.left.left = new TreeNode(2);\n root.left.right = new TreeNode(2);\n root.right = new TreeNode(2);\n root.right.right = new TreeNode(2);\n System.out.println(solution.longestUnivaluePath(root));\n\n // 1\n root = new TreeNode(1);\n System.out.println(solution.longestUnivaluePath(root));\n\n // empty\n root = new TreeNode(1);\n System.out.println(solution.longestUnivaluePath(null));\n\n\n // 1\n // 3 2\n // 3 2 2\n // 2 2\n // 2 2\n // 4 2\n // output: 4\n root = new TreeNode(1);\n root.left = new TreeNode(3);\n root.left.left = new TreeNode(3);\n root.left.left.left = new TreeNode(2);\n root.left.right = new TreeNode(2);\n root.left.right.right = new TreeNode(2);\n root.left.right.right.left = new TreeNode(2);\n root.left.right.right.left.left = new TreeNode(4);\n root.left.right.right.right = new TreeNode(2);\n root.left.right.right.right.right = new TreeNode(2);\n root.right = new TreeNode(2);\n root.right.right = new TreeNode(2);\n System.out.println(solution.longestUnivaluePath(root));\n\n //Input :\n // 2\n // / \\\n // 7 2\n // / \\ \\\n // 1 1 2\n //Output : 2\n root = new TreeNode(2);\n root.left = new TreeNode(7);\n root.left.left = new TreeNode(1);\n root.left.right = new TreeNode(1);\n root.right = new TreeNode(2);\n root.right.right = new TreeNode(2);\n System.out.println(solution.longestUnivaluePath(root));\n\n //\n //Input :\n // 4\n // / \\\n // 4 4\n // / \\ \\\n // 4 9 5\n //Output : 3\n root = new TreeNode(4);\n root.left = new TreeNode(4);\n root.left.left = new TreeNode(4);\n root.left.right = new TreeNode(9);\n root.right = new TreeNode(4);\n root.right.right = new TreeNode(5);\n System.out.println(solution.longestUnivaluePath(root));\n\n\n //\n //Input :\n // 4\n // / \\\n // 4 4\n // / \\ \\\n // 4 9 5\n // / \\\n // 5 5\n //Output : 3\n root = new TreeNode(4);\n root.left = new TreeNode(4);\n root.left.left = new TreeNode(4);\n root.left.right = new TreeNode(9);\n root.right = new TreeNode(4);\n root.right.right = new TreeNode(5);\n root.right.right.left = new TreeNode(5);\n root.right.right.right = new TreeNode(5);\n System.out.println(solution.longestUnivaluePath(root));\n }", "static int longestBalanced(String input) {\n final char[] chars = input.toCharArray();\n final int length = chars.length;\n final int[][] memo = new int[length][];\n // create a triangular array\n for (int i = 0; i < length; ++i) {\n final int[] row = new int[length - i];\n Arrays.fill(row, -1); // -1 stands for unknown; fill entire row\n row[0] = 0; // atomic, length 1 (delta 0), trivial non-balanced-seqs at every char\n memo[i] = row;\n }\n if (length % 2 == 1) { // longest can't be odd\n // so -- either left (skip last) or right (skip first)\n final int lft = longestBalanced(chars, 0, length - 2, memo);\n final int rgt = longestBalanced(chars, 1, length - 2, memo);\n return Math.max(lft, rgt);\n } else { // consider all chars\n return longestBalanced(chars, 0, length - 1, memo);\n }\n }", "public String longestPalindrome(String s) {\n // string to hold the current max\n String max = \"\";\n // deal with edge cases where it is either empty or one letter\n if(s.length() < 2){\n return s;\n }\n // go through each possible string\n for(int i = 0; i < s.length(); ++i){\n \n for(int j = i + 1; j <= s.length(); ++j){\n // if the reversed substring is equal, its a palindrome \n if(s.substring(i,j).equals(reverse(s.substring(i,j)))){\n // if it is greater than the current max's length, it is the new max\n if(s.substring(i,j).length() > max.length() ){\n max = s.substring(i,j);\n }\n }\n }\n }\n // give them back the max\n return max;\n }", "public int longestRod ();", "private static int longestPalindromicSubsequence(String str1) {\n\t\tStringBuilder str2 = new StringBuilder(str1);\n\t\tstr2.reverse().toString();\n\t\tString strtemp = str2.toString(); \n\t\treturn LCSDP(str1,strtemp,str1.length(),str1.length());\n\t}", "public static String longestSubSequence(String str1, int st1, String str2, int st2) {\n if ((st1 >= str1.length()) || (st2 >= str2.length()))\n return null;\n String subStr1 = str1.substring(st1, str1.length());\n String subStr2 = str2.substring(st2, str2.length());\n String lonSeq1 = null;\n String lonSeq2 = null;\n if (subStr1.length() == 1) {\n lonSeq1 = (str2.contains(subStr1)) ? subStr1 : null;\n } else {\n lonSeq1 = longestSubSequence(str1, st1 + 1, str2, st2);\n if ((lonSeq1 != null) && (!lonSeq1.isEmpty())) {\n String sub2 = str2.substring(0, str2.indexOf(lonSeq1.charAt(0)));\n if ((sub2 != null) && (!sub2.isEmpty())) {\n if (sub2.contains(String.valueOf(str1.charAt(st1)))) {\n lonSeq1 = str1.charAt(st1) + lonSeq1;\n }\n }\n }\n }\n if (subStr2.length() == 1) {\n lonSeq2 = (str1.contains(subStr2)) ? subStr2 : null;\n } else {\n // find longestSequence with str1 index increased\n lonSeq2 = longestSubSequence(str1, st1, str2, st2 + 1);\n if ((lonSeq2 != null) && (!lonSeq2.isEmpty())) {\n // find the index of longSeq2 in str1\n String sub1 = str1.substring(0, str1.indexOf(lonSeq2.charAt(0)));\n if ((sub1 != null) && (!sub1.isEmpty())) {\n if (sub1.contains(String.valueOf(str2.charAt(st2)))) {\n lonSeq2 = str2.charAt(st2) + lonSeq2;\n }\n }\n }\n\n }\n\n if ((lonSeq1 == null) || (lonSeq1.isEmpty())) return lonSeq2;\n if ((lonSeq2 == null) || (lonSeq2.isEmpty())) return lonSeq1;\n return (lonSeq1.length() > lonSeq2.length()) ? lonSeq1 : lonSeq2;\n }", "public static String longestPalindrome(String str) {\n\t\tString longest = \"\";\n\t\tfor(int i=0; i<str.length()-1; i++) {\n\t\t\tString s1 = expandAroundCenter(str, i, i); // Expand around a character\n\t\t\tif(s1.length() > longest.length()) {\n\t\t\t\tlongest = s1;\n\t\t\t}\n\n\t\t\tString s2 = expandAroundCenter(str, i, i+1); // Expand between two characters\n\t\t\tif(s2.length() > longest.length()) {\n\t\t\t\tlongest = s2;\n\t\t\t}\n\t\t}\n\n\t\treturn longest;\n\t}", "public int externalPath(MyTreeNode n){\n MyTreeNode backup = n;\r\n if (n == null){\r\n return 0;\r\n }\r\n int lpath = 0;\r\n while (n != null){\r\n lpath++;\r\n n = n.leftChild;\r\n }\r\n int rpath = 0;\r\n while (backup != null){\r\n rpath++;\r\n backup = backup.leftChild;\r\n }\r\n return Math.max(lpath, rpath); //return the longest path\r\n }", "public int lengthOfLongestSubstring(String s) {\n int i = 0, j = 0, max = 0;\n Set<Character> set = new HashSet<>();\n \n while (j < s.length()) {\n if (!set.contains(s.charAt(j))) {\n set.add(s.charAt(j++));\n max = Math.max(max, set.size());\n } else {\n set.remove(s.charAt(i++));\n }\n }\n \n return max;\n}", "public int longestValidParentheses(String s) {\n\t\tint max_len = 0, last = -1; \n\t\t// keep track of the positions of non-matching '('s\n\t\tStack<Integer> lefts = new Stack<Integer>(); \n\t\tfor (int i = 0; i < s.length(); ++i) {\n\t\t\tif (s.charAt(i) == '(') {\n\t\t\t\tlefts.push(i);\n\t\t\t} else {\n\t\t\t\tif (lefts.empty()) {\n\t\t\t\t\t// no matching left\n\t\t\t\t\tlast = i;\n\t\t\t\t} else {\n\t\t\t\t\t// find a matching pair\n\t\t\t\t\tlefts.pop();\n\t\t\t\t\tif (lefts.empty()) {\n\t\t\t\t\t\tmax_len = Math.max(max_len, i - last);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmax_len = Math.max(max_len, i - lefts.peek());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max_len;\n\t}", "public int lastIndexOf(String str)\n\t{\n\t\tint indexOf = recursiveLastIndexOf(firstC, length, 0, -1, str);\n\t\treturn indexOf;\n\t}", "public int longestPathInDiretion3dfs(int[][] matrix) {\n int m = matrix.length, n = matrix[0].length;\n maxI = 0;\n timeComplexityCount = 0;\n dp = new int[m][n][3];\n int max = 0;\n for (int i = 0; i < n; i++) {\n if (matrix[0][i] == 0)\n for (int d = 0; d < 3; d++) {\n max = Math.max(max, dfs(matrix, 0, i, d));\n }\n }\n logger.info(\"node visited count: {}; total {} nodes\", timeComplexityCount, m * n);\n return maxI == m - 1 ? max : 0;\n }", "public static String getLongestSubSeq(String s1, String s2) {\n if (s1 == null || s2 == null) {\n return null;\n }\n Set<String> set1 = getAllSubSeq(s1);\n Set<String> set2 = getAllSubSeq(s2);\n if (set1 == null || set2 == null || set1.size() == 0 || set2.size() == 0) {\n return null;\n }\n\n String longest = \"\";\n for (String s : set1) {\n if (s.length() > longest.length() && set2.contains(s)) {\n longest = s;\n }\n }\n\n return longest.length() > 0 ? longest : null;\n }", "public int longestUnivaluePath(TreeNode root) {\n int[] longest = {0};\n longestUnivaluePath(root, longest);\n return longest[0] ;\n }", "static int longestSubsequence(String x, String y) {\n char[] strX = x.toCharArray();\n char[] strY = y.toCharArray();\n\n Map<Character, Integer> xMap = new HashMap<>();\n Map<Character, Integer> yMap = new HashMap<>();\n\n for (int i = 0; i < strX.length; i++) {\n char c = strX[i];\n if (xMap.containsKey(c)) {\n xMap.put(c, xMap.get(c) + 1);\n } else {\n xMap.put(c, 1);\n }\n }\n\n for (int i = 0; i < strY.length; i++) {\n char c = strY[i];\n if (yMap.containsKey(c)) {\n yMap.put(c, yMap.get(c) + 1);\n } else {\n yMap.put(c, 1);\n }\n }\n\n System.out.println(xMap);\n System.out.println(yMap);\n\n ArrayList<Character> subsequence = new ArrayList<>();\n\n // first find match subsequence\n for (Character c : yMap.keySet()) {\n if (!xMap.containsKey(c)) {\n continue;\n }\n\n int xCount = xMap.get(c);\n int yCount = yMap.get(c);\n int charCount = xCount < yCount ? xCount : yCount;\n\n for (int i = 0; i < charCount; i++) {\n subsequence.add(c);\n }\n }\n\n System.out.println(\"may be seq\" + subsequence);\n\n int max = 0;\n for (int i = 0; i < subsequence.size(); i++) {\n char c = subsequence.get(i);\n ArrayList<Character> remains = new ArrayList<>(subsequence);\n remains.remove(i);\n StringBuilder curr = new StringBuilder();\n curr.append(c);\n// System.out.println(\"max\" + max);\n int result = findPermutation(y, curr, remains, max);\n if (result > max) {\n max = result;\n }\n }\n\n // find matching permutation\n\n System.out.println(\"result\" + max);\n // then find sub string\n return max;\n }", "public static void main(String[] args) {\n\t\tString A = \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\";\r\n\t\tLongestSubString longestSubString = new LongestSubString();\r\n\t\tint lengthOfLongestSubstring = longestSubString.lengthOfLongestSubstring(A);\r\n\t\tSystem.out.println(lengthOfLongestSubstring);\r\n\r\n\t}", "public static int lengthOfLongestSubstring(String s) {\n\t int i = 0, j = 0, max = 0;\n\t Set<Character> set = new HashSet<>();\n\t while (j < s.length()) {\n\t \tSystem.out.println(j);\n\t \tSystem.out.println(set);\n\t \t// if set doesnot contain a character in string - add it to set\n\t if (!set.contains(s.charAt(j))) {\n\t set.add(s.charAt(j));\n\t j++;\n\t max = Math.max(max, set.size());\n\t } else {\n\t set.remove(s.charAt(i++));\n\t }\n\t }\n\t \n\t return max;\n\t}", "@Test\r\n public void testSimplePath() {\r\n int[][] path =\r\n {{1, 1, 0, 0, 0, 0},\r\n {0, 1, 1, 0, 0, 0},\r\n {0, 0, 1, 1, 0, 0},\r\n {0, 0, 0, 1, 1, 0},\r\n {0, 0, 0, 0, 1, 1}};\r\n assertEquals(10, RecursiveMethods.maxPathLength(path));\r\n }", "public static String longestRepeatedSubstring(String s){\r\n int N = s.length();\r\n String[] suffixes = new String[N];\r\n \r\n for (int i = 0; i < N; i++)\r\n suffixes[i] = s.substring(i, N);\r\n \r\n /* bring subffixes with common prefix together. */\r\n Arrays.sort(suffixes);\r\n \r\n /* compare the adjacent suffixes. */\r\n String longest = \"\";\r\n for (int i = 0; i < suffixes.length - 1; i++){\r\n String common = longestCommonPrefix(suffixes[i], suffixes[i+1]);\r\n if (common.length() > longest.length())\r\n longest = common;\r\n }\r\n \r\n return longest;\r\n }", "private static void longestRepeatingSubsequence(String string) {\n\t\t\n\t}", "public static int lengthOfLongestSubstringUsingSet(String s) {\n\t\tif (s == null || s.length() == 0)\n\t\t\treturn 0;\n\n\t\tint n = s.length();\n\t\tSet<Character> set = new HashSet<>();\n\t\tint ans = 0, start = 0, end = 0;\n\t\twhile (start <= end && end < n) {\n\t\t\t// try to extend the range [i, j]\n\t\t\tif (!set.contains(s.charAt(end))) {\n\t\t\t\tset.add(s.charAt(end));\n\t\t\t\tend++;\n\n\t\t\t\tans = Math.max(ans, end - start); // Update ans\n\t\t\t} else {\n\t\t\t\tset.remove(s.charAt(start++));\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}", "public int getPathLength()\r\n\t{\r\n\t\treturn path.size();\r\n\t}", "public int longestValidParentheses(String s) {\n \tint a[] = new int[s.length()];\n \tint last = -1;\n \tint max = 0;\n \tfor(int i = 0 ; i < s.length() ; i++){\n \t\tif(s.charAt(i) == '('){\n \t\t\ta[i] = last;\n \t\t\tlast = i;\n \t\t}\n \t\telse{\n \t\t\ta[i] = last;\n \t\t\tif(last != -1){\n \t\t\t\tint len = i - last + 1;\n \t\t\t\tint temp = last - 1;\n \t\t\t\twhile(temp >= 0 && s.charAt(temp) == ')' && a[temp] >=0){\n \t\t\t\t\tlen += temp - a[temp] + 1;\n \t\t\t\t\ttemp = a[temp]-1;\n \t\t\t\t}\n \t\t\t\tif(len> max){ \t\t\t\t\t\n \t\t\t\t\tmax = len;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(last >= 0)\n \t\t\t\tlast = a[last];\n \t\t\telse\n \t\t\t\tlast = -1;\n \t\t}\n \t}\n\n \treturn max;\n }", "public abstract void createLongestRepeatedSubstring();", "public static String lrs(String s) {\n\n // form the N suffixes\n int N = s.length();\n String[] suffixes = new String[N];\n for (int i = 0; i < N; i++) {\n suffixes[i] = s.substring(i, N);\n }\n\n // sort them\n Arrays.sort(suffixes);\n\n // find longest repeated substring by comparing adjacent sorted suffixes\n String lrs = \"\";\n for (int i = 0; i < N - 1; i++) {\n String x = lcp(suffixes[i], suffixes[i+1]);\n if (x.length() > lrs.length())\n lrs = x;\n }\n return lrs;\n }", "public int longestPalindromeSubseq(String s) {\n return lps(s, 0, s.length() - 1);\n }", "private static String longestPalindrome (String s) {\n\n if (s.length() == 1) {\n return s;\n }\n String returnString = \"\";\n for (int mid = 1; mid < s.length() * 2 - 1; mid++) {\n int i, j;\n if (mid % 2 == 0) {\n i = (mid / 2) - 1;\n j = (mid / 2);\n int currentSize = 2;\n while (i >= 0 && j < s.length() && s.charAt(i) == s.charAt(j)) {\n i--;\n j++;\n currentSize += 2;\n }\n if (currentSize - 2 > returnString.length()) {\n returnString = s.substring(i+1, j);\n }\n } else {\n i = j = mid / 2;\n int currentSize = 1;\n while (i >= 0 && j < s.length() && s.charAt(i) == s.charAt(j)) {\n i--;\n j++;\n currentSize += 2;\n }\n if (currentSize - 2 > returnString.length()) {\n returnString = s.substring(i+1, j);\n }\n }\n }\n return returnString;\n }", "public static void main(String [] args){\n System.out.println(lengthOfLongestSubstring(\"1a1b1c1d1\"));\n System.out.println(lengthOfLongestSubstring1(\"1a1b1c1d1\"));\n\n System.out.println(17/10);\n }", "public int longestPalindromeSubseqV2(String s) {\n int n = s.length();\n Integer[][] memo = new Integer[n][n];\n return helper(s, memo, 0, n - 1);\n }", "public static int longestPalindromeDP(String str) {\n\t\tint n = str.length();\n\n\t\t// Memo[i][j] where i is the starting character, j is the last character\n\t\tboolean memo[][] = new boolean[n][n];\n\t\tint maxLength = 1;\n\t\tint start = 0;\n\t\tint end = 0;\n\n\t\t// One character is considered a palindrome\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tmemo[i][i] = true;\n\t\t}\n\n\t\t// Checking if two consecutives characters are palindrome\n\t\tfor(int i=0; i<n-1; i++) {\n\t\t\tif(str.charAt(i) == str.charAt(i+1)) {\n\t\t\t\tmemo[i][i+1] = true;\n\t\t\t\tmaxLength = 2;\n\t\t\t\tstart = i;\n\t\t\t\tend = i+1;\n\t\t\t}\n\t\t}\n\n\t\t// If a palindrome is surrounded by two same characters then it is a palindrome\n\t\tfor(int l=2; l<n; l++) { // Length of substring\n\t\t\tfor(int i=0; i<n-l; i++) { // Check all substrings of length l\n\t\t\t\tif(memo[i+1][l-1+i] && str.charAt(i) == str.charAt(l+i)) {\n\t\t\t\t\tmemo[i][l+i] = true;\n\t\t\t\t\tmaxLength = l+1;\n\t\t\t\t\tstart = i;\n\t\t\t\t\tend = l+i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(str.substring(start, end+1));\n\t\treturn maxLength;\n\t}", "private static int getLongestSemiAlternatingSubString(String s) {\n int max = 0, count = 1, len = s.length(), p1 = 0;\n for (int p2 = 1; p2 < len; p2++) {\n if (s.charAt(p2 - 1) == s.charAt(p2)) {\n count++;\n } else {\n count = 1;\n }\n if (count < 3) {\n max = Math.max(max, p2 - p1 + 1);\n } else {\n p1 = p2 - 1;\n count = 2;\n }\n }\n return max;\n }", "public static int getMaxSubstr(String str, int k) {\n int[] freqArr = new int[256];\n int uniqCount = 0;\n\n int cStart = 0;\n int cEnd = 0;\n\n int resStart = -1;\n int resLen = -1;\n\n for(int i = 0; i < str.length(); i++) {\n int ch = str.charAt(i);\n\n if(freqArr[ch] == 0) {\n uniqCount++;\n }\n\n freqArr[ch]++;\n cEnd++;\n\n while(uniqCount > k) {\n cStart++;\n int c = str.charAt(cStart);\n\n if(freqArr[c] == 1) {\n uniqCount--;\n }\n\n freqArr[c]--;\n }\n\n\n if(uniqCount == k && (cEnd - cStart > resLen) ) {\n resLen = cEnd - cStart;\n resStart = cStart;\n }\n\n }\n\n //print \"resLen\" characters starting from \"resStart\"\n for(int i = resStart; i < resStart + resLen; i++) {\n System.out.print(str.charAt(i));\n }\n\n\n //returning the length\n return resLen;\n }", "public static String longestSubstringLength(String X, String Y){\n int[][] L = new int[X.length()][Y.length()];\n // stores the length of the longest substring\n int max = 0;\n // stores the last index of the longest common substring\n int lastIndex = 0;\n // outer loop checks for every character of first string\n for(int i = 0; i < X.length(); i++){\n // inner loop checks for every character of second string\n for(int j =0; j < Y.length(); j++){\n // when character matches\n if(X.charAt(i) == Y.charAt(j)){\n // check if it is the first row or column\n if(i == 0 || j == 0){\n L[i][j] = 1;\n }else{\n // use earlier calculated longest length and add one\n L[i][j] = L[i - 1][j - 1] + 1;\n // check which is greater\n if(L[i][j] > max){\n // store length of the longest substring\n max = L[i][j];\n // index of the last character of the common substring\n lastIndex = i;\n }\n }\n }\n // when characters do not match\n else{\n // assign length as 0\n L[i][j] = 0;\n }\n }\n }\n // extract substring which will be the longest\n String longSubstring = X.substring(lastIndex - max + 1, lastIndex + 1);\n return longSubstring;\n }", "public int maxLength(List<String> arr) {\n\n List<String> results = new ArrayList<>();\n\n results.add(\"\");\n\n for (String word : arr) {\n if (!isValid(word)) continue;\n\n List<String> tempResults = new ArrayList<>();\n for (String result : results) {\n String candidate = result + word;\n if (isValid(candidate)) tempResults.add(candidate);\n }\n results.addAll(tempResults);\n }\n\n String result = results.stream().max(Comparator.comparingInt(String::length)).orElse(\"\");\n\n return result.length();\n }", "public int lengthOfLSS(String s){\n HashMap<Character, Integer> m = new HashMap<>();\n int ans = 0;\n \n for(int i=0, j=0; j<s.length(); j++){\n if(m.containsKey(s.charAt(j))){\n i = Math.max(m.get(s.charAt(j)),i);\n }\n ans = Math.max(j-i+1,ans);\n m.put(s.charAt(j),j+1);\n }\n\n return ans;\n }", "long getFileLength(String path) throws IOException;", "public static int strDist(final String str, final String sub) {\n\t\tfinal int subLength = sub.length();\n\t final int firstOccurrence = str.indexOf(sub);\n\t if (firstOccurrence < 0) {\n\t return 0;\n\t }\n\t final int nextOccurrence = str.indexOf(sub, firstOccurrence + subLength);\n\t if (nextOccurrence < 0) {\n\t return 0;\n\t }\n\t int head = firstOccurrence;\n\t int tail = nextOccurrence + subLength;\n\t \n\t final int currentLength = tail - head;\n\t final int largestLength = strDist(str.substring(firstOccurrence + subLength), sub);\n\n\t return Math.max(largestLength, currentLength);\n\t}", "public int longestValidParenthesis(String s) {\n int maxLength = 0, end = -1;\n Deque<Integer> leftParenthesis = new LinkedList<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == '(') {\n leftParenthesis.addFirst(i);\n } else if (leftParenthesis.isEmpty()) {\n end = i;\n } else {\n leftParenthesis.removeFirst();\n int start = leftParenthesis.isEmpty() ? end : leftParenthesis.peekFirst();\n maxLength = Math.max(maxLength, i - start);\n }\n }\n return maxLength;\n }", "private int longestCanonicalPrefixLength()\n\t{\n\t\tAffix currLong; //= this.longestCanonicalPrefix();\n\n\t\tint length;\n\n\t\tif( prefixes.size() < 1 ) {\n\t\t\tlength = 0;\n\t\t} else {\n\t\t\tcurrLong = this.longestCanonicalPrefix();\n\t\t\tlength = currLong.getAffix().length();\n\t\t}\n\n\t\treturn length;\n\t}", "@Test\r\n public void testNonExistentPath() {\r\n int[][] path =\r\n {{0, 0, 0, 0, 0, 0},\r\n {0, 0, 0, 0, 0, 0},\r\n {0, 0, 0, 0, 0, 0},\r\n {0, 0, 0, 0, 0, 0},\r\n {0, 0, 0, 0, 0, 0}};\r\n assertEquals(0, RecursiveMethods.maxPathLength(path));\r\n }", "public static void main(String[] args){\n\t\tLongestSubString obj = new LongestSubString();\n\t\t//System.out.println(obj.lengthOfLongestSubString(\"sandeep\"));\n\t\tSystem.out.println(obj.lengthOfLongestSubString(\"anday\"));\n\t}", "public int minDeletionsToObtainStringInRightFormat3(String s) {\n // Go through the string, count the number of B at left side and the number of A at right side.\n // Then, find the minimum sum of left B and right A at each position.\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n int n = s.length();\n int[] left = new int[n]; // number of B from left\n int[] right = new int[n]; // number of A from right\n left[0] = s.charAt(0) == 'B' ? 1 : 0;\n for (int i = 1; i < n; i++) {\n left[i] = left[i - 1];\n if (s.charAt(i) == 'B') {\n left[i]++;\n }\n\n }\n\n right[n - 1] = s.charAt(n - 1) == 'A' ? 1 : 0;\n for (int i = n - 2; i >= 0; i--) {\n right[i] = right[i + 1];\n if (s.charAt(i) == 'A') {\n right[i]++;\n }\n }\n\n int min = n;\n for (int i = 0; i < n; i++) {\n int count = 0;\n if (i == 0) {\n count = right[i + 1];\n } else if (i == n - 1) {\n count = left[i - 1];\n } else {\n count = left[i - 1] + right[i + 1];\n }\n min = Math.min(min, count);\n }\n\n return min;\n }", "public String findLongestWord(String s, List<String> d) {\n \n String ret = \"\";\n for(String str : d) {\n int j = 0;\n for(int i=0;i<s.length() && j <str.length(); i++) {\n if(str.charAt(j) == s.charAt(i)) {\n j++;\n }\n }\n \n if(j == str.length()) {\n if(ret.length() < j || (ret.length() == j && ret.compareTo(str) > 0)) {\n ret = str;\n }\n }\n }\n \n return ret;\n }", "public static int longestStringWithNoRepeatingChars(String str) {\n\t\tif (str == null || str.length() == 0)\n\t\t\treturn 0;\n\n\t\tint ans = 0;\n\n\t\t// Map of character and index at which it was seen last\n\n\t\tint start = 0;\n\n\t\tint[] charFrequencyMap = new int[MAX_CHARS];\n\t\tArrays.fill(charFrequencyMap, -1);\n\n\t\tfor (int end = 0; end < str.length(); end++) {\n\t\t\tchar rightChar = str.charAt(end);\n\n\t\t\t// If this char of right was seen before, i.e its repeating\n\t\t\tif (charFrequencyMap[rightChar] != -1) {\n\t\t\t\t// +1 to ignore instance of right char last seen\n\t\t\t\tstart = Math.max(start, charFrequencyMap[rightChar]) + 1;\n\t\t\t}\n\n\t\t\tcharFrequencyMap[rightChar] = end; // Save indices of chars last\n\t\t\t\t\t\t\t\t\t\t\t\t// seen at\n\n\t\t\tans = Math.max(ans, end - start + 1);\n\t\t}\n\t\treturn ans;\n\t}", "public String longestPalindrome(String s) {\n if(s.length() < 2) return s;\n\n for(int i = 0; i < s.length(); i++){\n isValidPalindrome(s, i, i);\n isValidPalindrome(s, i, i + 1);\n }\n return s.substring(start, maxLen + start);\n }", "public static int longestRepeatingSubstringUsingSuffixArray(String s) {\n\t\tint n = s.length();\n\t\tSuffixArray sa = new SuffixArray(s);\n\t\tint ans = 0;\n\t\tfor(int i = 1 ; i < n ; i++) {\n\t\t\tint len = sa.lcp(i);\n\t\t\tans = Math.max(ans, len);\n\t\t}\n\t\treturn ans;\n\t}", "public static String longestSubsequence(String givenWord, String words[]){\n LinkedList<String> subSeqList = findSubsequence(givenWord, words);\n String longestSeq = \"\";\n for(String word : subSeqList){\n if(longestSeq.length() < word.length()){\n longestSeq = word;\n\n }\n }\n return longestSeq;\n }", "public static int longestCommonSubsequenceLength(String s1, String s2)\n {\n return longestCommonSubsequenceLength(s1.toCharArray(), s2.toCharArray(), s1.length(), s2.length());\n }", "static Group<String, Integer, Integer> longestByteStrand(String file1, String file2) {\n try {\n // create a reader\n FileInputStream reader1 = new FileInputStream(new File(file1));\n FileInputStream reader2 = new FileInputStream(new File(file2));\n\n int currentBeginning = 0;\n int longestOffset = 0;\n int current = 0;\n int currentLength = 0;\n int longestLength = 0;\n\n String longestString = \"\";\n String currentString = \"\";\n\n int ch1_1;\n int ch1_2;\n int ch2_1;\n int ch2_2;\n while ((ch1_1 = reader1.read()) != -1) {\n ch1_2 = reader1.read();\n String b1 = Integer.toBinaryString(ch1_1) + Integer.toBinaryString(ch1_2);\n ch2_1 = reader2.read();\n ch2_2 = reader2.read();\n String b2 = Integer.toBinaryString(ch2_1) + Integer.toBinaryString(ch2_2);\n current += 1;\n if (b1.equals(b2)) {\n currentString += b1;\n currentLength += 1;\n } else {\n if (currentLength > longestLength) {\n longestOffset = currentBeginning;\n longestLength = currentLength;\n longestString = currentString;\n }\n currentBeginning = current;\n currentLength = 0;\n }\n\n }\n if (currentLength > longestLength) {\n longestOffset = currentBeginning;\n longestLength = currentLength;\n longestString = currentString;\n }\n\n // close the reader\n reader1.close();\n reader2.close();\n return new Group(longestString,longestOffset,longestLength);\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n\n return null;\n }", "public static int longestValidParentheses_best(String s) {\n if (s == null || s.length() <= 1) {\n return 0;\n }\n\n int len = s.length();\n int max = 0;\n int left = 0;\n int right = 0;\n for (int i = 0; i < len; i++) {\n if (s.charAt(i) == '(') {\n left++;\n } else {\n right++;\n }\n\n if (left == right) {\n max = Math.max(max, 2 * left);\n } else if (right > left) {\n left = right = 0;\n }\n }\n\n left = right = 0;\n for (int i = len - 1; i >= 0; i--) {\n if (s.charAt(i) == '(') {\n left++;\n } else {\n right++;\n }\n\n if (left == right) {\n max = Math.max(max, 2 * right);\n } else if (left > right) {\n left = right = 0;\n }\n }\n\n return max;\n }" ]
[ "0.6208289", "0.6126675", "0.61094856", "0.6094579", "0.60658544", "0.59970576", "0.5989202", "0.5956617", "0.5948199", "0.5927468", "0.5902452", "0.5894839", "0.58698136", "0.5849941", "0.5847816", "0.58345884", "0.58278716", "0.5816346", "0.5795594", "0.578284", "0.5777555", "0.5777427", "0.5760822", "0.5756815", "0.5755416", "0.57442355", "0.57180446", "0.57159454", "0.5711458", "0.5706732", "0.57032746", "0.570079", "0.56798315", "0.5678859", "0.5675948", "0.5666934", "0.56600916", "0.56592613", "0.56351155", "0.55787295", "0.55749124", "0.55207986", "0.55154234", "0.5506851", "0.5505447", "0.5497755", "0.545991", "0.5458354", "0.5438351", "0.54279846", "0.54039335", "0.53871524", "0.53843343", "0.5376316", "0.535101", "0.5346024", "0.5339651", "0.5330332", "0.53222346", "0.53196627", "0.531905", "0.5310081", "0.52968854", "0.52888775", "0.52858466", "0.5251845", "0.5248471", "0.5247367", "0.52428776", "0.5197236", "0.51950216", "0.5192148", "0.51910573", "0.51861036", "0.5182828", "0.5169409", "0.51646423", "0.5146245", "0.51395744", "0.5133887", "0.51334226", "0.51266146", "0.511184", "0.5106344", "0.50988466", "0.50969255", "0.5093762", "0.5089162", "0.50859267", "0.5069369", "0.5069187", "0.5057352", "0.50461376", "0.5045005", "0.5038921", "0.5034285", "0.50342524", "0.50145566", "0.5007808", "0.49975494", "0.49970677" ]
0.0
-1
Created by tothzs on 2017.11.13.. CRUD Methods for Car obejcts
public interface CarDAO { /** * * @return all car object in the database. */ Collection<Car> readCars(); /** * * @param producer selected producer * @return return all car of the selected producer */ Collection<Car> readCars(CarProducer producer); /** * Read a single car based on the plate number. * @param plateNo selected plate number * @return a car object. It should not return with null. * @throws CarNotFoundException if no car record is found in the database */ Car readCar(String plateNo) throws CarNotFoundException; /** * Record car * @param car car which will be recorded * @throws CarRecordAlreadyExistsException if there is a car with the given plate number in the system. */ void createCar(Car car) throws CarRecordAlreadyExistsException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Car getCarById(Integer id){\n\n return this.carCrudInterface.getById(id);\n\n }", "public Car saveCar(Car car) {\r\n return repository.save(car);\r\n }", "public List<Car>getAllCars(){\r\n return (List<Car>) repository.findAll();\r\n }", "@Dao\npublic interface CarDao {\n\n @Query(\"SELECT * FROM car\")\n List<Car> getAll();\n\n @Insert\n void insertAll(Car... cars);\n\n @Delete\n void delete(Car car);\n\n @Update\n void update(Car... cars);\n\n @Query(\"SELECT * FROM car WHERE chassisCode = :chassisCode\")\n Car findByChassisCode(String chassisCode);\n}", "public abstract CarTO findCarById(Long id);", "public interface CarService {\n LsResponse add(Car car,String endTime,Associator associator);\n LsResponse update(Car car);\n\n LsResponse getCarList(Associator associator,Integer pageNum,Integer pageSize,String endTime);\n\n LsResponse removeAll(Associator associator);\n\n LsResponse deleteCar(List<Car> cars, Associator associator,Integer time);\n\n LsResponse seeCarOrder(List<Car> cars);\n\n List<List<Car>> getCarsByType(List<Car> cares, Canteen canteen);\n}", "public Car findCarByName(String name){\r\n return repository.findCarByName(name);\r\n }", "@PostMapping(\"/cars/{id}\")\n// public String saveCar(@PathVariable int id, @ModelAttribute(\"updateDto\") CarUpdateDto dto, Model model) {\n public ModelAndView saveCar(@PathVariable int id, @ModelAttribute(\"updateDto\") CarUpdateDto dto, Model model) {\n\n var car = repo.getCar(id);\n\n if(car == null && id != 0) {\n throw new IllegalArgumentException(\"Item with such id not found\");\n }\n\n if(id == 0) {\n car = new Car();\n car.setId(0);\n }\n\n // make field validation\n\n car.setNumber(dto.getNumber());\n car.setVinNumber(dto.getVinNumber());\n\n var owner = repo.getOwner(dto.getOwnerId());\n car.setOwner(owner);\n\n if(id != 0) {\n repo.save(car);\n } else {\n repo.addCar(car);\n }\n\n// model.addAttribute(\"title\", car != null ? car.getNumber() : \"\");\n// model.addAttribute(\"car\", car);\n// model.addAttribute(\"id\", id);\n//\n// return \"cars_edit\";\n\n return new ModelAndView(\"redirect:/cars\");\n }", "@Test\n void getAllCarsSuccess() {\n List<Car> cars = carDao.getAll();\n assertNotNull(cars);\n assertEquals(1, cars.size());\n }", "public abstract List<CarTO> findCarByModel(String model);", "public void carDetails() {\n\t\t\r\n\t}", "@Override\n\tpublic ArrayList<Carpo> getAllCars() {\n\t\treturn inList.getAll();\n\t}", "@Transactional\r\n\tpublic List<Car> getAllCars() {\n\t\treturn (List<Car>)cr.findAll();\r\n\t}", "public CarEdition() {\n ELContext context = FacesContext.getCurrentInstance().getELContext();\n app = (CarsaleApplication) FacesContext.getCurrentInstance().getApplication().getELResolver().getValue(context, null, \"carsaleApplication\");\n try {\n this.carId = Integer.valueOf(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"carId\"));\n this.car = searchCar(this.carId);\n } catch (Exception ex) {\n Logger.getLogger(CarDetail.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public interface CarRepository extends CrudRepository<CarDO, Long> {\n\n List<CarDO> findByDeletedFalse();\n\n List<CarDO> findByEngineType(EngineType engineType);\n}", "public void add (Car car){\n\t\t}", "public abstract List<CarTO> listAll();", "@GetMapping(\"/api/rents/findbycar/{id}\")\r\n public ResponseEntity<List<Rent>> findByCar(@PathVariable(name = \"id\") Long id){\r\n final List<Rent> rent = rentService.findByCarId(id);\r\n return rent != null\r\n ? new ResponseEntity<>(rent, HttpStatus.OK)\r\n : new ResponseEntity<>(HttpStatus.NOT_FOUND);\r\n }", "@Test\n\tpublic void testFindAllCars() {\n\t\tSystem.out.println(\"findAllCars\");\n\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findAllCars()).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.findAllCars();\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}", "public void getAll() {\n try {\n\n String sql = \"select * from project_zero.carlot where owner = 'DEALERSHIP';\";\n Statement st = ConnectionUtil.getInstance().getConnection().createStatement();\n ResultSet rs = st.executeQuery(sql);\n\n while(rs.next()) {\n Car c = new Car(rs.getInt(1), rs.getString(2), rs.getString(3),\n rs.getInt(4), rs.getString(5), rs.getString(6), rs.getInt(7));\n System.out.println(c.toString());\n\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Test\n\tpublic void testGetCarById() {\n\t\tSystem.out.println(\"getCarById\");\n\t\tint carId = 1;\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findCarById(carId)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.getCarById(carId);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}", "public void setCarList(List<VehicleVO> carList) {\n this.carList = carList;\n }", "private ICarModel ICarModel(Car car) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn null;\r\n\t}", "@Repository\npublic interface CarRepository extends JpaRepository<Car, Integer> {\n\t\n\t/**\n\t * En Car pga unik namn\n\t * @param name Reg. nr.\n\t * @return En Car pga unik namn dvs. reg.nr.\n\t * @author Danijela\n\t */\n\tCar findByName(String name);\n\n\t/**\n\t * Alla bilar pga brand\n\t * @param brandName Volvo, Renault..\n\t * @return En lista av bilar pga brand\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);\n\n\t/**\n\t * Alla bilar pga brand och model\n\t * @param brandName Volvo, Renault..\n\t * @param model m3, Clio ..\n\t * @return En lista av bilar far pga brand och model\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models\")\n\tList<Car> findAllByBrandAndModel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> model);\n\n\t/**\n\t * Alla bilar som ar biligare an prise som anvandare valde\n\t * @param price Prise som anvandare valde\n\t * @return En lista av bilar som ar biligare an prise som anvandare valde\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.price <= :price\")\n\tList<Car> findByBelowPrice(@Param(\"price\") Integer price);\n\n\t/**\n\t * Alla bilar som har mindre kilometer an den som anvandare valde\n\t * @param kilometer Kilometer som anvandare valde\n\t * @return En lista av bilar som har mindre kilometer an den som anvandare valde\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.kilometer <= :kilometer\")\n\tList<Car> findBelowKilometer(@Param(\"kilometer\") Integer kilometer);\n\n\t/**\n\t * Alla bilar med automatisk eller med manuell vaxel\n\t * @param automatic Automatisk vaxel\n\t * @return List av bilar med automatisk eller en lista med manuell vaxel\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.automatic IN :automatics\")\n\tList<Car> findIsAutomatic(@Param(\"automatics\") boolean automatic);\n\n\t/**\n\t * Alla bilar som man kan eller som man inte kan hyra ut\n\t * @param isRentable Man kan eller inte kan hyra ut bil\n\t * @return Lista av bilar som man kan eller en lista av bilar som man inte kan hyra ut\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.isRentable IN :isRentables\")\n\tList<Car> findAllRentable(@Param(\"isRentables\") boolean isRentable);\n\n\t/**\n\t * Alla bilar som har eller som inte har navigation\n\t * @param navigation Bil har eller inte har navigation\n\t * @return en lista av bilar som har eller en lista av bilar som inte har navigation\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.navigation IN :navigations\")\n\tList<Car> findAllWithNavigation(@Param(\"navigations\") boolean navigation);\n\n\t/**\n\t * Alla nya bilar eller alla begagnade bilar\n\t * @param nya Nya bilar eller begagnade bilar\n\t * @return En lista av nya bilar eller en lista av begagnade bilar\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.isNew IN :nya\")\n\tList<Car> findAllNewCar(@Param(\"nya\") boolean nya);\n\n\t/**\n\t * Alla bilar med samma typ av fuel\n\t * @param fuel Bensin, gas...\n\t * @return En lista av bilar med samma typ av fuel\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.fuel IN :fuels\")\n\tList<Car> findAllCarWithSameFuel(@Param(\"fuels\") String fuel);\n\t/**\n\t * Alla bilar som ar samma brand och anvander sama typ av fuel\n\t * @param brandName Volvo, Renault...\n\t * @param fuel Bensin , gas ..\n\t * @return En lista av bilar som ar samma brand och anvander sama typ av fuel\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"fuels\") Collection<String> fuel);\n\n\t/**\n\t * Alla bilar som ar samma brand, samma typ av model och anvander samma fuel\n\t * @param brandName Volvo, Renault ..\n\t * @param modelName m3, Clio...\n\t * @param fuel Bensin, gas..\n\t * @return En lista av bilar som ar samma brand, samma typ av model och anvander samma fuel\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandModelAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> modelName, @Param(\"fuels\") Collection<String> fuel);\n\t/**\n\t * Alla bilar som ar tillverkad samma ar\n\t * @param yearProduce Ar när ar bil tillverkad\n\t * @return En lista av bilar som ar tillverkad samma ar\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.yearProduce IN :years\")\n\tList<Car> findCarsByYear(@Param(\"years\") Integer yearProduce);\n\n\t/**\n\t * Alla bilar som har samma farg\n\t * @param color Farg\n\t * @return En lista av bilar som har samma farg\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE lower (u.color) IN :colors\")\n\tList<Car> findCarsByColor(@Param(\"colors\") String color);\n\n\t/**\n\t * Alla bilar som kom till butik på samma tid\n\t * @param timeStored Tid när bilen kom till butik\n\t * @return En lista av bilar som kom till butik på samma tid\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.timeStored <= :timeStored\")\n\tList<Car> findCarByTimeStored(@Param(\"timeStored\") Date timeStored);\n\n\n\t/**\n\t * Alla bilar som ar samma typ\n\t * @param modelName typ av car, model: m3, Clio...\n\t * @return En lista av bilar som ar samma typ\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.modelName IN :modelNames\")\n\tList<Car> findCarsByModelName(@Param(\"modelNames\") String modelName);\n\n\n\n}", "public void setCar(Car car) {\n this.car = car;\n }", "public interface CRUDProduto {\r\n \r\n public boolean save(Produto produto);\r\n\r\n public boolean update(Produto produto);\r\n\r\n public boolean delete(Produto produto);\r\n\r\n public Produto get(long id);\r\n\r\n public List<Produto> getAll();\r\n}", "public static boolean update(Car newCar, CarModel model) {\n\n Map<String, String> carToUpdate = new HashMap<>();\n carToUpdate.put(\"idCar\", \"\"+newCar.getId());\n carToUpdate.put(\"brand\", newCar.getBrand());\n carToUpdate.put(\"year\", \"\" + newCar.getYear());\n carToUpdate.put(\"idUser\", \"\" + newCar.getId_user());\n carToUpdate.put(\"model\", model.getModel_name());\n RequestPutObject task = new RequestPutObject(carToUpdate);\n try {\n String response = task.execute(\"https://waiting-list-garage.herokuapp.com/car\").get();\n Log.d(\"response\",response);\n } catch (ExecutionException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return false;\n }", "public interface VehicleService {\n\n void saveOrUpdate(Vehicle detainedObject);\n\n void delete(Vehicle detainedObject);\n List<Vehicle> getByplate(String plate);\n List<Vehicle> getBycarteJone(String carteJone );\n\n}", "public void setCarro(Carro carro) {\n this.carro = carro;\n }", "public interface CarrierDAOInterface {\n\n public void insert(Carrier entity);\n\n public void update(Carrier entity);\n\n public Carrier getById(Long id);\n\n public List<Carrier> getAll();\n\n public void delete(Carrier entity);\n\n public void deleteAll();\n\n}", "@Override\n\tpublic Integer handleModelInfo(Map<String, Object> reqParams, Integer serialId) {\n\t\tInteger srcId = Integer.valueOf(reqParams.get(\"i\").toString());\n\t\tString name = reqParams.get(\"t\").toString();// key\n\t\tlastModelName = name;\n\t\tSystem.out.println(\">>> [\" + lastModelName + \"]\");\n\t\tCarModel carType = null;\n\t\tif (serialId != null) {\n\t\t\tcarType = this.carService.getCarModelByRefId(srcId);\n\t\t\tif (carType == null) {\n\t\t\t\tcarType = this.carService.getCarModelBySerialIdAndName(serialId, name);\n\t\t\t\tif (carType == null) {\n\t\t\t\t\tcarType = new CarModel();\n\t\t\t\t\tcarType.setSerialId(serialId);\n\t\t\t\t\tcarType.setName(name);\n\t\t\t\t\tcarType.setRefId(srcId);\n\t\t\t\t\tcarType.setRefName(name);\n\n\t\t\t\t\tthis.carService.saveCarModel(carType);\n\n\t\t\t\t\tSystem.out.println(\"新增 车型 => \" + lastBrandName + \" \\\\ \" + lastSerialName + \" \\\\ \" + lastModelName);\n\t\t\t\t\tinsertModels++;\n\t\t\t\t} else {\n\t\t\t\t\tcarType.setRefId(srcId);\n\t\t\t\t\tcarType.setRefName(name);\n\n\t\t\t\t\tthis.carService.saveCarModel(carType);\n\n\t\t\t\t\tSystem.out.println(\"绑定 车型 srcId => [\" + srcId + \"]\" + lastBrandName + \" \\\\ \" + lastSerialName + \" \\\\ \" + lastModelName);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//\n\t\treturn carType == null || carType.getDisabled() ? null : carType.getId();\n\t}", "public String getCarid() {\n return carid;\n }", "public Car(Integer id, String make, String logoFileName, String makeUrl, String model, Integer year, Integer price, Integer mileage, Integer cityMPG, Integer highwayMPG, String engineType, String driveType) {\n this.id = id;\n this.make = make;\n this.logoFileName = logoFileName;\n this.makeUrl = makeUrl;\n this.model = model;\n this.year = year;\n this.price = price;\n this.mileage = mileage;\n this.cityMPG = cityMPG;\n this.highwayMPG = highwayMPG;\n this.engineType = engineType;\n this.driveType = driveType;\n }", "public ArrayList<CarDetail> gettingAllAvailableCars() throws Exception;", "public List<Car> getCarsData() { return carsData; }", "@Test\n void getByIdSuccess() {\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(2);\n\n //Create Test Car\n Car testCar = new Car(1,user,\"2016\",\"Jeep\",\"Wrangler\",\"1C4BJWFG2GL133333\");\n\n //Ignore Create/Update times\n testCar.setCreateTime(null);\n testCar.setUpdateTime(null);\n\n //Get Existing Car\n Car retrievedCar = carDao.getById(1);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(testCar,retrievedCar);\n }", "@RequestMapping(value = \"/cars/{id}\", method=RequestMethod.GET)\n\tpublic Car getCar(@PathVariable int id) {\n\t\tCar aCar = _carDao.findById(id);\n\t\t\n\t\treturn aCar;\n\t}", "@PostMapping(\"/add-car\")\n public String addCar(@ModelAttribute Car car){\n cars.add(car);\n\n return \"redirect:/car\";\n }", "void save(Cartera entity);", "public List<CarsEntity> displayCars() {\n List<CarsEntity> carsEntities =\n em.createQuery(\n \"select c from CarsEntity c\").getResultList();\n\n return carsEntities;\n }", "public List<VehicleVO> getCarList() {\n return carList;\n }", "@Transactional\r\n\tpublic Car getCarById(String id) {\n\t\tOptional<Car> c=cr.findById(id);\r\n\t\tif(!c.isPresent())\r\n\t\t{\r\n\t\t\tthrow new NotFoundRes(\"Car with ID : \"+id+\" does not exist\");\r\n\t\t}\r\n\t\treturn c.get();\r\n\t}", "boolean addCar() {\n\n errorText.setText(\"\");\n\n String carType = carTypeTextf.getText();\n String providerComp = providerCompTextf.getText();\n Integer passenger = new Integer(passengerTextf.getText());\n Double price = new Double(priceTextf.getText());\n String color = colorTextf.getText();\n Boolean isAvailable = new Boolean(isAvailableTextf.getText());\n String status = statusTextf.getText();\n\n //\n // validation\n if (carType.equals(\"\") || providerComp.equals(\"\") || passenger.equals(\"\") || price.equals(\"\")\n || color.equals(\"\") || isAvailable.equals(\"\") || status.equals(\"\")) {\n System.out.println(\"asd\" + carType + \"asd\");\n errorText.setText(\"Please, Fill all fields first.\");\n return false;\n } else {\n CarDaoImpl databaseQuery = new CarDaoImpl();\n Car car = new Car(new Long(0), carType, providerComp, passenger, price, color, isAvailable, status);\n boolean result = databaseQuery.insertCar(car);\n System.out.println(result);\n\n if (result) {\n ObservableList<Car> carList = FXCollections.observableArrayList();\n carList = table.getItems();\n carList.add(new Car(new Long(0), carType, providerComp, passenger, price, color, isAvailable, status));\n table.setItems(carList);\n\n emptyTextFields();\n return true;\n } else {\n errorText.setText(\"System Error,Try again later.\");\n return false;\n }\n\n }\n }", "@Transactional\r\n\tpublic Car addCar(Car c) {\n\t\t\r\n\t\treturn cr.save(c);\r\n\t\t\r\n\t}", "Car readCar(String plateNo) throws CarNotFoundException;", "@GET\r\n @Produces(\"application/json\")\r\n public String listCarro() throws Exception {\r\n List<CarroModel> lista;\r\n //CarroDao dao = new CarroDao();\r\n CarroDao dao = CarroDao.getInstance();\r\n List<model.CarroModel> carros = dao.getAll();\r\n //Converter para Gson\r\n Gson g = new Gson();\r\n return g.toJson(carros);\r\n }", "@Test\n public void testCreateCars() throws Exception {\n Car car = carService.generateACarObject();\n testCreateCars(new ElectricCar(car)); // Test to see if electric cars are saved right!\n testCreateCars(new GasCar(car)); // Test to see if gas cars are saved right!\n testCreateCars(new DieselCar(car)); // Test to see if diesel cars are saved right!\n }", "@Override\n\tpublic Carpo findCar(String id) {\n\t\treturn inList.find(id);\n\t}", "@Test\n public void testGetCarById() {\n\n }", "public void deleteFromCarDriverByCarId(int id) {\n\t\tTransaction transaction = null;\n\t\ttry (Session session = HibernateUtil.getSessionFactory().openSession()) {\n\t\t\ttransaction = session.beginTransaction();\n\t\t\t Query query = session.createQuery(\"from car\");\n\t\t\t List<Car> cars = query.getResultList();\n\t\t\tSystem.out.println(cars);\n//\t\t\tquery.executeUpdate();\n\t\t\ttransaction.commit();\n\t\t} catch (Exception e) {\n\t\t\tif (transaction != null) {\n\t\t\t\ttransaction.rollback();\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Car(String carname) {\n this.carname = carname;\n }", "public void setCarNo(String carNo) {\n this.carNo = carNo;\n }", "public static List<Carro> getCarros() {\n CarroDAO dao = CarrosApplication.getInstance().getCarroDAO();\n List<Carro> carros = dao.findAll();\n return carros;\n }", "public void add(ComplexCar[] cars) throws DatabaseTestException;", "public EditCarViewModel(@NonNull Application application) {\n super(application);\n database = DiyGarageDatabase.getInstance();\n // Trigger refresh of models query whenever make or model pattern changes\n models = Transformations.switchMap(makeModel, (pair) -> {\n return database.getAvailableCarDao().getModels(pair.first, \"%\" + pair.second + \"%\");\n });\n }", "private void setCarList(){\n List<com.drife.digitaf.ORM.Database.CarModel> models = new ArrayList<>();\n\n if(nonPackageGrouping != null && nonPackageGrouping.size()>0){\n //cars = CarController.getAllAvailableCarInPackage(nonPackageGrouping.get(0).getCategoryGroupId());\n for (int i=0; i<nonPackageGrouping.size(); i++){\n List<com.drife.digitaf.ORM.Database.CarModel> carModels = CarController.getAllAvailableCarInPackage(nonPackageGrouping.get(i).getCategoryGroupId());\n for (int j=0; j<carModels.size(); j++){\n com.drife.digitaf.ORM.Database.CarModel model = carModels.get(j);\n models.add(model);\n }\n }\n }\n\n TextUtility.sortCar(models);\n\n for (int i=0; i<models.size(); i++){\n com.drife.digitaf.ORM.Database.CarModel model = models.get(i);\n String car = model.getCarName();\n if(!carModel.contains(car)){\n carModel.add(car);\n cars.add(model);\n }\n }\n\n /*for (int i=0; i<cars.size(); i++){\n com.drife.digitaf.ORM.Database.CarModel carModel = cars.get(i);\n String model = carModel.getCarName();\n this.carModel.add(model);\n }*/\n\n atModel.setAdapter(new ArrayAdapter<com.drife.digitaf.ORM.Database.CarModel>(this, android.R.layout.simple_list_item_1, this.cars));\n\n //SpinnerUtility.setSpinnerItem(getApplicationContext(), spinModel, this.carModel);\n }", "Car findByName(String name);", "@Override\n\tpublic ResultMessage insertCar(Carpo po) {\n\t\treturn inList.insert(po);\n\t}", "public interface CarsRepository extends JpaRepository<Car, Long> {\n\n}", "public Carport getCarportById(int id);", "@Override\n\tpublic CarInfoDto findCarById(String carId) {\n\t\t\n\t\treturn chargeCarMapper.selectCarInfoById(carId);\n\t}", "private void reloadShoppingCarTable() {\n\t\t\r\n\t}", "List<Car> findByBrand(@NonNull String brand);", "@Transactional\r\n\tpublic void deleteCar(String id) {\n\t\tcr.deleteById(id);\r\n\t}", "public Carro getCarro() {\n return carro;\n }", "public interface CarService {\n //查询可预约车辆\n public String queryCars(CookieStore cookies);\n\n //查询可预约车辆 指定日期\n public String queryCarsByDate(CookieStore cookies,String date);\n\n //查询可预约车辆 指定时间 上午812 下午15\n public String queryCars(CookieStore cookies,String date,String time);\n\n public String queryCars(CookieStore cookies,BookCarBean bcb);\n\n public List<String> getCarList(String json);\n //预约车辆\n public String bookCars(CookieStore cookies);\n\n public String bookCars(CookieStore cookies,BookCarBean bcb);\n\n}", "public interface CorretorService {\n\n /**\n * Save a corretor.\n * \n * @param corretor the entity to save\n * @return the persisted entity\n */\n Corretor save(Corretor corretor);\n\n /**\n * Get all the corretors.\n * \n * @return the list of entities\n */\n List<Corretor> findAll();\n\n /**\n * Get the \"id\" corretor.\n * \n * @param id the id of the entity\n * @return the entity\n */\n Corretor findOne(Long id);\n\n /**\n * Delete the \"id\" corretor.\n * \n * @param id the id of the entity\n */\n void delete(Long id);\n\n /**\n * Search for the corretor corresponding to the query.\n * \n * @param query the query of the search\n * @return the list of entities\n */\n List<Corretor> search(String query);\n}", "public interface CarvingService {\n\n List<Carving> list();\n\n List<Carving> get(String name);\n\n boolean add(Carving carving);\n\n boolean delete(Carving carving);\n\n boolean update(Carving carving);\n}", "@Override\n\tpublic List<String> findCarModel() {\n\t\tList<String> carModelInfoList = chargeCarMapper.selectCarModelInfo();\n\t\treturn carModelInfoList;\n\t}", "@Override\r\n\tpublic void updateCar(HashMap carMap) throws DataAccessException {\n\t\t\r\n\t}", "public void addCars(User user, int idCar){\n ContentValues values= new ContentValues();\n values.put(COLUMN_IDUSER, user.getId());\n values.put(COLUMN_MODELEID, idCar);\n\n db.insert(TABLE_MODELE_SALVATE, null, values);\n }", "public static URL getUrlForAddCar()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/vehicle\";\r\n return str2url( strUrl );\r\n }", "public String updateByPrimaryKeySelective(Car record) {\n SQL sql = new SQL();\n sql.UPDATE(\"`basedata_car`\");\n \n if (record.getCarBrandId() != null) {\n sql.SET(\"car_brand_id = #{carBrandId,jdbcType=INTEGER}\");\n }\n \n if (record.getCarModel() != null) {\n sql.SET(\"car_model = #{carModel,jdbcType=VARCHAR}\");\n }\n \n if (record.getCarType() != null) {\n sql.SET(\"car_type = #{carType,jdbcType=TINYINT}\");\n }\n \n if (record.getAlias() != null) {\n sql.SET(\"alias = #{alias,jdbcType=VARCHAR}\");\n }\n \n if (record.getSeatType() != null) {\n sql.SET(\"seat_type = #{seatType,jdbcType=TINYINT}\");\n }\n \n if (record.getSeatNum() != null) {\n sql.SET(\"seat_num = #{seatNum,jdbcType=TINYINT}\");\n }\n \n if (record.getCarClass() != null) {\n sql.SET(\"car_class = #{carClass,jdbcType=INTEGER}\");\n }\n \n if (record.getGuestNum() != null) {\n sql.SET(\"guest_num = #{guestNum,jdbcType=INTEGER}\");\n }\n \n if (record.getLuggageNum() != null) {\n sql.SET(\"luggage_num = #{luggageNum,jdbcType=INTEGER}\");\n }\n \n if (record.getSpell() != null) {\n sql.SET(\"spell = #{spell,jdbcType=VARCHAR}\");\n }\n \n if (record.getEnName() != null) {\n sql.SET(\"en_name = #{enName,jdbcType=VARCHAR}\");\n }\n \n if (record.getUpdatedAt() != null) {\n sql.SET(\"updated_at = #{updatedAt,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getCreatedAt() != null) {\n sql.SET(\"created_at = #{createdAt,jdbcType=TIMESTAMP}\");\n }\n \n sql.WHERE(\"car_id = #{carId,jdbcType=INTEGER}\");\n \n return sql.toString();\n }", "public Car findCarById(int id) {\r\n return repository.findById(id).orElse(null);\r\n }", "@Test\n void insertSuccess() {\n int insertedCarId;\n\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(1);\n\n //Create Inserted Car\n Car insertedCar = new Car(user,\"2016\",\"Honda\",\"Civic\",\"19XFC1F35GE206053\");\n\n //Save Inserted Car\n insertedCarId = carDao.insert(insertedCar);\n\n //Get Saved Car\n Car retrievedCar = carDao.getById(insertedCarId);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(insertedCar,retrievedCar);\n }", "public List<Carro> getCarros(){\n\t\t\n\t\ttry {\t\t\t\n\t\t\tList<Carro> carros = db.getCarros();\n\t\t\treturn carros;\n\t\t\t\n\t\t} catch(SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn new ArrayList<>();\n\t\t}\n\t\t\n\t}", "public abstract void receberCarro(Carro carro);", "List<Car> getByBrandAndModel(String brand, String model);", "public interface ICarSupportDAO {\n\n\t/**\n\t * Saving feebdback.\n\t *\n\t * @param feedback the feedback\n\t * @throws Exception the exception\n\t */\n\tpublic void savingFeebdback(FeedbackDetail feedback)throws Exception;\n\t\n\t/**\n\t * Gets the ting booking history.\n\t *\n\t * @return the ${e.g(1).rsfl()}\n\t * @throws Exception the exception\n\t */\n\tpublic ArrayList<BookingDetail> gettingBookingHistory() throws Exception;\n\t\n\t/**\n\t * Gets the ting all available users.\n\t *\n\t * @return the ting all available users\n\t * @throws Exception the exception\n\t */\n\tpublic ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;\n\t\n\t/**\n\t * Gets the ting all available feedbacks.\n\t *\n\t * @return the ting all available feedbacks\n\t * @throws Exception the exception\n\t */\n\tpublic ArrayList<FeedbackDetail> gettingAllAvailableFeedbacks() throws Exception;\n\t\n\t/**\n\t * Gets the ting all available cars.\n\t *\n\t * @return the ting all available cars\n\t * @throws Exception the void editing car( car detail detail)\n\t */\n\tpublic ArrayList<CarDetail> gettingAllAvailableCars() throws Exception;\n\t\n\n}", "public Car(String primaryKey, String name, String dealerKey, int year, Category category,\r\n double price, String displacementCC, int maxPower,\r\n String powerRPM, double torqueFtLb, String torqueRPM, DriveTrain driveTrain,\r\n Aspiration aspiration, double length, double width, double height, double weight,\r\n double maxSpeed, double acceleration, double braking, double cornering, double stability) {\r\n this.primaryKey = primaryKey;\r\n this.name = name;\r\n this.manufacturerKey = dealerKey;\r\n this.year = year;\r\n this.category = category;\r\n this.price = price;\r\n this.displacementCC = displacementCC;\r\n this.maxPower = maxPower;\r\n this.powerRPM = powerRPM;\r\n this.torqueFtLb = torqueFtLb;\r\n this.torqueRPM = torqueRPM;\r\n this.driveTrain = driveTrain;\r\n this.aspiration = aspiration;\r\n this.length = length;\r\n this.width = width;\r\n this.height = height;\r\n this.weight = weight;\r\n this.maxSpeed = maxSpeed;\r\n this.acceleration = acceleration;\r\n this.braking = braking;\r\n this.cornering = cornering;\r\n this.stability = stability;\r\n }", "@Repository\npublic interface CarDao extends JpaRepository<Car, Integer> {\n}", "public void deleteCar(Car car) {\n DatabaseManager.deleteCar(car);\n }", "@Test\n\tpublic void test_saveCar_whenCarDataIsCorect_thenReturnSavedCar() {\n\t\t// given or arrange\n\t\tCarServiceModel toBeSavedCar = getCarWithCorectData();\n\t\t// when or act\n\t\tCarServiceModel actualCar = carService.saveCar(toBeSavedCar);\n\t\tCarServiceModel expectedCar = modelMapper.map(carRepository.findById(actualCar.getId()).orElse(null), CarServiceModel.class);\n\t\t// then or assert\n\t\tassertEquals(expectedCar.getId(), actualCar.getId());\n\t\tassertEquals(expectedCar.getMake(), actualCar.getMake());\n\t\tassertEquals(expectedCar.getModel(), actualCar.getModel());\n\t\tassertEquals(expectedCar.getTravelledDistance(), actualCar.getTravelledDistance());\n\n\t}", "public static void carlist() {\n Cars xx = new Cars();\n System.out.println(\"You have \" + String.valueOf(listcars.size())+ \" cars\");\n System.out.println(\"List of all your cars \");\n for (int i = 0; i < listcars.size();i++) {\n xx = listcars.get(i);\n System.out.println(xx.getBrand()+ \" \"+ xx.getModel()+ \" \"+ xx.getReference()+ \" \"+ xx.getYear()+ \" \");\n }\n }", "public Car() {\r\n super();\r\n }", "public void wash (Car car) {\r\n // stub\r\n }", "public Car(String description)\r\n {\r\n this.description = description;\r\n customersName = \"\";\r\n }", "@Test\n\tpublic void testFindCarsByBrand() {\n\t\tSystem.out.println(\"findCarsByBrand\");\n\t\tString brand = \"Ford\";\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findCarsByBrand(brand)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.findCarsByBrand(brand);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}", "public Car(String regisNo,String carOwner,String ownerStatus)\n {\n this.regisNo = regisNo;\n this.carOwner = carOwner;\n this.ownerStatus = ownerStatus;\n }", "@Dao\npublic interface CarrierDao {\n\n @Query(\"SELECT * FROM geo_carrier\")\n Cursor selectAll();\n\n @Query(\"SELECT * FROM geo_carrier WHERE number_prefix_3 = :numberPrefix3\")\n Cursor selectByNumberPrefix3(String numberPrefix3);\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n long insert(CarrierEntity carrier);\n\n}", "public Car() {\n super();\n }", "@GET\n @Path(\"/ListCaracteristique\")\n public Response ListCaracteristique() {\n return Response\n\t\t .status(200)\n .header(\"Access-Control-Allow-Origin\", \"*\")\n .header(\"Access-Control-Allow-Headers\", \"origin, content-Type, accept, authorization\")\n .header(\"Access-Control-Allow-Credentials\", \"true\")\n\t\t .header(\"Access-Control-Allow-Methods\", \"GET, POST, PUT, DELETE, OPTIONS, HEAD\")\n\t\t .header(\"Access-Control-Max-Age\", \"1209600\")\n\t\t .entity(caractdao.getAll())\n\t\t .build();\n }", "public interface CarroAPI {\n @GET(\"/carros/tipo/{tipo}\")\n Call<List<Carro>> findBy(@Path(\"tipo\") String tipo);\n\n}", "@Test\r\n public void updateCarritoDeComprasTest() {\r\n System.out.println(\"up voy\"+data);\r\n CarritoDeComprasEntity entity = data.get(0);\r\n PodamFactory factory = new PodamFactoryImpl();\r\n CarritoDeComprasEntity newEntity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n\r\n newEntity.setId(entity.getId());\r\n\r\n carritoDeComprasPersistence.update(newEntity);\r\n\r\n CarritoDeComprasEntity resp = em.find(CarritoDeComprasEntity.class, entity.getId());\r\n\r\n Assert.assertEquals(newEntity.getTotalCostDeCarritoCompras(), resp.getTotalCostDeCarritoCompras());\r\n \r\n }", "List<Corretor> findAll();", "@Override\n\tpublic ArrayList<Carpo> showAllCars() {\n\t\treturn inList.showAll();\n\t}", "@Override\n\tpublic Car selectById(int carId) {\n\t\treturn carMapper.selectById(carId);\n\t}", "public interface VehicleMapper {\n\n Vehicle getById(long id);\n\n List<Vehicle> getByViid(@Param(\"viid\") Long viid, @Param(\"is_delete\") Integer is_delete);\n\n List<Vehicle> getByViidAndStatus(@Param(\"viid\") Long viid, @Param(\"status\") Integer status, @Param(\"is_delete\") Integer is_delete);\n\n //int getVehicleCount(@Param(\"viid\") long viid);\n\n Vehicle getByNumber(String number);\n\n List<Vehicle> getAll(@Param(\"is_delete\") Integer is_delete);\n\n int updateVehicleById(Vehicle vehicle);\n\n int updateVehicleDescription(Vehicle vehicle);\n\n int insertVehicle(Vehicle vehicle);\n\n int updateVehicleToDelete(Long id);\n\n List<VehicleCount> getVehicleCount(@Param(\"viid\") Long viid, @Param(\"is_delete\") Integer is_delete);\n}", "public Car(){\n\t\t\n\t}", "@Override\n public String toString() {\n return \"Car{\" +\n \"name='\" + name + '\\'' +\n '}';\n }" ]
[ "0.696815", "0.6836275", "0.68190044", "0.6750532", "0.6710675", "0.66445667", "0.6625799", "0.65940636", "0.64556885", "0.64028805", "0.63893753", "0.6368868", "0.63537997", "0.6346249", "0.6334691", "0.6314142", "0.63064265", "0.62941796", "0.62731147", "0.62247175", "0.61972564", "0.6171679", "0.6166431", "0.6155092", "0.6147564", "0.61398923", "0.6120968", "0.6103139", "0.6085483", "0.6082557", "0.6080177", "0.60786086", "0.606856", "0.6056159", "0.60549086", "0.6044266", "0.60366607", "0.6030451", "0.6024812", "0.6018376", "0.60182947", "0.60156393", "0.60145426", "0.60025847", "0.5991409", "0.59649634", "0.59524184", "0.5946775", "0.5938019", "0.59374017", "0.592977", "0.59190553", "0.5904623", "0.5874792", "0.58713585", "0.58615285", "0.5859264", "0.5858475", "0.5852549", "0.5843697", "0.58420086", "0.583742", "0.5835162", "0.58350736", "0.5825992", "0.5820737", "0.5820383", "0.5810447", "0.5808773", "0.5802744", "0.57846856", "0.57786745", "0.5766799", "0.5763686", "0.5763119", "0.5758254", "0.5757345", "0.57554644", "0.57552946", "0.57550555", "0.57517046", "0.57391256", "0.5732734", "0.57318205", "0.57306325", "0.5726779", "0.5717536", "0.57169455", "0.5716093", "0.5715265", "0.57126343", "0.5703156", "0.56981415", "0.56959355", "0.5693946", "0.5689078", "0.5684968", "0.5670532", "0.566609", "0.5655582" ]
0.65175515
8
Read a single car based on the plate number.
Car readCar(String plateNo) throws CarNotFoundException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void searchSpecificCar() {\n\t\tSystem.out.print(\"Enter Registration Number: \");\n\t\tSystem.out.println(application.displaySpecificCar(console.nextLine()));\n\t}", "public void setPlateNo(String plateNo) {\n\t\tthis.plateNo = plateNo;\n\t}", "public JalLibraryPlate getJalLibraryPlate(final String plateId);", "@Override\n public CarDocument readNextRecord(BufferedReader bRdr) throws IOException {\n return null;\n }", "public void readInSupercar() {\r\n\t\tScanner kbInput = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Car's make and model? \");\r\n\t\tthis.setMakeAndModel(kbInput.nextLine());\r\n\t\tSystem.out.print(\"Country of origin? \");\r\n\t\tthis.setCountry(kbInput.nextLine());\r\n\t\tSystem.out.print(\"0 to 60 time (in seconds)? \");\r\n\t\tthis.setZeroTo60(kbInput.nextDouble());\r\n\t\tSystem.out.print(\"Total cost? $\");\r\n\t\tthis.setTotalCost(kbInput.nextInt());\r\n\t\t}", "public String getCarNo() {\n\t\treturn carNo;\n\t}", "public String getPlateNo() {\n\t\treturn plateNo;\n\t}", "public String getCarNo() {\n return carNo;\n }", "public void setCarNo(String carNo) {\n this.carNo = carNo;\n }", "public java.lang.String getCar_number() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.lang.String) __getCache(\"car_number\")));\n }", "public int getOwnerID(String NumberPlate)\n\t{\n\t\tint returnValue = -1;\n\t\ttry {\n\t\t\tstatement = conn.createStatement();\n\t\t\tres = statement.executeQuery(\"SELECT * FROM vehicle WHERE (number_plate = '\" + NumberPlate + \"')\");\n\t\t\tif(res.next())\n\t\t\t{\n\t\t\t\treturnValue = Integer.parseInt(res.getString(3));\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn returnValue;\n\t}", "public Car findCarById(int id) {\r\n return repository.findById(id).orElse(null);\r\n }", "public int getCar() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((Integer) __getCache(\"car\")).intValue());\n }", "public Car getCarById(Integer id){\n\n return this.carCrudInterface.getById(id);\n\n }", "public com.zzsong.netty.protobuff.two.ProtoData.Car getCar() {\n if (dataBodyCase_ == 4) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Car) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Car.getDefaultInstance();\n }", "@Override\n\tpublic car getById(int id) {\n\t\ttry{\n\t\t\tcar so=carDataRepository.getById(id);\n\t\t\t\n\t\t\treturn so;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t}", "public void search(String plateNumber) {\n regSearch.sendKeys(plateNumber);\n btnContinue.click();\n }", "public void setCarNo(String carNo) {\n\t\tthis.carNo = carNo;\n\t}", "public Integer getCarNum() {\n return carNum;\n }", "@RequestMapping(value = \"/carDetails/{vin}\", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public @ResponseBody Car getCarDetails(@PathVariable final String vin) {\n logger.info(\"Requesting car details for VIN number: {}\", vin);\n final Car carDetails = carRentalService.getCarDetails(vin);\n logger.info(\"Returning vin-based ({}) car details: {}\", vin, carDetails);\n return carDetails;\n }", "public void setPlateId(Integer plateId) {\r\n this.plateId = plateId;\r\n }", "public com.zzsong.netty.protobuff.two.ProtoData.Car getCar() {\n if (carBuilder_ == null) {\n if (dataBodyCase_ == 4) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Car) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Car.getDefaultInstance();\n } else {\n if (dataBodyCase_ == 4) {\n return carBuilder_.getMessage();\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Car.getDefaultInstance();\n }\n }", "private ClothingItem readItem() {\n System.out.println(\"Read item {id,name,designer,price}\");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n String name = bufferRead.readLine();\n String designer = bufferRead.readLine();\n int price = Integer.parseInt(bufferRead.readLine());\n ClothingItem item = new ClothingItem(name, designer, price);\n item.setId(id);\n\n return item;\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public Car findCarByName(String name){\r\n return repository.findCarByName(name);\r\n }", "public void setContentFromPlate(Plate plate) {\n\t\tthis.contentFromPlate=plate;\n\t}", "public Automobile readFile(String fileName) throws AutoException {\n\n Automobile car = null;\n\n try {\n FileReader fileReader = createFileReader(fileName);\n BufferedReader reader = new BufferedReader(fileReader);\n String line = null;\n\n String name;\n double basePrice;\n int nOptions = 0;\n\n line = reader.readLine();\n name = parseModelName(line);\n\n line = reader.readLine();\n basePrice = parseBasePrice(line);\n\n line = reader.readLine();\n nOptions = parseNOptionSet(line);\n\n car = new Automobile(name, basePrice, nOptions);\n\n for (int i = 0; i < nOptions; i++) {\n reader.readLine();\n\n line = reader.readLine();\n String optionName = parseOptionSetName(line);\n\n line = reader.readLine();\n int nValues = parseNOptions(line);\n\n car.setOptionSet(optionName, nValues, i);\n OptionSet optSet = car.getOptionSet(i);\n\n for (int j = 0; j < nValues; j++) {\n line = reader.readLine();\n String optionParam[] = line.split(\",\");\n String value = parseOptionName(optionParam[0].trim());\n double price = parseOptionPrice(optionParam[1].trim());\n car.setOption(optSet, value, price, j);\n }\n }\n reader.close();\n } catch (IOException ex) {\n\n }\n\n return car;\n }", "public String getCarCode()\r\n {\r\n return carCode;\r\n }", "public Receta read(Long codigo);", "@Override\n\tpublic Carpo findCar(String id) {\n\t\treturn inList.find(id);\n\t}", "public void openReader(){\r\n handle = -1;\r\n try {\r\n cardReader = new ACR120U();\r\n } catch (java.lang.UnsatisfiedLinkError e) {\r\n e.printStackTrace();\r\n System.err.println(\"Are you sure the DLL is installed???\");\r\n message = \"DLL Installation problem.\";\r\n return;\r\n }\r\n handle = cardReader.open(ACR120U.ACR120_USB1); \r\n if (handle < 0){\r\n //message = \"Error opening reader [port may be in use or reader not in binary mode]\";\r\n message = \"No reader found\";\r\n System.err.println(message);\r\n return;\r\n }\r\n message = \"Device opened.\";\r\n }", "public void setCarNum(Integer carNum) {\n this.carNum = carNum;\n }", "String getLicensePlate();", "public void readSerial() {\r\n rightShoe.getSerialReader().stopRead();\r\n leftShoe.getSerialReader().stopRead();\r\n rightShoe.getSerialReader().closePort();\r\n leftShoe.getSerialReader().closePort();\r\n timeController.initializeSerial();\r\n }", "public long getCar() {\r\n return car;\r\n }", "@GetMapping(\"/card/{num}\")\n StarbucksCard getOne(@PathVariable String num, HttpServletResponse response) {\n StarbucksCard card = repository.findByCardNumber(num);\n if (card == null) {\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"Error--Card not found\");\n }\n return card;\n }", "@Override\n\tpublic car getByVin(String vinId) {\n\t\t\t\ttry{\n\t\t\t\t\tcar so=carDataRepository.getByVin(vinId);\n\t\t\t\t\t\n\t\t\t\t\treturn so;\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception ex)\n\t\t\t\t\t{\n\t\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t}", "public String getCarmake()\n {\n return carmake;\n }", "public String getCarid() {\n return carid;\n }", "@Override\n public PvCard read(JsonReader in) throws IOException {\n try {\n return readPvCard(in); //or\n// return readPvCardViaTypeToken(in); // getting a PvCard object , use {@Link TypeToken}\n } finally {\n in.close();\n }\n }", "public String get(RegistrationPlate plate){\n if(!this.registrationList.containsKey(plate))\n return null;\n\n return this.registrationList.get(plate);\n\n }", "public Card selectCardById(int cno) {\n\t\treturn this.caDao.selectCardById(cno);\n\t}", "String slotOfCar(String regNumber);", "public Car exampleAccessToYourData(String key) {\n // When you recover your value, you directly recover your value and not a DacasElement.\n // Cast your recovered data, that's all.\n return (Car) DacasTransaction.get(key);\n }", "public Integer getPlateId() {\r\n return plateId;\r\n }", "public String getLicensePlate() {\n return licensePlate;\n }", "public String getVehicleLicensePlate() {\n return vehicleLicensePlate;\n }", "@Override\n\tpublic CarInfoDto findCarById(String carId) {\n\t\t\n\t\treturn chargeCarMapper.selectCarInfoById(carId);\n\t}", "@Override\r\n protected void readImpl() {\r\n _recipeId = readD();\r\n }", "public long readTag(){\n if (!checkOpen()){\r\n return 0;\r\n }\r\n // arrays will hold return values from various calls to reader\r\n byte[] pLen = new byte[1];\r\n byte[] pTAG = new byte[1];\r\n byte[] pSN = new byte[10];\r\n byte[] pNumTagFound = new byte[1];\r\n short tag = cardReader.select(handle,pTAG, pLen, pSN);\r\n if (tag < 0 ){\r\n message = \"No card found\";\r\n System.err.println(message);\r\n return 0;\r\n }\r\n System.out.println(\"Tagtype:\"+pTAG[0] + \" SN[0]:\" + Integer.toHexString(pSN[0]) + \" return= \" + tag);\r\n long serial = 0;\r\n for(int i=0;i<pLen[0];i++) {\r\n // shift and bitwise-OR the bytes into one 64-bits integer\r\n serial = (serial << 8 ); // shift left 8 bits\r\n serial = serial | (pSN[i] & 0xFF); // bitwise OR byte into int\r\n }\r\n System.out.printf(\" serial = %d hex: %X\",serial, serial);\r\n message = \"String read\";\r\n // test card read/write+login functions; only with new cards\r\n //writeString(\"Hello RFID card\");\r\n //System.err.println(readString());\r\n return (int)serial;\r\n }", "@Override\r\n\tpublic CookVO listOne(int cno) throws Exception {\n\t\treturn session.selectOne(\"com.mapper.cook.read\", cno);\r\n\t}", "T read(String identifier) throws IOException;", "private Car extractCar(Node carNode) throws DataProviderException {\n\t\tString pageId = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.PAGE_ID);\n\n\t\tString model = StringEscapeUtils.unescapeHtml4(getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MODEL));\n\t\tif (model == null || model.isEmpty()) {\n\t\t\tmodel = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MODEL_PROMOTED);\n\t\t}\n\n\t\tString mileage = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MILEAGE);\n\t\tif (mileage == null || mileage.isEmpty()) {\n\t\t\tmileage = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MILEAGE_PROMOTED);\n\t\t}\n\n\t\tString year = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.YEAR);\n\t\tif (year == null || year.isEmpty()) {\n\t\t\tyear = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.YEAR_PROMOTED);\n\t\t}\n\n\t\tString price = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.PRICE);\n\t\tif (price == null || price.isEmpty()) {\n\t\t\tprice = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.PRICE_PROMOTED);\n\t\t}\n\n\t\tCar result = new Car();\n\t\tresult.setPageId(pageId);\n\t\tresult.setModel(model);\n\t\tresult.setMileage(mileage);\n\t\tresult.setYear(year);\n\t\ttry {\n\t\t\tString[] priceSplitted = price.split(\" \");\n\t\t\tresult.setPrice(priceSplitted[0]);\n\t\t\tresult.setPriceCurrency(priceSplitted[1]);\n\t\t} catch (Exception e) {\n\t\t\tresult.setPrice(price);\n\t\t}\n\t\treturn result;\n\t}", "public void setVehicleLicensePlate(String vehicleLicensePlate) {\n this.vehicleLicensePlate = vehicleLicensePlate;\n }", "Material findMaterial(String name) throws ReadException;", "public String readString(){\r\n byte[] pLen = new byte[1];\r\n byte[] pTAG = new byte[1];\r\n byte[] pSN = new byte[10];\r\n byte[] pNumTagFound = new byte[1];\r\n short tag = cardReader.select(handle,pTAG, pLen, pSN);\r\n if (tag < 0 ){\r\n message = \"No card found\";\r\n System.err.println(message);\r\n }\r\n if (!login()) return \"No card found\";\r\n String s;\r\n byte[] bdata = new byte[16];\r\n cardReader.read(handle,blocknr,bdata);\r\n s = new String(bdata);\r\n System.err.println(\"Read block: \" + s); \r\n return s;\r\n }", "@Override\r\n\tpublic ReviewVO read(int no) {\n\t\treturn sqlSession.selectOne(namespace + \".read\", no);\r\n\t}", "public Carport getCarportById(int id);", "public final String getLicensePlate() {\n return licensePlate;\n }", "@RequestMapping(value = \"/cars/{id}\", method=RequestMethod.GET)\n\tpublic Car getCar(@PathVariable int id) {\n\t\tCar aCar = _carDao.findById(id);\n\t\t\n\t\treturn aCar;\n\t}", "private void loadCarListings() {\r\n try {\r\n cars = Reader.readCars(new File(CARLISTINGS_FILE));\r\n } catch (IOException e) {\r\n cars = new Cars();\r\n }\r\n }", "public String getLicensePlate() {\n\t\treturn licensePlate;\n\t}", "@Override\r\n\tpublic Libro read(int id) {\n\t\treturn libroRepository.findById(id).get();\r\n\t}", "public Car(String carname) {\n this.carname = carname;\n }", "public static Car getNewCar() {\n CarType[] carTypes = CarType.values();\n\n CarType randomCarType = carTypes[(int) (Math.random()*carTypes.length)];\n\n switch(randomCarType){\n case DELOREAN:\n return new DeLoreanCar(fetchRandomPosition());\n case SUPER:\n return new SuperCar(fetchRandomPosition());\n case GOLAO:\n return new GolaoCar(fetchRandomPosition());\n }\n return null;\n }", "private void readCardForSubStation() {\n\t\tif(!link.hasNextLine()) {\n\t\t\tcontroller.printError(\"Errore di Comunicazione\", \"Il seggio ausiliario \"+ip.getHostAddress()+\" non ha inviato il numero della card.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tMessage request, response = new Message();\n\t\tString card;\n\t\tPerson voter = null;\n\t\ttry {\n\t\t\trequest = (Message) Message.fromB64(link.read(), \"seggio ausiliario\");\n\t\t\t\n\t\t\tString[] required = {\"card\"};\n\t\t\tClass<?>[] types = {String.class};\n\t\t\trequest.verifyMessage(Protocol.processCardReq, required, types, \"seggio ausiliario\");\n\t\t\tcard = request.getElement(\"card\");\n\t\t\t\n\t\t\t//Si recupera la postazione associata alla card, se esiste\n\t\t\tint postIdx = ((Controller) controller).getPostIdx(card);\n\t\t\t\n\t\t\t//Si verifica se il badge era già associato ad una postazione o se sta venendo usato per crearne una nuova\n\t\t\tif (postIdx == -1) {\n\t\t\t\trequired = new String[]{\"card\", \"voter\"};\n\t\t\t\ttypes = new Class<?>[]{String.class, Person.class};\n\t\t\t\t\n\t\t\t\trequest.verifyMessage(Protocol.processCardReq, required, types, \"seggio ausiliario\");\n\t\t\t\tvoter = request.getElement(\"voter\");\n\t\t\t}\n\t\t\t\n\t\t\tresponse = ((Controller) controller).readCardForSubStation(card, voter);\n\t\t\t\n\t\t} catch (PEException e) {\n\t\t\tresponse.setValue(Protocol.processCardNack);\n\t\t\tresponse.addError(e.getMessage());\n\t\t}\n\t\t\n\t\tlink.write(response.toB64());\n\t}", "@Override\n\tpublic ProductBean read(int pnum) {\n\t\treturn session.selectOne(namespace+\".read\", pnum);\n\t}", "public FatekReadDataCmd(FatekPLC fatekPLC, DataReg startReg, int number) {\n\n super(fatekPLC);\n this.startReg = startReg;\n this.number = number;\n }", "public CartridgeHandle getCartridgeByName( String name )\n throws CdbException , InterruptedException {\n return _pvr.getCartridgeByName( name ) ;\n }", "@Override\n\tpublic CarModel getCarDetail(String id) {\n\t\tfor(int i=0; i< archiveCar.size(); i++) {\n\t\t\tCarModel car = archiveCar.get(i);\n\t\t\tif(car.getId().equalsIgnoreCase(id)) {\n\t\t\t\treturn car;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String readChipID() {\r\n return mFactoryBurnUtil.readChipID();\r\n }", "Car findByName(String name);", "public void displayCar()\n\t{\n\t\tSystem.out.println(\"Wheels of car\t:\t\" + objCar.getWheel());\n\t\tSystem.out.println(\"Speed of car\t:\t\" + objCar.getSpeed());\n\t\tSystem.out.println(\"Passengers of car\t:\t\" + objCar.getCarPassengerNumber());\n\t}", "public void getDeviceByModelNumber()\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter Model number \");\r\n\t\t\tString searchModelNumber = sc.nextLine();\r\n\t\t\t\r\n\t\t\tDevice d = record.getDeviceByModelNumber(searchModelNumber);\r\n\t\t\tprintDeviceDetails(d);\r\n\t\t}", "public tT CAR()\r\n\t{\r\n\t\treturn car;\r\n\t}", "public Carro getCarro(Long id){\n\t\t\n\t\ttry {\n\t\t\treturn db.getCarroById(id);\n\t\t\t\n\t\t} catch(SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "@Transactional\r\n\tpublic Car getCarById(String id) {\n\t\tOptional<Car> c=cr.findById(id);\r\n\t\tif(!c.isPresent())\r\n\t\t{\r\n\t\t\tthrow new NotFoundRes(\"Car with ID : \"+id+\" does not exist\");\r\n\t\t}\r\n\t\treturn c.get();\r\n\t}", "public static void main(String[] args) {\r\n \r\n // declare some cars\r\n Car randomCar, coolCar, neatoCar;\r\n \r\n // make a scanner to get input\r\n Scanner sc = new Scanner(System.in);\r\n \r\n // make some variables to store the first car's values\r\n String coolCarMake, coolCarModel;\r\n int coolCarYear;\r\n double coolCarPrice, coolCarLength, coolCarWidth;\r\n \r\n // Get the user's input\r\n System.out.println(\"Please enter the make:\");\r\n coolCarMake = sc.nextLine();\r\n System.out.println(\"Please enter the model:\");\r\n coolCarModel = sc.nextLine();\r\n System.out.println(\"Please enter the year:\");\r\n coolCarYear = sc.nextInt();\r\n System.out.println(\"Please enter the price:\");\r\n coolCarPrice = sc.nextDouble();\r\n System.out.println(\"Please enter the length:\");\r\n coolCarLength = sc.nextDouble();\r\n System.out.println(\"Please enter the width:\");\r\n coolCarWidth = sc.nextDouble();\r\n sc.close();\r\n \r\n // print out the information about the cars\r\n randomCar = new Car();\r\n coolCar = new Car(coolCarMake, coolCarModel, coolCarYear, coolCarPrice, coolCarLength, coolCarWidth);\r\n neatoCar = new Car(\"Land Rover\", \"LR4\", 2016, 59990.0, 4.829, 2.053);\r\n System.out.println(randomCar);\r\n System.out.println(coolCar);\r\n System.out.println(neatoCar);\r\n randomCar.honk();\r\n }", "public Vehicle findVehicle(String registerNumber) throws VehicleNotFoundException\n\t{\n\t\tfor(Vehicle vehicle : garageMap.values())\n\t\t{\n\t\t\tif(vehicle.getRegistrationNumber().equalsIgnoreCase(registerNumber))\n\t\t\t{\n\t\t\t\treturn vehicle;\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new VehicleNotFoundException();\n\t\t}\n\t\treturn null;\n\t}", "public void setCar(long value) {\r\n this.car = value;\r\n }", "public Car(String licensePlate, double fuelEconomy){\n this.licensePlate = licensePlate;\n this.fuelEconomy = fuelEconomy;\n}", "public byte[] __ReadRecord(byte recNo, byte Len) throws CardException {\n byte[] read_record_bytes = new byte[5];\n\n read_record_bytes[0] = (byte) 0x80;\n read_record_bytes[1] = (byte) 0xB2;\n read_record_bytes[2] = recNo;\n read_record_bytes[3] = (byte) 0x00;\n read_record_bytes[4] = Len;\n\n this.resp = this.ch.transmit(new CommandAPDU(read_record_bytes));\n\n if ((this.LAST_STATUS_CODE = this.resp.getSW()) == 0x9000) {\n /*System.out.print(\"Record Reading: \");\n\n for (byte bb : this.resp.getData())\n {\n System.out.print(\" \"+ Integer.toHexString(bb));\n }\n System.out.println(\" -->> OK\"); */\n return this.resp.getData();\n } else {\n //System.out.println(\"Record Reading -->> ERROR\");\n return null;\n }\n }", "public Card getCard( int cardNum ) {\n\t\treturn deck[ cardNum ];\n\t}", "public Carro getCarro() {\n return carro;\n }", "public void carInput()\n\t{\n\t\tSystem.out.println(\"Enter passenger number of car:\");\n\t\tobjCar.setCarPassengerNumber(sc.nextInt());\n\t}", "private String getVehicleRegNumber() {\n LOGGER.info(\"Please type the vehicle registration number \"\n + \"and press enter key\");\n return inputReaderUtil.readVehicleRegistrationNumber();\n }", "public byte[] ReadRecord(byte recNo, byte Len) throws CardException {\n byte[] read_record_bytes = new byte[5];\n\n read_record_bytes[0] = (byte) 0x80;\n read_record_bytes[1] = (byte) 0xB2;\n read_record_bytes[2] = recNo;\n read_record_bytes[3] = (byte) 0x00;\n read_record_bytes[4] = Len;\n\n this.resp = this.ch.transmit(new CommandAPDU(read_record_bytes));\n\n if ((this.LAST_STATUS_CODE = this.resp.getSW()) == 0x9000) {\n System.out.print(\"Record Reading: \");\n\n for (byte bb : this.resp.getData()) {\n System.out.print(\" \" + Integer.toHexString(bb));\n }\n System.out.println(\" -->> OK\");\n return this.resp.getData();\n } else {\n System.out.println(\"Record Reading -->> ERROR\");\n return null;\n }\n }", "@Override\n\tpublic License getLicenseBySerialNo(final String serialNbr, final boolean checkDataIntegrity)\n\t\t\tthrows LicenseException {\n\t\tLicenseLogger.getInstance().finest(this.getClass().getName(), \"getLicenseBySerialNo\", \"Entered\");\n\n\t\tfinal LicenseDataStorageImpl dataStorageImpl = new LicenseDataStorageImpl();\n\t\tfinal StoredLicense storedLicense = dataStorageImpl.getLicenseBySerialNo(serialNbr, checkDataIntegrity);\n\n\t\tif (storedLicense == null) {\n\t\t\tLicenseLogger.getInstance().error(this.getClass().getName(), \"getLicenseBySerialNo\",\n\t\t\t\t\t\"No license file exists for the given serial number\");\n\n\t\t\tfinal LicenseException licenseException = new LicenseException(\n\t\t\t\t\t\" The license data not available in database.\");\n\n\t\t\tlicenseException.setErrorCode(\"CLJL110\");\n\t\t\tLicenseLogger.getInstance().error(this.getClass().getName(), \"getLicenseBySerialNo\",\n\t\t\t\t\t\"error code set to: \" + licenseException.getErrorCode());\n\n\t\t\tthrow licenseException;\n\t\t}\n\n\t\t// LicenseLogger.getInstance().info(this.getClass().getName(), \"getLicenseBySerialNo\", \"Returning License : \" + allLicense);\n\t\treturn null;\n\t}", "public int analogRead(int pin) { // (unsupported in HardAta.ino)\r\n int info = analogInputData[pin & MDB_msk];\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/analoRead #\" + pin + \" = \" + info);\r\n }\r\n return info;\r\n }", "@Override\n public Product read(int produktid) {\n Product productToReturn = new Product();\n try {\n PreparedStatement getSingleProdukt = conn.prepareStatement(\"SELECT * FROM produkter WHERE produktID=?\");\n getSingleProdukt.setInt(1, produktid);\n System.out.println(\"Vi er i read i linie 115\");\n ResultSet rs = getSingleProdukt.executeQuery();\n while (rs.next()) {\n productToReturn = new Product();\n productToReturn.setproduktID(rs.getInt(\"produktID\"));\n productToReturn.setNavn(rs.getString(2));\n productToReturn.setPris(rs.getDouble(3));\n productToReturn.setBeskrivelse(rs.getString(4));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return productToReturn;\n //return null;\n }", "ICard getCard(int cardIndex) throws IllegalArgumentException;", "@Override\n @Transactional(readOnly = true)\n public Card getByCardNumber(String cardNumber) {\n logger.info(\"find one card by \" + cardNumber);\n Card card = cardRepository.findByCardNumber(cardNumber);\n if (card != null) {\n return card;\n }\n throw new EmptyResultDataAccessException(\"card is empty.\", 1);\n }", "public HashMap<String, Car> createCarsFromFile(String filename) throws FileNotFoundException {\n\t\t\n\n\t\tFile fh = new File(filename);\n\t\tScanner myScanner = new Scanner(fh);\n\t\twhile(myScanner.hasNextLine()){\n\t\t\tString line = myScanner.nextLine();\n\t\t\tString[] lineArr = line.split(\";\");\n\t\t\tString id = IdFactory.getRegNr();\n\t\t\tString make = lineArr[0];\n\t\t\tString[] makeStuff = lineArr[1].split(\" \");\n\t\t\tString model = lineArr[0];\n\t\t\tString type = makeStuff[0];\n\t\t\tint mpg = Integer.parseInt(lineArr[4]);\n\t\t\tint weight = Integer.parseInt(lineArr[6]);\n\t\t\tCar c = new Car(make,model,type,mpg,weight);\n\t\t\tmyCars.put(c.getRegNr(),c);\n\t\t\tSystem.out.println(\"CAR\" + c);\n\t\t}\n\t\treturn myCars;\n\t}", "public Car getHead(){\n\t\treturn this.cars.get(0);\n\t}", "@Override\n\tpublic void readConseille(Conseille c) {\n\t\t\n\t}", "double getMagnetic(double reading);", "public Card getCard(int index)\n {\n if( index <0 || index >=52)\n return null;\n\n return cardAry[index];\n }", "ROM getRom();", "public void setCarCode(String carCode)\r\n {\r\n this.carCode = carCode;\r\n }", "public Car(int floor, String color){\n\t\tthis.carPosition = floor;\n\t\tthis.carColor = color;\n\t}", "void printCarInfo();" ]
[ "0.5903144", "0.5836785", "0.5831533", "0.5767813", "0.5743267", "0.5741943", "0.56504303", "0.56087977", "0.55132985", "0.54946095", "0.54809546", "0.5434992", "0.5427066", "0.53960574", "0.538215", "0.53560686", "0.53515786", "0.53355926", "0.53105414", "0.53062785", "0.52942634", "0.5283623", "0.5261214", "0.5253248", "0.5222778", "0.52166647", "0.52110904", "0.52094716", "0.51922005", "0.51844084", "0.51770073", "0.51724577", "0.51695997", "0.51677996", "0.5161167", "0.5159603", "0.51533794", "0.51161206", "0.5115409", "0.51149374", "0.511307", "0.5105853", "0.51048076", "0.50978637", "0.50967985", "0.5096621", "0.5082441", "0.50725806", "0.5070274", "0.50602067", "0.50525904", "0.50350064", "0.50310355", "0.5018252", "0.50119275", "0.5010096", "0.5004172", "0.50023496", "0.4999359", "0.4992559", "0.4984797", "0.49643928", "0.49555063", "0.49511102", "0.49372423", "0.4932701", "0.4925806", "0.49091053", "0.49051973", "0.48993343", "0.4868733", "0.4868554", "0.486796", "0.48653018", "0.48578614", "0.48545116", "0.48539495", "0.48476073", "0.48473558", "0.48428386", "0.4839514", "0.48345274", "0.48319718", "0.48309407", "0.48285782", "0.4822006", "0.48187292", "0.48169085", "0.4815105", "0.4812887", "0.48061797", "0.48056483", "0.4796353", "0.4792659", "0.4792103", "0.47907093", "0.47847366", "0.47820708", "0.4776965", "0.47758117" ]
0.8618744
0
Create a new Gen2PortalWithMaskID command
public Gen2PortalIDWithMaskCommand(byte packetLength, byte memoryBank, byte startingBit, byte maskLength, byte maskValue, byte qValue, byte timeout, byte repeat) { rawmessage = new byte[] { packetLength, 0x20, 0x5E, 0x02, 0x04, memoryBank, startingBit, maskLength,maskValue, 0x01, qValue, timeout, repeat }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createUserCampaignMask(CampaignMask mask) throws DataAccessException;", "void nodeCreate( long id );", "DigitalPin createDigitalPin();", "ID create(NewRoamingGroup group);", "String createContext(PortalControllerContext portalControllerContext, String domain, String code);", "Pin createPin();", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "public CreateRemoteClassic<Msg, Ref> create();", "Guild createGuild(long gameId, String title, String clanPrefix);", "public void create(){}", "public void openPortal(String id){\n\n\n\n\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-24 16:07:21.755 -0400\", hash_original_method = \"6CE719C205449F0EA4502B7666A015C0\", hash_generated_method = \"598EFFAE1DD0E9452464135FF7EE1426\")\n \npublic static String p2pConnect(WifiP2pConfig config, boolean joinExistingGroup) {\n if (config == null) return null;\n List<String> args = new ArrayList<String>();\n WpsInfo wps = config.wps;\n args.add(config.deviceAddress);\n\n switch (wps.setup) {\n case WpsInfo.PBC:\n args.add(\"pbc\");\n break;\n case WpsInfo.DISPLAY:\n //TODO: pass the pin back for display\n args.add(\"pin\");\n args.add(\"display\");\n break;\n case WpsInfo.KEYPAD:\n args.add(wps.pin);\n args.add(\"keypad\");\n break;\n case WpsInfo.LABEL:\n args.add(wps.pin);\n args.add(\"label\");\n default:\n break;\n }\n\n //TODO: Add persist behavior once the supplicant interaction is fixed for both\n // group and client scenarios\n /* Persist unless there is an explicit request to not do so*/\n //if (config.persist != WifiP2pConfig.Persist.NO) args.add(\"persistent\");\n\n if (joinExistingGroup) args.add(\"join\");\n\n int groupOwnerIntent = config.groupOwnerIntent;\n if (groupOwnerIntent < 0 || groupOwnerIntent > 15) {\n groupOwnerIntent = 3; //default value\n }\n args.add(\"go_intent=\" + groupOwnerIntent);\n\n String command = \"P2P_CONNECT \";\n for (String s : args) command += s + \" \";\n\n return doStringCommand(command);\n }", "public String create(KmsPortlet arg0) {\n\t\treturn null;\n\t}", "AliciaLab createAliciaLab();", "public void markPlmnIdCreate() throws JNCException {\n markLeafCreate(\"plmnId\");\n }", "public String createIban()\n {\n String iban = \"\";\n Random r = new Random();\n\n iban += \"NL\";\n for(int i = 1; i <=2; i++)\n {\n iban += Integer.toString(r.nextInt(10));\n }\n\n iban += \"INHO0\";\n for(int i = 1; i <=9; i++)\n {\n iban += Integer.toString(r.nextInt(10));\n }\n if(accountRepository.existsById(iban))\n {\n return createIban();\n }\n return iban;\n }", "Passive_Digital_Artifact createPassive_Digital_Artifact();", "@SuppressWarnings(\"unchecked\")\n protected PortalPresenter(Portal portal) {\n \tthis.portal = portal;\n \tthis.layoutBuilder = (L) LayoutBuilders.get(portal.group);\t\t\n }", "public CreateRemoteClassic<Msg, Ref> infraCreate();", "ORGateway createORGateway();", "public CreateRemoteClassic<Msg, Ref> factCreate();", "private static void create(int num1, int num2) {\n\t\tlong result = (~(~0<<num1)) << num2;\n\t\tSystem.out.println(result);\n\t}", "public void create() {\n\t\t\n\t}", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Chassis createChassis();", "public PlanoSaude create(long plano_id);", "OperacionColeccion createOperacionColeccion();", "@Create\n public void create()\n {\n \n log.debug(\"Creating users and mailboxes\");\n //MailboxService ms = MMJMXUtil.getMBean(\"meldware.mail:type=MailboxManager,name=MailboxManager\", MailboxService.class);\n AdminTool at = MMJMXUtil.getMBean(\"meldware.mail:type=MailServices,name=AdminTool\", AdminTool.class);\n \n for (MeldwareUser meldwareUser : getUsers())\n {\n at.createUser(meldwareUser.getUsername(), meldwareUser.getPassword(), meldwareUser.getRoles());\n // TODO This won't work on AS 4.2\n /*Mailbox mbox = ms.createMailbox(meldwareUser.getUsername());\n for (String alias : meldwareUser.getAliases())\n {\n ms.createAlias(mbox.getId(), alias);\n }*/\n log.debug(\"Created #0 #1 #2\", meldwareUser.isAdministrator() ? \"administrator\" : \"user\", meldwareUser.getUsername(), meldwareUser.getAliases() == null || meldwareUser.getAliases().size() == 0 ? \"\" : \"with aliases \" + meldwareUser.getAliases());\n }\n }", "void link(Portal portal1, Portal portal2);", "public void createAI(int lobbyId)\n {\n //call Client Controller's addAIPlayer method\n clientController.addAIPlayer(new Difficulty(5, 5), lobbyId);\n }", "public static void createBundle() {\r\n\t\tint finished = 1;\r\n\t\tSystem.out.println(\"createBundle\");\r\n\r\n\t\tBundle b = new Bundle(index); // send id in\r\n\t\tList<Path> pathList = new ArrayList<Path>();\r\n\t\tContainerNII bundleNii = new ContainerNII();\r\n\t\tPath path;\r\n\t\t\r\n\t\tinsertNIIValues(bundleNii, strBundle);\r\n\t\tb.setNii(bundleNii);\r\n\r\n\t\twhile (finished == 1){\r\n\t\t\tpath = new Path();\r\n\t\t\tcreatePath(path);\r\n\t\t\tpathList.add(path);\r\n\t\t\tfinished = checkContinue(\"path\");\r\n\t\t}\t\t\r\n\t\tb.setPath(pathList);\r\n\t\t// Add bundle to map\r\n\t\tbundles.put(b.getId(), b);\r\n\t\tindex++;\r\n\t}", "public boolean makePortal(Entity entityIn) {\n/* 203 */ int i = 16;\n/* 204 */ double d0 = -1.0D;\n/* 205 */ int j = MathHelper.floor(entityIn.posX);\n/* 206 */ int k = MathHelper.floor(entityIn.posY);\n/* 207 */ int l = MathHelper.floor(entityIn.posZ);\n/* 208 */ int i1 = j;\n/* 209 */ int j1 = k;\n/* 210 */ int k1 = l;\n/* 211 */ int l1 = 0;\n/* 212 */ int i2 = this.random.nextInt(4);\n/* 213 */ BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();\n/* */ \n/* 215 */ for (int j2 = j - 16; j2 <= j + 16; j2++) {\n/* */ \n/* 217 */ double d1 = j2 + 0.5D - entityIn.posX;\n/* */ \n/* 219 */ for (int l2 = l - 16; l2 <= l + 16; l2++) {\n/* */ \n/* 221 */ double d2 = l2 + 0.5D - entityIn.posZ;\n/* */ \n/* */ \n/* 224 */ for (int j3 = this.worldServerInstance.getActualHeight() - 1; j3 >= 0; j3--) {\n/* */ \n/* 226 */ if (this.worldServerInstance.isAirBlock((BlockPos)blockpos$mutableblockpos.setPos(j2, j3, l2))) {\n/* */ \n/* 228 */ while (j3 > 0 && this.worldServerInstance.isAirBlock((BlockPos)blockpos$mutableblockpos.setPos(j2, j3 - 1, l2)))\n/* */ {\n/* 230 */ j3--;\n/* */ }\n/* */ int k3;\n/* 233 */ label168: for (k3 = i2; k3 < i2 + 4; k3++) {\n/* */ \n/* 235 */ int l3 = k3 % 2;\n/* 236 */ int i4 = 1 - l3;\n/* */ \n/* 238 */ if (k3 % 4 >= 2) {\n/* */ \n/* 240 */ l3 = -l3;\n/* 241 */ i4 = -i4;\n/* */ } \n/* */ \n/* 244 */ for (int j4 = 0; j4 < 3; j4++) {\n/* */ \n/* 246 */ for (int k4 = 0; k4 < 4; k4++) {\n/* */ \n/* 248 */ for (int l4 = -1; l4 < 4; ) {\n/* */ \n/* 250 */ int i5 = j2 + (k4 - 1) * l3 + j4 * i4;\n/* 251 */ int j5 = j3 + l4;\n/* 252 */ int k5 = l2 + (k4 - 1) * i4 - j4 * l3;\n/* 253 */ blockpos$mutableblockpos.setPos(i5, j5, k5);\n/* */ \n/* 255 */ if (l4 >= 0 || this.worldServerInstance.getBlockState((BlockPos)blockpos$mutableblockpos).getMaterial().isSolid()) { if (l4 >= 0 && !this.worldServerInstance.isAirBlock((BlockPos)blockpos$mutableblockpos))\n/* */ break label168; \n/* */ l4++; }\n/* */ \n/* */ break label168;\n/* */ } \n/* */ } \n/* */ } \n/* 263 */ double d5 = j3 + 0.5D - entityIn.posY;\n/* 264 */ double d7 = d1 * d1 + d5 * d5 + d2 * d2;\n/* */ \n/* 266 */ if (d0 < 0.0D || d7 < d0) {\n/* */ \n/* 268 */ d0 = d7;\n/* 269 */ i1 = j2;\n/* 270 */ j1 = j3;\n/* 271 */ k1 = l2;\n/* 272 */ l1 = k3 % 4;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* 280 */ if (d0 < 0.0D)\n/* */ {\n/* 282 */ for (int l5 = j - 16; l5 <= j + 16; l5++) {\n/* */ \n/* 284 */ double d3 = l5 + 0.5D - entityIn.posX;\n/* */ \n/* 286 */ for (int j6 = l - 16; j6 <= l + 16; j6++) {\n/* */ \n/* 288 */ double d4 = j6 + 0.5D - entityIn.posZ;\n/* */ \n/* */ \n/* 291 */ for (int i7 = this.worldServerInstance.getActualHeight() - 1; i7 >= 0; i7--) {\n/* */ \n/* 293 */ if (this.worldServerInstance.isAirBlock((BlockPos)blockpos$mutableblockpos.setPos(l5, i7, j6))) {\n/* */ \n/* 295 */ while (i7 > 0 && this.worldServerInstance.isAirBlock((BlockPos)blockpos$mutableblockpos.setPos(l5, i7 - 1, j6)))\n/* */ {\n/* 297 */ i7--;\n/* */ }\n/* */ int k7;\n/* 300 */ label167: for (k7 = i2; k7 < i2 + 2; k7++) {\n/* */ \n/* 302 */ int j8 = k7 % 2;\n/* 303 */ int j9 = 1 - j8;\n/* */ \n/* 305 */ for (int j10 = 0; j10 < 4; j10++) {\n/* */ \n/* 307 */ for (int j11 = -1; j11 < 4; ) {\n/* */ \n/* 309 */ int j12 = l5 + (j10 - 1) * j8;\n/* 310 */ int i13 = i7 + j11;\n/* 311 */ int j13 = j6 + (j10 - 1) * j9;\n/* 312 */ blockpos$mutableblockpos.setPos(j12, i13, j13);\n/* */ \n/* 314 */ if (j11 >= 0 || this.worldServerInstance.getBlockState((BlockPos)blockpos$mutableblockpos).getMaterial().isSolid()) { if (j11 >= 0 && !this.worldServerInstance.isAirBlock((BlockPos)blockpos$mutableblockpos))\n/* */ break label167; \n/* */ j11++; }\n/* */ \n/* */ break label167;\n/* */ } \n/* */ } \n/* 321 */ double d6 = i7 + 0.5D - entityIn.posY;\n/* 322 */ double d8 = d3 * d3 + d6 * d6 + d4 * d4;\n/* */ \n/* 324 */ if (d0 < 0.0D || d8 < d0) {\n/* */ \n/* 326 */ d0 = d8;\n/* 327 */ i1 = l5;\n/* 328 */ j1 = i7;\n/* 329 */ k1 = j6;\n/* 330 */ l1 = k7 % 2;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* 339 */ int i6 = i1;\n/* 340 */ int k2 = j1;\n/* 341 */ int k6 = k1;\n/* 342 */ int l6 = l1 % 2;\n/* 343 */ int i3 = 1 - l6;\n/* */ \n/* 345 */ if (l1 % 4 >= 2) {\n/* */ \n/* 347 */ l6 = -l6;\n/* 348 */ i3 = -i3;\n/* */ } \n/* */ \n/* 351 */ if (d0 < 0.0D) {\n/* */ \n/* 353 */ j1 = MathHelper.clamp(j1, 70, this.worldServerInstance.getActualHeight() - 10);\n/* 354 */ k2 = j1;\n/* */ \n/* 356 */ for (int j7 = -1; j7 <= 1; j7++) {\n/* */ \n/* 358 */ for (int l7 = 1; l7 < 3; l7++) {\n/* */ \n/* 360 */ for (int k8 = -1; k8 < 3; k8++) {\n/* */ \n/* 362 */ int k9 = i6 + (l7 - 1) * l6 + j7 * i3;\n/* 363 */ int k10 = k2 + k8;\n/* 364 */ int k11 = k6 + (l7 - 1) * i3 - j7 * l6;\n/* 365 */ boolean flag = (k8 < 0);\n/* 366 */ this.worldServerInstance.setBlockState(new BlockPos(k9, k10, k11), flag ? Blocks.OBSIDIAN.getDefaultState() : Blocks.AIR.getDefaultState());\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* 372 */ IBlockState iblockstate = Blocks.PORTAL.getDefaultState().withProperty((IProperty)BlockPortal.AXIS, (l6 == 0) ? (Comparable)EnumFacing.Axis.Z : (Comparable)EnumFacing.Axis.X);\n/* */ \n/* 374 */ for (int i8 = 0; i8 < 4; i8++) {\n/* */ \n/* 376 */ for (int l8 = 0; l8 < 4; l8++) {\n/* */ \n/* 378 */ for (int l9 = -1; l9 < 4; l9++) {\n/* */ \n/* 380 */ int l10 = i6 + (l8 - 1) * l6;\n/* 381 */ int l11 = k2 + l9;\n/* 382 */ int k12 = k6 + (l8 - 1) * i3;\n/* 383 */ boolean flag1 = !(l8 != 0 && l8 != 3 && l9 != -1 && l9 != 3);\n/* 384 */ this.worldServerInstance.setBlockState(new BlockPos(l10, l11, k12), flag1 ? Blocks.OBSIDIAN.getDefaultState() : iblockstate, 2);\n/* */ } \n/* */ } \n/* */ \n/* 388 */ for (int i9 = 0; i9 < 4; i9++) {\n/* */ \n/* 390 */ for (int i10 = -1; i10 < 4; i10++) {\n/* */ \n/* 392 */ int i11 = i6 + (i9 - 1) * l6;\n/* 393 */ int i12 = k2 + i10;\n/* 394 */ int l12 = k6 + (i9 - 1) * i3;\n/* 395 */ BlockPos blockpos = new BlockPos(i11, i12, l12);\n/* 396 */ this.worldServerInstance.notifyNeighborsOfStateChange(blockpos, this.worldServerInstance.getBlockState(blockpos).getBlock(), false);\n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* 401 */ return true;\n/* */ }", "public void markIpAddress2Create() throws JNCException {\n markLeafCreate(\"ipAddress2\");\n }", "public void markIpAddress2Create() throws JNCException {\n markLeafCreate(\"ipAddress2\");\n }", "protected void createAccessMessage() {\n final GenericMessage genericMessage = (GenericMessage) mMeshMessage;\n final ApplicationKey key = genericMessage.getAppKey();\n final int akf = genericMessage.getAkf();\n final int aid = genericMessage.getAid();\n final int aszmic = genericMessage.getAszmic();\n final int opCode = genericMessage.getOpCode();\n final byte[] parameters = genericMessage.getParameters();\n message = mMeshTransport.createMeshMessage(mSrc, mDst, mLabel, key, akf, aid, aszmic, opCode, parameters);\n genericMessage.setMessage(message);\n }", "Adresse createAdresse();", "int createMaskWord(int num_mask, int word_len) {\r\n\t\tint a, b;\r\n\r\n\t\ta = 0;\r\n\t\tfor (int i = 0; i < num_mask; i++) {\r\n\t\t\tb = 1 << (word_len / 2);\r\n\t\t\t// b = 1 << (rand.nextInt()%word_len); //generate a random number\r\n\t\t\t// between 0 and the word_len\r\n\t\t\ta = a | b;\r\n\t\t}\r\n\t\treturn a;\r\n\t}", "@Override\n\tpublic boolean create(NPC_tmpl obj) {\n\t\treturn false;\n\t}", "private static void crearPedidoGenerandoOPP() throws RemoteException {\n\n\t\tlong[] idVariedades = { 25 };\n\t\tint[] cantidades = { 7 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 2\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}", "public boolean tryToCreatePortal(World var1, int var2, int var3, int var4)\n {\n byte var5 = 0;\n byte var6 = 0;\n\n if (var1.getBlockId(var2 - 1, var3, var4) == Block.glowStone.blockID || var1.getBlockId(var2 + 1, var3, var4) == Block.glowStone.blockID)\n {\n var5 = 1;\n }\n\n if (var1.getBlockId(var2, var3, var4 - 1) == Block.glowStone.blockID || var1.getBlockId(var2, var3, var4 + 1) == Block.glowStone.blockID)\n {\n var6 = 1;\n }\n\n if (var5 == var6)\n {\n return false;\n } else\n {\n if (var1.getBlockId(var2 - var5, var3, var4 - var6) == 0)\n {\n var2 -= var5;\n var4 -= var6;\n }\n\n int var7;\n int var8;\n\n for (var7 = -1; var7 <= 2; ++var7)\n {\n for (var8 = -1; var8 <= 3; ++var8)\n {\n boolean var9 = var7 == -1 || var7 == 2 || var8 == -1 || var8 == 3;\n\n if (var7 != -1 && var7 != 2 || var8 != -1 && var8 != 3)\n {\n int var10 = var1.getBlockId(var2 + var5 * var7, var3 + var8, var4 + var6 * var7);\n\n if (var9)\n {\n if (var10 != Block.glowStone.blockID)\n {\n return false;\n }\n } else if (var10 != 0 && var10 != Block.waterMoving.blockID)\n {\n return false;\n }\n }\n }\n }\n\n for (var7 = 0; var7 < 2; ++var7)\n {\n for (var8 = 0; var8 < 3; ++var8)\n {\n var1.setBlock(var2 + var5 * var7, var3 + var8, var4 + var6 * var7, AetherBlocks.AetherPortal.blockID, 0, 2);\n }\n }\n\n return true;\n }\n }", "public suiluppo_equip_allocation create(long equip_allocat_id);", "private void makePacket() throws PacketMappingNotFoundException {\r\n\t\tfinal PacketIdMapping mapping = mapCon.getMappingFor(packetId); //Mapping for id\r\n\t\tif(mapping == null)\r\n\t\t\tthrow new PacketMappingNotFoundException(\"mapping not found for id while constructing packet\", packetId);\r\n\t\tfinal Packet newPacket = mapping.getNewInstance(); //make a packet\r\n\t\tfinal ReadableArrayData packetData = new ReadableArrayData(tempData, false);\r\n\t\tnewPacket.readData(packetData); //read the packet data\r\n\t\tfinishedPacketReceiver.accept(newPacket); //send the packet to the connection\r\n\t}", "private void CUSTOM_SCRAP_CREATE(CalicoPacket p) {\n\t\tp.rewind();\n\t\tp.getInt();\n\t\tlong new_uuid=p.getLong();\n\t\tlong cuuid=p.getLong();\n\t\tint x=p.getInt();\n\t\tint y=p.getInt();\n\t\t\n\t\tCustomScrapController.create_custom_scrap(new_uuid, cuuid, x, y);\n\t\t\n\t}", "OFPortMod createPortMod(DatapathId dpid, OFPort port, Map<OFPortConfig, Boolean> configs) throws PortModException;", "OFPortMod createPortMod(DatapathId dpid, OFPort port, OFPortConfig config, boolean enable) throws PortModException;", "private static void genSecGroup() {\n\t\tSystem.out.println(\"This Program will generate a security group\");\n\t\tSystem.out.println(\"with the name bitcrusher and ssh ability for\");\n\t\tSystem.out.println(\"your ip address.\");\n\t\ttry{\n\t\t\tCreateSecurityGroupRequest secGrpRequest = new CreateSecurityGroupRequest(\"bitcrusher\", \"Ingress group for AWSTool\");\n\t\t\tCreateSecurityGroupResult res = ec2.createSecurityGroup(secGrpRequest);\n\t\t\tSystem.out.println(\"Group \" + res.getGroupId() + \"created.\");\n\t\t\t\n\t\t}catch(AmazonServiceException ase){\n\t\t\tSystem.out.println(\"Group exists. If needed set permissions with -ip option\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\tString ip = \"0.0.0.0/0\";\n\t\t\n\t\t\n\t\tList<String> ipRanges = Collections.singletonList(ip);\n\t\t\n\t\tIpPermission ipPerm = new IpPermission();\n\t\tipPerm.setFromPort(SSH);\n\t\tipPerm.setToPort(SSH);\n\t\tipPerm.setIpRanges(ipRanges);\n\t\tipPerm.setIpProtocol(\"tcp\");\n\t\t\n\t\tList<IpPermission> ipPermList = Collections.singletonList(ipPerm);\n\t\t\n\t\ttry{\n\t\t\tAuthorizeSecurityGroupIngressRequest ingRequest = \n\t\t\t\t\tnew AuthorizeSecurityGroupIngressRequest(\"bitcrusher\", ipPermList);\n\t\t\tec2.authorizeSecurityGroupIngress(ingRequest);\n\t\t\tSystem.out.println(\"Your ip has been authorized with the bitcrusher group.\");\n\t\t\t\n\t\t}catch(AmazonServiceException e){\n\t\t\tSystem.out.println(\"Ip already authorized\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private static void crearPedidoGenerandoOPC() throws RemoteException {\n\n\t\tlong[] idVariedades = { 25, 29, 33 };\n\t\tint[] cantidades = { 6, 8, 11 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 3\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\t\t\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\n\t}", "@Override\n public void doExportCreate(StorageSystem storage, ExportMask exportMask,\n Map<URI, Integer> volumeMap, List<Initiator> initiators, List<URI> targets,\n TaskCompleter taskCompleter) throws DeviceControllerException {\n _log.info(\"{} doExportCreate START ...\", storage.getSerialNumber());\n VolumeURIHLU[] volumeLunArray = ControllerUtils.getVolumeURIHLUArray(\n storage.getSystemType(), volumeMap, dbClient);\n xtremioExportOperationHelper.createExportMask(storage, exportMask.getId(), volumeLunArray,\n targets, initiators, taskCompleter);\n _log.info(\"{} doExportCreate END ...\", storage.getSerialNumber());\n\n }", "private String createPID() {\n return \"7777\";\n }", "CreateDestinationResult createDestination(CreateDestinationRequest createDestinationRequest);", "public boofcv.struct.image.InterleavedF64 createNew(int $param_int_1, int $param_int_2) {\n java.lang.Object $__result = null;\n try {\n if ($__directInvocation)\n $__result = super.createNew( $param_int_1, $param_int_2);\n else {\n java.util.ArrayList<Object> $__params = new java.util.ArrayList<Object>();\n String $__method = \"public boofcv.struct.image.InterleavedF64 boofcv.struct.image.InterleavedF64.createNew(int,int)\";\n $__params.add($param_int_1);\n $__params.add($param_int_2);\n $__result = $__client.onRPC($__method, $__params);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return ((boofcv.struct.image.InterleavedF64) $__result);\n }", "public co.com.telefonica.atiempo.vpistbba.actividades.df.instalacion.ejb.sb.AInstalarTOALocal create()\n\t\tthrows javax.ejb.CreateException;", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "Script createScript();", "private String createConvID(int port, String ipAddress) {\n\n\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(port+ipAddress);\n\n\t\treturn sb.toString();\n\t}", "private void createNewVisualPane(int solverId) {\n }", "LINK createLINK();", "Port createPort();", "Port createPort();", "Accessprofile create(Accessprofile accessprofile);", "@Override\r\n\tpublic int type() {\n\t\treturn Packets.CREATE;\r\n\t}", "public void makeAndSendAgentID(){\n sendID(id, x, y);\n }", "EndPoint createEndPoint();", "@Override\n @POST\n @Path(\"/networks\")\n public Response createNetwork() throws Exception {\n URI resourceUri = new URI(\"/1\");\n return Response.created(resourceUri).build();\n }", "private DomainParticipant createRemoteAdministrationDomainParticipant(\n final int domainId\n ) {\n return createDomainParticipant(domainId, \"RTI Routing Service: remote administration\");\n }", "private void CreatePIDelegationRules() throws isisicatclient.IcatException_Exception {\n Rule piAddExperimenters = new Rule();\r\n piAddExperimenters.crudFlags = \"C\";\r\n piAddExperimenters.what = \"InvestigationUser <-> Investigation <-> InvestigationUser [role = 'principal_experimenter'] <-> User [name = :user]\";\r\n port.create(sessionId, piAddExperimenters);\r\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Slot createSlot();", "public OpticalHopAccessBean(int arg0) throws javax.ejb.CreateException, java.rmi.RemoteException, javax.naming.NamingException {\n ejbRef = ejbHome().create(arg0);\n }", "org.landxml.schema.landXML11.LanesDocument.Lanes addNewLanes();", "public void create(NetworkNode networkNode);", "SerialResponse createRecipient(PinRecipientPost pinRecipientPost);", "Command createCommand();", "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "String createCommand(String commandType, AttributeList properties);", "public static void createNetherPortal(Location frameLocation, BlockFace frontFacingDirection, boolean fillCorners) {\n\n }", "public ManpowerEntity createNewManpower(String mrole, Integer mintnumber, Boolean standard, Long propertyId) {\n return manpowerBeanLocal.addManpower(mrole, mintnumber, standard, propertyId);\r\n }", "public abstract Ability createAbility(MapItem m);", "Lab create();", "public NewTunnelAction() {\r\n putValue(Action.NAME, \"New Tunnel\");\r\n putValue(Action.SMALL_ICON,\r\n new ResourceIcon(ActiveTunnelsSessionPanel.class,\r\n \"add.png\"));\r\n putValue(Action.SHORT_DESCRIPTION, \"New Tunnel\");\r\n putValue(Action.LONG_DESCRIPTION,\r\n \"Create a new secure tunnel\");\r\n putValue(Action.MNEMONIC_KEY, new Integer('n'));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_T, Keyboard_Modifier));\r\n putValue(Action.ACTION_COMMAND_KEY, \"new-tunnel-command\");\r\n putValue(StandardAction.ON_MENUBAR, new Boolean(true));\r\n putValue(StandardAction.MENU_NAME, \"Tunnel\");\r\n putValue(StandardAction.MENU_ITEM_GROUP, new Integer(50));\r\n putValue(StandardAction.MENU_ITEM_WEIGHT, new Integer(10));\r\n putValue(StandardAction.ON_TOOLBAR, new Boolean(true));\r\n putValue(StandardAction.TOOLBAR_GROUP, new Integer(5));\r\n putValue(StandardAction.TOOLBAR_WEIGHT, new Integer(5));\r\n putValue(StandardAction.HIDE_TOOLBAR_TEXT, new Boolean(false));\r\n putValue(StandardAction.ON_CONTEXT_MENU, new Boolean(true));\r\n putValue(StandardAction.CONTEXT_MENU_GROUP, new Integer(5));\r\n putValue(StandardAction.CONTEXT_MENU_WEIGHT, new Integer(5));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_N, Keyboard_Modifier));\r\n }", "SandBox createSandBox(Site site, String sandBoxName, SandBoxType sandBoxType) throws Exception;", "public org.oep.cmon.dao.tlct.model.DanhMucGiayTo create(long id);", "public static Long createManagementNetwork(Long networkId) {\r\n VpnNetwork vpnNetwork = AhRestoreNewMapTools.getMapVpnNetworkBo(networkId);\r\n if(null != vpnNetwork\r\n && vpnNetwork.getNetworkType() != VpnNetwork.VPN_NETWORK_TYPE_MANAGERMENT) {\r\n try {\r\n String networkName = vpnNetwork.getNetworkName();\r\n // chceck if the object is exist\r\n List<VpnNetwork> list = QueryUtil.executeQuery(VpnNetwork.class, null, new FilterParams(\r\n \"networkType=:s1 and networkName=:s2\", new Object[] {\r\n VpnNetwork.VPN_NETWORK_TYPE_MANAGERMENT, networkName }), vpnNetwork\r\n .getOwner().getId());\r\n if(!list.isEmpty()) {\r\n return list.get(0).getId();\r\n }\r\n\r\n QueryUtil.updateBo(VpnNetwork.class, \"networkType=:s1\", new FilterParams(\"id=:s2\",\r\n \t\tnew Object[] {VpnNetwork.VPN_NETWORK_TYPE_MANAGERMENT, networkId}));\r\n return networkId;\r\n } catch (Exception e) {\r\n AhRestoreDBTools.logRestoreMsg(\"create a new management Network error\");\r\n AhRestoreDBTools.logRestoreMsg(e.getMessage());\r\n }\r\n } else {\r\n return networkId;\r\n }\r\n return null;\r\n }", "Cancion createCancion();", "protected abstract CreateRemoteClassic<Msg, Ref> make_create();", "public FMISComLocal create() throws javax.ejb.CreateException;", "@Override\n\tpublic void create() {\n\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public abstract LcpConfigOption create(final int[] data);", "Instruction createInstruction();", "void createRenderableOp(Long id, String opName, ParameterBlock pb)\n\tthrows RemoteException;", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-24 16:07:21.764 -0400\", hash_original_method = \"125C9FCB48CFB302EC02E50FAFEC89ED\", hash_generated_method = \"5DD52EF1CA3D1FA1987B53DA941623F2\")\n \npublic static boolean p2pInvite(WifiP2pGroup group, String deviceAddress) {\n if (deviceAddress == null) return false;\n\n if (group == null) {\n return doBooleanCommand(\"P2P_INVITE peer=\" + deviceAddress);\n } else {\n return doBooleanCommand(\"P2P_INVITE group=\" + group.getInterface()\n + \" peer=\" + deviceAddress + \" go_dev_addr=\" + group.getOwner().deviceAddress);\n }\n }", "protected DPP createDPP() {\n\t\tDPP dpp = new DPP();\n\t\tdpp.add(null, OP_CREATE, ST_CREATED);\n\t\t// dpp.add(ST_CREATED, ..., ...);\n\t\treturn dpp;\n\t}", "private void newNetworkDialogCreateButton(){\n //Create new networkData object here based on the field info\n LabData.NetworkData newNetworkData = new LabData.NetworkData(\n NetworkAddDialogNameTextfield.getText().toUpperCase(),\n NetworkAddDialogMaskTextfield.getText(),\n NetworkAddDialogGatewayTextfield.getText(),\n (int)NetworkAddDialogMacVLanExtSpinner.getValue(),\n (int)NetworkAddDialogMacVLanSpinner.getValue(),\n NetworkAddDialogIPRangeTextfield.getText(),\n NetworkAddDialogTapRadioButton.isSelected()\n );\n \n // Update the list of labs in the current UI data object\n labDataCurrent.getNetworks().add(newNetworkData);\n \n // Add the network into the UI \n addNetworkPanel(newNetworkData);\n \n // Update the Container Config dialogs to include the new network\n updateNetworkReferenceInContainerConfigDialogs(\"Add\", NetworkAddDialogNameTextfield.getText().toUpperCase(), null);\n }", "void create(GameLogic gameLogic);", "@Override\n public Pin createPin(String username, String boardname, String link, String description, String ImageUrl) throws BoardNotFoundException {\n Board board = boardDataGateway.getBoard(username, boardname);\n Pin pin = new Pin(link, description, ImageUrl);\n board.addPin(pin);\n pin.setBoard(board);\n pinDataMapper.add(pin);\n return pin;\n }", "public IGenScheduleHandler create() throws CreateException, RemoteException;", "public void markVlanHostInterface2Create() throws JNCException {\n markLeafCreate(\"vlanHostInterface2\");\n }", "@Override\r\n\tpublic Share create(long shareId) {\r\n\t\tShare share = new ShareImpl();\r\n\r\n\t\tshare.setNew(true);\r\n\t\tshare.setPrimaryKey(shareId);\r\n\r\n\t\tString uuid = PortalUUIDUtil.generate();\r\n\r\n\t\tshare.setUuid(uuid);\r\n\r\n\t\tshare.setCompanyId(companyProvider.getCompanyId());\r\n\r\n\t\treturn share;\r\n\t}", "void createGameCode(GameCode gameCode);", "Command createCommand() throws ServiceException, AuthException;", "@Override\n\tpublic vn.gov.hoabinh.model.Clip createClip(java.lang.String id) {\n\t\treturn _clipLocalService.createClip(id);\n\t}" ]
[ "0.57585764", "0.5080592", "0.5046544", "0.49726465", "0.49583915", "0.48922354", "0.4880681", "0.48726034", "0.48193058", "0.48174837", "0.4815812", "0.47946477", "0.4773732", "0.47732884", "0.47721192", "0.4764956", "0.47633445", "0.47163647", "0.46973747", "0.46813926", "0.4670918", "0.46656144", "0.46481258", "0.46461788", "0.46191487", "0.46124932", "0.4601076", "0.4599495", "0.4586176", "0.4580359", "0.45645514", "0.45429242", "0.45429242", "0.4537067", "0.45327878", "0.45252067", "0.45218518", "0.45105436", "0.45049953", "0.4491665", "0.4489434", "0.44800013", "0.44772717", "0.44741303", "0.44735637", "0.44729176", "0.44697744", "0.446928", "0.44666222", "0.44539976", "0.44454414", "0.4444824", "0.44347155", "0.4434623", "0.44259965", "0.4425606", "0.44219753", "0.44219753", "0.44112414", "0.44049615", "0.44018614", "0.43967858", "0.43926805", "0.4386429", "0.43790084", "0.43728045", "0.43704617", "0.43701637", "0.43666935", "0.43650517", "0.4363875", "0.43600288", "0.4357912", "0.4357856", "0.4357254", "0.4353055", "0.4353013", "0.4351596", "0.43512335", "0.43484476", "0.43393454", "0.43392408", "0.4337085", "0.43355006", "0.43347344", "0.43313935", "0.43298024", "0.4328959", "0.4325986", "0.4321576", "0.43212602", "0.43193066", "0.43193063", "0.43192154", "0.43123788", "0.43105978", "0.4310483", "0.43082464", "0.43055713", "0.43043646" ]
0.64727086
0
Distributes messages over its listeners, the listeners need to find out by themselves if they have the correct object by calling instanceof.
public MessageProcessorDistributor() { this.messageProcessors = new LinkedList<MessageProcessor>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void send(Iterable<T> aMessages) {\n for (Listener<T> myL : _listeners)\n myL.arrived(aMessages);\n }", "public void shoutMessage(Talker t, Class cls) {\n\t\tfor (Listener l: mListenerSet) {\n\t\t\tif (l.getClass().isAssignableFrom(cls)) {\n\t\t\t\tl.onMessageReceived(t.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void handleObject(SocketManager sm, Object msg)\n\t\t{\n\t\t\tif (msg instanceof RequestPeerListMsg)\n\t\t\t{\n\t\t\t\t// start a new thread to send the peer list\n\t\t\t\tif(SessionManager.debug) System.out.println(\"New leader \" + _sm.getIdentity() + \"received RequestPeerListMsg. Sending peer list.\");\n\t\t\t\tnew PeerListSender().start();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// handle a promotion event\n\t\t\tif (msg instanceof PromoteMsg)\n\t\t\t{\n\t\t\t\tif(SessionManager.debug) System.out.println(\"PromoteMsg received by \" + _sm.getIdentity() + \". New leader is \" + ((PromoteMsg) msg).new_leader);\n\t\t\t\t_sm.peerPromoted( ( (PromoteMsg) msg).new_leader);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (msg instanceof ByteBundle)\n\t\t\t{\n\t\t\t\tByteBundle bb = (ByteBundle) msg;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (bb.hasInt)\n\t\t\t\t\t{\n\t\t\t\t\t\t_pos.write(bb.val);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t_pos.write(bb.array);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (IOException ioe)\n\t\t\t\t{\n\t\t\t\t\tioe.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if it wasn't one of the above, pass handling off to the\n\t\t\t// MessageListener.\n\t\t\tsynchronized (PeerChannel.this)\n\t\t\t{\n\t\t\t\t// queue up messages until we get a MessageListener to give these\n\t\t\t\t// to.\n\t\t\t\tif (_ml == null)\n\t\t\t\t{\n\t\t\t\t\t_msg_queue.addLast(msg);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t_ml.messageReceived( (Serializable) msg);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public interface MessageListener extends Listener {\n void onMessage(String roomId, MessageObject object);\n void onAgentDisconnect(String roomId, MessageObject object);\n}", "public interface MessagingQueueListener {\n\n void onMessage(MessageEvent messageEvent);\n}", "public void shoutMessage(Talker t) {\n\t\tfor (Listener l: mListenerSet) {\n\t\t\tl.onMessageReceived(t.getMessage());\n\t\t}\n\t}", "private void notifyListeners() \n\t{\n\t\tSystem.out.println(\"Event Source: Notifying all listeners\");\n\n\t\tfor(IListener listener : listeners)\n\t\t{\n\t\t\tlistener.eventOccured(new Event(this));//passing and object of source\n\t\t}\n\n\t}", "private void receive(EncryptedMessage msg) {\n for (MessageReceiver msgReceiver : subscribedMessageReceivers) {\n msgReceiver.receive(msg);\n }\n }", "private void delegate(MessageEvent event) throws IOException {\n MessageChannel channel = event.getChannel();\n BullyAlgorithmParticipantImpl.Message messageType = BullyAlgorithmParticipantImpl.Message.valueOf(event.getActionCommand());\n\n int senderProcessId = 0;\n try {\n senderProcessId = channel.readNextInt();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n switch(messageType) {\n case Election:\n self.onElectionMessage(senderProcessId);\n break;\n case Answer:\n self.onAnswerMessage(senderProcessId);\n break;\n case Victory:\n self.onVictoryMessage(senderProcessId);\n break;\n }\n }", "public interface MessageTransceiver {\n\n public void shutdown();\n\n public void send(Serializable message) throws MessageException;\n\n public void addMessageListener(MessageListener l);\n\n public void removeMessageListener(MessageListener l);\n\n}", "public interface SendMessageListener {\n abstract void onSendOK(Message msg);\n\n abstract void onSendFailed(Message msg, String reason);\n}", "public void handleMessageReceived(SessionEvent event) {\n \t\tfor(int i = 0; i < getMessageListeners().size(); i++) {\n \t\t\tIMessageListener l = (IMessageListener) getMessageListeners().get(i);\n \t\t\tID from = makeIDFromName(event.getFrom());\n \t\t\tID to = makeIDFromName(event.getTo());\n \t\t\tl.handleMessage(\n \t\t\t\t\tfrom, \n \t\t\t\t\tto, \n \t\t\t\t\tIMessageListener.Type.NORMAL, \n \t\t\t\t\tevent.getFrom(), \n \t\t\t\t\tevent.getMessage());\n \t\t}\n \t}", "public void send(IOutMessage msg) {\n\t\tfor (OutMessageListener2 l : listeners) {\n//\t\t\tlog.debug(\"listener \" + l);\n\t\t\tl.handleMessage(msg);\n\t\t}\n\t}", "private static void send() {\n Map<String, ArrayList<Event>> eventsByStream = new HashMap<>();\n for (Event event : QUEUE) {\n String stream = event.getStream();\n if (!eventsByStream.containsKey(stream) || eventsByStream.get(stream) == null) {\n eventsByStream.put(stream, new ArrayList<>());\n }\n eventsByStream.get(stream).add(event);\n }\n for (String stream : eventsByStream.keySet()) {\n if (Prefs.INSTANCE.isEventLoggingEnabled()) {\n sendEventsForStream(STREAM_CONFIGS.get(stream), eventsByStream.get(stream));\n }\n }\n }", "void processAllMessages() {\n ArrayList<HdmiCecMessage> copiedBuffer = new ArrayList<>(mBuffer);\n mBuffer.clear();\n for (HdmiCecMessage message : copiedBuffer) {\n mDevice.onMessage(message);\n HdmiLogger.debug(\"Processing message:\" + message);\n }\n }", "interface MessageVisitor {\n\t/**\n\t * Methode de visite du Message\n\t * \n\t * @param message\n\t * : Message\n\t */\n\tpublic void visit(Message message);\n\n\t/**\n\t * Methode de visite du BitField\n\t * \n\t * @param bf\n\t * : BitField\n\t */\n\tpublic void visit(BitField bf);\n\n\t/**\n\t * Methode de visite du Choke\n\t * \n\t * @param c\n\t * ; Choke\n\t */\n\tpublic void visit(Choke c);\n\n\t/**\n\t * Methode de visite du Have\n\t * \n\t * @param h\n\t * : Have\n\t */\n\tpublic void visit(Have h);\n\n\t/**\n\t * Methode de visite du Interested\n\t * \n\t * @param i\n\t * : Interested\n\t */\n\tpublic void visit(Interested i);\n\n\t/**\n\t * Methode de visite du KeepAlive\n\t * \n\t * @param ka\n\t * : KeepAlive\n\t */\n\tpublic void visit(KeepAlive ka);\n\n\t/**\n\t * Methode de visite du NotInterested\n\t * \n\t * @param ni\n\t * : NotInterested\n\t */\n\tpublic void visit(NotInterested ni);\n\n\t/**\n\t * Methode de visite du Request\n\t * \n\t * @param r\n\t * : Request\n\t */\n\tpublic void visit(Request r);\n\n\t/**\n\t * Methode de visite du SendBlock\n\t * \n\t * @param sb\n\t * : SendBlock\n\t */\n\tpublic void visit(SendBlock sb);\n\n\t/**\n\t * Methode de visite du Unchoke\n\t * \n\t * @param uc\n\t * : Unchoke\n\t */\n\tpublic void visit(Unchoke uc);\n\t\n\tpublic void visit(SendRSAKey srsak);\n\t\n\tpublic void visit(SendSymmetricKey ssyk);\n}", "public void notifyListeners() {\n Handler handler = new Handler(Looper.getMainLooper()); // TODO reuse\n // handler\n Runnable runnable = new Runnable() {\n\n @Override\n public void run() {\n synchronized (listeners) {\n for (IContentRequester requester : listeners) {\n requester.contentChanged(Content.this);\n }\n }\n }\n };\n boolean success = handler.post(runnable);\n if (success) {\n // Log.d(TAG,\n // \"Posted notification for all listeners from \"+this.toString()+\" to \"+listeners.size()+\" listeners.\");\n Log.d(TAG, \"Posted notification for all listeners from content id \"\n + id + \" to \" + listeners.size() + \" listeners.\");\n } else {\n Log.e(TAG, \"Failed to post notification for all listeners\");\n }\n }", "public interface MessageListener {\n\t\n\t/**\n\t * Method used to consume message\n\t * @param message\tMessage that You want to consume\n\t */\n\tvoid consumeMessage(String message);\n\t\n\t/**\n\t * Method used when You want to get all consumed messages\n\t * @return\tList of messages consumed from a jms queue/topic\n\t */\n\tList<String> getFeeds();\n\n}", "Move listen(IListener ll);", "public void sendToManager(){\n String receiveMessage;\n while((receiveMessage=receiveFrom(messageReader)) != null){\n manager.manage(receiveMessage);\n }\n }", "public interface EventListener {\n void onMessage(GenericRequest message);\n}", "private void onMessage(JsonRpcMessage msg) {\n List<JsonRpcMessage> extraMessages = super.handleMessage(msg, true);\n notifyMessage(msg);\n for(JsonRpcMessage extraMsg: extraMessages) {\n notifyMessage(extraMsg);\n }\n }", "public interface MsgListener {\n\n public void handlerMsg(Channel ctx, SocketMsg msg);\n}", "public interface MessageProcessor{\n\n public void execMessage(MessageWrapper messageWrapper);\n}", "public interface OnSendListener {\n void onSend();\n}", "public interface theListener {\n public void itemToSend(String s);\n }", "private void addMessageListener(TransportAddress localAddr, MessageTypeEventHandler<?> messageListener) {\n EventDispatcher child = children.get(localAddr);\n if (child == null) {\n child = new EventDispatcher();\n children.put(localAddr, child);\n }\n child.addMessageListener(messageListener);\n }", "public void dispatch(EventListener[] aListeners)\n {\n for (int i = aListeners.length; --i >= 0; )\n {\n MemberListener target = (MemberListener) aListeners[i];\n\n switch (getId())\n {\n case MEMBER_JOINED:\n target.memberJoined(this);\n break;\n\n case MEMBER_LEAVING:\n target.memberLeaving(this);\n break;\n\n case MEMBER_LEFT:\n target.memberLeft(this);\n break;\n }\n }\n }", "protected void deliverMessages()\n {\n Set<Envelope> envelopes = messengerDao.getEnvelopes();\n\n Map<String, Set<Envelope>> peerEnvelopesMap = Maps.newHashMap();\n int maxTimeToLive = 0;\n //distribute envelops to peers\n for ( Envelope envelope : envelopes )\n {\n if ( envelope.getTimeToLive() > maxTimeToLive )\n {\n maxTimeToLive = envelope.getTimeToLive();\n }\n Set<Envelope> peerEnvelopes = peerEnvelopesMap.get( envelope.getTargetPeerId() );\n if ( peerEnvelopes == null )\n {\n //sort by createDate asc once more\n peerEnvelopes = new TreeSet<>( new Comparator<Envelope>()\n {\n @Override\n public int compare( final Envelope o1, final Envelope o2 )\n {\n return o1.getCreateDate().compareTo( o2.getCreateDate() );\n }\n } );\n peerEnvelopesMap.put( envelope.getTargetPeerId(), peerEnvelopes );\n }\n\n peerEnvelopes.add( envelope );\n }\n\n\n //try to send messages in parallel - one thread per peer\n try\n {\n for ( Map.Entry<String, Set<Envelope>> envelopsPerPeer : peerEnvelopesMap.entrySet() )\n {\n Peer targetPeer = messenger.getPeerManager().getPeer( envelopsPerPeer.getKey() );\n if ( targetPeer.isLocal() )\n {\n completer.submit(\n new LocalPeerMessageSender( messenger, messengerDao, envelopsPerPeer.getValue() ) );\n }\n else\n {\n completer.submit(\n new RemotePeerMessageSender( messengerDao, targetPeer, envelopsPerPeer.getValue() ) );\n }\n }\n\n //wait for completion\n try\n {\n for ( int i = 0; i < peerEnvelopesMap.size(); i++ )\n {\n Future<Boolean> future = completer.take();\n future.get();\n }\n }\n catch ( InterruptedException | ExecutionException e )\n {\n LOG.warn( \"ignore\", e );\n }\n }\n catch ( PeerException e )\n {\n LOG.error( e.getMessage(), e );\n }\n }", "public interface MessageProcesser {\n\n public void sendMultipleMessage();\n\n public void sendSingleMessage(int tag);\n\n public void parseMessage(String readMessage);\n}", "public interface RubiconMessageListener {\n\t\n\t/**\n\t * Message handlers must override this method to handle incoming messages\n\t * @param message the {@Link RubiconMessage} just received\n\t * @param destination the {@Link RubiconAddress} of the intended destination\n\t */\n\tpublic void handleMessageReceived(RubiconMessage message, RubiconAddress destination); \n}", "private int sendAll( \n Hashtable<Object,Vector<Message>> my_message_table,\n Hashtable<Object,Vector<IReceiveMessage>> my_receiver_table ) \n {\n // get all messages from the message table\n // in an array, and sort based on time\n int num_messages = 0;\n Enumeration<Vector<Message>> lists = my_message_table.elements();\n Vector<Message> list;\n while ( lists.hasMoreElements() )\n {\n list = lists.nextElement();\n num_messages += list.size();\n }\n\n Message messages[] = new Message[ num_messages ];\n lists = my_message_table.elements();\n int index = 0;\n while ( lists.hasMoreElements() )\n {\n list = lists.nextElement();\n for ( int i = 0; i < list.size(); i++ )\n {\n messages[index] = list.elementAt(i);\n index++;\n }\n }\n\n Arrays.sort( messages, new MessageComparator() );\n\n // now route the ordered messages\n // to the receivers, and increment\n // the number of messages sent, if\n // there were any receivers.\n int num_true = 0;\n for ( int i = 0; i < messages.length; i++ )\n if ( sendMessage( messages[i], my_receiver_table ) )\n num_true++;\n // Send the MESSAGES_PROCESSED \n // message, if sending some\n // messages returned true\n if ( num_true > 0 || always_notify )\n sendMessage( MESSAGES_PROCESSED, my_receiver_table );\n\n return num_true;\n }", "@Override\n public void receiveMessages() {\n // put message to currentIncoming message store\n FFIByteVector tmpVector = (FFIByteVector) FFIByteVectorFactory.INSTANCE.create();\n long bytesOfReceivedMsg = 0;\n while (grapeMessager.getPureMessage(tmpVector)) {\n // The retrieved tmp vector has been resized, so the cached objAddress is not available.\n // trigger the refresh\n tmpVector.touch();\n // OutArchive will do the resize;\n if (logger.isDebugEnabled()) {\n logger.debug(\"Frag [{}] digest message of size {}\", fragId, tmpVector.size());\n }\n ///////////////////////////////////////////\n currentIncomingMessageStore.digest(tmpVector);\n ///////////////////////////////////////////\n bytesOfReceivedMsg += tmpVector.size();\n }\n logger.info(\n \"Frag [{}] totally Received [{}] bytes from others starting deserialization\",\n fragId,\n bytesOfReceivedMsg);\n }", "public void fireMessageEvent(StunMessageEvent evt) {\n TransportAddress localAddr = evt.getLocalAddress();\n char messageType = (char) (evt.getMessage().getMessageType() & 0x0110);\n for (MessageTypeEventHandler<?> messageListener : messageListeners) {\n if (messageType == messageListener.messageType) {\n messageListener.handleMessageEvent(evt);\n }\n }\n EventDispatcher child = children.get(localAddr);\n if (child != null) {\n child.fireMessageEvent(evt);\n }\n }", "public interface Listener {\n\n public void onRecievedCustomBroadCast(String msg);\n}", "public interface GamePublisher {\n\t\n\t/**\n\t * Sends a notification that a game has been restored\n\t */\n\tvoid notifyGameRestored();\n\t\n\t/**\n\t * Notification that a new game has commenced\n\t */\n\tvoid notifyNewGame();\n\t\n\t/**\n\t * Notifies all listeners when the board has changed\n\t * \n\t * @param changedPits The modified hollows\n\t */\n\tvoid notifyBoardChanged(List<Pit> changedPits);\n\t\n\t/**\n\t * Notifies all listeners that the current player has another turn\n\t */\n\tvoid notifyPlayerHasAnotherTurn();\n\t\n\t/**\n\t * Notifies all listeners that the given hollow has been captured by the player\n\t * @param capturedPit The captured hollow\n\t */\n\tvoid notifyCapture(Pit capturedPit);\n\t\n\t/**\n\t * Notifies all listeners that the player has changed\n\t * @param newPlayer The new player\n\t */\n\tvoid notifyPlayerChanged(PlayerNumber newPlayer);\n\t\n\t/**\n\t * Notifies all listeners that the game has completed\n\t * \n\t * @param score The final score\n\t */\n\tvoid notifyGameComplete(FinalScore score);\n}", "@FunctionalInterface\npublic interface MessageListener<M> {\n\n default boolean handleFailed(Throwable exception, int attempt) {\n logger().log(Level.WARNING, \"Beetle message processing failed due to: {0}\", exception);\n return true;\n }\n\n default Logger logger() {\n String canonical = getClass().getCanonicalName();\n int offset = canonical.indexOf(\"$$Lambda$\");\n String loggerName = offset > 0 ? canonical.substring(0, offset) : canonical;\n return System.getLogger(loggerName);\n }\n\n default void onDropped(M message, String reason) {\n logger().log(Level.WARNING, reason);\n }\n\n default void onFailure(M message, String reason) {\n logger().log(Level.WARNING, reason);\n }\n\n void onMessage(M message) throws Throwable;\n}", "public int publishToAll(Message message);", "public interface Transport {\n\n /**\n * This method returns id of the current transport\n * @return\n */\n String id();\n\n /**\n * This methos returns Id of the upstream node\n * @return\n */\n String getUpstreamId();\n\n /**\n * This method returns random\n *\n * @param id\n * @param exclude\n * @return\n */\n String getRandomDownstreamFrom(String id, String exclude);\n\n /**\n * This method returns consumer that accepts messages for delivery\n * @return\n */\n Consumer<VoidMessage> outgoingConsumer();\n\n /**\n * This method returns flow of messages for parameter server\n * @return\n */\n Publisher<INDArrayMessage> incomingPublisher();\n\n /**\n * This method starts this Transport instance\n */\n void launch();\n\n /**\n * This method will start this Transport instance\n */\n void launchAsMaster();\n\n /**\n * This method shuts down this Transport instance\n */\n void shutdown();\n\n /**\n * This method will send message to the network, using tree structure\n * @param message\n */\n void propagateMessage(VoidMessage message, PropagationMode mode) throws IOException;\n\n /**\n * This method will send message to the node specified by Id\n *\n * @param message\n * @param id\n */\n void sendMessage(VoidMessage message, String id);\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id) throws InterruptedException;\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id, long waitTime, TimeUnit timeUnit) throws InterruptedException;\n\n /**\n * This method will be invoked for all incoming messages\n * PLEASE NOTE: this method is mostly suited for tests\n *\n * @param message\n */\n void processMessage(VoidMessage message);\n\n\n /**\n * This method allows to set callback instance, which will be called upon restart event\n * @param callback\n */\n void setRestartCallback(RestartCallback callback);\n\n /**\n * This methd allows to set callback instance for various\n * @param cls\n * @param callback\n * @param <T1> RequestMessage class\n * @param <T2> ResponseMessage class\n */\n <T extends RequestMessage> void addRequestConsumer(Class<T> cls, Consumer<T> consumer);\n\n /**\n * This method will be called if mesh update was received\n *\n * PLEASE NOTE: This method will be called ONLY if new mesh differs from current one\n * @param mesh\n */\n void onMeshUpdate(MeshOrganizer mesh);\n\n /**\n * This method will be called upon remap request\n * @param id\n */\n void onRemap(String id);\n\n /**\n * This method returns total number of nodes known to this Transport\n * @return\n */\n int totalNumberOfNodes();\n\n\n /**\n * This method returns ID of the root node\n * @return\n */\n String getRootId();\n\n /**\n * This method checks if all connections required for work are established\n * @return true\n */\n boolean isConnected();\n\n /**\n * This method checks if this node was properly introduced to driver\n * @return\n */\n boolean isIntroduced();\n\n /**\n * This method checks connection to the given node ID, and if it's not connected - establishes connection\n * @param id\n */\n void ensureConnection(String id);\n}", "public synchronized void dispatchMessage(AbstractNetworkMessage msg) {\n\t\tNetworkMessageListener listener = listeners.get(msg.getClass()\n\t\t\t\t.getName());\n\t\tif (listener == null) {\n\t\t\tLogger.printERROR(this.getClass().getName(),\n\t\t\t\t\t\"Listener not found for message: \"\n\t\t\t\t\t\t\t+ msg.getClass().getName());\n\t\t} else {\n\t\t\tlistener.handleNetworkMessage(msg);\n\t\t\tLogger.printDEBUG(this.getClass().getName(),\n\t\t\t\t\t\"Network message handled: \" + msg.getClass().getName());\n\t\t}\n\t}", "default void onMessageReceived(Group group, Message message, Ordering ordering) {}", "public interface MessageReceivedListener {\n\t\n\t/**\n\t * Called when new command/message received\n\t * @param msg Command/message as String\n\t */\n\tpublic void OnMessageReceived(String msg);\n\t\n\t/**\n\t * Called when new file is incoming.\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileIncoming(int length);\n\t\n\t/**\n\t * Called when more data of a file has been transfered\n\t * @param data Byte array of data received\n\t * @param read The lenght of the data received as int\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileDataReceived(byte[] data,int read, int length, int downloaded);\n\t\n\t/**\n\t * Called when file transfer is complete\n\t * @param got\n\t * @param expected\n\t */\n\tpublic void OnFileComplete();\n\t\n\t/**\n\t * Called when an error occur\n\t */\n\tpublic void OnConnectionError();\n\t\n\t/**\n\t * Called when socket has connected to the server\n\t */\n\tpublic void OnConnectSuccess();\n}", "public interface MessageListener<T extends Message> {\r\n\t\r\n\t/**\r\n\t * Metodo que recibe un Message e implementa el metodo que trata este\r\n\t * Message\r\n\t * \r\n\t * @param message \r\n\t */\r\n\tpublic abstract void receiveMessage(T message);\r\n\r\n\t\r\n}", "@Override\n\tpublic void addMessageReceivedListener(MessageReceivedListener messageReceivedListener) {\n\n\t}", "public void transmitEvents(){\n Log.info(\"Transmitting Events\", EventShare.class);\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n for(EventTrigger trigger : eventGroup.getValue()){\n if(trigger.getServer()!=this) { // do not send own events...\n if(trigger.getMethod()!=null){ // its a local event\n if(trigger.getMethod().isAnnotationPresent(ES.class)){\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }else {\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n }", "public void run() {\n int eventseen = 0;\n int looptry = 0;\n int wait = 100;\n while(! isInterrupted()) {\n Iterable<byte[]> stream = new Iterable<byte[]>() {\n @Override\n public Iterator<byte[]> iterator() {\n Iterator<byte[]> i = Receiver.this.getIterator();\n if(i == null) {\n return new Iterator<byte[]>() {\n\n @Override\n public boolean hasNext() {\n return false;\n }\n\n @Override\n public byte[] next() {\n return null;\n }\n\n };\n } else {\n return i;\n }\n }\n };\n try {\n for(byte[] e: stream) {\n logger.trace(\"new message received: {}\", e);\n if(e != null) {\n eventseen++;\n //Wrap, but not a problem, just count as 1\n if(eventseen < 0) {\n eventseen = 1;\n }\n Event event = new Event();\n decode(event, e);\n send(event);\n }\n }\n } catch (Exception e) {\n eventseen = 0;\n logger.error(e.getMessage());\n logger.catching(e);\n }\n // The previous loop didn't catch anything\n // So try some recovery\n if(eventseen == 0) {\n looptry++;\n logger.debug(\"event seen = 0, try = {}\", looptry);\n // A little magic, give the CPU to other threads\n Thread.yield();\n if(looptry > 3) {\n try {\n Thread.sleep(wait);\n wait = wait * 2;\n looptry = 0;\n } catch (InterruptedException ex) {\n break;\n }\n }\n } else {\n looptry = 0;\n wait = 0;\n }\n }\n }", "protected void handleInboundMessage(Object msg) {\n/* 748 */ inboundMessages().add(msg);\n/* */ }", "void onRecvObject(Object object);", "@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}", "protected void processMessagesOnConnection() {\n try {\n logger.info(\"Connected to \" + getConnectionName());\n state.set(StreamState.CONNECTED);\n notifyConnection();\n inputBuffer.flip();\n\n while (!Thread.currentThread().isInterrupted() && isConnected()) {\n try {\n // Find the start of message\n byte byStart = 0;\n while(byStart != START_OF_MSG && !Thread.currentThread().isInterrupted() && isConnected()) {\n byStart = nextByte(inputBuffer);\n }\n\n // and then make sure there are enough bytes and read the protocol\n readCompleteMessage(inputBuffer);\n if(inputBuffer.get() != protocol.getKeyIdentifier()) throw new TcProtocolException(\"Bad protocol\");\n\n logByteBuffer(\"Line read from stream\", inputBuffer);\n\n // now we take a shallow buffer copy and process the message\n MenuCommand mc = protocol.fromChannel(inputBuffer);\n logger.info(\"Command received: \" + mc);\n notifyListeners(mc);\n }\n catch(TcProtocolException ex) {\n // a protocol problem shouldn't drop the connection\n logger.warn(\"Probable Bad message reason='{}' Remote={} \", ex.getMessage(), getConnectionName());\n }\n }\n logger.info(\"Disconnected from \" + getConnectionName());\n } catch (Exception e) {\n logger.error(\"Problem with connectivity on \" + getConnectionName(), e);\n }\n finally {\n close();\n }\n }", "@Override\n\tpublic void run() {\n try {\n while (true) {\n Socket socket = listener.accept();\n try {\n \t\n\t\t\t\t\tDataInputStream in = new DataInputStream(\n\t\t\t\t\t\t\tsocket.getInputStream());\n\t\t\t\t\tBufferedReader d = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(in));\n\n\t\t\t\t\tString msg = d.readLine();\n\t\t\t\t\t\n third.notifyAllClients(msg);\n \n d.close();\n in.close();\n } finally {\n socket.close();\n }\n }\n } catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n finally {\n try {\n\t\t\t\tlistener.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n\t}", "@Override\n\t\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\t\tif (method.getDeclaringClass().equals(Object.class))\n\t\t\t\tthrow new IllegalStreamGraphException(\"Call to Object method \"+method+\" through portal\", sender);\n\n\t\t\t//We probably don't have access to the message interface, but we\n\t\t\t//need to call its methods anyway. This might fail under a security\n\t\t\t//manager, or if the interface is somehow security sensitive to the\n\t\t\t//Java platform(?).\n\t\t\tmethod.setAccessible(true);\n\n\t\t\tfor (Worker<?, ?> recipient : recipients) {\n\t\t\t\tMessageConstraint constraint = constraints.get(recipient);\n\t\t\t\tassert constraint != null;\n\n\t\t\t\t//Queue up the message at the recipient.\n\t\t\t\tMessage message = new Message(method, args, constraint.getDeliveryTime(Workers.getExecutions(sender)));\n\t\t\t\tWorkers.sendMessage(recipient, message);\n\t\t\t}\n\n\t\t\t//Methods on the portal interface return void.\n\t\t\treturn null;\n\t\t}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tprivate void deliver(Message m) {\n List<Consumer> listOfSpecificConsumers =\n manager.getConsumerManager().getConsumersFor(m.getContent().getClass());\n for (Consumer consumer : listOfSpecificConsumers) {\n \tConsumerManagementInfo info = manager.getConsumerManager().getManagementInfo(consumer);\n \tif ( info.canReceive(m) ) {\n \t\tconsumer.consume(m.getContent());\n \t}\n }\n if ( listOfSpecificConsumers.size() > 1 ) {\n \tassert Logger.info(this, \"Dispatched object to \" + listOfSpecificConsumers.size() + \" consumers\");\n }\n\n }", "@Override\n\tpublic void onMessage(Message msg) {\n\t\tSystem.out.println(\"[INFO] [HANDLE ACL MSG] Received ACL message in QueueMDB\");\n\t\ttry {\n\t\t\tACLMessage receivedMessage = (ACLMessage) ((ObjectMessage) msg).getObject();\n\t\t\tAID[] receivers = receivedMessage.getReceivers();\n\t\t\tSet<String> ipAddresses = new HashSet<String>();\n\t\t\t\n\t\t\tSystem.out.println(\"[INFO] [HANDLE ACL MSG] Forwarding messages to agents on this host\");\n\t\t\tfor (AID a: receivers) {\n\t\t\t\tif(a.getHost().getIpAddress().equals(this.hostManagerBean.getCurrentSlaveHost().getIpAddress())) {\n\t\t\t\t\tAgent at = HostService.findAgentWithAID(this.hostManagerBean.getRunningAgents().get(this.hostManagerBean.getCurrentSlaveHost().getIpAddress()), a);\n\t\t\t\t\tat.handleMessage(receivedMessage);\n\t\t\t\t} else {\n\t\t\t\t\tipAddresses.add(a.getHost().getIpAddress());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"[INFO] [HANDLE ACL MSG] Forwarding messages to agents on other hosts\");\n\t\t\tfor(String receivingHostIp: ipAddresses) {\n\t\t\t\tSystem.out.println(\"[INFO] [HANDLE ACL MSG] Forwarding message to {\" + receivingHostIp + \"}\");\n\t\t\t\tRestHostBuilder.sendACLMessageBuilder(this.hostManagerBean.getCurrentSlaveHost(), receivingHostIp, receivedMessage);\n\t\t\t}\n\t\t\t\n\t\t\t//TODO Update socket\n\t\t\t//TODO kad se sve poruke posalju, potrebno je azurirati spisak ACL poruka\n\t\t\t\n\t\t\tSystem.out.println(\"[INFO] [HANDLE ACL MSG] FINISHED\");\n\t\t\t//ws.echoTextMessage(tmsg.getText());\n\t\t} catch (JMSException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "default void dispatchConsumers() {\n\t\tthis.getItemListeners().forEach(Runnable::run);\n\t}", "@Override\n public void onReceive(Object msg) throws Exception {\n }", "public interface SmsListener {\n\n public void messageReceived(String message);\n}", "private void handleResultListeners(final UIObject sender,\n\t\t\tfinal String listenerType) {\n\t\tGDataObject dataObject = new GDataObject();\n String senderId = getComponentId(sender);\n dataObject.setSenderId(senderId);\n dataObject.setListenerType(listenerType);\n ClientApplicationContext.getInstance().fireResult(dataObject);\n\t}", "public abstract void msgHandler(Message msg);", "void subscribeReceiveListener(IDataReceiveListener listener);", "abstract void onMessage(byte[] message);", "public interface TextileEventListener {\n\n /**\n * Called when the Textile node is started successfully\n */\n void nodeStarted();\n\n /**\n * Called when the Textile node fails to start\n * @param e The error describing the failure\n */\n void nodeFailedToStart(Exception e);\n\n /**\n * Called when the Textile node is successfully stopped\n */\n void nodeStopped();\n\n /**\n * Called when the Textile node fails to stop\n * @param e The error describing the failure\n */\n void nodeFailedToStop(Exception e);\n\n /**\n * Called when the Textile node comes online\n */\n void nodeOnline();\n\n /**\n * Called when the node is scheduled to be stopped in the future\n * @param seconds The amount of time the node will run for before being stopped\n */\n void willStopNodeInBackgroundAfterDelay(int seconds);\n\n /**\n * Called when the scheduled node stop is cancelled, the node will continue running\n */\n void canceledPendingNodeStop();\n\n /**\n * Called when the Textile node receives a notification\n * @param notification The received notification\n */\n void notificationReceived(Notification notification);\n\n /**\n * Called when any thread receives an update\n * @param feedItem The thread update\n */\n void threadUpdateReceived(FeedItem feedItem);\n\n /**\n * Called when a new thread is successfully added\n * @param threadId The id of the newly added thread\n */\n void threadAdded(String threadId);\n\n /**\n * Called when a thread is successfully removed\n * @param threadId The id of the removed thread\n */\n void threadRemoved(String threadId);\n\n /**\n * Called when a peer node is added to the user account\n * @param peerId The id of the new account peer\n */\n void accountPeerAdded(String peerId);\n\n /**\n * Called when an account peer is removed from the user account\n * @param peerId The id of the removed account peer\n */\n void accountPeerRemoved(String peerId);\n\n /**\n * Called when any query is complete\n * @param queryId The id of the completed query\n */\n void queryDone(String queryId);\n\n /**\n * Called when any query fails\n * @param queryId The id of the failed query\n * @param e The error describing the failure\n */\n void queryError(String queryId, Exception e);\n\n /**\n * Called when there is a thread query result available\n * @param queryId The id of the corresponding query\n * @param thread A thread query result\n */\n void clientThreadQueryResult(String queryId, Thread thread);\n\n /**\n * Called when there is a contact query result available\n * @param queryId The id of the corresponding query\n * @param contact A contact query result\n */\n void contactQueryResult(String queryId, Contact contact);\n}", "public void pushMessage(Message message) {\n for (IMessageListener listener : listeners) {\n listener.pushMessage(message);\n }\n }", "public interface MessageClasses\n <I extends WritableComparable, M extends Writable> extends Writable {\n /**\n * Get message class\n * @return message class\n */\n Class<M> getMessageClass();\n\n /**\n * Create new instance of MessageValueFactory\n * @param conf Configuration\n * @return message value factory\n */\n MessageValueFactory<M> createMessageValueFactory(\n ImmutableClassesGiraphConfiguration conf);\n\n /**\n * Create new instance of MessageCombiner\n * @param conf Configuration\n * @return message combiner\n */\n MessageCombiner<? super I, M> createMessageCombiner(\n ImmutableClassesGiraphConfiguration\n <I, ? extends Writable, ? extends Writable> conf);\n\n /**\n * Has message combiner been specified\n * @return has message combiner been specified\n */\n boolean useMessageCombiner();\n\n /**\n * Get MessageEncodeAndStoreType\n * @return message encode and store type\n */\n MessageEncodeAndStoreType getMessageEncodeAndStoreType();\n\n /**\n * Creates a fresh copy of this object,\n * to be used and changed for new superstep.\n * (that should be independent from the previous one)\n *\n * @return message classes\n */\n MessageClasses<I, M> createCopyForNewSuperstep();\n\n /**\n * Verify if types are internally consistent\n *\n * @param conf Configuration\n */\n void verifyConsistent(ImmutableClassesGiraphConfiguration conf);\n\n /**\n * Whether to completely ignore existing vertices,\n * and just process messages\n *\n * @return ignoreExistingVertices\n */\n boolean ignoreExistingVertices();\n}", "public void accept(MessageVisitor visitor);", "public interface DataReceiver {\n LogReplicationEntry receive(LogReplicationEntry message);\n}", "@Override\n\tpublic void process(MessageStream<ServerMessage> message)\n\t{\n\t\t\n\t}", "@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}", "public interface SocketMessageListerner {\n void onGetMessageAck(Message message, int type);\n}", "protected void handleOutboundMessage(Object msg) {\n/* 741 */ outboundMessages().add(msg);\n/* */ }", "public interface Listener {}", "public synchronized boolean dispatchMessages()\n { \n synchronized(lists_lock)\n {\n\n if ( message_table.size() <= 0 ) // nothing to send\n {\n if ( always_notify )\n send( MESSAGES_PROCESSED );\n return false;\n }\n // grab all current messages and\n // replace master table of messgaes\n // with a new empty table\n sender_message_table = message_table;\n message_table = new Hashtable<Object,Vector<Message>>();\n\n // get copy of table of receivers\n sender_receiver_table = new Hashtable<Object,Vector<IReceiveMessage>>();\n\n Vector<IReceiveMessage> list;\n Vector<IReceiveMessage> new_list;\n Enumeration keys = receiver_table.keys();\n while ( keys.hasMoreElements() )\n {\n Object key = keys.nextElement();\n list = receiver_table.get( key );\n new_list = new Vector<IReceiveMessage>();\n for ( int i = 0; i < list.size(); i++ )\n new_list.add( list.elementAt(i) );\n sender_receiver_table.put( key, new_list );\n }\n\n int n_changed = sendAll( sender_message_table, sender_receiver_table );\n if ( n_changed > 0 )\n return true;\n else\n return false;\n }\n }", "public void sendMessageListener(Bundle bundle) {\n\n for (int i = listenerGCMMessage.size() - 1; i >= 0; i--) {\n listenerGCMMessage.get(i).loopBackReceiveGCM(bundle);\n }\n }", "protected void notifyListeners(BAEvent event) {\n \t\ttmc.callListeners(event); /// Call our listeners listening to only this match\n \t\tevent.callEvent(); /// Call bukkit listeners for this event\n \t}", "public interface EventSink {\n\n /**\n * Generate event, that a new peer has been discovered for some torrent.\n *\n * @since 1.5\n */\n void firePeerDiscovered(TorrentId torrentId, Peer peer);\n\n /**\n * Generate event, that a new connection with some peer has been established.\n *\n * @since 1.9\n */\n void firePeerConnected(ConnectionKey connectionKey);\n\n /**\n * Generate event, that a connection with some peer has been terminated.\n *\n * @since 1.9\n */\n void firePeerDisconnected(ConnectionKey connectionKey);\n\n /**\n * Generate event, that local information about some peer's data has been updated.\n *\n * @since 1.9\n */\n void firePeerBitfieldUpdated(TorrentId torrentId, ConnectionKey connectionKey, Bitfield bitfield);\n\n /**\n * Generate event, that processing of some torrent has begun.\n *\n * @since 1.5\n */\n void fireTorrentStarted(TorrentId torrentId);\n\n /**\n * Generate event, that torrent's metadata has been fetched.\n *\n * @since 1.9\n */\n void fireMetadataAvailable(TorrentId torrentId, Torrent torrent);\n\n /**\n * Generate event, that processing of some torrent has finished.\n *\n * @since 1.5\n */\n void fireTorrentStopped(TorrentId torrentId);\n\n /**\n * Generate event, that the downloading and verification\n * of one of torrent's pieces has been finished.\n *\n * @since 1.8\n */\n void firePieceVerified(TorrentId torrentId, int pieceIndex);\n}", "public void send(String raw_msg, AbstractVisitor sender) {\n\n for(AbstractVisitor user : users) {\n if(sender != user) {\n user.receive(\"From \" + sender.getName() + \" to \" + user.getName() + \": \" + raw_msg);\n }\n }\n\n }", "public void handleMessageEvent(StunMessageEvent e) {\n delegate.handleMessageEvent(e);\n }", "public void handleMessageEvent(StunMessageEvent e) {\n delegate.handleMessageEvent(e);\n }", "public interface IDataListener<T> {\n void attach(List<T> objects);\n void attach(T object);\n void failure(String msg);\n}", "public interface Pipeline {\n void pushMessage(ChatMessage message);\n}", "public interface OnEventAvailableListener {\n\tpublic void OnEventAvailable(Message msg);\n}", "private static void performMessageExchange(List<Integer> users, int dosIDForHour){\n // For all pairs of users, send messages from one queue to the other with queue constraints in mind.\n MobyUser mobyUser1, mobyUser2;\n Collections.sort(users);\n for (int u1 : users) {\n mobyUser1 = mobyUserHashMap.get(u1);\n mobyUser1.performDosExchangeForHour(dosIDForHour, dosNumber);\n for (int u2 : users) {\n mobyUser2 = mobyUserHashMap.get(u2);\n mobyUser1.performMessageExchangeTailDrop(mobyUser2, dosNumber, dosIDForHour);\n }\n }\n\n }", "void onMessageReceived(Message message);", "public void travelMessages() {\n Set<MessageInterface> messages = travelingMessages.keySet();\n \n Statistics statistics = Statistics.getStatistics();\n statistics.calculateNetworkLoad(messages.size());\n Set<MessageInterface> messagesToBeRemoved = new HashSet<>();\n for (MessageInterface message : messages) {\n Integer leftDistance = travelingMessages.get(message) - 1;\n if (leftDistance <= 0) {\n messagesToBeRemoved.add(message);\n arrivedMessages.add(message);\n } else {\n travelingMessages.put(message, leftDistance);\n }\n }\n messagesToBeRemoved.forEach(message -> travelingMessages.remove(message));\n }", "@Override\n public void processMessage(int type, String receivedMsg) {\n }", "private void forwardMessageToAll(Message m) {\n for (GuestToken tok: guestTokens.values())\n {\n tok.sendMessage(m);\n }\n for (EmployeeToken tok: employeeTokens.values())\n {\n tok.sendMessage(m);\n }\n }", "public interface MessageReceived {\n void onMessageReceived(String message);\n}", "@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\t}", "protected void messageList() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tmessageStore.print();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "protected void notifyListeners() {\n // TODO could these be done earlier (or just once?)\n JMeterContext threadContext = getThreadContext();\n JMeterVariables threadVars = threadContext.getVariables();\n SamplePackage pack = (SamplePackage) threadVars.getObject(JMeterThread.PACKAGE_OBJECT);\n if (pack == null) {\n // If child of TransactionController is a ThroughputController and TPC does\n // not sample its children, then we will have this\n // TODO Should this be at warn level ?\n log.warn(\"Could not fetch SamplePackage\");\n } else {\n SampleEvent event = new SampleEvent(res, threadContext.getThreadGroup().getName(),threadVars, true);\n // We must set res to null now, before sending the event for the transaction,\n // so that we can ignore that event in our sampleOccured method\n res = null;\n- // bug 50032 \n- if (!getThreadContext().isReinitializingSubControllers()) {\n- lnf.notifyListeners(event, pack.getSampleListeners());\n- }\n+ lnf.notifyListeners(event, pack.getSampleListeners());\n }\n }", "private void addListeners(){\n Conservable[] listenerFromProductTypeRelation = this.productRelation.getListener();\n this.listener[0] = listenerFromProductTypeRelation[0];\n this.listener[1] = listenerFromProductTypeRelation[1];\n this.listener[2] = this.post;\n this.listener[3] = this.productRelation;\n this.listener[4] = this;\n }", "public void notifyObjectReceived(NetObject netObject){\r\n for (SocketClientHandlerObserver obs:observers) {\r\n obs.onActionObjectReceived(netObject, this);\r\n }\r\n }", "@Override\n protected void sink(Message message) {\n }", "@Override\r\n\tpublic void receiveMessage(Stanza stanza, Object payload) {\r\n\t\t//CHECK WHICH END BUNDLE TO BE CALLED THAT I MANAGE\r\n\t\tif (payload instanceof CalcBean){ \r\n\t\t\tCalcBean messageBean = (CalcBean)payload;\r\n\t\t\tLOG.debug(\"*** Message Recieved by ExampleCommMgr: \" + messageBean.getMessage());\r\n\t\t}\r\n\t}", "void broadCastMessageLocal(Message message) {\n/* 1691 */ if (this.creatures != null)\n/* 1692 */ for (Iterator<Creature> it = this.creatures.iterator(); it.hasNext(); ) {\n/* */ \n/* 1694 */ Creature creature = it.next();\n/* 1695 */ if (!creature.getCommunicator().isInvulnerable()) {\n/* 1696 */ creature.getCommunicator().sendMessage(message);\n/* */ }\n/* */ } \n/* */ }", "@Override\n public void onReceive(Object message) throws Exception {\n }", "public void onMessage(Message msg) {\r\n if (logger.isLoggable(BasicLevel.DEBUG))\r\n logger.log(BasicLevel.DEBUG, \"MBSConnectionDelegate.onMessage(..): \" + msg);\r\n\r\n if (! (msg instanceof ObjectMessage)) {\r\n logger.log(BasicLevel.ERROR,\r\n \"JMSConnector.onMessage: message received is not an ObjectMessage:\" + msg);\r\n return;\r\n }\r\n\r\n NotificationDesc notificationDesc = null;\r\n try {\r\n notificationDesc = (NotificationDesc) ((ObjectMessage) msg).getObject();\r\n } catch (Exception exc) {\r\n logger.log(BasicLevel.ERROR, \"MBSConnectionDelegate.onMessage:\", exc);\r\n return;\r\n }\r\n\r\n try {\r\n List<NotificationListenerDesc> list = hashTableNotificationListener.get(notificationDesc.name);\r\n if (list != null) {\r\n Iterator<NotificationListenerDesc> it = list.iterator();\r\n while (it.hasNext()) {\r\n try {\r\n NotificationListenerDesc listenerDesc = it.next();\r\n if ((listenerDesc.filter != null) &&\r\n ! listenerDesc.filter.isNotificationEnabled(notificationDesc.not)) {\r\n continue;\r\n }\r\n listenerDesc.listener.handleNotification(notificationDesc.not, listenerDesc.handback);\r\n } catch (Exception exc) {\r\n logger.log(BasicLevel.ERROR,\r\n \"MBSConnectionDelegate.onMessage: Error handling notification\", exc);\r\n }\r\n }\r\n }\r\n } catch (Exception exc) {\r\n logger.log(BasicLevel.ERROR, \"MBSConnectionDelegate.onMessage:\", exc);\r\n }\r\n }", "private void sendGMToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(0, msg, true));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }", "public interface Listener {\n}", "public interface Listener {\n}", "private void onReceiveMessage(Edge edgeItoJ) throws FactorException {\n\t\t\tSystem.out.printf(\"%s receiving message from %s, upward? %s\\n\", this.toString(), edgeItoJ.getOtherVertex(this), _bumpOnUpwardPass);\n\t\t\tif(!_neighborEdges.containsKey(edgeItoJ)) {\n\t\t\t\tSystem.err.println(\"hello check\");\n\t\t\t}\n\t\t\t_neighborEdges.put(edgeItoJ, true);\n\t\t\tcomputeBeliefIfReady();\n\t\t}" ]
[ "0.6252939", "0.60709524", "0.56272465", "0.5624476", "0.5585374", "0.55694467", "0.55668366", "0.55622876", "0.5520723", "0.54916877", "0.54333955", "0.53648126", "0.5356231", "0.5352575", "0.5349655", "0.5348219", "0.5334316", "0.53289425", "0.52942246", "0.52888155", "0.5268665", "0.52453375", "0.5229244", "0.5223563", "0.5221484", "0.5219451", "0.52187014", "0.5208788", "0.5207798", "0.520736", "0.52028745", "0.5193645", "0.51889163", "0.51881534", "0.51752996", "0.5157898", "0.5149219", "0.5143515", "0.5142687", "0.5124149", "0.5111755", "0.5108881", "0.5094193", "0.5094179", "0.50914454", "0.5090664", "0.50888467", "0.5081744", "0.50712717", "0.5066415", "0.5063724", "0.50590205", "0.50562316", "0.505535", "0.505376", "0.5053559", "0.5045545", "0.5033597", "0.50288236", "0.50267315", "0.5018383", "0.5017942", "0.5008307", "0.5007534", "0.5002047", "0.4991724", "0.4990354", "0.49896395", "0.4986344", "0.49862942", "0.49858472", "0.4979077", "0.49774832", "0.49746308", "0.4969325", "0.49535197", "0.49527773", "0.49527773", "0.495036", "0.49455133", "0.49446973", "0.49419227", "0.49383116", "0.49374336", "0.4936694", "0.4928571", "0.4928292", "0.49271023", "0.49184823", "0.49184397", "0.49161813", "0.4914779", "0.49079475", "0.49062762", "0.4904129", "0.49014038", "0.49011502", "0.4900578", "0.4899552", "0.4899552", "0.48940054" ]
0.0
-1
Combined with a message"receiver" this calls a method of the robotarm
public void processMessage(byte[] message) { try { Object receivedMessage = Serializer.deserialize(message); processMessage(receivedMessage); } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void communicate() {\n // Send\n for (int i = 0; i < robots.length; i++) {\n if (i != this.id) {\n if (objectFound) {\n System.out.println(\"Robot \" + this.id + \": Telling everyone else...\");\n this.robots[i].mailbox[i] = new Message(this.id, this.objectFound, goal);\n } else {\n this.robots[i].mailbox[i] = new Message(this.id, this.objectFound, null);\n }\n }\n }\n // Read\n for (int i = 0; i < mailbox.length; i++) {\n if (i != this.id && mailbox[i] != null && mailbox[i].objectFound) {\n this.objectFound = true;\n this.goal = mailbox[i].objectLocation;\n }\n }\n }", "public void action() {\n MessageTemplate template = MessageTemplate.MatchPerformative(CommunicationHelper.GUI_MESSAGE);\n ACLMessage msg = myAgent.receive(template);\n\n if (msg != null) {\n\n /*-------- DISPLAYING MESSAGE -------*/\n try {\n\n String message = (String) msg.getContentObject();\n\n // TODO temporary\n if (message.equals(\"DistributorAgent - NEXT_SIMSTEP\")) {\n \tguiAgent.nextAutoSimStep();\n // wykorzystywane do sim GOD\n // startuje timer, zeby ten zrobil nextSimstep i statystyki\n // zaraz potem timer trzeba zatrzymac\n }\n\n guiAgent.displayMessage(message);\n\n } catch (UnreadableException e) {\n logger.error(this.guiAgent.getLocalName() + \" - UnreadableException \" + e.getMessage());\n }\n } else {\n\n block();\n }\n }", "@Override\n\tpublic void run() {\n\t\ttarget.call(msg);\n\t}", "void sendMessage() {\n\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\n\t\t\ttry {\n\t\t\t\tHippoWebService connect = new HippoWebService();\n\t\t\t\tString[] split = _queryString.split(\",\");\n\t\t\t\t_busStop = split[1];\n\t\t\t\tString api = \"http://pda.5284.com.tw/MQS/businfo4.jsp?SLID=\" + split[0];\n\t\t\t\tString ret = connect.getMethod(api, \"utf-8\");\n\t\t\t if(ret!=null)\n\t\t\t {\n\t\t\t \tmsg.what = 101;\n\t\t\t \tmsg.obj = ret;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tmsg.what = 999;\n\t\t\t \tmsg.obj = \"Error\";\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tmsg.what = 999;\n\t\t\t\tmsg.obj = e.toString();\n\t\t\t}\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\n\t\t\ttry {\n\t\t\t\tHippoWebService connect = new HippoWebService();\n\t\t\t\tString[] split = _queryString.split(\",\");\n\t\t\t\t_busStop = split[1];\n\t\t\t\tString api = \"http://pda.5284.com.tw/MQS/businfo4.jsp?SLID=\" + split[0];\n\t\t\t\tString ret = connect.getMethod(api, \"utf-8\");\n\t\t\t if(ret!=null)\n\t\t\t {\n\t\t\t \tmsg.what = 102;\n\t\t\t \tmsg.obj = ret;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tmsg.what = 999;\n\t\t\t \tmsg.obj = \"Error\";\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tmsg.what = 999;\n\t\t\t\tmsg.obj = e.toString();\n\t\t\t}\n\t\t\tmHandler.sendMessage(msg);\n\t\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}", "@Override\n public void handleMessage(Message msg){\n BTRobotRemoteActivity activity = outer.get();\n\n //can't access main UI activity\n if(activity == null){return;}\n\n //find out what message was sent\n switch(msg.what){\n //bluetooth\n case BluetoothClientService.MESSAGE_STATE_CHANGE:{\n //update bluetooth connection status\n activity.setStatus(msg.arg1);\n break;\n }\n //service wrote data \n case BluetoothClientService.MESSAGE_WRITE:{\n //store data as a string\n String writeMessage = new String((byte[]) msg.obj);\n break;\n }\n //service read data\n case BluetoothClientService.MESSAGE_READ:{\n String readMessage = new String((byte[])msg.obj, 0, msg.arg1);\n break;\n }\n //service retreived device's name\n case BluetoothClientService.MESSAGE_DEVICE_NAME:{\n // save the connected device's name\n activity.setDeviceName(msg.getData().getString(DEVICE_NAME));\n Toast.makeText(activity.getApplicationContext(), \"Connected to \"\n + activity.getDeviceName(), Toast.LENGTH_SHORT).show();\n break;\n }\n //motion sensor\n case MotionMonitor.MESSAGE_MOTION:{\n if(msg.arg1 == MotionMonitor.ARG_ACCEL){\n Bundle b = (Bundle) msg.obj;\n if(b == null){Log.e(TAG, \"Failed to convert message object to bundle\");}\n float [] data = b.getFloatArray(MotionMonitor.KEY_ACCEL);\n activity.updateOrientation(data);\n }\n else if(msg.arg1 == MotionMonitor.ARG_GYRO){\n Bundle b = (Bundle) msg.obj;\n if(b == null){Log.e(TAG, \"Failed type message data to float []\");}\n //set data in gyrostats view \n float [] data = b.getFloatArray(MotionMonitor.KEY_ROTATE);\n TextView stats = (TextView) activity.findViewById(R.id.gyro_stats);\n stats.setText(String.format(\"%4f, %4f, %4f\", data[0], data[1], data[2]));\n }\n else{Log.e(TAG, \"Unsupported argument for MESSAGE_MOTION in handleMessage()\");}\n }\n //ignore other types\n default:{\n }}\n }", "public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }", "public void onRecieve(RoundTimeMessage message) {\n\n\n }", "public void action(BotInstance bot, Message message);", "public abstract void messageReceived(String message);", "@Override\n public void action() {\n ACLMessage acl = blockingReceive();\n System.err.println(\"Hola, que gusto \" + acl.getSender() + \", yo soy \" + getAgent().getName());\n new EnviarMensaje().enviarMensajeString(ACLMessage.INFORM, \"Ag4\", getAgent(), \"Hola agente, soy \" + getAgent().getName(),\n \"COD0001\");\n }", "public abstract void interagir (Robot robot);", "public abstract void voiceMessage(Message m);", "@Override\n public void robotPeriodic() {\n // m_driveTrain.run(gulce);\n\n\n\n // workingSerialCom.StringConverter(ros_string, 2);\n // RoboticArm.run( workingSerialCom.StringConverter(ros_string, 2));\n }", "@Override\n public void run() {\n\n queryForRoutingManager();\n File f = IMbuffer.fetchFromIMInputBuffer();\n if (f.getName().startsWith(\"Responseto\")) {\n transfertopurge(f);\n }\n }", "@Override\n protected Void call() throws InterruptedException {\n _tempVr.SetTimeout(5);\n _tempVr.SetMicDistance(Protocol.Distance.FAR_MIC);\n\n updateMessage(String.format(\"Speak%s\", System.getProperty(\"line.separator\")));\n\n //instruct the module to listen for a built in word from the 1st wordset\n _tempVr.RecognizeWord(1);\n\n //need to wait until HasFinished has completed before collecting results\n while (!_tempVr.HasFinished()) {\n updateMessage(\".\");\n }\n\n // Once HasFinished has returned true, we can ask the module for the index of the word it recognised. If you're new to using the EasyVR module,\n // download the Easy VR Commander (http://www.veear.eu/downloads/) to interrogate the config of your module and see what the indexes correspond to\n // Here is a standard setup at time of writing for an EASYVR 3 module:\n // 0=Action,1=Move,2=Turn,3=Run,4=Look,5=Attack,6=Stop,7=Hello\n int indexOfRecognisedWord = _tempVr.GetWord();\n\n updateMessage(String.format(\"Response: %d%s\", indexOfRecognisedWord, System.getProperty(\"line.separator\")));\n // updateMessage(String.format(\"Recognition finished%s\", System.getProperty(\"line.separator\")));\n\n return null;\n }", "public abstract void message();", "void fireOnMessage(QRecord qr);", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "void onMessageReceived(Message message);", "@Override\n public void onMessageReceived(MessageEvent messageEvent) {\n String path=messageEvent.getPath();\n Toast.makeText(this,\"Mensaje Recibido\",Toast.LENGTH_SHORT).show();\n this.controller.ControlKIT(path);\n\n }", "public abstract void interagir(Robot robot);", "public abstract void stickerMessage(Message m);", "void systemMessageReceived(IMSession session, Message message);", "public void run() {\n\t\tLooper.prepare();\n\t\tThread.currentThread().setName(\"Guidance\");\n\t\tThread.currentThread().setPriority(Thread.MAX_PRIORITY);\n\t\tcreateHandler();\n\t\t//mHandler.sendEmptyMessage(EVAL_MOTOR_SPEED);\n\t\treceiveMessage(\"DIRECT:0:0:0:0\", null);\n\t\tLooper.loop();\n\t}", "public void received(Message message){\n super.received(message);\n switch(message.getOpcode()){\n case 13:\n messageList.addElevatorButtonTime(((TelemetryMessage) message).getNanoSecondTime());\n break;\n case 14:\n messageList.addFloorButtonTime(((TelemetryMessage) message).getNanoSecondTime());\n break;\n case 15:\n messageList.addArrivalTime(((TelemetryMessage) message).getNanoSecondTime());\n break;\n case 17:\n \tTelemetryFloorButtonMessage telemetryFloorButtonMessage = (TelemetryFloorButtonMessage)message;\n \ttelemetryArrivalMap.addFloorBtnPressTime(telemetryFloorButtonMessage.getDirection(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryFloorButtonMessage.getFloor(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryFloorButtonMessage.getNanoSecondTime());\n \tbreak;\n case 18:\n \tTelemetryFloorArrivalMessage telemetryFloorArrivalMessage = (TelemetryFloorArrivalMessage)message;\n \ttelemetryArrivalMap.addFloorArrivalTime(telemetryFloorArrivalMessage.getDirection(), \n \t\t\t\t\t\t\t\t\t\t\ttelemetryFloorArrivalMessage.getFloor(),\n \t\t\t\t\t\t\t\t\t\t\ttelemetryFloorArrivalMessage.getNanoSecondTime());\n \tbreak;\n case 19:\n \tTelemetryElevatorButtonMessage telemetryElevBtnMsg = (TelemetryElevatorButtonMessage)message;\n \tSystem.out.println(\"Recieved temetry elevator button message\");\n \ttelemetryArrivalMap.addElevatorButnPressTime(telemetryElevBtnMsg.getElevatorId(), \n \t\t\t\t\t\t\t\t\t\t\t\t telemetryElevBtnMsg.getFloor(), \n \t\t\t\t\t\t\t\t\t\t\t\t telemetryElevBtnMsg.getNanoSecondTime());\n \tbreak;\n case 20:\n \tTelemetryElevatorArrivalMessage telemetryElevArvMsg = (TelemetryElevatorArrivalMessage)message;\n \ttelemetryArrivalMap.addElevatorArrivalTime(telemetryElevArvMsg.getElevatorId(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryElevArvMsg.getFloor(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryElevArvMsg.getNanoSecondTime());\n \tbreak;\n }\n }", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n // ros_string = workingSerialCom.read();\n // yavuz = workingSerialCom.StringConverter(ros_string, 2);\n // Inverse.Inverse(yavuz);\n\n // JoystickDrive.execute();\n\n\n\n // ros_string = workingSerialCom.read();\n // alt_yurur = workingSerialCom.StringConverter(ros_string, 1);\n // robot_kol = workingSerialCom.StringConverter(ros_string, 2);\n Full.Full(yavuz);\n \n }", "@Override\n\t\t\tpublic void action() {\n\t\t\t\tACLMessage message =receive(messageTemplate);\n\t\t\t\tif(message!=null) {\n\t\t\t\t\tSystem.out.println(\"Sender => \" + message.getSender().getName());\n\t\t\t\t\tSystem.out.println(\"Content => \" + message.getContent());\n\t\t\t\t\tSystem.out.println(\"SpeechAct => \" + ACLMessage.getPerformative(message.getPerformative()));\n\t\t\t\t\t//reply with a message\n//\t\t\t\t\tACLMessage reply = new ACLMessage(ACLMessage.CONFIRM);\n//\t\t\t\t\treply.addReceiver(message.getSender());\n//\t\t\t\t\treply.setContent(\"Price = 1000\");\n//\t\t\t\t\tsend(reply);\n\t\t\t\t\t\n\t\t\t\t\tconsumerContainer.logMessage(message);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"block() ...............\");\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}", "public void processMessage(DeviceMateMessage m);", "@Override\n\tpublic void receive_message(Message m) {\n\t\t\n\t}", "@Override\n\tpublic void SendMessage() {\n\t\tSystem.out.println( phoneName+\"'s SendMessage.\" );\n\t}", "@Override\n\tpublic void execute(Robot robot) {\n\t}", "@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}", "@Override\n public void run() {\n Message message = new Message();\n message.what=1;\n handler.sendMessage(message);\n }", "public void messageReceived(Message m) {\n\t\t\r\n\t}", "public void messageReceived(OscMessage aMessage);", "public void run()\r\n\t\t{\n\t\t\ttheVMKClient.sendMessageToServer(m);\r\n\t\t}", "@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }", "@Override\n\tpublic void messageReceived(IoSession session, Object message) throws Exception {\n\t\t\n\t\tSmsObject sms = (SmsObject) message;\n\t\t//log.info(\"The message is [\" + sms.getMessage() + \"]\");\n\n\t\t/*\n\t\t * other operate\n\n\t\tSystem.out.println(\"================================================\");\n\t\tSystem.out.println(\"Data From : \" + session.getRemoteAddress());\n\t\tSystem.out.println(\"Receiver : [\" + sms.getReceiver() + \"]\");\n\t\tSystem.out.println(\"Data Type : [\" + sms.getDataType() + \"]\");\n\t\tSystem.out.println(\"Data Receiver : [\" + sms.getDataReceiver() + \"]\");\n\t\tSystem.out.println(\"Data Sender : [\" + sms.getDataSender() + \"]\");\n\t\tSystem.out.println(\"Data : [\" + sms.getData() + \"]\");\n\t\tSystem.out.println(\"================================================\");\n\t\t\n\t\t * */\t\n\t\t\n\t\t//The processing of registration information \n\t\tInteger i = new Integer(255);\n\t\tif( i.equals(sms.getReceiver()) &&\n\t\t\ti.equals(sms.getDataType()) &&\n\t\t\ti.equals(sms.getDataReceiver()) &&\n\t\t\ti.equals(sms.getDataSender())) {\n\t\t\t\n\t\t\tcli.addCli(session, sms.getData());\n\t\t\tSystem.out.println(\"Client : \" + session.getRemoteAddress() + \" DONE\");\n\t\t} else {\n\t\t\t//Forwarding\n\t\t\tArrayList<IoSession> tempList = new ArrayList<IoSession>();\n\t\t\ttempList = cli.getCli(sms.getReceiver());\n\t\t\t\n\t\t\tSystem.out.println(\"tempting=======>\" + session.getRemoteAddress() + \" with receiver : \" + sms.getReceiver());\n\t\t\tif(tempList != null) {\n\t\t\t\t//System.out.println(\"true\");\n\t\t\t\tfor (IoSession session1 : tempList){\n\t\t\t\t\tSystem.out.println(\"Send =========>\" + session1.getRemoteAddress());\n\t\t\t\t\tsession1.write(sms);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"================================================\");\n\t\t\t}\n\t\t\telse System.out.println(\"forwarding false\");\n\t\t}\n\t\t\n\t\t//Trigger the client\n\t\tsms.setReceiver(i);\n\t\tsms.setDataType(i);\n\t\tsms.setDataReceiver(i);\n\t\tsms.setDataSender(i);\n\t\tsms.setData(\" \");\n\t\tsession.write(sms);\n\n\t}", "@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}", "private void sendGameCommand(){\n\n }", "public interface CommandSender \n{\n /**\n * Handle a respond from the robot.\n * @param result The result.\n * @param originalCommand The command which was sent to the robot.\n */\n public void handleResponse(byte[] result, Command originalCommand);\n \n /**\n * Handle an error that occured when communicating to the robot.\n * @param code The error code that was sent by the robot.\n */\n public void handleError(int code);\n \n /**\n * Needed when sending a command repetitively to the robot.\n * @return The command string that should be used.\n */\n public Command getCurrentCommand();\n \n}", "public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}", "@Override\n public void onReceive(Object msg) throws Exception {\n }", "abstract protected void receiveMessage(Message m);", "@Override\n public void action() {\n ACLMessage acl = receive();\n if (acl != null) {\n if (acl.getPerformative() == ACLMessage.REQUEST) {\n try {\n ContentElement elemento = myAgent.getContentManager().extractContent(acl);\n if (elemento instanceof PublicarServicio) {\n PublicarServicio publicar = (PublicarServicio) elemento;\n Servicio servicio = publicar.getServicio();\n jadeContainer.iniciarChat(servicio.getTipo(), servicio.getDescripcion());\n //myAgent.addBehaviour(new IniciarChatBehaviour(myAgent, servicio.getTipo(), servicio.getDescripcion()));\n } else if (elemento instanceof EnviarMensaje) {\n EnviarMensaje enviar = (EnviarMensaje) elemento;\n Mensaje mensaje = enviar.getMensaje();\n jadeContainer.enviarMensajeChatJXTA(mensaje.getRemitente(), mensaje.getMensaje());\n }\n } catch (CodecException ex) {\n System.out.println(\"CodecException: \" + ex.getMessage());\n } catch (UngroundedException ex) {\n System.out.println(\"UngroundedException: \" + ex.getMessage());\n } catch (OntologyException ex) {\n System.out.println(\"OntologyException: \" + ex.getMessage());\n }\n }\n } else {\n block();\n }\n }", "public void send() {\n\t}", "public void sendSms() {\n\n }", "@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}", "@Override public void handleMessage(Message msg) {\n super.handleMessage(msg);\n byte[] byteArray = (byte[]) msg.obj;\n int length = msg.arg1;\n byte[] resultArray = length == -1 ? byteArray : new byte[length];\n for (int i = 0; i < byteArray.length && i < length; ++i) {\n resultArray[i] = byteArray[i];\n }\n String text = new String(resultArray, StandardCharsets.UTF_8);\n if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_WRITE) {\n Log.i(TAG, \"we just wrote... [\" + length + \"] '\" + text + \"'\");\n// mIncomingMsgs.onNext(text);\n } else if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_READ) {\n Log.i(TAG, \"we just read... [\" + length + \"] '\" + text + \"'\");\n Log.i(TAG, \" >>r \" + Arrays.toString((byte[]) msg.obj));\n mIncomingMsgs.onNext(text);\n sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// mReadTxt.setText(++ri + \"] \" + text);\n// if (mServerBound && mServerService.isConnected()) {\n// mServerService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// } else if (mClientBound && mClientService.isConnected()) {\n// mClientService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// }\n// mBluetoothStuff.mTalker.write();\n }\n }", "@Override\n public void run() {\n Transmitter trans = getTransmitter();\n\n if (trans == null) {\n return;\n }\n\n\n // You get your receiver from the synthesizer, then set it in\n // your transmitter. Optionally, you can create an implementation\n // of Receiver to display the messages before they're sent.\n DisplayReceiver displayReceiver = new DisplayReceiver(receiver);\n trans.setReceiver(displayReceiver); // or just \"receiver\"\n\n // You should be able to play on your musical keyboard (transmitter)\n // and hear sounds through your PC synthesizer (receiver)\n System.out.println(\"Play on your musical keyboard...\");\n }", "@Override\n public void onReceive(Object message) throws Exception {\n }", "public void run() {\n\t\t\t\tString patient_id = Statics.patientdesc.getPatient_id();\r\n\t\t\t\tString zid = Statics.patientdesc.getZy_id();\r\n\r\n\t\t\t\tdata = MyUntils.getMRPinggu(patient_id, zid, itemid,date);\r\n\t\t\t\tMessage msg = new Message();\r\n\t\t\t\tmsg.what = 101;\r\n\t\t\t\tmhandler.sendMessage(msg);\r\n\t\t\t}", "@Override\r\n protected void executeCommand(MyRobot robot) {\n }", "@Override\n public void onReceive() {\n //下班充电状态\n boolean isRobotWorking = RobotManager.getInstance().isRobotWorking();\n int robotStatus = RobotManager.getInstance().getRobotStatus();\n boolean isCancellingCharge = RobotManager.getInstance().getIsCancellingCharge();\n boolean isGoing2Charge = RobotManager.getInstance().getIsGoing2Charge();\n int chargeState = RobotManager.getInstance().getChargeState();\n\n if (robotStatus == 4) {\n if (isRobotWorking) {\n translateAnimator.start();\n return;\n }\n }\n\n if (!isRobotWorking && robotStatus != 4 && !isCancellingCharge) {\n if (chargeState == 0) {\n translateAnimator.cancel();\n choseImage(4);\n return;\n }\n }\n\n if (robotStatus != 2 && RobotManager.getInstance().battery.get() != -1 && RobotManager.getInstance().battery.get() <= ConstantValue.batteryThreshold && chargeState == 0) {\n translateAnimator.cancel();\n choseImage(4);\n return;\n } else if ((robotStatus == 2) && isRobotWorking && RobotManager.getInstance().battery.get() >= ConstantValue.batteryCeil) {\n //充电完成开始巡游 //上班时间\n LogcatHelper.logd(StatisticsConstant.STARTMOVE, \"\", StatisticsConstant.WORKENDCHARGE);\n RobotManager.getInstance().setRobotStatus(0);\n translateAnimator.start();\n return;\n } else if (robotStatus == 2 && chargeState == 0) {\n RobotManager.getInstance().setRobotStatus(2);\n translateAnimator.cancel();\n choseImage(4);\n return;\n } else if (robotStatus == 3 && chargeState == 0) {\n translateAnimator.cancel();\n choseImage(4);\n return;\n }\n }", "@Override\n\tpublic void msgAtDoor() {\n\t\t\n\t}", "@Override\n\tpublic void msgAtDoor() {\n\t\t\n\t}", "void messageReceived(IMSession session, Message message);", "public void OnMessageReceived(String msg);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tLog.e(\"timer\",\"calling\");\n\t\t\t\tMessage message = mHandler.obtainMessage();\n\t\t\t\tmessage.sendToTarget();\n\n\t\t\t}", "void onAction(TwitchUser sender, TwitchMessage message);", "@Override\n public void run() {\n Message message = new Message();\n message.what = 4;\n handler.sendMessage(message);\n }", "public void broadcast(android.os.Message r11) {\n /*\n r10 = this;\n monitor-enter(r10);\n r9 = r10.mReg;\t Catch:{ all -> 0x0036 }\n if (r9 != 0) goto L_0x0007;\n L_0x0005:\n monitor-exit(r10);\t Catch:{ all -> 0x0036 }\n L_0x0006:\n return;\n L_0x0007:\n r4 = r11.what;\t Catch:{ all -> 0x0036 }\n r5 = r10.mReg;\t Catch:{ all -> 0x0036 }\n r3 = r5;\n L_0x000c:\n r9 = r3.senderWhat;\t Catch:{ all -> 0x0036 }\n if (r9 < r4) goto L_0x002f;\n L_0x0010:\n r9 = r3.senderWhat;\t Catch:{ all -> 0x0036 }\n if (r9 != r4) goto L_0x0034;\n L_0x0014:\n r7 = r3.targets;\t Catch:{ all -> 0x0036 }\n r8 = r3.targetWhats;\t Catch:{ all -> 0x0036 }\n r2 = r7.length;\t Catch:{ all -> 0x0036 }\n r0 = 0;\n L_0x001a:\n if (r0 >= r2) goto L_0x0034;\n L_0x001c:\n r6 = r7[r0];\t Catch:{ all -> 0x0036 }\n r1 = android.os.Message.obtain();\t Catch:{ all -> 0x0036 }\n r1.copyFrom(r11);\t Catch:{ all -> 0x0036 }\n r9 = r8[r0];\t Catch:{ all -> 0x0036 }\n r1.what = r9;\t Catch:{ all -> 0x0036 }\n r6.sendMessage(r1);\t Catch:{ all -> 0x0036 }\n r0 = r0 + 1;\n goto L_0x001a;\n L_0x002f:\n r3 = r3.next;\t Catch:{ all -> 0x0036 }\n if (r3 != r5) goto L_0x000c;\n L_0x0033:\n goto L_0x0010;\n L_0x0034:\n monitor-exit(r10);\t Catch:{ all -> 0x0036 }\n goto L_0x0006;\n L_0x0036:\n r9 = move-exception;\n monitor-exit(r10);\t Catch:{ all -> 0x0036 }\n throw r9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.os.Broadcaster.broadcast(android.os.Message):void\");\n }", "@Override\n public void run() {\n send();\n }", "@Override\n public void onMessageReceived(@NotNull MessageReceivedEvent event) {\n String message = event.getMessage().getContentRaw().toLowerCase();\n Commands commands = Main.getBOT().getCommands();\n\n // When message is intended for bob, check it\n if (message.startsWith(\"!bob\")) {\n commands.evaluateCommand(message.replace(\"!bob \", \"\"), event);\n } else if (message.contains(\"#blamekall\")) {\n event.getChannel().sendMessage(\"NO! BE NICE! GO TO NAUGHTY JAIL!\").queue();\n event.getChannel().sendMessage(\"https://tenor.com/view/bonk-gif-18805247\").queue();\n }\n\n }", "@Override\n public void run() {\n Handler temp = getHandler();\n Scanner scanner = temp.getScanner();\n temp.getGameServer().sendMsg(\"yek nafar ra entekhab konid :(tanha yek payam baraye Mafia) \" +\n temp.getGameServer().getNames().toString(), temp);\n String msg = scanner.nextLine().strip();\n temp.getGameServer().sendMsgToMafia(temp.getName() + \" : \" + msg, temp);\n System.out.println(msg + \"<------\" + toString());\n }", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "@Override\n\tpublic void run() {\n\t\tthis.originateAction = new OriginateAction();\n\t\tthis.originateAction.setChannel(this.destination); // SIP/1083484/01703846797\n\t\tthis.originateAction.setContext(EPursuit.properties.getProperty(\"context\"));\n\t\tthis.originateAction.setExten(this.agi.getExtension());\n\t\tthis.originateAction.setPriority(new Integer(1));\n\t\t// TODO: Which timeout to use? Occurs sometimes when the phone is down\n\t\t// or never receives an event (for some reason)\n\t\tthis.originateAction.setTimeout(new Long(EPursuit.properties.getProperty(\"callTime\"))+new Long(EPursuit.properties.getProperty(\"dialTime\")));\n\t\tthis.originateAction.setAsync(true);\n\n\t\t// make initial call\n\t\tthis.makeCall();\n\t}", "private void handleMessage(Message msg) {\n switch (msg.what) {\n case R.id.clientReady: // 음성인식 준비 가능\n txtResult.setText(\"Connected\");\n writer = new AudioWriterPCM(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/NaverSpeechTest\");\n writer.open(\"Test\");\n break;\n case R.id.audioRecording:\n writer.write((short[]) msg.obj);\n break;\n case R.id.partialResult:\n mResult = (String) (msg.obj);\n mResult += mResult;\n txtResult.setText(mResult);\n break;\n case R.id.finalResult: // 최종 인식 결과\n SpeechRecognitionResult speechRecognitionResult1 = (SpeechRecognitionResult) msg.obj;\n List<String> results1 = speechRecognitionResult1.getResults();\n StringBuilder strBuf1 = new StringBuilder();\n for(String result : results1) {\n strBuf1.append(result);\n //strBuf.append(\"\\n\");\n break;\n }\n mResult = strBuf1.toString();\n txtResult.setText(mResult);\n\n requestChatbot();\n\n break;\n case R.id.recognitionError:\n if (writer != null) {\n writer.close();\n }\n mResult = \"Error code : \" + msg.obj.toString();\n txtResult.setText(mResult);\n btnStart.setText(R.string.str_start);\n btnStart.setEnabled(true);\n break;\n case R.id.clientInactive:\n if (writer != null) {\n writer.close();\n }\n btnStart.setText(R.string.str_start);\n btnStart.setEnabled(true);\n break;\n }\n }", "public void saySomething(java.lang.String message){\r\n\t\tIterator <RobotEngineObserver> robOb = this.iterator();\r\n\t\twhile (robOb.hasNext()){\r\n\t\t\trobOb.next().robotSays(message);\r\n\t\t}\r\n\t}", "@Override\r\n public void onReceiveResult(Message message) {\r\n switch (message.what) {\r\n //TODO\r\n }\r\n }", "@Override\r\n\tpublic void onReceive(Object arg0) throws Exception {\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\tmsg.what = 100;\n\t\t\t\t\tmsg.obj = split[1]+\",\"+split[2];\n\t\t\t\t\tmHandler.sendMessage(msg);\n\t\t\t\t}", "String getReceiver();", "@Override\n\t\t\tpublic void run () {\n\n\t\t\t\trfComm = new Rfcomm(uiservice.getRootActivity(), secureUUID, unsecureUUID, new Handler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handleMessage (android.os.Message msg) {\n\t\t\t\t\t\tswitch (msg.what) {\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_STATE_CHANGE:\n\t\t\t\t\t\t\t\tswitch (msg.arg1) {\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_CONNECTED:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_CONNECTED\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_CONNECTING:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_CONNECTING\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_LISTEN:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_LISTEN\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_NONE:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_NONE\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\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\tbreak;\n\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_READ:\n\t\t\t\t\t\t\t\tbyte[] readBuf = (byte[]) msg.obj;\n\t\t\t\t\t\t\t\t// construct a string from the valid bytes in the buffer\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tByteArrayInputStream bis = new ByteArrayInputStream(readBuf);\n\t\t\t\t\t\t\t\t\tLog.i(TAG, \"DRE DRE DRE DRE ?\");\n\t\t\t\t\t\t\t\t\tObjectInputStream ois = new ObjectInputStream(bis) {\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tprotected Class<?> resolveClass (ObjectStreamClass objectStreamClass) throws IOException, ClassNotFoundException {\n\t\t\t\t\t\t\t\t\t\t\tClass c = null;\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tif (c == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tc = resolver.resolve(objectStreamClass.getName());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tif (c == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tc = super.resolveClass(objectStreamClass);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tif (c == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tc = Class.forName(objectStreamClass.getName());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn c;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t\tMessage mess = (Message) ois.readObject();\n\t\t\t\t\t\t\t\t\tbis.close();\n\t\t\t\t\t\t\t\t\tois.close();\n\t\t\t\t\t\t\t\t\tif (D) Log.i(TAG, \"MESSAGE_READ: \" + mess.getContent().toString());\n\t\t\t\t\t\t\t\t\tremoteDispatch(mess);\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tLog.e(TAG, \"Failed to deserialize the message\");\n\n\t\t\t\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\t\t\t\tLog.e(TAG, \"Unable to cast the deserialized object\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_DEVICE_NAME:\n\t\t\t\t\t\t\t\t// save the connected device's name\n\t\t\t\t\t\t\t\tconnectedDeviceName = msg.getData().getString(Rfcomm.DEVICE_NAME);\n\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"Connected to \"\n\t\t\t\t\t\t\t\t\t\t\t+ connectedDeviceName, Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_TOAST:\n\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), msg.getData().getString(Rfcomm.TOAST),\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, timeoutAccept);\n\t\t\t\tmanager = new MessageManager(rfComm);\n\n\t\t\t\trfComm.addEventListener(BluetoothChannel.this);\n\t\t\t\trfComm.setName(getNodeName());\n\t\t\t\tif (discoverableTime > 0) rfComm.setDiscoverable(discoverableTime);\n\t\t\t\trfComm.start();\n\t\t\t\trfComm.discovering();\n\t\t\t\tif (D) Log.i(TAG, \"Bluetooth channel started\");\n\t\t\t}", "@Override\n public void run() {\n Message message = mHandler.obtainMessage(1);\n mHandler.sendMessage(message);\n }", "protected void execute() {\n\t\tdouble error = -1;\n\t\tdouble proportion = 1;\n\t\tdouble coefficient = 1;\n\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartDepth)) { error = Robot.depth_.get_degrees_x(); }\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartCubeSearch)) { error = Robot.cube_.get_degrees_x(); }\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartRFT)) { error = Robot.rft_.get_degrees_x(); }\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.PlatformBlueSearch) || \n\t\t\t\tvision.equalsIgnoreCase(SocketVisionSender.PlatformRedSearch)) { error = Robot.platform_.get_degrees_x(); }\n\t\t\n\t\tif(error == -1) {\n\t\t\tproportion = Drivetrain.kPGyroConstant * (Robot.drivetrain.getGyroHeading() - initHeading);\n\n\t\t} else {\n\t\t\tproportion = error * kP;\n\t\t\t//drive vision\n\t\t\tif(error == 0) initHeading = Robot.drivetrain.getGyroHeading();\n\t\t}\n\n\t\tcoefficient = (initDistance - Robot.drivetrain.getRightEncoderPos(0)) / initDistance;\n\t\tcoefficient = Robot.drivetrain.thresholdVBus(coefficient);\n\n\t\tRobot.drivetrain.tankDrive(coefficient * (vBus - proportion), -coefficient * (vBus + proportion));\n\n\t}", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n }", "void received() throws ImsException;", "private void incomingBT_handle()\n {\n if(BT_Message_Handle_Func != null)\n BT_Message_Handle_Func.run();\n\n }", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "public void run() {\n synchronized(target) { // synchronized block 同步块 //锁住target\n target.call(msg);\n }\n }", "@Override\n\tpublic void action() \n\t{\n\t\tif(this.user.arrivedToFinalStation())\n\t\t{\n\t\t\tthis.user.stablishDesiredVehicle();\n\t\t\tthis.user.stablishDesiredStation();\n\t\t}\n\t\t\n\t\t//printing info\n\t\tSystem.out.println(\"\\nI'm \" + this.user.getLocalName() + \": I'm on \" + this.user.getCurrentStation() + \" and I want to go to \" + this.user.desiredStation + \" by \" + this.user.desiredVehicle +\".\\n\");\n\t\t//this.mensaje=scanner.nextLine(); //debug\n\t\t\n\t\t//PetitionRequest\n\t\tSystem.out.println(\"I make a vehicle request to \" + this.user.getCurrentStation() + \": I'm on \" + this.user.getCurrentStation() + \" and I want to go to \" + this.user.desiredStation + \" by \" + this.user.desiredVehicle + \".\");\n\t\tthis.msgObject = new Capsule(null,this.user.getDesiredVehicle(),this.user.getDesiredStation(),null);\n\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_REQUEST\");\n\t\t\n\t\t//Waiting for answer\n\t\tACLMessage msg=this.myAgent.blockingReceive(\n\t\t\t\tMessageTemplate.and(\n\t\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.REQUEST), \n\t\t\t\t\t\tMessageTemplate.MatchOntology(\"ontologia\"))\n\t\t\t\t);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tthis.comment = msg.getEnvelope().getComments();\n\t\t\tthis.msgObject = (Capsule) msg.getContentObject();\n\t\t\tSystem.out.println(\"\\t\" + this.user.getCurrentStation() + \" told me \" + this.comment + \". \");\n\t\t\t\n\t\t\tswitch(this.comment)\n\t\t\t{\n\t\t\tcase \"VEHICLE_DELIVERY\":\n\t\t\t\t//1. The station give to the user the vehicle normaly\n\t\t\t\tif(msgObject.getVehicle() != null) {\n\t\t\t\t\tthis.user.takeVehicle(msgObject.getVehicle());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//2. The user goes to the final station\n\t\t\t\tthis.notifyMonitor(\"moving\");\n\t\t\t\tthis.user.goToStation();\n\t\t\t\tthis.notifyMonitor(\"waiting\");\n\n\t\t\t\t//3. Leaves the vehicle on the final station\n\t\t\t\tif(this.user.hasVehicle())\n\t\t\t\t{\n\t\t\t\t\tthis.vehicleTemp = this.user.leaveVehicle();\n\t\t\t\t\tmsgObject = new Capsule(this.vehicleTemp,null, null, null);\n\t\t\t\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_RETURN\");\n\t\t\t\t}\n\n\t\t\t\t//4. The user waits a bit\n\t\t\t\tthis.user.waitSomeTime(8000);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"UNSATISFACTORY_REQUEST\":\n\t\t\t\t// The station reports that the request couldn't be completed properly\n\t\t\t\t//1. The capsule can cointain: alternativeStation and alternativeVehicle\n\t\t\t\tif(msgObject.getStation() != null) {\t//checks if there's an alternative reserved station\n\t\t\t\t\tSystem.out.println(\"\\t\"+this.user.getCurrentStation() + \" told me that there's an alternative route -> \" + msgObject.getStation() + \". \");\n\t\t\t\t\tthis.user.stablishDestinationStation(msgObject.getStation());\n\t\t\t\t}\n\t\t\t\tif(msgObject.getVehicle() != null) { //checks if the station gave an alternative vehicle\n\t\t\t\t\tSystem.out.println(\"\\t\"+this.user.getCurrentStation() + \" gived to me an alternative vehicle -> \" + msgObject.getVehicle().getType() + \". \");\n\t\t\t\t\tthis.user.takeVehicle(msgObject.getVehicle());\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\tI have to go walking. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//2. Moving to the destination station\n\t\t\t\tthis.notifyMonitor(\"moving\");\n\t\t\t\tthis.user.goToStation();\n\t\t\t\tthis.notifyMonitor(\"waiting\");\n\n\t\t\t\t//3. If has a vehicle, the user leaves it\n\t\t\t\tif(this.user.hasVehicle()) \n\t\t\t\t{\n\t\t\t\t\t//send the vehicle to the station\n\t\t\t\t\tthis.vehicleTemp = this.user.leaveVehicle();\n\t\t\t\t\tmsgObject = new Capsule(this.vehicleTemp,null, null, null);\n\t\t\t\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_RETURN\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//4. the user waits before restarting the behavior\n\t\t\t\tthis.user.waitSomeTime(4000);\n\t\t\t}\n\t\t}\n\t\tcatch (UnreadableException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private ExecuteMessage() {\n initFields();\n }", "@Override\n\tpublic void execute() {\n\t\tlog.info(\"running...\");\n\n\n\t\t/* example for finding the server agent */\n\t\tIAgentDescription serverAgent = thisAgent.searchAgent(new AgentDescription(null, \"ServerAgent\", null, null, null, null));\n\t\tif (serverAgent != null) {\n\t\t\tthis.server = serverAgent.getMessageBoxAddress();\n\n\t\t\t// TODO\n\t\t\tif (!hasGameStarted) {\n\t\t\t\tStartGameMessage startGameMessage = new StartGameMessage();\n\t\t\t\tstartGameMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\tstartGameMessage.gridFile = \"/grids/h_01.grid\";\n\t\t\t\t// Send StartGameMessage(BrokerID)\n\t\t\t\tsendMessage(server, startGameMessage);\n\t\t\t\treward = 0;\n\t\t\t\tthis.hasGameStarted = true;\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"SERVER NOT FOUND!\");\n\t\t}\n\n\n\t\t/* example of handling incoming messages without listener */\n\t\tfor (JiacMessage message : memory.removeAll(new JiacMessage())) {\n\t\t\tObject payload = message.getPayload();\n\n\t\t\tif (payload instanceof StartGameResponse) {\n\t\t\t\t/* do something */\n\n\t\t\t\t// TODO\n\t\t\t\tStartGameResponse startGameResponse = (StartGameResponse) message.getPayload();\n\n\t\t\t\tthis.maxNum = startGameResponse.initialWorkers.size();\n\t\t\t\tthis.agentDescriptions = getMyWorkerAgents(this.maxNum);\n\t\t\t\tthis.gameId = startGameResponse.gameId;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + startGameResponse.toString());\n\n\t\t\t\t// TODO handle movements and obstacles\n\t\t\t\tthis.gridworldGame = new GridworldGame();\n\t\t\t\tthis.gridworldGame.obstacles.addAll(startGameResponse.obstacles);\n\n\n\n\t\t\t\t// TODO nicht mehr worker verwenden als zur Verfügung stehen\n\n\t\t\t\t/**\n\t\t\t\t * Initialize the workerIdMap to get the agentDescription and especially the\n\t\t\t\t * MailBoxAdress of the workerAgent which we associated with a specific worker\n\t\t\t\t *\n\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAId.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\t\t\t\t} */\n\n\t\t\t\t/**\n\t\t\t\t * Send the Position messages to each Agent for a specific worker\n\t\t\t\t * PositionMessages are sent to inform the worker where it is located\n\t\t\t\t * additionally put the position of the worker in the positionMap\n\t\t\t\t */\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tpositionMap.put(worker.id, worker.position);\n\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAID.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(worker.id);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\t// Send each Agent their current position\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = startGameResponse.gameId;\n\t\t\t\t\tpositionMessage.position = worker.position;\n\t\t\t\t\tpositionMessage.workerIdForServer = worker.id;\n\t\t\t\t\t//System.out.println(\"ADDRESS IS \" + workerAddress);\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t\t//break;\n\t\t\t\t}\n\n\t\t\t\thasAgents = true;\n\n\t\t\t\tfor (Order order: savedOrders) {\n\t\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(order);\n\t\t\t\t\tPosition workerPosition = null;\n\t\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint steps = workerPosition.distance(order.position) + 2;\n\t\t\t\t\tint rewardMove = (steps > order.deadline)? 0 : order.value - steps * order.turnPenalty;\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\t\ttakeOrderMessage.orderId = order.id;\n\t\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\t\ttakeOrderMessage.gameId = gameId;\n\t\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionConfirm) {\n\t\t\t\tPositionConfirm positionConfirm = (PositionConfirm) message.getPayload();\n\t\t\t\tif(positionConfirm.state == Result.FAIL) {\n\t\t\t\t\tString workerId = workerIdReverseAID.get(positionConfirm.workerId);\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(workerId);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = positionConfirm.gameId;\n\t\t\t\t\tpositionMessage.position = positionMap.get(workerId);\n\t\t\t\t\tpositionMessage.workerIdForServer = workerId;\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t} else {\n\t\t\t\t\tactiveWorkers.add(message.getSender());\n\t\t\t\t\tfor (String orderId: orderMessages) {\n\t\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(this.orderMap.get(orderId));\n\t\t\t\t\t\tif(workerAddress.equals(message.getSender())){\n\t\t\t\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\t\t\t\tassignOrderMessage.order = this.orderMap.get(orderId);\n\t\t\t\t\t\t\tassignOrderMessage.gameId = gameId;\n\t\t\t\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tif (payload instanceof OrderMessage) {\n\n\t\t\t\t// TODO entscheide, ob wir die Order wirklich annehmen wollen / können\n\n\t\t\t\tOrderMessage orderMessage = (OrderMessage) message.getPayload();\n\n\t\t\t\tif (!hasAgents){\n\t\t\t\t\tsavedOrders.add(orderMessage.order);\n\t\t\t\t\tcontinue;\n\t\t\t\t}else {\n\t\t\t\t\tOrder thisOrder = orderMessage.order;\n\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(thisOrder);\n\t\t\t\tPosition workerPosition = null;\n\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tint steps = workerPosition.distance(thisOrder.position) + 1;\n\t\t\t\t\tint rewardMove = (steps > thisOrder.deadline)? 0 : thisOrder.value - steps * thisOrder.turnPenalty;\n\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\ttakeOrderMessage.orderId = orderMessage.order.id;\n\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\ttakeOrderMessage.gameId = orderMessage.gameId;\n\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\tOrder order = ((OrderMessage) message.getPayload()).order;\n\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + orderMessage.toString());\n\n\t\t\t\t// Save order into orderMap\n\n\t\t\t}\n\n\t\t\tif (payload instanceof TakeOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\t// Got Order ?!\n\t\t\t\tTakeOrderConfirm takeOrderConfirm = (TakeOrderConfirm) message.getPayload();\n\t\t\t\tResult result = takeOrderConfirm.state;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + takeOrderConfirm.toString());\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\n\t\t\t\t\t// Remove order from orderMap as it was rejected by the server\n\t\t\t\t\tthis.orderMap.remove(takeOrderConfirm.orderId);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\t// TODO send serverAddress\n\t\t\t\t// Assign order to Worker(Bean)\n\t\t\t\t// Send the order to the first agent\n\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\tassignOrderMessage.order = this.orderMap.get(takeOrderConfirm.orderId);\n\t\t\t\tassignOrderMessage.gameId = takeOrderConfirm.gameId;\n\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(assignOrderMessage.order);\n\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t} else {\n\t\t\t\t\torderMessages.add(takeOrderConfirm.orderId);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (payload instanceof AssignOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\tAssignOrderConfirm assignOrderConfirm = (AssignOrderConfirm) message.getPayload();\n\t\t\t\tResult result = assignOrderConfirm.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\t\t\t\t\t// TODO\n\t\t\t\t\tICommunicationAddress alternativeWorkerAddress = getAlternativeWorkerAddress(((AssignOrderConfirm) message.getPayload()).workerId);\n\t\t\t\t\treassignOrder(alternativeWorkerAddress, assignOrderConfirm);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\torderMessages.remove(assignOrderConfirm.orderId);\n\n\t\t\t\t// TODO Inform other workers that this task is taken - notwendig??\n\n\t\t\t}\n\n\t\t\tif (payload instanceof OrderCompleted) {\n\n\t\t\t\tOrderCompleted orderCompleted = (OrderCompleted) message.getPayload();\n\t\t\t\tResult result = orderCompleted.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// TODO Handle failed order completion -> minus points for non handled rewards\n\t\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t// TODO remove order from the worker specific order queues\n\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionUpdate) {\n\n\t\t\t\tPositionUpdate positionUpdate = (PositionUpdate) message.getPayload();\n\t\t\t\tupdateWorkerPosition(positionUpdate.position, positionUpdate.workerId);\n\n\t\t\t}\n\n\t\t\tif (payload instanceof EndGameMessage) {\n\n\t\t\t\tEndGameMessage endGameMessage = (EndGameMessage) message.getPayload();\n\t\t\t\t// TODO lernen lernen lernen lol\n\t\t\t\tSystem.out.println(\"Reward: \" + endGameMessage.totalReward);\n\t\t\t}\n\n\t\t}\n\t}", "public void teleopPeriodic() {\n\n \t//NetworkCommAssembly.updateValues();\n \t\n\t\t// both buttons pressed simultaneously, time to cal to ground\n\t\tif (gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON1) && gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON2)) {\n\t\t\tprocessGroundCal();\n\t\t}\n\n\t\t// PID CONTROL ONLY\n\t\tdouble armDeltaPos = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armDeltaPos) < ARM_DEADZONE) {\n\t\t\tarmDeltaPos = 0.0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarmDeltaPos *= ARM_POS_MULTIPLIER;\n\t\t\tdouble currPos = testMotor.getPosition();\n\t\t\t\n\t\t\tif (((currPos > SOFT_ENCODER_LIMIT_MAX) && armDeltaPos > 0.0) || ((currPos < SOFT_ENCODER_LIMIT_FLOOR) && armDeltaPos < 0.0)) {\n\t\t\t\tSystem.out.println(\"SOFT ARM LIMIT HIT! Setting armDeltaPos to zero\");\n\t\t\t\tarmDeltaPos = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble newPos = currPos + armDeltaPos;\n\t\t\ttestMotor.set(newPos);\n\t\t\tSystem.out.println(\"Setting new front arm pos = \" + newPos);\t\n\t\t}\t\t\n\n \t/*\n\t\tdouble newArmPos = gamepad.getRawAxis(1);\n\t\tif(Math.abs(newArmPos) <= ARM_DEADZONE) {\n\t\t\tnewArmPos = 0.0;\n\t\t}\n\t\tdouble newMotorPos = (newArmPos * ARM_SPEED_MULTIPLIER) + testMotor.getPosition();\n\t\tpositionMoveByCount(newMotorPos);\n\t\tSystem.out.println(\"input = \" + newArmPos + \" target pos = \" + newMotorPos + \" enc pos = \" + testMotor.getPosition());\n \t*/\n \t\n\t\t// PercentVbus test ONLY!!\n \t/*\n\t\tdouble armSpeed = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armSpeed) < ARM_DEADZONE) {\n\t\t\tarmSpeed = 0.0f;\n\t\t}\t\n\t\tarmSpeed *= ARM_MULTIPLIER;\n\t\t\n\t\tdouble pos= testMotor.getPosition();\n\t\tif (((pos > SOFT_ENCODER_LIMIT_1) && armSpeed < 0.0) || ((pos < SOFT_ENCODER_LIMIT_2) && armSpeed > 0.0))\n\t\t\tarmSpeed = 0.0;\n\t\ttestMotor.set(armSpeed);\n\t\t\n\t\tSystem.out.println(\"armSpeed = \" + armSpeed + \" enc pos = \" + testMotor.getPosition());\n\t\t */ \n }", "public void mo1611c() {\r\n Message.obtain(this.f4603a.f4598n, 6, null).sendToTarget();\r\n }", "public void sendTurno() throws RemoteException, InterruptedException, IOException ;", "@Override\r\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\r\n\t\t\tString result = new String();\r\n\t\t\tGatewayControl control = new GatewayControl(Params.base_uri + Params.bind_gateway);\r\n\t\t\ttry {\r\n\t\t\t\tLog.i(TAG, \"gatewayId \" + gatewayId);\r\n\t\t\t\tLog.i(TAG, \"username \" + Session.getUsername());\r\n\t\t\t\tresult = control.bind(gatewayId, Session.getUsername());\r\n\t\t\t} catch (JSONException 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\tmsg.obj = result;\r\n\t\t handler.sendMessage(msg);\r\n\r\n\t\t}", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 0:\n\t\t\t\ttv_read.setText(msg.obj.toString());\n\t\t\t\tToast.makeText(N20PINPadControllerActivity.this, \"recv\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n public void receiveMessage(Message m) {\n commReceiver.receiveMessage(m);\n }", "@Override\n\tvoid receiveCall() {\n\n\t}", "@Override\n\tprotected void doAsyncExecute(VoiceMessage requestMessage) {\n\n\t}", "@Override\n\tpublic void receive(String msg) {\n\t\t\n\t}", "public abstract void contactMessage(Message m);", "void sendToRed();", "void sendStartMessage();", "void sendStartMessage();" ]
[ "0.65000594", "0.6376396", "0.62639666", "0.62549716", "0.624865", "0.624668", "0.6218795", "0.61932087", "0.6179716", "0.6165971", "0.61383975", "0.61106616", "0.61089796", "0.61001086", "0.6085897", "0.6078474", "0.60742897", "0.60654145", "0.6055907", "0.6012077", "0.59845936", "0.5980727", "0.59681255", "0.5967492", "0.59671223", "0.5959766", "0.595682", "0.59500563", "0.594456", "0.59443724", "0.5941426", "0.5940884", "0.5931443", "0.59312314", "0.5928607", "0.59205323", "0.5913361", "0.5909665", "0.5904068", "0.5903687", "0.5893364", "0.5891328", "0.5890068", "0.588325", "0.5881132", "0.58681095", "0.58659697", "0.5852504", "0.584278", "0.58419603", "0.5832746", "0.5822982", "0.5822408", "0.582167", "0.58110327", "0.5795222", "0.57925135", "0.57886153", "0.5781977", "0.5781977", "0.5771478", "0.5769956", "0.5762416", "0.576106", "0.5753874", "0.5752541", "0.57493335", "0.5747629", "0.5743176", "0.57384866", "0.5731432", "0.572746", "0.5715733", "0.5714982", "0.5712061", "0.57109714", "0.5698923", "0.569648", "0.56960315", "0.5687241", "0.5687103", "0.5682296", "0.56817347", "0.568108", "0.5681076", "0.5675507", "0.5671903", "0.5670736", "0.5670326", "0.56659997", "0.5665591", "0.56634885", "0.56629723", "0.5662662", "0.5657221", "0.5655006", "0.56492877", "0.5641462", "0.5635159", "0.56305903", "0.56305903" ]
0.0
-1
Adds a MessageProcessor that receives messages.
public void addMessageProcessor(MessageProcessor messageProcessor) { this.messageProcessors.add(messageProcessor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addMessageProcessor(String xml) throws AxisFault {\n try {\n OMElement msElem = createElement(xml);\n MessageProcessor messageProcessor =\n MessageProcessorFactory.createMessageProcessor(msElem);\n if (messageProcessor != null && messageProcessor.getName() != null) {\n SynapseConfiguration synapseConfiguration = getSynapseConfiguration();\n String fileName = ServiceBusUtils.generateFileName(messageProcessor.getName());\n messageProcessor.init(getSynapseEnvironment());\n messageProcessor.setFileName(fileName);\n synapseConfiguration.addMessageProcessor(messageProcessor.getName(),\n messageProcessor);\n if(!Boolean.parseBoolean(System.getProperty(\"NonRegistryMode\"))) {\n MediationPersistenceManager mp = getMediationPersistenceManager();\n mp.saveItem(messageProcessor.getName(), ServiceBusConstants.ITEM_TYPE_MESSAGE_PROCESSOR);\n }\n } else {\n String message = \"Unable to create Message Processor \";\n handleException(log, message, null);\n }\n\n } catch (XMLStreamException e) {\n String message = \"Unable to create Message Processor \";\n handleException(log, message, e);\n }\n\n }", "public void add (InputProcessor processor) {\n this.verifyUnique(processor);\n\n this.inputMultiplexer.addProcessor(processor);\n }", "@Override\n\tpublic void addMessageReceivedListener(MessageReceivedListener messageReceivedListener) {\n\n\t}", "public MessageProcessorDistributor() {\n this.messageProcessors = new LinkedList<MessageProcessor>();\n }", "public void add(MessageReceiver msgReceiver) {\n subscribedMessageReceivers.add(msgReceiver);\n }", "void addBeforeProcessor(Object processor);", "@Bind(aggregate = true, optional = true, proxy = false)\n public void bindProcessor(HandlerProcessor processor) {\n if (validated) {\n add(new TaskInternalProcessor(processor, currentProcessor, currentPhase));\n } else {\n this.handlerProcessors.add(processor);\n }\n\n }", "private void addMessageListener(MessageTypeEventHandler<?> messageListener) {\n if (!messageListeners.contains(messageListener)) {\n messageListeners.add(messageListener);\n }\n }", "public static void addInputProcessor(final InputProcessor processor){\n if (Gdx.input.getInputProcessor() == null){\n Gdx.input.setInputProcessor(processor);\n }else{//use multiplexer if more than one input processor\n inpMulPlex = new InputMultiplexer(Gdx.input.getInputProcessor());\n inpMulPlex.addProcessor(processor);\n Gdx.input.setInputProcessor(inpMulPlex);\n }\n }", "private void addMessageListener(TransportAddress localAddr, MessageTypeEventHandler<?> messageListener) {\n EventDispatcher child = children.get(localAddr);\n if (child == null) {\n child = new EventDispatcher();\n children.put(localAddr, child);\n }\n child.addMessageListener(messageListener);\n }", "public void addMessage() {\n }", "void addAfterProcessor(Object processor);", "public void addMessage(EventMessage message) {\n }", "public void addFirst (InputProcessor processor) {\n this.verifyUnique(processor);\n\n this.inputMultiplexer.addProcessor(0, processor);\n }", "public void modifyMessageProcessor(String xml) throws AxisFault {\n try {\n OMElement msElem = createElement(xml);\n MessageProcessor messageProcessor =\n MessageProcessorFactory.createMessageProcessor(msElem);\n if (messageProcessor != null && messageProcessor.getName() != null) {\n SynapseConfiguration synapseConfiguration = getSynapseConfiguration();\n MessageProcessor removedProcessor =\n synapseConfiguration.removeMessageProcessor(messageProcessor.getName());\n if (removedProcessor != null) {\n removedProcessor.destroy();\n }\n messageProcessor.init(getSynapseEnvironment());\n String fileName = ServiceBusUtils.generateFileName(messageProcessor.getName());\n messageProcessor.setFileName(fileName);\n synapseConfiguration.addMessageProcessor(messageProcessor.getName(),\n messageProcessor);\n\n if (removedProcessor.getArtifactContainerName() != null) {\n messageProcessor.setArtifactContainerName(removedProcessor.getArtifactContainerName());\n messageProcessor.setIsEdited(true);\n }\n else {\n if(!Boolean.parseBoolean(System.getProperty(\"NonRegistryMode\"))) {\n MediationPersistenceManager mp = getMediationPersistenceManager();\n mp.saveItem(messageProcessor.getName(), ServiceBusConstants.ITEM_TYPE_MESSAGE_PROCESSOR);\n }\n }\n } else {\n String message = \"Unable to Update Message Processor \";\n handleException(log, message, null);\n }\n\n } catch (XMLStreamException e) {\n String message = \"Unable to Modify Message Processor \";\n handleException(log, message, e);\n }\n }", "public static void addValueProcessor(ValueProcessor processor)\n {\n getIntern().setValueProcessor(processor);\n }", "public Message addMessage(Message p);", "public void addMessageReceivedEventListener(ILogCatMessageEventListener l) {\n mLogCatMessageListeners.add(l);\n }", "public void addFeatureProcessor(String name, FeatureProcessor fp) {\n\tfeatureProcessors.put(name, fp);\n }", "protected void addMessage(IDBSMessage pMessage){\n\t\twMessages.add(pMessage);\n\t}", "public void addMessage(String message);", "@Override\n public void addMessage(String message) {\n messages.add(message);\n }", "abstract void addMessage(Message message);", "public void addMessage(String msg){messages.add(msg);}", "@Override\n public void processMessage(int type, String receivedMsg) {\n }", "public void addMessage(String msg) {\n this.messages.add(msg);\n }", "public void addCasProcessor(CasProcessor aCasProcessor) throws ResourceConfigurationException {\n\n String name = aCasProcessor.getProcessingResourceMetaData().getName();\n\n // Set a global flag to indicate the we should support mixed CasProcessor types.\n // When this supported is enabled TCAS array will be instantiated to facilitate\n // conversions between CasData and TCAS.\n if (aCasProcessor instanceof CasObjectProcessor || aCasProcessor instanceof CasConsumer) {\n mixedCasProcessorTypeSupport = true;\n }\n ArrayList newList = null;\n int indexPos = getPositionInListIfExists(name, initial_cp_list);\n if (indexPos == -1) {\n newList = new ArrayList();\n newList.add(aCasProcessor);\n // New Cas Processor. Add it to a list\n initial_cp_list.add(newList);\n } else {\n newList = (ArrayList) initial_cp_list.get(indexPos);\n newList.add(aCasProcessor);\n }\n\n }", "public void addFilter(MessageFilter filter);", "public void processMessage(String message);", "public synchronized void addMessage(Message message) {\n\t\tif (message == null) throw new IllegalArgumentException(\"Cannot process NULL message\") ;\n\t\tSystem.out.println(\"Processing...\");\n\t\t\n\t\tString username = message.toUserName() ;\n\t\t\n\t\tif (messageMap.containsKey(username)) {\n\t\t\t//retrieve the set of messages addressed to the user\n\t\t\tmessageMap.get(username).add(message) ;\n\t\t\t\n\t\t}else {\n\t\t\tList<Message> newMessageList = new ArrayList<Message>();\n\t\t\tnewMessageList.add(message);\n\t\t\tmessageMap.put(username, (List<Message>)newMessageList );\n\t\t}\n\t}", "@Override\n\tpublic void onMessageReceived(Message m) {\n\t\thandle.addMessage(m);\n\t\trefreshMessages();\n\t}", "@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\t}", "protected void handleInboundMessage(Object msg) {\n/* 748 */ inboundMessages().add(msg);\n/* */ }", "public void receive(Message message) {\n\t\t\tappReceiver.getBufferReceive().add(message);\r\n\t\t\t\t\r\n\t\t}", "public void addMessage(Message message)\n\t{\n\t\tmessages.add(message);\n\t\tsize+=messages.size();\n\t}", "public interface MessageProcessor{\n\n public void execMessage(MessageWrapper messageWrapper);\n}", "public void addMessageListener(MessageListener listener)\n {\n if(!messageListeners.contains(listener))\n messageListeners.add(listener);\n }", "public void recieveMessage( final String message ) {\r\n messages.add( message );\r\n }", "public void addSmsMessageListener(MessageListener l) {\n // If this chat transport does not support sms messaging we do nothing here.\n if (!allowsSmsMessage())\n return;\n\n OperationSetSmsMessaging smsOpSet = mPPS.getOperationSet(OperationSetSmsMessaging.class);\n smsOpSet.addMessageListener(l);\n }", "@Override\n\tpublic void processMessage(byte[] message) {\n\t}", "@Override\n\tpublic void handlePacket(Packet msg, int sourceClientID)\n\t{\n\t\tprocessQueue.add(new ProcessEntry(msg, sourceClientID));\n\t}", "void setNext(MessageProcessor next);", "@Override\n\tpublic void register(Subscriber m) {\n\t\tsubscribersMessages.put(m,new ConcurrentLinkedQueue<>());\n\t}", "public void addMessage(Message message) {\n\t\tmessageList.addMessage(message);\n\t\tscrollBar.setValue(scrollBar.getMaximum());\n\t\trepaint();\n\t}", "@Override\n public void registerForMessage(CommReceiver recClass) {\n commSender.registerForMessage(recClass);\n }", "@Override\n\tpublic void process(MessageStream<ServerMessage> message)\n\t{\n\t\t\n\t}", "public interface IProcessor {\n\n Object onMsgHandle(int cmdId, Object... arg);\n}", "public void onMessageReceived(String message) {\n\t\t\n\t\tILogger logger = LoggerFactory.getLoggerInstance();\n\t\t/** \n\t\t * Create instance of processing module handler and pass message to it. \n\t\t * Processing module handler perform corresponding operation and\n\t\t * compute the changes to be sent to UI\n\t\t */\n\t\tObjectHandler objectHandler = new ObjectHandler();\n\t\tobjectHandler.onMessageReceived(message);\n\t\tlogger.log(ModuleID.PROCESSING, \n\t\t\t\tLogLevel.INFO,\n\t\t\t\t\"Test: Passed the message to processing module ObjectHandler.\");\n\t}", "public void addMessageListener(AdHocChatRoomMessageListener listener)\n {\n synchronized (messageListeners)\n {\n if (!messageListeners.contains(listener))\n messageListeners.add(listener);\n }\n }", "public MessageDispatcher ()\n\t{\n\t\tthis (new MessageThreadFactory ());\n\t}", "public interface MessageListener {\n\t\n\t/**\n\t * Method used to consume message\n\t * @param message\tMessage that You want to consume\n\t */\n\tvoid consumeMessage(String message);\n\t\n\t/**\n\t * Method used when You want to get all consumed messages\n\t * @return\tList of messages consumed from a jms queue/topic\n\t */\n\tList<String> getFeeds();\n\n}", "private synchronized void addMessage(String user, String message,\n\t\t\tString[] receivers) {\n\t\tif (receivers.length > 0)\n\t\t\tchatData.addElement(new ChatMessage(user, message, receivers));\n\t\telse\n\t\t\tchatData.addElement(new ChatMessage(user, message));\n\t\tif (chatData.size() > 20)\n\t\t\tchatData.removeElementAt(0);\n\t}", "public void addMsg(String msg) {\n logger.info(Thread.currentThread().getStackTrace()[1].getMethodName());\n logger.debug(\"Add New Message -> \"+msg);\n this.messages.add(msg);\n }", "public void addReceivedSMS(SMS sms) {\n this.getState().receivedSMS(sms);\n }", "public TcpClient(OnMessageReceived listener) {\n\n messageListener = listener;\n }", "private void addCasConsumer(CasProcessor aProcessor, String aCpName) throws Exception {\n if (consumers.containsKey(aCpName)) {\n if (UIMAFramework.getLogger().isLoggable(Level.CONFIG)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.CONFIG, this.getClass().getName(),\n \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_add_consumer_to_list__CONFIG\",\n new Object[] { Thread.currentThread().getName(), aCpName });\n }\n int listIndex = getIndexInList(consumerDeployList, aCpName);\n ((List) consumerDeployList.get(listIndex)).add(aProcessor);\n } else {\n ArrayList newList = new ArrayList();\n newList.add(aProcessor);\n consumers.put(aCpName, newList);\n\n consumerDeployList.add(newList);\n\n if (UIMAFramework.getLogger().isLoggable(Level.CONFIG)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.CONFIG, this.getClass().getName(),\n \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_add_consumer_to_new_list__CONFIG\",\n new Object[] { Thread.currentThread().getName(), aCpName });\n }\n if (cpeFactory.isDefault()) {\n cpeFactory.addCasProcessor(aProcessor);\n }\n }\n }", "public void addMessage(String message) {\n\t\tthis.message = message;\n\t}", "public void enqueue(Message msg){\n\t\tqueue.add(msg);\n\t}", "public void addMessage(BaseMessage message, final Callback callback){\n final ID id = new ID(message);\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n addMessageInl(id, callback);\n }\n });\n }", "@Override\n\tpublic MessagePojo addMessage(MessagePojo message) {\n\t\treturn null;\n\t}", "public void addMessageListener(SocketListener sl_arg){\n\t\tsl = sl_arg;\n\t}", "private void registerMessageProcessed() {\r\n\t\tcounter++;\r\n\t\t\r\n\t\t// If it's the 10th, 20th, 30th, 40th or 50th message...\r\n\t\tif (counter%10 == 0) {\r\n\t\t\t\r\n\t\t\t// ...give a summary of all sales by type and the overall total value paid.\r\n\t\t\tSystem.out.println(\"Sale summary:\");\r\n\t\t\t\r\n\t\t\t// For every sale type...\r\n\t\t\tfor (String saleType : typeToSales.keySet()) {\r\n\t\t\t\t\r\n\t\t\t\t// ...calculate the overall value paid for all sales of this type and print the result\r\n\t\t\t\tSystem.out.println(MessageFormat.format(\" Sale type: {0}; Total value: {1, number, currency}\", saleType, getTotalValue(saleType) / 100.0));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// If it's the 50th message...\r\n\t\t\tif (counter%50 == 0) {\r\n\t\t\t\t\r\n\t\t\t\t// ...print the adjustment summary.\r\n\t\t\t\tSystem.out.println(\"Adjustment summary:\");\r\n\r\n\t\t\t\t// For every sale type...\r\n\t\t\t\tfor (String saleType : typeToAdjustments.keySet()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(MessageFormat.format(\" Sale type: {0}\", saleType));\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Adjustment adjustment : typeToAdjustments.get(saleType)) {\r\n\t\t\t\t\t\t// ...print the sequence of adjustments made to it.\r\n\t\t\t\t\t\tSystem.out.println(MessageFormat.format(\" Operation: {0}; Anount: {1}\", adjustment.getOperation(), adjustment.getAmount()));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Final action is to warn the system will accept no more messages...\r\n\t\t\t\tSystem.out.println(\"Limit of 50 messages reached. System will now terminate.\");\r\n\r\n\t\t\t\t// ...and terminate.\r\n\t\t\t\tthis.terminated = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public ReceiveMessageResult receiveMessage(ReceiveMessageRequest request) {\n request = beforeClientExecution(request);\n return executeReceiveMessage(request);\n }", "void consumeMessage(String message);", "public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }", "protected void handleOutboundMessage(Object msg) {\n/* 741 */ outboundMessages().add(msg);\n/* */ }", "@Override\n public void receiveMessage(String message) {\n }", "@Override\n\tprotected void doReceiveMessage(Message msg) {\n\t\tdeliverMessage(msg);\n\t}", "public void addMessage(String message) {\r\n returnObject.addMessage(message);\r\n }", "public void addMessage(ChatMessage message) {\n sqLiteHandler.addMessageToDB(message, this);\n messages.add(message);\n }", "void registerEventBusForEvent( EventBus eventBus, Consumer<List<? extends EventMessage<?>>> messageProcessor );", "public boolean readNext (TSMessageConsumer processor);", "public void messageReceived() {\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.messagesRecieved, this.getClass()), this\n\t\t.getMessageType(), 1);\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.bytesRecieved, this.getClass()), this\n\t\t.getMessageType(), TrackedMessage.objectSize(this));\n }", "@JmsListener(destination = \"mailbox-destination\", containerFactory = \"myJmsContainerFactory\")\n public void receiveTextMessage(String message) {\n System.out.println(\"Received <\" + message + \">\");\n }", "public void add(String inputFile, String message) {\n\t\tthis.messages.add(new String[]{inputFile, message});\n\t}", "public void addListener(IMessageListener newListener) {\n synchronized (listeners) {\n listeners.add(newListener);\n }\n }", "private static void addConsumer()\r\n\t{\r\n\t\tparsers++;\r\n\t\tParser consumer = new Parser();\r\n\t\tconsumer.start();\r\n\t}", "abstract public boolean onMessageReceived(MMXMessage message);", "public void addStartListener(Consumer<JvmThread> consumer) {\n startListeners.add(consumer);\n }", "@Override\n\t\t\tpublic void onMessage(Message message) {\n\t\t\t\tTextMessage msg = null;\n\t\t\t\t\n\t\t\t\tif(message instanceof TextMessage){\n\t\t\t\t\tmsg = (TextMessage)message;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(\"Consumer:->Receiving message: \"+ msg.getText());\n\t\t\t\t\t} catch (JMSException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Message of wrong type: \"+message.getClass().getName());\n\t\t\t\t}\n\t\t\t}", "private void addParallizableCasProcessor(CasProcessor aProcessor, String aCpName)\n throws Exception {\n UIMAFramework.getLogger(this.getClass()).log(Level.CONFIG, \"Adding new annotator:\" + aCpName);\n if (analysisEngines.containsKey(aCpName)) {\n if (UIMAFramework.getLogger().isLoggable(Level.CONFIG)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.CONFIG, this.getClass().getName(),\n \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_add_pcp_to_existing_list__CONFIG\",\n new Object[] { Thread.currentThread().getName(), aCpName });\n }\n int listIndex = getIndexInList(annotatorDeployList, aCpName);\n ((List) annotatorDeployList.get(listIndex)).add(aProcessor);\n } else {\n ArrayList newList = new ArrayList();\n newList.add(0, aProcessor);\n analysisEngines.put(aCpName, newList);\n annotatorDeployList.add(0, newList);\n if (UIMAFramework.getLogger().isLoggable(Level.CONFIG)) {\n\n UIMAFramework.getLogger(this.getClass()).logrb(Level.CONFIG, this.getClass().getName(),\n \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_add_pcp_to_new_list__CONFIG\",\n new Object[] { Thread.currentThread().getName(), aCpName });\n }\n if (cpeFactory.isDefault()) {\n cpeFactory.addCasProcessor(aProcessor);\n }\n }\n\n }", "public MessageConsumer getMessageConsumer() {\n return messageConsumer;\n }", "@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}", "public void addMessageToMessageBoard(String msg) {\n messagesToDisplay.add(msg);\n }", "public void messageReceived(Message m) {\n\t\t\r\n\t}", "public void processMessage(DeviceMateMessage m);", "@Override\n public void next(MessageProcessor choice) {\n \n }", "@Override\n\tpublic void receive_message(Message m) {\n\t\t\n\t}", "public void addMessage(Message message) {\n history.add(message);\n }", "private static <T> FluxProcessor<T, T> toSendingProcessor(Consumer<? super Flux<T>> sender) {\n FluxProcessor<T, T> processor = EmitterProcessor.create(1);\n sender.accept(processor);\n return processor;\n }", "protected void addProcessingMessage(final HRegionInfo hri) {\n getOutboundMsgs().add(new HMsg(HMsg.Type.MSG_REPORT_PROCESS_OPEN, hri));\n }", "public void addMessage(MessageInterface message) {\n \tInteger prevId = message.getPreviousHopId();\n \tInteger nextId = message.getNextHopId();\n \tint distance = networkGraph.getDistance(prevId, nextId);\n travelingMessages.put(message, distance);\n }", "public void addObserver(ProcessObserver wpo){\r\n\t\tobservers.add(wpo);\r\n\t}", "public interface OnMessageReceived {\n void messageReceived(String message);\n }", "public interface OnMessageReceived {\n\t\tpublic void messageReceived(String message);\n\t}", "void startMessageProcessing(int msgId) {\r\n\t\trCache.changesBegin(msgId);\r\n\t}", "public void addMessage(byte[] message) throws RemoteException;", "@Override\n\t\tpublic void onMessage(Message message) {\n\t\t\tTextMessage msg = null;\n\t\t\t\n\t\t\tif(message instanceof TextMessage){\n\t\t\t\tmsg = (TextMessage)message;\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"Consumer:->Receiving message: \"+ msg.getText());\n\t\t\t\t} catch (JMSException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Message of wrong type: \"+message.getClass().getName());\n\t\t\t}\n\t\t}", "public void addMessage(@Nonnull final BasicMessage jmsm) {\n\t\tfinal Iterator<IMessageViewer> iterator = changeListeners.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\t(iterator.next()).addJMSMessage(jmsm);\n\t\t}\n\t}", "@Override\n public void receiveMessage(Message m) {\n commReceiver.receiveMessage(m);\n }" ]
[ "0.6471787", "0.61933666", "0.614538", "0.5864841", "0.58570224", "0.5856841", "0.5831086", "0.56974524", "0.56387854", "0.5603577", "0.5600574", "0.5594792", "0.55542934", "0.5551863", "0.5494454", "0.5494007", "0.54813206", "0.5475046", "0.54637164", "0.5424066", "0.533965", "0.5305331", "0.5302938", "0.5279136", "0.5279037", "0.52529037", "0.52436095", "0.5232812", "0.52198946", "0.5210352", "0.5190927", "0.51816386", "0.5179322", "0.5147807", "0.51462233", "0.5131216", "0.5093427", "0.50633556", "0.5022939", "0.49990702", "0.4987446", "0.4987374", "0.49814516", "0.49715084", "0.4971144", "0.49626228", "0.49325734", "0.49111372", "0.48988482", "0.48890465", "0.48871988", "0.4884498", "0.48804933", "0.48752555", "0.48708507", "0.48580194", "0.48555544", "0.4855437", "0.4851118", "0.4839993", "0.4836086", "0.48244417", "0.4819764", "0.4819072", "0.481088", "0.48098445", "0.47998545", "0.47915584", "0.47875732", "0.47715738", "0.47703362", "0.47629794", "0.47618696", "0.4761027", "0.47519705", "0.4750031", "0.47333434", "0.4729687", "0.47281033", "0.47256985", "0.4722671", "0.47199324", "0.47182986", "0.47170332", "0.47152624", "0.47081587", "0.47069156", "0.46962935", "0.46916795", "0.46896037", "0.4685339", "0.46739563", "0.4669996", "0.46621358", "0.4658356", "0.4655917", "0.46551633", "0.4653473", "0.4649383", "0.46488962" ]
0.784643
0
store the numbers in a array from the string separated using the comma
public static int add(String numbers) { String[] numbersArray = numbers.split(","); //throw exception if more than two numbers are provided for addition if (numbersArray.length > 2) { throw new RuntimeException("upto two numbers are allowed seperated by comma"); } else { for (String num : numbersArray) { //check if string is empty or not if (!num.isEmpty()) { Integer.parseInt(num); } } } //return zero if the string is empty return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int[] parseNumbers(String numbersString) {\n\t\tStringTokenizer tokenizer = new StringTokenizer(numbersString, \",\");\n\t\tint numbers[] = new int[tokenizer.countTokens()];\n\t\tint count = 0;\n\n\t\twhile (tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tnumbers[count++] = Integer.parseInt(tokenizer.nextToken());\n\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\tSystem.out.println(\"Malformed Input. Please use a comma seperated list of Integers.\");\n\t\t\t\tnfe.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn numbers;\n\t}", "public int[] stringToIntArray(String input){\n \tSystem.out.println(input);\n \n \tString[] StringArray = input.split(\",\");\n \tfor(String intString:StringArray)\n \t {\n \t\tSystem.out.println(intString);\n \t }\n \n \tint[] intArray = new int[StringArray.length];\n \n \tint i = 0;\n \tfor(String intString:StringArray)\n \t {\n \t\tSystem.out.println(intString);\n \t\t int x = Integer.parseInt(intString);\n \t\t intArray[i] = x;\n \t\t i++;\n \t }\n \treturn intArray;\n }", "private void valuesToArray() {\n arrayValues = new int[Board.ROWS][Board.COLUMNS];\n StringTokenizer tokenizer = new StringTokenizer(boardValuesString, \",\");\n\n for (int i = 0; i < Board.ROWS; i++) {\n for (int j = 0; j < Board.COLUMNS; j++) {\n // skip the * at the beginning for user placed values.\n String cellValueString = tokenizer.nextToken();\n int cellValue;\n if (!cellValueString.contains(BoardSaver.CELL_USER_VALUE_INDICATOR)) {\n cellValue = Integer.parseInt(cellValueString);\n } else {\n cellValue = Integer.parseInt(cellValueString.substring(1));\n }\n arrayValues[i][j] = cellValue;\n }\n }\n }", "private String[] commaDelimited(String str) {\n StringTokenizer st = new StringTokenizer(str,\",\");\n String strs[] = new String[st.countTokens()];\n for (int i=0;i<strs.length;i++) strs[i] = Utils.decFmURL(st.nextToken());\n return strs;\n }", "public static ArrayList<Integer> convertSkipStringToArrayInteger(String stringSkips){\n // Help from https://stackoverflow.com/questions/27599847/convert-comma-separated-string-to-list-without-intermediate-container\n // note i did it the non fancy way since i wasn't comfortable with the other\n List<String> numbers = Arrays.asList(stringSkips.split(\",\"));\n\n ArrayList<Integer> numbersInt = new ArrayList<>();\n for (String number : numbers) {\n numbersInt.add(Integer.valueOf(number));\n }\n return numbersInt;\n }", "private void pencilValuesToArrayList() {\n userPlacedPencilValuesIndex = new ArrayList<>();\n StringTokenizer tokenizer = new StringTokenizer(pencilValuesString, BoardSaver.PENCIL_VALUES_CELL_DELIMITER);\n\n while (tokenizer.hasMoreTokens()) {\n String cellPossibilitiesList = tokenizer.nextToken();\n\n StringTokenizer tokenizer2 = new StringTokenizer(cellPossibilitiesList, \",\");\n ArrayList<Integer> values = new ArrayList<>();\n\n while (tokenizer2.hasMoreTokens()) {\n String possibilityValue = tokenizer2.nextToken();\n if (!possibilityValue.equals(\" \")) {\n values.add(Integer.valueOf(possibilityValue));\n }\n }\n\n userPlacedPencilValuesIndex.add(values);\n }\n }", "public int[] numberToArray(String n) {\n\t\tint arr[] = new int[n.length()];\n\t\tfor(int i = 0; i < n.length(); i++) {\n\t\t\tarr[i] = Character.getNumericValue(n.charAt(i));\n\t\t}\n\t\treturn arr;\n\t}", "public List<PairOfInts> convertInputToPairsOfNumbers(String input) {\n\t\tList<PairOfInts> pairsOfIntsList = new ArrayList<PairOfInts>();\n\t\tif(input != null) {\n\t\t\tList<String> list = Stream.of(input\n\t\t\t\t\t.split(\"]\"))\n\t\t\t\t\t.map(line -> line.replace(\"{\", \"\"))\n\t\t\t\t\t.map(line -> line.replace(\"[\", \"\"))\n\t\t\t\t\t.map(line -> line.replace(\"]\", \"\"))\n\t\t\t\t\t.map(line -> line.replace(\"}\", \"\"))\n\t\t\t\t\t.map(line -> line.replace(\", \", \"\"))\n\t\t\t\t\t.map(line -> line.trim())\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\n\t\t\tfor(String s : list) {\n\t\t\t\tString[] numberPair = s.split(\",\");\n\t\t\t\tif((numberPair != null) && (!numberPair[0].equals(\"\"))) {\n\t\t\t\t\tPairOfInts pairOfInts = new PairOfInts();\n\t\t\t\t\tpairOfInts.setNumber1(Integer.parseInt(numberPair[0]));\n\t\t\t\t\tpairOfInts.setNumber2(Integer.parseInt(numberPair[1]));\n\t\t\t\t\tpairsOfIntsList.add(pairOfInts);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn pairsOfIntsList;\n\t}", "public Number[] stringToArrayNumberParser(String string) {\n int stringLength = string.length();\n int arrayLength = (int) (stringLength / 3 * 2 + 5);\n Number[] array = new Number[arrayLength];\n int lastFreeArrayIndex = 0;\n int numberBeginIndex = 0;\n int numberEndIndex = 0;\n char currentCharacter;\n Number number;\n int index;\n boolean isFoundNumber = false;\n for (index = 0; index < stringLength; index++) {\n boolean isSeparator = false;\n currentCharacter = string.charAt(index);\n for (int separatorIndex = 0; separatorIndex < allowedSeparators.length; separatorIndex++) {\n if (currentCharacter == allowedSeparators[separatorIndex]) {\n isSeparator = true;\n }\n }\n if (!isSeparator && !isFoundNumber) {\n isFoundNumber = true; //if not a separator and the first digit of the number\n numberBeginIndex = index;\n } else if (isSeparator && isFoundNumber) {\n isFoundNumber = false; //if separator, after the start of the number\n numberEndIndex = index - 1;\n System.out.println(\"length \" + string.length());\n System.out.println(\"begin: \" + numberBeginIndex);\n System.out.println(\"end \" + (numberEndIndex + 1));\n number = Double.parseDouble(string.substring(numberBeginIndex, numberEndIndex + 1));\n addNumberToArrayByIndex(array, number, lastFreeArrayIndex);\n lastFreeArrayIndex++;\n }\n }\n if (isFoundNumber) {\n numberEndIndex = index - 1;\n number = Double.parseDouble(string.substring(numberBeginIndex, numberEndIndex + 1));\n addNumberToArrayByIndex(array, number, lastFreeArrayIndex); //case, where the number is the last element of the string\n lastFreeArrayIndex++;\n }\n return arrayFinalFormation(array, lastFreeArrayIndex);\n }", "public static int[][] getNumberArray(String arrayInput) {\n\n String[] row = arrayInput.split(\"[;]\");\n int[][] numberArray = new int[row.length][];\n\n // arrayInput.spl\n\n for (int i = 0; i < row.length; i++) {\n\n String[] column = row[i].split(\"[,]\");\n int[] tempColumn = new int[column.length];\n\n for (int j = 0; j < column.length; j++) {\n tempColumn[j] = Integer.parseInt(column[j]);\n }\n numberArray[i] = tempColumn;\n }\n return numberArray;\n }", "public static List<Integer> convertStrToList(String str, String sepator) {\n\t\tif (StringUtils.isEmpty(str)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (StringUtils.isEmpty(sepator)) {\n\t\t\tsepator = \",\";\n\t\t}\n\n\t\tString[] split = str.split(sepator);\n\t\tList<Integer> list = null;\n\t\tif (split != null && split.length > 0) {\n\t\t\tlist = new ArrayList<Integer>();\n\n\t\t\tfor (String s : split) {\n\t\t\t\tlist.add(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "public int[] getIntArray(String name)\r\n throws NumberFormatException\r\n {\r\n String[] data = getString(name).split(\",\");\r\n int[] value = new int[data.length];\r\n for( int i=0; i<data.length; i++ )\r\n value[i] = Integer.parseInt(data[i].trim());\r\n \r\n return value;\r\n }", "public int[] convertNumToDigitArray(String strNum) {\r\n \r\n //Declare Variables\r\n int strLength = strNum.length();\r\n int[] intArray = new int[strLength];\r\n \r\n //Parse Through String Input & Put Into Integer Array\r\n for (int i = 0; i < strLength; i++) {\r\n \r\n intArray[i] = (int)(strNum.charAt(i));\r\n \r\n }\r\n \r\n //Return Value\r\n return intArray;\r\n \r\n }", "public static List<Integer> stringToIntList(String string) {\n List<Integer> listInt = new LinkedList<>();\n String charBuffer = \"\";\n char[] charArray = string.toCharArray();\n for ( char c : charArray ) {\n if ( c == ',' ) {\n listInt.add(Integer.parseInt(charBuffer));\n charBuffer = \"\";\n } else if ( InputControl.testInt(c) ) {\n charBuffer += c;\n\n }\n }\n listInt.add(Integer.parseInt(charBuffer));\n return listInt;\n }", "public static String[] commaDelimitedListToStringArray(String str) {\n\t\treturn delimitedListToStringArray(str, \",\");\n\t}", "public static int[] extractNum(String str){\n String nums=\"\";\n for(int i=0; i<str.length(); i++){\n if(str.charAt(i)>=0&&str.charAt(i)<=9){\n nums+=str.charAt(i)+\"\";\n }\n }\n// System.out.println((nums));\n String [] arr = nums.split(\"\");\n int[] numArr = new int [arr.length];\n for (int i=0; i<arr.length; i++){\n numArr[i]=Integer.parseInt(arr[i]);\n }\n return numArr;\n }", "public static int[] toIntArray(String arr[])\r\n\t{\r\n\t\tint length = arr.length;\r\n\t\tint[] numeros = new int[length];\r\n\t\tfor (int i = 0; i < length; ++i) {\r\n\t\t\tnumeros[i] = Integer.parseInt(arr[i]);\r\n\t\t}\r\n\t\treturn numeros;\r\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\r\n\t\t\r\n String row_x=String.valueOf(in.nextLine().trim());\r\n String[] row_y=row_x.split(\",\");\r\n int[] num = new int[3];\r\n for(int j = 0; j < 3; j++) {\r\n num[j] = Integer.parseInt(row_y[j]);\r\n\r\n }\r\n System.out.println(num[0]);\r\n \r\n\t}", "public static int[] converter(String[] a){\n int size = a.length - 1;\n int[] integers = new int[size];\n for (int i = 0; i < size; i++) {\n integers[i] = Integer.parseInt(a[i+1]);\n }\n return integers;\n }", "public static String[] split(String string) {\n String[] result = string.split(\",\");\n for (int i = 0; i < result.length; i++) {\n result[i] = result[i].trim();\n }\n return result;\n }", "public static void main(String a[])throws IOException\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n LinkedHashSet set = new LinkedHashSet();\n String num = reader.readLine();\n String arr[] = num.split(\",\");\n for( int i=0; i<arr.length; i++ ){\n set.add(arr[i]);\n }\n System.out.println(set);\n }", "public static String[] parseCommaSeparatedList(String line) {\n \tArrayList myList = new ArrayList();\n \t\n \tString myLine = new String(line);\n \t\n \twhile(myLine.contains(\",\")) {\n \t\tString item = myLine.substring(0, myLine.indexOf(\",\"));\n \t\titem = StringUtilities.removeEdgeWhitespace(item);\n \t\tmyList.add(item);\n \t\tmyLine = myLine.substring((myLine.indexOf(\",\") + 1));\n \t}\n \tmyLine = StringUtilities.removeEdgeWhitespace(myLine);\n \tif(myLine.compareTo(\"\") != 0) myList.add(myLine);\n\n \tString[] list = new String[myList.size()];\n \tfor(int i = 0; i < myList.size(); i++) {\n \t\tlist[i] = new String((String)myList.get(i));\n \t}\n \t\n \treturn list;\n }", "private ArrayList<Integer> readIntString(String intString)\n {\n ArrayList<Integer> intList = new ArrayList<Integer>();\n Scanner intStringScanner = new Scanner(intString);\n intStringScanner.useDelimiter(\",\");\n while (intStringScanner.hasNextInt())\n {\n intList.add(new Integer(intStringScanner.nextInt()));\n }\n intStringScanner.close();\n return intList;\n }", "public static int[] converter(String[] a){\n int size = a.length;\n int[] integers = new int[size];\n for (int i = 0; i < size; i++) {\n integers[i] = Integer.parseInt(a[i]);\n }\n return integers;\n }", "private int[] convertToIntArray(String value) {\r\n\t\tString[] items = StringUtils.split(value, \"#\");\r\n\t\tint[] result = new int[items.length];\r\n\t\tfor (int i = 0; i < items.length; i++) {\r\n\t\t\tresult[i] = Integer.parseInt(items[i]);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Test\n\tpublic void castWordNumbersFollowedByComma() {\n\t\tString input = \"Alice has one, not two or three apples..\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"Alice has 1, not 2 or 3 apples..\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}", "@Test\n public void testRedis() {\n\n String str = \"1\";\n\n String[] strings = StrUtil.splitToArray(str, ',');\n\n System.out.println(strings[0]);\n }", "public static int[] toIntArray(String s) {\n\t\tString[] stringArray = s.split(\"(?!^)\");\n\t\tint[] intArray = new int[stringArray.length];\n\t\tint i = 0;\n\t\tfor (String string2 : stringArray) {\n\t\t\tint decimal = Integer.parseInt(string2, 16);\n\t\t\tintArray[i] = decimal;\n\t\t\ti++;\n\t\t\t// System.out.println(\"Hex value is \" + decimal);\n\t\t\t// System.out.println(string2);\n\t\t}\n\t\treturn intArray;\n\t}", "private String[] separarCoordenadas(String pCasilla){\n\t\treturn pCasilla.split(\",\");\n\t}", "private ArrayList parseStringToList(String data){\n ArrayList<String> result = new ArrayList<String>();\n String[] splitResult = data.split(\",\");\n for(String substring : splitResult){\n result.add(substring);\n }\n return result;\n }", "public static int[] stringToIntArray(String s, String div){\n\t\tString[] ugh = s.split(div);\n\t\tint[] output = new int[ugh.length];\n\t\tfor (int i=0; i<ugh.length; i++){\n\t\t\toutput[i]=parseInt(ugh[i]);\n\t\t}\n\t\treturn output;\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tint sum=0;\r\n\t\tSystem.out.println(\"Enter the Numbers string\");\r\n\t\tString str=sc.nextLine();\r\n\t\t\r\n\t\tString arr[]= str.split(\",\");\r\n\t\tfor(String ar:arr)\r\n\t\t{\r\n\t\t\tsum+=Integer.parseInt(ar);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Sum of All String of Integer numbers is ... \"+sum);\r\n\r\n\t\t\r\n\t\t \r\n\t\t\r\n\t}", "private void setCoordsByCommaSeparatedString(final String sCoords) {\n \n \t\tStringTokenizer sToken = new StringTokenizer(sCoords, \",\");\n \n \t\tshArCoords = new short[sToken.countTokens() / 2][2];\n \n \t\tint iCount = 0;\n \n \t\twhile (sToken.hasMoreTokens()) {\n \t\t\t// Filter white spaces\n \t\t\tshort shXCoord = Short.valueOf(sToken.nextToken().replace(\" \", \"\")).shortValue();\n \n \t\t\tif (!sToken.hasMoreTokens())\n \t\t\t\treturn;\n \n \t\t\tshort shYCoord = Short.valueOf(sToken.nextToken().replace(\" \", \"\")).shortValue();\n \n \t\t\tshArCoords[iCount][0] = shXCoord;\n \t\t\tshArCoords[iCount][1] = shYCoord;\n \n \t\t\tiCount++;\n \t\t}\n \t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\n\t\tString s1 = (k.replace(\"[\", \"\").replace(\"]\", \"\"));\r\n\t\tString s2 = (s1.replace(\",\", \"\"));\r\n\t\tString s3 = s2.replaceAll(\"\\\\s\", \"\");\r\n\t\t//String stringss = strings.toString();\r\n\t\t//String[] stringss = strings.replaceAll(\"\\\\s\", \"\").split(\"\");\r\n\t\t\r\n\t\tint Startindex = 0;\r\n\t\tint Endindex = 0;\r\n\t\tArrayList<String> ai = new ArrayList<String>();\r\n\t\tfor (int i =0;i<=strings.length-1;i++) {\r\n\t\t\tint result = Integer.parseInt(strings[i]);\r\n\t\t\t\r\n\t\t\tif (result==1 && !start) {\r\n\t\t\t\t\r\n\t\t\t\tstart = true;\r\n\t\t\t\tStartindex = i;\r\n\t\t\t\t\r\n\t\t\t}else if (result==1 && start) {\r\n\t\t\t\tstart = false;\r\n\t\t\t\tEndindex = i;\r\n\t\t\t\ts = s3.substring(Startindex, Endindex+1);\r\n\t\t\t\tai.add(s);\r\n\t\t\t\ti =i-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\nSystem.out.println(ai);\r\n\t}", "public static int[] stringToIntArray(String instr, String delim)\n throws NoSuchElementException, NumberFormatException {\n StringTokenizer toker = new StringTokenizer(instr, delim);\n int intArray[] = new int[toker.countTokens()];\n int i = 0;\n \n while (toker.hasMoreTokens()) {\n String sInt = toker.nextToken();\n int nInt = Integer.parseInt(sInt);\n intArray[i++] = new Integer(nInt).intValue();\n }\n return intArray;\n }", "public float[] getFloatArray(String str) {\n if (str != null) {\n String str1[] = str.split(\",\");\n float arr[] = new float[str1.length - 1];\n // at i=0 it is space so start from 1\n for (int i = 1; i < str1.length; i++) {\n arr[i - 1] = Float.parseFloat(str1[i]);\n }\n return arr;\n }\n return null;\n }", "private String commaDelimited(String strs[]) {\n StringBuffer sb = new StringBuffer();\n if (strs.length > 0) {\n sb.append(Utils.encToURL(strs[0]));\n for (int i=1;i<strs.length;i++) sb.append(\",\" + Utils.encToURL(strs[i]));\n }\n return sb.toString();\n }", "public static double[] parseDoubleAndFilterComma(String val[]) {\n\t\t\n\t\tif (val != null) {\n\t\t\tdouble ret[] = new double[val.length];\n\t\n\t\t\tfor (int i = 0; i < val.length; i++) {\n\t\t\t\tif (val[i] != null) {\n\t\t\t\t\tval[i] = val[i].replaceAll(\",\", \"\");\n\t\t\t\t}\n\t\t\t\tret[i] = parseDouble(val[i]);\n\t\t\t}\n\t\n\t\t\treturn ret;\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "public int [] covertirInt(String [] a) {\n\t\n\t\n\t int [] temporal = new int [a.length-1];\n\t\n\t\n\t for (int i =0; i<temporal.length;i++) {\n\t \n\t\t temporal[i]=Integer.parseInt(a[i+1]);\n\t }\n \n \n\t return temporal;\n\t\n}", "public static int[] getArr(){\n Scanner sc = new Scanner(System.in);\n System.out.print(\"Enter five random numbers to place in array: \");\n String input = sc.nextLine();\n String[] stringArr = input.split(\" \");\n int maxSize = 5;\n //final int SIZE = stringArr.length;\n int[] intArr = new int[maxSize];\n\n //populate array in sequence//\n for (int i = 0; i < maxSize; i++){\n intArr[i] = Integer.parseInt(stringArr[i]);\n }\n sc.close();\n return intArr;\n }", "private static int[][] parsePoints(String points) {\n // assuming points are stored like this:\n // x0,y0 x1,y1 x2,y2 ...\n String[] pointList = points.split(\" \");\n int[][] coordinates = new int[2][pointList.length];\n \n for (int q=0; q<pointList.length; q++) {\n pointList[q] = pointList[q].trim();\n int delim = pointList[q].indexOf(\",\");\n coordinates[0][q] =\n (int) Double.parseDouble(pointList[q].substring(0, delim));\n coordinates[1][q] =\n (int) Double.parseDouble(pointList[q].substring(delim + 1));\n }\n return coordinates;\n }", "public static int[] split2ints(String src, String sep) {\n String[] strs = split(src, sep);\n int[] ints0 = new int[strs.length];\n int nn = 0;\n for (int i = 0, n = strs.length; i < n; i++) {\n if (!strs[i].equals(\"\")) {\n try {\n ints0[nn] = Integer.parseInt(strs[i]);\n } catch (Exception e) {\n ints0[nn] = 0;\n }\n nn++;\n }\n }\n int[] ints1 = new int[nn];\n System.arraycopy(ints0, 0, ints1, 0, nn);\n return ints1;\n }", "public double[] makeDouble(String[] vals){\n try {\n double[] result = new double[vals.length - 1];\n\n for (int i = 0; i < vals.length - 1; i++) {\n vals[i] = vals[i].replace(\",\", \".\");\n result[i] = Double.parseDouble(vals[i]);\n }\n return result;\n }catch (Exception e){\n System.out.println(e);\n }\n return null;\n }", "public static int[] toIntArray(String arr[])\n {\n int[] iArray = new int[arr.length];\n for(int i=0;i< arr.length;i++){\n iArray[i]= Integer.parseInt(arr[i]);\n }\n return iArray;\n }", "public static String[] split(String value) {\r\n\t\tif(value == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn value.trim().split(\",\");\r\n\t}", "@Override\n protected void processLine(String line) {\n String[] lines = line.split(\",\");\n for (String l : lines) {\n data.add(l);\n }\n }", "public static Set<String> commaDelimitedStringToSet(String s) {\n Set<String> set = new HashSet<String>();\n String[] split = s.split(\",\");\n for (String aSplit : split) {\n String trimmed = aSplit.trim();\n if (trimmed.length() > 0)\n set.add(trimmed);\n }\n return set;\n }", "public int[] expand (String numberList)\n {\n ArrayList<Integer> list = new ArrayList<Integer>();\n \n int left_bracket_pos = 0;\n int right_bracket_pos = 0;\n int digit = 0;\n \n for (int i=0; i<numberList.length(); i++)\n {\n if (numberList.charAt(i)=='[') {\n if (right_bracket_pos>0) {\n int number_of_digit = Integer.parseInt(numberList.substring(left_bracket_pos+1, right_bracket_pos));\n for (int j=0; j<number_of_digit; j++)\n list.add(digit);\n }\n left_bracket_pos = i;\n } else if (numberList.charAt(i)==']') {\n right_bracket_pos = i;\n } else {\n digit = Character.getNumericValue(numberList.charAt(i));\n }\n }\n \n // write last sets of digits\n int number_of_digit = Integer.parseInt(numberList.substring(left_bracket_pos+1, right_bracket_pos));\n for (int j=0; j<number_of_digit; j++)\n list.add(digit);\n \n int [] arr = new int[list.size()];\n \n for (int i=0; i<list.size(); i++)\n arr[i] = list.get(i);\n \n return arr;\n \n }", "public void setReaderToArray(){\n try{\n String client, number = null;\n\n File reader = new File(\"clientFile/clientInfo.txt\");\n\n Scanner scn = new Scanner(reader);\n scn.useDelimiter(\",\");\n\n while(scn.hasNext()){\n number = scn.next();\n client = scn.next();\n\n clientList.add(client + \" - \" + number);\n }\n scn.close();\n }catch (FileNotFoundException exception){\n System.out.println(\"An error occurred.\");\n }\n }", "public void splitter(String values) {\n\n\t\tfor(int i=0; i < values.length(); i++) {\n\t\t\tnewString += values.charAt(i);\n\n\t\t\tif(semi == values.charAt(i)) {\n\t\t\t\tnewString = newString.replaceAll(\";\", \"\");\n\t\t\t\tnewString = newString.replaceAll(\"\\n\", \"\");\n\t\t\t\tsplittedString.add(newString);\n\t\t\t\tnewString = \"\";\n\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0; i < splittedString.size()-1; i++) {\n\t\t\tsection = splittedString.get(i);\n\t\t\tString[] dev = section.split(\",\");\n\t\t\tboolean validValues = true;\n\t\t\tfor(int x1 = 0; x1 < dev.length; x1+=3) {\n\t\t\t\tString xx1 = dev[x1];\n\t\t\t\tif(isInteger(xx1) && validValues) {\n\t\t\t\t\tx.add(Integer.parseInt(xx1));\n\t\t\t\t} else {\n\t\t\t\t\tvalidValues = false;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tfor(int y1= 1; y1 <dev.length; y1+=3) {\n\t\t\t\tString yy1 = dev[y1];\n\t\t\t\tif(isInteger(yy1) && validValues) {\n\t\t\t\t\ty.add(Integer.parseInt(yy1));\n\t\t\t\t} else {\n\t\t\t\t\tvalidValues = false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tfor(int z1= 2; z1 <dev.length; z1+=3) {\n\t\t\t\tString zz1 = dev[z1];\n\t\t\t\tif(isInteger(zz1) && validValues) {\n\t\t\t\t\tz.add(Integer.parseInt(zz1));\n\t\t\t\t} else {\n\t\t\t\t\tvalidValues = false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}", "public static void populateArray(double[][] array, String data)\n {\n StringTokenizer dataToken = new StringTokenizer(data, \",[] \");\n int rowCount = array.length;\n int colCount = array[0].length;\n\n for (int i = 0; i < rowCount; i++)\n {\n for (int j = 0; j < colCount; j++)\n {\n if (dataToken.hasMoreTokens())\n array[i][j] = Double.parseDouble(dataToken.nextToken());\n else\n array[i][j] = -1;\n }\n }\n }", "public static int[] getNumberArray(String inputString, String alphabets){\n\n int inputSize = inputString.length();\n int alphabetsSize = alphabets.length();\n int[] outputArray = new int[inputSize];\n\n for(int i = 0; i < inputSize; i++){\n\n for(int j = 0; j < alphabetsSize; j++){\n\n if(inputString.charAt(i) == alphabets.charAt(j)){\n\n outputArray[i] = j;\n break;\n\n }\n\n }\n\n }\n\n return outputArray;\n\n }", "public static ArrayList<LatLng> convertCoordinatesStringToArrayLatLng(String stringCoords){\n List<String> arrayStringCoords = Arrays.asList(stringCoords.split(\",\"));\n ArrayList<LatLng> coords = new ArrayList<LatLng>();\n LatLng current;\n double lat, lon;\n for(int i=0; i < arrayStringCoords.size(); i += 2){\n lat = Double.parseDouble(arrayStringCoords.get(i));\n lon = Double.parseDouble(arrayStringCoords.get(i+1));\n current = new LatLng(lat, lon);\n coords.add(current);\n }\n return coords;\n }", "public static String [] productsIdList_get(String url){\n\t\tString [] arrList = null; \n\t\tDocument doc=doc_get(url); \n\t\tif(doc!=null){\n\t\t\tElements link_span=doc.select(\"body>div.searchwrap.w980>div#bodyRight>#search_result>#plist>#search_table>#productsIdList\");\n//\t\t\tSystem.out.println(link_span.attr(\"value\"));\n\t\t\tarrList =link_span.attr(\"value\").split(\",\"); \n\t\t\treturn arrList;\n\t\t}\n\t\treturn arrList;\n\t}", "public double[] getDoubleArray(String name)\r\n throws NumberFormatException\r\n {\r\n String[] data = getString(name).split(\",\");\r\n double[] value = new double[data.length];\r\n for( int i=0; i<data.length; i++ )\r\n value[i] = Double.parseDouble(data[i].trim());\r\n \r\n return value;\r\n }", "private static int[] getArrayFromInteger(int i1) {\n\t\tString str = String.valueOf(i1);\r\n\t\tint length = str.length();\r\n\t\tint digits[] = new int[length];\r\n\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\t// Converting char to int.\r\n\t\t\tdigits[i] = str.charAt(i) - 48;\r\n\t\t}\r\n\t\treturn digits;\r\n\t}", "public static double[] stringToDoubleArray(String s, String div){\n\t\tString[] ugh = s.split(div);\n\t\tdouble[] output = new double[ugh.length];\n\t\tfor (int i=0; i<ugh.length; i++){\n\t\t\toutput[i]=parseDouble(ugh[i]);\n\t\t}\n\t\treturn output;\n\t}", "private static int[] enumerate(String in, int min, int max) {\n List<Integer> result = new ArrayList<Integer>();\n \n // a, b, c\n StringTokenizer tok = new StringTokenizer(in.trim(), \",\");\n while (tok.hasMoreTokens()) {\n \n String str = tok.nextToken().trim();\n int stepsize = 1;\n int start = min;\n int end = max;\n \n // Extract the step size, */2 or 7-10/2\n int stepdivider = str.indexOf('/');\n if (stepdivider > 0) {\n try {\n stepsize = Integer.parseInt(str.substring(stepdivider + 1));\n if (!\"*\".equals(str.substring(0, str.indexOf('/'))))\n throw new IllegalArgumentException(\"Malformed stepsize expression '\" + str + \"', first argument should be *\");\n for (int i = 0; i < max; i++) {\n if (i % stepsize == 0)\n result.add(i);\n }\n return toIntArray(result);\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Illegal stepsize in '\" + str + \"'\");\n }\n }\n \n // *, 7-12, 13\n int hyphen = str.indexOf('-');\n if (str.startsWith(\"*\")) {\n return new int[] {};\n } else if (hyphen > 0) {\n try {\n start = Integer.parseInt(toNumber(str.substring(0, hyphen)));\n end = Integer.parseInt(toNumber(str.substring(hyphen + 1)));\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Invalid interval in '\" + str + \"'\");\n }\n } else {\n try {\n start = end = Integer.parseInt(toNumber(str));\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Invalid number: '\" + str + \"'\");\n }\n }\n \n // Check for minimum / maximum\n if (start < min)\n throw new IllegalArgumentException(\"Value \" + start + \" in '\" + in + \"' is smaller than the minimum of \" + min);\n if (end > max)\n throw new IllegalArgumentException(\"Value \" + end + \" in '\" + in + \"' is larger than the maximum of \" + min);\n \n // Return the result\n for (int i = start; i <= end; i += stepsize) {\n result.add(new Integer(i));\n }\n \n }\n return toIntArray(result);\n }", "public int[] convert(){\r\n int[] arreglo = new int[cedula.length()];\r\n for(int i=0; i<cedula.length(); i++){\r\n // convierte los char en int\r\n arreglo[i] = Character.getNumericValue(cedula.charAt(i));\r\n }\r\n return arreglo;\r\n }", "public static List<Long> convertStrToList4Long(String str, String sepator) {\n\t\tif (StringUtils.isEmpty(str)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (StringUtils.isEmpty(sepator)) {\n\t\t\tsepator = \",\";\n\t\t}\n\n\t\tString[] split = str.split(sepator);\n\t\tList<Long> list = null;\n\t\tif (split != null && split.length > 0) {\n\t\t\tlist = new ArrayList<Long>();\n\n\t\t\tfor (String s : split) {\n\t\t\t\tlist.add(Long.parseLong(s));\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "protected String[] arrayParser(String item){\n return item.replaceAll(\"\\\\{|\\\\}|\\\\[|\\\\]|(\\\\d+\\\":)|\\\"|\\\\\\\\\", \"\").split(\",\");\n }", "private String[] parseArray(String val) {\n String[] arrayVals;\n val = val.trim();\n if (emptyVal(val)) {\n arrayVals = Constants.EMPTY_STRING_ARRAY;\n } else {\n arrayVals = val.split(\"\\\\s+\");\n }\n return arrayVals;\n }", "public static Set<Integer> getSetFromString(String str) {\n String[] strArray = str.split(\" \");\n Set<Integer> output = new TreeSet<>();\n for (String number : strArray) {\n output.add(Integer.parseInt(number));\n }\n return output;\n }", "public double getNumFromText(String text){\n if (text.equals(\"-\")){\n return 0;\n }\n else if (text.contains(\",\")){\n return Double.parseDouble(text.replace(\",\",\"\"));\n }\n else {\n return Double.parseDouble(text);\n }\n }", "private static String[] parseInstance(String line) {\n line = line.trim();\n String[] instance = line.split(\",\");\n return instance;\n }", "private static String removeDigitGroupSeparators(final String input)\n {\n final String output = input.trim();\n\n // Replace one occurrence only, otherwise we will generate an incorrect result\n if (output.contains(\",\"))\n {\n return output.replace(\",\", \"\");\n }\n else\n {\n return output.replace(\".\", \"\");\n }\n }", "public String[] camposDivididos(){\r\nString[] args=column().split(\"[,]\");\r\nreturn args;\r\n //return Arrays.toString(args);\r\n}", "private static List<String> convertCommaDelimitedStringToList(String delimitedString) {\n\n\t\tList<String> result = new ArrayList<String>();\n\n\t\tif (!StringUtils.isEmpty(delimitedString)) {\n\t\t\tresult = Arrays.asList(StringUtils.delimitedListToStringArray(delimitedString, \",\"));\n\t\t}\n\t\treturn result;\n\n\t}", "public static List<Float> extractFloats(String string) {\r\n\t\t\tList<Float> floats = new ArrayList<Float>();\r\n\r\n\t\t\tScanner scanner = new Scanner(string);\r\n\t\t\tscanner.useDelimiter(\"[^\\\\d,]\");\r\n\r\n\t\t\twhile (scanner.hasNextFloat() || scanner.hasNext()) {\r\n\t\t\t\tif (scanner.hasNextFloat()) {\r\n\t\t\t\t\tfloats.add(scanner.nextFloat());\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tscanner.next();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tscanner.close();\r\n\t\t\treturn floats;\r\n\t\t}", "public static String[] convertStringToArray(String str){\n String[] arr = str.split(strSeparator);\n return arr;\n }", "int[] parseIntArray(String[] ar)\n {\n int[] int_ar = new int[ar.length];\n for (int i = 0; i < int_ar.length; i++)\n {\n int_ar[i] = Integer.parseInt(ar[i]);\n }\n return int_ar;\n }", "private static Set<Integer> getValues(String string, List<String> variables) {\n\t\tSet<Integer> values = new LinkedHashSet<>();\n\n\t\tstring = string.trim();\n\t\tif (string.matches(\"\\\\[.+\\\\]\")) {\n\n\t\t\tString[] minterms = string.trim().substring(1, string.length() - 1).split(\",\\\\s*\");\n\n\t\t\tfor (String integer : minterms) {\n\t\t\t\tvalues.add(new Integer(integer));\n\t\t\t}\n\n\t\t} else {\n\t\t\tParser parser = new Parser(string);\n\t\t\tvalues = Util.toSumOfMinterms(variables, parser.getExpression());\n\t\t}\n\n\t\treturn values;\n\t}", "public InputArray(String sInputList) \n\t{\n\t\t//String array for storing each element after ectracting them from the input string\n\t\tString[] splitString = new String[sInputList.length()];\n\t\t\n\t\t//Gives the number of elements in the input List \n\t\tint len = 0;\n\t\t\n\t\t//Checking the input string for presence of spaces\n\t\tfor(int i=0; i < sInputList.length(); i++)\n\t\t{\n\t\t\t\n\t\t\t//Checking whether the character at the current position is a space or not\n\t\t\tif(sInputList.charAt(i) != ' ')\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//Extracting each element from the string and storing them in a string array\n\t\t\t\tsplitString[len] = sInputList.substring(i, sInputList.indexOf(' ', i) == -1 ? sInputList.length() : sInputList.indexOf(' ', i));\n\t\t\t\t\n\t\t\t\t//Updating the value of i\n\t\t\t\ti = sInputList.indexOf(' ', i) == -1 ? sInputList.length() : sInputList.indexOf(' ', i);\n\t\t\t\t\n\t\t\t\t//Incrementing len\n\t\t\t\tlen++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Instantiating the array with size equal to len\n\t\tinputArray=new int[len];\n\t\t\n\t\t//Getting the Integer value of the element which are stored as string \n\t\t//in the string array and assigning them to the List array\n\t\tfor(int i = 0; i < len; i++)\n\t\t{\n\t\t\tinputArray[i] = Integer.parseInt(splitString[i]);\n\t\t}\n\t}", "public void addAll(String c) {\r\n int[] elements = new int[(c.length() / 2) + 1];\r\n for (int i = 0; i < elements.length; i++) {\r\n if (NumItems == MAX_LIST) {\r\n throw new ListFullException(\"List is Full!\");\r\n }\r\n elements[i] = Integer.parseInt(c.substring(0, c.indexOf(\",\")));\r\n c = c.substring((c.indexOf(\",\") + 1));\r\n items[++NumItems] = elements[i];\r\n }\r\n }", "public static void storeRandomNumbers(int [] num){\n\t\tRandom rand = new Random();\n\t\tfor(int i=0; i<num.length; i++){\n\t\t\tnum[i] = rand.nextInt(1000000);\n\t\t}\n\t}", "public ValuesRequirement(String values){\r\n\t\tsuper();\r\n\t\tString[] splitValues = values.split(\",\");\r\n\t\t_values = new BigDecimal[splitValues.length];\r\n\t\tfor(int i = 0; i < splitValues.length; i++){\r\n\t\t\t_values[i] = new BigDecimal(splitValues[i]);\r\n\t\t}\r\n\t}", "public static int[] makeSequence(String str) {\n\t\tint[] path = new int[str.length()];\n\t\t\n\t\tfor(int i = 0; i < path.length; i++)\n\t\t\tpath[i] = Integer.parseInt(Character.toString(str.charAt(i)));\n\t\treturn path;\n }", "private String convertToString(ArrayList<String> arr, char sep) {\n StringBuilder builder = new StringBuilder();\n // Append all Integers in StringBuilder to the StringBuilder.\n for (String str : arr) {\n builder.append(str);\n builder.append(sep);\n }\n // Remove last delimiter with setLength.\n builder.setLength(builder.length() - 1);\n return builder.toString();\n }", "private GDSLayers gdsGetNumbers(String str)\n \t{\n \t\tint openParen = str.indexOf('(');\n \t\tif (openParen < 0) return null;\n \t\tint closeParen = str.lastIndexOf(')');\n \t\tif (closeParen < 0) return null;\n \t\tString gdsNumbers = str.substring(openParen+1, closeParen);\n \t\tGDSLayers numbers = GDSLayers.parseLayerString(gdsNumbers);\n \t\treturn numbers;\n \t}", "static ArrayList arrayDate(String day, String dayNo, String month, String year){\n ArrayList<String> arraySplit = new ArrayList<>();\n\n arraySplit.add(day.replace(\",\",\"\"));//Monday\n arraySplit.add(dayNo.replace(\",\",\"\"));//23\n arraySplit.add(month.replace(\",\",\"\"));//March\n arraySplit.add(year.replace(\",\",\"\"));//2015\n return arraySplit;\n }", "static int[] strToIntArr(String[] strArray){\n int[] intArray = new int[strArray.length];\n for(int i = 0; i < strArray.length; i++){\n intArray[i] = Integer.parseInt(strArray[i].trim());\n }\n return intArray;\n }", "@TypeConverter\r\n public String[] fromString(String value) {\r\n String[] split = value.split(SEPERATOR.toString());\r\n return value.isEmpty() ? split : split;\r\n }", "public static UIDSet[] parseUIDSets(String uids) {\n\tif (uids == null)\n\t return null;\n\tList<UIDSet> v = new ArrayList<>();\n\tStringTokenizer st = new StringTokenizer(uids, \",:\", true);\n\tlong start = -1;\n\tUIDSet cur = null;\n\ttry {\n\t while(st.hasMoreTokens()) {\n\t\tString s = st.nextToken();\n\t\tif (s.equals(\",\")) {\n\t\t if (cur != null)\n\t\t\tv.add(cur);\n\t\t cur = null;\n\t\t} else if (s.equals(\":\")) {\n\t\t // nothing to do, wait for next number\n\t\t} else {\t// better be a number\n\t\t long n = Long.parseLong(s);\n\t\t if (cur != null)\n\t\t\tcur.end = n;\n\t\t else\n\t\t\tcur = new UIDSet(n, n);\n\t\t}\n\t }\n\t} catch (NumberFormatException nex) {\n\t // give up and return what we have so far\n\t}\n\tif (cur != null)\n\t v.add(cur);\n\tUIDSet[] uidset = new UIDSet[v.size()];\n\treturn v.toArray(uidset);\n }", "public static String[] variableList(String s) {\n String[] vl = null;\n if (s == null) {\n return vl;\n }\n String st = s.trim();\n if (st.length() == 0) {\n return new String[0];\n }\n if (st.charAt(0) == '(') {\n st = st.substring(1);\n }\n if (st.charAt(st.length() - 1) == ')') {\n st = st.substring(0, st.length() - 1);\n }\n st = st.replaceAll(\",\", \" \");\n List<String> sl = new ArrayList<String>();\n Scanner sc = new Scanner(st);\n while (sc.hasNext()) {\n String sn = sc.next();\n sl.add(sn);\n }\n vl = new String[sl.size()];\n int i = 0;\n for (String si : sl) {\n vl[i] = si;\n i++;\n }\n return vl;\n }", "public boolean containsAll(String c) {\r\n int[] elements = new int[(c.length() / 2) + 1];\r\n for (int i = 0; i < elements.length; i++) {\r\n elements[i] = Integer.parseInt(c.substring(0, c.indexOf(\",\")));\r\n if (!contains(elements[i])) {\r\n return false;\r\n }\r\n c = c.substring((c.indexOf(\",\") + 1));\r\n }\r\n return true;\r\n }", "public static int Add(String numbers){\r\n \r\n int sum = 0;\r\n String negString = \"\";\r\n boolean negFlag = false;\r\n boolean commaFlag = false;\r\n \r\n String numberComponent[];\r\n String delimiterString;\r\n String delimiters[];\r\n String delimiterRegEx = \"\";\r\n \r\n System.out.println(\"Working string:\\n\"+numbers);\r\n //separate delimiter and number strings\r\n String newlineSplit[] = numbers.split(\"\\n\");\r\n \r\n if(numbers == null || numbers.isEmpty()){ //check for empty or null input\r\n System.out.println(\"String is empty or null\\n\");\r\n return 0;\r\n }\r\n else if(newlineSplit[0].charAt(0) != '/' || newlineSplit[0].charAt(1) != '/') { //check if string begins with '//'\r\n \tSystem.out.println(\"String is invalid\\n\");\r\n \treturn 0;\r\n }\r\n else { //get here if string has content and begins with '//'\r\n \t//take delimiter string of first split and ignore '//'\r\n \tdelimiterString = newlineSplit[0].substring(2);\r\n \t\r\n \t//check if ',' is one of the delimiters (do this since comma is also delimiter in delimiter string\r\n \tif(delimiterString.contains(\",,\") || delimiterString.equals(\",\")) {\r\n \t\tcommaFlag = true;\r\n \t}\r\n \t\r\n \tdelimiters = delimiterString.split(\",\");\r\n \t\r\n \t//add comma as delimiter if it existed (split erases comma if used as delimiter previously)\r\n \tif(commaFlag == true) {\r\n \t\tdelimiterRegEx += \"\\\\,\";\r\n \t\t\tcommaFlag = false;\r\n \t\t}\r\n \t\r\n \t//for each delimiter found\r\n \tfor(String temp:delimiters) {\r\n \t\t//escape all characters\r\n \t\ttemp = temp.replace(\"\"+temp.charAt(0), \"\\\\\"+temp.charAt(0));\r\n \t\t//continuously add to new regex (separate with OR for multiple delimiters)\r\n \t\tif(delimiterRegEx.length() == 0) {\r\n \t\t\tdelimiterRegEx += temp;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tdelimiterRegEx += \"|\"+temp;\r\n \t\t}\r\n \t}\r\n }\r\n \r\n System.out.println(\"Start of calculation...\");\r\n //split using regex generated, get every number as string\r\n numberComponent = newlineSplit[1].split(delimiterRegEx);\r\n \r\n for (String tempVal: numberComponent){\r\n \tif(Integer.valueOf(tempVal) < 0) { //raise error and record number if negative\r\n \t\tif(negString.length() == 0) {\r\n \t\t\tSystem.out.println(\"Negatives not allowed\");\r\n \t\t\tnegFlag = true;\r\n \t\t\tnegString += tempVal;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tnegString += \",\"+tempVal;\r\n \t\t}\r\n \t\tcontinue;\r\n \t}\r\n \telse if(Integer.valueOf(tempVal) > 1000) { //raise message and ignore if number is >1000\r\n \t\tSystem.out.println(\"Large number found and ignored\");\r\n \t\tcontinue;\r\n \t}\r\n \telse { //if passes all checks, add to sum\r\n \t\tsum += Integer.valueOf(tempVal);\r\n \t}\r\n \r\n }\r\n \r\n //display end message, depending if negatives were found or not\r\n if(negFlag == true) {\r\n \tSystem.out.println(\"Negative number(s) found: \"+negString+\"\\n\");\r\n }\r\n else {\r\n \tSystem.out.println(\"Sum is \"+sum);\r\n \tSystem.out.println(\"End of calculation!\\n\");\r\n }\r\n return 0;\r\n }", "public float[][] toIntList(String[] stringData)\n\t{\n\t\t//Create 2-d int list to return once everything is converted\n\t\tfloat[][] floatData = new float[numberOfLines][5];\n\t\t\n\t\t//Create a holding variable that will help to convert the String list over to an int list\n\t\tString[][] tempList = new String[numberOfLines][6];\n\t\t//List of deliminations that will be parsed out of the read strings in the string list that the function is passed\n\t\tString delims = \"[,()]+\";\n\t\t//Loop to split the strings read out of the file by the deliminations\n\t\tfor (int i = 0; i < stringData.length; i++)\n\t\t{\n\t\t\t//Splits the strings from the file by the parenthesis and the commas\n\t\t\ttempList[i] = stringData[i].split(delims);\n\t\t}\n\t\t\n\t\t//Two loops to fully convert strings parsed by delims into ints\n\t\tfor (int i = 0; i < tempList.length; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < tempList[i].length; j++)\n\t\t\t{\n\t\t\t\t//Get rid of bad reading and parsing by java (NOTE::When reading from file you will get a new line read as a string/character and demlims does not parse this out or even might create this problem by deliminating out the line as a character)\n\t\t\t\tif (j != 0)\n\t\t\t\t{\n\t\t\t\t\t//Parses the int out of the strings that were split by the deliminations\n\t\t\t\t\tfloatData[i][j-1] = Float.parseFloat(tempList[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Returns the 2D int list that was parsed out of the string list\n\t\treturn floatData;\n\t}", "public static int [] readMatrix(){\n int[] matrix=null;\n try {\n String linea;\n if((linea = br.readLine()) != null){\n String[] split = linea.split(\",\");\n matrix = new int[split.length];\n for (int i = 0; i < matrix.length; i++) {\n matrix[i] = Integer.parseInt(split[i]);\n }\n }else{\n br.close();\n }\n } catch (IOException ex) {\n System.err.println(\"Error al leer del buffer\");\n }\n return matrix;\n }", "public List<String> putDecimal(String p) {\n List<String> decCoordinates = new ArrayList<>();\n decCoordinates.add(p);\n\n //add a decimal point in between every index in s and add the value to the list of decimal coordinates\n for (int i = 1; i < p.length(); i++) {\n decCoordinates.add(p.substring(0, i) + \".\" + p.substring(i));\n }\n return decCoordinates;\n }", "@Override\n\tpublic ArrayList<BigDecimal> input(String line) {\n\t\tArrayList<BigDecimal> list = new ArrayList<BigDecimal>();\n\t\tfor (String s : line.split(\"\\\\s+\")) {\n\t\t\tBigDecimal num = new BigDecimal(Double.parseDouble(s));\n\t\t\tlist.add(num);\n\t\t}\n\n\t\treturn list;\n\t}", "public int[] makeInt(String[] vals){\n int[] result = new int[vals.length];\n\n for(int i = 0; i<=vals.length; i++){\n result[i] = Integer.parseInt(vals[i]);\n\n }\n\n return result;\n }", "public static String buildCommaSeperatedValues(ArrayList input) throws Exception{\r\n\t\tString retString = \"\";\r\n\t\tif(input != null){\r\n\t\tfor(int i=0; i<input.size(); i++){\r\n\t\t\tretString = retString + \",\" +input.get(i);\r\n\t\t}\r\n\t\tretString = retString.substring(1);\r\n\t\t}\r\n\t\treturn retString;\t\t\r\n\t}", "private void populateUserPlacedValues() {\n userPlacedValues = new ArrayList<>();\n StringTokenizer tokenizer = new StringTokenizer(boardValuesString, \",\");\n\n int cellIndex = 0;\n while (tokenizer.hasMoreTokens()) {\n String cellValueString = tokenizer.nextToken();\n if (cellValueString.indexOf('*') != -1) {\n userPlacedValues.add(cellIndex);\n }\n cellIndex++;\n }\n }", "public static ArrayList<Integer> extractAllIntegers2(String input) {\n String[] tokens = input.replaceAll(\"[^-+\\\\d]+\", \" \").split(\" \");\n int len = tokens.length;\n ArrayList<Integer> list = new ArrayList<>(len);\n\n String regex = \"[-+]?\\\\d+\";\n Pattern pattern = Pattern.compile(regex);\n for (int i = 0; i < len; i++) {\n Matcher matcher = pattern.matcher(tokens[i]);\n if (matcher.find()) {\n list.add(Integer.parseInt(matcher.group()));\n }\n }\n return list;\n }", "static List<Intervall> handleInput(String input) {\n\t\tList<Intervall> listIntervall = new ArrayList<>();\n\t\tif (input.length() > 0) {\n\t\t\tString[] inputArray = input.split(\" \");\n\n\t\t\tfor (String s : inputArray) {\n\t\t\t\tString sTrimmed = s.substring(1, s.length() - 1);\n\t\t\t\tString[] inputValues = sTrimmed.split(\",\");\n\t\t\t\tlistIntervall.add(new Intervall(Integer.parseInt(inputValues[0]), Integer.parseInt(inputValues[1])));\n\t\t\t}\n\t\t}\n\t\treturn listIntervall;\n\t}", "public void set_post_comma(int val)\n {\n if(val <= this.raw_value.length)\n {\n this.post_comma_digits = val;\n }\n }", "public int[] splitCoordinate(String stringCoordinate){\n\t\tint[] intCoordinates = new int[2];\n\t\tString[] splitted = stringCoordinate.split(\"\\\\#\");\n\t\tintCoordinates[0] = Integer.parseInt(splitted[0]);\n\t\tintCoordinates[1] = Integer.parseInt(splitted[1]);\n\t\treturn intCoordinates;\n\t}", "public void formNumber(String[] arr1) {\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\t\r\n\t\tSystem.out.println(Arrays.toString(arr1));\r\n\t\tfor (int i = 0; i < arr1.length; i++) {\r\n\t\t\tlist.add(arr1[i]);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(list, new Compare());\r\n\t\tprintNumber(list);\r\n\t}", "public String checkNumber(String num)\n {\n String[] numbers=num.split(\",\");\n int[] number=new int[numbers.length];\n\n //convert string elements into integer and store in array\n for(int i=0;i<numbers.length;i++)\n {\n number[i]=Integer.parseInt(numbers[i]);\n }\n int flag=0;\n\n //check if the numbers in the array are consecutive\n for(int i=0;i<number.length-1;i++)\n {\n if(number[i+1]==(number[i]-1))\n {\n flag=1;\n }\n else {\n flag=0;\n break;\n }\n }\n if(flag==1)\n {\n return \"Consecutive numbers\";\n }\n else{\n return \"Non consecutive numbers\";\n }\n }" ]
[ "0.68672186", "0.6660796", "0.63467723", "0.6336341", "0.5991869", "0.5919503", "0.59189713", "0.58892316", "0.5883985", "0.58696264", "0.5853505", "0.5836281", "0.5834136", "0.5824673", "0.57656926", "0.5720283", "0.56921834", "0.56682384", "0.5664402", "0.563583", "0.55957735", "0.55682683", "0.5559597", "0.55500424", "0.5506678", "0.55038285", "0.5500539", "0.54959875", "0.5481453", "0.5449171", "0.5433675", "0.54168826", "0.5403483", "0.538971", "0.536386", "0.5363448", "0.5361582", "0.5340795", "0.5325056", "0.53165364", "0.5309212", "0.5303017", "0.5289969", "0.5237827", "0.5236845", "0.52341217", "0.523195", "0.52295834", "0.5220219", "0.52046", "0.5179402", "0.51747406", "0.51729673", "0.5153307", "0.51463234", "0.51459455", "0.5131194", "0.51265377", "0.5115981", "0.5095672", "0.5093017", "0.509009", "0.50867933", "0.5084142", "0.50523096", "0.50250787", "0.502281", "0.500976", "0.49988678", "0.49890268", "0.4983803", "0.4980804", "0.49635276", "0.4961812", "0.49587226", "0.49531183", "0.49499214", "0.49496213", "0.49482986", "0.4945345", "0.49436387", "0.49364215", "0.49315932", "0.4918649", "0.4917115", "0.4914736", "0.49060926", "0.4899985", "0.4896309", "0.4893595", "0.48884115", "0.48798645", "0.48750886", "0.486765", "0.48656678", "0.48652428", "0.4864157", "0.486394", "0.4851826", "0.48506406" ]
0.54220283
31
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println((int)'a'); System.out.println((int)'b'); System.out.println((int)'c'); System.out.println((int)'d'); System.out.println((int)'z'); }
{ "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
ogni 5 secondi invio le statistiche al server
@Override public void run() { while(running) { try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("-----------------------------------------------------------------------"); sendStatsToServer(coordinator.computeStats()); if(backupBuffer.size() > 0) { List<List<Statistic>> copyList = copyList(backupBuffer); backupBuffer.clear(); for (List<Statistic> l: copyList) { long timestamp = l.stream().filter((Statistic s) -> s.getNodeID().equals("Coord")) .mapToLong(Statistic::getTimestamp).toArray()[0]; System.out.println("COORDINATOR - Sending buffered stats computed at " + timestamp); sendStatsToServer(l); } } System.out.println("-----------------------------------------------------------------------"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void demoSchduleMethod() {\n log.info(\"Method executed at every 5 seconds. Current time is :: \" + new Date());\n }", "public int Recebe_salario() {\n\t\treturn 8000;\r\n\t}", "@Scheduled(fixedRate = 2000)\n private void doSendRpcUsage() {\n List<MethodCallDTO> items = stats.values()\n .stream()\n .map(stat -> new MethodCallDTO(\n stat.name,\n stat.count.longValue(),\n stat.lastCall.longValue(),\n stat.lastResult.get(),\n stat.curl))\n .sorted((s1, s2) -> s1.getMethodName().compareTo(s2.getMethodName()))\n .collect(Collectors.toList());\n\n clientMessageService.sendToTopic(\"/topic/rpcUsage\", items);\n }", "void stampaStatisticheNodo() {\r\n for(Object obj : this.nodes)\r\n {\r\n Nodo n = (Nodo)obj;\r\n \r\n TransportLayer tl = n.myTransportLayer;\r\n tl.stampaStatistiche();\r\n \r\n // System.out.println(\"=====STAMPA STATISTICHE NODO NETWORK LAYER====\");\r\n NetworkLayer nl = n.myNetLayer;\r\n // String s = nl.getStat();\r\n nl.stampaStatistiche();\r\n // System.out.println(s);\r\n // System.out.println(\"=====FINE====\");\r\n \r\n physicalLayer pl = n.myPhyLayer;\r\n pl.stampaStatistiche();\r\n }\r\n }", "public int getCount(){\r\n\t\tif(_serverinfo != null){\r\n\t\t\treturn _serverinfo.length / 6;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "private static void statisticOffer() {\n\t\tString url = \"localhost\";\n\t\tint port = 27017;\n\t\tString dbName = \"dulishuo\";\n\t\tDB db = MongoUtil.getConnection(url, port, dbName);\n\t\t\n\t\tDBCollection offer = db.getCollection(\"offer\"); \n\t DBCursor find = offer.find();\n\t \n\t while(find.hasNext()){\n\t \t\n\t }\n\t}", "public void showServerStats(double totalTime) {\n System.out.println(\"ServerID \" + \"Efficiency \" + \"CustomersServed \" + \"IdleTime \");\n for(int i = 0; i < cntServer; i++){\n serverArray[i].idleTime = totalTime - serverArray[i].busyTime;\n System.out.println(serverArray[i].toString());\n }\n }", "public void testGenerateBrokerAndVirtualhostStatistics() throws Exception\n {\n sendUsing(_test, 5, 200);\n Thread.sleep(1000);\n \n for (ManagedConnection mc : _jmxUtils.getManagedConnections(\"test\"))\n {\n assertEquals(\"Incorrect connection total\", 0, mc.getTotalMessagesReceived());\n assertEquals(\"Incorrect connection data\", 0, mc.getTotalDataReceived());\n\t assertFalse(\"Connection statistics should not be enabled\", mc.isStatisticsEnabled());\n }\n \n ManagedBroker vhost = _jmxUtils.getManagedBroker(\"test\");\n assertEquals(\"Incorrect vhost data\", 5, vhost.getTotalMessagesReceived());\n assertEquals(\"Incorrect vhost data\", 1000, vhost.getTotalDataReceived());\n assertTrue(\"Vhost statistics should be enabled\", vhost.isStatisticsEnabled());\n\n assertEquals(\"Incorrect server total messages\", 5, _jmxUtils.getServerInformation().getTotalMessagesReceived());\n assertEquals(\"Incorrect server total data\", 1000, _jmxUtils.getServerInformation().getTotalDataReceived());\n assertTrue(\"Server statistics should be enabled\", _jmxUtils.getServerInformation().isStatisticsEnabled());\n }", "int getServerProcessingIterations();", "public void testGenerateBrokerVirtualhostAndConnectionStatistics() throws Exception\n {\n sendUsing(_test, 5, 200);\n Thread.sleep(1000);\n \n for (ManagedConnection mc : _jmxUtils.getManagedConnections(\"test\"))\n {\n assertEquals(\"Incorrect connection total\", 5, mc.getTotalMessagesReceived());\n assertEquals(\"Incorrect connection data\", 1000, mc.getTotalDataReceived());\n\t assertTrue(\"Connection statistics should be enabled\", mc.isStatisticsEnabled());\n }\n \n ManagedBroker vhost = _jmxUtils.getManagedBroker(\"test\");\n assertEquals(\"Incorrect vhost data\", 5, vhost.getTotalMessagesReceived());\n assertEquals(\"Incorrect vhost data\", 1000, vhost.getTotalDataReceived());\n assertTrue(\"Vhost statistics should be enabled\", vhost.isStatisticsEnabled());\n\n assertEquals(\"Incorrect server total messages\", 5, _jmxUtils.getServerInformation().getTotalMessagesReceived());\n assertEquals(\"Incorrect server total data\", 1000, _jmxUtils.getServerInformation().getTotalDataReceived());\n assertTrue(\"Server statistics should be enabled\", _jmxUtils.getServerInformation().isStatisticsEnabled());\n }", "public void sendVoteRequests() {\n for(int i = 1; i <= mConfig.getNumServers(); i++) {\n this.remoteRequestVote(i, mConfig.getCurrentTerm(), mID, mLog.getLastIndex(), mLog.getLastTerm());\n }\n //Initiate count vote timer\n voteCountTimer = scheduleTimer((long) 5, 2);\n }", "public int manyConnections() {\n\t\tint ammound = 0;\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(this.get(i).clientAlive) {\n\t\t\t\tammound++;\n\t\t\t}\n\t\t\tSystem.out.println(\"Ist Client Nr. \" + i + \" frei? \" + !this.get(i).isAlive());\n\t\t}\n\t\treturn ammound;\n\t\t\n\t}", "@Override\n public void run() {\n\n try {\n LocalDateTime now = LocalDateTime.now();\n voda bot = new voda();\n\n List<Integer> notifyTime = Arrays.asList(7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23);\n int currentHour = now.getHour();\n\n ArrayList<Integer> consulted = dbmodel.MysqlCon.getFollowers();\n\n for (Integer ntime : notifyTime) {\n if (ntime == currentHour) {\n for (Integer consultedUser : consulted) {\n bot.sendTextToIdMessage(consultedUser, dbmodel.MysqlCon.getEveryDayWaterUserWaterCountView(consultedUser));\n }\n }\n }\n\n\n } catch (Exception e) {\n System.out.println();\n }\n }", "private void analyzeData(final String sec) {\n\n if (sec != null) {\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(getString(R.string.analysis_server) + \"/tennis\");\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-Type\", \"application/json\");\n JSONObject jsonParam = new JSONObject();\n try {\n jsonParam.put(\"session\", sec);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n OutputStream rout = new BufferedOutputStream(urlConnection.getOutputStream());\n rout.write(jsonParam.toString().getBytes());\n rout.flush();\n rout.close();\n\n InputStream in = new BufferedInputStream(urlConnection.getInputStream());\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n final StringBuilder out = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n out.append(line);\n }\n Log.v(CollectData.class.toString(), \"API Result: \" + out.toString());\n\n try {\n JSONObject jsonObj = new JSONObject(out.toString());\n\n setStats(jsonObj.getJSONObject(\"aggregate\").getString(\"Forehands\"),\n jsonObj.getJSONObject(\"aggregate\").getString(\"Backhands\"),\n jsonObj.getJSONObject(\"aggregate\").getString(\"Serves\"));\n\n final PutDataMapRequest putRequest = PutDataMapRequest.\n create(\"/STATS_UPDATE\");\n \n putRequest.setUrgent();\n final DataMap map = putRequest.getDataMap();\n map.putString(\"forehand\", numForehands);\n map.putString(\"backhand\", numBackhands);\n map.putString(\"serve\", numServes);\n Wearable.DataApi.putDataItem(mGoogleApiClient,\n putRequest.asPutDataRequest());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (ProtocolException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n }\n }).start();\n }\n }", "private void gather(final Session s) throws Exception {\n\t\t//final MeasureHandler mHandler = Appctx.getBean(\"measurehandler\");\n\t\t//final List<CacheClusterBean> cache = s.createQuery(\n\t\t//\t\t\"from CacheClusterBean\").list();\n\t\t//for (final CacheClusterBean cluster : cache) {\n\t\t\t// if (!cluster.getLbStatus().endsWith(\"ready\")) {\n\t\t\t// logger.debug(\"Ignoring AC \" + cluster.getUserId() + \" LB \"\n\t\t\t// + cluster.getLoadBalancerName() + \" Status \"\n\t\t\t// + cluster.getLbStatus());\n\t\t\t// continue;\n\t\t\t// }\n\t\t\t// final long acid = cluster.getAccount().getId();\n\t\t\t// logger.debug(\"Gather AC \" + acid + \" Cluster \" +\n\t\t\t// cluster.getName());\n\t\t\t// final AccountBean acb = cluster.getAccount();\n\t\t\t// final AccountType ac = AccountUtil.toAccount(acb);\n\t\t\t//\n\t\t\t// final DimensionBean dim = CWUtil.getDimensionBean(s, acb.getId(),\n\t\t\t// \"CacheClusterId\", cluster.getName(), true);\n\t\t\t// final Set<DimensionBean> dims = new HashSet<DimensionBean>();\n\t\t\t// dims.add(dim);\n\t\t\t// BinLogDiskUsage Bytes\n\t\t\t// CPUUtilization Percent\n\t\t\t// DatabaseConnections Count\n\t\t\t// FreeableMemory Bytes\n\t\t\t// FreeStorageSpace Bytes\n\t\t\t// ReplicaLag Seconds\n\t\t\t// SwapUsage Bytes\n\t\t\t// ReadIOPS Count/Second\n\t\t\t// WriteIOPS Count/Second\n\t\t\t// ReadLatency Seconds\n\t\t\t// WriteLatency Seconds\n\t\t\t// ReadThroughput Bytes/Second\n\t\t\t// WriteThroughput Bytes/Second\n\n\t\t//}\n\t}", "public void refreshConnectionStatistics() {\n\t\tIPSECconnections = 0;\n\t\tPPTPconnections = 0;\n\t\tHTTPSconnections = 0;\n\t\tSSHconnections = 0;\n\t\tOthersconnections = 0;\n\t\tTotalconnections = 0;\n\n\t\tIterator listIterator = vpn.trafficPanel.VPNPairList.listIterator();\n\t\twhile (listIterator.hasNext()) {\n\t\t\tPair aPair = (Pair) listIterator.next();\n\t\t\tif (aPair.type == Traffic.IPSEC) {\n\t\t\t\tIPSECconnections++;\n\t\t\t} else if (aPair.type == Traffic.PPTP) {\n\t\t\t\tPPTPconnections++;\n\t\t\t} else if (aPair.type == Traffic.HTTPS) {\n\t\t\t\tHTTPSconnections++;\n\t\t\t} else if (aPair.type == Traffic.SSH) {\n\t\t\t\tSSHconnections++;\n\t\t\t} else {\n\t\t\t\tOthersconnections++;\n\t\t\t}\n\t\t\tTotalconnections++;\n\t\t}\n\n\t\tint ctotal =\n\t\t\tIPSECconnections\n\t\t\t\t+ PPTPconnections\n\t\t\t\t+ HTTPSconnections\n\t\t\t\t+ SSHconnections\n\t\t\t\t+ Othersconnections;\n\t\tif (ctotal == 0)\n\t\t\tctotal = 1;\n\t\tIPSECconnectionLabel.setText(\n\t\t\t\"IPSEC Connections: \"\n\t\t\t\t+ IPSECconnections\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (IPSECconnections * 100 / ctotal)\n\t\t\t\t+ \" % )\");\n\t\tPPTPconnectionLabel.setText(\n\t\t\t\"PPTP Connections: \"\n\t\t\t\t+ PPTPconnections\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (PPTPconnections * 100 / ctotal)\n\t\t\t\t+ \" % )\");\n\t\tHTTPSconnectionLabel.setText(\n\t\t\t\"HTTPS Connections: \"\n\t\t\t\t+ HTTPSconnections\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (HTTPSconnections * 100 / ctotal)\n\t\t\t\t+ \" % )\");\n\t\tSSHconnectionLabel.setText(\n\t\t\t\"SSH Connections: \"\n\t\t\t\t+ SSHconnections\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (SSHconnections * 100 / ctotal)\n\t\t\t\t+ \" % )\");\n\t\tOthersconnectionLabel.setText(\n\t\t\t\"Other Connections: \"\n\t\t\t\t+ Othersconnections\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (Othersconnections * 100 / ctotal)\n\t\t\t\t+ \" % )\");\n\t\tTotalconnectionLabel.setText(\n\t\t\t\"Total Connections: \"\n\t\t\t\t+ Totalconnections\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (Totalconnections * 100 / ctotal)\n\t\t\t\t+ \" % )\");\n\t}", "@Test\n\tpublic void getStaticsDataTest() {\n\t\tthis.repo.save(new StatisticsRequest(\"1233333\", \"testing\", Integer.valueOf(200), Integer.valueOf(2000)));\n\n\t\twebTestClient.get().uri(\"/getLoggedData\").accept(MediaType.APPLICATION_JSON).exchange().expectStatus().isOk()\n\t\t\t\t.expectBody(StatisticsResponse.class)\n\t\t\t\t.consumeWith(res -> assertTrue(res.getResponseBody().getTotalRequest() > 0.0));\n\n\t}", "@Override\n\tpublic int getNbClients() {\n\t\t// TODO Auto-generated method stub\n\t\tint nbClients=0;\n\t\tfor (ArrayList<TC> quantite : salle.values()) {\t\t//On parcours l'ensemble de la liste pour connaître à chaque tour de\n\t\t\tnbClients += quantite.size();\t\t\t\t\t//boucle le nombre de personne prioritaire.\n\t\t}\n\t\treturn nbClients;\n\t\t\n\t\t// on cherche a donner le nombre de clients dans la salle à l'instant T, pour ce faire on fait la somme de la taille de chaque file d'attente \n// int res=0;\n// for(int i=0;i<maxPrio;i++) {\n// res += salle.get(i).size(); // on fait un get sur la salle d'indice i (correspondant a 1 niveau de priorité) ce qui rend l'ArrayList puis on prend la size de ce get. \n// }\n\t}", "private void askForNumberOfRequests() {\n\t\tconnectToServer();\n\t\tout.println(\"How many requests have you handled ?\");\n\t\tout.flush();\n\t\tint count = 0;\n\t\ttry {\n\t\t\tcount = Integer.parseInt(in.readLine());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot receive num requests from server\");\n\t\t}\n\t\tSystem.out.println(\"CLIENT: The number of requests are \" + count);\n\t\tdisconnectFromServer();\n\t}", "private void sendTrafficSummary() {\n\t\ttry {\n\t\t\tregistry.getSender().sendData(\n\t\t\t\t\tnew OverlayNodeReportsTrafficSummary(myAssignedID,\n\t\t\t\t\t\t\tsendTracker, relayTracker, sendSummation,\n\t\t\t\t\t\t\treceiveTracker, receiveSummation).getBytes());\n\t\t\tthis.sendTracker = 0; // reset all counters after reporting\n\t\t\tthis.relayTracker = 0;\n\t\t\tthis.receiveTracker = 0;\n\t\t\tthis.sendSummation = 0;\n\t\t\tthis.receiveSummation = 0;\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble reporting traffic summary or closing sockets.\");\n\t\t}\n\t}", "public static void showStatistics(){\n\n }", "@Override\r\n public String getUsoMaggioreRuntime() {\n int maxpacchetti=0;\r\n int npacchetti=0;\r\n String a;\r\n Map<String, String> mappatemp=new HashMap<>();\r\n Iterator<Map<String, String>> iterator;\r\n iterator = getListaRuntime().iterator();\r\n System.out.println(getUltimaEntry().size());\r\n\t\twhile (iterator.hasNext()) {\r\n \r\n\t\t\tMap<String, String> m = iterator.next();\r\n //si fa la ricerca della più utilizzata all'inerno della mappa\r\n \r\n npacchetti=Integer.parseInt(m.get(\"RX-OK\"))+Integer.parseInt(m.get(\"TX-OK\"));\r\n System.out.println(maxpacchetti);\r\n if (maxpacchetti<npacchetti){\r\n maxpacchetti=npacchetti;\r\n mappatemp.put(\"Iface\",m.get(\"Iface\"));\r\n mappatemp.put(\"Pacchetti_TX+RX_OK\",String.valueOf(npacchetti));\r\n \r\n }\r\n }\r\n \r\n try {\r\n String json = new ObjectMapper().writeValueAsString(mappatemp);\r\n System.out.println(json);\r\n \r\n \r\n if (json!=null) return json ;\r\n } catch (JsonProcessingException ex) {\r\n Logger.getLogger(NetstatSingleton.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n \r\n \r\n return \"NOT WORKING\";\r\n }", "protected double NetworkServiceTime()\r\n\t{\r\n\t\treturn 25.0;\r\n\t}", "long getTotalServerSocketsCount();", "private void run() throws Exception {\n String url = getResources().getString(R.string.base_url)+\"users/stats/\";\n\n Request request = new Request.Builder()\n .url(url)\n .header(\"Authorization\", Config.getKey())\n .build();\n Response response = client.newCall(request).execute();\n if (!response.isSuccessful()) throw new IOException(\"Unexpected code \" + response);\n\n try {\n JSONObject jsonResponse = new JSONObject(response.body().string());\n stats.rankingPos = jsonResponse.getInt(Stats.rankingPosKey);\n stats.favoriteArea = jsonResponse.getString(Stats.favoriteAreaKey);\n stats.percentageCompleted = jsonResponse.getDouble(Stats.percentageCompletedKey);\n\n JSONArray categoriesResponse = jsonResponse.getJSONArray(Stats.areasKey);\n double categorie_percentage;\n double l1, l2, l3;\n stats.areas.clear();\n for(String cat : Stats.CATEGORIES) {\n categorie_percentage = 0;\n l1 = 0;\n l2 = 0;\n l3 = 0;\n for(int i = 0; i < categoriesResponse.length(); i++) {\n JSONObject area = categoriesResponse.getJSONObject(i);\n if (area.getString(Stats.areaNameKey).toLowerCase().equals(cat.toLowerCase())) {\n categorie_percentage = area.getDouble(Stats.areaPercKey);\n l1 = 100 * area.getDouble(Stats.level1Key);\n l2 = 100 * area.getDouble(Stats.level2Key);\n l3 = 100 * area.getDouble(Stats.level3Key);\n break;\n }\n }\n stats.areas.add(new Stats.PairAreaPercentage(cat, categorie_percentage, l1, l2, l3));\n }\n } catch (Exception e) {\n e.printStackTrace();\n Log.i(\"JSONError\", \"Erro na formatação do response\");\n }\n }", "private void getStatistics(HttpServletRequest request, HttpServletResponse response) throws IOException {\n Map<Integer, StatisticsDataStruct> stats = SimApi.getStatistics();\n String newTableOfStat = \"<table id=\\\"statTable\\\">\";\n\n for (int i = 0; i < stats.size(); i++) {\n StatisticsDataStruct ListAndScenarioNumber = stats.get(i);\n List<String> list = ListAndScenarioNumber.newList;\n\n newTableOfStat = createStatisticsStringHtmlTable(newTableOfStat, list);\n }\n\n newTableOfStat += \"</table>\";\n response.getWriter().write(newTableOfStat);\n }", "protected void onTick() {\n\r\n System.out.println(\"Makinarekin konexioa ezartzen...\");\r\n try {\r\n\r\n Socket s = new Socket(\"localhost\", 5555);\r\n DataOutputStream dout = new DataOutputStream(s.getOutputStream());\r\n BufferedReader din = new BufferedReader(new InputStreamReader(s.getInputStream()));\r\n //Informazioa makinatik jaso\r\n if (itxaron == false) {\r\n dout.writeBytes(\"ask\");\r\n dout.flush();\r\n carga = din.readLine();\r\n System.out.println(\"Lan karga datua lortzen...\");\r\n System.out.println(carga);\r\n pieza = din.readLine();\r\n System.out.println(\"Pieza mota datua lortzen...\");\r\n System.out.println(pieza);\r\n catalogue.put(pieza, new Integer(carga));\r\n\r\n }\r\n //Makina pieza jasotzeko prestaztea esan\r\n if (itxaron == true) {\r\n dout.writeBytes(\"switch\");\r\n dout.flush();\r\n System.out.println(\"Makina pieza jasotzeko prestatzen...\");\r\n itxaron=false;\r\n }\r\n s.close();\r\n dout.flush();\r\n\r\n } catch(Exception e){\r\n\r\n System.out.println(\"Konexioa ezin izan da lortu\");\r\n }\r\n\r\n System.out.println(\"Makinarekin konexioa mozten\");\r\n\r\n\r\n }", "public static void main(String[] args) throws InterruptedException {\n\n Random random = new Random();\n RateLimitingVOne rateLimiter = new RateLimitingVOne();\n UUID userId = UUID.randomUUID();\n\n List<Request> allRequests = new ArrayList<>();\n\n long start = System.currentTimeMillis();\n for (int i = 1; i < 100; i++) {\n int count = random.nextInt(10);\n Request nr = new Request(count> 0 ? count : 1, System.currentTimeMillis(), i);\n allRequests.add(nr);\n rateLimiter.handleNewRequest(nr, userId);\n// sleep(random.nextInt(350));\n sleep(250);\n }\n\n long elapsed = System.currentTimeMillis() - start;\n\n System.out.println(\"Time ---- >> \"+ elapsed);\n\n for (Request tr : allRequests) {\n long since = (tr.timestamp - start);\n int count = tr.isRejected ? -tr.requestsCount : tr.requestsCount;\n System.out.println(tr.sequence+\", \"+ since + \" , \" + count);\n }\n\n\n Request r = rateLimiter.userRequestLog.get(userId);\n int count =0;\n while (r.previous != null) {\n count++;\n r = r.previous;\n }\n\n System.out.println(count);\n\n\n }", "public static int getCount5(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n int c5= prefs.getInt(saveCounter5, SaveCounter5);\n\n return c5;\n }", "@Override\n public void run() {\n long pocetak = 0;\n long kraj = 0;\n int pauza = Integer.parseInt(SlusacAplikacije.konfig.dajPostavku(\"sleep\"));\n while (!ServerSustava.isStop()) {\n pocetak = System.currentTimeMillis();\n if (!ServerSustava.isPauza()) {\n System.out.println(\"preuzimanje meteo podataka\");\n BazaPodataka bp = new BazaPodataka();\n List<Adresa> adrese = new ArrayList<Adresa>();\n adrese = bp.dohvatiAdrese();\n String apiKey = SlusacAplikacije.konfig.dajPostavku(\"apiKey\");\n OWMKlijent owmk = new OWMKlijent(apiKey);\n if (adrese != null) {\n for (Adresa a : adrese) {\n //System.out.println(\"adr: \" + a.getAdresa());\n MeteoPodaci mp = owmk.getRealTimeWeather(a.getGeoloc().getLatitude(), a.getGeoloc().getLongitude());\n bp.spremiMeteoPodatke(a.getAdresa(), mp);\n //System.out.println(\"Status: \" + a.getStatusPreuzimanja());\n if (a.getStatusPreuzimanja() == 0) {\n // System.out.println(\"update statusa!\");\n bp.statusPreuzimanjaPodataka(a.getAdresa());\n }\n }\n }\n }\n kraj = System.currentTimeMillis();\n long trajanjeObrade = kraj - pocetak;\n try {\n long spavanje = pauza * 1000;\n if (trajanjeObrade < spavanje) {\n sleep(spavanje - trajanjeObrade);\n }\n } catch (InterruptedException ex) {\n Logger.getLogger(MeteoPodaciPreuzimanje.class.getName()).log(Level.SEVERE, null, ex);\n break;\n }\n }\n }", "public static void main(String... args) {\n List<Integer> data = new ArrayList<Integer>();\n data.add(1);\n data.add(1);\n data.add(1);\n data.add(1);\n data.add(2);\n data.add(2);\n data.add(3);\n data.add(4);\n data.add(4);\n data.add(4);\n data.add(4);\n data.add(5);\n data.add(5);\n data.add(5);\n data.add(5);\n data.add(6);\n data.add(6);\n data.add(7);\n data.add(7);\n data.add(7);\n data.add(8);\n data.add(9);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(11);\n data.add(12);\n data.add(12);\n\n int count = droppedRequests(data);\n System.out.println(count);\n }", "public int getCountRequests() {\n/* 415 */ return this.countRequests;\n/* */ }", "private static void compute_performances(Server server) {\n System.out.println(\"E[N]: Average number of packets in the buffer/queue: \" + round((double) runningBufferSizeCount / totalTicks));\n System.out.println(\"E[T]: Average sojourn time: \" + round((double) server.getTotalPacketDelay() / totalPackets + (double) serviceTime)\n + \"/packet\");\n System.out.println(\"P(idle): The proportion of time the server is idle: \"\n + round((double) server.getIdleServerCount() / totalTicks * 100) + \"%\");\n if (maxBufferSize >= 0) {\n System.out.println(\"P(loss): The packet loss probability: \" + round((double) droppedPacketCount / totalPackets * 100) + \"%\");\n }\n }", "protected void ping() {\n\t\tpingCount ++;\n\t\tif(pingCount > 5) {\n\t\t\tlog.debug(\"pingCount is exceed, so close this connection.\");\n\t\t\tclose();\n\t\t\treturn;\n\t\t}\n\t\tsendData(\"<ping />\");\n\t}", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tServerSocket ss = new ServerSocket(1234);\n\t\t\tSystem.out.println(\"J'attends une connexion\");\n\t\t\t\n\t\t\tSocket s = ss.accept();\n\t\t\t\n\t\t\tInputStream is = s.getInputStream();\n\t\t\tOutputStream os = s.getOutputStream();\n\t\t\t\n\t\t\tSystem.out.println(\"J'attends un nombre\");\n\t\t\tint nb = is.read();\n\t\t\t\n\t\t\tint res = nb*12;\n\t\t\tSystem.out.println(\"J'ai recu le nombre \" + nb + \" et la reponse est \" + res);\n\t\t\tSystem.out.println(\"J'envois la reponse\");\n\t\t\tos.write(res);\n\t\t\ts.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}", "private void handlePlayerConnect(Player player) {\n server.runTaskLater(() -> server.getPaymentLog().checkPendingAccepts(player), 1500, TimeUnit.MILLISECONDS);\n\n if (player.hasPermission(Rank.ADMIN)) {\n server.runTaskLater(() -> server.getDataSource().getCollection(\"archon\", \"dailytop\").count((result, t) -> {\n if (result == null) {\n result = 0L;\n }\n\n List<String> msg = new ArrayList<>();\n msg.add(\"&8\" + Message.BAR);\n msg.add(\"&6[&c&lArchon&6] &aProxy \" + player.getProxy().getId() + \" &7[\" + player.getRegion().name() + \" Network]\");\n msg.add(\"\");\n msg.add(\"&e[Today]\");\n int mostOnlineToday = server.getCache().getCurrentMostOnline();\n int uniqueLoginsToday = (int) (long) result;\n int newPlayersToday = server.getCache().getCurrentNewPlayers();\n\n try (Connection conn = server.getDataSource().getConnection();\n Statement stmt = conn.createStatement()) {\n // 1-day stats\n try (ResultSet rs = stmt.executeQuery(\"SELECT most_online, unique_logins, new_players FROM dailytop WHERE date = (SELECT MAX(date) FROM dailytop)\")) {\n if (rs.next()) {\n int mostOnlineYesterday = rs.getInt(\"most_online\");\n int uniqueLoginsYesterday = rs.getInt(\"unique_logins\");\n int newPlayersYesterday = rs.getInt(\"new_players\");\n\n double mostOnlineChange = Util.getPercentageChange(mostOnlineYesterday, mostOnlineToday);\n String disp = (mostOnlineChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(mostOnlineChange) + \"% &7from yesterday)\";\n msg.add(\"&7* &6Most Online: &d\" + Util.addCommas(mostOnlineToday) + \" \" + disp);\n\n double uniqueLoginsChange = Util.getPercentageChange(uniqueLoginsYesterday, uniqueLoginsToday);\n disp = (uniqueLoginsChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(uniqueLoginsChange) + \"% &7from yesterday)\";\n msg.add(\"&7* &6Unique Logins: &d\" + Util.addCommas(uniqueLoginsToday) + \" \" + disp);\n\n double newPlayersChange = Util.getPercentageChange(newPlayersYesterday, newPlayersToday);\n disp = (newPlayersChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(newPlayersChange) + \"% &7from yesterday)\";\n msg.add(\"&7* &6New Players: &d\" + Util.addCommas(newPlayersToday) + \" \" + disp);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n ZonedDateTime time = ZonedDateTime.now(ZoneId.of(\"America/Los_Angeles\"));\n msg.add(\"&e[From yesterday at this hour: \" + time.format(DateTimeFormatter.ofPattern(\"h a\")) + \" \" + time.getZone().getDisplayName(TextStyle.FULL, Locale.ENGLISH) + \"]\");\n // prev day (same hour) stats\n try (ResultSet rs = stmt.executeQuery(\"SELECT online, most_online, unique_logins, new_players FROM daily_stats WHERE DATE(time) = DATE(SUBDATE(UTC_TIMESTAMP, 1)) && HOUR(time) = HOUR(UTC_TIMESTAMP) LIMIT 1;\")) {\n if (rs.next()) {\n int onlineYesterday = rs.getInt(\"online\");\n int mostOnlineYesterday = rs.getInt(\"most_online\");\n int uniqueLoginsYesterday = rs.getInt(\"unique_logins\");\n int newPlayersYesterday = rs.getInt(\"new_players\");\n\n double currentOnlineChange = Util.getPercentageChange(onlineYesterday, server.getOnlineCount());\n String disp = (currentOnlineChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(currentOnlineChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3Online: &b\" + Util.addCommas(onlineYesterday) + \" \" + disp);\n\n double mostOnlineChange = Util.getPercentageChange(mostOnlineYesterday, mostOnlineToday);\n disp = (mostOnlineChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(mostOnlineChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3Most Online: &b\" + Util.addCommas(mostOnlineYesterday) + \" \" + disp);\n\n double uniqueLoginsChange = Util.getPercentageChange(uniqueLoginsYesterday, uniqueLoginsToday);\n disp = (uniqueLoginsChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(uniqueLoginsChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3Unique Logins: &b\" + Util.addCommas(uniqueLoginsYesterday) + \" \" + disp);\n\n double newPlayersChange = Util.getPercentageChange(newPlayersYesterday, newPlayersToday);\n disp = (newPlayersChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(newPlayersChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3New Players: &b\" + Util.addCommas(newPlayersYesterday) + \" \" + disp);\n } else {\n msg.add(\"&7&oNo data to display from this time.\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n msg.add(\"&8\" + Message.BAR);\n\n try (ResultSet rs = stmt.executeQuery(\"SELECT (SELECT COUNT(*) FROM votes) AS total, COUNT(*) AS today FROM votes WHERE DATE(time) = CURDATE();\")) {\n if (rs.next()) {\n msg.add(\"&aVotes Today: &7\" + Util.addCommas(rs.getInt(\"today\"))\n + \"&a, Total Votes: &7\" + Util.addCommas(rs.getInt(\"total\")) + \" (\" + Util.humanReadableNumber(rs.getInt(\"total\")) + \")\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n player.message(msg);\n }), 1, TimeUnit.SECONDS);\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}", "@Test\n public void test_connection_time() throws Exception\n {\n long nano = nanoTime();\n\n MosServiceHttp service = new MosServiceHttp();\n\n // todo time consuming test log\n System.out.println(\"operation \" + \"login\" + \" cost \" + (nanoTime() - nano) + \" ns\");\n\n for (int i = 0; i < 10; i++)\n {\n // todo time consuming test\n nano = nanoTime();\n\n service.get(new DN(\"/Ems/1\"));\n\n // todo time consuming test log\n System.out.println(\"operation \" + \"get\" + \" cost \" + (nanoTime() - nano) + \" ns\");\n }\n }", "void statistics();", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "public static void main(String[] args) {\r\n System.out.println(\"***debut serveur gestion ***\");\r\n new ServeurGestion(50003).fonctionnementService();\r\n \r\n }", "private void sendStatsToServer(List<Statistic> stats)\n {\n if(stats == null)\n {\n System.out.println(\"COORDINATOR - Nothing to send yet\");\n return;\n }\n\n ClientResponse response;\n String serverURI = coordinator.getNode().getServerURI();\n\n try\n {\n WebResource webResource = RESTclient.resource(serverURI + \"/Statistics/\");\n response = webResource.type(\"application/json\").put(ClientResponse.class, new Gson().toJson(stats, new TypeToken<List<Statistic>>(){}.getType()));\n }\n catch (ClientHandlerException ce)\n {\n System.out.println(\"COORDINATOR - Server cloud connection refused - impossible to send data\");\n backupBuffer.add(stats);\n return;\n }\n\n switch (response.getStatus())\n {\n case 200:\n System.out.println(\"COORDINATOR - Sending statistics to server successful\");\n return;\n\n default:\n backupBuffer.add(stats);\n System.out.println(\"COORDINATOR - Failed sending statistics: HTTP error code: \" + response.getStatus());\n }\n }", "RESPONSE tally();", "private void getNodesCount(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int countNodes = SimApi.getNodesCount();\n response.getWriter().write(Integer.toString(countNodes));\n }", "public void run() {\n\t\ttry {\r\n\t\t\tInetAddress localHost = InetAddress.getLocalHost();\r\n\t\t\tString ip_address = localHost.getHostAddress().trim();\r\n\t\t\tSocket socket = new Socket(this.ip_address_server, this.port_server);\r\n\t\t\twhile (socket.isClosed() == true) {\r\n\t\t\t\tsocket = new Socket(this.ip_address_server, this.port_server);\r\n\t\t\t}\r\n\t\t\tString request = \"HELLO \" + ip_address + \" \" + socket \r\n\t\t\t\t\t+ \" \" + this.client_id;\r\n\t\t\tOutputStream output = socket.getOutputStream();\r\n\t\t\tPrintWriter writer = new PrintWriter(output, true);\t\r\n\t\t\t// while <300 send request\r\n\t\t\tint requests = 0;\r\n\t\t\tlong sum=0;\r\n\t\t\twhile (requests < 300) {\r\n\t\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\t\twriter.println(request);\r\n\t\t\t\tDataInputStream reader = new DataInputStream(new BufferedInputStream(socket.getInputStream()));\r\n\t\t\t\treader.readUTF();\r\n\t\t\t\tint length = reader.readInt();\r\n\t\t\t\tif(length>0){\r\n\t\t\t\t\tbyte[] payload = new byte[length];\r\n\t\t\t\t reader.readFully(payload, 0, payload.length); // read the message\r\n\t\t\t\t}\r\n\t\t\t\trequests++;\r\n\t\t\t\tlong endTime = System.currentTimeMillis();\r\n\t\t\t\tlong time = endTime - startTime;\r\n\t\t\t\tsum+=time;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Client \" + this.client_id + \" has finished after \"\r\n\t\t\t\t\t+ requests + \" requests\");\r\n\t\t\tdouble averTime = sum / 300;\r\n\t\t\tString text = \"Average Communication Latency (\" + this.client_id + \"): \" + averTime + \"\\n\";\r\n\t\t\tFiles.write(Paths.get(this.latencyTimes.getName()), text.getBytes(), StandardOpenOption.APPEND);\r\n\t\t\tsocket.close();\t\r\n\t\t} catch (UnknownHostException ex) {\r\n\t\t\tSystem.out.println(\"Server not found: \" + ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(\"I/O error: \" + ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public String imprimeTop(){\r\n\t\tloja.ordenaPontos();\r\n\t\tstatus = \"------------Top 5 de Usuarios Com Maiores Xp------------\" + quebraLinha ;\r\n\t\tfor(int i =0; i<5; i++){\r\n\t\t\tstatus += (i+1+\"° \" +loja.getUsuarios().get(i).getNome() + \" possui \"+ loja.getUsuarios().get(i).getPontos() +\" de Xp\"+ quebraLinha);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn status;\r\n\t}", "@Override\n public void run() {\n try {\n String resp = null;\n String link = helper.getUrl();\n String series = \"http://\"+link+\"/api/remittance/oic_get.php?id=\"+helper.logcount();\n URL url = new URL(series);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n // read the response\n InputStream in = new BufferedInputStream(conn.getInputStream());\n resp = convertStreamToString(in);\n\n if (resp != null) {\n Log.e(\"oicremittances\", \"oicremittances : \" + resp);\n JSONArray jsonArray = new JSONArray(resp);\n for(int i=0; i<jsonArray.length(); i++){\n JSONObject json_data = jsonArray.getJSONObject(i);\n String amount = json_data.getString(\"amount\");\n// gen.addRemitTrans(helper.logcount()+\"\", \"fromDriver\",\n// \"\",\"\", \"\",amount, \"\",null,\"1\");\n// Log.e(\"oicremittance\", \" amount:\"+amount);\n }\n\n if (!conn.getResponseMessage().equals(\"OK\")){\n conn.disconnect();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n progressBar.dismiss();\n final AlertDialog.Builder builder = new AlertDialog.Builder(getApplicationContext());\n builder.setTitle(\"Information confirmation\")\n .setMessage(\"Data sync has failed, please try again later. thank you.\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n // Create the AlertDialog object and show it\n builder.create().show();\n }\n });\n }\n } else {\n Log.e(\"Error\", \"Couldn't get data from server.\");\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n String t = \"Couldn't get data from server.\";\n customAlert(t);\n }\n });\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n //END THREAD FOR remittances from driver series\n }", "long getRequestsCount();", "int getHeartRate();", "int getTotalCreatedConnections();", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "public abstract void sendGlobalStats(ResponseBuilder rb, ShardRequest outgoing);", "private void cekStatusGPSpeed() {\n\t\t\n\t\tlokasimanager = (LocationManager) Kecepatan.this.getSystemService(Context.LOCATION_SERVICE);\n\t\t\n\t\tcekGpsNet = new CekGPSNet(Kecepatan.this);\n\t\tisInternet = cekGpsNet.cekStatsInternet();\n\t\tisNetworkNyala = cekGpsNet.cekStatsNetwork();\n\t\tisGPSNyala = cekGpsNet.cekStatsGPS();\n\t\t\n\t\tstatusInternet = cekGpsNet.getKondisiNetwork(isInternet, isNetworkNyala);\n\t\tstatusGPS = cekGpsNet.getKondisiGPS(isGPSNyala);\n\t\t\n\t\tLog.w(\"STATUS GPS INTERNET\", \"GPS \" + statusGPS + \" INTERNET \" + statusInternet);\n\t\t\n\t\tif (statusInternet == CekGPSNet.TAG_NYALA) {\n\t\t\t\n\t\t\tlokasimanager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES , locListNetwork);\n\t\t\tLog.w(\"Network\", \"Network\");\n\t\t\t\n\t\t\tif (lokasimanager != null) {\n\t\t\t\tlocation = lokasimanager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n\t\t\t\t\n\t\t\t\tif (location != null) {\n\t\t\t\t\tlatitude = location.getLatitude();\n\t\t\t\t\tlongitude = location.getLongitude();\n\t\t\t\t\t\n\t\t\t\t\tLog.w(\"TAG NETWORK\", \" \" + latitude + \" \" + longitude);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tif (statusGPS == CekGPSNet.TAG_NYALA) {\n\t\t\t\n\t\t\tlokasimanager.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES , locListGPS);\n\t\t\tLog.w(\"GPS\", \"GPS\");\n\t\t\t\n\t\t\tif (lokasimanager != null) {\n\t\t\t\tlocation = lokasimanager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n\t\t\t\t\n\t\t\t\tif (location != null) {\n\t\t\t\t\tlatitude = location.getLatitude();\n\t\t\t\t\tlongitude = location.getLongitude();\n\t\t\t\t\t\n\t\t\t\t\tLog.w(\"TAG GPS\", \" \" + latitude + \" \" + longitude);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public static void main (String args[]) throws IOException{\n\t\tint PUERTO=4444;\n\t\tServerSocket servidor = new ServerSocket(PUERTO);\n\t\tSystem.out.println(\"Servidor iniciado...\");\n\t\t\n\t\tSocket tabla[] = new Socket[MAXIMO];\n\t\tComunHilos comun = new ComunHilos(MAXIMO, 0,0, tabla);\n\t\t\n\t\twhile(comun.getCONEXIONES()<MAXIMO) {\n\t\t\tSocket socket= new Socket();\n\t\t\tsocket= servidor.accept(); //esperando cliente\n\t\t\t\n\t\t\t//OBKETO COMPARTIDO POR LOS HILOS\n\t\t\t\n\t\t\tcomun.addtabla(socket, comun.getCONEXIONES());\n\t\t\tcomun.setACTUALES(comun.getACTUALES()+1);\n\t\t\tcomun.setCONEXIONES(comun.getCONEXIONES()+1);\n\t\t\t\n\t\t\tHiloservidorChat hilo = new HiloservidorChat(socket, comun);\n\t\t\thilo.start();\n\t\t}\n\t\tservidor.close();\n\t}", "protected abstract String getStatistics();", "public synchronized void increaseUsersConn() {\r\n\t\tusersConn++;\r\n\t}", "public void sendHeartbeat();", "public static void main(String[] args) {\n String site = \"www.ics.upjs.sk\";\n int port = 80;\n Socket socket = null;\n try {\n socket = new Socket(site, port);\n OutputStream os = socket.getOutputStream();\n PrintWriter pw = new PrintWriter(os);\n\n InputStream is = socket.getInputStream();\n InputStreamReader isr = new InputStreamReader(is);\n BufferedReader br = new BufferedReader(isr);\n\n // poslanie poziadavky\n pw.println(\"GET / HTTP/1.1\");\n pw.println(\"Host: \"+site);\n pw.println();\n\n // odoslanie dat ktore su pripavene v streame\n pw.flush();\n\n // spravovanie poziadavky\n\n String riadok;\n while ((riadok = br.readLine()) != null) {\n System.out.println(riadok);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (socket != null) {\n try {\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n }", "public void statistics(){\n\t\tSystem.out.println(\"heads: \"+ heads+\"\\ttails: \"+tails);\n\t\t\n\t}", "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 }", "public static void main(String[] args) {\n\t\tString[] horasSesiones = {};\r\n\t\tSala sala = new Sala(\"Tiburon\", horasSesiones, 9, 5);\r\n\r\n\t\tsala.incluirSesion(\"20:00\");\r\n\r\n\t\t/*for (String hora : sala.getHorasDeSesionesDeSala())\r\n\t\t\tSystem.out.println(hora);*/\r\n\t//\tsala.borrarSesion(\"15:00\"); // no hace nada\r\n\t\t//sala.borrarSesion(\"20:00\");\r\n\r\n\t\tfor (String hora : sala.getHorasDeSesionesDeSala())\r\n\t\t\tSystem.out.println(hora);\r\n\r\n\t\t// necesitamos la ventanilla para mostrar el estado de la sesion\r\n\t\tVentanillaVirtualUsuario ventanilla = new VentanillaVirtualUsuario(null, true);\r\nSystem.out.println(sala.sesiones.size());\r\nSystem.out.print(sala.getEstadoSesion(1));\r\n\t\tsala.comprarEntrada(1, 2, 1);\r\n\t\tsala.comprarEntrada(1, 9, 3);\r\n\r\n\t\tint idVenta = sala.getIdEntrada(1, 9, 3);\r\n\r\n\t\tSystem.out.println(\"Id de venta es:\" + idVenta);\r\n\r\n\t\tButacasContiguas butacas = sala.recomendarButacasContiguas(1, 1);\r\n\r\n\t\tsala.comprarEntradasRecomendadas(1, butacas);\r\n\r\n\t\tint idVenta1 = sala.getIdEntrada(1, butacas.getFila(), butacas.getColumna());\r\n\r\n\t\tsala.recogerEntradas(idVenta1, 1);\r\n\r\n\t\tventanilla.mostrarEstadoSesion(sala.getEstadoSesion(1));\r\n\r\n\t\tSystem.out.println(\"No. de butacas disponibles: \" + sala.getButacasDisponiblesSesion(1));\r\n\r\n\t\tSystem.out.println(\"Tickets :\" + sala.recogerEntradas(idVenta, 1));\r\n\r\n\t\tSystem.out.println(\"Tickets recomendados:\" + sala.recogerEntradas(idVenta1, 1));\r\n\t\t//System.out.println(sala.sesiones.size());\r\n\t\t//sala.incluirSesion(\"10:56\");\r\n\t\t//sala.incluirSesion(\"10:57\");\r\n\t\t//System.out.println(sala.sesiones.size());\r\n\t\t/*{\r\n\t\t\tfor (int i = 0; i < sala.getHorasDeSesionesDeSala().length; i++) {\r\n\t\t\t\tSystem.out.println(sala.getHorasDeSesionesDeSala()[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}*/\r\n\t\t\r\n\t}", "@After(\"processRequest()\")\n public void timedProcessRequest(JoinPoint joinPoint) throws Throwable {\n ZooKeeperServer zkServer = (ZooKeeperServer) joinPoint.getThis();\n\n Gauge.build().name(\"zookeeper_server_znode_count\").help(\"Number of z-nodes stored\").create()\n .setChild(new Gauge.Child() {\n @Override\n public double get() {\n return zkServer.getZKDatabase().getNodeCount();\n }\n }).register();\n\n Gauge.build().name(\"zookeeper_server_data_size_bytes\").help(\"Size of all of z-nodes stored (bytes)\").create()\n .setChild(new Gauge.Child() {\n @Override\n public double get() {\n return zkServer.getZKDatabase().getDataTree().approximateDataSize();\n }\n }).register();\n\n Gauge.build().name(\"zookeeper_server_connections\").help(\"Number of currently opened connections\").create()\n .setChild(new Gauge.Child() {\n @Override\n public double get() {\n return zkServer.serverStats().getNumAliveClientConnections();\n }\n }).register();\n\n Gauge.build().name(\"zookeeper_server_watches_count\").help(\"Number of watches\").create()\n .setChild(new Gauge.Child() {\n @Override\n public double get() {\n return zkServer.getZKDatabase().getDataTree().getWatchCount();\n }\n }).register();\n\n Gauge.build().name(\"zookeeper_server_ephemerals_count\").help(\"Number of ephemerals z-nodes\").create()\n .setChild(new Gauge.Child() {\n @Override\n public double get() {\n return zkServer.getZKDatabase().getDataTree().getEphemeralsCount();\n }\n }).register();\n }", "private boolean handleHttpRequests(int[] timeInterval) {\n //generate 3 random data\n int userId1 = ThreadLocalRandom.current().nextInt(POPULATION);\n int userId2 = ThreadLocalRandom.current().nextInt(POPULATION);\n int userId3 = ThreadLocalRandom.current().nextInt(POPULATION);\n\n int timeInterval1 = ThreadLocalRandom.current().nextInt(timeInterval[1] - timeInterval[0]+1) + timeInterval[0];\n int timeInterval2 = ThreadLocalRandom.current().nextInt(timeInterval[1] - timeInterval[0]+1) + timeInterval[0];\n int timeInterval3 = ThreadLocalRandom.current().nextInt(timeInterval[1] - timeInterval[0]+1) + timeInterval[0];\n int stepCount1 = ThreadLocalRandom.current().nextInt(5000);\n int stepCount2 = ThreadLocalRandom.current().nextInt(5000);\n int stepCount3 = ThreadLocalRandom.current().nextInt(5000);\n\n try {\n long startTime = System.currentTimeMillis();\n Response response = postUserData(userId1,DAY_NUM,timeInterval1,stepCount1);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = postUserData(userId2,DAY_NUM,timeInterval2,stepCount2);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = getCurrentUserData(userId1);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = getSingleUserData(userId1, DAY_NUM);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = postUserData(userId3,DAY_NUM,timeInterval3,stepCount3);\n countResponse(startTime,response);\n\n } catch (Exception e) {\n // System.out.println(\"Exception in Post1: \" + e.getClass().getSimpleName());\n System.out.println(e.getMessage() + \"\\n\" + e.getCause());\n return false;\n }\n\n printer.numOfRequestsSent(5);\n return true;\n }", "public void faitTonBoulot() throws AbortException {\n\t\tMessenger.setMaxProgress(10);\n\t\tfor( int i=0 ; i<15 ; i++ ) {\n\t\t\tMessenger.printMsg(Messenger.TRACE, \" blabla \" + i + \" \" + Thread.currentThread() + \" \" + Thread.currentThread().getState());\n\t\t\tif( (i%2) == 0 ) Messenger.diskAccess();\n\t\t\telse if( (i%3) == 0 ) Messenger.dbAccess();\n\t\t\telse if( (i%5) == 0 ) Messenger.procAccess();\n\t\t\t//\t\t\tif( i == 3) {int[] x = new int[0]; x[12] = 6;}\n\t\t\t//try {\n\t\t\tthis.processUserRequest();\n\t\t\tMessenger.setProgress(i);\n\t\t\t//\t\t\t} catch (AbortException e1) {\n\t\t\t//\t\t\t\treturn ;\n\t\t\t//\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(5000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tMessenger.printStackTrace(e);\n\t\t\t}\n\t\t}\n\t\tMessenger.noMoreAccess();\n\t}", "int getRequestsCount();", "int getRequestsCount();", "@Test\r\n\tvoid testConfrontaData() throws Exception {\r\n\t\tassertEquals(2,stats.NumeroTotaleEventi(Stato));\r\n\r\n\t}", "public static void main5(String[] args) {\n\t\t\n\t\tClientDao daoClient = ClientDaoMem.getInstance();\n\t\t\n\t\t\n\t\tif(daoClient.readAll().count() < 5) {\n\t\t\tClient cli1 = daoClient.create(\"Durand\",\"Marc\");\n\t\t\t\n\t\t\tCompte cpt1 = new Compte(\"67890123\",\"Autre compte\");\n\t\t\tCompte cpt2 = new Livret(\"78901234\",\"Livret B\",2.0);\n\t\t\t\n\t\t\tdaoClient.addCompte(cli1, cpt1);\n\t\t\tdaoClient.addCompte(cli1, cpt2);\n\t\t}\n\t\tdaoClient.readAll().forEach(System.out::println);\n\n\t}", "@Override\r\n\t\t\tpublic void handle(final HttpServerRequest req) {\n\t\t\t\tString startTime = \"1355562000000\"; //--multi-dist\r\n\t\t\t\tIterator<EventInfo> iter = \r\n\t\t\t\t\t\tdataService.events()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(EventInfo.class).iterator();\r\n\t\t\t\tEventCounter multiCounter = new EventCounter(\"/multi\");\r\n\t\t\t\tint processed = 0;\r\n\t\t\t\twhile (iter.hasNext() && processed < limit) {\r\n\t\t\t\t\tEventInfo event = iter.next();\r\n\t\t\t\t\tmultiCounter.countEvent(event);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treq.response.setChunked(true);\r\n\t\t\t\tmultiCounter.printDistance(req, \"multidist\");\r\n\t\t\t\t//multiCounter.printResponse(req, \"multidist\");\r\n\t\t\t\t//use response time data\r\n\t\t\t\tIterator<ResponseInfo> respIter = \r\n\t\t\t\t\t\tdataService.response()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(ResponseInfo.class).iterator();\r\n\t\t\t\tResponseCounter responseCounter = new ResponseCounter();\r\n\t\t\t\tprocessed = 0;\r\n\t\t\t\twhile (respIter.hasNext() && processed < limit) {\r\n\t\t\t\t\tResponseInfo resp = respIter.next();\r\n\t\t\t\t\tresponseCounter.count(resp);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\tresponseCounter.printResponse(req, \"multidist\");\r\n\r\n\t\t\t\treq.response.end();\r\n\t\t\t}", "public TomcatWebConnectorStatsImpl() {\n requestTime = new TimeStatisticImpl(\"Request Time\", StatisticImpl.UNIT_TIME_MILLISECOND,\n \"The time to process all requests\");\n activeRequestCount = new CountStatisticImpl(\"Active Request Count\", StatisticImpl.UNIT_COUNT,\n \"currently active requests \", 0);\n errorCount = new CountStatisticImpl(\"Error Count\", StatisticImpl.UNIT_COUNT,\n \"The numbet of Errors during the observed period\", 0);\n bytesSentCount = new CountStatisticImpl(\"Bytes Sent\", StatisticImpl.UNIT_COUNT,\n \"The number of bytes sent during the observerd period\", 0);\n bytesReceivedCount = new CountStatisticImpl(\"Bytes Received\", StatisticImpl.UNIT_COUNT,\n \"The number of bytes received during the observerd period\", 0);\n openConnectionCount = new RangeStatisticImpl(\"\" + \"Open Connections\", StatisticImpl.UNIT_COUNT,\n \"Range for connections opened during the observed period\", 0); // all 0's\n busyThreads = new BoundedRangeStatisticImpl(\"Busy Threads\", StatisticImpl.UNIT_COUNT,\n \"BoundedRange for Threads currently busy serving requests\", 0, 0, 0);\n addStat(\"RequestTime\", requestTime); // better name\n addStat(\"activeRequestCount\", activeRequestCount);\n addStat(\"errorCount\", errorCount);\n addStat(\"bytesSent\", bytesSentCount);\n addStat(\"bytesReceived\", bytesReceivedCount);\n addStat(\"openConnectionCount\", openConnectionCount);\n addStat(\"busyThreads\", busyThreads);\n }", "public final void run() {\n AppMethodBeat.i(108148);\n if (q.a(cVar2.aBx(), jSONObject2, (com.tencent.mm.plugin.appbrand.s.q.a) cVar2.aa(com.tencent.mm.plugin.appbrand.s.q.a.class)) == b.FAIL_SIZE_EXCEED_LIMIT) {\n aVar2.BA(\"convert native buffer parameter fail. native buffer exceed size limit.\");\n AppMethodBeat.o(108148);\n return;\n }\n String CS = j.CS(jSONObject2.optString(\"url\"));\n Object opt = jSONObject2.opt(\"data\");\n String optString = jSONObject2.optString(FirebaseAnalytics.b.METHOD);\n if (bo.isNullOrNil(optString)) {\n optString = \"GET\";\n }\n if (TextUtils.isEmpty(CS)) {\n aVar2.BA(\"url is null\");\n AppMethodBeat.o(108148);\n } else if (URLUtil.isHttpsUrl(CS) || URLUtil.isHttpUrl(CS)) {\n byte[] bArr = new byte[0];\n if (opt != null && d.CK(optString)) {\n if (opt instanceof String) {\n bArr = ((String) opt).getBytes(Charset.forName(\"UTF-8\"));\n } else if (opt instanceof ByteBuffer) {\n bArr = com.tencent.mm.plugin.appbrand.r.d.q((ByteBuffer) opt);\n }\n }\n synchronized (d.this.ioA) {\n try {\n if (d.this.ioA.size() >= d.this.ioB) {\n aVar2.BA(\"max connected\");\n ab.i(\"MicroMsg.AppBrandNetworkRequest\", \"max connected mRequestTaskList.size():%d,mMaxRequestConcurrent:%d\", Integer.valueOf(d.this.ioA.size()), Integer.valueOf(d.this.ioB));\n }\n } finally {\n while (true) {\n }\n AppMethodBeat.o(108148);\n }\n }\n } else {\n aVar2.BA(\"request protocol must be http or https\");\n AppMethodBeat.o(108148);\n }\n }", "@Scheduled(cron = \"*/2 * * * * ?\")\n public void dataCount(){\n System.out.println(\"数据统计第 \" + count++ + \" 次\");\n }", "int getServerWorkIterations();", "private int checkRegisteredSensors() {\n\n int counter = 0;\n\n if (listSensorDB.size() < 1) {\n Log.d(getClass().getName(), \"Lista de sensores cadastrados é ZERO! Retornando de checkRegisteredSensors()\");\n return 0;\n }\n\n if (HSSensor.getInstance().getListSensorOn().size() < 1)\n HSSensor.getInstance().setListSensorOn(listSensorDB);\n\n\n for (Sensor sensor : HSSensor.getInstance().getListSensorOn()) {\n\n Socket sock = new Socket();\n if (sensor.getIp().isEmpty()) {\n Log.d(getClass().getName(), \"O IP do sensor [\" + sensor.getNome() + \"] está vazio. Acabou de ser configurado? \" +\n \"Nada a fazer em checkRegisteredSensors()\");\n continue;\n }\n\n SocketAddress addr = new InetSocketAddress(sensor.getIp(), 8000);\n\n try {\n\n sock.connect(addr, 5000);\n Log.d(getClass().getName(), \"Conectamos em \" + sensor.getIp());\n\n\n PrintWriter pout = new PrintWriter(sock.getOutputStream());\n\n pout.print(\"getinfo::::::::\\n\");\n pout.flush();\n\n Log.d(getClass().getName(), \"Enviado getinfo:::::::: para \" + sensor.getIp() + \" - Aguardando resposta...\");\n\n byte[] b = new byte[256];\n\n sock.setSoTimeout(5000);\n int bytes = sock.getInputStream().read(b);\n sock.close();\n\n String result = new String(b, 0, bytes - 1);\n Log.d(getClass().getName(), \"Recebida resposta de \" + sensor.getIp() + \" para nosso getinfo::::::::\");\n\n Sensor tmpSensor = buildSensorFromGetInfo(result);\n if (tmpSensor == null) {\n Log.d(getClass().getName(), \"Resposta de \" + sensor.getIp() + \" nao é um sensor valido!\");\n Log.d(getClass().getName(), \"Resposta: \" + result);\n continue;\n }\n\n if (sensor.equals(tmpSensor)) {\n\n sensor.setActive(true);\n counter++;\n\n Log.d(getClass().getName(), \"Resposta de \" + sensor.getIp() + \" é um sensor valido!\");\n Log.d(getClass().getName(), \"Sensor \" + sensor.getNome() + \" : \" + sensor.getIp() + \" PAREADO!\");\n }\n\n\n } catch (Exception e) {\n\n if (e.getMessage() != null) {\n Log.d(getClass().getName(), e.getMessage());\n }\n sensor.setActive(false);\n }\n\n }\n\n return counter;\n }", "@Override\r\n\t\t\tpublic void handle(final HttpServerRequest req) {\n\t\t\t\tString startTime = \"1355620946302\"; //--separate-comp\r\n\t\t\t\tIterator<EventInfo> iter = \r\n\t\t\t\t\t\tdataService.events()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(EventInfo.class).iterator();\r\n\t\t\t\tEventCounter multiCounter = new EventCounter(\"/multicomp\");\r\n\t\t\t\tint processed = 0;\r\n\t\t\t\twhile (iter.hasNext() && processed < limit) {\r\n\t\t\t\t\tEventInfo event = iter.next();\r\n\t\t\t\t\tmultiCounter.countEvent(event);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treq.response.setChunked(true);\r\n\t\t\t\tmultiCounter.printDistance(req, \"sep_comp\");\r\n\t\t\t\t\r\n\t\t\t\t//multiCounter.printResponse(req, \"sep_comp\");\r\n\t\t\t\t// use response time data\r\n\t\t\t\tIterator<ResponseInfo> respIter = \r\n\t\t\t\t\t\tdataService.response()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(ResponseInfo.class).iterator();\r\n\t\t\t\tResponseCounter responseCounter = new ResponseCounter();\r\n\t\t\t\tprocessed = 0;\r\n\t\t\t\twhile (respIter.hasNext() && processed < limit) {\r\n\t\t\t\t\tResponseInfo resp = respIter.next();\r\n\t\t\t\t\tresponseCounter.count(resp);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\tresponseCounter.printResponse(req, \"sep_comp\");\r\n\r\n\t\t\t\treq.response.end();\r\n\t\t\t}", "private double getNetworkOutStatistics(String args) throws Exception\n {\n //TODO:IMPLEMENT NETWORK OUT STATISTICS GETTE\n String[] lineParts = getNetFile();\n if(args.toLowerCase() == packetArg)\n {\n int newNetPackets = Integer.decode(lineParts[10]);\n int retVal = newNetPackets - previousNetworkOutPackets;\n previousNetworkOutPackets = newNetPackets;\n return(retVal);\n }\n else\n {\n int newNetOut = Integer.decode(lineParts[9]);\n int retVal = newNetOut - previousNetworkout;\n previousNetworkout = newNetOut;\n return(retVal);\n }\n }", "protected static List<ServerInfo> computeLossesStepServer(Algo algo) {\n\t\t\n\t\t//final int numTotal = algo.problem.V;\n\t\t//final AtomicInteger processed = new AtomicInteger();\n\t\tExecutorService executor = Executors.newFixedThreadPool(Manu.NUM_THREADS); \n\t\t\n\t\tfinal List<ServerInfo> serverInfos = new ArrayList<ServerInfo>();\n\t\tfor(CacheServer cs : algo.servers) {\n\t\t\tif(cs.getSpaceTaken() > algo.problem.X) {\n\t\t\t\tServerInfo si = new ServerInfo(cs);\n\t\t\t\tserverInfos.add(si);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Spawn threads\n\t\tfor(final ServerInfo serverInfo : serverInfos) {\n\t\t\texecutor.execute(new Runnable(){\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//int numProcessed = processed.incrementAndGet();\n\t\t\t\t\t\t//if(numProcessed%100==0) logger.info(\"Computing gains \"+numProcessed+\"/\"+numTotal);\n\n\t\t\t\t\t\t// synchronized (anything) {}\n\t\t\t\t\t\t\n\t\t \t\t\tfor(int videoId : serverInfo.server.videos) {\n\t\t \t\t\t\t\n\t\t \t\t\t\tlong loss = Manu.computeLossOut(videoId, serverInfo.server, algo);\n\t\t \t\t\t\t\n\t\t \t\t\t\tfloat lossPerMegabyteFreed = loss*1f/algo.problem.videoSizes[videoId]; \n\t\t \t\t\t\t\n\t\t \t\t\t\t\n\t\t \t\t\t\tif(lossPerMegabyteFreed < serverInfo.tmpSmallestLossPerMegabyteFreed) {\n\t\t \t\t\t\t\tserverInfo.tmpBestVideoId = videoId;\n\t\t \t\t\t\t\tserverInfo.tmpSmallestLossPerMegabyteFreed = lossPerMegabyteFreed;\n\t\t \t\t\t\t\tserverInfo.tmpSmallestLoss = loss;\n\t\t \t\t\t\t}\n\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\tlogger.log(Level.WARNING, \"Failure computing losses, serverId: \" + serverInfo.server.serverId, e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\texecutor.shutdown();\n\t\t// Wait until all threads are finished\n\t\twhile (!executor.isTerminated()) {\n\t\t\ttry {\n\t\t\t\texecutor.awaitTermination(50, TimeUnit.MILLISECONDS);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t\t//logger.log(Level.INFO, \"Finished multithreaded comoutation of gains.\");\n\t\t\n\t\tCollections.sort(serverInfos, new Comparator<ServerInfo>() {\n\t\t public int compare(ServerInfo a, ServerInfo b) {\n\t\t \treturn Long.compare(a.tmpSmallestLoss, b.tmpSmallestLoss);\n\t\t \t//return Double.compare(a.tmpSmallestLossPerMegabyteFreed, b.tmpSmallestLossPerMegabyteFreed);\n\t\t }\n\t\t});\n\t\t\n\t\treturn serverInfos;\n\t}", "protected void onGetTankCapacity(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public int getSessionAverageAliveTime();", "public List<OFPortStatisticsReply> getSwitchStatistics(long switchId, OFStatisticsType statType) {\n\t\t\t List<OFPortStatisticsReply> values = new ArrayList<OFPortStatisticsReply>();\n\t\t\t statsReply = new ArrayList<OFStatistics>();\n\t\t\t sw = floodlightProvider.getSwitches().get(switchId);\n\t\t\t //System.out.print(\"Value of \"+sw);\n\t\t\t System.out.println(\"+++++++++ENTERED FIU+++++++++\");\n\t\t\t if (sw != null) {\n\t\t\t \tSystem.out.println(\"+++++++++ENTERED FIU IF CONDITION+++++++++\");\n\t\t\t OFStatisticsRequest req = new OFStatisticsRequest();\n\t\t \tSystem.out.println(\"Switch ID IS++++++++++++++++\"+switchId);\n\t\t\t req.setStatisticType(statType);\n\t\t\t int requestLength = req.getLengthU();\n\t\t\t if (statType == OFStatisticsType.PORT) {\n\t\t\t OFPortStatisticsRequest specificReq = new OFPortStatisticsRequest();\n\t\t\t specificReq.setPortNumber((short)OFPort.OFPP_ALL.getValue());\n\t\t\t \tSystem.out.println(\"Values of port are++++++++++++\"+(short)OFPort.OFPP_ALL.getValue());\n\t\t\t req.setStatistics(Collections.singletonList((OFStatistics)specificReq));\n\t\t\t requestLength += specificReq.getLength();\n\t\t\t }\n\t\t\t req.setLengthU(requestLength);\n\t\t\t \n\t\t\t \n\t\t\t statsQueryXId = sw.getNextTransactionId();\n\t\t\t System.out.println(\"++++ID IS++++\"+statsQueryXId);\n\t\t\t try {\n\t\t\t //future = sw.getStatistics(req);\n\t\t\t // values = future.get(10, TimeUnit.SECONDS);\n\t\t\t \tsw.sendStatsQuery(req, statsQueryXId, this);\n\t\t\t \tSystem.out.println(\"JUST SENT STATS QUERY++++++++++++++++++++\"+req+\"---TO---\"+converter.convertDPID(sw.getId()));\n\n\t\t\t \twaiting = true;\n\t\t\t \t// Wait for the reply, sleep for 10ms then check\n\t\t\t \twhile(waiting){\n\t\t\t \t\ttry {\n\t\t\t \t\tThread.sleep(100);\n\t\t\t\t \tSystem.out.println(\"We are waiting++++++++++++\");\n\n\t\t\t \t\t} catch (InterruptedException e) {\n\t\t\t \t\t// TODO Auto-generated catch block\n\t\t\t \t\te.printStackTrace();\n\t\t\t \t\t}\n\t\t\t \t\t}\n \t\n\t\t\t // Cast OFPortStatistics to OFPortStatisticsReply\n\t\t\t for(OFStatistics stat : statsReply){\n\t\t\t \tvalues.add((OFPortStatisticsReply) stat);\n\t\t\t \t}\n\t\t\t \tSystem.out.println(\"Values are++++++++++++\"+values);\n\t\t\t \treturn values;\n\t\t\t \t} catch (IOException e) {\n\t\t\t \t// TODO Auto-generated catch block\n\t\t\t \te.printStackTrace();\n\t\t\t \t}\n\t\t\t }\n\t\t\t \t// Return empty list\n\t\t\t \treturn values;\n\t\t\t \t}", "private void updateStatsCAE(){\n\t\tupdateQueueSize();\n\t}", "private double pingGetLatency(){\n\t\t int NUMBER_OF_PACKTETS=10;\n\t String pingCommand = \"/system/bin/ping -c \" + NUMBER_OF_PACKTETS + \" \" + ip;\n\t String inputLine = \"\";\n\t double avgRtt = 0;\n\n\t try {\n\t // execute the command on the environment interface\n\t Process process = Runtime.getRuntime().exec(pingCommand);\n\t // gets the input stream to get the output of the executed command\n\t BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n\n\t inputLine = bufferedReader.readLine();\n\t while ((inputLine != null)) {\n\t if (inputLine.length() > 0 && inputLine.contains(\"avg\")) { // when we get to the last line of executed ping command\n\t break;\n\t }\n//\t \t if (inputLine.length()>0) inputLine = bufferedReader.readLine();\n\t inputLine = bufferedReader.readLine();\n\t }\n\t }\n\t catch (IOException e){\n\t \t pingParameters=\"Error in ping\";\n\t e.printStackTrace();\n\t }\n\n\t // Extracting the average round trip time from the inputLine string\n\t String afterEqual = inputLine.substring(inputLine.indexOf(\"=\"), inputLine.length()).trim();\n\t String afterFirstSlash = afterEqual.substring(afterEqual.indexOf('/') + 1, afterEqual.length()).trim();\n\t String strAvgRtt = afterFirstSlash.substring(0, afterFirstSlash.indexOf('/'));\n\t avgRtt = Double.valueOf(strAvgRtt);\n\t pingParameters=inputLine;\n\t return avgRtt;\n\t }", "public static void ObtenerDatosHistorial_Nutricion(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/HistorialNutri\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "private void callForStats() throws SQLException, ClassNotFoundException{\n\t\tString[] stats;\n\t\toutputTA.setText(\"\");\n\t\tif(custTypeCB.getSelectedIndex() == Globals.SINGLE_CUST)\n\t\t\tstats = dBConnection.getStats(Integer.parseInt(custIdTF.getText()));\n\t\telse\n\t\t\tstats = dBConnection.getStats(custTypeCB.getSelectedIndex());\n\t\t\n\t\tfor(String str : stats){\n\t if(str == null)\n\t \tcontinue;\n\t outputTA.append(str+\"\\n\");\n\t\t}\n\t}", "public static void main(String [] args) throws Exception {\n Server fnServer = new Server(new URL(\"https://fno.io/hub/api\"));\n\n double totalArea = 30528.0;\n double populationTotal = 11099981;\n\n QueryParam[] params = {new QueryParam(\"float\", new String[]{\"total population\"}), new QueryParam(\"float\", new String[]{\"area\"})};\n Query query = new Query(new String[]{\"population density\"}, params, null, null, ImplementationType.WEB_API);\n Function function = fnServer.query(query)[0];\n FunctionInstance calculatePopulationDensity = ImplementationHandler.instantiateFunctionImplementation(function, function.implementationMappings[0]);\n System.out.println(\"The population density of Belgium is: \" + calculatePopulationDensity.executeFunction((float)populationTotal, (float)totalArea));\n\n QueryParam[] reversedParams = {new QueryParam(\"float\", new String[]{\"area\"}), new QueryParam(\"float\", new String[]{\"total population\"})};\n query = new Query(new String[]{\"population density\"}, reversedParams, null, null, ImplementationType.LOCAL);\n function = fnServer.query(query)[0];\n calculatePopulationDensity = ImplementationHandler.instantiateFunctionImplementation(function, function.implementationMappings[0]);\n System.out.println(\"The population density of Belgium is: \" + calculatePopulationDensity.executeFunction((float)totalArea, (float)populationTotal));\n\n query = new Query(new String[]{\"hello world\"}, null, null, null);\n function = fnServer.query(query)[0];\n FunctionInstance helloWorld = ImplementationHandler.instantiateFunctionImplementation(function, function.implementationMappings[0]);\n System.out.println(\"Output: \" + helloWorld.executeFunction());\n\n\n }", "public String stats() throws IOException, ClassNotFoundException, SQLException{\n\t\t\n\t\tHttpServletRequest request = ServletActionContext.getRequest();\n\t\tHttpServletResponse response = ServletActionContext.getResponse();\n\t\tCookie[] checkTheCookie = request.getCookies();\n\t\tboolean isUser= false;\n\t\tif(checkTheCookie!=null){\n\t\t\tfor(Cookie cki: checkTheCookie){\n\t\t\t\tString name = cki.getName();\n\t\t\t\t\n\t\t\t\tif(name.equals(\"user\")){\n\t\t\t\t\tisUser=true;\n//\t\t\t\t\tSystem.out.println(cki.getValue());\n//\t\t\t\t\treq.setAttribute(\"email\", cki.getValue());\n//\t\t\t\t\trequest.setAttribute(\"email\", cki.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!isUser){\n\t\t\tresponse.sendRedirect(\"/Struts2Sample/_football_login.jsp\");\n\t\t}\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tConnection conn = DriverManager.getConnection (\"jdbc:oracle:thin:@oracle.cise.ufl.edu:1521:orcl\",\"konyala\", \"YyAUFfpm2UkB!\");\n\t\tStatement stmt = conn.createStatement ();\n\t\t\n//\t\tResultSet rset = stmt.executeQuery (\"select TEAM_NAME from TEAM\");\n//\t\tResultSet rset = stmt.executeQuery (\"select team_name,won from team t, (select count(match_winner) as won,match.MATCH_WINNER from match natural join season where season_year = \"+year+\" group by match_winner) winners where winners.match_winner = t.team_id\");\n\t\tResultSet rset = stmt.executeQuery (\"select venue_id, venue_name from venue\");\n\t\twhile (rset.next ()){\n\t\t\tJSONObject tempJson = new JSONObject();\n\t\t\ttempJson.put(\"venue_id\", rset.getString(1));\n\t\t\ttempJson.put(\"venue_name\", rset.getString(2));\n\t\t \tresJsonArray.put(tempJson);\n\t\t}\n\t\trequest.setAttribute(\"resJson\", resJsonArray);\n\t\t\n\t\tString batbowl = request.getParameter(\"batbowl\");\n\t\tString team1 = request.getParameter(\"team1\");\n\t\tString team2 = request.getParameter(\"team2\");\n\t\tString venue = request.getParameter(\"venue\");\n\t\tString season = request.getParameter(\"season\");\n\t\tString winlose = request.getParameter(\"winlose\");\n\t\tif(winlose!=null && winlose.equals(\"1\")){\n\t\t\twinlose = team1;\n\t\t}\n\t\telse{\n\t\t\twinlose = team2;\n\t\t}\n\t\t\n\t\tif(batbowl==null || team1==null){\n\t\t\treturn \"success\";\n\t\t}\n\t\t\n\t\trset = stmt.executeQuery(\"select player.player_name,total_runs,fours,sixes from (select striker as player_id, sum(runs_scored) as total_runs,count(case runs_scored when 4 then 1 end) as fours,count(case runs_scored when 6 then 1 end) as sixes from (select * from player_match natural join match natural join team natural join ball_by_ball natural join batsman_scored natural join season natural join venue natural join country where ((team_1 = \"+team1+\" and team_2 = \"+team2+\") or (team_2 = \"+team1+\" and team_1 = \"+team2+\")) and match_winner = \"+winlose+\" and season_id = \"+season+\" and venue_id = \"+venue+\") group by striker) tr, player where player.PLAYER_ID = tr.player_id\");\n\t\t\n\t\twhile (rset.next ()){\n\t\t\tJSONObject tempJson = new JSONObject();\n\t\t\ttempJson.put(\"player_name\", rset.getString(1));\n\t\t\ttempJson.put(\"total_runs\", rset.getString(2));\n\t\t\ttempJson.put(\"fours\", rset.getString(3));\n\t\t\ttempJson.put(\"sixes\", rset.getString(4));\n\t\t\tresStatJsonArray.put(tempJson);\n\t\t}\n\t\trequest.setAttribute(\"resStatJson\", resStatJsonArray);\n\t\t\n\t\treturn \"successStats\";\n\t}", "public void ActualizadorOro(){\n\njavax.swing.Timer ao = new javax.swing.Timer(1000*60, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n\n usuarios = new ArrayList<Usuario>();\n ResultSet rs = st.executeQuery(\"select * from usuarios\");\n while(rs.next()){\n usuarios.add(new Usuario(rs.getString(1), rs.getString(2), rs.getString(3), Integer.parseInt(rs.getString(4)), Integer.parseInt(rs.getString(5)), Integer.parseInt(rs.getString(6)), Integer.parseInt(rs.getString(7))));\n }\n\n //preparamos una consulta que nos lanzara el numero de minas por categoria que tiene cada usuario\n String consulta1 = \"select idEdificio, count(*) from regiones, edificiosregion\"+\n \" where regiones.idRegion=edificiosregion.idRegion\"+\n \" and propietario='\";\n\n String consulta2 = \"' and idEdificio in (1101,1102,1103,1104,1105)\"+\n \" group by idEdificio\";\n\n //recorremos toda la lista sumando el oro, dependiendo del numero de minas que posea\n ResultSet rs2 = null;\n for(Usuario usuario : usuarios){\n rs2 = st.executeQuery(consulta1 + usuario.getNick() + consulta2);\n int oro = 0;\n while(rs2.next()){\n System.out.println(Integer.parseInt(rs2.getString(1)));\n if(Integer.parseInt(rs2.getString(1)) == 1101){\n oro = oro + (rs2.getInt(2) * 100);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1102){\n oro = oro + (rs2.getInt(2) * 150);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1103){\n oro = oro + (rs2.getInt(2) * 300);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1104){\n oro = oro + (rs2.getInt(2) * 800);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1105){\n oro = oro + (rs2.getInt(2) * 2000);\n }\n }\n st.executeQuery(\"UPDATE usuarios SET oro = (SELECT oro+\" + oro + \" FROM usuarios WHERE nick ='\" + usuario.getNick() + \"'\"+\n \") WHERE nick = '\" + usuario.getNick() + \"'\");\n\n }\n st.close();\n rs.close();\n rs2.close();\n conn.close();\n\n } catch (SQLException ex) {\n System.out.println(ex.getMessage() + \" Fallo actualizar oro.\");\n }\n\n }\n });\n\n ao.start();\n}", "public static void throughput(BasicGraphService bgs) {\n \tRandom random = new Random();\n \tlong timer = System.currentTimeMillis();\n\t\tlong dif = 0l;\n\t\tint ops = 0;\n\t\twhile(dif < 1000) {\n\t\t\tint key = random.nextInt(maxRandInt);\n\t\t\tbgs.getConnections(key);\n\t\t\tdif = System.currentTimeMillis() - timer;\n\t\t\tops++;\n\t\t}\n\t\tdebug(debug, \"operations in 1 second: \" + ops);\n }", "void print_statistics(long tot_arrived, long tot_processed, Double end_time){\n\n CloudEvent cloudEvent = new CloudEvent();\n CloudletEvent cletEvent = new CloudletEvent();\n PrintFile print = new PrintFile();\n\n\n // System response time & throughput\n\n float system_response_time = (float)(sum_service_times1_clet+ sum_service_times1_cloud + sum_service_times2_clet+ sum_service_times2_cloud)/ tot_processed;\n float response_time_class1 = (float) ((sum_service_times1_clet+ sum_service_times1_cloud)/ (completition_clet_type1 + completition_cloud_type1));\n float response_time_class2 = (float) ((sum_service_times2_clet+ sum_service_times2_cloud)/ (completition_clet_type2 + completition_cloud_type2));\n\n float lambda_tot = (float) (tot_arrived/end_time);\n float lambda_1 = (float)((arrival_type1_clet+arrival_type1_cloud)/end_time);\n float lambda_2 = (float)((arrival_type2_clet+arrival_type2_cloud)/end_time);\n\n\n // per-class effective cloudlet throughput\n\n float task_rate_clet1 = (float) ((float)completition_clet_type1 / end_time);\n float task_rate_clet2 = (float) ((float)completition_clet_type2 / end_time);\n\n\n // per-class cloud throughput\n\n float lambda_cloud1 = (float) ((arrival_type1_cloud)/end_time);\n float lambda_cloud2 = (float) ((arrival_type2_cloud)/end_time);\n\n\n // class response time and mean population\n\n float response_time_cloudlet = (float) (sum_service_times1_clet+ sum_service_times2_clet)/ (completition_clet_type1 + completition_clet_type2);\n float response_time_cloudlet1 = (float) sum_service_times1_clet/ completition_clet_type1;\n float response_time_cloudlet2 = (float) (sum_service_times2_clet/ completition_clet_type2);\n\n float response_time_cloud = (float) ((sum_service_times1_cloud+ sum_service_times2_cloud)/ (completition_cloud_type1 + completition_cloud_type2));\n float response_time_cloud1 = (float) (sum_service_times1_cloud/ completition_cloud_type1);\n float response_time_cloud2 = (float) (sum_service_times2_cloud/ completition_cloud_type2);\n\n // E[N] cloudlet\n float mean_cloudlet_jobs = cletEvent.mean_cloudlet_jobs_number();\n // E[N] class 1 cloudlet\n float mean_cloudlet_jobs1 = cletEvent.mean_cloudlet_jobs_number1();\n // E[N] class 2 cloudlet\n float mean_cloudlet_jobs2 = cletEvent.mean_cloudlet_jobs_number2();\n\n // E[N] cloud\n float mean_cloud_jobs = cloudEvent.mean_cloud_jobs_number();\n // E[N] class 1 cloud\n float mean_cloud_jobs1 = cloudEvent.mean_cloud_jobs_number1();\n // E[N] class 2 cloud\n float mean_cloud_jobs2 = cloudEvent.mean_cloud_jobs_number2();\n\n\n // Altre statistiche di interesse\n\n float lambda_clet = (float) ((arrival_type1_clet+ arrival_type2_clet)/end_time);\n float lambda_clet1 = (float) ((arrival_type1_clet)/end_time);\n float lambda_clet2 = (float) ((arrival_type2_clet)/end_time);\n float lambda_cloud = (float) ((arrival_type1_cloud+ arrival_type2_cloud)/end_time);\n\n double rate1_clet = mean_cloudlet_jobs1*0.45;\n double rate2_clet = mean_cloudlet_jobs2*0.27;\n\n\n\n NumberFormat numForm = NumberFormat.getInstance();\n numForm.setMinimumFractionDigits(6);\n numForm.setMaximumFractionDigits(6);\n numForm.setRoundingMode(RoundingMode.HALF_EVEN);\n\n\n System.out.println(\"\\n\\n\\n 1) SYSTEM RESPONSE TIME & THROUGHPUT \" + \"(GLOBAL & PER-CLASS)\");\n\n System.out.println(\"\\n Global System response time ...... = \" + numForm.format( system_response_time));\n System.out.println(\" Response time class 1 ...... = \" + numForm.format( response_time_class1));\n System.out.println(\" Response time class 2 ...... = \" + numForm.format( response_time_class2));\n\n System.out.println(\"\\n Global System throughput ...... = \" + numForm.format( lambda_tot));\n System.out.println(\" Throughput class 1 ...... = \" + numForm.format( lambda_1));\n System.out.println(\" Throughput class 2 ...... = \" + numForm.format( lambda_2));\n\n\n System.out.println(\"\\n\\n\\n 2) PER_CLASS EFFECTIVE CLOUDLET THROUGHPUT \");\n System.out.println(\" Task-rate cloudlet class 1 ...... = \" + numForm.format( rate1_clet));\n System.out.println(\" Task-rate cloudlet class 2 ...... = \" + numForm.format( rate2_clet));\n\n\n System.out.println(\"\\n\\n\\n 3) PER_CLASS CLOUD THROUGHPUT \");\n System.out.println(\" Throughput cloud class 1 ...... = \" + numForm.format( lambda_cloud1));\n System.out.println(\" Throughput cloud class 2 ...... = \" + numForm.format( lambda_cloud2));\n\n\n System.out.println(\"\\n\\n\\n 4) CLASS RESPONSE TIME & MEAN POPULATION \" + \"(CLOUDLET & CLOUD)\");\n\n System.out.println(\"\\n Response Time class 1 cloudlet ...... = \" + numForm.format( response_time_cloudlet1));\n System.out.println(\" Response Time class 2 cloudlet ...... = \" + numForm.format(response_time_cloudlet2));\n System.out.println(\" Response Time class 1 cloud ...... = \" + numForm.format( response_time_cloud1));\n System.out.println(\" Response Time class 2 cloud ...... = \" + numForm.format( response_time_cloud2));\n\n System.out.println(\"\\n Mean Population class 1 cloudlet ...... = \" + numForm.format( mean_cloudlet_jobs1));\n System.out.println(\" Mean Population class 2 cloudlet ...... = \" + numForm.format( mean_cloudlet_jobs2));\n System.out.println(\" Mean Population class 1 cloud ...... = \" + numForm.format( mean_cloud_jobs1));\n System.out.println(\" Mean Population class 2 cloud ...... = \" + numForm.format( mean_cloud_jobs2));\n\n }", "public void testIO(){\r\n // Don't do this every iteration because it's too expensive\r\n if(testIOTimer.get() < 0.5) {\r\n return;\r\n }\r\n testIOTimer.reset();\r\n NetworkTable table = NetworkTable.getTable(\"Status\");\r\n table.putNumber(\"dioData\", digitalModule.getAllDIO());\r\n for(int i = 1; i <= 10; i++) {\r\n table.putNumber(\"pwm\" + i, digitalModule.getPWM(i));\r\n }\r\n \r\n for(int i = 1; i <= 8; i++) {\r\n table.putNumber(\"analog\" + i, ((int)(analogModule.getVoltage(i) * 1000) / 1000.0));\r\n }\r\n }", "private double getNetworkInStatistics(String args) throws Exception\n {\n //TODO:IMLEMENT NETWORK IN STATISTICS GETTER\n String[] lineParts = getNetFile();\n if(args.toLowerCase() == packetArg)\n {\n int newNetPackets = Integer.decode(lineParts[2]);\n int retVal = newNetPackets - previousNetworkInPackets;\n previousNetworkInPackets = newNetPackets;\n return(retVal);\n }\n else\n {\n int newNetIn = Integer.decode(lineParts[1]);\n int retVal = newNetIn - previousNetworkIn;\n previousNetworkIn = newNetIn;\n return(retVal);\n }\n }", "private void startClientStatisticsThread() {\r\n\t\tnew Thread(clientStatistics).start();\r\n\t}", "public static void main(String[] args) throws IOException, InterruptedException { HttpGet getIndex = new HttpGet(\"http://www.moswar.ru/\");\n//\n// HttpResponse indexResponse = client.execute(getIndex);\n//\n// System.out.println(indexResponse.getStatusLine());\n// System.out.println(indexResponse.toString());\n//\n//\n\n JSONObject data;\n\n login(\"[email protected]\",\"`1\");\n\n index();\n\n blackJackIndex();\n\n data = newBet(Bet.random());\n\n\n String mySumm = null;\n String myHand = getMyHand(data);\n if (!myHand.contains(\"A\"))\n mySumm = getMySumm(data);\n String dealerHand = getDealerHand(data);\n\n int i = 0;\n\n all:\n while(i < 100){\n //TODO if \"check\" right or left winner or looser - new game - alternative - check if > 21 then new game\n if (mySumm != null && Integer.parseInt(mySumm) > 17){\n ++i;\n if (Integer.parseInt(mySumm) <= 21)\n endGame(stand());\n else System.out.println(\"Dealer WIN\");\n data = newBet(Bet.random());\n myHand = getMyHand(data);\n mySumm = null;\n if (!myHand.contains(\"A\"))\n mySumm = getMySumm(data);\n dealerHand = getDealerHand(data);\n }\n else{\n switch (Answer.getTurn(myHand, dealerHand)){\n case \"S\": //STAND\n ++i;\n endGame(stand());\n\n// break all;\n data = newBet(Bet.random());\n myHand = getMyHand(data);\n mySumm = null;\n if (!myHand.contains(\"A\"))\n mySumm = getMySumm(data);\n dealerHand = getDealerHand(data);\n break;\n case \"H\": //HIT\n data = more();\n mySumm = getMyNextSumm(data);\n myHand = mySumm;\n break;\n case \"D\": //DOUBLE\n //TODO check if can double\n if (checkDouble(data)){\n data = doubleBet();\n mySumm = getMyNextSumm(data);\n myHand = mySumm;\n }else{\n data = more();\n mySumm = getMyNextSumm(data);\n myHand = mySumm;\n }\n break;\n case \"P\": //SPLIT\n data = more();\n mySumm = getMyNextSumm(data);\n myHand = mySumm;\n break;\n default:\n break;\n }\n\n }\n }\n\n client.getConnectionManager().shutdown();\n out.close();\n }", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public static void viewConnections(){\n\t\tfor(int i=0; i<Server.clients.size();i++){\n\t\t\tServerThread cliente = Server.clients.get(i);\n\t\t\tlogger.logdate(cliente.getConnection().getInetAddress().getHostName());\n\t\t}\n\t}", "public int onLoop() throws InterruptedException{\n \tif(inventory.isFull()) {\r\n\t\t\tinventory.dropAll(\"Logs\");\r\n\t\t\tsleep(random(2500,4000));\r\n\t\t\tshortTermAntiban();\r\n\t\t}else {\r\n\t\t\tcutTree();\r\n\t\t\tsleep(random(500,1000));\r\n\t\t}\r\n \t\r\n\r\n \t\r\n \t\r\n return 500;\r\n }" ]
[ "0.5682506", "0.5672341", "0.56719387", "0.56619424", "0.5560706", "0.5521645", "0.5483848", "0.54278874", "0.54197925", "0.5400945", "0.5391624", "0.53762573", "0.5348258", "0.5326249", "0.53121746", "0.526845", "0.5264358", "0.52555597", "0.524538", "0.52172697", "0.5212025", "0.5207995", "0.5202461", "0.52020955", "0.51993877", "0.51821", "0.51776445", "0.517515", "0.5175052", "0.51742506", "0.5169696", "0.51677597", "0.51648605", "0.5160248", "0.51582885", "0.5155563", "0.5149665", "0.51459384", "0.51354563", "0.51199615", "0.51190895", "0.51190895", "0.51190895", "0.5113165", "0.51128083", "0.5108228", "0.5097223", "0.50953525", "0.50937605", "0.5071139", "0.50653785", "0.5061807", "0.50605565", "0.5060279", "0.5060279", "0.5060279", "0.5058646", "0.5050124", "0.5042796", "0.50294155", "0.50281405", "0.5026679", "0.50247467", "0.502221", "0.5020781", "0.50161624", "0.500793", "0.49924746", "0.4987948", "0.49870545", "0.49870545", "0.49868873", "0.49812093", "0.4978888", "0.4976059", "0.49751267", "0.49684784", "0.49668327", "0.4965482", "0.49651045", "0.49631363", "0.49571547", "0.49560082", "0.49558374", "0.49539524", "0.49411517", "0.4934588", "0.4928979", "0.49286976", "0.49258062", "0.49228114", "0.4919389", "0.4911498", "0.4901743", "0.4899833", "0.48985648", "0.48972043", "0.48900303", "0.4888553", "0.48873407", "0.4887333" ]
0.0
-1
quando invio le stats, se il server non risponde le salvo in un buffer di backup e riprovo fra 5 secondi
private void sendStatsToServer(List<Statistic> stats) { if(stats == null) { System.out.println("COORDINATOR - Nothing to send yet"); return; } ClientResponse response; String serverURI = coordinator.getNode().getServerURI(); try { WebResource webResource = RESTclient.resource(serverURI + "/Statistics/"); response = webResource.type("application/json").put(ClientResponse.class, new Gson().toJson(stats, new TypeToken<List<Statistic>>(){}.getType())); } catch (ClientHandlerException ce) { System.out.println("COORDINATOR - Server cloud connection refused - impossible to send data"); backupBuffer.add(stats); return; } switch (response.getStatus()) { case 200: System.out.println("COORDINATOR - Sending statistics to server successful"); return; default: backupBuffer.add(stats); System.out.println("COORDINATOR - Failed sending statistics: HTTP error code: " + response.getStatus()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateStatsCAE(){\n\t\tupdateQueueSize();\n\t}", "@Override\n public void handleMessage(Message msg) {\n sendEmptyMessageDelayed(0, 3000);\n if (resClient.getSendBufferFreePercent() <= 0.05) {\n Toast.makeText(StreamingActivity.this, \"sendbuffer is full,netspeed is low!\", Toast.LENGTH_SHORT).show();\n }\n }", "public void resetActiveStats() {\n if (!valid)\n return;\n\n\n Handler handler = new Handler(getLooper());\n handler.post(() -> {\n recentStats.activeRequests = toLoad.size() + loading.size();\n recentStats.maxActiveRequests = recentStats.activeRequests;\n });\n }", "@Scheduled(fixedRate = 2000)\n private void doSendRpcUsage() {\n List<MethodCallDTO> items = stats.values()\n .stream()\n .map(stat -> new MethodCallDTO(\n stat.name,\n stat.count.longValue(),\n stat.lastCall.longValue(),\n stat.lastResult.get(),\n stat.curl))\n .sorted((s1, s2) -> s1.getMethodName().compareTo(s2.getMethodName()))\n .collect(Collectors.toList());\n\n clientMessageService.sendToTopic(\"/topic/rpcUsage\", items);\n }", "public static void main(String... args) {\n List<Integer> data = new ArrayList<Integer>();\n data.add(1);\n data.add(1);\n data.add(1);\n data.add(1);\n data.add(2);\n data.add(2);\n data.add(3);\n data.add(4);\n data.add(4);\n data.add(4);\n data.add(4);\n data.add(5);\n data.add(5);\n data.add(5);\n data.add(5);\n data.add(6);\n data.add(6);\n data.add(7);\n data.add(7);\n data.add(7);\n data.add(8);\n data.add(9);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(11);\n data.add(12);\n data.add(12);\n\n int count = droppedRequests(data);\n System.out.println(count);\n }", "private void cargarStatsBase (){\n\t\tString dirRoot = System.getProperty(\"user.dir\")+ File.separator+\"recursos\"+ File.separator+\"ficheros\"+ File.separator+\"dungeons\"+File.separator;\n\t\tString dirRazas = dirRoot+\"razas_stats.txt\";\n\t\tString dirClases = dirRoot+\"clases_stats.txt\";\n\n\t\t//Carga de los stats de Raza\n\t\ttry{\n\t\t\tInputStream fichDataRazas = new FileInputStream(dirRazas);\n\t\t\tScanner sc = new Scanner(fichDataRazas);\n\n\t\t\tString lineaAct;\n\t\t\tString lineaRaza=null;\n\n\t\t\twhile (lineaRaza == null && sc.hasNext()){\n\t\t\t\tlineaAct = sc.nextLine();\n\t\t\t\tif (lineaAct.contains(this.raza+\"&\")){\n\t\t\t\t\tlineaRaza = lineaAct;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (lineaRaza != null && lineaRaza.matches(\"(.*)&\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d\")){\n\t\t\t\tString[] dataStatRaza = lineaRaza.split(\"&\")[1].split(\",\");\n\t\t\t\tint fuerza = Integer.parseInt(dataStatRaza[0]);\n\t\t\t\tint defensa = Integer.parseInt(dataStatRaza[1]);\n\t\t\t\tint inteligencia = Integer.parseInt(dataStatRaza[2]);\n\t\t\t\tint destreza = Integer.parseInt(dataStatRaza[3]);\n\t\t\t\tthis.lStats.sumarStats(new ListaStat(fuerza,defensa,inteligencia,destreza));\n\t\t\t}\n\t\t\telse {throw new ExcepcionRazaInexistente();}\n\t\t\t//Se cierra el escaner\n\t\t\tsc.close();\n\n\n\t\t\t//Carga de los stats de Clase\n\t\t\tInputStream fichDataClases = new FileInputStream(dirClases);\n\t\t\tsc = new Scanner(fichDataClases);\n\n\t\t\tString lineaClase = null;\n\t\t\twhile (lineaClase == null && sc.hasNext()){\n\t\t\t\tlineaAct = sc.nextLine();\n\t\t\t\tif (lineaAct.contains(this.clase+\"&\")){\n\t\t\t\t\tlineaClase = lineaAct;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (lineaClase != null && lineaClase.matches(\"(.*)&\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d\")){\n\t\t\t\tString[] dataStatClase = lineaClase.split(\"&\")[1].split(\",\");\n\t\t\t\tint fuerza = Integer.parseInt(dataStatClase[0]);\n\t\t\t\tint defensa = Integer.parseInt(dataStatClase[1]);\n\t\t\t\tint inteligencia = Integer.parseInt(dataStatClase[2]);\n\t\t\t\tint destreza = Integer.parseInt(dataStatClase[3]);\n\t\t\t\tthis.lStats.sumarStats(new ListaStat(fuerza,defensa,inteligencia,destreza));\n\t\t\t}\n\t\t\telse {throw new ExcepcionClaseInexistente();}\n\t\t\t//Se cierra el escaner\n\t\t\tsc.close();\n\t\t}\n\n\t\tcatch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"No se encuentran los ficheros de datos de los stats de razas y/o clases, por lo que el juego se cerrará.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (ExcepcionRazaInexistente e){\n\t\t\tSystem.out.println(\"El fichero \"+dirRazas+\" no contiene datos sobre la raza seleccionada o tiene un formato inadecuado, por lo que el juego se cerrará.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (ExcepcionClaseInexistente e){\n\t\t\tSystem.out.println(\"El fichero \"+dirClases+\" no contiene datos sobre la clase seleccionada o tiene un formato inadecuado, por lo que el juego se cerrará.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"Ha ocurrido un error inesperado: el juego se cerrará\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void resetStats() {\n }", "static void envoyerfrags(int machutil,FileInputStream raf,BufferedReader br,HashMap<Integer,String> cataloguefich,int j,String nom) throws IOException {\n\tint leng = (nom + \" CMDWRITE\").length();\n\tbyte[] buf = (nom + \" CMDWRITE\").getBytes();\n\t\t\n\tfor(int destIx=0; destIx < machutil; destIx++) {\n \tsocs[destIx] = new Socket(\"localhost\",ports[destIx]);\n \t\n\t\t DataOutputStream dw = new DataOutputStream(socs[destIx].getOutputStream());\n \tBufferedOutputStream bw = new BufferedOutputStream(socs[destIx].getOutputStream());\n\t\tdw.writeInt(leng);\n \tdw.flush();\n \t\tbw.write(buf);\n \tbw.flush();\n \n //\t}\n\t\n //envoie de la taille d'un fragement nbrebytes\n // for(int destIx=0; destIx < machutil; destIx++) {\n \tint numfrag = nbmachines*j + destIx;\n\tbyte[] b = Integer.toString(numfrag).getBytes();\n\tbyte longu = (byte) b.length;\n\tbw.write(longu);\n bw.flush();\n\tbw.write(b);\n bw.flush();\n \t\n \t\n \t// dw = new DataOutputStream(socs[destIx].getOutputStream());\n // try { Thread.sleep(10);}catch (Exception e) {}\t\n\n \tcataloguefich.put(numfrag, Integer.toString( ports[destIx]));\n\t System.out.println(\"num frag envoyé : \" + numfrag);\n\t String line;\n\t int nbrebytes = 0;\n \tfor(int i=0; i < nbligne; i++) {\n\t\t try {\t\n\t\t \tnbrebytes = br.readLine().getBytes().length +\"\\n\".getBytes().length + nbrebytes;\n\t\t } catch(Exception e) {\n\t\t\t break;\n\t\t }\n\t }\n //\tDataOutputStream dw1 = new DataOutputStream(socs[destIx].getOutputStream());\n \n\t/*byte b = (byte)nbrebytes;\n\tnbrebytes = 300000000;\n\tInteger nbbytes = new Integer(nbrebytes);\n\n\tByte b2 = new Byte(b);\n\n\t System.out.println(\"cong : \"+ (nbrebytes/256));\n\t System.out.println(\"b : \"+ b);\n\tint coeff = 0;\t\n\tint i2 = (b & 0xFF);\n\tif (b<0) {\n\t\tcoeff = ((nbrebytes/256)+1);\n\n\t}else {\n\t\tcoeff = nbrebytes/256;\n\t} \n\tint n = (256*coeff)+b ;*/\n\n\t b = Integer.toString(nbrebytes).getBytes();\n\t longu = (byte) b.length;\n\n\tbw.write(longu);\n bw.flush();\n\tbw.write(b);\n bw.flush();\n\tSystem.out.println(\"Taille frag envoyé : \" + nbrebytes);\n\n //envoie du contenue d'un fragement\n\t// BufferedOutputStream bw = new BufferedOutputStream(socs[destIx].getOutputStream());\n readWrites(raf, bw, nbrebytes,destIx);\n\n\n }\n\n}", "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "@Override\n public void run()\n {\n while(running)\n {\n try\n {\n Thread.sleep(5000);\n }\n catch (InterruptedException e) { e.printStackTrace(); }\n\n System.out.println(\"-----------------------------------------------------------------------\");\n\n sendStatsToServer(coordinator.computeStats());\n\n if(backupBuffer.size() > 0)\n {\n List<List<Statistic>> copyList = copyList(backupBuffer);\n backupBuffer.clear();\n\n for (List<Statistic> l: copyList)\n {\n long timestamp = l.stream().filter((Statistic s) -> s.getNodeID().equals(\"Coord\"))\n .mapToLong(Statistic::getTimestamp).toArray()[0];\n\n System.out.println(\"COORDINATOR - Sending buffered stats computed at \" + timestamp);\n sendStatsToServer(l);\n }\n }\n System.out.println(\"-----------------------------------------------------------------------\");\n }\n }", "void statsReset();", "private void summarizeTimeslot ()\n {\n if (null == brokers) {\n // first time through\n brokers = new ArrayList<>();\n stats = new HashMap<>();\n\n data.print(\"Broker Name,\");\n data.print(\"Power Type,\");\n data.print(\"Customers,\");\n data.print(\"Usage (kWh),\");\n data.println(\"Income Gained\");\n\n // set up the maps of brokers, and stats by power type\n for (Broker broker : brokerRepo.findRetailBrokers())\n {\n brokers.add(broker);\n stats.put(broker, new HashMap<>());\n for (PowerType type : powerTypes)\n {\n StatsTracked theseStats = new StatsTracked();\n HashMap<PowerType, StatsTracked> map = stats.get(broker);\n map.put(type, theseStats);\n stats.put(broker, map);\n }\n }\n\n // store customer statistics\n\n }\n\n if (ttx.size() > 0) {\n // there are some signups and withdraws here\n for (TariffTransaction tx : ttx) {\n Broker broker = tx.getBroker();\n PowerType type = tx.getTariffSpec().getPowerType();\n HashMap<PowerType, StatsTracked> brokerMap = stats.get(broker);\n StatsTracked theseStats = brokerMap.get(type);\n if (tx.getTxType() == TariffTransaction.Type.CONSUME ||\n tx.getTxType() == TariffTransaction.Type.PRODUCE) {\n theseStats.updateUsage(tx.getKWh());\n theseStats.updateProfit(tx.getCharge());\n }\n else if (tx.getTxType() == TariffTransaction.Type.SIGNUP)\n theseStats.updateCustomers(tx.getCustomerCount());\n\n // reupdate the tracking...\n brokerMap.put(type, theseStats);\n stats.put(broker, brokerMap);\n }\n }\n ttx.clear();\n }", "public synchronized void sendStatisticsAway() throws IOException {\n\n\t\tfor (Map.Entry<Integer, Map<Integer, Map<String, Long>>> entry : counters\n\t\t\t\t.entrySet()) {\n\t\t\t// If node is not localhost\n\t\t\tif (entry.getKey().intValue() != myId) {\n\n\t\t\t\tWriteMessage msg = null;\n\t\t\t\tIbisIdentifier receiver = null;\n\n\t\t\t\t// For every submission\n\t\t\t\tfor (Map.Entry<Integer, Map<String, Long>> entry2 : entry\n\t\t\t\t\t\t.getValue().entrySet()) {\n\n\t\t\t\t\tMap<String, Long> submissionCounters = entry2.getValue();\n\t\t\t\t\t// If there are counters\n\t\t\t\t\tif (submissionCounters.size() > 0) {\n\t\t\t\t\t\tif (msg == null) {\n\t\t\t\t\t\t\treceiver = net.getPeerLocation(entry.getKey());\n\t\t\t\t\t\t\tmsg = net.getMessageToSend(receiver,\n\t\t\t\t\t\t\t\t\tNetworkLayer.nameMgmtReceiverPort);\n\t\t\t\t\t\t\tmsg.writeByte((byte) 6);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Write the submission Id\n\t\t\t\t\t\tmsg.writeByte((byte) 1);\n\n\t\t\t\t\t\tmsg.writeInt(entry2.getKey());\n\t\t\t\t\t\tmsg.writeInt(submissionCounters.size());\n\n\t\t\t\t\t\tfor (Map.Entry<String, Long> entry3 : submissionCounters\n\t\t\t\t\t\t\t\t.entrySet()) {\n\t\t\t\t\t\t\tbyte[] key = entry3.getKey().getBytes();\n\t\t\t\t\t\t\tmsg.writeInt(key.length);\n\t\t\t\t\t\t\tmsg.writeArray(key);\n\t\t\t\t\t\t\tmsg.writeLong(entry3.getValue());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsubmissionCounters.clear();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (msg != null) {\n\t\t\t\t\tmsg.writeByte((byte) 0);\n\t\t\t\t\tmsg.finish();\n\t\t\t\t\tmsg = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void gather(final Session s) throws Exception {\n\t\t//final MeasureHandler mHandler = Appctx.getBean(\"measurehandler\");\n\t\t//final List<CacheClusterBean> cache = s.createQuery(\n\t\t//\t\t\"from CacheClusterBean\").list();\n\t\t//for (final CacheClusterBean cluster : cache) {\n\t\t\t// if (!cluster.getLbStatus().endsWith(\"ready\")) {\n\t\t\t// logger.debug(\"Ignoring AC \" + cluster.getUserId() + \" LB \"\n\t\t\t// + cluster.getLoadBalancerName() + \" Status \"\n\t\t\t// + cluster.getLbStatus());\n\t\t\t// continue;\n\t\t\t// }\n\t\t\t// final long acid = cluster.getAccount().getId();\n\t\t\t// logger.debug(\"Gather AC \" + acid + \" Cluster \" +\n\t\t\t// cluster.getName());\n\t\t\t// final AccountBean acb = cluster.getAccount();\n\t\t\t// final AccountType ac = AccountUtil.toAccount(acb);\n\t\t\t//\n\t\t\t// final DimensionBean dim = CWUtil.getDimensionBean(s, acb.getId(),\n\t\t\t// \"CacheClusterId\", cluster.getName(), true);\n\t\t\t// final Set<DimensionBean> dims = new HashSet<DimensionBean>();\n\t\t\t// dims.add(dim);\n\t\t\t// BinLogDiskUsage Bytes\n\t\t\t// CPUUtilization Percent\n\t\t\t// DatabaseConnections Count\n\t\t\t// FreeableMemory Bytes\n\t\t\t// FreeStorageSpace Bytes\n\t\t\t// ReplicaLag Seconds\n\t\t\t// SwapUsage Bytes\n\t\t\t// ReadIOPS Count/Second\n\t\t\t// WriteIOPS Count/Second\n\t\t\t// ReadLatency Seconds\n\t\t\t// WriteLatency Seconds\n\t\t\t// ReadThroughput Bytes/Second\n\t\t\t// WriteThroughput Bytes/Second\n\n\t\t//}\n\t}", "public void testGenerateBrokerAndVirtualhostStatistics() throws Exception\n {\n sendUsing(_test, 5, 200);\n Thread.sleep(1000);\n \n for (ManagedConnection mc : _jmxUtils.getManagedConnections(\"test\"))\n {\n assertEquals(\"Incorrect connection total\", 0, mc.getTotalMessagesReceived());\n assertEquals(\"Incorrect connection data\", 0, mc.getTotalDataReceived());\n\t assertFalse(\"Connection statistics should not be enabled\", mc.isStatisticsEnabled());\n }\n \n ManagedBroker vhost = _jmxUtils.getManagedBroker(\"test\");\n assertEquals(\"Incorrect vhost data\", 5, vhost.getTotalMessagesReceived());\n assertEquals(\"Incorrect vhost data\", 1000, vhost.getTotalDataReceived());\n assertTrue(\"Vhost statistics should be enabled\", vhost.isStatisticsEnabled());\n\n assertEquals(\"Incorrect server total messages\", 5, _jmxUtils.getServerInformation().getTotalMessagesReceived());\n assertEquals(\"Incorrect server total data\", 1000, _jmxUtils.getServerInformation().getTotalDataReceived());\n assertTrue(\"Server statistics should be enabled\", _jmxUtils.getServerInformation().isStatisticsEnabled());\n }", "public void storeStats() throws Exception {\n logger.info(\"[WORKER-MONITOR] - Start store stats into file. TopologyId: \" + topologyId);\n\n logger.debug(\"------------------WORKER MONITOR SNAPSHOT START------------------\");\n logger.debug(\"Current InterNode Traffic is: \" + DataManager.getInstance().getCurrentInterNodeTraffic());\n logger.debug(\"This Topology current total load is: \" + DataManager.getInstance().getTotalLoad(topologyId));\n // 2018-07-23 add for simple logs\n /*\n if (taskMonitorList.size() != 0) {\n FileUtils.writeToFile(trafficFilename, taskMonitorList.get(0).getTaskId() + \" : \" + DataManager.getInstance().getCurrentInterNodeTraffic());\n }\n */\n FileUtils.writeToFile(Constants.TRAFFIC_DATA_FILE, taskMonitorList.get(0).getTaskId() + \" : \" + DataManager.getInstance().getCurrentInterNodeTraffic());\n\n // Output the threadToTaskMap\n logger.debug(\"Threads to Tasks association is: \");\n for (long threadId : threadToTaskMap.keySet()) {\n logger.debug(\" - \" + threadId + \": \" + threadToTaskMap.get(threadId));\n }\n\n logger.debug(\"Inter-Task Traffic Stats (tuples sent per time slot): \");\n for (TaskPair pair : trafficStats.keySet()) {\n logger.debug(\" - \" + pair.getSourceTaskId() + \" -> \" + pair.getDestinationTaskId() + \": \" + getTraffic(pair) + \" tuple/s [\" + Utils.collectionToString(trafficStats.get(pair)) + \"]\");\n // invoke DataManager function to store Traffic info. 2018-05-08\n DataManager.getInstance().storeTraffic(topologyId, pair.getSourceTaskId(), pair.getDestinationTaskId(), getTraffic(pair));\n }\n\n logger.debug(\"Load stats (CPU cycles consumed per time slot): \");\n long totalCPUCyclesPerSecond = 0;\n for (long threadId : loadStats.keySet()) {\n List<Long> threadLoadInfo = loadStats.get(threadId);\n totalCPUCyclesPerSecond += threadLoadInfo.get(threadLoadInfo.size() - 1) / timeWindowLength;\n logger.debug(\" - thread \" + threadId + \": \" + getLoad(threadId) + \" cycle/s [\" + Utils.collectionToString(threadLoadInfo) + \"]\");\n\n Executor executor = threadToTaskMap.get(threadId);\n // invoke DataMananger to store load info. 2018-05-08\n DataManager.getInstance().storeCpuLoad(topologyId, executor.getBeginTask(), executor.getEndTask(), getLoad(threadId));\n\n }\n long totalCPUCyclesAvailable = CPUInfo.getInstance().getTotalSpeed();\n double usage = ((double) totalCPUCyclesPerSecond / totalCPUCyclesAvailable) * 100; // int -> double\n logger.debug(\"Total CPU cycles consumed per second: \" + totalCPUCyclesPerSecond + \", Total available: \" + totalCPUCyclesAvailable + \", Usage: \" + usage + \"%\");\n\n // add from yitian 2018-04-29\n logger.debug(\"Output the TaskMonitorList: \");\n for (TaskMonitor monitor : taskMonitorList) {\n logger.debug(\"- ProcessId: \" + monitor.getProcessId() + \" -> threadId: \" + monitor.getThreadId() + \" -> taskId: \" + monitor.getTaskId());\n }\n\n // 2018-09-27 add load usage of each host(worker node)\n /*\n Map<String, String> hostCpuUsageList = DataManager.getInstance().getCpuUsageOfHost();\n for (String hostname : hostCpuUsageList.keySet()) {\n FileUtils.writeToFile(cpuUsageFilename, hostname + \" : \" + hostCpuUsageList.get(hostname));\n }\n */\n logger.debug(\"------------------WORKER MONITOR SNAPSHOT END------------------\");\n }", "public void faitTonBoulot() throws AbortException {\n\t\tMessenger.setMaxProgress(10);\n\t\tfor( int i=0 ; i<15 ; i++ ) {\n\t\t\tMessenger.printMsg(Messenger.TRACE, \" blabla \" + i + \" \" + Thread.currentThread() + \" \" + Thread.currentThread().getState());\n\t\t\tif( (i%2) == 0 ) Messenger.diskAccess();\n\t\t\telse if( (i%3) == 0 ) Messenger.dbAccess();\n\t\t\telse if( (i%5) == 0 ) Messenger.procAccess();\n\t\t\t//\t\t\tif( i == 3) {int[] x = new int[0]; x[12] = 6;}\n\t\t\t//try {\n\t\t\tthis.processUserRequest();\n\t\t\tMessenger.setProgress(i);\n\t\t\t//\t\t\t} catch (AbortException e1) {\n\t\t\t//\t\t\t\treturn ;\n\t\t\t//\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(5000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tMessenger.printStackTrace(e);\n\t\t\t}\n\t\t}\n\t\tMessenger.noMoreAccess();\n\t}", "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 }", "@Test public void testRollingOnDemandStatsProducerTest() throws Exception{\n\t\tRollingOnDemandStatsProducer<ServiceStats> producer = new RollingOnDemandStatsProducer<ServiceStats>(\"id\", \"cat\", \"sub\", ServiceStatsFactory.DEFAULT_INSTANCE, 10);\n\t\t//11 iterations, we should only have 10 values afterwards, the first should be evicted.\n\t\tfor (int a = 0; a<11; a++){\n\t\t\tproducer.getStats(\"name\"+a).notifyRequestFinished();\n\t\t}\n\n\n\t\t//10 producer values + cumulated.\n\t\tassertEquals(10 + 1, producer.getStats().size());\n\t\tboolean found5 = false, found0 = false;\n\t\tfor (ServiceStats ss : producer.getStats()) {\n\t\t\tif (ss.getName().equals(\"name0\"))\n\t\t\t\tfound0 = true;\n\t\t\tif (ss.getName().equals(\"name5\"))\n\t\t\t\tfound5 = true;\n\t\t}\n\n\t\tassertTrue(\"We should have found the stats number 5\", found5);\n\t\tassertFalse(\"We should have found the stats number 5\", found0);\n\n\t\tlong sizeBeforeAdd = IntervalRegistry.getInstance().getInterval(\"1m\").getPrimaryListenerCount();\n\t\tproducer.getStats(\"StatsThatWeDidn'tHadYet\");\n\t\tlong sizeAfterAdd = IntervalRegistry.getInstance().getInterval(\"1m\").getPrimaryListenerCount();\n\t\tassertEquals(sizeBeforeAdd, sizeAfterAdd);\n\t}", "@Override\n public void run() {\n while (running) {\n try {\n if ((System.currentTimeMillis() - heartbeat) > 100 * threadWaiting) {\n if (cache.size() > 0) {\n logger.info(\"Long time no data entry, save the buffer(size:{}) to the database \", cache.size());\n flush();\n }\n }\n TimeUnit.MILLISECONDS.sleep(100 * threadWaiting);\n } catch (InterruptedException e) {\n logger.error(\" InterruptedException error :{}\", e);\n }\n }\n }", "private synchronized void sendDecreaceHealth(){\r\n\t\t\tfor(PrintWriter p : players){\r\n\t\t\t\tif(p != null){\r\n\t\t\t\t\tp.println(\"6\");\r\n\t\t\t\t\tp.println(Integer.toString(x));\r\n\t\t\t\t\tp.println(Integer.toString(y));\r\n\t\t\t\t\tp.flush();\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}", "public int loadBalance() {\r\n\t\tserverCount++;\r\n\t\tserverCount = (serverCount) % (servers.size());\r\n\t\treturn serverCount;\r\n\t}", "private static void compute_performances(Server server) {\n System.out.println(\"E[N]: Average number of packets in the buffer/queue: \" + round((double) runningBufferSizeCount / totalTicks));\n System.out.println(\"E[T]: Average sojourn time: \" + round((double) server.getTotalPacketDelay() / totalPackets + (double) serviceTime)\n + \"/packet\");\n System.out.println(\"P(idle): The proportion of time the server is idle: \"\n + round((double) server.getIdleServerCount() / totalTicks * 100) + \"%\");\n if (maxBufferSize >= 0) {\n System.out.println(\"P(loss): The packet loss probability: \" + round((double) droppedPacketCount / totalPackets * 100) + \"%\");\n }\n }", "@Postprocess\n public void getReport() {\n try {\n BufferedWriter bufferWriter = new BufferedWriter(new FileWriter(logfile, false));\n if (!results.isEmpty()) {\n bufferWriter.write(\"===========================================================\\n\");\n bufferWriter.write(\"sys_milli,\\t\\tdb_micro,\\t\\ttime_diff\\n\");\n Collections.sort(results);\n for (MysqlheartbeatBean mhb : results) {\n bufferWriter.write(String.valueOf(mhb.getSysMilli()) + \",\\t\\t\"\n + String.valueOf(mhb.getDbMicro()) + \",\\t\\t\"\n + String.valueOf(mhb.getDbMicro() - mhb.getSysMilli()) + \"\\n\");\n }\n bufferWriter.flush();\n }\n bufferWriter.close();\n } catch (IOException ex) {\n logger.log(Level.SEVERE, \"{0}: {1}\", new Object[]{toolName, ex.getMessage()});\n }\n }", "private void clearSeenServerToB() {\n if (rspCase_ == 19) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "@Override\n public void start(String[] parameters) throws Exception {\n int proccessId = TypesParser.safeParseInt(parameters[1]);\n boolean errorOccured = false;\n try {\n System.out.println(\"Cleaning ...\");\n String listName = parameters[2];\n String schema = listName.split(\"\\\\.\")[0];\n String table = listName.split(\"\\\\.\")[1];\n String type = table.split(\"_\")[0];\n String flag = table.split(\"_\")[1];\n String tablePrefix = table.replaceAll(flag + \"_\", \"\").replaceAll(type + \"_\", \"\");\n System.out.println(\"Table -> \" + table);\n int ispId = TypesParser.safeParseInt(parameters[3]);\n int userId = TypesParser.safeParseInt(parameters[4]);\n int serverId = parameters.length > 5 ? TypesParser.safeParseInt(parameters[5]) : 0;\n ArrayList<String> bouncesFiles = new ArrayList<String>();\n ArrayList<String> deliverdFiles = new ArrayList<String>();\n ArrayList<String> bounceLinesToRemove = new ArrayList<String>();\n ArrayList<String> deliverdLinesToRemove = new ArrayList<String>();\n String[] lineParts = new String[]{};\n int dropId = 0;\n int ipId = 0;\n int clientId = 0;\n int listId = 0;\n int bounceCleand = 0;\n int dileverdCleand = 0;\n boolean listCount = false;\n DataList list = (DataList)DataList.first(DataList.class, \"name = ?\", new Object[]{listName});\n if (list == null) throw new Exception(\"Data List : \" + listName + \" Does not Exists !\");\n if (list.id == 0) {\n throw new Exception(\"Data List : \" + listName + \" Does not Exists !\");\n }\n StatsCalculator controllerCalcul = new StatsCalculator();\n String[] args = new String[]{\"send_stats\", parameters[5]};\n controllerCalcul.start(args);\n if (TypesParser.safeParseInt(parameters[5]) != 0) {\n String logsFolder = new File(System.getProperty(\"base.path\")).getAbsolutePath() + File.separator + \"tmp\" + File.separator + \"pmta-logs\" + File.separator + \"server_\" + serverId;\n if (!new File(logsFolder).exists()) {\n this.interruptProccess(proccessId);\n errorOccured = true;\n return;\n }\n List filesInFolder = Files.walk(Paths.get(logsFolder, new String[0]), new FileVisitOption[0]).filter(x$0 -> Files.isRegularFile(x$0, new LinkOption[0])).map(Path::toFile).collect(Collectors.toList());\n for (int i = 0; i < filesInFolder.size(); ++i) {\n File pmtaFile = new File(((File)filesInFolder.get(i)).toString());\n if (pmtaFile == null || !pmtaFile.isFile()) continue;\n String[] abPath = pmtaFile.getAbsolutePath().split(File.separator);\n String FileType = abPath[7];\n if (FileType != null && FileType.equalsIgnoreCase(\"bounces\")) {\n bouncesFiles.add(pmtaFile.getAbsolutePath());\n }\n if (FileType == null || !FileType.equalsIgnoreCase(\"delivered\")) continue;\n deliverdFiles.add(pmtaFile.getAbsolutePath());\n }\n this.updateCount(listName);\n if (bouncesFiles != null && bouncesFiles.size() > 0) {\n List<String> lines = null;\n for (String bouncesFile : bouncesFiles) {\n File bounce = new File(bouncesFile);\n if (!bounce.isFile() || (lines = FileUtils.readLines(bounce)) == null || lines.isEmpty()) continue;\n for (String line : lines) {\n if (\"\".equals(line) || (lineParts = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1)).length != 12 || !\"hardbnc\".equalsIgnoreCase(lineParts[1]) || \"\".equalsIgnoreCase(lineParts[10])) continue;\n dropId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[0]);\n ipId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[1]);\n clientId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[2]);\n listId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[3]);\n if (listId != list.id) continue;\n Database.get(\"lists\").executeUpdate(\"DELETE FROM \" + listName + \" WHERE id = ?\", new Object[]{clientId}, 0);\n System.out.println(\"Deleitng Email ID -> \" + clientId + \" from list --> \" + listName);\n bounceLinesToRemove.add(line);\n ++bounceCleand;\n this.updateProccess(proccessId, \"bounce\");\n }\n }\n }\n if (deliverdFiles != null && deliverdFiles.size() > 0) {\n List<String> lines = null;\n for (String deliverdFile : deliverdFiles) {\n File deliver = new File(deliverdFile);\n if (!deliver.isFile() || (lines = FileUtils.readLines(deliver)) == null || lines.isEmpty()) continue;\n for (String line : lines) {\n if (\"\".equals(line) || (lineParts = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1)).length != 12 || !\"success\".equalsIgnoreCase(lineParts[1]) || \"\".equalsIgnoreCase(lineParts[10])) continue;\n dropId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[0]);\n ipId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[1]);\n clientId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[2]);\n listId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[3]);\n if (listId != list.id) continue;\n deliverdLinesToRemove.add(line);\n System.out.println(\"Email clean -> \" + clientId);\n ++dileverdCleand;\n this.updateProccess(proccessId, \"clean\");\n }\n }\n }\n if (bounceCleand <= 0) {\n if (bounceCleand <= 0) return;\n }\n String newName = \"clean_\" + flag + \"_\" + tablePrefix;\n Database.get(\"lists\").executeUpdate(\"ALTER TABLE \" + listName + \" RENAME TO \" + newName + \";\", new Object[0], 0);\n Database.get(\"master\").executeUpdate(\"UPDATE admin.data_lists SET name = '\" + schema + \".\" + newName + \"' WHERE id = ?\", new Object[]{list.id}, 0);\n if (bounceLinesToRemove != null && bounceLinesToRemove.size() > 0) {\n for (int i = 0; i < bounceLinesToRemove.size(); ++i) {\n System.out.println(\"Removing this line of bounce --> \" + (String)bounceLinesToRemove.get(i));\n }\n }\n if (deliverdLinesToRemove == null) return;\n if (deliverdLinesToRemove.size() <= 0) return;\n int i = 0;\n while (i < deliverdLinesToRemove.size()) {\n System.out.println(\"Removing this line of delevred --> \" + (String)deliverdLinesToRemove.get(i));\n ++i;\n }\n return;\n }\n System.out.println(\"Looking for all servers ... not yet ready ...\");\n return;\n }\n catch (Exception e) {\n this.interruptProccess(proccessId);\n Logger.error(e, dataclean.class);\n errorOccured = true;\n return;\n }\n finally {\n if (!errorOccured) {\n this.finishProccess(proccessId);\n }\n }\n }", "public int getSnapshotSize()throws DataSnapshotException{\r\n \tint backedupCount=0; \r\n \t try {\r\n \t\t// Enumeration names = ss.names();\r\n\t\t\tfor (Enumeration names = ss.names(); names.hasMoreElements();) {\r\n\t\t\t\tnames.nextElement();\r\n\t\t\t\tbackedupCount++;\r\n\t\t\t }\r\n\t\t}catch (SettingsStorageException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\t throw new DataSnapshotException(\"settings store failure\", e);\r\n\t\t}\r\n\t\treturn backedupCount;\r\n }", "public abstract void statsReset();", "public static void main (String [] args) throws Exception \r\n {\n runGC (); \r\n usedMemory (); \r\n // Array to keep strong references to allocated objects \r\n final int count = 10000000; \r\n// Object [] objects = new Object[count]; \r\n LinkedBlockingQueue<ShopBuyLog> list=new LinkedBlockingQueue<ShopBuyLog>();\r\n long heap1 = 0; \r\n // Allocate count+1 objects, discard the first one \r\n for (int i = -1; i < count; ++ i) \r\n { \r\n// \tObject object=null;\r\n \tShopBuyLog log = null; \r\n \r\n // Instantiate your data here and assign it to object \r\n \r\n \tlog = new ShopBuyLog (); \r\n \tlog.setCosttype(1);\r\n \tlog.setItems(\"{\\\"bind\\\":false,\\\"clazz\\\":\\\"com.game.backpack.structs.CommonGoods\\\",\\\"gridId\\\":0,\\\"id\\\":323117282203989,\\\"itemModelId\\\":-1,\\\"losttime\\\":0,\\\"num\\\":1080,\\\"packageId\\\":0}\");\r\n \tlog.setNpcid(Integer.MAX_VALUE);\r\n \tlog.setNum(Integer.MAX_VALUE);\r\n \tlog.setResume(Integer.MAX_VALUE);\r\n \tlog.setRoleid(Long.MAX_VALUE);\r\n \tlog.setRolelevel(Integer.MAX_VALUE);\r\n \tlog.setSellid(Integer.MAX_VALUE);\r\n// log.setTime(System.currentTimeMillis());\r\n// object=log;\r\n// object=log.buildSql();\r\n //object = new Integer (i); \r\n //object = new Long (i); \r\n// object = new String (); \r\n// object = new byte [128][1]; \r\n \r\n if (i >= 0) \r\n \tlist.add(log);\r\n else \r\n { \r\n \tlog = null; // Discard the warm up object \r\n// runGC (); \r\n heap1 = usedMemory (); // Take a before heap snapshot \r\n } \r\n } \r\n// runGC (); \r\n long heap2 = usedMemory (); // Take an after heap snapshot: \r\n \r\n final int size = Math.round (((float)(heap2 - heap1))/count); \r\n System.out.println (\"'before' heap: \" + heap1 + \r\n \", 'after' heap: \" + heap2); \r\n System.out.println (\"heap delta: \" + (heap2 - heap1) + \r\n \", {\" + ShopBuyLog.class.getSimpleName() + \"} size = \" + size + \" bytes\"); \r\n// for (int i = 0; i < count; ++ i) objects [i] = null; \r\n// objects = null; \r\n }", "@Override\n public void run() {\n long pocetak = 0;\n long kraj = 0;\n int pauza = Integer.parseInt(SlusacAplikacije.konfig.dajPostavku(\"sleep\"));\n while (!ServerSustava.isStop()) {\n pocetak = System.currentTimeMillis();\n if (!ServerSustava.isPauza()) {\n System.out.println(\"preuzimanje meteo podataka\");\n BazaPodataka bp = new BazaPodataka();\n List<Adresa> adrese = new ArrayList<Adresa>();\n adrese = bp.dohvatiAdrese();\n String apiKey = SlusacAplikacije.konfig.dajPostavku(\"apiKey\");\n OWMKlijent owmk = new OWMKlijent(apiKey);\n if (adrese != null) {\n for (Adresa a : adrese) {\n //System.out.println(\"adr: \" + a.getAdresa());\n MeteoPodaci mp = owmk.getRealTimeWeather(a.getGeoloc().getLatitude(), a.getGeoloc().getLongitude());\n bp.spremiMeteoPodatke(a.getAdresa(), mp);\n //System.out.println(\"Status: \" + a.getStatusPreuzimanja());\n if (a.getStatusPreuzimanja() == 0) {\n // System.out.println(\"update statusa!\");\n bp.statusPreuzimanjaPodataka(a.getAdresa());\n }\n }\n }\n }\n kraj = System.currentTimeMillis();\n long trajanjeObrade = kraj - pocetak;\n try {\n long spavanje = pauza * 1000;\n if (trajanjeObrade < spavanje) {\n sleep(spavanje - trajanjeObrade);\n }\n } catch (InterruptedException ex) {\n Logger.getLogger(MeteoPodaciPreuzimanje.class.getName()).log(Level.SEVERE, null, ex);\n break;\n }\n }\n }", "public abstract void sendGlobalStats(ResponseBuilder rb, ShardRequest outgoing);", "void resetPeakServerSocketCount();", "private void checkRequests()\n\t{\n\t\t// to be honest I don't see why this can't be 5 seconds, but I'm trying 1 second\n\t\t// now as the existing 0.1 second is crazy given we're checking for events that occur\n\t\t// at 60+ second intervals\n\n\t\tif ( mainloop_loop_count % MAINLOOP_ONE_SECOND_INTERVAL != 0 ){\n\n\t\t\treturn;\n\t\t}\n\n\t\tfinal long now =SystemTime.getCurrentTime();\n\n\t\t//for every connection\n\t\tfinal ArrayList peer_transports = peer_transports_cow;\n\t\tfor (int i =peer_transports.size() -1; i >=0 ; i--)\n\t\t{\n\t\t\tfinal PEPeerTransport pc =(PEPeerTransport)peer_transports.get(i);\n\t\t\tif (pc.getPeerState() ==PEPeer.TRANSFERING)\n\t\t\t{\n\t\t\t\tfinal List expired = pc.getExpiredRequests();\n\t\t\t\tif (expired !=null &&expired.size() >0)\n\t\t\t\t{ // now we know there's a request that's > 60 seconds old\n\t\t\t\t\tfinal boolean isSeed =pc.isSeed();\n\t\t\t\t\t// snub peers that haven't sent any good data for a minute\n\t\t\t\t\tfinal long timeSinceGoodData =pc.getTimeSinceGoodDataReceived();\n\t\t\t\t\tif (timeSinceGoodData <0 ||timeSinceGoodData >60 *1000)\n\t\t\t\t\t\tpc.setSnubbed(true);\n\n\t\t\t\t\t//Only cancel first request if more than 2 mins have passed\n\t\t\t\t\tDiskManagerReadRequest request =(DiskManagerReadRequest) expired.get(0);\n\n\t\t\t\t\tfinal long timeSinceData =pc.getTimeSinceLastDataMessageReceived();\n\t\t\t\t\tfinal boolean noData =(timeSinceData <0) ||timeSinceData >(1000 *(isSeed ?120 :60));\n\t\t\t\t\tfinal long timeSinceOldestRequest = now - request.getTimeCreated(now);\n\n\n\t\t\t\t\t//for every expired request \n\t\t\t\t\tfor (int j = (timeSinceOldestRequest >120 *1000 && noData) ? 0 : 1; j < expired.size(); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//get the request object\n\t\t\t\t\t\trequest =(DiskManagerReadRequest) expired.get(j);\n\t\t\t\t\t\t//Only cancel first request if more than 2 mins have passed\n\t\t\t\t\t\tpc.sendCancel(request);\t\t\t\t//cancel the request object\n\t\t\t\t\t\t//get the piece number\n\t\t\t\t\t\tfinal int pieceNumber = request.getPieceNumber();\n\t\t\t\t\t\tPEPiece\tpe_piece = pePieces[pieceNumber];\n\t\t\t\t\t\t//unmark the request on the block\n\t\t\t\t\t\tif ( pe_piece != null )\n\t\t\t\t\t\t\tpe_piece.clearRequested(request.getOffset() /DiskManager.BLOCK_SIZE);\n\t\t\t\t\t\t// remove piece if empty so peers can choose something else, except in end game\n\t\t\t\t\t\tif (!piecePicker.isInEndGameMode())\n\t\t\t\t\t\t\tcheckEmptyPiece(pieceNumber);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "public void upgradeStats()\n {\n reload-=1;\n damage*=2;\n range+=50;\n }", "public void showServerStats(double totalTime) {\n System.out.println(\"ServerID \" + \"Efficiency \" + \"CustomersServed \" + \"IdleTime \");\n for(int i = 0; i < cntServer; i++){\n serverArray[i].idleTime = totalTime - serverArray[i].busyTime;\n System.out.println(serverArray[i].toString());\n }\n }", "public void testGenerateBrokerVirtualhostAndConnectionStatistics() throws Exception\n {\n sendUsing(_test, 5, 200);\n Thread.sleep(1000);\n \n for (ManagedConnection mc : _jmxUtils.getManagedConnections(\"test\"))\n {\n assertEquals(\"Incorrect connection total\", 5, mc.getTotalMessagesReceived());\n assertEquals(\"Incorrect connection data\", 1000, mc.getTotalDataReceived());\n\t assertTrue(\"Connection statistics should be enabled\", mc.isStatisticsEnabled());\n }\n \n ManagedBroker vhost = _jmxUtils.getManagedBroker(\"test\");\n assertEquals(\"Incorrect vhost data\", 5, vhost.getTotalMessagesReceived());\n assertEquals(\"Incorrect vhost data\", 1000, vhost.getTotalDataReceived());\n assertTrue(\"Vhost statistics should be enabled\", vhost.isStatisticsEnabled());\n\n assertEquals(\"Incorrect server total messages\", 5, _jmxUtils.getServerInformation().getTotalMessagesReceived());\n assertEquals(\"Incorrect server total data\", 1000, _jmxUtils.getServerInformation().getTotalDataReceived());\n assertTrue(\"Server statistics should be enabled\", _jmxUtils.getServerInformation().isStatisticsEnabled());\n }", "void reportHeartbeat();", "public int onLoop() throws InterruptedException{\n \tif(inventory.isFull()) {\r\n\t\t\tinventory.dropAll(\"Logs\");\r\n\t\t\tsleep(random(2500,4000));\r\n\t\t\tshortTermAntiban();\r\n\t\t}else {\r\n\t\t\tcutTree();\r\n\t\t\tsleep(random(500,1000));\r\n\t\t}\r\n \t\r\n\r\n \t\r\n \t\r\n return 500;\r\n }", "public void checkStats() {\n try {\n if (this.screenId != null && this.screenModel != null) {\n AnalyticsUtil.sendStats(this, this.screenModel, this.screenType);\n }\n } catch (Exception e) {\n Crashlytics.logException(e);\n }\n }", "public void logic(){\n servers.sort(Comparator.comparing(Server::getSlotsTaken).reversed());\n servers.sort(Comparator.comparing(Server::getCapacity).reversed());\n\n slots = new Slot[rowsLength][slotsLength];\n for(int i=0;i<rowsLength;i++){\n for(int j=0;j<slotsLength;j++){\n slots[i][j] = new Slot(i, j);\n }\n }\n\n //Unavailable Slots\n for (Slot slot: unavailableSlots){\n slots[slot.getX()][slot.getY()].setAvailable(false);\n }\n\n\n //luam pe rand si verificam daca e liber randul si poolul\n nextServer:\n for (Server server: servers) {\n\n //line by line\n Map<Integer, Integer> linesPerformanceMap = new HashMap<>();\n Map<Integer, Integer> poolsPerformanceMap = new HashMap<>();\n\n //lines orderd by performance de la cel mai mic la cel mai mare\n for(int currentLine=0; currentLine<slots.length; currentLine++){\n linesPerformanceMap.put(currentLine, getServersPerformanceOfTheLine(slots[currentLine]));\n }\n linesPerformanceMap = linesPerformanceMap.entrySet().stream()\n .sorted(Map.Entry.<Integer, Integer>comparingByValue())\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n (e1, e2) -> e1, LinkedHashMap::new));\n\n //pool ordered by performance\n for(Pool pool: pools){\n poolsPerformanceMap.put(pool.getId(), getPoolPerformance(pool));\n }\n poolsPerformanceMap = poolsPerformanceMap.entrySet().stream()\n .sorted(Map.Entry.<Integer, Integer>comparingByValue())\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n (e1, e2) -> e1, LinkedHashMap::new));\n\n\n\n for (Map.Entry<Integer, Integer> linePerformance : linesPerformanceMap.entrySet()) {\n Integer line = linePerformance.getKey();\n\n for (int column = 0; column < slots[line].length; column++) {\n //slot available\n if (slots[line][column].isAvailable() && slots[line][column].getServer() == null) {\n //is space\n Integer slotsAvailable = getSlotsAvailable(line, column);\n if(slotsAvailable>=server.getSlotsTaken()){\n //add\n Pool pool = getPoolWithLessServersFromTheLine(poolsPerformanceMap, line);\n\n server.setSlot(slots[line][column]);\n pools.get(pool.getId()).getServers().add(server);\n server.setPool(pools.get(pool.getId()));\n slots[line][column].setOffset(true);\n for(int k=0; k<server.getSlotsTaken(); k++){\n slots[line][column+k].setAvailable(false);\n slots[line][column+k].setServer(server);\n }\n showSlots();\n\n continue nextServer;\n }\n }\n }\n }\n }\n\n\n System.out.println();\n }", "public void faitTonLongBoulotVerbeux() throws AbortException {\n\t\tMessenger.setMaxProgress(10);\n\t\tMessenger.printMsg(Messenger.TRACE, \"Init task !\");\n\t\tfor( int i=0 ; i<1000 ; i++ ) {\n\t\t\tMessenger.printMsg(Messenger.TRACE, \" blabla \" + i + \" \" + Thread.currentThread() + \" \" + Thread.currentThread().getState());\n\t\t\tif( (i%2) == 0 ) Messenger.diskAccess();\n\t\t\telse if( (i%3) == 0 ) Messenger.dbAccess();\n\t\t\telse if( (i%5) == 0 ) Messenger.procAccess();\n\t\t\tthis.processUserRequest();\n\t\t\ttry {\n\t\t\t\tThread.sleep(80);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tMessenger.printStackTrace(e);\n\t\t\t}\n\t\t\tMessenger.printMsg(Messenger.TRACE, \"This is a very very very very very long message in this sentence that has no real purpose, just in order to debug the applicant and improve it ! \");\n\t\t\ttry {\n\t\t\t\tThread.sleep(120);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tMessenger.printStackTrace(e);\n\t\t\t}\n\t\t\tMessenger.printMsg(Messenger.TRACE, \"Checkpoints n°\" + i);\n\t\t}\n\t\tMessenger.printMsg(Messenger.TRACE, \"End of task !\");\n\t\tMessenger.noMoreAccess();\n\t}", "public void buffTimer() {\r\n if (seconds - lastBuffCheck >= 1) {\r\n lastBuffCheck = seconds;\r\n for (int i = 0; i < buffs.size(); i++) {\r\n buffs.set(i, buffs.get(i)-1);\r\n if (buffs.get(i) <= 0) {\r\n buffs.remove(i);\r\n }\r\n }\r\n } else if (seconds < lastBuffCheck) {\r\n lastBuffCheck = 0;\r\n }\r\n }", "@Override\n public void transferred(long num) {\n publishProgress((int) ((num / (float) totalSize) * 100));\n }", "void check_and_send(){\r\n\t\twhile(not_ack_yet <= WINDOW_SIZE){\r\n\t\t\tif(covered_datagrams >= total_datagrams)\r\n\t\t\t\treturn;\r\n\t\t\t//send one data more\r\n\t\t\tcovered_datagrams++;\r\n\t\t\tbyte[] data_to_send = Helper.get_bytes(data_send,(covered_datagrams-1)*BLOCK_SIZE,BLOCK_SIZE);\r\n\t\t\tDataDatagram send = new DataDatagram((short)the_connection.session_num,\r\n\t\t\t\t\t(short)(covered_datagrams),data_to_send,the_connection);\r\n\t\t\tsend.send_datagram();\r\n\t\t\tput_and_set_timer(send);\r\n\t\t}\r\n\t}", "private int spreadWriteRequests() {\n return RANDOM.nextInt(MAX_SLEEP_TIME);\n }", "public void fullSync() {\n if (checkboxRepository.findOne(1).isCheckboxState()) {\n now = LocalDateTime.now();\n\n logger.info(\"De sync start\");\n long startTime = System.nanoTime();\n try {\n fillLocalDB.fillDb();\n smartschoolSync.ssSync();\n } catch (IOException e) {\n e.getStackTrace();\n logger.error(\"Error bij het uitvoeren van de sync\");\n } catch (MessagingException e) {\n logger.error(\"Error bij het verzenden van een mail tijdens de sync\");\n }\n logger.info(\"De sync is voltooid\");\n Statistic statistic = statisticRepository.findOne(1);\n statistic.setAantal(informatService.getTotaalAantalServerErrors());\n statisticRepository.save(statistic);\n informatService.setTotaalAantalServerErrors(0L);\n long endTime = System.nanoTime();\n long duration = (endTime - startTime) / 1000000; //milliseconds\n Statistic statisticDuration = statisticRepository.findOne(3);\n statisticDuration.setAantal(duration);\n statisticRepository.save(statisticDuration);\n Statistic statisticLastSync = statisticRepository.findOne(4);\n statisticLastSync.setError(String.valueOf(now));\n statisticRepository.save(statisticLastSync);\n }\n }", "private void handlePlayerConnect(Player player) {\n server.runTaskLater(() -> server.getPaymentLog().checkPendingAccepts(player), 1500, TimeUnit.MILLISECONDS);\n\n if (player.hasPermission(Rank.ADMIN)) {\n server.runTaskLater(() -> server.getDataSource().getCollection(\"archon\", \"dailytop\").count((result, t) -> {\n if (result == null) {\n result = 0L;\n }\n\n List<String> msg = new ArrayList<>();\n msg.add(\"&8\" + Message.BAR);\n msg.add(\"&6[&c&lArchon&6] &aProxy \" + player.getProxy().getId() + \" &7[\" + player.getRegion().name() + \" Network]\");\n msg.add(\"\");\n msg.add(\"&e[Today]\");\n int mostOnlineToday = server.getCache().getCurrentMostOnline();\n int uniqueLoginsToday = (int) (long) result;\n int newPlayersToday = server.getCache().getCurrentNewPlayers();\n\n try (Connection conn = server.getDataSource().getConnection();\n Statement stmt = conn.createStatement()) {\n // 1-day stats\n try (ResultSet rs = stmt.executeQuery(\"SELECT most_online, unique_logins, new_players FROM dailytop WHERE date = (SELECT MAX(date) FROM dailytop)\")) {\n if (rs.next()) {\n int mostOnlineYesterday = rs.getInt(\"most_online\");\n int uniqueLoginsYesterday = rs.getInt(\"unique_logins\");\n int newPlayersYesterday = rs.getInt(\"new_players\");\n\n double mostOnlineChange = Util.getPercentageChange(mostOnlineYesterday, mostOnlineToday);\n String disp = (mostOnlineChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(mostOnlineChange) + \"% &7from yesterday)\";\n msg.add(\"&7* &6Most Online: &d\" + Util.addCommas(mostOnlineToday) + \" \" + disp);\n\n double uniqueLoginsChange = Util.getPercentageChange(uniqueLoginsYesterday, uniqueLoginsToday);\n disp = (uniqueLoginsChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(uniqueLoginsChange) + \"% &7from yesterday)\";\n msg.add(\"&7* &6Unique Logins: &d\" + Util.addCommas(uniqueLoginsToday) + \" \" + disp);\n\n double newPlayersChange = Util.getPercentageChange(newPlayersYesterday, newPlayersToday);\n disp = (newPlayersChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(newPlayersChange) + \"% &7from yesterday)\";\n msg.add(\"&7* &6New Players: &d\" + Util.addCommas(newPlayersToday) + \" \" + disp);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n ZonedDateTime time = ZonedDateTime.now(ZoneId.of(\"America/Los_Angeles\"));\n msg.add(\"&e[From yesterday at this hour: \" + time.format(DateTimeFormatter.ofPattern(\"h a\")) + \" \" + time.getZone().getDisplayName(TextStyle.FULL, Locale.ENGLISH) + \"]\");\n // prev day (same hour) stats\n try (ResultSet rs = stmt.executeQuery(\"SELECT online, most_online, unique_logins, new_players FROM daily_stats WHERE DATE(time) = DATE(SUBDATE(UTC_TIMESTAMP, 1)) && HOUR(time) = HOUR(UTC_TIMESTAMP) LIMIT 1;\")) {\n if (rs.next()) {\n int onlineYesterday = rs.getInt(\"online\");\n int mostOnlineYesterday = rs.getInt(\"most_online\");\n int uniqueLoginsYesterday = rs.getInt(\"unique_logins\");\n int newPlayersYesterday = rs.getInt(\"new_players\");\n\n double currentOnlineChange = Util.getPercentageChange(onlineYesterday, server.getOnlineCount());\n String disp = (currentOnlineChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(currentOnlineChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3Online: &b\" + Util.addCommas(onlineYesterday) + \" \" + disp);\n\n double mostOnlineChange = Util.getPercentageChange(mostOnlineYesterday, mostOnlineToday);\n disp = (mostOnlineChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(mostOnlineChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3Most Online: &b\" + Util.addCommas(mostOnlineYesterday) + \" \" + disp);\n\n double uniqueLoginsChange = Util.getPercentageChange(uniqueLoginsYesterday, uniqueLoginsToday);\n disp = (uniqueLoginsChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(uniqueLoginsChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3Unique Logins: &b\" + Util.addCommas(uniqueLoginsYesterday) + \" \" + disp);\n\n double newPlayersChange = Util.getPercentageChange(newPlayersYesterday, newPlayersToday);\n disp = (newPlayersChange < 0 ? \"&7(&c\" : \"&7(&a+\") + format.format(newPlayersChange) + \"% &7from yesterday at this hour)\";\n msg.add(\"&7* &3New Players: &b\" + Util.addCommas(newPlayersYesterday) + \" \" + disp);\n } else {\n msg.add(\"&7&oNo data to display from this time.\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n msg.add(\"&8\" + Message.BAR);\n\n try (ResultSet rs = stmt.executeQuery(\"SELECT (SELECT COUNT(*) FROM votes) AS total, COUNT(*) AS today FROM votes WHERE DATE(time) = CURDATE();\")) {\n if (rs.next()) {\n msg.add(\"&aVotes Today: &7\" + Util.addCommas(rs.getInt(\"today\"))\n + \"&a, Total Votes: &7\" + Util.addCommas(rs.getInt(\"total\")) + \" (\" + Util.humanReadableNumber(rs.getInt(\"total\")) + \")\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n player.message(msg);\n }), 1, TimeUnit.SECONDS);\n }\n }", "private void swarmingPhase() {\n if (prevMaxTimestamp == -1 || client.player.getVs() == null) {\n return;\n }\n final Set<NodeAddress> fathers = ((GroupedOverlayModule<?>) mainOverlay).getNodeGroup(GroupedOverlayModule.fathersGroupName);\n final PrimeNodeReport alreadyRequested = new PrimeNodeReport();\n final Map<Long, Integer> howManyMissingDescriptions = new TreeMap<Long, Integer>();\n // TODO initialize, also, why in parameter and not as return value?\n initiateHowManyMissingDescriptions(howManyMissingDescriptions);\n for (final NodeAddress father : fathers) {\n if (!inboxHistory.keySet().contains(father)) {\n continue;\n }\n // Don't do swarming phase for nodes that didn't get any chunks yet.\n if (inboxHistory.get(father).getLatestTimestamp() <= client.player.getVs()\n .getAvailableDescriptions(client.player.getVs().windowOffset).getLatestTimestamp()) {\n final PrimeNodeReport availableDescriptionsAtFather = inboxHistory.get(father);\n PrimeNodeReport requestToSend = client.player.getVs().getMissingDescriptions().getIntersect(availableDescriptionsAtFather);\n requestToSend = alreadyRequested.getDelta(requestToSend);\n updateRequestAccordingThreshold(howManyMissingDescriptions, requestToSend);\n if (requestToSend.size() == 0) {\n continue;\n }\n requestToSend = requestToSend.getRandomSubset(client.player.getVs().windowOffset - 1, prevMaxTimestamp, r);\n if (requestToSend.size() != 0) {\n requestToSend.playTime = client.player.getVs().windowOffset;\n alreadyRequested.update(requestToSend);\n updateHowManyMissingDescriptions(howManyMissingDescriptions, requestToSend);\n network.send(new PrimeRequestMessage<PrimeNodeReport>(getMessageTag(), network.getAddress(), father, new PrimeNodeReport(\n requestToSend)));\n }\n }\n }\n }", "@Scheduled(fixedRate = 500)\n public void processStatisticsUntil() {\n List<Transaction> allByTimestampAfter = transactionRepository.findAllByTimestampAfter(Instant.now().toEpochMilli() - minuteInMillis);\n Statistics statistics = statisticsCache.getStatistics();\n DoubleSummaryStatistics amountSummaryStatistics = allByTimestampAfter.stream().mapToDouble(Transaction::getAmount).summaryStatistics();\n statistics.setAvg(amountSummaryStatistics.getAverage());\n statistics.setCount(amountSummaryStatistics.getCount());\n statistics.setMax(amountSummaryStatistics.getMax());\n statistics.setMin(amountSummaryStatistics.getMin());\n statistics.setSum(amountSummaryStatistics.getSum());\n log.debug(\"stats {} \", statistics);\n }", "void forceStats(long operations, long hits);", "protected static List<ServerInfo> computeLossesStepServer(Algo algo) {\n\t\t\n\t\t//final int numTotal = algo.problem.V;\n\t\t//final AtomicInteger processed = new AtomicInteger();\n\t\tExecutorService executor = Executors.newFixedThreadPool(Manu.NUM_THREADS); \n\t\t\n\t\tfinal List<ServerInfo> serverInfos = new ArrayList<ServerInfo>();\n\t\tfor(CacheServer cs : algo.servers) {\n\t\t\tif(cs.getSpaceTaken() > algo.problem.X) {\n\t\t\t\tServerInfo si = new ServerInfo(cs);\n\t\t\t\tserverInfos.add(si);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Spawn threads\n\t\tfor(final ServerInfo serverInfo : serverInfos) {\n\t\t\texecutor.execute(new Runnable(){\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//int numProcessed = processed.incrementAndGet();\n\t\t\t\t\t\t//if(numProcessed%100==0) logger.info(\"Computing gains \"+numProcessed+\"/\"+numTotal);\n\n\t\t\t\t\t\t// synchronized (anything) {}\n\t\t\t\t\t\t\n\t\t \t\t\tfor(int videoId : serverInfo.server.videos) {\n\t\t \t\t\t\t\n\t\t \t\t\t\tlong loss = Manu.computeLossOut(videoId, serverInfo.server, algo);\n\t\t \t\t\t\t\n\t\t \t\t\t\tfloat lossPerMegabyteFreed = loss*1f/algo.problem.videoSizes[videoId]; \n\t\t \t\t\t\t\n\t\t \t\t\t\t\n\t\t \t\t\t\tif(lossPerMegabyteFreed < serverInfo.tmpSmallestLossPerMegabyteFreed) {\n\t\t \t\t\t\t\tserverInfo.tmpBestVideoId = videoId;\n\t\t \t\t\t\t\tserverInfo.tmpSmallestLossPerMegabyteFreed = lossPerMegabyteFreed;\n\t\t \t\t\t\t\tserverInfo.tmpSmallestLoss = loss;\n\t\t \t\t\t\t}\n\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\tlogger.log(Level.WARNING, \"Failure computing losses, serverId: \" + serverInfo.server.serverId, e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\texecutor.shutdown();\n\t\t// Wait until all threads are finished\n\t\twhile (!executor.isTerminated()) {\n\t\t\ttry {\n\t\t\t\texecutor.awaitTermination(50, TimeUnit.MILLISECONDS);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t\t//logger.log(Level.INFO, \"Finished multithreaded comoutation of gains.\");\n\t\t\n\t\tCollections.sort(serverInfos, new Comparator<ServerInfo>() {\n\t\t public int compare(ServerInfo a, ServerInfo b) {\n\t\t \treturn Long.compare(a.tmpSmallestLoss, b.tmpSmallestLoss);\n\t\t \t//return Double.compare(a.tmpSmallestLossPerMegabyteFreed, b.tmpSmallestLossPerMegabyteFreed);\n\t\t }\n\t\t});\n\t\t\n\t\treturn serverInfos;\n\t}", "private void init() {\n\t\ttimer.schedule(new TimerTask() {\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tMessage msg=new Message();\n\t\t\t\tBundle bundle=new Bundle();\n\t\t\t\tbundle.putInt(\"percent\",(int) (100*downLoadFileSize/totalsize));\n\t\t\t\tmsg.setData(bundle);\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t\n\t\t\t}\n\t\t}, 0, 500);\n\t\t \n\t}", "protected void ping() {\n\t\tpingCount ++;\n\t\tif(pingCount > 5) {\n\t\t\tlog.debug(\"pingCount is exceed, so close this connection.\");\n\t\t\tclose();\n\t\t\treturn;\n\t\t}\n\t\tsendData(\"<ping />\");\n\t}", "public int our_packetsLost(){ //For a group call, should take an input ID, should be UPDATED\n return this.our_packs_lost;\n }", "public void refreshPacketStatistics() {\n\n\t\tint total = numIPSEC + numPPTP + numHTTPS + numSSH + numOthers;\n\t\tnumTotal = total;\n\t\tif (total == 0)\n\t\t\ttotal = 1;\n\t\tnumIPSECLabel.setText(\n\t\t\t\"IPSec Packets: \"\n\t\t\t\t+ numIPSEC\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (numIPSEC * 100 / total)\n\t\t\t\t+ \" % )\");\n\t\tnumPPTPLabel.setText(\n\t\t\t\"PPTP Packets: \"\n\t\t\t\t+ numPPTP\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (numPPTP * 100 / total)\n\t\t\t\t+ \" % )\");\n\t\tnumHTTPSLabel.setText(\n\t\t\t\"HTTPS Packets: \"\n\t\t\t\t+ numHTTPS\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (numHTTPS * 100 / total)\n\t\t\t\t+ \" % )\");\n\t\tnumSSHLabel.setText(\n\t\t\t\"SSH Packets: \"\n\t\t\t\t+ numSSH\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (numSSH * 100 / total)\n\t\t\t\t+ \" % )\");\n\t\tnumOthersLabel.setText(\n\t\t\t\"Other Packets: \"\n\t\t\t\t+ numOthers\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (numOthers * 100 / total)\n\t\t\t\t+ \" % )\");\n\t\tnumTotalLabel.setText(\n\t\t\t\"Total Packets: \"\n\t\t\t\t+ numTotal\n\t\t\t\t+ \" ( \"\n\t\t\t\t+ (numTotal * 100 / total)\n\t\t\t\t+ \" % )\");\n\t}", "public void processAppBatteryUsage() {\n create();\n\n SensorManager sensorManager = (SensorManager) mContext\n .getSystemService(Context.SENSOR_SERVICE);\n final int which = mStatsType;\n final int speedSteps = mPowerProfile.getNumSpeedSteps();\n final double[] powerCpuNormal = new double[speedSteps];\n final long[] cpuSpeedStepTimes = new long[speedSteps];\n for (int p = 0; p < speedSteps; p++) {\n powerCpuNormal[p] = mPowerProfile.getAveragePower(PowerProfile.POWER_CPU_ACTIVE, p);\n }\n final double averageCostPerByte = getAverageDataCost();\n long uSecTime = mStats.computeBatteryRealtime(SystemClock.elapsedRealtime() * 1000, which);\n long appWakelockTime = 0;\n // BatterySipper osApp = null;\n mStatsPeriod = uSecTime;\n SparseArray<? extends Uid> uidStats = mStats.getUidStats();\n final int NU = uidStats.size();\n for (int iu = 0; iu < NU; iu++) {\n Uid u = uidStats.valueAt(iu);\n double power = 0;\n double highestDrain = 0;\n String packageWithHighestDrain = null;\n //mUsageList.add(new AppUsage(u.getUid(), new double[] {power}));\n Map<String, ? extends BatteryStats.Uid.Proc> processStats = u.getProcessStats();\n long cpuTime = 0;\n long cpuFgTime = 0;\n long wakelockTime = 0;\n long gpsTime = 0;\n if (processStats.size() > 0) {\n // Process CPU time\n for (Map.Entry<String, ? extends BatteryStats.Uid.Proc> ent : processStats\n .entrySet()) {\n Log.print(\"Process name = \" + ent.getKey());\n Uid.Proc ps = ent.getValue();\n final long userTime = ps.getUserTime(which);\n final long systemTime = ps.getSystemTime(which);\n final long foregroundTime = ps.getForegroundTime(which);\n cpuFgTime += foregroundTime * 10; // convert to millis\n final long tmpCpuTime = (userTime + systemTime) * 10; // convert to millis\n int totalTimeAtSpeeds = 0;\n // Get the total first\n for (int step = 0; step < speedSteps; step++) {\n cpuSpeedStepTimes[step] = ps.getTimeAtCpuSpeedStep(step, which);\n totalTimeAtSpeeds += cpuSpeedStepTimes[step];\n }\n if (totalTimeAtSpeeds == 0)\n totalTimeAtSpeeds = 1;\n // Then compute the ratio of time spent at each speed\n double processPower = 0;\n for (int step = 0; step < speedSteps; step++) {\n double ratio = (double) cpuSpeedStepTimes[step] / totalTimeAtSpeeds;\n processPower += ratio * tmpCpuTime * powerCpuNormal[step];\n }\n cpuTime += tmpCpuTime;\n power += processPower;\n if (packageWithHighestDrain == null || packageWithHighestDrain.startsWith(\"*\")) {\n highestDrain = processPower;\n packageWithHighestDrain = ent.getKey();\n } else if (highestDrain < processPower && !ent.getKey().startsWith(\"*\")) {\n highestDrain = processPower;\n packageWithHighestDrain = ent.getKey();\n }\n }\n Log.print(\"Max drain of \" + highestDrain + \" by \" + packageWithHighestDrain);\n }\n if (cpuFgTime > cpuTime) {\n if (cpuFgTime > cpuTime + 10000) {\n Log.print(\"WARNING! Cputime is more than 10 seconds behind Foreground time\");\n }\n cpuTime = cpuFgTime; // Statistics may not have been gathered yet.\n }\n power /= 1000;\n\n // Process wake lock usage\n Map<String, ? extends BatteryStats.Uid.Wakelock> wakelockStats = u.getWakelockStats();\n for (Map.Entry<String, ? extends BatteryStats.Uid.Wakelock> wakelockEntry : wakelockStats\n .entrySet()) {\n Uid.Wakelock wakelock = wakelockEntry.getValue();\n // Only care about partial wake locks since full wake locks\n // are canceled when the user turns the screen off.\n BatteryStats.Timer timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_PARTIAL);\n if (timer != null) {\n wakelockTime += timer.getTotalTimeLocked(uSecTime, which);\n }\n }\n wakelockTime /= 1000; // convert to millis\n appWakelockTime += wakelockTime;\n\n // Add cost of holding a wake lock\n power += (wakelockTime * mPowerProfile.getAveragePower(PowerProfile.POWER_CPU_AWAKE)) / 1000;\n\n // Add cost of data traffic\n long tcpBytesReceived = u.getTcpBytesReceived(mStatsType);\n long tcpBytesSent = u.getTcpBytesSent(mStatsType);\n power += (tcpBytesReceived + tcpBytesSent) * averageCostPerByte;\n\n // Add cost of keeping WIFI running.\n long wifiRunningTimeMs = u.getWifiRunningTime(uSecTime, which) / 1000;\n mAppWifiRunning += wifiRunningTimeMs;\n power += (wifiRunningTimeMs * mPowerProfile.getAveragePower(PowerProfile.POWER_WIFI_ON)) / 1000;\n\n // Process Sensor usage\n Map<Integer, ? extends BatteryStats.Uid.Sensor> sensorStats = u.getSensorStats();\n for (Map.Entry<Integer, ? extends BatteryStats.Uid.Sensor> sensorEntry : sensorStats\n .entrySet()) {\n Uid.Sensor sensor = sensorEntry.getValue();\n int sensorType = sensor.getHandle();\n BatteryStats.Timer timer = sensor.getSensorTime();\n long sensorTime = timer.getTotalTimeLocked(uSecTime, which) / 1000;\n double multiplier = 0;\n switch (sensorType) {\n case Uid.Sensor.GPS:\n multiplier = mPowerProfile.getAveragePower(PowerProfile.POWER_GPS_ON);\n gpsTime = sensorTime;\n break;\n default:\n android.hardware.Sensor sensorData = sensorManager.getDefaultSensor(sensorType);\n if (sensorData != null) {\n multiplier = sensorData.getPower();\n Log.print(\"Got sensor \" + sensorData.getName() + \" with power = \"\n + multiplier);\n }\n }\n power += (multiplier * sensorTime) / 1000;\n }\n\n // Log.print(\"UID \" + u.getUid() + \": power=\" + power);\n Log.print(\"PACKAGE \" + packageWithHighestDrain + \": power=\" + power);\n\n // // Add the app to the list if it is consuming power\n // if (power != 0 || u.getUid() == 0) {\n // BatterySipper app = new BatterySipper(getActivity(), mRequestQueue, mHandler,\n // packageWithHighestDrain, DrainType.APP, 0, u,\n // new double[] {power});\n // app.cpuTime = cpuTime;\n // app.gpsTime = gpsTime;\n // app.wifiRunningTime = wifiRunningTimeMs;\n // app.cpuFgTime = cpuFgTime;\n // app.wakeLockTime = wakelockTime;\n // app.tcpBytesReceived = tcpBytesReceived;\n // app.tcpBytesSent = tcpBytesSent;\n // if (u.getUid() == Process.WIFI_UID) {\n // mWifiSippers.add(app);\n // } else if (u.getUid() == Process.BLUETOOTH_GID) {\n // mBluetoothSippers.add(app);\n // } else {\n // mUsageList.add(app);\n // }\n // if (u.getUid() == 0) {\n // osApp = app;\n // }\n // }\n // if (u.getUid() == Process.WIFI_UID) {\n // mWifiPower += power;\n // } else if (u.getUid() == Process.BLUETOOTH_GID) {\n // mBluetoothPower += power;\n // } else {\n // if (power > mMaxPower) mMaxPower = power;\n // mTotalPower += power;\n // }\n // if (DEBUG) Log.i(TAG, \"Added power = \" + power);\n }\n\n // The device has probably been awake for longer than the screen on\n // time and application wake lock time would account for. Assign\n // this remainder to the OS, if possible.\n // if (osApp != null) {\n // long wakeTimeMillis = mStats.computeBatteryUptime(\n // SystemClock.uptimeMillis() * 1000, which) / 1000;\n // wakeTimeMillis -= appWakelockTime - (mStats.getScreenOnTime(\n // SystemClock.elapsedRealtime(), which) / 1000);\n // if (wakeTimeMillis > 0) {\n // double power = (wakeTimeMillis\n // * mPowerProfile.getAveragePower(PowerProfile.POWER_CPU_AWAKE)) / 1000;\n // osApp.wakeLockTime += wakeTimeMillis;\n // osApp.value += power;\n // osApp.values[0] += power;\n // if (osApp.value > mMaxPower) mMaxPower = osApp.value;\n // mTotalPower += power;\n // }\n // }\n }", "private void clearStats() {\n stats_ = emptyProtobufList();\n }", "public static void resetStatistics()\r\n {\r\n \t//System.out.println ( \"Resetting statistics\");\r\n count_ = 0; \r\n }", "public static void m2532a(Context context) {\n try {\n if (StatisticsManager.m2541g(context)) {\n StringBuffer stringBuffer = new StringBuffer();\n stringBuffer.append(new SimpleDateFormat(\"yyyyMMdd HHmmss\").format(new Date()));\n stringBuffer.append(\" \");\n stringBuffer.append(UUID.randomUUID().toString());\n stringBuffer.append(\" \");\n if (stringBuffer.length() == 53) {\n byte[] a = Utils.m2515a(stringBuffer.toString());\n byte[] b = StatisticsManager.m2536b(context);\n byte[] bArr = new byte[(a.length + b.length)];\n System.arraycopy(a, 0, bArr, 0, a.length);\n System.arraycopy(b, 0, bArr, a.length, b.length);\n BaseNetManager.m2800a().mo9415b(new LogUpdateRequest(Utils.m2520c(bArr), \"2\"));\n }\n }\n } catch (AMapCoreException e) {\n BasicLogHandler.m2542a(e, \"StatisticsManager\", \"updateStaticsData\");\n } catch (Throwable e2) {\n BasicLogHandler.m2542a(e2, \"StatisticsManager\", \"updateStaticsData\");\n }\n }", "public int getCount(){\r\n\t\tif(_serverinfo != null){\r\n\t\t\treturn _serverinfo.length / 6;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public static void battery1(SetInterface session, String[] argv) throws Exception {\n\t\tlong tims = System.currentTimeMillis();\n\t\tfor(int i = max-1; i >= min; i--) {\n\t\t\tbigtestx b = new bigtestx();\n\t\t\tb.init(i, payloadSize);\n\t\t\tsession.put(b);\n\t\t}\n\t\tlong ms = System.currentTimeMillis();\n\t\tSystem.out.println(\"Added \"+i+\" in \"+(System.currentTimeMillis()-ms)+\"ms.\");\n\t\t System.out.println(\"BATTERY1 SUCCESS in \"+(System.currentTimeMillis()-tims)+\" ms.\");\n\t}", "@Ignore(\"Google's LRU map max size is not predictable\")\n\t@Override\n\tpublic void statsTest()\n\t{\n\t}", "private void msgNoServerConnection() {\r\n\thandler.sendEmptyMessage(1); // enviar error al cargar\r\n }", "int getHeartRate();", "public static void main(String[] args) throws IOException, InterruptedException { HttpGet getIndex = new HttpGet(\"http://www.moswar.ru/\");\n//\n// HttpResponse indexResponse = client.execute(getIndex);\n//\n// System.out.println(indexResponse.getStatusLine());\n// System.out.println(indexResponse.toString());\n//\n//\n\n JSONObject data;\n\n login(\"[email protected]\",\"`1\");\n\n index();\n\n blackJackIndex();\n\n data = newBet(Bet.random());\n\n\n String mySumm = null;\n String myHand = getMyHand(data);\n if (!myHand.contains(\"A\"))\n mySumm = getMySumm(data);\n String dealerHand = getDealerHand(data);\n\n int i = 0;\n\n all:\n while(i < 100){\n //TODO if \"check\" right or left winner or looser - new game - alternative - check if > 21 then new game\n if (mySumm != null && Integer.parseInt(mySumm) > 17){\n ++i;\n if (Integer.parseInt(mySumm) <= 21)\n endGame(stand());\n else System.out.println(\"Dealer WIN\");\n data = newBet(Bet.random());\n myHand = getMyHand(data);\n mySumm = null;\n if (!myHand.contains(\"A\"))\n mySumm = getMySumm(data);\n dealerHand = getDealerHand(data);\n }\n else{\n switch (Answer.getTurn(myHand, dealerHand)){\n case \"S\": //STAND\n ++i;\n endGame(stand());\n\n// break all;\n data = newBet(Bet.random());\n myHand = getMyHand(data);\n mySumm = null;\n if (!myHand.contains(\"A\"))\n mySumm = getMySumm(data);\n dealerHand = getDealerHand(data);\n break;\n case \"H\": //HIT\n data = more();\n mySumm = getMyNextSumm(data);\n myHand = mySumm;\n break;\n case \"D\": //DOUBLE\n //TODO check if can double\n if (checkDouble(data)){\n data = doubleBet();\n mySumm = getMyNextSumm(data);\n myHand = mySumm;\n }else{\n data = more();\n mySumm = getMyNextSumm(data);\n myHand = mySumm;\n }\n break;\n case \"P\": //SPLIT\n data = more();\n mySumm = getMyNextSumm(data);\n myHand = mySumm;\n break;\n default:\n break;\n }\n\n }\n }\n\n client.getConnectionManager().shutdown();\n out.close();\n }", "public static void main(String[] args) throws InterruptedException {\n\n Random random = new Random();\n RateLimitingVOne rateLimiter = new RateLimitingVOne();\n UUID userId = UUID.randomUUID();\n\n List<Request> allRequests = new ArrayList<>();\n\n long start = System.currentTimeMillis();\n for (int i = 1; i < 100; i++) {\n int count = random.nextInt(10);\n Request nr = new Request(count> 0 ? count : 1, System.currentTimeMillis(), i);\n allRequests.add(nr);\n rateLimiter.handleNewRequest(nr, userId);\n// sleep(random.nextInt(350));\n sleep(250);\n }\n\n long elapsed = System.currentTimeMillis() - start;\n\n System.out.println(\"Time ---- >> \"+ elapsed);\n\n for (Request tr : allRequests) {\n long since = (tr.timestamp - start);\n int count = tr.isRejected ? -tr.requestsCount : tr.requestsCount;\n System.out.println(tr.sequence+\", \"+ since + \" , \" + count);\n }\n\n\n Request r = rateLimiter.userRequestLog.get(userId);\n int count =0;\n while (r.previous != null) {\n count++;\n r = r.previous;\n }\n\n System.out.println(count);\n\n\n }", "long getCacheMisses();", "private void updateNetworkSpeed() {\n Message obtain = Message.obtain();\n obtain.what = 200000;\n long j = 0;\n if (isDemoOrDrive() || this.mDisabled || !this.mIsNetworkConnected) {\n obtain.arg1 = 0;\n this.mHandler.removeMessages(200000);\n this.mHandler.sendMessage(obtain);\n this.mLastTime = 0;\n this.mTotalBytes = 0;\n return;\n }\n long currentTimeMillis = System.currentTimeMillis();\n long totalByte = getTotalByte();\n if (totalByte == 0) {\n this.mLastTime = 0;\n this.mTotalBytes = 0;\n totalByte = getTotalByte();\n }\n long j2 = this.mLastTime;\n if (j2 != 0 && currentTimeMillis > j2) {\n long j3 = this.mTotalBytes;\n if (!(j3 == 0 || totalByte == 0 || totalByte <= j3)) {\n j = ((totalByte - j3) * 1000) / (currentTimeMillis - j2);\n }\n }\n obtain.arg1 = 1;\n obtain.obj = Long.valueOf(j);\n this.mHandler.removeMessages(200000);\n this.mHandler.sendMessage(obtain);\n this.mLastTime = currentTimeMillis;\n this.mTotalBytes = totalByte;\n postUpdateNetworkSpeedDelay((long) this.mNetworkUpdateInterval);\n }", "private void sendTrafficSummary() {\n\t\ttry {\n\t\t\tregistry.getSender().sendData(\n\t\t\t\t\tnew OverlayNodeReportsTrafficSummary(myAssignedID,\n\t\t\t\t\t\t\tsendTracker, relayTracker, sendSummation,\n\t\t\t\t\t\t\treceiveTracker, receiveSummation).getBytes());\n\t\t\tthis.sendTracker = 0; // reset all counters after reporting\n\t\t\tthis.relayTracker = 0;\n\t\t\tthis.receiveTracker = 0;\n\t\t\tthis.sendSummation = 0;\n\t\t\tthis.receiveSummation = 0;\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble reporting traffic summary or closing sockets.\");\n\t\t}\n\t}", "public void saveStats() {\n this.saveStats(null);\n }", "private static boolean m2541g(Context context) {\n try {\n if (C0820dq.m2439m(context) != 1 || !f1840a || StatisticsManager.m2538d(context) < 100) {\n return false;\n }\n long f = StatisticsManager.m2540f(context);\n long time = new Date().getTime();\n if (time - f < 3600000) {\n return false;\n }\n StatisticsManager.m2533a(context, time);\n f1840a = false;\n return true;\n } catch (Throwable th) {\n BasicLogHandler.m2542a(th, \"StatisticsManager\", \"isUpdate\");\n return false;\n }\n }", "public void crunch(){\n cpuBurstTime--;\n rem--;\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tMessage msg=new Message();\n\t\t\t\tBundle bundle=new Bundle();\n\t\t\t\tbundle.putInt(\"percent\",(int) (100*downLoadFileSize/totalsize));\n\t\t\t\tmsg.setData(bundle);\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t\n\t\t\t}", "public void statistics(){\n\t\tSystem.out.println(\"heads: \"+ heads+\"\\ttails: \"+tails);\n\t\t\n\t}", "public void sendHeartbeat();", "long getEvictions();", "void stampaStatisticheNodo() {\r\n for(Object obj : this.nodes)\r\n {\r\n Nodo n = (Nodo)obj;\r\n \r\n TransportLayer tl = n.myTransportLayer;\r\n tl.stampaStatistiche();\r\n \r\n // System.out.println(\"=====STAMPA STATISTICHE NODO NETWORK LAYER====\");\r\n NetworkLayer nl = n.myNetLayer;\r\n // String s = nl.getStat();\r\n nl.stampaStatistiche();\r\n // System.out.println(s);\r\n // System.out.println(\"=====FINE====\");\r\n \r\n physicalLayer pl = n.myPhyLayer;\r\n pl.stampaStatistiche();\r\n }\r\n }", "public static void battery2(BufferedHashSet session, String[] argv) throws Exception {\n\t\tlong tims = System.currentTimeMillis();\n\t\tStack s = new Stack();\n\t\tTraversalStackElement tse = new TraversalStackElement(null, 0,0);\n\t\tbigtestx f = (bigtestx) session.first(tse,s);\n\t\tbigtestx l = (bigtestx) session.last(tse,s);\n\t\tSystem.out.println(\"BATTERY2 SUCCESS \"+f+\",\"+l+\" in \"+(System.currentTimeMillis()-tims)+\" ms.\");\n\t}", "public void computeStats() {\n\t\tstats = new Stats();\t\t\n\t}", "public void offerService() throws Exception {\n \n long lastHeartbeat = 0, lastBlockReport = 0;\n LOG.info(\"using BLOCKREPORT_INTERVAL of \" + blockReportInterval + \"msec\");\n\n //\n // Now loop for a long time....\n //\n\n while (shouldRun) {\n try {\n long now = System.currentTimeMillis();\n\n //\n // Every so often, send heartbeat or block-report\n //\n if (now - lastHeartbeat > heartBeatInterval) {\n //\n // All heartbeat messages include following info:\n // -- Datanode name\n // -- data transfer port\n // -- Total capacity\n // -- Bytes remaining\n //\n BlockCommand cmd = namenode.sendHeartbeat(dnRegistration, \n data.getCapacity(), \n data.getRemaining(), \n xmitsInProgress,\n xceiverCount.getValue());\n //LOG.info(\"Just sent heartbeat, with name \" + localName);\n lastHeartbeat = now;\n\n if( cmd != null ) {\n data.checkDataDir();\n switch( cmd.action ) {\n case DNA_TRANSFER:\n //\n // Send a copy of a block to another datanode\n //\n transferBlocks( cmd.getBlocks(), cmd.getTargets() );\n break;\n case DNA_INVALIDATE:\n //\n // Some local block(s) are obsolete and can be \n // safely garbage-collected.\n //\n Block toDelete[] = cmd.getBlocks();\n data.invalidate(toDelete);\n myMetrics.removedBlocks(toDelete.length);\n break;\n case DNA_SHUTDOWN:\n // shut down the data node\n this.shutdown();\n continue;\n case DNA_REPORT:\n // namenode requested a block report; sending\n lastBlockReport = 0;\n break;\n default:\n LOG.warn( \"Unknown BlockCommand action: \" + cmd.action);\n }\n }\n }\n \n // send block report\n if (now - lastBlockReport > blockReportInterval) {\n // before send block report, check if data directory is healthy\n data.checkDataDir();\n \n //\n // Send latest blockinfo report if timer has expired.\n // Get back a list of local block(s) that are obsolete\n // and can be safely GC'ed.\n //\n Block toDelete[] = namenode.blockReport(dnRegistration,\n data.getBlockReport());\n data.invalidate(toDelete);\n lastBlockReport = now;\n continue;\n }\n \n // check if there are newly received blocks\n Block [] blockArray=null;\n synchronized( receivedBlockList ) {\n if (receivedBlockList.size() > 0) {\n //\n // Send newly-received blockids to namenode\n //\n blockArray = (Block[]) receivedBlockList.toArray(new Block[receivedBlockList.size()]);\n }\n }\n if( blockArray != null ) {\n namenode.blockReceived( dnRegistration, blockArray );\n synchronized (receivedBlockList) {\n for(Block b: blockArray) {\n receivedBlockList.remove(b);\n }\n }\n }\n \n //\n // There is no work to do; sleep until hearbeat timer elapses, \n // or work arrives, and then iterate again.\n //\n long waitTime = heartBeatInterval - (System.currentTimeMillis() - lastHeartbeat);\n synchronized( receivedBlockList ) {\n if (waitTime > 0 && receivedBlockList.size() == 0) {\n try {\n receivedBlockList.wait(waitTime);\n } catch (InterruptedException ie) {\n }\n }\n } // synchronized\n } catch(DiskErrorException e) {\n handleDiskError(e.getLocalizedMessage());\n return;\n } catch( RemoteException re ) {\n String reClass = re.getClassName();\n if( UnregisteredDatanodeException.class.getName().equals( reClass )) {\n LOG.warn( \"DataNode is shutting down: \" + \n StringUtils.stringifyException(re));\n shutdown();\n return;\n }\n LOG.warn(StringUtils.stringifyException(re));\n } catch (IOException e) {\n LOG.warn(StringUtils.stringifyException(e));\n }\n } // while (shouldRun)\n }", "public Stats() {\n numIn = 0;\n numOut = 0;\n totTimeWait = 0;\n totTime = 0;\n }", "public void run() {\r\n\t\t\tthis.setName(\"Vista.CacheUploaderDaemon\");\r\n\t\t\tint frac = 0;\r\n\t\t\tint prog = 0; // Progreso de la cola\r\n\t\t\twhile (alive) {\r\n\t\t\t\tif (!colaEscritura.isEmpty()) {\r\n\t\t\t\t\tfrac = 100/colaEscritura.size();\r\n\t\t\t\t\tprog = 0;\r\n\t\t\t\t}\r\n\t\t\t\twhile (!colaEscritura.isEmpty()) {\r\n\t\t\t\t\tsetProgreso(\"Actualizando base de datos\", prog);\r\n\t\t\t\t\tprog+=frac;\r\n\t\t\t\t\tElementoCache e = colaEscritura.poll();\r\n\t\t\t\t\tif (e.i==INSERTAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Empleado\" ))\t\tinsertEmpleadoBD((Empleado) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Cuadrante\"))\t\tcontrolador.insertCuadrante((Cuadrante) e.o.get(0)); \t\t\t\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"TurnoContrato\"))\tcontrolador.insertTurnoPorContrato((Integer)e.o.get(0), (Integer)e.o.get(1));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Sugerencia\"))\t\tcontrolador.insertSugerencia((Sugerencia)e.o.get(0));\r\n//\t\t\t\t\t\telse if (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.insertContrato((Contrato) e.o.get(0));\r\n\t\t\t\t\t\t/*else if (e.tipo.equals(\"Departamento\"))\t\tcontrolador.insertDepartamento((Departamento)e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"CrearDepartamento\")){ \tcontrolador.insertDepartamentoUsuario((Integer)e.o.get(2),e.o.get(0).toString()); //tabla DepartamentoUsuario\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.insertNumerosDepartamento((Integer)e.o.get(1),e.o.get(0).toString()); //tabla NumerosDEPARTAMENTOs\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.insertDepartamentoPruebas(e.o.get(0).toString(),(Integer)e.o.get(2)); //tabla DEPARTAMENTO\r\n\t\t\t\t\t\t}*/\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Insertar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (e.i==ELIMINAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.eliminaContrato((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Turno\"))\t\t\tcontrolador.eliminaTurno((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"ContratoConTurnos\"))\tcontrolador.eliminaContratoConTurnos((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Empleado\"))\t\t\tcontrolador.eliminaEmpleado((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"eliminaMesTrabaja\")) {\r\n\t\t\t\t\t\t\tArrayList<Object> ar = (ArrayList<Object>)e.o.get(0);\r\n\t\t\t\t\t\t\tcontrolador.eliminaMesTrabaja((Integer)ar.get(0),(Integer)ar.get(1),(Integer)ar.get(2),ar.get(3).toString());\r\n\t\t\t\t\t\t}else if (e.tipo.equals(\"eliminaTurnoDeContrato\")){\r\n\t\t\t\t\t\t\tArrayList<Object> aux = (ArrayList<Object>)e.o.get(0);\r\n\t\t\t\t\t\t\tcontrolador.eliminaTurnoDeContrato((Integer)aux.get(0),(Integer)aux.get(1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Eliminar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(e.i==MODIFICAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.modificarContrato(((Contrato)e.o.get(0)).getNumeroContrato(), ((Contrato)e.o.get(0)).getTurnoInicial(), ((Contrato)e.o.get(0)).getNombreContrato(), ((Contrato)e.o.get(0)).getPatron() , ((Contrato)e.o.get(0)).getDuracionCiclo(), ((Contrato)e.o.get(0)).getSalario(), ((Contrato)e.o.get(0)).getTipoContrato());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Turno\"))\t\t\tcontrolador.modificarTurno(((Turno)e.o.get(0)).getIdTurno(), ((Turno)e.o.get(0)).getDescripcion(), ((Turno)e.o.get(0)).getHoraEntrada(), ((Turno)e.o.get(0)).getHoraSalida(), ((Turno)e.o.get(0)).getHoraDescanso(), ((Turno)e.o.get(0)).getTDescanso(),((Turno)e.o.get(0)).getColor());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Empleado\"))\t\t\tcontrolador.cambiarEmpleado(((Empleado)e.o.get(0)).getEmplId(), ((Empleado)e.o.get(0)).getNombre(), ((Empleado)e.o.get(0)).getApellido1(), ((Empleado)e.o.get(0)).getApellido2(), ((Empleado)e.o.get(0)).getFechaNac(), ((Empleado)e.o.get(0)).getSexo(), ((Empleado)e.o.get(0)).getEmail(), ((Empleado)e.o.get(0)).getPassword(), ((Empleado)e.o.get(0)).getGrupo(), ((Empleado)e.o.get(0)).getFcontrato(), ((Empleado)e.o.get(0)).getFAlta(), ((Empleado)e.o.get(0)).getFelicidad(), ((Empleado)e.o.get(0)).getIdioma(), ((Empleado)e.o.get(0)).getRango(), ((Empleado)e.o.get(0)).getTurnoFavorito(), ((Empleado)e.o.get(0)).getColor(),((Empleado)e.o.get(0)).getContratoId(), ((Empleado)e.o.get(0)).getPosicion());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Mensaje\"))\t\t\tcontrolador.marcarMensaje((Mensaje)e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"MensajeLeido\"))\t\tcontrolador.setLeido((Mensaje)e.o.get(0));\r\n\t\t\t\t\t\t//else if (e.tipo.equals(\"JefeDepartamento\"))\tcontrolador.modificaDpto(((Departamento)e.o.get(0)).getNombreDepartamento(), ((Departamento)e.o.get(0)).getJefeDepartamento().getEmplId()); \r\n\t\t\t\t\t\telse if (e.tipo.equals(\"NombreDepartamento\")){controlador.cambiaNombreDpto(((ArrayList<String>)e.o.get(0)).get(0),((ArrayList<String>)e.o.get(0)).get(1));}//nombre antiguo,nombre nuevo\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.cambiaNombreDepartamentoUsuario(e.o.get(0).toString(),e.o.get(1).toString());\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.cambiaNombreNumerosDEPARTAMENTOs(e.o.get(0).toString(),e.o.get(1).toString());\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Trabaja\"))\t\t\tcontrolador.modificaTrabaja(((Trabaja)e.o.get(0)).getIdEmpl(), ((Trabaja)e.o.get(0)).getIdTurno(), (String)e.o.get(1));\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Modificar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsetProgreso(\"Actualizando base de datos\", 100);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsleep(1000);\r\n\t\t\t\t} catch (Exception e) {};\r\n\t\t\t}\r\n\t\t}", "private void checkSpeedAndReserved()\n\t{\n\t\t// only check every 5 seconds\n\t\tif(mainloop_loop_count % MAINLOOP_FIVE_SECOND_INTERVAL != 0)\n\t\t\treturn;\n\n\t\tfinal int\t\t\t\tnbPieces\t=_nbPieces;\n\t\tfinal PEPieceImpl[] pieces =pePieces;\n\t\t//for every piece\n\t\tfor (int i =0; i <nbPieces; i++)\n\t\t{\n\t\t\t// placed before null-check in case it really removes a piece\n\t\t\tcheckEmptyPiece(i);\n\n\n\t\t\tfinal PEPieceImpl pePiece =pieces[i];\n\t\t\t// these checks are only against pieces being downloaded\n\t\t\t// yet needing requests still/again\n\t\t\tif (pePiece !=null)\n\t\t\t{\n\t\t\t\tfinal long timeSinceActivity =pePiece.getTimeSinceLastActivity()/1000;\t\t\t\t\n\n\t\t\t\tint pieceSpeed =pePiece.getSpeed();\n\t\t\t\t// block write speed slower than piece speed\n\t\t\t\tif (pieceSpeed > 0 && timeSinceActivity*pieceSpeed*0.25 > DiskManager.BLOCK_SIZE/1024)\n\t\t\t\t{\n\t\t\t\t\tif(pePiece.getNbUnrequested() > 2)\n\t\t\t\t\t\tpePiece.setSpeed(pieceSpeed-1);\n\t\t\t\t\telse\n\t\t\t\t\t\tpePiece.setSpeed(0);\n\t\t\t\t}\n\n\n\t\t\t\tif(timeSinceActivity > 120)\n\t\t\t\t{\n\t\t\t\t\tpePiece.setSpeed(0);\n\t\t\t\t\t// has reserved piece gone stagnant?\n\t\t\t\t\tfinal String reservingPeer =pePiece.getReservedBy();\n\t\t\t\t\tif(reservingPeer !=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal PEPeerTransport pt = getTransportFromAddress(reservingPeer);\n\t\t\t\t\t\t// Peer is too slow; Ban them and unallocate the piece\n\t\t\t\t\t\t// but, banning is no good for peer types that get pieces reserved\n\t\t\t\t\t\t// to them for other reasons, such as special seed peers\n\t\t\t\t\t\tif (needsMD5CheckOnCompletion(i))\n\t\t\t\t\t\t\tbadPeerDetected(reservingPeer, i);\n\t\t\t\t\t\telse if (pt != null)\n\t\t\t\t\t\t\tcloseAndRemovePeer(pt, \"Reserved piece data timeout; 120 seconds\", true);\n\n\t\t\t\t\t\tpePiece.setReservedBy(null);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!piecePicker.isInEndGameMode()){\n\t\t\t\t\t\tpePiece.checkRequests();\n\t\t\t\t\t}\n\n\t\t\t\t\tcheckEmptyPiece(i);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "@Scheduled(fixedDelay = 98)\n public void cacheStats() {\n SalesAmount salesAmount = statsService.retrieveNextSalesAmount();\n LocalDateTime now = LocalDateTime.now(clock).withNano(0);\n while (salesAmount != null && !salesAmount.getTime().isAfter(Instant.now(clock))) {\n /*\n Because sales requests are processed sequentially, this way we don't need to care about increasing the\n aggregated sales amount in parallel and use Atomic data structures.\n */\n SalesAmountPerSecond salesAmountPerSecond = statsService.getLastSalesAmountPerSecond();\n if (null != salesAmountPerSecond && salesAmountPerSecond.getTime().equals(now)) {\n salesAmountPerSecond.addSalesAmount(salesAmount.getAmount());\n } else {\n statsService.addSalesAmountPerSecond(new SalesAmountPerSecond(\n salesAmount.getAmount(),\n 1,\n now));\n }\n salesAmount = statsService.retrieveNextSalesAmount();\n }\n }", "public void resetStats() {\n recentStats = new Stats();\n }", "public void getStats(){\n for (Shelf shelf : this.shelves){\n if (!shelf.isEmpty()){\n shelf.printStats();\n }\n\n }\n }", "public void incrMetaCacheNumClearServer() {\n metaCacheNumClearServer.inc();\n }", "static void addItems(int needed) {\r\n List<ConnectionReqs> reqsList = new ArrayList<>();\r\n reqsList.add(AuctionServer.reqs);\r\n Socket dBSocket = null;\r\n while(needed > 0) {\r\n Item item = null;\r\n Random random = new Random();\r\n int randInt = random.nextInt(200);\r\n DBMessage dBMessage = null;\r\n try {\r\n dBSocket = new Socket(\"localHost\", 6002);\r\n dBOut = new ObjectOutputStream(dBSocket.getOutputStream());\r\n dBOut.flush();\r\n dBIn = new ObjectInputStream(dBSocket.getInputStream());\r\n dBMessage = new DBMessage.Builder()\r\n .command(DBMessage.Command.GET)\r\n .table(DBMessage.Table.ITEM)\r\n .accountId(randInt)\r\n .build();\r\n dBOut.writeObject(dBMessage);\r\n System.out.println(\"listening...\");\r\n DBMessage response = (DBMessage) dBIn.readObject();\r\n item = (Item) response.getPayload();\r\n System.out.println(item.toString());\r\n } catch (IOException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n if(!auctionHistory.contains(item)) {\r\n System.out.println(dBMessage.toString());\r\n auctionList.add(item);\r\n auctionHistory.add(item);\r\n needed--;\r\n }\r\n }\r\n }", "private void sendPackets(String _nh)\n\t{\n\t\tsynchronized(outQueue)\n\t\t{\n\t\t\tint sentNumber = 0;\n\t\t\t// fill outQueue\n\t\t\tif(outQueue.size() < Constants.RTP_CREDIT_MAX)\n\t\t\t{\n\t\t\t\t/***\n\t\t\t\t * This line can return any number of packets...\n\t\t\t\t * \t - 50 or less if\n\t\t\t\t * \t - more than 50 when there are all packets from the same frame\n\t\t\t\t */\n\t\t\t\tint pleft = Constants.RTP_CREDIT_MAX-outQueue.size();\n//\t\t\t\tint qSizeb = outQueue.size();\n//\t\t\t\tlong begin = System.currentTimeMillis();\n\t\t\t\toutQueue.addAll(streamStore.schedulePackets(pleft, Constants.RTP_ORDERING_MODE));\n//\t\t\t\tlong end = System.currentTimeMillis();\n//\t\t\t\tint qSizee = outQueue.size();\n//\t\t\t\tDebugger.dumpMsg(this, \"Schedule \"+pleft+\"/\"+(qSizee-qSizeb)+\" packets time: \"+(end-begin), Debugger.RTP);\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\tIterator<Long> iterator = outQueue.iterator();\n\t\t\twhile(iterator.hasNext() && sentNumber < Constants.RTP_CREDIT_MAX)\n\t\t\t{\n\t\t\t\tLong p = (Long) iterator.next();\n\t\t\t\tif(send(_nh, p)) // successfully sent\n\t\t\t\t{\n\t\t\t\t\tsentNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t// select packets from the stream\n\t\t\t\t// for those not already sent\n\t\t\n\t\t\tDebugger.dumpMsg(this, \"Sent \"+sentNumber+\"/\"+outQueue.size()+\"/\"+streamStore.getNumberOfPacketsStored()+\"/\"+streamStore.getNumberOfPacketsToSchedule()+\" packets to \"+_nh, Debugger.RTP);\n\t\t\t\n\t\t\tif(sentNumber > 0)\n\t\t\t{\n\t\t\t\t// send SR\n\t\t\t\tsendSR(_nh, currentRequestId++);\n\t\t\t}\n\t\t}\n\t}", "public void showPlayerStats(Player player)\n\t{\n\t\tsynchronized (offlineDataYml)\n\t\t{\n\t\t\tYamlConfiguration yaml = YamlConfiguration.loadConfiguration(offlineDataYml);\n\t\t\tif(!yaml.isSet(player.getUniqueId().toString()))\n\t\t\t{\n\t\t\t\t//no datas\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tDouble earnings = 0.0;\n\t\t\tDouble losses = 0.0;\n\t\t\t\n\t\t\t\n\t\t\tString earningspath = player.getUniqueId().toString() + \".earnings\";\n\t\t\tString lossespath = player.getUniqueId().toString() + \".losses\";\n\t\t\tif(yaml.isSet(earningspath))\n\t\t\t{\n\t\t\t\tearnings = yaml.getDouble(earningspath);\n\t\t\t}\n\t\t\tif(yaml.isSet(lossespath))\n\t\t\t{\n\t\t\t\tlosses = yaml.getDouble(lossespath);\n\t\t\t}\n\t\t\t\n\t\t\tyaml.set(player.getUniqueId().toString(), null); //delete node to reset\n\t\t\t\n\t\t\tplayer.sendMessage(CasinoManager.getPrefix() + MessageManager.get(\"offlineearnmanager-join-message\")\n\t\t\t.replace(\"%earnings%\", Main.econ.format(earnings))\n\t\t\t.replace(\"%losses%\", Main.econ.format(losses)));\n\t\t\t\n\t\t\tif(earnings > losses)\n\t\t\t{\n\t\t\t\tplayer.sendMessage(CasinoManager.getPrefix() + MessageManager.get(\"offlineearnmanager-join-plus\")\n\t\t\t\t.replace(\"%win%\", Main.econ.format(earnings - losses)));\n\t\t\t}\n\t\t\telse if(earnings < losses)\n\t\t\t{\n\t\t\t\tplayer.sendMessage(CasinoManager.getPrefix() + MessageManager.get(\"offlineearnmanager-join-minus\")\n\t\t\t\t.replace(\"%loss%\", Main.econ.format(losses - earnings)));\n\t\t\t} else\n\t\t\t{\n\t\t\t\tplayer.sendMessage(CasinoManager.getPrefix() + MessageManager.get(\"offlineearnmanager-join-equal\"));\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\tyaml.save(offlineDataYml);\n\t\t\t} catch (IOException e)\n\t\t\t{\n\t\t\t\tCasinoManager.LogWithColor(ChatColor.RED + \"Error while trying to save offlinedata.yml! \" + e.getMessage());\n\t\t\t\te.printStackTrace(CasinoManager.getPrintWriterForDebug());\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testHyperLogLog(){\n String redisKey= \"test:hll:01\";\n for (int i = 0; i <= 100000; i++) {\n redisTemplate.opsForHyperLogLog().add(redisKey,i);\n }\n\n for (int i = 0; i <= 100000; i++) {\n int r = (int) (Math.random() * 100000+1);\n redisTemplate.opsForHyperLogLog().add(redisKey,r);\n }\n\n Long size = redisTemplate.opsForHyperLogLog().size(redisKey);\n System.out.println(size);\n }", "private void diffusionPhase() {\n if (prevMaxTimestamp == -1 || currMaxTimestamp == -1 || prevMaxTimestamp == currMaxTimestamp) {\n return;\n }\n final Set<NodeAddress> fathers = ((GroupedOverlayModule<?>) mainOverlay).getNodeGroup(GroupedOverlayModule.fathersGroupName);\n final PrimeNodeReport alreadyRequested = new PrimeNodeReport();\n for (final NodeAddress father : fathers) {\n if (!inboxHistory.keySet().contains(father)) {\n continue;\n }\n if (client.player.getVs() == null\n || inboxHistory.get(father).getLatestTimestamp() > client.player.getVs()\n .getAvailableDescriptions(client.player.getVs().windowOffset).getLatestTimestamp()) {\n final PrimeNodeReport availableDescriptionsAtFather = inboxHistory.get(father);\n PrimeNodeReport requestToSend = (client.player.getVs() == null) ? availableDescriptionsAtFather : (client.player.getVs()\n .getAvailableDescriptions(prevMaxTimestamp)).getDelta(availableDescriptionsAtFather);\n requestToSend = alreadyRequested.getDelta(requestToSend);\n if (requestToSend.size() == 0) {\n continue;\n }\n requestToSend = requestToSend.getRandomSubset(prevMaxTimestamp, currMaxTimestamp, r);\n if (requestToSend.size() != 0) {\n if (client.player.getVs() != null) {\n requestToSend.playTime = client.player.getVs().windowOffset;\n }\n alreadyRequested.update(requestToSend);\n network.send(new PrimeRequestMessage<PrimeNodeReport>(getMessageTag(), network.getAddress(), father, new PrimeNodeReport(\n requestToSend)));\n }\n }\n }\n }", "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 synchronized void tally(CrawlURI curi, Stage stage) {\n switch(stage) {\n case SCHEDULED:\n totalScheduled++;\n break;\n case RETRIED:\n if(curi.getFetchStatus()<=0) {\n fetchNonResponses++;\n }\n break;\n case SUCCEEDED:\n fetchSuccesses++;\n fetchResponses++;\n totalBytes += curi.getContentSize();\n successBytes += curi.getContentSize();\n \n if (curi.getFetchStatus() == HttpStatus.SC_NOT_MODIFIED) {\n notModifiedBytes += curi.getContentSize();\n notModifiedUrls++;\n } else if (IdenticalDigestDecideRule.hasIdenticalDigest(curi)) {\n dupByHashBytes += curi.getContentSize();\n dupByHashUrls++;\n } else if (curi.getAnnotations().contains(\"warcRevisit:uriAgnosticDigest\")) {\n dupByHashBytes += curi.getContentSize();\n dupByHashUrls++;\n } else {\n novelBytes += curi.getContentSize();\n novelUrls++;\n } \n \n lastSuccessTime = curi.getFetchCompletedTime();\n break;\n case DISREGARDED:\n fetchDisregards++;\n if(curi.getFetchStatus()==S_ROBOTS_PRECLUDED) {\n robotsDenials++;\n }\n break;\n case FAILED:\n if(curi.getFetchStatus()<=0) {\n fetchNonResponses++;\n } else {\n fetchResponses++;\n totalBytes += curi.getContentSize();\n \n if (curi.getFetchStatus() == HttpStatus.SC_NOT_MODIFIED) { \n notModifiedBytes += curi.getContentSize();\n notModifiedUrls++;\n } else if (IdenticalDigestDecideRule.\n hasIdenticalDigest(curi)) {\n dupByHashBytes += curi.getContentSize();\n dupByHashUrls++;\n } else {\n novelBytes += curi.getContentSize();\n novelUrls++;\n } \n \n }\n fetchFailures++;\n break;\n }\n }", "private void updateStats(final int nbTasks, final long elapsed, final long elapsedInNode) {\n //server.getStatsManager().taskExecuted(newBundle.getTaskCount(), elapsed / 1000000L, newBundle.getNodeExecutionTime() / 1000000L);\n JPPFStatistics stats = JPPFDriver.getInstance().getStatistics();\n stats.addValue(JPPFStatisticsHelper.TASK_DISPATCH, nbTasks);\n stats.addValues(JPPFStatisticsHelper.EXECUTION, elapsed, nbTasks);\n stats.addValues(JPPFStatisticsHelper.NODE_EXECUTION, elapsedInNode, nbTasks);\n stats.addValues(JPPFStatisticsHelper.TRANSPORT_TIME, elapsed - elapsedInNode, nbTasks);\n }", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "public void resetStatistics()\n {\n }", "private static void statisticOffer() {\n\t\tString url = \"localhost\";\n\t\tint port = 27017;\n\t\tString dbName = \"dulishuo\";\n\t\tDB db = MongoUtil.getConnection(url, port, dbName);\n\t\t\n\t\tDBCollection offer = db.getCollection(\"offer\"); \n\t DBCursor find = offer.find();\n\t \n\t while(find.hasNext()){\n\t \t\n\t }\n\t}" ]
[ "0.5741935", "0.57038283", "0.56567943", "0.561908", "0.558843", "0.5569349", "0.5564013", "0.55038154", "0.5474358", "0.547071", "0.54255545", "0.54161036", "0.5401875", "0.5339745", "0.5323956", "0.5320066", "0.5310791", "0.530373", "0.5274598", "0.527332", "0.52516717", "0.5250056", "0.52426434", "0.5242242", "0.5237133", "0.52319163", "0.52097857", "0.51931536", "0.51905125", "0.5185056", "0.5173463", "0.51527005", "0.5143629", "0.51417404", "0.51366043", "0.51365453", "0.5132004", "0.51302487", "0.5110036", "0.5108188", "0.5106923", "0.5097233", "0.50968903", "0.50968546", "0.50951964", "0.50923353", "0.5090754", "0.50818384", "0.50806206", "0.5074337", "0.5072414", "0.5068957", "0.50688845", "0.5065658", "0.5060393", "0.50602597", "0.5058971", "0.5057862", "0.5055875", "0.5045565", "0.5039454", "0.50317866", "0.50205857", "0.5017984", "0.5016724", "0.501367", "0.5012395", "0.50121397", "0.5000518", "0.49970132", "0.49952787", "0.49816546", "0.49794066", "0.4978893", "0.49774364", "0.4969515", "0.4966236", "0.49630034", "0.49597076", "0.4953917", "0.49538314", "0.4953361", "0.49520263", "0.49497926", "0.4949088", "0.4934989", "0.492965", "0.4918105", "0.49147683", "0.4904929", "0.49047258", "0.490439", "0.4900635", "0.48926035", "0.48916787", "0.48905212", "0.48905212", "0.48905212", "0.48847297", "0.48840928" ]
0.5766482
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { assignmentAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_selectable_list_item); new getAllCourses().execute(""); return super.onCreateView(inflater, container, savedInstanceState); }
{ "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
retrieve the item from stock list
public static int addRemoveItemToBasket(Basket basket, String item, int quantity) { StockItem stockItem = stockList.get(item); if (stockItem == null) { System.out.println("We don't sell " + item); return 0; } if (stockList.reserveStock(item, quantity) >= 0) { return basket.addToBasket(stockItem, quantity); } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Stock retrieveStock(String symbol);", "public List<StockItem> getStockList();", "public List<Stockitem> getItem() {\n\t\treturn (ArrayList<Stockitem>) stockitemDAO.findAllStockitem();\n\t}", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "public int getStock(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.stock;\n}\n}\nreturn -1;\n}", "Stock retrieveStock(String symbol, String asOf);", "List<StockList> fetch(String title);", "ItemStockDO selectByPrimaryKey(Integer id);", "ItemStockDO selectByPrimaryKey(Integer id);", "public Stock getStock(String symbol) {\n\t\tif(!checkStock(symbol)) return null;\n\t\tfor(Stock s : stockList) {\n\t\t\tif(s.getSymbol().equals(symbol))\n\t\t\t\treturn s;\n\t\t}\n\t\treturn null;\n\t}", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "private String getStock() {\n\t\treturn stock;\n\t}", "InventoryItem getInventoryItem();", "java.util.List<stockFilePT102.StockDocument.Stock> getStockList();", "public Item getItemByName(String itemName) {\n\t\t\n\t\tfor (Item item : itemsInStock) {\n\t\t\tif (item.name.equals(itemName)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "TradeItem getTradeItem(long id);", "public String getStock() {\n return stock;\n }", "public String getStock() {\n return stock;\n }", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn historyGoods.get(position);\n\t}", "int getItem(int index);", "public int getStock() {\n return stock;\n }", "public synchronized void get(T stock) throws InterruptedException {\n\t\twhile (store.isEmpty()) {\n\t\t\tLOG.info(\"No products available\");\n\t\t\twait();\n\t\t}\n\t\tstore.remove(stock);\n\t\tLOG.info(\"Product bought\" + store.size());\n\t\tnotify();\n\t}", "public Object get(String itemName);", "public Item get(int index) {\r\n\t\treturn catalog.get(index);\r\n\t}", "@Override\r\n\tpublic Object getItem(int posstion) {\n\t\treturn list.get(posstion);\r\n\t}", "public static Item getItem( ) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n \n\tString query = \"select * from Item\";\n\ttry {\n ps = connection.prepareStatement(query);\n\t ResultSet rs = null;\n\t rs = ps.executeQuery();\n \n\t Item item = new Item();\n \n\t if (rs.next()) {\n\t\titem.setAttribute(rs.getString(1));\n\t\titem.setItemname(rs.getString(2));\n\t\titem.setDescription(rs.getString(3));\n\t\titem.setPrice(rs.getDouble(4));\n\t }\n\t rs.close();\n\t ps.close();\n\t return item;\n\t} catch (java.sql.SQLException sql) {\n\t sql.printStackTrace();\n\t return null;\n\t}\n }", "public Items[] findWhereStockIdEquals(int stockId) throws ItemsDaoException;", "public StockDetails viewStock() {\n\t\tint availableStock = 0;\n\t\tStockDetails stockDetails = new StockDetails(); \n\t\t \n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"select * from stock_details\";\n\t\t\tPreparedStatement pst = con.prepareStatement(sql);\n\t\t\tResultSet rs = pst.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\t stockDetails.setStockAvailability(rs.getInt(\"stock_availability\"));\n\t\t\t\t Date date = rs.getDate(\"inserted_date\");\n\t\t\t\t stockDetails.setStockAddedDate(date.toLocalDate());\n\t \n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t\treturn stockDetails;\n\t}", "@Override\n public Object getItem(int arg0) {\n return list.get(arg0);\n }", "public io.opencannabis.schema.commerce.OrderItem.Item getItem(int index) {\n return item_.get(index);\n }", "public interface StockItem {\n String getSymbol();\n\n String getName();\n\n BigDecimal getValue();\n\n int getVolume();\n\n Date getLastTradeDateTime();\n\n BigDecimal getGains();\n\n BigDecimal getOpenValue();\n\n BigDecimal getCloseValue();\n}", "@Override\n\t\tpublic Object getItem(int arg0) {\n\t\t\treturn books.get(arg0);\n\t\t}", "public int getStock() {\n\t\treturn stock;\n\t}", "public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}", "List<Stock> retrieveAllStocks(String symbol);", "ItemStack getItem();", "public Integer getStock() {\n return stock;\n }", "public Item getItem() {\n return Bootstrap.getInstance().getItemRepository().fetchAll().stream()\n .filter(i -> i.getId() == this.itemId)\n .findFirst().orElse(null);\n }", "@Override\n public Item retrieveSingleItem(int itemNo) throws VendingMachinePersistenceException {\n loadItemFile();\n return itemMap.get(itemNo);\n }", "public Stock getFromMap(String name){\n\tif(table.containsKey(name)){\n\tStock rval = table.get(name);\n\treturn rval;\n\t}\n\telse{\n\t\t//call pull from URL and return newStock \n\t\taddToMap(String name, Stock newStock);\n\t\tgetFromMap(name);\n\t}\n}", "public Item getItem(final String pItem){return this.aItemsList.getItem(pItem);}", "public Integer getStock(int ID) {\r\n\t\treturn inventory.get(ID);\r\n\t}", "@Override\n\tpublic Object getItem(int arg0) {\n\t\treturn list.get(arg0);\n\t}", "@Override\n\tpublic Object getItem(int arg0) {\n\t\treturn list.get(arg0);\n\t}", "@Override\n\tpublic Object getItem(int arg0) {\n\t\treturn list.get(arg0);\n\t}", "@Override\n\tpublic Object getItem(int arg0) {\n\t\treturn list.get(arg0);\n\t}", "public List<ProductWithStockItemTO> getProductsWithLowStock(long storeID);", "@Override\r\n\tpublic List prodStockseach() {\n\t\treturn adminDAO.seachProdStock();\r\n\t}", "@Override\n\tpublic Long getStock(Integer id) {\n\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select stock from product where id=?\");\n\t\t\tpst.setInt(1, id);\n\t\t\trs=pst.executeQuery();\n\t\t if (rs.next()) {\n\t\t \tLong s=rs.getLong(\"stock\");\n\t\t \treturn s;\n\t\t\t}\n\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\n\t\t\t} catch (SQLException 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\treturn null;\n\t\n\t\t\n\t\t\n\t\n\t\t\n\t\n\t}", "public CartItem get(int ndx) {\n\t\treturn cart.get(ndx);\n\t}", "String retrieveSymbolNewsItems(String symbol);", "@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}", "public native String getItem(Number index);", "public ArrayList<PersonStocks> getStock(){\n return myStocks;\n }", "@Override\n\t\tpublic Object getItem(int index) {\n\t\t\treturn itemList.get(index);\n\t\t}", "@Override\n\t\tpublic Object getItem(int p1)\n\t\t\t{\n\t\t\t\treturn is.get(p1);\n\t\t\t}", "public SpItem getItem() {\n return _spItem;\n }", "String getStockName();", "public Object getItem(String key);", "stockFilePT102.StockDocument.Stock getStockArray(int i);", "@Override\n\t\t\tpublic Object getItem(int position){\n\t\t\t\treturn list.get(position);\n\t\t\t}", "com.rpg.framework.database.Protocol.Item getItems(int index);", "public int getStock(){\n\t\treturn Stock; // Return the product's stock\n\t}", "public static ArrayList<Stocks> findSymbolByName(String StockName) {\n ArrayList<Stocks> SearchResults = new ArrayList<>();\n// re-do the search for the new StockName\n HttpResponse response = null;\n HttpClient client = new DefaultHttpClient();\n HttpGet request = new HttpGet();\n HttpEntity entity = null;\n try {\n //create the URI to inquery about the Stock Symbol based off of the stockname input\n request.setURI(new URI(StockConstants.StockSymbolLookupAPIURL.replace(StockConstants.KEY_SEARCHSTRING, StockName)));\n response = client.execute(request);\n entity = response.getEntity();\n } catch (URISyntaxException e) {\n e.printStackTrace();\n } catch (ClientProtocolException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n\n String result = EntityUtils.toString(entity);\n //formating the result into JSON array:\n result = result.replace(StockConstants.KEY_APICALLBACKNAME + \"(\", \"\");\n result = result.replace(\")\", \"\");\n\n Log.d(TAG, \"Symbol response was :\" + result);\n JSONArray jsonArray = new JSONArray(result);\n //Iterating through the list and grab the data\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject obj = jsonArray.getJSONObject(i);\n // return an arraylist of stock objs containing name/symbol and exchange market\n Stocks stock = new Stocks(obj.getString(\"Name\"), obj.getString(\"Symbol\"), obj.getString(\"Exchange\"));\n Log.d(\"~~~~~~~\", \"Adding new stock :\" + stock.toString());\n SearchResults.add(stock);\n }\n } catch (JSONException e) {\n Log.d(TAG, \"Caught JSONException:\" + e);\n } catch (IOException e) {\n Log.d(TAG, \"Caught IOException:\" + e);\n }\n\n\n return SearchResults;\n }", "@Override\r\n\tpublic Object getItem(int arg0) {\n\t\treturn data.get(arg0);\r\n\t}", "public ArrayList<Zapato> getStock(){\n\t\treturn this.stock;\n\t}", "CodeableConcept getItem();", "public Object getItem(int arg0) {\n\t\t\treturn dataList.get(arg0);\r\n\t\t}", "public Item getItem ()\n\t{\n\t\treturn item;\n\t}", "@Override\r\n\tpublic Object getItem(int arg0) {\n\t\treturn listab.get(arg0);\r\n\t}", "public Item getItem(String name) {\r\n \t\treturn persistenceManager.getItem(name);\r\n \t}", "public ResultSet getItemListForSold() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , auc_start, auc_end_date , startbid , currentbid , CURRENTBID-STARTBID \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' AND STATUS = 'SOLD' \"\n \t+\"GROUP BY SELLERNO, INUMBER, INAME, auc_start, auc_end_date,\"+ \n \t\t\" startbid, currentbid, CURRENTBID-STARTBID\";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "public Item getItem() { \n return myItem;\n }", "@Override\n public Object getItem(int index) {\n return internalList.get(index);\n }", "public ArrayList<String[]> loadStocks() {\n Log.d(TAG, \"loadStocks: Start Loading\");\n ArrayList<String[]> stocks = new ArrayList<>();\n Cursor cursor = database.query(\n TABLE_NAME,\n new String[]{STOCK_SYMBOL, STOCK_NAME},\n null,\n null,\n null,\n null,\n STOCK_SYMBOL);\n if (cursor != null) {\n cursor.moveToFirst();\n for (int i = 0; i < cursor.getCount(); i++) {\n String symbol = cursor.getString(0);\n //Double price = cursor.getDouble(1);\n // Double change = cursor.getDouble(2);\n //Double changePer = cursor.getDouble(3);\n String name = cursor.getString(1);\n stocks.add(new String[]{symbol, name});\n cursor.moveToNext();\n }\n cursor.close();\n }\n return stocks;\n}", "public Item getItem(long idItem) throws ItemNotFound;", "@Override\r\n\tpublic Object getItem(int arg0) {\n\t\treturn lists.get(arg0);\r\n\t}", "@Override\n public Object getItem(int position) {\n return drinks.get(position);\n }", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "public ArrayList<Stock> getAvaiableStock (){\n\t\treturn inventory;\n\t}", "public Item get(int index) {\n int track = nextFirst; //It does not modify nextFirst\n track = moveForward(track, index + 1);\n return items[track];\n }", "CatalogItem getItembyId(final Long id);", "public jkt.hms.masters.business.MasStoreItem getItem () {\n\t\treturn item;\n\t}", "public Item retrieveItem(Connection conn, int item_no) {\r\n\t\ttry {\r\n\t\t\tItem item = new Item();\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from item_XXXX where item_no=\" + item_no);\r\n\t\t\twhile (rset.next()) {\r\n\t\t\t\titem.setItemNo(rset.getInt(1));\r\n\t\t\t\titem.setDescription(rset.getString(2));\r\n\t\t\t\tString category = rset.getString(3);\r\n\t\t\t\titem.setCategory(Category.valueOf(category));\r\n\t\t\t\titem.setPrice(rset.getInt(4));\r\n\t\t\t\titem.setQuantity(rset.getInt(5));\r\n\t\t\t}\r\n\t\t\treturn item;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String getStockName() {\r\n return stockName;\r\n }", "@Override\n public Object getItem(int index) {\n return listInfo.get(index);\n }", "List<MarketData> getMarketDataItems(String index);", "public static Item getItem(String itemName)\n {\n Item temp = null;\n for (Item inventory1 : inventory) {\n if (inventory1.getName().equals(itemName)) {\n temp = inventory1;\n }\n }\n return temp;\n }", "@Override\n\tpublic int getStock() {\n\t\treturn 2;\n\t}", "public interface StockDAO {\n public int getAmountAvailable(String stockName); //Retrieves amount of stock available from stock_initial table\n public List<StockItem> getStockList(); //Retrieves list of stocks for initial wallet values\n}", "@Override\r\n public Object getItem(int position) {\n return list.get(position);\r\n }", "@Override\r\n\tpublic Object getItem(int arg0) {\n\t\treturn mList.get(arg0);\r\n\t}", "public Song getSong(int index) {\n\t\treturn this.songList.get(index);\n\n\t}", "CatalogItem getCatalogItemByName(String name);", "public KeyedItem retrieve(Comparable key){\r\n\t\treturn retrieve(this,key);\r\n\t}", "public String getStockName() {\n return stockName;\n }", "public Product findProduct(int id)\n {\n for(Product product : stock)\n {\n if(id == product.getID())\n {\n return product;\n }\n }\n System.out.println(\"Error: Could not find ID: \" + id);\n return null;\n }", "SimpleInventory getOpenedInventory(Player player);", "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 getItem(int arg0) {\n\t\t\treturn data.get(arg0);\n\t\t}", "@Override\n\tpublic SquareLiveModel getItem(int position) {\n\t\treturn listData.get(position);\n\t}" ]
[ "0.73661315", "0.72611547", "0.7174413", "0.716698", "0.71271676", "0.70548165", "0.68433774", "0.6801404", "0.6801404", "0.6671593", "0.6620117", "0.65994287", "0.65662867", "0.6478446", "0.6467816", "0.6465498", "0.6412478", "0.6412478", "0.64119595", "0.6408381", "0.6407772", "0.6401932", "0.6396972", "0.6357149", "0.63237524", "0.631153", "0.63093513", "0.6305673", "0.6279107", "0.6274723", "0.6255394", "0.62537104", "0.6241932", "0.6241164", "0.6240444", "0.62320524", "0.62229645", "0.6217105", "0.62147003", "0.6213714", "0.6210183", "0.6192332", "0.61901665", "0.61901665", "0.61901665", "0.61901665", "0.6162278", "0.61597246", "0.6154321", "0.61518097", "0.61374956", "0.61315536", "0.611494", "0.6114825", "0.6114432", "0.61094135", "0.6108266", "0.61079913", "0.6103034", "0.60939807", "0.6092618", "0.6088349", "0.60882497", "0.6081943", "0.6077014", "0.6070937", "0.6065485", "0.60632324", "0.6058656", "0.604946", "0.60426414", "0.60370755", "0.60360086", "0.6033912", "0.6033265", "0.6029666", "0.60256726", "0.6025283", "0.60177916", "0.60135037", "0.60048336", "0.6004651", "0.59994835", "0.5999093", "0.5995019", "0.5989505", "0.59886897", "0.59689033", "0.596508", "0.5957546", "0.5955905", "0.59525716", "0.5950764", "0.5947802", "0.5947458", "0.5943777", "0.5942915", "0.593933", "0.5930022", "0.5915474", "0.59154093" ]
0.0
-1
retrieve the items from stock list
public static int checkout(Basket basket) { for (Map.Entry<StockItem, Integer> item : basket.Items().entrySet()) { String itemName = item.getKey().getName(); StockItem stockItem = stockList.get(itemName); if (stockItem == null) { System.out.println("We don't sell " + itemName); return 0; } stockList.sellStock(itemName); } basket.clear(); return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<StockItem> getStockList();", "java.util.List<stockFilePT102.StockDocument.Stock> getStockList();", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "public List<Stockitem> getItem() {\n\t\treturn (ArrayList<Stockitem>) stockitemDAO.findAllStockitem();\n\t}", "List<StockList> fetch(String title);", "List<Stock> retrieveAllStocks(String symbol);", "@Override\r\n\tpublic List prodStockseach() {\n\t\treturn adminDAO.seachProdStock();\r\n\t}", "public String[] listItems() {\n \n\t\tif (itemCount==0) {\n\t\t\tSystem.out.println(\"\\tNo items available.\\n\");\n\t\t}\n\t\telse {\n\t\t\tfor(int index = 1; index<=itemCount; index++) {\n VendItem s = stock[index-1];\n itemList[index-1]=(s.getName());\n\t\t\t}\n System.out.println();\n \n }\n return itemList;\n\n }", "public ArrayList<String[]> loadStocks() {\n Log.d(TAG, \"loadStocks: Start Loading\");\n ArrayList<String[]> stocks = new ArrayList<>();\n Cursor cursor = database.query(\n TABLE_NAME,\n new String[]{STOCK_SYMBOL, STOCK_NAME},\n null,\n null,\n null,\n null,\n STOCK_SYMBOL);\n if (cursor != null) {\n cursor.moveToFirst();\n for (int i = 0; i < cursor.getCount(); i++) {\n String symbol = cursor.getString(0);\n //Double price = cursor.getDouble(1);\n // Double change = cursor.getDouble(2);\n //Double changePer = cursor.getDouble(3);\n String name = cursor.getString(1);\n stocks.add(new String[]{symbol, name});\n cursor.moveToNext();\n }\n cursor.close();\n }\n return stocks;\n}", "public List<Stock> getAllStocks() {\n\n this.open();\n\n Cursor cursor = database.query(SQLiteHelper.TABLE_STOCK, allColumns, null, null, null, null, null);\n List<Stock> allStocks = new ArrayList<>();\n\n cursor.moveToLast();\n while (!cursor.isBeforeFirst()){\n allStocks.add(cursorToStock(cursor));\n cursor.moveToPrevious();\n }\n\n cursor.close();\n this.close();\n return allStocks;\n }", "List<ItemStockDO> selectAll();", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "@Override\r\n\tpublic StockResponseModel getListOfStock() {\n\t\tStockResponseModel list = new StockResponseModel();\r\n\t\tList<StockEntities> stockRepoList = new ArrayList();\r\n\t\tList<StockRequestModel> stockModelList = new ArrayList();\r\n\t\tstockModelList = CommonUtills.mapConvert(stockRepoList, stockModelList);\r\n\t\tstockRepoList = stockRepository.findAll();\r\n\t\tlist.setStockInfo(stockModelList);\r\n\t\tlist.setResponseCode(HttpStatus.OK.toString());\r\n\t\tlist.setResponseMsg(HttpStatus.OK.getReasonPhrase());\r\n\t\treturn list;\r\n\t\t\r\n\t}", "List<StockList> fetchAll();", "public ResultSet getItemListForSold() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , auc_start, auc_end_date , startbid , currentbid , CURRENTBID-STARTBID \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' AND STATUS = 'SOLD' \"\n \t+\"GROUP BY SELLERNO, INUMBER, INAME, auc_start, auc_end_date,\"+ \n \t\t\" startbid, currentbid, CURRENTBID-STARTBID\";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "public java.util.List<com.sbytestream.samples.grpc.stockservice.Stock> getStocksList() {\n return stocks_;\n }", "public Items[] findWhereStockIdEquals(int stockId) throws ItemsDaoException;", "com.rpg.framework.database.Protocol.Item getItems(int index);", "List<MarketData> getMarketDataItems(String index);", "public List<ProductWithStockItemTO> getProductsWithLowStock(long storeID);", "public ArrayList<PersonStocks> getStock(){\n return myStocks;\n }", "static List<Stock> getList2() {\n\t\treturn null;\n\t}", "public List<ProductWithSupplierAndStockItemTO> getProductsWithStockItems(long storeID) throws NotInDatabaseException;", "public com.sbytestream.samples.grpc.stockservice.Stock getStocks(int index) {\n return stocks_.get(index);\n }", "public List<Item> getAllItemsAvailable();", "public ResultSet getItemList() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , CATEG, auc_start, auc_end_date , startbid , currentbid,status \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' \";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "public int getStock(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.stock;\n}\n}\nreturn -1;\n}", "List<Item> getItems(IDAOSession session);", "public java.util.List<com.sbytestream.samples.grpc.stockservice.Stock> getStocksList() {\n if (stocksBuilder_ == null) {\n return java.util.Collections.unmodifiableList(stocks_);\n } else {\n return stocksBuilder_.getMessageList();\n }\n }", "private void refreshStock(){\n storeStock = sysMgr.getStock(sysMgr.getLoginId());\n ArrayList<Stock> nonEmpty = new ArrayList<>();\n for(Stock i : storeStock)\n if(i.getQuantity() != 0)\n nonEmpty.add(i);\n storeStock = nonEmpty;\n }", "public ArrayList<Stock> getStockList() {\n\t\treturn stockList;\n\t}", "public Map<String, Stock> getStocks();", "Stock retrieveStock(String symbol);", "public List<Item> getItemList();", "stockFilePT102.StockDocument.Stock getStockArray(int i);", "java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();", "public List getGestionStockList(Map criteria);", "String retrieveSymbolNewsItems(String symbol);", "public ComplexOrderEntryTO[] getStockItems(long storeID, ProductTO[] requiredProductTOs) throws NotImplementedException;", "@Ignore\r\n\t@Test\r\n\tpublic void showTodayStock() {\n\t\tList<StockMainVO> list = sms.showTodayStock();\r\n\t\t\r\n\t\tSystem.out.println(\"test list : \" + list);\r\n\t}", "public ArrayList<Zapato> getStock(){\n\t\treturn this.stock;\n\t}", "List<InventoryItem> getInventory();", "public static ArrayList<InventoryItem> getInventoryItems() {\n\n String itemUrl = REST_BASE_URL + ITEMS;\n String inventoryUrl = REST_BASE_URL + INVENTORIES;\n String availableUrl = REST_BASE_URL + INVENTORIES + AVAILABLE + CATEGORIZED;\n\n // List of items\n ArrayList<InventoryItem> items = new ArrayList<>();\n ArrayList<String> itemNames = new ArrayList<>();\n\n URL url = null;\n\n /* Fetch items from \"items\" table. */\n try {\n url = new URL(itemUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray itemJsonArray = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting items\");\n itemJsonArray = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n // Store each item into <items>. Store each item name into <itemNames>.\n for (int i = 0; i < itemJsonArray.length(); i++) {\n JSONObject jo = (JSONObject) itemJsonArray.get(i);\n InventoryItem newItem = new InventoryItem(\n jo.getString(ITEM_IMAGE_URL),\n jo.getString(ITEM_NAME),\n jo.getString(ITEM_DESCRIPTION),\n 0,\n 0);\n items.add(newItem);\n itemNames.add(jo.getString(ITEM_NAME));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* Fetch inventory items from \"inventories\" */\n try {\n url = new URL(inventoryUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray jaResult = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting ivnentories\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemQuantity(currItem.getItemQuantity()+1);\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the inventory but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* get inventory stocks from \"/available/categorized\" */\n try {\n url = new URL(availableUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n\n try {\n Log.d(TAG, \"getInventoryItems: getting inventory stocks\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemStock(jo.getInt(ITEM_COUNT));\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the stock but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "public static ArrayList<Stocks> findSymbolByName(String StockName) {\n ArrayList<Stocks> SearchResults = new ArrayList<>();\n// re-do the search for the new StockName\n HttpResponse response = null;\n HttpClient client = new DefaultHttpClient();\n HttpGet request = new HttpGet();\n HttpEntity entity = null;\n try {\n //create the URI to inquery about the Stock Symbol based off of the stockname input\n request.setURI(new URI(StockConstants.StockSymbolLookupAPIURL.replace(StockConstants.KEY_SEARCHSTRING, StockName)));\n response = client.execute(request);\n entity = response.getEntity();\n } catch (URISyntaxException e) {\n e.printStackTrace();\n } catch (ClientProtocolException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n\n String result = EntityUtils.toString(entity);\n //formating the result into JSON array:\n result = result.replace(StockConstants.KEY_APICALLBACKNAME + \"(\", \"\");\n result = result.replace(\")\", \"\");\n\n Log.d(TAG, \"Symbol response was :\" + result);\n JSONArray jsonArray = new JSONArray(result);\n //Iterating through the list and grab the data\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject obj = jsonArray.getJSONObject(i);\n // return an arraylist of stock objs containing name/symbol and exchange market\n Stocks stock = new Stocks(obj.getString(\"Name\"), obj.getString(\"Symbol\"), obj.getString(\"Exchange\"));\n Log.d(\"~~~~~~~\", \"Adding new stock :\" + stock.toString());\n SearchResults.add(stock);\n }\n } catch (JSONException e) {\n Log.d(TAG, \"Caught JSONException:\" + e);\n } catch (IOException e) {\n Log.d(TAG, \"Caught IOException:\" + e);\n }\n\n\n return SearchResults;\n }", "public com.sbytestream.samples.grpc.stockservice.Stock getStocks(int index) {\n if (stocksBuilder_ == null) {\n return stocks_.get(index);\n } else {\n return stocksBuilder_.getMessage(index);\n }\n }", "ArrayList<IItem> getItems(Position position);", "public List<StockFavorite> getListFavoriteStock(int userId);", "public static List<YahooStock> retrieveYahooStocks(String symbol) {\n\t\tURL yahooFinanceUrl2 = null;\n\t\tURLConnection urlConnection;\n\t\tList<YahooStock> yahooStockList = null;\n\t\ttry {\n\t\t\t//yahooFinanceUrl1 = new URL(\"http://download.finance.yahoo.com/d/quotes.csv?s=\" + symbol + \"&f=sl1d1t1c1ohgv&e=.csv\");\n\t\t\tyahooFinanceUrl2 = new URL(\"http://finance.yahoo.com/d/quotes.csv?s=\" + symbol + \"&f=sl1d1t1c1ohgv&e=.csv\");\n\t\t} catch (MalformedURLException mue) {\n\t\t\tmue.printStackTrace();\n\t\t} \n\t\ttry {\n\t\t\turlConnection = yahooFinanceUrl2.openConnection();\n\t\t\tBufferedReader dataIn = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); \n\t\t\tString inputLine; \n\t\t\tyahooStockList = new ArrayList<YahooStock>();\n\t\t\twhile ((inputLine = dataIn.readLine()) != null) {\n\t\t\t\tString[] yahooStockInfo = inputLine.split(\",\");\n\t\t\t\tYahooStock yahooStock = new YahooStock();\n\t\t\t\tyahooStock.setSymbol(yahooStockInfo[0].replaceAll(\"\\\"\", \"\"));\n\t\t\t\tyahooStock.setLastTrade(Double.valueOf(yahooStockInfo[1]));\n\t\t\t\tyahooStock.setTradeDate(yahooStockInfo[2]);\n\t\t\t\tyahooStock.setTradeTime(yahooStockInfo[3]);\n\t\t\t\tyahooStock.setChange(Double.valueOf(yahooStockInfo[4]));\n\t\t\t\tyahooStock.setOpen(Double.valueOf(yahooStockInfo[5]));\n\t\t\t\tyahooStock.setHigh(Double.valueOf(yahooStockInfo[6]));\n\t\t\t\tyahooStock.setLow(Double.valueOf(yahooStockInfo[7]));\n\t\t\t\tyahooStock.setVolume(Double.valueOf(yahooStockInfo[8]));\n\t\t\t\tyahooStock.setSmallChartUrl(\"http://ichart.finance.yahoo.com/t?s=\" + yahooStock.getSymbol());\n\t\t\t\tyahooStock.setLargeChartUrl(\"http://chart.finance.yahoo.com/w?s=\" + yahooStock.getSymbol());\n\t\t\t\tyahooStockList.add(yahooStock);\n\t\t\t} \n\t\t\tdataIn.close(); \n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} \n\t\treturn yahooStockList; \t\n\t}", "private String getItems(long listid){\n \tString theItems = \"\";\n \titemDbAdapter.open();\n \titemCursor = itemDbAdapter.fetchAllItemsFromList(LIST_ID);\n startManagingCursor(itemCursor);\n int cursorRows = itemCursor.getCount();\n \n for ( int i = 0; i < cursorRows; i++) {\n \titemCursor.moveToPosition(i);\n \tString title = itemCursor.getString(itemCursor.getColumnIndexOrThrow(ItemsDbAdapter.KEY_TITLE));\n \ttheItems = theItems + title + \"\\n\";\n }\n \titemDbAdapter.close();\n \treturn theItems;\n }", "@Override\n public List<Item> retrieveAllItems() throws VendingMachinePersistenceException {\n loadItemFile();\n List<Item> itemList = new ArrayList<>();\n for (Item currentItem: itemMap.values()) {\n itemList.add(currentItem);\n }\n\n return itemList;\n }", "public static ArrayList<Item> find()\n {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ArrayList<Item> items=new ArrayList<Item>();\n items=null;\n \n String query = \"select * from item\";\n try\n { \n ps = connection.prepareStatement(query);\n ResultSet rs = null;\n\t rs = ps.executeQuery();\n while(rs.next()){\n Item item = new Item();\n\t\titem.setAttribute(rs.getString(2));\n\t\titem.setItemname(rs.getString(3));\n\t\titem.setDescription(rs.getString(4));\n\t\titem.setPrice(rs.getDouble(5));\n items.add(item);\n }\n return items;\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n return null;\n }\n finally\n {\n DButil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n } \n }", "public synchronized void get(T stock) throws InterruptedException {\n\t\twhile (store.isEmpty()) {\n\t\t\tLOG.info(\"No products available\");\n\t\t\twait();\n\t\t}\n\t\tstore.remove(stock);\n\t\tLOG.info(\"Product bought\" + store.size());\n\t\tnotify();\n\t}", "public StockDetails viewStock() {\n\t\tint availableStock = 0;\n\t\tStockDetails stockDetails = new StockDetails(); \n\t\t \n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"select * from stock_details\";\n\t\t\tPreparedStatement pst = con.prepareStatement(sql);\n\t\t\tResultSet rs = pst.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\t stockDetails.setStockAvailability(rs.getInt(\"stock_availability\"));\n\t\t\t\t Date date = rs.getDate(\"inserted_date\");\n\t\t\t\t stockDetails.setStockAddedDate(date.toLocalDate());\n\t \n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t\treturn stockDetails;\n\t}", "public String[] showStock() {\n \tString[] stock = new String[5];\n \tstock[0] = Integer.toString(this.getId());\n \tstock[1] = this.getName();\n \tstock[2] = Integer.toString(this.getAvailableNumber());\n \tstock[3] = Double.toString(this.getBuyPrice().getAmount());\n \tstock[4] = Double.toString(this.getSellPrice().getAmount());\n \treturn stock;\n }", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "public List<BusinessObject> getItems(Package pkg);", "private void searchGoodsStock(String goodsId, List<WareInfo> mStockData) {\n String sql2 = \"select fname,fitemid from t_stock\";\n\n //根据助记码或者名称模糊查询\n new StockItemTask(sql2, mStockData).execute();\n }", "public ArrayList<Stock> getAvaiableStock (){\n\t\treturn inventory;\n\t}", "public List<CartItem> getAllcartitem();", "public List<MyStockHist> getMystockHistAlltList(MyStockHist myStockHist) ;", "public interface StockDAO {\n public int getAmountAvailable(String stockName); //Retrieves amount of stock available from stock_initial table\n public List<StockItem> getStockList(); //Retrieves list of stocks for initial wallet values\n}", "public void loadItems() {\n\t\tArrayList<String> lines = readData();\n\t\tfor (int i = 1; i < lines.size(); i++) {\n\t\t\tString line = lines.get(i);\n\t\t\t\n\t\t\tString[] parts = line.split(\",\");\n\t\t\t\n//\t\t\tSystem.out.println(\"Name: \" + parts[0]);\n//\t\t\tSystem.out.println(\"Amount: \" + parts[1]);\n//\t\t\tSystem.out.println(\"Price: \" + parts[2]);\n//\t\t\tSystem.out.println(\"-------\");\n\t\t\t\n\t\t\tString name = parts[0].trim();\n\t\t\tint amount = Integer.parseInt(parts[1].trim());\n\t\t\tdouble price = Double.parseDouble(parts[2].trim());\n\t\t\t\n\t\t\tItem item = new Item(name, amount, price);\n\t\t\titemsInStock.add(item);\n\t\t}\n\t}", "public abstract List<String> getInventory();", "@Query(\"SELECT * from stock_table ORDER BY symbol ASC\")\n LiveData<List<AppStock>> getAllStocks();", "public ArrayList<Stock> getStockWithName() {\n\n return null;\n }", "public static void items(){\n\t\ttry{\n\t\t\tConnection conn = DriverManager.getConnection(url,username,password);\n\t\t\tStatement query = conn.createStatement();\n\t\t\tResultSet re = query.executeQuery(\"select * from item\");\n\t\t\tString spc = \" \";\n\t\t\twhile (re.next()){\n\t\t\t\tSystem.out.println(re.getInt(\"itemid\")+spc+re.getString(\"title\")+spc+re.getDouble(\"price\"));\n\t\t\t}\n\t\t}catch(Exception ecx){\n\t\t\tecx.printStackTrace();\n\t\t}\n\t}", "Stock retrieveStock(String symbol, String asOf);", "private String[] getLoadListFromDb(ContentResolver cr) {\n Cursor cursor = null;\n String[] loadList = null;\n try {\n final String[] projection = new String[]{StockEntry.COLUMN_SYMBOL};\n final int indexSymbol = 0;\n\n // Query db for just symbols.\n cursor = cr.query(\n StockEntry.CONTENT_URI,\n projection,\n null,\n null,\n StockProvider.ORDER_BY_LIST_POSITION_ASC_ID_DESC);\n\n // Grab symbols from cursor and put them in array\n if (cursor != null) {\n int cursorCount = cursor.getCount();\n loadList = new String[cursorCount];\n\n for (int i = 0; i < cursorCount; i++) {\n cursor.moveToPosition(i);\n loadList[i] = cursor.getString(indexSymbol);\n }\n }\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n return loadList;\n }", "public static List<Item> getItems() {\n\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/item/all\")).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n //return \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new JavaTimeModule());\n List<Item> items = null;\n // TODO handle exception\n try {\n items = mapper.readValue(response.body(), new TypeReference<List<Item>>(){});\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "public StockUnits call() throws Exception {\n\treturn broker.getStocksOfComapny(company);\r\n }", "public ArrayList<Stock> addDefaultStocks() {\n Stock amzn = new Stock(\"Amazon\", \"AMZN\", new Dollar(2474.00), 100); \n Stock fb = new Stock(\"Facebook\", \"FB\", new Dollar(204.71), 100); \n Stock msft = new Stock(\"Microsoft\", \"MSFT\", new Dollar(174.57), 100); \n Stock googl = new Stock(\"Alphabet\", \"GOOGL\", new Dollar(1317.32), 100); \n Stock baba = new Stock(\"Alibaba\", \"BABA\", new Dollar(194.48), 100); \n Stock fis = new Stock(\"Fidelity\", \"FIS\", new Dollar(26.01), 100); \n Stock crm = new Stock(\"Salesforce\", \"CRM\", new Dollar(156.37), 100); \n Stock ma = new Stock(\"Mastercard\", \"MA\", new Dollar(268.74), 100); \n Stock v = new Stock(\"Visa\", \"V\", new Dollar(175.57), 100); \n Stock nflx = new Stock(\"Netflix\", \"NFLX\", new Dollar(415.27), 100); \n\n stocks.add(amzn); \n stocks.add(fb); \n stocks.add(msft); \n stocks.add(googl); \n stocks.add(baba); \n stocks.add(fis);\n stocks.add(crm); \n stocks.add(ma); \n stocks.add(v); \n stocks.add(nflx); \n\n return stocks; \n }", "public void listAll(InventoryList inStock) {\n for (Item a : inStock.getInventoryList()) {\n if (1 >= a.getCount()) {\n console.promptForPrintPrompt(a.toString());\n }\n }\n }", "public ArrayList<ProductDetail> readAllWishlist() {\n db = helper.getReadableDatabase();\n ArrayList<ProductDetail> list = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"select * from \" + DatabaseConstant.TABLE_NAME_WISHLIST, null);\n while (cursor.moveToNext()) {\n String id = cursor.getString(0);\n String title = cursor.getString(1);\n String price = cursor.getString(2);\n String order_quantity = cursor.getString(3);\n String quantity_type = cursor.getString(4);\n String min_quantity = cursor.getString(5);\n String availability = cursor.getString(6);\n String discount = cursor.getString(7);\n String image = cursor.getString(8);\n String rating = cursor.getString(9);\n String description = cursor.getString(10);\n String type = cursor.getString(11);\n int qty = cursor.getInt(12);\n\n list.add(new ProductDetail(id, title, price, order_quantity, quantity_type, min_quantity, availability, discount, image, rating, description\n ,type, qty));\n }\n return list;\n }", "public void setListOfStock( List<StockEntity> listOfStock ) {\n this.listOfStock = listOfStock;\n }", "@Query(\"SELECT * from stock_table ORDER BY symbol ASC\")\n List<AppStock> getAllStocksSync();", "@Override\r\n\tpublic List<MatStockBean> getMatStockDetails() {\n\t\tList<MatStockBean> matStockBeans=null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlistOfObjcts=boardDao.getMatStockDetails();\r\n\t\t\tmatStockBeans=new ArrayList<MatStockBean>();\r\n\t\t\tIterator<Object[]> iterator=listOfObjcts.iterator();\r\n\t\t\twhile(iterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\tObject[] objects=(Object[])iterator.next();\r\n\t\t\t\tMatStockBean stockBean=new MatStockBean();\r\n\t\t\t\tstockBean.setMatStockId((Integer)objects[0]);\r\n\t\t\t\tstockBean.setBatchNo((String)objects[1]);\r\n\t\t\t\tstockBean.setQtyAval((Float)objects[2]);\r\n\t\t\t\tStorageLocation location=(StorageLocation)objects[3];\r\n\t\t\t\tMaterial material=(Material)objects[4];\r\n\t\t\t\tstockBean.setMaterialName(material.getMaterialName());\r\n\t\t\t\tstockBean.setStorageLocName(location.getStorageLocation());\r\n\t\t\t\tmatStockBeans.add(stockBean);\r\n\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t\t\t\r\n\t\t}\r\n\t\treturn matStockBeans;\r\n\t}", "List<InventoryItem> getInventory(String username);", "@Override\n\tpublic List<Article> getStock() {\n\t\treturn null;\n\t}", "int getItems(int index);", "public com.sbytestream.samples.grpc.stockservice.StockOrBuilder getStocksOrBuilder(\n int index) {\n return stocks_.get(index);\n }", "void getMarketOrders();", "private void getItemsInBasket(){\n Disposable disposable = mViewModel.getItemsInBasket()\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .doOnError(throwable -> Log.e(\"BasketFragment\",throwable.getMessage()))\n .subscribe(basketItems -> basketListAdapter.submitList(basketItems));\n mDisposable.add(disposable);\n }", "@Override\n\tpublic ArrayList<StockAlarmBillPO> getAllStockAlarmBill() throws RemoteException {\n\t\tArrayList<StockAlarmBillPO> list = new ArrayList<StockAlarmBillPO>();\n\t\tArrayList<StockAlarmBillItem> itemList = new ArrayList<StockAlarmBillItem>();\n\t\ttry {\t\n\t\t\tStatement statement_1 = con.createStatement();\t\n\t\t\tString sql_1 = \"select * from stockalarmbill\";\t\t\t\t\n\t\t\tResultSet rs = statement_1.executeQuery(sql_1);\n\t\t BillState state = null;\n\t\t String id = null;\t\t \n\t\t java.sql.Date date = null;\t\t \n\t\t String operatorID = null;\t\t \n\t\t String wareID = null;\n\t\t \n\t\t while(rs.next()){\n\t\t \tstate = BillState.getStateByInt(rs.getInt(\"State\"));\n\t\t \tid = rs.getString(\"ID\");\n\t\t \tdate = rs.getDate(\"Date\");\n\t\t \tjava.util.Date d = new java.util.Date(date.getTime());\n\t\t \toperatorID = rs.getString(\"OperatorID\");\n\t\t \twareID = rs.getString(\"WareID\");\n\t\t \t\n\t\t \tStatement statement_2 = con.createStatement();\t\n\t\t \t//��ȡ�����ݱ���������idΪ������\n\t\t \tString sql_2 = \"select * from stock\" + id;\t\t\n\t\t \tResultSet rs_2 = statement_2.executeQuery(sql_2);\n\t\t\t String number = null;\n\t\t\t String name = null;\n\t\t\t long amount = 0;\n\t\t\t long alarmAmount = 0;\n\t\t\t \n\t\t\t while(rs_2.next()) {\n\t\t\t \tnumber = rs_2.getString(\"Number\");\n\t\t\t \tname = rs_2.getString(\"Name\");\n\t\t\t \tamount = rs_2.getLong(\"Amount\");\n\t\t\t \talarmAmount = rs_2.getLong(\"AlarmAmount\");\n\t\t\t \t\n\t\t\t \tStockAlarmBillItem item = new StockAlarmBillItem(number, name, amount, alarmAmount);\n\t\t\t \titemList.add(item);\n\t\t\t }\t\t \t\t\t \n\t\t \tStockAlarmBillPO bill = new StockAlarmBillPO( id, itemList, state, d, operatorID, wareID);\n\t\t \tlist.add(bill);\t \n\t\t \trs_2.close();\n\t\t }\t \n\t\t rs.close();\n\t\t} catch(SQLException e) { \n\t\t\te.printStackTrace(); \t \n\t\t}catch (Exception e) { \n\t\t\te.printStackTrace();\t \n\t\t}\n\t\treturn list;\n\t}", "List<SimpleInventory> getInventories();", "private String getStock() {\n\t\treturn stock;\n\t}", "public void getRemoteItems() {\n url = getAllItemsOrderedByCategory;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItems(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "private static ArrayList<Integer> getkitchenStockQuantity(String kitchenName, ArrayList<OrderItemDetailsBean> orderItemDetailList){\n\t\tArrayList<Integer> stockInKitchen = new ArrayList<Integer>();\n\t\ttry {\n\t\t\tSQL:{\n\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\tPreparedStatement preparedStatement = null;\n\t\t\tResultSet resultSet = null;\n\t\t\tString sql= \"select category_stock from fapp_kitchen_stock \"\n\t\t\t\t\t+\" where kitchen_cuisine_id = ?\"\n\t\t\t\t\t+\" and kitchen_category_id = ?\"\n\t\t\t\t\t+\" and kitchen_id = (SELECT kitchen_id from fapp_kitchen where kitchen_name = ?) \";\n\t\t\ttry {\n\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\tfor(OrderItemDetailsBean items : orderItemDetailList){\n\t\t\t\t\tpreparedStatement.setInt(1, items.cuisineId);\n\t\t\t\t\tpreparedStatement.setInt(2, items.categoryId);\n\t\t\t\t\tpreparedStatement.setString(3, kitchenName);\n\n\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\tif (resultSet.next()) {\n\t\t\t\t\t\tstockInKitchen.add(resultSet.getInt(\"category_stock\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tSystem.out.println(\"ERROR DUE TO:\"+e.getMessage());\n\t\t\t\te.printStackTrace();\n\t\t\t}finally{\n\t\t\t\tif(connection != null){\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\n\t\t//System.out.println(\"Kitchen Stock list::\"+stockInKitchen);\n\t\treturn stockInKitchen;\n\t}", "public ArrayList<ItemModel> getAllProducts() {\n ArrayList<ItemModel> products = new ArrayList<ItemModel>();\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_SHOPPINGLIST, null);\n\n c.moveToFirst();\n Log.d(DatabaseHelper.class.getName(), \"getAllProducts:\");\n\n while (!c.isAfterLast()) {\n String product = String.valueOf(c.getInt(c.getColumnIndex(DBHelper.SHOPPINGLIST_PID)));\n String quantity=String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.SHOPPINGLIST_QUANTITY)));\n String unit = String.valueOf(c.getString(c.getColumnIndex(DBHelper.SHOPPINGLIST_UNIT)));\n int che = c.getInt(c.getColumnIndex(DBHelper.SHOPPINGLIST_CHECKMARK));\n boolean check;\n if (che==0) {check=Boolean.FALSE;} else {check = Boolean.TRUE;}\n\n ItemModel model = new ItemModel(product, quantity, unit, check);\n products.add(model);\n\n\n c.moveToNext();\n }\n\n db.close();\n\n for (ItemModel ph: products) {\n ph.setProduct(getNameByPID(Integer.parseInt(ph.getProductName())));\n Log.d(DatabaseHelper.class.getName(), \"\\tgetAllProducts:\" + ph.toString());\n }\n\n return products;\n }", "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "List<CatalogItem> getAllCatalogItems();", "public interface StockItem {\n String getSymbol();\n\n String getName();\n\n BigDecimal getValue();\n\n int getVolume();\n\n Date getLastTradeDateTime();\n\n BigDecimal getGains();\n\n BigDecimal getOpenValue();\n\n BigDecimal getCloseValue();\n}", "@Test\n public void testGetStock() {\n IStockParser parser;\n try {\n parser = ParserFactory.createStockParser(\"openones.webparser.stockparser.DVSCParser\");\n Collection<StockInfo> stockList = parser.getStockList(\"ACB\");\n for (StockInfo stock : stockList) {\n System.out.println(stock.getDate() + \";\" + stock.getRefPrice() + \";\" + stock.getCeilPrice() + \";\" +\n stock.getFloPrice() + \";\" + stock.getClosedPrice() + \";\" + stock.getVolume());\n }\n } catch (Exception ex) {\n // TODO Auto-generated catch block\n ex.printStackTrace();\n }\n \n \n }", "public StockManager()\n {\n stock = new ArrayList<>();\n }", "public java.util.List<? extends com.sbytestream.samples.grpc.stockservice.StockOrBuilder> \n getStocksOrBuilderList() {\n return stocks_;\n }", "List<String> getCompanySymbols() throws StorageException;", "@Override\n\tpublic List<Item> displayRecentItemsForBid() {\n\n\t\tArrayList<Item> al = null;\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = DBUtil.getConnection();\n\t\t\tPreparedStatement pst = con.prepareStatement(\"select item_id,category_name,item_name,description,last_date,start_bid_price,insertion_date,image_id1,image_id2,image_id3,seller_id,active_status,bid_status from item_info where active_status=1 and bid_status=1 ORDER BY insertion_date LIMIT 10\");\n\t\t\tResultSet rs = pst.executeQuery();\n\n\t\t\tif (rs.next()) {\n\n\t\t\t\tal = new ArrayList<Item>();\n\t\t\t\tdo {\n\t\t\t\t\tItem item = new Item(rs.getInt(1), rs.getString(2),\n\t\t\t\t\t\t\trs.getString(3), rs.getString(4), rs.getDate(5),\n\t\t\t\t\t\t\trs.getDouble(6), rs.getDate(7), new ItemImage(\n\t\t\t\t\t\t\t\t\trs.getInt(8)), new ItemImage(rs.getInt(9)),\n\t\t\t\t\t\t\tnew ItemImage(rs.getInt(10)), new User(\n\t\t\t\t\t\t\t\t\trs.getInt(11)), rs.getInt(12));\n\n\t\t\t\t\tal.add(item);\n\t\t\t\t} while (rs.next());\n\n\t\t\t}\n\t\t\trs.close();\n\t\t\tpst.close();\n\n\t\t} catch (Exception e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\tDBUtil.closeConnection(con);\n\t\treturn al;\n\t}", "@Override\n\tpublic List<Stock_out> getStock_outs() {\n\t\tList<Stock_out> list = stock_outDao.selectAllStock_out();\n\t\treturn list;\n\t}", "public List<AbstractProduct> getItemsOutOfStock() {\n return this.itemsOutOfStock;\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 static List<Item> loadItems(Statement st) {\n\t\tList<Item> items = new ArrayList<>();\n\t\tString sentSQL = \"\";\n\t\ttry {\n\t\t\tsentSQL = \"select * from items\";\n\t\t\tResultSet rs = st.executeQuery(sentSQL);\n\t\t\t// Iteramos sobre la tabla result set\n\t\t\t// El metodo next() pasa a la siguiente fila, y devuelve true si hay más filas\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tfloat timePerUnit = rs.getFloat(\"timeperunit\");\n\t\t\t\tItem item = new Item(id, name, timePerUnit);\n\t\t\t\titems.add(item);\n\t\t\t\tlog(Level.INFO,\"Fila leida: \" + item, null);\n\t\t\t}\n\t\t\tlog(Level.INFO, \"BD consultada: \" + sentSQL, null);\n\t\t} catch (SQLException e) {\n\t\t\tlog(Level.SEVERE, \"Error en BD\\t\" + sentSQL, e);\n\t\t\tlastError = e;\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn items;\n\t}", "public String listLowStock() {\r\n\t\tString toReturn = \"\";\r\n\t\ttoReturn = String.format(\"Warehouse Name: %s%nPhone Number: %s%nAddress: %s\", this.name, this.phone, this.address);\r\n\t\ttoReturn += String.format(\"%nInventory Stock:%n%-30s|%-15s|%-15s|%-20s|%-15s|%-10s\", \"Product Name\", \"Wholesale Cost\", \"Retail Price\", \"Product Category\", \"Quantity Sold\", \"In Stock\");\r\n\t\tLinkedList<HashMap.Entry<Integer, Integer>> entries = new LinkedList<HashMap.Entry<Integer, Integer>>(inventory.entrySet());\r\n\t\tCollections.sort(entries, HashMap.Entry.comparingByValue());\r\n\t\tIterator<HashMap.Entry<Integer, Integer>> iter = entries.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tHashMap.Entry<Integer, Integer> entry = iter.next();\r\n\t\t\tif(entry.getValue() >= 0 && entry.getValue() <= 5) {\r\n\t\t\t\tfor(Product p : Data.productArr) {\r\n\t\t\t\t\tif(p.getID() == entry.getKey()) {\r\n\t\t\t\t\t\ttoReturn += \"\\n\" + p.toString() + \"|\" + entry.getValue();\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 toReturn;\r\n\t}" ]
[ "0.811745", "0.7605986", "0.75879914", "0.7585479", "0.7330154", "0.7129368", "0.70513666", "0.7044229", "0.7036958", "0.7020333", "0.7013007", "0.69540966", "0.6904107", "0.68925565", "0.6877378", "0.67258626", "0.6703767", "0.6692618", "0.66748327", "0.6670948", "0.6642431", "0.66372764", "0.663324", "0.66296685", "0.6628678", "0.66213197", "0.6617554", "0.66126645", "0.6577554", "0.6544247", "0.65321815", "0.6530585", "0.6521103", "0.65045893", "0.6498772", "0.6496246", "0.6484934", "0.64346904", "0.64302427", "0.64219683", "0.64100385", "0.6319699", "0.6319339", "0.63181216", "0.6313477", "0.6310475", "0.6304859", "0.63029253", "0.6302024", "0.6282185", "0.62664706", "0.62598115", "0.6254803", "0.62541485", "0.6250561", "0.6246948", "0.6244604", "0.6243771", "0.62265676", "0.6221513", "0.6220295", "0.621191", "0.62112635", "0.62069684", "0.6185548", "0.61821944", "0.61771715", "0.61659926", "0.6158348", "0.6152363", "0.6150271", "0.61485815", "0.6145431", "0.6145228", "0.6127605", "0.6105183", "0.60966444", "0.6093924", "0.608981", "0.6084561", "0.6081812", "0.608095", "0.6070991", "0.60667974", "0.6064813", "0.60639775", "0.6048106", "0.6038365", "0.60368675", "0.6018616", "0.60159093", "0.601532", "0.6012504", "0.60112965", "0.5997494", "0.59970486", "0.5995981", "0.59938973", "0.59883845", "0.59850657", "0.5977523" ]
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String savePath = request.getServletContext().getRealPath("/") + "images"; File fileSaveDir=new File(savePath); if(!fileSaveDir.exists()){ fileSaveDir.mkdir(); } Part imagePart = request.getPart("photo"); String fileName = extractFileName(imagePart); String fileLocalPath = File.separator + fileName; imagePart.write(savePath + fileLocalPath); String description = request.getParameter("description"); Conexion c=new Conexion(); Connection con=c.getConexion(); CallableStatement cs = null; try{ String query = "call sp_pv_insertPost(?,?,1)"; cs = con.prepareCall(query); cs.setString(1, fileLocalPath); cs.setString(2, description); cs.execute(); }catch(SQLException e){ e.printStackTrace(); }finally{ BDUtil.cerrarStatement(cs); c.cerrarConexion(); } response.setContentType("text/plain"); response.setCharacterEncoding("UTF-8"); response.getWriter().write("success"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public String post();", "@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }", "protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }", "public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}", "public void postData() {\n\n\t}", "@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}", "@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public abstract boolean handlePost(FORM form, BindException errors) throws Exception;", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}", "public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "public void post(){\n\t\tHttpClient client = new HttpClient();\n\n\t\tPostMethod post = new PostMethod(\"http://211.138.245.85:8000/sso/POST\");\n//\t\tPostMethod post = new PostMethod(\"/eshopclient/product/show.do?id=111655\");\n//\t\tpost.addRequestHeader(\"Cookie\", cookieHead);\n\n\n\t\ttry {\n\t\t\tSystem.out.println(\"��������====\");\n\t\t\tint status = client.executeMethod(post);\n\t\t\tSystem.out.println(status);\n\t\t} catch (HttpException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n//\t\ttaskCount++;\n//\t\tcountDown--;\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest req, HttpServletResponse resp, Object handler, ModelAndView m)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}", "@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "@Override\n\tvoid post() {\n\t\t\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString method = request.getParameter(\"method\");\n\t\tswitch(method){\n\t\tcase \"Crawl\":\n\t\t\tcrawl(request, response);\n\t\t\tbreak;\n\t\tcase \"Extract\":\n\t\t\textract(request, response);\n\t\t\tbreak;\n\t\tcase \"JDBC\":\n\t\t\tjdbc(request, response);\n\t\t\tbreak;\n\t\tcase \"Indexer\":\n\t\t\tindexer(request, response);\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }", "protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}", "public void handlePost(SessionSrvc session, IObjectContext context)\n throws Exception\n {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tdoGet(request, response);\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }", "@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler, ModelAndView modelAndView) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoHandle(request, response);\n\t}", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n public void postHandle(HttpServletRequest request,\n HttpServletResponse response, Object handler,\n ModelAndView modelAndView) throws Exception {\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(PedidoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }" ]
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197", "0.6515622", "0.6513045", "0.6512626", "0.6492367", "0.64817846", "0.6477479", "0.64725804", "0.6472099", "0.6469389", "0.6456206", "0.6452577", "0.6452577", "0.6452577", "0.6450273", "0.6450273", "0.6438126", "0.6437522", "0.64339423", "0.64253825", "0.6422238", "0.6420897", "0.6420897", "0.6420897", "0.6407662", "0.64041835", "0.64041835", "0.639631", "0.6395677", "0.6354875", "0.63334197", "0.6324263", "0.62959254", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6280875", "0.6272104", "0.6272104", "0.62711537", "0.62616795", "0.62544584", "0.6251865", "0.62274224", "0.6214439", "0.62137586", "0.621211", "0.620854", "0.62023044", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61638993", "0.61603814", "0.6148914", "0.61465937", "0.61465937", "0.614548", "0.6141879", "0.6136717", "0.61313903", "0.61300284", "0.6124381", "0.6118381", "0.6118128", "0.61063534", "0.60992104", "0.6098801", "0.6096766" ]
0.0
-1
file name of the upload file is included in contentdisposition header like this: formdata; name="dataFile"; filename="PHOTO.JPG"
private String extractFileName(Part part) { String contentDisp = part.getHeader("content-disposition"); String[] items = contentDisp.split(";"); for (String s : items) { if (s.trim().startsWith("filename")) { return s.substring(s.indexOf("=") + 2, s.length()-1); } } return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setContentDispositionFormData(String name, String filename)\r\n/* 162: */ {\r\n/* 163:245 */ Assert.notNull(name, \"'name' must not be null\");\r\n/* 164:246 */ StringBuilder builder = new StringBuilder(\"form-data; name=\\\"\");\r\n/* 165:247 */ builder.append(name).append('\"');\r\n/* 166:248 */ if (filename != null)\r\n/* 167: */ {\r\n/* 168:249 */ builder.append(\"; filename=\\\"\");\r\n/* 169:250 */ builder.append(filename).append('\"');\r\n/* 170: */ }\r\n/* 171:252 */ set(\"Content-Disposition\", builder.toString());\r\n/* 172: */ }", "private String extractFileName(Part part) {\n\nString contentDisp = part.getHeader(\"content-disposition\");\n\nString[] items = contentDisp.split(\";\");\n\nfor (String s : items) {\n\nif (s.trim().startsWith(\"filename\")) {\n\nreturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\n}\n\n}\n\nreturn \"\";\n\n}", "@Override\r\n public String getCustomContentDisposition() {\r\n return FilenameUtils.getName(this.imagePath);\r\n }", "private String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length()-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "private void getFileName() {\n\t\tHeader contentHeader = response.getFirstHeader(\"Content-Disposition\");\n\t\tthis.filename = null;\n\t\tif (contentHeader != null) {\n\t\t\tHeaderElement[] values = contentHeader.getElements();\n\t\t\tif (values.length == 1) {\n\t\t\t\tNameValuePair param = values[0].getParameterByName(\"filename\");\n\t\t\t\tif (param != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfilename = param.getValue();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.filename == null) {\n\t\t\tthis.filename = url.substring(url.lastIndexOf(\"/\") + 1);\n\t\t}\n\t}", "private String extractFileName(Part part) {\n String contentDisp = part.getHeader(\"content-disposition\");\n String[] items = contentDisp.split(\";\");\n for (String s : items) {\n if (s.trim().startsWith(\"filename\")) {\n return s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n }\n }\n return \"\";\n }", "@Test\r\n\tpublic void getFileName() {\n\t\tString test = \"form-data; name=\\\"uploadFile\\\"; filename=\\\"james.png\\\"\";\r\n\r\n\t\t/***When***/\r\n\t\tString result = futil.getFileName(test);\r\n\t\t/***Then***/\r\n\t\t//assertEquals(\"sally.png\", result);\r\n\t\tassertEquals(\"james.png\", result);\r\n\r\n\t}", "private String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static String getFileName(Part part) {\n final String partHeader = part.getHeader(\"content-disposition\");\n for (String content : part.getHeader(\"content-disposition\").split(\";\")) {\n if (content.trim().startsWith(\"filename\")) {\n return content.substring(content.indexOf('=') + 1).trim()\n .replace(\"\\\"\", \"\");\n }\n }\n return \"\";\n }", "public String extractFileName(Part part) {\r\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\r\n\t\tString[] items = contentDisp.split(\";\");\r\n\t\tfor (String s : items) {\r\n\t\t\tif (s.trim().startsWith(\"filename\")) {\r\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "private String extractFileName(final Part part) {\n\t\tfinal String contentDisp = part.getHeader(\"content-disposition\");\n\t\tfinal String[] items = contentDisp.split(\";\");\n\t\tfor (final String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\treturn s.substring(s.indexOf(\"=\") + 2, s.length()-1);\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "private String extractFileName(Part part) {\n\t String contentDisp = part.getHeader(\"content-disposition\");\r\n\t String[] items = contentDisp.split(\";\");\r\n\t for (String s : items) {\r\n\t if (s.trim().startsWith(\"filename\")) {\r\n\t // C:\\file1.zip\r\n\t // C:\\Note\\file2.zip\r\n\t String clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t clientFileName = clientFileName.replace(\"\\\\\", \"/\");\r\n\t int i = clientFileName.lastIndexOf('/');\r\n\t // file1.zip\r\n\t // file2.zip\r\n\t return clientFileName.substring(i + 1);\r\n\t }\r\n\t }\r\n\t return null;\r\n\t }", "private final String getFileHeader(int index, String bound,\n @SuppressWarnings(\"unused\")\n int chunkPart) throws JUploadException {\n String filenameEncoding = this.uploadPolicy.getFilenameEncoding();\n String mimetype = this.filesToUpload[index].getMimeType();\n String uploadFilename = this.filesToUpload[index]\n .getUploadFilename(index);\n StringBuffer sb = new StringBuffer();\n \n String form = this.uploadPolicy.getFormdata();\n if (null != form)\n sb.append(addFormVariables(bound, form));\n sb.append(addPostVariable(bound, \"mimetype[]\", mimetype));\n sb.append(addPostVariable(bound, \"pathinfo[]\",\n this.filesToUpload[index].getDirectory()));\n sb.append(addPostVariable(bound, \"relpathinfo[]\",\n this.filesToUpload[index].getRelativeDir()));\n \n // boundary.\n sb.append(bound).append(\"\\r\\n\");\n \n // Content-Disposition.\n sb.append(\"Content-Disposition: form-data; name=\\\"\").append(\n this.filesToUpload[index].getUploadName(index)).append(\n \"\\\"; filename=\\\"\");\n if (filenameEncoding == null) {\n sb.append(uploadFilename);\n } else {\n try {\n this.uploadPolicy.displayDebug(\"Encoded filename: \"\n + URLEncoder.encode(uploadFilename, filenameEncoding),\n 99);\n sb.append(URLEncoder.encode(uploadFilename, filenameEncoding));\n } catch (UnsupportedEncodingException e) {\n this.uploadPolicy\n .displayWarn(e.getClass().getName() + \": \"\n + e.getMessage()\n + \" (in UploadFileData.getFileHeader)\");\n sb.append(uploadFilename);\n }\n }\n sb.append(\"\\\"\\r\\n\");\n \n // Line 3: Content-Type.\n sb.append(\"Content-Type: \").append(mimetype).append(\"\\r\\n\");\n \n // An empty line to finish the header.\n sb.append(\"\\r\\n\");\n return sb.toString();\n }", "private void doMultipartFormDataPostRequest(String token, String url, byte[] fileData, String filename) throws Exception {\n\n\n CloseableHttpClient client = HttpClients.createDefault();\n\n try {\n HttpPost httpPost = new HttpPost(getBaseUrl() + url );\n httpPost.setHeader(\"X-Authentication\", token);\n\n\n MultipartEntityBuilder multipartBuilder = MultipartEntityBuilder.create();\n\n if (fileData == null || fileData.length <= 0) {\n throw new MfilesOperationException(\"The byte array must not be null\");\n }\n\n if (StringUtils.isBlank(filename)) {\n throw new MfilesOperationException( \"Filename must not be blank or null...\" );\n }\n\n File tempDir = FileUtils.getTempDirectory();\n String reversedFilename = StringUtils.reverse(filename);\n //get the first '.'\n int dotIndex = reversedFilename.indexOf('.');\n String extension = reversedFilename.substring(0, (dotIndex + 1));\n extension = StringUtils.reverse(extension);\n\n //Generate a random string to append to the name of the file\n //We do this to prevent a situation whereby multiple users\n //upload files that have the same name and extension.\n String tempFileName = filename.substring(0, filename.length() - extension.length()) + \"_\" + System.currentTimeMillis();\n\n tempFileName += extension;\n\n final File fileToUpload = new File(tempDir + File.separator + tempFileName);\n\n try {\n FileUtils.writeByteArrayToFile(fileToUpload, fileData);\n }catch(Exception ex) {\n LOG.error(\"An exception occurred while writing byte array data to the file for upload\", ex);\n throw new MfilesOperationException(ex.getMessage());\n } finally {\n\n }\n\n final FileBody fileBody = new FileBody(fileToUpload);\n\n multipartBuilder.addPart(\"file\", fileBody);\n\n //OR\n //multipartBuilder.addBinaryBody(\"file\", file, ContentType.APPLICATION_OCTET_STREAM, \"file.ext\");\n\n org.apache.http.HttpEntity multipart = multipartBuilder.build();\n httpPost.setEntity(multipart);\n\n System.out.println(\"executing file upload request \" + httpPost.getRequestLine());\n\n CloseableHttpResponse response = client.execute(httpPost);\n try {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"---------Response from server-----------\");\n System.out.println(response.getStatusLine());\n System.out.println(\"----------------------------------------\");\n\n org.apache.http.HttpEntity resEntity = response.getEntity();\n if (resEntity != null) {\n BufferedReader br = new BufferedReader(new InputStreamReader(resEntity.getContent()));\n String output = null;\n\n while ((output = br.readLine()) != null) {\n System.out.println(output);\n }\n }\n\n EntityUtils.consume(resEntity);\n\n } finally {\n response.close();\n }\n } finally {\n client.close();\n }\n }", "private void buildPart(DataOutputStream dataOutputStream, byte[] fileData, String fileName) throws IOException {\n dataOutputStream.writeBytes(twoHyphens + boundary + lineEnd);\n dataOutputStream.writeBytes(\"Content-Disposition: form-data; name=\\\"image\\\"; filename=\\\"\" + fileName + \"\\\"\" + lineEnd);\n // dataOutputStream.writeBytes(\"Content-Type: image/jpeg\" + lineEnd);\n dataOutputStream.writeBytes(lineEnd);\n\n ByteArrayInputStream fileInputStream = new ByteArrayInputStream(fileData);\n int bytesAvailable = fileInputStream.available();\n\n int maxBufferSize = 1024 * 1024;\n int bufferSize = Math.min(bytesAvailable, maxBufferSize);\n byte[] buffer = new byte[bufferSize];\n\n // read file and write it into form...\n int bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n\n while (bytesRead > 0) {\n dataOutputStream.write(buffer, 0, bufferSize);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n dataOutputStream.writeBytes(lineEnd);\n }", "String getContentDisposition();", "private String extractFileName(Part part) {\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\n\t\tString[] items = contentDisp.split(\";\");\n\t\tfor (String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\t// C:\\file1.zip\n\t\t\t\t// C:\\Note\\file2.zip\n\t\t\t\tString clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\t\t\t\tclientFileName = clientFileName.replace(\"\\\\\", \"/\");\n\t\t\t\tint i = clientFileName.lastIndexOf('/');\n\t\t\t\t// file1.zip\n\t\t\t\t// file2.zip\n\t\t\t\treturn clientFileName.substring(i + 1);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private String extractFileName(Part part) {\n\t\tString contentDisp = part.getHeader(\"content-disposition\");\n\t\tString[] items = contentDisp.split(\";\");\n\t\tfor (String s : items) {\n\t\t\tif (s.trim().startsWith(\"filename\")) {\n\t\t\t\t// C:\\file1.zip\n\t\t\t\t// C:\\Note\\file2.zip\n\t\t\t\tString clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\n\t\t\t\tclientFileName = clientFileName.replace(\"\\\\\", \"/\");\n\t\t\t\tint i = clientFileName.lastIndexOf('/');\n\t\t\t\t// file1.zip\n\t\t\t\t// file2.zip\n\t\t\t\treturn clientFileName.substring(i + 1);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public String getServletInfo() {\n return \"Handles file upload data from application/octet-stream, and multipart/form-data.\";\n }", "public void setContentDisposition\n (ContentDispositionHeader contentDispositionHeader) {\n this.setHeader( contentDispositionHeader);\n \n }", "@Override\n\t\t\tpublic void onSubmit(FormSubmitEvent event) {\n\t\t\t\tontName = fileUpload.getFilename().substring(fileUpload.getFilename().lastIndexOf('\\\\') + 1);\n\n\t\t\t}", "public void addFilePart(String fieldName, File uploadFile)\n throws IOException {\n String fileName = uploadFile.getName();\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\n \"Content-Disposition: form-data; name=\\\"\" + fieldName\n + \"\\\"; filename=\\\"\" + fileName + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\n \"Content-Type: \"\n + URLConnection.guessContentTypeFromName(fileName))\n .append(LINE_FEED);\n writer.append(\"Content-Transfer-Encoding: binary\").append(LINE_FEED);\n writer.append(LINE_FEED);\n writer.flush();\n\n FileInputStream inputStream = new FileInputStream(uploadFile);\n byte[] buffer = new byte[4096];\n int bytesRead = -1;\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n }\n outputStream.flush();\n inputStream.close();\n\n writer.append(LINE_FEED);\n writer.flush();\n }", "public String getContentDisposition() {\n return contentdisposition;\n }", "void whenUploadFile(MultipartFile file, HttpServletRequest request);", "public static String saveFile( MultipartFile filedata, HttpServletRequest request) {\n String pathval = \"C://KCGLIMG//\";\n String newFileName = String.valueOf( System.currentTimeMillis());\n String saveFilePath = \"images//equipment//\";\n\n File fileDir = new File(pathval + saveFilePath);\n if (!fileDir.exists()) {\n fileDir.mkdirs();\n }\n\n String filename=filedata.getOriginalFilename();\n\n String extensionName = filename.substring(filename.lastIndexOf(\".\") + 1);\n try {\n String imgPath = saveFilePath + newFileName + \".\" +extensionName;\n System.out.println(pathval + imgPath);\n FileOutputStream out = new FileOutputStream(pathval + imgPath);\n \n out.write(filedata.getBytes());\n out.flush();\n out.close();\n\n String path=pathval+imgPath;\n return path;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String,String> params = new HashMap<String, String>();\n\n params.put(\"Content-Type\", \"multipart/form-data; boundary=\" + BOUNDARY+\"; charset=utf-8\");\n return params;\n }", "public static String getFilename(String pathfilename){\r\n\t\tString nameOfTheFile=pathfilename;\r\n\t\tboolean contentDisposition = false;\r\n\t\tString fileName;\r\n\t\tString parts[];\r\n\t\ttry {\r\n\t\t\tURL urlObj = new URL(pathfilename);\r\n\t\t\tURLConnection con = urlObj.openConnection();\r\n\t\t\tif(con.getHeaderField(\"Content-Disposition\")!=null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tparts = con.getHeaderField(\"Content-Disposition\").split(\"filename=\");\r\n\t\t\t\t\tnameOfTheFile = parts[1].replace(\"\\\"\", \"\");\r\n\t\t\t\t\tcontentDisposition=true;\r\n\t\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t\t}\r\n\t\t\tif (contentDisposition==false){\r\n\t\t\t\t\tString urlPath = urlObj.getPath();\r\n\t\t\t\t\tif (!urlPath.endsWith(\"/\") && !urlPath.isEmpty()) {\r\n\t\t\t\t\t\tfileName = urlPath.substring(urlPath.lastIndexOf('/')+1).split(\":\")[0].trim();\r\n\t\t\t\t\t} else if (urlPath.endsWith(\"/\") && urlPath.length()>21){\r\n\t\t\t\t\t\tfileName = urlPath.substring(urlPath.lastIndexOf('/')-20).split(\"/\")[0].split(\":\")[0].trim();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfileName = \"index\" + urlObj.getHost();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString ext = con.getContentType();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\text = ext.substring(ext.lastIndexOf('/')+1).split(\";\")[0];\r\n\t\t\t\t\t} catch (Exception e) {ext = null;}\r\n\t\t\t\t\tif(ext!=null && !ext.equals(\"unknown\")) {\r\n\t\t\t\t\t\tif (!fileName.matches(\"[a-zA-Z0-9]*[.][a-zA-Z]+\")) {\r\n\t\t\t\t\t\t\tnameOfTheFile = fileName+\".\"+ext;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnameOfTheFile = fileName;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch(Exception e) {e.printStackTrace();}\r\n\t\treturn nameOfTheFile;\r\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n int geekid = Integer.parseInt(request.getParameter(\"geekid\"));\n if (ServletFileUpload.isMultipartContent(request)) {\n try {\n\n List<FileItem> multiparts = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);\n\n for (FileItem item : multiparts) {\n\n if (!item.isFormField()) {\n item.write(new File(UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\"));\n\n }\n \n String fileName = UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\";\n\n }\n\n //File uploaded successfully\n request.setAttribute(\"message\", \"File Uploaded Successfully\");\n\n } catch (Exception ex) {\n\n request.setAttribute(\"message\", \"File Upload Failed due to \" + ex);\n\n }\n\n } else {\n\n request.setAttribute(\"message\",\n \"Sorry this Servlet only handles file upload request\");\n\n }\n\n request.getRequestDispatcher(\"/result.jsp\").forward(request, response);\n\n }", "public String getContentDisposition() throws Exception {\r\n if (externalUrl != null) {\r\n AmazonS3URI s3Uri = DirectUtils.getS3Uri(externalUrl);\r\n if (s3Uri != null) {\r\n return \"attachment; filename=\\\"submission-\" + submission.getId() + \"-\" + DirectUtils.getS3FileKey(externalUrl) + \"\\\"\";\r\n }\r\n return \"attachment; filename=\\\"submission-\" + submission.getId() + \"-\" + DirectUtils.getFileNameFromUrl(externalUrl) + \"\\\"\";\r\n }\r\n\r\n if (contest.getProjectHeader().getProjectCategory().getId() == ContestType.COPILOT_POSTING.getId()) {\r\n // it's copilot posting, append user handle to each file in the copilot posting submission\r\n Resource[] resources = contest.getResources();\r\n long userId = 0;\r\n for (Resource r : resources) {\r\n if (r.getId() == submission.getUpload().getOwner()) {\r\n userId = Long.parseLong(r.getProperty(\"External Reference ID\"));\r\n break;\r\n }\r\n }\r\n return \"attachment; filename=\\\"submission-\" + getUserService().getUserHandle(userId) + \"-\" +\r\n uploadedFile.getRemoteFileName()\r\n + \"\\\"\";\r\n } else {\r\n return \"attachment; filename=\\\"submission-\" + submission.getId() + \"-\" + uploadedFile.getRemoteFileName()\r\n + \"\\\"\";\r\n }\r\n }", "public String getContentDisposition() {\n return this.contentDisposition;\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1) {\n if (resultCode == Activity.RESULT_OK) {\n Uri selectedFileURI = data.getData();\n File file = new File(selectedFileURI.getPath().toString());\n Log.d(\"\", \"File :::::::: \" + file.getName());\n //CallUploadResults();\n }\n }\n }", "public void setAttachmentHeader(String filename)\n\t{\n\t\tsetHeader(\"Content-Disposition\", \"attachment\"\n\t\t\t\t+ ((!Strings.isEmpty(filename)) ? (\"; filename=\\\"\" + filename + \"\\\"\") : \"\"));\n\t}", "@Override\n\tpublic String Filename(File upload, String uploadFileName, String path) {\n\t\tString x=fdi.Filename(upload, uploadFileName, path);\n\t\treturn x;\n\t}", "static public String postFile(String url, String userid, String fieldName, File textFile) throws Exception {\r\n // String param = \"value\";\r\n // File textFile = new File(\"/path/to/file.txt\");\r\n // File binaryFile = new File(\"/path/to/file.bin\");\r\n String boundary = Long.toHexString(System.currentTimeMillis()); // Just\r\n // generate\r\n // some\r\n // unique\r\n // random\r\n // value.\r\n String CRLF = \"\\r\\n\"; // Line separator required by multipart/form-data.\r\n\r\n URLConnection connection = new URL(url).openConnection();\r\n connection.setDoOutput(true);\r\n connection.setRequestProperty(\"Content-Type\", \"multipart/form-data; boundary=\" + boundary);\r\n PrintWriter writer = null;\r\n try {\r\n String charset = \"ISO-8859-1\"; // was ISO-8859-1\r\n OutputStream output = connection.getOutputStream();\r\n writer = new PrintWriter(new OutputStreamWriter(output, charset), true); // true\r\n // =\r\n // autoFlush,\r\n // important!\r\n\r\n // Send text file.\r\n writer.append(\"--\" + boundary).append(CRLF);\r\n writer.append(\"Content-Disposition: form-data; name=\\\"\" + fieldName + \"\\\"; filename=\\\"\" + textFile.getName() + \"\\\"\").append(CRLF);\r\n writer.append(\"Content-Type: text/plain; charset=\" + charset).append(CRLF);\r\n writer.append(CRLF).flush();\r\n BufferedReader reader = null;\r\n try {\r\n reader = new BufferedReader(new InputStreamReader(new FileInputStream(textFile), charset));\r\n for (String line; (line = reader.readLine()) != null;) {\r\n writer.append(line).append(CRLF);\r\n }\r\n } finally {\r\n if (reader != null)\r\n try {\r\n reader.close();\r\n } catch (IOException logOrIgnore) {\r\n }\r\n }\r\n\r\n // Send normal param.\r\n\r\n writer.append(\"--\" + boundary).append(CRLF);\r\n writer.append(\"Content-Disposition: form-data; name=\\\"user\\\"\").append(CRLF);\r\n writer.append(\"Content-Type: text/plain; charset=\" + charset).append(CRLF);\r\n writer.append(CRLF);\r\n writer.append(userid).append(CRLF).flush();\r\n\r\n writer.flush();\r\n\r\n /*\r\n * // Send binary file. writer.append(\"--\" + boundary).append(CRLF);\r\n * writer.append(\r\n * \"Content-Disposition: form-data; name=\\\"binaryFile\\\"; filename=\\\"\" +\r\n * binaryFile.getName() + \"\\\"\").append(CRLF); writer.append(\r\n * \"Content-Type: \" + URLConnection.guessContentTypeFromName\r\n * (binaryFile.getName())).append(CRLF); writer.append(\r\n * \"Content-Transfer-Encoding: binary\").append(CRLF);\r\n * writer.append(CRLF).flush(); InputStream input = null; try { input =\r\n * new FileInputStream(binaryFile); byte[] buffer = new byte[1024]; for\r\n * (int length = 0; (length = input.read(buffer)) > 0;) {\r\n * output.write(buffer, 0, length); } output.flush(); // Important! Output\r\n * cannot be closed. Close of writer will close output as well. } finally\r\n * { if (input != null) try { input.close(); } catch (IOException\r\n * logOrIgnore) {} } writer.append(CRLF).flush(); // CRLF is important! It\r\n * indicates end of binary boundary.\r\n */\r\n\r\n // End of multipart/form-data.\r\n writer.append(\"--\" + boundary + \"--\").append(CRLF);\r\n writer.append(CRLF).flush(); // CRLF is important! It indicates end\r\n // of binary boundary.\r\n\r\n byte[] data;\r\n InputStream in = null;\r\n in = new BufferedInputStream(connection.getInputStream());\r\n ByteArrayOutputStream bos = new ByteArrayOutputStream(16384);\r\n try {\r\n\r\n int BUFFER_SIZE = 16384;\r\n byte[] tmp = new byte[BUFFER_SIZE];\r\n int ret;\r\n while ((ret = in.read(tmp)) > 0) {\r\n bos.write(tmp, 0, ret);\r\n }\r\n } catch (IOException e) {\r\n Logging.logError(e);\r\n }\r\n\r\n data = bos.toByteArray();\r\n log.info(\"read {} bytes\", data.length);\r\n\r\n String s = new String(data);\r\n log.info(s);\r\n try {\r\n in.close();\r\n } catch (IOException e) {\r\n // don't care\r\n }\r\n\r\n return s;\r\n\r\n } finally {\r\n if (writer != null)\r\n writer.close();\r\n }\r\n }", "private byte[] getFileNameBytes(File photo) {\r\n return photo.getName().getBytes();\r\n }", "private String generateFileName(MultipartFile multiPart) {\n return new Date().getTime() + \"-\" + multiPart.getOriginalFilename().replace(\" \", \"_\");\n }", "public String GetFileName() {\r\n\treturn fileName;\r\n }", "public String getFILE_NAME() { return FILE_NAME; }", "public ShareFileHttpHeaders setContentDisposition(String contentDisposition) {\n this.contentDisposition = contentDisposition;\n return this;\n }", "private void fileUpload(HttpServletRequest request, HttpServletResponse response) {\n\t \ttry {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * String appPath = request.getServletContext().getRealPath(\"\");\r\n\t\t\t\t\t * System.out.println(appPath); String savePath = appPath + File.separator +\r\n\t\t\t\t\t * SAVE_DIR; System.out.println(savePath);\r\n\t\t\t\t\t */\r\n\t \t\t\r\n\t \t\t//String appPath = getServletContext().getRealPath(SAVE_DIR);\r\n\t \t\tSystem.out.println(appPath);\r\n\t \t\t String savePath = appPath + \"//\" +SAVE_DIR; \r\n\t \t\t System.out.println(savePath);\r\n\t\t\t\t\t\tCollection<Part>cp= request.getParts();\r\n\t \t String fileName = up.fileUpload(cp,appPath);\r\n\t \t System.out.println(fileName);\r\n\t \t \r\n\t \t request.setAttribute(\"message\", \"The file \"+fileName+\" has been uploaded successfully!\");\r\n\t \t RequestDispatcher dispatcher = request.getRequestDispatcher(\"success.jsp\");\r\n\t \t dispatcher.forward(request, response);\r\n\t}catch(Exception ex) {\r\n System.out.println(ex);\r\n }\r\n\t }", "public void uploadFile() {\n \n InputStream input = null;\n try {\n input = file.getInputStream();\n System.out.println(\"chay qua inpustream\");\n String itemName = file.getSubmittedFileName();\n String filename = itemName.substring(\n itemName.lastIndexOf(\"\\\\\") + 1);\n String dirPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/upload/images\");\n fileNamed = \"/upload/images/\"+filename;\n File f = new File(dirPath + \"\\\\\" + filename);\n if (!f.exists()) {\n f.createNewFile();\n }\n FileOutputStream output = new FileOutputStream(f);\n byte[] buffer = new byte[1024];\n int length;\n while ((length = input.read(buffer)) > 0) {\n output.write(buffer, 0, length);\n }\n // resize(dirPath + \"\\\\\" + filename, dirPath + \"\\\\\" + filename, 200, 200);\n input.close();\n output.close();\n } catch (IOException ex) {\n System.out.println(\"loi io\");\n Logger.getLogger(ArtistsManagedBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private String createHeadersAsDisposition()\r\n {\r\n StringBuffer buff = new StringBuffer();\r\n boolean first = true;\r\n for (Iterator iterator = getHeaders().entrySet().iterator(); iterator.hasNext();)\r\n {\r\n Map.Entry header = (Map.Entry)iterator.next();\r\n String hName = (String)header.getKey();\r\n if ( !hName.equalsIgnoreCase(AeMimeUtil.CONTENT_TYPE_ATTRIBUTE) )\r\n {\r\n if ( first )\r\n first = false;\r\n else\r\n buff.append(CRLF);\r\n buff.append(hName).append(\": \").append((String)header.getValue()); //$NON-NLS-1$/\r\n }\r\n }\r\n return buff.toString();\r\n }", "public String getOriginalFileName();", "public Enumeration<String> getFileParameterNames() {\n return this.multipart.getFileNames();\n }", "public int uploadFile(String sourceFileUri) {\n String fileName = sourceFileUri;\n\n HttpURLConnection conn = null;\n DataOutputStream dos = null;\n\n String lineEnd = \"\\r\\n\";\n String twoHyphens = \"--\";\n String boundary = \"*****\";\n\n int bytesRead, bytesAvailable, bufferSize;\n byte[] buffer;\n int maxBufferSize = 1 * 1024 * 1024;\n File sourceFile = new File(sourceFileUri);\n\n if (!sourceFile.isFile()) {\n Log.e(\"uploadFile\", \"Source File not exist :\"\n +uploadFilePath);\n return 0;\n }\n else\n {\n try {\n // open a URL connection to the Servlet\n FileInputStream fileInputStream = new FileInputStream(sourceFile);\n URL url = new URL(upLoadServerUri);\n\n ///\n fileName = fileName.substring(fileName.lastIndexOf(\"/\") +1);\n ///\n\n // Open a HTTP connection to the URL\n conn = (HttpURLConnection) url.openConnection();\n conn.setDoInput(true); // Allow Inputs\n conn.setDoOutput(true); // Allow Outputs\n conn.setUseCaches(false); // Don't use a Cached Copy\n conn.setRequestMethod(\"POST\");\n conn.setRequestProperty(\"Connection\", \"Keep-Alive\");\n conn.setRequestProperty(\"ENCTYPE\", \"multipart/form-data\");\n conn.setRequestProperty(\"Content-Type\", \"multipart/form-data;boundary=\" + boundary);\n conn.setRequestProperty(\"uploaded_file\", fileName);\n\n dos = new DataOutputStream(conn.getOutputStream());\n dos.writeBytes(twoHyphens + boundary + lineEnd);\n dos.writeBytes(\"Content-Disposition: form-data; name=\\\"uploaded_file\\\";filename=\\\"\"\n + fileName + \"\\\"\" + lineEnd);\n dos.writeBytes(lineEnd);\n\n // create a buffer of maximum size\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n buffer = new byte[bufferSize];\n\n // read file and write it into form...\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n while (bytesRead > 0) {\n dos.write(buffer, 0, bufferSize);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n\n // send multipart form data necesssary after file data...\n dos.writeBytes(lineEnd);\n dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);\n\n // Responses from the server (code and message)\n serverResponseCode = conn.getResponseCode();\n String serverResponseMessage = conn.getResponseMessage();\n\n Log.i(\"uploadFile\", \"HTTP Response is : \"\n + serverResponseMessage + \": \" + serverResponseCode);\n\n if(serverResponseCode == 200){\n runOnUiThread(new Runnable() {\n public void run() {\n Toast.makeText(Ui_Main_Activity.Context_UiMainActivity, \"File Upload Complete.\", Toast.LENGTH_SHORT).show();\n finish();\n }\n });\n }\n\n //close the streams //\n fileInputStream.close();\n dos.flush();\n dos.close();\n\n } catch (MalformedURLException ex) {\n ex.printStackTrace();\n runOnUiThread(new Runnable() {\n public void run() {\n Toast.makeText(Ui_Main_Activity.Context_UiMainActivity, \"MalformedURLException\",\n Toast.LENGTH_SHORT).show();\n }\n });\n\n Log.e(\"Upload file to server\", \"error: \" + ex.getMessage(), ex);\n } catch (Exception e) {\n e.printStackTrace();\n runOnUiThread(new Runnable() {\n public void run() {\n Toast.makeText(Ui_Main_Activity.Context_UiMainActivity, \"Got Exception : see logcat \", Toast.LENGTH_SHORT).show();\n }\n });\n Log.e(\"Upload file Exception\", \"Exception : \" + e.getMessage(), e);\n }\n return serverResponseCode;\n } // End else block\n }", "public static String createContentDisposition(String value, String filename) {\n try {\n return String.format(\"%s;filename=\\\"%2$s\\\"; filename*=UTF-8''%2$s\", value, encodeURI(filename));\n }\n catch (UnsupportedEncodingException e) {\n throw new FacesException(e);\n }\n }", "public HttpRequest a(String str, String str2, String str3) throws IOException {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"form-data; name=\\\"\");\n stringBuilder.append(str);\n if (str2 != null) {\n stringBuilder.append(\"\\\"; filename=\\\"\");\n stringBuilder.append(str2);\n }\n stringBuilder.append('\\\"');\n f(\"Content-Disposition\", stringBuilder.toString());\n if (str3 != null) {\n f(\"Content-Type\", str3);\n }\n return f((CharSequence) \"\\r\\n\");\n }", "public String getFileName(String request) {\n\t\tString fileName = request.substring(request.indexOf('/') + 1, request.indexOf(\" HTTP\", (request.indexOf('/'))));\n\t\tSystem.out.println(\"Filename is: \" + fileName);\n\n\t\treturn fileName;\n\t}", "private String getUploadFileName() {\r\n\t\tJFileChooser fc = new JFileChooser(\"./\");\r\n\t\tint returnVal = fc.showOpenDialog(this);\r\n\t\tif (returnVal != JFileChooser.APPROVE_OPTION) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tFile quizFile = fc.getSelectedFile();\r\n\t\treturn quizFile.getAbsolutePath();\r\n\t}", "public String getFileName(){\n\t\treturn fileName;\n\t}", "public String getFileName()\r\n {\r\n return fileName;\r\n }", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "Path fileToUpload();", "public void prepareData() throws Exception {\n for (int i = 0; i < this.f4804b.length; i++) {\n try {\n byte[] readFile = FileUtil.readFile(this.f4804b[i]);\n addPart(new String[]{String.format(\"Content-Disposition: form-data; name=\\\"%s_%d\\\"; filename=\\\"%s_%d.jpg\\\"\", new Object[]{this.f4803a, Integer.valueOf(i), this.f4803a, Integer.valueOf(i)}), \"Content-Type: image/webp\", String.format(\"Content-Length: %d\", new Object[]{Integer.valueOf(readFile.length)})}, readFile);\n } catch (IOException e) {\n }\n }\n }", "public void addFilePart(String fieldName, String fileName, Bitmap bitmap)\n throws IOException {\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\n \"Content-Disposition: form-data; name=\\\"\" + fieldName\n + \"\\\"; filename=\\\"\" + fileName + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\n \"Content-Type: \"\n + URLConnection.guessContentTypeFromName(fileName))\n .append(LINE_FEED);\n writer.append(\"Content-Transfer-Encoding: binary\").append(LINE_FEED);\n writer.append(LINE_FEED);\n writer.flush();\n\n /* This function takes too much time - lossless */\n /*byte[] pixels = new byte[bitmap.getWidth() * bitmap.getHeight()];\n for (int i = 0; i < bitmap.getWidth(); ++i) {\n for (int j = 0; j < bitmap.getHeight(); ++j) {\n //we're interested only in the MSB of the first byte,\n //since the other 3 bytes are identical for B&W images\n pixels[i + j] = (byte) ((bitmap.getPixel(i, j) & 0x80) >> 7);\n }\n }*/\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG,90,bos);\n byte[] pixels = bos.toByteArray();\n\n outputStream.write(pixels);\n writer.append(LINE_FEED);\n writer.flush();\n }", "public String getFileName() \n {\n return fileName;\n }", "public String getFilename() {\n\treturn file.getFilename();\n }", "protected String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName(){\n\t\treturn _fileName;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "public boolean transmitFileNameInMimeHeader() {\n return this.transmitFileNameInMimeHeader;\n }", "public javax.sip.header.ContentDispositionHeader\n getContentDisposition() {\n return (ContentDispositionHeader)\n this.getHeader(ContentDispositionHeader.NAME);\n }", "public void uploadFile( String selectedFilePath) {\n\n\n int serverResponseCode = 0;\n HttpURLConnection connection;\n DataOutputStream dataOutputStream;\n String lineEnd = \"\\r\\n\";\n String twoHyphens = \"--\";\n String boundary = \"*****\";\n\n\n int bytesRead, bytesAvailable, bufferSize;\n byte[] buffer;\n int maxBufferSize = 1 * 1024 * 1024;\n File selectedFile = new File(selectedFilePath);\n\n\n String[] parts = selectedFilePath.split(\"/\");\n final String fileName = parts[parts.length - 1];\n\n if (!selectedFile.isFile()) {\n //dialog.dismiss();\n //Log.v(TAG,\"gloabal\"+selectedFilePath);\n //showToast(selectedFilePath);\n //showToast(\"file issue\");\n return;\n } else {\n try {\n\n //Log.v(TAG, \"im in try\");\n\n\n FileInputStream fileInputStream = new FileInputStream(selectedFile);\n URL url = new URL(SERVER_URL);\n connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);//Allow Inputs\n connection.setDoOutput(true);//Allow Outputs\n connection.setUseCaches(false);//Don't use a cached Copy\n connection.setRequestMethod(\"POST\");\n connection.setRequestProperty(\"Connection\", \"Keep-Alive\");\n connection.setRequestProperty(\"ENCTYPE\", \"multipart/form-data\");\n connection.setRequestProperty(\"Content-Type\", \"multipart/form-data;boundary=\" + boundary);\n connection.setRequestProperty(\"uploaded_file\", selectedFilePath);\n //showToast(selectedFilePath);\n //creating new dataoutputstream\n\n dataOutputStream = new DataOutputStream(connection.getOutputStream());\n //showToast(\"im after path\");\n //writing bytes to data outputstream\n dataOutputStream.writeBytes(twoHyphens + boundary + lineEnd);\n\n dataOutputStream.writeBytes(\"Content-Disposition: form-data; name=\\\"uploaded_file\\\";filename=\\\"\"\n + selectedFilePath + \"\\\"\" + lineEnd);\n\n dataOutputStream.writeBytes(lineEnd);\n\n\n //returns no. of bytes present in fileInputStream\n bytesAvailable = fileInputStream.available();\n //selecting the buffer size as minimum of available bytes or 1 MB\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n //setting the buffer as byte array of size of bufferSize\n buffer = new byte[bufferSize];\n\n //reads bytes from FileInputStream(from 0th index of buffer to buffersize)\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n\n //Log.v(TAG, \"before while\");\n\n\n //loop repeats till bytesRead = -1, i.e., no bytes are left to read\n while (bytesRead > 0) {\n //write the bytes read from inputstream\n dataOutputStream.write(buffer, 0, bufferSize);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n //Log.v(TAG, \"after while\");\n\n dataOutputStream.writeBytes(lineEnd);\n dataOutputStream.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);\n\n serverResponseCode = connection.getResponseCode();\n String serverResponseMessage = connection.getResponseMessage();\n\n Log.i(TAG, \"Server Response is: \" + serverResponseMessage + \": \" + serverResponseCode);\n\n //response code of 200 indicates the server status OK\n if (serverResponseCode == 200) {\n Log.v(TAG, \"file upload complete\");\n }\n\n Log.v(TAG, \"now close\");\n\n //closing the input and output streams\n fileInputStream.close();\n dataOutputStream.flush();\n dataOutputStream.close();\n\n Log.v(TAG, \"CLosed \");\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //showToast(\"FIle not found\");\n }\n });\n } catch (MalformedURLException e) {\n e.printStackTrace();\n //showToast(\"URL error\");\n\n } catch (IOException e) {\n e.printStackTrace();\n //showToast(\"Cannot read/Write file\");\n }\n dialog.dismiss();\n //postData(\"langitudes----\",\"longitues----\");\n\n //return serverResponseCode;\n }\n\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}", "public void addFilePart(String fieldName, File uploadFile)\n throws IOException {\n String fileName = uploadFile.getName();\n\n String fieldContent = \"--\" + boundary + LINE_FEED;\n fieldContent += \"Content-Disposition: form-data; name=\\\"\" + fieldName\n + \"\\\"; filename=\\\"\" + fileName + \"\\\"\" + LINE_FEED;\n fieldContent += \"Content-Type: \"\n + URLConnection.guessContentTypeFromName(fileName) + LINE_FEED;\n fieldContent += \"Content-Transfer-Encoding: binary\" + LINE_FEED;\n fieldContent += LINE_FEED;\n // file content would go here\n fieldContent += LINE_FEED;\n contentLength += fieldContent.getBytes(charset).length;\n contentLength += uploadFile.length();\n files.add(new FilePart(fieldName, uploadFile));\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException\n {\n resp.setContentType(\"text/html;charset=UTF-8\");\n\n final Part filePart = req.getPart(\"file\");\n final String fileName = getFileName(filePart);\n\n File file = new File(Config.fileDirectory + File.separator + fileName);\n\n // TODO: return error saying file exists\n if(file.exists())\n {\n resp.setStatus(resp.SC_BAD_REQUEST);\n req.getRequestDispatcher(\"/\").forward(req, resp);\n return;\n }\n\n OutputStream out = null;\n InputStream fileContent = null;\n final PrintWriter writer = resp.getWriter();\n\n try\n {\n out = new FileOutputStream(new File(Config.fileDirectory + File.separator\n + fileName));\n fileContent = filePart.getInputStream();\n\n int read = 0;\n final byte[] bytes = new byte[1024];\n\n while ((read = fileContent.read(bytes)) != -1)\n out.write(bytes, 0, read);\n\n log.info(\"File {} being uploaded to {}\", fileName, Config.fileDirectory);\n }\n catch (FileNotFoundException fne)\n {\n log.error(\"Problems during file upload. Error: {}\", fne.getMessage());\n }\n finally\n {\n req.getRequestDispatcher(\"/\").forward(req, resp);\n if (out != null)\n out.close();\n if (fileContent != null)\n fileContent.close();\n if (writer != null)\n writer.close();\n }\n }", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public static String uploadUseFormFile(String toUrl, File[] files, String[] names) {\r\n\t\tString end = \"\\r\\n\";\r\n\t\tString twoHyphens = \"--\";\r\n\t\tString boundary = \"*****jerry2\";\r\n\t\t\r\n\t\tHttpURLConnection conn = null;\r\n\t\tInputStream is = null;\r\n\t\tDataOutputStream ds = null;\t\t\r\n\t\ttry {\r\n\t\t\tURL url = new URL(toUrl);\r\n\t\t\tconn = (HttpURLConnection) url.openConnection();\r\n\t\t\tconn.setDoOutput(true);\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tconn.setChunkedStreamingMode(0);\r\n\t\t\tconn.setRequestMethod(\"POST\");\r\n\t\t\tconn.setRequestProperty(\"Connection\", \"Keep-Alive\");\r\n\t\t\tconn.setRequestProperty(\"Charset\", \"UTF-8\");\r\n\t\t\tconn.setRequestProperty(\"Content-length\", String.valueOf(getLength(files)));\r\n\t\t\tconn.setRequestProperty(\"Content-type\", \"multipart/form-data; boundary=\"+boundary);\r\n\t\t\t/*\t\t\t\r\n\t\t\tContent-type: multipart/form-data; boundary=AaB03x\r\n\t\t\t--AaB03x\r\n\t content-disposition: form-data; name=\"pics\"; filename=\"file1.txt\"\r\n\t Content-Type: text/plain\r\n\r\n\t ... contents of file1.txt ...\r\n\t --AaB03x--\r\n\t */\r\n\t\t\tds = new DataOutputStream(conn.getOutputStream());\r\n\t\t\tfor (int i = 0; i < files.length; i++) {\r\n\t\t\t\tis = new FileInputStream(files[i]);\r\n\t\t\t\tds.writeBytes(twoHyphens + boundary + end);\r\n\t\t\t\tds.writeBytes(\"content-disposition: form-data; name=\\\"\"+names[i]+\"\\\"; filename=\\\"\"+files[i].getName()+\"\\\"\"+end);\r\n\t\t\t\tds.writeBytes(end);\r\n\t\t\t\tbyte[] buf = new byte[128];\r\n\t\t\t\tint len = -1;\r\n\t\t\t\twhile ((len=is.read(buf)) != -1)\r\n\t\t\t\t\tds.write(buf, 0, len);\r\n\t\t\t\tds.writeBytes(end);\r\n\t\t\t}\r\n\t\t\tds.writeBytes(twoHyphens + boundary + twoHyphens + end);\r\n\t\t\tds.flush();\r\n\t\t\t\r\n\t\t\t//response\r\n\t\t\tSystem.out.println(\"code=\"+conn.getResponseCode()+\",msg=\"+conn.getResponseMessage());\r\n\t\t\treturn getContent(conn.getInputStream());\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t} finally{\r\n\t\t\ttry {\r\n\t\t\t\tif (is != null)\r\n\t\t\t\t\tis.close();\r\n\t\t\t\tif (ds != null)\r\n\t\t\t\t\tds.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tconn.disconnect();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void setParameter(String name, String filename, InputStream is) throws IOException {\r\n Logging.logTime(\"setParameter begin (after new fileinput)\");\r\n boundary();\r\n writeName(name);\r\n write(\"; filename=\\\"\");\r\n write(filename);\r\n write('\"');\r\n newline();\r\n write(\"Content-Type: \");\r\n Logging.logTime(\"pre guessContentTypeFromName\");\r\n String type = URLConnection.guessContentTypeFromName(filename);\r\n if (type == null)\r\n type = \"application/octet-stream\";\r\n writeln(type);\r\n Logging.logTime(\"post guessContentTypeFromName\");\r\n newline();\r\n pipe(is, os);\r\n newline();\r\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n\t\treturn file.getName();\n\t}", "private void decodeMultipartFormData(String boundary, String encoding, ByteBuffer fbuf,\n\t\t\t\tMap<String, String> parms, Map<String, String> files) throws ResponseException {\n\t\t\ttry {\n\t\t\t\tint[] boundary_idxs = getBoundaryPositions(fbuf, boundary.getBytes());\n\t\t\t\tif (boundary_idxs.length < 2) {\n\t\t\t\t\tthrow new ResponseException(Response.Status.BAD_REQUEST,\n\t\t\t\t\t\t\t\"BAD REQUEST: Content type is multipart/form-data but contains less than two boundary strings.\");\n\t\t\t\t}\n\n\t\t\t\tbyte[] part_header_buff = new byte[MAX_HEADER_SIZE];\n\t\t\t\tfor (int bi = 0; bi < boundary_idxs.length - 1; bi++) {\n\t\t\t\t\tfbuf.position(boundary_idxs[bi]);\n\t\t\t\t\tint len = (fbuf.remaining() < MAX_HEADER_SIZE) ? fbuf.remaining()\n\t\t\t\t\t\t\t: MAX_HEADER_SIZE;\n\t\t\t\t\tfbuf.get(part_header_buff, 0, len);\n\t\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\t\tnew ByteArrayInputStream(part_header_buff, 0, len),\n\t\t\t\t\t\t\tCharset.forName(encoding)), len);\n\n\t\t\t\t\tint headerLines = 0;\n\t\t\t\t\t// First line is boundary string\n\t\t\t\t\tString mpline = in.readLine();\n\t\t\t\t\theaderLines++;\n\t\t\t\t\tif (mpline == null || !mpline.contains(boundary)) {\n\t\t\t\t\t\tthrow new ResponseException(Response.Status.BAD_REQUEST,\n\t\t\t\t\t\t\t\t\"BAD REQUEST: Content type is multipart/form-data but chunk does not start with boundary.\");\n\t\t\t\t\t}\n\n\t\t\t\t\tString part_name = null, file_name = null, content_type = null;\n\t\t\t\t\t// Parse the reset of the header lines\n\t\t\t\t\tmpline = in.readLine();\n\t\t\t\t\theaderLines++;\n\t\t\t\t\twhile (mpline != null && mpline.trim().length() > 0) {\n\t\t\t\t\t\tMatcher matcher = CONTENT_DISPOSITION_PATTERN.matcher(mpline);\n\t\t\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\t\t\tString attributeString = matcher.group(2);\n\t\t\t\t\t\t\tmatcher = CONTENT_DISPOSITION_ATTRIBUTE_PATTERN\n\t\t\t\t\t\t\t\t\t.matcher(attributeString);\n\t\t\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\t\t\tString key = matcher.group(1);\n\t\t\t\t\t\t\t\tif (\"name\".equalsIgnoreCase(key)) {\n\t\t\t\t\t\t\t\t\tpart_name = matcher.group(2);\n\t\t\t\t\t\t\t\t} else if (\"filename\".equalsIgnoreCase(key)) {\n\t\t\t\t\t\t\t\t\tfile_name = matcher.group(2);\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\tmatcher = CONTENT_TYPE_PATTERN.matcher(mpline);\n\t\t\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\t\t\tcontent_type = matcher.group(2).trim();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmpline = in.readLine();\n\t\t\t\t\t\theaderLines++;\n\t\t\t\t\t}\n\t\t\t\t\tint part_header_len = 0;\n\t\t\t\t\twhile (headerLines-- > 0) {\n\t\t\t\t\t\tpart_header_len = scipOverNewLine(part_header_buff, part_header_len);\n\t\t\t\t\t}\n\t\t\t\t\t// Read the part data\n\t\t\t\t\tif (part_header_len >= len - 4) {\n\t\t\t\t\t\tthrow new ResponseException(Response.Status.INTERNAL_ERROR,\n\t\t\t\t\t\t\t\t\"Multipart header size exceeds MAX_HEADER_SIZE.\");\n\t\t\t\t\t}\n\t\t\t\t\tint part_data_start = boundary_idxs[bi] + part_header_len;\n\t\t\t\t\tint part_data_end = boundary_idxs[bi + 1] - 4;\n\n\t\t\t\t\tfbuf.position(part_data_start);\n\t\t\t\t\tif (content_type == null) {\n\t\t\t\t\t\t// Read the part into a string\n\t\t\t\t\t\tbyte[] data_bytes = new byte[part_data_end - part_data_start];\n\t\t\t\t\t\tfbuf.get(data_bytes);\n\t\t\t\t\t\tparms.put(part_name, new String(data_bytes, encoding));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Read it into a file\n\t\t\t\t\t\tString path = saveTmpFile(fbuf, part_data_start, part_data_end\n\t\t\t\t\t\t\t\t- part_data_start, file_name);\n\t\t\t\t\t\tif (!files.containsKey(part_name)) {\n\t\t\t\t\t\t\tfiles.put(part_name, path);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint count = 2;\n\t\t\t\t\t\t\twhile (files.containsKey(part_name + count)) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfiles.put(part_name + count, path);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparms.put(part_name, file_name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (ResponseException re) {\n\t\t\t\tthrow re;\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new ResponseException(Response.Status.INTERNAL_ERROR, e.toString());\n\t\t\t}\n\t\t}", "@RequestMapping(\"/fileUpload2\")\n public ModelAndView fileUpload2(@RequestParam(\"file\") CommonsMultipartFile file, HttpServletRequest request) throws IOException {\n\n String realPath = \"/Users/leipu/IdeaProjects/ssm_test/src/main/webapp/fileUpload/\";\n // System.out.println(\"contextPath\"+request.getSession().getServletContext().getRealPath(\"/fileUpload\")+\"111111\");\n\n // System.out.println(\"ServletPath\"+request.getServletPath()+\"2222222\");\n\n // System.out.println(request.getCharacterEncoding()+\"33333\");\n\n String oldName = file.getOriginalFilename();\n\n // System.out.println(\"oldname\"+oldName);\n String newName = UUID.randomUUID().toString() + oldName.substring(oldName.lastIndexOf(\".\"));\n//\n//\n File dest = new File(realPath+File.separator+newName );\n//\n file.transferTo(dest);\n\n\n mv.setViewName(\"index\");\n\n mv.addObject(\"upload\",\"上传\");\n\n return mv;\n }", "@Override\n public boolean transferFile (MultipartFile file, String tag, String resultFilename) {\n try {\n file.transferTo(new File(Constans.UPLOADPATH + \"/\" + tag + \"/\" + resultFilename));\n }catch (IOException e){\n e.printStackTrace();\n return false;\n }\n return true;\n }", "@PostMapping(\"/upload\")\n\tpublic ResponseEntity<String> upload(@RequestParam(\"doc\") MultipartFile file){\n\t\tFile storedFile = storageService.store(file);\n\t\tif(storedFile == null) {\n\t\t\treturn new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t\tString filename = storedFile.getName();\n\t\t\t\t\n\t\treturn new ResponseEntity<>(filename, HttpStatus.OK);\n\t}", "void fileUploaded(String path);", "public String getFileName()\r\n {\r\n return sFileName;\r\n }", "public String getFileName ()\n\t{\n\t\treturn FileName;\n\t}", "FileData(String fileName, String contentType) {\n this.fileName = fileName;\n this.contentType = contentType;\n }", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "private String getFilename() {\r\n\t\treturn (String) txtFlnm.getValue();\r\n\t}" ]
[ "0.7096284", "0.667953", "0.6675569", "0.656964", "0.6564737", "0.6530946", "0.6482337", "0.646816", "0.6465103", "0.63858503", "0.6279809", "0.6087526", "0.6013075", "0.5978006", "0.59685475", "0.59548163", "0.59340876", "0.59340876", "0.59229463", "0.59104043", "0.5905932", "0.58938265", "0.58425325", "0.5836033", "0.5817837", "0.57706934", "0.5673609", "0.5668584", "0.56561565", "0.56508017", "0.56378776", "0.5636167", "0.5617974", "0.55992264", "0.5594698", "0.5567728", "0.556274", "0.55492496", "0.554566", "0.5534315", "0.5529332", "0.5528382", "0.55258685", "0.5518299", "0.5503991", "0.54948837", "0.5485219", "0.54571396", "0.54252154", "0.5422915", "0.542264", "0.5409355", "0.5409355", "0.5409355", "0.5409355", "0.5409355", "0.5409355", "0.5409355", "0.5409355", "0.5409355", "0.54082006", "0.5400059", "0.53972095", "0.5379381", "0.537717", "0.53759396", "0.5374128", "0.5368274", "0.5368274", "0.53604954", "0.5354402", "0.53502005", "0.53335553", "0.53303915", "0.53303915", "0.53303915", "0.53276145", "0.5326439", "0.5319494", "0.5319154", "0.5319154", "0.5319154", "0.5316759", "0.5314866", "0.5310664", "0.5306259", "0.5304081", "0.5302182", "0.5296414", "0.5296314", "0.5292733", "0.5283572", "0.5282876", "0.52795154", "0.5260359", "0.5260359", "0.5260359", "0.5260359", "0.5260359", "0.5254801" ]
0.65259814
6
Created by zhangbo on 2017/6/27.
public interface StatusMapper extends BaseMapper<Status> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n void init() {\n }", "private void init() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public void mo38117a() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void sacrifier() {\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}", "@Override\n public void memoria() {\n \n }", "@Override\n protected void getExras() {\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}", "public void gored() {\n\t\t\n\t}", "public void mo4359a() {\n }", "private void strin() {\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 jugar() {\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() {}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\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 init() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private void init() {\n\n\n\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n public void initialize() { \n }", "Constructor() {\r\n\t\t \r\n\t }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void mo6081a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}" ]
[ "0.61408067", "0.60016197", "0.59309494", "0.59028876", "0.58880615", "0.58880615", "0.5811887", "0.5797337", "0.5779256", "0.5741362", "0.5740257", "0.5739698", "0.5730851", "0.5698582", "0.569843", "0.5694899", "0.56865174", "0.56786567", "0.56780666", "0.56611454", "0.56599855", "0.5657089", "0.5620506", "0.5616488", "0.5616488", "0.5616488", "0.5616488", "0.5616488", "0.560476", "0.5594635", "0.5594034", "0.5581878", "0.55803186", "0.55645883", "0.55645883", "0.5559045", "0.5556634", "0.55552286", "0.55552286", "0.55446124", "0.553906", "0.5537695", "0.55223554", "0.55223554", "0.55223554", "0.55200857", "0.5519601", "0.5515544", "0.5515544", "0.5515544", "0.55154455", "0.5494058", "0.5488394", "0.5483011", "0.5483011", "0.5483011", "0.5478", "0.5476043", "0.5476043", "0.5476043", "0.5476043", "0.5476043", "0.5476043", "0.54611987", "0.5449705", "0.5447278", "0.5446103", "0.5446103", "0.54456276", "0.54272175", "0.5424222", "0.5424216", "0.54198927", "0.54154354", "0.54117703", "0.54027474", "0.5397835", "0.53908736", "0.53819335", "0.5381565", "0.5381565", "0.5381565", "0.5381565", "0.5381565", "0.5381565", "0.5381565", "0.53813535", "0.53690726", "0.5367146", "0.53586596", "0.53558135", "0.5354716", "0.5352156", "0.5344604", "0.5344604", "0.53293115", "0.53265584", "0.5319148", "0.5308637", "0.5301121", "0.5294877" ]
0.0
-1
create and initialize the retrofit instance
public static Retrofit create(){ Retrofit retrofit = new Retrofit.Builder() .baseUrl(BASE_URL) .addConverterFactory(GsonConverterFactory.create()) .build(); return retrofit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void init() {\n client = new OkHttpClient();\n\n //Construct a HTTP builder\n retrofit = new Retrofit.Builder()\n .client(client)\n .baseUrl(apiAddress)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n //Form an API to receive a token\n kedronService = retrofit.create(IKedronService.class);\n }", "private void initRetrofitClient() {\n if (this.mRetrofit != null) {\n this.mRetrofit = null;\n } else {\n // create new mRetrofit client\n Retrofit.Builder retrofitBuilder = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create());\n\n this.mRetrofit = retrofitBuilder.build();\n this.mPlaceCall = mRetrofit.create(PlaceCall.class);\n }\n }", "public static Retrofit getInstance() {\n if (instance==null)\n instance = new Retrofit.Builder()\n //.baseUrl(\"http://10.0.2.2:3000\")\n .baseUrl(url)\n .addConverterFactory(ScalarsConverterFactory.create())\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create())\n .build();\n return instance;\n }", "public static void initService() {\n Retrofit retrofit = new Retrofit.Builder().baseUrl(\"http://166.111.68.66:2042/news/\")\n .addConverterFactory(new Converter.Factory() {\n Gson gson = new Gson();\n\n @Override\n public Converter<ResponseBody, ?> responseBodyConverter(final Type type, final Annotation[] annotations, Retrofit retrofit) {\n return new Converter<ResponseBody, Object>() {\n @Override\n public Object convert(ResponseBody value) throws IOException {\n try {\n return gson.getAdapter(TypeToken.get(type)).fromJson(value.charStream());\n } finally {\n value.close();\n }\n }\n };\n }\n }).build();\n newsdetailHttpService = retrofit.create(GetNewsDetailService.NewsDetailHttpService.class);\n }", "private Api() {\n // Implement a method to build your retrofit\n buildRetrofit(BASE_URL);\n }", "public static Retrofit create() {\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n return retrofit;\n\n }", "public APIClient() {\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n // Build base url\n retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .addCallAdapterFactory(RxJava3CallAdapterFactory.create())\n .build();\n }", "private void setupApiService(){\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(InstagramAppData.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n instaGramService = retrofit.create(InstaGramService.class);\n }", "public static Retrofit getRetrofitInstance(){\n if(retrofit == null){\n retrofit = new retrofit2.Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(JacksonConverterFactory.create())\n .build();\n }\n return retrofit;\n }", "public static RetrofitWebService RetrofitInitilizer(){\n\n RestAdapter adapter = new RestAdapter.Builder()\n .setEndpoint(DOMAIN) //Setting the Root URL\n .build(); //Finally building the adapter\n\n RetrofitWebService api = adapter.create(RetrofitWebService.class);\n\n return api;\n }", "private void buildRetrofit() {\n OkHttpClient client = new OkHttpClient.Builder()\n .addInterceptor(new ResponseInterceptor())\n .build();\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(baseURL)\n .addConverterFactory(GsonConverterFactory.create())\n .client(client)\n .build();\n\n apiInterface = retrofit.create(APIInterface.class);\n }", "private void httpSetup() {\n OkHttpClient client = new OkHttpClient.Builder()\n .readTimeout(5, TimeUnit.SECONDS)\n .writeTimeout(5, TimeUnit.SECONDS)\n .build();\n\n retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .client(client)\n .build();\n\n service = retrofit.create(ValidatorAPI.class);\n }", "private RetrofitClient(Context context){\n mRetrofit=new Retrofit.Builder()\n .baseUrl(NetworkUtility.BASEURL)\n .addConverterFactory(GsonConverterFactory.create())\n// .client(createClient(context))\n .build();\n }", "public static Retrofit getClient() {\n if (retrofit == null){ // Nos aseguramos que no se haya creado un objeto retrofit\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n retrofit = new Retrofit.Builder() // Inicializamos el objeto Retrofit\n .baseUrl(BASE_URL) // Indicamos a cual sitio se estará conectando\n .addConverterFactory(GsonConverterFactory.create(gson)) // Indicamos cual será nuestro serializador y deserializador de objetos (JSON)\n .build(); // Construimos el objeto\n Log.w(\"Retrofit\",\"Retrofit Start\");\n }\n return retrofit;\n }", "public static Retrofit getApiManagerMain() {\n if (retrofitmain == null) {\n retrofitmain = new Retrofit.Builder()\n .baseUrl(MainBaseApiURL)\n .addConverterFactory(GsonConverterFactory.create())\n // .client(okHttpClient)\n .build();\n }\n return retrofitmain;\n }", "public static Retrofit apiService(Context context) {\n httpClientBuilder = new OkHttpClient.Builder()\n .connectTimeout(1, TimeUnit.MINUTES)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(15, TimeUnit.SECONDS);\n\n if (retrofit == null) {\n retrofit = new Retrofit.Builder()\n .baseUrl(Constants.BASE_URL_API)\n .client(httpClientBuilder.build())\n .addConverterFactory(GsonConverterFactory.create(gson))\n .build();\n }\n return retrofit;\n }", "public static APIRetrofit build() {\n final Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create())\n .build();\n TrafficStats.setThreadStatsTag(0x1000);\n return retrofit.create(APIRetrofit.class);\n }", "private Globals(){\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build();\n //Creem el Retrofit\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(API_URL)\n .client(client)\n .addConverterFactory(ScalarsConverterFactory.create())\n .addConverterFactory(JacksonConverterFactory.create())\n .build();\n\n serveiRetrofit = retrofit.create(RetrofitAPI.class);\n }", "public static RetrofitClient getInstance() {\n return OUR_INSTANCE;\n }", "void init() {\n CometUtils.printCometSdkVersion();\n validateInitialParams();\n this.connection = ConnectionInitializer.initConnection(\n this.apiKey, this.baseUrl, this.maxAuthRetries, this.getLogger());\n this.restApiClient = new RestApiClient(this.connection);\n // mark as initialized\n this.alive = true;\n }", "public static Retrofit serviceNowApi() {\n return new Retrofit.Builder()\n .baseUrl(BuildConfig.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n }", "private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }", "public static Retrofit getRetrofitInstance(String BASE_URL, final String c_username, final String c_password) {\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n\n\n\n /*OkHttpClient okHttpClient = new OkHttpClient().newBuilder().addInterceptor(new Interceptor() {\n @Override\n public okhttp3.Response intercept(Interceptor.Chain chain) throws IOException {\n Request originalRequest = chain.request();\n\n Request.Builder builder = originalRequest.newBuilder().header(\"Authorization\",\n Credentials.basic(c_username, c_password));\n\n Request newRequest = builder.build();\n return chain.proceed(newRequest);\n }\n })\n .addInterceptor(logging)\n .build();*/\n OkHttpClient okHttpClient = getUnsafeOkHttpClient(BASE_URL, c_username, c_password, logging);\n /*OkHttpClient.Builder okHttpClient = new OkHttpClient.Builder();\n okHttpClient.addInterceptor(new Interceptor() {\n @Override\n public okhttp3.Response intercept(Interceptor.Chain chain) throws IOException {\n Request originalRequest = chain.request();\n\n Request.Builder builder = originalRequest.newBuilder().header(\"Authorization\",\n Credentials.basic(c_username, c_password));\n\n Request newRequest = builder.build();\n return chain.proceed(newRequest);\n }\n });\n\n okHttpClient.connectTimeout(1, TimeUnit.MINUTES)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(15, TimeUnit.SECONDS);\n\n if (BuildConfig.DEBUG) {//only LOG REST for DEBUG\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n logging.setLevel(HttpLoggingInterceptor.Level.HEADERS);\n okHttpClient.addInterceptor(logging);\n }\n*/\n\n if (retrofit == null) {\n retrofit = new retrofit2.Retrofit.Builder()\n .baseUrl(BASE_URL)\n\n //Add the converter//\n .addConverterFactory(GsonConverterFactory.create())\n .client(okHttpClient)\n //.client(okHttpClient.build())\n\n //Build the Retrofit instance//\n .build();\n }\n return retrofit;\n }", "public interface BaseModel {\r\n Retrofit retrofit = new Retrofit.Builder()\r\n .baseUrl(\"http://39.107.224.233/firstga/app/\")\r\n .addConverterFactory(GsonConverterFactory.create())\r\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create())\r\n .build();\r\n}", "public NetworkManager() {\n okHttpClient = new OkHttpClientProvider().getClient();\n retrofit = new RetrofitInstanceProvider(new RelatedTopicTypeAdapterFactory(), okHttpClient).getRetrofitInstance();\n }", "private void init(){\n Slider.init(new PicassoImageLoadingService());\n restaurantApi = RetrofitClient.getInstance(Common.API_RESTAURANT_ENDPOINT).create(RestaurantApi.class);\n dialog = new Dialog(this);\n\n }", "public void initApiService() {\n apiService = ApiUtils.getAPIService();\n }", "public CastRemote(){\n final Retrofit retrofit = new Retrofit.Builder()\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create())\n .baseUrl(Constants.BASE_URL)\n .client(createClient())\n .build();\n service = retrofit.create(CastService.class);\n }", "public API() {}", "public ReservationApi()\r\n {\r\n }", "public static Retrofit getClient(final Context context) {\n //setup cache\n OkHttpClient okHttpClient = createCachedClient(context);\n retrofit = new Retrofit.Builder()\n .client(okHttpClient)\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n return retrofit;\n }", "@PostConstruct\n private void init(){\n\n okHttpClient = new OkHttpClient();\n\n// loadEtoroInstruments();\n\n }", "private APIClient() {\n }", "private static VbxService getApiInstance() {\n HttpLoggingInterceptor logger = new HttpLoggingInterceptor();\n logger.setLevel(HttpLoggingInterceptor.Level.BODY);\n\n Interceptor setAcceptType = new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request request = chain.request();\n Request typedRequest = request\n .newBuilder()\n .header(\"Accept\", \"application/json\")\n .build();\n return chain.proceed(typedRequest);\n }\n };\n\n Interceptor setAuthorization = new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request request = chain.request();\n if(email != null && password != null) {\n String auth = Base64.encodeToString((email + \":\" + password).getBytes(), Base64.NO_WRAP);\n Request typedRequest = request\n .newBuilder()\n .header(\"Authorization\", String.format(\"Basic %s\", auth))\n .build();\n return chain.proceed(typedRequest);\n }\n return chain.proceed(request);\n }\n };\n\n OkHttpClient apiClient = new OkHttpClient.Builder()\n .addInterceptor(logger)\n .addInterceptor(setAcceptType)\n .addInterceptor(setAuthorization)\n .build();\n\n return new Retrofit.Builder()\n .baseUrl(endpoint)\n .client(apiClient)\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create())\n .addConverterFactory(GsonConverterFactory.create())\n .build()\n .create(VbxService.class);\n }", "public api() {}", "public interface MainService {\n @FormUrlEncoded\n @POST(Constants.Url.LOOKUP_STEAMID)\n Call<ResponseBody> lookupSteamId(@Field(Constants.Key.ID) String id);\n\n @POST(Constants.Url.REQUEST_FETCH)\n Call<BaseResponse> requestFetch(@Path(Constants.Key.STEAM_ID_64) String steamId64);\n\n @GET(Constants.Url.GET_PROFILE)\n Call<Profile> getProfile(@Path(Constants.Key.STEAM_ID_64) String steamId64);\n\n @GET(Constants.Url.GET_FRIENDS)\n Call<ArrayList<Profile>> getFriends(@Path(Constants.Key.STEAM_ID_64) String steamId64);\n\n\n\n //Factory\n class Factory {\n public static MainService create() {\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n OkHttpClient.Builder httpClient = new OkHttpClient.Builder();\n OkHttpClient client = httpClient\n .connectTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(30, TimeUnit.SECONDS)\n .readTimeout(30, TimeUnit.SECONDS)\n .addInterceptor(interceptor)\n .build();\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(Constants.Url.DOMAIN)\n .addConverterFactory(GsonConverterFactory.create())\n .client(client)\n .build();\n return retrofit.create(MainService.class);\n }\n }\n}", "static Retrofit getClient(String baseUrl) {\n if (retrofit == null) {\n retrofit = new Retrofit.Builder()\n .baseUrl(baseUrl)\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create())\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n }\n return retrofit;\n }", "public interface ZhiHuApi {\n\n /**\n * A factory of ZhiHuApi, you do not need to create it every time for network.\n */\n class Factory {\n\n private static final Retrofit.Builder builder;\n\n static {\n builder = new Retrofit.Builder()\n .baseUrl(Constants.BASE_HTTP_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create());\n }\n\n public static <T extends ZhiHuApi> T create(Class<T> clazz) {\n return create(clazz, HostType.HTTP);\n }\n\n public static <T extends ZhiHuApi> T create(Class<T> clazz, HostType type) {\n return create(clazz, type, false);\n }\n\n public static <T extends ZhiHuApi> T create(Class<T> clazz, HostType type, boolean retryOnFailue) {\n Retrofit retrofit = builder\n .client(OkHttpClientHelper.getClient(type, retryOnFailue))\n .build();\n return retrofit.create(clazz);\n }\n\n\n }\n}", "public static Retrofit getRetrofit() {\n Retrofit.Builder retrofitBuilder = new Retrofit.Builder()\n .baseUrl(Parley.getInstance().getNetwork().getBaseUrl())\n .addConverterFactory(GsonConverterFactory.create())\n .client(getOkHttpClient());\n\n return retrofitBuilder.build();\n }", "public static Retrofit getClient() {\n if (retrofit==null) {\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n // set your desired log level\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n final OkHttpClient okHttpClient = new OkHttpClient.Builder()\n .readTimeout(120, TimeUnit.SECONDS)\n .connectTimeout(120, TimeUnit.SECONDS)\n .addInterceptor(logging)\n .build();\n\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build();\n\n retrofit = new Retrofit.Builder()\n .client(client)\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .build();\n }\n return retrofit;\n }", "public OpenWeatherController() {\n Retrofit retrofit = new Retrofit.Builder().baseUrl(FORECAST_BASE_URL).addConverterFactory(GsonConverterFactory.create()).build();\n\n service = retrofit.create(OpenWeatherMapService.class);\n }", "public DarknetEndpoint(@NonNull final Retrofit retrofit, @NonNull final Context context) {\n this.context = context;\n this.retrofit = retrofit;\n this.api = retrofit.create(DarknetApi.class);\n cm = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);\n apiKey = BuildConfig.ApiKey;\n\n }", "public interface ApiInterface {\n String ENDPOINT = \"http://ibacor.com/api/\";\n String API_BMKG = \"bmkg?\";\n String GEMPA = \"view=gempa\";\n\n\n @GET(API_BMKG+GEMPA)\n Call<Data>\n getDataGempa();\n\n class Factory {\n\n public static ApiInterface create(Context context) {\n\n OkHttpClient.Builder builder = new OkHttpClient().newBuilder();\n builder.readTimeout(30, TimeUnit.SECONDS);\n builder.connectTimeout(20, TimeUnit.SECONDS);\n builder.writeTimeout(60, TimeUnit.SECONDS);\n\n if (BuildConfig.DEBUG) {\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BASIC);\n builder.addInterceptor(interceptor);\n }\n\n int cacheSize = 10 * 1024 * 1024; // 10 MiB\n Cache cache = new Cache(context.getCacheDir(), cacheSize);\n builder.cache(cache);\n\n OkHttpClient client = builder.build();\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(ApiInterface.ENDPOINT)\n .client(client)\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create())\n .build();\n\n return retrofit.create(ApiInterface.class);\n }\n }\n\n}", "private ParkingLotApi()\r\n {\r\n }", "@Inject\n public MachineMonkeyRestApiImpl() {\n }", "public RestClient(){\n }", "public static Retrofit setRetrofit(String baseUrl) {\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(baseUrl)\n //.client(client)\n .addConverterFactory(LoganSquareConverterFactory.create())\n .addConverterFactory(GsonConverterFactory.create()).client(getClient())\n .build();\n return retrofit;\n }", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "API createAPI();", "public RestService() {\r\n }", "private RestClient() {\n }", "Retrofit register(String identity, Retrofit retrofit);", "private void initialize(){\n if(uri != null)\n httpUriRequest = getHttpGet(uri);\n httpClient = HttpClients.createDefault();\n }", "public OreAPI() {\n\t\tthis(DEFAULT_URL, null);\n\t}", "Retrofit getRetrofit(Integer logLevel) {\n if (this.retrofit == null) {\n \tHttpLoggingInterceptor logging = new HttpLoggingInterceptor(); \n \tif (logLevel==1)\n \t\tlogging.setLevel(HttpLoggingInterceptor.Level.BODY);\n \telse if (logLevel==2)\n \t\tlogging.setLevel(HttpLoggingInterceptor.Level.HEADERS);\n \tOkHttpClient.Builder httpClient = new OkHttpClient.Builder(); \n \tif (logLevel!=null && logLevel>0)\n \t\thttpClient.addInterceptor(logging); \n this.retrofit = new Retrofit.Builder()\n .baseUrl(baseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .client(httpClient.build())\n .build();\n }\n return retrofit;\n }", "public interface CultureListApiService {\n @GET(Variable._CULTURE_LIST_SERVER_REQUEST_URL)\n Maybe<CultureTotalData> getCultureList(@QueryMap Map<String, String> map);\n\n class Factory extends Converter.Factory{\n public static CultureListApiService create(){\n return RetrofitFactory.initRetrofit().create(CultureListApiService.class);\n }\n }}", "public interface RetrofitClient\n{\n @GET(\"web\")\n Call<List<Model>> getAllModel();\n\n @GET(\"web/{id}\")\n Call<Model> getModel(@Body int id);\n\n @POST(\"web\")\n Call<Model> signup(@Body Model model);\n\n\n @GET(\"lost\")\n Call<List<LostModel>> getLostThings();\n @POST(\"found\")\n Call<FoundModel> postFoundThings(@Body FoundModel foundModel);\n @POST(\"lost\")\n Call<LostModel> postLostThings(@Body LostModel lostModel);\n\n}", "RestClientBuilder(){\n\n }", "public interface APIInterface {\n// @GET(\"api/home/books\")\n// Call<BookListResponse> getBookList();\n//\n// @GET(\"api/home/tests\")\n// Call<BookListResponse> getTestList();\n//\n// @GET(\"api/home/banners\")\n// Call<BannerResponse> getBanners();\n//\n\n @GET\n Call<LectureResponse> loadLectures(@Url String url);\n\n @GET\n Call<HomeResponse> loadHomePageFromApi(@Url String url);\n\n @GET(\"api/root\")\n Call<RootApiResponse> loadApiList();\n\n @GET\n Call<BannerResponse> loadBanners(@Url String url);\n\n @GET\n Call<BookListResponse> loadBookList(@Url String url);\n\n @GET\n Call<PracticeDetailResponse> loadPracticeDetail(@Url String url);\n\n @GET\n Call<PracticeListResponse> loadPracticeList(@Url String url);\n\n @GET\n Call<SectionResponse> loadSections(@Url String url);\n\n @GET\n Call<QuestionResponse> loadQuestion(@Url String url);\n\n @GET\n Call<ReadingTestResponse> loadReadingTest(@Url String url);\n\n @GET\n Call<ReadingQuestionResponse> loadReadingAnswer(@Url String url);\n\n @GET\n Call<AudioListRespone> loadAudioList(@Url String url);\n\n @FormUrlEncoded\n @POST\n Call<LoginResponse> login(@Url String url,\n @Field(\"email\") String username,\n @Field(\"password\") String password,\n @Field(\"facebookId\") String facebookId,\n @Field(\"googlePlusId\") String googlePlusId);\n\n @FormUrlEncoded\n @POST\n Call<BaseResponse> logout(@Url String url,\n @Field(\"accessToken\") String accessToken);\n}", "public SolicitudREST() {\n gson = new Gson();\n sdao= new SolicitudDAO();\n }", "public ApiResponse() {\n }", "public YelpFusionApi initClient() {\n try {\n YelpFusionApiFactory yelpBuild = new YelpFusionApiFactory();\n YelpFusionApi yelpClient = yelpBuild.createAPI(CONFIG.yelpClientID, CONFIG.yelpSecret);\n return yelpClient;\n }\n catch(IOException e) {\n Log.v(\"yelpClient\", e.getStackTrace().toString());\n return null;\n }\n }", "public interface LifeService {\n\n String URL = \"http://www.life.borombo.com/\";\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(LifeService.URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n LifeService service = retrofit.create(LifeService.class);\n\n @GET(\"/wp-json/wp/v2/posts\")\n Call<List<Post>> listPosts();\n\n @GET(\"/wp-json/wp/v2/users/{user}\")\n Call<User> getAuthor(@Path(\"user\") int user);\n\n @GET(\"/wp-json/wp/v2/media/{media}\")\n Call<Media> getMedia(@Path(\"media\") int media);\n\n @GET(\"/wp-json/wp/v2/categories/{categorie}\")\n Call<Categorie> getCategorie(@Path(\"categorie\") int categorie);\n\n @GET(\"/wp-json/wp/v2/tags/{tag}\")\n Call<Tag> getTag(@Path(\"tag\") int tag);\n}", "interface BaseApi {\n Retrofit getRetrofit();\n\n OkHttpClient.Builder setInterceptor(Interceptor interceptor);\n\n Retrofit.Builder setConverterFactory(Converter.Factory factory);\n}", "public RestService() {\r\n \r\n }", "private ApiUrlCreator() {\n }", "public interface APIServices {\n public static final String API_URL = \"http://api.themoviedb.org/3/discover/\";\n\n @GET(\"movie?\")\n Call<Movies> getMoviesFull(@Query(\"page\") int page,\n @Query(\"api_key\") String apiKey,\n @Query(\"sort_by\") String sort_by,\n @Query(\"primary_release_year\") String year,\n @Query(\"with_genres\") String genre);\n @GET(\"movie?\")\n Call<Movies> getMoviesDefault(@Query(\"page\") int page,\n @Query(\"api_key\") String apiKey);\n\n @GET(\"movie?\")\n Call<Movies> getMoviesSortBy(@Query(\"page\") int page,\n @Query(\"api_key\") String apiKey,\n @Query(\"sort_by\") String sort_by,\n @Query(\"with_genres\") String genre);\n\n @GET(\"movie?\")\n Call<Movies> getMoviesYear(@Query(\"page\") int page,\n @Query(\"api_key\") String apiKey,\n @Query(\"primary_release_year\") String year,\n @Query(\"with_genres\") String genre);\n\n @GET(\"movie?\")\n Call<Movies> getMoviesGenre(@Query(\"page\") int page,\n @Query(\"api_key\") String apiKey,\n @Query(\"with_genres\") String genre);\n\n @GET(\"movie?\")\n Call<Movies> getMoviesSortYear(@Query(\"page\") int page,\n @Query(\"api_key\") String apiKey,\n @Query(\"sort_by\") String sort_by,\n @Query(\"primary_release_year\") String year);\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(API_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n APIServices apiServices = retrofit.create(APIServices.class);\n}", "public TestServerApi()\r\n\t{\r\n\t\t\r\n\t}", "public interface ApiInterface {\n\n\n @GET(\"articles/\")\n Call<NewsResponse> getTopNews(@Query(\"source\") String source, @Query(\"sortBy\") String sortby, @Query(\"apiKey\") String apiKey);\n\n\n @Headers(\"X-Auth-Token: 8899bb9e61d04e20b2de5ec3d26e5ecf\")\n @GET(\"competitions/{champion_id}/leagueTable\")\n Call<LeagueTableResponse> getLeagueTable(@Path(\"champion_id\") int championId);\n\n\n @Headers(\"X-Auth-Token: 8899bb9e61d04e20b2de5ec3d26e5ecf\")\n @GET(\"competitions/{champion_id}/fixtures?matchday=16\")\n Call<LeagueMatchesResponse> getLeagueMatches(@Path(\"champion_id\") int championId);\n\n @Headers(\"X-Auth-Token: 8899bb9e61d04e20b2de5ec3d26e5ecf\")\n @GET(\"teams/{team_id}/players\")\n Call<PlayerResponse> getTeamPlayers(@Path(\"team_id\") int teamId);\n\n class ApiClient {\n\n public static final String BASE_URL = \"https://newsapi.org/v1/\";\n private static Retrofit retrofit = null;\n\n\n public static Retrofit getClient() {\n if (retrofit == null) {\n retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n }\n return retrofit;\n }\n }\n\n class ApiClientFootBall {\n\n public static final String BASE_URL_FOOT_BALL = \"http://api.football-data.org/v1/\";\n private static Retrofit retrofit = null;\n\n\n public static Retrofit getClient() {\n if (retrofit == null) {\n retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL_FOOT_BALL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n }\n return retrofit;\n }\n }\n}", "private static OkHttpClient initializeRetrofitClients() {\n OkHttpClient.Builder okHttpBuilder = new OkHttpClient().newBuilder();\n okHttpBuilder.interceptors().add(new Interceptor() {\n @Override\n public okhttp3.Response intercept(@NonNull Chain chain) throws IOException {\n Request originalRequest = chain.request();\n\n // Nothing to add to intercepted request if:\n // a) Authorization value is empty because user is not logged in yet\n // b) There is already a header with updated Authorization value\n if (authorizationTokenIsEmpty() || alreadyHasAuthorizationHeader(originalRequest)) {\n return chain.proceed(originalRequest);\n }\n\n // Add authorization header with updated authorization value to intercepted request\n Request authorisedRequest = originalRequest.newBuilder()\n .header(\"Authorization\", \"Bearer \" + accessToken)\n .build();\n return chain.proceed(authorisedRequest);\n }\n });\n okHttpBuilder.authenticator(new Authenticator() {\n @Nullable\n @Override\n public Request authenticate(@NonNull Route route, @NonNull okhttp3.Response response) throws IOException {\n // Refresh your access_token using a synchronous api request\n ABBYYLingvoAPI abbyyLingvoAPI = getApi();\n\n Call<ResponseBody> myCall = abbyyLingvoAPI.getBasicToken();\n Response<ResponseBody> response1;\n try {\n response1 = myCall.execute();\n if (response1.isSuccessful()) {\n accessToken = response1.body().string();\n Log.d(Constants.LOG_TAG, \"basic response is success, got accessToken\");\n } else {\n Log.e(Constants.LOG_TAG, \"basic response isn't successful, response code is: \" + response1.code());\n }\n } catch (IOException e) {\n Log.e(Constants.LOG_TAG, \"basic response isn't successful cause error: \" + e.toString());\n }\n\n // Add new header to rejected request and retry it\n accessTokenRequest = response.request().newBuilder()\n .addHeader(\"Authorization\", \"Bearer \" + accessToken)\n .build();\n\n return accessTokenRequest;\n }\n });\n\n try {\n // Create a trust manager that does not validate certificate chains\n final TrustManager[] trustAllCerts = new TrustManager[]{\n new X509TrustManager() {\n @Override\n public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {\n }\n\n @Override\n public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {\n }\n\n @Override\n public java.security.cert.X509Certificate[] getAcceptedIssuers() {\n return new java.security.cert.X509Certificate[]{};\n }\n }\n };\n\n // Install the all-trusting trust manager\n final SSLContext sslContext = SSLContext.getInstance(\"SSL\");\n sslContext.init(null, trustAllCerts, new java.security.SecureRandom());\n // Create an ssl socket factory with our all-trusting manager\n final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();\n\n okHttpBuilder.sslSocketFactory(sslSocketFactory);\n okHttpBuilder.hostnameVerifier(new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n return true;\n }\n });\n\n return okHttpBuilder.build();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "private void createInstance() throws DefectException{\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString username = TestBedManager.INSTANCE.getDefectConfig().getUsername();\r\n\t\t\t\r\n\t\t\tString password = encrypt_decrypt.getDecodedValue(TestBedManager.INSTANCE.getDefectConfig().getPassword());\r\n\t\t\t\r\n\t\t\t//restApi = new RallyRestApi(new URI(rallyInfo.getUrl()), rallyInfo.getUserName(), rallyInfo.getPassword());\r\n\t\t\trestApi = new RallyRestApi(new URI(rallyInfo.getUrl()),username ,password);\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\tlog.error(\"failed to connect to rally instance, message : \" + e.toString() + \"RallyInfo -\" + rallyInfo);\r\n\t\t\tthrow new DefectException(\"failed to connect to rally instance, message : \" + e.toString()); \t\r\n\t\t}\r\n\t\tif(rallyInfo.getWsapiVersion() != null)\r\n\t\t\trestApi.setWsapiVersion(rallyInfo.getWsapiVersion());\r\n\t\trestApi.setApplicationName(rallyInfo.getAppName());\r\n\t\t\r\n\t}", "private ApiConfig() {\n }", "@Override\n\t public void onCreate() {\n\t super.onCreate();\n\n\t instance = this;\n\t okHttp = new OkHttpClient();\n\t getDefaultSSLSocketFactory();\n\t }", "private void init(){\n if(!initializing) {\n Initializer init = new Initializer();\n InitializationDetails initializationDetails = new InitializationDetails(url, download, reset, deviceID, this);\n init.execute(initializationDetails);\n initializing = true;\n }\n }", "private void init() {\n String METHOD = Thread.currentThread().getStackTrace()[1].getMethodName();\n String msg = null;\n String type = ConstantsIF.RESOURCE;\n ConfigurationIF config = null;\n JSONObject json = null;\n Map<String, String> map = null;\n\n _logger.entering(CLASS, METHOD);\n\n /*\n * Get JSON data from the Config object via the Config Manager\n */\n config = _configMgr.getConfiguration(type);\n\n if (config != null) {\n json = config.getJSON();\n if (json == null) {\n msg = CLASS + \": \" + METHOD + \": JSON data for '\" + type + \"' is null\";\n this.setError(true);\n }\n } else {\n msg = CLASS + \": \" + METHOD + \": Configuration for '\" + type + \"' is null\";\n this.setError(true);\n }\n\n /*\n * setup the Mongo Data Access Object\n */\n if (_MongoDAO == null) {\n map = JSON.convertToParams(JSON.getObject(json, ConfigIF.RS_NOSQL));\n\n try {\n _MongoDAO = MongoFactory.getInstance(map);\n } catch (Exception ex) {\n msg = CLASS + \": \" + METHOD + \": Mongo DAO:\" + ex.getMessage();\n this.setError(true);\n }\n }\n\n if (!this.isError()) {\n this.setState(STATE.READY);\n } else {\n this.setState(STATE.ERROR);\n this.setStatus(msg);\n _logger.log(Level.SEVERE, msg);\n }\n\n _logger.exiting(CLASS, METHOD);\n\n return;\n }", "public GoodreadsApiService() throws JAXBException {\n // TODO make beans out of these and inject them into this to enable proper testing of this class\n JAXBContext jaxbContext = JAXBContext.newInstance(GoodreadsResponse.class);\n unmarshaller = jaxbContext.createUnmarshaller();\n restTemplate = new RestTemplate();\n }", "public interface ImageService {\n\n //String ENDPOINT = \"http://n.xxt.cn:3000/\";\n //String ENDPOINT = \"http://api.laifudao.com/\";\n String ENDPOINT = \"http://image.baidu.com/\";\n\n @GET(\"/data/imgs?tag=性感&sort=0&pn=10&rn=50&p=channel&from=1\")\n Observable<JsonObject> getImages(@Query(\"col\") String col,\n @Query(\"tag\") String tag,\n @Query(\"pn\") int start,\n @Query(\"rn\") int end);\n\n class Creator {\n public static ImageService getService(Context context) {\n Retrofit retrofit = RemoteUtil.createRetrofitInstance(context, ENDPOINT);\n return retrofit.create(ImageService.class);\n }\n }\n}", "private void init() {\n AdvertisingRequest();// 广告列表请求线程\n setapiNoticeControllerList();\n }", "public interface RestService {\n\n @GET\n Call<String> get(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @FormUrlEncoded\n @POST\n Call<String> post(@Url String url, @FieldMap Map<String, Object> params);\n\n// @Multipart\n// @PUT\n// Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @PUT\n Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> delete(@Url String url, @HeaderMap Map<String, String> headers, @QueryMap Map<String, Object> params);\n\n @Streaming\n @GET\n Call<ResponseBody> download(@Url String url, @QueryMap Map<String, Object> params);\n\n @Multipart\n @POST\n Call<String> upload(@Url String url, @Part MultipartBody.Part file);\n\n// @GET\n// Call<SongSearchEntity> getSongSearchList(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<User> signIn(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<User> profile(@Url String url, @HeaderMap Map<String, String> headers);\n\n// @Multipart\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Part(\"id\") RequestBody id, @Part(\"key\") RequestBody key, @Part(\"value\") RequestBody value);\n//\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @GET\n Call<SongListEntity> musicbillList(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<SongListDetailEntity> musicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> createMusicbill(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> deleteMusicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> addMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> updateMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @DELETE\n Call<String> deleteMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<SongSearchEntity> getMusic(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<LyricEntity> getLyric(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<String> getSinger(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<ZhiliaoEntity> getVerify(@Url String url, @HeaderMap Map<String, String> headers);\n}", "public interface FlickrService {\n\n @GET(Constants.FLICKR_API_GET_RECENT)\n Observable<PhotosResponse> getRecentPhotos(\n @Query(\"per_page\") int perPage,\n @Query(\"page\") int page\n );\n\n @GET(Constants.FLICKR_API_SEARCH_TEXT)\n Observable<PhotosResponse> getPhotosByText(\n @Query(\"per_page\") int perPage,\n @Query(\"page\") int page,\n @Query(\"text\") String text\n );\n\n @GET(Constants.FLICKR_API_GET_INFO )\n Observable<PhotoInfoResponse> getPhotoInfo(\n @Query(\"photo_id\") String photoId\n );\n\n @GET(Constants.FLICKR_API_GET_COMMENTS )\n Observable<CommentsResponse> getPhotoComments(\n @Query(\"photo_id\") String photoId\n );\n\n\n class Creator {\n\n public static FlickrService newFlickrService() {\n Retrofit retrofit = new Retrofit.Builder()\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create())\n .addConverterFactory(GsonConverterFactory.create())\n .baseUrl(Constants.FLICKR_API)\n .build();\n return retrofit.create(FlickrService.class);\n }\n }\n}", "public static <T> T buildService(Class<T> type) {\n\n\n return retrofit.create(type);\n }", "protected RestClient() {\n }", "@PostConstruct\n public void init() {\n ApiClient client = Config.fromToken(url, token, validateSSL);\n io.kubernetes.client.Configuration.setDefaultApiClient(client);\n }", "public interface apiService {\n\n\n\n String base_url= \"http://192.168.43.154:8081/\";\n\n @GET(\"getprofile\")\n Call<Employee> getProfilehero(@Query(\"racf\") String id,@Query(\"password\") String pass);\n\n @GET(\"getpeopleonleave\")\n Call<Datesss> getdetailsondate(@Query(\"date\") String d);\n\n @GET(\"authentication\")\n Call<Auth> getAuth(@Query(\"racf\") String d,@Query(\"password\") String dd);\n\n @GET(\"getleavedates\")\n Call<leaves> getleavedates(@Query(\"racf\") String d);\n\n @GET(\"getwfhdates\")\n Call<WorkFromHome> getwfhdates(@Query(\"racf\") String dd);\n\n @GET(\"updateno\")\n Call<Auth> updating(@Query(\"racf\") String d,@Query(\"contacts\") String dd,@Query(\"contactnames\") String ddd);\n\n @GET(\"updateworkfromhome\")\n Call<Auth> updatingwfh(@Query(\"racf\") String d,@Query(\"dates\") String dd,@Query(\"reasons\") String ddd);\n\n @GET(\"updateonleave\")\n Call<Auth> updatingleave(@Query(\"racf\") String d,@Query(\"date\") String dd,@Query(\"reason\") String ddd);\n\n\n}", "public static Retrofit create(String apiUrl) {\n\t\treturn new Retrofit.Builder().baseUrl(apiUrl).addConverterFactory(GsonConverterFactory.create())\n\t\t\t\t.addCallAdapterFactory(new CallAdapter.Factory() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic CallAdapter<?, ?> get(Type returnType, Annotation[] annotations, Retrofit retrofit) {\n\t\t\t\t\t\treturn new CallAdapter<Object, Object>() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic Type responseType() {\n\t\t\t\t\t\t\t\treturn returnType;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic Object adapt(Call<Object> call) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tResponse<Object> re = call.execute();\n\t\t\t\t\t\t\t\t\tif (!re.isSuccessful()) {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\treturn new Gson().fromJson(re.errorBody().string(), returnType);\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\tthrow new RRuntimeException(re);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn re.body();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\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\t.client(new OkHttpClient.Builder().readTimeout(15, TimeUnit.SECONDS).writeTimeout(10, TimeUnit.SECONDS)\n\t\t\t\t\t\t.connectTimeout(10, TimeUnit.SECONDS).cookieJar(CookieJar.NO_COOKIES)\n\t\t\t\t\t\t.addInterceptor((Chain chain) -> {\n//\t\t\t\t\t\t\tif(appKey==null) {\n\t\t\t\t\t\t\treturn chain.proceed(chain.request());\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\treturn chain.proceed(sign(chain.request()));\n\t\t\t\t\t\t}).build())\n\t\t\t\t.build();\n\t}", "@Provides\n @BuStopAppScope\n public Retrofit provideRetrofit(Context context) {\n return new Retrofit.Builder()\n .addConverterFactory(GsonConverterFactory.create())\n .baseUrl(context.getString(R.string.api_transport_endpoint))\n .build();\n }", "public interface Api {\n\n// root url after add multiple servlets\n\n String BASE_URL = \"https://simplifiedcoding.net/demos/\";\n\n @GET(\"marvel\")\n Call<List<Modelclass>> getmodelclass();\n\n\n\n}", "public interface TravelApiService {\n @GET(\"api/users/{userCode}/travels\")\n Call<List<Travel>> getTravel(@Path(value = \"userCode\") String userCode);\n\n @POST(\"api/users/{userCode}/travels\")\n Call<PostTravelGsonResponce> postTravel(@Path(value = \"userCode\") String userCode, @Field(\"travel_date\") String travelDate, @Field(\"latitude\") Double latitude, @Field(\"longitude\") Double longitude, @Field(\"area_name\") String areaName, @Field(\"contry_name\") String countryName, @Field(\"token\") String token);\n}", "public CalificacionREST() {\r\n\r\n gson = new Gson();\r\n sdao = new SolicitudDAO();\r\n /**\r\n * Creates a new instance of SolicitudREST\r\n */\r\n }", "private RestUtil() {\n\t}", "private void initialiseByHand() {\n Configuration production = new Configuration(\"api.example.com\", false, 2000);\n Configuration staging = new Configuration(\"api-staging.example.com\", false, 2000);\n Configuration debug = new Configuration(\"api-dev.example.com\", true, 1000);\n Map<String, Configuration> baseVariants = new HashMap<>();\n baseVariants.put(PRODUCTION, production);\n baseVariants.put(STAGING, staging);\n baseVariants.put(DEBUG, debug);\n Neanderthal.initialise(this, baseVariants, PRODUCTION);\n }", "private RecipleazBackendService() {\n }", "public static void init() {\n\n\t\tsnapshot = new SnapshotService();\n\t\tlog.info(\"App init...\");\n\t}", "public interface RetrofitService {\n\n //TODO.......Created By QiLi.........\n\n /**\n * 登录接口\n * @param userName\n * @param psw\n * @return\n */\n @FormUrlEncoded\n @POST(\"/base/user/login\")\n Observable<BaseResponse<TokenInfo>> doLogin(@Field(\"phone\") String userName, @Field(\"password\") String psw, @Field(\"clientId\") String clientId, @Field(\"imei\") String imei);\n\n /**\n * 用户退出接口\n * @return\n */\n @POST(\"/base/user/logout\")\n Observable<BaseResponse<Boolean>> doLogout();\n\n /**\n * 订单-获取订单\n * @param page 页码\n * @param pageSize 页数\n */\n @POST(\"/buyer/order/list\")\n Observable<BaseResponse<Pager<Order>>> getOrderList(@Query(\"page\") int page,\n @Query(\"pageSize\") int pageSize);\n\n /**\n * 订单-获取订单详情\n */\n @POST(\"/buyer/order/detail\")\n Observable<BaseResponse<Order>> getOrderDetail(@Query(\"orderId\") String orderId);\n\n /**\n * 用户 - 登陆 - QQ登陆\n *\n * @param accessToken\n * @param uid\n */\n @POST(\"/base/user/thirdparty\")\n Observable<BaseResponse<Boolean>> doLoginByQQ(@Query(\"accessToken\") String accessToken,\n @Query(\"authType\") int authType,\n @Query(\"clientId\") String clientId,\n @Query(\"imei\") String imei,\n @Query(\"uid\") String uid);\n\n /**\n * 用户 - 登陆 - 微信登陆\n *\n * @param accessToken\n * @param uid\n */\n @POST(\"callback/wechat/auth\")\n Observable<BaseResponse<Boolean>> doLoginByWeiChat(@Query(\"accessToken\") String accessToken, @Query(\"uid\") String uid);\n\n /**\n * 用户 - 登陆 - 微博登陆\n *\n * @param accessToken\n * @param uid\n */\n @POST(\"callback/weibo/auth\")\n Observable<BaseResponse<Boolean>> doLoginByWeiBo(@Query(\"accessToken\") String accessToken, @Query(\"uid\") String uid);\n\n /**\n * 获取广告Banner图片\n *\n * @param adType 广告位id(app首页轮播图列表id:9)\n */\n @GET(\"/base/ad\")\n Observable<BaseResponse<List<Adv>>> getAdvList(@Query(\"schoolId\")int schoolId, @Query(\"adType\") int adType);\n\n /**\n * 获取食堂配送楼栋\n */\n @POST(\"/buyer/shop/list\")\n Observable<BaseResponse<Pager<StoreStalls>>> getStalls(@Query(\"apartmentId\") int apartmentId,\n @Query(\"page\") int page,\n @Query(\"pageSize\") int pageSize,\n @Query(\"rangeCode\") String rangeCode,\n @Query(\"recomTag\") int recomTag);\n\n /**\n * 获取头条跑马灯\n */\n @POST(\"/buyer/order/marquee\")\n Observable<BaseResponse<List<Marquee>>> getMarquee(@Query(\"schoolId\") int schoolId);\n\n /**\n * 获取主营业务列表\n */\n @POST(\"/buyer/shop/rangelist\")\n Observable<BaseResponse<List<ChannelEntity>>> getRangelist();\n\n /**\n * 获取食堂配送楼栋\n * @param schoolId 配送学校Id\n */\n @POST(\"/buyer/school/apartmentlist\")\n Observable<BaseResponse<List<StoreDelivered>>> getStoreDistributionRange(@Query(\"schoolId\") int schoolId);\n\n /**\n * 选择学校 - 获取定位城市的学校\n * @param areaName 学校所在地区名字\n */\n @POST(\"/buyer/school/list\")\n Observable<BaseResponse<List<AreaCity>>> getSchoolOfLocalCity(@Query(\"areaName\") String areaName);\n\n /**\n * 学校 - LBS:附近学校\n */\n @FormUrlEncoded\n @POST(\"/buyer/school/nearschool\")\n Observable<BaseResponse<List<School>>> getNearSchools(@Field(\"lat\") double lat,\n @Field(\"lng\") double lng,\n @Field(\"distance\") int distance);\n /**\n * 学校 - 检索学校\n */\n @POST(\"/buyer/school/search\")\n Observable<BaseResponse<List<School>>> getSchoolSearchList(@Query(\"schoolName\") String schoolName);\n\n /**\n * 选择学校 - 获取热门城市列表\n */\n @POST(\"area/hotCity\")\n Observable<BaseResponse<List<City>>> getCityHotList();\n\n /**\n * 选择学校 - 获取所有城市列表\n */\n @POST(\"/buyer/area/list\")\n Observable<BaseResponse<CityData>> getCityList();\n\n /**\n * 获取APP信息\n */\n @GET(\"app/auth/androidVersion\")\n Observable<BaseResponse<AppInfoResult>> getAppInfo();\n\n /**\n * 用户-收集手机信息\n * @param userId\n * @param clientId\n * @param os\n * @param osVersion\n * @param deviceModel\n * @param appVersion\n */\n @POST(\"app/collectClientMsg\")\n Observable<BaseResponse<Boolean>> collectClientMsg(@Query(\"userId\") String userId,\n @Query(\"clientId\")String clientId,\n @Query(\"os\")int os,\n @Query(\"osVersion\")String osVersion,\n @Query(\"deviceModel\")String deviceModel,\n @Query(\"appVersion\")String appVersion);\n\n /**\n * 用户 - 信息\n */\n @GET(\"/base/user/current\")\n Observable<BaseResponse<User>> userDoGetInfor();\n\n /**\n * 根据档口获取菜品分类\n * @param shopId 商家id\n */\n @POST(\"/buyer/shop/detail\")\n Observable<BaseResponse<FoodClassList>> getStallsgoodsClass(@Query(\"shopId\") String shopId);\n\n /**\n * 获取档口菜品信息\n * @param shopId 档口Id\n * @param goodsClassId\n * @param page\n * @param pageSize\n */\n @POST(\"/buyer/goods/list\")\n Observable<BaseResponse<Pager<Goods>>> getStallsGoods(@Query(\"apartmentId\") int apartmentId,\n @Query(\"shopId\") String shopId,\n @Query(\"goodsClassId\") String goodsClassId,\n @Query(\"page\")int page,\n @Query(\"pageSize\")int pageSize,\n @Query(\"hotTag\") int hotTag);\n\n\n\n\n /**\n * 用户-下单获取可用红包\n */\n @GET(\"/base/activity/redpacket/queryuserredpacketlist\")\n Observable<BaseResponse<VoucherList>> getUserCoupon();\n\n /**\n * 点餐 - 预计到达时间\n * @param shopId\n */\n @POST(\"/buyer/shop/worktime\")\n Observable<BaseResponse<WorkTimeList>> getEstimatedTime(@Query(\"shopId\") String shopId);\n\n\n /**\n * 订单-获取备注标签\n */\n @GET(\"app/auth/showexplainlabel\")\n Observable<BaseResponse<String>> showexplainlabelReq();\n\n /**\n * 订单-确认下单\n */\n @POST(\"/buyer/order/placeorder\")\n Observable<BaseResponse<String>> placeorder(@Query(\"activityId\") Integer activityId,\n @Query(\"buyerRemark\") String buyerRemark,\n @Query(\"cartIds\") String cartIds,\n @Query(\"channel\") String channel,\n @Query(\"delyEndDate\") String delyEndDate,\n @Query(\"delyFast\") int delyFast,\n @Query(\"delyStartDate\") String delyStartDate,\n @Query(\"shopId\") String shopId,\n @Query(\"userAddressId\") int userAddressId,\n @Query(\"voucherId\") Integer voucherId);\n\n /**\n * 点餐 - 带走 - 绑定手机\n */\n @POST(\"bindPhone\")\n Observable<BaseResponse<Boolean>> doOrderBindPhone(@Query(\"phone\") String phone);\n\n /**\n * 获取下单价格 - 获取实际优惠后价格\n *\n * @param cart_ids 购物车所有商品\n * @param voucherId 优惠券id\n * @param stallsId 档口id\n */\n @POST(\"order/settlement\")\n Observable<BaseResponse<Order>> doPayOrderPrice(@Query(\"cart_ids\") String cart_ids,\n @Query(\"voucherId\")String voucherId,\n @Query(\"stallsId\")String stallsId);\n\n /**\n * 用户 - 钱包 - 支付密码 - 是否认证\n */\n @GET(\"/base/acct/info\")\n Observable<BaseResponse<ActiveInfo>> userWalletPayPswIsAuthReq();\n\n /**\n * 点餐 - 下单 直接下单\n *\n */\n @POST(\"/base/acct/payinfo\")\n Observable<BaseResponse<String>> doPayOrder(\n @Query(\"bizId\") String bizId,\n @Query(\"bizType\")int bizType,\n @Query(\"payPwd\")String payPwd,\n @Query(\"thdType\")int thdType);\n\n\n /**\n * 点餐 - 支付-微信,支付宝\n *\n */\n @POST(\"/base/acct/payinfo\")\n Observable<BaseResponse<Order>> doPayOrder(\n @Query(\"bizId\") String bizId,\n @Query(\"bizType\")int bizType,\n @Query(\"thdType\")int thdType);\n\n /**\n * 用户 - 钱包 - 支付密码 - 认证\n */\n @POST(\"pdauth/auth\")\n Observable<BaseResponse<Boolean>> userWalletPayPswAuthReq(@Query(\"pdPassword\")String pdPassword);\n\n\n\n //TODO.......Created By QiLi.........\n\n /**\n * 七牛 - 请求TOKEN\n * @return\n */\n @POST(\"getQiniuToken\")\n Observable<BaseResponse<String>> getQiNiuTokenRequest(@Query(\"bucketName\") String bucketName);\n\n /**\n * 用户 - 修改 - 头像\n * @param avatarOldKey\n * @param avatarNewKey\n * @return\n */\n @POST(\"modifyAvatar\")\n Observable<BaseResponse<String>> doModifyAvatar(@Query(\"avatarOldKey\") String avatarOldKey,@Query(\"avatarNewKey\") String avatarNewKey);\n\n\n /**\n * 用户 - 修改 - 头像\n * @return\n */\n @POST(\"/base/user/avatar\")\n Observable<BaseResponse<String>> upLoadUserIcon(@Body RequestBody Body);\n\n /**\n * 用户 - 消息列表\n * @return\n */\n @GET(\"/base/msg/user/list\")\n Observable<BaseResponse<Pager<Message>>> getMessageList(@Query(\"page\") int page, @Query(\"pageSize\") int pageSize);\n\n /**\n * 用户 - 修改 - 性别\n * @param sex\n * @return\n */\n @POST(\"modifySex\")\n Observable<BaseResponse<Boolean>> doModifySex(@Query(\"sex\") String sex);\n\n /**\n * 用户 - 修改 - 昵称\n * @param nikeName\n * @return\n */\n @POST(\"/base/user/nick\")\n Observable<BaseResponse<Boolean>> doModifyNickName(@Query(\"nickname\") String nikeName);\n\n\n /**\n * 用户 - 钱包 - 充值活动\n * @return\n */\n @GET(\"pdr/pdActivity\")\n Observable<BaseResponse<List<Action>>> userPDActivity();\n\n /**\n *用户 - 钱包 - 预存款日志记录\n * @param type\n * @param page\n * @param pagesize\n * @return\n */\n @GET(\"new/predeposit/logs\")\n Observable<BaseResponse<Pager<PredepositLog>>> userPredepositLogsReq(@Query(\"type\") Integer type,\n @Query(\"page\") Integer page,\n @Query(\"pagesize\") Integer pagesize);\n\n /**\n * 用户 - 钱包 - 支付密码 - 修改\n * @return\n */\n @POST(\"/base/acct/updatepwd\")\n Observable<BaseResponse<String>> userWalletPayPswModifly(@Query(\"oldPwd\") String oldPwd, @Query(\"newPwd\") String newPwd);\n\n /**\n * 用户 - 钱包 - 支付密码 - 创建\n * @param pdPassword\n * @return\n */\n @POST(\"/base/acct/setpwd\")\n Observable<BaseResponse<Boolean>> userWalletPayPswCreate(@Query(\"payPwd\") String pdPassword);\n\n /**\n *用户 - 钱包 - 支付密码 - 获取验证码\n * @param mobilePhone\n * @param post\n * @return\n */\n @POST(\"pdauth/verifyregcode\")\n Observable<BaseResponse<Boolean>> userWalletPayPswCode(@Query(\"mobilePhone\") String mobilePhone, @Query(\"regcode\") String post);\n\n /**\n * 用户 - 获取验证码\n * @param mobilePhone\n * @return\n */\n @POST(\"/base/msg/code\")\n Observable<BaseResponse<Boolean>> getRegisterCode(@Query(\"codeType\") String codeType, @Query(\"phone\") String mobilePhone);\n\n\n /**\n * 优惠券提现\n * @return\n */\n @GET(\"getCash\")\n Observable<BaseResponse<Integer>> rapGetUserCashCount();\n\n /**\n * 抢单 - 提现\n * @return\n */\n @GET(\"withdrawCash\")\n Observable<BaseResponse<Boolean>> rapDoUserCash();\n\n /**\n * 用户地址列表\n * @return\n */\n @GET(\"/base/user/address\")\n Observable<BaseResponse<UserAddressListEntity>> getAdressList(@Query(\"page\") int page, @Query(\"pageSize\") int pageSize);\n\n /**\n * 删除地址\n * @param addressId\n * @return\n */\n @DELETE(\"/base/user/address\")\n Observable<BaseResponse<Boolean>> userDoAdressDelete(@Query(\"addressId\") int addressId);\n\n /**\n * 用户-修改地址\n * @param addressId\n * @param sex\n * @param apartmentId\n * @param address\n * @param isDefault\n * @return\n */\n @PUT(\"/base/user/address\")\n Observable<BaseResponse<Boolean>> doModifyAdress(@Query(\"address\") String address,\n @Query(\"addressId\") int addressId,\n @Query(\"apartmentId\") int apartmentId,\n @Query(\"isDefault\") int isDefault,\n @Query(\"name\") String name,\n @Query(\"phone\") String phone,\n @Query(\"sex\") int sex);\n\n /**\n * 用户-设置默认地址\n * @param addressId\n * @return\n */\n @POST(\"/base/user/address/default\")\n Observable<BaseResponse<Boolean>> setAddressDefault(@Query(\"addressId\") int addressId);\n\n /**\n * 点餐 - 获取学校列表和宿舍列表\n * @param schoolId\n * @return\n */\n @GET(\"school/schoolApartmentZones\")\n Observable<BaseResponse<SchoolApartment>> getApartmentBySchoolId(@Query(\"schoolId\") int schoolId);\n\n /**\n * 用户-添加地址\n * @param sex\n * @param apartmentId\n * @param address\n * @param mobPhone\n * @param isDefault\n * @return\n */\n @POST(\"/base/user/address\")\n Observable<BaseResponse<UserAddress>> doAddAdress(@Query(\"name\") String name,\n @Query(\"sex\") String sex,\n @Query(\"apartmentId\") int apartmentId,\n @Query(\"address\") String address,\n @Query(\"phone\") String mobPhone,\n @Query(\"isDefault\") String isDefault);\n\n /**\n * 用户 - 邀请好友\n * @param userId\n * @return\n */\n @GET(\"invitefriends/invite\")\n Observable<BaseResponse<InviteInfo>> getUserInviteInfo(@Query(\"userId\") String userId);\n\n /**\n * 用户 - 提交反馈信息\n * @param content\n * @return\n */\n @POST(\"/base/user/feedback\")\n Observable<BaseResponse<Boolean>> doUserFeedBack(@Query(\"content\") String content);\n\n /**\n * 用户 - 修改密码\n * @param oldpassword\n * @param password\n * @return\n */\n @POST(\"/base/user/pwd/modify\")\n Observable<BaseResponse<Boolean>> doUserModifyPassword(@Query(\"oldPwd\") String oldpassword,\n @Query(\"newPwd\") String password);\n\n\n /**\n * 用户 - 钱包 - 充值\n */\n @POST(\"predeposit\")\n Observable<BaseResponse<PredepositOrder>> doWellatPredeposit(@Query(\"paymentId\") int paymentId,\n @Query(\"predeposit\") double predeposit);\n\n /**\n * 用户-修改密码\n */\n @POST(\"newsignup\")\n Observable<BaseResponse<Boolean>> SignUpReq(@Query(\"schoolId\") int schoolId,\n @Query(\"mobilePhone\") String mobilePhone,\n @Query(\"regcode\") String regcode,\n @Query(\"password\") String password,\n @Query(\"type\") int type,\n @Query(\"invitationCode\") String invitationCode);\n\n /**\n * 用户-注册\n */\n @POST(\"/base/user/register\")\n Observable<BaseResponse<Boolean>> doRegister(@Query(\"inviteCode\") String invitationCode, @Query(\"password\") String password, @Query(\"phone\") String phone,@Query(\"verificationCode\") String regcode);\n\n /**\n * 取消订单\n */\n @POST(\"/buyer/order/cancel\")\n Observable<BaseResponse<Boolean>> orderDoCancal(@Query(\"orderId\") String orderId);\n\n /**\n\n * 订单 - 确认收获\n * @param orderId\n */\n @POST(\"/buyer/order/complete\")\n Observable<BaseResponse<Boolean>> userOrderComplete(@Query(\"orderId\") String orderId);\n\n /**\n * 订单 - 催单\n */\n @POST(\"/buyer/order/reminder\")\n Observable<BaseResponse<Integer>> userOrderHurry(@Query(\"orderId\") String orderId);\n\n /**\n\n * 订单 - 获取结算订单详情\n */\n @POST(\"/buyer/order/settlement\")\n Observable<BaseResponse<VoucherList>> setTlement(@Query(\"cartIds\") String cartIds, @Query(\"shopId\") String shopId);\n\n /**\n * 订单 - 商品 - 评价\n */\n @POST(\"order/orderGoods/{goodId}\")\n Observable<BaseResponse<Boolean>> userOrderGoodEvaluate(@Path(\"orderId\") String goodId, @Query(\"scores\") int scores) ;\n\n /**\n * 订单 - 商品 - 评价\n */\n @POST(\"/buyer/order/evaluate\")\n Observable<BaseResponse<String>> evaluate(@Query(\"content\")String content,\n @Query(\"orderId\")String orderId,\n @Query(\"service\")int service,\n @Query(\"speed\")int speed,\n @Query(\"taste\")int taste) ;\n\n /**\n * 选择学校 - 获取学校通过城市Id\n */\n @GET(\"school/acquisitionAreaSchool\")\n Observable<BaseResponse<List<AreaCity>>> getSchoolByAreaId(@Query(\"areaId\") int areaId, @Query(\"areaName\") String areaName);\n\n /**\n * 点餐 - 指定学校的餐厅列表\n * @param schoolId 学校id\n */\n @GET(\"school/stores\")\n Observable<BaseResponse<List<Store>>> getSchoolStorList(@Query(\"schoolId\") int schoolId);\n\n /**\n * 抢单 - 用户 - 认证\n *\n * @param phone 电话\n * @param certificate 证件照片地址\n * @param apartmentId 宿舍id\n * @param address 详细地址\n */\n @POST(\"userjoinin\")\n Observable<BaseResponse<Boolean>> rapDoUserJoin(@Query(\"name\") String name,\n @Query(\"phone\") String phone,\n @Query(\"certificate\") String certificate,\n @Query(\"apartmentId\") int apartmentId,\n @Query(\"address\") String address);\n\n\n\n}", "public static void initRepository() {\n deserialize();\n if (flightRepository == null) {\n flightRepository = new FlightRepository();\n }\n }", "public KorisniciREST() {\n }", "public interface RestaurantEndpoints {\n @GET(\"/restaurants\")\n Call<ArrayList<GETRestaurantResponse>> getRestaurants(@Query(\"priceeq\") String priceEquals,\n @Query(\"pricelte\") String priceLte,\n @Query(\"pricegte\") String priceGte,\n @Query(\"city\") String city,\n @Query(\"name\") String name,\n @Query(\"address\") String address);\n @GET(\"/restaurant_statistics\")\n Call<GETRestaurantStatisticsResponse> getRestaurantStatistics(@Query(\"name\") String name, @Query(\"address\") String address);\n\n @PUT(\"/restaurants\")\n Call<Void> updateRestaurantOwner(@Body PUTRestaurantRequest putRestaurantRequest);\n\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(\"http://youfood.ddns.net\")\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n RestaurantEndpoints restaurantEndpoints = retrofit.create(RestaurantEndpoints.class);\n}", "public interface ApiInterFace {\n @GET(\"restaurants\")\n Call<Restaurant_model> getRestaurants();\n\n @POST(\"/profile\")\n @FormUrlEncoded\n Call<LoginFragment.UserSentResponse> sendUserData(@Field(\"name\") String name, @Field(\"picUrl\") String picUrl, @Field(\"email\") String email);\n\n\n @GET(\"/search/{keyword}\")\n Call<SearchModel> search(@Path(\"keyword\") String keyword);\n\n @GET(\"/profile/{id}\")\n Call<UserProfile_model> getUserInfo(@Path(\"id\") String id);\n\n @GET(\"/meal/{id}\")\n Call<RestaurantMealResponse> getRestaurantMeal(@Path(\"id\") int id);\n\n @GET(\"/restaurant/{id}\")\n Call<RestaurantDetailResponse> getRestaurantDetailResponse(@Path(\"id\") int id);\n}", "public interface LooksoftMainApi {\n @GET(\"main\")\n Call<Data> loadData();\n}", "public static void connectToServer(String baseUrl) {\n\n Retrofit retrofit = new Retrofit.Builder().baseUrl(baseUrl).addConverterFactory(GsonConverterFactory.create()).build();\n UPKService service = retrofit.create(UPKService.class);\n Call<UPKResponse> call = service.getData(\"1ITPdXilVjBOLG_rxaSxeWbK-esHrY8AX3pGvixAzDXo\", \"3\", \"\");\n call.enqueue(new Callback<UPKResponse>() {\n @Override\n public void onResponse(Call<UPKResponse> call, Response<UPKResponse> response) {\n /*\n HAKEEM: added an arraylist data field that will get populated here\n */\n Log.d(\"Success\", \"in there\");\n Log.d(\"YOOO\", \"POJO\" + response.body());\n UPKResponse upkResponse = response.body();\n mUPKList = upkResponse.getRows();\n// uPKReceyclerView.setLayoutManager(new LinearLayoutManager(MapsActivity_Hakeem.getView().getContext()));\n// UPKMapAdapter adapter = new UPKMapAdapter(mUPKList);\n// uPKReceyclerView.setAdapter(adapter);\n Log.d(\"Adapter\", \"adapter attached\");\n\n data = response.body().getRows();\n System.out.println(data);\n System.out.println(\"UPK DATA STREAM\");\n// childCareAdapter = new ChildCareAdapter(response.body());\n// childCareRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n// childCareRecyclerView.setAdapter(adapter);\n }\n\n @Override\n public void onFailure(Call<UPKResponse> call, Throwable t) {\n Log.d(TAG, \"Failed to connect\");\n }\n });\n }" ]
[ "0.8028581", "0.77967876", "0.7737628", "0.7586987", "0.74160314", "0.7414102", "0.7386711", "0.7360634", "0.7354287", "0.7306378", "0.7292581", "0.72472507", "0.70618796", "0.70436525", "0.69733715", "0.684201", "0.67805207", "0.6767313", "0.67385745", "0.6706236", "0.66397125", "0.6627604", "0.6613922", "0.6547876", "0.6541528", "0.6541507", "0.6525024", "0.6518822", "0.64966047", "0.6477685", "0.6465581", "0.6449277", "0.6435452", "0.6430907", "0.6413928", "0.64132005", "0.6385705", "0.63251024", "0.6322123", "0.631545", "0.62963724", "0.6283807", "0.626366", "0.6256382", "0.62463576", "0.6235173", "0.61970896", "0.6156467", "0.61530125", "0.6149748", "0.61389494", "0.6124906", "0.6094917", "0.6093271", "0.60922587", "0.60804635", "0.60754734", "0.6071275", "0.6069029", "0.6067414", "0.6064652", "0.6064391", "0.606011", "0.60581154", "0.6052897", "0.6049621", "0.5984379", "0.59772104", "0.5974298", "0.5955552", "0.5950332", "0.59226644", "0.5914951", "0.59067345", "0.5894962", "0.5886148", "0.58666366", "0.58617", "0.5859016", "0.583939", "0.5839183", "0.58329743", "0.58242065", "0.58133143", "0.5809063", "0.57829034", "0.57812715", "0.5780198", "0.57673866", "0.5758669", "0.57324505", "0.5727283", "0.57265335", "0.5725757", "0.5725297", "0.5705821", "0.5705669", "0.57025427", "0.5702058", "0.5701701" ]
0.76289135
3
create a static method to use the interface verbs
public static Call<List<FlickR>> createCall(String user) { Retrofit retrofit = create(); ApiService apiService = retrofit.create(ApiService.class); return apiService.getFlickRItems(user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface APIClient {\n\n\t// regular expression to parse the action name\n\tPattern actionNamePattern = Pattern.compile(\"violet\\\\.([\\\\w]+)\\\\.([\\\\w]+)\");\n\n\t/**\n\t * The simplest type of call when only one parameter is needed Works only if\n\t * Action type is GET (no side effects)\n\t * \n\t * @param actionName\n\t * @param inMainParamValue\n\t * @return the POJO response\n\t * @throws APIException\n\t */\n\tObject executeMethodCall(String actionName, String inMainParamValue) throws APIException;\n\n\t/**\n\t * A more sophisticated call when multiple structured parameters must be\n\t * passed\n\t * \n\t * @param actionName\n\t * @param inParam\n\t * @return the POJO response\n\t * @throws APIException\n\t */\n\tObject executeMethodCall(ActionType actionType, String actionName, Map<String, Object> inParams) throws APIException;\n\n}", "public interface MethodsHttpUtils {\n HttpResponse doGet(String url, String mediaType) throws AppServerNotAvailableException, IOException;\n HttpResponse doPost(String url, String mediaType, String dataJson) throws UnsupportedEncodingException, ClientProtocolException, AppServerNotAvailableException;\n HttpResponse doDelete(String url, String mediaType) throws AppServerNotAvailableException;\n HttpResponse doPut(String url, String mediaType, String dataJson) throws AppServerNotAvailableException;\n}", "public interface ApiAction {}", "public interface METHODS {\n public static int TIME = 0;\n public static int DISTANCE= 1;\n public static int STEPS = 2;\n public static int ACHIEVEMENTS = 3;\n }", "public static interface _cls9\n{\n\n public abstract void userCancelledSignIn();\n\n public abstract void userSuccessfullySignedIn();\n}", "public interface IPresenterHienThiSanPhamTheoDanhMuc {\n void LayDanhSachSP_theoMaLoai(int masp,boolean kiemtra);\n}", "public interface ApiMethod\n{\n\tpublic void func(ApiContext ac) throws JSONException, LibException;\n}", "interface Interface1 {\n\n\tdefault void add() {\n\t\tSystem.out.println(\"Interface1 add method\");\n\t}\n\n\tdefault void display() {\n\t\tSystem.out.println(\"Interface1 display\");\n\t}\n\n\t//static methods can be invoked only using InterfaceName.methodName\n\tstatic void print() {\n\t\tSystem.out.println(\"Interface1 print\");\n\t}\n\n\tstatic void printV2() {\n\t\tSystem.out.println(\"Interface1 printV2\");\n\t}\n}", "interface TakesScreenshot{\n\tString $FILE_EXTENSION=\".png\"; //COMPILER ADDs 'public static final' automatically \t\n\tvoid takesScreenshot();\n\t//added from jdk 1.8\nstatic void takeSelfie() {\n\t\tSystem.out.println(\"I am defined static method of TakesScreenshot interface\");\n\t}\ndefault void takePictures() {\n\t\tSystem.out.println(\"I am default defined method of TakesScreenshot interface\");\n\t}\n}", "public interface i {\n void D(String str);\n\n void H();\n\n void L(String str);\n\n void b0(Response response);\n\n void c(List<DomainExpired> list);\n\n void h(Map<String, List<ExtendedMail>> map);\n\n void p(ApiError apiError);\n}", "public interface DownloadPermissionChecker {\n /* renamed from: a */\n void mo26167a(Activity activity, int i, String[] strArr, int[] iArr);\n\n /* renamed from: a */\n void mo26168a(Activity activity, String[] strArr, IPermissionCallback nVar);\n\n /* renamed from: a */\n boolean mo26169a(Context context, String str);\n}", "public interface Methods {\n\n /**\n * List all static methods for a given content model.\n *\n * @param cmpid Pid of the content model.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If content model doesn't exist.\n */\n public List<Method> getStaticMethods(String cmpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * List all dynamic methods for a given object.\n *\n * @param objpid Pid of the object.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object doesn't exist.\n */\n public List<Method> getDynamicMethods(String objpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * Invoke a given method with the given parameters.\n *\n * @param pid The pid of the content model or object defining the method.\n * @param methodName The name of the method.\n * @param parameters Parameters for the method, as a map from name list of values.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return Result of calling method.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object, content model or method doesn't exist.\n */\n 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;\n}", "public interface IPRequest<P> {\n\n P permission(String... permission);\n\n P permission(List<String> permissions);\n\n P rationale(RationaleAction<List<String>> action);\n\n P onDenied(Action<List<String>> action);\n\n P onGranted(Action<List<String>> action);\n\n void start();\n\n}", "public interface Requestable {\n\n /**\n * In our TicTacToe game server sends get methods\n *\n * @return an json sting of the request\n */\n public String post();\n\n /**\n * In TicTacToe game client sends post methods\n *\n * @return an json string of the request;\n */\n public String get();\n\n}", "public interface ICommonAction {\n\n void obtainData(Object data, String methodIndex, int status,Map<String, String> parameterMap);\n\n\n}", "public interface ApiFlags {\n int GET_SOMETHING = 0;\n int GET_SOMETHING_ELSE = 1;\n }", "public interface ApiFlags {\n int GET_SOMETHING = 0;\n int GET_SOMETHING_ELSE = 1;\n }", "public interface IUserService {\n\n static void test(){\n System.out.println(123);\n }\n\n default void teset1(String name){\n System.out.println(name);\n }\n\n int a = 0;\n\n}", "protected abstract boolean invokable(Resource r);", "public interface AppAction\n{\n void login(String name, String password, Handler handler);\n\n void access(Handler handler, String ...s);\n\n void gdata(Handler handler, List<EHentaiMangaInfo> list);\n\n void getMangaInfo(Handler handler);\n\n void getNews(Handler handler);\n\n void getNews(Handler handler, String title, String page);\n\n void getImg( String url, ImageView imageView,AppActionImpl.Callback<Void> callback,int height,int width);\n}", "public interface IMy extends IA, IB{\n int a = 10;\n int []b = {1,2,3,4,5,6,7};\n\n void m();\n static void sm(){\n System.out.println(\"hi from static method\");\n }\n default void dm(){\n System.out.println(\"hi from default method\");\n }\n}", "@FunctionalInterface // or we can call it SAM\r\n interface ShowMe{\r\n\t\r\n\t void showOk();\r\n\t \r\n\tpublic default void one()\r\n\t {\r\n\t System.out.println(\"method one \");\r\n };\r\n \r\n public static void one1()\r\n {\r\n System.out.println(\"method one 1 \");\r\n };\r\n \r\n public default void one2()\r\n \t {\r\n \t System.out.println(\"method one2 \");\r\n };\r\n \r\n }", "private static interface Base {\n\n public void foo();\n }", "public interface IProtocol {\r\n int ADD_ELEMENT = 2100; // parent, 0, Elements.Extra\r\n\r\n int CLEAR_CHILDREN = 2005; // parent\r\n\r\n int CONTROL_ABOUT = 3001;\r\n\r\n int CONTROL_DELETE_SAVE = 3003;\r\n\r\n // int CONTROL_RESTART = 3004;\r\n int CONTROL_FORCE_CLICK = 3005;\r\n\r\n int CONTROL_HELP = 3002;\r\n\r\n // int UPDATE_SCROLL = 5;\r\n int DISPLAY_TOAST = 2001; // OBJ = text\r\n\r\n int ON_CLICK = 1101; // OBJ = view\r\n\r\n int ON_CREATE = 1001; // OBJ = bundle\r\n\r\n int ON_DESTROY = 1006;\r\n\r\n int ON_PAUSE = 1004;\r\n\r\n int ON_RESUME = 1003;\r\n\r\n int ON_START = 1002;\r\n\r\n int ON_STOP = 1005;\r\n\r\n int ON_TOUCH_EVENT = 1103;\r\n\r\n int SET_THEME = 5001;\r\n\r\n int SHOW_HELP_PAGE = 4001;\r\n\r\n int SHOW_LICENSE = 4002;\r\n\r\n int UPDATE_COLOR = 2;\r\n\r\n int UPDATE_ENABLED = 3;\r\n\r\n int UPDATE_INFLATE = 4;\r\n\r\n int UPDATE_TEXT = 1;\r\n\r\n int UPDATE_VIEW = 0;\r\n}", "public interface OurService {\n\n static public void provideService(){\n System.out.println(\"OurService Static provideService()\");\n }\n}", "private static interface Service {}", "public interface RemotInterfaceOperations \n{\n String createDRecord (String managerId, String firstName, String lastName, String address, String phone, String specialization, String location);\n String createNRecord (String managerId, String firstName, String lastName, String designation, String status, String statusDate);\n String getRecordCount (String managerId, int recordType);\n String editRecord (String managerId, String recordID, String fieldName, String newValue);\n String transferRecord (String managerID, String recordID, String remoteClinicServerName);\n}", "public interface IEstado {\n\n /**\n * Modifica el estado del objeto publicacion\n *\n * @return String\n */\n String ejecutarAccion();\n}", "public interface GetList {\n\n /**\n * Check basic endpoint operations.\n */\n void testCanGetList();\n\n /**\n * Validate response according to specified schema.\n */\n void validateJson();\n\n /**\n * Check sorting order.\n */\n void testSortOrder();\n}", "interface C0868a {\n /* renamed from: a */\n void mo3207a(Object obj);\n\n /* renamed from: a */\n void mo3208a(String str, Bundle bundle);\n\n /* renamed from: a */\n void mo3209a(String str, Bundle bundle, ResultReceiver resultReceiver);\n\n /* renamed from: a */\n boolean mo3210a(Intent intent);\n }", "interface ApsalarAPI {\n\n /* compiled from: ApEvent */\n public static class Status {\n static final int INVALID = -1;\n static final int POSTPONE = 0;\n static final int SUCCESS = 1;\n }\n\n /* compiled from: ApEvent */\n public static class Type {\n static final int END_SESSION = 4;\n static final int EVENT = 3;\n static final int HEARTBEAT = 2;\n static final int NONE = 0;\n static final int REGISTER = 5;\n static final int RETRY = -1;\n static final int SESSION = 1;\n static final int TRIGGER = 6;\n }\n\n int REST();\n}", "public interface IValid {\n\n default boolean isValid(String annoStr) {\n return null!=getValid(annoStr);\n }\n\n default IMVC getValid(String annoStr) {\n String anno = null;\n if (annoStr.startsWith(\"@\")) {\n if(annoStr.indexOf(\"(\")!=-1){\n anno = annoStr.substring(1,annoStr.indexOf(\"(\"));\n }else{\n anno = annoStr.substring(1);\n }\n }else{\n if(annoStr.indexOf(\"(\")!=-1){\n anno = annoStr.substring(0,annoStr.indexOf(\"(\"));\n }else{\n anno = annoStr;\n }\n }\n for (IMVC imvc : getTypes()) {\n if (imvc.getRequestParamName().endsWith(anno)||imvc.getRequestParamName().equals(anno)) {\n return imvc;\n }\n }\n return null;\n }\n\n List<IMVC> getTypes();\n\n IParameter getParameter(String parameterStr,List<String> docsStrs);\n}", "public interface IResponsableService extends IService<Responsable>\n{\n /**\n * Valid responsable authentification int.\n *\n * @param r the r\n * @param password the password\n * @return the int\n * @throws NoSuchAlgorithmException the no such algorithm exception\n */\n int validResponsableAuthentification(Responsable r, String password) throws NoSuchAlgorithmException;\n\n /**\n * Gets credential by email.\n *\n * @param email the email\n * @return the credential by email\n */\n Responsable getCredentialByEmail(String email) throws ServiceException;\n\n /**\n * Valid authentification int.\n *\n * @param r the r\n * @param password the password\n * @return the int\n * @throws NoSuchAlgorithmException the no such algorithm exception\n */\n int validAuthentification(Responsable r, String password) throws NoSuchAlgorithmException, CredentialException1, EmailFormatException;\n\n}", "public interface GetLiCaiUcInfoImpl {\n void getLiCaiUcInfoSuccess(LiCaiUcInfoJson response);\n\n void getLiCaiUcInfoFailed();\n}", "public interface RequestAPI {\n public void signIn(String login, String password) throws RequestException, WrongParameterException;\n\n public void signUp(String login, String password) throws RequestException, WrongParameterException;\n\n public void addFriend(String name) throws RequestException, WrongParameterException, UnauthorizedException;\n\n public void deleteFriend(String name) throws RequestException, WrongParameterException, UnauthorizedException;\n\n public void deleteFriendRequest(String name) throws RequestException, WrongParameterException, UnauthorizedException;\n\n public Account getMyAccountInfo() throws RequestException, UnauthorizedException;\n\n public String getToken();\n\n public String getHost();\n}", "public static interface _cls9\n{\n\n public abstract void onEbayError(List list);\n\n public abstract void onRemindersError();\n\n public abstract void updateMsgRemindersCounts(UserActivitySummary useractivitysummary);\n}", "public interface VKHanlerInterface {\n public void onGetIncomingMessage(LoopMessage msg);\n public void onGetOutgoingMessage(LoopMessage msg);\n public void onTypingMessageInDialog(int userId); //приходит примерно раз в пять секунд\n public void onTypingMessageInChat(int userId, int chatId);\n public void onMessageDelete(int messageId);\n\n //-------- нечто странное и не реализованное пока --------------------\n public void onMessageFlagsReplace(int messageId);\n public void onMessageFlagsSet();\n public void onMessageFlagsReset();\n //-------------------------------------------------\n\n public void onChatEdit(int chatId, boolean selfEdit);\n\n public void onFriendOnline(int userId);\n public void onFriendOffline(int userId, boolean away ); //away - оффлайн по таймауту\n public void onCall(int userId, int chatId); //не реализовано\n}", "public interface BaseView {\n\n /**\n * 返回请求信息\n * @param value\n */\n void showReqResult(String value);\n\n}", "public interface ResourceChangeForMaketService {\n\n void send(Object o,User operator);\n}", "public interface Hello{\n String res(String paramString) ;\n}", "public interface IRegModel extends BaseModel {\n void sendValidateRequest(ValidateRequest validateRequest, OnRequestResponse<ValidateResponse> onRequestResponse);\n\n void sendRegRequest(RegRequest regRequest, OnRequestResponse<RegResponse> onRequestResponse);\n\n void sendValiadateConfirmRequest(RegRequest regRequest, OnRequestResponse<ValidateResponse> onRequestResponse);\n}", "public interface IAction {\n /**\n * request dispatcher.\n * @param request objet resuete\n * @param response objet reponse\n * @return String return if the response is ok or ko\n */\n String execute(HttpServletRequest request, HttpServletResponse response);\n}", "public interface BaseModel {\n public static IHttp iHttp = HttpFactory.create();\n\n public static IHttp getiHttp=HttpFactory.create1();\n}", "public interface UIFormMenuBuilderInterface {\r\n\r\n\t/**\r\n\t * Return a new UIMenu object.\r\n\t * \r\n\t * @param heading String\r\n\t * @return UIMenu UIMenu\r\n\t */\r\n\t//UIFormMenu toUIMenu(String heading);\r\n\t\r\n\t/**\r\n\t * Return a new UIForm object.\r\n\t * \r\n\t * @param heading String\r\n\t * @return UIForm UIForm\r\n\t */\r\n\tUIFormMenu toUIFormMenu(String heading);\r\n\t\r\n\t/**\r\n\t * Add prompt to UIMenu\r\n\t * \r\n\t * @param prompt Prompt\r\n\t * @param action Action to be taken\r\n\t */\r\n\tvoid add(String prompt, UIMenuAction action);\r\n\t\r\n\t/**\r\n\t * Add prompt to UIForm\r\n\t * \r\n\t * @param prompt Prompt\r\n\t * @param test Test for form\r\n\t */\r\n\tvoid add(String prompt, UIFormTest test);\r\n\t\r\n}", "public interface SimpleInterface {\n String interfaceMethod(Integer value);\n}", "public interface Meta {\r\n\r\n\t/**\r\n\t * Lists method names exposed by endpoint.\r\n\t *\r\n\t * @return method name list\r\n\t */\r\n\t@XRMethod(value = \"system.listMethods\", help = \"List all method names available\")\r\n\tList<String> listMethods();\r\n\r\n\t/**\r\n\t * Provides help/usage information for a method.\r\n\t *\r\n\t * @param methodName\r\n\t * name of the method\r\n\t * @return help/usage information for a method\r\n\t */\r\n\t@XRMethod(value = \"system.help\", help = \"Returns usage information for a method\")\r\n\tString help(String methodName);\r\n\r\n\t// @XRMethod(\"system.multicall\")\r\n\t// List multicall(List calls);\r\n\r\n\t/**\r\n\t * Checks if method is supported by endpoint or not.\r\n\t *\r\n\t * @param methodName\r\n\t * name of the method\r\n\t * @return true if method is supported by endpoint, false otherwise\r\n\t */\r\n\t@XRMethod(value = \"system.supports\", help = \"Returns true if method is supported, false otherwise\")\r\n\tboolean supports(String methodName);\r\n}", "public interface ApiInterface {\n\n @GET(\"status.txt\")\n Call<Integer> getStatus();\n\n @GET(\"login.php\")\n Call<LoginModel> login(@Query(\"phone\") String phone);\n\n @GET(\"verify.php\")\n Call<LoginModel> verify(@Query(\"phone\") String phone, @Query(\"code\") String code);\n}", "public interface ActivityAction {\r\n public void viewedActivity(String condition, String viewerFullName);\r\n}", "public interface ChangePhoneIF {\n void changePhoneSuccess(int code, String result);\n\n void changePhoneFailed(int code, String result);\n\n void getchangePhoneSmsSuccess(int code, String result);\n\n void getchangePhoneSmsfailed(int code, String result);\n\n void checkchangePhoneSmsSuccess(int code, String result);\n\n void checkchangePhoneSmsFailed(int code, String result);\n}", "public interface Jefes {\n\n//Los metodos de las intefeces no utilizan llaves\n String tomar_decisiones(String decision);\n\n \n\n\n \n}", "interface StaticMethodInInterface {\n\t// abstract method\n\tpublic void square(int a);\n\n\t// static method\n\tstatic void show() {\n\t\tSystem.out.println(\"Static Method Executed\");\n\t}\n}", "private void createIAnswerInterface(final Environment result,\n\t\t\tEnvironment extEnv)\n\t{\n\n\t\tList<String> genericArguments = new LinkedList<String>();\n\t\tgenericArguments.add(\"A\");\n\t\tString name = \"Answer\";\n\t\tString tag = result.TAG_IAnswer;\n\t\tMethodFactory extMf = new MethodFactory()\n\t\t{\n\n\t\t\t// @Override\n\t\t\t// public void updateApplyMethod(IClassDefinition cdef,\n\t\t\t// String newAnalysisName) {\n\t\t\t// AnswerAcceptMethod aam = findMethodType(\n\t\t\t// AnswerAcceptMethod.class, cdef);\n\t\t\t// if (aam != null)\n\t\t\t// aam.setPrivilegedBody(\"\\t\\treturn (A)((\"\n\t\t\t// + newAnalysisName\n\t\t\t// + \"<A>)caller).case\"\n\t\t\t// + AnalysisUtil.getCaseClass(result, cdef).getName()\n\t\t\t// .getName() + \"(this);\");\n\t\t\t// }\n\n\t\t\t@Override\n\t\t\tpublic Method createCaseMethod(IClassDefinition cdef)\n\t\t\t{\n\t\t\t\tAnswerAdaptorCaseMethod caseM = new AnswerAdaptorCaseMethod();\n\t\t\t\tcaseM.setClassDefinition(cdef);\n\t\t\t\treturn caseM;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Method createDefaultCaseMethod(IClassDefinition cdef)\n\t\t\t{\n\t\t\t\tAnswerAdaptorDefaultMethod aadm = new AnswerAdaptorDefaultMethod();\n\t\t\t\taadm.setClassDefinition(cdef);\n\t\t\t\treturn aadm;\n\t\t\t}\n\t\t};\n\t\tcreateAnalysisInterface(genericArguments, name, tag, extMf, extEnv, result, base);\n\t}", "public interface C11922a {\n void bvR();\n }", "public interface zze\n extends IInterface\n{\n\n public abstract void zza(zzd zzd, GoogleSignInConfig googlesigninconfig);\n\n public abstract void zza(zzd zzd, SignInConfiguration signinconfiguration);\n\n public abstract void zzb(zzd zzd, GoogleSignInConfig googlesigninconfig);\n\n public abstract void zzb(zzd zzd, SignInConfiguration signinconfiguration);\n\n public abstract void zzc(zzd zzd, GoogleSignInConfig googlesigninconfig);\n}", "public interface ServConstrainsManagement {\n /**\n * Obtien la lista de componentes visuales a los cuales no tendra accesso\n * el rol (perfil) que esta operando el sistema\n * @return Lista de componentes visuales que no tiene acceso\n */\n public List<ViewConstrainsEnum> getViewConstrainsUIComponent();\n \n}", "public interface MyActions {\n\n String GET_ROUTINES = \"get-routines\";\n String RENAME_ROUTINE = \"rename-routine\";\n String DELETE_ROUTINE = \"delete-routine\";\n String CREATE_ROUTINE = \"create-routine\";\n String UPDATE_TASKS = \"update-tasks\";\n String GET_TASKS = \"get-tasks\";\n\n String CREATE_TASK = \"create-task\";\n String DELETE_TASK = \"delete-task\";\n void deleteTask(String routine, Task task);\n String UPDATE_TASK = \"update-task\";\n String UPDATE_BREAK_INTERVAL = \"update-break-interval\";\n String GET_BREAK_INTERVAL = \"get-break-interval\";\n String SAVE_HISTORY = \"save-history\"; //save after each task completes\n String GET_HISTORY = \"get-history\";\n String LOGIN = \"login\";\n\n void getRoutines();\n\n void renameRoutine(String oldName, String newName);\n\n void deleteRoutine(String routine);\n\n void createRoutine(String name, int priority);\n\n void updateTask(String routine, Task oldTask, Task newTask, int position);\n\n void updateBreakInterval(String routine, int interval);\n\n void getBreakInterval(String routine);\n\n void getTasks(String routine);\n\n void createTask(String routine, Task task, int priority);\n\n void updateTasks(String routine, List<Task> tasks);\n\n void login(String userEmail);\n\n void saveHistory(String routine, Task task, String date, String time);\n\n void getHistory();\n\n}", "public interface ActionHandler {\n ModelApiResponse handleActionChoice(ActionChoice choice);\n List<AvailableActions> getActionsCurrentlyAvailable();\n}", "public interface IMcuContract {\n interface IView extends ImpBaseView{\n void loginRes(Type type);\n }\n interface IPresenter extends ImpBasePresenter{\n IPresenter initURL(Context c, String ip, int port, boolean isSSL);\n void login(String account,String pwd);\n }\n}", "public interface Action {\n\n /**\n * Execute.\n *\n * @param router the router\n * @param request the request\n * @return the response\n */\n public Response execute(Router router, Request request);\n\n}", "public interface IUserInformation {\n void updateUserInformation(String teacherId, ArrayList<String> images, String tName, int sex, String college, String profession, int education, int grade, List<Integer> pbxType, String introduction, String headUrl, Response.Listener<BaseBean> listener, Response.ErrorListener errorListener);\n\n void getUserInfo(String teacherId, Response.Listener<User> listener, Response.ErrorListener errorListener);\n\n void updateUserPhone(String teacherId, String mobile, Response.Listener<BaseBean> listener, Response.ErrorListener errorListener);\n\n\n}", "public interface HawkToBrainComp {\n /**\n * Every kind of personality will have a designated response in the form of IDK(I don't know)\n * This method allows the Hawker can use this method and an equals method to the response to determine\n * if the AI didn't have a response available for the User.\n * @return returns the IDK response of the Personality\n */\n public String getIDKReply();\n\n /**\n * Send a conventional grammar into this method and receive a response from the AI Personality\n * @param conventional_Grammar to be determined\n */\n public String requestResponce(String conventional_Grammar);\n}", "public interface ICreateAction extends IAction{\r\n\t\r\n\t\r\n}", "public interface IBankWorkerAction extends INormalUserAction {\n // 查用户的信用\n void checkUserCredit();\n // 冻结用户账号\n void freezeUserAccount();\n}", "public interface GestionDesProfilsOperations\r\n{\r\n /**\r\n * Read accessor for numeroGDP attribute\r\n * @return the attribute value\r\n */\r\n public short numeroGDP();\r\n\r\n /**\r\n * Operation connexion\r\n */\r\n public PostLicence.GestionDesVoeux connexion(PostLicence.IEtudiant iorEtudiant, String ine, String mdp)\r\n throws PostLicence.DonneesInvalides;\r\n\r\n /**\r\n * Operation consulterProfil\r\n */\r\n public PostLicence.Etudiant consulterProfil(String ine)\r\n throws PostLicence.DonneesInvalides;\r\n\r\n /**\r\n * Operation modifierProfil\r\n */\r\n public void modifierProfil(String ine, String adr)\r\n throws PostLicence.DonneesInvalides;\r\n\r\n /**\r\n * Operation inscriptionGestionDesVoeux\r\n */\r\n public void inscriptionGestionDesVoeux(PostLicence.GestionDesVoeux GDesVx);\r\n\r\n}", "public interface CommonEntityMethod extends ToJson,GetFieldValue,SetFieldValue{\n}", "public interface VuActivityMain extends Vu.ActivityVu {\n void showBtn(String st);\n\n void showBtn2(String st);\n}", "public interface IPermissionService extends IBaseService {\n\n public Integer initPermission(List<InitPermission> list) throws Exception;\n\n public List<UserPermission> listUserPermission(List<Integer> ids) throws Exception;\n\n Integer listPermissionEntityCount( Map<String,Object> paramMap)throws Exception;\n List<PermissionEntity> listPermissionEntity(Map<String,Object> paramMap)throws Exception;\n List<PermissionEntity> listPermissionEntity2(Map<String,Object> paramMap)throws Exception;\n\n PermissionEntity getPermission(PermissionEntity param)throws Exception;\n\n\n}", "public interface ViewBinhLuan {\n void DangBinhLuanThanhCong();\n void DangBinhLuanThatBai();\n}", "public interface GetTaskInterface extends publiceviewinterface {\n void gettaskdetails(MyTaskBean myTaskBean);\n void accepttask();\n void gettaskfall();\n}", "public interface Attacker {\n String attack(Vehicle vehicle);\n}", "public interface IADCarry extends ILOLRoleAction {\n}", "public interface HappyMethods {\n\n boolean isHappy(Ticket ticket);\n\n}", "String getMethod();", "String getMethod();", "public interface C14016a {\n void abU(String str);\n\n void cHM();\n\n void cHO();\n\n /* renamed from: mh */\n void mo26249mh(boolean z);\n }", "public interface IFaci {\n}", "public interface IPresenterTinTuc {\n void layDanhSachTinTuc(String duongDan);\n TrangTinTuc layDanhSachTinTucLoadMore(String duongDan);\n}", "public interface Methods {\n\n String WELCOME = \"bftv.voice.welcome\";\n\n}", "AuthenticationMethod createAuthenticationMethod();", "public interface SaavnApi\n{\n @GET(\"/api.php\")\n Call<List<Song>> makeSongRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n\n @GET(\"/api.php\")\n Call<SongList> makePlaylistRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n\n @GET(\"/api.php\")\n Call<Show> makeShowRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n\n @GET(\"/api.php\")\n Call<Song> makeEpisodeRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n}", "public interface ForbiddenCheckServ {\n\n boolean grammarCheck(String ce);\n}", "public interface AlarmInfoInterface {\n\n /**\n * 时间选择\n */\n void showDateDialog(int timetype);\n /**\n * 通知区县选择\n */\n void showCountrySelectDialog(int type);\n\n void showProgress(boolean isshow);\n /**\n * 显示图片\n */\n void showImage();\n /**\n * 显示图片\n */\n void showImageDetail(int imgpath);\n /**\n * 接警来源\n */\n void showOriginDialog();\n /**\n * 火情状态\n */\n void showStatusDialog();\n\n /**\n * 是否火灾\n */\n void showIsfireDialog();\n /**\n * 接警详细\n */\n void openAlarmInfoDetails(String id);\n\n\n\n\n}", "public interface Protocol {\n\n <T> void export(String interfaceName, Class<T> clazz) throws Exception;\n\n <T> Invoker<T> refer(Class<T> type, URL url) throws Exception;\n\n}", "IFMLAction createIFMLAction();", "public interface MethodFactory extends ModuleSupportable\n{\n\t/**\n\tUsed to identify this interface when finding it with the Monitor.\n\t**/\n\tpublic static final String MODULE = \n\t \"com.splicemachine.db.iapi.store.access.conglomerate.MethodFactory\";\n\n\t/**\n\tReturn the default properties for this access method.\n\t**/\n\tProperties defaultProperties();\n\n\t/**\n\tReturn whether this access method implements the implementation\n\ttype given in the argument string.\n\t**/\n\tboolean supportsImplementation(String implementationId);\n\n\t/**\n\tReturn the primary implementation type for this access method.\n\tAlthough an access method may implement more than one implementation\n\ttype, this is the expected one. The access manager will put the\n\tprimary implementation type in a hash table for fast access.\n\t**/\n\tString primaryImplementationType();\n\n\t/**\n\tReturn whether this access method supports the format supplied in\n\tthe argument.\n\t**/\n\tboolean supportsFormat(UUID formatid);\n\n\t/**\n\tReturn the primary format that this access method supports.\n\tAlthough an access method may support more than one format, this\n\tis the usual one. the access manager will put the primary format\n\tin a hash table for fast access to the appropriate method.\n\t**/\n\tUUID primaryFormat();\n}", "public interface InterfaceWebRequest {\n void dispatchRequest();\n}", "public interface AppManager {\n /**\n * 根据bizCode获取业务信息\n * @param bizCode\n * @return\n * @throws ItemException\n */\n public BizInfoDTO getBizInfo(String bizCode) throws ItemException;\n\n /**\n * 根据appKey获取应用信息\n * @param appKey\n * @return\n * @throws ItemException\n */\n public AppInfoDTO getAppInfo(String appKey) throws ItemException;\n\n\n public AppInfoDTO getAppInfoByType(String bizCode, AppTypeEnum appTypeEnum) throws ItemException;\n\n\n}", "public interface ICommand {\r\n public List<String> getRights();\r\n public String execute() throws ServletException, IOException;\r\n}", "public interface zzo\n extends IInterface\n{\n\n public abstract void zze(AdRequestParcel adrequestparcel);\n}", "private Get() {}", "private Get() {}", "interface RadioInterface {\n\n public int continuar();\n public int retroceder();\n public void aumentarEmisoraActual(boolean AM);\n\n}", "public interface Request {\n}", "public interface ICommand {\r\n \r\n /**\r\n * method execute some command\r\n * @param request\r\n * @param response\r\n * @return\r\n * @throws ServletException\r\n * @throws IOException \r\n */\r\n public String execute(HttpServletRequest request, \r\n HttpServletResponse response) throws ServletException, IOException;\r\n}", "public interface ControllerInterface extends Remote {\n\n /**\n * Remotely invocable method.\n *\n * @param text\n * @exception RemoteException if the remote invocation fails.\n */\n public void setText(String text) throws RemoteException;\n\n public String getText() throws RemoteException;\n \n public void criarArquivo(String nome) throws RemoteException;\n\n public String[] listarArquivos() throws RemoteException;\n \n public String abrirArquivo(String nome) throws RemoteException;\n \n public void editarArquivo(String nome, String texto) throws RemoteException;\n \n public void insert(char c, int pos) throws RemoteException;\n}", "public interface IValidator {\n\n /**\n * Based on what is required to be validated,\n *\n * @param response The REST response returns JSONElement.\n * @return By default, return false. Implementations returns true, if this matches expectation.\n */\n default boolean checkJsonResp(JsonElement response) {\n return false;\n }\n\n /**\n * Based on what is required to be validated,\n *\n * @param object On querying the db returns an object of the required class.\n * @return By default, return false. Implementations returns true, if this matches expectation.\n */\n default boolean checkDbObj(Object object) {\n return false;\n }\n}", "public interface IFruit {\n\n void say();\n}", "public interface MetaInformationService extends BasicEcomService{\n\n public String listMetaInformationTypesForPage(String page);\n public Integer getTotalPagesForMetaInformationTypes();\n public Integer getTotalPagesForSearchedMetaInformationTypes(String metaType);\n public String listSearchedMetaInformationTypesForPage(String metaType,String page);\n\n\n}", "interface InterfaceOuting {\n abstract String movingActivity();\n abstract String climbingActivity();\n\n default void restingActivity(){\n String rest = \"Napping\";\n displayOuting(rest);\n }\n\n static void displayOuting(String activity){\n System.out.println(\"This outing will involve \" + activity);\n }\n}", "public interface ILoginView extends IUI {\n void closeAct();\n void isGetCodeSuccess();\n}", "public interface Action { //придумываем интерфейс для описания действий, присущих роботу\n Action dogo(MapOfAction mapOfAction); //объявляем функцию для действий, которой передаём карту\n\n}" ]
[ "0.62925506", "0.6281801", "0.623713", "0.6231941", "0.61856145", "0.6163536", "0.61603624", "0.61105675", "0.60849077", "0.605425", "0.6051773", "0.6045794", "0.59787214", "0.59711844", "0.5969987", "0.59665096", "0.59665096", "0.5945399", "0.59275776", "0.5916439", "0.5915039", "0.59077924", "0.5902923", "0.59027207", "0.59005356", "0.5889513", "0.58891064", "0.58886623", "0.5859507", "0.58594394", "0.58426434", "0.58419925", "0.58324045", "0.58305055", "0.5824772", "0.58124274", "0.5807898", "0.57933927", "0.57933646", "0.57928723", "0.5792038", "0.57846", "0.57818794", "0.5780492", "0.5776646", "0.5774489", "0.5770781", "0.57566947", "0.5753868", "0.57534146", "0.5746357", "0.57427293", "0.57407385", "0.5740597", "0.5720198", "0.57186574", "0.5711423", "0.56977606", "0.5696136", "0.56925404", "0.56910723", "0.56897223", "0.56851274", "0.56788117", "0.5678423", "0.56750554", "0.56734395", "0.56723464", "0.5665312", "0.5662872", "0.56623876", "0.5661207", "0.56562394", "0.56562394", "0.5645862", "0.56393576", "0.5632376", "0.5628066", "0.5623261", "0.5622765", "0.562163", "0.5618566", "0.5617494", "0.5613524", "0.56118333", "0.5611274", "0.56063104", "0.5603125", "0.56018126", "0.5600392", "0.5600392", "0.5599878", "0.5596133", "0.5595479", "0.5592799", "0.559249", "0.55890775", "0.5577242", "0.55768466", "0.5569251", "0.5568072" ]
0.0
-1
create an interface to have all the paths and verbs for the REST api to use
interface ApiService { @GET("users/{user}/repos") Call<List<FlickR>> getFlickRItems(@Path("user") String user); @GET("users/{user}") Call<Owner> getFlickRMedia(@Path("user") String user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface APIEndpoints {\n\n @GET(\"user/{id}\")\n Call<User> getUser(@Path(\"id\") String userId);\n\n @GET(\"user\")\n Call<List<User>> getUsers();\n\n @POST(\"user\")\n Call<User> createUser(@Body User user);\n\n @PATCH(\"user/{id}\")\n Call<User> updateUser(@Body User user, @Path(\"id\") String userId);\n\n @DELETE\n Call<User> deleteUser(@Path(\"id\") String userID);\n\n @GET(\"challenge\")\n Call<List<Challenge>> getChallenges();\n\n @GET(\"challenge/{id}\")\n Call<Challenge> getChallenge(@Path(\"id\") String challengeID);\n\n @POST(\"challenge\")\n Call<User> createChallenge(@Body Challenge challenge);\n\n @PATCH(\"challenge/{id}\")\n Call<Challenge> updateChallenge(@Body Challenge challenge, @Path(\"id\") String challengeID);\n\n @DELETE\n Call<User> deleteChallenge(@Path(\"id\") String challengeID);\n\n @GET(\"issue\")\n Call<List<Issue>> getIssues();\n\n @GET(\"issue/{id}\")\n Call<Issue> getIssue(@Path(\"id\") String issueId);\n\n @POST(\"issue\")\n Call<Issue> createIssue(@Body Issue issue);\n\n @PUT(\"issue/{id}\")\n Call<Issue> updateIssue(@Body Issue issue, @Path(\"id\") String issueId);\n\n @DELETE(\"issue/{id}\")\n Call<Issue> deleteIssue(@Path(\"id\") String issueId);\n\n}", "public interface RestApis {\n\n @POST(Constants.ApiMethods.REGISTER_URL)\n Call<RegisterResponse> registerUser(@Body RegisterRequest aRegisterRequest);\n\n @POST(Constants.ApiMethods.LOGIN_URL)\n Call<LoginResponse> loginUser(@Body LoginRequest aRequest);\n\n @GET(Constants.ApiMethods.USER_LIST_URL)\n Call<BaseResponse<List<UserModel>>> getUserList(@Query(\"page\") int pageId);\n\n @GET(Constants.ApiMethods.ALBUM_LIST_URL)\n Call<List<AlbumModel>> getAlbumList();\n\n}", "public interface RestApi {\n}", "interface APIInterface {\n\n @GET(\"users/\")\n Call<List<User>> doGetListResources();\n\n @GET(\"users/{id}\")\n Call<User> doGetUser(@Path(\"id\") String id );\n\n @POST(\"/api/users/\")\n Call<User> createUser(@Body User user);\n\n}", "public interface RequestServes {\n @GET(\"PlayVideo/{firstVideoId}\")\n Call<JsonElement> getPlayVideo(@Path(\"firstVideoId\") String firstVideoId);\n @GET\n Call<JsonElement> getData(@Url String url);\n @GET(\"{test}\")\n Call<ResponseBody> getString(@Path(\"test\") String test);\n\n @GET(\"users/{user}/repos\")\n Call<ResponseBody> listRepos(@Path(\"user\") String user);\n\n}", "public interface Rest {\n}", "public interface ApiInterface {\n @GET(\"/index.php/api/\")\n Call<Category> getInfo();\n\n @GET(\"/index.php/api/brand\")\n Call<Brand> getBrand();\n\n @GET(\"/index.php/api/featured_products\")\n Call<FeatureProduct> getFeature();\n\n @POST(\"/index.php/api/product_view\")\n Call<CategoryResponse> CategoryIdPost(@Body CatId catId);\n}", "public interface IApiService {\n\n @GET(\"/its/master_halte/{id}\")\n public Data<Station> getSynchListStation(@Path(\"id\") String id);\n\n @GET(\"/its/eta/{koridor}/{id}\")\n public Data<Incoming> getSynchListIncoming(@Path(\"koridor\") String koridor,@Path(\"id\") String id);\n}", "@Path(\"/api/khy\")\n@Produces(\"application/json\")\npublic interface LegaliteDysRESTApis {\n\n @POST\n @Consumes(\"application/json\")\n @Produces(\"application/json\")\n @Path(\"/belge-durum-guncelle\")\n SimpleResponse belgeDurumGuncelle(BelgeDurumuModel belgeDurum);\n\n @POST\n @Consumes(\"application/json\")\n @Produces(\"application/json\")\n @Path(\"/belge-al\")\n SimpleResponse belgeGonder(BelgeAlRestModel request);\n}", "public interface EndpointsApi {\n\n @GET(ConstantesRestApi.URL_GET_FOLOWS_MEDIA_RECENT)\n Call<MascotasResponse> getRecentMedia(@Path(\"user-id\") String id);\n\n @GET(ConstantesRestApi.URL_GET_PROFILE_USER_WITH_ID)\n Call<MascotasResponse> getProfile(@Path(\"user-id\") String id);\n\n @GET(ConstantesRestApi.URL_GET_FOLLOWS)\n Call<MascotasResponse> getFollows();\n\n @GET(ConstantesRestApi.URL_GET_FOLOWS_MEDIA_RECENT)\n Call<MascotasResponse> getFollowsMediaRecent(@Path(\"user-id\") String id);\n}", "public interface ApiInterface {\n\n @POST(\"/request/getAll\")\n Call<List<Request>> getRequest(@Body Location location);\n\n @POST(\"/request/create\")\n Call<Request> createRequest(@Body Request request);\n\n @POST(\"/deliver/accept/\")\n Call<Request> acceptRequest(@Query(\"id\") String requestId);\n\n}", "public interface IUserService {\n\n @GET\n @Path(\"detail\")\n @Produces(ContentType.APPLICATION_JSON_UTF8)\n public UserInfoResponse getUserDetail(@QueryParam(\"id\") Integer id);\n\n @POST\n @Path(\"search\")\n @Consumes(ContentType.APPLICATION_FORM_URLENCODED_UTF8)\n @Produces(ContentType.APPLICATION_JSON_UTF8)\n public SearchUserResponse searchUser(@FormParam(\"\") SearchUserRequest request) throws Exception;\n\n @POST\n @Path(\"create\")\n @Consumes(ContentType.APPLICATION_JSON_UTF8)\n @Produces(ContentType.APPLICATION_JSON_UTF8)\n public ServiceResponse createUser(CreateUserRequest request) throws Exception;\n\n @POST\n @Path(\"modify\")\n @Consumes(ContentType.APPLICATION_JSON_UTF8)\n @Produces(ContentType.APPLICATION_JSON_UTF8)\n public ServiceResponse modifyUser(ModifyUserRequest request) throws Exception;\n}", "public interface IEndpoint\n{\n @GET(Contract.PATH_POPULAR_MOVIE)\n Call<MovieResponse> getPopularMovies(@Query(\"api_key\") String apiKey);\n\n @GET(Contract.PATH_TOP_RATED_MOVIE)\n Call<MovieResponse> getTopRatedMovies(@Query(\"api_key\") String apiKey);\n\n @GET(\"movie/{id}/videos\")\n Call<MovieTrailer> getMovieTrailer(@Path(\"id\") int id,\n @Query(\"api_key\") String apiKey);\n\n @GET(\"movie/{id}/reviews\")\n Call<MovieReview> getMovieReview(@Path(\"id\") int id,\n @Query(\"api_key\") String apiKey);\n\n @GET(Contract.SIZE_MOBILE + \"{posterImagePath}\")\n Call<ResponseBody> getPosterImage(\n @Path(value = \"posterImagePath\", encoded = true)\n String posterImagePath);\n\n @GET(\"w780{backdropImagePath}\")\n Call<ResponseBody> getBackdropImage(\n @Path(value = \"backdropImagePath\", encoded = true)\n String backdropImagePath);\n}", "public interface RESTService {\n\n /**\n * Check Voter Services\n **/\n\n //TODO to check this is work or not\n //@GET(Config.REGISTER) Call<User> registerUser(@Header(\"uuid\") String uuid,\n // @QueryMap Map<String, String> body);\n\n @GET(Config.REGISTER) Call<User> registerUser(@QueryMap Map<String, String> body);\n\n /**\n * Maepaysoh services\n **/\n\n //candidate\n @GET(Config.CANDIDATE_LIST_URL) Call<CandidateListReturnObject> getCandidateList(\n @QueryMap Map<String, String> optionalQueries);\n\n @GET(Config.CANDIDATE_URL + \"/{id}\") Call<JsonObject> getCandidate(@Path(\"id\") String id,\n @QueryMap Map<String, String> optionalQueries);\n\n //geo location\n @GET(Config.GEO_LOCATION_URL) Call<GeoReturnObject> getLocationList(\n @QueryMap Map<String, String> optionalQueries);\n\n @GET(Config.GEO_LOCATION_SEARCH) Call<JsonObject> searchLocation(\n @QueryMap Map<String, String> optionalQueries);\n\n //party\n @GET(Config.PARTY_LIST_URL) Call<PartyReturnObject> getPartyList(\n @QueryMap Map<String, String> optionalQueries);\n\n @GET(Config.PARTY_LIST_URL + \"/{id}\") Call<JsonObject> getPartyDetail(@Path(\"id\") String id);\n\n //OMI service\n @GET(Config.MOTION_DETAIL_URL) Call<JsonObject> getMotionDetail(@Query(\"mpid\") String mpId);\n\n @GET(Config.MOTION_COUNT) Call<JsonObject> getMotionCount(@Query(\"mpid\") String mpId);\n\n @GET(Config.QUESTION_DETAIL_URL) Call<JsonObject> getQuestionDetail(@Query(\"mpid\") String mpId);\n\n @GET(Config.QUESTION_COUNT) Call<JsonObject> getQuestionCount(@Query(\"mpid\") String mpId);\n\n @GET(Config.QUESTION_MOTION) Call<JsonObject> getQuestionAndMotion(@Query(\"mpid\") String mpId);\n\n @GET(Config.COMPARE_QUESTION) Call<JsonElement> getCompareQuestion(\n @Query(\"first\") String first_candidate_id, @Query(\"second\") String second_candidate_id);\n\n @GET(Config.CANDIDTE_AUTO_SEARCH) Call<ArrayList<CandidateSearchResult>> searchCandidate(\n @Query(\"q\") String keyWord, @QueryMap Map<String, Integer> options);\n\n @GET(Config.CANDIDATE_COUNT) Call<JsonObject> getCandidateCount(@Query(\"party\") String party_id);\n\n @GET(Config.CURRENT_COUNT) Call<JsonObject> getCurrentCount();\n\n @GET(Config.FAQ_LIST_URL) Call<FAQListReturnObject> listFaqs(\n @QueryMap Map<String, String> options);\n\n @GET(Config.FAQ_SEARCH) Call<FAQListReturnObject> searchFaq(@Query(\"q\") String keyWord,\n @QueryMap Map<String, String> options);\n\n @GET(\"/faq/{faq_id}\") Call<FAQDetailReturnObject> searchFaqById(@Path(\"faq_id\") String faqId,\n @QueryMap Map<String, String> options);\n\n @GET(Config.APP_VERSIONS) Call<JsonObject> checkUpdate();\n}", "public interface BeaconQuestService {\n\n @GET(\"/beaconQuest/index/takeChallenge/{accountId}/{beaconId}\")\n Call<ResponseBody> takeChallenge (@Path(\"accountId\") String accountId,\n @Path(\"beaconId\") String beaconId\n );\n\n @GET(\"beaconQuest/index/challengeAnswer/{accountId}/{beaconId}/{answer}\")\n Call<ResponseBody> challengeAnswer(@Path(\"accountId\") String userid,\n @Path(\"beaconId\") String beaconid,\n @Path(\"answer\") String answer\n );\n\n @GET(\"beaconQuest/index//challengeCancel/{accountId}/{beaconId}\")\n Call<ResponseBody> challengeAnswer(@Path(\"accountId\") String userid,\n @Path(\"beaconId\") String beaconid\n );\n\n @GET(\"beaconQuest/index//register/{username}/{password}\")\n Call<ResponseBody> registerAccount(@Path(\"username\") String username,\n @Path(\"password\") String password\n );\n\n @GET(\"beaconQuest/index//login/{username}/{password}/\")\n Call<ResponseBody> login(@Path(\"username\") String username,\n @Path(\"password\") String password\n );\n}", "@Path(\"/travel\")\n\npublic interface TravelResource {\n\n @POST\n @Produces({ MediaType.APPLICATION_JSON + \";charset=utf-8\"})\n public Travel postTravelDetails(Travel travel) throws Exception;\n\n\n @GET\n @Path(\"/{id}\")\n @Produces({ MediaType.APPLICATION_JSON + \";charset=utf-8\"})\n public Travel getTravelDetails(@PathParam(\"id\") Long id) throws Exception;\n}", "public interface RestaurantRest {\r\n\t}", "public interface APIClient {\n\n\t// regular expression to parse the action name\n\tPattern actionNamePattern = Pattern.compile(\"violet\\\\.([\\\\w]+)\\\\.([\\\\w]+)\");\n\n\t/**\n\t * The simplest type of call when only one parameter is needed Works only if\n\t * Action type is GET (no side effects)\n\t * \n\t * @param actionName\n\t * @param inMainParamValue\n\t * @return the POJO response\n\t * @throws APIException\n\t */\n\tObject executeMethodCall(String actionName, String inMainParamValue) throws APIException;\n\n\t/**\n\t * A more sophisticated call when multiple structured parameters must be\n\t * passed\n\t * \n\t * @param actionName\n\t * @param inParam\n\t * @return the POJO response\n\t * @throws APIException\n\t */\n\tObject executeMethodCall(ActionType actionType, String actionName, Map<String, Object> inParams) throws APIException;\n\n}", "@Path(\"/software\")\n@Produces(MediaType.APPLICATION_JSON)\npublic interface RestSoftware {\n\n String SOFTWARE_ID_FIELD = \"idSoftware\";\n\n @GET\n @Path(\"/\")\n List<Software> findAll();\n\n @GET\n @Path(\"/{\"+ SOFTWARE_ID_FIELD +\"}\")\n Software findOne(@PathParam(SOFTWARE_ID_FIELD) int idSoftware);\n\n @POST\n @Path(\"/\")\n void save(@RequestBody Software software);\n\n @PUT\n @Path(\"/\")\n void update(@RequestBody Software software);\n\n @DELETE\n @Path(\"/{\"+ SOFTWARE_ID_FIELD +\"}\")\n void delete(@PathParam(SOFTWARE_ID_FIELD) int idSoftware);\n\n}", "interface APIInterface {\n\n @POST(\"/EmployeeApi/v1/Api.php?apicall=createemployee\")\n Call<JsonObject> createEmployee(@QueryMap Map<String, String> options);\n\n @POST(\"/EmployeeApi/v1/Api.php?apicall=updateemployee\")\n Call<JsonObject> updateEmployee(@QueryMap Map<String, String> options);\n\n @GET(\"/EmployeeApi/v1/Api.php?apicall=getemployee\")\n Call<JsonObject> getEmployee();\n\n @GET(\"/EmployeeApi/v1/Api.php?apicall=searhemployee\")\n Call<JsonObject> searchEmployee();\n\n @GET(\"/EmployeeApi/v1/Api.php?apicall=deleteemployee\")\n Call<JsonObject> deleteEmployee(@Field(\"prefix\") String prefix) ;\n\n}", "public interface RestApi {\n @GET(\"house_list\")\n Call<List<HouseInfo>> getHouseInfoList();\n\n @POST(\"landlordLogin\")\n Call<Landlord> landlordLogin(\n @Body Landlord landlord\n );\n\n @POST(\"landlordUpdate\")\n Call<Landlord> landlordUpdate(\n @Body Landlord landlord\n );\n\n @POST(\"incrementViewCount\")\n Call<RestHttpResponse> incrementViewCount(\n @Body HouseInfo houseInfo\n );\n\n @POST(\"tenantLogin\")\n Call<Tenant> tenantLogin(\n @Body Tenant tenant\n );\n\n @POST(\"tenantUpdate\")\n Call<Tenant> tenantUpdate(\n @Body Tenant tenant\n );\n\n @POST(\"search_house_list\")\n Call<List<HouseInfo>> getSearchHouseInfoList(@Body HouseSchCri criteria);\n\n @POST(\"getFavoriteList\")\n Call<List<HouseInfo>> getFavoriteList(@Body List<Favorite> favoriteList);\n\n}", "ResourceAPI createResourceAPI();", "public interface RoutesApi\n{\n\n //TODO add all methods from the API and annotate according to Retrofit\n\n @GET(\"/routecollection/{startLocation}\")\n void getRoutes(@Path(\"startLocation\")String startLocation, Callback<Routes> routes);\n\n\n @POST(\"/placeRoute\")\n void placeRoute(Route newRoute, Callback callback);\n\n @DELETE(\"/deleteRoute\")\n void deleteRoute(Long routeId);\n\n\n\n}", "public interface Api {\n\n\n @GET(\"users?site=stackoverflow\")\n Call<UserResponse> getUser(@Query(\"pagesize\")int size,@Query(\"sort\")String sort);\n\n @GET(\"comments?site=stackoverflow\")\n Call<CommentsResponse> getComments(@Query(\"order\")String order,@Query(\"sort\")String votes,@Query(\"pagesize\")int size,@Query(\"min\")int min);\n\n @GET(\"posts/{ids}?site=stackoverflow\")\n Call<PostResponse> getPostResponseCall(@Path(\"ids\") long id);\n @GET(\"users/{ids}/questions?site=stackoverflow\")\n Call<QuestionsResponse> getQuestionsResponseCall (@Path(\"ids\")long id),@Query(\"sort\")String votes,\n}", "public interface ApiInterFace {\n @GET(\"restaurants\")\n Call<Restaurant_model> getRestaurants();\n\n @POST(\"/profile\")\n @FormUrlEncoded\n Call<LoginFragment.UserSentResponse> sendUserData(@Field(\"name\") String name, @Field(\"picUrl\") String picUrl, @Field(\"email\") String email);\n\n\n @GET(\"/search/{keyword}\")\n Call<SearchModel> search(@Path(\"keyword\") String keyword);\n\n @GET(\"/profile/{id}\")\n Call<UserProfile_model> getUserInfo(@Path(\"id\") String id);\n\n @GET(\"/meal/{id}\")\n Call<RestaurantMealResponse> getRestaurantMeal(@Path(\"id\") int id);\n\n @GET(\"/restaurant/{id}\")\n Call<RestaurantDetailResponse> getRestaurantDetailResponse(@Path(\"id\") int id);\n}", "public interface ContaAPI {\n\n @GET(\"/conta/buscarConta/{usuario}\")\n Call <List<Conta>> buscarConta(@Path(\"usuario\") String usuario);\n\n @GET(\"/conta/buscarProduto/{usuario}/{produto}\")\n Call <Conta> buscarProduto(@Path(\"usuario\") String usuario, @Path(\"produto\") String produto);\n\n @GET(\"/conta/valorConta/{usuario}\")\n Call<Double> valorConta(@Path(\"usuario\") String usuario);\n\n @POST(\"/conta/salvar\")\n Call<Void> salvar(@Body Conta conta);\n\n @DELETE(\"/conta/delete/{usuario}/{produto}\")\n Call<Void> apagarProdutoConta(@Path(\"usuario\") String usuario, @Path(\"produto\") String produto);\n\n @DELETE(\"/conta/delete/{usuario}\")\n Call<Void> apagarConta(@Path(\"usuario\") String usuario);\n}", "public interface ApiEndPointsAndPatameters {\n\t\n//\t/** Resource path for api resources */\n//\tString API_PREFIX = \"/api\";\n//\n\t/** Resource path for API version 1 */\n\tString API_VERSION_1 = \"/v1\";\n//\n//\t/** Resource path to get available power plants. */\n//\tString POWER_PLANT_PATH = \"/powerPlant\";\n//\n//\t/** Resource path to get power plant data for a given power plant id. */\n//\tString POWER_PLANT_DATA_PATH = \"/{id}\";\n//\n//\tString POWER_PLANT_DETAILS = \"/details\";\n//\n//\tString POWER_PLANT_DATA_SUM_BY_DAY = \"/sumByDay\";\n//\n//\tString POWER_PLANT_DATA_SUM_BY_WEEK = \"/sumByWeek\";\n//\n//\tString POWER_PLANT_DATA_SUM_BY_MONTH = \"/sumByMonth\";\n//\n//\tString POWER_PLANT_DATA_SUM_BY_YEAR = \"/sumByYear\";\n//\t\n//\tString POWER_PLANT_DATA_NEXT_HOUR_FORECAST = \"/nextHourForecast\";\n//\t\n//\tString POWER_PLANT_DATA_NEXT_DAY_FORECAST = \"/nextDayForecast\";\n//\n//\t/** Query parameter for filtering by start date. */\n//\tString QUERY_PARAMETER_START_DATE = \"startDate\";\n//\n//\t/** Query parameter for filtering by end date. */\n//\tString QUERY_PARAMETER_END_DATE = \"endDate\";\n//\n//\t/** Query parameter for filtering by power plant data type. */\n//\tString QUERY_PARAMETER_DATA_TYPE = \"dataType\";\n//\t\n//\t\n\t\n\t\n\t/** Query parameter for filtering by power plant data type. */\n\tString QUERY_AUTHENTICATION_ID = \"Authentication-ID\";\n\t\n\t/** Query parameter for filtering by power plant data type. */\n\tString QUERY_USER_PASSWORD = \"UserPassword\";\n\t\n\t/** Query parameter for filtering by power plant data type. */\n\tString QUERY_AUTHORISATION_ID = \"authorisation-id\";\n\t\n\t/** Resource path to get a list to the components a User has access to. */\n\tString USER_COMPONENT_LIST = \"/UserComponentLists\";\n\t\n\t/** Resource path to get a list of available resources for a component. */\n\tString DATA_LIST = \"/DataLists\";\n\t\n\t/** Resource path to authenticate. */\n\tString AUTHENTICATION = \"/authentication\";\n\t\n\t/** Resource path to logout. */\n\tString LOGOUT = \"/logout\";\n\t\n\t/** Resource path to get power plant data for a given power plant id. */\n\tString COMPONENT_ID_PATH = \"/{cId}\";\n\t\n\t/** Resource path to get power plant data for a given power plant id. */\n\tString SIDE_PATH = \"/{side}\";\n\t\n\t/** Resource path to get power plant data for a given power plant id. */\n\tString TYPE_PATH = \"/{type}\";\n\t\n\t/** Resource path to get power plant data for a given power plant id. */\n\tString DATE_PATH = \"/{date}\";\n}", "interface DeviceAPI {\n /**\n * Get the children of the device.\n *\n * @param device the device\n *\n * @return the children\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getChildrenOfDevice/{device}\")\n List<JsonDevice> childrenOf(@PathParam(\"device\") int device);\n\n /**\n * Get the SensorML description of the device.\n *\n * @param id the id\n *\n * @return the SensorML description\n */\n @GET\n @Produces(MediaType.APPLICATION_XML)\n @Path(\"getDeviceAsSensorML/{device}\")\n String getSensorML(@PathParam(\"device\") int id);\n\n /**\n * Get the list of all devices.\n *\n * @return the devices\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllActiveDevicesFast\")\n List<JsonDevice> all();\n\n /**\n * Get the device.\n *\n * @param device the id\n *\n * @return the device\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDevice/{device}\")\n JsonDevice byId(@PathParam(\"device\") int device);\n\n /**\n * Get all device categories.\n *\n * @return the device categories\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllDeviceCategories\")\n List<JsonType> types();\n\n /**\n * Get the device.\n *\n * @param urn the URN\n *\n * @return the device\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDeviceByUrn/{urn}\")\n JsonDevice byURN(@PathParam(\"urn\") String urn);\n }", "public interface FolderResource {\n\n @POST\n @Consumes(APPLICATION_JSON)\n @Produces(APPLICATION_JSON)\n @Path(\"/mail/folder\")\n Response create(FolderDTO folderDTO) throws Exception;\n\n @GET\n @Consumes(APPLICATION_JSON)\n @Produces(APPLICATION_JSON)\n @Path(\"/mail/folder\")\n Response get(@QueryParam(\"folderId\") Long id) throws Exception;\n\n @DELETE\n @Consumes(APPLICATION_JSON)\n @Produces(APPLICATION_JSON)\n @Path(\"/mail/folder\")\n Response delete(@QueryParam(\"folderId\") Long id) throws Exception;\n\n @GET\n @Consumes(APPLICATION_JSON)\n @Produces(APPLICATION_JSON)\n @Path(\"/mail/folder/list\")\n Response list(@QueryParam(\"userLogin\") String login) throws Exception;\n\n}", "public interface CliApi {\n\n @GET(\"/api/ping\")\n Pong ping();\n\n /**\n * Fetch and note by type.\n * <p>\n * <code>\n * http://localhost:5050/cli/cmd/update_docker?k=label&n=2\n * </code>\n *\n * @param key key for the fetching\n * @param keyType type of the key, default is 'id', could be 'id' or 'label'\n * @param num number of articles to return, default is 1\n * @return the note resource\n */\n @GET(\"/cli/cmd/{key}\")\n PagedResponse<NoteResult> getNote(@Path(\"key\") String key, @Query(\"k\") String keyType, @Query(\"n\") int num);\n\n @POST(\"/cli/cmd\")\n SaveCmdResponse saveCmd(@Body SaveCmdRequest request);\n\n @DELETE(\"/cli/cmd/{id}\")\n IdResponse deleteItem(@Path(\"id\") String id);\n\n @POST(\"/cli/search\")\n PagedResponse<NoteResult> search(@Body CliSearchRequest request);\n\n}", "public interface AApi {\n //Post示例 http://www.apic.in/anime/33089.htm\n @GET(\"{type}/page/{page}/\")\n Observable<ResponseBody> getPosts(@Path(\"type\") String type, @Path(\"page\") int page);\n\n @GET(\"/{post}/{page}\")\n Observable<ResponseBody> getPictures(@Path(\"post\") String postUrl, @Path(\"page\") int page);\n\n}", "public interface TesteApi {\n\n @GET(\"/repos/{owner}/{repo}/contributors\")\n Contributor[] contributors(\n @Path(\"owner\") String owner,\n @Path(\"repo\") String repo\n );\n}", "@EndPoint\n@Path(\"/api\")\npublic interface DirAgent {\n\n @POST\n @Path(\"/i-directory\")\n @Address(Addr.Directory.ADD)\n JsonObject create(@BodyParam JsonObject body);\n\n @PUT\n @Path(\"/i-directory/:key\")\n @Address(Addr.Directory.UPDATE)\n JsonObject update(@PathParam(KName.KEY) String key, @BodyParam JsonObject body);\n\n @DELETE\n @Path(\"/i-directory/:key\")\n @Address(Addr.Directory.DELETE)\n JsonObject remove(@PathParam(KName.KEY) String key);\n}", "public interface WebApiInterface {\n\n @GET(\"alunos\")\n Call<List<Aluno>> getAlunos();\n\n @GET(\"alunos/{id}\")\n Call<Aluno> getAluno(\n @Query(\"id\") String matricula\n );\n\n @FormUrlEncoded\n @POST(\"alunos\")\n Call<String> postCriar(\n @Field(\"aluno\") Aluno aluno\n );\n\n @FormUrlEncoded\n @PUT(\"alunos/{matricula}\")\n Call<String> putAtualizar(\n @Query(\"matricula\") String id,\n @Field(\"aluno\") Aluno aluno\n );\n\n @DELETE(\"alunos/{id}\")\n Call<Aluno> deleteAluno(\n @Query(\"id\") String matricula\n );\n}", "public interface RESTfulAPI {\r\n @GET(\"posts\")\r\n Call<List<Post>> getAllPosts();\r\n\r\n @GET(\"posts\")\r\n Call<List<Post>> getAllPostsByUserID(@Query(\"userID\") int userID);\r\n\r\n @GET(\"post/{postID}\")\r\n Call<Post> getPostByID();\r\n\r\n// @POST(\"post\")\r\n}", "public interface RestConstants {\n\n /**\n * Base for rest api requests\n */\n String BASE = \"/api\";\n\n /**\n * end-point for calculating an area\n */\n String CALCULATE_AREA = \"/area\";\n /**\n * end-point for calculating a volume\n */\n String CALCULATE_VOLUME = \"/volume\";\n /**\n * end-point for calculating a light to area ratio\n */\n String CALCULATE_LIGHT_TO_AREA = \"/light-area\";\n /**\n * end-point for calculating an energy to volume ratio\n */\n String CALCULATE_ENERGY_TO_VOLUME = \"/energy-volume\";\n /**\n * end-point for finding rooms above provided norm\n */\n String GET_ROOMS_ABOVE_ROOM = \"/norm-check\";\n /**\n * end-point for calculating penalty for rooms above norm\n */\n String CALCULATE_PENALTY = \"/penalty\";\n}", "public interface ApiInterface {\n\n\n @GET(\"api/jsonBlob/9e44dca2-ad19-11e7-894a-5dc7a0a132b5\")\n Call<List<News>> getNewsAPIList();\n\n @PUT(\"api/jsonBlob/9e44dca2-ad19-11e7-894a-5dc7a0a132b5\")\n Call<List<News>> createNewsAPIBlob();\n\n @DELETE(\"/api/jsonBlob/9e44dca2-ad19-11e7-894a-5dc7a0a132b5\")\n Call deletePost();\n\n}", "public interface TrelloApi {\n\n @GET(\"/lists/{listId}/cards?fields=id,name\")\n void getCards(\n @Path(\"listId\") String listId,\n TrelloCallback<ArrayList<TrelloCard>> callback);\n\n @GET(\"/members/me/boards?fields=id,name\")\n void getAllBoards(\n TrelloCallback<ArrayList<TrelloBoard>> callback\n );\n\n @GET(\"/boards/{boardId}/lists?fields=id,name\")\n void getAllLists(\n @Path(\"boardId\") String boardId,\n TrelloCallback<ArrayList<TrelloList>> callback\n );\n\n @PUT(\"/cards/{cardId}\")\n void moveCard(\n @Path(\"cardId\") String cardId,\n @Query(\"idList\") String listId,\n TrelloCallback<String> callback\n );\n\n @POST(\"/cards/{cardId}/actions/comments\")\n void addComment(\n @Path(\"cardId\") String cardId,\n @Query(\"text\") String comment,\n TrelloCallback<String> callback\n );\n}", "@Path(\"policyDefs\")\npublic interface IPolicyDefinitionResource {\n\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n public List<PolicyDefinitionSummaryBean> list() throws NotAuthorizedException;\n\n @POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public PolicyDefinitionBean create(PolicyDefinitionBean bean) throws PolicyDefinitionAlreadyExistsException, NotAuthorizedException;\n \n @GET\n @Path(\"{policyDefinitionId}\")\n @Produces(MediaType.APPLICATION_JSON)\n public PolicyDefinitionBean get(@PathParam(\"policyDefinitionId\") String policyDefinitionId) throws PolicyDefinitionNotFoundException, NotAuthorizedException;\n\n @PUT\n @Path(\"{policyDefinitionId}\")\n public void update(@PathParam(\"policyDefinitionId\") String policyDefinitionId, PolicyDefinitionBean bean)\n throws PolicyDefinitionNotFoundException, NotAuthorizedException;\n\n @DELETE\n @Path(\"{policyDefinitionId}\")\n public void delete(@PathParam(\"policyDefinitionId\") String policyDefinitionId)\n throws PolicyDefinitionNotFoundException, NotAuthorizedException;\n\n}", "public interface IResource {\n\n\t/**\n\t * An optional attribute that identifies the Resource-element.\n\t */\n\tpublic URI getId();\n\n\tpublic boolean setId(URI id);\n\n\t/**\n\t * An optional attribute. If present, it provides a relative URI template for the identifier of the resource. The\n\t * resource's base URI is given by the Resource-element's parent Resource- or Resources-element. The value of the\n\t * path-attribute may be static or may contain embedded template parameters.\n\t */\n\tpublic String getPath();\n\n\tpublic boolean setPath(String path);\n\n\t/**\n\t * An optional attribute whose type is a space-separated list of URIs. Each value in the list identifies a\n\t * ResourceType-element that defines a set of methods supported by the resource.\n\t */\n\tpublic List<URI> getType();\n\n\tpublic boolean setType(List<URI> type);\n\n\tpublic boolean addType(URI type);\n\n\t/**\n\t * Defines the media type for the query component of the resourve URI. Defaults to\n\t * 'application/x-www-form-urlencoded' if not specified which results in query strings being formatted as specified.\n\t */\n\tpublic String getQueryType();\n\n\tpublic boolean setQueryType(String queryType);\n\n\t/**\n\t * A Resource-element contains zero or more Doc-elements.\n\t */\n\tpublic List<IDoc> getDocs();\n\n\tpublic boolean addDoc(IDoc doc);\n\n\t/**\n\t * A Resource-element contains zero or more Param-elements with one of the following values for its style-attriute:\n\t * template, matrix, query, header.\n\t */\n\tpublic List<IParam> getParams();\n\n\tpublic boolean addParam(IParam param);\n\n\t/**\n\t * A Resource-element contains zero or more Method-elements, each of which describes the input to and output from an\n\t * HTTP protocol method that can be applied to the resource. Such locally-defined methods are added to any methods\n\t * included in ResourceType-elements referred to using the type-attribute.\n\t */\n\tpublic List<IMethod> getMethods();\n\n\tpublic boolean addMethod(IMethod method);\n\n\t/**\n\t * A Resource-element contains zero or more Resource-elements that describe sub-resources. Such sub-resources\n\t * inherit matrix and template parameters from the parent resource since their URI is relative to that of the parent\n\t * resource but they do not inherit query or header parameters specified globally for the parent resource.\n\t */\n\tpublic List<IResource> getResources();\n\n\tpublic boolean addResource(IResource resource);\n\n\tpublic String toString();\n\n}", "public interface ApiInterface {\n\n @GET(\"/users/{user}/repos\")\n Observable<List<Repository>> repositories(\n @Path(\"user\") String user\n );\n}", "public interface ApiInterface {\n\n @GET(\"status.txt\")\n Call<Integer> getStatus();\n\n @GET(\"login.php\")\n Call<LoginModel> login(@Query(\"phone\") String phone);\n\n @GET(\"verify.php\")\n Call<LoginModel> verify(@Query(\"phone\") String phone, @Query(\"code\") String code);\n}", "public interface UserApi {\n\n\n @GET(\"/user/\")\n User getUser(@Query(\"username\") String username);\n\n @POST(\"/user/\")\n User login(@Query(\"username\") String username, @Query(\"password\") String password);\n\n}", "public interface APIInterface {\n @POST(Constants.POST_ENV_BIDDING)\n Call<String> envBidding(@Body Bidding bidding);\n\n @POST(Constants.POST_UPDATE_OFFER)\n Call<String> updateOffer(@Body Interested interested);\n\n @GET(Constants.GET_INFO_OFFER)\n Call<OfferProduct> getInfoOffer(@Path(\"id_offer\") String id_offer);\n\n @GET(Constants.GET_LIST_OFFER)\n Call<ArrayList<OfferProduct>> getListOffer(@Path(\"product\") String product);\n\n @GET(Constants.GET_LIST_BIDDING)\n Call<ArrayList<Bidding>> getListBidding();\n\n @GET(Constants.GET_LIST_TAG)\n Call<ArrayList<String>> getListTag();\n\n}", "public interface ConnectService {\n\n @GET(\"/api/v1/categories\")\n void getCategories(\n @Query(\"parent_id\") int parentId,\n @Query(\"page\") int page,\n @Query(\"page_size\") int pageSize,\n Callback<Response<ArrayList<Category>>> callback\n );\n\n @GET(\"/api/v1/products\")\n void getProducts(\n @Query(\"category_id\") int categoryId,\n @Query(\"page\") int page,\n @Query(\"page_size\") int pageSize,\n Callback<Response<ArrayList<Product>>> callback\n );\n\n @GET(\"/api/v1/product\")\n void getProduct(\n @Query(\"product_id\") int productId,\n Callback<Response<Product>> callback\n );\n\n @POST(\"/api/v1/system/feedback\")\n void sendFeedback(\n @Query(\"content\") String content,\n @Query(\"contact\") String contact,\n Callback<Response> callback\n );\n\n @POST(\"/api/v1/system/contribute\")\n void contribute(\n @Query(\"title\") String title,\n @Query(\"contact\") String contact,\n Callback<Response> callback\n );\n}", "public interface LugarRest {\n // Obtener todos\n // GET: http://localhost:8080/lugares\n @GET(\"lugares/\")\n Call<List<Lugar>> findAll();\n\n // Obtener uno lugar por ID\n // GET: http://localhost:8080/lugares/{id}\n @GET(\"lugares/{id}\")\n Call<Lugar> findById(@Path(\"id\") Long id);\n\n // Crear un lugar\n //POST: http://localhost:8080/lugares\n @POST(\"lugares/\")\n Call<Lugar> create(@Body Lugar lugar);\n\n // Elimina un lugar\n // DELETE: http://localhost:8080/lugares/{id}\n @DELETE(\"lugares/{id}\")\n Call<Lugar> delete(@Path(\"id\") Long id);\n\n // Actualiza un lugar\n // PUT: http://localhost:8080/lugares/{id}\n @PUT(\"lugares/{id}\")\n Call<Lugar> update(@Path(\"id\") Long id, @Body Lugar lugar);\n}", "public interface RestService {\n\n //\n //\n // AUTH\n //\n //\n @POST(\"auth\")\n Call<AccessToken> logIn(@Body Credentials credentials);\n\n @POST(\"users\")\n Call<Void> signUp(@Body Credentials credentials);\n\n //\n //\n // Fetch Data\n //\n //\n @GET(\"data\")\n Call<CategoriesWrapper> fetchData();\n\n @POST(\"categories\")\n Call<Category> addCategory(@Body AddCategoryWrapper wrapper);\n\n @POST(\"feeds\")\n Call<Void> subscribeFeed(@Body AddFeedWrapper wrapper);\n\n @DELETE(\"feeds/{id_feed}\")\n Call<Void> unsubscribeFeed(@Path(\"id_feed\") Integer channelId);\n\n //\n //\n // Update Read Items. Mark as read.\n //\n //\n @PUT(\"items\")\n Call<Void> updateReadAllItems(@Body ItemStateWrapper wrapper);\n\n @PUT(\"feeds/{id_feed}/items/\")\n Call<Void> updateReadItemsByChannelId(@Path(\"id_feed\") Integer channelId,\n @Body ItemStateWrapper wrapper);\n\n @PUT(\"items/{id_item}\")\n Call<Void> updateStateItem(@Path(\"id_item\") Integer itemId,\n @Body ItemStateWrapper wrapper);\n}", "public interface ApiAction {}", "public interface RestApis {\n\n @POST(\"verifyPassword?key= AIzaSyAUjt3lOrt0cFwbbd5Ag8M1-ISzQlE0Wjg\")\n Call<LoginResponse> loginUser(@Body LoginBody loginBody);\n\n @GET(\"events.json\")\n Call<EventKeyModel> getAllEvents();\n\n @PATCH(\"events/{eventid}\")\n Call<Void> punchit(@Path(\"eventid\") String eventid,@Body AddpunchedListModel addpunchedListModel);\n\n @POST(\"signupNewUser?key= AIzaSyAUjt3lOrt0cFwbbd5Ag8M1-ISzQlE0Wjg\")\n Call<LoginResponse> registerUser(@Body LoginBody loginBody);\n\n @POST(\"users/{uid}\")\n Call<Void> registerUserDb(@Path(\"uid\")String uid,@Body UserDetailsModel eventsDetailsBodyModel);\n}", "public interface NhanVienService {\n @GET(\"api/User\")\n Call<List<NhanVien>> getAll(@Query(\"authentication\") String authentication);\n\n @GET(\"api/User\")\n Call<NhanVien> chiTiet(@Query(\"id\") int id, @Query(\"authentication\") String authentication);\n\n @POST(\"api/User\")\n Call<NhanVien> them(@Body NhanVienRequest nhanVienRequest);\n\n @DELETE(\"api/User\")\n Call<Object> xoa(@Query(\"id\") int id, @Query(\"authentication\") String authentication);\n\n @PUT(\"api/User\")\n Call<Object> sua(@Body NhanVienRequest nhanVienRequest);\n}", "public interface PrivateApiRoutes {\n}", "public interface ApiCategoria {\n @GET(\"4A/webresources/categorias\")\n Call<List<Categoria>> getCategorias();\n\n @GET(\"4A/webresources/categorias/{id}\")\n Call<List<Produto>> getProdutos(@Path(\"id\") int id);\n}", "public interface ApiInterface {\n\n @POST(\"auth/signInNew\")\n Call<SignInModel> signCall(@QueryMap Map<String, String> request);\n\n @POST(\"auth/countryList\")\n Call<List<Country>> getCountries();\n\n @POST(\"auth/statesForCountry\")\n Call<List<State>> getStates(@QueryMap Map<String, Integer> request);\n\n @POST(\"auth/getUnivBoard\")\n Call<List<University>> getUniversity(@QueryMap Map<String, Integer> request);\n\n @POST(\"auth/getInstOrg\")\n Call<List<Institute>> getInstitute(@QueryMap Map<String, Integer> request);\n\n @POST(\"auth/degreeList\")\n Call<List<Degree>> getDegrees();\n\n @POST(\"auth/coursesForDegree\")\n Call<List<Course>> getCourses(@QueryMap Map<String, Integer> request);\n\n @POST(\"auth/classesForCourse\")\n Call<List<ClassData>> getClasses(@QueryMap Map<String, Object> request);\n\n @POST(\"auth/classesForCourse\")\n Call<List<ClassData>> signUpApi(@QueryMap Map<String, Object> request);\n\n @POST(\"auth/generateAndSendOtpMobile\")\n Call<MobileOtp> getMobileOtp(@QueryMap Map<String, String> request);\n\n}", "public interface RESTDocument {\n\n}", "public interface ApiInterface {\n String HOST = \"http://fanyi.youdao.com/\";\n String IMG_HOST = \"http://www.bing.com/\";\n\n @GET(\"openapi.do\")\n Observable<Translation> getTranslation(@Query(\"keyfrom\") String keyfrom,\n @Query(\"key\") String key,\n @Query(\"type\") String type,\n @Query(\"doctype\") String doctype,\n @Query(\"version\") String version,\n @Query(\"q\") String q);\n\n @GET(\"HPImageArchive.aspx\")\n Observable<BackImg> getBackgroundImg(@Query(\"format\") String format,\n @Query(\"idx\") int idx,\n @Query(\"n\") int n);\n\n\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 interface UserService {\n @GET(\"/users\")\n Call<List<User>> listUsers();\n\n @GET(\"/users/{studentId}\")\n Call<User> getUser(@Path(\"studentId\") String studentId);\n\n @PUT(\"/register\")\n Call<User> createUser(@Body User user);\n\n @POST(\"/users/{studentId}\")\n Call<ResponseBody> updateUser(@Path(\"studentId\") String studentId, @Body User user);\n\n @DELETE(\"/users/{studentId}\")\n Call<User> deleteUser(@Path(\"studentId\") String studentId);\n}", "public interface IndexRestController {\n}", "public interface APIInterface {\n// @GET(\"api/home/books\")\n// Call<BookListResponse> getBookList();\n//\n// @GET(\"api/home/tests\")\n// Call<BookListResponse> getTestList();\n//\n// @GET(\"api/home/banners\")\n// Call<BannerResponse> getBanners();\n//\n\n @GET\n Call<LectureResponse> loadLectures(@Url String url);\n\n @GET\n Call<HomeResponse> loadHomePageFromApi(@Url String url);\n\n @GET(\"api/root\")\n Call<RootApiResponse> loadApiList();\n\n @GET\n Call<BannerResponse> loadBanners(@Url String url);\n\n @GET\n Call<BookListResponse> loadBookList(@Url String url);\n\n @GET\n Call<PracticeDetailResponse> loadPracticeDetail(@Url String url);\n\n @GET\n Call<PracticeListResponse> loadPracticeList(@Url String url);\n\n @GET\n Call<SectionResponse> loadSections(@Url String url);\n\n @GET\n Call<QuestionResponse> loadQuestion(@Url String url);\n\n @GET\n Call<ReadingTestResponse> loadReadingTest(@Url String url);\n\n @GET\n Call<ReadingQuestionResponse> loadReadingAnswer(@Url String url);\n\n @GET\n Call<AudioListRespone> loadAudioList(@Url String url);\n\n @FormUrlEncoded\n @POST\n Call<LoginResponse> login(@Url String url,\n @Field(\"email\") String username,\n @Field(\"password\") String password,\n @Field(\"facebookId\") String facebookId,\n @Field(\"googlePlusId\") String googlePlusId);\n\n @FormUrlEncoded\n @POST\n Call<BaseResponse> logout(@Url String url,\n @Field(\"accessToken\") String accessToken);\n}", "public interface StarWarsAPI {\r\n\r\n @GET\r\n Call<Character> getCharacter(@Url String url);\r\n\r\n @GET\r\n Call<Film> getFilm(@Url String url);\r\n}", "public interface ApiInterface {\n\n @GET(\"Articles/\")\n Call<List<Article>> getAllArticles();\n\n\n}", "public interface Api {\n @GET(\"ad/getAd\")\n Observable<ImageBean> getImage();\n @GET(\"product/getCatagory\")\n Observable<JiuBean> getJiu();\n @GET(\"home/getHome\")\n Observable<HomeBean> getHome();\n @GET(\"product/getProductCatagory\")\n Observable<SortBean> getSort(@Query(\"cid\") int cid);\n @GET(\"user/reg\")\n Observable<RegBean> getReg(@Query(\"mobile\") String mobile, @Query(\"password\") String password);\n @GET(\"user/login\")\n Observable<LoginBean> getLogin(@Query(\"mobile\") String mobile, @Query(\"password\") String password);\n @GET(\"product/searchProducts\")\n Observable<SouSuoBean> getSouSuo(@Query(\"keywords\") String keywords, @Query(\"page\") int page);\n @GET(\"product/getProductDetail\")\n Observable<XiangQingBean> getXiangQing(@Query(\"pid\") int pid);\n @GET(\"product/getCarts\")\n Observable<CarBean> getCar(@Query(\"uid\") int uid);\n}", "public interface Api {\n\n// root url after add multiple servlets\n\n String BASE_URL = \"https://simplifiedcoding.net/demos/\";\n\n @GET(\"marvel\")\n Call<List<Modelclass>> getmodelclass();\n\n\n\n}", "public interface StoryRestServer {\n\n @GET(\"/story\")\n public Story.StoryList stories(@Query(\"start\") long start, @Query(\"end\") long end);\n\n @GET(\"/story/sex\")\n public Story.StoryList sexStories(@Query(\"page\") long page, @Query(\"limit\") long limit);\n}", "public interface ModelAPI {\n\n @GET(\"repository/models\")\n Paging<Model> getModels();\n\n @GET(\"repository/models\")\n Paging<Model> getModels(@QueryMap Map<String, Object> params);\n\n @POST(\"repository/models\")\n Model createModel(@Body ModelRequest request);\n\n @DELETE(\"repository/models/{modelId}\")\n Void deleteModel(@Path(\"modelId\") String modelId);\n\n @GET(\"repository/models/{modelId}\")\n Model getModel(@Path(\"modelId\") String modelId);\n\n @PUT(\"repository/models/{modelId}\")\n Model getModel(@Body ModelRequest request);\n\n @GET(\"repository/models/{modelId}/source\")\n List<String> getModelSource(@Path(\"modelId\") String modelId);\n}", "interface PlatformAPI {\n /**\n * Get all platforms.\n *\n * @return the platforms\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllRootItems\")\n List<JsonDevice> all();\n\n /**\n * Get all platform types.\n *\n * @return the platform types\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();\n }", "public interface ApiService {\r\n\r\n /* Patient*/\r\n @POST(\"patient/login/{username}/{password}\")\r\n Call<Patient> login(@Path(\"username\") String username, @Path(\"password\") String password);\r\n\r\n @POST(\"patient/register\")\r\n Call<Integer> register(@Body Patient patient);\r\n\r\n @POST(\"patient/updateProfile\")\r\n Call<Patient> updateProfile(@Body Patient patient);\r\n\r\n @GET(\"patient/findProfile/{id}\")\r\n Call<Patient> findPatient(@Path(\"id\") String id);\r\n\r\n @Multipart\r\n @POST(\"patient/uploadImage/{patId}\")\r\n Call<Patient> uploadImage(@Part MultipartBody.Part image, @Path(\"patId\") String patId);\r\n\r\n @POST(\"patient/changePassword/{patId}/{oldPass}/{newPass}\")\r\n Call<Boolean> changePassword(@Path(\"patId\") String patId , @Path(\"oldPass\") String oldPass ,@Path(\"newPass\") String newPass);\r\n\r\n @POST(\"patient/forgetPass/send/{email}\")\r\n Call<String> sendEmail(@Path(\"email\") String email );\r\n\r\n /* Record*/\r\n @POST(\"record/create\")\r\n Call<Boolean> createRecord(@Body Record record);\r\n\r\n @GET(\"record/find/{recDate}/{recRound}/{patId}\")\r\n Call<String> findRecId(@Path(\"recDate\") String recDate, @Path(\"recRound\") int round, @Path(\"patId\") String patId);\r\n\r\n @GET(\"record/find/diaTime/{id}\")\r\n Call<List<Record>> findDateAndRound(@Path(\"id\") String id);\r\n\r\n @GET(\"record/find/date/{id}/{month}\")\r\n Call<List<Record>> findRecordByByte(@Path(\"id\") String id, @Path(\"month\") int month);\r\n\r\n @GET(\"record/delete/{id}\")\r\n Call<Record> deleteRecord(@Path(\"id\") String id);\r\n\r\n /* Dialysis*/\r\n @POST(\"dialysis/createDiaIn\")\r\n Call<Void> createDialysis(@Body Dialysis dialysis);\r\n\r\n @GET(\"dialysis/find/dia/{recId}\")\r\n Call<Dialysis> findDialysis(@Path(\"recId\") String recId);\r\n\r\n @POST(\"dialysis/updateDiaInEnd/{record_recId_fk}\")\r\n Call<Void> updateDiaInEnd(@Body Dialysis dialysis, @Path(\"record_recId_fk\") String recId);\r\n\r\n @POST(\"dialysis/updateDiaOutSta/{record_recId_fk}\")\r\n Call<Void> updateDiaOutSta(@Body Dialysis dialysis, @Path(\"record_recId_fk\") String recId);\r\n\r\n @POST(\"dialysis/updateDiaOutEnd/{record_recId_fk}\")\r\n Call<Void> updateDiaOutEnd(@Body Dialysis dialysis ,@Path(\"record_recId_fk\") String recId);\r\n\r\n @GET(\"dialysis/findAll/{recDate}/{patId}\")\r\n Call <List<Dialysis>> findAll(@Path(\"recDate\") String recDate , @Path (\"patId\") String patId);\r\n\r\n @GET(\"dialysis/find/{id}\")\r\n Call<Dialysis> find(@Path(\"id\") String id);\r\n\r\n @GET(\"dialysis/delete/{id}\")\r\n Call<Dialysis> deleteDialysis(@Path(\"id\") String id);\r\n\r\n\r\n @POST(\"patient/uploadImage\")\r\n Call<Patient> uploadImage(@Part MultipartBody.Part image, @Body Patient patient);\r\n\r\n @GET(\"appointment/find/{patId}\")\r\n Call<List<Appointment>> findAppointment(@Path(\"patId\") String id);\r\n\r\n\r\n @GET (\"food/find/{typeId}\")\r\n Call<List<Food>> findFoodByTypeId(@Path(\"typeId\") String typeId);\r\n\r\n @GET(\"doctor/find/hospName\")\r\n Call<List<String>> findHospName();\r\n\r\n @POST (\"record/food/{foodId}/{unit}/{patId}\")\r\n Call<RecordFood> save(@Path(\"foodId\") String foodId, @Path(\"unit\") int unit,@Path(\"patId\") String patId);\r\n\r\n @POST (\"record/food/{foodId}/{recFoodId}/{unit}/{total}\")\r\n Call<RecordFood> updateRecordFood(@Path(\"foodId\") String foodId,@Path(\"recFoodId\") String recFoodId,@Path(\"unit\") int unit,@Path(\"total\") String total);\r\n\r\n @POST (\"food/find/food\")\r\n Call<List<Food>> findFoodByFoodId(@Body List<recAllFood> recAllFood);\r\n\r\n @GET (\"find/recAllFood/{patId}\")\r\n Call<List<recAllFood>> findFoodByPatId(@Path (\"patId\") String patId);\r\n\r\n @GET (\"record/food/find/{patId}\")\r\n Call<RecordFood> findTotal(@Path (\"patId\") String patId);\r\n\r\n @POST (\"recordFood/delete\")\r\n Call<Void> deleteFood(@Body recAllFood recAllFood);\r\n\r\n @GET (\"blood/input/{potass}/{phos}/{alb}/{patId}\")\r\n Call <BloodSample> inputBloodSample (@Path(\"potass\") float potass, @Path(\"phos\") float phos,\r\n @Path(\"alb\") float alb, @Path(\"patId\") String patId);\r\n\r\n @GET (\"blood/input/fix/{gPotass}/{gPhos}/{gAlb}/{patId}\")\r\n Call <BloodSample> fixBloodSample (@Path(\"gPotass\") String gPotass, @Path(\"gPhos\") String gPhos,\r\n @Path(\"gAlb\") String gAlb, @Path(\"patId\") String patId);\r\n\r\n @GET (\"blood/input/fix/{patId}\")\r\n Call <BloodSample> findBloodSample (@Path(\"patId\") String patId);\r\n\r\n /* Noti*/\r\n @GET(\"noti/find/{patId}\")\r\n Call<List<DialysisAlarm>> findNotiList(@Path(\"patId\") String patId);\r\n\r\n @POST(\"noti/save\")\r\n Call<DialysisAlarm> saveNoti(@Body DialysisAlarm alarm);\r\n\r\n @POST(\"patient/noti/graph/one/{patId}\")\r\n Call<Void> setNotiGraphOne(@Path(\"patId\") String patId);\r\n\r\n @POST(\"patient/noti/graph/zero/{patId}\")\r\n Call<Void> setNotiGraphZero(@Path(\"patId\") String patId);\r\n\r\n @GET(\"appointment/find/orderBy/{patId}\")\r\n Call<List<Appointment>> findAppointmentSort(@Path(\"patId\") String id);\r\n\r\n @GET(\"doctor/find/one/{doctorId}\")\r\n Call<Doctor> findHospname(@Path(\"doctorId\") String doctorId);\r\n\r\n @GET(\"patient/find/list/hosp\")\r\n Call<List<String>> findHospital();\r\n\r\n @POST(\"doctor/find/list\")\r\n Call<List<Doctor>> findByDocHospName(@Body Patient patient);\r\n}", "public interface API {\n @GET(\"today\")\n Observable<RecommendBean> getRecommendData();\n\n @GET(\"search/query/listview/category/{category}/count/10/page/{page}\")\n Observable<SearchBean> getSearchData(@Path(\"category\") String category, @Path(\"page\") int page);\n\n @GET(\"xiandu/categories\")\n Observable<Categories> getCategoriesData();\n\n @GET(\"xiandu/category/{type}\")\n Observable<Category> getCategoryData(@Path(\"type\") String type);\n}", "public interface ApiService {\n\n @GET(\"datacatalog?format=json\")\n Call<Catalog> getTopCatalog();\n\n\n/* @GET(\"item/{storyid}.json\")\n Call<StoryResponse> getStoryDetails(@Path(\"storyid\") String storyid);\n\n @GET(\"autocomplete/json\")\n Call<AutoCompleteGooglePlaces> getAutoCompleteResults(@Query(\"key\") String API_KEY,\n @Query(\"input\") String encode);\n\n @GET(\"nearbysearch/json\")\n Call<GetPlacesResponse> getPlaceDetails(@Query(\"location\") String location,\n @Query(\"radius\") int radius,\n @Query(\"key\") String key);*/\n}", "public interface ApiInterface {\n @GET(\"movie/top_rated\")\n Call<MoviesResponse> getTopRatedMovies(@Query(\"api_key\") String apiKey);\n\n @GET(\"movie/{id}\")\n Call<MoviesResponse> getMovieDetails(@Path(\"id\") int id, @Query(\"api_key\") String apiKey);\n\n}", "public interface baseApiService {\n\n @POST(\"login\")\n Call<FeedLogin> loginRequest(@Body LoginUser login);\n\n\n @GET(\"profile\")\n Call<FeedUser> getAllProfile(@Header(\"Content-Type\") String contenType,\n @Header(\"Accept\") String Accept,\n @Header(\"Authorization\") String authToken);\n\n @POST(\"register\")\n Call<DataRegister> registerReques(@Body registerUser registerUser);\n\n\n}", "public interface KanazawaApi {\n /*@以降は用途に合わせて Get Post Put Delete を用いる\n @Pathは{}内の物を照会\n @Queryを用いることでよくあるevent.json?1d=19などを簡単に記述できる\n 例 getEvent(@Query(\"id\"));\n */\n\n @GET(\"/{name}.json\")// 「/」から開始しないとはじかれる\n public Observable<KanazawaEntity> getEvent(@Path(\"name\")String url);\n}", "@Path(\"property\")\n@Tag(name = \"Property\", description = \"This endpoint is used for sharing properties between different data\")\npublic interface PropertyControllerDefinition extends IPropertyControllerJaxRS {\n\n @Override\n @Operation(summary = \"Get JSON\", description = \"GET a JSON document.\")\n String getJsonConfiguration(String name) throws RemoteException;\n\n @Override\n @Operation(summary = \"Save JSON\", description = \"Saves a JSON document.\")\n void setJsonConfiguration(String name, String json) throws RemoteException;\n\n @Override\n @Operation(summary = \"Get Property\", description = \"Gets property's value\")\n String getProperty(String name) throws RemoteException;\n\n @Override\n @Operation(summary = \"Set Property\", description = \"Updates the property's value\")\n void setProperty(String name, String value) throws RemoteException;\n\n @Override\n @Operation(summary = \"Get Properties\", description = \"Gets all properties as key / value pairs.\")\n Map<String, String> getProperties() throws RemoteException;\n\n @Override\n @Operation(summary = \"Get Properties\", description = \"Gets properties as key / value pairs of specified properties.\")\n Map<String, String> getProperties(String[] names) throws RemoteException;\n\n @Override\n @Operation(summary = \"Set Properties\", description = \"Updates the values of multiple properties.\")\n void setProperties(Map<String, String> values) throws RemoteException;\n\n @Override\n @Operation(summary = \"Get Principal\", description = \"Returns user's principal used by front-ends for queries or to determine what to display.\")\n ICoalescePrincipal whoami();\n}", "public interface BibleApi {\n @GET(\"versions.js\")\n Observable<VersionResponse> getVersions();\n\n @GET(\"versions/{version_id}/books.js\")\n Observable<BookResponse> loadBooks(@Path(\"version_id\") String versionId);\n\n @GET(\"books/{book_id}/chapters.js\")\n Observable<ChapterResponse> loadChapters(@Path(\"book_id\") String bookId);\n\n @GET(\"chapters/{chapter_id}/verses.js\")\n Observable<VerseResponse> loadVerses(@Path(\"chapter_id\") String chapterId);\n\n}", "public interface ApiInterface {\n\n\n @Headers({\"Content-Type: application/json\",})\n @POST(\"transport/public/registrations\")\n Call<Void> Register(@Body User user);\n\n\n //loginProcess\n @GET(\"user\")\n @Headers({\"Content-Type: application/json\"})\n Call<cUser> postWithFormParams();\n\n\n //userMe\n @GET(\"transport/user/me\")\n @Headers({\"Content-Type: application/json\"})\n Call<JsonObject> UserMe();\n\n\n\n //drivers\n @GET(\"transport/drivers\")\n @Headers({\"Content-Type: application/json\"})\n Call<JsonObject> drivers(\n @Query(\"latitud\") double latitud,\n @Query(\"longitud\") double longitud);\n\n\n}", "public interface ApiManager {\n @POST\n Call<ResponseBody> upload(@Url() String url);\n\n //上传文件\n @POST\n Call<ResponseBody> uploadFile(@Url() String url, @Body RequestBody body);\n\n //修改手机号\n @POST\n Call<ResponseBody> changePhone(@Url() String url);\n\n //订单详情\n @POST\n Observable<PayDetails> orderDetatls(@Url() String url);\n\n //通知已读\n @POST\n Call<ResponseBody> notityReader(@Url() String url);\n}", "public interface ApiServer {\n//\n @GET(\"umIPmfS6c83237d9c70c7c9510c9b0f97171a308d13b611?uri=homepage\")\n Observable<HomeBean> getHome();\n @POST\n Observable<Login> getDengLu(@Url String name, @QueryMap Map<String, String> paw);\n @GET(\"product/getCatagory\")\n Observable<Sort_lift> lift();\n @GET\n Observable<Sort_right> right(@Url String s);\n @GET\n Observable<Commodity_pagingBean> xia(@Url String s);\n @GET\n Observable<detailsBean> spxq(@Url String ss);\n @GET\n Observable<AddcartBean> add(@Url String s);\n @GET\n Observable<QurryBean> qurry(@Url String s);\n @GET\n Observable<AddcartBean> delete(@Url String s);\n @GET\n Observable<AddcartBean> addDd(@Url String s);\n @GET\n Observable<OrderBean> Ddlb(@Url String s);\n\n\n\n\n\n\n}", "public interface Endpoints {\n\n @GET(\"/posts\")\n Call<List<Posts>> getAllPosts();\n}", "public interface ControllerApi {\n\n\tGrailsParameterMap getParams();\n\tBindingResult bindData(Object target, Object bindingSource);\n\tHttpServletRequest getRequest();\n\tvoid redirect(Map arg);\n\tvoid redirect(Object arg);\n\tObject respond(Map args, Object value);\n\tObject respond(Map value);\n\tObject respond(Object value, Map args);\n\tvoid render(Object arg);\n}", "public interface ApiInterface {\n\n @GET(\"{poblacion}.xml\")\n Call<Escrutinio_sitio> getPoblacionData(@Path(\"poblacion\") String poblacion);\n\n }", "public interface EmployeeResource {\n\n /**\n * Retrieves the {@link Employee} resource by id.\n *\n * @param id employee id.\n * @return {@link Employee} resource.\n */\n @GetMapping(value = \"/v1/bfs/employees/{id}\", produces = MediaType.APPLICATION_JSON_VALUE)\n ResponseEntity<Employee> employeeGetById(@PathVariable(\"id\") String id) throws EmployeeNotFoundException;\n\n // ----------------------------------------------------------\n // TODO - add a new operation for creating employee resource.\n // ----------------------------------------------------------\n \n\t/**\n * Inserts employee record.\n * \n * @Valid annotation helps to validate \n * the javax validations on the employee POJO\n *\n * @param uuid the uuid\n * @param employee the employee\n * @return the response entity\n * @throws BadRequestException the bad request exception\n */\n @PostMapping(value = \"/v1/bfs/employees\", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)\n ResponseEntity<Employee> insertEmployee(\n \t\t@RequestHeader String uuid,\n \t\t@Valid @RequestBody Employee employee) throws BadRequestException;\n}", "public interface UserAccountRESTInterface {\n\n // Definition of string constants accessible from interface are defined in build.gradle (app)\n String LOGIN_URL = BuildConfig.USER_API_PUBLIC_URL;\n String REGISTER_USER_URL = BuildConfig.USER_API_PUBLIC_URL;\n\n String CURRENT_USER_URL = BuildConfig.USER_API_SECURED_URL;\n String LOGOUT_USER_URL = BuildConfig.USER_API_SECURED_URL;\n String DELETE_USER_URL = BuildConfig.USER_API_SECURED_URL;\n\n\n @POST(\"login\")\n Call<JwtUserToken> postUserLogin(@Body UserLoginOrRegisterInputData loginDataBody);\n\n /**\n * Return JSON string containing user's account data - must be parsed to LoggedInUser object\n * @return\n */\n @GET(\"current\")\n Call<String> getCurrentUser();\n\n @GET(\"logout\")\n Call<Boolean> logoutCurrentUser();\n\n @GET(\"logout/{userId}\")\n Call<Boolean> logoutCurrentUserWithId(@Path(\"userId\") Long userId);\n\n @DELETE(\"delete/{userName}\")\n Call<String> deleteUser(@Path(\"userName\") String userName);\n\n /**\n * Returns user ID of the deleted user or 0 if not successful\n *\n * @param userId\n * @return\n */\n @DELETE(\"delete/id/{userId}\")\n Call<String> deleteUserById(@Path(\"userId\") Long userId);\n\n @POST(\"register\")\n Call<JwtUserToken> registerNewUser(@Body UserLoginOrRegisterInputData loginDataBody);\n\n}", "public interface Service {\n\n @GET(\"movie/{sub_type}\")\n Call<MovieResponse> getMovie(@Path(\"sub_type\")String sub_type, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"tv/{sub_type}\")\n Call<TvShowResponse> getTvShow(@Path(\"sub_type\")String sub_type, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"movie/{movie_id}/recommendations\")\n Call<MovieResponse> getMovieRecommendations(@Path(\"movie_id\")int movie_id,@Query(\"api_key\")String api_key, @Query(\"language\")String language,@Query(\"page\")int page);\n\n @GET(\"tv/{tv_id}/recommendations\")\n Call<TvShowResponse> getTvShowRecommendations(@Path(\"tv_id\")int tv_id, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"search/movie\")\n Call<MovieResponse> getMovieSearch(@Query(\"query\")String query,@Query(\"api_key\")String api_key, @Query(\"language\")String language,@Query(\"page\")int page);\n\n @GET(\"search/tv\")\n Call<TvShowResponse> getTvShowSearch(@Query(\"query\")String query, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n}", "@RequestMapping(\"/member\")\npublic interface TestApiServer {\n @RequestMapping(\"/test\")\n public Map<String,Object> test(Integer id,String name);\n}", "public interface API {\n\n //Penyakit\n @GET(\"penyakitall/{page}/{count_page}\")\n Call<DiseaseResponse>\n getDiseaseList(@Path(\"page\") String page, @Path(\"count_page\") String count_page);\n\n @GET(\"penyakit/{page}/{count_page}\")\n Call<DiseaseResponse>\n getDiseaseListByLokasi(@Path(\"page\") String page, @Path(\"count_page\") String count_page, @Query(\"id_desa\") String id_desa);\n\n @POST(\"penyakit\")\n Call<DiseasePostResponse>\n postDisease(@Body DiseaseBody diseaseBody);\n @DELETE(\"penyakit\")\n Call<DeletePenyakitResponse> deletePenyakit(@Query(\"Id_penyakit\") String id_penyakit);\n\n @PUT(\"penyakit\")\n Call<PutPenyakitResponse> editPenyakit(@Query(\"Id_penyakit\") String id_penyakit,\n @Body PutPenyakitBody putPenyakitBody);\n\n @GET(\"tipepenyakit/{page}/{count_page}\")\n Call<TipePenyakitResponse>\n getTipePenyakitList(@Path(\"page\") String page, @Path(\"count_page\") String count_page);\n\n @POST(\"multimedia\")\n Call<MultimediaPostResponse>\n postMultimedia(@Body MultimediaBody multimediaBody);\n}", "public interface Route {\n boolean match(AreaPath path);\n\n Map<String, Object> getParameterValues();\n\n /**\n * target action path\n */\n ActionPath getActionPath();\n\n /**\n * target action processor\n */\n String getProcessor();\n\n /**\n * target action task\n */\n String getTask();\n}", "public interface IHttpInterface {\n\n\n // 轮播图(焦点图)\n @GET(\"feng/imglst\")\n Observable<BannerResult> getBannerView();\n\n @GET(\"feng/huoyuanlst\")\n Observable<GoodsBean> getListView(@Query(\"num\") String num, @Query(\"page\") String page);\n\n //发布货源\n @GET(\"feng/huoyuanadd\")\n Call<String> getGoodsInfo(@QueryMap Map<String, String> paramsMap);\n\n //上拉加载\n @GET(\"feng/huoyuanlst/\")\n Observable<GoodsBean> getMoreView(@Query(\"num\") String num, @Query(\"page\") String page);\n // @GET(\"rank\")\n // Call<RankBean> getRank2(@QueryMap Map<String,String> params);\n\n // @GET(\"/banner\")\n // Observable<BannerResult> getBannerView();\n}", "public interface NewsAPI {\n\n// @GET(\"1.json ?api-key= b6075f230e154c32accba228515bdce5\")\n @GET(\"home.json?api-key=b6075f230e154c32accba228515bdce5\")\n Call<NewsModel>getNewsModel();\n\n\n //Dynamic method\n //use if you would like user to alter the information returned from api call\n //\n// @GET(\"{section}.{format}\")\n// Call<NewsModel>test(@Path(\"section\") String s, @Path(\"format\") String f);\n\n\n}", "public interface ApiService {\n\n @GET(\"classify\")\n Call<GalleryClassResult> getGalleryClassList();\n\n @GET(\"list\")\n Call<GalleryResult> getGalleryList(@Query(\"page\") int page, @Query(\"rows\") int rows, @Query(\"id\") int id);\n\n @GET(\"show\")\n Call<PictureResult> getPictureList(@Query(\"id\") long id);\n\n}", "public interface IteBooksApi {\n\n @GET(\"search/{query}\")\n Observable<SearchBookResult> getBooksByCategory(@Path(\"query\") String query);\n\n @GET(\"search/{query}/page/{number}\")\n Observable<SearchBookResult> getBooksByPage(@Path(\"query\") String query, @Path(\"number\") String number);\n\n @GET(\"book/{id}\")\n Observable<BookDetailResult> getBookDetail(@Path(\"id\") String id);\n}", "public interface RestClient {\n public List<UserDTO> getContracts(String tariffTitle) throws IOException;\n\n public boolean buildPDF(String tariffTitle) throws IOException;\n}", "public interface IUserBiz {\n @GET(\"TestServlet\")\n Call<List<User>> getUsers();\n\n @GET(\"{username}\")\n Call<User> getUser(@Path(\"username\")String username);\n}", "public void addHandler(RequestType type, ApiInterface apiInterface, String pathSpec, String... argNames) {\n ApiSpec spec = new ApiSpec(apiInterface, argNames);\n switch (type) {\n case GET:\n getStructure.addChildWithSubPath(pathSpec, spec);\n break;\n case POST:\n postStructure.addChildWithSubPath(pathSpec, spec);\n break;\n case PUT:\n putStructure.addChildWithSubPath(pathSpec, spec);\n break;\n case DELETE:\n delStructure.addChildWithSubPath(pathSpec, spec);\n break;\n }\n }", "public interface GiftSvcApi {\n\n public static final String PASSWORD_PARAMETER = \"password\";\n\n public static final String USERNAME_PARAMETER = \"username\";\n\n public static final String TITLE_PARAMETER = \"title\";\n\n public static final String TOKEN_PATH = \"/oauth/token\";\n\n public static final String DATA_PARAMETER = \"data\";\n\n public static final String ID_PARAMETER = \"id\";\n\n public static final String OBSCENE_PARAMETER = \"obscene\";\n\n // The path where we expect the GiftSvc to live\n public static final String GIFT_SVC_PATH = \"/gift\";\n\n public static final String GIFT_DATA_PATH = GIFT_SVC_PATH + \"/{id}/data\";\n\n public static final String GIFT_OBSCENE_PATH = GIFT_SVC_PATH + \"/{id}/obscene\";\n\n public static final String GIFT_UPDATE_PATH = GIFT_SVC_PATH + \"/update\";\n\n public static final String GIFT_TITLE_SEARCH_PATH = GIFT_SVC_PATH + \"/search/findByTitle\";\n\n public static final String GIFT_OBSCENE_SEARCH_PATH = GIFT_SVC_PATH + \"/search/findByObscene\";\n\n @GET(GIFT_SVC_PATH)\n public Collection<Gift> getGiftList();\n\n @POST(GIFT_SVC_PATH)\n public Gift addGift(@Body Gift gift);\n\n @POST(GIFT_SVC_PATH + \"/{id}\")\n public List<Long> deleteGift(@Path(ID_PARAMETER) long id);\n\n @GET(GIFT_TITLE_SEARCH_PATH)\n public Collection<Gift> findByTitle(@Query(TITLE_PARAMETER) String title);\n\n @Multipart\n @POST(GIFT_DATA_PATH)\n public GiftStatus setGiftData(@Path(ID_PARAMETER) long id, @Part(DATA_PARAMETER) TypedFile giftData);\n\n @GET(GIFT_DATA_PATH)\n Response getData(@Path(ID_PARAMETER) long id);\n\n @POST(GIFT_UPDATE_PATH)\n public Long updateGift(@Body Gift gift);\n\n @POST(GIFT_SVC_PATH + \"/{id}/touch\")\n public Long touchGift(@Path(\"id\") long id);\n\n @POST(GIFT_SVC_PATH + \"/{id}/untouch\")\n public Long untouchGift(@Path(\"id\") long id);\n\n @POST(GIFT_OBSCENE_PATH)\n public Boolean obsceneGift(@Path(\"id\") long id);\n\n public static final String USER_SVC_PATH = \"/user\";\n\n @GET(USER_SVC_PATH)\n public Collection<User> getUserList();\n\n @GET(GIFT_SVC_PATH + \"/{user}\")\n public Collection<Gift> getGiftListForUser(@Path(\"user\") User user);\n\n @POST(USER_SVC_PATH)\n public boolean addUser(@Body User user);\n}", "public interface FindUserRequest\n{\n @GET(\"/dataTest/findUserByCode/{userCode}\")\n UserInfoResponse getUserInfo(@Path(\"userCode\") String userCode);\n\n @GET(\"/dataTest/findUserBySearch/{search}\")\n UserSearchResponse searchUsers(@Path(\"search\") String search);\n}", "public interface Api {\n\n // we have a BASE_URL. It contains the ROOT URL of our API.\n String BASE_URL = \"https://simplifiedcoding.net/demos/\";\n\n //we have an annotation @GET(“marvel”). It means that we are defining an http GET request.\n // And the String passed inside the get is the api name.\n @GET(\"marvel\")\n\n //we have a method named getHeroes() whose return type is Call.\n // And the type of the Call is a List<>. And type of the List is Hero.\n Call<List<Hero>> getHeroes();\n}", "API createAPI();", "public interface SensorAPI {\n\n /**\n * Get the sensor output API.\n *\n * @return the API\n */\n @Path(\"sensorOutputs\")\n SensorOutputAPI sensorOutputs();\n\n /**\n * Get the device API.\n *\n * @return the API\n */\n @Path(\"device\")\n DeviceAPI devices();\n\n /**\n * Get the platform API.\n *\n * @return the API\n */\n @Path(\"platforms\")\n PlatformAPI platforms();\n\n /**\n * JAX-RS interface for the sensor output resource.\n */\n interface SensorOutputAPI {\n /**\n * Get the outputs of the device\n *\n * @param device the device\n *\n * @return the outputs\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDeviceSensorOutputs/{device}\")\n List<JsonSensorOutput> byDevice(@PathParam(\"device\") int device);\n }\n\n /**\n * JAX-RS interface for the device resource.\n */\n interface DeviceAPI {\n /**\n * Get the children of the device.\n *\n * @param device the device\n *\n * @return the children\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getChildrenOfDevice/{device}\")\n List<JsonDevice> childrenOf(@PathParam(\"device\") int device);\n\n /**\n * Get the SensorML description of the device.\n *\n * @param id the id\n *\n * @return the SensorML description\n */\n @GET\n @Produces(MediaType.APPLICATION_XML)\n @Path(\"getDeviceAsSensorML/{device}\")\n String getSensorML(@PathParam(\"device\") int id);\n\n /**\n * Get the list of all devices.\n *\n * @return the devices\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllActiveDevicesFast\")\n List<JsonDevice> all();\n\n /**\n * Get the device.\n *\n * @param device the id\n *\n * @return the device\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDevice/{device}\")\n JsonDevice byId(@PathParam(\"device\") int device);\n\n /**\n * Get all device categories.\n *\n * @return the device categories\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllDeviceCategories\")\n List<JsonType> types();\n\n /**\n * Get the device.\n *\n * @param urn the URN\n *\n * @return the device\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDeviceByUrn/{urn}\")\n JsonDevice byURN(@PathParam(\"urn\") String urn);\n }\n\n /**\n * JAX-RS interface for the platform resource.\n */\n interface PlatformAPI {\n /**\n * Get all platforms.\n *\n * @return the platforms\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllRootItems\")\n List<JsonDevice> all();\n\n /**\n * Get all platform types.\n *\n * @return the platform types\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();\n }\n\n}", "public interface ApiMovieService {\n\n @GET(\"{filter}\")\n Call<MoviesResponse> getListMovies(@Path(\"filter\") String filter,\n @Query(\"page\") int page,\n @Query(\"api_key\") String apiKey);\n\n @GET(\"{id}\")\n Call<MovieResponse> getMovieDetail(@Path(\"id\") long id, @Query(\"api_key\") String apiKey);\n}", "@Path(\"/people\")\npublic interface PersonResource {\n\n /**\n * Returns an array of all the Person entities currently stored. Extra QueryParams can be added to enable filtering. Currently the 'sort' parameter will indicate what field the returned results will be sorted by.\n */\n @GET\n @Produces({ \"application/json\" })\n public abstract Response get(@QueryParam(\"sort\") String sort);\n\n /**\n * Adds a new Person instance\n */\n @POST\n @Produces({ \"application/json\" })\n @CommitAfter\n public abstract Response addNew(Person person);\n\n /**\n * Updates details about a Person\n */\n @PUT\n @Produces({ \"application/json\" })\n @Path(\"{id}\")\n @CommitAfter\n public abstract Response update(Person person);\n\n /**\n * Attempts to retrieve the Person represented by an Id\n */\n @GET\n @Path(\"{id}\")\n @Produces({ \"application/json\" })\n public abstract Response find(@PathParam(\"id\") Long id);\n\n}" ]
[ "0.7248546", "0.708564", "0.70700234", "0.7054111", "0.7017833", "0.7001134", "0.687891", "0.6872862", "0.68693316", "0.6866923", "0.6849324", "0.68043", "0.6796756", "0.6766978", "0.6746902", "0.6712274", "0.66964954", "0.6694311", "0.6677527", "0.6669232", "0.6666554", "0.6658866", "0.6655735", "0.6645218", "0.662736", "0.66239256", "0.6613985", "0.6602435", "0.6556871", "0.65366894", "0.65352005", "0.65331244", "0.64946836", "0.6492223", "0.64911664", "0.64826167", "0.6479214", "0.6475643", "0.64694786", "0.6464032", "0.6453538", "0.6451229", "0.6445437", "0.6445289", "0.6444379", "0.64400876", "0.643767", "0.6435827", "0.6434947", "0.6434123", "0.6424772", "0.6423335", "0.639433", "0.6393794", "0.6390529", "0.63898134", "0.63897", "0.6389636", "0.63660884", "0.6365533", "0.6362574", "0.63625133", "0.6361738", "0.6360737", "0.6341124", "0.63373977", "0.6332837", "0.63270444", "0.6326642", "0.6317471", "0.63114214", "0.630166", "0.62997764", "0.629762", "0.6285866", "0.62850857", "0.62792265", "0.6279136", "0.6275567", "0.62712455", "0.62701386", "0.6268791", "0.62679166", "0.6260081", "0.62588996", "0.6257401", "0.6253534", "0.6251673", "0.62507755", "0.624774", "0.6247395", "0.62439984", "0.6243671", "0.62428755", "0.624097", "0.6235173", "0.6228857", "0.62214595", "0.621851", "0.62155426" ]
0.6649121
23
return new LoginProxy().home(mapping, form, request, response);
private ActionForward home(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { return new LoginProxy().loginHome(mapping, form, request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ActionForward autorizar(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\treturn new LoginProxy().loginHome(mapping, form, request, response);\n\t}", "protected Response login() {\n return login(\"\");\n }", "Login.Req getLoginReq();", "@GetMapping(value={\"/login\"})\n public String login(){\n return \"login\";\n }", "@RequestMapping(value=\"/loginForm\", method = RequestMethod.GET)\n\tpublic String home(){\n\n\t\treturn \"loginForm\";\n\t}", "private void userLogin(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "RequestResult loginRequest() throws Exception;", "@RequestMapping(value=\"/loginForm\", method = RequestMethod.POST)\n\tpublic String homePOST(){\n\n\t\treturn \"loginForm\";\n\t}", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n\tpublic String loginForm() {\n\t\treturn \"login\";\n\t}", "private CoprocessObject.Object doForwardToLogin(CoprocessObject.Object.Builder builder) {\n\t\tReturnOverrides retOverrides = builder.getRequestBuilder()\n\t\t\t\t.getReturnOverridesBuilder()\n\t\t\t\t.setResponseCode(301)\n\t\t\t\t.putHeaders(HTTP_HEADER_LOCATION, loginUrl)\n\t\t\t\t.build();\n\t\t\n\t\t MiniRequestObject miniReq = builder.getRequestBuilder().setReturnOverrides(retOverrides).build();\n\t\t return builder.setRequest(miniReq).build();\n\t}", "@Override\r\n\tpublic void login() {\n\r\n\t}", "@GetMapping(\"/api/v1/login\")\n public String login() {\n return \"Success\";\n }", "private static void getLoginPage() throws IOException {\n get(\"/login\", (request, response) -> {\n Map<String, Object> attributes = new HashMap<>();\n attributes.put(\"title\", \"Login\");\n\n return SessionModelAndView.create(request.session(), attributes, \"index.jade\");\n }, new JadeEngine());\n }", "@GetMapping(\"/loginForm\")\n\t\tpublic String login() {\n\t\t\treturn\"user/loginForm\";\n\t\t}", "@Override\r\n\tpublic ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\tHomeForm homeForm = (HomeForm) form;\r\n\t\tUserBO userBO = new UserBO();\r\n\t\t\r\n\t\t\r\n\t\tString username = homeForm.getUsername();\r\n\t\tString password = homeForm.getPassword();\r\n\t\t\r\n\t\tUser user = new User();\r\n\t\tuser.setUsername(username);\r\n\t\tuser.setPassword(password);\r\n\t\t\r\n\t\t// get cookie theo mang\r\n\t\tMyCookie myCookie=new MyCookie(request, response);\r\n\t\tString statusLogin = myCookie.getCookie(\"statusLogin\");\r\n\t\t\r\n\t\tif(\"notLogin\".equals(statusLogin)||\"fail\".equals(statusLogin)){\r\n\t\t\t//chua dang nhap\r\n\t\t\tif(userBO.isUser(user)){\r\n\t\t\t\t//dang nhap thanh cong\r\n\t\t\t\tmyCookie.setCookie(\"statusLogin\", \"login\");\r\n\t\t\t\tmyCookie.setCookie(\"userId\", userBO.getOneUserByName(username).getUserId()+\"\");\r\n\t\t\t}else{\r\n\t\t\t\t//dang nhap that bai\r\n\t\t\t\tmyCookie.setCookie(\"statusLogin\", \"fail\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn mapping.findForward(\"thanhCong\");\r\n\t}", "@GetMapping(\"/login\")\n public String viewLoginPage() {\n\n return \"login/login\";\n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws Exception {\r\n\t\tif(request.getParameter(\"action\").equals(\"toLoginPage\")){\r\n\t\treturn mapping.findForward(\"toLoginPage\");\t\t\r\n\t\t}\r\n\t\tif(request.getParameter(\"action\").equals(\"login\")){\r\n\t\t\tBoNodeService boNodeService = (BoNodeService)ServiceFactory.instance().getService(\"boNodeService\");\t\t\t\t\r\n\t\t\trequest.getSession().setAttribute(\"selectedNodeId\", \"11\");\t\t\t\r\n\t\t\tList nodeFatherRootList = boNodeService.getNodeFatherRoot();\r\n\t\t\tList nodeChildList = boNodeService.getNodeChildByPid(request.getSession().getAttribute(\"selectedNodeId\").toString());\r\n\t\t\trequest.getSession().setAttribute(\"nodeFatherRootList\", nodeFatherRootList);\r\n\t\t\trequest.getSession().setAttribute(\"nodeChildList\", nodeChildList);\r\n\t\t\t\r\n\t\t\treturn mapping.findForward(\"toFramePage\");\t\t\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private static void postLoginPage() {\n post(\"/login\", \"application/json\", (req, res) -> {\n HomerAccount loggedInAccount = homerAuth.login(req.body());\n if(loggedInAccount != null) {\n req.session().attribute(\"account\", loggedInAccount);\n res.redirect(\"/team\");\n } else {\n res.redirect(\"/login\");\n }\n return null;\n });\n }", "@Public\n\t@Get(\"/login\")\n\tpublic void login() {\n\t\tif (userSession.isLogged()) {\n\t\t\tresult.redirectTo(HomeController.class).home();\n\t\t}\n\t}", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n\tpublic String login() {\n\t\treturn \"login\";\n\t}", "public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n\n // Create the object that holds the fields from the login page.\n LoginForm validateLogin = (LoginForm) form;\n // Used to define the page to be forwarded to.\n ActionForward findForward = mapping.findForward(\"welcome\");\n User user = new User();\n user.loadFile();\n access = user.compare(validateLogin);\n // If login credentials are valid continue otherwise return to the login page.\n if (access) {\n findForward = mapping.findForward(\"loggedIn\");\n } else {\n findForward = mapping.findForward(\"login\");\n } \n return findForward;\n }", "@RequestMapping(value={\"/login\"})\r\n\tpublic String login(HttpServletRequest request, HttpServletResponse response){\n\t\tLoginDAO dao = new LoginDAO();\r\n\t\tString userDefaultAdmin = \"lider\";\r\n\t\tString passwordDefaultAdmin = dao.read(\"lider\").getSenha();\t\t//\"admin\";\r\n\t\t\r\n\t\tString userDefaultMembro = \"membro\";\r\n\t\tString passwordDefaultMembro = dao.read(\"membro\").getSenha();\t//\"membro\";\r\n\t\t\r\n\t\tString usuario = request.getParameter(\"usuario\");\r\n\t\tString senha = request.getParameter(\"senha\");\r\n\t\t\r\n\t\tString usuario2 = request.getParameter(\"usuario2\");\r\n\t\tString senha2 = request.getParameter(\"senha2\");\r\n\t\t\r\n\t\t//verifica mobile\r\n\t\tif(usuario2 != null && !usuario2.isEmpty() && senha2 != null && !senha2.isEmpty()){\r\n\t\t\tusuario = usuario2;\r\n\t\t\tsenha = senha2;\r\n\t\t}\r\n\t\t//valida usuario e senha padrao do sistema\r\n\t\tif(usuario != null && senha != null){\r\n\t\t\tif(usuario.equalsIgnoreCase(userDefaultAdmin) && senha.equals(passwordDefaultAdmin)){\r\n\t\t\t\tlog.info(\"Login ok - Usuario admin lider logado!\");\t\t\t\t\r\n\t\t\t\tMembroUserWeb membroSession = new MembroUserWeb();\t\t\t\t\t\t\t\t//objeto usuario membro acesso\r\n\t\t\t\tmembroSession.setAcesso(TipoAcessoLogin.LIDER_ACESSO);\t\t\t\t\t\t\t//tipo acesso\r\n\t\t\t\trequest.getSession().setAttribute(MembroUserWeb.MEMBRO_SESSION, membroSession);\t//set objeto na session\t\t\t\r\n\t\t\t\treturn \"redirect:/home.jsp\";\t\t\t//redireciona para action /home\r\n\t\t\t\t\r\n\t\t\t}else if(usuario.equalsIgnoreCase(userDefaultMembro) && senha.equals(passwordDefaultMembro)){\r\n\t\t\t\tlog.info(\"Login ok - Usuario membro logado!\");\r\n\t\t\t\tMembroUserWeb membroSession = new MembroUserWeb();\t\t\t\t\t\t\t\t//objeto usuario membro acesso\r\n\t\t\t\tmembroSession.setAcesso(TipoAcessoLogin.MEMBRO_ACESSO);\t\t\t\t\t\t\t//tipo acesso\r\n\t\t\t\trequest.getSession().setAttribute(MembroUserWeb.MEMBRO_SESSION, membroSession);\t//set objeto na session\r\n\t\t\t\treturn \"redirect:/home.jsp\";\t\t\t//redireciona para action /home\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tlog.warn(\"Erro login - usuario ou senha invalidos!\");\r\n\t\t\t\treturn \"redirect:/index.html?error=login\";\t//redireciona para tela login informando erro de login\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tlog.warn(\"Erro login - usuario ou senha invalidos!\");\r\n\t\t\treturn \"redirect:/index.html?error=login\";\t\t//redireciona para tela login informando erro de login\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "@GetMapping(\"/loginpage\")\n public String viewLoginPage() {\n return \"loginpage\";\n }", "@RequestMapping(\"login\")\r\n\tpublic String loginUser() {\n\t\treturn \"login\";\r\n\t}", "public static Result login(){\n String username= Form.form().bindFromRequest().get(\"username\");\n String password= Form.form().bindFromRequest().get(\"password\");\n String new_user= Form.form().bindFromRequest().get(\"new_user\");\n if(new_user != null){\n return ok(login.render(username,password));\n } else {\n Skier s=Session.authenticate(username,password);\n if(s==null){\n return badRequest(index.render(\"Invalid Username or Password\"));\n } else {\n login(s);\n return redirect(\"/home\");\n }\n }\n }", "@Override\n String execute(HttpServletRequest request, HttpServletResponse response) throws LegohusException {\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n User user = LogicFacade.login(email, password);\n HttpSession session = request.getSession();\n session.setAttribute(\"user\", user);\n \n return \"WEB-INF/\" + user.getRole() + \"page\";\n }", "public void authenticate(LoginRequest loginRequest) {\n\n }", "Login() { \n }", "void redirectToLogin();", "@RequestMapping(value = \"/newlogin\")\r\n\tpublic String dispatchTodefaultEntryPoint() {\r\n\t\tlogger.entry();\r\n\r\n\t\tsaveUserLoginInformation();\r\n\r\n\t\t// String defaultHome = \"redirect:/home\";\r\n\r\n\t\t// if (Utils.isUserInRole(getInternalUserRoles())) {\r\n\t\t//\r\n\t\t// } else {\r\n\t\t// throw new AccessDeniedException(\"User Role not found\");\r\n\t\t// }\r\n\r\n\t\tString homePage = \"forward:/\" + getHomePageByRole();\r\n\r\n\t\tlogger.exit();\r\n\r\n\t\treturn homePage;\r\n\t}", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n public ModelAndView login() {\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.setViewName(\"user/login\");\n return modelAndView;\n }", "protected void login() {\n\t\t\r\n\t}", "@RequestMapping(\"/\")\r\n\t//public CredentialConfiguration index() {\r\n\t\r\n\tpublic Map index() {\r\n\t\t\r\n\t\t\r\n\t\tMap data=new HashMap();\r\n\t\t\r\n\t\tdata.put(\"username\",cred.getUserName());\r\n\t\tdata.put(\"password\",cred.getPassword());\r\n\t\tdata.put(\"screteQuestion\",cred.getScreteQuestion());\r\n\t\tdata.put(\"screteAnswer\",cred.getScreteAnswer());\r\n\t\treturn data;\r\n\t}", "@Override\n\tpublic ActionResult login(PortalForm form, HttpServletRequest request) throws SQLException {\n\t\treturn null;\n\t}", "com.bingo.server.msg.REQ.LoginRequest getLogin();", "@RequestMapping(\"/login\")\n\tpublic String login() {\n\t\tconfig.output();\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tif (auth instanceof AnonymousAuthenticationToken) {\n\t\t\treturn \"login\";\n\t\t} else {\n\t\t\treturn \"home\"; \n\t\t}\n\t}", "@Override\n\tpublic void goToLogin() {\n\t\t\n\t}", "public ActionForward displayLogin(ActionMapping mapping,\n\t\t\tActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tlogger.info(\" Started...\");\n\t\tlogger.info(\" successful redirected to : displayLogin\");\n\t\tlogger.info(\" Executed... \");\n\t\treturn mapping.findForward(DISPLAY_LOGIN);\n\t}", "@RequestMapping(\"callproj\")\r\n\t\r\n\tpublic String Home()\r\n\t{\n\t\treturn \"Home\";//register.jsp==form action=register\r\n\t}", "private void loginHandler(RoutingContext context) {\n JsonObject creds = new JsonObject()\n .put(\"username\", context.getBodyAsJson().getString(\"username\"))\n .put(\"password\", context.getBodyAsJson().getString(\"password\"));\n\n // TODO : Authentication\n context.response().setStatusCode(500).end();\n }", "@RequestMapping(value = \"/login\", method = GET)\r\n\tpublic String login() {\r\n\t\treturn \"admin/login\";\r\n\t}", "@GetMapping(\"/login-success\")\n public ModelAndView loginSuccess(){\n return new ModelAndView(\"index\");\n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\r\n\t\tresponse.setContentType(\"application/json;charset=utf-8\");\r\n\t\tresponse.setHeader(\"pragme\", \"no-cache\");\r\n\t\tresponse.setHeader(\"Access-Control-Allow-Credentials\", \"true\");\r\n\t\tresponse.setHeader(\"Access-Control-Allow-Origin\", request.getHeader(\"Origin\"));\r\n\t\tPrintWriter out = null;\r\n\t\t\r\n\t\tRMessage rmsg = new RMessage();\r\n\t\ttry{\r\n\t\t\tout = response.getWriter();\r\n\t\t\t\r\n\t\t\t//获取用户的session,判断用户的登录状态\r\n\t\t\tHttpSession session = request.getSession();\r\n\t\t\tint uid = session.getAttribute(\"uid\")==null?-1:(Integer)session.getAttribute(\"uid\");\r\n\t\t\t\r\n\t\t\tif (uid == -1){\r\n\t\t\t\trmsg.setStatus(300);\r\n\t\t\t\trmsg.setMessage(\"请先登录!\");\r\n\t\t\t\tout.write(RMessage.getJson(rmsg));;\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//根据URL获取username\r\n\t\t\tString url = request.getRequestURL().toString();\r\n\t\t\tString username = url.substring(url.lastIndexOf(\"/\")+1, url.lastIndexOf(\".\"));\r\n\t\t\tUserView uv = UserView.getUserInfo(username);\r\n\t\t\t//如果用户不存在\r\n\t\t\tif(uv == null || uv.getUid() != uid){\r\n\t\t\t\trmsg.setStatus(300);\r\n\t\t\t\trmsg.setMessage(\"用户不存在!\");\r\n\t\t\t\tout.write(RMessage.getJson(rmsg));\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//设置返回信息\r\n\t\t\tData data = new Data();\r\n\t\t\tdata.put(\"uid\",uv.getUid());\r\n\t\t\tdata.put(\"username\", uv.getUsr());\r\n\t\t\tdata.put(\"nickname\", uv.getNick());\r\n//\t\t\tdata.put(\"avator\", uv.getAvator());\r\n\t\t\tdata.put(\"sign\", uv.getSign());\r\n\t\t\tdata.put(\"coin\", uv.getCoin());\r\n\t\t\tdata.put(\"mail\", uv.getMail());\r\n\t\t\tdata.put(\"phone\", uv.getPhone());\r\n\t\t\tdata.put(\"qq\", uv.getQq());\r\n\t\t\tdata.put(\"xname\", uv.getXname());\r\n\t\t\tdata.put(\"mname\", uv.getMname());\r\n\t\t\tdata.put(\"auth\", uv.getAuth());\r\n\t\t\tdata.put(\"status\", uv.getStatus());\r\n\t\t\tdata.put(\"uploadcount\", uv.getUpcnt());\r\n\t\t\tdata.put(\"downloadcount\", uv.getDncnt());\r\n\t\t\tdata.put(\"collectcount\",uv.getColcnt());\r\n\t\t\t\r\n\t\t\trmsg.setStatus(200);\r\n\t\t\trmsg.setMessage(\"OK\");\r\n\t\t\trmsg.setData(data);\r\n\t\t\tout.write(RMessage.getJson(rmsg));\r\n\t\t\t\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\trmsg.setStatus(300);\r\n\t\t\trmsg.setMessage(e.getCause().toString());\r\n\t\t\tout.write(RMessage.getJson(rmsg));\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tout.flush();\r\n\t\t\tout.close();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@GET(\"/login\")\n Call<LoginResponse> loginRequest(@Path(\"username\") String username\n , @Path(\"password\") String password);", "@Override\n\tpublic String login_request() {\n\t\treturn null;\n\t}", "public Page_Home doDefaultLogin() {\n\t\tLogStatus.info(\"Logging in with username :: \\'\" + TestUtils.getValue(\"username\") + \"\\' and password :: \\'\"\n\t\t\t\t+ TestUtils.getValue(\"password\") + \"\\'\");\n\t\tDriverManager.getDriver().findElement(By.name(\"username\")).sendKeys(TestUtils.getValue(\"username\"));\n\t\tDriverManager.getDriver().findElement(By.name(\"password\")).sendKeys(TestUtils.getValue(\"password\"));\n\t\tDriverManager.getDriver().findElement(By.id(\"Registration Desk\")).click();\n\t\tDriverManager.getDriver().findElement(By.id(\"loginButton\")).click();\n\n\t\treturn new Page_Home();\n\n\t}", "@RequestMapping(\"/login\")\r\n\tpublic ModelAndView validate(HttpServletRequest request,HttpServletResponse response)\r\n\t{\r\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(ConfigClass.class);\r\n\t //\t Login log=context.getBean(Login.class);\r\n\t \tLoginService lser=context.getBean(LoginService.class);\r\n\t\tLoginService2 v=new LoginService2();\r\n\t\tModelAndView mv= new ModelAndView();\r\n\t\t/*log=lser.retrieveLogin(request.getParameter(\"username\"));\r\n\t\tString name=log.getName();\r\n\t\tString pass=log.getPassword();\r\n\t\t*/\r\n\t\tString name= request.getParameter(\"username\");\r\n\t\tString pass= request.getParameter(\"password\");\r\n\t\tif(v.validateLogin(name, pass))\r\n\t\t\tmv.setViewName(\"success\");\r\n\t\telse\r\n\t\t\tmv.setViewName(\"fail\");\r\n\t\treturn mv;\r\n\t}", "@GET\n @Path(\"/re\")\n public Response relogin() {\n return this.login();\n }", "@Override\n public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n LoginForm formBean=(LoginForm)form;\n UserService ser = new UserService();\n \n String name = formBean.getUser();\n String pass = formBean.getPass();\n \n if ((name == null) || pass == null || name.equals(\"\") || pass.equals(\"\")) { \n if(ser.Validate(formBean)==false){\n formBean.setError();\n return mapping.findForward(FAILURE);\n }\n \n }\n\n return mapping.findForward(SUCCESS);\n \n }", "public Resolution login() {\r\n\t\tif (loginUrl != null && loginUrl.indexOf(\"/action/login\") < 0) {\r\n\t\t\treturn new RedirectResolution(loginUrl, false);\r\n\t\t} else {\r\n\t\t\treturn new RedirectResolution(UserActionBean.class);\r\n\t\t}\r\n\t}", "@RequestMapping(value=\"/login/{username}/{password}\")\n @ResponseBody\n public boolean login(@PathVariable String username, @PathVariable String password){\n return customUserDetailsService.login(username, password);\n\n }", "@GetMapping(\"/user\")\n public User login(@RequestParam String username, @RequestParam String password) { return userDataTierConnection.login(username,password); }", "protected void service(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String login = request.getParameter(\"login\");\n String senha = request.getParameter(\"senha\");\n UsuarioDAO dao = new UsuarioDAO();\n if (dao.checkLogin(login, senha)) {\n HttpSession session = request.getSession(true);\n session.setAttribute(\"login\", login);\n Cookie[] cookies = request.getCookies();\n Cookie cookie = null;\n for (int i = 0; cookies != null && i < cookies.length; i++) {\n Cookie c = cookies[i];\n if (c.getName().equals(\"myapp.login\")) {\n cookie = c;\n cookie.setValue(cookie.getValue().replace(\"@\" + login, \"\"));\n cookie.setValue(cookie.getValue().replace(login + \"@\", \"\"));\n cookie.setValue(login + \"@\" + cookie.getValue());\n break;\n }\n }\n if (cookie == null) {\n cookie = new Cookie(\"myapp.login\", login);\n }\n cookie.setMaxAge(Integer.MAX_VALUE);\n response.addCookie(cookie);\n RequestDispatcher rd = request.getRequestDispatcher(\"WEB-INF/TheGame.jsp\");\n rd.forward(request, response);\n } else {\n request.setAttribute(\"msg\", \"<span class=\\\"alert label\\\">Login ou senha inválida</span>\");\n RequestDispatcher rd = request.getRequestDispatcher(\"index.jsp\");\n rd.forward(request, response);\n }\n }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\r\n\tpublic ModelAndView login() {\r\n\t\treturn new ModelAndView(\"admin/login\");\r\n\t}", "@RequestMapping(value=\"/\" , method = RequestMethod.GET)\n public ModelAndView welcome_login(){\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n\n UserEntity userEntity= iUserService.findUserByCurrentUserName(currentUserName);\n ModelAndView welcome = new ModelAndView(\"welcome\");\n welcome.getModel().put(\"currentUserName\", currentUserName);\n welcome.getModel().put(\"userEntity\", userEntity);\n\n return welcome;\n }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic String loginPage(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tif (isCurrentAuthenticationAnonymous()) {\r\n\t\t\treturn \"login\";\r\n\t\t} else {\r\n\t\t\treturn \"redirect:/list\";\r\n\t\t}\r\n\t}", "public static Result login() {\n String csrfToken = \"\";\n return serveAsset(\"\");\n }", "@GetMapping(\"login\")\n public String loginForm(Model model){\n model.addAttribute(\"user\", new User());\n return \"login_form\";\n }", "@GetMapping(\"/clients/clientLogin\")\n\tpublic String pageLoginClientGet() {\n\t\tClientController.LOGGER.info(\"La page login client est demandée\");\n\t\treturn \"/clients/clientLogin\";\n\t}", "@Override\n\tpublic ModelAndView handleRequest(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\t\n\t\treturn helloservice.vailData(request, response);\n\t\t\n\t\t\n\t\t/*String name = request.getParameter(\"name\");\n\t\tString pwd = request.getParameter(\"password\");\n\t\tSystem.out.println(\"hello world this is controller\");\n\t\tModelAndView mv = new ModelAndView();\n\t\tif(\"hello\".equals(name) && \"world\".equals(pwd))\n\t\t{\n\t\t\t\n\t\t\tmv.addObject(\"message\", \"Hello World!\");\n\t\t\t\n\t\t\t}else{\n\t\t\t\tmv.addObject(\"message\", \"not users\");\n\t\t\t}\n\t\t\tmv.setViewName(\"hello\");\n\t\treturn mv;*/\n\t}", "public LoginController(LoginForm form) {this.loginForm = form;}", "@GetMapping(\"/login\")\n public ModelAndView goToLogin(Model m) {\n \tModelAndView mav = new ModelAndView(\"home\");\n \treturn mav;\n }", "@RequestMapping(value = { \"/admin/login\" }, method = RequestMethod.GET)\r\n\t public String login(Model model) {\r\n\t return \"login\";\r\n\t }", "@Override\n public Auth call() throws IOException {\n OkHttpClient client = new OkHttpClient();\n client.setFollowRedirects(false);\n client.setFollowSslRedirects(false);\n\n Request initRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .build();\n\n Response initResponse = client.newCall(initRequest).execute();\n String initCookie = initResponse.header(\"Set-Cookie\").split(\";\")[0];\n String initBody = initResponse.body().string();\n String authenticity_token = Jsoup.parse(initBody).body().select(\"[name=authenticity_token]\").val();\n\n // Phase 2 is to authenticate given the cookie and authentication token\n RequestBody loginBody = new FormEncodingBuilder()\n .add(\"utf8\", \"\\u2713\")\n .add(\"authenticity_token\", authenticity_token)\n .add(\"email\", login)\n .add(\"password\", password)\n .add(\"commit\", \"Login\")\n .add(\"referer\", \"https://lobste.rs/\")\n .build();\n Request loginRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .header(\"Cookie\", initCookie) // We must use #header instead of #addHeader\n .post(loginBody)\n .build();\n\n Response loginResponse = client.newCall(loginRequest).execute();\n String loginCookie = loginResponse.header(\"Set-Cookie\").split(\";\")[0];\n\n // Phase 3 is to grab the actual username/email from the settings page\n Request detailsRequest = new Request.Builder()\n .url(\"https://lobste.rs/settings\")\n .header(\"Cookie\", loginCookie)\n .build();\n Response detailsResponse = client.newCall(detailsRequest).execute();\n String detailsHtml = detailsResponse.body().string();\n\n Document dom = Jsoup.parse(detailsHtml);\n String username = dom.select(\"#user_username\").val();\n String email = dom.select(\"#user_email\").val();\n\n // And then we return the result of all three phases\n return new Auth(email, username, loginCookie);\n }", "@RequestMapping(\"/auth\") \r\n\tpublic String redirect(Model model,HttpServletRequest httpRequest) { \r\n\t\t String path = httpRequest.getContextPath();\r\n\t String basePath = httpRequest.getScheme()+\"://\"+httpRequest.getServerName()+\":\"+httpRequest.getServerPort()+path; \r\n\t model.addAttribute(\"base\", basePath);\r\n\t\treturn \"/index/login\"; \r\n\t}", "protected Object formBackingObject( HttpServletRequest request ) throws Exception\n {\n log.info( \"formBackingObject start.\" );\n\n ApplicationProperties appProps = PropertyManager.getApplicationProperties();\n\n LoginForm form = new LoginForm();\n\n if (null == localModel)\n {\n // Session timeout??\n throw new FinanceException( \"Model is null.\" );\n }\n\n// UserTO user = localModel.getUser();\n//\n// if (null == user)\n// {\n// throw new FinanceException( \"User is null.\" );\n// }\n\n\n String userId = localModel.getToLoginAs();\n if (null == userId || \"\".equalsIgnoreCase( userId ))\n {\n //Try and get userid form request params\n userId = request.getParameter( \"id\" );\n }\n\n\n form.setUsername( userId );\n\n form.setLoginURL( appProps.getNewUserPostLoginUrl() );\n\n // get the O2LoginPageUrl. It will be of the format -\n // https://bluedawn.ref.o2.co.uk/login?sendTo=http://dave.o2.co.uk:8080/finance/accountChangeLoginCheck.do\n // We need the sendTo URL in the above value. This will be our return value\n // or\n // if you are using in-memory facade the O2LoginPageUrl value is\n // http://localhost:8080/finance/mocklogin.do?skipreset=true\n // In this case, do nothing \n String rURL = appProps.getO2LoginPageUrl();\n if ( rURL.indexOf( \"mocklogin.do\" ) == -1 )\n {\n \trURL = rURL.substring( ( rURL ).indexOf( \"sendTo\" ) + 7 );\n } \n \n form.setReturnURL( rURL );\n form.setFailureURL( rURL );\n\n\n log.info( \"formBackingObject ends.\" );\n\n return form;\n }", "@GetMapping(\"/login.html\")\n\tpublic ModelAndView getLogin() {\n\t\tModelAndView mv = new ModelAndView(\"Login\");\n\t\treturn mv;\n\t}", "@RequestMapper(value = \"/login\")\r\n\tpublic String execute(String name,String password) {\r\n\t\tlog.info(\"name:{}\",name);\r\n\t\tlog.info(\"password:{}\",password);\r\n\t\treturn \"login\";\r\n\t}", "@PostMapping(value = \"/login\", headers = {\"content-type=application/x-www-form-urlencoded\"})\n\tpublic ResponseEntity<UserDTO> login(WebRequest request){\n\t\t\n\t\tString username = request.getParameter(\"username\");\n\t\tString password = request.getParameter(\"password\");\n\t\t\n\t\tUser user = userService.findByUsername(username);\n\t\tif(user == null) {\n\t\t\t//ovo glumi token i ide u session local storage\n\t\t\treturn new ResponseEntity<UserDTO>(HttpStatus.NOT_FOUND);\n\t\t}else if(user.getPassword().equals(password)) {\n\t\t\treturn new ResponseEntity<UserDTO>(new UserDTO(user), HttpStatus.OK);\n\t\t}else {\n\t\t\treturn new ResponseEntity<UserDTO>(HttpStatus.UNAUTHORIZED);\n\t\t}\n\t\t\n\t\t\n\t}", "private static String doLogin(Request req, Response res) {\n HashMap<String, String> respMap;\n \n res.type(Path.Web.JSON_TYPE);\n \n \n\t String email = Jsoup.parse(req.queryParams(\"email\")).text();\n \n logger.info(\"email from the client = \" + email);\n \n if(email != null && !email.isEmpty()) { \n \n\t server = new SRP6JavascriptServerSessionSHA256(CryptoParams.N_base10, CryptoParams.g_base10);\n\t \t\t\n\t gen = new ChallengeGen(email);\n\t\t\n\t respMap = gen.getChallenge(server);\n \n if(respMap != null) {\n\t\t logger.info(\"JSON RESP SENT TO CLIENT = \" + respMap.toString());\n res.status(200);\n respMap.put(\"code\", \"200\");\n respMap.put(\"status\", \"success\");\n return gson.toJson(respMap);\n }\n }\n respMap = new HashMap<>();\n \n res.status(401);\n respMap.put(\"status\", \"Invalid User Credentials\");\n respMap.put(\"code\", \"401\");\n logger.error(\"getChallenge() return null map most likely due to null B value and Invalid User Credentials\");\n \treturn gson.toJson(respMap);\n}", "public void loginRequest(View view){\n\n callLoginServlet();\n }", "@GetMapping(\"/login\")\n\tpublic String getloginForm(@AuthenticationPrincipal UserDetailsImpl user, HttpServletRequest request) {\n\n\t\tif (user != null) {\n\t\t\t/* If user is already logged in, then send them to headlines page with a flag */\n\t\t\trequest.setAttribute(\"isLoggedIn\", true);\n\t\t\treturn \"forward:/\";\n\t\t}\n\t\treturn \"login\";\n\t}", "public interface UserLoginFacade {\n\n /**\n * 正常登陆接口\n *\n * @param loginParam loginParam\n * @return\n */\n public Result<UserInfoDTO> loginForApp(LoginParam loginParam);\n\n /**\n * 同意协议\n *\n * @param loginParam loginParam\n * @return\n */\n public Result<UserInfoDTO> agreeProtocolForApp(LoginParam loginParam);\n\n /**\n * sam免登陆门店\n *\n * @param userGlobalId\n * @param request\n * @param response\n * @return\n */\n String samAvoidLogin(String userGlobalId, HttpServletRequest request, HttpServletResponse response);\n\n /**\n * 管理后台免登陆门店\n *\n * @param shopId\n * @param request\n * @param response\n * @return\n */\n String legendmAvoidLogin(Long shopId, HttpServletRequest request, HttpServletResponse response);\n\n /**\n * 根据登录账户获取用户信息\n *\n * @param loginAccount\n * @return\n */\n public Result<UserInfoDTO> getUserInfoByLoginAccountForApp(String loginAccount,String password, Long chooseShopId,boolean checkPassword);\n\n /**\n * 二维码登录\n */\n void loginForPCQRCodeLogin(Long shopId, Long userId, String uuid);\n\n /**\n * PC登录\n * @param list\n * @param shopManager\n * @param shop\n * @param response\n */\n void loginForPC(List<FuncF> list,ShopManager shopManager,Shop shop, HttpServletResponse response);\n\n /**\n * 校验登录等级1\n * @param shopId\n * @param userId\n */\n void checkShopLevelOneLogin(Long shopId,Long userId);\n}", "@RequestMapping(value = \"/autorization\", method = RequestMethod.GET)\n public String getLoginForm() {\n System.out.println(\"Fetching the Authorization URL...\");\n final String authorizationUrl = service.getAuthorizationUrl();\n return \"redirect:\" + authorizationUrl;\n }", "@Override\n protected ModelAndView handleRequestInternal(final HttpServletRequest\n request, final HttpServletResponse response) throws Exception {\n log.trace(\"Entering handleRequestInternal\");\n\n ModelAndView mav = new ModelAndView(\"home\");\n\n log.trace(\"Leaving handleRequestInternal\");\n return mav;\n }", "public F.Promise<Result> handleSignIn() {\n final Form<LogIn> filledForm = logInForm.bindFromRequest();\n if (customerService().isLoggedIn()) {\n return asPromise(redirect(controllers.routes.HomeController.home()));\n } else if (filledForm.hasErrors()) {\n flash(\"error\", \"Login form contains missing or invalid data.\");\n return asPromise(badRequest(loginView.render(data().build(), filledForm)));\n } else {\n return handleSignInWithValidForm(filledForm);\n }\n }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n\tpublic String login(Model model) {\n\t\tlogger.debug(\" A user trying to login\");\n\t\treturn \"login\";\n\t}", "@RequestMapping(value = \"/\", method ={RequestMethod.POST,RequestMethod.GET})\n\tpublic String home(HttpServletRequest request, Model model, HttpServletResponse response) {\n\t\t\n\t\t\n\t\t//Variables \n\t\tString cookieName =\"user\";\n\t\tString cookieValue = \"\";//var a obtener\n\t\tString cookie2pass =\"pass\";\n\t\tString cookie2Value = \"\";//var a obener\n\t\tCookie[ ] cookies = request.getCookies( ); //Obtenemos cookies de la peticion\n\t\t\n\t\t\n\t\t//Asignar valor a las cookies\n\t\tif(cookies==null) {\n\t\t\treturn \"home\";\n\t\t}else {\n\t\tfor (Cookie cookie: cookies){\n\t\t\tif (cookieName.equals(cookie.getName())) {\n\t\t\tcookieValue = cookie.getValue();\n\t\t\t//usuario\n\t\t\tif(cookie2pass.equals(cookie.getName())) {\n\t\t\t//contaseña\t\n\t\t\tcookie2Value=cookie.getValue();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Comprobamos si el cookievalue es el del administrador o no\n\t\t\n\t\tif(cookieValue.equals(\"Admin\")&& cookie2Value.equals(\"12345\")) {\n\t\t\t\n\t\t\tList <DTOUsuarios> lista = dao.leeUsuarios();\n\t\t\tmodel.addAttribute(\"lista\", lista);\n\t\t\treturn \"usuario\";\n\t\t\t\n\t\t}else {\n\t\t\t//Si el valor de las cookies no es el anterior significa que el usuario se ha autenticado para acceder a los\n\t\t\t//articulos por ello mostramos articulo.jsp, no hace falta autenticar porque ya lo ha echo antes\n\t\t\t\n\t\t\tList <DTOArticulo> list = daoA.leeArticulo();\n\t\t\tmodel.addAttribute(\"list\", list);\n\t\t\treturn\"articulo\";\n\n\n\t\t\t}\n\t\t\n\t\t\t}\n\t\t\n\t\t\n\t}", "@Action( value=\"loginAction\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/login.jsp\"), \n @Result(name=ERROR, type=\"dispatcher\", location=\"/jsp/login.jsp\") } ) \n public String login() \n {\n \t return SUCCESS; \n }", "public AgentDTO login(String login, String senha);", "public static Result home() {\n Skier loggedInSkier = Session.authenticateSession(request().cookie(COOKIE_NAME));\n if(loggedInSkier==null)\n return redirect(\"/\");\n else\n return renderHome(loggedInSkier);\n }", "@RequestMapping(\"/login.ws\")\n public String loginForm(HttpServletRequest req, Model model) {\n String referer = req.getHeader(\"Referer\");\n String prevPage = (String) req.getSession().getAttribute(\"prevPage\");\n if (prevPage != null) {\n req.getSession().setAttribute(\"prevPage\", referer);\n }\n\n String userId = (String) req.getAttribute(\"userId\");\n model.addAttribute(\"userId\", userId);\n String error = (String) req.getParameter(\"error\");\n if(error != null)\n log.debug(\"error : {}\", error);\n\n return \"auth/login\";\n }", "@GetMapping(\"/login\")\n public String getLogin(Model model)\n {\n return \"login\";\n }", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "public RestAuthenticationSuccessHandler() {\n }", "@POST(\"login\")\n Call<User> login();", "@PostMapping(\"/logincheck\")\n\tpublic String LoginCheck()\n\t{\n\t\treturn \"profile\";\n\t}", "@RequestMapping(path = { \"/secure/login.controller\" })\n\tpublic String handlerMethod(MemberBean bean, BindingResult bindingResult, String login, Model model,\n\t\t\tHttpSession session, Locale locale,HttpServletResponse response,HttpServletRequest request) {\n\n\t\tMap<String, String> errors = new HashMap<String, String>();\n\t\tmodel.addAttribute(\"errors\", errors);\n\t\t// 驗證資料\n\t\tif (login != null && login.equals(\"登出\")) {\n\t\t\tsession.removeAttribute(\"user\");\n\t\t\terrors.put(\"action\", \"登出成功1\");\n\t\t\tsession.setAttribute(\"fail\", \"登出成功\");\n\t\t\tCookie[] cookies = request.getCookies();\n\t\t\tif (cookies != null) {\n\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\tif (cookie.getName().equals(\"aaa\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcookie.setMaxAge(0);\n\t\t\t\t\t\tcookie.setPath(\"/\");\n\t\t\t\t\t\tresponse.addCookie(cookie);\n\t\t\t\t\t\treturn \"redirect:/\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (login != null && login.equals(\"登入\")) {\n\t\t\tMemberBean result = memberService.login(bean);\n\t\t\tMemberBean result2 = memberService.loginok(bean);\n//\t\t\tSystem.out.println(result);\n\t\t\tif (result == null) {\n//\t\t\t\tSystem.out.println(\"XX\");\n//\t\t\t\terrors.put(\"action\", \"登入失敗\");\n\t\t\t\tsession.setAttribute(\"fail\", \"登入失敗\");\n//\t\t\t\tsession.removeAttribute(\"user\");\n\t\t\t} else {\n//\t\t\t\tSystem.out.println(\"OK\");\n//\t\t\t\terrors.put(\"action\", \"login OK \" + \"HI,\" + memberRepository.findMemberName(bean.getAccount()));\n\t\t\t\tmodel.addAttribute(\"login\", result);\n\t\t\t\tsession.setAttribute(\"user\", result2);\n\t\t\t\tString s=result2.getMemberNo().toString();\n\t\t\t\tCookie cookie = new Cookie(\"aaa\",s);\n\t\t\t\tcookie.setPath(\"/\");\n\t\t\t\tresponse.addCookie(cookie);\n\t\t\t\treturn \"redirect:/\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (bean.getAccount() == null || bean.getAccount().length() == 0) {\n//\t\t\t\tsession.setAttribute(\"failaccount\", messageSource.getMessage(\"login.account.required\", null, locale));\n\t\t\t\terrors.put(\"failaccount\", messageSource.getMessage(\"login.account.required\", null, locale));\n\t\t\t}\n\t\t\tif (bean.getPassword() == null || bean.getPassword().length() == 0) {\n//\t\t\t\tsession.setAttribute(\"failpassword\", messageSource.getMessage(\"login.password.required\", null, locale));\n\t\t\t\terrors.put(\"failpassword\", messageSource.getMessage(\"login.password.required\", null, locale));\n\t\t\t}\n\t\t\t\n\n//\t\t\t// 呼叫model\n//\t\t\tMemberBean bean2 = memberService.login(bean);\n//\t\t\t// 根據model執行結果,導向view\n//\t\t\tif (bean == null) {\n//\t\t\t\terrors.put(\"password\", messageSource.getMessage(\"login.fail\", null, locale));\n//\t\t\t\treturn \"/secure/login\";\n//\t\t\t} else {\n//\t\t\t\tsession.setAttribute(\"user\", bean);\n//\t\t\t\treturn \"redirect:/\";\n//\t\t\t}\n\t\t}\n\n\t\treturn \"redirect:\";\n\t}", "@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}", "@RequestMapping(\"/\")\n public String home()\n {\n SecurityContext context = SecurityContextHolder.getContext();\n return \"redirect:swagger-ui.html\";\n }", "public ActionForward ingresarSistema(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception\r\n\t{ \r\n\t\tLoginActionForm frm=(LoginActionForm)form;\r\n\t\tString userName=frm.getTxtUserName().trim();\r\n\t\tString password=frm.getTxtPassword().trim();\r\n\t\t\t\t\r\n\t\ttry{\t\t\t\r\n//\t\t\tUserInfo user=ServiceFactory.getSeguridadService().ingresarSistema(userName, password, request);\r\n//\t\t\t\t\t\t\t\r\n//\t\t\t//si debe cambiar contraseÑa direccionar a cambio de contrase?a\r\n//\t\t\tif(user.isDebeCambiarPwd()){\r\n//\t\t\t\tthis.saveToken(request);\r\n//\t\t\t\treturn cargarCambiarPassword(mapping,form,request,response);\t\t\t\t\t\t\t\t\r\n//\t\t\t}else{//direccionar a pagina principal\r\n//\t\t\t\tif(user.isSugerirCambiarPwd())\r\n//\t\t\t\t\trequest.setAttribute(Constantes.ALERT_MSG,\"Faltan \" \r\n//\t\t\t\t\t\t\t+ user.getExpiracionPwd() + \" días para la expiración de la contraseña.\");\t\t\t\t\r\n\t\t\t\treturn mapping.findForward(\"inicio\");\r\n//\t\t\t}\r\n\t\t}\r\n\t catch(Exception ex){\r\n\t\t\treturn mapping.findForward(\"ingresarSistema\");\r\n\t\t}finally{ \r\n\t\t\tfrm.setTxtPassword(\"\");\r\n\t\t}\t\r\n\r\n\t}", "public String loginAction() throws Exception {\n\t\t\t\t\n\t return \"builder\";\n\t }", "public String accionLogin(){\n\t\t\r\n\t\tlog.info(\"Ingreso hacer login del usuario!!! \");\r\n\t\tString retorno = null;\r\n\t\ttry {\r\n\t\t\tString pass = new CriptPassword().getHashSH1(loginBaking.getUserBean().getPass());\r\n\t\t\tUser u = ejbMangerUser.login(loginBaking.getUserBean().getNick(), pass);\r\n\t\t\tloginBaking.setUserBean(u);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tList<Network> listNetwork = ejbNetwork.listNetwork();\r\n\t\t\tHttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);\r\n\t\t\tsession.setAttribute(\"listaNetwork\", listNetwork);\r\n\t\t\t\r\n\t\t\tretorno = \"site/home\";\r\n\t\t} catch (InSideException ex) {\r\n\t\t\tlog.error(ex.getKeyMSGError());\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage (FacesMessage.SEVERITY_ERROR, \r\n\t\t\t\t\t\tBundleUtil.getMessageResource(ex.getKeyMSGError()), \r\n\t\t\t\t\t\tBundleUtil.getMessageResource(ex.getKeyMSGError())));\r\n\t\t}\r\n\t\tlog.debug(\"Pagina de redireccion --->> \" + retorno);\r\n\t\tlog.info(\"fin de Login!!!\");\r\n\t\treturn retorno;\r\n\t}", "@RequestMapping(\"/loginPage\")\n\tpublic String init(HttpServletRequest request) {\n\t\treturn \"login\";\n\t}", "@GetMapping(\"/login\")\n\tpublic boolean login(HttpServletRequest request) {\n\t\t//Implement logic to authenticate and set authenticated user object in session , setting \n\t\t\n\t\tUserInfo user = new UserInfo(\"yogesh\", \"admin\");\n\t\tHttpSession session = request.getSession(true);\n\t\tsession.setAttribute(\"authUser\",user);\n\t\treturn true;\n\t\t\n\t}", "@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }", "@GetMapping(\"/index\")\n\tpublic String telaLogin() {\n\t\treturn \"/telas/index\";\n\t}", "@CrossOrigin(origins = AppConstants.CORS)\n\t@RequestMapping(value = {UrlConstants.API_LOGIN_AUTHENTICATE+\"org\"}, method = RequestMethod.POST)\n\tpublic @ResponseBody ResponseDTO authenticate(@RequestBody LoginDTO loginDTO, BindingResult result) {\n\t\tResponseDTO responseDTO = null;\n\t\ttry { \n\t\t\tif(result.hasErrors()){\n\t\t\t\tresponseDTO = new ResponseDTO();\n\t\t\t\tresponseDTO.setErrorCode(300);\n\t\t\t\tresponseDTO = ResponseWriter.writeResponse(responseDTO);\n\t\t\t} else {\n\t\t\t\t//responseDTO = loginService.authenticate(loginDTO);\n\t\t\t\tlogger.info(\"here\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponseDTO = ResponseWriter.writeResponse(e.getCause(), e);\n\t\t\tlogger.error(\"error\",e);\n\t\t} \n\t\treturn responseDTO;\n\t}", "@RequestMapping(value = \"/form\", method = RequestMethod.GET)\n public String getLogin(Model model, HttpSession session)\n {\n RootContextConfig.message.info(\"\\n\\nUrl: /formn\\n\\n\");\n model.addAttribute(\"loginDto\", new LoginDto());\n return \"login/session\";\n }" ]
[ "0.767392", "0.692989", "0.692088", "0.6830953", "0.67813784", "0.67617863", "0.66520184", "0.659762", "0.65492433", "0.6535658", "0.651978", "0.6495898", "0.64938456", "0.64775246", "0.64725196", "0.64549094", "0.64531815", "0.6452639", "0.6451184", "0.64335203", "0.6422933", "0.64106876", "0.63912964", "0.6390689", "0.63894445", "0.63814926", "0.63765424", "0.63306165", "0.6322421", "0.6309655", "0.6305759", "0.630162", "0.62880933", "0.62731177", "0.6264442", "0.623737", "0.6231969", "0.6212568", "0.61811405", "0.6163971", "0.6153541", "0.6136045", "0.6133263", "0.61289066", "0.61274505", "0.61146533", "0.6109383", "0.6100501", "0.6079626", "0.606892", "0.604085", "0.602959", "0.602473", "0.6013995", "0.60115814", "0.60110337", "0.6008442", "0.60072714", "0.59917575", "0.5986288", "0.5975734", "0.5969698", "0.5967062", "0.5964694", "0.5958899", "0.5955721", "0.595446", "0.59544414", "0.5932813", "0.59289634", "0.5924921", "0.5923808", "0.59234893", "0.5915524", "0.59133035", "0.59130335", "0.5910619", "0.5902667", "0.58982915", "0.5896673", "0.589461", "0.5893556", "0.5890239", "0.58862174", "0.58794767", "0.58761305", "0.587449", "0.58707356", "0.5870626", "0.58653593", "0.586528", "0.5857288", "0.58537674", "0.58497673", "0.58346546", "0.5832139", "0.5831412", "0.5825145", "0.5819086", "0.58141124" ]
0.7579392
1
return new LoginProxy().home(mapping, form, request, response);
private ActionForward autorizar(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { return new LoginProxy().loginHome(mapping, form, request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ActionForward home(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\treturn new LoginProxy().loginHome(mapping, form, request, response);\n\t}", "protected Response login() {\n return login(\"\");\n }", "Login.Req getLoginReq();", "@GetMapping(value={\"/login\"})\n public String login(){\n return \"login\";\n }", "@RequestMapping(value=\"/loginForm\", method = RequestMethod.GET)\n\tpublic String home(){\n\n\t\treturn \"loginForm\";\n\t}", "private void userLogin(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "RequestResult loginRequest() throws Exception;", "@RequestMapping(value=\"/loginForm\", method = RequestMethod.POST)\n\tpublic String homePOST(){\n\n\t\treturn \"loginForm\";\n\t}", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n\tpublic String loginForm() {\n\t\treturn \"login\";\n\t}", "private CoprocessObject.Object doForwardToLogin(CoprocessObject.Object.Builder builder) {\n\t\tReturnOverrides retOverrides = builder.getRequestBuilder()\n\t\t\t\t.getReturnOverridesBuilder()\n\t\t\t\t.setResponseCode(301)\n\t\t\t\t.putHeaders(HTTP_HEADER_LOCATION, loginUrl)\n\t\t\t\t.build();\n\t\t\n\t\t MiniRequestObject miniReq = builder.getRequestBuilder().setReturnOverrides(retOverrides).build();\n\t\t return builder.setRequest(miniReq).build();\n\t}", "@Override\r\n\tpublic void login() {\n\r\n\t}", "@GetMapping(\"/api/v1/login\")\n public String login() {\n return \"Success\";\n }", "private static void getLoginPage() throws IOException {\n get(\"/login\", (request, response) -> {\n Map<String, Object> attributes = new HashMap<>();\n attributes.put(\"title\", \"Login\");\n\n return SessionModelAndView.create(request.session(), attributes, \"index.jade\");\n }, new JadeEngine());\n }", "@GetMapping(\"/loginForm\")\n\t\tpublic String login() {\n\t\t\treturn\"user/loginForm\";\n\t\t}", "@Override\r\n\tpublic ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\tHomeForm homeForm = (HomeForm) form;\r\n\t\tUserBO userBO = new UserBO();\r\n\t\t\r\n\t\t\r\n\t\tString username = homeForm.getUsername();\r\n\t\tString password = homeForm.getPassword();\r\n\t\t\r\n\t\tUser user = new User();\r\n\t\tuser.setUsername(username);\r\n\t\tuser.setPassword(password);\r\n\t\t\r\n\t\t// get cookie theo mang\r\n\t\tMyCookie myCookie=new MyCookie(request, response);\r\n\t\tString statusLogin = myCookie.getCookie(\"statusLogin\");\r\n\t\t\r\n\t\tif(\"notLogin\".equals(statusLogin)||\"fail\".equals(statusLogin)){\r\n\t\t\t//chua dang nhap\r\n\t\t\tif(userBO.isUser(user)){\r\n\t\t\t\t//dang nhap thanh cong\r\n\t\t\t\tmyCookie.setCookie(\"statusLogin\", \"login\");\r\n\t\t\t\tmyCookie.setCookie(\"userId\", userBO.getOneUserByName(username).getUserId()+\"\");\r\n\t\t\t}else{\r\n\t\t\t\t//dang nhap that bai\r\n\t\t\t\tmyCookie.setCookie(\"statusLogin\", \"fail\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn mapping.findForward(\"thanhCong\");\r\n\t}", "@GetMapping(\"/login\")\n public String viewLoginPage() {\n\n return \"login/login\";\n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws Exception {\r\n\t\tif(request.getParameter(\"action\").equals(\"toLoginPage\")){\r\n\t\treturn mapping.findForward(\"toLoginPage\");\t\t\r\n\t\t}\r\n\t\tif(request.getParameter(\"action\").equals(\"login\")){\r\n\t\t\tBoNodeService boNodeService = (BoNodeService)ServiceFactory.instance().getService(\"boNodeService\");\t\t\t\t\r\n\t\t\trequest.getSession().setAttribute(\"selectedNodeId\", \"11\");\t\t\t\r\n\t\t\tList nodeFatherRootList = boNodeService.getNodeFatherRoot();\r\n\t\t\tList nodeChildList = boNodeService.getNodeChildByPid(request.getSession().getAttribute(\"selectedNodeId\").toString());\r\n\t\t\trequest.getSession().setAttribute(\"nodeFatherRootList\", nodeFatherRootList);\r\n\t\t\trequest.getSession().setAttribute(\"nodeChildList\", nodeChildList);\r\n\t\t\t\r\n\t\t\treturn mapping.findForward(\"toFramePage\");\t\t\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private static void postLoginPage() {\n post(\"/login\", \"application/json\", (req, res) -> {\n HomerAccount loggedInAccount = homerAuth.login(req.body());\n if(loggedInAccount != null) {\n req.session().attribute(\"account\", loggedInAccount);\n res.redirect(\"/team\");\n } else {\n res.redirect(\"/login\");\n }\n return null;\n });\n }", "@Public\n\t@Get(\"/login\")\n\tpublic void login() {\n\t\tif (userSession.isLogged()) {\n\t\t\tresult.redirectTo(HomeController.class).home();\n\t\t}\n\t}", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n\tpublic String login() {\n\t\treturn \"login\";\n\t}", "public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n\n // Create the object that holds the fields from the login page.\n LoginForm validateLogin = (LoginForm) form;\n // Used to define the page to be forwarded to.\n ActionForward findForward = mapping.findForward(\"welcome\");\n User user = new User();\n user.loadFile();\n access = user.compare(validateLogin);\n // If login credentials are valid continue otherwise return to the login page.\n if (access) {\n findForward = mapping.findForward(\"loggedIn\");\n } else {\n findForward = mapping.findForward(\"login\");\n } \n return findForward;\n }", "@RequestMapping(value={\"/login\"})\r\n\tpublic String login(HttpServletRequest request, HttpServletResponse response){\n\t\tLoginDAO dao = new LoginDAO();\r\n\t\tString userDefaultAdmin = \"lider\";\r\n\t\tString passwordDefaultAdmin = dao.read(\"lider\").getSenha();\t\t//\"admin\";\r\n\t\t\r\n\t\tString userDefaultMembro = \"membro\";\r\n\t\tString passwordDefaultMembro = dao.read(\"membro\").getSenha();\t//\"membro\";\r\n\t\t\r\n\t\tString usuario = request.getParameter(\"usuario\");\r\n\t\tString senha = request.getParameter(\"senha\");\r\n\t\t\r\n\t\tString usuario2 = request.getParameter(\"usuario2\");\r\n\t\tString senha2 = request.getParameter(\"senha2\");\r\n\t\t\r\n\t\t//verifica mobile\r\n\t\tif(usuario2 != null && !usuario2.isEmpty() && senha2 != null && !senha2.isEmpty()){\r\n\t\t\tusuario = usuario2;\r\n\t\t\tsenha = senha2;\r\n\t\t}\r\n\t\t//valida usuario e senha padrao do sistema\r\n\t\tif(usuario != null && senha != null){\r\n\t\t\tif(usuario.equalsIgnoreCase(userDefaultAdmin) && senha.equals(passwordDefaultAdmin)){\r\n\t\t\t\tlog.info(\"Login ok - Usuario admin lider logado!\");\t\t\t\t\r\n\t\t\t\tMembroUserWeb membroSession = new MembroUserWeb();\t\t\t\t\t\t\t\t//objeto usuario membro acesso\r\n\t\t\t\tmembroSession.setAcesso(TipoAcessoLogin.LIDER_ACESSO);\t\t\t\t\t\t\t//tipo acesso\r\n\t\t\t\trequest.getSession().setAttribute(MembroUserWeb.MEMBRO_SESSION, membroSession);\t//set objeto na session\t\t\t\r\n\t\t\t\treturn \"redirect:/home.jsp\";\t\t\t//redireciona para action /home\r\n\t\t\t\t\r\n\t\t\t}else if(usuario.equalsIgnoreCase(userDefaultMembro) && senha.equals(passwordDefaultMembro)){\r\n\t\t\t\tlog.info(\"Login ok - Usuario membro logado!\");\r\n\t\t\t\tMembroUserWeb membroSession = new MembroUserWeb();\t\t\t\t\t\t\t\t//objeto usuario membro acesso\r\n\t\t\t\tmembroSession.setAcesso(TipoAcessoLogin.MEMBRO_ACESSO);\t\t\t\t\t\t\t//tipo acesso\r\n\t\t\t\trequest.getSession().setAttribute(MembroUserWeb.MEMBRO_SESSION, membroSession);\t//set objeto na session\r\n\t\t\t\treturn \"redirect:/home.jsp\";\t\t\t//redireciona para action /home\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tlog.warn(\"Erro login - usuario ou senha invalidos!\");\r\n\t\t\t\treturn \"redirect:/index.html?error=login\";\t//redireciona para tela login informando erro de login\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tlog.warn(\"Erro login - usuario ou senha invalidos!\");\r\n\t\t\treturn \"redirect:/index.html?error=login\";\t\t//redireciona para tela login informando erro de login\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "@GetMapping(\"/loginpage\")\n public String viewLoginPage() {\n return \"loginpage\";\n }", "@RequestMapping(\"login\")\r\n\tpublic String loginUser() {\n\t\treturn \"login\";\r\n\t}", "public static Result login(){\n String username= Form.form().bindFromRequest().get(\"username\");\n String password= Form.form().bindFromRequest().get(\"password\");\n String new_user= Form.form().bindFromRequest().get(\"new_user\");\n if(new_user != null){\n return ok(login.render(username,password));\n } else {\n Skier s=Session.authenticate(username,password);\n if(s==null){\n return badRequest(index.render(\"Invalid Username or Password\"));\n } else {\n login(s);\n return redirect(\"/home\");\n }\n }\n }", "@Override\n String execute(HttpServletRequest request, HttpServletResponse response) throws LegohusException {\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n User user = LogicFacade.login(email, password);\n HttpSession session = request.getSession();\n session.setAttribute(\"user\", user);\n \n return \"WEB-INF/\" + user.getRole() + \"page\";\n }", "public void authenticate(LoginRequest loginRequest) {\n\n }", "Login() { \n }", "void redirectToLogin();", "@RequestMapping(value = \"/newlogin\")\r\n\tpublic String dispatchTodefaultEntryPoint() {\r\n\t\tlogger.entry();\r\n\r\n\t\tsaveUserLoginInformation();\r\n\r\n\t\t// String defaultHome = \"redirect:/home\";\r\n\r\n\t\t// if (Utils.isUserInRole(getInternalUserRoles())) {\r\n\t\t//\r\n\t\t// } else {\r\n\t\t// throw new AccessDeniedException(\"User Role not found\");\r\n\t\t// }\r\n\r\n\t\tString homePage = \"forward:/\" + getHomePageByRole();\r\n\r\n\t\tlogger.exit();\r\n\r\n\t\treturn homePage;\r\n\t}", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n public ModelAndView login() {\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.setViewName(\"user/login\");\n return modelAndView;\n }", "protected void login() {\n\t\t\r\n\t}", "@RequestMapping(\"/\")\r\n\t//public CredentialConfiguration index() {\r\n\t\r\n\tpublic Map index() {\r\n\t\t\r\n\t\t\r\n\t\tMap data=new HashMap();\r\n\t\t\r\n\t\tdata.put(\"username\",cred.getUserName());\r\n\t\tdata.put(\"password\",cred.getPassword());\r\n\t\tdata.put(\"screteQuestion\",cred.getScreteQuestion());\r\n\t\tdata.put(\"screteAnswer\",cred.getScreteAnswer());\r\n\t\treturn data;\r\n\t}", "@Override\n\tpublic ActionResult login(PortalForm form, HttpServletRequest request) throws SQLException {\n\t\treturn null;\n\t}", "com.bingo.server.msg.REQ.LoginRequest getLogin();", "@RequestMapping(\"/login\")\n\tpublic String login() {\n\t\tconfig.output();\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tif (auth instanceof AnonymousAuthenticationToken) {\n\t\t\treturn \"login\";\n\t\t} else {\n\t\t\treturn \"home\"; \n\t\t}\n\t}", "@Override\n\tpublic void goToLogin() {\n\t\t\n\t}", "public ActionForward displayLogin(ActionMapping mapping,\n\t\t\tActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tlogger.info(\" Started...\");\n\t\tlogger.info(\" successful redirected to : displayLogin\");\n\t\tlogger.info(\" Executed... \");\n\t\treturn mapping.findForward(DISPLAY_LOGIN);\n\t}", "@RequestMapping(\"callproj\")\r\n\t\r\n\tpublic String Home()\r\n\t{\n\t\treturn \"Home\";//register.jsp==form action=register\r\n\t}", "private void loginHandler(RoutingContext context) {\n JsonObject creds = new JsonObject()\n .put(\"username\", context.getBodyAsJson().getString(\"username\"))\n .put(\"password\", context.getBodyAsJson().getString(\"password\"));\n\n // TODO : Authentication\n context.response().setStatusCode(500).end();\n }", "@RequestMapping(value = \"/login\", method = GET)\r\n\tpublic String login() {\r\n\t\treturn \"admin/login\";\r\n\t}", "@GetMapping(\"/login-success\")\n public ModelAndView loginSuccess(){\n return new ModelAndView(\"index\");\n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\r\n\t\tresponse.setContentType(\"application/json;charset=utf-8\");\r\n\t\tresponse.setHeader(\"pragme\", \"no-cache\");\r\n\t\tresponse.setHeader(\"Access-Control-Allow-Credentials\", \"true\");\r\n\t\tresponse.setHeader(\"Access-Control-Allow-Origin\", request.getHeader(\"Origin\"));\r\n\t\tPrintWriter out = null;\r\n\t\t\r\n\t\tRMessage rmsg = new RMessage();\r\n\t\ttry{\r\n\t\t\tout = response.getWriter();\r\n\t\t\t\r\n\t\t\t//获取用户的session,判断用户的登录状态\r\n\t\t\tHttpSession session = request.getSession();\r\n\t\t\tint uid = session.getAttribute(\"uid\")==null?-1:(Integer)session.getAttribute(\"uid\");\r\n\t\t\t\r\n\t\t\tif (uid == -1){\r\n\t\t\t\trmsg.setStatus(300);\r\n\t\t\t\trmsg.setMessage(\"请先登录!\");\r\n\t\t\t\tout.write(RMessage.getJson(rmsg));;\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//根据URL获取username\r\n\t\t\tString url = request.getRequestURL().toString();\r\n\t\t\tString username = url.substring(url.lastIndexOf(\"/\")+1, url.lastIndexOf(\".\"));\r\n\t\t\tUserView uv = UserView.getUserInfo(username);\r\n\t\t\t//如果用户不存在\r\n\t\t\tif(uv == null || uv.getUid() != uid){\r\n\t\t\t\trmsg.setStatus(300);\r\n\t\t\t\trmsg.setMessage(\"用户不存在!\");\r\n\t\t\t\tout.write(RMessage.getJson(rmsg));\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//设置返回信息\r\n\t\t\tData data = new Data();\r\n\t\t\tdata.put(\"uid\",uv.getUid());\r\n\t\t\tdata.put(\"username\", uv.getUsr());\r\n\t\t\tdata.put(\"nickname\", uv.getNick());\r\n//\t\t\tdata.put(\"avator\", uv.getAvator());\r\n\t\t\tdata.put(\"sign\", uv.getSign());\r\n\t\t\tdata.put(\"coin\", uv.getCoin());\r\n\t\t\tdata.put(\"mail\", uv.getMail());\r\n\t\t\tdata.put(\"phone\", uv.getPhone());\r\n\t\t\tdata.put(\"qq\", uv.getQq());\r\n\t\t\tdata.put(\"xname\", uv.getXname());\r\n\t\t\tdata.put(\"mname\", uv.getMname());\r\n\t\t\tdata.put(\"auth\", uv.getAuth());\r\n\t\t\tdata.put(\"status\", uv.getStatus());\r\n\t\t\tdata.put(\"uploadcount\", uv.getUpcnt());\r\n\t\t\tdata.put(\"downloadcount\", uv.getDncnt());\r\n\t\t\tdata.put(\"collectcount\",uv.getColcnt());\r\n\t\t\t\r\n\t\t\trmsg.setStatus(200);\r\n\t\t\trmsg.setMessage(\"OK\");\r\n\t\t\trmsg.setData(data);\r\n\t\t\tout.write(RMessage.getJson(rmsg));\r\n\t\t\t\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\trmsg.setStatus(300);\r\n\t\t\trmsg.setMessage(e.getCause().toString());\r\n\t\t\tout.write(RMessage.getJson(rmsg));\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tout.flush();\r\n\t\t\tout.close();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@GET(\"/login\")\n Call<LoginResponse> loginRequest(@Path(\"username\") String username\n , @Path(\"password\") String password);", "@Override\n\tpublic String login_request() {\n\t\treturn null;\n\t}", "public Page_Home doDefaultLogin() {\n\t\tLogStatus.info(\"Logging in with username :: \\'\" + TestUtils.getValue(\"username\") + \"\\' and password :: \\'\"\n\t\t\t\t+ TestUtils.getValue(\"password\") + \"\\'\");\n\t\tDriverManager.getDriver().findElement(By.name(\"username\")).sendKeys(TestUtils.getValue(\"username\"));\n\t\tDriverManager.getDriver().findElement(By.name(\"password\")).sendKeys(TestUtils.getValue(\"password\"));\n\t\tDriverManager.getDriver().findElement(By.id(\"Registration Desk\")).click();\n\t\tDriverManager.getDriver().findElement(By.id(\"loginButton\")).click();\n\n\t\treturn new Page_Home();\n\n\t}", "@RequestMapping(\"/login\")\r\n\tpublic ModelAndView validate(HttpServletRequest request,HttpServletResponse response)\r\n\t{\r\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(ConfigClass.class);\r\n\t //\t Login log=context.getBean(Login.class);\r\n\t \tLoginService lser=context.getBean(LoginService.class);\r\n\t\tLoginService2 v=new LoginService2();\r\n\t\tModelAndView mv= new ModelAndView();\r\n\t\t/*log=lser.retrieveLogin(request.getParameter(\"username\"));\r\n\t\tString name=log.getName();\r\n\t\tString pass=log.getPassword();\r\n\t\t*/\r\n\t\tString name= request.getParameter(\"username\");\r\n\t\tString pass= request.getParameter(\"password\");\r\n\t\tif(v.validateLogin(name, pass))\r\n\t\t\tmv.setViewName(\"success\");\r\n\t\telse\r\n\t\t\tmv.setViewName(\"fail\");\r\n\t\treturn mv;\r\n\t}", "@GET\n @Path(\"/re\")\n public Response relogin() {\n return this.login();\n }", "@Override\n public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n LoginForm formBean=(LoginForm)form;\n UserService ser = new UserService();\n \n String name = formBean.getUser();\n String pass = formBean.getPass();\n \n if ((name == null) || pass == null || name.equals(\"\") || pass.equals(\"\")) { \n if(ser.Validate(formBean)==false){\n formBean.setError();\n return mapping.findForward(FAILURE);\n }\n \n }\n\n return mapping.findForward(SUCCESS);\n \n }", "public Resolution login() {\r\n\t\tif (loginUrl != null && loginUrl.indexOf(\"/action/login\") < 0) {\r\n\t\t\treturn new RedirectResolution(loginUrl, false);\r\n\t\t} else {\r\n\t\t\treturn new RedirectResolution(UserActionBean.class);\r\n\t\t}\r\n\t}", "@RequestMapping(value=\"/login/{username}/{password}\")\n @ResponseBody\n public boolean login(@PathVariable String username, @PathVariable String password){\n return customUserDetailsService.login(username, password);\n\n }", "@GetMapping(\"/user\")\n public User login(@RequestParam String username, @RequestParam String password) { return userDataTierConnection.login(username,password); }", "protected void service(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String login = request.getParameter(\"login\");\n String senha = request.getParameter(\"senha\");\n UsuarioDAO dao = new UsuarioDAO();\n if (dao.checkLogin(login, senha)) {\n HttpSession session = request.getSession(true);\n session.setAttribute(\"login\", login);\n Cookie[] cookies = request.getCookies();\n Cookie cookie = null;\n for (int i = 0; cookies != null && i < cookies.length; i++) {\n Cookie c = cookies[i];\n if (c.getName().equals(\"myapp.login\")) {\n cookie = c;\n cookie.setValue(cookie.getValue().replace(\"@\" + login, \"\"));\n cookie.setValue(cookie.getValue().replace(login + \"@\", \"\"));\n cookie.setValue(login + \"@\" + cookie.getValue());\n break;\n }\n }\n if (cookie == null) {\n cookie = new Cookie(\"myapp.login\", login);\n }\n cookie.setMaxAge(Integer.MAX_VALUE);\n response.addCookie(cookie);\n RequestDispatcher rd = request.getRequestDispatcher(\"WEB-INF/TheGame.jsp\");\n rd.forward(request, response);\n } else {\n request.setAttribute(\"msg\", \"<span class=\\\"alert label\\\">Login ou senha inválida</span>\");\n RequestDispatcher rd = request.getRequestDispatcher(\"index.jsp\");\n rd.forward(request, response);\n }\n }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\r\n\tpublic ModelAndView login() {\r\n\t\treturn new ModelAndView(\"admin/login\");\r\n\t}", "@RequestMapping(value=\"/\" , method = RequestMethod.GET)\n public ModelAndView welcome_login(){\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n\n UserEntity userEntity= iUserService.findUserByCurrentUserName(currentUserName);\n ModelAndView welcome = new ModelAndView(\"welcome\");\n welcome.getModel().put(\"currentUserName\", currentUserName);\n welcome.getModel().put(\"userEntity\", userEntity);\n\n return welcome;\n }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic String loginPage(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tif (isCurrentAuthenticationAnonymous()) {\r\n\t\t\treturn \"login\";\r\n\t\t} else {\r\n\t\t\treturn \"redirect:/list\";\r\n\t\t}\r\n\t}", "public static Result login() {\n String csrfToken = \"\";\n return serveAsset(\"\");\n }", "@GetMapping(\"login\")\n public String loginForm(Model model){\n model.addAttribute(\"user\", new User());\n return \"login_form\";\n }", "@GetMapping(\"/clients/clientLogin\")\n\tpublic String pageLoginClientGet() {\n\t\tClientController.LOGGER.info(\"La page login client est demandée\");\n\t\treturn \"/clients/clientLogin\";\n\t}", "@Override\n\tpublic ModelAndView handleRequest(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\t\n\t\treturn helloservice.vailData(request, response);\n\t\t\n\t\t\n\t\t/*String name = request.getParameter(\"name\");\n\t\tString pwd = request.getParameter(\"password\");\n\t\tSystem.out.println(\"hello world this is controller\");\n\t\tModelAndView mv = new ModelAndView();\n\t\tif(\"hello\".equals(name) && \"world\".equals(pwd))\n\t\t{\n\t\t\t\n\t\t\tmv.addObject(\"message\", \"Hello World!\");\n\t\t\t\n\t\t\t}else{\n\t\t\t\tmv.addObject(\"message\", \"not users\");\n\t\t\t}\n\t\t\tmv.setViewName(\"hello\");\n\t\treturn mv;*/\n\t}", "public LoginController(LoginForm form) {this.loginForm = form;}", "@GetMapping(\"/login\")\n public ModelAndView goToLogin(Model m) {\n \tModelAndView mav = new ModelAndView(\"home\");\n \treturn mav;\n }", "@RequestMapping(value = { \"/admin/login\" }, method = RequestMethod.GET)\r\n\t public String login(Model model) {\r\n\t return \"login\";\r\n\t }", "@Override\n public Auth call() throws IOException {\n OkHttpClient client = new OkHttpClient();\n client.setFollowRedirects(false);\n client.setFollowSslRedirects(false);\n\n Request initRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .build();\n\n Response initResponse = client.newCall(initRequest).execute();\n String initCookie = initResponse.header(\"Set-Cookie\").split(\";\")[0];\n String initBody = initResponse.body().string();\n String authenticity_token = Jsoup.parse(initBody).body().select(\"[name=authenticity_token]\").val();\n\n // Phase 2 is to authenticate given the cookie and authentication token\n RequestBody loginBody = new FormEncodingBuilder()\n .add(\"utf8\", \"\\u2713\")\n .add(\"authenticity_token\", authenticity_token)\n .add(\"email\", login)\n .add(\"password\", password)\n .add(\"commit\", \"Login\")\n .add(\"referer\", \"https://lobste.rs/\")\n .build();\n Request loginRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .header(\"Cookie\", initCookie) // We must use #header instead of #addHeader\n .post(loginBody)\n .build();\n\n Response loginResponse = client.newCall(loginRequest).execute();\n String loginCookie = loginResponse.header(\"Set-Cookie\").split(\";\")[0];\n\n // Phase 3 is to grab the actual username/email from the settings page\n Request detailsRequest = new Request.Builder()\n .url(\"https://lobste.rs/settings\")\n .header(\"Cookie\", loginCookie)\n .build();\n Response detailsResponse = client.newCall(detailsRequest).execute();\n String detailsHtml = detailsResponse.body().string();\n\n Document dom = Jsoup.parse(detailsHtml);\n String username = dom.select(\"#user_username\").val();\n String email = dom.select(\"#user_email\").val();\n\n // And then we return the result of all three phases\n return new Auth(email, username, loginCookie);\n }", "@RequestMapping(\"/auth\") \r\n\tpublic String redirect(Model model,HttpServletRequest httpRequest) { \r\n\t\t String path = httpRequest.getContextPath();\r\n\t String basePath = httpRequest.getScheme()+\"://\"+httpRequest.getServerName()+\":\"+httpRequest.getServerPort()+path; \r\n\t model.addAttribute(\"base\", basePath);\r\n\t\treturn \"/index/login\"; \r\n\t}", "protected Object formBackingObject( HttpServletRequest request ) throws Exception\n {\n log.info( \"formBackingObject start.\" );\n\n ApplicationProperties appProps = PropertyManager.getApplicationProperties();\n\n LoginForm form = new LoginForm();\n\n if (null == localModel)\n {\n // Session timeout??\n throw new FinanceException( \"Model is null.\" );\n }\n\n// UserTO user = localModel.getUser();\n//\n// if (null == user)\n// {\n// throw new FinanceException( \"User is null.\" );\n// }\n\n\n String userId = localModel.getToLoginAs();\n if (null == userId || \"\".equalsIgnoreCase( userId ))\n {\n //Try and get userid form request params\n userId = request.getParameter( \"id\" );\n }\n\n\n form.setUsername( userId );\n\n form.setLoginURL( appProps.getNewUserPostLoginUrl() );\n\n // get the O2LoginPageUrl. It will be of the format -\n // https://bluedawn.ref.o2.co.uk/login?sendTo=http://dave.o2.co.uk:8080/finance/accountChangeLoginCheck.do\n // We need the sendTo URL in the above value. This will be our return value\n // or\n // if you are using in-memory facade the O2LoginPageUrl value is\n // http://localhost:8080/finance/mocklogin.do?skipreset=true\n // In this case, do nothing \n String rURL = appProps.getO2LoginPageUrl();\n if ( rURL.indexOf( \"mocklogin.do\" ) == -1 )\n {\n \trURL = rURL.substring( ( rURL ).indexOf( \"sendTo\" ) + 7 );\n } \n \n form.setReturnURL( rURL );\n form.setFailureURL( rURL );\n\n\n log.info( \"formBackingObject ends.\" );\n\n return form;\n }", "@GetMapping(\"/login.html\")\n\tpublic ModelAndView getLogin() {\n\t\tModelAndView mv = new ModelAndView(\"Login\");\n\t\treturn mv;\n\t}", "@RequestMapper(value = \"/login\")\r\n\tpublic String execute(String name,String password) {\r\n\t\tlog.info(\"name:{}\",name);\r\n\t\tlog.info(\"password:{}\",password);\r\n\t\treturn \"login\";\r\n\t}", "@PostMapping(value = \"/login\", headers = {\"content-type=application/x-www-form-urlencoded\"})\n\tpublic ResponseEntity<UserDTO> login(WebRequest request){\n\t\t\n\t\tString username = request.getParameter(\"username\");\n\t\tString password = request.getParameter(\"password\");\n\t\t\n\t\tUser user = userService.findByUsername(username);\n\t\tif(user == null) {\n\t\t\t//ovo glumi token i ide u session local storage\n\t\t\treturn new ResponseEntity<UserDTO>(HttpStatus.NOT_FOUND);\n\t\t}else if(user.getPassword().equals(password)) {\n\t\t\treturn new ResponseEntity<UserDTO>(new UserDTO(user), HttpStatus.OK);\n\t\t}else {\n\t\t\treturn new ResponseEntity<UserDTO>(HttpStatus.UNAUTHORIZED);\n\t\t}\n\t\t\n\t\t\n\t}", "private static String doLogin(Request req, Response res) {\n HashMap<String, String> respMap;\n \n res.type(Path.Web.JSON_TYPE);\n \n \n\t String email = Jsoup.parse(req.queryParams(\"email\")).text();\n \n logger.info(\"email from the client = \" + email);\n \n if(email != null && !email.isEmpty()) { \n \n\t server = new SRP6JavascriptServerSessionSHA256(CryptoParams.N_base10, CryptoParams.g_base10);\n\t \t\t\n\t gen = new ChallengeGen(email);\n\t\t\n\t respMap = gen.getChallenge(server);\n \n if(respMap != null) {\n\t\t logger.info(\"JSON RESP SENT TO CLIENT = \" + respMap.toString());\n res.status(200);\n respMap.put(\"code\", \"200\");\n respMap.put(\"status\", \"success\");\n return gson.toJson(respMap);\n }\n }\n respMap = new HashMap<>();\n \n res.status(401);\n respMap.put(\"status\", \"Invalid User Credentials\");\n respMap.put(\"code\", \"401\");\n logger.error(\"getChallenge() return null map most likely due to null B value and Invalid User Credentials\");\n \treturn gson.toJson(respMap);\n}", "public void loginRequest(View view){\n\n callLoginServlet();\n }", "@GetMapping(\"/login\")\n\tpublic String getloginForm(@AuthenticationPrincipal UserDetailsImpl user, HttpServletRequest request) {\n\n\t\tif (user != null) {\n\t\t\t/* If user is already logged in, then send them to headlines page with a flag */\n\t\t\trequest.setAttribute(\"isLoggedIn\", true);\n\t\t\treturn \"forward:/\";\n\t\t}\n\t\treturn \"login\";\n\t}", "public interface UserLoginFacade {\n\n /**\n * 正常登陆接口\n *\n * @param loginParam loginParam\n * @return\n */\n public Result<UserInfoDTO> loginForApp(LoginParam loginParam);\n\n /**\n * 同意协议\n *\n * @param loginParam loginParam\n * @return\n */\n public Result<UserInfoDTO> agreeProtocolForApp(LoginParam loginParam);\n\n /**\n * sam免登陆门店\n *\n * @param userGlobalId\n * @param request\n * @param response\n * @return\n */\n String samAvoidLogin(String userGlobalId, HttpServletRequest request, HttpServletResponse response);\n\n /**\n * 管理后台免登陆门店\n *\n * @param shopId\n * @param request\n * @param response\n * @return\n */\n String legendmAvoidLogin(Long shopId, HttpServletRequest request, HttpServletResponse response);\n\n /**\n * 根据登录账户获取用户信息\n *\n * @param loginAccount\n * @return\n */\n public Result<UserInfoDTO> getUserInfoByLoginAccountForApp(String loginAccount,String password, Long chooseShopId,boolean checkPassword);\n\n /**\n * 二维码登录\n */\n void loginForPCQRCodeLogin(Long shopId, Long userId, String uuid);\n\n /**\n * PC登录\n * @param list\n * @param shopManager\n * @param shop\n * @param response\n */\n void loginForPC(List<FuncF> list,ShopManager shopManager,Shop shop, HttpServletResponse response);\n\n /**\n * 校验登录等级1\n * @param shopId\n * @param userId\n */\n void checkShopLevelOneLogin(Long shopId,Long userId);\n}", "@RequestMapping(value = \"/autorization\", method = RequestMethod.GET)\n public String getLoginForm() {\n System.out.println(\"Fetching the Authorization URL...\");\n final String authorizationUrl = service.getAuthorizationUrl();\n return \"redirect:\" + authorizationUrl;\n }", "@Override\n protected ModelAndView handleRequestInternal(final HttpServletRequest\n request, final HttpServletResponse response) throws Exception {\n log.trace(\"Entering handleRequestInternal\");\n\n ModelAndView mav = new ModelAndView(\"home\");\n\n log.trace(\"Leaving handleRequestInternal\");\n return mav;\n }", "public F.Promise<Result> handleSignIn() {\n final Form<LogIn> filledForm = logInForm.bindFromRequest();\n if (customerService().isLoggedIn()) {\n return asPromise(redirect(controllers.routes.HomeController.home()));\n } else if (filledForm.hasErrors()) {\n flash(\"error\", \"Login form contains missing or invalid data.\");\n return asPromise(badRequest(loginView.render(data().build(), filledForm)));\n } else {\n return handleSignInWithValidForm(filledForm);\n }\n }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n\tpublic String login(Model model) {\n\t\tlogger.debug(\" A user trying to login\");\n\t\treturn \"login\";\n\t}", "@RequestMapping(value = \"/\", method ={RequestMethod.POST,RequestMethod.GET})\n\tpublic String home(HttpServletRequest request, Model model, HttpServletResponse response) {\n\t\t\n\t\t\n\t\t//Variables \n\t\tString cookieName =\"user\";\n\t\tString cookieValue = \"\";//var a obtener\n\t\tString cookie2pass =\"pass\";\n\t\tString cookie2Value = \"\";//var a obener\n\t\tCookie[ ] cookies = request.getCookies( ); //Obtenemos cookies de la peticion\n\t\t\n\t\t\n\t\t//Asignar valor a las cookies\n\t\tif(cookies==null) {\n\t\t\treturn \"home\";\n\t\t}else {\n\t\tfor (Cookie cookie: cookies){\n\t\t\tif (cookieName.equals(cookie.getName())) {\n\t\t\tcookieValue = cookie.getValue();\n\t\t\t//usuario\n\t\t\tif(cookie2pass.equals(cookie.getName())) {\n\t\t\t//contaseña\t\n\t\t\tcookie2Value=cookie.getValue();\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Comprobamos si el cookievalue es el del administrador o no\n\t\t\n\t\tif(cookieValue.equals(\"Admin\")&& cookie2Value.equals(\"12345\")) {\n\t\t\t\n\t\t\tList <DTOUsuarios> lista = dao.leeUsuarios();\n\t\t\tmodel.addAttribute(\"lista\", lista);\n\t\t\treturn \"usuario\";\n\t\t\t\n\t\t}else {\n\t\t\t//Si el valor de las cookies no es el anterior significa que el usuario se ha autenticado para acceder a los\n\t\t\t//articulos por ello mostramos articulo.jsp, no hace falta autenticar porque ya lo ha echo antes\n\t\t\t\n\t\t\tList <DTOArticulo> list = daoA.leeArticulo();\n\t\t\tmodel.addAttribute(\"list\", list);\n\t\t\treturn\"articulo\";\n\n\n\t\t\t}\n\t\t\n\t\t\t}\n\t\t\n\t\t\n\t}", "@Action( value=\"loginAction\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/login.jsp\"), \n @Result(name=ERROR, type=\"dispatcher\", location=\"/jsp/login.jsp\") } ) \n public String login() \n {\n \t return SUCCESS; \n }", "public AgentDTO login(String login, String senha);", "public static Result home() {\n Skier loggedInSkier = Session.authenticateSession(request().cookie(COOKIE_NAME));\n if(loggedInSkier==null)\n return redirect(\"/\");\n else\n return renderHome(loggedInSkier);\n }", "@RequestMapping(\"/login.ws\")\n public String loginForm(HttpServletRequest req, Model model) {\n String referer = req.getHeader(\"Referer\");\n String prevPage = (String) req.getSession().getAttribute(\"prevPage\");\n if (prevPage != null) {\n req.getSession().setAttribute(\"prevPage\", referer);\n }\n\n String userId = (String) req.getAttribute(\"userId\");\n model.addAttribute(\"userId\", userId);\n String error = (String) req.getParameter(\"error\");\n if(error != null)\n log.debug(\"error : {}\", error);\n\n return \"auth/login\";\n }", "@GetMapping(\"/login\")\n public String getLogin(Model model)\n {\n return \"login\";\n }", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "public RestAuthenticationSuccessHandler() {\n }", "@POST(\"login\")\n Call<User> login();", "@PostMapping(\"/logincheck\")\n\tpublic String LoginCheck()\n\t{\n\t\treturn \"profile\";\n\t}", "@RequestMapping(path = { \"/secure/login.controller\" })\n\tpublic String handlerMethod(MemberBean bean, BindingResult bindingResult, String login, Model model,\n\t\t\tHttpSession session, Locale locale,HttpServletResponse response,HttpServletRequest request) {\n\n\t\tMap<String, String> errors = new HashMap<String, String>();\n\t\tmodel.addAttribute(\"errors\", errors);\n\t\t// 驗證資料\n\t\tif (login != null && login.equals(\"登出\")) {\n\t\t\tsession.removeAttribute(\"user\");\n\t\t\terrors.put(\"action\", \"登出成功1\");\n\t\t\tsession.setAttribute(\"fail\", \"登出成功\");\n\t\t\tCookie[] cookies = request.getCookies();\n\t\t\tif (cookies != null) {\n\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\tif (cookie.getName().equals(\"aaa\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcookie.setMaxAge(0);\n\t\t\t\t\t\tcookie.setPath(\"/\");\n\t\t\t\t\t\tresponse.addCookie(cookie);\n\t\t\t\t\t\treturn \"redirect:/\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (login != null && login.equals(\"登入\")) {\n\t\t\tMemberBean result = memberService.login(bean);\n\t\t\tMemberBean result2 = memberService.loginok(bean);\n//\t\t\tSystem.out.println(result);\n\t\t\tif (result == null) {\n//\t\t\t\tSystem.out.println(\"XX\");\n//\t\t\t\terrors.put(\"action\", \"登入失敗\");\n\t\t\t\tsession.setAttribute(\"fail\", \"登入失敗\");\n//\t\t\t\tsession.removeAttribute(\"user\");\n\t\t\t} else {\n//\t\t\t\tSystem.out.println(\"OK\");\n//\t\t\t\terrors.put(\"action\", \"login OK \" + \"HI,\" + memberRepository.findMemberName(bean.getAccount()));\n\t\t\t\tmodel.addAttribute(\"login\", result);\n\t\t\t\tsession.setAttribute(\"user\", result2);\n\t\t\t\tString s=result2.getMemberNo().toString();\n\t\t\t\tCookie cookie = new Cookie(\"aaa\",s);\n\t\t\t\tcookie.setPath(\"/\");\n\t\t\t\tresponse.addCookie(cookie);\n\t\t\t\treturn \"redirect:/\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (bean.getAccount() == null || bean.getAccount().length() == 0) {\n//\t\t\t\tsession.setAttribute(\"failaccount\", messageSource.getMessage(\"login.account.required\", null, locale));\n\t\t\t\terrors.put(\"failaccount\", messageSource.getMessage(\"login.account.required\", null, locale));\n\t\t\t}\n\t\t\tif (bean.getPassword() == null || bean.getPassword().length() == 0) {\n//\t\t\t\tsession.setAttribute(\"failpassword\", messageSource.getMessage(\"login.password.required\", null, locale));\n\t\t\t\terrors.put(\"failpassword\", messageSource.getMessage(\"login.password.required\", null, locale));\n\t\t\t}\n\t\t\t\n\n//\t\t\t// 呼叫model\n//\t\t\tMemberBean bean2 = memberService.login(bean);\n//\t\t\t// 根據model執行結果,導向view\n//\t\t\tif (bean == null) {\n//\t\t\t\terrors.put(\"password\", messageSource.getMessage(\"login.fail\", null, locale));\n//\t\t\t\treturn \"/secure/login\";\n//\t\t\t} else {\n//\t\t\t\tsession.setAttribute(\"user\", bean);\n//\t\t\t\treturn \"redirect:/\";\n//\t\t\t}\n\t\t}\n\n\t\treturn \"redirect:\";\n\t}", "@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}", "@RequestMapping(\"/\")\n public String home()\n {\n SecurityContext context = SecurityContextHolder.getContext();\n return \"redirect:swagger-ui.html\";\n }", "public ActionForward ingresarSistema(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception\r\n\t{ \r\n\t\tLoginActionForm frm=(LoginActionForm)form;\r\n\t\tString userName=frm.getTxtUserName().trim();\r\n\t\tString password=frm.getTxtPassword().trim();\r\n\t\t\t\t\r\n\t\ttry{\t\t\t\r\n//\t\t\tUserInfo user=ServiceFactory.getSeguridadService().ingresarSistema(userName, password, request);\r\n//\t\t\t\t\t\t\t\r\n//\t\t\t//si debe cambiar contraseÑa direccionar a cambio de contrase?a\r\n//\t\t\tif(user.isDebeCambiarPwd()){\r\n//\t\t\t\tthis.saveToken(request);\r\n//\t\t\t\treturn cargarCambiarPassword(mapping,form,request,response);\t\t\t\t\t\t\t\t\r\n//\t\t\t}else{//direccionar a pagina principal\r\n//\t\t\t\tif(user.isSugerirCambiarPwd())\r\n//\t\t\t\t\trequest.setAttribute(Constantes.ALERT_MSG,\"Faltan \" \r\n//\t\t\t\t\t\t\t+ user.getExpiracionPwd() + \" días para la expiración de la contraseña.\");\t\t\t\t\r\n\t\t\t\treturn mapping.findForward(\"inicio\");\r\n//\t\t\t}\r\n\t\t}\r\n\t catch(Exception ex){\r\n\t\t\treturn mapping.findForward(\"ingresarSistema\");\r\n\t\t}finally{ \r\n\t\t\tfrm.setTxtPassword(\"\");\r\n\t\t}\t\r\n\r\n\t}", "public String loginAction() throws Exception {\n\t\t\t\t\n\t return \"builder\";\n\t }", "public String accionLogin(){\n\t\t\r\n\t\tlog.info(\"Ingreso hacer login del usuario!!! \");\r\n\t\tString retorno = null;\r\n\t\ttry {\r\n\t\t\tString pass = new CriptPassword().getHashSH1(loginBaking.getUserBean().getPass());\r\n\t\t\tUser u = ejbMangerUser.login(loginBaking.getUserBean().getNick(), pass);\r\n\t\t\tloginBaking.setUserBean(u);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tList<Network> listNetwork = ejbNetwork.listNetwork();\r\n\t\t\tHttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);\r\n\t\t\tsession.setAttribute(\"listaNetwork\", listNetwork);\r\n\t\t\t\r\n\t\t\tretorno = \"site/home\";\r\n\t\t} catch (InSideException ex) {\r\n\t\t\tlog.error(ex.getKeyMSGError());\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage (FacesMessage.SEVERITY_ERROR, \r\n\t\t\t\t\t\tBundleUtil.getMessageResource(ex.getKeyMSGError()), \r\n\t\t\t\t\t\tBundleUtil.getMessageResource(ex.getKeyMSGError())));\r\n\t\t}\r\n\t\tlog.debug(\"Pagina de redireccion --->> \" + retorno);\r\n\t\tlog.info(\"fin de Login!!!\");\r\n\t\treturn retorno;\r\n\t}", "@RequestMapping(\"/loginPage\")\n\tpublic String init(HttpServletRequest request) {\n\t\treturn \"login\";\n\t}", "@GetMapping(\"/login\")\n\tpublic boolean login(HttpServletRequest request) {\n\t\t//Implement logic to authenticate and set authenticated user object in session , setting \n\t\t\n\t\tUserInfo user = new UserInfo(\"yogesh\", \"admin\");\n\t\tHttpSession session = request.getSession(true);\n\t\tsession.setAttribute(\"authUser\",user);\n\t\treturn true;\n\t\t\n\t}", "@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }", "@GetMapping(\"/index\")\n\tpublic String telaLogin() {\n\t\treturn \"/telas/index\";\n\t}", "@CrossOrigin(origins = AppConstants.CORS)\n\t@RequestMapping(value = {UrlConstants.API_LOGIN_AUTHENTICATE+\"org\"}, method = RequestMethod.POST)\n\tpublic @ResponseBody ResponseDTO authenticate(@RequestBody LoginDTO loginDTO, BindingResult result) {\n\t\tResponseDTO responseDTO = null;\n\t\ttry { \n\t\t\tif(result.hasErrors()){\n\t\t\t\tresponseDTO = new ResponseDTO();\n\t\t\t\tresponseDTO.setErrorCode(300);\n\t\t\t\tresponseDTO = ResponseWriter.writeResponse(responseDTO);\n\t\t\t} else {\n\t\t\t\t//responseDTO = loginService.authenticate(loginDTO);\n\t\t\t\tlogger.info(\"here\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponseDTO = ResponseWriter.writeResponse(e.getCause(), e);\n\t\t\tlogger.error(\"error\",e);\n\t\t} \n\t\treturn responseDTO;\n\t}", "@RequestMapping(value = \"/form\", method = RequestMethod.GET)\n public String getLogin(Model model, HttpSession session)\n {\n RootContextConfig.message.info(\"\\n\\nUrl: /formn\\n\\n\");\n model.addAttribute(\"loginDto\", new LoginDto());\n return \"login/session\";\n }" ]
[ "0.7579392", "0.692989", "0.692088", "0.6830953", "0.67813784", "0.67617863", "0.66520184", "0.659762", "0.65492433", "0.6535658", "0.651978", "0.6495898", "0.64938456", "0.64775246", "0.64725196", "0.64549094", "0.64531815", "0.6452639", "0.6451184", "0.64335203", "0.6422933", "0.64106876", "0.63912964", "0.6390689", "0.63894445", "0.63814926", "0.63765424", "0.63306165", "0.6322421", "0.6309655", "0.6305759", "0.630162", "0.62880933", "0.62731177", "0.6264442", "0.623737", "0.6231969", "0.6212568", "0.61811405", "0.6163971", "0.6153541", "0.6136045", "0.6133263", "0.61289066", "0.61274505", "0.61146533", "0.6109383", "0.6100501", "0.6079626", "0.606892", "0.604085", "0.602959", "0.602473", "0.6013995", "0.60115814", "0.60110337", "0.6008442", "0.60072714", "0.59917575", "0.5986288", "0.5975734", "0.5969698", "0.5967062", "0.5964694", "0.5958899", "0.5955721", "0.595446", "0.59544414", "0.5932813", "0.59289634", "0.5924921", "0.5923808", "0.59234893", "0.5915524", "0.59133035", "0.59130335", "0.5910619", "0.5902667", "0.58982915", "0.5896673", "0.589461", "0.5893556", "0.5890239", "0.58862174", "0.58794767", "0.58761305", "0.587449", "0.58707356", "0.5870626", "0.58653593", "0.586528", "0.5857288", "0.58537674", "0.58497673", "0.58346546", "0.5832139", "0.5831412", "0.5825145", "0.5819086", "0.58141124" ]
0.767392
0
Database db = new Database("data/restaurants.json", "data/reviews.json" , "data/users.json");
@Test public void test01() { User user1 = new User("megan"); user1.setUrl("url1"); assertEquals("url1", user1.getUrl()); // db.addRestaurant(rest1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Database(JsonObject data){\n this.obj = data;\n rest = (JsonArray) obj.get(\"restaurants\");\n /* TODO \nset the memebr variable declared above.*/\n }", "public YelpDB(String restaurants, String reviews, String users) throws IOException {\n\n this.gson = new Gson();\n this.restaurantMap = new ConcurrentHashMap<String, Restaurant>();\n this.reviewMap = new ConcurrentHashMap<String, Review>();\n this.userMap = new ConcurrentHashMap<String, YelpUser>();\n\n // Process restaurants\n try (BufferedReader reader = new BufferedReader(new FileReader(restaurants))) {\n String line;\n while ((line = reader.readLine()) != null) {\n Restaurant r = gson.fromJson(line, Restaurant.class);\n String business_id = r.getID();\n this.restaurantMap.put(business_id, r);\n }\n }\n\n // Process reviews\n try (BufferedReader reader = new BufferedReader(new FileReader(reviews))) {\n String line;\n while ((line = reader.readLine()) != null) {\n Review r = gson.fromJson(line, Review.class);\n String review_id = r.getID();\n this.reviewMap.put(review_id, r);\n }\n }\n\n // Process users\n try (BufferedReader reader = new BufferedReader(new FileReader(users))) {\n String line;\n while ((line = reader.readLine()) != null) {\n YelpUser u = gson.fromJson(line, YelpUser.class);\n String user_id = u.getID();\n this.userMap.put(user_id, u);\n }\n }\n }", "public static void run(String[] args){\n writeList(\"data\\\\yelp_academic_dataset_business.json\", \"data\\\\list-business.txt\", \"business_id\");\n writeList(\"data\\\\yelp_academic_dataset_user.json\", \"data\\\\list-user.txt\", \"user_id\");\n writeList(YelpBusinessJsonScraper.getCategories(args), \"data\\\\list-categories.txt\");\n writeList(\"data\\\\yelp_academic_dataset_review.json\", \"data\\\\list-review.txt\", \"review_id\");\n\n // Write to SQL\n writeSQL(\"data\\\\yelp_academic_dataset_business.json\", \"data\\\\SQL-business.txt\",\n new String [] {\"business_id\", \"name\", \"full_address\", \"score\"});\n writeSQL(\"data\\\\yelp_academic_dataset_user.json\", \"data\\\\SQL-user.txt\",\n new String [] {\"user_id\", \"name\"});\n writeSQLReviews(\"data\\\\yelp_academic_dataset_review.json\", \"data\\\\SQL-review.txt\",\n \"data\\\\list-business.txt\", \"data\\\\list-user.txt\", new String [] {\"review_id\", \"text\", \"stars\", \"businessID\", \"userID\"}, 6);\n writeSQL(YelpBusinessJsonScraper.getCategories(args), \"data\\\\SQL-categories.txt\");\n writeSQLRelationshipTable(\"data\\\\yelp_academic_dataset_business.json\", \"data\\\\SQL-business-categories-rel.txt\",\n \"data\\\\list-business.txt\", \"data\\\\list-categories.txt\", \"business_id\");\n\n }", "public static void main(String[] args) throws MalformedURLException {\n HttpClient httpClient = new StdHttpClient.Builder() \n .url(\"http://localhost:5984\") \n .build(); \n //Connect to CouchDB instance\n CouchDbInstance dbInstance = new StdCouchDbInstance(httpClient);\n //Point to Person database\n CouchDbConnector db = dbInstance.createConnector(\"person\", true);\n //Student Object\n Student s = new Student();\n s.setFirstname(\"aoifes\");\n s.setSurname(\"sayers\");\n s.setEmail(\"[email protected]\");\n\n List<String> listOfIds = db.getAllDocIds();\n System.out.println(listOfIds);\n System.out.println(listOfIds.get(0));\n String firstStud = listOfIds.get(0);\n Student stud = db.get(Student.class, firstStud);\n System.out.println(stud.getTnumber());\n\n db.create((s));\n\n\n\n HttpClient httpClient1 = new StdHttpClient.Builder() \n .url(\"http://localhost:5984\") \n .build(); \n\n }", "private void setBasketRepository() {\n ObjectMapper mapper = new ObjectMapper();\n TypeReference<List<Basket>> typeReference = new TypeReference<>() {\n };\n InputStream inputStream = TypeReference.class.getResourceAsStream(\"/json/data_demo.json\");\n try {\n List<Basket> invoices = mapper.readValue(inputStream, typeReference);\n basketRepository.saveAll(invoices);\n log.info(\"Saved in database successfully!\");\n } catch (IOException e) {\n log.error(\"Unable to save in database: {}\", e.getMessage());\n }\n }", "public RecipeDataBase(){\n //recipes = new ArrayList<>();\n loadDatabase();\n \n }", "private void getDatabase(){\n\n }", "public Repository (Application application, Activity activity){\n VideoDatabase database=VideoDatabase.getInstance(application);\n myDAO=database.myDAO();\n allChapters=myDAO.getAllChapter();\n allLecture=myDAO.getAllLecture();\n this.activity=activity;\n //allChapterJson=myDAO.getAllChapterJson();\n //allLectureJson=myDAO.getAllLectureJson();\n }", "public Database initDB() {\n Database db = new Database(\"dataBase.db\");\n\n// db.insertData(\"1 Dragos Dinescu [email protected] 0744522600 Digi 10-12-2020\");\n// db.insertData(\"2 Adelina Mirea [email protected] 0733651320 Orange 14-10-2020\");\n// db.insertData(\"3 Radu Sorostinean [email protected] 0733723321 Digi 1-10-2020\");\n// db.insertData(\"4 Andrei Brasoveanu [email protected] 0732341390 Vodafone 12-11-2020\");\n return db;\n\n //db.deleteFromDB();\n //db.updateDB(\"1 alex radu [email protected] 022256926 orange 10/08/2010\");\n }", "Database createDatabase();", "public Database() {\n //Assign instance variables.\n this.movies = new ArrayList<>();\n this.users = new ArrayList<>();\n }", "public static boolean getDb() {\n boolean drinkOK = false, ingredientOK = false;\n String responseBody = getWebData(\"getIngredients.php\");\n // If the getWebData returns error the HTTP-get has failed and\n // the paring shall not be done.\n if (responseBody.equals(\"error\"))\n return false;\n Log.d(\"getDB\", responseBody);\n try {\n // Prepare the JSON to be parsed.\n JSONObject json = new JSONObject(responseBody);\n JSONArray jArray = json.getJSONArray(\"ingredients\");\n Log.d(\"getDrinks.php\", jArray.toString());\n for (int i = 0; i < jArray.length(); ++i) {\n JSONObject jObject;\n jObject = jArray.getJSONObject(i);\n // Parses the JSON and creates the ContentValues object.\n ContentValues values = new Ingredient(jObject.getInt(\"_id\"), jObject.getString(\"name\"),\n jObject.getString(\"url\"), jObject.getString(\"ingredienttype\"), jObject.getInt(\"alcohollevel\"),\n jObject.getString(\"description\")).getContentValues();\n // Insets the data into the SQLite.\n Uri myBarUriIngredient = MyBarApplication.contentResolver().insert(\n MyBarContentProvider.CONTENTURI_INGREDIENT, values);\n Log.d(Data.class.getClass().getName(),\n \"Inserted Ingredient. Created row: \" + myBarUriIngredient.toString());\n }\n ingredientOK = true;\n\n } catch (JSONException e) {\n Log.e(\"JSONError ingredients\", e.toString());\n ingredientOK = false;\n }\n\n responseBody = getWebData(\"getDrinks.php\");\n Log.d(\"getDB\", responseBody);\n try {\n // Prepare the JSON to be parsed.\n JSONObject json = new JSONObject(responseBody);\n // Creates the JSON array from the drinks array.\n JSONArray jArray = json.getJSONArray(\"drinks\");\n // Print the json to the Log.d.\n Log.d(\"getDrinks.php\", jArray.toString());\n for (int i = 0; i < jArray.length(); ++i) {\n JSONObject jObject = jArray.getJSONObject(i);\n // Gets the values from the JSON-data.\n ContentValues values = new Drink(jObject.getInt(\"_id\"), jObject.getString(\"name\"),\n jObject.getString(\"url\"), jObject.getString(\"glass\"), jObject.getString(\"ingredient\"),\n jObject.getString(\"description\"), jObject.getInt(\"rating\"),\n // Sets favorite to 0 and gets the content values.\n 0).getContentValues();\n // Insets the data into the SQLite\n Uri myBarUriDrink = MyBarApplication.contentResolver().insert(MyBarContentProvider.CONTENTURI_DRINK,\n values);\n Log.d(Data.class.getClass().getName(), \"Inserted Drink. Created row: \" + myBarUriDrink.toString());\n }\n // Sets the return variable.\n drinkOK = true;\n } catch (JSONException e) {\n // Prints to Log.d.\n Log.e(\"JSONError drinks\", e.toString());\n drinkOK = false;\n }\n\n return ingredientOK & drinkOK;\n }", "@Override\n public void run(String... args) {\n try {\n\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\n ObjectMapper mapper = new ObjectMapper();\n\n final ObjectMapper configure = mapper.configure(\n DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true\n );\n\n InputStream inputStreamProducts = classLoader.getResourceAsStream(\"json/product.json\");\n InputStream inputStreamInventory = classLoader.getResourceAsStream(\"json/inventory.json\");\n\n Product[] product = mapper.readValue(inputStreamProducts, Product[].class);\n Inventory[] inventory = mapper.readValue(inputStreamInventory, Inventory[].class);\n\n MongoClient client1 = new MongoClient(\"localhost\");\n\n // Dropping the Warehouserest database in mongodb\n client1.dropDatabase(\"warehouse\");\n\n// ## Start Morphia part\n Morphia morphia = new Morphia();\n morphia.map(Product.class);\n morphia.map(Inventory.class);\n\n Datastore datastore = morphia.createDatastore(client1, \"warehouse\");\n\n for (Product valueProducts : product) {\n datastore.save(valueProducts);\n }\n\n for (Inventory inventories : inventory) {\n datastore.save(inventories);\n }\n\n\n\n/*\n// # Start populating mongodb from Inventory json\n InputStream inputStreamInventory = classLoader.getResourceAsStream(\"json/inventory.json\");\n\n // Load Inventory json at startup\n assert inputStreamInventory != null;\n InputStreamReader inputStreamReaderInventory = new InputStreamReader(inputStreamInventory);\n BufferedReader bufferedReaderInventory = new BufferedReader(inputStreamReaderInventory);\n StringBuilder stringBufferInventory = new StringBuilder();\n\n String line1 = \"\";\n while ((line1 = bufferedReaderInventory.readLine()) != null) {\n stringBufferInventory.append(line1);\n }\n\n MongoCollection<Document> collectionInventory = client1.getDatabase(\"warehouse\").getCollection(\"inventory\");\n Document doc1 = Document.parse(stringBufferInventory.toString());\n collectionInventory.insertOne(doc1);*/\n\n System.out.println(\"Inventory loaded!\");\n System.out.println(\"Products loaded!\");\n } catch (Exception e) {\n System.out.println(\"Not able to load products: \" + e.getMessage());\n }\n }", "public static void main(String[] args){\n launch(args);\n //this is some code that tests out the JSON saving and importing of data\n // FoodBank fb1 = new FoodBank(\"Blue Ridge Area Food Bank\");\n // FoodBank fb2 = new FoodBank(\"Loaves & Fishes Food Pantry\");\n\n // fb1.setLocation(new Coordinate(38.039690, -78.480940));\n // fb2.setLocation(new Coordinate(38.077940, -78.500490));\n\n // FoodItem beefaroni = new FoodItem(\"Beefaroni\");\n // beefaroni.setCaloriesPerServing(350);\n // beefaroni.setCarbsPerServing(48);\n // beefaroni.setCholesterolPerServing(20);\n // beefaroni.setFatPerServing(13);\n // beefaroni.setServingsPerContainer(1);\n // beefaroni.setQuantity(45);\n // beefaroni.addFoodType(FoodItem.FoodType.MEAT);\n // beefaroni.addFoodType(FoodItem.FoodType.GRAIN);\n\n // FoodItem broth = new FoodItem(\"Swanson Chicken Broth\");\n // broth.setCaloriesPerServing(20);\n // broth.setCarbsPerServing(2);\n // broth.setCholesterolPerServing(0);\n // broth.setFatPerServing(0);\n // broth.setServingsPerContainer(1);\n // broth.setQuantity(28);\n // broth.addFoodType(FoodItem.FoodType.NONE);\n\n // fb1.addFoodItem(beefaroni);\n // fb2.addFoodItem(broth);\n\n // FoodBankList fbl = new FoodBankList();\n // fbl.addFoodBank(fb1);\n // fbl.addFoodBank(fb2);\n\n // JSONFileHandler.getJFH().saveToJSON(fbl.toJSON(), \"FoodBanks.json\");\n\n // FoodBankList importedfbl = new FoodBankList(JSONFileHandler.getJFH().getJSONFromFile(\"FoodBanks.json\"));\n // ArrayList<FoodBank> foodBanks = importedfbl.getFoodBanks();\n // foodBanks.forEach(fb -> {\n // System.out.println(\"Imported food bank with name: \" + fb.getName());\n // });\n }", "@GET\n @Path(\"/database/get\")\n public Response getDatabase() throws JsonGenerationException, JsonMappingException, IOException{\n return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Database2.get())).build();\n }", "public static MainDatabase deserializeDatabase() {\n MainDatabase data = new MainDatabase();\n // first check if the file exists\n File file = new File(Constants.SAVE_FILE);\n if (!file.exists()) {\n return data;\n }\n try (FileInputStream in = new FileInputStream(Constants.SAVE_FILE);\n BufferedInputStream reader = new BufferedInputStream(in)) {\n\n // un-encrypted header (salt and iv necessary for decryption)\n byte[] salt = new byte[reader.read()];\n reader.read(salt);\n byte[] iv = new byte[reader.read()];\n reader.read(iv);\n Cipher enc = getEncryptionCipher(salt, iv);\n\n try (CipherInputStream cis = new CipherInputStream(reader, enc);\n ObjectInputStream ois = new ObjectInputStream(cis)) {\n\n // if we need any settings, read them here\n\n // read the travel database\n int count = ois.readByte();\n for (int i = 0; i < count; i++) {\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n data.addTravel((SingleTravel) ois.readObject());\n }\n }\n\n // read the user database\n count = ois.readInt();\n for (int i = 0; i < count; i++) {\n RegisteredUser ru = (RegisteredUser) ois.readObject();\n data.addUser(ru);\n\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n int itSize = ois.readInt();\n // check the itinerary to make sure it is still valid\n boolean validItinerary = (itSize > 0);\n Itinerary it = new Itinerary();\n for (int k = 0; k < itSize; k++) {\n try {\n SingleTravel st = data.getTravel(TravelType.values()[ois.readByte()],\n ois.readUTF());\n if (st == null) { // doesn't exist; do not add itinerary\n validItinerary = false;\n } else {\n it.add(st);\n }\n } catch (IllegalArgumentException e) {\n validItinerary = false;\n // we don't need to log this -- probably a travel expired\n }\n }\n if (validItinerary) {\n ru.bookItinerary(it);\n }\n }\n }\n }\n } catch (IOException | GeneralSecurityException | ClassNotFoundException e) {\n log.log(Level.SEVERE, \"Error reading from file.\", e);\n }\n return data;\n }", "private static void readDatabase(String path) {\n try {\n FileInputStream fileIn = new FileInputStream(path + \"/database.ser\");\n ObjectInputStream inStream = new ObjectInputStream(fileIn);\n database = (Database) inStream.readObject();\n inStream.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n } catch (ClassNotFoundException c) {\n c.printStackTrace();\n }\n }", "public Database() {\n if (init) {\n\n //creating Transaction data\n Transaction transactionOne\n = new Transaction(1, \"Debit\", \"Spar Grocery\", 54.68,1);\n\n transactionDB.add(transactionOne);\n\n // Creating an Account data\n Account accountOne = new Account(1, 445, 111111111, \"Savings\",\n 1250.24, transactionDB);\n\n accountDB.add(accountOne);\n\n //creating withdrawal data\n Withdrawal withdrawalOne = new Withdrawal(1, 64422545, 600.89);\n withdrawalDB.add(withdrawalOne);\n\n //creating transfer data\n Transfer transferOne = new Transfer(1, 25252525, 521.23);\n transferDB.add(transferOne);\n\n //creating lodgement data\n Lodgement lodgementOne = new Lodgement(1, 67766666, 521.23);\n lodgementDB.add(lodgementOne);\n\n //add Customer data \n Customer customerOne\n = new Customer(1, \"Darth Vader\", \"[email protected]\",\n \"Level 5, Suit Dark\", \"darkSideIsGoodStuff\",\n accountDB, withdrawalDB, transferDB, lodgementDB);\n\n customerDB.add(customerOne);\n\n init = false;\n }\n }", "public Database(String url) {\n this.url = url;\n\n File f = new File(url);\n\n if (f.exists()) {\n try {\n f.mkdirs();\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //create table relationship\n LinkedList<String> relationship_attributes = new LinkedList<>();\n relationship_attributes.add(\"id_entity1\");\n relationship_attributes.add(\"id_entity2\");\n relationship_attributes.add(\"description\");\n this.create_table(\"relationship\", relationship_attributes);\n }", "public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public interface DatabaseOperations {\n\n public static final String DATABASE_NAME = \"ghost_database\";\n\n public static final String TABLE_SIGHTINGS = \"SIGHTINGS\";\n\n public static final String ROW_ID = \"_id\";\n\n public static final String TITLE = \"title\";\n public static final String DESCRIPTION = \"DESCRIPTION\";\n public static final String LATITUDE = \"lat\";\n public static final String LONGITUDE = \"lon\";\n public static final String RATING = \"rating\";\n}", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "DataBase createDataBase();", "DataStore getDataStore ();", "public MoviesDatabase()\n {\n file = new FileOperation();\n menu = new Menu();\n validation = new Validation();\n }", "Object getDB();", "public interface RecipeStore {\n //Returns a recipe list of all recipes\n List<Recipe> getAllRecipes();\n //Returns a string list of recipe titles found from ingredients query\n List<String> getRecipeByIngredients(CharSequence query);\n //Returns a single recipe found from query\n Recipe getRecipe(CharSequence query);\n //Returns a single recipe image from query\n byte[] getRecipeImage(CharSequence query);\n //Returns a bitmap list of all small images for all recipes\n List<Bitmap> getRecipeImgSmall();\n //Returns a string list of all recipe titles\n List<String> getRecipeTitles();\n //Takes a recipe id and adds it to the favorites table\n void addToFavorites(int recipeId);\n //Returns a bitmap list of all images for recipes in the favorites table\n List<Bitmap> getFavoriteRecipeImgs();\n //Returns a string list of all titles for recipes in the favorites table\n List<String> getFavoriteRecipeTitle();\n //Takes a recipe id and deletes it from the favorites table\n void deleteFavorite(int id);\n //Takes a recipe id and checks if it exists in the favorites table\n boolean isFavorite(int id);\n //Takes recipe parameters and inserts a new row in recipes table\n Recipe createRecipe(String title, String description, String ingredients, String instructions, byte[] photo, byte[] photoSmall);\n //Returns number of rows in recipes\n long getRecipesCount();\n //Opens the database\n SQLiteDatabase open() throws SQLException;\n //Closes the database\n void close();\n}", "public static void main(String[] args) throws IOException{ \n\t\tJsonReader reader = Json.createReader(new FileReader(\"testjson/abcde.json\")); \n\t\tJsonObject jsonob = reader.readObject();\n\t\tSystem.out.println(jsonob.toString());\n\t\tRowColStore parser= new RowColStore(10*1000*1000,\"testjson/abcde.layout\");\n\t\tint objid = 1;\n\t\tparser.insertObject(objid,jsonob,null);\n\t\tparser.insertObject(2,jsonob,null);\n\t\tparser.insertObject(3,jsonob,null);\n\t\t// populate the table \n\n\t\tSystem.out.println(\"get the result out \\n\");\n\t\t// objid, keystr,valstr,valnum,valbool - 5 bytes \n\t\t// read it out \n\t//\tparser.getObject(2);\n\t}", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "private void downloadData(SQLiteDatabase db){\n DeviceDataManager.downloadDeviceData(db);\n CustomerDataManager.downloadCustomerData(db);\n CheckInTypeDataManager.downloadCheckInTypeData(db);\n CheckInPointDataManager.downloadCheckInPointData(db);\n PhotographerDataManager.downloadPhotographerData(db);\n }", "private void fetchJsonData() {\n String url = \"https://raw.githubusercontent.com/acad600/JSONRepository/master/ISYS6203/O212-ISYS6203-RM01-00-DotaMarketplace.json\";\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(Request.Method.GET, url, null, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n for (int i = 0; i < response.length(); i++) {\n try {\n JSONObject obj = response.getJSONObject(i);\n String name = obj.getString(\"name\");\n int price = obj.getInt(\"price\");\n int stock = obj.getInt(\"stock\");\n double latitude = obj.getDouble(\"latitude\");\n double longitude = obj.getDouble(\"longitude\");\n\n database.insertNewItem(name, price, stock, latitude, longitude);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"MyActivity\", \"onErrorResponse\" + error.toString());\n }\n });\n\n requestQueue.add(jsonArrayRequest);\n }", "public static void main(String[] args) {\n\t Database db = new Database(\"localhost\", \"mycouchdb\");\n\n\t // create a hash map document with two fields \n\t Map<String,String> doc = new HashMap<String, String>();\n\t //doc.put(\"_id\", \"testDoc\");\n\t doc.put(\"foo\", \"value for the foo attribute\");\n\t doc.put(\"bar\", \"value for the bar attribute\");\n\n\t // create the document in couchdb\n\t db.createDocument(doc);\n\t \n\t doc.put(\"updated\", \"updated\");\n\t db.createOrUpdateDocument(doc);\n\t \n\t //db.getDocument(cls, docId)\n\t}", "@Override\n public JsonObjectRequest fetchData(AppDatabase database) {\n // create the JSON request for courses offered by each school\n return new JsonObjectRequest\n (Request.Method.GET, \"https://data.gov.sg/api/action/datastore_search?resource_id=3bb9e6b0-6865-4a55-87ba-cc380bc4df39&limit=500000\", null, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n try {\n // parse results as json array\n JSONArray allSchoolToCourseAsJSONArray = getResultsAsJSONArray(response);\n\n // get each entry in results and store in database\n parseJSONArrayAndStoreInDatabase(database, allSchoolToCourseAsJSONArray);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n // TODO: Handle error\n System.out.println(\"Rabak la bro: \" + error.toString());\n }\n });\n }", "private void populateDatabase(final FirebaseDatabase database, final DatabaseReference sessionRef) {\n cityName = getIntent().getStringExtra(\"cityName\");\n\n DatabaseReference citiesRef = database.getReference(\"Cities\");\n Log.d(\"Sean\", \"citiesRef: \" + database.getReference(\"Cities\").child(cityName).toString());\n\n citiesRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Log.d(\"Sean\", \"Restaurants: \" + dataSnapshot.child(cityName).child(\"Restaurants\").getValue().toString());\n Map<String, Restaurant> restaurants = new HashMap();\n for (DataSnapshot restaurantData : dataSnapshot.child(cityName).child(\"Restaurants\").getChildren()) {\n restaurants.put(restaurantData.getKey(), restaurantData.getValue(Restaurant.class));\n }\n DatabaseReference restaurantsRef = sessionRef.child(\"Restaurants\");\n restaurantsRef.setValue(restaurants);\n\n Log.d(\"Sean\", \"Food Items: \" + dataSnapshot.child(cityName).child(\"Food Items\").getValue().toString());\n Log.d(\"Sean\", \"Food Items Class: \" + dataSnapshot.child(cityName).child(\"Food Items\").getClass().toString());\n\n ArrayList<Object> foodItems = (ArrayList) dataSnapshot.child(cityName).child(\"Food Items\").getValue();\n DatabaseReference foodItemsRef = sessionRef.child(\"Food Items\");\n foodItemsRef.setValue(foodItems);\n\n populateLocalData(sessionRef, dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.d(\"Sean\", \"The database failed to read: \" + databaseError.getCode());\n }\n });\n }", "public MyApp()\n { \n \ttry{\n \t\tURI uri = URI.create(path.Path());\n\t \tDatabase sqliteDB = DatabaseFactory.create(uri);\n\t \t\n\t\t \tStatement cu = sqliteDB.createStatement(statement.CreateUser());\t\t\t\t\n\t\t \tcu.prepare();\n\t\t \tcu.execute();\n\t\t \tcu.close();\n\t\t\t\t\n\t\t\t\tStatement cp = sqliteDB.createStatement(statement.CategoriaProducto());\t\t\t\t\n\t\t\t\tcp.prepare();\n\t\t\t\tcp.execute();\n\t\t\t\tcp.close();\n\t\t\t\t\n\t\t\t\tStatement cpt = sqliteDB.createStatement(statement.TemporadaCategoriaProducto());\t\t\t\t\n\t\t\t\tcpt.prepare();\n\t\t\t\tcpt.execute();\n\t\t\t\tcpt.close();\n\t\t\t\t\n\t\t\t\tStatement p = sqliteDB.createStatement(statement.Producto());\t\t\t\t\n\t\t\t\tp.prepare();\n\t\t\t\tp.execute();\n\t\t\t\tp.close();\n\t\t\t\t\n\t\t\t\tStatement pt = sqliteDB.createStatement(statement.TemporadaProducto());\t\t\t\t\n\t\t\t\tpt.prepare();\n\t\t\t\tpt.execute();\n\t\t\t\tpt.close();\n\t\t\t\t\n\t\t\t\tStatement cm = sqliteDB.createStatement(statement.Municipio());\t\t\t\t\n\t\t\t\tcm.prepare();\n\t\t\t\tcm.execute();\n\t\t\t\tcm.close();\n\t\t\t\t\n\t\t\t\tStatement cmt = sqliteDB.createStatement(statement.TemporadaMunicipio());\t\t\t\t\n\t\t\t\tcmt.prepare();\n\t\t\t\tcmt.execute();\n\t\t\t\tcmt.close();\n\t\t\t\t\n\t\t\t\tStatement ce = sqliteDB.createStatement(statement.Establecimiento());\t\t\t\t\n\t\t\t\tce.prepare();\n\t\t\t\tce.execute();\n\t\t\t\tce.close();\n\t\t\t\t\n\t\t\t\tStatement cet = sqliteDB.createStatement(statement.TemporadaEstablecimiento());\t\t\t\t\n\t\t\t\tcet.prepare();\n\t\t\t\tcet.execute();\n\t\t\t\tcet.close();\n\t\t\t\t\n\t\t\t\tStatement cpr = sqliteDB.createStatement(statement.Presentacion());\t\t\t\t\n\t\t\t\tcpr.prepare();\n\t\t\t\tcpr.execute();\n\t\t\t\tcpr.close();\n\t\t\t\t\n\t\t\t\tStatement cprt = sqliteDB.createStatement(statement.TemporadaPresentacion());\t\t\t\t\n\t\t\t\tcprt.prepare();\n\t\t\t\tcprt.execute();\n\t\t\t\tcprt.close();\n\t\t\t\t\n\t\t\t\tStatement cpf = sqliteDB.createStatement(statement.ProductoFiltrado());\t\t\t\t\n\t\t\t\tcpf.prepare();\n\t\t\t\tcpf.execute();\n\t\t\t\tcpf.close();\n\t\t\t\t\n\t\t\t\tStatement cpft = sqliteDB.createStatement(statement.TemporadaProductoFiltrado());\t\t\t\t\n\t\t\t\tcpft.prepare();\n\t\t\t\tcpft.execute();\n\t\t\t\tcpft.close();\n\t\t\t\t\n\t\t\t\tStatement cb = sqliteDB.createStatement(statement.Busqueda());\t\t\t\t\n\t\t\t\tcb.prepare();\n\t\t\t\tcb.execute();\n\t\t\t\tcb.close();\n\t\t\t\t\n\t\t\t\tStatement cbt = sqliteDB.createStatement(statement.TemporadaBusqueda());\t\t\t\t\n\t\t\t\tcbt.prepare();\n\t\t\t\tcbt.execute();\n\t\t\t\tcbt.close();\n\t\t\t\t\n\t\t\t\tStatement cf = sqliteDB.createStatement(statement.Favorito());\t\t\t\t\n\t\t\t\tcf.prepare();\n\t\t\t\tcf.execute();\n\t\t\t\tcf.close();\n\t\t\t\t\n\t\t\t\tStatement cftu = sqliteDB.createStatement(statement.TemporalUser());\t\t\t\t\n\t\t\t\tcftu.prepare();\n\t\t\t\tcftu.execute();\n\t\t\t\tcftu.close();\n\t\t\t\t\n\t\t\t\tStatement clc = sqliteDB.createStatement(statement.ListaCompras());\t\t\t\t\n\t\t\t\tclc.prepare();\n\t\t\t\tclc.execute();\n\t\t\t\tclc.close();\n\t\t\t\t\n\t\t\t\tStatement crc = sqliteDB.createStatement(statement.RutaCompras());\t\t\t\t\n\t\t\t\tcrc.prepare();\n\t\t\t\tcrc.execute();\n\t\t\t\tcrc.close();\n\t\t\t\t\n\t\t\t\tStatement cpc = sqliteDB.createStatement(statement.ProductoCompras());\t\t\t\t\n\t\t\t\tcpc.prepare();\n\t\t\t\tcpc.execute();\n\t\t\t\tcpc.close();\n\t\t\t\t\n\t\t\tsqliteDB.close();\n\t \t\n \t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}finally{\n \t//Llamar SplashScreen\n \tsplashScreen = new SplashScreen();\n \t\n \t\n \t\n // Push a screen onto the UI stack for rendering.\n //pushScreen(new MyScreen());\n \tpushScreen(splashScreen);\n\t\t}\n }", "public static Books readJSON(){\n Gson gson = new GsonBuilder().create();\n Books books = new Books();\n try {\n books = gson.fromJson(new JsonReader(new FileReader(\"books.json\")), Books.class);\n } catch (IOException e){\n e.printStackTrace();\n }\n return books;\n }", "private static Callback prepopulateDatabase(){\n return new Callback() {\n @Override\n public void onCreate(@NonNull SupportSQLiteDatabase db) {\n super.onCreate(db);\n\n ContentValues contentValuesTartampion = new ContentValues();\n contentValuesTartampion.put(\"name\",\"Projet Tartampion\");\n contentValuesTartampion.put(\"color\",0xFFEADAD1);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesTartampion);\n\n ContentValues contentValuesLucidia = new ContentValues();\n contentValuesLucidia.put(\"name\",\"Projet Lucidia\");\n contentValuesLucidia.put(\"color\",0xFFB4CDBA);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesLucidia);\n\n ContentValues contentValuesCircus = new ContentValues();\n contentValuesCircus.put(\"name\",\"Projet Circus\");\n contentValuesCircus.put(\"color\",0xFFA3CED2);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesCircus);\n\n }\n };\n }", "private void connectDatabase(){\n }", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }", "@Test\n\tpublic void populatedDB() throws URISyntaxException{\n\t\tString pass;\n\t\t LoginController controller = new LoginController();\n\t\t \n\t\tpass = controller.gimmeSalt(\"PASSWORD\");\n pass = controller.hashBrowns(pass);\n\t\tdb.insertUser(\"TESTER\", pass, \"EMAIL\",666);\n\t\t\n\t\tdb.insertBusiness(\"Test1\",\"Somewhere\",7);\n\t\tdb.insertBusiness(\"Test2\",\"Somewhere\",8);\n\t\tdb.insertBusiness(\"Test3\",\"Somewhere\",9);\n\t\tlong start=12418*1000*60;\n\t\tlong end=912518*1000*60;\n\t\tdb.insertEvent(\"t1\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",1231);\n\t\t start=124118*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t2\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",674754);\n\t\t start=412418*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t3\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",241254);\n\t\tdb.insertEvent(\"t4\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",5432);\n\t\t start=1924218*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t5\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",12);\n\t\t start=124318*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t6\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",1241);\n\t\t\n\t\tdb.insertRelation(\"TESTER\",\"Test1\");\n\t\tdb.insertRelation( \"TESTER\",\"Test2\" );\n\t\tdb.insertRelation(\"TESTER\",\"Test3\");\n\t}", "@Test\n public void testCreate() throws Exception {\n System.out.println(\"create\");\n JSONObject movieJSON = new JSONObject();\n int pubID = 1;\n int prodID = 2;\n String name = \"Name\";\n int age = 12;\n String desc = \"This is my description\";\n int runtime = 12;\n String genre = \"Action\";\n double price = 22.22;\n movieJSON.put(\"productID\", prodID);\n movieJSON.put(\"name\", name);\n movieJSON.put(\"price\", price);\n movieJSON.put(\"ageRating\",age);\n movieJSON.put(\"description\", desc);\n movieJSON.put(\"runtime\", runtime);\n movieJSON.put(\"genre\", genre);\n movieJSON.put(\"publisherID\", pubID);\n MovieStorePageInfoFactory instance = new MovieStorePageInfoFactory();\n StoreListing result = instance.create(movieJSON);\n assertEquals(prodID, result.getProductID());\n assertEquals(name, result.getName());\n }", "public void refreshDb() {\n Ion.with(mContext)\n .load(mGetUrl)\n .asJsonObject()\n .setCallback(new FutureCallback<JsonObject>() {\n @Override\n public void onCompleted(Exception e, JsonObject result) {\n try {\n // do stuff with the result or error\n DatabaseClient databaseClient = new DatabaseClient(mContext);\n /**\n * if the return jsonObject is null, then don't clear the table\n * */\n if (result != null) {\n databaseClient.clearTablePage(\"bookpage\");\n }\n\n JsonArray array = result.getAsJsonArray(\"books\");\n /**\n * put data into db\n * */\n ContentResolver contentResolver = mContext.getContentResolver();\n Uri uri = Uri.parse(\"content://com.example.root.libapp_v1.SQLiteModule.Bookpage.BookpageProvider/bookpage\");\n for (int i = 0; i < array.size(); i++) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"name\", array.get(i).getAsJsonObject().get(\"name\").getAsString());\n contentValues.put(\"detail_info\", array.get(i).getAsJsonObject().get(\"detail_info\").getAsString());\n contentValues.put(\"author_info\", array.get(i).getAsJsonObject().get(\"author_info\").getAsString());\n contentValues.put(\"unique_id\", array.get(i).getAsJsonObject().get(\"id\").getAsString());\n contentValues.put(\"catalog_info\", array.get(i).getAsJsonObject().get(\"catalog_info\").getAsString());\n contentValues.put(\"timestamp\", array.get(i).getAsJsonObject().get(\"timestamp\").getAsString());\n Uri tmp = contentResolver.insert(uri, contentValues);\n }\n initData(mView);\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n });\n }", "public static void main(String[] args) throws ClassNotFoundException, SQLException, JsonGenerationException, JsonMappingException, IOException {\n\t\tCustomerDetails customerDetails = new CustomerDetails();\r\n\t\tObjectMapper objectMapper = new ObjectMapper();\r\n\t\t\r\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/Business\", \"root\", \"Password@123\");\r\n\t\t\r\n\t\t//object of statement class help us to execute queries\r\n\t\tStatement createStatement = conn.createStatement();\t\r\n\t\tResultSet executeQuery = createStatement.executeQuery(\"select * from CustomerInfo where purchasedDate=CURDATE() and Location ='Asia';\");\r\n\t\tint i =1;\r\n\t\t\r\n\t\twhile (executeQuery.next() && (executeQuery!=null))\r\n\t\t{\r\n\t\t\tcustomerDetails.setDetails(executeQuery.getString(1), executeQuery.getString(2), executeQuery.getInt(3), executeQuery.getString(4));\r\n\t\t\tSystem.out.println(customerDetails.getCourseName());\r\n\t\t\tSystem.out.println(customerDetails.getPurchaseDate());\r\n\t\t\tSystem.out.println(customerDetails.getAmount());\r\n\t\t\tSystem.out.println(customerDetails.getLocation());\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\t//converting data objects to json\t\r\n\t\t\tobjectMapper.writeValue(new File(\"E:\\\\Software Testing\\\\SDET\\\\Coding\\\\Eclipse Projects\\\\JDBC connection\\\\JSON\\\\customerDetails\" + i + \".json\"), customerDetails);\r\n\t\t\ti ++;\r\n\t\t}\t\t\r\n\t\tconn.close();\r\n\t\t\r\n\t}", "private static void prePopulateDb(AssetManager assetManager, StateDao stateDao){\n BufferedReader reader = null;\n StringBuilder stringBuilder = new StringBuilder();\n String json = \"\";\n try {\n reader = new BufferedReader(\n new InputStreamReader(assetManager.open(\"state-capital.json\")));\n\n // do reading, usually loop until end of file reading\n String mLine;\n while ((mLine = reader.readLine()) != null) {\n //process line\n stringBuilder.append(mLine);\n }\n json = stringBuilder.toString();\n } catch (IOException e) {\n //log the exception\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n //log the exception\n }\n }\n }\n try{\n JSONObject states = new JSONObject(json);\n JSONObject section = states.getJSONObject(\"sections\");\n populateFromJSON(section.getJSONArray(\"States (A-L)\"), stateDao);\n populateFromJSON(section.getJSONArray(\"States (M-Z)\"), stateDao);\n populateFromJSON(section.getJSONArray(\"Union Territories\"), stateDao);\n } catch (JSONException ignored){}\n }", "public abstract void loadFromDatabase();", "private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}", "private static void parseAndSave(String json, Context context) throws JSONException {\n dao = DAO.getInstance(context);\n ArrayList<MovieItem> movies = new ArrayList<>();\n //Decide if JSONObject Or JSONArray;\n JSONArray moviesArray = new JSONArray(json);\n for (int i = 0; i < moviesArray.length(); i++) {\n JSONObject movieObject = moviesArray.getJSONObject(i);\n String title = movieObject.getString(\"title\");\n String image = movieObject.getString(\"image\");\n int releaseYear = movieObject.getInt(\"releaseYear\");\n double rating = movieObject.getDouble(\"rating\");\n JSONArray genresArray = movieObject.getJSONArray(\"genre\");\n\n String genre1 = null;\n String genre2 = null;\n String genre3 = null;\n if (genresArray.length() == 1) {\n genre1 = genresArray.getString(0);\n }\n if (genresArray.length() == 2) {\n genre1 = genresArray.getString(0);\n genre2 = genresArray.getString(1);\n ;\n }\n if (genresArray.length() == 3) {\n genre1 = genresArray.getString(0);\n genre2 = genresArray.getString(1);\n genre3 = genresArray.getString(2);\n }\n\n dao.addMovieItem(title, releaseYear, rating, genre1, genre2, genre3, image);\n }\n }", "@Override\r\n\tpublic void onCreate(SQLiteDatabase db) {\r\n\t\t// Log.i(\"DBHelper:\", \"OnCreate() \");\r\n\t\tdb.beginTransaction();\r\n\t\ttry {\r\n\t\t\tdb.execSQL(QUESTION_CREATE);\r\n\t\t\tdb.execSQL(TOPIC_CREATE);\r\n\t\t\tdb.execSQL(CHOICE_CREATE);\r\n\t\t\tdb.execSQL(EXAM_CREATE);\r\n\t\t\tdb.execSQL(QUESTIONEXAM_CREATE);\r\n\t\t\tdb.setTransactionSuccessful();\r\n\t\t} finally {\r\n\t\t\tdb.endTransaction();\r\n\t\t}\r\n\r\n\t\t// import du lieu cho Questions, Topics & Choices\r\n\t\tCommonDAL common = new CommonDAL(db);\r\n\t\tcommon.importDataFromResource();\r\n\t\t// Main.getCommonDAL().importDataFromResource();\r\n\r\n\t\t// String strURL = context.getString(R.string.url_questions);\r\n\t\t// common.importDataFromURL(context, strURL);\r\n\t}", "private void mockUpDB() {\n locationDBAdapter.insertLocationData(\n \"ChIJd0UHJHcw2jARVTHgHdgUyrk\",\n \"Baan Thong Luang\",\n \"https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png\",\n \"https://maps.google.com/maps/contrib/101781857378275784222/photos\",\n \"CmRSAAAAEegLHnt03YODdRQ658VBWtIhOoz3TjUAj1oVqQIlLq0DkfSttuS-SQ3aOLBBbuFdwKbpkbsrFzMWghgyZeRD-n5rshknOXv6p5Xo3bdYr5FMOUGCy-6f6LYRy1PN9cKOEhBuj-7Dc5fBhX_38N_Sn7OPGhTBRgFIvThYstd7e8naYNPMUS2rTQ\",\n \"GOOGLE\",\n \"236/10 Wualai Road Tumbon Haiya, CHIANG MAI\",\n 18.770709,\n 98.978078,\n 0.0);\n\n }", "public FakeDatabase() {\n\t\t\n\t\t// Add initial data\n\t\t\n//\t\tSystem.out.println(authorList.size() + \" authors\");\n//\t\tSystem.out.println(bookList.size() + \" books\");\n\t}", "private AttendantDatabase() {}", "public void initDatabase() throws SQLException {\n\n ModelFactory factory = new ModelFactory(this.connection);\n\n StopsDao stopsData = factory.getStopsDao();\n\n ArrayList<Stop> stops = stopsData.getStopsFromCsv(getResource(\"stops.csv\"));\n\n Iterator<Stop> it = stops.iterator();\n while(it.hasNext()) {\n Stop stop = it.next();\n System.out.println(stop.toString());\n }\n\n\n /*\n ShapesDao shapesData = factory.getShapesDao();\n\n ArrayList<Shape> shapes = shapesData.getShapesFromCsv(getResource(\"shapes.csv\"));\n\n Iterator<Shape> it = shapes.iterator();\n while(it.hasNext()) {\n Shape shape = it.next();\n System.out.println(shape.toString());\n }\n\n CalendarDateDao calendarData = factory.getCalendarDatesDao();\n\n ArrayList<CalendarDate> agencies = calendarData.getCalendarDatesFromCsv(getResource(\"calendar_dates.csv\"));\n\n Iterator<CalendarDate> it = agencies.iterator();\n while(it.hasNext()) {\n CalendarDate date = it.next();\n System.out.println(date.toString());\n }\n\n AgencyDao agencyData = factory.getAgencyDao();\n agencyData.drop();\n agencyData.create();\n\n ArrayList<Agency> agencies = agencyData.getAgenciesFromCsv(getResource(\"agency.csv\"));\n\n Iterator<Agency> it = agencies.iterator();\n while(it.hasNext()) {\n Agency age = it.next();\n System.out.println(age.toString());\n agencyData.saveAgency(age);\n }\n\n RoutesDao routesDao = factory.getRouteDao();\n routesDao.drop();\n routesDao.create();\n\n ArrayList<Route> routes = routesDao.getRoutesFromCsv(getResource(\"routes.csv\"));\n\n Iterator<Route> it = routes.iterator();\n while(it.hasNext()) {\n Route route = it.next();\n System.out.println(route.toString());\n }*/\n }", "private AppRepo(Context context) {\n mDb = AppDB.getInstance(context);\n mFoods = getAllFoods();\n mPortions = getAllPortions();\n mMeals = getAllMeals();\n mConsumed = getAllConsumed();\n }", "public static void main(String[] args) throws Exception {\n Database database1 = new Database(\"jdbc:sqlite:Drink.db\");\n\n //database.init();\n database1.init();\n\n //OpiskelijaDao opiskelijaDao = new OpiskelijaDao(database);\n DrinkkiDao drinkkiDao = new DrinkkiDao(database1);\n AinesosaDao ainesosaDao = new AinesosaDao(database1);\n DrinkkiAinesDao drinkkiAinesDao = new DrinkkiAinesDao(database1);\n\n /*get(\"/\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"viesti\", \"tervehdys\");\n\n return new ModelAndView(map, \"index\");\n }, new ThymeleafTemplateEngine());\n\n get(\"/opiskelijat\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"opiskelijat\", opiskelijaDao.findAll());\n\n return new ModelAndView(map, \"opiskelijat\");\n }, new ThymeleafTemplateEngine());\n\n get(\"/opiskelijat/:id\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"opiskelija\", opiskelijaDao.findOne(Integer.parseInt(req.params(\"id\"))));\n\n return new ModelAndView(map, \"opiskelija\");\n }, new ThymeleafTemplateEngine()); */\n Spark.get(\"/ainesosat\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"ainesosat\", ainesosaDao.findAll());\n\n return new ModelAndView(map, \"ainesosat\");\n }, new ThymeleafTemplateEngine());\n\n Spark.post(\"/ainesosat\", (req, res) -> {\n String ainesosa = req.queryParams(\"ainesosa\");\n ainesosaDao.lisaaAinesosa(ainesosa);\n\n res.redirect(\"/ainesosat\");\n\n return \"\";\n });\n\n Spark.get(\"/drinkit\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"drinkit\", drinkkiDao.findAll());\n map.put(\"ainesosat\", ainesosaDao.findAll());\n\n return new ModelAndView(map, \"drinkit\");\n }, new ThymeleafTemplateEngine());\n\n Spark.post(\"/drinkit\", (req, res) -> {\n String drinkki = req.queryParams(\"drinkki\");\n String vahvuusStringina = req.queryParams(\"vahvuus\");\n double vahvuus = Double.parseDouble(vahvuusStringina);\n String lasi = req.queryParams(\"lasi\");\n\n drinkkiDao.nimeaDrinkki(drinkki, vahvuus, lasi);\n\n res.redirect(\"/drinkit\");\n\n return \"\";\n });\n \n Spark.post(\"/drinkit\", (req, res) -> {\n \n Integer poisto=Integer.parseInt(req.queryParams(\"poisto\"));\n \n\n drinkkiDao.delete(poisto);\n\n res.redirect(\"/drinkit\");\n return \"\";\n });\n \n Spark.post(\"/drinkit\", (req, res) -> {\n Integer drinkkiId = Integer.parseInt(req.params(\":id\"));\n Integer ainesId = Integer.parseInt(req.queryParams(\"userId\"));\n\n drinkkiAinesDao.tallennaID(drinkkiId, ainesId);\n\n String apuMaara = req.queryParams(\"maara\");\n Integer maara = Integer.parseInt(apuMaara);\n String ohje = req.queryParams(\"ohje\");\n \n drinkkiAinesDao.tallennaMuut(drinkkiId,ainesId, maara, ohje);\n res.redirect(\"/drinkit\");\n return \"\";\n });\n \n Spark.get(\"/home\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"drinkit\", drinkkiDao.findAll());\n map.put(\"ainesosat\", ainesosaDao.findAll());\n\n return new ModelAndView(map, \"home\");\n }, new ThymeleafTemplateEngine());\n\n /*Spark.get(\"/users/:id\", (req, res) -> {\n HashMap map = new HashMap<>();\n Integer userId = Integer.parseInt(req.params(\":id\"));\n map.put(\"user\", users.findOne(userId));\n map.put(\"tasks\", tasks.findNonCompletedForUser(userId));\n\n return new ModelAndView(map, \"user\");\n }, new ThymeleafTemplateEngine());*/\n }", "public static List<DataItem> importFromJSON(Context context){\n FileReader reader = null;\n File file = new File(Environment.getExternalStorageDirectory(), FILE_NAME);\n\n try {\n //Instantiate FileReader with file\n reader = new FileReader(file);\n //Populate DataItems class and return result\n Gson gson = new Gson();\n DataItems dataItems = gson.fromJson(reader, DataItems.class);\n return dataItems.getDataItems();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return null;\n }", "public static void loadData(DynamoDbClient ddb, String fileName) throws IOException {\r\n\r\n String sqlStatement = \"INSERT INTO MoviesPartiQ VALUE {'year':?, 'title' : ?, 'info' : ?}\";\r\n JsonParser parser = new JsonFactory().createParser(new File(fileName));\r\n com.fasterxml.jackson.databind.JsonNode rootNode = new ObjectMapper().readTree(parser);\r\n Iterator<JsonNode> iter = rootNode.iterator();\r\n ObjectNode currentNode;\r\n int t = 0 ;\r\n List<AttributeValue> parameters = new ArrayList<>();\r\n while (iter.hasNext()) {\r\n\r\n // Add 200 movies to the table.\r\n if (t == 200)\r\n break ;\r\n currentNode = (ObjectNode) iter.next();\r\n\r\n int year = currentNode.path(\"year\").asInt();\r\n String title = currentNode.path(\"title\").asText();\r\n String info = currentNode.path(\"info\").toString();\r\n\r\n AttributeValue att1 = AttributeValue.builder()\r\n .n(String.valueOf(year))\r\n .build();\r\n\r\n AttributeValue att2 = AttributeValue.builder()\r\n .s(title)\r\n .build();\r\n\r\n AttributeValue att3 = AttributeValue.builder()\r\n .s(info)\r\n .build();\r\n\r\n parameters.add(att1);\r\n parameters.add(att2);\r\n parameters.add(att3);\r\n\r\n // Insert the movie into the Amazon DynamoDB table.\r\n executeStatementRequest(ddb, sqlStatement, parameters);\r\n System.out.println(\"Added Movie \" +title);\r\n\r\n parameters.remove(att1);\r\n parameters.remove(att2);\r\n parameters.remove(att3);\r\n t++;\r\n }\r\n }", "public void loadJson(){\n new DownloadJsonTask().execute(URL3);\n// new DownloadJsonTask().execute(URL2);\n }", "public ReviewRepository() {\n Review vrGameOne = new Review(1L, \"BeatSaber\", \"/images/BeatSaber-photo1.jpg\",\n \"/images/BeatSaber-photo2.jpg\", \"Fitness/Rhythm\",\n \"This game is so much fun! It also gives you a great workout if you play on Expert Plus mode.\",\n \"May 1, 2018\", \"Beat Saber is a virtual reality rhythm game where the player slices \" +\n \"blocks representing musical beats with a pair of sabers.\");\n Review vrGameTwo = new Review(2L, \"The Room\", \"/images/the-room-photo1.jpg\",\n \"/images/the-room-photo2.jpg\", \"Puzzle/Adventure\", \"This game is \" +\n \"challenging but fun. I like how you are able to get hints if you get stuck.\", \"March 26, 2020\",\n \"The Room is game where the player has to solve puzzles to advance. Each level \" +\n \"has a different theme.\");\n Review vrGameThree = new Review(3L, \"Synth Riders\", \"/images/synth-riders-photo1.jpg\",\n \"/images/synth-riders-photo2.jpg\", \"Dance/Rhythm\", \"This game is so much fun. \" +\n \"It has great music and I love the neon environment.\", \"June 21, 2018\", \"Synth Riders is \" +\n \"a lot like Beat Saber, but instead of slicing blocks with sabers, the player hits multicolored orbs \" +\n \"representing musical beats.\");\n Review vrGameFour = new Review(4L, \"Bigscreen\", \"/images/bigscreen-photo1.jpg\",\n \"/images/bigscreen-photo2.jpg\", \"Entertainment\", \"I love this VR game. It \" +\n \"feels like you are actually in the movie theater! An added bonus is that you can mute other \" +\n \"people in the theater if they are being too loud! I love it!\", \"May 21, 2019\",\n \"BigScreen is a virtual reality movie theater. You can watch movies (even 3D ones) \" +\n \"with random people, or you can join a private theater with just you and your friends. In \" +\n \"addition to movies, there are also rooms where you can watch TV shows.\");\n\n reviewList.put(vrGameOne.getId(), vrGameOne);\n reviewList.put(vrGameTwo.getId(), vrGameTwo);\n reviewList.put(vrGameThree.getId(), vrGameThree);\n reviewList.put(vrGameFour.getId(), vrGameFour);\n }", "public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public JacobDatabase()\n {\n entries = new ArrayList<KantoDex>();\n \n }", "public CategoryGateway(SQLiteDatabase database){\n this.database = database;\n }", "public void initDatabase() {\n Datastore mongoDataStore = DatabaseHandler.getInstance().getMongoDataStore();\n initUsers();\n initAccounts();\n mongoDataStore.save(users);\n }", "private void loadJSON() throws FileNotFoundException\n\t{\n\n\t\tGsonBuilder builder= new GsonBuilder();\n\t\tGson gson = builder.create();\n\t\t\t\t\n\t\t//get a list of folders in the data directory\n\t\t\n\t\tFile[] directories = new File(\"data\").listFiles();\n\n\t\t//Loop through folders in data directory\n\t\tfor(File folder : directories)\n\t\t\t{\n\t\t\t\t//get a list of files inside the folder\n\t\t\t\tFile[] jsonItems = new File(folder.toString()).listFiles();\n\t\t\t\t\n\t\t\t\t//Loop through files inside the folder \n\t\t\t\tfor(File file : jsonItems)\n\t\t\t\t{\n\t\t\t\t\t//Store in directory map... substring to remove the \"data/\" portion... placed by filename to foldername\n\t\t\t\t\tString dir = file.toString().substring(5);\n\t\t\t\t\t\n\t\t\t\t\t//Generate player data from gson\n\t\t\t\t\tJsonReader reader = new JsonReader(new FileReader(file));\n\t\t\t\t\tPlayer player = gson.fromJson(reader, Player.class);\n\t\t\t\t\t\n\t\t\t\t\t//Store it in the map tied to it's directory\n\t\t\t\t\tplayerData.put(dir, player);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }", "public void getRestaurants () throws JSONException {\n\t\tint debug = 0; \n\t\tJSONObject js = new JSONObject(console.nextLine());\n\t\tfor (String name : JSONObject.getNames(js)) {\n\t\t\tJSONObject rest = js.getJSONObject(name);\n\t\t\tRestaurant r = new Restaurant(name);\n\t\t\tfor (String s : attributes) {\n\t\t\t\tif (rest.has(s)) {\n\t\t\t\t\tString v = rest.getString(s);\n\t\t\t\t\tif (v.contains(\"&amp;\")) {\n\t\t\t\t\t\tv =v.replace(\"&amp;\", \"and\");\n\t\t\t\t\t}\n\t\t\t\t\tif (v.contains(\"'\")) {\n\t\t\t\t\t\tv = v.replace(\"'\",\"\");\n\t\t\t\t\t}\n\t\t\t\t\tr.add(s,v);\n\t\t\t\t} else {\n\t\t\t\t\tr.add(s,\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\trestaurants.add(r);\n\t\t\t\n\t\t}\n\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tinitializeRe_DB initialer = new initializeRe_DB();\n\t\tinitialer.insertTOproject();\n\t\tinitialer.insertToresearcher();\n\t\tinitialer.insertTotask();\n\t}", "public Main()\n {\n createUsers();\n createFriendships();\n createMessages();\n\n }", "private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}", "@PostConstruct\r\n public void init() {\n File database = new File(applicationProps.getGeodb());\r\n try {\r\n reader = new DatabaseReader.Builder(database).withCache(new CHMCache()).build();\r\n } catch (IOException e) {\r\n log.error(\"Error reading maxmind DB, \", e);\r\n }\r\n }", "public static void initGenerateOfflineTestData(){\n dbInstance = Database.newInstance();\n initPlayer();\n initMatches();\n }", "public static void loadPracticeListFromFile() {\n JSONParser jsonParser = new JSONParser();\n\n try (FileReader reader = new FileReader(\"src/practiceList.json\")) {\n // Read JSON file\n Object object = jsonParser.parse(reader);\n\n //Iterate over word list array\n JSONArray wordList = (JSONArray) object;\n for (Object o : wordList) {\n\n JSONObject next = (JSONObject) o;\n String extra = \"\";\n\n if (((String) next.get(\"wordType\")).equalsIgnoreCase(\"verb\")) {\n extra = \"to \";\n }\n\n Word loadedWord = new Word(extra + next.get(\"english\"), (String) next.get(\"welsh\"), (String) next.get(\"wordType\"));\n\n addIntoPracticedWords(loadedWord);\n }\n\n } catch (ParseException | IOException e) {\n System.out.println(\"PracticeList file not found, will be created on exit.\");\n }\n }", "private void loadDataFromDatabase(){\n //get database connection\n DeezerOpener deezerOpener = new DeezerOpener(this);\n db = deezerOpener.getWritableDatabase();\n\n //define columns and create cursor\n String [] columns = {DeezerOpener.COL_ID, DeezerOpener.COL_ARTIST, DeezerOpener.COL_TITLE, DeezerOpener.COL_ALBUM, DeezerOpener.COL_DUR, DeezerOpener.COL_COVER};\n Cursor results = db.query( DeezerOpener.TABLE_NAME, columns, null, null, null, null, null);\n\n //get column indices\n int idColIndex = results.getColumnIndex(DeezerOpener.COL_ID);\n int artistColIndex = results.getColumnIndex(DeezerOpener.COL_ARTIST);\n int titleColIndex = results.getColumnIndex(DeezerOpener.COL_TITLE);\n int albumColIndex = results.getColumnIndex(DeezerOpener.COL_ALBUM);\n int durColIndex = results.getColumnIndex(DeezerOpener.COL_DUR);\n int coverColIndex = results.getColumnIndex(DeezerOpener.COL_COVER);\n\n //loop through the database obtaining data\n while(results.moveToNext()){\n long id = results.getLong(idColIndex);\n String artistDB = results.getString(artistColIndex);\n String titleDB = results.getString(titleColIndex);\n String albumDB = results.getString(albumColIndex);\n int durationDB = results.getInt(durColIndex);\n String coverURL_DB = results.getString(coverColIndex);\n\n //create the cover Bitmap\n Bitmap coverDB = getBitmapFromURL(coverURL_DB);\n\n //add to favourites list\n deezerFavList.add(new DeezerSong(titleDB, albumDB, artistDB, coverURL_DB, coverDB, durationDB, id));\n }\n }", "@Override\n public void run(String... args) throws Exception {\n Outfit outfit = new Outfit();\n outfit.setCurrentoutfit(true);\n outfitRepository.save(outfit);\n\n\n// Category category = new Category();\n//\n// category.setTops(\"Tops\");\n// category.setBottoms(\"Bottoms\");\n// category.setShoes(\"sneakers\");\n// category.setAccessories(\"\");\n// category.setJackets(\"\");\n// categoryRepository.save(category);\n Category tops = new Category();\n tops.setCategoryType(\"Tops\");\n categoryRepository.save(tops);\n\n Category bottoms = new Category();\n bottoms.setCategoryType(\"Bottoms\");\n categoryRepository.save(bottoms);\n\n Category accessories = new Category();\n accessories.setCategoryType(\"Accessories\");\n categoryRepository.save(accessories);\n\n Category shoes = new Category();\n shoes.setCategoryType(\"Shoes\");\n categoryRepository.save(shoes);\n\n Category jackets = new Category();\n jackets.setCategoryType(\"Jacket\");\n categoryRepository.save(jackets);\n/**\n * Here is where the items start for Outfit 1\n * */\n Item topOne = new Item();\n topOne.setCategory(tops);\n topOne.setColor(\"Black\");\n topOne.setFabricMaterial(\"cotton\");\n topOne.setSize(7);\n topOne.setItemName(\"Shirt\");\n topOne.setImages(\"image/women.png\");\n itemRepository.save(topOne);\n\n Item bottomOne = new Item();\n bottomOne.setCategory(bottoms);\n bottomOne.setColor(\"Light Blue\");\n bottomOne.setFabricMaterial(\"Denim\");\n bottomOne.setSize(31);\n bottomOne.setItemName(\"Bleached Light Blue Jeans\");\n itemRepository.save(bottomOne);\n\n Item shoeOne = new Item();\n shoeOne.setCategory(shoes);\n shoeOne.setColor(\"Black\");\n shoeOne.setFabricMaterial(\"Mesh\");\n shoeOne.setSize(7);\n shoeOne.setItemName(\"Shoe\");\n itemRepository.save(shoeOne);\n\n Item accessoryOne = new Item();\n accessoryOne.setCategory(accessories);\n accessoryOne.setColor(\"Gold\");\n accessoryOne.setFabricMaterial(\"Gold\");\n accessoryOne.setSize(1);\n accessoryOne.setItemName(\"Gold Watch\");\n itemRepository.save(accessoryOne);\n\n\n Item jacketOne = new Item();\n jacketOne.setCategory(jackets);\n jacketOne.setColor(\"Black\");\n jacketOne.setFabricMaterial(\"Leather\");\n jacketOne.setSize(30);\n jacketOne.setItemName(jacketOne.getColor() + \" Jacket\");\n itemRepository.save(jacketOne);\n\n\n /**\n * Here is where the items start for Outfit 2\n * */\n Item topTwo = new Item();\n topTwo.setCategory(tops);\n topTwo.setColor(\"White\");\n topTwo.setFabricMaterial(\"Blend\");\n topTwo.setSize(7);\n topTwo.setItemName(\"Crew Neck Tee Shirt\");\n itemRepository.save(topTwo);\n\n Item bottomTwo = new Item();\n bottomTwo.setCategory(bottoms);\n bottomTwo.setColor(\"Grey\");\n bottomTwo.setFabricMaterial(\"Denim\");\n bottomTwo.setSize(34);\n bottomTwo.setItemName(\"Skinny Jeans\");\n itemRepository.save(bottomTwo);\n\n Item shoeTwo = new Item();\n shoeTwo.setCategory(shoes);\n shoeTwo.setColor(\"White, Black, Red\");\n shoeTwo.setFabricMaterial(\"Mesh\");\n shoeTwo.setSize(7);\n shoeTwo.setItemName(\"Tennis Shoes\");\n itemRepository.save(shoeTwo);\n\n Item accessoryTwo = new Item();\n accessoryTwo.setCategory(accessories);\n accessoryTwo.setColor(\"Green\");\n accessoryTwo.setFabricMaterial(\"\");\n accessoryTwo.setSize(7);\n accessoryTwo.setItemName(\"Shirt\");\n itemRepository.save(accessoryTwo);\n\n Item jacketTwo = new Item();\n jacketTwo.setCategory(jackets);\n jacketTwo.setColor(\"Tan\");\n jacketTwo.setFabricMaterial(\"Leather\");\n jacketTwo.setSize(30);\n jacketTwo.setItemName(jacketTwo.getColor() + \" Jacket\");\n itemRepository.save(jacketTwo);\n\n\n /**\n * Here is where the items start for Outfit 3\n * */\n Item topThree = new Item();\n topThree.setCategory(tops);\n topThree.setColor(\"red\");\n topThree.setFabricMaterial(\"cotton\");\n topThree.setSize(7);\n topThree.setItemName(\"Shirt\");\n itemRepository.save(topThree);\n\n Item bottomThree = new Item();\n bottomThree.setCategory(bottoms);\n bottomThree.setColor(\"green\");\n bottomThree.setFabricMaterial(\"cotton\");\n bottomThree.setSize(31);\n bottomThree.setItemName(\"Jeans\");\n itemRepository.save(bottomThree);\n\n Item shoeThree = new Item();\n shoeThree.setCategory(shoes);\n shoeThree.setColor(\"green\");\n shoeThree.setFabricMaterial(\"\");\n shoeThree.setSize(7);\n shoeThree.setItemName(\"Shoe\");\n itemRepository.save(shoeThree);\n\n Item accessoryThree = new Item();\n accessoryThree.setCategory(accessories);\n accessoryThree.setColor(\"green\");\n accessoryThree.setFabricMaterial(\"\");\n accessoryThree.setSize(7);\n accessoryThree.setItemName(\"Shirt\");\n itemRepository.save(accessoryThree);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 4\n * */\n Item topFour = new Item();\n topFour.setCategory(tops);\n topFour.setColor(\"red\");\n topFour.setFabricMaterial(\"cotton\");\n topFour.setSize(7);\n topFour.setItemName(\"Shirt\");\n itemRepository.save(topFour);\n\n Item bottomFour = new Item();\n bottomFour.setCategory(bottoms);\n bottomFour.setColor(\"green\");\n bottomFour.setFabricMaterial(\"cotton\");\n bottomFour.setSize(31);\n bottomFour.setItemName(\"Jeans\");\n itemRepository.save(bottomFour);\n\n Item shoeFour = new Item();\n shoeFour.setCategory(shoes);\n shoeFour.setColor(\"green\");\n shoeFour.setFabricMaterial(\"\");\n shoeFour.setSize(7);\n shoeFour.setItemName(\"Shoe\");\n itemRepository.save(shoeFour);\n\n Item accessoryFour = new Item();\n accessoryFour.setCategory(accessories);\n accessoryFour.setColor(\"green\");\n accessoryFour.setFabricMaterial(\"\");\n accessoryFour.setSize(7);\n accessoryFour.setItemName(\"Shirt\");\n itemRepository.save(accessoryFour);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 5\n * */\n Item topFive = new Item();\n topFive.setCategory(tops);\n topFive.setColor(\"red\");\n topFive.setFabricMaterial(\"cotton\");\n topFive.setSize(7);\n topFive.setItemName(\"Shirt\");\n itemRepository.save(topFive);\n\n Item bottomFive = new Item();\n bottomFive.setCategory(bottoms);\n bottomFive.setColor(\"green\");\n bottomFive.setFabricMaterial(\"cotton\");\n bottomFive.setSize(31);\n bottomFive.setItemName(\"Jeans\");\n itemRepository.save(bottomFive);\n\n Item shoeFive = new Item();\n shoeFive.setCategory(shoes);\n shoeFive.setColor(\"green\");\n shoeFive.setFabricMaterial(\"\");\n shoeFive.setSize(7);\n shoeFive.setItemName(\"Shoe\");\n itemRepository.save(shoeFive);\n\n Item accessoriesFive = new Item();\n accessoriesFive.setCategory(accessories);\n accessoriesFive.setColor(\"green\");\n accessoriesFive.setFabricMaterial(\"\");\n accessoriesFive.setSize(7);\n accessoriesFive.setItemName(\"Shirt\");\n itemRepository.save(accessoriesFive);\n }", "public SolicitudREST() {\n gson = new Gson();\n sdao= new SolicitudDAO();\n }", "public DatabaseOperations(){\n\n }", "public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}", "public void parseJson() {\n\n try {\n JSONParser parser = new JSONParser();\n jsonReader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/resources/bangor-library.json\")));\n JSONObject jsonObj = (JSONObject) parser.parse(jsonReader);\n \n String name = (String) jsonObj.get(\"name\");\n libraryName = name;\n JSONArray extractedBooks = (JSONArray) jsonObj.get(\"books\");\n\n Iterator i = extractedBooks.iterator();\n while (i.hasNext()) {\n rec = new LibraryRecord();\n rec.setLib_name(libraryName);\n JSONObject innerObj = (JSONObject) i.next();\n rec.setBook_name(innerObj.get(\"name\").toString());\n rec.setAuth_name(innerObj.get(\"author\").toString());\n rec.setCat_name(innerObj.get(\"category\").toString());\n\n if (!LibraryAccess.bookShelves.isEmpty()) {\n for (LibraryRecord bookSaved : LibraryAccess.bookShelves) {\n if (this.rec.getHashOfContent() == bookSaved.getHashOfContent()) {\n duplicate = true;\n rec = null;\n }\n }\n if (!duplicate) {\n LibraryAccess.addRecord(rec);\n }\n duplicate = false;\n\n } else {\n System.out.println(\"Library empty : Adding records...\");\n LibraryAccess.addRecord(this.rec);\n }\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ParseException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void updateDB() {\n }", "public static void main (String[] arg){\n\t\tPhone phone = new Phone(\"206 123 4567\", \"425 123 4567\");\r\n\t\tAddress address = new Address(\"4101 398th W.\", \"tacoma\", \"washington\");\r\n\r\n\t\t//public Customer(String first_name, String last_name, Address address, Phone phone)\r\n\t\tCustomer1 cust = new Customer1(\"john\", \"doe\", address, phone);\r\n\r\n\t\t//need to create a Customer object to match specification at top of file\r\n\t\tCustomer customer = new Customer(cust);\r\n\r\n\t\t//https://stackoverflow.com/questions/16607444/how-to-serialize-object-to-json\r\n\t\t//*** use GsonBuilder().create() to SERIALIZE the customer object to a JSON string\r\n\t\tString stringJson = new GsonBuilder().create().toJson(customer);\r\n\r\n\t\tSystem.out.println( \"SERIALIZED Java object JSON string => \\r\\n\" + stringJson);\r\n\t\tSystem.out.println();\r\n\r\n\t\t//convert the Json string to JsonPath - good now\t\t\r\n\t\tSystem.out.println(\"Printing out the customer values: \");\r\n\r\n\t\tSystem.out.println( \"first_name = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.first_name\") +\r\n\t\t\t\t\", last_name = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.last_name\"));\r\n\r\n\t\t//\t\tPhone phone = new Phone(\"206 123 4567\", \"425 123 4567\");\r\n\r\n\t\tSystem.out.println( \"cell phone = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.phone.cell\") +\r\n\t\t\t\t\", home phone = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.phone.home\"));\r\n\r\n\t\t// \"address\": {\r\n\t\t// \"street\": \"4101 398th W.\",\r\n\t\t// \"city\": \"tacoma\",\r\n\t\t// \"state\": \"washington\"\r\n\t\t// },\r\n\r\n\t\tSystem.out.println( \"\\r\\ncustomer.address.street = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.address.street\") +\r\n\t\t\t\t\"\\r\\ncustomer.address.city = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.address.city\")\t+\r\n\t\t\t\t\"\\r\\ncustomer.address.state = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.address.state\"));\r\n\t}", "private UserDao() {\n\t\tusersList = new HashMap<String, User>();\n\t\tusersDetails = JsonFilehandling.read();\n\t\tfor (JSONObject obj : usersDetails) {\n\t\t\tusersList.put(obj.get(\"id\").toString(), new User(obj.get(\"id\").toString(),obj.get(\"name\").toString(), obj.get(\"profession\").toString()));\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\tRaterDB.initialize();\r\n\t\t\tint size = RaterDB.size();\r\n\t\t\tSystem.out.println(size);\r\n\t\t}", "private void readFromJSON(String filename) {\n JSONParser parser = new JSONParser();\n\n try\n {\n Object obj = parser.parse(new FileReader(filename));\n JSONObject jsonObject = (JSONObject) obj;\n Menu drinks = getMenu(jsonObject, \"Drink\");\n Menu types = getMenu(jsonObject, \"Type\");\n Menu toppings = getMenu(jsonObject, \"Toppings\");\n Menu sizes = getMenu(jsonObject, \"Size\");\n menuMap.put(\"Drink\", drinks);\n menuMap.put(\"Size\", sizes);\n menuMap.put(\"Toppings\", toppings);\n menuMap.put(\"Type\", types);\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Not found menu.json, exit now.\");\n System.exit(1);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }", "public RecipeDatabase() {\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference AllRecipeRef = database.getReference(\"allRecipes\");\n DatabaseReference newRecipeRef = AllRecipeRef.push();\n newRecipeRef.setValue(new Recipe(\"Pizza\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Sushi Rolls\", 2.0, \"mkp_logo\", \"Japanese\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Crepe\", 3.5, \"mt_logo\", \"French\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Baked Salmon\", 0, \"pb_logo\", \"American\", \"5\", \"1. prep ingredients\\n2.cook food\\n3.eat your food\", \"ingredients1 ingredient 2 ingredient3\"));\n }", "public static void main(String[] args) {\n\t\tDao dao = new PostgresDao();\n\t\tnew Client().getData(dao);\n\t}", "private void initDB(){\n gistHelper = new GistSQLiteHelper(mainActivity, \"GistsDB\", null, 1);\n db = gistHelper.getWritableDatabase();\n }", "public AnalogArchiveApp() {\n jsonWriter = new JsonWriter(\"./data/saveFile.json\");\n jsonReader = new JsonReader(\"./data/saveFile.json\");\n init();\n }", "public void database() throws IOException\n {\n \tFile file =new File(\"data.txt\");\n\t if(!file.exists())\n\t {\n\t \tSystem.out.println(\"File 'data.txt' does not exit\");\n\t System.out.println(file.createNewFile());\n\t file.createNewFile();\n\t databaseFileWrite(file);//call the databaseFileRead() method, to initialize data from ArrayList and write data into data.txt\n\t }\n\t else\n\t {\n\t \tdatabaseFileRead();//call the databaseFileRead() method, to load data directly from data.txt\n\t }\n }", "public void retrieveTodo() {\r\n File file = new File(\"C:\\\\Users\\\\Dalia\\\\Desktop\\\\CPSC 210\\\\Project\\\\project_b2h3b\\\\data\");\r\n JFileChooser chooser = new JFileChooser(file);\r\n int userSelection = chooser.showOpenDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (userSelection == JFileChooser.APPROVE_OPTION) {\r\n fileName = f.getAbsolutePath();\r\n reader = new MyTodoJsonReader(fileName);\r\n try {\r\n myTodo = reader.readMyToDoList();\r\n todoListGui();\r\n } catch (IOException ioException) {\r\n JOptionPane.showMessageDialog(null, \"File doesn't exist!\");\r\n }\r\n }\r\n }", "public static void main(String args[]) {\n\t\tNuxeoClient client = new NuxeoClient.Builder().url(\"http://localhost:8080/parliament\")\n\t\t// NuxeoClient client = new NuxeoClient.Builder().url(\"http://tourismministry.phoenixsolutions.com.np:8888/parliament\")\n\t\t\t\t.authentication(\"Administrator\", \"Administrator\").schemas(\"*\") // fetch all document schemas\n\t\t\t\t.connect();\n\t\tRepository repository = client.repository();\n\n//Menu\n\t//create\n\t\tDocument file = Document.createWithName(\"One\", \"Band\");\n\t\tDocument menu = Document.createWithName(\"menu\", \"Folder\");\n\t\t// menu.setPropertyValue(\"band:abbr\", \"ELF\");\n\t\trepository.createDocumentByPath(\"/\", menu);\n\t\tDocument report = Document.createWithName(\"report-list\", \"Report-List\");\n\t\trepository.createDocumentByPath(\"/menu\", report);\n\t\tDocument event = Document.createWithName(\"event-list\", \"Event-List\");\n\t\trepository.createDocumentByPath(\"/menu\", event);\n\t\tDocument meeting = Document.createWithName(\"meeting-list\", \"Meeting-List\");\n\t\trepository.createDocumentByPath(\"/menu\", meeting);\n\t\tDocument ics = Document.createWithName(\"integrated-central-status-list\", \"Integrated-Central-Status-List\");\n\t\trepository.createDocumentByPath(\"/menu\", ics);\n\n\n\t\tUserManager userManager = client.userManager();\n\n\t\tcreateUsers(userManager,\"operator\",\"Operator\",\"operator\");\n\t\tcreateUsers(userManager,\"secretary\",\"Secretary\",\"secretary\");\n\t\tcreateUsers(userManager,\"depsecretary\",\"DepSecretary\",\"depsecretary\");\n\t\tcreateUsers(userManager,\"education\",\"Education\",\"education\");\n\t\tcreateUsers(userManager,\"health\",\"Health\",\"health\");\n\t\tcreateUsers(userManager,\"tourism\",\"Tourism\",\"tourism\");\n\n\t\tString[] memberUsersSecretariat = {\"operator\",\"secretary\",\"depsecretary\"};\n\t\tString[] memberUsersBeruju = {\"education\",\"health\",\"tourism\"};\n\t\tcreateGroup(userManager,\"secretariat\",\"Secretariat\",memberUsersSecretariat);\n\t\tcreateGroup(userManager,\"beruju\",\"Beruju\",memberUsersBeruju);\n\t\n//fetching\n\n\t\t// Document myfile = repository.fetchDocumentByPath(\"/default-domain/workspaces/Bikings/Liferay/One\");\n\t\t// String title = myfile.getPropertyValue(\"band:band_name\"); // equals to folder\n\t\t// System.out.println(title);\n\n\n// file upload\n\n\t\t// Document domain = client.repository().fetchDocumentByPath(\"/default-domain\");\n\n\t\t// Let's first retrieve batch upload manager to handle our batch:\n\t\t// BatchUploadManager batchUploadManager = client.batchUploadManager();\n\n\t\t// // // getting local file\n\t\t// ClassLoader classLoader = new NuxeoConnect().getClass().getClassLoader();\n\t\t// File file = new File(classLoader.getResource(\"dipesh.jpg\").getFile());\n\n\t\t// // // create a new batch\n\t\t// BatchUpload batchUpload = batchUploadManager.createBatch();\n\t\t// Blob fileBlob = new FileBlob(file);\n\t\t// batchUpload = batchUpload.upload(\"0\", fileBlob);\n\n\t\t// // // attach the blob\n\t\t\n\t\t// Document doc = client.repository().fetchDocumentByPath(\"/default-domain/workspaces/Phoenix/DipeshCollection/dipeshFile\");\n\t\t// doc.setPropertyValue(\"file:content\", batchUpload.getBatchBlob());\n\t\t// doc = doc.updateDocument();\n\t\t// // get\n\t\t// Map pic = doc.getPropertyValue(\"file:content\");\n\t\t// System.out.print(pic);\n\t}", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void testDB(){\n DB=new LinkedList<>(); \n DB.add(new Offer(\"ID1\",\"AGV923\",\"Nico\",\"Leo\",\"Salvo\",\"\"));\n DB.add(new Offer(\"ID2\",\"ADJ325\",\"Tizio\", \"Caio\", \"Sempronio\",\"\"));\n DB.add(new Offer(\"ID3\",\"T56G2G\",\"Antonella\", \"Daniele\",\"\",\"\"));\n }", "public static void main(final String[] args) throws Exception {\n MongoClient mongo = new MongoClient(\"localhost\", 27017);\n /**** Get database ****/\n // if database doesn't exists, MongoDB will create it for you\n DB db = mongo.getDB(\"enron\");\n DBCollection table = db.getCollection(\"demo\");\n BasicDBObject searchQuery = new BasicDBObject();\n searchQuery.put(\"_id\", 1);\n DBCursor cursor = table.find(searchQuery).limit(5);\n System.out.println(\"test\");\n System.out.println(JSON.serialize(cursor));\n\n }", "String getDatabase();", "private DatabaseCustomAccess(Context context) {\n\t\thelper = new SpokaneValleyDatabaseHelper(context);\n\n\t\tsaveInitialPoolLocation(); // save initial pools into database\n\t\tsaveInitialTotalScore(); // create total score in database\n\t\tsaveInitialGameLocation(); // create game location for GPS checking\n\t\tLoadingDatabaseTotalScore();\n\t\tLoadingDatabaseScores();\n\t\tLoadingDatabaseGameLocation();\n\t}", "public interface DB_manager {\n\n\n boolean check_exist_client(Client c);\n\n\n ///add function content value\n String addclient(ContentValues client);\n String addmodel(ContentValues model);\n int addcar(ContentValues car);\n int addbranch(ContentValues car);\n void add_url_image(ContentValues contentValues);\n\n\n\n ////list function\n List<Models> allmodels();\n List<Client> allclient();\n List<Branch> allbranch();\n List<Car> allcars();\n public void allurl();\n\n\n\n /// instance of all database\n void db_all(Context context);\n\n\n ///cursor list function\n Cursor Allmodels();\n Cursor Allclient();\n Cursor Allcar();\n Cursor Allbranch();\n\n public String get_url_image(String num);\n\n ///delete function\n int delete_client(int id);\n int delete_model(int id);\n int delete_branch(int id);\n int delete_car(int id);\n\n\n\n}", "private void loadDatabase() {\n Runnable load = new Runnable() {\n public void run() {\n try {\n boolean isSuccess = false;\n File data = Environment.getDataDirectory();\n\n String currentDbPath = \"//data//com.udacity.adcs.app.goodintents//databases//goodintents.db\";\n\n File currentDb = new File(data, currentDbPath);\n File restoreDb = getFileFromAsset(mActivity, mActivity.getExternalFilesDir(null) + \"/\", \"goodintents.db\");\n\n if (restoreDb != null ? restoreDb.exists() : false) {\n FileInputStream is = new FileInputStream(restoreDb);\n FileOutputStream os = new FileOutputStream(currentDb);\n\n FileChannel src = is.getChannel();\n FileChannel dst = os.getChannel();\n dst.transferFrom(src, 0, src.size());\n\n is.close();\n os.close();\n src.close();\n dst.close();\n isSuccess = true;\n }\n\n if (isSuccess) {\n PreferencesUtils.setBoolean(mActivity, R.string.initial_db_load_key, true);\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n } finally {\n mActivity.runOnUiThread(loadDatabaseRunnable);\n }\n }\n };\n\n Thread thread = new Thread(null, load, \"loadDatabase\");\n thread.start();\n }", "@GetMapping(path = \"${pathInitDatabase}\", produces = MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic Object feedDatabase() {\r\n\t\tlivreDAO.feed();\r\n\t\tMap<String, String> r = new HashMap<String, String>();\r\n\t\tr.put(databaseReset, \"\" + true);\r\n\t\tr.put(databaseFeed, \"\" + true);\r\n\t\tr.put(databaseNumberBooks, \"\" + livreDAO.getAllLivres().size());\r\n\r\n\t\treturn r;\r\n\t}", "@Override\n public void run(ApplicationArguments args){\n User user1 = new User(\"Accounts Payable\");\n userRepository.save(user1);\n\n User user2 = new User(\"Admin\");\n userRepository.save(user2);\n\n Folder folder1 = new Folder(\"Accounts\", user1);\n folderRepository.save(folder1);\n\n Folder folder2 = new Folder(\"Letters\", user2);\n folderRepository.save(folder2);\n\n File file1 = new File(\"Invoice001\", \".exe\", 1.23, folder1);\n fileRepository.save(file1);\n\n File file2 = new File(\"Invoice002\", \".exe\", 1.45, folder1 );\n fileRepository.save(file2);\n\n File file3 = new File(\"Letter001\", \".doc\", 1.67, folder2);\n fileRepository.save(file3);\n\n\n }", "public static void main(String[] args) {\n\t\tCluster cluster = CouchbaseCluster.create();\n\t\t// Open the default bucket and the \"beer-sample\" one\n\t\tBucket defaultBucket = cluster.openBucket();\n\t\t// Disconnect and clear all allocated resources\n\n\t\t/*JsonObject productJson = JsonObject.empty().put(\"name\", \"An ice sculpture\").put(\"price\", 12.50)\n\t\t\t\t.put(\"length\", 7.0).put(\"width\", 12.0).put(\"height\", 9.5)\n\t\t\t\t.put(\"description\", \"This product is not for sale\");\n\n\t\tJsonDocument productJsonToBeStored = JsonDocument.create(\"productKey\", productJson);\n\t\tJsonDocument productRecievedFromDB = defaultBucket.upsert(productJsonToBeStored);*/\n\t\t\n\t\t\n\n\t\tcluster.disconnect();\n\t}", "private boolean loadDatabase(){\n Input input = new Input();\n recipes = input.getDatabase();\n if(recipes == null){\n recipes = new ArrayList<>();\n return false;\n }\n return true;\n }" ]
[ "0.6586117", "0.5897948", "0.58510596", "0.5782282", "0.57249427", "0.5707552", "0.5680607", "0.56400913", "0.56113285", "0.5583156", "0.5580644", "0.55678874", "0.55456257", "0.55059886", "0.5501014", "0.5468732", "0.5441115", "0.5436585", "0.54307485", "0.5422534", "0.5404633", "0.5402812", "0.5392071", "0.53909355", "0.538528", "0.537412", "0.537047", "0.53701484", "0.53638595", "0.53559506", "0.53556603", "0.5315718", "0.53003263", "0.5300154", "0.5287301", "0.52746814", "0.5252556", "0.52436817", "0.52283204", "0.5224364", "0.5221179", "0.5205061", "0.5204014", "0.517681", "0.5165671", "0.5139943", "0.5134554", "0.51237345", "0.5122555", "0.5120874", "0.5119016", "0.51169753", "0.5116168", "0.5115758", "0.5108768", "0.5106196", "0.5091554", "0.5087261", "0.50795364", "0.5068121", "0.5060113", "0.50597924", "0.5058485", "0.5055483", "0.5051501", "0.503876", "0.50361526", "0.50331074", "0.5028154", "0.50190884", "0.5014912", "0.500767", "0.5002755", "0.4995308", "0.49940744", "0.49888742", "0.49865395", "0.4980512", "0.49772555", "0.49722594", "0.49699163", "0.49672526", "0.49641144", "0.49633613", "0.49618587", "0.4961519", "0.49589893", "0.49577147", "0.4957156", "0.4955007", "0.4950903", "0.49487036", "0.49459562", "0.4945449", "0.49413455", "0.4940062", "0.4939973", "0.49397704", "0.49266413", "0.4925391", "0.49182662" ]
0.0
-1
Database db = new Database("data/restaurants.json", "data/reviews.json" , "data/users.json");
@Test public void test02() { User user1 = new User("megan"); user1.setName("Name1"); assertEquals("Name1", user1.getName()); // db.addRestaurant(rest1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Database(JsonObject data){\n this.obj = data;\n rest = (JsonArray) obj.get(\"restaurants\");\n /* TODO \nset the memebr variable declared above.*/\n }", "public YelpDB(String restaurants, String reviews, String users) throws IOException {\n\n this.gson = new Gson();\n this.restaurantMap = new ConcurrentHashMap<String, Restaurant>();\n this.reviewMap = new ConcurrentHashMap<String, Review>();\n this.userMap = new ConcurrentHashMap<String, YelpUser>();\n\n // Process restaurants\n try (BufferedReader reader = new BufferedReader(new FileReader(restaurants))) {\n String line;\n while ((line = reader.readLine()) != null) {\n Restaurant r = gson.fromJson(line, Restaurant.class);\n String business_id = r.getID();\n this.restaurantMap.put(business_id, r);\n }\n }\n\n // Process reviews\n try (BufferedReader reader = new BufferedReader(new FileReader(reviews))) {\n String line;\n while ((line = reader.readLine()) != null) {\n Review r = gson.fromJson(line, Review.class);\n String review_id = r.getID();\n this.reviewMap.put(review_id, r);\n }\n }\n\n // Process users\n try (BufferedReader reader = new BufferedReader(new FileReader(users))) {\n String line;\n while ((line = reader.readLine()) != null) {\n YelpUser u = gson.fromJson(line, YelpUser.class);\n String user_id = u.getID();\n this.userMap.put(user_id, u);\n }\n }\n }", "public static void run(String[] args){\n writeList(\"data\\\\yelp_academic_dataset_business.json\", \"data\\\\list-business.txt\", \"business_id\");\n writeList(\"data\\\\yelp_academic_dataset_user.json\", \"data\\\\list-user.txt\", \"user_id\");\n writeList(YelpBusinessJsonScraper.getCategories(args), \"data\\\\list-categories.txt\");\n writeList(\"data\\\\yelp_academic_dataset_review.json\", \"data\\\\list-review.txt\", \"review_id\");\n\n // Write to SQL\n writeSQL(\"data\\\\yelp_academic_dataset_business.json\", \"data\\\\SQL-business.txt\",\n new String [] {\"business_id\", \"name\", \"full_address\", \"score\"});\n writeSQL(\"data\\\\yelp_academic_dataset_user.json\", \"data\\\\SQL-user.txt\",\n new String [] {\"user_id\", \"name\"});\n writeSQLReviews(\"data\\\\yelp_academic_dataset_review.json\", \"data\\\\SQL-review.txt\",\n \"data\\\\list-business.txt\", \"data\\\\list-user.txt\", new String [] {\"review_id\", \"text\", \"stars\", \"businessID\", \"userID\"}, 6);\n writeSQL(YelpBusinessJsonScraper.getCategories(args), \"data\\\\SQL-categories.txt\");\n writeSQLRelationshipTable(\"data\\\\yelp_academic_dataset_business.json\", \"data\\\\SQL-business-categories-rel.txt\",\n \"data\\\\list-business.txt\", \"data\\\\list-categories.txt\", \"business_id\");\n\n }", "public static void main(String[] args) throws MalformedURLException {\n HttpClient httpClient = new StdHttpClient.Builder() \n .url(\"http://localhost:5984\") \n .build(); \n //Connect to CouchDB instance\n CouchDbInstance dbInstance = new StdCouchDbInstance(httpClient);\n //Point to Person database\n CouchDbConnector db = dbInstance.createConnector(\"person\", true);\n //Student Object\n Student s = new Student();\n s.setFirstname(\"aoifes\");\n s.setSurname(\"sayers\");\n s.setEmail(\"[email protected]\");\n\n List<String> listOfIds = db.getAllDocIds();\n System.out.println(listOfIds);\n System.out.println(listOfIds.get(0));\n String firstStud = listOfIds.get(0);\n Student stud = db.get(Student.class, firstStud);\n System.out.println(stud.getTnumber());\n\n db.create((s));\n\n\n\n HttpClient httpClient1 = new StdHttpClient.Builder() \n .url(\"http://localhost:5984\") \n .build(); \n\n }", "private void setBasketRepository() {\n ObjectMapper mapper = new ObjectMapper();\n TypeReference<List<Basket>> typeReference = new TypeReference<>() {\n };\n InputStream inputStream = TypeReference.class.getResourceAsStream(\"/json/data_demo.json\");\n try {\n List<Basket> invoices = mapper.readValue(inputStream, typeReference);\n basketRepository.saveAll(invoices);\n log.info(\"Saved in database successfully!\");\n } catch (IOException e) {\n log.error(\"Unable to save in database: {}\", e.getMessage());\n }\n }", "public RecipeDataBase(){\n //recipes = new ArrayList<>();\n loadDatabase();\n \n }", "private void getDatabase(){\n\n }", "public Repository (Application application, Activity activity){\n VideoDatabase database=VideoDatabase.getInstance(application);\n myDAO=database.myDAO();\n allChapters=myDAO.getAllChapter();\n allLecture=myDAO.getAllLecture();\n this.activity=activity;\n //allChapterJson=myDAO.getAllChapterJson();\n //allLectureJson=myDAO.getAllLectureJson();\n }", "public Database initDB() {\n Database db = new Database(\"dataBase.db\");\n\n// db.insertData(\"1 Dragos Dinescu [email protected] 0744522600 Digi 10-12-2020\");\n// db.insertData(\"2 Adelina Mirea [email protected] 0733651320 Orange 14-10-2020\");\n// db.insertData(\"3 Radu Sorostinean [email protected] 0733723321 Digi 1-10-2020\");\n// db.insertData(\"4 Andrei Brasoveanu [email protected] 0732341390 Vodafone 12-11-2020\");\n return db;\n\n //db.deleteFromDB();\n //db.updateDB(\"1 alex radu [email protected] 022256926 orange 10/08/2010\");\n }", "Database createDatabase();", "public Database() {\n //Assign instance variables.\n this.movies = new ArrayList<>();\n this.users = new ArrayList<>();\n }", "public static boolean getDb() {\n boolean drinkOK = false, ingredientOK = false;\n String responseBody = getWebData(\"getIngredients.php\");\n // If the getWebData returns error the HTTP-get has failed and\n // the paring shall not be done.\n if (responseBody.equals(\"error\"))\n return false;\n Log.d(\"getDB\", responseBody);\n try {\n // Prepare the JSON to be parsed.\n JSONObject json = new JSONObject(responseBody);\n JSONArray jArray = json.getJSONArray(\"ingredients\");\n Log.d(\"getDrinks.php\", jArray.toString());\n for (int i = 0; i < jArray.length(); ++i) {\n JSONObject jObject;\n jObject = jArray.getJSONObject(i);\n // Parses the JSON and creates the ContentValues object.\n ContentValues values = new Ingredient(jObject.getInt(\"_id\"), jObject.getString(\"name\"),\n jObject.getString(\"url\"), jObject.getString(\"ingredienttype\"), jObject.getInt(\"alcohollevel\"),\n jObject.getString(\"description\")).getContentValues();\n // Insets the data into the SQLite.\n Uri myBarUriIngredient = MyBarApplication.contentResolver().insert(\n MyBarContentProvider.CONTENTURI_INGREDIENT, values);\n Log.d(Data.class.getClass().getName(),\n \"Inserted Ingredient. Created row: \" + myBarUriIngredient.toString());\n }\n ingredientOK = true;\n\n } catch (JSONException e) {\n Log.e(\"JSONError ingredients\", e.toString());\n ingredientOK = false;\n }\n\n responseBody = getWebData(\"getDrinks.php\");\n Log.d(\"getDB\", responseBody);\n try {\n // Prepare the JSON to be parsed.\n JSONObject json = new JSONObject(responseBody);\n // Creates the JSON array from the drinks array.\n JSONArray jArray = json.getJSONArray(\"drinks\");\n // Print the json to the Log.d.\n Log.d(\"getDrinks.php\", jArray.toString());\n for (int i = 0; i < jArray.length(); ++i) {\n JSONObject jObject = jArray.getJSONObject(i);\n // Gets the values from the JSON-data.\n ContentValues values = new Drink(jObject.getInt(\"_id\"), jObject.getString(\"name\"),\n jObject.getString(\"url\"), jObject.getString(\"glass\"), jObject.getString(\"ingredient\"),\n jObject.getString(\"description\"), jObject.getInt(\"rating\"),\n // Sets favorite to 0 and gets the content values.\n 0).getContentValues();\n // Insets the data into the SQLite\n Uri myBarUriDrink = MyBarApplication.contentResolver().insert(MyBarContentProvider.CONTENTURI_DRINK,\n values);\n Log.d(Data.class.getClass().getName(), \"Inserted Drink. Created row: \" + myBarUriDrink.toString());\n }\n // Sets the return variable.\n drinkOK = true;\n } catch (JSONException e) {\n // Prints to Log.d.\n Log.e(\"JSONError drinks\", e.toString());\n drinkOK = false;\n }\n\n return ingredientOK & drinkOK;\n }", "@Override\n public void run(String... args) {\n try {\n\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\n ObjectMapper mapper = new ObjectMapper();\n\n final ObjectMapper configure = mapper.configure(\n DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true\n );\n\n InputStream inputStreamProducts = classLoader.getResourceAsStream(\"json/product.json\");\n InputStream inputStreamInventory = classLoader.getResourceAsStream(\"json/inventory.json\");\n\n Product[] product = mapper.readValue(inputStreamProducts, Product[].class);\n Inventory[] inventory = mapper.readValue(inputStreamInventory, Inventory[].class);\n\n MongoClient client1 = new MongoClient(\"localhost\");\n\n // Dropping the Warehouserest database in mongodb\n client1.dropDatabase(\"warehouse\");\n\n// ## Start Morphia part\n Morphia morphia = new Morphia();\n morphia.map(Product.class);\n morphia.map(Inventory.class);\n\n Datastore datastore = morphia.createDatastore(client1, \"warehouse\");\n\n for (Product valueProducts : product) {\n datastore.save(valueProducts);\n }\n\n for (Inventory inventories : inventory) {\n datastore.save(inventories);\n }\n\n\n\n/*\n// # Start populating mongodb from Inventory json\n InputStream inputStreamInventory = classLoader.getResourceAsStream(\"json/inventory.json\");\n\n // Load Inventory json at startup\n assert inputStreamInventory != null;\n InputStreamReader inputStreamReaderInventory = new InputStreamReader(inputStreamInventory);\n BufferedReader bufferedReaderInventory = new BufferedReader(inputStreamReaderInventory);\n StringBuilder stringBufferInventory = new StringBuilder();\n\n String line1 = \"\";\n while ((line1 = bufferedReaderInventory.readLine()) != null) {\n stringBufferInventory.append(line1);\n }\n\n MongoCollection<Document> collectionInventory = client1.getDatabase(\"warehouse\").getCollection(\"inventory\");\n Document doc1 = Document.parse(stringBufferInventory.toString());\n collectionInventory.insertOne(doc1);*/\n\n System.out.println(\"Inventory loaded!\");\n System.out.println(\"Products loaded!\");\n } catch (Exception e) {\n System.out.println(\"Not able to load products: \" + e.getMessage());\n }\n }", "public static void main(String[] args){\n launch(args);\n //this is some code that tests out the JSON saving and importing of data\n // FoodBank fb1 = new FoodBank(\"Blue Ridge Area Food Bank\");\n // FoodBank fb2 = new FoodBank(\"Loaves & Fishes Food Pantry\");\n\n // fb1.setLocation(new Coordinate(38.039690, -78.480940));\n // fb2.setLocation(new Coordinate(38.077940, -78.500490));\n\n // FoodItem beefaroni = new FoodItem(\"Beefaroni\");\n // beefaroni.setCaloriesPerServing(350);\n // beefaroni.setCarbsPerServing(48);\n // beefaroni.setCholesterolPerServing(20);\n // beefaroni.setFatPerServing(13);\n // beefaroni.setServingsPerContainer(1);\n // beefaroni.setQuantity(45);\n // beefaroni.addFoodType(FoodItem.FoodType.MEAT);\n // beefaroni.addFoodType(FoodItem.FoodType.GRAIN);\n\n // FoodItem broth = new FoodItem(\"Swanson Chicken Broth\");\n // broth.setCaloriesPerServing(20);\n // broth.setCarbsPerServing(2);\n // broth.setCholesterolPerServing(0);\n // broth.setFatPerServing(0);\n // broth.setServingsPerContainer(1);\n // broth.setQuantity(28);\n // broth.addFoodType(FoodItem.FoodType.NONE);\n\n // fb1.addFoodItem(beefaroni);\n // fb2.addFoodItem(broth);\n\n // FoodBankList fbl = new FoodBankList();\n // fbl.addFoodBank(fb1);\n // fbl.addFoodBank(fb2);\n\n // JSONFileHandler.getJFH().saveToJSON(fbl.toJSON(), \"FoodBanks.json\");\n\n // FoodBankList importedfbl = new FoodBankList(JSONFileHandler.getJFH().getJSONFromFile(\"FoodBanks.json\"));\n // ArrayList<FoodBank> foodBanks = importedfbl.getFoodBanks();\n // foodBanks.forEach(fb -> {\n // System.out.println(\"Imported food bank with name: \" + fb.getName());\n // });\n }", "@GET\n @Path(\"/database/get\")\n public Response getDatabase() throws JsonGenerationException, JsonMappingException, IOException{\n return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Database2.get())).build();\n }", "public static MainDatabase deserializeDatabase() {\n MainDatabase data = new MainDatabase();\n // first check if the file exists\n File file = new File(Constants.SAVE_FILE);\n if (!file.exists()) {\n return data;\n }\n try (FileInputStream in = new FileInputStream(Constants.SAVE_FILE);\n BufferedInputStream reader = new BufferedInputStream(in)) {\n\n // un-encrypted header (salt and iv necessary for decryption)\n byte[] salt = new byte[reader.read()];\n reader.read(salt);\n byte[] iv = new byte[reader.read()];\n reader.read(iv);\n Cipher enc = getEncryptionCipher(salt, iv);\n\n try (CipherInputStream cis = new CipherInputStream(reader, enc);\n ObjectInputStream ois = new ObjectInputStream(cis)) {\n\n // if we need any settings, read them here\n\n // read the travel database\n int count = ois.readByte();\n for (int i = 0; i < count; i++) {\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n data.addTravel((SingleTravel) ois.readObject());\n }\n }\n\n // read the user database\n count = ois.readInt();\n for (int i = 0; i < count; i++) {\n RegisteredUser ru = (RegisteredUser) ois.readObject();\n data.addUser(ru);\n\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n int itSize = ois.readInt();\n // check the itinerary to make sure it is still valid\n boolean validItinerary = (itSize > 0);\n Itinerary it = new Itinerary();\n for (int k = 0; k < itSize; k++) {\n try {\n SingleTravel st = data.getTravel(TravelType.values()[ois.readByte()],\n ois.readUTF());\n if (st == null) { // doesn't exist; do not add itinerary\n validItinerary = false;\n } else {\n it.add(st);\n }\n } catch (IllegalArgumentException e) {\n validItinerary = false;\n // we don't need to log this -- probably a travel expired\n }\n }\n if (validItinerary) {\n ru.bookItinerary(it);\n }\n }\n }\n }\n } catch (IOException | GeneralSecurityException | ClassNotFoundException e) {\n log.log(Level.SEVERE, \"Error reading from file.\", e);\n }\n return data;\n }", "private static void readDatabase(String path) {\n try {\n FileInputStream fileIn = new FileInputStream(path + \"/database.ser\");\n ObjectInputStream inStream = new ObjectInputStream(fileIn);\n database = (Database) inStream.readObject();\n inStream.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n } catch (ClassNotFoundException c) {\n c.printStackTrace();\n }\n }", "public Database() {\n if (init) {\n\n //creating Transaction data\n Transaction transactionOne\n = new Transaction(1, \"Debit\", \"Spar Grocery\", 54.68,1);\n\n transactionDB.add(transactionOne);\n\n // Creating an Account data\n Account accountOne = new Account(1, 445, 111111111, \"Savings\",\n 1250.24, transactionDB);\n\n accountDB.add(accountOne);\n\n //creating withdrawal data\n Withdrawal withdrawalOne = new Withdrawal(1, 64422545, 600.89);\n withdrawalDB.add(withdrawalOne);\n\n //creating transfer data\n Transfer transferOne = new Transfer(1, 25252525, 521.23);\n transferDB.add(transferOne);\n\n //creating lodgement data\n Lodgement lodgementOne = new Lodgement(1, 67766666, 521.23);\n lodgementDB.add(lodgementOne);\n\n //add Customer data \n Customer customerOne\n = new Customer(1, \"Darth Vader\", \"[email protected]\",\n \"Level 5, Suit Dark\", \"darkSideIsGoodStuff\",\n accountDB, withdrawalDB, transferDB, lodgementDB);\n\n customerDB.add(customerOne);\n\n init = false;\n }\n }", "public Database(String url) {\n this.url = url;\n\n File f = new File(url);\n\n if (f.exists()) {\n try {\n f.mkdirs();\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //create table relationship\n LinkedList<String> relationship_attributes = new LinkedList<>();\n relationship_attributes.add(\"id_entity1\");\n relationship_attributes.add(\"id_entity2\");\n relationship_attributes.add(\"description\");\n this.create_table(\"relationship\", relationship_attributes);\n }", "public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public interface DatabaseOperations {\n\n public static final String DATABASE_NAME = \"ghost_database\";\n\n public static final String TABLE_SIGHTINGS = \"SIGHTINGS\";\n\n public static final String ROW_ID = \"_id\";\n\n public static final String TITLE = \"title\";\n public static final String DESCRIPTION = \"DESCRIPTION\";\n public static final String LATITUDE = \"lat\";\n public static final String LONGITUDE = \"lon\";\n public static final String RATING = \"rating\";\n}", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "DataBase createDataBase();", "DataStore getDataStore ();", "public MoviesDatabase()\n {\n file = new FileOperation();\n menu = new Menu();\n validation = new Validation();\n }", "Object getDB();", "public interface RecipeStore {\n //Returns a recipe list of all recipes\n List<Recipe> getAllRecipes();\n //Returns a string list of recipe titles found from ingredients query\n List<String> getRecipeByIngredients(CharSequence query);\n //Returns a single recipe found from query\n Recipe getRecipe(CharSequence query);\n //Returns a single recipe image from query\n byte[] getRecipeImage(CharSequence query);\n //Returns a bitmap list of all small images for all recipes\n List<Bitmap> getRecipeImgSmall();\n //Returns a string list of all recipe titles\n List<String> getRecipeTitles();\n //Takes a recipe id and adds it to the favorites table\n void addToFavorites(int recipeId);\n //Returns a bitmap list of all images for recipes in the favorites table\n List<Bitmap> getFavoriteRecipeImgs();\n //Returns a string list of all titles for recipes in the favorites table\n List<String> getFavoriteRecipeTitle();\n //Takes a recipe id and deletes it from the favorites table\n void deleteFavorite(int id);\n //Takes a recipe id and checks if it exists in the favorites table\n boolean isFavorite(int id);\n //Takes recipe parameters and inserts a new row in recipes table\n Recipe createRecipe(String title, String description, String ingredients, String instructions, byte[] photo, byte[] photoSmall);\n //Returns number of rows in recipes\n long getRecipesCount();\n //Opens the database\n SQLiteDatabase open() throws SQLException;\n //Closes the database\n void close();\n}", "public static void main(String[] args) throws IOException{ \n\t\tJsonReader reader = Json.createReader(new FileReader(\"testjson/abcde.json\")); \n\t\tJsonObject jsonob = reader.readObject();\n\t\tSystem.out.println(jsonob.toString());\n\t\tRowColStore parser= new RowColStore(10*1000*1000,\"testjson/abcde.layout\");\n\t\tint objid = 1;\n\t\tparser.insertObject(objid,jsonob,null);\n\t\tparser.insertObject(2,jsonob,null);\n\t\tparser.insertObject(3,jsonob,null);\n\t\t// populate the table \n\n\t\tSystem.out.println(\"get the result out \\n\");\n\t\t// objid, keystr,valstr,valnum,valbool - 5 bytes \n\t\t// read it out \n\t//\tparser.getObject(2);\n\t}", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "private void downloadData(SQLiteDatabase db){\n DeviceDataManager.downloadDeviceData(db);\n CustomerDataManager.downloadCustomerData(db);\n CheckInTypeDataManager.downloadCheckInTypeData(db);\n CheckInPointDataManager.downloadCheckInPointData(db);\n PhotographerDataManager.downloadPhotographerData(db);\n }", "private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "private void fetchJsonData() {\n String url = \"https://raw.githubusercontent.com/acad600/JSONRepository/master/ISYS6203/O212-ISYS6203-RM01-00-DotaMarketplace.json\";\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(Request.Method.GET, url, null, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n for (int i = 0; i < response.length(); i++) {\n try {\n JSONObject obj = response.getJSONObject(i);\n String name = obj.getString(\"name\");\n int price = obj.getInt(\"price\");\n int stock = obj.getInt(\"stock\");\n double latitude = obj.getDouble(\"latitude\");\n double longitude = obj.getDouble(\"longitude\");\n\n database.insertNewItem(name, price, stock, latitude, longitude);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"MyActivity\", \"onErrorResponse\" + error.toString());\n }\n });\n\n requestQueue.add(jsonArrayRequest);\n }", "@Override\n public JsonObjectRequest fetchData(AppDatabase database) {\n // create the JSON request for courses offered by each school\n return new JsonObjectRequest\n (Request.Method.GET, \"https://data.gov.sg/api/action/datastore_search?resource_id=3bb9e6b0-6865-4a55-87ba-cc380bc4df39&limit=500000\", null, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n try {\n // parse results as json array\n JSONArray allSchoolToCourseAsJSONArray = getResultsAsJSONArray(response);\n\n // get each entry in results and store in database\n parseJSONArrayAndStoreInDatabase(database, allSchoolToCourseAsJSONArray);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n // TODO: Handle error\n System.out.println(\"Rabak la bro: \" + error.toString());\n }\n });\n }", "public static void main(String[] args) {\n\t Database db = new Database(\"localhost\", \"mycouchdb\");\n\n\t // create a hash map document with two fields \n\t Map<String,String> doc = new HashMap<String, String>();\n\t //doc.put(\"_id\", \"testDoc\");\n\t doc.put(\"foo\", \"value for the foo attribute\");\n\t doc.put(\"bar\", \"value for the bar attribute\");\n\n\t // create the document in couchdb\n\t db.createDocument(doc);\n\t \n\t doc.put(\"updated\", \"updated\");\n\t db.createOrUpdateDocument(doc);\n\t \n\t //db.getDocument(cls, docId)\n\t}", "private void populateDatabase(final FirebaseDatabase database, final DatabaseReference sessionRef) {\n cityName = getIntent().getStringExtra(\"cityName\");\n\n DatabaseReference citiesRef = database.getReference(\"Cities\");\n Log.d(\"Sean\", \"citiesRef: \" + database.getReference(\"Cities\").child(cityName).toString());\n\n citiesRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Log.d(\"Sean\", \"Restaurants: \" + dataSnapshot.child(cityName).child(\"Restaurants\").getValue().toString());\n Map<String, Restaurant> restaurants = new HashMap();\n for (DataSnapshot restaurantData : dataSnapshot.child(cityName).child(\"Restaurants\").getChildren()) {\n restaurants.put(restaurantData.getKey(), restaurantData.getValue(Restaurant.class));\n }\n DatabaseReference restaurantsRef = sessionRef.child(\"Restaurants\");\n restaurantsRef.setValue(restaurants);\n\n Log.d(\"Sean\", \"Food Items: \" + dataSnapshot.child(cityName).child(\"Food Items\").getValue().toString());\n Log.d(\"Sean\", \"Food Items Class: \" + dataSnapshot.child(cityName).child(\"Food Items\").getClass().toString());\n\n ArrayList<Object> foodItems = (ArrayList) dataSnapshot.child(cityName).child(\"Food Items\").getValue();\n DatabaseReference foodItemsRef = sessionRef.child(\"Food Items\");\n foodItemsRef.setValue(foodItems);\n\n populateLocalData(sessionRef, dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.d(\"Sean\", \"The database failed to read: \" + databaseError.getCode());\n }\n });\n }", "public MyApp()\n { \n \ttry{\n \t\tURI uri = URI.create(path.Path());\n\t \tDatabase sqliteDB = DatabaseFactory.create(uri);\n\t \t\n\t\t \tStatement cu = sqliteDB.createStatement(statement.CreateUser());\t\t\t\t\n\t\t \tcu.prepare();\n\t\t \tcu.execute();\n\t\t \tcu.close();\n\t\t\t\t\n\t\t\t\tStatement cp = sqliteDB.createStatement(statement.CategoriaProducto());\t\t\t\t\n\t\t\t\tcp.prepare();\n\t\t\t\tcp.execute();\n\t\t\t\tcp.close();\n\t\t\t\t\n\t\t\t\tStatement cpt = sqliteDB.createStatement(statement.TemporadaCategoriaProducto());\t\t\t\t\n\t\t\t\tcpt.prepare();\n\t\t\t\tcpt.execute();\n\t\t\t\tcpt.close();\n\t\t\t\t\n\t\t\t\tStatement p = sqliteDB.createStatement(statement.Producto());\t\t\t\t\n\t\t\t\tp.prepare();\n\t\t\t\tp.execute();\n\t\t\t\tp.close();\n\t\t\t\t\n\t\t\t\tStatement pt = sqliteDB.createStatement(statement.TemporadaProducto());\t\t\t\t\n\t\t\t\tpt.prepare();\n\t\t\t\tpt.execute();\n\t\t\t\tpt.close();\n\t\t\t\t\n\t\t\t\tStatement cm = sqliteDB.createStatement(statement.Municipio());\t\t\t\t\n\t\t\t\tcm.prepare();\n\t\t\t\tcm.execute();\n\t\t\t\tcm.close();\n\t\t\t\t\n\t\t\t\tStatement cmt = sqliteDB.createStatement(statement.TemporadaMunicipio());\t\t\t\t\n\t\t\t\tcmt.prepare();\n\t\t\t\tcmt.execute();\n\t\t\t\tcmt.close();\n\t\t\t\t\n\t\t\t\tStatement ce = sqliteDB.createStatement(statement.Establecimiento());\t\t\t\t\n\t\t\t\tce.prepare();\n\t\t\t\tce.execute();\n\t\t\t\tce.close();\n\t\t\t\t\n\t\t\t\tStatement cet = sqliteDB.createStatement(statement.TemporadaEstablecimiento());\t\t\t\t\n\t\t\t\tcet.prepare();\n\t\t\t\tcet.execute();\n\t\t\t\tcet.close();\n\t\t\t\t\n\t\t\t\tStatement cpr = sqliteDB.createStatement(statement.Presentacion());\t\t\t\t\n\t\t\t\tcpr.prepare();\n\t\t\t\tcpr.execute();\n\t\t\t\tcpr.close();\n\t\t\t\t\n\t\t\t\tStatement cprt = sqliteDB.createStatement(statement.TemporadaPresentacion());\t\t\t\t\n\t\t\t\tcprt.prepare();\n\t\t\t\tcprt.execute();\n\t\t\t\tcprt.close();\n\t\t\t\t\n\t\t\t\tStatement cpf = sqliteDB.createStatement(statement.ProductoFiltrado());\t\t\t\t\n\t\t\t\tcpf.prepare();\n\t\t\t\tcpf.execute();\n\t\t\t\tcpf.close();\n\t\t\t\t\n\t\t\t\tStatement cpft = sqliteDB.createStatement(statement.TemporadaProductoFiltrado());\t\t\t\t\n\t\t\t\tcpft.prepare();\n\t\t\t\tcpft.execute();\n\t\t\t\tcpft.close();\n\t\t\t\t\n\t\t\t\tStatement cb = sqliteDB.createStatement(statement.Busqueda());\t\t\t\t\n\t\t\t\tcb.prepare();\n\t\t\t\tcb.execute();\n\t\t\t\tcb.close();\n\t\t\t\t\n\t\t\t\tStatement cbt = sqliteDB.createStatement(statement.TemporadaBusqueda());\t\t\t\t\n\t\t\t\tcbt.prepare();\n\t\t\t\tcbt.execute();\n\t\t\t\tcbt.close();\n\t\t\t\t\n\t\t\t\tStatement cf = sqliteDB.createStatement(statement.Favorito());\t\t\t\t\n\t\t\t\tcf.prepare();\n\t\t\t\tcf.execute();\n\t\t\t\tcf.close();\n\t\t\t\t\n\t\t\t\tStatement cftu = sqliteDB.createStatement(statement.TemporalUser());\t\t\t\t\n\t\t\t\tcftu.prepare();\n\t\t\t\tcftu.execute();\n\t\t\t\tcftu.close();\n\t\t\t\t\n\t\t\t\tStatement clc = sqliteDB.createStatement(statement.ListaCompras());\t\t\t\t\n\t\t\t\tclc.prepare();\n\t\t\t\tclc.execute();\n\t\t\t\tclc.close();\n\t\t\t\t\n\t\t\t\tStatement crc = sqliteDB.createStatement(statement.RutaCompras());\t\t\t\t\n\t\t\t\tcrc.prepare();\n\t\t\t\tcrc.execute();\n\t\t\t\tcrc.close();\n\t\t\t\t\n\t\t\t\tStatement cpc = sqliteDB.createStatement(statement.ProductoCompras());\t\t\t\t\n\t\t\t\tcpc.prepare();\n\t\t\t\tcpc.execute();\n\t\t\t\tcpc.close();\n\t\t\t\t\n\t\t\tsqliteDB.close();\n\t \t\n \t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}finally{\n \t//Llamar SplashScreen\n \tsplashScreen = new SplashScreen();\n \t\n \t\n \t\n // Push a screen onto the UI stack for rendering.\n //pushScreen(new MyScreen());\n \tpushScreen(splashScreen);\n\t\t}\n }", "public static Books readJSON(){\n Gson gson = new GsonBuilder().create();\n Books books = new Books();\n try {\n books = gson.fromJson(new JsonReader(new FileReader(\"books.json\")), Books.class);\n } catch (IOException e){\n e.printStackTrace();\n }\n return books;\n }", "private static Callback prepopulateDatabase(){\n return new Callback() {\n @Override\n public void onCreate(@NonNull SupportSQLiteDatabase db) {\n super.onCreate(db);\n\n ContentValues contentValuesTartampion = new ContentValues();\n contentValuesTartampion.put(\"name\",\"Projet Tartampion\");\n contentValuesTartampion.put(\"color\",0xFFEADAD1);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesTartampion);\n\n ContentValues contentValuesLucidia = new ContentValues();\n contentValuesLucidia.put(\"name\",\"Projet Lucidia\");\n contentValuesLucidia.put(\"color\",0xFFB4CDBA);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesLucidia);\n\n ContentValues contentValuesCircus = new ContentValues();\n contentValuesCircus.put(\"name\",\"Projet Circus\");\n contentValuesCircus.put(\"color\",0xFFA3CED2);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesCircus);\n\n }\n };\n }", "private void connectDatabase(){\n }", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }", "@Test\n\tpublic void populatedDB() throws URISyntaxException{\n\t\tString pass;\n\t\t LoginController controller = new LoginController();\n\t\t \n\t\tpass = controller.gimmeSalt(\"PASSWORD\");\n pass = controller.hashBrowns(pass);\n\t\tdb.insertUser(\"TESTER\", pass, \"EMAIL\",666);\n\t\t\n\t\tdb.insertBusiness(\"Test1\",\"Somewhere\",7);\n\t\tdb.insertBusiness(\"Test2\",\"Somewhere\",8);\n\t\tdb.insertBusiness(\"Test3\",\"Somewhere\",9);\n\t\tlong start=12418*1000*60;\n\t\tlong end=912518*1000*60;\n\t\tdb.insertEvent(\"t1\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",1231);\n\t\t start=124118*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t2\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",674754);\n\t\t start=412418*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t3\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",241254);\n\t\tdb.insertEvent(\"t4\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",5432);\n\t\t start=1924218*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t5\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",12);\n\t\t start=124318*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t6\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",1241);\n\t\t\n\t\tdb.insertRelation(\"TESTER\",\"Test1\");\n\t\tdb.insertRelation( \"TESTER\",\"Test2\" );\n\t\tdb.insertRelation(\"TESTER\",\"Test3\");\n\t}", "@Test\n public void testCreate() throws Exception {\n System.out.println(\"create\");\n JSONObject movieJSON = new JSONObject();\n int pubID = 1;\n int prodID = 2;\n String name = \"Name\";\n int age = 12;\n String desc = \"This is my description\";\n int runtime = 12;\n String genre = \"Action\";\n double price = 22.22;\n movieJSON.put(\"productID\", prodID);\n movieJSON.put(\"name\", name);\n movieJSON.put(\"price\", price);\n movieJSON.put(\"ageRating\",age);\n movieJSON.put(\"description\", desc);\n movieJSON.put(\"runtime\", runtime);\n movieJSON.put(\"genre\", genre);\n movieJSON.put(\"publisherID\", pubID);\n MovieStorePageInfoFactory instance = new MovieStorePageInfoFactory();\n StoreListing result = instance.create(movieJSON);\n assertEquals(prodID, result.getProductID());\n assertEquals(name, result.getName());\n }", "public void refreshDb() {\n Ion.with(mContext)\n .load(mGetUrl)\n .asJsonObject()\n .setCallback(new FutureCallback<JsonObject>() {\n @Override\n public void onCompleted(Exception e, JsonObject result) {\n try {\n // do stuff with the result or error\n DatabaseClient databaseClient = new DatabaseClient(mContext);\n /**\n * if the return jsonObject is null, then don't clear the table\n * */\n if (result != null) {\n databaseClient.clearTablePage(\"bookpage\");\n }\n\n JsonArray array = result.getAsJsonArray(\"books\");\n /**\n * put data into db\n * */\n ContentResolver contentResolver = mContext.getContentResolver();\n Uri uri = Uri.parse(\"content://com.example.root.libapp_v1.SQLiteModule.Bookpage.BookpageProvider/bookpage\");\n for (int i = 0; i < array.size(); i++) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"name\", array.get(i).getAsJsonObject().get(\"name\").getAsString());\n contentValues.put(\"detail_info\", array.get(i).getAsJsonObject().get(\"detail_info\").getAsString());\n contentValues.put(\"author_info\", array.get(i).getAsJsonObject().get(\"author_info\").getAsString());\n contentValues.put(\"unique_id\", array.get(i).getAsJsonObject().get(\"id\").getAsString());\n contentValues.put(\"catalog_info\", array.get(i).getAsJsonObject().get(\"catalog_info\").getAsString());\n contentValues.put(\"timestamp\", array.get(i).getAsJsonObject().get(\"timestamp\").getAsString());\n Uri tmp = contentResolver.insert(uri, contentValues);\n }\n initData(mView);\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n });\n }", "public static void main(String[] args) throws ClassNotFoundException, SQLException, JsonGenerationException, JsonMappingException, IOException {\n\t\tCustomerDetails customerDetails = new CustomerDetails();\r\n\t\tObjectMapper objectMapper = new ObjectMapper();\r\n\t\t\r\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/Business\", \"root\", \"Password@123\");\r\n\t\t\r\n\t\t//object of statement class help us to execute queries\r\n\t\tStatement createStatement = conn.createStatement();\t\r\n\t\tResultSet executeQuery = createStatement.executeQuery(\"select * from CustomerInfo where purchasedDate=CURDATE() and Location ='Asia';\");\r\n\t\tint i =1;\r\n\t\t\r\n\t\twhile (executeQuery.next() && (executeQuery!=null))\r\n\t\t{\r\n\t\t\tcustomerDetails.setDetails(executeQuery.getString(1), executeQuery.getString(2), executeQuery.getInt(3), executeQuery.getString(4));\r\n\t\t\tSystem.out.println(customerDetails.getCourseName());\r\n\t\t\tSystem.out.println(customerDetails.getPurchaseDate());\r\n\t\t\tSystem.out.println(customerDetails.getAmount());\r\n\t\t\tSystem.out.println(customerDetails.getLocation());\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\t//converting data objects to json\t\r\n\t\t\tobjectMapper.writeValue(new File(\"E:\\\\Software Testing\\\\SDET\\\\Coding\\\\Eclipse Projects\\\\JDBC connection\\\\JSON\\\\customerDetails\" + i + \".json\"), customerDetails);\r\n\t\t\ti ++;\r\n\t\t}\t\t\r\n\t\tconn.close();\r\n\t\t\r\n\t}", "private static void prePopulateDb(AssetManager assetManager, StateDao stateDao){\n BufferedReader reader = null;\n StringBuilder stringBuilder = new StringBuilder();\n String json = \"\";\n try {\n reader = new BufferedReader(\n new InputStreamReader(assetManager.open(\"state-capital.json\")));\n\n // do reading, usually loop until end of file reading\n String mLine;\n while ((mLine = reader.readLine()) != null) {\n //process line\n stringBuilder.append(mLine);\n }\n json = stringBuilder.toString();\n } catch (IOException e) {\n //log the exception\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n //log the exception\n }\n }\n }\n try{\n JSONObject states = new JSONObject(json);\n JSONObject section = states.getJSONObject(\"sections\");\n populateFromJSON(section.getJSONArray(\"States (A-L)\"), stateDao);\n populateFromJSON(section.getJSONArray(\"States (M-Z)\"), stateDao);\n populateFromJSON(section.getJSONArray(\"Union Territories\"), stateDao);\n } catch (JSONException ignored){}\n }", "public abstract void loadFromDatabase();", "private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}", "private static void parseAndSave(String json, Context context) throws JSONException {\n dao = DAO.getInstance(context);\n ArrayList<MovieItem> movies = new ArrayList<>();\n //Decide if JSONObject Or JSONArray;\n JSONArray moviesArray = new JSONArray(json);\n for (int i = 0; i < moviesArray.length(); i++) {\n JSONObject movieObject = moviesArray.getJSONObject(i);\n String title = movieObject.getString(\"title\");\n String image = movieObject.getString(\"image\");\n int releaseYear = movieObject.getInt(\"releaseYear\");\n double rating = movieObject.getDouble(\"rating\");\n JSONArray genresArray = movieObject.getJSONArray(\"genre\");\n\n String genre1 = null;\n String genre2 = null;\n String genre3 = null;\n if (genresArray.length() == 1) {\n genre1 = genresArray.getString(0);\n }\n if (genresArray.length() == 2) {\n genre1 = genresArray.getString(0);\n genre2 = genresArray.getString(1);\n ;\n }\n if (genresArray.length() == 3) {\n genre1 = genresArray.getString(0);\n genre2 = genresArray.getString(1);\n genre3 = genresArray.getString(2);\n }\n\n dao.addMovieItem(title, releaseYear, rating, genre1, genre2, genre3, image);\n }\n }", "@Override\r\n\tpublic void onCreate(SQLiteDatabase db) {\r\n\t\t// Log.i(\"DBHelper:\", \"OnCreate() \");\r\n\t\tdb.beginTransaction();\r\n\t\ttry {\r\n\t\t\tdb.execSQL(QUESTION_CREATE);\r\n\t\t\tdb.execSQL(TOPIC_CREATE);\r\n\t\t\tdb.execSQL(CHOICE_CREATE);\r\n\t\t\tdb.execSQL(EXAM_CREATE);\r\n\t\t\tdb.execSQL(QUESTIONEXAM_CREATE);\r\n\t\t\tdb.setTransactionSuccessful();\r\n\t\t} finally {\r\n\t\t\tdb.endTransaction();\r\n\t\t}\r\n\r\n\t\t// import du lieu cho Questions, Topics & Choices\r\n\t\tCommonDAL common = new CommonDAL(db);\r\n\t\tcommon.importDataFromResource();\r\n\t\t// Main.getCommonDAL().importDataFromResource();\r\n\r\n\t\t// String strURL = context.getString(R.string.url_questions);\r\n\t\t// common.importDataFromURL(context, strURL);\r\n\t}", "private void mockUpDB() {\n locationDBAdapter.insertLocationData(\n \"ChIJd0UHJHcw2jARVTHgHdgUyrk\",\n \"Baan Thong Luang\",\n \"https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png\",\n \"https://maps.google.com/maps/contrib/101781857378275784222/photos\",\n \"CmRSAAAAEegLHnt03YODdRQ658VBWtIhOoz3TjUAj1oVqQIlLq0DkfSttuS-SQ3aOLBBbuFdwKbpkbsrFzMWghgyZeRD-n5rshknOXv6p5Xo3bdYr5FMOUGCy-6f6LYRy1PN9cKOEhBuj-7Dc5fBhX_38N_Sn7OPGhTBRgFIvThYstd7e8naYNPMUS2rTQ\",\n \"GOOGLE\",\n \"236/10 Wualai Road Tumbon Haiya, CHIANG MAI\",\n 18.770709,\n 98.978078,\n 0.0);\n\n }", "public FakeDatabase() {\n\t\t\n\t\t// Add initial data\n\t\t\n//\t\tSystem.out.println(authorList.size() + \" authors\");\n//\t\tSystem.out.println(bookList.size() + \" books\");\n\t}", "private AppRepo(Context context) {\n mDb = AppDB.getInstance(context);\n mFoods = getAllFoods();\n mPortions = getAllPortions();\n mMeals = getAllMeals();\n mConsumed = getAllConsumed();\n }", "public void initDatabase() throws SQLException {\n\n ModelFactory factory = new ModelFactory(this.connection);\n\n StopsDao stopsData = factory.getStopsDao();\n\n ArrayList<Stop> stops = stopsData.getStopsFromCsv(getResource(\"stops.csv\"));\n\n Iterator<Stop> it = stops.iterator();\n while(it.hasNext()) {\n Stop stop = it.next();\n System.out.println(stop.toString());\n }\n\n\n /*\n ShapesDao shapesData = factory.getShapesDao();\n\n ArrayList<Shape> shapes = shapesData.getShapesFromCsv(getResource(\"shapes.csv\"));\n\n Iterator<Shape> it = shapes.iterator();\n while(it.hasNext()) {\n Shape shape = it.next();\n System.out.println(shape.toString());\n }\n\n CalendarDateDao calendarData = factory.getCalendarDatesDao();\n\n ArrayList<CalendarDate> agencies = calendarData.getCalendarDatesFromCsv(getResource(\"calendar_dates.csv\"));\n\n Iterator<CalendarDate> it = agencies.iterator();\n while(it.hasNext()) {\n CalendarDate date = it.next();\n System.out.println(date.toString());\n }\n\n AgencyDao agencyData = factory.getAgencyDao();\n agencyData.drop();\n agencyData.create();\n\n ArrayList<Agency> agencies = agencyData.getAgenciesFromCsv(getResource(\"agency.csv\"));\n\n Iterator<Agency> it = agencies.iterator();\n while(it.hasNext()) {\n Agency age = it.next();\n System.out.println(age.toString());\n agencyData.saveAgency(age);\n }\n\n RoutesDao routesDao = factory.getRouteDao();\n routesDao.drop();\n routesDao.create();\n\n ArrayList<Route> routes = routesDao.getRoutesFromCsv(getResource(\"routes.csv\"));\n\n Iterator<Route> it = routes.iterator();\n while(it.hasNext()) {\n Route route = it.next();\n System.out.println(route.toString());\n }*/\n }", "private AttendantDatabase() {}", "public static void main(String[] args) throws Exception {\n Database database1 = new Database(\"jdbc:sqlite:Drink.db\");\n\n //database.init();\n database1.init();\n\n //OpiskelijaDao opiskelijaDao = new OpiskelijaDao(database);\n DrinkkiDao drinkkiDao = new DrinkkiDao(database1);\n AinesosaDao ainesosaDao = new AinesosaDao(database1);\n DrinkkiAinesDao drinkkiAinesDao = new DrinkkiAinesDao(database1);\n\n /*get(\"/\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"viesti\", \"tervehdys\");\n\n return new ModelAndView(map, \"index\");\n }, new ThymeleafTemplateEngine());\n\n get(\"/opiskelijat\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"opiskelijat\", opiskelijaDao.findAll());\n\n return new ModelAndView(map, \"opiskelijat\");\n }, new ThymeleafTemplateEngine());\n\n get(\"/opiskelijat/:id\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"opiskelija\", opiskelijaDao.findOne(Integer.parseInt(req.params(\"id\"))));\n\n return new ModelAndView(map, \"opiskelija\");\n }, new ThymeleafTemplateEngine()); */\n Spark.get(\"/ainesosat\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"ainesosat\", ainesosaDao.findAll());\n\n return new ModelAndView(map, \"ainesosat\");\n }, new ThymeleafTemplateEngine());\n\n Spark.post(\"/ainesosat\", (req, res) -> {\n String ainesosa = req.queryParams(\"ainesosa\");\n ainesosaDao.lisaaAinesosa(ainesosa);\n\n res.redirect(\"/ainesosat\");\n\n return \"\";\n });\n\n Spark.get(\"/drinkit\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"drinkit\", drinkkiDao.findAll());\n map.put(\"ainesosat\", ainesosaDao.findAll());\n\n return new ModelAndView(map, \"drinkit\");\n }, new ThymeleafTemplateEngine());\n\n Spark.post(\"/drinkit\", (req, res) -> {\n String drinkki = req.queryParams(\"drinkki\");\n String vahvuusStringina = req.queryParams(\"vahvuus\");\n double vahvuus = Double.parseDouble(vahvuusStringina);\n String lasi = req.queryParams(\"lasi\");\n\n drinkkiDao.nimeaDrinkki(drinkki, vahvuus, lasi);\n\n res.redirect(\"/drinkit\");\n\n return \"\";\n });\n \n Spark.post(\"/drinkit\", (req, res) -> {\n \n Integer poisto=Integer.parseInt(req.queryParams(\"poisto\"));\n \n\n drinkkiDao.delete(poisto);\n\n res.redirect(\"/drinkit\");\n return \"\";\n });\n \n Spark.post(\"/drinkit\", (req, res) -> {\n Integer drinkkiId = Integer.parseInt(req.params(\":id\"));\n Integer ainesId = Integer.parseInt(req.queryParams(\"userId\"));\n\n drinkkiAinesDao.tallennaID(drinkkiId, ainesId);\n\n String apuMaara = req.queryParams(\"maara\");\n Integer maara = Integer.parseInt(apuMaara);\n String ohje = req.queryParams(\"ohje\");\n \n drinkkiAinesDao.tallennaMuut(drinkkiId,ainesId, maara, ohje);\n res.redirect(\"/drinkit\");\n return \"\";\n });\n \n Spark.get(\"/home\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"drinkit\", drinkkiDao.findAll());\n map.put(\"ainesosat\", ainesosaDao.findAll());\n\n return new ModelAndView(map, \"home\");\n }, new ThymeleafTemplateEngine());\n\n /*Spark.get(\"/users/:id\", (req, res) -> {\n HashMap map = new HashMap<>();\n Integer userId = Integer.parseInt(req.params(\":id\"));\n map.put(\"user\", users.findOne(userId));\n map.put(\"tasks\", tasks.findNonCompletedForUser(userId));\n\n return new ModelAndView(map, \"user\");\n }, new ThymeleafTemplateEngine());*/\n }", "public static List<DataItem> importFromJSON(Context context){\n FileReader reader = null;\n File file = new File(Environment.getExternalStorageDirectory(), FILE_NAME);\n\n try {\n //Instantiate FileReader with file\n reader = new FileReader(file);\n //Populate DataItems class and return result\n Gson gson = new Gson();\n DataItems dataItems = gson.fromJson(reader, DataItems.class);\n return dataItems.getDataItems();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return null;\n }", "public static void loadData(DynamoDbClient ddb, String fileName) throws IOException {\r\n\r\n String sqlStatement = \"INSERT INTO MoviesPartiQ VALUE {'year':?, 'title' : ?, 'info' : ?}\";\r\n JsonParser parser = new JsonFactory().createParser(new File(fileName));\r\n com.fasterxml.jackson.databind.JsonNode rootNode = new ObjectMapper().readTree(parser);\r\n Iterator<JsonNode> iter = rootNode.iterator();\r\n ObjectNode currentNode;\r\n int t = 0 ;\r\n List<AttributeValue> parameters = new ArrayList<>();\r\n while (iter.hasNext()) {\r\n\r\n // Add 200 movies to the table.\r\n if (t == 200)\r\n break ;\r\n currentNode = (ObjectNode) iter.next();\r\n\r\n int year = currentNode.path(\"year\").asInt();\r\n String title = currentNode.path(\"title\").asText();\r\n String info = currentNode.path(\"info\").toString();\r\n\r\n AttributeValue att1 = AttributeValue.builder()\r\n .n(String.valueOf(year))\r\n .build();\r\n\r\n AttributeValue att2 = AttributeValue.builder()\r\n .s(title)\r\n .build();\r\n\r\n AttributeValue att3 = AttributeValue.builder()\r\n .s(info)\r\n .build();\r\n\r\n parameters.add(att1);\r\n parameters.add(att2);\r\n parameters.add(att3);\r\n\r\n // Insert the movie into the Amazon DynamoDB table.\r\n executeStatementRequest(ddb, sqlStatement, parameters);\r\n System.out.println(\"Added Movie \" +title);\r\n\r\n parameters.remove(att1);\r\n parameters.remove(att2);\r\n parameters.remove(att3);\r\n t++;\r\n }\r\n }", "public void loadJson(){\n new DownloadJsonTask().execute(URL3);\n// new DownloadJsonTask().execute(URL2);\n }", "public ReviewRepository() {\n Review vrGameOne = new Review(1L, \"BeatSaber\", \"/images/BeatSaber-photo1.jpg\",\n \"/images/BeatSaber-photo2.jpg\", \"Fitness/Rhythm\",\n \"This game is so much fun! It also gives you a great workout if you play on Expert Plus mode.\",\n \"May 1, 2018\", \"Beat Saber is a virtual reality rhythm game where the player slices \" +\n \"blocks representing musical beats with a pair of sabers.\");\n Review vrGameTwo = new Review(2L, \"The Room\", \"/images/the-room-photo1.jpg\",\n \"/images/the-room-photo2.jpg\", \"Puzzle/Adventure\", \"This game is \" +\n \"challenging but fun. I like how you are able to get hints if you get stuck.\", \"March 26, 2020\",\n \"The Room is game where the player has to solve puzzles to advance. Each level \" +\n \"has a different theme.\");\n Review vrGameThree = new Review(3L, \"Synth Riders\", \"/images/synth-riders-photo1.jpg\",\n \"/images/synth-riders-photo2.jpg\", \"Dance/Rhythm\", \"This game is so much fun. \" +\n \"It has great music and I love the neon environment.\", \"June 21, 2018\", \"Synth Riders is \" +\n \"a lot like Beat Saber, but instead of slicing blocks with sabers, the player hits multicolored orbs \" +\n \"representing musical beats.\");\n Review vrGameFour = new Review(4L, \"Bigscreen\", \"/images/bigscreen-photo1.jpg\",\n \"/images/bigscreen-photo2.jpg\", \"Entertainment\", \"I love this VR game. It \" +\n \"feels like you are actually in the movie theater! An added bonus is that you can mute other \" +\n \"people in the theater if they are being too loud! I love it!\", \"May 21, 2019\",\n \"BigScreen is a virtual reality movie theater. You can watch movies (even 3D ones) \" +\n \"with random people, or you can join a private theater with just you and your friends. In \" +\n \"addition to movies, there are also rooms where you can watch TV shows.\");\n\n reviewList.put(vrGameOne.getId(), vrGameOne);\n reviewList.put(vrGameTwo.getId(), vrGameTwo);\n reviewList.put(vrGameThree.getId(), vrGameThree);\n reviewList.put(vrGameFour.getId(), vrGameFour);\n }", "public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public JacobDatabase()\n {\n entries = new ArrayList<KantoDex>();\n \n }", "public CategoryGateway(SQLiteDatabase database){\n this.database = database;\n }", "public void initDatabase() {\n Datastore mongoDataStore = DatabaseHandler.getInstance().getMongoDataStore();\n initUsers();\n initAccounts();\n mongoDataStore.save(users);\n }", "private void loadJSON() throws FileNotFoundException\n\t{\n\n\t\tGsonBuilder builder= new GsonBuilder();\n\t\tGson gson = builder.create();\n\t\t\t\t\n\t\t//get a list of folders in the data directory\n\t\t\n\t\tFile[] directories = new File(\"data\").listFiles();\n\n\t\t//Loop through folders in data directory\n\t\tfor(File folder : directories)\n\t\t\t{\n\t\t\t\t//get a list of files inside the folder\n\t\t\t\tFile[] jsonItems = new File(folder.toString()).listFiles();\n\t\t\t\t\n\t\t\t\t//Loop through files inside the folder \n\t\t\t\tfor(File file : jsonItems)\n\t\t\t\t{\n\t\t\t\t\t//Store in directory map... substring to remove the \"data/\" portion... placed by filename to foldername\n\t\t\t\t\tString dir = file.toString().substring(5);\n\t\t\t\t\t\n\t\t\t\t\t//Generate player data from gson\n\t\t\t\t\tJsonReader reader = new JsonReader(new FileReader(file));\n\t\t\t\t\tPlayer player = gson.fromJson(reader, Player.class);\n\t\t\t\t\t\n\t\t\t\t\t//Store it in the map tied to it's directory\n\t\t\t\t\tplayerData.put(dir, player);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }", "public void getRestaurants () throws JSONException {\n\t\tint debug = 0; \n\t\tJSONObject js = new JSONObject(console.nextLine());\n\t\tfor (String name : JSONObject.getNames(js)) {\n\t\t\tJSONObject rest = js.getJSONObject(name);\n\t\t\tRestaurant r = new Restaurant(name);\n\t\t\tfor (String s : attributes) {\n\t\t\t\tif (rest.has(s)) {\n\t\t\t\t\tString v = rest.getString(s);\n\t\t\t\t\tif (v.contains(\"&amp;\")) {\n\t\t\t\t\t\tv =v.replace(\"&amp;\", \"and\");\n\t\t\t\t\t}\n\t\t\t\t\tif (v.contains(\"'\")) {\n\t\t\t\t\t\tv = v.replace(\"'\",\"\");\n\t\t\t\t\t}\n\t\t\t\t\tr.add(s,v);\n\t\t\t\t} else {\n\t\t\t\t\tr.add(s,\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\trestaurants.add(r);\n\t\t\t\n\t\t}\n\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tinitializeRe_DB initialer = new initializeRe_DB();\n\t\tinitialer.insertTOproject();\n\t\tinitialer.insertToresearcher();\n\t\tinitialer.insertTotask();\n\t}", "public Main()\n {\n createUsers();\n createFriendships();\n createMessages();\n\n }", "private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}", "@PostConstruct\r\n public void init() {\n File database = new File(applicationProps.getGeodb());\r\n try {\r\n reader = new DatabaseReader.Builder(database).withCache(new CHMCache()).build();\r\n } catch (IOException e) {\r\n log.error(\"Error reading maxmind DB, \", e);\r\n }\r\n }", "public static void initGenerateOfflineTestData(){\n dbInstance = Database.newInstance();\n initPlayer();\n initMatches();\n }", "public static void loadPracticeListFromFile() {\n JSONParser jsonParser = new JSONParser();\n\n try (FileReader reader = new FileReader(\"src/practiceList.json\")) {\n // Read JSON file\n Object object = jsonParser.parse(reader);\n\n //Iterate over word list array\n JSONArray wordList = (JSONArray) object;\n for (Object o : wordList) {\n\n JSONObject next = (JSONObject) o;\n String extra = \"\";\n\n if (((String) next.get(\"wordType\")).equalsIgnoreCase(\"verb\")) {\n extra = \"to \";\n }\n\n Word loadedWord = new Word(extra + next.get(\"english\"), (String) next.get(\"welsh\"), (String) next.get(\"wordType\"));\n\n addIntoPracticedWords(loadedWord);\n }\n\n } catch (ParseException | IOException e) {\n System.out.println(\"PracticeList file not found, will be created on exit.\");\n }\n }", "private void loadDataFromDatabase(){\n //get database connection\n DeezerOpener deezerOpener = new DeezerOpener(this);\n db = deezerOpener.getWritableDatabase();\n\n //define columns and create cursor\n String [] columns = {DeezerOpener.COL_ID, DeezerOpener.COL_ARTIST, DeezerOpener.COL_TITLE, DeezerOpener.COL_ALBUM, DeezerOpener.COL_DUR, DeezerOpener.COL_COVER};\n Cursor results = db.query( DeezerOpener.TABLE_NAME, columns, null, null, null, null, null);\n\n //get column indices\n int idColIndex = results.getColumnIndex(DeezerOpener.COL_ID);\n int artistColIndex = results.getColumnIndex(DeezerOpener.COL_ARTIST);\n int titleColIndex = results.getColumnIndex(DeezerOpener.COL_TITLE);\n int albumColIndex = results.getColumnIndex(DeezerOpener.COL_ALBUM);\n int durColIndex = results.getColumnIndex(DeezerOpener.COL_DUR);\n int coverColIndex = results.getColumnIndex(DeezerOpener.COL_COVER);\n\n //loop through the database obtaining data\n while(results.moveToNext()){\n long id = results.getLong(idColIndex);\n String artistDB = results.getString(artistColIndex);\n String titleDB = results.getString(titleColIndex);\n String albumDB = results.getString(albumColIndex);\n int durationDB = results.getInt(durColIndex);\n String coverURL_DB = results.getString(coverColIndex);\n\n //create the cover Bitmap\n Bitmap coverDB = getBitmapFromURL(coverURL_DB);\n\n //add to favourites list\n deezerFavList.add(new DeezerSong(titleDB, albumDB, artistDB, coverURL_DB, coverDB, durationDB, id));\n }\n }", "@Override\n public void run(String... args) throws Exception {\n Outfit outfit = new Outfit();\n outfit.setCurrentoutfit(true);\n outfitRepository.save(outfit);\n\n\n// Category category = new Category();\n//\n// category.setTops(\"Tops\");\n// category.setBottoms(\"Bottoms\");\n// category.setShoes(\"sneakers\");\n// category.setAccessories(\"\");\n// category.setJackets(\"\");\n// categoryRepository.save(category);\n Category tops = new Category();\n tops.setCategoryType(\"Tops\");\n categoryRepository.save(tops);\n\n Category bottoms = new Category();\n bottoms.setCategoryType(\"Bottoms\");\n categoryRepository.save(bottoms);\n\n Category accessories = new Category();\n accessories.setCategoryType(\"Accessories\");\n categoryRepository.save(accessories);\n\n Category shoes = new Category();\n shoes.setCategoryType(\"Shoes\");\n categoryRepository.save(shoes);\n\n Category jackets = new Category();\n jackets.setCategoryType(\"Jacket\");\n categoryRepository.save(jackets);\n/**\n * Here is where the items start for Outfit 1\n * */\n Item topOne = new Item();\n topOne.setCategory(tops);\n topOne.setColor(\"Black\");\n topOne.setFabricMaterial(\"cotton\");\n topOne.setSize(7);\n topOne.setItemName(\"Shirt\");\n topOne.setImages(\"image/women.png\");\n itemRepository.save(topOne);\n\n Item bottomOne = new Item();\n bottomOne.setCategory(bottoms);\n bottomOne.setColor(\"Light Blue\");\n bottomOne.setFabricMaterial(\"Denim\");\n bottomOne.setSize(31);\n bottomOne.setItemName(\"Bleached Light Blue Jeans\");\n itemRepository.save(bottomOne);\n\n Item shoeOne = new Item();\n shoeOne.setCategory(shoes);\n shoeOne.setColor(\"Black\");\n shoeOne.setFabricMaterial(\"Mesh\");\n shoeOne.setSize(7);\n shoeOne.setItemName(\"Shoe\");\n itemRepository.save(shoeOne);\n\n Item accessoryOne = new Item();\n accessoryOne.setCategory(accessories);\n accessoryOne.setColor(\"Gold\");\n accessoryOne.setFabricMaterial(\"Gold\");\n accessoryOne.setSize(1);\n accessoryOne.setItemName(\"Gold Watch\");\n itemRepository.save(accessoryOne);\n\n\n Item jacketOne = new Item();\n jacketOne.setCategory(jackets);\n jacketOne.setColor(\"Black\");\n jacketOne.setFabricMaterial(\"Leather\");\n jacketOne.setSize(30);\n jacketOne.setItemName(jacketOne.getColor() + \" Jacket\");\n itemRepository.save(jacketOne);\n\n\n /**\n * Here is where the items start for Outfit 2\n * */\n Item topTwo = new Item();\n topTwo.setCategory(tops);\n topTwo.setColor(\"White\");\n topTwo.setFabricMaterial(\"Blend\");\n topTwo.setSize(7);\n topTwo.setItemName(\"Crew Neck Tee Shirt\");\n itemRepository.save(topTwo);\n\n Item bottomTwo = new Item();\n bottomTwo.setCategory(bottoms);\n bottomTwo.setColor(\"Grey\");\n bottomTwo.setFabricMaterial(\"Denim\");\n bottomTwo.setSize(34);\n bottomTwo.setItemName(\"Skinny Jeans\");\n itemRepository.save(bottomTwo);\n\n Item shoeTwo = new Item();\n shoeTwo.setCategory(shoes);\n shoeTwo.setColor(\"White, Black, Red\");\n shoeTwo.setFabricMaterial(\"Mesh\");\n shoeTwo.setSize(7);\n shoeTwo.setItemName(\"Tennis Shoes\");\n itemRepository.save(shoeTwo);\n\n Item accessoryTwo = new Item();\n accessoryTwo.setCategory(accessories);\n accessoryTwo.setColor(\"Green\");\n accessoryTwo.setFabricMaterial(\"\");\n accessoryTwo.setSize(7);\n accessoryTwo.setItemName(\"Shirt\");\n itemRepository.save(accessoryTwo);\n\n Item jacketTwo = new Item();\n jacketTwo.setCategory(jackets);\n jacketTwo.setColor(\"Tan\");\n jacketTwo.setFabricMaterial(\"Leather\");\n jacketTwo.setSize(30);\n jacketTwo.setItemName(jacketTwo.getColor() + \" Jacket\");\n itemRepository.save(jacketTwo);\n\n\n /**\n * Here is where the items start for Outfit 3\n * */\n Item topThree = new Item();\n topThree.setCategory(tops);\n topThree.setColor(\"red\");\n topThree.setFabricMaterial(\"cotton\");\n topThree.setSize(7);\n topThree.setItemName(\"Shirt\");\n itemRepository.save(topThree);\n\n Item bottomThree = new Item();\n bottomThree.setCategory(bottoms);\n bottomThree.setColor(\"green\");\n bottomThree.setFabricMaterial(\"cotton\");\n bottomThree.setSize(31);\n bottomThree.setItemName(\"Jeans\");\n itemRepository.save(bottomThree);\n\n Item shoeThree = new Item();\n shoeThree.setCategory(shoes);\n shoeThree.setColor(\"green\");\n shoeThree.setFabricMaterial(\"\");\n shoeThree.setSize(7);\n shoeThree.setItemName(\"Shoe\");\n itemRepository.save(shoeThree);\n\n Item accessoryThree = new Item();\n accessoryThree.setCategory(accessories);\n accessoryThree.setColor(\"green\");\n accessoryThree.setFabricMaterial(\"\");\n accessoryThree.setSize(7);\n accessoryThree.setItemName(\"Shirt\");\n itemRepository.save(accessoryThree);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 4\n * */\n Item topFour = new Item();\n topFour.setCategory(tops);\n topFour.setColor(\"red\");\n topFour.setFabricMaterial(\"cotton\");\n topFour.setSize(7);\n topFour.setItemName(\"Shirt\");\n itemRepository.save(topFour);\n\n Item bottomFour = new Item();\n bottomFour.setCategory(bottoms);\n bottomFour.setColor(\"green\");\n bottomFour.setFabricMaterial(\"cotton\");\n bottomFour.setSize(31);\n bottomFour.setItemName(\"Jeans\");\n itemRepository.save(bottomFour);\n\n Item shoeFour = new Item();\n shoeFour.setCategory(shoes);\n shoeFour.setColor(\"green\");\n shoeFour.setFabricMaterial(\"\");\n shoeFour.setSize(7);\n shoeFour.setItemName(\"Shoe\");\n itemRepository.save(shoeFour);\n\n Item accessoryFour = new Item();\n accessoryFour.setCategory(accessories);\n accessoryFour.setColor(\"green\");\n accessoryFour.setFabricMaterial(\"\");\n accessoryFour.setSize(7);\n accessoryFour.setItemName(\"Shirt\");\n itemRepository.save(accessoryFour);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 5\n * */\n Item topFive = new Item();\n topFive.setCategory(tops);\n topFive.setColor(\"red\");\n topFive.setFabricMaterial(\"cotton\");\n topFive.setSize(7);\n topFive.setItemName(\"Shirt\");\n itemRepository.save(topFive);\n\n Item bottomFive = new Item();\n bottomFive.setCategory(bottoms);\n bottomFive.setColor(\"green\");\n bottomFive.setFabricMaterial(\"cotton\");\n bottomFive.setSize(31);\n bottomFive.setItemName(\"Jeans\");\n itemRepository.save(bottomFive);\n\n Item shoeFive = new Item();\n shoeFive.setCategory(shoes);\n shoeFive.setColor(\"green\");\n shoeFive.setFabricMaterial(\"\");\n shoeFive.setSize(7);\n shoeFive.setItemName(\"Shoe\");\n itemRepository.save(shoeFive);\n\n Item accessoriesFive = new Item();\n accessoriesFive.setCategory(accessories);\n accessoriesFive.setColor(\"green\");\n accessoriesFive.setFabricMaterial(\"\");\n accessoriesFive.setSize(7);\n accessoriesFive.setItemName(\"Shirt\");\n itemRepository.save(accessoriesFive);\n }", "public SolicitudREST() {\n gson = new Gson();\n sdao= new SolicitudDAO();\n }", "public DatabaseOperations(){\n\n }", "public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}", "public void parseJson() {\n\n try {\n JSONParser parser = new JSONParser();\n jsonReader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/resources/bangor-library.json\")));\n JSONObject jsonObj = (JSONObject) parser.parse(jsonReader);\n \n String name = (String) jsonObj.get(\"name\");\n libraryName = name;\n JSONArray extractedBooks = (JSONArray) jsonObj.get(\"books\");\n\n Iterator i = extractedBooks.iterator();\n while (i.hasNext()) {\n rec = new LibraryRecord();\n rec.setLib_name(libraryName);\n JSONObject innerObj = (JSONObject) i.next();\n rec.setBook_name(innerObj.get(\"name\").toString());\n rec.setAuth_name(innerObj.get(\"author\").toString());\n rec.setCat_name(innerObj.get(\"category\").toString());\n\n if (!LibraryAccess.bookShelves.isEmpty()) {\n for (LibraryRecord bookSaved : LibraryAccess.bookShelves) {\n if (this.rec.getHashOfContent() == bookSaved.getHashOfContent()) {\n duplicate = true;\n rec = null;\n }\n }\n if (!duplicate) {\n LibraryAccess.addRecord(rec);\n }\n duplicate = false;\n\n } else {\n System.out.println(\"Library empty : Adding records...\");\n LibraryAccess.addRecord(this.rec);\n }\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ParseException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void updateDB() {\n }", "public static void main (String[] arg){\n\t\tPhone phone = new Phone(\"206 123 4567\", \"425 123 4567\");\r\n\t\tAddress address = new Address(\"4101 398th W.\", \"tacoma\", \"washington\");\r\n\r\n\t\t//public Customer(String first_name, String last_name, Address address, Phone phone)\r\n\t\tCustomer1 cust = new Customer1(\"john\", \"doe\", address, phone);\r\n\r\n\t\t//need to create a Customer object to match specification at top of file\r\n\t\tCustomer customer = new Customer(cust);\r\n\r\n\t\t//https://stackoverflow.com/questions/16607444/how-to-serialize-object-to-json\r\n\t\t//*** use GsonBuilder().create() to SERIALIZE the customer object to a JSON string\r\n\t\tString stringJson = new GsonBuilder().create().toJson(customer);\r\n\r\n\t\tSystem.out.println( \"SERIALIZED Java object JSON string => \\r\\n\" + stringJson);\r\n\t\tSystem.out.println();\r\n\r\n\t\t//convert the Json string to JsonPath - good now\t\t\r\n\t\tSystem.out.println(\"Printing out the customer values: \");\r\n\r\n\t\tSystem.out.println( \"first_name = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.first_name\") +\r\n\t\t\t\t\", last_name = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.last_name\"));\r\n\r\n\t\t//\t\tPhone phone = new Phone(\"206 123 4567\", \"425 123 4567\");\r\n\r\n\t\tSystem.out.println( \"cell phone = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.phone.cell\") +\r\n\t\t\t\t\", home phone = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.phone.home\"));\r\n\r\n\t\t// \"address\": {\r\n\t\t// \"street\": \"4101 398th W.\",\r\n\t\t// \"city\": \"tacoma\",\r\n\t\t// \"state\": \"washington\"\r\n\t\t// },\r\n\r\n\t\tSystem.out.println( \"\\r\\ncustomer.address.street = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.address.street\") +\r\n\t\t\t\t\"\\r\\ncustomer.address.city = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.address.city\")\t+\r\n\t\t\t\t\"\\r\\ncustomer.address.state = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.address.state\"));\r\n\t}", "private UserDao() {\n\t\tusersList = new HashMap<String, User>();\n\t\tusersDetails = JsonFilehandling.read();\n\t\tfor (JSONObject obj : usersDetails) {\n\t\t\tusersList.put(obj.get(\"id\").toString(), new User(obj.get(\"id\").toString(),obj.get(\"name\").toString(), obj.get(\"profession\").toString()));\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\tRaterDB.initialize();\r\n\t\t\tint size = RaterDB.size();\r\n\t\t\tSystem.out.println(size);\r\n\t\t}", "private void readFromJSON(String filename) {\n JSONParser parser = new JSONParser();\n\n try\n {\n Object obj = parser.parse(new FileReader(filename));\n JSONObject jsonObject = (JSONObject) obj;\n Menu drinks = getMenu(jsonObject, \"Drink\");\n Menu types = getMenu(jsonObject, \"Type\");\n Menu toppings = getMenu(jsonObject, \"Toppings\");\n Menu sizes = getMenu(jsonObject, \"Size\");\n menuMap.put(\"Drink\", drinks);\n menuMap.put(\"Size\", sizes);\n menuMap.put(\"Toppings\", toppings);\n menuMap.put(\"Type\", types);\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Not found menu.json, exit now.\");\n System.exit(1);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }", "public RecipeDatabase() {\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference AllRecipeRef = database.getReference(\"allRecipes\");\n DatabaseReference newRecipeRef = AllRecipeRef.push();\n newRecipeRef.setValue(new Recipe(\"Pizza\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Sushi Rolls\", 2.0, \"mkp_logo\", \"Japanese\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Crepe\", 3.5, \"mt_logo\", \"French\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Baked Salmon\", 0, \"pb_logo\", \"American\", \"5\", \"1. prep ingredients\\n2.cook food\\n3.eat your food\", \"ingredients1 ingredient 2 ingredient3\"));\n }", "private void initDB(){\n gistHelper = new GistSQLiteHelper(mainActivity, \"GistsDB\", null, 1);\n db = gistHelper.getWritableDatabase();\n }", "public static void main(String[] args) {\n\t\tDao dao = new PostgresDao();\n\t\tnew Client().getData(dao);\n\t}", "public AnalogArchiveApp() {\n jsonWriter = new JsonWriter(\"./data/saveFile.json\");\n jsonReader = new JsonReader(\"./data/saveFile.json\");\n init();\n }", "public void database() throws IOException\n {\n \tFile file =new File(\"data.txt\");\n\t if(!file.exists())\n\t {\n\t \tSystem.out.println(\"File 'data.txt' does not exit\");\n\t System.out.println(file.createNewFile());\n\t file.createNewFile();\n\t databaseFileWrite(file);//call the databaseFileRead() method, to initialize data from ArrayList and write data into data.txt\n\t }\n\t else\n\t {\n\t \tdatabaseFileRead();//call the databaseFileRead() method, to load data directly from data.txt\n\t }\n }", "public void retrieveTodo() {\r\n File file = new File(\"C:\\\\Users\\\\Dalia\\\\Desktop\\\\CPSC 210\\\\Project\\\\project_b2h3b\\\\data\");\r\n JFileChooser chooser = new JFileChooser(file);\r\n int userSelection = chooser.showOpenDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (userSelection == JFileChooser.APPROVE_OPTION) {\r\n fileName = f.getAbsolutePath();\r\n reader = new MyTodoJsonReader(fileName);\r\n try {\r\n myTodo = reader.readMyToDoList();\r\n todoListGui();\r\n } catch (IOException ioException) {\r\n JOptionPane.showMessageDialog(null, \"File doesn't exist!\");\r\n }\r\n }\r\n }", "public static void main(String args[]) {\n\t\tNuxeoClient client = new NuxeoClient.Builder().url(\"http://localhost:8080/parliament\")\n\t\t// NuxeoClient client = new NuxeoClient.Builder().url(\"http://tourismministry.phoenixsolutions.com.np:8888/parliament\")\n\t\t\t\t.authentication(\"Administrator\", \"Administrator\").schemas(\"*\") // fetch all document schemas\n\t\t\t\t.connect();\n\t\tRepository repository = client.repository();\n\n//Menu\n\t//create\n\t\tDocument file = Document.createWithName(\"One\", \"Band\");\n\t\tDocument menu = Document.createWithName(\"menu\", \"Folder\");\n\t\t// menu.setPropertyValue(\"band:abbr\", \"ELF\");\n\t\trepository.createDocumentByPath(\"/\", menu);\n\t\tDocument report = Document.createWithName(\"report-list\", \"Report-List\");\n\t\trepository.createDocumentByPath(\"/menu\", report);\n\t\tDocument event = Document.createWithName(\"event-list\", \"Event-List\");\n\t\trepository.createDocumentByPath(\"/menu\", event);\n\t\tDocument meeting = Document.createWithName(\"meeting-list\", \"Meeting-List\");\n\t\trepository.createDocumentByPath(\"/menu\", meeting);\n\t\tDocument ics = Document.createWithName(\"integrated-central-status-list\", \"Integrated-Central-Status-List\");\n\t\trepository.createDocumentByPath(\"/menu\", ics);\n\n\n\t\tUserManager userManager = client.userManager();\n\n\t\tcreateUsers(userManager,\"operator\",\"Operator\",\"operator\");\n\t\tcreateUsers(userManager,\"secretary\",\"Secretary\",\"secretary\");\n\t\tcreateUsers(userManager,\"depsecretary\",\"DepSecretary\",\"depsecretary\");\n\t\tcreateUsers(userManager,\"education\",\"Education\",\"education\");\n\t\tcreateUsers(userManager,\"health\",\"Health\",\"health\");\n\t\tcreateUsers(userManager,\"tourism\",\"Tourism\",\"tourism\");\n\n\t\tString[] memberUsersSecretariat = {\"operator\",\"secretary\",\"depsecretary\"};\n\t\tString[] memberUsersBeruju = {\"education\",\"health\",\"tourism\"};\n\t\tcreateGroup(userManager,\"secretariat\",\"Secretariat\",memberUsersSecretariat);\n\t\tcreateGroup(userManager,\"beruju\",\"Beruju\",memberUsersBeruju);\n\t\n//fetching\n\n\t\t// Document myfile = repository.fetchDocumentByPath(\"/default-domain/workspaces/Bikings/Liferay/One\");\n\t\t// String title = myfile.getPropertyValue(\"band:band_name\"); // equals to folder\n\t\t// System.out.println(title);\n\n\n// file upload\n\n\t\t// Document domain = client.repository().fetchDocumentByPath(\"/default-domain\");\n\n\t\t// Let's first retrieve batch upload manager to handle our batch:\n\t\t// BatchUploadManager batchUploadManager = client.batchUploadManager();\n\n\t\t// // // getting local file\n\t\t// ClassLoader classLoader = new NuxeoConnect().getClass().getClassLoader();\n\t\t// File file = new File(classLoader.getResource(\"dipesh.jpg\").getFile());\n\n\t\t// // // create a new batch\n\t\t// BatchUpload batchUpload = batchUploadManager.createBatch();\n\t\t// Blob fileBlob = new FileBlob(file);\n\t\t// batchUpload = batchUpload.upload(\"0\", fileBlob);\n\n\t\t// // // attach the blob\n\t\t\n\t\t// Document doc = client.repository().fetchDocumentByPath(\"/default-domain/workspaces/Phoenix/DipeshCollection/dipeshFile\");\n\t\t// doc.setPropertyValue(\"file:content\", batchUpload.getBatchBlob());\n\t\t// doc = doc.updateDocument();\n\t\t// // get\n\t\t// Map pic = doc.getPropertyValue(\"file:content\");\n\t\t// System.out.print(pic);\n\t}", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void testDB(){\n DB=new LinkedList<>(); \n DB.add(new Offer(\"ID1\",\"AGV923\",\"Nico\",\"Leo\",\"Salvo\",\"\"));\n DB.add(new Offer(\"ID2\",\"ADJ325\",\"Tizio\", \"Caio\", \"Sempronio\",\"\"));\n DB.add(new Offer(\"ID3\",\"T56G2G\",\"Antonella\", \"Daniele\",\"\",\"\"));\n }", "public static void main(final String[] args) throws Exception {\n MongoClient mongo = new MongoClient(\"localhost\", 27017);\n /**** Get database ****/\n // if database doesn't exists, MongoDB will create it for you\n DB db = mongo.getDB(\"enron\");\n DBCollection table = db.getCollection(\"demo\");\n BasicDBObject searchQuery = new BasicDBObject();\n searchQuery.put(\"_id\", 1);\n DBCursor cursor = table.find(searchQuery).limit(5);\n System.out.println(\"test\");\n System.out.println(JSON.serialize(cursor));\n\n }", "String getDatabase();", "private DatabaseCustomAccess(Context context) {\n\t\thelper = new SpokaneValleyDatabaseHelper(context);\n\n\t\tsaveInitialPoolLocation(); // save initial pools into database\n\t\tsaveInitialTotalScore(); // create total score in database\n\t\tsaveInitialGameLocation(); // create game location for GPS checking\n\t\tLoadingDatabaseTotalScore();\n\t\tLoadingDatabaseScores();\n\t\tLoadingDatabaseGameLocation();\n\t}", "public interface DB_manager {\n\n\n boolean check_exist_client(Client c);\n\n\n ///add function content value\n String addclient(ContentValues client);\n String addmodel(ContentValues model);\n int addcar(ContentValues car);\n int addbranch(ContentValues car);\n void add_url_image(ContentValues contentValues);\n\n\n\n ////list function\n List<Models> allmodels();\n List<Client> allclient();\n List<Branch> allbranch();\n List<Car> allcars();\n public void allurl();\n\n\n\n /// instance of all database\n void db_all(Context context);\n\n\n ///cursor list function\n Cursor Allmodels();\n Cursor Allclient();\n Cursor Allcar();\n Cursor Allbranch();\n\n public String get_url_image(String num);\n\n ///delete function\n int delete_client(int id);\n int delete_model(int id);\n int delete_branch(int id);\n int delete_car(int id);\n\n\n\n}", "private void loadDatabase() {\n Runnable load = new Runnable() {\n public void run() {\n try {\n boolean isSuccess = false;\n File data = Environment.getDataDirectory();\n\n String currentDbPath = \"//data//com.udacity.adcs.app.goodintents//databases//goodintents.db\";\n\n File currentDb = new File(data, currentDbPath);\n File restoreDb = getFileFromAsset(mActivity, mActivity.getExternalFilesDir(null) + \"/\", \"goodintents.db\");\n\n if (restoreDb != null ? restoreDb.exists() : false) {\n FileInputStream is = new FileInputStream(restoreDb);\n FileOutputStream os = new FileOutputStream(currentDb);\n\n FileChannel src = is.getChannel();\n FileChannel dst = os.getChannel();\n dst.transferFrom(src, 0, src.size());\n\n is.close();\n os.close();\n src.close();\n dst.close();\n isSuccess = true;\n }\n\n if (isSuccess) {\n PreferencesUtils.setBoolean(mActivity, R.string.initial_db_load_key, true);\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n } finally {\n mActivity.runOnUiThread(loadDatabaseRunnable);\n }\n }\n };\n\n Thread thread = new Thread(null, load, \"loadDatabase\");\n thread.start();\n }", "@GetMapping(path = \"${pathInitDatabase}\", produces = MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic Object feedDatabase() {\r\n\t\tlivreDAO.feed();\r\n\t\tMap<String, String> r = new HashMap<String, String>();\r\n\t\tr.put(databaseReset, \"\" + true);\r\n\t\tr.put(databaseFeed, \"\" + true);\r\n\t\tr.put(databaseNumberBooks, \"\" + livreDAO.getAllLivres().size());\r\n\r\n\t\treturn r;\r\n\t}", "public static void main(String[] args) {\n\t\tCluster cluster = CouchbaseCluster.create();\n\t\t// Open the default bucket and the \"beer-sample\" one\n\t\tBucket defaultBucket = cluster.openBucket();\n\t\t// Disconnect and clear all allocated resources\n\n\t\t/*JsonObject productJson = JsonObject.empty().put(\"name\", \"An ice sculpture\").put(\"price\", 12.50)\n\t\t\t\t.put(\"length\", 7.0).put(\"width\", 12.0).put(\"height\", 9.5)\n\t\t\t\t.put(\"description\", \"This product is not for sale\");\n\n\t\tJsonDocument productJsonToBeStored = JsonDocument.create(\"productKey\", productJson);\n\t\tJsonDocument productRecievedFromDB = defaultBucket.upsert(productJsonToBeStored);*/\n\t\t\n\t\t\n\n\t\tcluster.disconnect();\n\t}", "@Override\n public void run(ApplicationArguments args){\n User user1 = new User(\"Accounts Payable\");\n userRepository.save(user1);\n\n User user2 = new User(\"Admin\");\n userRepository.save(user2);\n\n Folder folder1 = new Folder(\"Accounts\", user1);\n folderRepository.save(folder1);\n\n Folder folder2 = new Folder(\"Letters\", user2);\n folderRepository.save(folder2);\n\n File file1 = new File(\"Invoice001\", \".exe\", 1.23, folder1);\n fileRepository.save(file1);\n\n File file2 = new File(\"Invoice002\", \".exe\", 1.45, folder1 );\n fileRepository.save(file2);\n\n File file3 = new File(\"Letter001\", \".doc\", 1.67, folder2);\n fileRepository.save(file3);\n\n\n }", "@GET\n @Produces(\"application/json\")\n public String getJson(@PathParam(\"id\") String id) throws ClassNotFoundException, SQLException, JSONException {\n JSONObject jQoD = null;\n\n Class.forName(\"org.sqlite.JDBC\");\n Connection conn = DriverManager.getConnection(\"jdbc:sqlite:/data/googleflu.db\");\n Statement stat = conn.createStatement();\n String query = \"select Date,\" + id + \" from fludata;\";\n System.out.println(query);\n ResultSet rs = stat.executeQuery(query);\n JSONObject jDataSet = new JSONObject();\n JSONArray jEntries = new JSONArray();\n while (rs.next()) {\n JSONObject jEntry = new JSONObject();\n jEntry.put(\"Date\", rs.getString(\"Date\"));\n jEntry.put(\"Value\", rs.getInt(id));\n jEntries.put(jEntry);\n }\n jDataSet.put(\"dataset\", jEntries);\n rs.close();\n conn.close();\n return jDataSet.toString(5);\n }" ]
[ "0.6587084", "0.59001803", "0.5850797", "0.5781519", "0.57244664", "0.57080203", "0.5680197", "0.56416494", "0.5611351", "0.55827695", "0.5581512", "0.5568205", "0.55459124", "0.5505512", "0.55007637", "0.546872", "0.54406625", "0.54374564", "0.5431057", "0.5422269", "0.5405833", "0.5402387", "0.53921264", "0.53904516", "0.53857285", "0.53747016", "0.5371814", "0.53706574", "0.5364065", "0.53564394", "0.53560275", "0.5315964", "0.5300564", "0.5300367", "0.5287626", "0.5274968", "0.5252233", "0.52434313", "0.52280414", "0.5224312", "0.52211213", "0.5205779", "0.52048796", "0.5176894", "0.51659465", "0.5139603", "0.5134436", "0.51258993", "0.5122805", "0.512086", "0.5118898", "0.5116589", "0.5116426", "0.51163584", "0.51083493", "0.5106448", "0.5092385", "0.50869805", "0.5080448", "0.5068641", "0.5060197", "0.5059616", "0.5058736", "0.5054774", "0.50519663", "0.503844", "0.50355464", "0.5031757", "0.50287765", "0.5018781", "0.50143594", "0.5007191", "0.50028825", "0.4995207", "0.49939233", "0.49884394", "0.4986641", "0.49814436", "0.49774346", "0.4971958", "0.49707618", "0.49666652", "0.49637505", "0.49633887", "0.49616972", "0.4961371", "0.49575168", "0.49570736", "0.49570033", "0.49537417", "0.49515414", "0.49492112", "0.49457783", "0.49448994", "0.494248", "0.49405798", "0.49396822", "0.493947", "0.49256468", "0.4925504", "0.49191886" ]
0.0
-1
Database db = new Database("data/restaurants.json", "data/reviews.json" , "data/users.json");
@Test public void test03() { User user1 = new User("megan"); user1.setUser_id("UserID1"); assertEquals("UserID1", user1.getUser_id()); // db.addRestaurant(rest1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Database(JsonObject data){\n this.obj = data;\n rest = (JsonArray) obj.get(\"restaurants\");\n /* TODO \nset the memebr variable declared above.*/\n }", "public YelpDB(String restaurants, String reviews, String users) throws IOException {\n\n this.gson = new Gson();\n this.restaurantMap = new ConcurrentHashMap<String, Restaurant>();\n this.reviewMap = new ConcurrentHashMap<String, Review>();\n this.userMap = new ConcurrentHashMap<String, YelpUser>();\n\n // Process restaurants\n try (BufferedReader reader = new BufferedReader(new FileReader(restaurants))) {\n String line;\n while ((line = reader.readLine()) != null) {\n Restaurant r = gson.fromJson(line, Restaurant.class);\n String business_id = r.getID();\n this.restaurantMap.put(business_id, r);\n }\n }\n\n // Process reviews\n try (BufferedReader reader = new BufferedReader(new FileReader(reviews))) {\n String line;\n while ((line = reader.readLine()) != null) {\n Review r = gson.fromJson(line, Review.class);\n String review_id = r.getID();\n this.reviewMap.put(review_id, r);\n }\n }\n\n // Process users\n try (BufferedReader reader = new BufferedReader(new FileReader(users))) {\n String line;\n while ((line = reader.readLine()) != null) {\n YelpUser u = gson.fromJson(line, YelpUser.class);\n String user_id = u.getID();\n this.userMap.put(user_id, u);\n }\n }\n }", "public static void run(String[] args){\n writeList(\"data\\\\yelp_academic_dataset_business.json\", \"data\\\\list-business.txt\", \"business_id\");\n writeList(\"data\\\\yelp_academic_dataset_user.json\", \"data\\\\list-user.txt\", \"user_id\");\n writeList(YelpBusinessJsonScraper.getCategories(args), \"data\\\\list-categories.txt\");\n writeList(\"data\\\\yelp_academic_dataset_review.json\", \"data\\\\list-review.txt\", \"review_id\");\n\n // Write to SQL\n writeSQL(\"data\\\\yelp_academic_dataset_business.json\", \"data\\\\SQL-business.txt\",\n new String [] {\"business_id\", \"name\", \"full_address\", \"score\"});\n writeSQL(\"data\\\\yelp_academic_dataset_user.json\", \"data\\\\SQL-user.txt\",\n new String [] {\"user_id\", \"name\"});\n writeSQLReviews(\"data\\\\yelp_academic_dataset_review.json\", \"data\\\\SQL-review.txt\",\n \"data\\\\list-business.txt\", \"data\\\\list-user.txt\", new String [] {\"review_id\", \"text\", \"stars\", \"businessID\", \"userID\"}, 6);\n writeSQL(YelpBusinessJsonScraper.getCategories(args), \"data\\\\SQL-categories.txt\");\n writeSQLRelationshipTable(\"data\\\\yelp_academic_dataset_business.json\", \"data\\\\SQL-business-categories-rel.txt\",\n \"data\\\\list-business.txt\", \"data\\\\list-categories.txt\", \"business_id\");\n\n }", "public static void main(String[] args) throws MalformedURLException {\n HttpClient httpClient = new StdHttpClient.Builder() \n .url(\"http://localhost:5984\") \n .build(); \n //Connect to CouchDB instance\n CouchDbInstance dbInstance = new StdCouchDbInstance(httpClient);\n //Point to Person database\n CouchDbConnector db = dbInstance.createConnector(\"person\", true);\n //Student Object\n Student s = new Student();\n s.setFirstname(\"aoifes\");\n s.setSurname(\"sayers\");\n s.setEmail(\"[email protected]\");\n\n List<String> listOfIds = db.getAllDocIds();\n System.out.println(listOfIds);\n System.out.println(listOfIds.get(0));\n String firstStud = listOfIds.get(0);\n Student stud = db.get(Student.class, firstStud);\n System.out.println(stud.getTnumber());\n\n db.create((s));\n\n\n\n HttpClient httpClient1 = new StdHttpClient.Builder() \n .url(\"http://localhost:5984\") \n .build(); \n\n }", "private void setBasketRepository() {\n ObjectMapper mapper = new ObjectMapper();\n TypeReference<List<Basket>> typeReference = new TypeReference<>() {\n };\n InputStream inputStream = TypeReference.class.getResourceAsStream(\"/json/data_demo.json\");\n try {\n List<Basket> invoices = mapper.readValue(inputStream, typeReference);\n basketRepository.saveAll(invoices);\n log.info(\"Saved in database successfully!\");\n } catch (IOException e) {\n log.error(\"Unable to save in database: {}\", e.getMessage());\n }\n }", "public RecipeDataBase(){\n //recipes = new ArrayList<>();\n loadDatabase();\n \n }", "private void getDatabase(){\n\n }", "public Repository (Application application, Activity activity){\n VideoDatabase database=VideoDatabase.getInstance(application);\n myDAO=database.myDAO();\n allChapters=myDAO.getAllChapter();\n allLecture=myDAO.getAllLecture();\n this.activity=activity;\n //allChapterJson=myDAO.getAllChapterJson();\n //allLectureJson=myDAO.getAllLectureJson();\n }", "public Database initDB() {\n Database db = new Database(\"dataBase.db\");\n\n// db.insertData(\"1 Dragos Dinescu [email protected] 0744522600 Digi 10-12-2020\");\n// db.insertData(\"2 Adelina Mirea [email protected] 0733651320 Orange 14-10-2020\");\n// db.insertData(\"3 Radu Sorostinean [email protected] 0733723321 Digi 1-10-2020\");\n// db.insertData(\"4 Andrei Brasoveanu [email protected] 0732341390 Vodafone 12-11-2020\");\n return db;\n\n //db.deleteFromDB();\n //db.updateDB(\"1 alex radu [email protected] 022256926 orange 10/08/2010\");\n }", "Database createDatabase();", "public Database() {\n //Assign instance variables.\n this.movies = new ArrayList<>();\n this.users = new ArrayList<>();\n }", "public static boolean getDb() {\n boolean drinkOK = false, ingredientOK = false;\n String responseBody = getWebData(\"getIngredients.php\");\n // If the getWebData returns error the HTTP-get has failed and\n // the paring shall not be done.\n if (responseBody.equals(\"error\"))\n return false;\n Log.d(\"getDB\", responseBody);\n try {\n // Prepare the JSON to be parsed.\n JSONObject json = new JSONObject(responseBody);\n JSONArray jArray = json.getJSONArray(\"ingredients\");\n Log.d(\"getDrinks.php\", jArray.toString());\n for (int i = 0; i < jArray.length(); ++i) {\n JSONObject jObject;\n jObject = jArray.getJSONObject(i);\n // Parses the JSON and creates the ContentValues object.\n ContentValues values = new Ingredient(jObject.getInt(\"_id\"), jObject.getString(\"name\"),\n jObject.getString(\"url\"), jObject.getString(\"ingredienttype\"), jObject.getInt(\"alcohollevel\"),\n jObject.getString(\"description\")).getContentValues();\n // Insets the data into the SQLite.\n Uri myBarUriIngredient = MyBarApplication.contentResolver().insert(\n MyBarContentProvider.CONTENTURI_INGREDIENT, values);\n Log.d(Data.class.getClass().getName(),\n \"Inserted Ingredient. Created row: \" + myBarUriIngredient.toString());\n }\n ingredientOK = true;\n\n } catch (JSONException e) {\n Log.e(\"JSONError ingredients\", e.toString());\n ingredientOK = false;\n }\n\n responseBody = getWebData(\"getDrinks.php\");\n Log.d(\"getDB\", responseBody);\n try {\n // Prepare the JSON to be parsed.\n JSONObject json = new JSONObject(responseBody);\n // Creates the JSON array from the drinks array.\n JSONArray jArray = json.getJSONArray(\"drinks\");\n // Print the json to the Log.d.\n Log.d(\"getDrinks.php\", jArray.toString());\n for (int i = 0; i < jArray.length(); ++i) {\n JSONObject jObject = jArray.getJSONObject(i);\n // Gets the values from the JSON-data.\n ContentValues values = new Drink(jObject.getInt(\"_id\"), jObject.getString(\"name\"),\n jObject.getString(\"url\"), jObject.getString(\"glass\"), jObject.getString(\"ingredient\"),\n jObject.getString(\"description\"), jObject.getInt(\"rating\"),\n // Sets favorite to 0 and gets the content values.\n 0).getContentValues();\n // Insets the data into the SQLite\n Uri myBarUriDrink = MyBarApplication.contentResolver().insert(MyBarContentProvider.CONTENTURI_DRINK,\n values);\n Log.d(Data.class.getClass().getName(), \"Inserted Drink. Created row: \" + myBarUriDrink.toString());\n }\n // Sets the return variable.\n drinkOK = true;\n } catch (JSONException e) {\n // Prints to Log.d.\n Log.e(\"JSONError drinks\", e.toString());\n drinkOK = false;\n }\n\n return ingredientOK & drinkOK;\n }", "@Override\n public void run(String... args) {\n try {\n\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\n ObjectMapper mapper = new ObjectMapper();\n\n final ObjectMapper configure = mapper.configure(\n DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true\n );\n\n InputStream inputStreamProducts = classLoader.getResourceAsStream(\"json/product.json\");\n InputStream inputStreamInventory = classLoader.getResourceAsStream(\"json/inventory.json\");\n\n Product[] product = mapper.readValue(inputStreamProducts, Product[].class);\n Inventory[] inventory = mapper.readValue(inputStreamInventory, Inventory[].class);\n\n MongoClient client1 = new MongoClient(\"localhost\");\n\n // Dropping the Warehouserest database in mongodb\n client1.dropDatabase(\"warehouse\");\n\n// ## Start Morphia part\n Morphia morphia = new Morphia();\n morphia.map(Product.class);\n morphia.map(Inventory.class);\n\n Datastore datastore = morphia.createDatastore(client1, \"warehouse\");\n\n for (Product valueProducts : product) {\n datastore.save(valueProducts);\n }\n\n for (Inventory inventories : inventory) {\n datastore.save(inventories);\n }\n\n\n\n/*\n// # Start populating mongodb from Inventory json\n InputStream inputStreamInventory = classLoader.getResourceAsStream(\"json/inventory.json\");\n\n // Load Inventory json at startup\n assert inputStreamInventory != null;\n InputStreamReader inputStreamReaderInventory = new InputStreamReader(inputStreamInventory);\n BufferedReader bufferedReaderInventory = new BufferedReader(inputStreamReaderInventory);\n StringBuilder stringBufferInventory = new StringBuilder();\n\n String line1 = \"\";\n while ((line1 = bufferedReaderInventory.readLine()) != null) {\n stringBufferInventory.append(line1);\n }\n\n MongoCollection<Document> collectionInventory = client1.getDatabase(\"warehouse\").getCollection(\"inventory\");\n Document doc1 = Document.parse(stringBufferInventory.toString());\n collectionInventory.insertOne(doc1);*/\n\n System.out.println(\"Inventory loaded!\");\n System.out.println(\"Products loaded!\");\n } catch (Exception e) {\n System.out.println(\"Not able to load products: \" + e.getMessage());\n }\n }", "public static void main(String[] args){\n launch(args);\n //this is some code that tests out the JSON saving and importing of data\n // FoodBank fb1 = new FoodBank(\"Blue Ridge Area Food Bank\");\n // FoodBank fb2 = new FoodBank(\"Loaves & Fishes Food Pantry\");\n\n // fb1.setLocation(new Coordinate(38.039690, -78.480940));\n // fb2.setLocation(new Coordinate(38.077940, -78.500490));\n\n // FoodItem beefaroni = new FoodItem(\"Beefaroni\");\n // beefaroni.setCaloriesPerServing(350);\n // beefaroni.setCarbsPerServing(48);\n // beefaroni.setCholesterolPerServing(20);\n // beefaroni.setFatPerServing(13);\n // beefaroni.setServingsPerContainer(1);\n // beefaroni.setQuantity(45);\n // beefaroni.addFoodType(FoodItem.FoodType.MEAT);\n // beefaroni.addFoodType(FoodItem.FoodType.GRAIN);\n\n // FoodItem broth = new FoodItem(\"Swanson Chicken Broth\");\n // broth.setCaloriesPerServing(20);\n // broth.setCarbsPerServing(2);\n // broth.setCholesterolPerServing(0);\n // broth.setFatPerServing(0);\n // broth.setServingsPerContainer(1);\n // broth.setQuantity(28);\n // broth.addFoodType(FoodItem.FoodType.NONE);\n\n // fb1.addFoodItem(beefaroni);\n // fb2.addFoodItem(broth);\n\n // FoodBankList fbl = new FoodBankList();\n // fbl.addFoodBank(fb1);\n // fbl.addFoodBank(fb2);\n\n // JSONFileHandler.getJFH().saveToJSON(fbl.toJSON(), \"FoodBanks.json\");\n\n // FoodBankList importedfbl = new FoodBankList(JSONFileHandler.getJFH().getJSONFromFile(\"FoodBanks.json\"));\n // ArrayList<FoodBank> foodBanks = importedfbl.getFoodBanks();\n // foodBanks.forEach(fb -> {\n // System.out.println(\"Imported food bank with name: \" + fb.getName());\n // });\n }", "@GET\n @Path(\"/database/get\")\n public Response getDatabase() throws JsonGenerationException, JsonMappingException, IOException{\n return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Database2.get())).build();\n }", "public static MainDatabase deserializeDatabase() {\n MainDatabase data = new MainDatabase();\n // first check if the file exists\n File file = new File(Constants.SAVE_FILE);\n if (!file.exists()) {\n return data;\n }\n try (FileInputStream in = new FileInputStream(Constants.SAVE_FILE);\n BufferedInputStream reader = new BufferedInputStream(in)) {\n\n // un-encrypted header (salt and iv necessary for decryption)\n byte[] salt = new byte[reader.read()];\n reader.read(salt);\n byte[] iv = new byte[reader.read()];\n reader.read(iv);\n Cipher enc = getEncryptionCipher(salt, iv);\n\n try (CipherInputStream cis = new CipherInputStream(reader, enc);\n ObjectInputStream ois = new ObjectInputStream(cis)) {\n\n // if we need any settings, read them here\n\n // read the travel database\n int count = ois.readByte();\n for (int i = 0; i < count; i++) {\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n data.addTravel((SingleTravel) ois.readObject());\n }\n }\n\n // read the user database\n count = ois.readInt();\n for (int i = 0; i < count; i++) {\n RegisteredUser ru = (RegisteredUser) ois.readObject();\n data.addUser(ru);\n\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n int itSize = ois.readInt();\n // check the itinerary to make sure it is still valid\n boolean validItinerary = (itSize > 0);\n Itinerary it = new Itinerary();\n for (int k = 0; k < itSize; k++) {\n try {\n SingleTravel st = data.getTravel(TravelType.values()[ois.readByte()],\n ois.readUTF());\n if (st == null) { // doesn't exist; do not add itinerary\n validItinerary = false;\n } else {\n it.add(st);\n }\n } catch (IllegalArgumentException e) {\n validItinerary = false;\n // we don't need to log this -- probably a travel expired\n }\n }\n if (validItinerary) {\n ru.bookItinerary(it);\n }\n }\n }\n }\n } catch (IOException | GeneralSecurityException | ClassNotFoundException e) {\n log.log(Level.SEVERE, \"Error reading from file.\", e);\n }\n return data;\n }", "private static void readDatabase(String path) {\n try {\n FileInputStream fileIn = new FileInputStream(path + \"/database.ser\");\n ObjectInputStream inStream = new ObjectInputStream(fileIn);\n database = (Database) inStream.readObject();\n inStream.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n } catch (ClassNotFoundException c) {\n c.printStackTrace();\n }\n }", "public Database() {\n if (init) {\n\n //creating Transaction data\n Transaction transactionOne\n = new Transaction(1, \"Debit\", \"Spar Grocery\", 54.68,1);\n\n transactionDB.add(transactionOne);\n\n // Creating an Account data\n Account accountOne = new Account(1, 445, 111111111, \"Savings\",\n 1250.24, transactionDB);\n\n accountDB.add(accountOne);\n\n //creating withdrawal data\n Withdrawal withdrawalOne = new Withdrawal(1, 64422545, 600.89);\n withdrawalDB.add(withdrawalOne);\n\n //creating transfer data\n Transfer transferOne = new Transfer(1, 25252525, 521.23);\n transferDB.add(transferOne);\n\n //creating lodgement data\n Lodgement lodgementOne = new Lodgement(1, 67766666, 521.23);\n lodgementDB.add(lodgementOne);\n\n //add Customer data \n Customer customerOne\n = new Customer(1, \"Darth Vader\", \"[email protected]\",\n \"Level 5, Suit Dark\", \"darkSideIsGoodStuff\",\n accountDB, withdrawalDB, transferDB, lodgementDB);\n\n customerDB.add(customerOne);\n\n init = false;\n }\n }", "public Database(String url) {\n this.url = url;\n\n File f = new File(url);\n\n if (f.exists()) {\n try {\n f.mkdirs();\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //create table relationship\n LinkedList<String> relationship_attributes = new LinkedList<>();\n relationship_attributes.add(\"id_entity1\");\n relationship_attributes.add(\"id_entity2\");\n relationship_attributes.add(\"description\");\n this.create_table(\"relationship\", relationship_attributes);\n }", "public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public interface DatabaseOperations {\n\n public static final String DATABASE_NAME = \"ghost_database\";\n\n public static final String TABLE_SIGHTINGS = \"SIGHTINGS\";\n\n public static final String ROW_ID = \"_id\";\n\n public static final String TITLE = \"title\";\n public static final String DESCRIPTION = \"DESCRIPTION\";\n public static final String LATITUDE = \"lat\";\n public static final String LONGITUDE = \"lon\";\n public static final String RATING = \"rating\";\n}", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "DataBase createDataBase();", "DataStore getDataStore ();", "public MoviesDatabase()\n {\n file = new FileOperation();\n menu = new Menu();\n validation = new Validation();\n }", "Object getDB();", "public interface RecipeStore {\n //Returns a recipe list of all recipes\n List<Recipe> getAllRecipes();\n //Returns a string list of recipe titles found from ingredients query\n List<String> getRecipeByIngredients(CharSequence query);\n //Returns a single recipe found from query\n Recipe getRecipe(CharSequence query);\n //Returns a single recipe image from query\n byte[] getRecipeImage(CharSequence query);\n //Returns a bitmap list of all small images for all recipes\n List<Bitmap> getRecipeImgSmall();\n //Returns a string list of all recipe titles\n List<String> getRecipeTitles();\n //Takes a recipe id and adds it to the favorites table\n void addToFavorites(int recipeId);\n //Returns a bitmap list of all images for recipes in the favorites table\n List<Bitmap> getFavoriteRecipeImgs();\n //Returns a string list of all titles for recipes in the favorites table\n List<String> getFavoriteRecipeTitle();\n //Takes a recipe id and deletes it from the favorites table\n void deleteFavorite(int id);\n //Takes a recipe id and checks if it exists in the favorites table\n boolean isFavorite(int id);\n //Takes recipe parameters and inserts a new row in recipes table\n Recipe createRecipe(String title, String description, String ingredients, String instructions, byte[] photo, byte[] photoSmall);\n //Returns number of rows in recipes\n long getRecipesCount();\n //Opens the database\n SQLiteDatabase open() throws SQLException;\n //Closes the database\n void close();\n}", "public static void main(String[] args) throws IOException{ \n\t\tJsonReader reader = Json.createReader(new FileReader(\"testjson/abcde.json\")); \n\t\tJsonObject jsonob = reader.readObject();\n\t\tSystem.out.println(jsonob.toString());\n\t\tRowColStore parser= new RowColStore(10*1000*1000,\"testjson/abcde.layout\");\n\t\tint objid = 1;\n\t\tparser.insertObject(objid,jsonob,null);\n\t\tparser.insertObject(2,jsonob,null);\n\t\tparser.insertObject(3,jsonob,null);\n\t\t// populate the table \n\n\t\tSystem.out.println(\"get the result out \\n\");\n\t\t// objid, keystr,valstr,valnum,valbool - 5 bytes \n\t\t// read it out \n\t//\tparser.getObject(2);\n\t}", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "private void downloadData(SQLiteDatabase db){\n DeviceDataManager.downloadDeviceData(db);\n CustomerDataManager.downloadCustomerData(db);\n CheckInTypeDataManager.downloadCheckInTypeData(db);\n CheckInPointDataManager.downloadCheckInPointData(db);\n PhotographerDataManager.downloadPhotographerData(db);\n }", "private void fetchJsonData() {\n String url = \"https://raw.githubusercontent.com/acad600/JSONRepository/master/ISYS6203/O212-ISYS6203-RM01-00-DotaMarketplace.json\";\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(Request.Method.GET, url, null, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n for (int i = 0; i < response.length(); i++) {\n try {\n JSONObject obj = response.getJSONObject(i);\n String name = obj.getString(\"name\");\n int price = obj.getInt(\"price\");\n int stock = obj.getInt(\"stock\");\n double latitude = obj.getDouble(\"latitude\");\n double longitude = obj.getDouble(\"longitude\");\n\n database.insertNewItem(name, price, stock, latitude, longitude);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"MyActivity\", \"onErrorResponse\" + error.toString());\n }\n });\n\n requestQueue.add(jsonArrayRequest);\n }", "public static void main(String[] args) {\n\t Database db = new Database(\"localhost\", \"mycouchdb\");\n\n\t // create a hash map document with two fields \n\t Map<String,String> doc = new HashMap<String, String>();\n\t //doc.put(\"_id\", \"testDoc\");\n\t doc.put(\"foo\", \"value for the foo attribute\");\n\t doc.put(\"bar\", \"value for the bar attribute\");\n\n\t // create the document in couchdb\n\t db.createDocument(doc);\n\t \n\t doc.put(\"updated\", \"updated\");\n\t db.createOrUpdateDocument(doc);\n\t \n\t //db.getDocument(cls, docId)\n\t}", "@Override\n public JsonObjectRequest fetchData(AppDatabase database) {\n // create the JSON request for courses offered by each school\n return new JsonObjectRequest\n (Request.Method.GET, \"https://data.gov.sg/api/action/datastore_search?resource_id=3bb9e6b0-6865-4a55-87ba-cc380bc4df39&limit=500000\", null, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n try {\n // parse results as json array\n JSONArray allSchoolToCourseAsJSONArray = getResultsAsJSONArray(response);\n\n // get each entry in results and store in database\n parseJSONArrayAndStoreInDatabase(database, allSchoolToCourseAsJSONArray);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n // TODO: Handle error\n System.out.println(\"Rabak la bro: \" + error.toString());\n }\n });\n }", "private void populateDatabase(final FirebaseDatabase database, final DatabaseReference sessionRef) {\n cityName = getIntent().getStringExtra(\"cityName\");\n\n DatabaseReference citiesRef = database.getReference(\"Cities\");\n Log.d(\"Sean\", \"citiesRef: \" + database.getReference(\"Cities\").child(cityName).toString());\n\n citiesRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Log.d(\"Sean\", \"Restaurants: \" + dataSnapshot.child(cityName).child(\"Restaurants\").getValue().toString());\n Map<String, Restaurant> restaurants = new HashMap();\n for (DataSnapshot restaurantData : dataSnapshot.child(cityName).child(\"Restaurants\").getChildren()) {\n restaurants.put(restaurantData.getKey(), restaurantData.getValue(Restaurant.class));\n }\n DatabaseReference restaurantsRef = sessionRef.child(\"Restaurants\");\n restaurantsRef.setValue(restaurants);\n\n Log.d(\"Sean\", \"Food Items: \" + dataSnapshot.child(cityName).child(\"Food Items\").getValue().toString());\n Log.d(\"Sean\", \"Food Items Class: \" + dataSnapshot.child(cityName).child(\"Food Items\").getClass().toString());\n\n ArrayList<Object> foodItems = (ArrayList) dataSnapshot.child(cityName).child(\"Food Items\").getValue();\n DatabaseReference foodItemsRef = sessionRef.child(\"Food Items\");\n foodItemsRef.setValue(foodItems);\n\n populateLocalData(sessionRef, dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.d(\"Sean\", \"The database failed to read: \" + databaseError.getCode());\n }\n });\n }", "public MyApp()\n { \n \ttry{\n \t\tURI uri = URI.create(path.Path());\n\t \tDatabase sqliteDB = DatabaseFactory.create(uri);\n\t \t\n\t\t \tStatement cu = sqliteDB.createStatement(statement.CreateUser());\t\t\t\t\n\t\t \tcu.prepare();\n\t\t \tcu.execute();\n\t\t \tcu.close();\n\t\t\t\t\n\t\t\t\tStatement cp = sqliteDB.createStatement(statement.CategoriaProducto());\t\t\t\t\n\t\t\t\tcp.prepare();\n\t\t\t\tcp.execute();\n\t\t\t\tcp.close();\n\t\t\t\t\n\t\t\t\tStatement cpt = sqliteDB.createStatement(statement.TemporadaCategoriaProducto());\t\t\t\t\n\t\t\t\tcpt.prepare();\n\t\t\t\tcpt.execute();\n\t\t\t\tcpt.close();\n\t\t\t\t\n\t\t\t\tStatement p = sqliteDB.createStatement(statement.Producto());\t\t\t\t\n\t\t\t\tp.prepare();\n\t\t\t\tp.execute();\n\t\t\t\tp.close();\n\t\t\t\t\n\t\t\t\tStatement pt = sqliteDB.createStatement(statement.TemporadaProducto());\t\t\t\t\n\t\t\t\tpt.prepare();\n\t\t\t\tpt.execute();\n\t\t\t\tpt.close();\n\t\t\t\t\n\t\t\t\tStatement cm = sqliteDB.createStatement(statement.Municipio());\t\t\t\t\n\t\t\t\tcm.prepare();\n\t\t\t\tcm.execute();\n\t\t\t\tcm.close();\n\t\t\t\t\n\t\t\t\tStatement cmt = sqliteDB.createStatement(statement.TemporadaMunicipio());\t\t\t\t\n\t\t\t\tcmt.prepare();\n\t\t\t\tcmt.execute();\n\t\t\t\tcmt.close();\n\t\t\t\t\n\t\t\t\tStatement ce = sqliteDB.createStatement(statement.Establecimiento());\t\t\t\t\n\t\t\t\tce.prepare();\n\t\t\t\tce.execute();\n\t\t\t\tce.close();\n\t\t\t\t\n\t\t\t\tStatement cet = sqliteDB.createStatement(statement.TemporadaEstablecimiento());\t\t\t\t\n\t\t\t\tcet.prepare();\n\t\t\t\tcet.execute();\n\t\t\t\tcet.close();\n\t\t\t\t\n\t\t\t\tStatement cpr = sqliteDB.createStatement(statement.Presentacion());\t\t\t\t\n\t\t\t\tcpr.prepare();\n\t\t\t\tcpr.execute();\n\t\t\t\tcpr.close();\n\t\t\t\t\n\t\t\t\tStatement cprt = sqliteDB.createStatement(statement.TemporadaPresentacion());\t\t\t\t\n\t\t\t\tcprt.prepare();\n\t\t\t\tcprt.execute();\n\t\t\t\tcprt.close();\n\t\t\t\t\n\t\t\t\tStatement cpf = sqliteDB.createStatement(statement.ProductoFiltrado());\t\t\t\t\n\t\t\t\tcpf.prepare();\n\t\t\t\tcpf.execute();\n\t\t\t\tcpf.close();\n\t\t\t\t\n\t\t\t\tStatement cpft = sqliteDB.createStatement(statement.TemporadaProductoFiltrado());\t\t\t\t\n\t\t\t\tcpft.prepare();\n\t\t\t\tcpft.execute();\n\t\t\t\tcpft.close();\n\t\t\t\t\n\t\t\t\tStatement cb = sqliteDB.createStatement(statement.Busqueda());\t\t\t\t\n\t\t\t\tcb.prepare();\n\t\t\t\tcb.execute();\n\t\t\t\tcb.close();\n\t\t\t\t\n\t\t\t\tStatement cbt = sqliteDB.createStatement(statement.TemporadaBusqueda());\t\t\t\t\n\t\t\t\tcbt.prepare();\n\t\t\t\tcbt.execute();\n\t\t\t\tcbt.close();\n\t\t\t\t\n\t\t\t\tStatement cf = sqliteDB.createStatement(statement.Favorito());\t\t\t\t\n\t\t\t\tcf.prepare();\n\t\t\t\tcf.execute();\n\t\t\t\tcf.close();\n\t\t\t\t\n\t\t\t\tStatement cftu = sqliteDB.createStatement(statement.TemporalUser());\t\t\t\t\n\t\t\t\tcftu.prepare();\n\t\t\t\tcftu.execute();\n\t\t\t\tcftu.close();\n\t\t\t\t\n\t\t\t\tStatement clc = sqliteDB.createStatement(statement.ListaCompras());\t\t\t\t\n\t\t\t\tclc.prepare();\n\t\t\t\tclc.execute();\n\t\t\t\tclc.close();\n\t\t\t\t\n\t\t\t\tStatement crc = sqliteDB.createStatement(statement.RutaCompras());\t\t\t\t\n\t\t\t\tcrc.prepare();\n\t\t\t\tcrc.execute();\n\t\t\t\tcrc.close();\n\t\t\t\t\n\t\t\t\tStatement cpc = sqliteDB.createStatement(statement.ProductoCompras());\t\t\t\t\n\t\t\t\tcpc.prepare();\n\t\t\t\tcpc.execute();\n\t\t\t\tcpc.close();\n\t\t\t\t\n\t\t\tsqliteDB.close();\n\t \t\n \t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}finally{\n \t//Llamar SplashScreen\n \tsplashScreen = new SplashScreen();\n \t\n \t\n \t\n // Push a screen onto the UI stack for rendering.\n //pushScreen(new MyScreen());\n \tpushScreen(splashScreen);\n\t\t}\n }", "public static Books readJSON(){\n Gson gson = new GsonBuilder().create();\n Books books = new Books();\n try {\n books = gson.fromJson(new JsonReader(new FileReader(\"books.json\")), Books.class);\n } catch (IOException e){\n e.printStackTrace();\n }\n return books;\n }", "private static Callback prepopulateDatabase(){\n return new Callback() {\n @Override\n public void onCreate(@NonNull SupportSQLiteDatabase db) {\n super.onCreate(db);\n\n ContentValues contentValuesTartampion = new ContentValues();\n contentValuesTartampion.put(\"name\",\"Projet Tartampion\");\n contentValuesTartampion.put(\"color\",0xFFEADAD1);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesTartampion);\n\n ContentValues contentValuesLucidia = new ContentValues();\n contentValuesLucidia.put(\"name\",\"Projet Lucidia\");\n contentValuesLucidia.put(\"color\",0xFFB4CDBA);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesLucidia);\n\n ContentValues contentValuesCircus = new ContentValues();\n contentValuesCircus.put(\"name\",\"Projet Circus\");\n contentValuesCircus.put(\"color\",0xFFA3CED2);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesCircus);\n\n }\n };\n }", "private void connectDatabase(){\n }", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }", "@Test\n\tpublic void populatedDB() throws URISyntaxException{\n\t\tString pass;\n\t\t LoginController controller = new LoginController();\n\t\t \n\t\tpass = controller.gimmeSalt(\"PASSWORD\");\n pass = controller.hashBrowns(pass);\n\t\tdb.insertUser(\"TESTER\", pass, \"EMAIL\",666);\n\t\t\n\t\tdb.insertBusiness(\"Test1\",\"Somewhere\",7);\n\t\tdb.insertBusiness(\"Test2\",\"Somewhere\",8);\n\t\tdb.insertBusiness(\"Test3\",\"Somewhere\",9);\n\t\tlong start=12418*1000*60;\n\t\tlong end=912518*1000*60;\n\t\tdb.insertEvent(\"t1\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",1231);\n\t\t start=124118*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t2\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",674754);\n\t\t start=412418*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t3\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",241254);\n\t\tdb.insertEvent(\"t4\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",5432);\n\t\t start=1924218*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t5\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",12);\n\t\t start=124318*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t6\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",1241);\n\t\t\n\t\tdb.insertRelation(\"TESTER\",\"Test1\");\n\t\tdb.insertRelation( \"TESTER\",\"Test2\" );\n\t\tdb.insertRelation(\"TESTER\",\"Test3\");\n\t}", "@Test\n public void testCreate() throws Exception {\n System.out.println(\"create\");\n JSONObject movieJSON = new JSONObject();\n int pubID = 1;\n int prodID = 2;\n String name = \"Name\";\n int age = 12;\n String desc = \"This is my description\";\n int runtime = 12;\n String genre = \"Action\";\n double price = 22.22;\n movieJSON.put(\"productID\", prodID);\n movieJSON.put(\"name\", name);\n movieJSON.put(\"price\", price);\n movieJSON.put(\"ageRating\",age);\n movieJSON.put(\"description\", desc);\n movieJSON.put(\"runtime\", runtime);\n movieJSON.put(\"genre\", genre);\n movieJSON.put(\"publisherID\", pubID);\n MovieStorePageInfoFactory instance = new MovieStorePageInfoFactory();\n StoreListing result = instance.create(movieJSON);\n assertEquals(prodID, result.getProductID());\n assertEquals(name, result.getName());\n }", "public void refreshDb() {\n Ion.with(mContext)\n .load(mGetUrl)\n .asJsonObject()\n .setCallback(new FutureCallback<JsonObject>() {\n @Override\n public void onCompleted(Exception e, JsonObject result) {\n try {\n // do stuff with the result or error\n DatabaseClient databaseClient = new DatabaseClient(mContext);\n /**\n * if the return jsonObject is null, then don't clear the table\n * */\n if (result != null) {\n databaseClient.clearTablePage(\"bookpage\");\n }\n\n JsonArray array = result.getAsJsonArray(\"books\");\n /**\n * put data into db\n * */\n ContentResolver contentResolver = mContext.getContentResolver();\n Uri uri = Uri.parse(\"content://com.example.root.libapp_v1.SQLiteModule.Bookpage.BookpageProvider/bookpage\");\n for (int i = 0; i < array.size(); i++) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"name\", array.get(i).getAsJsonObject().get(\"name\").getAsString());\n contentValues.put(\"detail_info\", array.get(i).getAsJsonObject().get(\"detail_info\").getAsString());\n contentValues.put(\"author_info\", array.get(i).getAsJsonObject().get(\"author_info\").getAsString());\n contentValues.put(\"unique_id\", array.get(i).getAsJsonObject().get(\"id\").getAsString());\n contentValues.put(\"catalog_info\", array.get(i).getAsJsonObject().get(\"catalog_info\").getAsString());\n contentValues.put(\"timestamp\", array.get(i).getAsJsonObject().get(\"timestamp\").getAsString());\n Uri tmp = contentResolver.insert(uri, contentValues);\n }\n initData(mView);\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n });\n }", "public static void main(String[] args) throws ClassNotFoundException, SQLException, JsonGenerationException, JsonMappingException, IOException {\n\t\tCustomerDetails customerDetails = new CustomerDetails();\r\n\t\tObjectMapper objectMapper = new ObjectMapper();\r\n\t\t\r\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/Business\", \"root\", \"Password@123\");\r\n\t\t\r\n\t\t//object of statement class help us to execute queries\r\n\t\tStatement createStatement = conn.createStatement();\t\r\n\t\tResultSet executeQuery = createStatement.executeQuery(\"select * from CustomerInfo where purchasedDate=CURDATE() and Location ='Asia';\");\r\n\t\tint i =1;\r\n\t\t\r\n\t\twhile (executeQuery.next() && (executeQuery!=null))\r\n\t\t{\r\n\t\t\tcustomerDetails.setDetails(executeQuery.getString(1), executeQuery.getString(2), executeQuery.getInt(3), executeQuery.getString(4));\r\n\t\t\tSystem.out.println(customerDetails.getCourseName());\r\n\t\t\tSystem.out.println(customerDetails.getPurchaseDate());\r\n\t\t\tSystem.out.println(customerDetails.getAmount());\r\n\t\t\tSystem.out.println(customerDetails.getLocation());\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\t//converting data objects to json\t\r\n\t\t\tobjectMapper.writeValue(new File(\"E:\\\\Software Testing\\\\SDET\\\\Coding\\\\Eclipse Projects\\\\JDBC connection\\\\JSON\\\\customerDetails\" + i + \".json\"), customerDetails);\r\n\t\t\ti ++;\r\n\t\t}\t\t\r\n\t\tconn.close();\r\n\t\t\r\n\t}", "private static void prePopulateDb(AssetManager assetManager, StateDao stateDao){\n BufferedReader reader = null;\n StringBuilder stringBuilder = new StringBuilder();\n String json = \"\";\n try {\n reader = new BufferedReader(\n new InputStreamReader(assetManager.open(\"state-capital.json\")));\n\n // do reading, usually loop until end of file reading\n String mLine;\n while ((mLine = reader.readLine()) != null) {\n //process line\n stringBuilder.append(mLine);\n }\n json = stringBuilder.toString();\n } catch (IOException e) {\n //log the exception\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n //log the exception\n }\n }\n }\n try{\n JSONObject states = new JSONObject(json);\n JSONObject section = states.getJSONObject(\"sections\");\n populateFromJSON(section.getJSONArray(\"States (A-L)\"), stateDao);\n populateFromJSON(section.getJSONArray(\"States (M-Z)\"), stateDao);\n populateFromJSON(section.getJSONArray(\"Union Territories\"), stateDao);\n } catch (JSONException ignored){}\n }", "public abstract void loadFromDatabase();", "private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}", "private static void parseAndSave(String json, Context context) throws JSONException {\n dao = DAO.getInstance(context);\n ArrayList<MovieItem> movies = new ArrayList<>();\n //Decide if JSONObject Or JSONArray;\n JSONArray moviesArray = new JSONArray(json);\n for (int i = 0; i < moviesArray.length(); i++) {\n JSONObject movieObject = moviesArray.getJSONObject(i);\n String title = movieObject.getString(\"title\");\n String image = movieObject.getString(\"image\");\n int releaseYear = movieObject.getInt(\"releaseYear\");\n double rating = movieObject.getDouble(\"rating\");\n JSONArray genresArray = movieObject.getJSONArray(\"genre\");\n\n String genre1 = null;\n String genre2 = null;\n String genre3 = null;\n if (genresArray.length() == 1) {\n genre1 = genresArray.getString(0);\n }\n if (genresArray.length() == 2) {\n genre1 = genresArray.getString(0);\n genre2 = genresArray.getString(1);\n ;\n }\n if (genresArray.length() == 3) {\n genre1 = genresArray.getString(0);\n genre2 = genresArray.getString(1);\n genre3 = genresArray.getString(2);\n }\n\n dao.addMovieItem(title, releaseYear, rating, genre1, genre2, genre3, image);\n }\n }", "@Override\r\n\tpublic void onCreate(SQLiteDatabase db) {\r\n\t\t// Log.i(\"DBHelper:\", \"OnCreate() \");\r\n\t\tdb.beginTransaction();\r\n\t\ttry {\r\n\t\t\tdb.execSQL(QUESTION_CREATE);\r\n\t\t\tdb.execSQL(TOPIC_CREATE);\r\n\t\t\tdb.execSQL(CHOICE_CREATE);\r\n\t\t\tdb.execSQL(EXAM_CREATE);\r\n\t\t\tdb.execSQL(QUESTIONEXAM_CREATE);\r\n\t\t\tdb.setTransactionSuccessful();\r\n\t\t} finally {\r\n\t\t\tdb.endTransaction();\r\n\t\t}\r\n\r\n\t\t// import du lieu cho Questions, Topics & Choices\r\n\t\tCommonDAL common = new CommonDAL(db);\r\n\t\tcommon.importDataFromResource();\r\n\t\t// Main.getCommonDAL().importDataFromResource();\r\n\r\n\t\t// String strURL = context.getString(R.string.url_questions);\r\n\t\t// common.importDataFromURL(context, strURL);\r\n\t}", "private void mockUpDB() {\n locationDBAdapter.insertLocationData(\n \"ChIJd0UHJHcw2jARVTHgHdgUyrk\",\n \"Baan Thong Luang\",\n \"https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png\",\n \"https://maps.google.com/maps/contrib/101781857378275784222/photos\",\n \"CmRSAAAAEegLHnt03YODdRQ658VBWtIhOoz3TjUAj1oVqQIlLq0DkfSttuS-SQ3aOLBBbuFdwKbpkbsrFzMWghgyZeRD-n5rshknOXv6p5Xo3bdYr5FMOUGCy-6f6LYRy1PN9cKOEhBuj-7Dc5fBhX_38N_Sn7OPGhTBRgFIvThYstd7e8naYNPMUS2rTQ\",\n \"GOOGLE\",\n \"236/10 Wualai Road Tumbon Haiya, CHIANG MAI\",\n 18.770709,\n 98.978078,\n 0.0);\n\n }", "public FakeDatabase() {\n\t\t\n\t\t// Add initial data\n\t\t\n//\t\tSystem.out.println(authorList.size() + \" authors\");\n//\t\tSystem.out.println(bookList.size() + \" books\");\n\t}", "private AttendantDatabase() {}", "public void initDatabase() throws SQLException {\n\n ModelFactory factory = new ModelFactory(this.connection);\n\n StopsDao stopsData = factory.getStopsDao();\n\n ArrayList<Stop> stops = stopsData.getStopsFromCsv(getResource(\"stops.csv\"));\n\n Iterator<Stop> it = stops.iterator();\n while(it.hasNext()) {\n Stop stop = it.next();\n System.out.println(stop.toString());\n }\n\n\n /*\n ShapesDao shapesData = factory.getShapesDao();\n\n ArrayList<Shape> shapes = shapesData.getShapesFromCsv(getResource(\"shapes.csv\"));\n\n Iterator<Shape> it = shapes.iterator();\n while(it.hasNext()) {\n Shape shape = it.next();\n System.out.println(shape.toString());\n }\n\n CalendarDateDao calendarData = factory.getCalendarDatesDao();\n\n ArrayList<CalendarDate> agencies = calendarData.getCalendarDatesFromCsv(getResource(\"calendar_dates.csv\"));\n\n Iterator<CalendarDate> it = agencies.iterator();\n while(it.hasNext()) {\n CalendarDate date = it.next();\n System.out.println(date.toString());\n }\n\n AgencyDao agencyData = factory.getAgencyDao();\n agencyData.drop();\n agencyData.create();\n\n ArrayList<Agency> agencies = agencyData.getAgenciesFromCsv(getResource(\"agency.csv\"));\n\n Iterator<Agency> it = agencies.iterator();\n while(it.hasNext()) {\n Agency age = it.next();\n System.out.println(age.toString());\n agencyData.saveAgency(age);\n }\n\n RoutesDao routesDao = factory.getRouteDao();\n routesDao.drop();\n routesDao.create();\n\n ArrayList<Route> routes = routesDao.getRoutesFromCsv(getResource(\"routes.csv\"));\n\n Iterator<Route> it = routes.iterator();\n while(it.hasNext()) {\n Route route = it.next();\n System.out.println(route.toString());\n }*/\n }", "private AppRepo(Context context) {\n mDb = AppDB.getInstance(context);\n mFoods = getAllFoods();\n mPortions = getAllPortions();\n mMeals = getAllMeals();\n mConsumed = getAllConsumed();\n }", "public static void main(String[] args) throws Exception {\n Database database1 = new Database(\"jdbc:sqlite:Drink.db\");\n\n //database.init();\n database1.init();\n\n //OpiskelijaDao opiskelijaDao = new OpiskelijaDao(database);\n DrinkkiDao drinkkiDao = new DrinkkiDao(database1);\n AinesosaDao ainesosaDao = new AinesosaDao(database1);\n DrinkkiAinesDao drinkkiAinesDao = new DrinkkiAinesDao(database1);\n\n /*get(\"/\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"viesti\", \"tervehdys\");\n\n return new ModelAndView(map, \"index\");\n }, new ThymeleafTemplateEngine());\n\n get(\"/opiskelijat\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"opiskelijat\", opiskelijaDao.findAll());\n\n return new ModelAndView(map, \"opiskelijat\");\n }, new ThymeleafTemplateEngine());\n\n get(\"/opiskelijat/:id\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"opiskelija\", opiskelijaDao.findOne(Integer.parseInt(req.params(\"id\"))));\n\n return new ModelAndView(map, \"opiskelija\");\n }, new ThymeleafTemplateEngine()); */\n Spark.get(\"/ainesosat\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"ainesosat\", ainesosaDao.findAll());\n\n return new ModelAndView(map, \"ainesosat\");\n }, new ThymeleafTemplateEngine());\n\n Spark.post(\"/ainesosat\", (req, res) -> {\n String ainesosa = req.queryParams(\"ainesosa\");\n ainesosaDao.lisaaAinesosa(ainesosa);\n\n res.redirect(\"/ainesosat\");\n\n return \"\";\n });\n\n Spark.get(\"/drinkit\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"drinkit\", drinkkiDao.findAll());\n map.put(\"ainesosat\", ainesosaDao.findAll());\n\n return new ModelAndView(map, \"drinkit\");\n }, new ThymeleafTemplateEngine());\n\n Spark.post(\"/drinkit\", (req, res) -> {\n String drinkki = req.queryParams(\"drinkki\");\n String vahvuusStringina = req.queryParams(\"vahvuus\");\n double vahvuus = Double.parseDouble(vahvuusStringina);\n String lasi = req.queryParams(\"lasi\");\n\n drinkkiDao.nimeaDrinkki(drinkki, vahvuus, lasi);\n\n res.redirect(\"/drinkit\");\n\n return \"\";\n });\n \n Spark.post(\"/drinkit\", (req, res) -> {\n \n Integer poisto=Integer.parseInt(req.queryParams(\"poisto\"));\n \n\n drinkkiDao.delete(poisto);\n\n res.redirect(\"/drinkit\");\n return \"\";\n });\n \n Spark.post(\"/drinkit\", (req, res) -> {\n Integer drinkkiId = Integer.parseInt(req.params(\":id\"));\n Integer ainesId = Integer.parseInt(req.queryParams(\"userId\"));\n\n drinkkiAinesDao.tallennaID(drinkkiId, ainesId);\n\n String apuMaara = req.queryParams(\"maara\");\n Integer maara = Integer.parseInt(apuMaara);\n String ohje = req.queryParams(\"ohje\");\n \n drinkkiAinesDao.tallennaMuut(drinkkiId,ainesId, maara, ohje);\n res.redirect(\"/drinkit\");\n return \"\";\n });\n \n Spark.get(\"/home\", (req, res) -> {\n HashMap map = new HashMap<>();\n map.put(\"drinkit\", drinkkiDao.findAll());\n map.put(\"ainesosat\", ainesosaDao.findAll());\n\n return new ModelAndView(map, \"home\");\n }, new ThymeleafTemplateEngine());\n\n /*Spark.get(\"/users/:id\", (req, res) -> {\n HashMap map = new HashMap<>();\n Integer userId = Integer.parseInt(req.params(\":id\"));\n map.put(\"user\", users.findOne(userId));\n map.put(\"tasks\", tasks.findNonCompletedForUser(userId));\n\n return new ModelAndView(map, \"user\");\n }, new ThymeleafTemplateEngine());*/\n }", "public static List<DataItem> importFromJSON(Context context){\n FileReader reader = null;\n File file = new File(Environment.getExternalStorageDirectory(), FILE_NAME);\n\n try {\n //Instantiate FileReader with file\n reader = new FileReader(file);\n //Populate DataItems class and return result\n Gson gson = new Gson();\n DataItems dataItems = gson.fromJson(reader, DataItems.class);\n return dataItems.getDataItems();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return null;\n }", "public static void loadData(DynamoDbClient ddb, String fileName) throws IOException {\r\n\r\n String sqlStatement = \"INSERT INTO MoviesPartiQ VALUE {'year':?, 'title' : ?, 'info' : ?}\";\r\n JsonParser parser = new JsonFactory().createParser(new File(fileName));\r\n com.fasterxml.jackson.databind.JsonNode rootNode = new ObjectMapper().readTree(parser);\r\n Iterator<JsonNode> iter = rootNode.iterator();\r\n ObjectNode currentNode;\r\n int t = 0 ;\r\n List<AttributeValue> parameters = new ArrayList<>();\r\n while (iter.hasNext()) {\r\n\r\n // Add 200 movies to the table.\r\n if (t == 200)\r\n break ;\r\n currentNode = (ObjectNode) iter.next();\r\n\r\n int year = currentNode.path(\"year\").asInt();\r\n String title = currentNode.path(\"title\").asText();\r\n String info = currentNode.path(\"info\").toString();\r\n\r\n AttributeValue att1 = AttributeValue.builder()\r\n .n(String.valueOf(year))\r\n .build();\r\n\r\n AttributeValue att2 = AttributeValue.builder()\r\n .s(title)\r\n .build();\r\n\r\n AttributeValue att3 = AttributeValue.builder()\r\n .s(info)\r\n .build();\r\n\r\n parameters.add(att1);\r\n parameters.add(att2);\r\n parameters.add(att3);\r\n\r\n // Insert the movie into the Amazon DynamoDB table.\r\n executeStatementRequest(ddb, sqlStatement, parameters);\r\n System.out.println(\"Added Movie \" +title);\r\n\r\n parameters.remove(att1);\r\n parameters.remove(att2);\r\n parameters.remove(att3);\r\n t++;\r\n }\r\n }", "public void loadJson(){\n new DownloadJsonTask().execute(URL3);\n// new DownloadJsonTask().execute(URL2);\n }", "public ReviewRepository() {\n Review vrGameOne = new Review(1L, \"BeatSaber\", \"/images/BeatSaber-photo1.jpg\",\n \"/images/BeatSaber-photo2.jpg\", \"Fitness/Rhythm\",\n \"This game is so much fun! It also gives you a great workout if you play on Expert Plus mode.\",\n \"May 1, 2018\", \"Beat Saber is a virtual reality rhythm game where the player slices \" +\n \"blocks representing musical beats with a pair of sabers.\");\n Review vrGameTwo = new Review(2L, \"The Room\", \"/images/the-room-photo1.jpg\",\n \"/images/the-room-photo2.jpg\", \"Puzzle/Adventure\", \"This game is \" +\n \"challenging but fun. I like how you are able to get hints if you get stuck.\", \"March 26, 2020\",\n \"The Room is game where the player has to solve puzzles to advance. Each level \" +\n \"has a different theme.\");\n Review vrGameThree = new Review(3L, \"Synth Riders\", \"/images/synth-riders-photo1.jpg\",\n \"/images/synth-riders-photo2.jpg\", \"Dance/Rhythm\", \"This game is so much fun. \" +\n \"It has great music and I love the neon environment.\", \"June 21, 2018\", \"Synth Riders is \" +\n \"a lot like Beat Saber, but instead of slicing blocks with sabers, the player hits multicolored orbs \" +\n \"representing musical beats.\");\n Review vrGameFour = new Review(4L, \"Bigscreen\", \"/images/bigscreen-photo1.jpg\",\n \"/images/bigscreen-photo2.jpg\", \"Entertainment\", \"I love this VR game. It \" +\n \"feels like you are actually in the movie theater! An added bonus is that you can mute other \" +\n \"people in the theater if they are being too loud! I love it!\", \"May 21, 2019\",\n \"BigScreen is a virtual reality movie theater. You can watch movies (even 3D ones) \" +\n \"with random people, or you can join a private theater with just you and your friends. In \" +\n \"addition to movies, there are also rooms where you can watch TV shows.\");\n\n reviewList.put(vrGameOne.getId(), vrGameOne);\n reviewList.put(vrGameTwo.getId(), vrGameTwo);\n reviewList.put(vrGameThree.getId(), vrGameThree);\n reviewList.put(vrGameFour.getId(), vrGameFour);\n }", "public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public JacobDatabase()\n {\n entries = new ArrayList<KantoDex>();\n \n }", "public CategoryGateway(SQLiteDatabase database){\n this.database = database;\n }", "public void initDatabase() {\n Datastore mongoDataStore = DatabaseHandler.getInstance().getMongoDataStore();\n initUsers();\n initAccounts();\n mongoDataStore.save(users);\n }", "private void loadJSON() throws FileNotFoundException\n\t{\n\n\t\tGsonBuilder builder= new GsonBuilder();\n\t\tGson gson = builder.create();\n\t\t\t\t\n\t\t//get a list of folders in the data directory\n\t\t\n\t\tFile[] directories = new File(\"data\").listFiles();\n\n\t\t//Loop through folders in data directory\n\t\tfor(File folder : directories)\n\t\t\t{\n\t\t\t\t//get a list of files inside the folder\n\t\t\t\tFile[] jsonItems = new File(folder.toString()).listFiles();\n\t\t\t\t\n\t\t\t\t//Loop through files inside the folder \n\t\t\t\tfor(File file : jsonItems)\n\t\t\t\t{\n\t\t\t\t\t//Store in directory map... substring to remove the \"data/\" portion... placed by filename to foldername\n\t\t\t\t\tString dir = file.toString().substring(5);\n\t\t\t\t\t\n\t\t\t\t\t//Generate player data from gson\n\t\t\t\t\tJsonReader reader = new JsonReader(new FileReader(file));\n\t\t\t\t\tPlayer player = gson.fromJson(reader, Player.class);\n\t\t\t\t\t\n\t\t\t\t\t//Store it in the map tied to it's directory\n\t\t\t\t\tplayerData.put(dir, player);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }", "public void getRestaurants () throws JSONException {\n\t\tint debug = 0; \n\t\tJSONObject js = new JSONObject(console.nextLine());\n\t\tfor (String name : JSONObject.getNames(js)) {\n\t\t\tJSONObject rest = js.getJSONObject(name);\n\t\t\tRestaurant r = new Restaurant(name);\n\t\t\tfor (String s : attributes) {\n\t\t\t\tif (rest.has(s)) {\n\t\t\t\t\tString v = rest.getString(s);\n\t\t\t\t\tif (v.contains(\"&amp;\")) {\n\t\t\t\t\t\tv =v.replace(\"&amp;\", \"and\");\n\t\t\t\t\t}\n\t\t\t\t\tif (v.contains(\"'\")) {\n\t\t\t\t\t\tv = v.replace(\"'\",\"\");\n\t\t\t\t\t}\n\t\t\t\t\tr.add(s,v);\n\t\t\t\t} else {\n\t\t\t\t\tr.add(s,\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\trestaurants.add(r);\n\t\t\t\n\t\t}\n\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tinitializeRe_DB initialer = new initializeRe_DB();\n\t\tinitialer.insertTOproject();\n\t\tinitialer.insertToresearcher();\n\t\tinitialer.insertTotask();\n\t}", "public Main()\n {\n createUsers();\n createFriendships();\n createMessages();\n\n }", "private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}", "@PostConstruct\r\n public void init() {\n File database = new File(applicationProps.getGeodb());\r\n try {\r\n reader = new DatabaseReader.Builder(database).withCache(new CHMCache()).build();\r\n } catch (IOException e) {\r\n log.error(\"Error reading maxmind DB, \", e);\r\n }\r\n }", "public static void initGenerateOfflineTestData(){\n dbInstance = Database.newInstance();\n initPlayer();\n initMatches();\n }", "public static void loadPracticeListFromFile() {\n JSONParser jsonParser = new JSONParser();\n\n try (FileReader reader = new FileReader(\"src/practiceList.json\")) {\n // Read JSON file\n Object object = jsonParser.parse(reader);\n\n //Iterate over word list array\n JSONArray wordList = (JSONArray) object;\n for (Object o : wordList) {\n\n JSONObject next = (JSONObject) o;\n String extra = \"\";\n\n if (((String) next.get(\"wordType\")).equalsIgnoreCase(\"verb\")) {\n extra = \"to \";\n }\n\n Word loadedWord = new Word(extra + next.get(\"english\"), (String) next.get(\"welsh\"), (String) next.get(\"wordType\"));\n\n addIntoPracticedWords(loadedWord);\n }\n\n } catch (ParseException | IOException e) {\n System.out.println(\"PracticeList file not found, will be created on exit.\");\n }\n }", "private void loadDataFromDatabase(){\n //get database connection\n DeezerOpener deezerOpener = new DeezerOpener(this);\n db = deezerOpener.getWritableDatabase();\n\n //define columns and create cursor\n String [] columns = {DeezerOpener.COL_ID, DeezerOpener.COL_ARTIST, DeezerOpener.COL_TITLE, DeezerOpener.COL_ALBUM, DeezerOpener.COL_DUR, DeezerOpener.COL_COVER};\n Cursor results = db.query( DeezerOpener.TABLE_NAME, columns, null, null, null, null, null);\n\n //get column indices\n int idColIndex = results.getColumnIndex(DeezerOpener.COL_ID);\n int artistColIndex = results.getColumnIndex(DeezerOpener.COL_ARTIST);\n int titleColIndex = results.getColumnIndex(DeezerOpener.COL_TITLE);\n int albumColIndex = results.getColumnIndex(DeezerOpener.COL_ALBUM);\n int durColIndex = results.getColumnIndex(DeezerOpener.COL_DUR);\n int coverColIndex = results.getColumnIndex(DeezerOpener.COL_COVER);\n\n //loop through the database obtaining data\n while(results.moveToNext()){\n long id = results.getLong(idColIndex);\n String artistDB = results.getString(artistColIndex);\n String titleDB = results.getString(titleColIndex);\n String albumDB = results.getString(albumColIndex);\n int durationDB = results.getInt(durColIndex);\n String coverURL_DB = results.getString(coverColIndex);\n\n //create the cover Bitmap\n Bitmap coverDB = getBitmapFromURL(coverURL_DB);\n\n //add to favourites list\n deezerFavList.add(new DeezerSong(titleDB, albumDB, artistDB, coverURL_DB, coverDB, durationDB, id));\n }\n }", "@Override\n public void run(String... args) throws Exception {\n Outfit outfit = new Outfit();\n outfit.setCurrentoutfit(true);\n outfitRepository.save(outfit);\n\n\n// Category category = new Category();\n//\n// category.setTops(\"Tops\");\n// category.setBottoms(\"Bottoms\");\n// category.setShoes(\"sneakers\");\n// category.setAccessories(\"\");\n// category.setJackets(\"\");\n// categoryRepository.save(category);\n Category tops = new Category();\n tops.setCategoryType(\"Tops\");\n categoryRepository.save(tops);\n\n Category bottoms = new Category();\n bottoms.setCategoryType(\"Bottoms\");\n categoryRepository.save(bottoms);\n\n Category accessories = new Category();\n accessories.setCategoryType(\"Accessories\");\n categoryRepository.save(accessories);\n\n Category shoes = new Category();\n shoes.setCategoryType(\"Shoes\");\n categoryRepository.save(shoes);\n\n Category jackets = new Category();\n jackets.setCategoryType(\"Jacket\");\n categoryRepository.save(jackets);\n/**\n * Here is where the items start for Outfit 1\n * */\n Item topOne = new Item();\n topOne.setCategory(tops);\n topOne.setColor(\"Black\");\n topOne.setFabricMaterial(\"cotton\");\n topOne.setSize(7);\n topOne.setItemName(\"Shirt\");\n topOne.setImages(\"image/women.png\");\n itemRepository.save(topOne);\n\n Item bottomOne = new Item();\n bottomOne.setCategory(bottoms);\n bottomOne.setColor(\"Light Blue\");\n bottomOne.setFabricMaterial(\"Denim\");\n bottomOne.setSize(31);\n bottomOne.setItemName(\"Bleached Light Blue Jeans\");\n itemRepository.save(bottomOne);\n\n Item shoeOne = new Item();\n shoeOne.setCategory(shoes);\n shoeOne.setColor(\"Black\");\n shoeOne.setFabricMaterial(\"Mesh\");\n shoeOne.setSize(7);\n shoeOne.setItemName(\"Shoe\");\n itemRepository.save(shoeOne);\n\n Item accessoryOne = new Item();\n accessoryOne.setCategory(accessories);\n accessoryOne.setColor(\"Gold\");\n accessoryOne.setFabricMaterial(\"Gold\");\n accessoryOne.setSize(1);\n accessoryOne.setItemName(\"Gold Watch\");\n itemRepository.save(accessoryOne);\n\n\n Item jacketOne = new Item();\n jacketOne.setCategory(jackets);\n jacketOne.setColor(\"Black\");\n jacketOne.setFabricMaterial(\"Leather\");\n jacketOne.setSize(30);\n jacketOne.setItemName(jacketOne.getColor() + \" Jacket\");\n itemRepository.save(jacketOne);\n\n\n /**\n * Here is where the items start for Outfit 2\n * */\n Item topTwo = new Item();\n topTwo.setCategory(tops);\n topTwo.setColor(\"White\");\n topTwo.setFabricMaterial(\"Blend\");\n topTwo.setSize(7);\n topTwo.setItemName(\"Crew Neck Tee Shirt\");\n itemRepository.save(topTwo);\n\n Item bottomTwo = new Item();\n bottomTwo.setCategory(bottoms);\n bottomTwo.setColor(\"Grey\");\n bottomTwo.setFabricMaterial(\"Denim\");\n bottomTwo.setSize(34);\n bottomTwo.setItemName(\"Skinny Jeans\");\n itemRepository.save(bottomTwo);\n\n Item shoeTwo = new Item();\n shoeTwo.setCategory(shoes);\n shoeTwo.setColor(\"White, Black, Red\");\n shoeTwo.setFabricMaterial(\"Mesh\");\n shoeTwo.setSize(7);\n shoeTwo.setItemName(\"Tennis Shoes\");\n itemRepository.save(shoeTwo);\n\n Item accessoryTwo = new Item();\n accessoryTwo.setCategory(accessories);\n accessoryTwo.setColor(\"Green\");\n accessoryTwo.setFabricMaterial(\"\");\n accessoryTwo.setSize(7);\n accessoryTwo.setItemName(\"Shirt\");\n itemRepository.save(accessoryTwo);\n\n Item jacketTwo = new Item();\n jacketTwo.setCategory(jackets);\n jacketTwo.setColor(\"Tan\");\n jacketTwo.setFabricMaterial(\"Leather\");\n jacketTwo.setSize(30);\n jacketTwo.setItemName(jacketTwo.getColor() + \" Jacket\");\n itemRepository.save(jacketTwo);\n\n\n /**\n * Here is where the items start for Outfit 3\n * */\n Item topThree = new Item();\n topThree.setCategory(tops);\n topThree.setColor(\"red\");\n topThree.setFabricMaterial(\"cotton\");\n topThree.setSize(7);\n topThree.setItemName(\"Shirt\");\n itemRepository.save(topThree);\n\n Item bottomThree = new Item();\n bottomThree.setCategory(bottoms);\n bottomThree.setColor(\"green\");\n bottomThree.setFabricMaterial(\"cotton\");\n bottomThree.setSize(31);\n bottomThree.setItemName(\"Jeans\");\n itemRepository.save(bottomThree);\n\n Item shoeThree = new Item();\n shoeThree.setCategory(shoes);\n shoeThree.setColor(\"green\");\n shoeThree.setFabricMaterial(\"\");\n shoeThree.setSize(7);\n shoeThree.setItemName(\"Shoe\");\n itemRepository.save(shoeThree);\n\n Item accessoryThree = new Item();\n accessoryThree.setCategory(accessories);\n accessoryThree.setColor(\"green\");\n accessoryThree.setFabricMaterial(\"\");\n accessoryThree.setSize(7);\n accessoryThree.setItemName(\"Shirt\");\n itemRepository.save(accessoryThree);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 4\n * */\n Item topFour = new Item();\n topFour.setCategory(tops);\n topFour.setColor(\"red\");\n topFour.setFabricMaterial(\"cotton\");\n topFour.setSize(7);\n topFour.setItemName(\"Shirt\");\n itemRepository.save(topFour);\n\n Item bottomFour = new Item();\n bottomFour.setCategory(bottoms);\n bottomFour.setColor(\"green\");\n bottomFour.setFabricMaterial(\"cotton\");\n bottomFour.setSize(31);\n bottomFour.setItemName(\"Jeans\");\n itemRepository.save(bottomFour);\n\n Item shoeFour = new Item();\n shoeFour.setCategory(shoes);\n shoeFour.setColor(\"green\");\n shoeFour.setFabricMaterial(\"\");\n shoeFour.setSize(7);\n shoeFour.setItemName(\"Shoe\");\n itemRepository.save(shoeFour);\n\n Item accessoryFour = new Item();\n accessoryFour.setCategory(accessories);\n accessoryFour.setColor(\"green\");\n accessoryFour.setFabricMaterial(\"\");\n accessoryFour.setSize(7);\n accessoryFour.setItemName(\"Shirt\");\n itemRepository.save(accessoryFour);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 5\n * */\n Item topFive = new Item();\n topFive.setCategory(tops);\n topFive.setColor(\"red\");\n topFive.setFabricMaterial(\"cotton\");\n topFive.setSize(7);\n topFive.setItemName(\"Shirt\");\n itemRepository.save(topFive);\n\n Item bottomFive = new Item();\n bottomFive.setCategory(bottoms);\n bottomFive.setColor(\"green\");\n bottomFive.setFabricMaterial(\"cotton\");\n bottomFive.setSize(31);\n bottomFive.setItemName(\"Jeans\");\n itemRepository.save(bottomFive);\n\n Item shoeFive = new Item();\n shoeFive.setCategory(shoes);\n shoeFive.setColor(\"green\");\n shoeFive.setFabricMaterial(\"\");\n shoeFive.setSize(7);\n shoeFive.setItemName(\"Shoe\");\n itemRepository.save(shoeFive);\n\n Item accessoriesFive = new Item();\n accessoriesFive.setCategory(accessories);\n accessoriesFive.setColor(\"green\");\n accessoriesFive.setFabricMaterial(\"\");\n accessoriesFive.setSize(7);\n accessoriesFive.setItemName(\"Shirt\");\n itemRepository.save(accessoriesFive);\n }", "public SolicitudREST() {\n gson = new Gson();\n sdao= new SolicitudDAO();\n }", "public DatabaseOperations(){\n\n }", "public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}", "public void parseJson() {\n\n try {\n JSONParser parser = new JSONParser();\n jsonReader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/resources/bangor-library.json\")));\n JSONObject jsonObj = (JSONObject) parser.parse(jsonReader);\n \n String name = (String) jsonObj.get(\"name\");\n libraryName = name;\n JSONArray extractedBooks = (JSONArray) jsonObj.get(\"books\");\n\n Iterator i = extractedBooks.iterator();\n while (i.hasNext()) {\n rec = new LibraryRecord();\n rec.setLib_name(libraryName);\n JSONObject innerObj = (JSONObject) i.next();\n rec.setBook_name(innerObj.get(\"name\").toString());\n rec.setAuth_name(innerObj.get(\"author\").toString());\n rec.setCat_name(innerObj.get(\"category\").toString());\n\n if (!LibraryAccess.bookShelves.isEmpty()) {\n for (LibraryRecord bookSaved : LibraryAccess.bookShelves) {\n if (this.rec.getHashOfContent() == bookSaved.getHashOfContent()) {\n duplicate = true;\n rec = null;\n }\n }\n if (!duplicate) {\n LibraryAccess.addRecord(rec);\n }\n duplicate = false;\n\n } else {\n System.out.println(\"Library empty : Adding records...\");\n LibraryAccess.addRecord(this.rec);\n }\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ParseException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void updateDB() {\n }", "public static void main (String[] arg){\n\t\tPhone phone = new Phone(\"206 123 4567\", \"425 123 4567\");\r\n\t\tAddress address = new Address(\"4101 398th W.\", \"tacoma\", \"washington\");\r\n\r\n\t\t//public Customer(String first_name, String last_name, Address address, Phone phone)\r\n\t\tCustomer1 cust = new Customer1(\"john\", \"doe\", address, phone);\r\n\r\n\t\t//need to create a Customer object to match specification at top of file\r\n\t\tCustomer customer = new Customer(cust);\r\n\r\n\t\t//https://stackoverflow.com/questions/16607444/how-to-serialize-object-to-json\r\n\t\t//*** use GsonBuilder().create() to SERIALIZE the customer object to a JSON string\r\n\t\tString stringJson = new GsonBuilder().create().toJson(customer);\r\n\r\n\t\tSystem.out.println( \"SERIALIZED Java object JSON string => \\r\\n\" + stringJson);\r\n\t\tSystem.out.println();\r\n\r\n\t\t//convert the Json string to JsonPath - good now\t\t\r\n\t\tSystem.out.println(\"Printing out the customer values: \");\r\n\r\n\t\tSystem.out.println( \"first_name = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.first_name\") +\r\n\t\t\t\t\", last_name = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.last_name\"));\r\n\r\n\t\t//\t\tPhone phone = new Phone(\"206 123 4567\", \"425 123 4567\");\r\n\r\n\t\tSystem.out.println( \"cell phone = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.phone.cell\") +\r\n\t\t\t\t\", home phone = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.phone.home\"));\r\n\r\n\t\t// \"address\": {\r\n\t\t// \"street\": \"4101 398th W.\",\r\n\t\t// \"city\": \"tacoma\",\r\n\t\t// \"state\": \"washington\"\r\n\t\t// },\r\n\r\n\t\tSystem.out.println( \"\\r\\ncustomer.address.street = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.address.street\") +\r\n\t\t\t\t\"\\r\\ncustomer.address.city = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.address.city\")\t+\r\n\t\t\t\t\"\\r\\ncustomer.address.state = \" + \r\n\t\t\t\tJsonPath.with(stringJson).get(\"customer.address.state\"));\r\n\t}", "private UserDao() {\n\t\tusersList = new HashMap<String, User>();\n\t\tusersDetails = JsonFilehandling.read();\n\t\tfor (JSONObject obj : usersDetails) {\n\t\t\tusersList.put(obj.get(\"id\").toString(), new User(obj.get(\"id\").toString(),obj.get(\"name\").toString(), obj.get(\"profession\").toString()));\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\tRaterDB.initialize();\r\n\t\t\tint size = RaterDB.size();\r\n\t\t\tSystem.out.println(size);\r\n\t\t}", "private void readFromJSON(String filename) {\n JSONParser parser = new JSONParser();\n\n try\n {\n Object obj = parser.parse(new FileReader(filename));\n JSONObject jsonObject = (JSONObject) obj;\n Menu drinks = getMenu(jsonObject, \"Drink\");\n Menu types = getMenu(jsonObject, \"Type\");\n Menu toppings = getMenu(jsonObject, \"Toppings\");\n Menu sizes = getMenu(jsonObject, \"Size\");\n menuMap.put(\"Drink\", drinks);\n menuMap.put(\"Size\", sizes);\n menuMap.put(\"Toppings\", toppings);\n menuMap.put(\"Type\", types);\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Not found menu.json, exit now.\");\n System.exit(1);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }", "public RecipeDatabase() {\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference AllRecipeRef = database.getReference(\"allRecipes\");\n DatabaseReference newRecipeRef = AllRecipeRef.push();\n newRecipeRef.setValue(new Recipe(\"Pizza\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Sushi Rolls\", 2.0, \"mkp_logo\", \"Japanese\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Crepe\", 3.5, \"mt_logo\", \"French\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Baked Salmon\", 0, \"pb_logo\", \"American\", \"5\", \"1. prep ingredients\\n2.cook food\\n3.eat your food\", \"ingredients1 ingredient 2 ingredient3\"));\n }", "public static void main(String[] args) {\n\t\tDao dao = new PostgresDao();\n\t\tnew Client().getData(dao);\n\t}", "private void initDB(){\n gistHelper = new GistSQLiteHelper(mainActivity, \"GistsDB\", null, 1);\n db = gistHelper.getWritableDatabase();\n }", "public AnalogArchiveApp() {\n jsonWriter = new JsonWriter(\"./data/saveFile.json\");\n jsonReader = new JsonReader(\"./data/saveFile.json\");\n init();\n }", "public void retrieveTodo() {\r\n File file = new File(\"C:\\\\Users\\\\Dalia\\\\Desktop\\\\CPSC 210\\\\Project\\\\project_b2h3b\\\\data\");\r\n JFileChooser chooser = new JFileChooser(file);\r\n int userSelection = chooser.showOpenDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (userSelection == JFileChooser.APPROVE_OPTION) {\r\n fileName = f.getAbsolutePath();\r\n reader = new MyTodoJsonReader(fileName);\r\n try {\r\n myTodo = reader.readMyToDoList();\r\n todoListGui();\r\n } catch (IOException ioException) {\r\n JOptionPane.showMessageDialog(null, \"File doesn't exist!\");\r\n }\r\n }\r\n }", "public void database() throws IOException\n {\n \tFile file =new File(\"data.txt\");\n\t if(!file.exists())\n\t {\n\t \tSystem.out.println(\"File 'data.txt' does not exit\");\n\t System.out.println(file.createNewFile());\n\t file.createNewFile();\n\t databaseFileWrite(file);//call the databaseFileRead() method, to initialize data from ArrayList and write data into data.txt\n\t }\n\t else\n\t {\n\t \tdatabaseFileRead();//call the databaseFileRead() method, to load data directly from data.txt\n\t }\n }", "public static void main(String args[]) {\n\t\tNuxeoClient client = new NuxeoClient.Builder().url(\"http://localhost:8080/parliament\")\n\t\t// NuxeoClient client = new NuxeoClient.Builder().url(\"http://tourismministry.phoenixsolutions.com.np:8888/parliament\")\n\t\t\t\t.authentication(\"Administrator\", \"Administrator\").schemas(\"*\") // fetch all document schemas\n\t\t\t\t.connect();\n\t\tRepository repository = client.repository();\n\n//Menu\n\t//create\n\t\tDocument file = Document.createWithName(\"One\", \"Band\");\n\t\tDocument menu = Document.createWithName(\"menu\", \"Folder\");\n\t\t// menu.setPropertyValue(\"band:abbr\", \"ELF\");\n\t\trepository.createDocumentByPath(\"/\", menu);\n\t\tDocument report = Document.createWithName(\"report-list\", \"Report-List\");\n\t\trepository.createDocumentByPath(\"/menu\", report);\n\t\tDocument event = Document.createWithName(\"event-list\", \"Event-List\");\n\t\trepository.createDocumentByPath(\"/menu\", event);\n\t\tDocument meeting = Document.createWithName(\"meeting-list\", \"Meeting-List\");\n\t\trepository.createDocumentByPath(\"/menu\", meeting);\n\t\tDocument ics = Document.createWithName(\"integrated-central-status-list\", \"Integrated-Central-Status-List\");\n\t\trepository.createDocumentByPath(\"/menu\", ics);\n\n\n\t\tUserManager userManager = client.userManager();\n\n\t\tcreateUsers(userManager,\"operator\",\"Operator\",\"operator\");\n\t\tcreateUsers(userManager,\"secretary\",\"Secretary\",\"secretary\");\n\t\tcreateUsers(userManager,\"depsecretary\",\"DepSecretary\",\"depsecretary\");\n\t\tcreateUsers(userManager,\"education\",\"Education\",\"education\");\n\t\tcreateUsers(userManager,\"health\",\"Health\",\"health\");\n\t\tcreateUsers(userManager,\"tourism\",\"Tourism\",\"tourism\");\n\n\t\tString[] memberUsersSecretariat = {\"operator\",\"secretary\",\"depsecretary\"};\n\t\tString[] memberUsersBeruju = {\"education\",\"health\",\"tourism\"};\n\t\tcreateGroup(userManager,\"secretariat\",\"Secretariat\",memberUsersSecretariat);\n\t\tcreateGroup(userManager,\"beruju\",\"Beruju\",memberUsersBeruju);\n\t\n//fetching\n\n\t\t// Document myfile = repository.fetchDocumentByPath(\"/default-domain/workspaces/Bikings/Liferay/One\");\n\t\t// String title = myfile.getPropertyValue(\"band:band_name\"); // equals to folder\n\t\t// System.out.println(title);\n\n\n// file upload\n\n\t\t// Document domain = client.repository().fetchDocumentByPath(\"/default-domain\");\n\n\t\t// Let's first retrieve batch upload manager to handle our batch:\n\t\t// BatchUploadManager batchUploadManager = client.batchUploadManager();\n\n\t\t// // // getting local file\n\t\t// ClassLoader classLoader = new NuxeoConnect().getClass().getClassLoader();\n\t\t// File file = new File(classLoader.getResource(\"dipesh.jpg\").getFile());\n\n\t\t// // // create a new batch\n\t\t// BatchUpload batchUpload = batchUploadManager.createBatch();\n\t\t// Blob fileBlob = new FileBlob(file);\n\t\t// batchUpload = batchUpload.upload(\"0\", fileBlob);\n\n\t\t// // // attach the blob\n\t\t\n\t\t// Document doc = client.repository().fetchDocumentByPath(\"/default-domain/workspaces/Phoenix/DipeshCollection/dipeshFile\");\n\t\t// doc.setPropertyValue(\"file:content\", batchUpload.getBatchBlob());\n\t\t// doc = doc.updateDocument();\n\t\t// // get\n\t\t// Map pic = doc.getPropertyValue(\"file:content\");\n\t\t// System.out.print(pic);\n\t}", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void testDB(){\n DB=new LinkedList<>(); \n DB.add(new Offer(\"ID1\",\"AGV923\",\"Nico\",\"Leo\",\"Salvo\",\"\"));\n DB.add(new Offer(\"ID2\",\"ADJ325\",\"Tizio\", \"Caio\", \"Sempronio\",\"\"));\n DB.add(new Offer(\"ID3\",\"T56G2G\",\"Antonella\", \"Daniele\",\"\",\"\"));\n }", "public static void main(final String[] args) throws Exception {\n MongoClient mongo = new MongoClient(\"localhost\", 27017);\n /**** Get database ****/\n // if database doesn't exists, MongoDB will create it for you\n DB db = mongo.getDB(\"enron\");\n DBCollection table = db.getCollection(\"demo\");\n BasicDBObject searchQuery = new BasicDBObject();\n searchQuery.put(\"_id\", 1);\n DBCursor cursor = table.find(searchQuery).limit(5);\n System.out.println(\"test\");\n System.out.println(JSON.serialize(cursor));\n\n }", "String getDatabase();", "private DatabaseCustomAccess(Context context) {\n\t\thelper = new SpokaneValleyDatabaseHelper(context);\n\n\t\tsaveInitialPoolLocation(); // save initial pools into database\n\t\tsaveInitialTotalScore(); // create total score in database\n\t\tsaveInitialGameLocation(); // create game location for GPS checking\n\t\tLoadingDatabaseTotalScore();\n\t\tLoadingDatabaseScores();\n\t\tLoadingDatabaseGameLocation();\n\t}", "public interface DB_manager {\n\n\n boolean check_exist_client(Client c);\n\n\n ///add function content value\n String addclient(ContentValues client);\n String addmodel(ContentValues model);\n int addcar(ContentValues car);\n int addbranch(ContentValues car);\n void add_url_image(ContentValues contentValues);\n\n\n\n ////list function\n List<Models> allmodels();\n List<Client> allclient();\n List<Branch> allbranch();\n List<Car> allcars();\n public void allurl();\n\n\n\n /// instance of all database\n void db_all(Context context);\n\n\n ///cursor list function\n Cursor Allmodels();\n Cursor Allclient();\n Cursor Allcar();\n Cursor Allbranch();\n\n public String get_url_image(String num);\n\n ///delete function\n int delete_client(int id);\n int delete_model(int id);\n int delete_branch(int id);\n int delete_car(int id);\n\n\n\n}", "private void loadDatabase() {\n Runnable load = new Runnable() {\n public void run() {\n try {\n boolean isSuccess = false;\n File data = Environment.getDataDirectory();\n\n String currentDbPath = \"//data//com.udacity.adcs.app.goodintents//databases//goodintents.db\";\n\n File currentDb = new File(data, currentDbPath);\n File restoreDb = getFileFromAsset(mActivity, mActivity.getExternalFilesDir(null) + \"/\", \"goodintents.db\");\n\n if (restoreDb != null ? restoreDb.exists() : false) {\n FileInputStream is = new FileInputStream(restoreDb);\n FileOutputStream os = new FileOutputStream(currentDb);\n\n FileChannel src = is.getChannel();\n FileChannel dst = os.getChannel();\n dst.transferFrom(src, 0, src.size());\n\n is.close();\n os.close();\n src.close();\n dst.close();\n isSuccess = true;\n }\n\n if (isSuccess) {\n PreferencesUtils.setBoolean(mActivity, R.string.initial_db_load_key, true);\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n } finally {\n mActivity.runOnUiThread(loadDatabaseRunnable);\n }\n }\n };\n\n Thread thread = new Thread(null, load, \"loadDatabase\");\n thread.start();\n }", "@GetMapping(path = \"${pathInitDatabase}\", produces = MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic Object feedDatabase() {\r\n\t\tlivreDAO.feed();\r\n\t\tMap<String, String> r = new HashMap<String, String>();\r\n\t\tr.put(databaseReset, \"\" + true);\r\n\t\tr.put(databaseFeed, \"\" + true);\r\n\t\tr.put(databaseNumberBooks, \"\" + livreDAO.getAllLivres().size());\r\n\r\n\t\treturn r;\r\n\t}", "@Override\n public void run(ApplicationArguments args){\n User user1 = new User(\"Accounts Payable\");\n userRepository.save(user1);\n\n User user2 = new User(\"Admin\");\n userRepository.save(user2);\n\n Folder folder1 = new Folder(\"Accounts\", user1);\n folderRepository.save(folder1);\n\n Folder folder2 = new Folder(\"Letters\", user2);\n folderRepository.save(folder2);\n\n File file1 = new File(\"Invoice001\", \".exe\", 1.23, folder1);\n fileRepository.save(file1);\n\n File file2 = new File(\"Invoice002\", \".exe\", 1.45, folder1 );\n fileRepository.save(file2);\n\n File file3 = new File(\"Letter001\", \".doc\", 1.67, folder2);\n fileRepository.save(file3);\n\n\n }", "public static void main(String[] args) {\n\t\tCluster cluster = CouchbaseCluster.create();\n\t\t// Open the default bucket and the \"beer-sample\" one\n\t\tBucket defaultBucket = cluster.openBucket();\n\t\t// Disconnect and clear all allocated resources\n\n\t\t/*JsonObject productJson = JsonObject.empty().put(\"name\", \"An ice sculpture\").put(\"price\", 12.50)\n\t\t\t\t.put(\"length\", 7.0).put(\"width\", 12.0).put(\"height\", 9.5)\n\t\t\t\t.put(\"description\", \"This product is not for sale\");\n\n\t\tJsonDocument productJsonToBeStored = JsonDocument.create(\"productKey\", productJson);\n\t\tJsonDocument productRecievedFromDB = defaultBucket.upsert(productJsonToBeStored);*/\n\t\t\n\t\t\n\n\t\tcluster.disconnect();\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n\n db = new Datenbank();\n try{\n db.loadUsers();\n } catch (IOException e){\n // todo Nachricht anzeigen\n }\n\n\n\n }" ]
[ "0.65861094", "0.58987033", "0.58500123", "0.57821256", "0.5724634", "0.5708028", "0.5680771", "0.5640059", "0.56118333", "0.5583557", "0.55817384", "0.55673295", "0.554575", "0.5505728", "0.55013376", "0.54694223", "0.54420274", "0.54371053", "0.5431664", "0.54222995", "0.5405562", "0.5402666", "0.5392645", "0.539081", "0.5386301", "0.5375004", "0.5371082", "0.53703046", "0.536352", "0.5357024", "0.53551024", "0.531458", "0.530024", "0.5299092", "0.52867585", "0.5275524", "0.52524704", "0.5242692", "0.5228975", "0.5224423", "0.52213967", "0.5205104", "0.52032596", "0.5177448", "0.51649624", "0.5140875", "0.5135504", "0.5122889", "0.5122189", "0.5120847", "0.5119134", "0.51173514", "0.511649", "0.5115549", "0.5108507", "0.51065695", "0.50921977", "0.50862944", "0.5079153", "0.50682205", "0.50603724", "0.5059499", "0.5058843", "0.50557196", "0.5052271", "0.5037881", "0.5036098", "0.5033077", "0.50279635", "0.50194865", "0.5015158", "0.5007989", "0.50022763", "0.4995224", "0.49949026", "0.49896076", "0.49870923", "0.49801588", "0.49772668", "0.49726725", "0.4970805", "0.49672693", "0.4963631", "0.49633765", "0.49622834", "0.4961951", "0.4958505", "0.4957865", "0.4957634", "0.49548593", "0.4950753", "0.4949148", "0.49455795", "0.4945546", "0.49411604", "0.49399966", "0.4939992", "0.49388766", "0.49269792", "0.49257186", "0.49190152" ]
0.0
-1
construct a line object
public Line (double x0, double y0, double x1, double y1) { this.x0 = x0; this.y0 = y0; this.x1 = x1; this.y1 = y1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Line createLine();", "public Line(){\n\t\t\n\t}", "public static Line CreateLine(String id) { return new MyLine(id); }", "public OMAbstractLine() {\n super();\n }", "public Line()\n\t{\n\t\tthis(1.0f, 1.0f, 0.0f);\n\t}", "public LineData()\n\t{\n\t}", "public Line() {\r\n this.line = new ArrayList < Point > ();\r\n this.clickedPoint = null;\r\n this.direction = null;\r\n }", "public BSPLine() {\n super();\n }", "public Line() {\n \n this.buffer = new ArrayList<ArrayList<Integer>>();\n this.buffer.add(new ArrayList<Integer>());\n this.lineT = 0;\n this.columnT = 0;\n this.inputMode = false;\n }", "private Line addLine() {\n\t\t// Create a new line\n\t\tLine line = new Line(doily.settings.getPenScale(), \n\t\t\t\tdoily.settings.getPenColor(), doily.settings.isReflect());\n\t\tdoily.lines.add(line);\n\t\treturn line;\n\t}", "public Line(Point startingPoint, Point endingPoint) {\n this.startingPoint = startingPoint;\n this.endingPoint = endingPoint;\n }", "public Line(Point p1, Point p2) {\n super(p1, p2);\n this.p1 = p1;\n this.p2 = p2;\n }", "public OrderLine() {\n }", "public Line() {\n\t\t\n\t\tthis.point1 = null;\n\t\tthis.point2 = null;\n\t\tthis.distance = 0;\n\t}", "public Line(double x1, double y1, double x2, double y2) {\r\n this(new Point(x1, y1), new Point(x2, y2));\r\n }", "public Line(final Pos first, final Pos second) {\n this(first, second, new Black());\n }", "public EPILine(int[][] pixels, int line, Position position)\r\n\t{\r\n\t\t_position=position;\r\n\t\t_line=line;\r\n\t\t_pixels=pixels;\r\n\t\t\r\n\t}", "public Line voToLine() {\n Line line = new Line();\n if (this.getLineId() != null) {\n line.setLineId(this.getLineId());\n }\n line.setAppmodelId(this.getAppmodelId());\n line.setDriverName(this.getDriverName());\n line.setDriverPhone(this.getDriverPhone());\n line.setLineName(this.getLineName());\n line.setProvinceId(this.provinceId);\n line.setCityId(this.cityId);\n line.setAreaId(this.areaId);\n return line;\n }", "public Lines()\r\n\t{\r\n\t\tlines = new LinkedList<Line>();\r\n\t}", "public LineShape() {\n sc=new ShapeComponent[4];\n sc[0]=new ShapeComponent(0,0);\n sc[1]=new ShapeComponent(0,5);\n sc[2]=new ShapeComponent(0,10);\n sc[3]=new ShapeComponent(0,15);\n size=5;\n }", "public JournalEntryLine() {\n this(DSL.name(\"JOURNAL_ENTRY_LINE\"), null);\n }", "public static Line fromText(String data) {\n\t\tif (data == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tString[] dats = data.trim().split(\" \");\n\t\tif (dats.length != 7) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\ttry {\n\t\t\tint x1 = Integer.parseInt(dats[0].trim());\n\t\t\tint y1 = Integer.parseInt(dats[1].trim());\n\t\t\tint x2 = Integer.parseInt(dats[2].trim());\n\t\t\tint y2 = Integer.parseInt(dats[3].trim());\n\t\t\tint r = Integer.parseInt(dats[4].trim());\n\t\t\tint g = Integer.parseInt(dats[5].trim());\n\t\t\tint b = Integer.parseInt(dats[6].trim());\n\t\t\treturn new Line(\"Line\", x1, y1, x2, y2, new Color(r, g, b), null);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t}", "public CrnLineContainer() {\n }", "public DerivationLine()\n {\n super();\n this.clauses = new ArrayList<>();\n }", "public Line(TwoDPoint p1, TwoDPoint p2) throws Exception\n {\n this(p1.x, p1.y, p2.x, p2.y);\n }", "public static void main(String[] args) {\n\r\n Line l1 = new Line(1,2,3,4);\r\n System.out.println(l1); // line toString\r\n // line[begin=(1,2),end=(3,4)]\r\n Line l2 = new Line(new Point(5,6), new Point(7,8)); // anypoymous point's intstances\r\n\r\n System.out.println(l2); // line's toString()\r\n // line[begin=(5,6),end=(7,8)]\r\n\r\n // test setters and getters\r\n l1.setBegin(new Point(11,12));\r\n l1.setEnd(new Point(13,14));\r\n System.out.println(l1);\r\n // line [begin =(11,12),end=(13,14)]\r\n System.out.println(\"begin is\"+l1.getBegin()); // point tostring\r\n// begin is:(11,12)\r\n System.out.println(\"end is:\"+ l1.getEnd()); // point's toString()\r\n// end is:(13,14)\r\n\r\n l1.setBeginX(21);\r\n l1.setBeginY(22);\r\n l1.setEndX(23);\r\n l1.setEndY(24);\r\n System.out.println(l1);\r\n // line[begin=(21,22) end=(23,24)]\r\n System.out.println(\"begin's x is\" + l1.getBeginX());\r\n // begin's x is: 21\r\n System.out.println(\"end x is\" + l1.getEndX());\r\n// end x is 23\r\n System.out.println(\"end y is\" + l1.getEndY());\r\n// end y is 24\r\n l1.setBeginXY(31,32);\r\n l1.setEndXY(33,34);\r\n System.out.println(l1); // line toSTRING()\r\n // LINE[begin = (31,32),end= ()33,34]\r\n System.out.println(\"begin x and y are\" + Arrays.toString(l1.getBeginXY()));\r\n// begin is [31,32]\r\n System.out.println(\"end x and y are\" + Arrays.toString(l1.getEndXY()));\r\n// end is [31,32]\r\n\r\n // test getlength()\r\n System.out.printf(\"length is: %.2f%n\", l1.getLength());\r\n// length is:2.83\r\n\r\n\r\n }", "public GeoLine( GeoPoint start, GeoPoint end ){\n this(start,DEFAULT_COLOR,end);\n }", "public Line getLine(String targetLine);", "@Override\n public Line getLine() {\n return line;\n }", "public Line(float dT)\n\t{\n\t\tthis(dT, 1.0f, 0.0f);\n\t}", "public CustMnjOntSoObinSizline_LineEOImpl() {\n }", "public Line getLine()\n {\n return line;\n }", "private Line(String inLine) {\n // Save the input line.\n this.lineText = inLine;\n // Get the number of fields in the line.\n int nFields = labels.length;\n // Normally, this will work.\n this.fields = TabbedLineReader.this.splitLine(inLine);\n // If the number of fields is wrong, we have to adjust.\n if (this.fields.length != nFields) {\n // Copy the old array and create a new one of the proper length.\n String[] buffer = this.fields;\n this.fields = new String[nFields];\n // Transfer the strings one by one, padding if necessary.\n for (int i = 0; i < nFields; i++) {\n if (i < buffer.length) {\n this.fields[i] = buffer[i];\n } else {\n this.fields[i] = \"\";\n }\n }\n }\n }", "public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}", "public LineRelation lineLineRelation(Coordinates line1PointA, Coordinates line1PointB,\n Coordinates line2PointA, Coordinates line2PointB);", "protected abstract E createEntity(String line);", "public Linea2D(Punto a, Punto b)\n {\n this.a=a;\n this.b=b;\n }", "void addLine(int index, Coordinate start, Coordinate end);", "public LineSegment( CartesianCoordinate start , CartesianCoordinate end)\n\t{\n\t\tthis.startPoint = start;\n\t\tthis.endPoint = end;\n\t}", "public Line copy() {\r\n Line l = new Line();\r\n l.line = new ArrayList < Point > (this.line);\r\n l.direction = this.direction;\r\n l.clickedPoint = this.clickedPoint;\r\n return l;\r\n }", "private void drawLine(Vector3 point1, Vector3 point2, Node n) {\n\n Node nodeForLine= new Node();\n nodeForLine.setName(LINE_STRING);\n //First, find the vector extending between the two points and define a look rotation\n //in terms of this Vector.\n final Vector3 difference = Vector3.subtract(point1, point2);\n final Vector3 directionFromTopToBottom = difference.normalized();\n final Quaternion rotationFromAToB =\n Quaternion.lookRotation(directionFromTopToBottom, Vector3.up());\n MaterialFactory.makeTransparentWithColor(getApplicationContext(), new Color(this.colorLine.x, this.colorLine.y, this.colorLine.z,this.alphaColor))\n .thenAccept(\n material -> {\n /* Then, create a rectangular prism, using ShapeFactory.makeCube() and use the difference vector\n to extend to the necessary length. */\n ModelRenderable model = ShapeFactory.makeCube(\n new Vector3(this.sizeLine, this.sizeLine, difference.length()),\n Vector3.zero(), material);\n /* Last, set the world rotation of the node to the rotation calculated earlier and set the world position to\n the midpoint between the given points . */\n\n nodeForLine.setParent(n);\n\n\n nodeForLine.setRenderable(model);\n nodeForLine.setWorldPosition(Vector3.add(point1, point2).scaled(.5f));\n nodeForLine.setWorldRotation(rotationFromAToB);\n }\n );\n\n }", "public\nBLine2D(double x2, double y2)\n{\n\tsuper (0.0, 0.0, x2, y2);\n}", "public Line(int left, int top, int right, int bottom) throws Exception\n {\n // each of these validates its argument - see below.\n setLeft(left);\n setTop(top);\n setRight(right);\n setBottom(bottom);\n }", "public LineInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public OrderLine() {\n products = new ArrayList<>();\n price = new BigDecimal(0);\n }", "public BSPLine(BSPPolygon poly) {\n setTo(poly);\n }", "public AddDeadlineCommand(String line) {\n this.line = line;\n }", "public LinesDimension1() {\n \n }", "public OpenPolyLine(List<Point> points) \n\t{\n\t\tsuper(points);\n\t}", "public LineXY( final double x1,\n\t\t\t\t final double y1,\n\t\t\t\t final double x2,\n\t\t\t\t final double y2 ) {\n\t\tthis.p1 = new PointXY( x1, y1 ); \n\t\tthis.p2 = new PointXY( x2, y2 );\n\t}", "public Line(final int fx, final int fy, final int sx, final int sy) {\n this(new PosOf(fx, fy), new PosOf(sx, sy));\n }", "public Lines(CharSequence text) {\n Parameters.notNull(\"text\", text);\n this.text = text;\n initLines();\n }", "private static LineOfCredit createLineOfCreditObjectForPost() {\n\n\t\tLineOfCredit lineOfCredit = new LineOfCredit();\n\n\t\tCalendar now = Calendar.getInstance();\n\n\t\tString notes = \"Line of credit note created via API \" + now.getTime();\n\t\tlineOfCredit.setId(\"LOC\" + now.getTimeInMillis());\n\t\tlineOfCredit.setStartDate(now.getTime());\n\t\tnow.add(Calendar.MONTH, 6);\n\t\tlineOfCredit.setExpiryDate(now.getTime());\n\t\tlineOfCredit.setNotes(notes);\n\t\tlineOfCredit.setAmount(new Money(100000));\n\n\t\treturn lineOfCredit;\n\t}", "public TextLine(String text) {\n\t\tthis.text = text.toString();\n\t}", "public OMAbstractLine(int rType, int lType, int dcType) {\n super(rType, lType, dcType);\n }", "public BSPLine(float x1, float y1, float x2, float y2) {\n setLine(x1, y1, x2, y2);\n }", "Line(Dot StartDot,Dot EndDot,int index){\n \tthis.StartDot = StartDot;\n \tthis.EndDot = EndDot;\n \tthis.sx = StartDot.getX();\n \tthis.sy = StartDot.getY();\n \tthis.ex = EndDot.getX();\n \tthis.ey = EndDot.getY();\n \tthis.Angle = Math.atan2((ey - sy),(ex - sx)); \n// \tif((ey - sy) > 0 && (ex - sx) < 0) Angle += Math.PI;\n// \tif((ey - sy) < 0 && (ex - sx) < 0) Angle += Math.PI;\n// \tif((ey - sy) < 0 && (ex - sx) > 0) Angle += Math.PI * 2;\n// \tif((ex-sx) < 0) Angle += Math.PI;\n// \tif((ex - sx) > 0 && (ey - sy) < 0) Angle += Math.PI * 2;\n \tif(Angle < 0) Angle += Math.PI * 2;\n \tthis.rightPoly = null;\n \tthis.leftPoly = null;\n \tthis.index = index;\n }", "public KochLine getLineA(){\n\t\tKochLine lineA= new KochLine(p1,p2);\n\t\treturn lineA;\n\t\t\n\t}", "public LineView(Element elem) {\n super(elem);\n }", "public FieldLineNode(){\n\t\tthis(1, new Vector3f(0,1,0));\n\t}", "public LineSymbolizer(final StyleFactory<R> factory) {\n super(factory);\n }", "public void setLine ( String value )\n {\n line = value;\n }", "public abstract void lineTo(double x, double y);", "public void addLine(Line l) {\n\t\tlines.add(l);\n\t\t// vypocitaj bounding rect\n\t\tfloat x, y, w, h;\n\t\tif (l.getX1() < l.getX2()) {\n\t\t\tx = l.getX1();\n\t\t\tw = l.getX2() - l.getX1();\n\t\t} else {\n\t\t\tx = l.getX2();\n\t\t\tw = l.getX1() - l.getX2();\n\t\t}\n\t\tif (l.getY1() < l.getY2()) {\n\t\t\ty = l.getY1();\n\t\t\th = l.getY2() - l.getY1();\n\t\t} else {\n\t\t\ty = l.getY2();\n\t\t\th = l.getY1() - l.getY2();\n\t\t}\n\t\tif (boundingRect==null) {\n\t\t\tboundingRect = new Rectangle(x, y, w, h);\n\t\t} else {\n\t\t\tif (x < boundingRect.getX()) {\n\t\t\t\tboundingRect.setX(x);\n\t\t\t}\n\t\t\tif (y < boundingRect.getY()) {\n\t\t\t\tboundingRect.setY(y);\n\t\t\t}\n\t\t\tif (w > boundingRect.getW()) {\n\t\t\t\tboundingRect.setW(w);\n\t\t\t}\n\t\t\tif (h > boundingRect.getH()) {\n\t\t\t\tboundingRect.setH(h);\n\t\t\t}\n\t\t}\n\t}", "public Line (String name, int x1, int y1, int x2, int y2, Color color, GeometricalObjectListener[] listeners) {\n\t\tif (name == null || color == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.name = name;\n\t\tthis.x1 = x1;\n\t\tthis.x2 = x2;\n\t\tthis.y1 = y1;\n\t\tthis.y2 = y2;\n\t\tthis.color = color;\n\t\tif (listeners != null) {\n\t\t\tthis.listeners = new LinkedList<>(Arrays.asList(listeners));\n\t\t}\n\t}", "private static void addLine(String[] input) throws NumberFormatException, IncorrectParametersException{\n if (input.length == 5){\n try{\n int x1 = Integer.parseInt(input[1]); \n int y1 = Integer.parseInt(input[2]);\n int x2 = Integer.parseInt(input[3]); \n int y2 = Integer.parseInt(input[4]);\n try{\n canvas.createLine(x1, y1, x2, y2);\n System.out.println(canvas.render());\n } catch (NullPointerException ex) {\n System.out.println(\"Initialise a new canvas first!\");\n }\n } catch (NumberFormatException ex) {\n System.out.println(\"HELP: to create a new line enter `L x1 y1 x2 y2`\");\n }\n } else {\n System.out.println(\"HELP: to create a new line enter `L x1 y1 x2 y2`\");\n throw new IncorrectParametersException(\"\");\n }\n }", "public KochLine getLineC(){\n\t\tKochLine lineC= new KochLine(p3,p4);\n\t\treturn lineC;\n\t\t\n\t}", "public void lineTo(double x, double y)\n {\n\tPoint2D pos = transformedPoint(x,y);\n\tdouble tx = pos.getX();\n\tdouble ty = pos.getY();\n\t\n\tLine line = new Line(_currentx, _currenty, tx, ty);\n\n\tSystem.out.println(\"+Line: \" + line.toString());\n\t_currentPath.add(line);\n\t_currentx = tx;\n\t_currenty = ty;\n }", "public Line getLine(int row1, int column1, int row2, int column2) {\n Dot firstDot = new Dot(row1, column1);\n Dot secondDot = new Dot(row2, column2);\n\n if (row2 >= row1 && column2 >= column1) {\n Line line = new Line(firstDot, secondDot);\n return line;\n } else {\n return null;\n }\n }", "public LineStroker() {\n }", "public PointRelation pointLineRelation(Coordinates point, Coordinates linePointA, Coordinates linePointB);", "KochLine(Point start, Point end){\n\t\tsuper(start,end);\n\t\tthis.p1=this.getStart();\n\t\tthis.p5=this.getEnd();\n\t\t\n\t}", "public abstract AbstractLine newLine() throws IOException;", "public Line(org.dom4j.Element el) throws Exception {\n this();\n readXML(el);\n }", "public LineXY( final PointXY p1, final PointXY p2 ) {\n\t\tthis.p1 = p1;\n\t\tthis.p2\t= p2;\n\t}", "public interface IBasicLine {\n\tvoid setMiddle();\n\tvoid setDirection(Direction direction);\n\tDirection getDirection();\n\tvoid setDifX(int difX);\n\tvoid setDifY(int difY);\n\tint getDifX();\n\tint getDifY();\n\tvoid setMouseEndXY(int x, int y);\n\tint getMouseEndX();\n\tint getMouseEndY();\n\tvoid setAngle(double angle);\n\tvoid setAngle(int difX, int difY);\n\tdouble getAngle();\n}", "public Address line1(String line1) {\n this.line1 = line1;\n return this;\n }", "public GeoLine(GeoPoint start, Color color, GeoPoint end ){\n super(start,color);\n this.setEnd(end);\n this.setEdgeColor(color);\n }", "public Line copy() {\n return new Line(getWords());\n }", "public LineElement(\n final double firstPointX, final double firstPointY,\n final double secondPointX, final double secondPointY,\n final double width, final Color color) {\n this.firstPointX = firstPointX;\n this.firstPointY = firstPointY;\n this.secondPointX = secondPointX;\n this.secondPointY = secondPointY;\n this.width = width;\n this.color = color;\n }", "protected abstract void lineTo(final float x, final float y);", "public LineChart() {\n init();\n }", "private GLine makeLine(GRect topRect, GRect bottomRect) {\r\n\t\tint topRectX = (int) topRect.getX() + (int) (RECT_WIDTH / 2);\r\n\t\tint topRectY = (int) topRect.getY() + (int) topRect.getHeight();\r\n\t\tint bottomRectX = (int) bottomRect.getX() + (int) (RECT_WIDTH / 2);\r\n\t\tint bottomRectY = (int) bottomRect.getY();\r\n\t\treturn new GLine(topRectX, topRectY, bottomRectX, bottomRectY);\r\n\t}", "public void computeLine ()\r\n {\r\n line = new BasicLine();\r\n\r\n for (GlyphSection section : glyph.getMembers()) {\r\n StickSection ss = (StickSection) section;\r\n line.includeLine(ss.getLine());\r\n }\r\n\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\r\n line + \" pointNb=\" + line.getNumberOfPoints() +\r\n \" meanDistance=\" + (float) line.getMeanDistance());\r\n }\r\n }", "private ListStore<Line> createLines() {\n\t\tStyleInjectorHelper.ensureInjected(CommonGanttResources.resources.css(), true);\n\n\t\tLineProperties lineProps = GWT.create(LineProperties.class);\n\t\tListStore<Line> store = new ListStore<Line>(lineProps.key());\n\t\tString customCssStyle = CommonGanttResources.resources.css().todayLineMain();\n\t\tLine line = new Line(new Date(), \"Текушая дата :\" + new Date().toString(), customCssStyle);\n\t\tstore.add(line);\n\t\treturn store;\n\t}", "public Record(String line)\t// create a record from a line\n\t{\n\t\tint i;\n\t\trecordMap = new HashMap<>(); \n\t\tStringTokenizer st = new StringTokenizer(line, DELIMITER);\n\n\t\tfor (i=0; i < NUMBER_OF_FIELDS; i++)\n\t\t{\n\t\t\trecordMap.put(i, new Field(FIELD_TYPES[i], FIELD_LABELS[i], st.nextToken()));\n\t\t}\t\t\n\t}", "public SignLine(final String type) {\n\t\tthis.type = type;\n\t\tthis.signers = new ArrayList<SignLineElement>();\n\t}", "public Line(String equation)\r\n\t{\r\n\t\tint i;\r\n\t\tString string = \"\";\r\n\t\t\r\n\t\t// Skip everything before '='\r\n\t\tfor(i = 0; equation.charAt(i) != '='; i++)\r\n\t\t{\r\n\t\t\t;\r\n\t\t}\r\n\t\t\r\n\t\t// Skip '='\r\n\t\ti++;\r\n\t\t\r\n\t\t// Everything after '=' and before 'x' is the slope\r\n\t\t// Skip all white spaces\r\n\t\tfor(;equation.charAt(i) != 'x';i++)\r\n\t\t{\r\n\t\t\tif(equation.charAt(i) == ' ')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstring += equation.charAt(i);\r\n\t\t}\r\n\t\t\r\n\t\t// If there was nothing between '=' and 'x' then the slope is 1\r\n\t\tif(string.isEmpty())\r\n\t\t{\r\n\t\t\tstring = \"1\";\r\n\t\t}\r\n\t\t\r\n\t\t// Convert String to a double\r\n\t\tslope = Double.parseDouble(string);\r\n\t\t\r\n\t\t// Skip the 'x' and reset 'string'\r\n\t\ti++;\r\n\t\tstring = \"\";\r\n\t\t\r\n\t\t// Everything after the 'x' is the intercept with y axis\r\n\t\tfor(; i < equation.length();i++)\r\n\t\t{\r\n\t\t\tif(equation.charAt(i) == ' ')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tstring += equation.charAt(i);\r\n\t\t}\r\n\t\t\r\n\t\t// If there is no intercept, it means that the intercept is 0\r\n\t\tif(string.isEmpty())\r\n\t\t{\r\n\t\t\tstring = \"0\";\r\n\t\t}\r\n\t\t\r\n\t\tintercept = Double.parseDouble(string);\r\n\t}", "public Building(String[] line){\n setId(Integer.parseInt(line[0]));\n setRank(Integer.parseInt(line[1]));\n setName(line[2]);\n setCity(line[3]);\n setCountry(line[4]);\n setHeight_m(Double.parseDouble(line[5]));\n setHeight_ft(Double.parseDouble(line[6]));\n setFloors(line[7]);\n setBuild(line[8]);\n setArchitect(line[9]);\n setArchitectual_style(line[10]);\n setCost(line[11]);\n setMaterial(line[12]);\n setLongitude(line[13]);\n setLatitude(line[14]);\n // setImage(line[15]);\n\n }", "private OrderLine insertOrderLine(Order order,\n SalesOrderLineInformation salesOrderLineInformation, Organization org, Warehouse warehouse,\n long lineNo) throws Exception {\n OrderLine orderLine = null;\n JsonToDataConverter fromJsonToData = new JsonToDataConverter();\n try {\n orderLine = (OrderLine) fromJsonToData.toBaseOBObject(salesOrderLineInformation\n .getOrderLineJSON());\n orderLine.setCreatedBy(order.getCreatedBy());\n orderLine.setCreationDate(new Date());\n orderLine.setUpdatedBy(order.getCreatedBy());\n orderLine.setUpdated(new Date());\n orderLine.setOrganization(org);\n if (warehouse.getIbdoWarehousetype().equals(\"FACST_External\")) {\n orderLine.setOrganization(order.getOrganization());\n }\n orderLine.setSalesOrder(order);\n orderLine.setPartnerAddress(null);\n orderLine.setWarehouse(warehouse);\n orderLine.setNewOBObject(true);\n orderLine.setProduct(salesOrderLineInformation.getProduct());\n orderLine.setCreateReservation(SOConstants.StockReservationAutomatic);\n orderLine.setOrderedQuantity(salesOrderLineInformation.getQuantity());\n orderLine.setWarehouseRule(salesOrderLineInformation.getWarehouseRule());\n orderLine.setLineNo(lineNo);\n orderLine.setIbdoPoid(salesOrderLineInformation.getOrderLineJSON().getString(\"id\"));\n } catch (JSONException e) {\n LOG.error(e.getMessage(), e);\n } catch (Exception e) {\n LOG.error(e.getMessage(), e);\n throw new Exception(e.toString());\n }\n OBDal.getInstance().save(orderLine);\n return orderLine;\n }", "public Polygon getLine() {\n float[] vertices;\n if (modo == 1) {\n\n vertices = new float[]{\n getX(), getY(),\n getX() + (getWidth()*0.2f), getY() + getHeight()-getHeight()*0.2f,\n getX() + getWidth(), getY() + getHeight()};\n } else if (modo == 2) {\n\n vertices = new float[]{\n getX() + getWidth()- getWidth()*0.2f , getY() + getHeight() - getHeight()*0.2f,\n getX() + getWidth(), getY(),\n getX() , getY() + getHeight(),\n\n };\n\n } else if (modo == 3) {\n vertices = new float[]{\n getX(), getY(),\n getX() + getWidth() *0.8f, getY() + getHeight() *0.2f,\n getX() + getWidth(), getY() + getHeight()\n };\n } else {\n vertices = new float[]{\n getX(), getY() + getHeight(),\n getX() + getWidth()*0.2f, getY() + getHeight()*0.2f,\n getX() + getWidth(), getY()\n };\n }\n\n polygon.setVertices(vertices);\n return polygon;\n }", "public PhysicsLine(PointF start, PointF end) {\n setEndPoints(start, end);\n }", "public void setLine (int Line);", "private void defineLinePoints(int x1, int y1,int x2,int y2){\n Line line1 = new Line(x1, y1, x2, y2);\n for(int i = 0; i < line1.points.size(); i++){\n super.points.add(line1.points.get(i));\n }\n }", "protected LineRelation(GeomE geometry) {\n this.geometry = geometry;\n }", "public OMAbstractLine(int rType, int lType, int dcType, Color lc, Color fc,\n Color sc) {\n super(rType, lType, dcType, lc, fc, sc);\n }", "public Line(final Line source, final Point endPoint2) {\n this.endPoint2 = endPoint2;\n }", "public Line getLine ()\r\n {\r\n if (line == null) {\r\n computeLine();\r\n }\r\n\r\n return line;\r\n }", "public abstract String getLine(int lineNumber);", "public LineaAbstract() {\n super();\n this.ColorRelleno=Color.BLACK;\n ColorRelleno=null;\n this.width=1.0F;\n isRelleno=false;\n isContinuo=true;\n isGradiente=false;\n }" ]
[ "0.83665174", "0.812985", "0.7751703", "0.75308067", "0.7208539", "0.7160726", "0.70131564", "0.69879985", "0.6974155", "0.69313395", "0.6913928", "0.6888419", "0.68542254", "0.6842991", "0.6796845", "0.6769413", "0.6755601", "0.6719972", "0.66982085", "0.6684841", "0.65781385", "0.6562873", "0.65123194", "0.6509692", "0.650865", "0.6508155", "0.6507665", "0.6490682", "0.6450205", "0.64193153", "0.641647", "0.6409808", "0.6407345", "0.63964087", "0.63908666", "0.6362924", "0.63447165", "0.6286459", "0.62860304", "0.62804294", "0.6231435", "0.6218073", "0.62138194", "0.621267", "0.62032866", "0.6188276", "0.6179769", "0.61779326", "0.6162636", "0.6160179", "0.61588055", "0.61368454", "0.6135097", "0.6131134", "0.6126711", "0.61227036", "0.61192346", "0.61069804", "0.6104351", "0.6098289", "0.60765", "0.60635155", "0.60537577", "0.60512805", "0.6049156", "0.60441554", "0.6042882", "0.6041208", "0.60367155", "0.6031234", "0.60297835", "0.60209936", "0.60127616", "0.6000312", "0.59980506", "0.5988548", "0.5976273", "0.5961148", "0.5955609", "0.5950305", "0.5946369", "0.5942911", "0.59410906", "0.5931498", "0.59301895", "0.59179944", "0.59110624", "0.59034365", "0.5898939", "0.5896566", "0.5892618", "0.58889055", "0.58882815", "0.5884502", "0.588365", "0.5874288", "0.58702344", "0.586071", "0.5854352", "0.58476627" ]
0.69038
11
calculate the slope of the line
public double getSlope( ){ if (x1 == x0){ throw new ArithmeticException(); } return (y1 - y0)/(x1 - x0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static double slope(Line line) {\n return (line.b == 1) ? -line.a : INF;\n }", "public double slope(){\n double x = getStart().getXco();\n double x1 = end.getXco();\n double y = getStart().getYco();\n double y1 = end.getYco();\n double num = y1 - y;\n double den = x1 -x;\n\n return num/den;\n }", "public double lineSlope() {\r\n //The formula to calculate the gradient.\r\n double slope;\r\n double dy = this.start.getY() - this.end.getY();\r\n double dx = this.start.getX() - this.end.getX();\r\n // line is vertical\r\n if (dx == 0 && dy != 0) {\r\n slope = Double.POSITIVE_INFINITY;\r\n return slope;\r\n }\r\n // line is horizontal\r\n if (dy == 0 && dx != 0) {\r\n slope = 0;\r\n return slope;\r\n }\r\n slope = dy / dx;\r\n return slope;\r\n }", "public Double slope() throws VerticalLineRuntimeException {\n if(this.isVertical()) \n throw new VerticalLineRuntimeException(\n \"You can't compute the slope of a vertical line.\");\n else \n return((point2.getSecond()-point1.getSecond())/\n (point2.getFirst()-point1.getFirst()));\n }", "protected Double getSlope(Line2D line) {\n\t\tdouble x1, y1, x2, y2;\n\t\tif (line.getX1() < line.getX2()) {\n\t\t\tx1 = line.getX1();\n\t\t\tx2 = line.getX2();\n\t\t\ty1 = line.getY1();\n\t\t\ty2 = line.getY2();\n\t\t} else {\n\t\t\tx1 = line.getX2();\n\t\t\tx2 = line.getX1();\n\t\t\ty1 = line.getY2();\n\t\t\ty2 = line.getY1();\n\t\t}\n\t\tif (x1 == x2)\n\t\t\treturn Double.POSITIVE_INFINITY;\n\t\tif (y1 == y2)\n\t\t\treturn new Double(0);\n\t\telse\n\t\t\treturn (y2 - y1) / (x2 - x1);\n\t}", "public static double slopeOfLine(double x1, double y1, double x2, double y2) {\n double slope = (y2 - y1) / (x2 - x1);\n slope = (double) Math.round(slope * 100) / 100;\n return slope;\n }", "public float slope(int x1,int y1,int x2,int y2){\n return ((float)y2-y1)/(x2-x1);\n }", "public double slope(double X) {\r\n double slope; //double slope is created which will be retruned\r\n double deltaX = 0.0000000001; //slope equation is (x2-x1)/(y2-y1).\r\n double yInitial = evaluate(X - 0.00000000005);\r\n double yFinal = evaluate(X + 0.00000000005);\r\n double deltaY = yFinal - yInitial; \r\n slope = deltaY/deltaX; // slope equation represented in code.\r\n return slope; \r\n\t}", "@Test\n\tpublic void lineGetSlopeTest() {\n\n\t\tassertEquals(1.0d, firstLine.getSlope(), .0001d);\n\t\tassertNotEquals(2.0d, firstLine.getSlope(), .0001d);\n\t}", "static Line pointSlopeToLine(PointDouble p, double slope) {\n Line line = new Line();\n line.a = -slope; // always -slope TODO: solve case slope=INFINITY\n line.b = 1; // always 1\n line.c = -((line.a * p.x) + (line.b * p.y));\n return line;\n }", "public double slopeTo(Point that) {\n// System.out.printf(\"in slope %d %d %d %d\\n\", this.x , this.y, that.x, that.y);\n if (this.compareTo(that) == 0)\n return Double.NEGATIVE_INFINITY;\n if (this.x == that.x)\n return Double.POSITIVE_INFINITY;\n if (this.y == that.y)\n return 0.0;\n// System.out.println(\"int point :\" + (this.y - that.y) * 1.0 / (this.x - that.x));\n return (this.y - that.y) * 1.0 / (this.x - that.x);\n }", "public double slopeTo(Point that) {\r\n\t\tdouble subX = (that.x - this.x);\r\n\t\tdouble subY = (that.y - this.y);\r\n\r\n\t\tif(subX == 0 && subY == 0) return Double.NEGATIVE_INFINITY;\r\n\t\tif(subX == 0) return Double.POSITIVE_INFINITY;\r\n\t\tif(subY == 0) return 0;\r\n return subY / subX;\r\n }", "public double slopeTo(Point that) {\n if (that.x == x && that.y == y) return Double.NEGATIVE_INFINITY;\n else if (that.x == x && that.y != y) return Double.POSITIVE_INFINITY;\n else if (that.x != x && that.y == y) return +0.0;\n\n return (double) (that.y - y) / (that.x - x);\n }", "public Double getSlope() {\n\t\tif( slope == null ) {\n\t\t\tslope = computeSlope( p1.x, p1.y, p2.x, p2.y );\n\t\t}\n\t\treturn slope;\n\t}", "public double slopeTo(Point that) {\n if (this.compareTo(that) == 0)\n return Double.NEGATIVE_INFINITY;\n if (this.x == that.x)\n return Double.POSITIVE_INFINITY;\n if (this.y == that.y)\n return 0.0;\n double result = (double) (that.y - this.y) / (double) (that.x - this.x);\n return result;\n }", "public double slopeTo(Point that) {\n int x0 = this.x;\n int x1 = that.x;\n int y0 = this.y;\n int y1 = that.y;\n \n if (x0 == x1 && y0 == y1) {\n return Double.NEGATIVE_INFINITY;\n }\n \n if (y0 == y1) {\n return 0.0;\n }\n \n if (x0 == x1) {\n return Double.POSITIVE_INFINITY;\n }\n \n return (double)(y1 - y0) / (double)(x1 - x0);\n }", "private float calculateRoadSlope(Point point1, Point point2) {\n float slopeSum = 0;\n int x1 = point1.getX();\n int y1 = point1.getY();\n int x2 = point2.getX();\n int y2 = point2.getY();\n pastSlopes.remove(0);\n pastSlopes.add((float) (y1 - y2) / (x1 - x2));\n\n // Average the slopes in pastSlopes\n for (Float slope : pastSlopes) {\n slopeSum += slope;\n }\n float slope = slopeSum / pastSlopes.size();\n return slope;\n }", "public double getSlope(double x1, double y1, double x2, double y2) {\n // slope = (|y2 - y1|) / (|x2 - x1|)\n double slope = Math.abs(y2 - y1) / Math.abs(x2 - x1);\n return slope;\n }", "public double slopeTo(Point that) {\n if (that.y == this.y && that.x == this.x) return Double.NEGATIVE_INFINITY;\n if (that.y == this.y) return 0.0;\n if (that.x == this.x) return Double.POSITIVE_INFINITY;\n else return (double) (that.y - this.y)/ (that.x - this.x);\n }", "private double getIntercept(double slope) {\n return (sumY - slope * sumX) / n;\n }", "public double intercept() {\r\n return (this.start.getY() - (this.lineSlope() * this.start.getX()));\r\n }", "public double getSlope() {\n if (n < 2) {\n return Double.NaN; //not enough data\n }\n if (Math.abs(sumXX) < 10 * Double.MIN_VALUE) {\n return Double.NaN; //not enough variation in x\n }\n return sumXY / sumXX;\n }", "public static double slope(Point p, Point q){\n\t\tif ((p.x - q.x) == 0 ) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.abs((double)(p.y - q.y)/(double)(p.x - q.x));\n\t}", "public static Double computeSlope( final double x1, final double y1, final double x2, final double y2 ) {\n\t\t// equation: u = ( y2 - y1 )/( x2 - x1 )\n\t\tfinal double rise = ( y2 - y1 );\n\t\tfinal double run = ( x2 - x1 );\n\t\treturn ( run != 0 ) ? rise / run : NaN;\n\t}", "public double lineLenght() {\n\t\tdouble xdif = p1.getX() - p2.getX();\n\t\tdouble ydif = p1.getY() - p2.getY();\n\t\treturn Math.sqrt(xdif*xdif+ydif*ydif);\t\n\t\t\t\n\t}", "private double getSlope( double time )\n throws IllegalArgumentException\n {\n // TODO: Optimize this search by having data set sorted by time\n \n // Search for previously calculated - and saved - slope value\n String timeVariable = getTimeVariable();\n Iterator<DataPoint> it = slopeValues.iterator();\n while ( it.hasNext() )\n {\n DataPoint dp = it.next();\n double dpTimeValue = dp.getIndependentValue( timeVariable );\n if ( Math.abs(time-dpTimeValue) < TOLERANCE )\n return dp.getDependentValue();\n }\n \n // Saved slope not found, so calculate it\n // (and save it for future reference)\n double previousTime = time - getTimeInterval();\n double slope = 0.0;\n \n // Initial condition for first periods\n if ( previousTime < getMinimumTimeValue()+TOLERANCE )\n slope = getObservedValue(time)-getObservedValue(previousTime);\n else\n slope\n = gamma*(forecast(time)-forecast(previousTime))\n + (1-gamma)*getSlope(previousTime);\n \n DataPoint dp = new Observation( slope );\n dp.setIndependentValue( timeVariable, time );\n slopeValues.add( dp );\n \n return slope;\n }", "private double slopeBetweenTwoCircleOrigins(Circle other) {\n double y = origin.getY() - other.origin.getY();\n double x = origin.getX() - other.origin.getX();\n if (x == 0 && y != 0) {\n return Integer.MAX_VALUE;\n }\n return y / x;\n }", "private Point getEndPoint(double slope, int x, int y){\n Point p = new Point();\n int iteration = 0;\n \n return p;\n }", "public static final double calculateIntercept(final double min, final double slope, final double validMin) {\r\n return (min - (slope * validMin));\r\n }", "private double getRegressionSumSquares(double slope) {\n return slope * slope * sumXX;\n }", "private Line linearRegression(ArrayList<Point> points) {\n double sumx = 0.0, sumz = 0.0, sumx2 = 0.0;\n\n for (int i = 0; i < points.size(); i++) {\n Point curPoint = points.get(i);\n sumx += curPoint.x;\n sumz += curPoint.z;\n sumx2 += curPoint.x*curPoint.x;\n }\n\n double xbar = sumx/((double) points.size());\n double zbar = sumz/((double) points.size());\n\n double xxbar = 0.0, xzbar = 0.0;\n\n for (int i = 0; i < points.size(); i++) {\n Point curPoint = points.get(i);\n xxbar += (curPoint.x - xbar) * (curPoint.x - xbar);\n xzbar += (curPoint.x - xbar) * (curPoint.z - zbar);\n }\n\n double slope = xzbar / xxbar;\n double intercept = zbar - slope * xbar;\n\n return new Line(slope, intercept);\n }", "@Override\n public double getSlope() {\n return Double.NaN;\n }", "public void Mirror(Line l)\n\t{\n\t\tif (l == null) return;\n\t\tif (l.point1 == null || l.point2 == null)\n {\n return;\n }\n\t\tint rise = l.point1.y - l.point2.y;\n\t\tint run = l.point1.x - l.point2.x;\n\t\t\n\t\tif (run != 0)\n\t\t{\n\t\t\tint slope = rise/run;\n\n\t\t\tint b = l.point1.y - (slope*l.point1.x);\n\n\t\t\tint d = (l.point1.x + (l.point1.y - b)*slope) / ( 1 + slope*slope);\n\n\t\t\tthis.x = 2*d - this.x;\n\t\t\tthis.y = (2*d*slope - this.y + 2*b);\n\t\t}\n\t\t//handle undefined slope; \n\t\telse\n\t\t{\n\t\t\tthis.x = -(this.x - l.point1.x); \n\t\t}\n\t\t\n\n\t}", "private double[] calculateLineEquation(Point p1, Point p2) {\n double m = ((double) p2.y - p1.y) / (p2.x - p1.x);\n double c = p1.y - (m * p1.x);\n return new double[]{m, c};\n }", "public double getDemandAndSlope$forPrice(double slope, double p)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to getDemandAndSlope$forPrice : \" + \"Agent\");\r\n/* 252 */ return 0.0D;\r\n/* */ }", "public double getSlope(double queryPosition) {\n /*The curve is generated by cos(hillPeakFrequency(x-pi/2)) so the \n * pseudo-derivative is cos(hillPeakFrequency* x) \n */\n return Math.cos(HILL_PEAK_FREQUENCY * queryPosition);\n }", "public double getMaxSlope(Coordinate a, Coordinate b) {\n\t\tdouble maxVertDiff = getMaxDiffVertical(a, b);\n\t\tdouble minHorizDiff = getMinDiffHorizontal(a, b);\n\t\tif (minHorizDiff == 0) {\n\t\t\tminHorizDiff = 0.0000001; //a very small number so we don't have to divide by zero\n\t\t}\n\t\tdouble maxSlope = maxVertDiff / minHorizDiff;\n\t\tSystem.out.println(a+\", \"+b+\", \"+maxSlope);\n\t\treturn maxSlope;\n\t}", "public static Double computeYIntercept( final double x, final double y, final Double slope ) {\n\t\treturn slope.equals( NaN ) ? slope : y - ( slope * x );\n\t}", "public double distancePointLine(Point2D PV, Point2D LV1, Point2D LV2) {\n\t\t\t\t\t\t\t\t\t\t\n\t Point2D slope = new Point2D (LV2.x() - LV1.x(), LV2.y() - LV1.y());\t\t\t\t// slope of line\n\t double lineLengthi = slope.x() * slope.x() + slope.y() * slope.y(); \t\t// squared length of line;\n\n\t Point2D s = new Point2D(PV.x() - LV1.x(), PV.y() - LV1.y());\n\t\tdouble ti = (s.x()* slope.x()+ s.y()*slope.y())/lineLengthi;\n\t\tPoint2D p = new Point2D(slope.x() * ti, slope.y() * ti);\t\t\t\t\t\t// crawl the line acoording to its slope to distance t\n\t\tPoint2D projectionOnLine = new Point2D(LV1.x()+p.x(), LV1.y()+p.y());\t\t\t// add the starting coordinates\t\t\t\n\t\tPoint2D subber = new Point2D(projectionOnLine.x()- PV.x(), projectionOnLine.y()- PV.y()); // now calculate the distance of the measuring point to the projected point on the line\n\t\tdouble dist = (float) Math.sqrt(subber.x() * subber.x() + subber.y() * subber.y());\n\t\treturn dist;\n\t}", "public double getSlope(double queryPosition){\n\t\treturn Math.cos(hillPeakFrequency*queryPosition);\n\t}", "public static void main(String[] args) {\n // Create a scanner object \n Scanner input = new Scanner(System.in);\n \n // Prompt the user to enter the coordinates for 2 points \n System.out.print(\"Enter the coordinates for two points: \");\n double x1 = input.nextDouble();\n double y1 = input.nextDouble();\n double x2 = input.nextDouble();\n double y2 = input.nextDouble();\n \n// Background calculation for slope m and vertical intercept b\n double m = (y1-y2)/(x1-x2);\n double b = y1-m*x1;\n\n// Display the results\n if (m==1 && b==0)\n System.out.println(\"The line equation for two points (\"+x1+\", \"+y1+\") and (\"+x2+\", \"+y2+\") is y = x\");\n if (m==1 && b!=0)\n System.out.println(\"The line equation for two points (\"+x1+\", \"+y1+\") and (\"+x2+\", \"+y2+\") is y = x+\"+ b+\"\");\n if (m!=1 && b==0)\n System.out.println(\"The line equation for two points (\"+x1+\", \"+y1+\") and (\"+x2+\", \"+y2+\") is y = \"+ m +\"x\");\n if (m!=1 && b!=0)\n System.out.println(\"The line equation for two points (\"+x1+\", \"+y1+\") and (\"+x2+\", \"+y2+\") is y = \"+ m +\"x+\"+ b+\"\");\n }", "public Comparator<Point> slopeOrder()\n {\n return new Comparator<Point>()\n {\n @Override\n public int compare(Point o1, Point o2)\n {\n if (slopeTo(o1) < slopeTo(o2)) return -1;\n else if (slopeTo(o1) == slopeTo(o2)) return 0;\n else return 1;\n }\n };\n }", "private int slopeCompare(Pair oldp, Pair newp){\n\t\tif(oldp.getFirst().slopeTo(oldp.getSecond()) == newp.getFirst().slopeTo(newp.getSecond())){\n\t\t\tComparator<Point> cmp = oldp.getFirst().slopeOrder();\n\t\t\tif(newp.getFirst().compareTo(oldp.getFirst()) == 0 || newp.getSecond().compareTo(oldp.getSecond()) == 0 || cmp.compare(newp.getFirst(),newp.getSecond()) == 0){\n\t\t\t\tif(newp.getFirst().compareTo(oldp.getFirst()) <= 0 && newp.getSecond().compareTo(oldp.getSecond()) >= 0){\n\t\t\t\t\treturn 1;\t\t\n\t\t\t\t}\n\t\t\treturn 0;\t\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public Vector2d getLineNormal(Line2d line)\n\t{\n\n\t\tthis.color = Color.BLACK;\n\t\t\n\n//\t\tDraw2DApplet da = new Draw2DApplet(this);\n//\t\tthis.display();\n\n\t\tVector2d dir = new Vector2d(line.getDirection());\n\t\tVector2d nDir = new Vector2d(-dir.y, dir.x);\n\t\tVector2d negDir = new Vector2d();\n\t\tnegDir.negate(nDir);\n\t\tVector2d sc = new Vector2d(nDir);\n\t\tsc.scale(20. * GeometryConstants.EPSILON);\n\t\tfinal Point2d mp = line.pointOnLine(line.getLength()/2);\n\t\tmp.add(sc);\n\t\tList points = getPoints();\n\t\tfinal int n = points.size();\n\t\tfinal double[] xp = new double[n];\n\t\tfinal double[] yp = new double[n];\n//\t\tSystem.out.println(\">>>>>>>>>> mpoint is: \" + mp);\n\t\tfor(int i = 0; i < n; i++) \n\t\t{\n\t\t\tPoint2d point = (Point2d) points.get(i);\n\t\t\txp[i] = point.x;\n\t\t\typ[i] = point.y;\n//\t\t\tSystem.out.println(\"-------------- point\" + i + \" is: \" + xp[i] + \", \" + yp[i]);\n\t\t}\n/*\t\tViewObject vo = new ViewObject () {\n\t\t\tpublic LinkedList getDrawList () {\n\t\t\t\tLinkedList list = new LinkedList(); \n\t\t\t\tfor (int i = 0; i <n-1; i++) {\n\t\t\t\t\tlist.add(new Line2D.Double (xp[i], yp[i], xp[i+1], yp[i+1]));\n\t\t\t\t}\n\t\t\t\tlist.add (new Ellipse2D.Double(mp.x, mp.y, mp.x+0.2, mp.y+0.2));\n\t\t\t\treturn list;\n\t\t\t}\n\t\t};\n\t\tvo.setApplet (new Draw2DApplet(vo));\n\t\tvo.display();*/\n\t\t try {\n\t\t\treturn Polygon2d.isPointInside(xp, yp, mp.x, mp.y)? negDir: nDir;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} \n\t}", "public Line(String equation)\r\n\t{\r\n\t\tint i;\r\n\t\tString string = \"\";\r\n\t\t\r\n\t\t// Skip everything before '='\r\n\t\tfor(i = 0; equation.charAt(i) != '='; i++)\r\n\t\t{\r\n\t\t\t;\r\n\t\t}\r\n\t\t\r\n\t\t// Skip '='\r\n\t\ti++;\r\n\t\t\r\n\t\t// Everything after '=' and before 'x' is the slope\r\n\t\t// Skip all white spaces\r\n\t\tfor(;equation.charAt(i) != 'x';i++)\r\n\t\t{\r\n\t\t\tif(equation.charAt(i) == ' ')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstring += equation.charAt(i);\r\n\t\t}\r\n\t\t\r\n\t\t// If there was nothing between '=' and 'x' then the slope is 1\r\n\t\tif(string.isEmpty())\r\n\t\t{\r\n\t\t\tstring = \"1\";\r\n\t\t}\r\n\t\t\r\n\t\t// Convert String to a double\r\n\t\tslope = Double.parseDouble(string);\r\n\t\t\r\n\t\t// Skip the 'x' and reset 'string'\r\n\t\ti++;\r\n\t\tstring = \"\";\r\n\t\t\r\n\t\t// Everything after the 'x' is the intercept with y axis\r\n\t\tfor(; i < equation.length();i++)\r\n\t\t{\r\n\t\t\tif(equation.charAt(i) == ' ')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tstring += equation.charAt(i);\r\n\t\t}\r\n\t\t\r\n\t\t// If there is no intercept, it means that the intercept is 0\r\n\t\tif(string.isEmpty())\r\n\t\t{\r\n\t\t\tstring = \"0\";\r\n\t\t}\r\n\t\t\r\n\t\tintercept = Double.parseDouble(string);\r\n\t}", "private void drawLine(Graphics g, int x1, int y1, int x2, int y2) {\n int d = 0;\n\n int dx = Math.abs(x2 - x1);\n int dy = Math.abs(y2 - y1);\n\n int dx2 = 2 * dx; // slope scaling factors to\n int dy2 = 2 * dy; // avoid floating point\n\n int ix = x1 < x2 ? 1 : -1; // increment direction\n int iy = y1 < y2 ? 1 : -1;\n\n int x = x1;\n int y = y1;\n\n if (dx >= dy) {\n while (true) {\n plot(g, x, y);\n if (x == x2)\n break;\n x += ix;\n d += dy2;\n if (d > dx) {\n y += iy;\n d -= dx2;\n }\n }\n } else {\n while (true) {\n plot(g, x, y);\n if (y == y2)\n break;\n y += iy;\n d += dx2;\n if (d > dy) {\n x += ix;\n d -= dy2;\n }\n }\n }\n }", "public void setSlopeLength(float slopeLength) {\n\t\tthis.slopeLength = slopeLength;\n\t}", "public double getSlopeConfidenceInterval() throws MathException {\n return getSlopeConfidenceInterval(0.05d);\n }", "public void rasterizeLine (int x0, int y0, int x1, int y1)\n {\n \tfloat dX = (x1 - x0);\n \tfloat dY = (y1 - y0);\n \tfloat m = (dY / dX);\t//slope\n \tint x = x0;\n \tfloat y = y0;\n \t\n \twhile(x < x1)\n \t{\n \t\traster.setPixel(x, Math.round(y), new int[]{255, 50, 100});\n \t\tx += 1;\n \t\ty += m;\n \t}\n }", "public double pointOnLineT(int x, int y)\r\n {\r\n if (x == c0.x && y == c0.y)\r\n {\r\n return 0;\r\n }\r\n if (x == c1.x && y == c1.y)\r\n {\r\n return 1;\r\n }\r\n \r\n int dx = c1.x - c0.x;\r\n int dy = c1.y - c0.y;\r\n \r\n if (Math.abs(dx) > Math.abs(dy))\r\n {\r\n return (x - c0.x) / (double)dx;\r\n }\r\n else\r\n {\r\n return (y - c0.y) / (double)dy;\r\n }\r\n }", "public int getPointLine(float yPos){\n int r = (int)yPos / getLineHeight();\n return r < 0 ? 0 : r;\n }", "public double getAcuteAngle( final LineXY line ) {\n\t\t// get the intersection point\n\t\tfinal PointXY p1 = PointXY.getIntersectionPoint( this, line );\n\t\tif( p1 == null ) {\n\t\t\tthrow new IllegalArgumentException( format( \"No intersection found\" ) );\n\t\t}\n\t\t\n\t\t// get the points of both lines\n\t\tfinal PointXY pa1 = this.getBeginPoint();\n\t\tfinal PointXY pa2 = this.getEndPoint();\n\t\tfinal PointXY pb1 = line.getBeginPoint();\n\t\tfinal PointXY pb2 = line.getEndPoint();\n\t\t\n\t\tfinal PointXY p2 = PointXY.getFarthestPoint( p1, pa1, pa2 );\n\t\tfinal PointXY p3 = PointXY.getFarthestPoint( p1, pb1, pb2 );\n\t\t\n\t\t// are both lines orthogonal?\n\t\tif( this.isOrthogonal() && line.isOrthogonal() ) {\n\t\t\treturn this.isParallelTo( line ) ? 0 : Math.PI;\n\t\t}\n\t\t\n\t\t// is the either line orthogonal?\n\t\telse if( this.isOrthogonal() || line.isOrthogonal() ) {\n\t\t\t// cos t = ( -a^2 + b^2 - c^2 ) / 2cb \n\t\t\tfinal double a = getDistance( p1, p2 );\n\t\t\tfinal double b = getDistance( p1, p3 );\n\t\t\tfinal double c = getDistance( p2, p3 );;\n\t\t\treturn acos( ( -pow(a, 2d) + pow(b, 2d) - pow(c, 2d) ) / ( 2d * c * b ) );\n\t\t}\n\t\t\n\t\t// both must be angular\n\t\telse {\n\t\t\t// tan t = ( m1 - m2 ) / ( 1 + m1 * m2 ); where m2 > m1\n\t\t\tdouble m1 = this.getSlope();\n\t\t\tdouble m2 = line.getSlope();\n\t\t\tif( m1 > m2 ) {\n\t\t\t\tfinal double mt = m1;\n\t\t\t\tm1 = m2;\n\t\t\t\tm2 = mt;\n\t\t\t}\n\t\t\t\n\t\t\t// compute the angle\n\t\t\treturn atan( ( m1 - m2 ) / ( 1 + m1 * m2 ) );\n\t\t}\n\t}", "public int calculateLineLength() {\n\t\tdouble x1 = pointOne.getxCoordinate();\n\t\tdouble y1 = pointOne.getyCoordinate();\n\n\t\t// storing pointTwo coordinates in x2 and y2\n\t\tdouble x2 = pointTwo.getxCoordinate();\n\t\tdouble y2 = pointTwo.getyCoordinate();\n\n\t\t// computing length\n\t\tint length = (int) Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n\t\treturn length;\n\t}", "public double predict(double x) {\n double b1 = getSlope();\n return getIntercept(b1) + b1 * x;\n }", "public Point2D.Double\ngetLineIntersectPoint(BLine2D line)\n{\n\treturn (getSegmentIntersectPoint(line));\n}", "public double getIntercept() {\n return getIntercept(getSlope());\n }", "public static void main(String[] args)\n {\n Point p1 = new Point(10, 0);\n Point p2 = new Point(0, 10);\n Point p3 = new Point(3, 7);\n Point p4 = new Point(7, 3);\n Point p5 = new Point(20, 21);\n Point p6 = new Point(3, 4);\n Point p7 = new Point(14, 15);\n Point p8 = new Point(6, 7);\n\n Point[] arr = new Point[8];\n arr[0] = p1;\n arr[1] = p2;\n arr[2] = p3;\n arr[3] = p4;\n arr[4] = p5;\n arr[5] = p6;\n arr[6] = p7;\n arr[7] = p8;\n\n System.out.println(\"Before sorting:\");\n for (Point i : arr)\n {\n System.out.println(i.toString());\n }\n\n Arrays.sort(arr, p1.slopeOrder());\n\n System.out.println(\"After sorting:\");\n for (Point i : arr)\n {\n System.out.println(i.toString());\n }\n\n double[] slopes = new double[8];\n Point pt = p1;\n slopes[0] = pt.slopeTo(p2);\n slopes[1] = pt.slopeTo(p3);\n slopes[2] = pt.slopeTo(p4);\n slopes[3] = pt.slopeTo(p5);\n slopes[4] = pt.slopeTo(p6);\n slopes[5] = pt.slopeTo(p7);\n slopes[6] = pt.slopeTo(p8);\n\n System.out.println(\"Slope values, initial:\");\n for (double d : slopes)\n {\n System.out.println(d);\n }\n\n for (int i = 0; i < 8; ++i)\n {\n slopes[i] = pt.slopeTo(arr[i]);\n }\n\n System.out.println(\"Slope values, final:\");\n for (double d : slopes)\n {\n System.out.println(d);\n }\n }", "private void linearFunction(Graphics g, double x0, double y0, double x1, double y1) {\n //abriviaciones para las funciones\n double dx = x1 - x0;\n double dy = y1 - y0;\n\n if (Math.abs(dx) > Math.abs(dy)) {\n double m = dy / dx;\n double b = y0 - m * x0;\n if (dx < 0) {\n dx = -1;\n } else {\n dx = 1;\n }\n\n while (x0 != x1) {\n x0 += dx;\n y0 = Math.round(m * x0 + b);\n g.drawLine((int) coord_x(x0), (int) coord_y(y0), (int) coord_x(x0), (int) coord_y(y0));\n }\n } else {\n if (dy != 0) {\n double m = dx / dy;\n double b = x0 - m * y0;\n if (dy < 0) {\n dy = -1;\n } else {\n dy = 1;\n }\n while (y0 != y1) {\n y0 += dy;\n x0 = Math.round(m * y0 + b);\n g.drawLine((int) coord_x(x0), (int) coord_y(y0), (int) coord_x(x0), (int) coord_y(y0));\n }\n }\n }\n }", "public Line regress() {\n if(!dirty) return lastResult;\n\n int n = fixedList.getSize();\n if (n == 0) {\n throw new IllegalStateException(\"No sample was added to this calculator\");\n }\n\n double sumx=0, sumy=0, sumxx=0, sumxy=0;\n for (int i = 0; i < n; i++) {\n Point2D cv = fixedList.get(i);\n double x = cv.getX();\n double y = cv.getY();\n sumx += x;\n sumy += y;\n sumxx += x*x;\n sumxy += x*y;\n }\n\n double sxx = sumxx-(sumx*sumx/n);\n double sxy = sumxy-(sumx*sumy/n);\n if(sxx==0) return lastResult;\n\n double b = sxy/sxx;\n double a = (sumy-(b*sumx))/n;\n\n lastResult = new Line(a,b);\n return lastResult;\n }", "private Double distanceToLine(Vector v, PointD p)\r\n\t{\r\n\t\tPointD nearestPoint = getNearestPointOnLine(v,p);\t\t\r\n\t\t\r\n\t\tdouble x1 = nearestPoint.getX();\r\n\t\tdouble y1 = nearestPoint.getY();\r\n\t\t\r\n\t\tdouble t;\r\n\t\tif(v.getX()>v.getY())//if one component is close to zero, use other one\r\n\t\t\tt = (x1 - v.getTail().getX()) / v.getX();\r\n\t\telse\r\n\t\t\tt = (y1 - v.getTail().getY()) / v.getY();\r\n\t\t\r\n\t\tif(t < 0 || t > 1)//then calculated point is not in line segment\r\n\t\t\treturn null;\r\n\t\t\r\n\t\treturn Math.sqrt((p.getX() - x1)*(p.getX() - x1) + (p.getY() - y1)*(p.getY() - y1));\r\n\t}", "public static double CalcLevel_Lin(double SlopeStart, double SlopeStop,double FreqPoint)\r\n {\n double levelLin = 0.0;\r\n double tempY = 0.0;\r\n\r\n tempY = SlopeStart * FreqPoint + SlopeStop;\r\n levelLin = (Math.pow(10, tempY));\r\n\r\n return levelLin;\r\n }", "@Override\r\n\t\tpublic double getDx() {\n\t\t\treturn(Math.pow(this.a+this.h, 2)-Math.pow(this.a, 2))/h;\r\n\t\t}", "public void setLine(int x1, int y1, int x2, int y2){\n\t\tint slope = 0;\n\t\tboolean vert = true;\n\t\t\n\t\tif((x2 - x1) != 0){\n\t\t\tslope = (y2 - y1) / (x2 - x1);\n\t\t\tvert = false;\n\t\t}\n\t\tif(!vert){\n\t\t\tfor(int a = 0; a < Math.abs(x2 - x1) + 1; a++){\n\t\t\t\tif(a >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tif((x2 - x1) < 0){\n\t\t\t\t\tpathX[a] = x1 - a;\n\t\t\t\t\tpathY[a] = y1 - (a * slope);\n\t\t\t\t}\n\t\t\t\telse if((x2 - x1) > 0){\n\t\t\t\t\tpathX[a] = x1 + a;\n\t\t\t\t\tpathY[a] = y1 + (a * slope);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(vert && (y2 - y1) < 0){\n\t\t\tfor(int b = 0; b < Math.abs(y2 - y1) + 1; b++){\n\t\t\t\tif(b >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tpathX[b] = x1;\n\t\t\t\tpathY[b] = y1 - b;\n\t\t\t}\n\t\t}\n\t\telse if(vert && (y2 - y1) > 0){\n\t\t\tfor(int b = 0; b < Math.abs(y2 - y1) + 1; b++){ \n\t\t\t\tif(b >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tpathX[b] = x1;\n\t\t\t\tpathY[b] = y1 + b;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn;\n\t\t\n\t}", "public boolean line(float x0, float y0, float x1, float y1)\r\n/* 355: */ {\r\n/* 356:412 */ float dx = Math.abs(x1 - x0);\r\n/* 357:413 */ float dy = Math.abs(y1 - y0);\r\n/* 358: */ int sx;\r\n/* 359: */ int sx;\r\n/* 360:416 */ if (x0 < x1) {\r\n/* 361:418 */ sx = 1;\r\n/* 362: */ } else {\r\n/* 363:421 */ sx = -1;\r\n/* 364: */ }\r\n/* 365: */ int sy;\r\n/* 366: */ int sy;\r\n/* 367:423 */ if (y0 < y1) {\r\n/* 368:425 */ sy = 1;\r\n/* 369: */ } else {\r\n/* 370:429 */ sy = -1;\r\n/* 371: */ }\r\n/* 372:431 */ float err = dx - dy;\r\n/* 373:432 */ boolean line = true;\r\n/* 374:433 */ while (line)\r\n/* 375: */ {\r\n/* 376:435 */ float e2 = 2.0F * err;\r\n/* 377:437 */ if (e2 > -dy)\r\n/* 378: */ {\r\n/* 379:439 */ err -= dy;\r\n/* 380:440 */ x0 += sx;\r\n/* 381: */ }\r\n/* 382:442 */ if (e2 < dx)\r\n/* 383: */ {\r\n/* 384:444 */ err += dx;\r\n/* 385:445 */ y0 += sy;\r\n/* 386: */ }\r\n/* 387:448 */ line = tileWalkable(x0, y0);\r\n/* 388:451 */ if ((x0 == x1) && (y0 == y1)) {\r\n/* 389: */ break;\r\n/* 390: */ }\r\n/* 391:457 */ if (getAgentOnTile(x0, y0) != null) {\r\n/* 392:459 */ line = false;\r\n/* 393: */ }\r\n/* 394: */ }\r\n/* 395:465 */ return line;\r\n/* 396: */ }", "public final native Line x(double d) /*-{\r\n\t\treturn this.x(d);\r\n }-*/;", "private double closestDistanceFromPointToEndlessLine(Vector point, Vector startSegment, Vector endSegment) {\n\t\t// Generate a line out of two points.\n\t\tRay3D gerade = geradeAusPunkten(startSegment, endSegment);\n\t\tVector direction = gerade.getDirection();\n\t\tdouble directionNorm = direction.getNorm();\n\t\t// d(PunktA, (line[B, directionU]) = (B-A) cross directionU durch norm u\n\t\tVector b = gerade.getPoint();\n\t\tVector ba = b.subtract(point);\n\t\tdouble factor = 1.0 / directionNorm; // Geteilt durch geraden länge\n\t\tVector distance = ba.cross(direction).multiply(factor);\n\t\tdouble distanceToGerade = distance.getNorm();\n\t\treturn distanceToGerade;\n\t}", "public double tanSlope(double x) {\n this.tanSlope(x);\n return this.tanslope;\n }", "public double tanSlope(double x) {\n double temp1, temp2, temp3;\n temp1 = this.a * this.b;\n temp2 = this.b * x + this.c;\n temp3 = Math.pow(1.0 / (Math.cos(temp2)), 2);\n this.tanslope = temp1 * temp3;\n return this.tanslope;\n\n }", "public static float PointDistanceToLine(final Point point, final Point lineStart, final Point lineEnd) {\n Vector rotated = VectorTurnedLeft(Vector(lineStart, lineEnd).normal());\n Vector base = Vector(point, lineStart);\n return abs(dotProduct(base, rotated));\n }", "public double subTanSlope(double x) {\n this.subDif();\n this.subtanslope = this.das * x * x + this.dbs * x + this.dcs;\n return this.subtanslope;\n\n }", "public double sumXYs() {\n double $ = 0;\n for (int ¢ = 0; ¢ < yVals.size(); ++¢)\n $ += unbox(cantBeNull(xVals.get(¢))) * unbox(cantBeNull(yVals.get(¢)));\n return $;\n }\n\n // calculate the linear regression\n public LinearLine calcLinearRegression() {\n double $;\n final double n = xVals.size();\n final double a = (n * sumXYs() - sumXs() * sumYs()) / (n * sumXXs() - sumXs() * sumXs());\n $ = 1 / n * sumYs() - a / n * sumXs();\n return new LinearLine(a, $);\n }", "public double[] LogSlope(double StartFreq, double StopFreq, double StartLevel, double StopLevel)\r\n {\n \r\n\tdouble levelM1 = 0.0;\r\n double levelB1 = 0.0;\r\n double levelFlag = 0.0;\r\n double[] logSLopeCalcValues = new double[7];\r\n\r\n //calculate M1 value\r\n // M1 = (Y2 - Y1) / (X2- X1)\r\n levelM1 = (Math.log10(StopLevel) - Math.log10(StartLevel)) / (Math.log10(StopFreq) - Math.log10(StartFreq));\r\n\r\n //calculate B1 value\r\n // B1 = Y2 -(M1 * X2)\r\n levelB1 = Math.log10(StopLevel) - (levelM1 * Math.log10(StopFreq));\r\n\r\n // put the values in the array to return it\r\n logSLopeCalcValues[0] = levelM1;\r\n logSLopeCalcValues[1] = levelB1;\r\n logSLopeCalcValues[2] = StartFreq;\r\n logSLopeCalcValues[3] = StopFreq;\r\n logSLopeCalcValues[4] = StartLevel;\r\n logSLopeCalcValues[5] = StopLevel;\r\n logSLopeCalcValues[6] = levelFlag;\r\n //return the array with the M1 and B1 values\r\n return logSLopeCalcValues;\r\n }", "public static final double calculateSlope(final double max, final double min, final double validMax,\r\n final double validMin) {\r\n\r\n if ( (validMax - validMin) != 0) {\r\n return (max - min) / (validMax - validMin);\r\n }\r\n\r\n return 1.0;\r\n }", "public PointRelation pointLineRelation(Coordinates point, Coordinates linePointA, Coordinates linePointB);", "@Override\n public double dydx(double t) {\n \tt = t / 141;\n \treturn (12 + 324 * t + -360 * Math.pow(t, 2))/ (294 + -930 * t + 873 * Math.pow(t, 2));\n }", "static double calculateAngle(Line2D line, ArrowEnd end) {\n \t\t// Translate the line to 0,0\n \t\tdouble x1 = line.getX1();\n \t\tdouble y1 = line.getY1();\n \t\tdouble x2 = line.getX2();\n \t\tdouble y2 = line.getY2();\n \t\tdouble opposite = y2-y1;\n \t\tdouble adjacent = x2-x1;\n \n \t\tdouble radians = Math.atan(opposite/adjacent);\n \n \t\tif (adjacent < 0) radians += Math.PI;\n \n \t\t// TODO: Flip for other end\n \t\treturn radians;\n \t}", "public abstract void lineTo(double x, double y);", "public double getSlopeStdErr() {\n return Math.sqrt(getMeanSquareError() / sumXX);\n }", "@Test\n\tpublic void lineGetDistanceTest() {\n\t\tDouble distanceOfFirstLine = Math.sqrt((10 - 0) * (10 - 0) + (10 - 0) * (10 - 0));\n\n\t\tassertEquals(distanceOfFirstLine, firstLine.getDistance(), .0001d);\n\t\tassertNotEquals(Math.sqrt(2 * distanceOfFirstLine),\n\t\t\t\tfirstLine.getDistance(), .0001d);\n\t}", "Line(Dot StartDot,Dot EndDot,int index){\n \tthis.StartDot = StartDot;\n \tthis.EndDot = EndDot;\n \tthis.sx = StartDot.getX();\n \tthis.sy = StartDot.getY();\n \tthis.ex = EndDot.getX();\n \tthis.ey = EndDot.getY();\n \tthis.Angle = Math.atan2((ey - sy),(ex - sx)); \n// \tif((ey - sy) > 0 && (ex - sx) < 0) Angle += Math.PI;\n// \tif((ey - sy) < 0 && (ex - sx) < 0) Angle += Math.PI;\n// \tif((ey - sy) < 0 && (ex - sx) > 0) Angle += Math.PI * 2;\n// \tif((ex-sx) < 0) Angle += Math.PI;\n// \tif((ex - sx) > 0 && (ey - sy) < 0) Angle += Math.PI * 2;\n \tif(Angle < 0) Angle += Math.PI * 2;\n \tthis.rightPoly = null;\n \tthis.leftPoly = null;\n \tthis.index = index;\n }", "@Override\n\tpublic double[] getDx() {\n\t double object[] = new double[2];\n\t for(int i = 0; i < x.length; i++){\n\t object[0] += theta[0] + theta[1] * x[i] - y[i];\n\t object[1] += (theta[0] + theta[1] * x[i] - y[i])*x[i];\n\t }\n\t theta[0] -= eta * object[0];\n\t theta[1] -= eta * object[1];\n\n\t return theta;\n }", "public float getIntersection(Line2D.Float line) {\n // The intersection point I, of two vectors, A1->A2 and\n // B1->B2, is:\n // I = A1 + Ua * (A2 - A1)\n // I = B1 + Ub * (B2 - B1)\n //\n // Solving for Ua gives us the following formula.\n // Ua is returned.\n float denominator = (line.y2 - line.y1) * (x2 - x1) -\n (line.x2 - line.x1) * (y2 - y1);\n\n // check if the two lines are parallel\n if (denominator == 0) {\n return -1;\n }\n\n float numerator = (line.x2 - line.x1) * (y1 - line.y1) -\n (line.y2 - line.y1) * (x1 - line.x1);\n\n return numerator / denominator;\n }", "public void computeLine ()\r\n {\r\n line = new BasicLine();\r\n\r\n for (GlyphSection section : glyph.getMembers()) {\r\n StickSection ss = (StickSection) section;\r\n line.includeLine(ss.getLine());\r\n }\r\n\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\r\n line + \" pointNb=\" + line.getNumberOfPoints() +\r\n \" meanDistance=\" + (float) line.getMeanDistance());\r\n }\r\n }", "public Line perpendicularLine(){\n\t\tLine perpendicularLine = new Line();\n\t\tint pa,pb,pc;\n\t\tpa = getQ().x - getP().x;\n\t\tpb = getQ().y - getP().y;\n\t\tpc = (getP().x * (getP().x - getQ().x)) +(getP().y * (getP().y - getQ().y));\n\t\tperpendicularLine.setA(pa);\n\t\tperpendicularLine.setB(pb);\n\t\tperpendicularLine.setC(pc);\n\t\tperpendicularLine.setP(new Point(0,0));\n\t\tperpendicularLine.setQ(new Point(0,0));\n\t\treturn perpendicularLine;\n\t}", "public static void main(String[] args) {\n \n Scanner readObject = new Scanner(System.in);\n double X1, X2, Y1, Y2;\n \n System.out.print(\"Enter Point X1\"); //prompt the user to enter Coordinate X1\n X1 = readObject.nextDouble(); // \n System.out.print(\"Enter Point X2 \"); //prompt the user to enter Coordinate X2\n X2 = readObject.nextDouble();\n System.out.print(\"Enter Point Y1 \");\n Y1 = readObject.nextDouble(); // prompt the user to enter Coordinate Y1\n System.out.print(\"Enter Point Y2 \");\n Y2 = readObject.nextDouble(); // prompt the user to enter Coordinate Y2\n double DistanceBetweenPointX = X2 -X1 ; // Determine the distance between point X\n double DistanceBetweenPointY = Y2-Y1; // Determine the distance between point Y\n double Slope = (DistanceBetweenPointY / DistanceBetweenPointX);\n System.out.println(\" Point A on a coordinate plane is (\" + X1 + \",\" + Y1 + \"). Point B on a coordinate plane is (\" + X2 + \",\" + Y2 + \").\");\n System.out.println( \"The distance between point A and B is (\" + DistanceBetweenPointX + \", \" + DistanceBetweenPointY+ \").\");\n System.out.println(\"The slope of the line is (\" + Slope + \").\");\n \n \n }", "public double constrainDemand(double slope, double trialprice)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to constrainDemand : \" + \"Agent\");\r\n/* 175 */ if (this.demand > 0.0D) {\r\n/* 176 */ if (this.demand * trialprice > this.cash - this.mincash)\r\n/* */ {\r\n/* 178 */ if (this.cash - this.mincash > 0.0D) {\r\n/* 179 */ this.demand = ((this.cash - this.mincash) / trialprice);\r\n/* 180 */ slope = -this.demand / trialprice;\r\n/* */ }\r\n/* */ else\r\n/* */ {\r\n/* 184 */ this.demand = 0.0D;\r\n/* 185 */ slope = 0.0D;\r\n/* */ }\r\n/* */ \r\n/* */ }\r\n/* */ \r\n/* */ \r\n/* */ }\r\n/* 192 */ else if ((this.demand < 0.0D) && (this.demand + this.position < this.minholding))\r\n/* */ {\r\n/* */ \r\n/* 195 */ this.demand = (this.minholding - this.position);\r\n/* 196 */ slope = 0.0D;\r\n/* */ }\r\n/* */ \r\n/* */ \r\n/* 200 */ return this.demand;\r\n/* */ }", "private double lineLength(Point A, Point B) {\n\t\t// Square the coordinate pairs.\n\t\tdouble xDiff = Math.pow((A.x - B.x), 2);\n\t\tdouble yDiff = Math.pow((A.y - B.y), 2);\n\t\t\n\t\t// Root the sum of the differences.\n\t\treturn Math.sqrt(xDiff + yDiff);\n\t}", "public Activation_Linear_Range_0_1(VDouble slope, VDouble c) {\r\n this.slope = slope;\r\n this.c = c;\r\n }", "private void calcDVOWDNa(\n final Line line1,\n final Line line2,\n final Point point1,\n final Point point2) {\n\n\n double average_x = (point1.x + point2.x) / 2.0;\n\n this.p1 = new Point(\n (point1.x + average_x) / 2.0,\n line1.a * (point1.x + average_x) / 2.0 + line1.b);\n\n this.p3 = new Point(\n (point2.x + average_x) / 2.0,\n line2.a * (point2.x + average_x) / 2.0 + line2.b);\n\n Line median = Line.fromPoints(p1, p3);\n this.p2 = new Point(average_x, median.eval(average_x));\n\n assert p3.y <= Math.max(point2.y, point1.y);\n assert p1.y <= Math.max(point2.y, point1.y);\n assert p3.y >= Math.min(point2.y, point1.y);\n assert p1.y >= Math.min(point2.y, point1.y);\n\n this.type = Type.bernstein;\n this.p0 = new Point(point1);\n this.p4 = new Point(point2);\n\n //return(f);\n }", "public double estimate_error(Point point, Line model)\n {\n double y = model.a * point.getX() + model.b;\n return (Math.abs(point.getY() - y) / Math.sqrt(1 + model.a * model.a));\n }", "public double addTanSlope(double x) {\n this.addDif();\n this.addtanslope = this.daa * x * x + this.dba * x + this.dca;\n return this.addtanslope;\n\n }", "public Vector2 intersect(Line line)\n {\n // find coefficients (a,b,c) of line1\n float a = direction.y;\n float b = -direction.x;\n float c = direction.y * point.x - direction.x * point.y;\n\n // find coefficients (d,e,f) of line2\n float d = line.getDirection().y;\n float e = -line.getDirection().x;\n float f = line.getDirection().y * line.getPoint().x - line.getDirection().x * line.getPoint().y;\n\n // find determinant: ae - bd\n float determinant = a * e - b * d;\n\n // find the intersect point (x,y) if det != 0\n // if det=0, return a Vector2 with Float.NaN\n Vector2 intersectPoint = new Vector2(Float.NaN, Float.NaN); // default point with NAN\n if(determinant != 0)\n {\n intersectPoint.x = (c * e - b * f) / determinant;\n intersectPoint.y = (a * f - c * d) / determinant;\n }\n\n // return the intersected point\n return intersectPoint;\n }", "public int getLineWidth() {\n return (int) mPaintLine.getStrokeWidth();\n }", "public ChartPointLin(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public static void renderSlopeYPos(RenderBlocks renderBlocks, int slope, double x, double y, double z, Icon icon)\r\n\t{\r\n\t\tdouble uMin = icon.getInterpolatedU(renderBlocks.renderMinX * 16.0D);\r\n\t\tdouble uMax = icon.getInterpolatedU(renderBlocks.renderMaxX * 16.0D);\r\n\t\tdouble vMin = icon.getInterpolatedV(renderBlocks.renderMinZ * 16.0D);\r\n\t\tdouble vMax = icon.getInterpolatedV(renderBlocks.renderMaxZ * 16.0D);\r\n\t\tdouble uMid = uMax - ((uMax - uMin) / 2);\r\n\t\tdouble vTemp = vMin;\r\n\r\n\t\t// Flip if easterly slope\r\n\t\tif ((slope > 27 && slope < 32) || (slope > 39 && slope < 44)) {\r\n\t\t\tvMin = vMax;\r\n\t\t\tvMax = vTemp;\r\n\t\t}\r\n\t\t\r\n double xMin = x + renderBlocks.renderMinX;\r\n double xMax = x + renderBlocks.renderMaxX;\r\n double yMin = y + renderBlocks.renderMinY;\r\n double yMax = y + renderBlocks.renderMaxY;\r\n double zMin = z + renderBlocks.renderMinZ;\r\n double zMax = z + renderBlocks.renderMaxZ;\r\n\t\t\r\n\t\tswitch (slope) {\r\n\t\t\tcase Slope.EXT_POS_OBL_NE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMax, uMid, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMin, vMin, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, vMin, 3);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.EXT_POS_OBL_NW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMax, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMid, vMin, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, vMax, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, vMax, 2);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.EXT_POS_OBL_SE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMax, uMin, vMin, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMax, uMin, vMin, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMax, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMid, vMax, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.EXT_POS_OBL_SW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMax, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMax, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMid, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMin, vMax, 3);\r\n\t\t\t\tbreak;\t\t\t\t\r\n\t\t\tcase Slope.INT_POS_OBL_NE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMid, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMax, vMax, 3);\r\n\t\t\t\tbreak;\t\t\t\t\r\n\t\t\tcase Slope.INT_POS_OBL_NW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMax, uMax, vMin, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMax, uMax, vMin, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMid, vMax, 3);\r\n\t\t\t\tbreak;\t\t\t\t\r\n\t\t\tcase Slope.INT_POS_OBL_SE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMax, uMin, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMid, vMin, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 2);\r\n\t\t\t\tbreak;\t\t\t\t\r\n\t\t\tcase Slope.INT_POS_OBL_SW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMax, uMid, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMax, vMin, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMin, vMin, 3);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMin, vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\t/*\r\n\t\t\tdefault:\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMax, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMax, vMin, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMin, vMax, 3);\r\n\t\t\t\t*/\r\n\t}", "static PointDouble projection(Line line, PointDouble p) {\n if (Math.abs(line.b) < EPS) {\n // special case 1: vertical Line\n return new PointDouble(-line.c, p.y);\n }\n\n if (Math.abs(line.a) < EPS) {\n // special case 2: horizontal Line\n return new PointDouble(p.x, -line.c);\n }\n\n // perpendicular to l, passing through p\n // slope guaranteed to not be edge-case since we dealt with those already\n Line perpendicular = pointSlopeToLine(p, 1 / line.a);\n // intersect Line with perpendicular\n return intersection(line, perpendicular);\n }", "public int getPointLineOnScreen(float y){\n return Math.min(getPointLine(y + getOffsetY()),getLineCount() - 1);\n }", "private Line addLine() {\n\t\t// Create a new line\n\t\tLine line = new Line(doily.settings.getPenScale(), \n\t\t\t\tdoily.settings.getPenColor(), doily.settings.isReflect());\n\t\tdoily.lines.add(line);\n\t\treturn line;\n\t}", "private boolean lineline(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4){\n float uA = ((x4-x3)*(y1-y3) - (y4-y3)*(x1-x3)) / ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1));\n float uB = ((x2-x1)*(y1-y3) - (y2-y1)*(x1-x3)) / ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1));\n\n return uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1;\n }", "static Line pointsToLine(PointDouble p1, PointDouble p2) {\n Line line = new Line();\n if (Math.abs(p1.x - p2.x) < EPS) {\n // Vertical Line through both points\n line.a = 1.0; line.b = 0.0; line.c = -p1.x;\n } else {\n // Non-vertical Line through the points.\n // Since the Line eq. is homogeneous we fix the scaling by setting b = 1.0.\n line.a = -(p1.y - p2.y) / (p1.x - p2.x);\n line.b = 1.0;\n line.c = -(line.a * p1.x) - p1.y;\n }\n return line;\n }" ]
[ "0.8840291", "0.8596443", "0.84329706", "0.7992447", "0.78255165", "0.771974", "0.7617864", "0.7520947", "0.74105185", "0.72966677", "0.7269127", "0.72529227", "0.7250839", "0.7243178", "0.72020835", "0.719873", "0.71661717", "0.7161681", "0.7137247", "0.7080828", "0.6898559", "0.6823178", "0.67783386", "0.6715006", "0.66043746", "0.6456827", "0.6394849", "0.63826185", "0.6336375", "0.63020384", "0.6261738", "0.62301815", "0.6103521", "0.60980445", "0.6089723", "0.6015368", "0.5936742", "0.5932365", "0.591194", "0.5901167", "0.58993155", "0.5889746", "0.5722002", "0.5716387", "0.5692162", "0.5671752", "0.56549054", "0.56402236", "0.56370515", "0.5629791", "0.5625781", "0.55939716", "0.55885476", "0.55760443", "0.5571711", "0.556817", "0.5565392", "0.5552925", "0.5534119", "0.5514711", "0.5495769", "0.5493241", "0.54685557", "0.5466515", "0.5459009", "0.5452622", "0.5432792", "0.54217494", "0.54195493", "0.5401199", "0.539862", "0.5391122", "0.5390178", "0.5377281", "0.5373445", "0.53496826", "0.53282523", "0.53206027", "0.5308774", "0.5307767", "0.52785516", "0.5278492", "0.5268101", "0.5263615", "0.5261681", "0.52508473", "0.52448606", "0.52182716", "0.52171254", "0.5205833", "0.5175922", "0.51756454", "0.51678634", "0.51592934", "0.51413995", "0.5140258", "0.51298386", "0.51214063", "0.51082647", "0.50873595" ]
0.75667185
7
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "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
Add New Services method
public static void addNewServices() { displayAddNewServicesMenu(); processAddnewServicesMenu(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addService(ServiceInfo serviceInfo);", "Service newService();", "public Collection<Service> createServices();", "public abstract T addService(ServerServiceDefinition service);", "Fog_Services createFog_Services();", "public AddFavouriteService() {\n super(\"AddFavouriteService\");\n }", "public void addService() throws Throwable\r\n\t{\r\n\t\tselServicOpt.click();\r\n\t\tverifyService();\r\n\t\twdlib.waitForElement(getSelServiceBtn());\r\n\t\tselServiceBtn.click();\r\n\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ServicesPage\") , \"Services Page \");\r\n\t\tServicesPage svpage=new ServicesPage();\r\n\t\tsvpage.selectServices();\r\n\t\t\r\n\t}", "public static Services addNewService(Services services) {\n services.setId(FuncValidation.getValidIdService(services,ENTER_SERVICE_ID,INVALID_SERVICE_ID));\n services.setNameOfService(FuncValidation.getValidName(ENTER_SERVICE_NAME,INVALID_NAME));\n services.setUsedArea(FuncValidation.getValidDoubleNumber(ENTER_USED_AREA, INVALID_DOUBLE_NUMBER,30.0));\n services.setRentalFee(FuncValidation.getValidDoubleNumber(ENTER_RENTAL_FEE, INVALID_RENTAL_FEE,0.0));\n services.setMaxGuest(FuncValidation.getValidIntegerNumber(ENTER_MAXIMUM_OF_GUEST,INVALID_MAX_GUEST,0,20));\n services.setRentType(FuncValidation.getValidName(ENTER_TYPE_OF_RENT,INVALID_NAME));\n return services;\n }", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL, String[] wscompileFeatures);", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL);", "public void service() {\n\t}", "public void addServices(Services services) {\n for(int i = 0; i < services.getServices().size(); i++) {\n this.services.add(services.getServices().get(i)); // Retrieve the name of the Service\n }\n for(int i = 0; i < services.getIndexes().size(); i++) {\n this.indexes.add(services.getIndexes().get(i)); // Retrieve the index of the Service\n }\n }", "public abstract T addService(BindableService bindableService);", "public void serviceAdded(ServiceDescription service) {\n System.out.println(\"service added\");\n current = service;\n //set up channel to communicate with server\n //multiple beds -> multiple channels\n channel = ManagedChannelBuilder.forAddress(service.getAddress(), service.getPort())\n .usePlaintext(true)\n .build();\n\n //To call service methods, we first need to create a stub, \n //a blocking/synchronous stub: this means that the RPC call waits for the server to respond, \n //and will either return a response or raise an exception.\n blockingStub = ProjectorGrpc.newBlockingStub(channel);\n\n activateProjector();\n //listInputs();\n\n }", "com.icare.eai.schema.om.evSORequest.ListOfServiceElementsComplexType addNewListOfServiceElements();", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }", "public void saveService();", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "@HystrixCommand(fallbackMethod = \"addServiceFallback\")\n\tpublic String addService() {\n\t\treturn restTemplate.getForEntity(\"http://COMPUTE-SERVICE/add?a=10&b=20\", String.class).getBody();\n\t}", "void addService(Long orderId, Long serviceId);", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "void addHost(Service newHost);", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList addNewServiceConfigurationList();", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder() {\n return getServicesFieldBuilder().addBuilder(\n go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder() {\n return getServicesFieldBuilder().addBuilder(\n go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "List<Service> services();", "void addHasMicroService(MService newHasMicroService);", "public void service_INIT(){\n }", "public static void setupServicesAndParameters(){\n\t\t//replace services in use, e.g.:\n\t\t/*\n\t\tMap<String, ArrayList<String>> systemInterviewServicesMap = new HashMap<>();\n\t\t\n\t\t//CONTROL DEVICES\n\t\tArrayList<String> controlDevice = new ArrayList<String>();\n\t\t\tcontrolDevice.add(MyDeviceControlService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.CONTROL, controlDevice);\n\t\t\n\t\t//BANKING\n\t\tArrayList<String> banking = new ArrayList<String>();\n\t\t\tbanking.add(MyBankingService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.BANKING, banking);\n\t\t\t\n\t\tInterviewServicesMap.loadCustom(systemInterviewServicesMap);\n\t\t*/\n\t\t\n\t\t//defaults\n\t\tStart.setupServicesAndParameters();\n\t\t\n\t\t//add\n\t\t//e.g.: ParameterConfig.setHandler(PARAMETERS.ALARM_NAME, Config.parentPackage + \".parameters.AlarmName\");\n\t}", "void putServiceNameServiceInfos(net.zyuiop.ovhapi.api.objects.services.Service param0, java.lang.String serviceName) throws java.io.IOException;", "public void serviceAdded(ServiceEvent event) {\n\t\t\tLog.e(\"z\", \"added serivce: \" + event);\n\t\t}", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder(\n int index) {\n return getServicesFieldBuilder().addBuilder(\n index, go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder(\n int index) {\n return getServicesFieldBuilder().addBuilder(\n index, go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "public interface Service {\n // Service-specific methods go here\n }", "public void serviceAdded(String serviceID, Remote service, List<?> itemList);", "public void addServiceName(String name) {\n if (name != null) {\n this.serviceNameSet.add(name);\n }\n }", "public void setServices(com.hps.july.persistence.ServiceAccessBean newServices) throws Exception {\n\tif (newServices == null) {\n\t\tservicecode = null;\n\t\tservicename = \"\";\n\t}\n\telse {\n\t\tservicecode = new Integer(newServices.getDivision());\n\t\tservicename = newServices.getName();\n\t}\n}", "public void onAdd(final ForwardEvent event) {\r\n\t\t// Get the values and validate the data\r\n\t\tfinal Textbox txtService = (Textbox) Path.getComponent(page, \"txtService\");\r\n\t\tfinal String serviceName = txtService.getValue().trim();\r\n\t\tfinal Doublebox txtCharge = (Doublebox) Path.getComponent(page, \"txtCharge\");\r\n\t\tfinal Checkbox chkHidden = (Checkbox) Path.getComponent(page, \"chkHidden\");\r\n\t\tLOGGER.debug(\"Adding new service: \" + txtService.getValue() + \"\\t\" + txtCharge.getValue());\r\n\t\tif (serviceName.length() <= 0 || txtCharge.getValue() == null) {\r\n\t\t\ttry {\r\n\t\t\t\tMessagebox.show(\"Enter the service name and charge\", \"Error in input\", Messagebox.OK, Messagebox.ERROR);\r\n\t\t\t} catch (final Exception e) {\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfinal IPaymentDAO paymentDAO = (IPaymentDAO) SpringUtil.getBean(\"paymentDAO\");\r\n\t\tif (paymentDAO.checkService(serviceName)) {\r\n\t\t\ttry {\r\n\t\t\t\tMessagebox.show(\"Service already exists\", \"Error in input\", Messagebox.OK, Messagebox.ERROR);\r\n\t\t\t} catch (final Exception e) {\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Create new service and save it\r\n\t\tfinal MasterService service = new MasterService();\r\n\t\tservice.setServiceName(txtService.getValue().trim());\r\n\t\tservice.setCharge(txtCharge.getValue());\r\n\t\tservice.setHidden(chkHidden.isChecked());\r\n\t\tpaymentDAO.addMasterService(service);\r\n\r\n\t\t// Add this new service to listmodel and invalidate the list\r\n\t\tfinal ListModelList services = (ListModelList) page.getAttribute(\"serviceslist\");\r\n\t\tservices.add(service);\r\n\t\tpage.setAttribute(\"serviceslist\", services);\r\n\t\tfinal Listbox lstservice = (Listbox) Path.getComponent(page, \"lstservice\");\r\n\t\tlstservice.setModel(services);\r\n\t\tlstservice.invalidate();\r\n\t\tLOGGER.debug(\"added service\");\r\n\t}", "interface Services {\n\tpublic int addEmployee(Connection conn, String empDesignation);\n\n\tpublic void promote(Connection conn);\n\n\tpublic void deleteEmployee(Connection conn, int empId);\n\n\tpublic void changeSupervisor(Connection conn);\n\n\t// public void showEmployeesUnderMe(Map<Integer, Employee> employees, int\n\t// empId);\n}", "SourceBuilder createService();", "ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson addNewControlPersonsExt();", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "@Override\n\tpublic void subTypeForServiceTypeAdded(ServiceEvent arg0) {\n\n\t}", "public static void addNewVilla() {\n Services villa = new Villa();\n villa = addNewService(villa);\n ((Villa) villa).setRoomType(FuncValidation.getValidName(ENTER_ROOM_TYPE,INVALID_NAME));\n ((Villa) villa).setFacilities(FuncValidation.getValidName(ENTER_FACILITIIES,INVALID_NAME));\n ((Villa) villa).setPoolArea(FuncValidation.getValidDoubleNumber(ENTER_POOL_AREA,INVALID_DOUBLE_NUMBER,30.0));\n ((Villa) villa).setNumberOfFloor(FuncValidation.getValidIntegerNumber(ENTER_NUMBER_OF_FLOOR,INVALID_NUMBER_OF_FLOOR, 0));\n\n //Get villa list from CSV\n ArrayList<Villa> villaList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.VILLA);\n\n //Add villa to list\n villaList.add((Villa) villa);\n\n //Write villa list to CSV\n FuncReadWriteCSV.writeVillaToFileCSV(villaList);\n System.out.println(\"----Villa \"+villa.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "@Override\n\tpublic int addStationstoServices(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceStationId(serviceDTO.getSourceStationId());\n\t\tserviceDomain.setDestinationStationId(serviceDTO.getDestinationStationId());\n\t\tserviceDomain.setServiceId(serviceDTO.getServiceId());\n\t\tSystem.out.println(serviceDTO.getServiceId());\n\t\t//System.out.println(serviceDTO.getDestinationStationId());\n\t\treturn iStationToService.addServiceToStation(serviceDomain);\n\t}", "InboundServicesType createInboundServicesType();", "void addMethod(Method method);", "public ServiceCompte() {\n\t\tsuper();\n\t}", "public void addServicio(String nombre_servicio, List<String> parametros){\n\t\t\n\t\tboolean exists = false;\n\t\t//Se comprueba si ya estaba registrado dicho servicio\n\t\tfor(InfoServicio is: infoServicios){\n\t\t\tif(is.getNombre_servicio().equalsIgnoreCase(\"nombre_servicio\")){\n\t\t\t\texists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!exists){\n\t\t\t//Es un servicio nuevo, se registra.\n\t\t\tInfoServicio is = new InfoServicio(nombre_servicio,parametros);\n\t\t\tinfoServicios.add(is);\n\t\t}\n\t\telse{\n\t\t\t//Servicio ya registrado, no se hace nada.\n\t\t\tSystem.err.println(\"ERROR: Servicio \" + nombre_servicio + \" ya registrado para \" + this.getNombre_servidor());\n\t\t}\n\t\t\n\t}", "public interface ProcesoVENService extends Service {\n\n\t/**\n\t * Ejecuta procedimiento generico\n\t * @param nombreExecute\n\t * @param criteria\n\t */\n\tpublic void executeGenerico(String nombreExecute, Map criteria) ;\n\t\n\t/**Actualiza calensarios\n\t * @param calendario\n\t * @param usuario\n\t */\n\tpublic void updateCalendario(Calendario calendario, Usuario usuario);\n\t\n\t/**devuelve lista de calendarios\n\t * @param criteria\n\t * @return\n\t */\n\tpublic List getCalendarios(Map criteria);\n\t\n\t/**\n\t * devuelve el calendario\n\t * @param criteria\n\t * @return\n\t */\n\tpublic Calendario getCalendario(Map criteria);\n\t\n /**\n * devuelve los feriados d euna zona\n * @param criteria\n * @return\n */\n public List getFeriadoZona(Map criteria);\n\t\n\t/**\n\t * Actualiza feriados de una zona\n\t * @param feriadoZona\n\t * @param usuario\n\t */\n\tpublic void updateFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);\n\t\n\t/**\n\t * Inserta los feriados de una zona\n\t * @param feriadoZona\n\t * @param usuario\n\t */\n\tpublic void insertFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);\n\t\n\t/**\n\t * elimina los feriados d euna zona\n\t * @param feriadoZona\n\t * @param usuario\n\t */\n\tpublic void deleteFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);\n\n\t/**\n\t * Metodo que trae las zonas de una region\n\t * @param feriadoRegion\n\t * @return\n\t */\n\tpublic List getZonasRegion(String feriadoRegion);\n\n\t/**\n\t * Retorna el indicador de habilitacion RUV\n\t * @param criteria\n\t * @return\n\t */\n\tpublic String getIndicadorHabilitacionRuv(Map criteria);\n\n\t/**\n\t * Genera la informacion para el reporte RUV\n\t * @param map\n\t */\n\tpublic void executeGeneracionReporteRUV(Map map);\n\t\n\t/**\n\t * Genera los archivos de libro de ventas - detalles SII\n\t * @param map\n\t */\n\tpublic void executeGenerarArchivosLibroVentasDetalleSII(Map map);\n\t\n}", "public void registerService(String serviceName, Object service);", "public interface ServiceManagerInterface {\n\n /**\n * add a Service\n * @param servicePackage the service package to register\n * @param configuration The configuration of the client\n * @param profile the client profile\n * @return The added service description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription addService(\n AGServicePackageDescription servicePackage,\n AGParameter[] configuration,\n ClientProfile profile)\n throws IOException, SoapException;\n\n /**\n * gets the service manager description\n * @return service manager description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceManagerDescription getDescription()\n throws IOException, SoapException;\n\n /**\n * gets the url of the node service\n * @return url of node service\n * @throws IOException\n * @throws SoapException\n */\n String getNodeServiceUrl()\n throws IOException, SoapException;\n\n /**\n * gets the available services\n * @return a vector of available services\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription[] getServices()\n throws IOException, SoapException;\n\n /**\n * test whether the service manager is valid\n * @return the 'valid' state\n * @throws IOException\n * @throws SoapException\n */\n int isValid() throws IOException, SoapException;\n\n /**\n * removes a service from the service manager\n * @param serviceDescription the description of the service to be removed\n * @throws IOException\n * @throws SoapException\n */\n void removeService(AGServiceDescription serviceDescription)\n throws IOException, SoapException;\n\n /**\n * removes all services from the service manager\n * @throws IOException\n * @throws SoapException\n */\n void removeServices() throws IOException, SoapException;\n\n /**\n * sets the url for node service\n * @param nodeServiceUri\n * @throws IOException\n * @throws SoapException\n */\n void setNodeServiceUrl(String nodeServiceUri)\n throws IOException, SoapException;\n\n /**\n * shuts down the service manager\n * @throws IOException\n * @throws SoapException\n */\n void shutdown() throws IOException, SoapException;\n\n /**\n * stops all services on service manager\n * @throws IOException\n * @throws SoapException\n */\n void stopServices() throws IOException, SoapException;\n\n /**\n * gets the version number of the service manager\n * @return string with version of service manager\n * @throws IOException\n * @throws SoapException\n */\n String getVersion() throws IOException, SoapException;\n\n\n /**\n * Requests to join a bridge\n * @param bridgeDescription The description of the bridge\n * @throws IOException\n * @throws SoapException\n */\n void joinBridge(BridgeDescription bridgeDescription)\n throws IOException, SoapException;\n\n /**\n * Sets the streams of this service manager\n *\n * @param streamDescriptionList a vector of stream descriptions\n * @throws IOException\n * @throws SoapException\n */\n void setStreams(StreamDescription[] streamDescriptionList)\n throws IOException, SoapException;\n /**\n * adds a stream\n * @param argname stream description of new stream\n * @throws IOException\n * @throws SoapException\n */\n void addStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Removes a stream\n * @param argname The stream to remove\n * @throws IOException\n * @throws SoapException\n */\n void removeStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Sets the point of reference for network traffic\n * @param url The url of the point of reference server\n * @throws IOException\n * @throws SoapException\n */\n void setPointOfReference(String url)\n throws IOException, SoapException;\n\n /**\n * Sets the encryption\n * @param encryption The encryption\n * @throws IOException\n * @throws SoapException\n */\n void setEncryption(String encryption)\n throws IOException, SoapException;\n /**\n * Instructs the client to run automatic bridging\n * @throws IOException\n * @throws SoapException\n */\n void runAutomaticBridging()\n throws IOException, SoapException;\n\n /**\n * Determines if a service is enabled\n * @param service The service to get the status of\n * @return True if enabled, false otherwise\n * @throws IOException\n * @throws SoapException\n */\n boolean isServiceEnabled(AGServiceDescription service)\n throws IOException, SoapException;\n\n /**\n * Enables or disables a service\n * @param service The service to control\n * @param enabled True to enable, false to disable\n * @throws IOException\n * @throws SoapException\n */\n void enableService(AGServiceDescription service, boolean enabled)\n throws IOException, SoapException;\n\n /**\n * Gets the configuration parameters of a service\n * @param service The service to get the configuration of\n * @return The parameters\n * @throws IOException\n * @throws SoapException\n */\n AGParameter[] getServiceConfiguration(AGServiceDescription service)\n throws IOException, SoapException;\n /**\n * Sets the configuration parameters for a service\n * @param service The service to configure\n * @param config The new parameters\n * @throws IOException\n * @throws SoapException\n */\n void setServiceConfiguration(AGServiceDescription service,\n AGParameter[] config)\n throws IOException, SoapException;\n\n /**\n * Sets the client profile\n * @param profile The new profile\n * @throws IOException\n * @throws SoapException\n */\n void setClientProfile(ClientProfile profile)\n throws IOException, SoapException;\n}", "public interface ServiceFactory {\n \n /**\n * Returns a collection of services to be registered.\n * \n * @return an immutable collection of services; never null\n */\n public Collection<Service> createServices();\n \n}", "net.webservicex.www.WeatherForecasts addNewWeatherForecasts();", "private static interface Service {}", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "public void doService() {\n }", "private static void addInstance(String[] args,CuratorFramework client,String command,\n List<ExampleServer> servers) throws Exception {\n \n if (args.length < 2) {\n System.err.println(\"syntax error (expected add <name> <description>): \" + command);\n return;\n }\n \n StringBuilder description = new StringBuilder();\n for (int i = 1; i < args.length; ++i) {\n if (i > 1) {\n description.append(' ');\n }\n description.append(args[i]);\n }\n \n String serviceName = args[0];\n ExampleServer server = new ExampleServer(client,PATH,serviceName,description.toString());\n servers.add(server);\n server.start();\n \n System.out.println(serviceName + \" added\");\n }", "public void addService(String serviceName, CheckBox dateOfBirth, CheckBox address, CheckBox typeOfLicense,\n CheckBox proofOfResidence, CheckBox proofOfStatus, CheckBox proofOfPhoto, double servicePrice) {\n DatabaseReference dR;\n dR = FirebaseDatabase.getInstance().getReference(\"ServiceRequests\");\n\n Service serviceRequest = new ServiceCategories(serviceName, dateOfBirth.isChecked(), address.isChecked(),\n typeOfLicense.isChecked(), proofOfResidence.isChecked(), proofOfStatus.isChecked(),\n proofOfPhoto.isChecked(), servicePrice);\n dR.child(serviceName).setValue(serviceRequest);\n\n }", "@Override\n\tpublic int addService(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceId(serviceDTO.getSourceId());\n\t\tserviceDomain.setDestinationId(serviceDTO.getDestinationId());\n\t\tserviceDomain.setNoOfSeats(serviceDTO.getNoOfSeats());\n\t\tserviceDomain.setFare(serviceDTO.getFare());\n\t\tserviceDomain.setDistance(serviceDTO.getDistance());\n\t\tserviceDomain.setJourneyDate(serviceDTO.getJourneyDate());\n\t\tserviceDomain.setArrivalTime(serviceDTO.getArrivalTime());\n\t\tserviceDomain.setDepartureTime(serviceDTO.getDepartureTime());\n\t\tserviceDomain.setStatus(serviceDTO.getStatus());\n\t\treturn iServiceDAO.addService(serviceDomain);\n\t}", "public Servicio(String servicio){\n nombreServicio = servicio;\n }", "public interface SerService {\n\n List<SService> findwithPageInfo(Integer pageNo, Integer pageSize);\n\n PageInfo<SService> getPageInfo(Integer pageSize);\n\n SService findById(Integer id);\n\n void modi(SService sService);\n\n void add(SService sService, String samePasswd);\n\n void setStateS(Integer id);\n\n void delS(Integer id);\n\n\n List<SService> findS(String osUsername, String unixHost, String status, Integer accountId);\n\n void updateCost(SService sService);\n}", "public interface ServiceService {\n void createServices() throws IOException, TemplateException;\n\n void createService(String table) throws IOException, TemplateException;\n\n void createServiceImpls() throws IOException, TemplateException;\n\n void createServiceImpl(String table) throws IOException, TemplateException;\n}", "public interface Provider {\n Service newService();\n }", "public TestService_Service(WebServiceFeature... features) {\n super(WSDL_LOCATION, SERVICE, features);\n }", "boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);", "public Services(ArrayList<ServiceTypes> serviceTypes) {\n this.indexes = new ArrayList<Integer>();\n this.services = new ArrayList<String>();\n for(int i = 0; i < serviceTypes.size(); i++) {\n this.indexes.add(serviceTypes.get(i).getValue()); // Retrieve the index of the Service\n this.services.add(serviceTypes.get(i).getKey()); // Retrieve the name of the Service\n }\n\n }", "public Builder addServices(\n int index, go.micro.runtime.RuntimeOuterClass.Service value) {\n if (servicesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureServicesIsMutable();\n services_.add(index, value);\n onChanged();\n } else {\n servicesBuilder_.addMessage(index, value);\n }\n return this;\n }", "public Builder addServices(\n int index, go.micro.runtime.RuntimeOuterClass.Service value) {\n if (servicesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureServicesIsMutable();\n services_.add(index, value);\n onChanged();\n } else {\n servicesBuilder_.addMessage(index, value);\n }\n return this;\n }", "public abstract void addServiceListener(PhiDiscoverListener listener);", "protected abstract ServiceRegistry getNewServiceRegistry();", "default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }", "ServicesPackage getServicesPackage();", "public interface LearningSpaceServices {\n\n\n}", "public interface CreateStudentOrderFor15Service {\n public void create();\n}", "public TIdAddPotentialServicesEntity() {\n\t\tsuper();\n }", "private void populateAxisService() throws org.apache.axis2.AxisFault {\n _service = new org.apache.axis2.description.AxisService(\"HISWebService\" +\r\n getUniqueSuffix());\r\n addAnonymousOperations();\r\n\r\n //creating the operations\r\n org.apache.axis2.description.AxisOperation __operation;\r\n\r\n _operations = new org.apache.axis2.description.AxisOperation[40];\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getYYT_XXBG\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[0] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"createCardPatInfo\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[1] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getGhlb\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[2] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getYYT_XDTBG\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[3] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"updateZYYJJ\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[4] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"appNoList\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[5] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getItemData\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[6] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"dOCHBList\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[7] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"sapInterface\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[8] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getYYT_ZQGSZSYBG\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[9] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"msgInterface\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[10] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getYYT_YDBG\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[11] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getPeopleFeeStatus\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[12] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getDoctorDe\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[13] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getsfzy\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[14] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getDoctorList\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[15] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getAdmByCardNo\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[16] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"bankAddDeposit\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[17] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"accSearch\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[18] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getChargetariff\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[19] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getYYT_DTXYJCBG\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[20] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getBillDetailByAd\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[21] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getYYT_CTBG\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[22] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"iDCardCheck\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[23] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"dOCKSList\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[24] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"patChargeList\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[25] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"mainMethod\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[26] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"testDBStatus\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[27] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getBaseCardPrice\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[28] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"netTest\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[29] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getYYT_DTXDTBG\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[30] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"addDeposit\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[31] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"oPRegist\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[32] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"editInfo\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[33] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"yPrint\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[34] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getAppNo\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[35] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getItemDataPrint\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[36] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getXFList\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[37] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"getBillInfo\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[38] = __operation;\r\n\r\n __operation = new org.apache.axis2.description.OutInAxisOperation();\r\n\r\n __operation.setName(new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"autoOPBillCharge\"));\r\n _service.addOperation(__operation);\r\n\r\n _operations[39] = __operation;\r\n }", "private WebServicesFabrica(){}", "public InitService() {\n super(\"InitService\");\n }", "public void saveService(){\r\n \tif(editService != null){\r\n \t\tint id = editService.getId();\r\n \t\ttry {\r\n\t \t\tif(id == 0){\r\n\t \t\t\tthis.getLog().info(\" addService()\");\r\n\t \t\t\tserviceList.addNewServiceToDB(editService.getDisplayServiceName(), editService.getServiceName(), editService.getUrl());\r\n\t \t\t}else{\r\n\t \t\t\tthis.getLog().info(\" updateService(\" + id + \")\");\r\n\t \t\t\tserviceList.updateAlgorithmParameterToDB(editService);\r\n\t \t\t}\r\n\t \t\tthis.getServiceList().populateServiceListFromDB();\r\n\t\t\t} catch (DataStorageException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n \t}\r\n }", "private void initService() {\r\n\t}", "public interface Provider{\n Service newService();\n}", "public void setServiceName(java.lang.String param){\n localServiceNameTracker = true;\n \n this.localServiceName=param;\n \n\n }", "public void setServiceName(String serviceName){\n this.serviceName = serviceName;\n }", "public Builder addServices(go.micro.runtime.RuntimeOuterClass.Service value) {\n if (servicesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureServicesIsMutable();\n services_.add(value);\n onChanged();\n } else {\n servicesBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addServices(go.micro.runtime.RuntimeOuterClass.Service value) {\n if (servicesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureServicesIsMutable();\n services_.add(value);\n onChanged();\n } else {\n servicesBuilder_.addMessage(value);\n }\n return this;\n }", "public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }", "public interface ComputeService {\n\n\n Integer add(int a, int b);\n}", "public abstract void setServiceName(String serviceName);", "public Service(){\n\t\t\n\t}", "public SunshineService(String name) {\n super(\"SunshineService\");\n\n }", "public void onServiceRegistered() {\r\n \t// Nothing to do here\r\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"service on create\");\n\t\tsuper.onCreate();\n\t}", "public interface RsService {\n public void add(Rs rs);\n\n}", "public OperationInfo addOperation(String name, Method method)\n {\n if ((name == null) || (name.length() == 0))\n {\n throw new IllegalArgumentException(\"Invalid name [\" + name + \"]\");\n }\n if (nameToOperation.containsKey(name))\n {\n throw new IllegalArgumentException(\"An operation with name [\" + name + \"] already exists in this service\");\n }\n \n OperationInfo operation = new OperationInfo(name, method, this);\n addOperation(operation);\n return operation;\n }", "public CallService() {\n super(\"My\");\n }", "public interface ControllcurveService extends Service<Controllcurve> {\n\n}" ]
[ "0.7521659", "0.73226607", "0.73019695", "0.7283026", "0.70783496", "0.6794216", "0.6790927", "0.67296755", "0.66419995", "0.66246575", "0.6622686", "0.66082317", "0.6575329", "0.65746933", "0.6501057", "0.648148", "0.646962", "0.6431798", "0.6352217", "0.6352217", "0.6335506", "0.6321314", "0.6290378", "0.6270914", "0.6270072", "0.6263763", "0.6263763", "0.62518334", "0.6180231", "0.61321986", "0.61210567", "0.60934794", "0.6090404", "0.6083569", "0.6083569", "0.6082677", "0.6074627", "0.6069739", "0.60603803", "0.6058179", "0.605659", "0.6044891", "0.6042157", "0.6015441", "0.6013613", "0.5999686", "0.5997328", "0.5995424", "0.59898883", "0.5983276", "0.5973293", "0.5954731", "0.59455955", "0.5938692", "0.59384215", "0.5924086", "0.5922446", "0.5921008", "0.5921008", "0.591952", "0.5919207", "0.5913087", "0.59038126", "0.59025615", "0.5898268", "0.58854526", "0.58832824", "0.5847369", "0.5839734", "0.5838973", "0.58384776", "0.58384776", "0.5833864", "0.58244133", "0.5808681", "0.58024484", "0.58015317", "0.579846", "0.5798178", "0.57965213", "0.5794202", "0.5777617", "0.5776669", "0.5770901", "0.57494444", "0.57368135", "0.5731155", "0.5722849", "0.5722849", "0.57102215", "0.57093316", "0.57032555", "0.57013655", "0.5697521", "0.5694807", "0.5682887", "0.5680718", "0.5677181", "0.5674153", "0.567184" ]
0.731083
2
Process Add New Services method
public static void processAddnewServicesMenu() { switch (ScannerUtils.scanner.nextLine()) { case ADD_NEW_VILLA: addNewVilla(); break; case ADD_NEW_HOUSE: addNewHouse(); break; case ADD_NEW_ROOM: addNewRoom(); break; case BACK_TO_MAIN_MENU: processMain(); break; case EXIT: System.exit(0); break; default: System.out.println("Please select from 1 to 4"); returnAddNewServicesMenu(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }", "void addService(ServiceInfo serviceInfo);", "public void addService() throws Throwable\r\n\t{\r\n\t\tselServicOpt.click();\r\n\t\tverifyService();\r\n\t\twdlib.waitForElement(getSelServiceBtn());\r\n\t\tselServiceBtn.click();\r\n\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ServicesPage\") , \"Services Page \");\r\n\t\tServicesPage svpage=new ServicesPage();\r\n\t\tsvpage.selectServices();\r\n\t\t\r\n\t}", "public void onAdd(final ForwardEvent event) {\r\n\t\t// Get the values and validate the data\r\n\t\tfinal Textbox txtService = (Textbox) Path.getComponent(page, \"txtService\");\r\n\t\tfinal String serviceName = txtService.getValue().trim();\r\n\t\tfinal Doublebox txtCharge = (Doublebox) Path.getComponent(page, \"txtCharge\");\r\n\t\tfinal Checkbox chkHidden = (Checkbox) Path.getComponent(page, \"chkHidden\");\r\n\t\tLOGGER.debug(\"Adding new service: \" + txtService.getValue() + \"\\t\" + txtCharge.getValue());\r\n\t\tif (serviceName.length() <= 0 || txtCharge.getValue() == null) {\r\n\t\t\ttry {\r\n\t\t\t\tMessagebox.show(\"Enter the service name and charge\", \"Error in input\", Messagebox.OK, Messagebox.ERROR);\r\n\t\t\t} catch (final Exception e) {\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfinal IPaymentDAO paymentDAO = (IPaymentDAO) SpringUtil.getBean(\"paymentDAO\");\r\n\t\tif (paymentDAO.checkService(serviceName)) {\r\n\t\t\ttry {\r\n\t\t\t\tMessagebox.show(\"Service already exists\", \"Error in input\", Messagebox.OK, Messagebox.ERROR);\r\n\t\t\t} catch (final Exception e) {\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Create new service and save it\r\n\t\tfinal MasterService service = new MasterService();\r\n\t\tservice.setServiceName(txtService.getValue().trim());\r\n\t\tservice.setCharge(txtCharge.getValue());\r\n\t\tservice.setHidden(chkHidden.isChecked());\r\n\t\tpaymentDAO.addMasterService(service);\r\n\r\n\t\t// Add this new service to listmodel and invalidate the list\r\n\t\tfinal ListModelList services = (ListModelList) page.getAttribute(\"serviceslist\");\r\n\t\tservices.add(service);\r\n\t\tpage.setAttribute(\"serviceslist\", services);\r\n\t\tfinal Listbox lstservice = (Listbox) Path.getComponent(page, \"lstservice\");\r\n\t\tlstservice.setModel(services);\r\n\t\tlstservice.invalidate();\r\n\t\tLOGGER.debug(\"added service\");\r\n\t}", "public static Services addNewService(Services services) {\n services.setId(FuncValidation.getValidIdService(services,ENTER_SERVICE_ID,INVALID_SERVICE_ID));\n services.setNameOfService(FuncValidation.getValidName(ENTER_SERVICE_NAME,INVALID_NAME));\n services.setUsedArea(FuncValidation.getValidDoubleNumber(ENTER_USED_AREA, INVALID_DOUBLE_NUMBER,30.0));\n services.setRentalFee(FuncValidation.getValidDoubleNumber(ENTER_RENTAL_FEE, INVALID_RENTAL_FEE,0.0));\n services.setMaxGuest(FuncValidation.getValidIntegerNumber(ENTER_MAXIMUM_OF_GUEST,INVALID_MAX_GUEST,0,20));\n services.setRentType(FuncValidation.getValidName(ENTER_TYPE_OF_RENT,INVALID_NAME));\n return services;\n }", "public abstract T addService(ServerServiceDefinition service);", "public Collection<Service> createServices();", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList addNewServiceConfigurationList();", "void addService(Long orderId, Long serviceId);", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "com.icare.eai.schema.om.evSORequest.ListOfServiceElementsComplexType addNewListOfServiceElements();", "public void addServices(Services services) {\n for(int i = 0; i < services.getServices().size(); i++) {\n this.services.add(services.getServices().get(i)); // Retrieve the name of the Service\n }\n for(int i = 0; i < services.getIndexes().size(); i++) {\n this.indexes.add(services.getIndexes().get(i)); // Retrieve the index of the Service\n }\n }", "public void serviceAdded(String serviceID, Remote service, List<?> itemList);", "public void serviceAdded(ServiceEvent event) {\n\t\t\tLog.e(\"z\", \"added serivce: \" + event);\n\t\t}", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void serviceAdded(ServiceDescription service) {\n System.out.println(\"service added\");\n current = service;\n //set up channel to communicate with server\n //multiple beds -> multiple channels\n channel = ManagedChannelBuilder.forAddress(service.getAddress(), service.getPort())\n .usePlaintext(true)\n .build();\n\n //To call service methods, we first need to create a stub, \n //a blocking/synchronous stub: this means that the RPC call waits for the server to respond, \n //and will either return a response or raise an exception.\n blockingStub = ProjectorGrpc.newBlockingStub(channel);\n\n activateProjector();\n //listInputs();\n\n }", "public void addService(String serviceName, CheckBox dateOfBirth, CheckBox address, CheckBox typeOfLicense,\n CheckBox proofOfResidence, CheckBox proofOfStatus, CheckBox proofOfPhoto, double servicePrice) {\n DatabaseReference dR;\n dR = FirebaseDatabase.getInstance().getReference(\"ServiceRequests\");\n\n Service serviceRequest = new ServiceCategories(serviceName, dateOfBirth.isChecked(), address.isChecked(),\n typeOfLicense.isChecked(), proofOfResidence.isChecked(), proofOfStatus.isChecked(),\n proofOfPhoto.isChecked(), servicePrice);\n dR.child(serviceName).setValue(serviceRequest);\n\n }", "public static void addNewVilla() {\n Services villa = new Villa();\n villa = addNewService(villa);\n ((Villa) villa).setRoomType(FuncValidation.getValidName(ENTER_ROOM_TYPE,INVALID_NAME));\n ((Villa) villa).setFacilities(FuncValidation.getValidName(ENTER_FACILITIIES,INVALID_NAME));\n ((Villa) villa).setPoolArea(FuncValidation.getValidDoubleNumber(ENTER_POOL_AREA,INVALID_DOUBLE_NUMBER,30.0));\n ((Villa) villa).setNumberOfFloor(FuncValidation.getValidIntegerNumber(ENTER_NUMBER_OF_FLOOR,INVALID_NUMBER_OF_FLOOR, 0));\n\n //Get villa list from CSV\n ArrayList<Villa> villaList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.VILLA);\n\n //Add villa to list\n villaList.add((Villa) villa);\n\n //Write villa list to CSV\n FuncReadWriteCSV.writeVillaToFileCSV(villaList);\n System.out.println(\"----Villa \"+villa.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "public void saveService(){\r\n \tif(editService != null){\r\n \t\tint id = editService.getId();\r\n \t\ttry {\r\n\t \t\tif(id == 0){\r\n\t \t\t\tthis.getLog().info(\" addService()\");\r\n\t \t\t\tserviceList.addNewServiceToDB(editService.getDisplayServiceName(), editService.getServiceName(), editService.getUrl());\r\n\t \t\t}else{\r\n\t \t\t\tthis.getLog().info(\" updateService(\" + id + \")\");\r\n\t \t\t\tserviceList.updateAlgorithmParameterToDB(editService);\r\n\t \t\t}\r\n\t \t\tthis.getServiceList().populateServiceListFromDB();\r\n\t\t\t} catch (DataStorageException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n \t}\r\n }", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL);", "ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson addNewControlPersonsExt();", "Fog_Services createFog_Services();", "public void addServicio(String nombre_servicio, List<String> parametros){\n\t\t\n\t\tboolean exists = false;\n\t\t//Se comprueba si ya estaba registrado dicho servicio\n\t\tfor(InfoServicio is: infoServicios){\n\t\t\tif(is.getNombre_servicio().equalsIgnoreCase(\"nombre_servicio\")){\n\t\t\t\texists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!exists){\n\t\t\t//Es un servicio nuevo, se registra.\n\t\t\tInfoServicio is = new InfoServicio(nombre_servicio,parametros);\n\t\t\tinfoServicios.add(is);\n\t\t}\n\t\telse{\n\t\t\t//Servicio ya registrado, no se hace nada.\n\t\t\tSystem.err.println(\"ERROR: Servicio \" + nombre_servicio + \" ya registrado para \" + this.getNombre_servidor());\n\t\t}\n\t\t\n\t}", "Service newService();", "@Override\n\tpublic int addStationstoServices(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceStationId(serviceDTO.getSourceStationId());\n\t\tserviceDomain.setDestinationStationId(serviceDTO.getDestinationStationId());\n\t\tserviceDomain.setServiceId(serviceDTO.getServiceId());\n\t\tSystem.out.println(serviceDTO.getServiceId());\n\t\t//System.out.println(serviceDTO.getDestinationStationId());\n\t\treturn iStationToService.addServiceToStation(serviceDomain);\n\t}", "private void insertServiceRequest() {\n Random rand = new Random();\r\n service_id = rand.nextInt(Integer.MAX_VALUE);\r\n int tokenSeed = rand.nextInt(Integer.MAX_VALUE);\r\n current_token = md5(tokenSeed + \"\");\r\n\r\n Calendar cal = Calendar.getInstance();\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\r\n String fecha = sdf.format(cal.getTime());\r\n\r\n int deliver_state = 1;\r\n\r\n int costo = (int) Math.round(destinations.get(0).total_price);\r\n\r\n ArrayList<String> param = new ArrayList<>();\r\n param.add(service_id + \"\");\r\n param.add(current_token);\r\n param.add(fecha);\r\n param.add(deliver_state + \"\");\r\n param.add(id_cliente + \"\");\r\n param.add(costo + \"\");\r\n param.add(\"0\");\r\n RestClient.get().executeCommand(\"8\", param.toString(), new Callback<Response>() {\r\n @Override\r\n public void success(Response response, retrofit.client.Response response2) {\r\n\r\n insertRoutes();\r\n }\r\n\r\n @Override\r\n public void failure(RetrofitError error) {\r\n hideOverlay();\r\n showDialog(\r\n getResources().getString(\r\n R.string.msg_serverError_title),\r\n getResources().getString(\r\n R.string.msg_serverError), false, false);\r\n }\r\n });\r\n\r\n\r\n }", "void putServiceNameServiceInfos(net.zyuiop.ovhapi.api.objects.services.Service param0, java.lang.String serviceName) throws java.io.IOException;", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription addNewControlPersons();", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "public void saveService();", "@RequestMapping(\"/createService1\")\n\tpublic String addService1(Service1 service1) {\n\t\tservice1Service.insertService1(service1);\n\t\treturn \"redirect:/list-service1\";\n\t}", "@Override\n\tpublic int addService(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceId(serviceDTO.getSourceId());\n\t\tserviceDomain.setDestinationId(serviceDTO.getDestinationId());\n\t\tserviceDomain.setNoOfSeats(serviceDTO.getNoOfSeats());\n\t\tserviceDomain.setFare(serviceDTO.getFare());\n\t\tserviceDomain.setDistance(serviceDTO.getDistance());\n\t\tserviceDomain.setJourneyDate(serviceDTO.getJourneyDate());\n\t\tserviceDomain.setArrivalTime(serviceDTO.getArrivalTime());\n\t\tserviceDomain.setDepartureTime(serviceDTO.getDepartureTime());\n\t\tserviceDomain.setStatus(serviceDTO.getStatus());\n\t\treturn iServiceDAO.addService(serviceDomain);\n\t}", "@Override\n\tpublic void subTypeForServiceTypeAdded(ServiceEvent arg0) {\n\n\t}", "public abstract T addService(BindableService bindableService);", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL, String[] wscompileFeatures);", "public static void addNewHouse() {\n Services house = new House();\n house = addNewService(house);\n\n ((House) house).setRoomType(FuncValidation.getValidName(ENTER_ROOM_TYPE,INVALID_NAME));\n\n ((House) house).setFacilities(FuncValidation.getValidName(ENTER_FACILITIIES,INVALID_NAME));\n\n ((House) house).setNumberOfFloor(FuncValidation.getValidIntegerNumber(ENTER_NUMBER_OF_FLOOR,INVALID_NUMBER_OF_FLOOR,0));\n\n //Get list house from CSV\n ArrayList<House> houseList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.HOUSE);\n\n //Add house to list\n houseList.add((House) house);\n\n //Write house list to CSV\n FuncReadWriteCSV.writeHouseToFileCSV(houseList);\n System.out.println(\"----House \"+house.getNameOfService()+\" added to list---- \");\n addNewServices();\n }", "@RequestMapping(value = \"/restAddNewService\", method = { RequestMethod.POST })\r\n\tpublic ResponseEntity<JsonResponse<Object>> restAddNewService(\r\n\t\t\t@RequestBody RestServiceMasterModel serviceMaster) {\r\n\t\tlogger.info(\"Method : restAddNewService starts\");\r\n\t\tlogger.info(\"Method : restAddNewService endss\");\r\n\t\treturn serviceDao.restAddNewService(serviceMaster);\r\n\t}", "public AddFavouriteService() {\n super(\"AddFavouriteService\");\n }", "public void addServiceName(String name) {\n if (name != null) {\n this.serviceNameSet.add(name);\n }\n }", "private void readAddServices(BufferedReader in) {\n\t\tString line, name = \"\", opis = \"\";\n\t\tDouble price = -1.0;\n\t\tStringTokenizer st;\n\t\ttry {\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tif (line.equals(\"\") || line.indexOf('#') == 0)\n\t\t\t\t\tcontinue;\n\t\t\t\tst = new StringTokenizer(line, \";\");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tname = st.nextToken().trim();\n\t\t\t\t\topis = st.nextToken().trim();\n\t\t\t\t\tprice = Double.parseDouble(st.nextToken().trim());\n\t\t\t\t}\n\t\t\t\taddServices.put(name, new AdditionalService(name, opis, price));\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void createServiceRequest() {\n getMainActivity().startService(new Intent(getMainActivity(), RequestService.class));\n }", "public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }", "public void markServiceCreate() throws JNCException {\n markLeafCreate(\"service\");\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData addNewCompanyBaseData();", "net.webservicex.www.WeatherForecasts addNewWeatherForecasts();", "boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);", "@Override\r\n\tpublic boolean add(ServicesDto servicesDto) {\r\n\t\ttry {\r\n\t\t\t// add the category to database table\r\n\t\t\tsessionFactory.getCurrentSession().persist(servicesDto);\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@BearerAuth\n @HttpRequestHandler(paths = \"/api/v2/service/create\", methods = \"POST\")\n private void handleCreateRequest(@NonNull HttpContext context, @NonNull @RequestBody Document body) {\n var configuration = body.readObject(\"serviceConfiguration\", ServiceConfiguration.class);\n if (configuration == null) {\n // check for a provided service task\n var serviceTask = body.readObject(\"task\", ServiceTask.class);\n if (serviceTask != null) {\n configuration = ServiceConfiguration.builder(serviceTask).build();\n } else {\n // fallback to a service task name which has to exist\n var serviceTaskName = body.getString(\"serviceTaskName\");\n if (serviceTaskName != null) {\n var task = this.serviceTaskProvider.serviceTask(serviceTaskName);\n if (task != null) {\n configuration = ServiceConfiguration.builder(task).build();\n } else {\n // we got a task but it does not exist\n this.badRequest(context)\n .body(this.failure().append(\"reason\", \"Provided task is unknown\").toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n return;\n }\n } else {\n this.sendInvalidServiceConfigurationResponse(context);\n return;\n }\n }\n }\n\n var createResult = this.serviceFactory.createCloudService(configuration);\n var start = body.getBoolean(\"start\", false);\n if (start && createResult.state() == ServiceCreateResult.State.CREATED) {\n createResult.serviceInfo().provider().start();\n }\n\n this.ok(context)\n .body(this.success().append(\"result\", createResult).toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n }", "public void insert(Service servico){\n Database.servico.add(servico);\n }", "public void onSaveService(final ForwardEvent event) {\r\n\t\t// Get the listitem from the event's target (button)\r\n\t\t// parent(hbox)->parent(listcell)->parent(listitem)\r\n\t\tfinal Listitem li = (Listitem) event.getOrigin().getTarget().getParent().getParent().getParent();\r\n\t\tfinal MasterService service = (MasterService) li.getValue();\r\n\r\n\t\t// save the service\r\n\t\tfinal IPaymentDAO paymentDAO = (IPaymentDAO) SpringUtil.getBean(\"paymentDAO\");\r\n\t\tpaymentDAO.addMasterService(service);\r\n\r\n\t\t// Get the listmodel and update this service in it\r\n\t\tfinal ListModelList services = (ListModelList) page.getAttribute(\"serviceslist\");\r\n\t\tint indx = getListIndex(service, services);\r\n\t\tservices.set(indx, service);\r\n\t\tpage.setAttribute(\"serviceslist\", services);\r\n\t\tfinal Listbox lstservice = (Listbox) Path.getComponent(page, \"lstservice\");\r\n\t\tlstservice.setModel(services);\r\n\t\tlstservice.invalidate();\r\n\t\tClients.evalJavaScript(\"$.jGrowl(\\\"Successfully Saved the service\\\", {life:2000});\");\r\n\t}", "@Override\n\tpublic Integer insertServices(com.easybooking.model.BookedServices services) {\n\t\tint i = 0 ;\n\t\tSessionFactory factory = HibernateUtil.getSesssionFactory();\n\t\tSession session = factory.openSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(services);\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t\tfactory.close();\n\t\treturn i;\n\t}", "public void addServiceType(ServiceType serviceType){\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tsession.beginTransaction();\n\t\tsession.saveOrUpdate(serviceType);\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t}", "default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }", "@HystrixCommand(fallbackMethod = \"addServiceFallback\")\n\tpublic String addService() {\n\t\treturn restTemplate.getForEntity(\"http://COMPUTE-SERVICE/add?a=10&b=20\", String.class).getBody();\n\t}", "void addHost(Service newHost);", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n Service service = new Service();\r\n \r\n try {\r\n \tservice.setSvName(request.getParameter(\"svName\"));\r\n\t service.setSvPrice(Double.parseDouble(request.getParameter(\"svPrice\")));\r\n\t service.setSvDescription(request.getParameter(\"svDescription\"));\r\n\t service.setStaffID(request.getParameter(\"staffID\"));\r\n\t \r\n } catch(NumberFormatException ex){\r\n \t return; \r\n \t }\r\n \r\n dao.addService(service);\r\n \r\n\t\ttry {\r\n\t\t\trequest.setAttribute(\"service\", ServiceDAO.getServiceList());\r\n\t\t} catch (ClassNotFoundException | SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"listService.jsp\");\r\n\t\tdispatcher.forward(request, response);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@RequestMapping(method = RequestMethod.POST)\n\tpublic ResponseEntity<?> addCatalogItem(@RequestBody Catalog info) {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"AddCatalogService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Create Catalog\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\t\tif (info == null) {\n\t\t\treturn new ResponseEntity<String>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\tString errorMsg = info.validate();\n\t\tif (errorMsg != null) {\n\t\t\treturn new ResponseEntity<String>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tPrometheus.createCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"GetCatalogsFromMongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tCatalog catalogItem = service.getCatalogItem(info.getSkuNumber(), mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalogItem != null) {\n\t\t\t\treturn new ResponseEntity<String>(HttpStatus.CONFLICT);\n\t\t\t} else {\n\t\t\t\tio.opentracing.Span addCatalogSpan = tracer.buildSpan(\"AddCatalogToDB\").asChildOf(span)\n\t\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\t\tbrave.Span braveaddCatalogSpan = ((BraveSpan) addCatalogSpan).unwrap();\n\t\t\t\tCatalog result = service.createCatalog(info, addCatalogSpan);\n\t\t\t\tbraveaddCatalogSpan.finish();\n\n\t\t\t\tif (result != null) {\n\t\t\t\t\treturn new ResponseEntity<String>(HttpStatus.CREATED);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in addCatalogItem\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<String>(HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t\treturn null;\n\t}", "public static void returnAddNewServicesMenu() {\n System.out.print(\"Please enter a number to continue:\");\n processAddnewServicesMenu();\n }", "protected ProcessAddPerson() {\n }", "public TIdAddPotentialServicesEntity() {\n\t\tsuper();\n }", "@Override\r\n\tpublic sn.ucad.master.assurance.bo.Service ajoutService(sn.ucad.master.assurance.bo.Service service) {\n\t\treturn serviceRepository.save(service);\r\n\t}", "@Override\n\tpublic String addInstance(String serviceName, String hostName) {\n\t\tServiceManager serviceManager = loadBalance.search(serviceName);\n\t\tif (serviceManager == null) {\n\t\t\treturn \"Service not added previouly using ADD_SERVICE\";\n\t\t}\n\t\tArrayList<String> hostNames = serviceManager.getHostnames();\n\t\tif (cluster.containsKey(hostName)) {\n\t\t\tif (hostNames.contains(hostName)) {\n\t\t\t\treturn \"Service already exist\";\n\t\t\t} else {\n\t\t\t\thostNames.add(hostName);\n\t\t\t\tserviceManager.setHostnames(hostNames);\n\t\t\t\treturn \"Instance Added\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"Invalid Machine\";\n\t\t}\n\t}", "public void setServices(com.hps.july.persistence.ServiceAccessBean newServices) throws Exception {\n\tif (newServices == null) {\n\t\tservicecode = null;\n\t\tservicename = \"\";\n\t}\n\telse {\n\t\tservicecode = new Integer(newServices.getDivision());\n\t\tservicename = newServices.getName();\n\t}\n}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData addNewAuditingCompany();", "public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }", "public void processAddStation() {\n AppTextEnterDialogSingleton dialog = AppTextEnterDialogSingleton.getSingleton();\n\n // POP UP THE DIALOG\n dialog.show(\"Add Metro Station\", \"Enter Name of the Metro Station:\");\n \n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_STATION_MODE);\n }", "@PostMapping(\"/AddHR\")\r\n public Serializable addHRService(@RequestBody HR hr) {\r\n return admin.addHRService(hr);\r\n }", "public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "private static void addInstance(String[] args,CuratorFramework client,String command,\n List<ExampleServer> servers) throws Exception {\n \n if (args.length < 2) {\n System.err.println(\"syntax error (expected add <name> <description>): \" + command);\n return;\n }\n \n StringBuilder description = new StringBuilder();\n for (int i = 1; i < args.length; ++i) {\n if (i > 1) {\n description.append(' ');\n }\n description.append(args[i]);\n }\n \n String serviceName = args[0];\n ExampleServer server = new ExampleServer(client,PATH,serviceName,description.toString());\n servers.add(server);\n server.start();\n \n System.out.println(serviceName + \" added\");\n }", "public org.biocatalogue.x2009.xml.rest.ServiceDeployment addNewServiceDeployment()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.ServiceDeployment target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().add_element_user(SERVICEDEPLOYMENT$0);\r\n return target;\r\n }\r\n }", "public void publicService(){\n\t\tSystem.out.println(\"Name:\");\n\t\tString nameRegistered = reader.nextLine();\n\t\tSystem.out.println(\"Nit:\");\n\t\tString nit = reader.nextLine();\n\t\tSystem.out.println(\"Address:\");\n\t\tString address = reader.nextLine();\n\t\tSystem.out.println(\"Contact number:\");\n\t\tString contactNumber = reader.nextLine();\n\t\tSystem.out.println(\"Number of employees:\");\n\t\tint employees = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Value of the actives:\");\n\t\tdouble value = reader.nextDouble();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Legal representative:\");\n\t\tString legalRepresentative = reader.nextLine();\n\t\tSystem.out.println(\"Constitution date:\");\n\t\tSystem.out.println(\"Day:\");\n\t\tint day = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Month:\");\n\t\tint month = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Year:\");\n\t\tint year = reader.nextInt();\n\t\treader.nextLine();\n\t\tDate constitution = new Date(day, month, year);\n\t\tSystem.out.println(\"floors of the building\");\n\t\tint rows = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Type:\");\n\t\tString type = reader.nextLine();\n\t\tSystem.out.println(\"Type service:\");\n\t\tSystem.out.println(\"1. sewerage\");\n\t\tSystem.out.println(\"2. energy\");\n\t\tSystem.out.println(\"3. aqueduct\");\n\t\tint typeService = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Quantity of subscribers:\");\n\t\tint subscribers = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Quantity of subscribers in stratum 1 and 2:\");\n\t\tint subscribersStratum = reader.nextInt();\n\t\treader.nextLine();\n\t\tPublicService toAdd = new PublicService(nameRegistered, nit, address, contactNumber, employees, value, legalRepresentative, constitution, rows, type, typeService, subscribers, subscribersStratum);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\tSystem.out.println(\"The company were added successfuly\");\n\t}", "public void addFreeService(String name) {\n serviceCount++;\n LayoutInflater inflater = LayoutInflater.from(getContext());\n View inflatedLayout = inflater.inflate(R.layout.freeservices_item_row, null);\n TextView servicesName = inflatedLayout.findViewById(R.id.name);\n TextView count = inflatedLayout.findViewById(R.id.count);\n count.setText(serviceCount + \"\");\n servicesName.setText(name);\n freServiceesLayoutView.addView(inflatedLayout);\n\n }", "public boolean add(ConProcess conProcess) throws AppException;", "public void addServiceManager(BamServiceManager serviceManager)\n {\n BamServiceManager []serviceManagerList\n = new BamServiceManager[_serviceManagerList.length + 1];\n \n System.arraycopy(_serviceManagerList, 0, serviceManagerList, 0,\n \t\t _serviceManagerList.length);\n serviceManagerList[serviceManagerList.length - 1] = serviceManager;\n _serviceManagerList = serviceManagerList;\n }", "public void service() {\n\t}", "public Services(ArrayList<ServiceTypes> serviceTypes) {\n this.indexes = new ArrayList<Integer>();\n this.services = new ArrayList<String>();\n for(int i = 0; i < serviceTypes.size(); i++) {\n this.indexes.add(serviceTypes.get(i).getValue()); // Retrieve the index of the Service\n this.services.add(serviceTypes.get(i).getKey()); // Retrieve the name of the Service\n }\n\n }", "InboundServicesType createInboundServicesType();", "public Builder addServices(\n int index, go.micro.runtime.RuntimeOuterClass.Service value) {\n if (servicesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureServicesIsMutable();\n services_.add(index, value);\n onChanged();\n } else {\n servicesBuilder_.addMessage(index, value);\n }\n return this;\n }", "public Builder addServices(\n int index, go.micro.runtime.RuntimeOuterClass.Service value) {\n if (servicesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureServicesIsMutable();\n services_.add(index, value);\n onChanged();\n } else {\n servicesBuilder_.addMessage(index, value);\n }\n return this;\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"service on create\");\n\t\tsuper.onCreate();\n\t}", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.FurtherRelations addNewFurtherRelations();", "private void showServices()\n {\n // Remove all of the items from the listField.\n _treeField.deleteAll();\n \n // Get a copy of the ServiceRouting class.\n ServiceRouting serviceRouting = ServiceRouting.getInstance();\n \n // Add in our new items by trolling through the ServiceBook API.\n ServiceBook sb = ServiceBook.getSB();\n ServiceRecord[] records = sb.getRecords();\n \n if( records == null ) \n {\n return;\n }\n \n int rootNode = _treeField.addChildNode( 0, \"Service Records\" );\n \n int numRecords = records.length;\n \n for( int i = 0; i < numRecords; i++ ) \n {\n String name = records[i].getName();\n String description = records[i].getDescription();\n \n if( description == null || description.length() == 0 ) \n {\n description = \"No description available\" ;\n }\n \n String uid = records[i].getUid();\n boolean serialBypass = serviceRouting.isSerialBypassActive( uid );\n\n int newParentNode = _treeField.addChildNode( rootNode, name );\n _treeField.addChildNode( newParentNode, description );\n _treeField.addChildNode( newParentNode, uid );\n _treeField.addChildNode( newParentNode, serialBypass ? \"Serial Bypass: Connected\" : \"Serial Bypass: Disconnected\");\n \n // Perform the check for the Desktop SerialRecord.\n if( name != null && name.equals( \"Desktop\" )) \n {\n _desktopUID = uid;\n }\n }\n \n _treeField.setCurrentNode( rootNode ); // Set the root as the starting point.\n }", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder(\n int index) {\n return getServicesFieldBuilder().addBuilder(\n index, go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder(\n int index) {\n return getServicesFieldBuilder().addBuilder(\n index, go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "public void insert(int serverId, \n List<ServiceInfo> serviceList, \n ServiceRuntimeRegistry runtimeRegistry) throws Exception {\n \n conn = pool.getConnection();\n logger.debug(\"Query : \" + INSERT_SERVICE_SQL);\n PreparedStatement pstmt = conn.prepareStatement(INSERT_SERVICE_SQL, \n Statement.RETURN_GENERATED_KEYS);\n ResultSet resultSet = null;\n \n try {\n for(int i = 0; i < serviceList.size(); i++) {\n ServiceInfo info = serviceList.get(i);\n \n DbUtil.setValue2Pstmt(pstmt, logger, 1, serverId);\n DbUtil.setValue2Pstmt(pstmt, logger, 2, info.getUrl());\n DbUtil.setValue2Pstmt(pstmt, logger, 3, \"not supported\");\n DbUtil.setValue2Pstmt(pstmt, logger, 4, info.getClassName());\n \n \n if(info.getMBeanClassName() == null) {\n DbUtil.setNull2Pstmt(pstmt, logger, 5, Types.VARCHAR);\n \n } else {\n DbUtil.setValue2Pstmt(pstmt, logger, 5, info.getMBeanClassName());\n }\n DbUtil.setValue2Pstmt(pstmt, logger, 6, info.getExecType());\n \n pstmt.executeUpdate();\n \n int newId;\n resultSet = pstmt.getGeneratedKeys();\n \n if(resultSet.next()) {\n newId = resultSet.getInt(1);\n } else {\n throw new SQLException(\"auto id is not retievied.\");\n }\n \n ServiceRuntimeInfo runInfo = runtimeRegistry.getServiceRuntimeInfo(info.getUrl());\n runInfo.setServiceRuntimeId(newId);\n }\n conn.commit();\n \n } catch(Exception e) {\n DbUtil.rollback(conn, pstmt);\n\t logger.error(\"Query : \" + INSERT_SERVICE_SQL);\n\t throw e;\n } finally {\n DbUtil.closeAll(conn, pstmt);\n }\n \n }", "public void adicionarServicos() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Não existem hospedes cadastrados!\\n\");\n } else {\n\n System.err.println(\"Digite o cpf do hospede que deseja adicionar servicos:\");\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//pega o indice i do objeo pessoa, pega o id da pessoa e compara com o id da pessoa digitada\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se a situaçao do contrato ainda está aberta para esse hospede\n\n System.err.println(\"O que deseja editar do contrato\\n\");\n //adicionar carro, trocar de quarto, adicionar conta de restaurante,\n //encerrar contrato\n\n System.err.println(\"Adicionar carro (1):\\nAdicionar restaurante (2):\\n\"\n + \"Adicionar horas de BabySitter (3):\\nAdicionar quarto(4):\\n\");\n int caso = verifica();\n switch (caso) {\n case 1://carro\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados!\\n\");\n } else {\n listarCarros();\n System.err.println(\"Digite o id do carro que deseja contratar:\\n\");\n int idCarro = verifica();\n\n for (int j = 0; j < carrosCadastrados.size(); j++) {\n if (carrosCadastrados.get(j).getId() == idCarro) {\n if (carrosCadastrados.get(j).isEstado()) {\n System.err.println(\"Esse carro já está cadastrado.\\n\");\n } else {\n hospedesCadastrados.get(i).getContrato().setCarros(carrosCadastrados.get(j));\n carrosCadastrados.get(j).setEstado(true);\n }\n }\n }\n }\n break;\n\n case 2://restaurante\n System.err.println(\"Digite o quanto deseja gastar no restaurente\\n\");\n double valorRestaurante = ler.nextDouble();\n// idd();\n// int idRestaurante = id;\n// Restaurante restaurante = new Restaurante(idRestaurante, valorRestaurante);\n hospedesCadastrados.get(i).getContrato().setValorRestaurante(valorRestaurante);\n break;\n case 3://babysitter\n System.err.println(\"Digite o tempo gasto no BabySytter em horas\\n\");\n double tempoBaby = ler.nextDouble();\n hospedesCadastrados.get(i).getContrato().setHorasBaby(tempoBaby);\n break;\n case 4://quartos\n\n if (quartosCadastrados.isEmpty()) {\n\n } else {\n System.err.println(\"Digite o numero do quarto que deseja contratar:\\n\");\n listarQuartos();\n int num = verifica();\n System.err.println(\"Digite a quantidade de dis que pretente alugar o quarto:\\n\");\n int dias = verifica();\n for (int j = 0; j < quartosCadastrados.size(); j++) {\n if (num == quartosCadastrados.get(j).getNumero()) {//verifica se o numero digitado é igual ao numero do quarto do laco\n if (quartosCadastrados.get(j).getEstado()) {//verifica se o estado do quarto está como true\n System.err.println(\"Este quarto já está cadastrado em um contrato\");\n } else {//se o estado tiver em true é porque o quarto ja está cadastrado\n\n hospedesCadastrados.get(i).getContrato().setQuartos(quartosCadastrados.get(j));\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setDias(dias);\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setEstado(true);//seta o estado do quarto como ocupado\n System.err.println(\"Quarto cadastrado!\\n\");\n }\n\n }\n\n }\n\n//remove all remove todas as pessoas com tal nome\t\n }\n break;\n\n }\n } else {\n System.err.println(\"O contrato deste Hospede encontra-se encerrado\");\n break;\n }\n }\n }\n }\n }", "public void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public void addServiceEntriesToDD(String serviceName, String serviceEndpointInterface, String serviceEndpoint);", "public void addService(ServiceType service, String name, String usertoken) throws AddServiceFailException, NoUserLoggedInException{\r\n\t\ttry {\r\n\t\t\tthis.service.addService(this.getLoggedInUser().getId(), service.getId(), name, usertoken);\r\n\t\t} catch (RemoteException e) {\r\n\t\t\tthrow new AddServiceFailException(ExceptionType.WARNING);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void insertarServicio(Servicio nuevoServicio) {\n\t\tservicioDao= new ServicioDaoImpl();\n\t\tservicioDao.insertarServicio(nuevoServicio);\n\t\t\n\t\t\n\t}", "private void insertServiceSQLite(ArrayList<ServiceModel> servicesModel) {\n db.execSQL(\"DELETE FROM \" + DBSQLite.TABLE_PRICE_SERVICE\n + \" WHERE \" + DBSQLite.KEY_PRICE_SERVICE_IS_OFFER + \"=0\");\n db.execSQL(\"DELETE FROM \" + DBSQLite.TABLE_SERVICE);\n\n for (ServiceModel serviceModel : servicesModel) {\n ContentValues serviceContent = new ContentValues();\n\n serviceContent.put(DBSQLite.KEY_SERVICE_ID, serviceModel.getId());\n serviceContent.put(DBSQLite.KEY_SERVICE_NAME, serviceModel.getName());\n serviceContent.put(DBSQLite.KEY_SERVICE_DESCRIPTION, serviceModel.getDescription());\n serviceContent.put(DBSQLite.KEY_SERVICE_IMAGE, serviceModel.getImage());\n serviceContent.put(DBSQLite.KEY_SERVICE_RESERVED, serviceModel.getReserved());\n serviceContent.put(DBSQLite.KEY_SERVICE_ID_TYPE, serviceModel.getIdType());\n serviceContent.put(DBSQLite.KEY_SERVICE_NAME_TYPE, serviceModel.getNameType());\n serviceContent.put(DBSQLite.KEY_SERVICE_VALUE_TYPE, serviceModel.getValueType());\n\n if (db.insert(DBSQLite.TABLE_SERVICE, null, serviceContent) == -1)\n System.out.println(\"Ocurrio un error al inserar la consulta en ServiceModel\");\n\n serviceServicePrice.insertServicePriceSQLite(serviceModel.getServicePrice());\n }\n }", "@Override\r\n public void add() {\n String ID =id.getText();\r\n String Name =name.getText();\r\n String form_date =date_start.getText();\r\n String to_date =date_finish.getText();\r\n String Status =status.getText();\r\n String MemberID = MemberId.getText();\r\n ArrayList<String> arr = new ArrayList<String>();\r\n arr.add(ID);\r\n arr.add(Name);\r\n arr.add(form_date);\r\n arr.add(to_date);\r\n arr.add(Status);\r\n arr.add(MemberID);\r\n String PathFile = \"/home/yara/Documents/4year/OODP/Task.txt\";\r\n FileFacade facade = new FileFacade();\r\n facade.Add(PathFile, arr);\r\n }", "public static void setupServicesAndParameters(){\n\t\t//replace services in use, e.g.:\n\t\t/*\n\t\tMap<String, ArrayList<String>> systemInterviewServicesMap = new HashMap<>();\n\t\t\n\t\t//CONTROL DEVICES\n\t\tArrayList<String> controlDevice = new ArrayList<String>();\n\t\t\tcontrolDevice.add(MyDeviceControlService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.CONTROL, controlDevice);\n\t\t\n\t\t//BANKING\n\t\tArrayList<String> banking = new ArrayList<String>();\n\t\t\tbanking.add(MyBankingService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.BANKING, banking);\n\t\t\t\n\t\tInterviewServicesMap.loadCustom(systemInterviewServicesMap);\n\t\t*/\n\t\t\n\t\t//defaults\n\t\tStart.setupServicesAndParameters();\n\t\t\n\t\t//add\n\t\t//e.g.: ParameterConfig.setHandler(PARAMETERS.ALARM_NAME, Config.parentPackage + \".parameters.AlarmName\");\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.WhoOwnsWhom addNewWhoOwnsWhom();", "public void onServiceRegistered() {\r\n \t// Nothing to do here\r\n }", "@Override\r\n public void onCreate() {\r\n Log.d(TAG, \"on service create\");\r\n }", "@Override\n\tpublic void serviceAdded(ServiceEvent arg0) {\n\t\tServiceInfo serviceInfo = mJmDNS.getServiceInfo(arg0.getType(),\n\t\t\t\targ0.getName());\n\t\tif (onFoundListener != null) {\n\t\t\tonFoundListener.onFound(serviceInfo);\n\t\t}\n\t}", "@RequestMapping(value = \"/agent/enrollment/addPendingCOS\", method = RequestMethod.POST)\n public ModelAndView addPendingCategoryOfService(@RequestParam(\"id\") long ticketId,\n @RequestParam(\"startDate\") Date startDate, @RequestParam(\"endDate\") String endDate,\n @RequestParam(\"cos\") String[] cos, @RequestParam(\"prevCosId\") long prevCosId,\n @RequestParam(\"prevCosEndDate\") String prevCosEndDate) throws PortalServiceException {\n String signature = \"EnrollmentController#addCategoryOfService(long profileId, String startDate, String endDate, String cos)\";\n LogUtil.traceEntry(getLog(), signature, new String[] { \"id\", \"startDate\", \"endDate\", \"cos\" }, new Object[] {\n ticketId, startDate, endDate, cos });\n CMSUser user = ControllerHelper.getCurrentUser();\n ProviderCategoryOfService categoryOfService = new ProviderCategoryOfService();\n List<CategoryOfService> categories = new ArrayList<CategoryOfService>();\n for (String c : cos) {\n categories.add(lookupService.findLookupByCode(CategoryOfService.class, c));\n }\n if (cos.length > 0 && startDate != null) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n categoryOfService.setCategories(categories);\n categoryOfService.setStartDate(startDate);\n if (endDate != null && endDate.trim().length() > 0) {\n try {\n categoryOfService.setEndDate(dateFormat.parse(endDate));\n } catch (ParseException e) {\n // ignore\n }\n }\n categoryOfService.setTicketId(ticketId);\n Date prevCatEndDate = null;\n if (prevCosId != 0) {\n try {\n prevCatEndDate = dateFormat.parse(prevCosEndDate);\n } catch (ParseException e) {\n // ignore\n }\n }\n enrollmentService.addCOSToTicket(user, categoryOfService, prevCosId, prevCatEndDate);\n }\n return new ModelAndView(\"redirect:/agent/enrollment/pendingcos?id=\" + ticketId);\n }" ]
[ "0.806245", "0.75640994", "0.7217116", "0.71151364", "0.7015427", "0.6962962", "0.6759562", "0.6658083", "0.661295", "0.661276", "0.6577973", "0.6566626", "0.6535541", "0.6516138", "0.64875484", "0.64875484", "0.64767575", "0.6358367", "0.63355833", "0.6315609", "0.6304042", "0.62934375", "0.6239878", "0.6213936", "0.6208736", "0.620077", "0.6164578", "0.6153387", "0.61485374", "0.61425376", "0.6108412", "0.61031723", "0.60801965", "0.6051618", "0.6046918", "0.6031233", "0.6026559", "0.6025128", "0.6020884", "0.60096663", "0.6004141", "0.60041255", "0.60003453", "0.5992982", "0.59846675", "0.5969457", "0.59688556", "0.5952078", "0.59358156", "0.5929577", "0.59237784", "0.5894455", "0.5880567", "0.58777326", "0.5828243", "0.579402", "0.57452273", "0.5744244", "0.57384354", "0.5708352", "0.5700074", "0.5691209", "0.56680626", "0.56483173", "0.56477153", "0.5642018", "0.56325454", "0.5623598", "0.56150705", "0.561354", "0.5611245", "0.5607866", "0.5604418", "0.55994725", "0.558759", "0.5571556", "0.55714154", "0.55700856", "0.55618966", "0.55618966", "0.55593866", "0.5547277", "0.55465", "0.5545877", "0.5544554", "0.5544554", "0.5543614", "0.55422133", "0.55391055", "0.5533553", "0.5526072", "0.55259866", "0.55257803", "0.5512544", "0.550928", "0.55073905", "0.5507301", "0.54894733", "0.54680735", "0.54631597" ]
0.68251777
6
Add New Villa method
public static void addNewVilla() { Services villa = new Villa(); villa = addNewService(villa); ((Villa) villa).setRoomType(FuncValidation.getValidName(ENTER_ROOM_TYPE,INVALID_NAME)); ((Villa) villa).setFacilities(FuncValidation.getValidName(ENTER_FACILITIIES,INVALID_NAME)); ((Villa) villa).setPoolArea(FuncValidation.getValidDoubleNumber(ENTER_POOL_AREA,INVALID_DOUBLE_NUMBER,30.0)); ((Villa) villa).setNumberOfFloor(FuncValidation.getValidIntegerNumber(ENTER_NUMBER_OF_FLOOR,INVALID_NUMBER_OF_FLOOR, 0)); //Get villa list from CSV ArrayList<Villa> villaList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.VILLA); //Add villa to list villaList.add((Villa) villa); //Write villa list to CSV FuncReadWriteCSV.writeVillaToFileCSV(villaList); System.out.println("----Villa "+villa.getNameOfService()+" added to list---- "); addNewServices(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addMethod(Method method);", "org.hl7.fhir.CodeableConcept addNewMethod();", "Method createMethod();", "Method createMethod();", "private void addMethod(MethodNode methodNode){\n\t\t\tString[] exceptions = new String[methodNode.exceptions.size()];\n\t\t\tmethodNode.exceptions.toArray(exceptions);\n\t\t\tMethodVisitor mv = cv.visitMethod(methodNode.access, methodNode.name, methodNode.desc, methodNode.signature, exceptions);\n\n\t\t\tmethodNode.instructions.resetLabels();\n\t\t\t// SimpleRemapper -> maps old name to new name\n\t\t\t// updates owners and descriptions appropriately\n\t\t\tmethodNode.accept(new RemappingMethodAdapter(methodNode.access, methodNode.desc, mv, new SimpleRemapper(classToMerge.name, baseClassName)));\n\t\t}", "public void addMethod(String method) {\n\t\tif (!(methods.contains(method))){\n\t\t\tmethods.add(method);\t\t\t\n\t\t}\n\t}", "org.globus.swift.language.Function addNewFunction();", "public void addMethod(MethodRequest method) {\n\t\tmethods.add(method);\n\t}", "private String addNewMethodToProto() {\n String methodName = METHOD_IN_PROTO_PREFIX + methodsInProtoCount;\n addMethodToProto(methodName);\n methodsInProtoCount++;\n\n return methodName;\n }", "MethodStart createMethodStart();", "@Override\r\n \tpublic void addMethods(KawaWrap kawa) throws Throwable {\r\n \tkawa.eval(\"(define (sub1 n) (- n 1))\");\r\n \tkawa.eval(\"(define (add1 n) (+ n 1))\");\r\n \t}", "public Object visit(Method node){\n ClassTreeNode treeNode = classMap.get(currentClass);\n treeNode.getMethodSymbolTable().add(node.getName(), node);\n //System.out.println(\"Adding method \" + node.getName() + \" to \" + currentClass);\n treeNode.getVarSymbolTable().enterScope();\n super.visit(node);\n return null;\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "void addMiximMethod(MethodNode method) {\n this.miximMethods.add(method);\n }", "H create(Method method);", "abstract protected Set<Method> createMethods();", "public void addMethod(MethodInfo methodInfo) {\n lstMethodInfo.add(methodInfo);\n }", "static void add() {\r\n\t\tSystem.out.println(\"Overloading Method\");\r\n\t}", "public abstract void add(T input, List<Method> methods);", "public void myExtraMethod_login() {\n\tSystem.out.println(\"this is my method that i added to this class and not from interface. This is login\");\n}", "public void addMethod(Method methodToAdd) {\n\t\tif (!verifyExistsMethod(methodToAdd))\n\t\t\tarrayMethods.add(methodToAdd);\n\t}", "public Method addMethod(String sName, String sSig)\n {\n ensureLoaded();\n Method method = new Method(sName, sSig, m_flags.isInterface());\n m_tblMethod.put(method.getIdentity(), method);\n setModified(true);\n return method;\n }", "void updateMethod(Method method);", "public void addMethod(MethodDeclaration method) {\n m_classBuilder.addMethod(method);\n }", "public void setMethod(String method) {\r\n this.method = method;\r\n }", "@Override\n\tpublic void nuevo() {\n\n\t}", "public String addMember()//value=\"addmember\", method=RequestMethod.)\n\t{\n\t\treturn \"addmember\";\n\t}", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public void method(){}", "Method addMethod(PositionString name, Symbol resultType, Iterator<Variable> parameters,\n\t\t\tModifier modifier) throws\n\t\t\tDuplicateIdentifierException, ShadowedIdentifierException, WrongModifierException, InvalidIdentifierException;", "@Override\n\tpublic void inAMethoddclMember(AMethoddclMember node) {\n\t\tString methodName = node.getId().getText();\n\t\tcurrentMethod = currentClass.getMethod(methodName);\n\t\tif (!currentMethod.isAbstract()){\n\t\t\tcreateMethod(methodName);\n\t\t}\n\t\telse{\n\t\t\tcreateAbstractMethod(methodName); \n\t\t}\n\t}", "@Override // Métodos que fazem a anulação\n\tpublic void vota() {\n\t\t\n\t}", "public void setMethod(Method method) {\n this.method = method;\n }", "@Override\n\tpublic Void visit(Method method) {\n\t\tprintIndent(\"method\");\n\t\tindent++;\n\t\tmethod.id.accept(this);\n\t\tfor (var v : method.formals)\n\t\t\tv.accept(this);\n\t\tmethod.type.accept(this);\n\t\tmethod.body.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "public\tvoid\taddChangedMethod(String name, String newSignature, String prevSignature) {\n\t\t\n\t\tChangedJsMethod m = new ChangedJsMethod(name, newSignature, prevSignature);\n\t\tchangedMethods.add(m);\n\t}", "public void updateMethods (Method method) throws RepeatMethodName{\n for (Method met:methods){ // check if there isn't already method with such name\n if (met.getName().equals(method.getName())){\n throw new RepeatMethodName();\n }\n }\n methods.add(method);\n }", "public TypeData addMethod(final AbstractProgramData<?> _method)\n {\n this.methods.add(_method);\n return this;\n }", "public void add() {\n\n }", "@Override\n public boolean visit(MethodDeclaration node) {\n methods.add(node);\n return super.visit(node);\n }", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "@Test\n\tpublic void testAddMethod() {\n\t\taddSomeMethods();\n\t\tassertTrue(manager.famixMethodExists(\"pack1.TestClass.a\"));\n\t\tassertTrue(manager.famixMethodExists(\"pack1.TestClass.b\"));\n\t\tassertEquals(1, manager.getFamixMethod(\"pack1.TestClass.a\").getAffectingChanges().size());\n\t\tassertEquals(1, manager.getFamixMethod(\"pack1.TestClass.b\").getAffectingChanges().size());\n\t\t// TODO check that this change is actually an addition!!!\n\t}", "void method25()\n {\n }", "public void addExtensionMethod(String extensionMethod) {\n \tif (extensionMethod.equals(Request.NOTIFY)) {\n \t\tif (LogWriter.needsLogging) \n \t\t\tLogWriter.logMessage(\"NOTIFY Supported Natively\");\n \t} else {\n this.dialogCreatingMethods.add(extensionMethod.trim().toUpperCase());\n \t}\n }", "void method_115();", "public Method addMethod(String sSig)\n {\n int of = sSig.indexOf('(');\n return addMethod(sSig.substring(0, of), sSig.substring(of));\n }", "private void createMethod(MethodNode method, StringBuffer completion) {\n int insertedModifiers = method.getModifiers() & ~(Opcodes.ACC_NATIVE | Opcodes.ACC_ABSTRACT | Opcodes.ACC_PUBLIC);\n ASTNode.printModifiers(insertedModifiers, completion);\n\n //// Type parameters\n // ignore too difficult and not really needed for Groovy\n\n// GenericsType[] typeVariableBindings = method.getGenericsTypes();\n// if(typeVariableBindings != null && typeVariableBindings.length != 0) {\n// completion.append('<');\n// for (int i = 0; i < typeVariableBindings.length; i++) {\n// if(i != 0) {\n// completion.append(',');\n// completion.append(' ');\n// }\n// createTypeVariable(typeVariableBindings[i], completion);\n// }\n// completion.append('>');\n// completion.append(' ');\n// }\n\n //// Return type\n createType(method.getReturnType(), completion, false);\n completion.append(' ');\n\n //// Selector\n completion.append(method.getName());\n\n completion.append('(');\n\n ////Parameters\n Parameter[] parameters = method.getParameters();\n int length = parameters.length;\n for (int i = 0; i < length; i++) {\n if(i != 0) {\n completion.append(',');\n completion.append(' ');\n }\n createType(parameters[i].getType(), completion, true);\n completion.append(' ');\n completion.append(parameters[i].getName());\n }\n\n completion.append(')');\n\n //// Exceptions\n ClassNode[] exceptions = method.getExceptions();\n\n if (exceptions != null && exceptions.length > 0){\n completion.append(' ');\n completion.append(\"throws\");\n completion.append(' ');\n for(int i = 0; i < exceptions.length ; i++){\n if(i != 0) {\n completion.append(' ');\n completion.append(',');\n }\n createType(exceptions[i], completion, false);\n }\n }\n }", "public void add() {\n\t\tSystem.out.println(\"I am from Add method\");\n\t}", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "@Override\n\tpublic void randomMethod(String name) {\n\t\t\n\t}", "public MLMethod createMethod() {\n\t\tif (this.methodType == null) {\n\t\t\tthrow new EncogError(\n\t\t\t\t\t\"Please call selectMethod first to choose what type of method you wish to use.\");\n\t\t}\n\t\tMLMethodFactory methodFactory = new MLMethodFactory();\n\t\tMLMethod method = methodFactory.create(methodType, methodArgs, dataset\n\t\t\t\t.getNormHelper().calculateNormalizedInputCount(), this.config\n\t\t\t\t.determineOutputCount(dataset));\n\t\treturn method;\n\t}", "@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}", "private void add() {\n\n\t}", "public void add() {\n }", "public StacLink method(String method) {\n this.method = method;\n return this;\n }", "@Override\n public void matiz() {\n System.out.println(\"New not Abstract method\");\n }", "BOpMethod createBOpMethod();", "public void setMethod(String newValue);", "MethodName getMethod();", "public void setMethod(String method)\r\n {\r\n routing_method=method;\r\n }", "@Override\n public void run() {\n PsiElementFactory elementFactory = PsiElementFactory.SERVICE.getInstance(project);\n\n PsiField newField = elementFactory.createFieldFromText(fieldSource, null);\n PsiMethod newMethod = elementFactory.createMethodFromText(methodSource, null);\n\n psiFieldModel.set(newField);\n psiMethodModel.set(newMethod);\n }", "private void populateMethod(UIBean uiBean) {\r\n String methodName;\r\n if (method != null) {\r\n methodName = eval.evaluateExpression(method);\r\n } else {\r\n methodName = DEFAULT_METHOD;\r\n }\r\n uiBean.addParameter(\"method\", methodName);\r\n }", "@Override\n\t\t\t\t\tpublic Method handleSimpleMethod(Element parent, FMethod src) {\n\t\t\t\t\t\treturn super.handleSimpleMethod(parent, src);\n\t\t\t\t\t}", "private Add() {}", "private Add() {}", "public void addOverride(JMethod toAdd) {\n assert canBePolymorphic();\n overrides = Lists.add(overrides, toAdd);\n }", "@SuppressWarnings(\"hiding\")\n @Override\n public void setMethod(String method) {\n this.method = method;\n }", "public ASTMethod(ASTNode node, Class clz, MetaMethod method, boolean isGDK) {\n super(node);\n this.clz = clz;\n this.method = method;\n this.isGDK = isGDK;\n }", "private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}", "public void volar() {\n }", "MethodEnd createMethodEnd();", "@Override\n public void visit(MethodDeclaration n, Object arg) {\n \tArrayList<String> method = new ArrayList<String>();\n \tif(n.getJavaDoc()!=null){\n\t \tmethod.add(n.getName());\n\t \tString comment = n.getJavaDoc().getContent();\n\t \tcomment = comment.replaceAll(\"\\\\* @param (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @return (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @throws (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* \",\"\");\n\t \tmethod.add(comment.trim()); \n\t \tmethods.add(method);\n \t}\n \t}", "public void addMethod(String className, String methodName, String methodType, String methodVis, List<String> paramNames, List<String> paramTypes)\n\t{\n\t\tstoreViewState();\n\t\tproject.addMethod(className, methodName, methodType, methodVis, paramNames, paramTypes);\n\t\tcheckStatus();\n\t}", "@Override\n public ASTNode visitMethod(CoolParser.MethodContext ctx) {\n List<FormalNode> parameters = new LinkedList<>();\n for (var formal : ctx.formal()) {\n parameters.add((FormalNode) visitFormal(formal));\n }\n\n return new MethodNode(\n ctx.id,\n new IdNode(ctx.id),\n parameters,\n new TypeNode(ctx.returnType),\n (ExprNode) ctx.expr().accept(this));\n }", "public void amethod() {\n\t}", "public Method getMethod();", "private void addClassOrMethod(String methodOrClass) {\n\t\t//System.out.println(\"###addClassOrMethod [\" + methodOrClass + \"]\");\n\t\tSimpleMethod method = new SimpleMethod();\n\t\t\n\t\tList<SimpleMethod> allMethods = null;\n\t\t\n\t\tString[] parts = methodOrClass.split(CLASS_METHOD_DELIMITER);\n\t\tif (parts.length >= 1 && parts[0]!=null) {\n\t\t\tallMethods = this.myInstrCriteria.get(parts[0]);\n\t\t\tif (allMethods == null) {\n\t\t\t\tallMethods = new ArrayList<SimpleMethod>();\n\t\t\t\t//this.logVerbose(\"in addClassOrMethod just created allMethods hash[\" + allMethods.hashCode() + \"]myInstrCriteriaHash[\" + myInstrCriteria.hashCode() + \"]\");\n\t\t\t\tthis.myInstrCriteria.put(parts[0], allMethods);\n\t\t\t}\n\t\t\t\n\t\t\tswitch (parts.length) {\n\t\t\t\tcase 1: //just the package and class name were specified, meaning that all methods should be instrumented.\n\t\t\t\t\tmethod.ynAllMethods = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: //a method was specified after a # sign...only instrument this specific method.\n\t\t\t\t\tmethod.setNameAndArgs(parts[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new RuntimeException(\"Was expecting to find either zero or one of the [\" + this.CLASS_METHOD_DELIMITER + \"] character inside of [\" + methodOrClass + \"]\");\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Error adding this method/class [\" + methodOrClass + \"]\");\n\t\t}\n\t\tallMethods.add(method);\n//\t\tSystem.out.println(\"## Just added methodName[\" + method.name + \"] methodArg [\" + method.args + \"]methodArgGetter [\" + method.getArgs() + \"]\");\n//\t\tSystem.out.println(\"@@@@@@@Class count [\" + myInstrCriteria.size() + \"] for class[\" + parts[0] + \"] count is [\" + allMethods.size() + \"]\");\n\t}", "public void addFilterToMethods(ViewerFilter filter);", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "InstrumentedType withMethod(MethodDescription.Token token);", "Method getMethod();", "Method getMethod();", "int apply(MethodVisitor methodVisitor, Method method);", "protected ResourceMethod defineMethod( String theName, JavaType theReturnType, HttpVerb theHttpVerb, String theMethodPath ) {\r\n\t\treturn new ResourceMethod( theName, theReturnType, theHttpVerb, theMethodPath, this );\r\n\t}", "@Override\n protected void adicionar(Funcionario funcionario) {\n\n }", "private void creerMethode() {\n if (estValide()) {\n methode = new Methode();\n methode.setNom(textFieldNom.getText());\n methode.setVisibilite(comboBoxVisibilite.getValue());\n methode.setType(comboBoxType.getValue());\n ArrayList<Parametre> temp = new ArrayList<>();\n for (Parametre parametre : parametreListView.getItems())\n temp.add(parametre);\n methode.setParametres(temp);\n close();\n }\n }", "private void method(String name) {\n app.method(name);\n }", "int register(String clazz, String method, String branch);", "public void addInstruction(){\n\n }", "public void method_202() {}", "void method();", "void method();", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public void addSimpleMethod(SimpleMethod method) {\n this.simpleMethodNameSet.add(method.getLocationAndName());\n }", "public interface MethodInteraction {\n\n void onMethodEdit(Method method, String newBody);\n\n void onMethodDrag(RecyclerView.ViewHolder holder);\n}", "@Override\n\tpublic void anular() {\n\n\t}", "public void my_method();", "Methodsig getMethod();", "public void add() {\n\t\t\n\t}" ]
[ "0.74228317", "0.73515517", "0.6583698", "0.6583698", "0.65136504", "0.64701974", "0.6242491", "0.6206249", "0.61709535", "0.615008", "0.60892296", "0.60421336", "0.6038953", "0.6036298", "0.59926003", "0.59659076", "0.5960034", "0.59525627", "0.5916221", "0.58638525", "0.58287984", "0.580424", "0.5799111", "0.57944256", "0.57928264", "0.57793295", "0.5773608", "0.5770863", "0.57672757", "0.5765393", "0.5755766", "0.5750226", "0.5743833", "0.57413805", "0.5691725", "0.56889707", "0.56881326", "0.5684828", "0.56840724", "0.5683487", "0.56652087", "0.5663672", "0.5662385", "0.5662203", "0.56548625", "0.5652205", "0.5648146", "0.5636828", "0.5634105", "0.5633063", "0.56241757", "0.5618461", "0.5610792", "0.5598145", "0.55928427", "0.5578044", "0.5577745", "0.55689853", "0.5566181", "0.5559422", "0.5559337", "0.5553453", "0.55482054", "0.55392855", "0.55392855", "0.55368483", "0.5513329", "0.5507023", "0.550168", "0.54989964", "0.5495111", "0.5495104", "0.54933256", "0.54927677", "0.5474846", "0.54731274", "0.5470943", "0.5469949", "0.5469614", "0.5469614", "0.54694474", "0.5462384", "0.5462384", "0.5451855", "0.54499686", "0.5447308", "0.5437144", "0.54349905", "0.5417516", "0.5407736", "0.5407696", "0.5405946", "0.5405946", "0.53946733", "0.5389726", "0.5384966", "0.5379629", "0.53669685", "0.5364889", "0.5361193" ]
0.5702607
34
Add New House method
public static void addNewHouse() { Services house = new House(); house = addNewService(house); ((House) house).setRoomType(FuncValidation.getValidName(ENTER_ROOM_TYPE,INVALID_NAME)); ((House) house).setFacilities(FuncValidation.getValidName(ENTER_FACILITIIES,INVALID_NAME)); ((House) house).setNumberOfFloor(FuncValidation.getValidIntegerNumber(ENTER_NUMBER_OF_FLOOR,INVALID_NUMBER_OF_FLOOR,0)); //Get list house from CSV ArrayList<House> houseList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.HOUSE); //Add house to list houseList.add((House) house); //Write house list to CSV FuncReadWriteCSV.writeHouseToFileCSV(houseList); System.out.println("----House "+house.getNameOfService()+" added to list---- "); addNewServices(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createNewHouseAndAddToList(){\n\t\t\tHouse newHouse = new House();\r\n\t\t\tString id = createAutomaticallyID().trim();\r\n\t\t\tnewHouse.setId(id);\r\n\t\t\tnewHouse.setPrice(Double.parseDouble(priceTextField.getText().trim()));\r\n\t\t\tnewHouse.setNumberOfBathrooms(Integer.parseInt(bathroomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setAirConditionerFeature(airConditionerComboBox.getSelectedItem().toString());\r\n\t\t\tnewHouse.setNumberOfRooms(Integer.parseInt(roomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setSize(Double.parseDouble(sizeTextField.getText().trim()));\r\n\t\t\t\r\n\t\t\toriginalHouseList.add(newHouse);//first adding newHouse to arrayList\r\n\t\t\tcopyEstateAgent.setHouseList(originalHouseList);//then set new arrayList in copyEstateAgent\r\n\r\n\t\t}", "@Override\r\n\tpublic boolean addHouse(House h) {\n\t\treturn adi.addHouse(h);\r\n\t}", "public void addHouse(House h) {\n\t\tObject[][] newContents = new Object[this.contents.length + 1][2];\n\n\t\tfor (int i = 0; i < this.contents.length; i++) {\n\t\t\tnewContents[i][0] = this.contents[i][0];\n\t\t\tnewContents[i][1] = this.contents[i][1];\n\t\t}\n\t\t\n\t\tnewContents[this.contents.length][0] = h.getZipCode();\n\t\tnewContents[this.contents.length][1] = h.getCity();\n\t\t\n\t\tHouse[] newHousesArray = new House[this.housesArray.length + 1];\n\t\tfor (int i = 0; i < this.housesArray.length; i++) {\n\t\t\tnewHousesArray[i] = this.housesArray[i];\n\t\t}\n\t\t\n\t\tnewHousesArray[this.housesArray.length] = h;\n\t\t\n\t\tthis.housesArray = newHousesArray;\n\t\t\n\t\tthis.contents = newContents;\n\t\t\n\t\tthis.fireTableDataChanged();\n\t}", "@Override\n public void create_building(ArrayList bulding){\n House house = new House(Adress.RUE_DE_LA_PAIX);\n System.out.println(\"Vous venez de créer une maison\");\n bulding.add(house);\n }", "public House()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(480, 352, 1); \n addObject(new GravesHouse(),110,60);\n addObject(new Kid(),300,200);\n addObject(new Sofa(),190,270);\n addObject(new Piano(),275,100);\n }", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "public House() {\n this.pointsHistory = new ArrayList<>();\n }", "public ConstructHouse(String modelname, int lot_number, int area, int bedrooms, int garage, long price) {\n\t\t\n\t\tthis.modelname = modelname;\n\t\tthis.lot_number = lot_number;\n\t\tthis.area = area;\n\t\tthis.bedrooms = bedrooms;\n\t\tthis.garage = garage;\n\t\tthis.price = price;\n\t\t\t}", "org.landxml.schema.landXML11.RoadsideDocument.Roadside addNewRoadside();", "public Household() {\n }", "@Test\n public void createHouseholdUsingPostTest() throws ApiException {\n Household household = null;\n Household response = api.createHouseholdUsingPost(household);\n\n // TODO: test validations\n }", "public Household(int householdId, String householdName) {\n this.householdId = householdId;\n this.householdName = householdName;\n }", "public void add(Good good) {\n cargo.add(good);\n numOfGoods++;\n }", "public void addNewRecord(String name, String street, int building, int apartment) {\n if (name == null || street == null)\n throw new NullPointerException();\n if (!addressBook.containsKey(name)) {\n Address address = new Address(street, building, apartment);\n addressBook.put(name, address);\n }\n }", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "@Override\n\tpublic boolean publishNewHouse(House house) {\n\t\treturn houseDao.save(house)!=null;\n\t}", "public void addperson(Person p, int floorNum) {\n\r\n\r\n }", "public void add (Car car){\n\t\t}", "@Override\n\tpublic void add() {\n\t\tHashMap<String, String> data = new HashMap<>();\n\t\tdata.put(\"title\", title);\n\t\tdata.put(\"author\", author);\n\t\tdata.put(\"publisher\", publisher);\n\t\tdata.put(\"isbn\", isbn);\n\t\tdata.put(\"bookID\", bookID);\n\t\tHashMap<String, Object> result = null;\n\t\tString endpoint = \"bookinfo/post.php\";\n\t\ttry {\n\t\t\tresult = APIClient.post(BookInfo.host + endpoint, data);\n\t\t\tvalid = result.get(\"status_code\").equals(\"Success\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void addHabitant(ArrayList<House> houses, Human human)\n throws NoSpaceException{\n int i = 0;\n while (i < houses.size()){\n if(!houses.get(i).is_full()){\n houses.get(i).habitant.add(human);\n return;\n }\n else {\n i++;\n }\n }\n if (i==houses.size()){\n throw new NoSpaceException();\n }\n }", "public void add(gw_show gh) throws Exception {\n\t\tdao.add(gh);\n\n\t}", "public void add();", "@Test\n public void testAdd(){\n DogHouse testDogHouseAdd = new DogHouse();\n Integer expected = 1;\n\n Dog newDog = new Dog (\"Scully\", new Date(), 1);\n testDogHouseAdd.add(newDog);\n\n Integer actual = testDogHouseAdd.getNumberOfDogs();\n\n Assert.assertEquals(expected, actual);\n }", "public void addApartment(int bid) throws IOException {\n Apartment apartment = new Apartment(apartmentsCollection.size() + 1, Integer.parseInt(numOfRooms.getText()), bid, cabinetMarker,\n Double.parseDouble(size.getText()),\n Double.parseDouble(price.getText()));\n try {\n// dataAccess.addApartment(apartment, personsCollection.size() - 1);\n dataAccess.addApartment(apartment, cabinetMarker);\n Main a = new Main();\n //a.changeScene(\"Registration\");\n //a.changeScene(\"OwnerCabinet\");\n reload();\n\n System.out.println(cabinetMarker + \" : Vsyo eshe tam!\");\n\n\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n apartmentsCollection.add(apartment);\n numOfAp.clear();\n size.clear();\n numOfRooms.clear();\n price.clear();\n }", "@Override\n\tpublic void add(Game game) {\n\t\t\n\t}", "public abstract void addDetails();", "void addGarage(Garage garage);", "private void add() {\n\n\t}", "private void addDoor(Door door) {\n doors.add(door);\n }", "@FXML\n public void addWell() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingWell(0, 0));\n \n }", "void addPiece(Piece piece);", "public void saveNew() {\r\n String name, compName;\r\n double price;\r\n int id, inv, max, min, machId;\r\n //Gets the ID of the last part in the inventory and adds 1 to it \r\n id = Inventory.getAllParts().get(Inventory.getAllParts().size() - 1).getId() + 1;\r\n name = nameField.getText();\r\n inv = Integer.parseInt(invField.getText());\r\n price = Double.parseDouble(priceField.getText());\r\n max = Integer.parseInt(maxField.getText());\r\n min = Integer.parseInt(minField.getText());\r\n\r\n if (inHouseSelected) {\r\n machId = Integer.parseInt(machineOrCompanyField.getText());\r\n Part newPart = new InHouse(id, name, price, inv, min, max, machId);\r\n Inventory.addPart(newPart);\r\n } else {\r\n compName = machineOrCompanyField.getText();\r\n Part newPart = new Outsourced(id, name, price, inv, min, max, compName);\r\n Inventory.addPart(newPart);\r\n }\r\n\r\n }", "public Address add() {\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER INFORMATION FOR A NEW ENTRY +\");\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String firstName = console.promptForString(\" FIRST NAME: \");\n String lastName = console.promptForString(\" LAST NAME: \");\n String street = console.promptForString(\" STREET: \");\n String city = console.promptForString(\" CITY: \");\n String state = console.promptForString(\" STATE: \");\n String zip = console.promptForString(\" ZIPCODE: \");\n\n Address add = new Address(utils.nameFormatter(firstName), utils.nameFormatter(lastName), street, city, state, zip);\n\n return add;\n }", "public void addNewEntity() {\n Random random = new Random();\n int bound = Aquarium.WIDTH / 10;\n int randX = bound + random.nextInt(Aquarium.WIDTH - (2 * bound));\n int randY = bound + random.nextInt(Aquarium.HEIGHT - (2 * bound));\n Piranha newPiranha = new Piranha(randX, randY);\n piranhas.add(newPiranha);\n }", "void addHadithNo(Object newHadithNo);", "Long addWayBill(WayBill wayBill);", "void addHadithBookNo(Object newHadithBookNo);", "public void sellHouse(){\n if(numberHouses != 0){\n owner.addMoney(costs[1]/2);\n numberHouses--;\n }\n }", "void addWay(Way w) {\n ways.put(w.id, w);\n }", "public void add() {\n }", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "public void add() {\n\n }", "public void add(Building building){\n mPersonalBoardCards.add(building);\n }", "public void add() {\n\t\t\n\t}", "public static void main(String[] args) {\n Room room1 = new Room(14, 6, 2, false);\n Room room2 = new Room(8, 6, 2, false);\n Room room3 = new Room(18, 6, 2, false);\n\n ArrayList<Room> rooms = new ArrayList<>();\n rooms.add(room1);\n rooms.add(room2);\n rooms.add(room3);\n\n\n House house = new House(8, 2, 140.00, rooms);\n\n\n\n\n System.out.println(\"Aantal stoelen \" + house.aantalStoelenInHetHuis());\n\n }", "public void addSquare(Square square) {\n\t\t\n\t}", "void createNewGame() {\n _gameList.add(new GameObject());\n Log.i(\"createGame\", \"Created New Game\");\n }", "public House getHouse() {\r\n return this.house;\r\n }", "int addNewOwner(OwnerModel ownerModel) throws Exception;", "public House(int HID)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t \n\t String query = \"SELECT * FROM Housing WHERE h_id = '\"+HID+\"'\"; \n\t ResultSet rs = con.stmt.executeQuery(query); \n\t \n\t while(rs.next())\n\t {\n\t \thid = rs.getInt(\"h_id\"); \n\t \tname = rs.getString(\"name\"); \n\t \taddress = rs.getString(\"address\"); \n\t \tphoneNumber = rs.getString(\"phone_number\"); \n\t \tyearBuilt = rs.getInt(\"year_built\"); \n\t \tprice = rs.getInt(\"price\");\n\t \tuid = rs.getInt(\"housing_uid\"); \n\t \tmaxResidents = rs.getInt(\"max_residents\"); \n\t \tcatagory = rs.getString(\"catagory\"); \n\t \t\n\t \tGetKeywords(); \n\t \tGetAvailableDates();\n\t }\n\t \n\t con.closeConnection();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t}", "void add(GeometricalObject object);", "abstract void add();", "public void add(Problem problem);", "public void add(int id, String name, String author, int issueDate, int returnDate) {\n\tBook book = new Book();\n\tbook.id = id;\n\tbook.name = name;\n\tbook.author = author;\n\tbook.issueDate = issueDate;\n\tbook.returnDate = returnDate;\n\tlist.add(book);\n\tSystem.out.println(\"Successfully added: \"+book.id);\n}", "public RetreatHouse(Long id) {\r\n\t\tthis.id = id;\r\n\t}", "public void addPerson(Person p);", "@FXML\n public void addGym() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingGym(0, 0));\n \t/*\n int xpos = (int) (Math.random() * 600) + 100;\n World.getInstance().addEntityToWorld(new BuildingGym(xpos, 30));\n */\n }", "public JunctionLink addNewRoad(Junction j,int typeRoad){\n JunctionLink jl=new JunctionLink(j);\n //firstSelected=jl;\n jl.setType(typeRoad);\n try {\n PSRender.addRenderedObject(this);\n } catch (Exception e) {\n e.printStackTrace();\n e.printStackTrace(DBService.getErrorStream()); //To change body of catch statement use Options | File Templates.\n }\n addRoad=true;\n // System.out.println(\"\\tout method: addNewRoad()\");\n return jl;\n }", "void addFullHadith(Object newFullHadith);", "@Override\n\tpublic boolean addArea(Goodsarea goods) {\n\t\treturn false;\n\t}", "public void addNewDistrict(District District);", "private House(HouseBuilder builder) {\n\t\tthis.surface = builder.surface;\n\t\tthis.rooms = builder.rooms;\n\t\tthis.bathrooms = builder.bathrooms;\n\t\tthis.floors = builder.floors;\n\t\tthis.garage = builder.garage;\n\t\tthis.yard = builder.yard;\n\t}", "public static void addNewVilla() {\n Services villa = new Villa();\n villa = addNewService(villa);\n ((Villa) villa).setRoomType(FuncValidation.getValidName(ENTER_ROOM_TYPE,INVALID_NAME));\n ((Villa) villa).setFacilities(FuncValidation.getValidName(ENTER_FACILITIIES,INVALID_NAME));\n ((Villa) villa).setPoolArea(FuncValidation.getValidDoubleNumber(ENTER_POOL_AREA,INVALID_DOUBLE_NUMBER,30.0));\n ((Villa) villa).setNumberOfFloor(FuncValidation.getValidIntegerNumber(ENTER_NUMBER_OF_FLOOR,INVALID_NUMBER_OF_FLOOR, 0));\n\n //Get villa list from CSV\n ArrayList<Villa> villaList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.VILLA);\n\n //Add villa to list\n villaList.add((Villa) villa);\n\n //Write villa list to CSV\n FuncReadWriteCSV.writeVillaToFileCSV(villaList);\n System.out.println(\"----Villa \"+villa.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "private void addStudy(Study study) {\n\t\t\r\n\t}", "@FXML\n public void addHospital() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingHospital(0, 0));\n }", "public void addWall(Wall w)\n {\n walls.add(w);\n }", "public void add(Goods goods) {\n\t\tsm.insert(\"com.huyu.entity.Goods.add\", goods);\n\t}", "public void addRecord();", "@Test\n\tpublic void addTown_when_town_is_added() throws Exception {\n\t\t// GIVEN\n\t\ttown = new Town(\"varna\", 2000);\n\t\t// WHEN\n\t\tcountry.addTown(town);\n\t\t// THEN\n\t\tassertEquals(country.getCountTowns(), 1);\n\t}", "public static void main(String[] args) {\n\r\n House myHouse = new House(new Room(\"myBedroom\", 4, 2, false), 43);\r\n myHouse.wallsDetails();\r\n\r\n }", "boolean add(Dish dish);", "public void setHouse_number(int house_number) {\n this.house_number = house_number;\n }", "@Test\n\tpublic void addRoadTest(){\n\t\tDjikstrasMap m = new DjikstrasMap();\t//Creates new DjikstrasMap object\n\t\tLocation l1 = new Location(\"Guildford\");\n\t\tLocation l2 = new Location(\"Portsmouth\");\n\t\t\n\t\tm.addRoad(\"Guildford\", \"Portsmouth\", 20.5, \"M3\");\t//Adds a road from Guildford to portsmouth to the map\n m.addRoad(\"Portsmouth\", \"Guildford\", 20.5, \"M3\");\n \n assertEquals(l1.getName(), m.getNode(\"Guildford\").getName());\t//Tests that the method added the roads correctly to teh map\n assertEquals(l2.getName(), m.getNode(\"Portsmouth\").getName());\n\t}", "void add(Lugar lugar);", "public void addRentEntry(RentEntryBean reb) {\n RentDAO rentDAO = new RentDAO();\n rentDAO.addHouse(reb);\n }", "public void addHand(Hand h)\n {\n hand.add(h);\n }", "public Boolean checkHouseWithId(){\n\t\t\tif(removeHouse == null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}", "Long addRoute(Route route);", "@Override\r\n\tpublic void add(Goods goods) {\n\t\tgd.addGoods(goods);\r\n\t\tgd.addGb(goods.getId(),goods.getBid());\r\n\t\tgd.addGt(goods.getId(),goods.getTid());\r\n\t}", "public House(double f, int s, int be, int ba){\r\n \r\n super(f, s);\r\n bedrooms = be;\r\n bathrooms = ba;\r\n }", "public House(int length, int width, int lotLength, int lotWidth) {\r\n super(length, width, lotLength, lotWidth);\r\n }", "public void findHouse() {\n System.out.println(\"-----Search House-----\");\n System.out.println(\"enter id: \");\n int findId = Utility.readInt();\n //call service search method\n House h = houseService.searchHouse(findId);\n if (h != null) {\n System.out.println(h);\n } else {\n System.out.println(\"no designate house found\");\n }\n }", "int addHabit(Habit habit);", "public void addNewGame(gameLocation game) {\n\n\t\t// add to database here\n\t\tCursor checking_avalability = helper.getGameLocationData(GamelocationTableName,\n\t\t\t\tgame.getTitle());\n\t\tif (checking_avalability == null) {\t\t\t\t\n\n\t\t\tGAME_LIST.add(game);\n\n\t\t\tlong RowIds = helper.insertGameLocation(GamelocationTableName,\n\t\t\t\t\tgame.getTitle(), game.getDescription(),\n\t\t\t\t\tconvertToString(game.getIsCouponUsed()));\n\t\t\t//if (RowIds == -1)\n\t\t\t\t//Log.d(TAG, \"Error on inserting columns\");\n\t\t} else if (checking_avalability.getCount() == 0) { \t\t\t\t// checking twice to make sure it will not miss \n\n\t\t\tGAME_LIST.add(game);\n\n\t\t\tlong RowIds = helper.insertGameLocation(GamelocationTableName,\n\t\t\t\t\tgame.getTitle(), game.getDescription(),\n\t\t\t\t\tconvertToString(game.getIsCouponUsed()));\t\t\t// reuse method\n\t\t\t//if (RowIds == -1)\n\t\t\t\t//Log.d(TAG, \"Error on inserting columns\");\n\t\t}\n\n\t}", "public static House createEntity(EntityManager em) {\n House house = new House()\n .houseName(DEFAULT_HOUSE_NAME)\n .houseNo(DEFAULT_HOUSE_NO)\n .address(DEFAULT_ADDRESS)\n .houseToFloorNo(DEFAULT_HOUSE_TO_FLOOR_NO)\n .ownToFloorNo(DEFAULT_OWN_TO_FLOOR_NO)\n .lat(DEFAULT_LAT)\n .lon(DEFAULT_LON)\n .createdate(DEFAULT_CREATEDATE)\n .createBy(DEFAULT_CREATE_BY)\n .updateDate(DEFAULT_UPDATE_DATE)\n .updateBy(DEFAULT_UPDATE_BY)\n .image(DEFAULT_IMAGE)\n .imageContentType(DEFAULT_IMAGE_CONTENT_TYPE);\n // Add required entity\n Country country = CountryResourceIntTest.createEntity(em);\n em.persist(country);\n em.flush();\n house.setCountry(country);\n // Add required entity\n State state = StateResourceIntTest.createEntity(em);\n em.persist(state);\n em.flush();\n house.setState(state);\n // Add required entity\n City city = CityResourceIntTest.createEntity(em);\n em.persist(city);\n em.flush();\n house.setCity(city);\n // Add required entity\n Profile profile = ProfileResourceIntTest.createEntity(em);\n em.persist(profile);\n em.flush();\n house.setProfile(profile);\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n house.setUser(user);\n return house;\n }", "private void addArticle() {\n\t\tAdminComposite.display(\"\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\tQuotationDetailsDTO detail = new QuotationDetailsDTO();\n\t\ttry {\n\t\t\tdetail = createQuotationDetail(detail);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (validateMandatoryParameters(detail)) {\n\t\t\taddToArticleTable(detail);\n\t\t}\n\t}", "public void add(GeometricalObject object);", "public void addNewHoard(String hoardName, float hoardValue, boolean hoardAccessible) {\n ContentValues newValues = new ContentValues();\n \n // Assign values for each row.\n newValues.put(KEY_GOLD_HOARD_NAME_COLUMN, hoardName);\n newValues.put(KEY_GOLD_HOARDED_COLUMN, hoardValue);\n newValues.put(KEY_GOLD_HOARD_ACCESSIBLE_COLUMN, hoardAccessible);\n // [ ... Repeat for each column / value pair ... ]\n \n // Insert the row into your table\n SQLiteDatabase db = hoardDBOpenHelper.getWritableDatabase();\n db.insert(HoardDBOpenHelper.DATABASE_TABLE, null, newValues); \n }", "RecipeObject addRecipe(RecipeObject recipe);", "long addOwner(Owner owner);", "static void neighborhood()\r\n { \r\n // Puts the earth in a world and the three different color turtles in that world\r\n earth = new World();\r\n turtle1 = new Turtle(earth);\r\n turtle1.setColor(Color.BLUE);\r\n turtle2 = new Turtle(earth);\r\n turtle2.setColor(Color.RED);\r\n turtle3 = new Turtle(earth);\r\n turtle3.setColor(Color.GREEN);\r\n house(100, 100, turtle1);\r\n house(250, 100, turtle2);\r\n house(400, 100, turtle3);\r\n\r\n }", "org.landxml.schema.landXML11.LanesDocument.Lanes addNewLanes();", "@Override\n\tpublic int add(Goods goods) {\n\t\treturn goodsDao.add(goods);\n\t}", "void addCourse(Course course);", "public void add(Thing newThing)\r\n {\r\n \titems.add(newThing);\r\n }", "protected static void addBook(Book toAdd)\n {\n if (toAdd == null) // if product is null, becuase the formatting wasnt correct, then dont go forward and print out that the book wasnt added\n ProductGUI.Display(\"Book not added\\n\");\n else{\n try{\n if (!(toAdd.isAvailable(toAdd.getID(), productList))) // if the product id alrady exists, dont go forard towards adding it\n {\n ProductGUI.Display(\"Sorry. this product already exists\\n\");\n return;\n }\n else\n ProductGUI.Display(\"New book product\\n\");\n \n myProduct = new Book(toAdd.getID(), toAdd.getName(), toAdd.getYear(), toAdd.getPrice(), toAdd.getAuthor(), toAdd.getPublisher()); // make new product using this object\n productList.add(myProduct); // add product to arraylist\n \n addToMap(toAdd.getName()); // adding the product name to the hashmap\n System.out.println(\"book added to all\");\n ProductGUI.fieldReset(); // reset the fields to being blank\n } catch (Exception e){\n ProductGUI.Display(e.getMessage()+\"errorrorror\\n\");\n }\n }\n }", "void addArticle(Article a);", "public void addNewAnimalAction() {\n\t\tAnimalModel newAnimalModel = new AnimalModel(\"\", \"\");\n\n\t\teditAnimalDetail(newAnimalModel, AnimalDetailPanel.NEW_ANIMAL);\n\t}", "@Override\n\tpublic void add() {\n\t\t\n\t}", "private static void addPerson(int startFloorIn, int endFloorIn) throws InvalidParameterException {\r\n\r\n\t\t// get person name\r\n\t\tpersonCounter++;\r\n\t\tString name = \"P\" + personCounter;\r\n\r\n\t\t// create a person\r\n\t\tPerson p = new Person(name, startFloorIn, endFloorIn);\r\n\t\tSystem.out.printf(\"%s Person %s created on Floor %d, wants to go %s to Floor %d\\n\",\r\n\t\t\t\tgetTimeStamp(), name, startFloorIn, ElevatorController.getDirection(startFloorIn, endFloorIn), endFloorIn);\r\n\r\n\t\t// add to list for statistics\r\n\t\tpeople.add(p);\r\n\r\n\t\t// send to the building\r\n\t\ttry {\r\n\t\t\tmyBuilding.addPerson(p);\r\n\t\t} catch (EmptyReferenceException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}" ]
[ "0.788326", "0.7318935", "0.6917635", "0.68958753", "0.68145967", "0.66095644", "0.6538855", "0.6437536", "0.638268", "0.63602847", "0.624132", "0.616572", "0.6081517", "0.60410166", "0.6032015", "0.598547", "0.5935933", "0.59149194", "0.58508116", "0.58410054", "0.5831603", "0.5779409", "0.57789403", "0.57646406", "0.5762633", "0.57617897", "0.5755538", "0.5754841", "0.574905", "0.57365704", "0.57361776", "0.5709731", "0.5703345", "0.569546", "0.5687335", "0.56806415", "0.5679853", "0.5676382", "0.56505847", "0.5645578", "0.56398046", "0.5627922", "0.56229675", "0.559697", "0.5585337", "0.5577173", "0.55760014", "0.55666876", "0.55666447", "0.55618083", "0.5548989", "0.55271244", "0.55250907", "0.5518103", "0.5510939", "0.55083287", "0.55073357", "0.5507066", "0.55055046", "0.550394", "0.5503077", "0.54920745", "0.54897517", "0.5470921", "0.54685503", "0.546791", "0.5466387", "0.54651695", "0.5462776", "0.5435484", "0.5428084", "0.54277176", "0.54259586", "0.5422742", "0.5420326", "0.54177344", "0.5416733", "0.5413646", "0.5411306", "0.54111445", "0.5407468", "0.54033405", "0.5396104", "0.5386371", "0.5371972", "0.53671736", "0.53669363", "0.5362714", "0.535382", "0.53527254", "0.53480214", "0.53422165", "0.53356844", "0.5319951", "0.5314204", "0.53131413", "0.531087", "0.5308369", "0.5307128", "0.5300714" ]
0.81656826
0
Add New Room method
public static void addNewRoom() { Services room = new Room(); room = addNewService(room); ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE)); //Get room list from CSV ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM); //Add room to list roomList.add((Room) room); //Write room list to CSV FuncReadWriteCSV.writeRoomToFileCSV(roomList); System.out.println("----Room "+room.getNameOfService()+" added to list---- "); addNewServices(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Room createRoom(Room room);", "public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toString(),\r\n mChemicalDiet.getText().toString(),\r\n mTextureDiet.getText().toString(),\r\n mLiquidDiet.getText().toString(),\r\n mLikes.getText().toString(),\r\n mDislikes.getText().toString(),\r\n mNotes.getText().toString(),\r\n mMeal.getText().toString(),\r\n mDessert.getText().toString(),\r\n mBeverage.getText().toString(),\r\n RoomActivity.mFacilityKey);\r\n mFirebaseDatabaseReference.push().setValue(roomPojo);\r\n Utils.countCensus(RoomActivity.mFacilityKey);\r\n Utils.countNumRoomsFilled(RoomActivity.mHallKey, RoomActivity.mHallStart, RoomActivity.mHallEnd);\r\n }\r\n //close the dialog fragment\r\n RoomDialog.this.getDialog().cancel();\r\n }", "public void addRoom(Chatroom room){\n\n }", "@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}", "@PostMapping(\"/rooms\")\n public Room createRoom (\n @Valid\n @RequestBody Room room){\n return roomRepository.save(room);\n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public static String addRoom(ArrayList<Room> roomList) {\n System.out.println(\"Add a room:\");\n String name = getRoomName();\n System.out.println(\"Room capacity?\");\n int capacity = keyboard.nextInt();\n System.out.println(\"Room buliding?\");\n String building1 = keyboard.next();\n System.out.println(\"Room location?\");\n String location1 = keyboard.next();\n Room newRoom = new Room(name, capacity, building1, location1);\n roomList.add(newRoom);\n if (capacity == 0)\n System.out.println(\"\");\n return \"Room '\" + newRoom.getName() + \"' added successfully!\";\n\n }", "@PostMapping(path = \"/rooms\")\n public ResponseEntity<Room> generateNewRoom() {\n Room newRoom = roomService.generateNewRoom();\n return new ResponseEntity<>(newRoom, HttpStatus.CREATED);\n }", "public boolean addRoom(String name, String id, String description, String enterDescription){\n for(int i = 0; i < rooms.size(); i++){\n Room roomAti = (Room)rooms.get(i);\n if(roomAti.id.equals(id)){\n return false;\n }\n }\n rooms.add(new Room(name, id, description, enterDescription));\n return true;\n }", "@RequestMapping(method = RequestMethod.POST)\n public ResponseEntity<?> addGameRoom(@RequestBody Game gameRoom) {\n try {\n ls.addGameRoom(gameRoom);\n return new ResponseEntity<>(HttpStatus.CREATED);\n } catch (LacmanPersistenceException ex) {\n Logger.getLogger(LacmanController.class.getName()).log(Level.SEVERE, null, ex);\n return new ResponseEntity<>(ex.getMessage(), HttpStatus.FORBIDDEN);\n }\n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public Room addRoom(Room room) {\r\n\t\tif(userService.adminLogIn) {\r\n\t\t\treturn roomRepository.save(room);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new AdminPermissionRequired(\"admin permission required!!\");\r\n\t\t}\r\n\t}", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }", "public Room() {\n }", "@RequestMapping(value = \"/Reservation/{reservation_reservationId}/room\", method = RequestMethod.POST)\n\t@ResponseBody\n\tpublic Room newReservationRoom(@PathVariable Integer reservation_reservationId, @RequestBody Room room) {\n\t\treservationService.saveReservationRoom(reservation_reservationId, room);\n\t\treturn roomDAO.findRoomByPrimaryKey(room.getRoomId());\n\t}", "@PostMapping(\"/createNewGameRoom\")\n @ResponseStatus(HttpStatus.CREATED)\n public Game generateNewGameRoom() {\n String entrycode = service.generateEntryCode();\n currentGame.setEntrycode(entrycode);\n currentGame = gameDao.add(currentGame);\n return currentGame;\n }", "RoomModel createRoomModel(RoomModel roomModel);", "public Result createRoom() {\n\n DynamicForm dynamicForm = Form.form().bindFromRequest();\n String roomType = dynamicForm.get(\"roomType\");\n Double price = Double.parseDouble(dynamicForm.get(\"price\"));\n int bedCount = Integer.parseInt(dynamicForm.get(\"beds\"));\n String wifi = dynamicForm.get(\"wifi\");\n String smoking = dynamicForm.get(\"smoking\");\n\n RoomType roomTypeObj = new RoomType(roomType, price, bedCount, wifi, smoking);\n\n if (dynamicForm.get(\"AddRoomType\") != null) {\n\n Ebean.save(roomTypeObj);\n String message = \"New Room type is created Successfully\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n } else{\n\n String message = \"Failed to create a new Room type\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n\n }\n\n\n\n }", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "public static void addRoom(String roomNumber, Double price, RoomType roomType) {\r\n\r\n Room room = new Room(roomNumber, price, roomType);\r\n\r\n if (roomList.contains(getARoom(roomNumber))) {\r\n System.out.println(\"This room number already exists. The room can not be created.\");\r\n } else {\r\n //room = new Room(room.getRoomNumber(), room.getRoomPrice(), room.getRoomType());\r\n roomList.add(room);\r\n System.out.println(\"The room was successfully added to our room list.\");\r\n }\r\n }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "RoomInfo room(String name);", "RoomInfo room(int id);", "public MyRoom() {\r\n }", "public void addRoom(String name, String size) {\n Room newRoom = new Room(this, name, size);\n rooms.add(newRoom);\n }", "public Room(String roomName) {\n guests = new ArrayList<>();\n roomTier = null;\n this.roomName = roomName;\n this.roomId = RoomId.generate(roomName);\n }", "public abstract void enterRoom();", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "@Override\n public Room create(RoomResponseDTO roomResponseDTO) {\n return roomRepository.save(new Room(\n roomResponseDTO.getClassroomNumber()\n ));\n }", "public Room() {\n\n\t}", "private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }", "public boolean addRooms(int id, String location, int numRooms, int price)\n throws RemoteException, DeadlockException;", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "public EventRoom getNewRoom(){\r\n newRoom.setRoomItems(eventRoomItems);\r\n return newRoom;\r\n }", "public Room() {\n this(\"room\", null);\n }", "Room getRoom();", "Room getRoom();", "public void createRoom(String roomHost, String roomName) throws IOException {\n ChatRoom newRoom = new ChatRoom(roomHost, roomName);\n chatRooms.add(newRoom);\n }", "@PostMapping(\"/rooms/create\")\n public ResponseEntity create(HttpServletRequest req, HttpServletResponse res,\n @RequestBody String roomDetails) throws JsonProcessingException {\n roomService.create(roomDetails);\n return ResponseEntity.status(200).build();\n }", "public Room(String description) \n {\n this.description = description;\n exits = new HashMap<>();\n }", "public boolean addRoom(String roomName) {\n\t\ttry{\n\t\t\tif(rooms.contains(roomName)){ // ja existe\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn rooms.add(roomName);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\r\n public void setRoom(Room room) {\n this.room = room; //set the hive room\r\n roomList.add(this.room); // add room to the list\r\n }", "public void nextRoom() {\n room++;\n createRoom();\n }", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\n\t}", "public Room(int id, int roomNumber, int persons, int days){\n this.id = id;\n this.roomNumber = roomNumber;\n this.persons = persons;\n this.days = days;\n available = false; //default value, assignment not necessary\n }", "void setRoomId(String roomId);", "@PostMapping(\"/chat-rooms\")\n public ResponseEntity<ChatRoom> createChatRoom(@RequestBody ChatRoom chatRoom) throws URISyntaxException {\n log.debug(\"REST request to save ChatRoom : {}\", chatRoom);\n if (chatRoom.getId() != null) {\n throw new BadRequestAlertException(\"A new chatRoom cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n ChatRoom result = chatRoomRepository.save(chatRoom);\n return ResponseEntity.created(new URI(\"/api/chat-rooms/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public void createRoom() {\n int hp = LabyrinthFactory.HP_PLAYER;\n if (hero != null) hp = hero.getHp();\n try {\n labyrinth = labyrinthLoader.createLabyrinth(level, room);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n characterLoader.createCharacter(level, room);\n hero = characterLoader.getPlayer();\n if (room > 1) hero.setHp(hp);\n createMonsters();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void createRooms()\n {\n Room a1, a2, a3, b1, b2, b3, c1, c2, c3, bridge, outskirts;\n \n // create the rooms\n a1= new Room(\"see a strong river flowing south to the west. The trees seem to be letting up a little to the north.\");\n a2 = new Room(\" are still in a very dense forest. Maybe the trees are clearing up the the north?\");\n a3 = new Room(\"see a 30 foot cliff looming over the forest to the east. No way you could climb that. Every other direction is full of trees.\");\n b1 = new Room(\"see a strong river flowing to the west. Heavily wooded areas are in all other directions.\");\n b2 = new Room(\"see only trees around you.\");\n b3 = new Room(\"see a 30 foot cliff to the east. There might be one spot that is climbable. Trees surround you every other way.\");\n c1 = new Room(\" see the river cuts east here, but there seems to be a small wooden bridge to the south over it. The trees are less the direction that the river flows.\");\n c2 = new Room(\"are on a peaceful riverbank. If you weren't lost, this might be a nice spot for a picnic.\");\n c3 = new Room(\"see a 30 foot cliff to your east and a strong flowing river to the south. Your options are definitely limited.\");\n outskirts = new Room(\"make your way out of the trees and find yourself in an open field.\");\n cliff = new Room(\"managed to climb up the rocks to the top of the cliff. Going down, doesn't look as easy. You have to almost be out though now!\");\n bridge = new Room(\"cross the bridge and find a small trail heading south!\");\n win = new Room(\" manage to spot a road not too far off! Congratulations on finding your way out of the woods! Have a safe ride home! :)\" );\n fail = new Room(\" are entirely lost. It is pitch black out and there is no way that you are getting out of here tonight. I'm sorry, you LOSE.\");\n \n // initialise room exits\n a1.setExit(\"north\", outskirts);\n a1.setExit(\"east\", a2);\n a1.setExit(\"south\", b1);\n \n a2.setExit(\"east\", a3);\n a2.setExit(\"west\", a1);\n a2.setExit(\"south\", b2);\n a2.setExit(\"north\", outskirts);\n \n a3.setExit(\"north\", outskirts);\n a3.setExit(\"west\", a2);\n a3.setExit(\"south\", b3);\n \n b1.setExit(\"north\", a1);\n b1.setExit(\"east\", b2);\n b1.setExit(\"south\", c1);\n \n b2.setExit(\"east\", b3);\n b2.setExit(\"west\", b1);\n b2.setExit(\"south\", c2);\n b2.setExit(\"north\", a2);\n \n b3.setExit(\"north\", a3);\n b3.setExit(\"west\", b2);\n b3.setExit(\"south\", c3);\n b3.setExit(\"up\", cliff);\n \n c1.setExit(\"north\", b1);\n c1.setExit(\"east\", c2);\n c1.setExit(\"south\" , bridge);\n \n c2.setExit(\"east\", c3);\n c2.setExit(\"west\", c1);\n c2.setExit(\"north\", b2);\n \n c3.setExit(\"west\", c2);\n c3.setExit(\"north\", b3);\n \n outskirts.setExit(\"north\", win);\n outskirts.setExit(\"east\", a3);\n outskirts.setExit(\"west\", a1);\n outskirts.setExit(\"south\", a2);\n \n cliff.setExit(\"north\", outskirts);\n cliff.setExit(\"east\", win);\n \n bridge.setExit(\"north\", c1);\n bridge.setExit(\"south\", win);\n \n c3.addItem(new Item (\"shiny stone\", 0.1));\n a1.addItem(new Item (\"sturdy branch\", 2));\n a3.addItem(new Item(\"water bottle\" , 0.5));\n a3.addItem(new Item(\"ripped backpack\" , 1));\n currentRoom = b2; // start game outside\n }", "void joinRoom(int roomId) throws RoomNotFoundException, RoomPermissionException, IOException;", "public Room( Rectangle r){\n\t\tthis.r = r;\n\t}", "private void enterRoom(Room room)\r\n \t{\r\n \t\tif(room.isFull())\r\n \t\t\treturn; // Cannot enter the room\r\n \t\tVector2i pos = room.addCharacter(this, true);\r\n \t\tif(pos == null)\r\n \t\t\treturn; // Cannot enter the room (but should not occur here)\r\n \t\tif(currentRoom != null)\r\n \t\t{\r\n \t\t\t// Quit the last room\r\n \t\t\troom.removeCharacter(this);\r\n \t\t}\r\n \t\tcurrentRoom = room;\r\n \t\tx = pos.x;\r\n \t\ty = pos.y;\r\n \t\t// Debug\r\n \t\tLog.debug(name + \" entered in the \\\"\" + room.getType().name + \"\\\"\");\r\n \t}", "public Room(String description) \n {\n this.description = description;\n items = new ArrayList<>();\n exits = new HashMap<>();\n }", "public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }", "@GetMapping(\"/showFormForAddRoom\")\r\n\tpublic String showFormForAddRoom(Model theModel) {\n\t\tRoom theRoom = new Room();\r\n\t\t\r\n\t\ttheModel.addAttribute(\"room\", theRoom);\r\n\t\t\r\n\t\treturn \"/rooms/room-form\";\r\n\t}", "public Room(int roomNumber) \n\t{\n\t\tthis.roomNumber=roomNumber;\n\t}", "public void addRoom(int number, int capacity) {\n\t\t\tRooms newRoom = new Rooms(number, capacity);\r\n\t\t\tRoomDetails.add(newRoom);\r\n\t\t}", "private Room addRandomRoom(Random random) {\n int width = RandomUtils.uniform(random, MINROOMWIDTH, MAXROOMWIDTH);\n int height = RandomUtils.uniform(random, MINROOMHEIGHT, MAXROOMHEIGHT);\n int xCoordinate = RandomUtils.uniform(random, 0, size.width - width);\n int yCoordinate = RandomUtils.uniform(random, 0, size.height - height);\n Room newRoom = new Room(new Position(xCoordinate, yCoordinate), new Size(width, height));\n drawRoom(newRoom);\n return newRoom;\n }", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "public void createRoom(int len, int leftWid, int rightWid) {\n switch (facing) {\n case \"Up\":\n addUpBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Down\":\n addDownBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Left\":\n addLeftBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Right\":\n addRightBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n default:\n System.out.println(\"The wizard loses his direction!\");\n\n }\n }", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "Room updateOrAddRoom(String username, Room room);", "public Room() {\r\n\t\troomObjects = new ArrayList<GameObject>();\r\n\t\troom_listener = new RoomListener();\r\n\t\tlisteners = new ListenerContainer(room_listener);\r\n\t}", "public Room(roomContents content) {\n contents.add(content);\n\n }", "public void populateRooms(){\n }", "public Room(String name, String description)\n {\n this.name = name;\n this.description = description;\n }", "public Room(String description) \n {\n exits = new HashMap<>();\n objects = new HashMap<>();\n this.description = description;\n this.requiredOutfit = null;\n this.locked = false;\n }", "public static Room newRoom(int random){\n String nameRoom = \"\";\n int monsterAmount = 0;\n\t\tMonster monster;\n MonsterFactory monsterFac = new MonsterFactory();\n\t\tmonster= monsterFac.buildMonster((int)(Math.random() * 3) + 1);\n boolean createHealingPot = false;\n boolean createPitRoom = false;\n boolean createPillar = false;\n boolean createEntrance = false;\n boolean createExit = false;\n boolean createVisionPot = false;\n\n switch (random){\n case 1:\n \tnameRoom = \"The Entrance room\";\n \tmonsterAmount = 0;\n createEntrance = true;\n break;\n\n case 2:\n \tnameRoom = \"The Exit room\";\n \tmonsterAmount = 0;\n createExit = true;\n break;\n\n case 3:\n \tnameRoom = \"The room\";\n \tmonsterAmount = 1; //THIS ROOM WILL HAVE 1 MONSTER\n break;\n \n case 4:\n \tnameRoom = \"The Healing Potion room\";\n \tmonsterAmount=(int)(Math.random() * 1) + 0;\n createHealingPot = true;\n break;\n \n case 5:\n \tnameRoom = \"The Pit room\";\n \tmonsterAmount = 0;\n createPitRoom = true;\n break;\n\n case 6:\n \tnameRoom = \"The Pillar room\";\n \tmonsterAmount=(int)(Math.random() * 1) + 0;\n \tcreatePillar = true;\n break;\n \n case 7:\n \tnameRoom = \"The Vision Potion room\";\n \tmonsterAmount=0;\n createVisionPot=true;\n break;\n }\n \n if(monsterAmount <= 0 ) \n return new Room(nameRoom,createHealingPot, createPitRoom, createEntrance, createExit, createPillar, monsterAmount,createVisionPot);\n else\n return new Room(nameRoom,createHealingPot, createPitRoom, createEntrance, createExit, createPillar, monster, monsterAmount,createVisionPot);\n\n }", "public Room (String number, int seatingCapacity, String roomT){\r\n this.number = number;\r\n this.seatingCapacity = seatingCapacity;\r\n this.roomType= roomT;\r\n }", "public void createRoom(int roomId, String featureSummary) throws NumberFormatException, IOException {\n\t\tSystem.out.println(\"Would you like to add a Standard Room or a Suite?\");\n\t\tSystem.out.println(\"1: Standard Room\");\n\t\tSystem.out.println(\"2: Suite\");\n\n\t\tint input = Integer.parseInt(br.readLine());\n\n\t\tif (input == 1) {\n\t\t\tSystem.out.println(\"Creating Standard Room...\");\n\t\t\tcreateStandardRoom(roomId, featureSummary);\n\t\t\tmenu();\n\n\t\t} else if (input == 2) {\n\t\t\tSystem.out.println(\"Creating Suite...\");\n\t\t\tcreateSuite(roomId, featureSummary);\n\t\t\tmenu();\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Please select a valid option\\n\");\n\t\t\tcreateRoom(roomId, featureSummary);\n\t\t} \n\n\t}", "@Override\n\tpublic void onRoomCreated(RoomData arg0) {\n\t\t\n\t}", "private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }", "public Integer getNewRoom() {\n return newRoom;\n }", "public void createRoom(Rect room) {\n for(int x = room.x1 + 1; x < room.x2; x++) {\n for(int y = room.y1 + 1; y < room.y2; y++ ) {\n dungeon.map[x][y].blocked = false;\n dungeon.map[x][y].blockSight = false;\n }\n }\n }", "@Override\n\tpublic void insert(Room ob) {\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tPreparedStatement ps = cn.prepareStatement(\"INSERT INTO room VALUES (?,?)\");\n\t\t\tps.setInt(1, ob.getIdRoom());\n\t\t\tps.setInt(2, ob.getIdRoomType());\n\n\t\t\tps.execute();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t}", "private static void AddRoom (){\n boolean addRoomLoop = true;\n //loop for addroom process\n while (addRoomLoop) {\n //try/catch for adding room\n try {\n //user inputs room number\n System.out.print(\"Room number: \");\n boolean roomNumberDuplicate = false;\n int newRoomNumber = RecInput.nextInt();\n //loop checks if roomnumber matches already existing room numbers\n for (int i = 0; i < HotelRoom.roomList.size(); i++) {\n if (newRoomNumber == HotelRoom.roomList.get(i).roomNumber) {\n roomNumberDuplicate = true;\n }\n }\n //if room number already exists, asks user for new input\n if (roomNumberDuplicate) {\n System.out.println(\"Room number must be unique, try again!\");\n System.out.println(\"-----------------------------\");\n }\n else {\n System.out.print(\"Number of beds: \");\n int newNumberBeds = RecInput.nextInt();\n\n System.out.print(\"Room price: \");\n int newRoomPrice = RecInput.nextInt();\n \n //new HotelRoom object is created\n HotelRoom.roomList.add(new HotelRoom(newRoomNumber, newNumberBeds, newRoomPrice, false, true, \"\"));\n System.out.println(\"Room added\");\n \n //breaking loop to exit addroom method\n addRoomLoop = false;\n }\n \n }\n catch (Exception InputMismatchException) {\n //handling if user input is not integer\n System.out.println(\"Please enter a number\");\n System.out.println(\"-----------------------------\");\n\n //cleaning scanner\n RecInput.next();\n } \n }\n\n \n }", "public void enterRoom(Room room) {\n currentRoom = room;\n }", "public ViewRoom(Room r) {\n initComponents();\n this.room = r;\n this.workoutNum = 0;\n updateRoom();\n \n }", "public RoomType (Long uniqueId) {\n\t\tsuper(uniqueId);\n\t}", "public void updateRoom(Room room);", "public void addSpawners(Room room) {\n\t\tint shiftX = (map.chunkX * 16) - (map.room.length / 2) + 8;\n\t\tint shiftZ = (map.chunkZ * 16) - (map.room.length / 2) + 8;\n\t\t//for(Room room : rooms) {\t\t\t\n\t\t\t//DoomlikeDungeons.profiler.startTask(\"Adding to room \" + room.id);\n\t\t\tfor(Spawner spawner : room.spawners) {\n\t\t\t\t\tDBlock.placeSpawner(map.world, shiftX + spawner.x, spawner.y, shiftZ + spawner.z, spawner.mob);\n\t\t\t}\n\t\t\tfor(BasicChest chest : room.chests) {\n\t\t\t\tchest.place(map.world, shiftX + chest.mx, chest.my, shiftZ + chest.mz, random);\n\t\t\t}\n\t\t\t//DoomlikeDungeons.profiler.endTask(\"Adding to room \" + room.id);\n\t\t//}\t\n\t}", "public void setRoomId(String roomId) {\n this.roomId = roomId;\n }", "public void startGame(Room room);", "public void setRoom(String room) {\n\t\tthis.room = room;\n\t}", "public void setRoomId( String roomId ) {\n this.roomId = roomId;\n }", "@Override\n\tpublic int addImgRoom(int room_id, String name_img, String type_img) {\n\t\treturn roomDao.addImgRoom(room_id, name_img, type_img);\n\t}", "public void createChatRoom(String name) throws RemoteException {\n\n\t\ttry {\n\t\t\tIChatServer chatStub;\n\t\t\t// make a new chatroom with supplied name\n\t\t\tIChatroom newRoom = new Chatroom(name);\n\t\t\tview.append(\"Make new ChatRoom: \" + newRoom.getName() + \"\\n\");\n\t\t\t// make a new chatserver stub for user in the newchatroom\n\t\t\tIChatServer newChatServer = new ChatServer(user, newRoom);\n\t\t\tview.append(\"Make new ChatServer: <User:\" + newChatServer.getUser().getName() + \", ChatServer: \"\n\t\t\t\t\t+ newChatServer.getChatroom().getName() + \">\\n\");\n\t\t\t//get a chatstub for new chatserver \n\t\t\tchatStub = (IChatServer) UnicastRemoteObject.exportObject(newChatServer, IChatServer.BOUND_PORT);\n\t\t\tregistry.rebind(IChatServer.BOUND_NAME + newRoom.hashCode(), chatStub);\n\t\t\tview.append(\"Make new ChatServer Stub for chatserver.\\n\");\n\t\t\t//add chatstub to newRoom\n\t\t\tnewRoom.addChatServer(chatStub);\n\t\t\tview.append(\"Add new ChatServer Stub to newRoom.\\n\");\n\t\t\t//add newchatroom to the user chatroom lists\n\t\t\tuser.addRoom(newRoom);\n\t\t\tview.append(\"Add new chatroom <\" + newRoom.getName() + \"> to user <\" + user.getName() + \">\\n\");\n\t\t\t//add all chatservers in that room to hashset\n\t\t\tHashSet<IChatServer> proxy = new HashSet<IChatServer>();\n\t\t\tfor (IChatServer item : newChatServer.getChatroom().getChatServers()) {\n\t\t\t\tIChatServer proxyChatServer = new ProxyIChatServer(item);\n\t\t\t\tproxy.add(proxyChatServer);\n\t\t\t}\n\t\t\tIMain2MiniAdpt miniMVCAdpt = view.makeMini(newChatServer, proxy);\n\t\t\tminiMVCAdpts.put(newRoom, miniMVCAdpt);\n\t\t\tcountRoom++;\n\t\t} catch (Exception e) {\n\t\t\tview.append(\"Error creating chatroom!\");\n\t\t}\n\n\t}", "public void initRooms(Room room) {\n rooms.add(room);\n internalList.add(room);\n }", "@Override\n\tpublic boolean fnCreateRoom(String adminId, String date, String roomNumber,\n\t\t\tString timeSlots) {\n\t\tfnTracelog(\"entry admmin\" + adminId.substring(0, 4));\n\t\tHashMap<String, HashMap<String, HashMap<String, String>>> roomDetails = null;\n\t\tString campus = adminId.substring(0, 4);\n\n\t\tswitch (campus.toUpperCase()) {\n\t\tcase \"DVLA\":\n\t\t\troomDetails = hmDorvalRoomDetails;\n\t\t\tbreak;\n\n\t\tcase \"KKLA\":\n\t\t\troomDetails = hmKirklandRoomDetails;\n\t\t\tbreak;\n\n\t\tcase \"WSTA\":\n\t\t\troomDetails = hmWestmountRoomDetails;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\n\t\tHashMap<String, HashMap<String, String>> allRoomDetailsOfADay = roomDetails\n\t\t\t\t.get(date);\n\t\tif (allRoomDetailsOfADay == null) {\n\t\t\tallRoomDetailsOfADay = new HashMap<>();\n\t\t\troomDetails.put(date, allRoomDetailsOfADay);\n\t\t}\n\t\tHashMap<String, String> timeSlotsOfRoom = allRoomDetailsOfADay\n\t\t\t\t.get(roomNumber);\n\t\tif (timeSlotsOfRoom == null) {\n\t\t\ttimeSlotsOfRoom = new HashMap<>();\n\t\t\tallRoomDetailsOfADay.put(roomNumber, timeSlotsOfRoom);\n\t\t}\n\t\tfor (String timeSlot : timeSlots.split(\",\")) {\n\t\t\tif (!timeSlotsOfRoom.containsKey(timeSlot))\n\t\t\t\ttimeSlotsOfRoom.put(timeSlot, null);\n\t\t}\n\t\tfnTracelog(\"successful\");\n\t\treturn true;\n\n\t}", "public ChatRoom createRoom(String room) {\r\n ChatRoom chatRoom = new ChatRoom(serviceAddress.withLocal(room), null, xmppSession, serviceDiscoveryManager, multiUserChatManager);\r\n chatRoom.initialize();\r\n return chatRoom;\r\n }", "@Override\n public Room makeRoom() {\n return new MagicRoom();\n }", "@Override\n\tprotected void on_room_entered(String room_door_name) {\n\n\t}", "void addReservation(ReservationDto reservationDto) ;", "public Room() {\n this.isTable = false;\n this.hasStage = false;\n this.hasTech = false;\n }", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "public void setRoomId(Integer roomId) {\n this.roomId = roomId;\n }", "PlayerInRoomModel createPlayerInRoomModel(PlayerInRoomModel playerInRoomModel);" ]
[ "0.7698664", "0.7684204", "0.7566619", "0.7260587", "0.72500813", "0.7185022", "0.7086234", "0.7039684", "0.70353854", "0.6986278", "0.69276434", "0.69067574", "0.6848473", "0.67372394", "0.67314523", "0.672192", "0.6686628", "0.66705704", "0.6669692", "0.66108245", "0.66003674", "0.65930945", "0.6591764", "0.65854645", "0.65782225", "0.6562568", "0.6551848", "0.6549059", "0.65300137", "0.65289766", "0.65276843", "0.6527313", "0.6519448", "0.6491363", "0.6480862", "0.64762056", "0.6457941", "0.64509207", "0.64509207", "0.6450075", "0.6445565", "0.64135176", "0.63849795", "0.63829064", "0.6371764", "0.6348999", "0.6337133", "0.6336621", "0.63317513", "0.63234216", "0.6318632", "0.6316664", "0.630129", "0.6269621", "0.62659705", "0.62605053", "0.62477785", "0.6231933", "0.62259907", "0.621125", "0.619843", "0.61809176", "0.6178151", "0.61723846", "0.6169924", "0.6169075", "0.61679906", "0.6163665", "0.6163013", "0.6144329", "0.6130732", "0.612769", "0.6117598", "0.6091786", "0.608991", "0.6084088", "0.6074667", "0.60728085", "0.6069862", "0.6061136", "0.6052681", "0.6041321", "0.6029161", "0.60186946", "0.6000524", "0.59942776", "0.5992552", "0.59758675", "0.5973272", "0.5956833", "0.5952001", "0.59493464", "0.59482205", "0.5945499", "0.5910805", "0.59101963", "0.5908248", "0.5890971", "0.5888411", "0.5884622" ]
0.7790247
0
Add New Service method
public static Services addNewService(Services services) { services.setId(FuncValidation.getValidIdService(services,ENTER_SERVICE_ID,INVALID_SERVICE_ID)); services.setNameOfService(FuncValidation.getValidName(ENTER_SERVICE_NAME,INVALID_NAME)); services.setUsedArea(FuncValidation.getValidDoubleNumber(ENTER_USED_AREA, INVALID_DOUBLE_NUMBER,30.0)); services.setRentalFee(FuncValidation.getValidDoubleNumber(ENTER_RENTAL_FEE, INVALID_RENTAL_FEE,0.0)); services.setMaxGuest(FuncValidation.getValidIntegerNumber(ENTER_MAXIMUM_OF_GUEST,INVALID_MAX_GUEST,0,20)); services.setRentType(FuncValidation.getValidName(ENTER_TYPE_OF_RENT,INVALID_NAME)); return services; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Service newService();", "void addService(ServiceInfo serviceInfo);", "public abstract T addService(ServerServiceDefinition service);", "public AddFavouriteService() {\n super(\"AddFavouriteService\");\n }", "public void service() {\n\t}", "public abstract T addService(BindableService bindableService);", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL);", "public void serviceAdded(ServiceDescription service) {\n System.out.println(\"service added\");\n current = service;\n //set up channel to communicate with server\n //multiple beds -> multiple channels\n channel = ManagedChannelBuilder.forAddress(service.getAddress(), service.getPort())\n .usePlaintext(true)\n .build();\n\n //To call service methods, we first need to create a stub, \n //a blocking/synchronous stub: this means that the RPC call waits for the server to respond, \n //and will either return a response or raise an exception.\n blockingStub = ProjectorGrpc.newBlockingStub(channel);\n\n activateProjector();\n //listInputs();\n\n }", "Fog_Services createFog_Services();", "void addService(Long orderId, Long serviceId);", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL, String[] wscompileFeatures);", "public Collection<Service> createServices();", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }", "public void saveService();", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void addService() throws Throwable\r\n\t{\r\n\t\tselServicOpt.click();\r\n\t\tverifyService();\r\n\t\twdlib.waitForElement(getSelServiceBtn());\r\n\t\tselServiceBtn.click();\r\n\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ServicesPage\") , \"Services Page \");\r\n\t\tServicesPage svpage=new ServicesPage();\r\n\t\tsvpage.selectServices();\r\n\t\t\r\n\t}", "public interface Service {\n // Service-specific methods go here\n }", "@HystrixCommand(fallbackMethod = \"addServiceFallback\")\n\tpublic String addService() {\n\t\treturn restTemplate.getForEntity(\"http://COMPUTE-SERVICE/add?a=10&b=20\", String.class).getBody();\n\t}", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "SourceBuilder createService();", "void addMethod(Method method);", "void addHost(Service newHost);", "public void doService() {\n }", "public void serviceAdded(ServiceEvent event) {\n\t\t\tLog.e(\"z\", \"added serivce: \" + event);\n\t\t}", "public void service_INIT(){\n }", "void addHasMicroService(MService newHasMicroService);", "public void registerService(String serviceName, Object service);", "private static interface Service {}", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "public Service(){\n\t\t\n\t}", "@Override\n\tpublic int addService(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceId(serviceDTO.getSourceId());\n\t\tserviceDomain.setDestinationId(serviceDTO.getDestinationId());\n\t\tserviceDomain.setNoOfSeats(serviceDTO.getNoOfSeats());\n\t\tserviceDomain.setFare(serviceDTO.getFare());\n\t\tserviceDomain.setDistance(serviceDTO.getDistance());\n\t\tserviceDomain.setJourneyDate(serviceDTO.getJourneyDate());\n\t\tserviceDomain.setArrivalTime(serviceDTO.getArrivalTime());\n\t\tserviceDomain.setDepartureTime(serviceDTO.getDepartureTime());\n\t\tserviceDomain.setStatus(serviceDTO.getStatus());\n\t\treturn iServiceDAO.addService(serviceDomain);\n\t}", "boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);", "public InitService() {\n super(\"InitService\");\n }", "public interface Provider {\n Service newService();\n }", "public StartedService() {\n super(\"StartedService\");\n }", "public interface Service {\n\n}", "public interface Service {\n\n}", "default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }", "public void onAdd(final ForwardEvent event) {\r\n\t\t// Get the values and validate the data\r\n\t\tfinal Textbox txtService = (Textbox) Path.getComponent(page, \"txtService\");\r\n\t\tfinal String serviceName = txtService.getValue().trim();\r\n\t\tfinal Doublebox txtCharge = (Doublebox) Path.getComponent(page, \"txtCharge\");\r\n\t\tfinal Checkbox chkHidden = (Checkbox) Path.getComponent(page, \"chkHidden\");\r\n\t\tLOGGER.debug(\"Adding new service: \" + txtService.getValue() + \"\\t\" + txtCharge.getValue());\r\n\t\tif (serviceName.length() <= 0 || txtCharge.getValue() == null) {\r\n\t\t\ttry {\r\n\t\t\t\tMessagebox.show(\"Enter the service name and charge\", \"Error in input\", Messagebox.OK, Messagebox.ERROR);\r\n\t\t\t} catch (final Exception e) {\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfinal IPaymentDAO paymentDAO = (IPaymentDAO) SpringUtil.getBean(\"paymentDAO\");\r\n\t\tif (paymentDAO.checkService(serviceName)) {\r\n\t\t\ttry {\r\n\t\t\t\tMessagebox.show(\"Service already exists\", \"Error in input\", Messagebox.OK, Messagebox.ERROR);\r\n\t\t\t} catch (final Exception e) {\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Create new service and save it\r\n\t\tfinal MasterService service = new MasterService();\r\n\t\tservice.setServiceName(txtService.getValue().trim());\r\n\t\tservice.setCharge(txtCharge.getValue());\r\n\t\tservice.setHidden(chkHidden.isChecked());\r\n\t\tpaymentDAO.addMasterService(service);\r\n\r\n\t\t// Add this new service to listmodel and invalidate the list\r\n\t\tfinal ListModelList services = (ListModelList) page.getAttribute(\"serviceslist\");\r\n\t\tservices.add(service);\r\n\t\tpage.setAttribute(\"serviceslist\", services);\r\n\t\tfinal Listbox lstservice = (Listbox) Path.getComponent(page, \"lstservice\");\r\n\t\tlstservice.setModel(services);\r\n\t\tlstservice.invalidate();\r\n\t\tLOGGER.debug(\"added service\");\r\n\t}", "public CallService() {\n super(\"My\");\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"service on create\");\n\t\tsuper.onCreate();\n\t}", "public ServiceCompte() {\n\t\tsuper();\n\t}", "public void serviceAdded(String serviceID, Remote service, List<?> itemList);", "Service_Resource createService_Resource();", "public SunshineService(String name) {\n super(\"SunshineService\");\n\n }", "public abstract void addServiceListener(PhiDiscoverListener listener);", "public interface Provider{\n Service newService();\n}", "@Override\r\n public void onCreate() {\r\n Log.d(TAG, \"on service create\");\r\n }", "public interface ServiceService {\n void createServices() throws IOException, TemplateException;\n\n void createService(String table) throws IOException, TemplateException;\n\n void createServiceImpls() throws IOException, TemplateException;\n\n void createServiceImpl(String table) throws IOException, TemplateException;\n}", "public ServiceSum(String name) {\n\t\tserviceName = name;\n\t}", "public interface CreateStudentOrderFor15Service {\n public void create();\n}", "public HelloIntentService() {\n super(\"HelloIntentService\");\n }", "@Override\n\t\tpublic String buildBasicService() {\n\t\t\treturn bulidService();\n\t\t}", "public void addServiceName(String name) {\n if (name != null) {\n this.serviceNameSet.add(name);\n }\n }", "private Service() {}", "go.micro.runtime.RuntimeOuterClass.Service getService();", "go.micro.runtime.RuntimeOuterClass.Service getService();", "go.micro.runtime.RuntimeOuterClass.Service getService();", "public void setService (String service) {\n\t this.service = service;\n\t}", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList addNewServiceConfigurationList();", "com.icare.eai.schema.om.evSORequest.ListOfServiceElementsComplexType addNewListOfServiceElements();", "public InitService(String name) {\n super(\"InitService\");\n }", "public Object getService(String serviceName);", "public static String _service_create() throws Exception{\nreturn \"\";\n}", "private void initService() {\r\n\t}", "@Override\n public void onClick(View v) {\n\n checkAccessibility();\n Intent intent = new Intent(MainActivity.this, FloatBallService.class);\n Bundle data = new Bundle();\n data.putInt(\"type\", FloatBallService.TYPE_ADD);\n intent.putExtras(data);\n startService(intent);\n }", "Object getService(String serviceName);", "public OperationInfo addOperation(String name, Method method)\n {\n if ((name == null) || (name.length() == 0))\n {\n throw new IllegalArgumentException(\"Invalid name [\" + name + \"]\");\n }\n if (nameToOperation.containsKey(name))\n {\n throw new IllegalArgumentException(\"An operation with name [\" + name + \"] already exists in this service\");\n }\n \n OperationInfo operation = new OperationInfo(name, method, this);\n addOperation(operation);\n return operation;\n }", "public void addService(Class<? extends IFloodlightService> clazz, \n\t IFloodlightService service) {\n\t\tserviceMap.put(clazz, service);\n\t}", "ProgramActuatorService createProgramActuatorService();", "public interface Provider {\n Service newService();\n}", "public interface Provider {\n Service newService();\n}", "@Override\n\tpublic void subTypeForServiceTypeAdded(ServiceEvent arg0) {\n\n\t}", "protected abstract ServiceRegistry getNewServiceRegistry();", "public void setService(Text newService) {\n service = newService;\n }", "public void addService(String serviceName, CheckBox dateOfBirth, CheckBox address, CheckBox typeOfLicense,\n CheckBox proofOfResidence, CheckBox proofOfStatus, CheckBox proofOfPhoto, double servicePrice) {\n DatabaseReference dR;\n dR = FirebaseDatabase.getInstance().getReference(\"ServiceRequests\");\n\n Service serviceRequest = new ServiceCategories(serviceName, dateOfBirth.isChecked(), address.isChecked(),\n typeOfLicense.isChecked(), proofOfResidence.isChecked(), proofOfStatus.isChecked(),\n proofOfPhoto.isChecked(), servicePrice);\n dR.child(serviceName).setValue(serviceRequest);\n\n }", "java.lang.String getService();", "java.lang.String getService();", "java.lang.String getService();", "public Servicio(String servicio){\n nombreServicio = servicio;\n }", "public abstract void setServiceName(String serviceName);", "public interface HelloService {\n\n String sayHello(String name);\n\n}", "@Override\n\tpublic int addStationstoServices(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceStationId(serviceDTO.getSourceStationId());\n\t\tserviceDomain.setDestinationStationId(serviceDTO.getDestinationStationId());\n\t\tserviceDomain.setServiceId(serviceDTO.getServiceId());\n\t\tSystem.out.println(serviceDTO.getServiceId());\n\t\t//System.out.println(serviceDTO.getDestinationStationId());\n\t\treturn iStationToService.addServiceToStation(serviceDomain);\n\t}", "CdapStartServiceStep createCdapStartServiceStep();", "public interface HelloService {\n String hello(String name);\n}", "public interface HelloService {\n\n String greet (String userName);\n\n}", "public void setService(String service) {\n this.service = service;\n }", "public interface RsService {\n public void add(Rs rs);\n\n}", "public void setServiceName(java.lang.String param){\n localServiceNameTracker = true;\n \n this.localServiceName=param;\n \n\n }", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder() {\n return getServicesFieldBuilder().addBuilder(\n go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "public go.micro.runtime.RuntimeOuterClass.Service.Builder addServicesBuilder() {\n return getServicesFieldBuilder().addBuilder(\n go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance());\n }", "org.hl7.fhir.CodeableConcept addNewMethod();", "public interface MineService {\n}", "void putServiceNameServiceInfos(net.zyuiop.ovhapi.api.objects.services.Service param0, java.lang.String serviceName) throws java.io.IOException;", "public void setServiceName(String serviceName){\n this.serviceName = serviceName;\n }", "public void markServiceCreate() throws JNCException {\n markLeafCreate(\"service\");\n }", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}", "net.webservicex.www.WeatherForecasts addNewWeatherForecasts();" ]
[ "0.7865219", "0.7771645", "0.77637553", "0.7093525", "0.70612335", "0.7016274", "0.6934671", "0.6934407", "0.6783919", "0.67540264", "0.671477", "0.6666423", "0.6662091", "0.6612837", "0.660182", "0.6600247", "0.6600247", "0.65906763", "0.6559363", "0.6546835", "0.6440094", "0.6431242", "0.6417838", "0.6411682", "0.64048195", "0.64039373", "0.63925266", "0.63756156", "0.6357586", "0.63545704", "0.6339496", "0.62696135", "0.6266512", "0.6260325", "0.6239545", "0.622459", "0.6200758", "0.6187882", "0.6187882", "0.6178094", "0.6173743", "0.6167408", "0.61660194", "0.61633414", "0.61620957", "0.6119131", "0.6117897", "0.6115841", "0.6105296", "0.6091653", "0.60861707", "0.6085453", "0.60748357", "0.6068028", "0.60638833", "0.605702", "0.605041", "0.60470355", "0.60470355", "0.60470355", "0.60442996", "0.6027294", "0.6022696", "0.60173374", "0.60035896", "0.6001624", "0.6000876", "0.5983696", "0.5982686", "0.5981295", "0.5980367", "0.5977893", "0.5977837", "0.5977837", "0.5970216", "0.59612066", "0.59483796", "0.59475034", "0.5941111", "0.5941111", "0.5941111", "0.5938565", "0.5933877", "0.59332234", "0.5929931", "0.5925375", "0.59203285", "0.59202695", "0.5917337", "0.59162015", "0.59133166", "0.59099954", "0.59099954", "0.59079605", "0.5906751", "0.5903501", "0.5897537", "0.5896659", "0.589322", "0.5890594" ]
0.62741464
31
Return Add New Services Menu method
public static void returnAddNewServicesMenu() { System.out.print("Please enter a number to continue:"); processAddnewServicesMenu(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }", "private Menu createServiceMenu() {\r\n\t\tMenu serviceMenu = new Menu(\"Service\");\r\n\r\n\t\tstartService = new MenuItem(\"Start\");\r\n\t\tstartService.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlocalPeer.startService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(startService);\r\n\r\n\t\tstopService = new MenuItem(\"Stop\");\r\n\t\tstopService.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlocalPeer.stopService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tstopService.setEnabled(false);\r\n\t\tserviceMenu.add(stopService);\r\n\r\n\t\treturn serviceMenu;\r\n\t}", "public static void processAddnewServicesMenu() {\n switch (ScannerUtils.scanner.nextLine()) {\n case ADD_NEW_VILLA:\n addNewVilla();\n break;\n case ADD_NEW_HOUSE:\n addNewHouse();\n break;\n case ADD_NEW_ROOM:\n addNewRoom();\n break;\n case BACK_TO_MAIN_MENU:\n processMain();\n break;\n case EXIT:\n System.exit(0);\n break;\n default:\n System.out.println(\"Please select from 1 to 4\");\n returnAddNewServicesMenu();\n }\n }", "protected abstract void addMenuOptions();", "public Menu createToolsMenu();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_service_list, menu);\n\n return true;\n\n }", "@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}", "public int create(Esysmeudef menu);", "private Menu createSettingsMenu() {\r\n\t\tMenu serviceMenu = new Menu(\"Settings\");\r\n\r\n\t\tMenuItem networkSettings = new MenuItem(\"Service\");\r\n\t\tnetworkSettings.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tDaemon.editRunningService(localPeer);\r\n\t\t\t\tchangeDispatcher.stateChanged(new ChangeEvent(localPeer));\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(networkSettings);\r\n\r\n\t\tMenuItem securitySettings = new MenuItem(\"Backup\");\r\n\t\tsecuritySettings.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(securitySettings);\r\n\r\n\t\treturn serviceMenu;\r\n\t}", "public MenuService() {\n\t\tnew DisplayMenu();\n\t}", "public void addService() throws Throwable\r\n\t{\r\n\t\tselServicOpt.click();\r\n\t\tverifyService();\r\n\t\twdlib.waitForElement(getSelServiceBtn());\r\n\t\tselServiceBtn.click();\r\n\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ServicesPage\") , \"Services Page \");\r\n\t\tServicesPage svpage=new ServicesPage();\r\n\t\tsvpage.selectServices();\r\n\t\t\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_name, menu);\n\t\treturn true;\n\t}", "public interface IWxMenuService {\n\n String createMenu(String jsonMenu) ;\n}", "public Menu createViewMenu();", "@Test\n public void testMenuFactoryCreate() {\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n assertEquals(1, menuController.getMenu().size());\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_new, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.vector_add, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_cliente_fornecedor, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add, menu);\n return true;\n }", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList addNewServiceConfigurationList();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add, menu);\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_item, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_item, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tmenu.add(0,ADD_INGREDIENT_DIALOG,0,R.string.add).setIcon(R.drawable.ic_menu_add);\n\t\treturn true;\t\n\t}", "@Override public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_template, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.expense_add_new, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add__item, menu);\n return true;\n }", "@Override\n\tpublic Integer addNewMenu(Menu menu) {\n\t\treturn this.menuDao.addNewMenu(menu);\n\t}", "ReturnCode createMenus(MmtConfig cfg, String menuJson);", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main,menu);\n super.onCreateOptionsMenu(menu);\n\n menu.add(1, SALIR, 0, R.string.menu_salir);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.service_order, menu);\n return true;\n }", "public int menuCreate(MenuVO menuVO) {\n\t\treturn mapper.menuCreate(menuVO);\r\n\t}", "@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}", "void addMenu(V object);", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.wbservices_example, menu);\n return true;\n }", "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }", "private MenuItem getNewMenuItem() {\r\n\t\tif (newMenuItem == null) {\r\n\t\t\tnewMenuItem = new MenuItem(\"Creat new DB\");\r\n\t\t\tnewMenuItem.addActionListener(new ActionListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tfinal String dbname = JOptionPane.showInputDialog(\"New database name:\");\r\n\t\t\t\t\tif (dbname == null)\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tMenuItem item = new MenuItem(dbname);\r\n\t\t\t\t\titem.addActionListener(new ActionListener() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\t\t\tstopDB();\r\n\t\t\t\t\t\t\tstartDB(dbname);\r\n\t\t\t\t\t\t\tgetStopMenuItem().setEnabled(true);\r\n\t\t\t\t\t\t\tgetNewMenuItem().setEnabled(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tstartMenuItem.add(item);\r\n\t\t\t\t\tstartDB(dbname);\r\n\t\t\t\t\tgetNewMenuItem().setEnabled(false);\r\n\t\t\t\t\tgetStartMenuItem().setEnabled(true);\r\n\t\t\t\t\tgetStopMenuItem().setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn newMenuItem;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_place, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_new_entry, menu);\n return true;\n }", "private void showServices()\n {\n // Remove all of the items from the listField.\n _treeField.deleteAll();\n \n // Get a copy of the ServiceRouting class.\n ServiceRouting serviceRouting = ServiceRouting.getInstance();\n \n // Add in our new items by trolling through the ServiceBook API.\n ServiceBook sb = ServiceBook.getSB();\n ServiceRecord[] records = sb.getRecords();\n \n if( records == null ) \n {\n return;\n }\n \n int rootNode = _treeField.addChildNode( 0, \"Service Records\" );\n \n int numRecords = records.length;\n \n for( int i = 0; i < numRecords; i++ ) \n {\n String name = records[i].getName();\n String description = records[i].getDescription();\n \n if( description == null || description.length() == 0 ) \n {\n description = \"No description available\" ;\n }\n \n String uid = records[i].getUid();\n boolean serialBypass = serviceRouting.isSerialBypassActive( uid );\n\n int newParentNode = _treeField.addChildNode( rootNode, name );\n _treeField.addChildNode( newParentNode, description );\n _treeField.addChildNode( newParentNode, uid );\n _treeField.addChildNode( newParentNode, serialBypass ? \"Serial Bypass: Connected\" : \"Serial Bypass: Disconnected\");\n \n // Perform the check for the Desktop SerialRecord.\n if( name != null && name.equals( \"Desktop\" )) \n {\n _desktopUID = uid;\n }\n }\n \n _treeField.setCurrentNode( rootNode ); // Set the root as the starting point.\n }", "@Test\n public void testSetMenuFactoryAddSetMenuItem() {\n SetMenu setMenuController = setMenuFactory.getSetMenu();\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n ArrayList<MenuItem> menuItems = new ArrayList<>();\n menuItems.add(menuController.getMenuItem(1));\n setMenuController.addSetItem(\"Test Set\", 5.0, 1, menuItems);\n assertEquals(1, setMenuController.getSetMenu().size());\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\n\t\t// add menu item to add expense category\n\t\tmenu.add(0, ADD_EXPENSE_ID, 0, R.string.view_expenses_add_expense);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(final Menu menu) {\n getMenuInflater().inflate(R.menu.menu_deadlines_add_new_item, menu);\n return true;\n }", "IMenuFactory getMenuFactory();", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.holiday_details_add, menu);\n }", "public Menu getStartMenu() {\n Menu menu = new Menu(new Point(475, 0), 672-475, 320, 8, 1, new Cursor(new Point(0, 7)), \"exit\");\n Button PokedexButton = new Button(new Point(475, 0), 672-475, 40, \"Pokédex\", new Point(0, 7), \"Pokédex\");\n Button PokemonButton = new Button(new Point(475, 40), 672-475, 40, \"Pokémon\", new Point(0, 6), \"Pokémon\");\n Button BagButton = new Button(new Point(475, 80), 672-475, 40, \"Bag\", new Point(0, 5), \"Bag\");\n Button PokenavButton = new Button(new Point(475, 120), 672-475, 40, \"Pokénav\", new Point(0, 4), \"Pokénav\");\n Button PlayerButton = new Button(new Point(475, 160), 672-475, 40, trainer.getName(), new Point(0, 3), trainer.getName());\n Button SaveButton = new Button(new Point(475, 200), 672-475, 40, \"save\", new Point(0, 2), \"Save\");\n Button OptionButton = new Button(new Point(475, 240), 672-475, 40, \"add_menu_other\", new Point(0, 1), \"Options\");\n Button ExitButton = new Button(new Point(475, 280), 672-475, 40, \"exit\", new Point(0, 0), \"exit\");\n menu.addButton(PokedexButton);\n menu.addButton(PokemonButton);\n menu.addButton(BagButton);\n menu.addButton(PokenavButton);\n menu.addButton(PlayerButton);\n menu.addButton(SaveButton);\n menu.addButton(OptionButton);\n menu.addButton(ExitButton);\n menu.getButton(menu.getCursor().getPos()).Highlight();\n return menu;\n }", "public interface IMenuService {\n\n List<Map<String,Object>> selectShowMenus(String rootId);\n\n ResultVO createMenu(MenuCreateVO createVO);\n\n ResultVO deleteMenu(String[] menuIds);\n\n ResultVO editMenu(MenuEditVO editVO);\n\n ResultVO grantPermissions(String menuId, String[] perIdArray);\n\n Pager<Map<String, Object>> getPageMenus(PagerReqVO pagerReqVO, TreeNode tree);\n\n\tResultVO getMenuTree();\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add_event, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add_adress, menu);\n return true;\n }", "private void addMenu(){\n //Where the GUI is created:\n \n Menu menu = new Menu(\"Menu\");\n MenuItem menuItem1 = new MenuItem(\"Lista de Libros\");\n MenuItem menuItem2 = new MenuItem(\"Nuevo\");\n\n menu.getItems().add(menuItem1);\n menu.getItems().add(menuItem2);\n \n menuItem1.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n cargarListaGeneradores( 2, biblioteca.getBiblioteca());\n }\n });\n \n menuItem2.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n addUIControls() ;\n }\n });\n \n menuBar.getMenus().add(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add_account, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_new_claim, menu);\n\t\treturn true;\n\t}", "protected abstract List<OpcionMenu> inicializarOpcionesMenu();", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_add, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetSupportMenuInflater().inflate(R.menu.activity_offer_add, menu);\n\n\t\treturn true;\n\t}", "public String addNew() {\r\n\t\ttry {\r\n\t\t\tgetNavigationPanel(2);\r\n\t\t\treturn \"questData\";\r\n\t\t} catch(Exception e) {\r\n\t\t\tlogger.error(\"Exception in addNew in action:\" + e);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_addition_vector, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add_admin, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.web_service_consumer, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n //add MenuItem(s) to ActionBar using Java code\n MenuItem menuItem_Purchase = menu.add(0, 1, Menu.NONE, \"Next\");\n MenuItemCompat.setShowAsAction(menuItem_Purchase,\n MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);\n\n //Log.d(\"recon\", savedSite.toString());\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.service_provider_home, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_new_notice_menu, menu);\n return true;\n }", "MenuEntry.Factory getMenuEntryFactory();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n menu.add(0, MENU_ITEM_ADD_TERM, 100, getString(R.string.Add));\n menu.findItem(MENU_ITEM_ADD_TERM).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);\n return super.onCreateOptionsMenu(menu);\n }", "public Menu createFileMenu();", "public void addMenuItems()\n\t{\n\t\tstartButton = new JButton(\"Start\");\n\t\tstartButton.setLayout(null);\n\t\tstartButton.setBounds(350, 225, 100, 50);\n\t\t\n\t\toptionsButton = new JButton(\"Options\");\n\t\toptionsButton.setLayout(null);\n\t\toptionsButton.setBounds(350, 275, 100, 50);\n\t\t\n\t\texitButton = new JButton(\"Exit\");\n\t\texitButton.setLayout(null);\n\t\texitButton.setBounds(350, 375, 100, 50);\n\t\texitButton.setActionCommand(\"exit\");\n\t\texitButton.addActionListener((ActionListener) this);\n\t\t\n\t\tmainMenuPanel.add(startButton);\n\t\tmainMenuPanel.add(optionsButton);\n\t\tmainMenuPanel.add(startButton);\n\t}", "@Test\n public void testMenuFactoryGetMenuItem() {\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n assertEquals(MENU_NAME, menuController.getMenuItem(1).getName());\n assertEquals(MENU_DESCRIPTION, menuController.getMenuItem(1).getDescription());\n assertEquals(MENU_PRICE, menuController.getMenuItem(1).getPrice());\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n menu.removeItem(R.id.action_search);\n MenuItem item = menu.add(\"Add New Address\");\n item.setIcon(R.drawable.add_plus_button);\n MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);\n\n }", "public ItemMenu(JDealsController sysCtrl) {\n super(\"Item Menu\", sysCtrl);\n\n this.addItem(\"Add general good\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.GOODS);\n }\n });\n this.addItem(\"Restourant Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.RESTOURANT);\n }\n });\n this.addItem(\"Travel Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.TRAVEL);\n }\n });\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.administrator_appbar_buttons_add_edit_pet, menu);\n return super.onCreateOptionsMenu(menu);\n }", "public static Services addNewService(Services services) {\n services.setId(FuncValidation.getValidIdService(services,ENTER_SERVICE_ID,INVALID_SERVICE_ID));\n services.setNameOfService(FuncValidation.getValidName(ENTER_SERVICE_NAME,INVALID_NAME));\n services.setUsedArea(FuncValidation.getValidDoubleNumber(ENTER_USED_AREA, INVALID_DOUBLE_NUMBER,30.0));\n services.setRentalFee(FuncValidation.getValidDoubleNumber(ENTER_RENTAL_FEE, INVALID_RENTAL_FEE,0.0));\n services.setMaxGuest(FuncValidation.getValidIntegerNumber(ENTER_MAXIMUM_OF_GUEST,INVALID_MAX_GUEST,0,20));\n services.setRentType(FuncValidation.getValidName(ENTER_TYPE_OF_RENT,INVALID_NAME));\n return services;\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_mainlst, menu);\n menu.removeItem(R.id.action_Add);\n return true;\n }", "public void add(String nameItem)\n\t{\n\t\tmenu.add(nameItem);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.new_skate_spot, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.details_cliente_menu, menu);\n return true;\n }", "private MenuManager createEditMenu() {\n\t\tMenuManager menu = new MenuManager(\"&Edition\", Messages.getString(\"IU.Strings.40\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tmenu.add(new GroupMarker(Messages.getString(\"IU.Strings.41\"))); //$NON-NLS-1$\n\n\t\tmenu.add(getAction(ActionFactory.UNDO.getId()));\n\t\tmenu.add(getAction(ActionFactory.REDO.getId()));;\n\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.CUT.getId()));\n\t\tmenu.add(getAction(ActionFactory.COPY.getId()));\n\t\tmenu.add(getAction(ActionFactory.PASTE.getId()));\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.DELETE.getId()));\n\t\tmenu.add(getAction(ActionFactory.SELECT_ALL.getId()));\n\t\tmenu.add(getAction(ActionFactory.FIND.getId()));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.PREFERENCES.getId()));\n\t\treturn menu;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_task, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_new_category, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.solucao_sistemas, menu);\n\t\treturn true;\n\t}", "public void createMenu() {\n deleteMenuGroupError = false;\n createMenuGroupError = true;\n if (menu.createMenu()) {\n updateMenuError = false;\n deleteMenuError = false;\n createMenuError = true;\n } else {\n createMenuError = false;\n }\n }", "private void createMenuForGCodeRepository(IMenuManager contextMenu) {\r\n\t\tcontextMenu.add(new AddAllGCodeInQueueAction(executionService, rs274Service));\r\n\t}", "public interface MenuService {\n\n List<Menu> getAll(Integer barId);\n\n List<Menu> findBy(Integer barId, LocalDate date, Integer mealId, String mealName);\n\n Menu get(Integer barId, String mealName);\n\n Menu save(Integer barId, MenuItemTo item);\n\n void delete(Integer id);\n\n}", "public Collection<Service> createServices();", "public interface IMenuService {\n\n ApiResult save(MenuSaveParam menuSaveParam);\n\n /**\n * 查询菜单列表(逐层查询)\n */\n ApiResult<List<MenuListResponse>> list(Integer menuId);\n\n ApiResult<MenuDetailResponse> detail(Integer menuId);\n\n ApiResult update(MenuUpdateParam menuUpdateParam);\n\n /**\n * 新建页面,查询菜单和权限数据\n */\n ApiResult<MenuNewResponse> newPage();\n\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add_book, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create, menu);\n return true;\n }", "public menuAddStasiun() {\n initComponents();\n }", "public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_new_appt, menu);\n return true;\n }", "MenuItem addItem(String title, Command callback);", "void addService(ServiceInfo serviceInfo);", "public void addMenu(Menu menu) {\r\n\t\titems.add(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.new_on_travel_item, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create_shopping_list, menu);\n return true;\n }", "public interface MenuService {\n\n int deleteMenuById(MenuDto menuDto);\n\n List<MenuVo> listMenu();\n\n MenuVo getMenuById(MenuDto menuDto);\n\n OperatorMenuVo operatorMenu(OperatorMenuDto operatorMenuDto);\n\n List<MenuVo> updateSort(List<UpdateMenuSortDto> updateMenuSortDto);\n\n List<MenuVo> getMenuByName(SearchByConditionDTO searchByConditionDTO);\n\n MenuVo getRootMenu();\n\n List<MenuEntity> getMenuByName(String name, String parentId);\n}", "Menu getMenuEdit();" ]
[ "0.8423055", "0.7246143", "0.71047014", "0.6931017", "0.6880201", "0.665359", "0.6581175", "0.65407485", "0.64627385", "0.64049757", "0.6367149", "0.63476455", "0.6306267", "0.6275393", "0.62665987", "0.62468374", "0.622823", "0.6203571", "0.6159975", "0.6159975", "0.6159975", "0.6155221", "0.6155092", "0.61486983", "0.61346984", "0.6125931", "0.61183727", "0.6106552", "0.61023855", "0.609172", "0.6079164", "0.6078665", "0.6076185", "0.6066317", "0.60585886", "0.6052436", "0.6048861", "0.6003502", "0.5997665", "0.5997334", "0.5996402", "0.5979912", "0.5977326", "0.5971516", "0.59614706", "0.5960363", "0.595861", "0.5943314", "0.5933941", "0.59303904", "0.5927302", "0.59146595", "0.59134716", "0.59056634", "0.5901436", "0.58991146", "0.58963174", "0.5875214", "0.5874845", "0.58715504", "0.5869897", "0.5868293", "0.5857985", "0.5856287", "0.5852075", "0.5851903", "0.58479583", "0.5844728", "0.5841638", "0.58308256", "0.5825529", "0.5810588", "0.57991403", "0.5785431", "0.5768383", "0.57682776", "0.5762303", "0.57620126", "0.5761522", "0.57543635", "0.57525754", "0.5751654", "0.57508457", "0.5750419", "0.574263", "0.5738207", "0.57362103", "0.5735199", "0.57334197", "0.5730308", "0.5729087", "0.57275385", "0.5718069", "0.57163125", "0.57127297", "0.5711616", "0.57022667", "0.5701519", "0.5699132", "0.5695918" ]
0.6771325
5
Process Show Services Menu method
public static void processShowServiesMenu(){ switch (ScannerUtils.scanner.nextLine()){ case SHOW_ALL_VILLA: showAllVilla(); break; case SHOW_ALL_HOUSE: showAllHouse(); break; case SHOW_ALL_ROOM: showAllRoom(); break; case SHOW_ALL_VILLA_NOT_DUPLICATE: showAllVillaNotDuplicate(); break; case SHOW_ALL_HOUSE_NOT_DUPLICATE: showAllHouseNotDuplicate(); break; case SHOW_ALL_ROOM_NOT_DUPLICATE: showAllRoomNotDuplicate(); break; case BACK_TO_MAIN_MENU_2: processMain(); break; case EXIT_2: System.exit(0); break; default: System.out.println("Please select from 1 to 8"); returnShowServicesMenu(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void returnShowServicesMenu(){\n System.out.print(\"Please enter a number to continue:\");\n processShowServiesMenu();\n }", "public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "@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}", "public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_service_list, menu);\n\n return true;\n\n }", "private Menu createServiceMenu() {\r\n\t\tMenu serviceMenu = new Menu(\"Service\");\r\n\r\n\t\tstartService = new MenuItem(\"Start\");\r\n\t\tstartService.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlocalPeer.startService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(startService);\r\n\r\n\t\tstopService = new MenuItem(\"Stop\");\r\n\t\tstopService.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlocalPeer.stopService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tstopService.setEnabled(false);\r\n\t\tserviceMenu.add(stopService);\r\n\r\n\t\treturn serviceMenu;\r\n\t}", "protected void showSystemMenu() {\n windowMenu.doClick(0);\n }", "public abstract void displayMenu();", "public void showMenu() {\n menuController.showMenuPanel();\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t\t\t\t}", "public static void returnAddNewServicesMenu() {\n System.out.print(\"Please enter a number to continue:\");\n processAddnewServicesMenu();\n }", "public static void processAddnewServicesMenu() {\n switch (ScannerUtils.scanner.nextLine()) {\n case ADD_NEW_VILLA:\n addNewVilla();\n break;\n case ADD_NEW_HOUSE:\n addNewHouse();\n break;\n case ADD_NEW_ROOM:\n addNewRoom();\n break;\n case BACK_TO_MAIN_MENU:\n processMain();\n break;\n case EXIT:\n System.exit(0);\n break;\n default:\n System.out.println(\"Please select from 1 to 4\");\n returnAddNewServicesMenu();\n }\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\n\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t}", "private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }", "private void showServices()\n {\n // Remove all of the items from the listField.\n _treeField.deleteAll();\n \n // Get a copy of the ServiceRouting class.\n ServiceRouting serviceRouting = ServiceRouting.getInstance();\n \n // Add in our new items by trolling through the ServiceBook API.\n ServiceBook sb = ServiceBook.getSB();\n ServiceRecord[] records = sb.getRecords();\n \n if( records == null ) \n {\n return;\n }\n \n int rootNode = _treeField.addChildNode( 0, \"Service Records\" );\n \n int numRecords = records.length;\n \n for( int i = 0; i < numRecords; i++ ) \n {\n String name = records[i].getName();\n String description = records[i].getDescription();\n \n if( description == null || description.length() == 0 ) \n {\n description = \"No description available\" ;\n }\n \n String uid = records[i].getUid();\n boolean serialBypass = serviceRouting.isSerialBypassActive( uid );\n\n int newParentNode = _treeField.addChildNode( rootNode, name );\n _treeField.addChildNode( newParentNode, description );\n _treeField.addChildNode( newParentNode, uid );\n _treeField.addChildNode( newParentNode, serialBypass ? \"Serial Bypass: Connected\" : \"Serial Bypass: Disconnected\");\n \n // Perform the check for the Desktop SerialRecord.\n if( name != null && name.equals( \"Desktop\" )) \n {\n _desktopUID = uid;\n }\n }\n \n _treeField.setCurrentNode( rootNode ); // Set the root as the starting point.\n }", "public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }", "static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }", "private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }", "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}", "private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }", "private static void returnMenu() {\n\t\t\r\n\t}", "@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 }", "private static void showMenu(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\tSystem.out.println(\"0) Show Shape information\");\r\n\t\tSystem.out.println(\"1) Create Shape\");\r\n\t\tSystem.out.println(\"2) Calculate perimeter\");\r\n\t\tSystem.out.println(\"3) Calculate area\");\r\n\t\tSystem.out.println(\"4) Scale shape\");\r\n\t}", "public void menu() {\n System.out.println(\n \" Warehouse System\\n\"\n + \" Stage 3\\n\\n\"\n + \" +--------------------------------------+\\n\"\n + \" | \" + ADD_CLIENT + \")\\tAdd Client |\\n\"\n + \" | \" + ADD_PRODUCT + \")\\tAdd Product |\\n\"\n + \" | \" + ADD_SUPPLIER + \")\\tAdd Supplier |\\n\"\n + \" | \" + ACCEPT_SHIPMENT + \")\\tAccept Shipment from Supplier |\\n\"\n + \" | \" + ACCEPT_ORDER + \")\\tAccept Order from Client |\\n\"\n + \" | \" + PROCESS_ORDER + \")\\tProcess Order |\\n\"\n + \" | \" + CREATE_INVOICE + \")\\tInvoice from processed Order |\\n\"\n + \" | \" + PAYMENT + \")\\tMake a payment |\\n\"\n + \" | \" + ASSIGN_PRODUCT + \")\\tAssign Product to Supplier |\\n\"\n + \" | \" + UNASSIGN_PRODUCT + \")\\tUnssign Product to Supplier |\\n\"\n + \" | \" + SHOW_CLIENTS + \")\\tShow Clients |\\n\"\n + \" | \" + SHOW_PRODUCTS + \")\\tShow Products |\\n\"\n + \" | \" + SHOW_SUPPLIERS + \")\\tShow Suppliers |\\n\"\n + \" | \" + SHOW_ORDERS + \")\\tShow Orders |\\n\"\n + \" | \" + GET_TRANS + \")\\tGet Transaction of a Client |\\n\"\n + \" | \" + GET_INVOICE + \")\\tGet Invoices of a Client |\\n\"\n + \" | \" + SAVE + \")\\tSave State |\\n\"\n + \" | \" + MENU + \")\\tDisplay Menu |\\n\"\n + \" | \" + EXIT + \")\\tExit |\\n\"\n + \" +--------------------------------------+\\n\");\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.service_provider_home, menu);\n return true;\n }", "private void searchMenu(){\n\t\t\n\t}", "protected abstract void addMenuOptions();", "private void goToShop() {\n shopMenu.runMenu();\n }", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(android.view.Menu menu) {\n menu.add(1001, 100, 1, \"断开轮询服务\");\n menu.add(1002, 101, 2, \"开启轮询服务\");\n return super.onCreateOptionsMenu(menu);\n }", "private void showMenu() {\n\t Scanner sc = new Scanner(System.in);\n\t Arguments argument = Arguments.INVALID;\n\t System.out.println(\"Enter command of your choice in the correct format\");\n\t do\n\t {\n\t \tString command = sc.nextLine();\n\t \tString[] arguments = command.split(\" +\");\n\t \targument = validateAndReturnType(arguments);\n\t \tswitch(argument) {\n\t\t \tcase INCREASE:\n\t\t \t\tincrease(arguments);\n\t\t \t\tbreak;\n\t\t \tcase REDUCE:\n\t\t \t\treduce(arguments);\n\t\t \t\tbreak;\n\t\t\t\tcase COUNT:\n\t\t\t\t\tcount(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INRANGE:\n\t\t\t\t\tinRange(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEXT:\n\t\t\t\t\tnext(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PREVIOUS:\n\t\t\t\t\tprevious(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\tcase INVALID:\n\t\t\t\t\tSystem.out.println(\"Please enter a valid command\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid command. Enter a command in the correct format\");\n\t \t}\n\t } while(argument != Arguments.QUIT);\n\t}", "private void displayMenuOptions()\n {\n // display user options menu\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n System.out.println(\"COMMAND OPTIONS:\");\n System.out.println(\"\");\n System.out.println(\" 'on' to force power controller to ON state\");\n System.out.println(\" 'off' to force power controller to OFF state\");\n System.out.println(\" 'status' to see current power controller state\");\n System.out.println(\" 'sunrise' to display sunrise time.\");\n System.out.println(\" 'sunset' to display sunset time.\");\n System.out.println(\" 'next' to display next scheduled event.\");\n System.out.println(\" 'time' to display current time.\");\n System.out.println(\" 'coord' to display longitude and latitude.\");\n System.out.println(\" 'help' to display this menu.\");\n System.out.println(\"\");\n System.out.println(\"PRESS 'CTRL-C' TO TERMINATE\");\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n }", "void Menu();", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.wbservices_example, menu);\n return true;\n }", "public void menuDisplay() {\n\t\t\n\t\tjava.lang.System.out.println(\"\");\n\t\tjava.lang.System.out.println(\"~~~~~~~~~~~~Display System Menu~~~~~~~~~~~~\");\n\t\tjava.lang.System.out.println(\"**** Enter a Number from the Options Below ****\");\n\t\tjava.lang.System.out.println(\"Choice 1 – Print System Details\\n\" + \n\t\t\t\t\t\t \"Choice 2 - Display System Properties\\n\" +\n\t\t\t\t\t\t \"Choice 3 – Diagnose System\\n\" + \n\t\t\t\t\t\t \"Choice 4 – Set Details\\n\" + \n\t\t\t\t\t\t \"Choice 5 – Quit the program\");\n\t\t\n\t}", "private void displayMenu()\r\n {\r\n System.out.println(\"\\nWelcome to Car Park System\");\r\n System.out.println(\"=============================\");\r\n System.out.println(\"(1)Add a Slot \");\r\n System.out.println(\"(2)Delete a Slot\");\r\n System.out.println(\"(3)List all Slots\");\r\n System.out.println(\"(4)Park a Car\");\r\n System.out.println(\"(5)Find a Car \");\r\n System.out.println(\"(6)Remove a Car\");\r\n System.out.println(\"(7)Exit \");\r\n System.out.println(\"\\nSelect an Option: \");\r\n }", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "@Override\r\n public void run() {\n opsi_menu();\r\n\r\n }", "private static void mostrarMenu() {\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println(\"-----------OPCIONES-----------\");\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\n\\t1) Mostrar los procesos\");\n\t\tSystem.out.println(\"\\n\\t2) Parar un proceso\");\n\t\tSystem.out.println(\"\\n\\t3) Arrancar un proceso\");\n\t\tSystem.out.println(\"\\n\\t4) A�adir un proceso\");\n\t\tSystem.out.println(\"\\n\\t5) Terminar ejecucion\");\n\t\tSystem.out.println(\"\\n------------------------------\");\n\t}", "@Override\n\tpublic boolean onMenuOpened(int featureId, Menu menu) {\n\t\tif (((BiosenseApplication) getApplication()).serviceIsRunning()) {\n\n\t\t\tmenu.findItem(R.id.itemToggleService).setTitle(\n\t\t\t\t\tR.string.titleItemStopService);\n\t\t\tmenu.findItem(R.id.itemToggleService).setIcon(\n\t\t\t\t\tandroid.R.drawable.ic_media_pause);\n\t\t} else {\n\n\t\t\tmenu.findItem(R.id.itemToggleService).setTitle(\n\t\t\t\t\tR.string.titleItemStartService);\n\n\t\t\tmenu.findItem(R.id.itemToggleService).setIcon(\n\t\t\t\t\tandroid.R.drawable.ic_media_play);\n\n\t\t}\n\n\t\treturn true;\n\t}", "public Menu createToolsMenu();", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "private void mainMenuDetails() {\n try {\n System.out.println(\"Enter your choice:\");\n final int menuOption = option.nextInt();\n switch (menuOption) {\n case 1:\n showFullMenu();\n break;\n case 2:\n acceptRejectResponse();\n break;\n case 3:\n placeOrder();\n break;\n case 4:\n showFullOrder();\n break;\n case 5:\n Runtime.getRuntime().halt(0);\n default:\n System.out.println(\"Choose either 1 or 2\");\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.out.println(\"enter a valid value\");\n }\n option.nextLine();\n mainMenu();\n }", "public static void displayMenu() {\r\n System.out.print(\"\\nName Saver Server Menu\\n\\n\"\r\n +\"1. Add a name\\n2. Remove a name\\n3. List all names\\n\"\r\n +\"4. Check if name recorded\\n5. Exit\\n\\n\"\r\n +\"Enter selection [1-5]:\");\r\n }", "public MenuService() {\n\t\tnew DisplayMenu();\n\t}", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "private void callSubMenu() {\n new SubMenu().display();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.web_service_consumer, menu);\n return true;\n }", "private void displayMenu() {\n\t\tint option = MenuView.getMenuOption(\n\t\t\t\"Welcome \" + movieGoer.getName() + \"!\",\n\t\t\t\"View movie showtimes\",\n\t\t\t\"Book a ticket\",\n\t\t\t\"View movie details\",\n\t\t\t\"List top 5 movies\",\n\t\t\t\"View booking history\",\n\t\t\t\"Exit\"\n\t\t);\n\t\t\n\t\tswitch (option) {\n\t\t\tcase 1:\n\t\t\t\tNavigationController.load(new ShowTimeController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tNavigationController.load(new BookingController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tNavigationController.load(new MovieController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tNavigationController.load(new TopMoviesController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tNavigationController.load(new BookingHistoryController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tNavigationController.goBack();\n\t\t\t\tbreak;\n\t\t}\n\t}", "private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.service_order, menu);\n return true;\n }", "public static void menu() {\n\n\t\tSystem.out.println(\"\\n*** MENU ***: \");\n\t\tSystem.out.print(\"\\n1. Host current Date and Time\\n\" + \"2. Host uptime\\n\" + \"3. Host memory use\\n\"\n\t\t\t\t+ \"4. Host IPV4 socket connections\\n\" + \"5. Host current users\\n\" + \"6. Host running processes\\n\"\n\t\t\t\t+ \"7. Quit\\n\" + \"\\nSelect option: \");\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tmenuSelect = sc.nextInt();\n\t\t\tif (menuSelect < 1 || menuSelect > 7) {\n\t\t\t\tSystem.out.println(\"\\nUser invalid input, input number between 1 and 7\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"\\nUser invalid input, input number between 1 and 7\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tswitch (menuSelect) {\n\t\tcase 1:\n\t\t\tSystem.out.println(\"Date Request from Client\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"Uptime Request from Client\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"Memory Use Request from Client\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tSystem.out.println(\"IPV4 Socket Connections Request from Client\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"Current Users Request from Client\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tSystem.out.println(\"Current OS Version Request from Client\");\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Quit\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tsc.close(); // close the Scanner object\n\t}", "private void printMenu() {\n\t\tSystem.out.printf(\"\\n********** MiRide System Menu **********\\n\\n\");\n\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Create Car\", \"CC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Book Car\", \"BC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Complete Booking\", \"CB\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Display ALL Cars\", \"DA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Specific Car\", \"SS\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Available Cars\", \"SA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Seed Data\", \"SD\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Load Cars\", \"LC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Exit Program\", \"EX\");\n\t\tSystem.out.println(\"\\nEnter your selection: \");\n\t\tSystem.out.println(\"(Hit enter to cancel any operation)\");\n\t}", "private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }", "public static void structEngineerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Structural Engineer's Information\");\n System.out.println(\"2 - Would you like to search for a Structural Engineer's Information\");\n System.out.println(\"3 - Adding a new Structural Engineer's Information\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.server_detector, menu);\r\n return true;\r\n }", "static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}", "public void controllerMenu(){\n\t\tint option=1;\n\t\t\n\t\twhile(option!=0){ \n\t\t\tSystem.out.println(\"You are in the air controller menu\");\n\t\t\tSystem.out.println(\"Write the number corresponding to the action you quant to perform:\");\n\t\t\tSystem.out.println(\"1. Add plane (basic info)\");\n\t\t\tSystem.out.println(\"2. Add detailed information of a plane\");\n\t\t\tSystem.out.println(\"3. Show airspace\");\n\t\t\tSystem.out.println(\"4. Encrypt plane\");\n\t\t\tSystem.out.println(\"5. Decrypt plane\");\n\t\t\tSystem.out.println(\"Press 0 to exit\");\n\t\t\t\n\t\t\toption = entry.nextInt();\n\t\t\t\n\t\t\tswitch(option){\t// switch with a method for each operation\n\t\t\t\tcase 1: \n\t\t\t\t\taddPlane();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: \n\t\t\t\t\tafegirInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: \n\t\t\t\t\tdisplayInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: \n\t\t\t\t\tencrypt();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tdesencriptar();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void initMenu(){\n\t}", "@Override\n public void onMenuClick() {\n Toast.makeText(SearchActivity_.this, \"Menu click\", Toast.LENGTH_LONG).show();\n }", "public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}", "public static void customerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the customers\");\n System.out.println(\"2 - Would you like to search for a customer's information\");\n System.out.println(\"3 - Adding a new customer's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "void clickFmFromMenu();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scout_status_page, menu);\n return true;\n }", "public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }", "@Override\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.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 }", "@Override\n public boolean onCreateOptionsMenu( Menu menu )\n {\n getMenuInflater().inflate( R.menu.from_server1, menu );\n return true;\n }", "static void DisplayMainMenu()\n {\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Menu\");\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Enter Selection\");\n \tSystem.out.println(\"1) Send Message\");\n \tSystem.out.println(\"2) Receive Message\");\n \tSystem.out.println(\"3) Run regression test\");\n }", "private void jMenuItem13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem13ActionPerformed\n // TODO add your handling code here:\n Servicios.main(null); \n ;\n }", "public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }", "default public void clickMenu() {\n\t\tremoteControlAction(RemoteControlKeyword.MENU);\n\t}", "public void menu(){\n super.goToMenuScreen();\n }", "public void readTheMenu();", "public static void openOptionMenu() {\r\n\t\tif(!STATUS.equals(Gamestatus.STOPPED)) return;\r\n\t\tgui.setMenu(new OptionMenu(), true);\r\n\t}", "void clickAmFromMenu();", "public void displayMenu() {\r\n\t\tSystem.out.println(\"Enter a number between 0 and 8 as explained below: \\n\");\r\n\t\tSystem.out.println(\"[\" + ADD_CUSTOMER + \"] Add a customer.\");\r\n\t\tSystem.out.println(\"[\" + ADD_MODEL + \"] Add a model.\");\r\n\t\tSystem.out.println(\"[\" + ADD_TO_INVENTORY + \"] Add a washer to inventory.\");\r\n\t\tSystem.out.println(\"[\" + PURCHASE + \"] Purchase a washer.\");\r\n\t\tSystem.out.println(\"[\" + LIST_CUSTOMERS + \"] Display all customers.\");\r\n\t\tSystem.out.println(\"[\" + LIST_WASHERS + \"] Display all washers.\");\r\n\t\tSystem.out.println(\"[\" + DISPLAY_TOTAL + \"] Display total sales.\");\r\n\t\tSystem.out.println(\"[\" + SAVE + \"] Save data.\");\r\n\t\tSystem.out.println(\"[\" + EXIT + \"] to Exit\");\r\n\t}", "private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}", "public String getActivationMenu();", "void invokeAppLogic(IMenu fromMenu);", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.system_info_main, menu);\n return true;\n }", "public static void displayMainMenu() {\n\t\tSystem.out.println(\"1.) Scan network\");//looks for IP address\n\t\tSystem.out.println(\"2.) Wait for connections\");//server\n\t\tSystem.out.println(\"3.) Connect to client\");//client\n\t\tSystem.out.println(\"4.) Exit\");\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n ActivityOptionsService activityOptionsService = new ActivityOptionsService();\n activityOptionsService.openActivity(this ,id);\n return super.onOptionsItemSelected(item);\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}", "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}", "void askMenu();", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n Intent aboutIntent = new Intent(this, AboutActivity.class);\r\n startActivity(aboutIntent);\r\n } else if (id == R.id.action_sync) {\r\n if (isServiceRunning()) {\r\n hideFloatingView();\r\n updateSelectedItems();\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException e1) {\r\n e1.printStackTrace();\r\n }\r\n showFloatingView();\r\n } else\r\n Toast.makeText(this, \"RollingNEWS is not started. Please press start button!\", Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "public void menu() {\n\t\tstate.menu();\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_spi, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_server, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu)\n\t{\n\t\tgetMenuInflater().inflate(R.menu.menu_routine_browser, menu);\n\t\treturn true;\n\t}" ]
[ "0.73919386", "0.7170494", "0.69385296", "0.69088316", "0.68785155", "0.6839094", "0.6832658", "0.6741938", "0.67403424", "0.6724705", "0.6720893", "0.67174923", "0.67117566", "0.6664603", "0.665011", "0.6629459", "0.66282755", "0.6613753", "0.6599618", "0.65817475", "0.65798116", "0.6569371", "0.6561027", "0.65607905", "0.6556875", "0.65243065", "0.6508092", "0.6500878", "0.649591", "0.6489643", "0.64763725", "0.647484", "0.6469127", "0.6467632", "0.6443526", "0.6443019", "0.6432115", "0.6413845", "0.64120215", "0.640482", "0.63737106", "0.6363762", "0.6354698", "0.63532704", "0.63508034", "0.63497627", "0.6342523", "0.6323085", "0.6322273", "0.6311417", "0.6310794", "0.6303202", "0.629951", "0.62927103", "0.6282876", "0.6281169", "0.62793034", "0.6271383", "0.6269539", "0.626614", "0.6263406", "0.62605965", "0.62603176", "0.6255865", "0.62545484", "0.6252748", "0.62493837", "0.62338024", "0.62284774", "0.62103", "0.6197127", "0.6195144", "0.6190115", "0.6188438", "0.61809176", "0.6180607", "0.6179646", "0.6177693", "0.6177641", "0.6168501", "0.61609423", "0.6141986", "0.61364084", "0.6128924", "0.61280924", "0.6125931", "0.6122945", "0.61151284", "0.61125267", "0.6112233", "0.6107231", "0.60966814", "0.6095842", "0.60892427", "0.6081299", "0.6081087", "0.60768837", "0.6072731", "0.6072643", "0.6069019" ]
0.7494624
0
Show All Villa method
public static void showAllVilla(){ ArrayList<Villa> villaList = getListFromCSV(FuncGeneric.EntityType.VILLA); displayList(villaList); showServices(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showAll();", "public void viewAll() {\n click(viewAllLink);\n }", "public String showAllNhanvien();", "@Override\n\tpublic String showAll() {\n\t\treturn null;\n\t}", "public void printAll()\n {\n r.showAll();\n }", "String showAllNodes();", "public static void showAllVillaNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.VILLA);\n }", "public void printList() {\n userListCtrl.showAll();\n }", "public void displayAll() {\n\t\t\n\t\tbankop.display();\n\t\n\t}", "public static void showAllHouse(){\n ArrayList<House> houseList = getListFromCSV(FuncGeneric.EntityType.HOUSE);\n displayList(houseList);\n showServices();\n }", "@Override\n\tpublic ArrayList<Carpo> showAllCars() {\n\t\treturn inList.showAll();\n\t}", "public String listViaje() {\n\t\t\t//resetForm();\n\t\t\treturn \"/boleta/list.xhtml\";\t\n\t\t}", "@Override\r\n public List<Visitors> visfindAll() {\n return userMapper.visfindAll();\r\n }", "public List<T> showAllClients();", "public void listar() {\n\t\t\n\t}", "private void showAll() {\n getAll();\n //show persons\n MainActivity.instance().displayPersonsRunnable = new DisplayPersonsRunnable(MainActivity.instance());\n this.thread = new Thread(MainActivity.instance().displayPersonsRunnable);\n this.thread.start();\n }", "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}", "@VTID(30)\n boolean getShowAllItems();", "@Override\n\tpublic List<vip> selectAll() {\n\t\treturn this.vd.selectAll();\n\t}", "@Override\n public List<DetalleVenta> all() {\n return detalleVentaJpaRepository.findAll();\n }", "public void Refresh(){\n this.ShowAll();\n }", "org.naru.park.ParkController.CommonAction getAll();", "org.naru.park.ParkController.CommonAction getAll();", "public void displayAll() {\n\t\tSystem.out.println(\"Title \"+this.getTitle());\n\t\tSystem.out.println(\"Artist \"+this.getArtist());\n\t\tSystem.out.println(\"Genre \"+this.genre);\n\t}", "private void doViewAllPartners() {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"***Hors Management System:: System Administration:: View All Partners\");\n\n List<Partner> partners = partnerControllerRemote.retrieveAllPartners();\n\n partners.forEach((partner) -> {\n System.out.println(\"Partner ID:\" + partner.getPartnerId() + \"Partner Name: \" + partner.getName() + \"Password: \" + partner.getPassword());\n });\n\n System.out.println(\"Press any key to continue...>\");\n sc.nextLine();\n }", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "@Override\n public String[] listAll() {\n return list();\n }", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "public List<Manuscript> showAllMyManuscripts() {\t\t\r\n\t\treturn myManuscripts;\r\n\t}", "public String showAll()\n {\n StringBuilder commandList = new StringBuilder();\n \n for(String command : validCommands.keySet()) \n {\n commandList.append( command + \" \" );\n } //for\n \n return commandList.toString();\n }", "String showAllPublications() {\n\n PrintModelVisitor printVisitor = new PrintModelVisitor();\n visitPublications(mBooks, printVisitor);\n visitPublications(mMagazines, printVisitor);\n\n return printVisitor.getPublications();\n }", "public void buttonShowAll(ActionEvent actionEvent) {\n }", "@Override\n\tpublic void listAllItems() {\n\t\t\n\t}", "abstract public void showAllStudents();", "public void ShowAllUsers()\r\n {\r\n userList.forEach((s) -> { System.out.println(s); });\r\n }", "@Override\r\n\tpublic List<Planter> viewAllPlanters() {\r\n\t\t\r\n\t\treturn planterRepo.findAll();\r\n\t}", "@GetMapping(\"/view-all\")\r\n\tpublic List<ProductDetails> viewAllProducts() {\r\n\r\n\t\treturn productUtil.toProductDetailsList(productService.viewAllProducts());\r\n\t}", "public void showAllPictures(View view) {\n\n Intent intent = new Intent(this, PicturesActivity.class);\n intent.putExtra(\"show_all_pictures\", \"showAllPictures\");\n startActivity(intent);\n }", "public static String showAll(){\n return resultsMap.toString();\n }", "List<UmsMenu> selectAll();", "void displayAllPosts();", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "public String listar() {\n DocumentoVinculadoDAO documentoVinculadoDAO = new DocumentoVinculadoDAO();\n lista = documentoVinculadoDAO.listarStatus(1);\n return \"listar\";\n\n }", "@RequestMapping(value = \"/show/all/products\")\r\n\tpublic ModelAndView showAllProducts() {\r\n\t\tModelAndView mv = new ModelAndView(\"page\");// Here page is the logical view name\r\n\t\tmv.addObject(\"title\", \"All Products\");\r\n\t\tmv.addObject(\"userClickAllProducts\", true);\r\n\t\treturn mv;\r\n\t}", "public void displayAllBanner() {\n io.print(\"=== Display All DVDs ===\");\n }", "@Override\n public List listar() {\n return instalaciones.getAll();\n }", "private void viewAllStudents() {\n Iterable<Student> students = ctrl.getStudentRepo().findAll();\n students.forEach(System.out::println);\n }", "public List showAll() {\n\t\tSession session = null;\n\t\tList temp = new ArrayList();\n\t\ttry {\n\n\t\t\tsession = MyUtility.getSession();// Static Method which makes only\n\t\t\t\t\t\t\t\t\t\t\t\t// one object as method is\n\t\t\t\t\t\t\t\t\t\t\t\t// static\n\n\t\t\tQuery q = session.createQuery(\"FROM AuctionVO \");\n\n\t\t\ttemp = q.list();\n\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t//session.close();\n\t\t}\n\t\treturn temp;\n\t}", "@GetMapping(\"/listAll\")\n public String listAll(Model model) {\n List<Person> people = personRepo.getAll();\n\n model.addAttribute(\"people\", people);\n\n return \"listAll\";\n }", "@RequestMapping(value = \"/show/all/products\")\n\tpublic ModelAndView showAllProducts() {\t\t\n\t\tModelAndView mv = new ModelAndView(\"page\");\t\t\n\t\tmv.addObject(\"title\",\"All Products\");\n\t\t\n\t\t//passing the list of categories\n\t\tmv.addObject(\"categories\", categoryDAO.list());\n\t\t\n\t\tmv.addObject(\"userClickAllProducts\",true);\n\t\treturn mv;\t\t\t\t\n\t}", "@RequestMapping(value = \"/obtenerVeredas\", method = RequestMethod.GET)\n\tpublic Iterable<Vereda> obtenerListaVeredas() {\n\t\treturn veredaRepository.findAll();\n\t\t//return JsonManager.toJson(veredaRepository.findAll());\n\t}", "@Override\r\n\tpublic List<Product> showAll() throws Exception {\n\t\treturn this.dao.showAll();\r\n\t}", "public void selectAll() {\n\t\tProductMenu menu = new ProductMenu();\n\t\ttry {\n\t\t\tList<Stock> list = service.selectAll();\n\t\t\tmenu.displayList(list);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@GetMapping(\"/route/list\")\n public String allRoutesPage() {\n return \"admin/route_list\";\n }", "@ApiOperation(value = \"Route Get mapping to fetch all routes\", response = List.class)\n\t@GetMapping(\"/all\")\n\tpublic ResponseEntity<List<RouteDto>> viewAllRoutes() {\n\t \n\t List<Route> routeList = this.routeServices.viewRouteList();\n\t\tList<RouteDto> routeDtoList = new ArrayList<>();\n\t\tfor (Route r : routeList) {\n\t\t\tRouteDto routedto = modelMapper.map(r, RouteDto.class);\n\t\t\trouteDtoList.add(routedto);\n\t\t}\n\t\tif (!(routeDtoList.isEmpty())) {\n\t\t\treturn new ResponseEntity<>(routeDtoList, HttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<>(routeDtoList, HttpStatus.NOT_FOUND);\n\t\t}\n\t}", "public void displaySelections() {\n List<VendingItem> listOfItems = service.getAllItemsNonZero(); //<-- uses lambda\n view.displaySelections(listOfItems);\n }", "void showPatients() {\n\t\t\t\n\t}", "@RequestMapping(\"/welcome\")\n public String ViewAllVegs(Model model)\n {\n List<Vegetable> vegList = vegRepository.findAll();\n\n model.addAttribute(\"vegList\", vegList);\n\n return \"welcome\";\n }", "public static void mostrarVehiculos() {\n for (Vehiculo elemento : vehiculos) {\n System.out.println(elemento);\n }\n\t}", "@GetMapping(value=\"/getAll\")\n\tpublic List<Question> getAll(){\n\t\tLOGGER.info(\"Viewing all questions\");\n\t\treturn questionObj.viewAllQuestions();\n\t}", "public void displayAll(){\n System.out.println(\"guestCounter: \" + guestCounter);\n for(int i=0;i<guestCounter;i++){\n guest[i].dispGuest();\n }\n }", "@Override\n\tpublic void showCities() {\n\t\tArrayList<City> cities = Singleton.CityRegistDao().findAll();\n\t\tcityOptions = \"\";\n\t\tfor (City city : cities) {\n\t\t\tcityOptions += String.format(\"<li role=\\\"presentation\\\"> <a role=\\\"menuitem\\\" tabindex=\\\"-1\\\" href=javascript:void(0)>%s</a> </li>\\n\", city.getName(), city.getName());\n\t\t}\n\t\tSystem.out.println(cityOptions);\n\t}", "public <T extends Object> void showAll(List<T> theList){\n theList.forEach(System.out::println);\n }", "public void listar()\n\t{\n\t\tdatabase.list().forEach(\n\t\t\t(entidade) -> { IO.println(entidade.print() + \"\\n\"); }\n\t\t);\n\t}", "List<Videoinfo> selectAll();", "public static void index() {\n\t\tList<models.Todo> todos = models.Todo.findAllSorted();\t\n\t\trender(todos);\n\t}", "@Override\r\n\tpublic void viewAllUsers() {\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\tallUsers = udao.getAllUsers();\r\n\t\t\r\n\t\tSystem.out.println(\"ALL USERS:\");\r\n\t\tSystem.out.println(\"ID\\tUsername\\tName\");\r\n\t\t\r\n\t\tfor(int i = 0; i < allUsers.size(); i++) {\r\n\t\t\tUser tempUser = allUsers.get(i);\r\n\t\t\tSystem.out.println(tempUser.getUserID() + \"\\t\" + tempUser.getUsername() + \"\\t\"\r\n\t\t\t\t\t+ tempUser.getFirstName() + \" \" + tempUser.getLastName());\r\n\t\t}\r\n\r\n\t}", "public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "public void showMembers() {\r\n\t\tfor(Member m: members) {\r\n\t\t\tm.show();\r\n\t\t}\r\n\t}", "public void show() {\r\n List<Benefit> listBeneficio = service.findAll();\r\n if(listBeneficio!=null && !listBeneficio.isEmpty()){\r\n for(Benefit c: listBeneficio){\r\n LOGGER.info(c.toString());\r\n }\r\n }\r\n }", "public static String showAllStats() {\n return showStats(allStats, \"All stats\");\n }", "public List<String> show () {\n\t\treturn userDao.show();\n\t}", "List<NovedadAdapter> getAll();", "@Override\n\tpublic List<Provincia> fiindAll() {\n\t\treturn provincieRepository.findAllByOrderByNameAsc();\n\t}", "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "public void showAnimalList() {\n\t\tshowAnimalList(Calendar.getInstance().getTime());\n\t}", "public void showVehicles() {\n\t\tfor (Vehicle vehicle : vehicles) {\n\t\t\tSystem.out.println(vehicle);\n\t\t}\n\t}", "@Override\r\n\tpublic void viewAllAccountsAllUsers() {\n\t\tas.getAllAccountsAllUsers();\r\n\t}", "public void displayVragenlijst() {\n List<Vragenlijst> vragenlijst = winkel.getVragenlijst();\n\n System.out.println(\"Kies een vragenlijst: \");\n\n for (int i = 0; i < vragenlijst.size(); i++) {\n System.out.println((i + 1) + \". \" + vragenlijst.get(i));\n }\n }", "public String showAll(){\n\tString msg = \"\";\n\tboolean val = false;\n\tfor(int i =0;i<arch.length && !val;i++){\n\t\tif(arch[i]!=null){\n\t\t\tmsg+=arch[i].getName()+\": \"+arch[i].getDate().getDay()+\" of \"+ arch[i].getDate().getMonth()+\", \";\n\n\t\t}\n\t\telse{\n\t\t\tval=true;\n\t\t}\n\t}\n\treturn msg;\n}", "public void index() {\n\t\t\n\t\tList<Filme> preferencias = new ArrayList<Filme>();\n\t\tfor( Map.Entry<Key, Integer> entry : session.getUsuario().getPreferencias().entrySet()){\n\t\t\tFilme tmp = filmeDao.getById(entry.getKey());\n\t\t\ttmp.setVotos(entry.getValue());\n\t\t\tpreferencias.add(tmp);\n\t\t}\n\t\t\n\t\t// passando todos os filmes, o usuário e as preferencias dele\n\t\tresult.include(\"filmes\", filmeDao.getAllInOrder() );\n\t\tresult.include(\"usuario\", session.getUsuario() );\n\t\tresult.include(\"preferencias\", preferencias);\n\t}", "public static void show(){\r\n for(int i =0; i<loan.size(); i++){\r\n loan.get(i).calculate();\r\n }\r\n }", "public List<Ejemplar> getAll();", "@GetMapping(\"/all\")\n public List<Admin> getAll(){\n return adminService.getAll();\n }", "public static void allFinder(HttpServletRequest req, HttpServletResponse res)\n\t\t\tthrows IOException, JsonProcessingException {\n\n\t\tSuperVillainService myServ = new SuperVillainServiceImpl();\n\t\tList<SuperVillain> myVillList = myServ.getAllVillains();\n\t\tSystem.out.println(\"here is the list: \"+myVillList);\n\t\t\n\t\t/*\n\t\t * in your project 1 you MAY already have the user's information in their session...no\n\t\t * need to go to the database in that case\n\t\t * You can just extract the reimbursments doing a\n\t\t * HttpSession session = req.getSession();\n\t\t * session.getAttribute(\".....\n\t\t */\n\t\t\n\t\tPrintWriter printer = res.getWriter();\n\t\tprinter.write(new ObjectMapper().writeValueAsString(myVillList));\n\t}", "public List<TVShow> getAllShows(){\n\tList<TVShow> shows = new ArrayList<>();\n\ttvShowRepo.findAll().forEach(show->shows.add(show));\n\treturn shows;\n}", "@RequestMapping(value = \"/all\", method = RequestMethod.GET)\r\n\t@PreAuthorize(\"hasRole('ROLE_MODERATOR')\")\r\n\tpublic String showAllItems(Model model) {\r\n\t\tList<WebItem> webItemList = new ArrayList<WebItem>();\r\n\r\n\t\twebItemList.addAll(webItemService.getWebItems(1000));\r\n\t\t//order webItems by descending createdate order\r\n\t\tCollections.sort(webItemList, new Comparator<WebItem>() {\r\n\t\t\t public int compare(WebItem o1, WebItem o2) {\r\n\t\t\t return o2.getCreateDate().compareTo(o1.getCreateDate());\r\n\t\t\t }\r\n\t\t});\r\n\r\n\t\tmodel.addAttribute(\"webItemList\", webItemList);\r\n\t\treturn \"webItemByUserView\";\r\n\t}", "public abstract List<LocationDto> viewAll();", "@GetMapping(\"/listAllMovies\")\n public String showAllMovies(Model model) {\n\n Iterable<Movie> movielist = movieRepo.findAll();\n\n model.addAttribute(\"allmovies\", movielist);\n return \"listAllMovies\";\n }", "public ArrayList<Film> displayAllFilms() {\n return filmEdit.displayAllFilms();\n }", "@RequestMapping(value = \"/viewAllCoffee\", method = RequestMethod.GET)\n\tpublic List<Coffee> viewAllCoffee() {\n\t\tCoffeeDAO cd = new CoffeeDAO();\n\t\tList<Coffee> listCoffee = cd.getAllCoffee();\n\t\treturn listCoffee;\n\t}", "public void show() {\r\n\t\tshowMembers();\r\n\t\tshowFacilities();\r\n\t}", "@GetMapping(\"/methods\")\n @Timed\n public List<MethodsDTO> getAllMethods() {\n log.debug(\"REST request to get all Methods\");\n return methodsService.findAll();\n }", "public abstract List<Object> getAll();", "public void clickVeteranServiceAll() {\n rbVeteranServiceAll.click();\n }", "@Override\n\tpublic Collection<CentreVisite> getAll() {\n\t\treturn CR.findAll();\n\t}" ]
[ "0.81530064", "0.7613464", "0.76061016", "0.7223314", "0.68656766", "0.67958397", "0.6595887", "0.6555735", "0.6528371", "0.6523691", "0.6482464", "0.6456459", "0.64412737", "0.64364165", "0.64222884", "0.63554585", "0.6326867", "0.6324131", "0.63240564", "0.6228322", "0.62253773", "0.62084657", "0.61994344", "0.61994344", "0.6175092", "0.61650354", "0.6158881", "0.61065096", "0.6105916", "0.60998195", "0.60976547", "0.60773724", "0.6074018", "0.6062625", "0.60618734", "0.6058931", "0.6058664", "0.6052905", "0.60419583", "0.60385746", "0.6038115", "0.6037085", "0.6036448", "0.6024676", "0.60217", "0.6012635", "0.60084635", "0.60052097", "0.5991012", "0.59807575", "0.5967835", "0.5966825", "0.59661365", "0.59658533", "0.59583277", "0.595148", "0.5947028", "0.5945575", "0.5942043", "0.59406537", "0.59283763", "0.5912016", "0.59112805", "0.5907565", "0.5905968", "0.589206", "0.58884627", "0.58882636", "0.58876324", "0.5881697", "0.5878976", "0.58778983", "0.58726484", "0.586763", "0.5863682", "0.5860723", "0.5858473", "0.58554006", "0.5853234", "0.5851838", "0.5851086", "0.5841069", "0.58375645", "0.58317244", "0.583059", "0.58292747", "0.58202994", "0.58161306", "0.5811563", "0.5811478", "0.5804226", "0.58001065", "0.57982314", "0.5792832", "0.578995", "0.57867503", "0.5784395", "0.5780274", "0.5776709", "0.5760111" ]
0.780122
1
Show All House method
public static void showAllHouse(){ ArrayList<House> houseList = getListFromCSV(FuncGeneric.EntityType.HOUSE); displayList(houseList); showServices(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showHouses() {\n System.out.println(\"-----Houses List-----\");\n System.out.println(\"No\\tOwner\\tPhone\\t\\tAddress\\t\\t\\t\\tRent\\tState\");\n houseService.listHouse();\n System.out.println(\"------List Done------\");\n }", "void showAll();", "public static void showAllHouseNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.HOUSE);\n }", "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "@GetMapping(\"/households\")\n public ResultEntity<List<ItemDTO>> getAllHousehold()\n {\n\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Household\");\n }", "public void displayAllRooms(){\n for(int i=0;i<roomCounter;i++){\n myHotel[i].Display();\n System.out.println();\n }\n }", "@Override\n\tpublic ArrayList<Carpo> showAllCars() {\n\t\treturn inList.showAll();\n\t}", "public void showStreets() {\n\t\tMonopolyClient.getStreets();\n\t}", "@Override\r\n\tpublic List<HouseType> queryAllHtype() {\n\t\treturn adi.queryAllHtype();\r\n\t}", "@Override\n\tpublic String showAll() {\n\t\treturn null;\n\t}", "public static void showAllVilla(){\n ArrayList<Villa> villaList = getListFromCSV(FuncGeneric.EntityType.VILLA);\n displayList(villaList);\n showServices();\n }", "public void findHouse() {\n\t\tSystem.out.println(\"找房子\");\n\t}", "public void findHouse() {\n System.out.println(\"-----Search House-----\");\n System.out.println(\"enter id: \");\n int findId = Utility.readInt();\n //call service search method\n House h = houseService.searchHouse(findId);\n if (h != null) {\n System.out.println(h);\n } else {\n System.out.println(\"no designate house found\");\n }\n }", "public void viewAll() {\n click(viewAllLink);\n }", "private void showAll() {\n getAll();\n //show persons\n MainActivity.instance().displayPersonsRunnable = new DisplayPersonsRunnable(MainActivity.instance());\n this.thread = new Thread(MainActivity.instance().displayPersonsRunnable);\n this.thread.start();\n }", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "@Override\r\n\tpublic List<Areas> queryAllHArea() {\n\t\treturn adi.queryAllHArea();\r\n\t}", "public String showAllNhanvien();", "public List<IBS2101105RsResult> getHouseList() {\n return houseList;\n }", "@Override\n\tpublic List<Land> displayLand() {\n\t\treturn dao.displayLand();\n\t}", "@Override\r\n\tpublic List<HouseState> queryAllHState() {\n\t\treturn adi.queryAllHState();\r\n\t}", "public void printAll()\n {\n r.showAll();\n }", "public void displayAll() {\n\t\t\n\t\tbankop.display();\n\t\n\t}", "public void displayAll(){\n System.out.println(\"guestCounter: \" + guestCounter);\n for(int i=0;i<guestCounter;i++){\n guest[i].dispGuest();\n }\n }", "@Test\n public void getHouseholdAllUsingGetTest() throws ApiException {\n Boolean ascending = null;\n String filter = null;\n String orderBy = null;\n Integer page = null;\n Integer size = null;\n PageHousehold response = api.getHouseholdAllUsingGet(ascending, filter, orderBy, page, size);\n\n // TODO: test validations\n }", "public static void main(String[] args) {\n Room room1 = new Room(14, 6, 2, false);\n Room room2 = new Room(8, 6, 2, false);\n Room room3 = new Room(18, 6, 2, false);\n\n ArrayList<Room> rooms = new ArrayList<>();\n rooms.add(room1);\n rooms.add(room2);\n rooms.add(room3);\n\n\n House house = new House(8, 2, 140.00, rooms);\n\n\n\n\n System.out.println(\"Aantal stoelen \" + house.aantalStoelenInHetHuis());\n\n }", "public void displayAll() {\r\n \t Item currentItem;\r\n \t \r\n \t System.out.println(\"-----BOOKS-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a book.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.BOOK) \r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n \t \t\r\n \t System.out.println(\"-----MAGAZINES-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a magazine.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.MAGAZINE)\r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n\r\n }", "public void getAllDoors() {\n //System.out.println();\n System.out.println(\"\\nDOOR/ARCHWAY DESCRIPTION\");\n System.out.println(\"----------------------------------------------------------------\\n\");\n //System.out.println();\n if (doorDescription.contains(\"archway\")) {\n System.out.println(\"ARCHWAY DESCRIPTION: \" + doorDescription);\n } else {\n System.out.println(\"DOOR DESCRIPTION: \" + doorDescription);\n }\n //System.out.println();\n System.out.println(\"\\n----------------------------------------------------------------\");\n }", "public void displayAll() {\n\t\tSystem.out.println(\"Title \"+this.getTitle());\n\t\tSystem.out.println(\"Artist \"+this.getArtist());\n\t\tSystem.out.println(\"Genre \"+this.genre);\n\t}", "public void displayAllPatients() {\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients\";\r\n\t\t\tStatement stm= super.getConnection().createStatement();\r\n\t\t\tResultSet results= stm.executeQuery(query);\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\tString[] row= new String[7];\r\n\t\t\t\trow[0]= results.getInt(1)+\"\";\r\n\t\t\t\trow[1]= results.getString(2);\r\n\t\t\t\trow[2]= results.getString(3);\r\n\t\t\t\trow[3]= results.getString(4);\r\n\t\t\t\trow[4]= results.getString(5);\r\n\t\t\t\trow[5]= results.getInt(6)+\"\";\r\n\t\t\t\tmodelHostory.addRow(row);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "public List showAll() {\n\t\tSession session = null;\n\t\tList temp = new ArrayList();\n\t\ttry {\n\n\t\t\tsession = MyUtility.getSession();// Static Method which makes only\n\t\t\t\t\t\t\t\t\t\t\t\t// one object as method is\n\t\t\t\t\t\t\t\t\t\t\t\t// static\n\n\t\t\tQuery q = session.createQuery(\"FROM AuctionVO \");\n\n\t\t\ttemp = q.list();\n\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t//session.close();\n\t\t}\n\t\treturn temp;\n\t}", "public void getAll() {\n try {\n\n String sql = \"select * from project_zero.carlot where owner = 'DEALERSHIP';\";\n Statement st = ConnectionUtil.getInstance().getConnection().createStatement();\n ResultSet rs = st.executeQuery(sql);\n\n while(rs.next()) {\n Car c = new Car(rs.getInt(1), rs.getString(2), rs.getString(3),\n rs.getInt(4), rs.getString(5), rs.getString(6), rs.getInt(7));\n System.out.println(c.toString());\n\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public static void printAllAreas() {\r\n\t for (int i = 0; i <= 2967; i++) {\r\n\t System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n\r\n\t }\r\n\t }", "private void displayAll() {\n\t\tif(inventoryObject.totalNumCards() == 0) { // checks to see if there are 0 StockIndexCards\n\t\t\tSystem.out.println(\"The Inventory is empty\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\tSystem.out.println(inventoryObject.displayAll());\n\t\tgetUserInfo();\n\t\t}\n\t}", "@Override\n public int getItemCount() {\n return houses.size();\n }", "void displayAllPosts();", "public static void showAllRoomNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.ROOM);\n }", "void fetchForSaleHousesData();", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }", "public String showAllPersons() {\n String string = \"\";\n for(Person person: getPersons().values()){\n string += person.toString();\n }\n return string;\n }", "public static String showAll(){\n return resultsMap.toString();\n }", "public List<T> showAllClients();", "@ApiOperation(value = \"해당 매물의 모든 리뷰 정보 조회\", notes = \"성공시 모든 리뷰의 정보를 반환합니다.\")\n @GetMapping(\"/{house_id}\")\n public List<Review> findAll(int house_id) {\n return reviewService.findAll(house_id);\n }", "private void displayListings() {\r\n\r\n //Lists all current listings\r\n System.out.println(\"Current Listings: \\n\" + cars.getListings());\r\n placeBid();\r\n }", "protected void printAll() {\n\t\tSystem.out.println(\"Network maps\");\n\t\tSystem.out.println(\"\tAddresses\");\n\t\ttry {\n\t\t\tPreparedStatement pstmt = \n\t\t\t\t\tthis.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\t\t\tthis.agent.getDatabaseManager().selectAll);\n\t ResultSet rs = pstmt.executeQuery();\n\t // loop through the result set\n while (rs.next()) {\n \t System.out.printf(\"%s -> %s\\n\", rs.getString(\"username\"), rs.getString(\"address\"));\n }\n\t\t} catch (Exception e) {\n\t\t\tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to get all the address of the table users in the database\\n\"), e);\n\t\t}\n\t\tSystem.out.println(\"\tmapSockets\");\n\t\tfor (String u: this.mapSockets.keySet()) {\n\t\t\tSystem.out.printf(\"%s -> %s\\n\", u, this.mapSockets.get(u));\n\t\t}\n\t}", "public void callHouseOwner() {\n\t\tSystem.out.println(\"联系房东\");\n\t}", "public List<Pokemon> showAllPokemon() {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Pokemon> allPokemon = em.createQuery(\"SELECT p FROM Pokemon p\").getResultList();\r\n\t\treturn allPokemon;\r\n\t}", "@GetMapping(\"/listAll\")\n public String listAll(Model model) {\n List<Person> people = personRepo.getAll();\n\n model.addAttribute(\"people\", people);\n\n return \"listAll\";\n }", "public HouseInfo[] getHouseInfo() {\n return houseInfo;\n }", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "@Override\n\tpublic Iterable<Oglas> findAll() {\n\t\treturn repository.findAll();\n\t}", "@Override\n public List<Door> findAll() {\n TypedQuery<Door> query = manager.createQuery(\"from Door door\",Door.class);\n return query.getResultList();\n }", "public void viewVehiclesInGarage() {\n\t\tfor (Vehicle vehicle : vehicleList) {\n\t\t\tvehicle.print();\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public void showAnimalList() {\n\t\tshowAnimalList(Calendar.getInstance().getTime());\n\t}", "public void show() {\r\n List<Benefit> listBeneficio = service.findAll();\r\n if(listBeneficio!=null && !listBeneficio.isEmpty()){\r\n for(Benefit c: listBeneficio){\r\n LOGGER.info(c.toString());\r\n }\r\n }\r\n }", "private static void mostrarSocios() {\n\n\t\tfor (Socio s : socios.values())\n\t\t\tSystem.out.println(s);\n\n\t}", "private void displayAllTable() {\n\n nhacungcap = new NhaCungCap();\n nhacungcap.setVisible(true);\n jDestopTable.add(nhacungcap);\n\n thuoc = new SanPham();\n thuoc.setVisible(true);\n jDestopTable.add(thuoc);\n\n khachHang = new KhachHang();\n khachHang.setVisible(true);\n jDestopTable.add(khachHang);\n\n hoaDon = new HoaDon();\n hoaDon.setVisible(true);\n jDestopTable.add(hoaDon);\n\n }", "@Override\n public List<Building> allBuildings() {\n return dao.all(Building.class);\n }", "String showAllNodes();", "@Override\n\tpublic List<Games> allGamesView() {\n\t\treturn gameDAO.viewAllGame();\n\t}", "public House getHouse() {\r\n return this.house;\r\n }", "public abstract List<LocationDto> viewAll();", "private void printAll() {\n int numberToPrint = searchResultsTable.getItems().size();\n\n FXMLCustomerController printController = new FXMLCustomerController();\n printController = (FXMLCustomerController) printController.load();\n printController.setUpPrint(numberToPrint);\n\n if (printController.okToPrint()) {\n System.out.println(\"Printing\");\n printController.getStage().show();\n for (SearchRowItem eachItem : searchResultsTable.getItems()) {\n printController.setCustomerDetails(eachItem);\n printController.print();\n System.out.println(\"Printed : \" + eachItem.toString());\n }\n printController.endPrint();\n //printController.getStage().hide();\n }\n }", "public void getAllSingleRoom() {\n\t\t for(SuiteRoom elem: suiteroom)\n\t {\n\t \t System.out.println (\"capacité : \" +elem.getCapacity());\n\t \t System.out.println (\"prix : \" +elem.getPrice());\n\t \t System.out.println (\"numéro : \" +elem.getIdRoom());\n\t \t System.out.println (\"nom : \" +elem.getName());\n\t \tSystem.out.println (\"-------------------\");\n\t \t \n\t }\n\t}", "public void displayAllLoans() {\n try (Statement stmt = connection.createStatement(); // TODO: explain try with resources\n ResultSet rs = stmt.executeQuery(SQL_FIND_ALL_LOANS)) {\n\n System.out.print(\"\\n\\nThe following are the loans in ToyBank:\\n\\n\");\n while (rs.next()) { // TODO: iterating through the ResultSet\n displayOneLoan(rs);\n }\n System.out.print(\"\\n\\n\");\n } catch (SQLException sqle) {\n LOGGER.log(Level.SEVERE, \"Unable to execute DB statement due to error {0}\", sqle.getMessage());\n }\n }", "public void display(){\r\n for(Card c: cards){\r\n System.out.println(c);\r\n }\r\n }", "public void displayAll() \n\t{\n\t\tSystem.out.printf(\"%n--[ My Contact List ]--%n\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"Name\", \"Phone\", \"Email\",\n\t\t\t\t\"Company\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"----\", \"-----\", \"-----\",\n\t\t\t\t\"-------\");\n\t\tfor (BusinessContact b : this.contacts) \n\t\t{\n\t\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", b.getLastName()\n\t\t\t\t\t+ \", \" + b.getFirstName(), b.getPhoneNumber(),\n\t\t\t\t\tb.getEmailAddress(), b.getCompany());\n\t\t}\n\t}", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "@RequestMapping(value = \"/\")\n public Map<String, Object> showAll() {\n// Get all invoices\n List<Invoice> invoices = invoiceService.findAll();\n// Build response\n Map<String, Object> response = new LinkedHashMap<String, Object>();\n response.put(\"totalInvoices\", invoices.size());\n response.put(\"invoices\", invoices);\n// Send to client\n return response;\n }", "public void displayAllGuests(RoomList roomList) {\n\t\tSystem.out.println(\"Display All Current Guests By.....\\n\\t1. Lecturer\\n\\t Or\\n\\t2. Student\");\n\t\tint type = keyboard.nextInt();\n\t\tif(type == 1) {\t\t\t\t\t\t\t\t\t\t\t\t//if Lecturer print the start of the this screen\n\t\t\tSystem.out.println(\"\\n ALL LECTURERS CHECKED IN TO THE HOTEL\\n*******************************************\");\n\t\t}\n\t\telse if(type == 2) {\t\t\t\t\t\t\t\t\t\t//if student print the start of this screen\n\t\t\tSystem.out.println(\"\\n ALL STUDENTS CHECKED IN TO THE HOTEL\\n*******************************************\");\n\t\t}\n\n\t\tfor(Room r: roomList.getList()){\t\t\t\t\t\t\t//scan through all the rooms in the roomList\n\t\t\tif(!r.isEmpty(r)) {\t\t\t\t\t\t\t\t\t\t//if room has guest\n\t\t\t\tif(type == 1) {\t\t\t\t\t\t\t\t\t\t//if user picked guest type lecturer\n\t\t\t\t\tr.getNamesOfLecturers(r);\t\t\t\t\t\t//get all the lecturer names\n\t\t\t\t}\n\t\t\t\telse if(type == 2)\t\t\t\t\t\t\t\t\t//if user picked guest type student\n\t\t\t\t\tr.getNamesOfStudents(r);\t\t\t\t\t\t//get all the student names\n\t\t\t}\n\t\t\t//in here room is empty. not needed\n\t\t}\n\t}", "private void listAll() throws SQLException { \n\t\t List<SearchList> bookList = searchListDao.listAll();\n\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\",\"Id#\", \"Title\", \"Author\", \"Series\"); \n\t\t for (SearchList book : bookList) { \n\t\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\", book.getBookIdNum(), book.getTitle(), book.getAuthor(), book.getSeries());\n\t\t }\n\t }", "@Override\r\n\tpublic ArrayList<Board1> getAll() {\n\t\treturn dao.selectAll();\r\n\t}", "public void showVehicles() {\n\t\tfor (Vehicle vehicle : vehicles) {\n\t\t\tSystem.out.println(vehicle);\n\t\t}\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public String houseById(@PathVariable long id, Model model) {\n model.addAttribute(\"house\", houseFacade.findById(id));\n return \"house/detail\";\n }", "public void displayAll()\n {\n try\n {\n int i=0;\n for(HardwareDevice equip:equipment)\n {\n System.out.println(\"Equipment Number : \"+i);\n i++;\n equip.DisplayHardwareDevice();\n }\n }\n catch(NumberFormatException aE)\n {\n JOptionPane.showMessageDialog(frame, aE.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void showCatalogue() {\n for (Record r : cataloue) {\n System.out.println(r);\n }\n }", "public String show() {\n\t\t \t\tString result =\"\";\n\t\t \t\tGson gson = new Gson();\n\t\t \t\tfor(Olders o : collectionsOlders){\n\t\t\t\t\t\tresult+=gson.toJson(o,Olders.class) + \"\\n\";\n\n\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t }", "public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}", "public void getCardsShown(List<Room> roomList) {\n\n //Removes cards that are now in the view\n cardHolder.getChildren().clear();\n\n for (Room r : roomList) {\n HBox roomCard = roomCards.get(r.getRoomId().get());\n cardHolder.getChildren().add(roomCard);\n }\n\n\n }", "void displayFilteredAlbums();", "@GetMapping(\"/GetAllHRs\")\r\n public List<HR> viewAllHRs() {\r\n return admin.viewAllHRs();\r\n }", "@GetMapping(path=\"/showData\")\n public List<Person> showData() {\n Iterable<Person> myPerson = personRepository.findAll();\n List<Person> listOfPersons = new ArrayList<>();\n myPerson.forEach((Person person) -> {\n listOfPersons.add(person);\n });\n return listOfPersons;\n }", "public void printList() {\n userListCtrl.showAll();\n }", "public void listing() {\r\n int count = 1;\r\n for (AdressEntry i : addressEntryList) {\r\n System.out.print(count + \": \");\r\n System.out.println(i);\r\n count++;\r\n }\r\n System.out.println();\r\n }", "private void setHouses() {\n for(int k = 0; k < 6; ++k ){\n topHouses.add(new Button());\n bottomHouses.add(new Button());\n }\n\n int i = 0;\n for (Button button : topHouses) {\n button.setStyle(\"-fx-background-color: brown;\");\n button.setPrefWidth(50);\n button.setPrefHeight(50);\n button.setTranslateX(780 - 80 * (i + 1));\n button.setTranslateY(150);\n button.setText(Integer.toString(kalha.getHouseVal(0,i).getInteger()));\n int finalI = i;\n button.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n try {\n sowTop(finalI); //houses[0]\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n root.getChildren().add(topHouses.elementAt(i));\n i++;\n }\n int j = 0;\n for (Button button : bottomHouses) {\n button.setStyle(\"-fx-background-color: brown;\");\n button.setPrefWidth(50);\n button.setPrefHeight(50);\n button.setTranslateX(220 + 80 * (j + 1));\n button.setTranslateY(520);\n button.setText(Integer.toString(kalha.getHouseVal(1,j).getInteger()));\n int finalI = j;\n button.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n try {\n sowBottom(finalI); //houses[1]\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n root.getChildren().add(bottomHouses.elementAt(j));\n j++;\n }\n }", "void printGrid() {\n GridHelper.printGrid(hiddenGrid);\n }", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "public static void main(String[] args) {\n\r\n House myHouse = new House(new Room(\"myBedroom\", 4, 2, false), 43);\r\n myHouse.wallsDetails();\r\n\r\n }", "@Override\r\n\tpublic List<Product> showAll() throws Exception {\n\t\treturn this.dao.showAll();\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<DbLotniskoEntity> getAll() {\n \tList<DbLotniskoEntity> airports = (List<DbLotniskoEntity>)getSession().createQuery(\"from kiwi.models.DbLotniskoEntity\").list();\n\n \treturn airports;\n }", "void showFacts(List<Fact> facts);", "@FXML\n public void showAllBooks() {\n LibrarySystem.setScene(new AllBookListInReaderPage(\n reader, readerlist, booklist, booklist));\n }", "public void viewListofHomes() {\n\t\ttry {\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to get list of homes\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to get list of homes\");\n\t\t}\n\t}", "@ApiOperation(value = \"Route Get mapping to fetch all routes\", response = List.class)\n\t@GetMapping(\"/all\")\n\tpublic ResponseEntity<List<RouteDto>> viewAllRoutes() {\n\t \n\t List<Route> routeList = this.routeServices.viewRouteList();\n\t\tList<RouteDto> routeDtoList = new ArrayList<>();\n\t\tfor (Route r : routeList) {\n\t\t\tRouteDto routedto = modelMapper.map(r, RouteDto.class);\n\t\t\trouteDtoList.add(routedto);\n\t\t}\n\t\tif (!(routeDtoList.isEmpty())) {\n\t\t\treturn new ResponseEntity<>(routeDtoList, HttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<>(routeDtoList, HttpStatus.NOT_FOUND);\n\t\t}\n\t}", "public void listAll() {\n\t\tfor (Cineplex m: records) {\n\t\t\tSystem.out.printf(\"(ID: %s) %s\\n\", m.getId(), m.getName());\n\t\t}\n\t}", "String showAllPublications() {\n\n PrintModelVisitor printVisitor = new PrintModelVisitor();\n visitPublications(mBooks, printVisitor);\n visitPublications(mMagazines, printVisitor);\n\n return printVisitor.getPublications();\n }", "public String showAll(){\n\tString msg = \"\";\n\tboolean val = false;\n\tfor(int i =0;i<arch.length && !val;i++){\n\t\tif(arch[i]!=null){\n\t\t\tmsg+=arch[i].getName()+\": \"+arch[i].getDate().getDay()+\" of \"+ arch[i].getDate().getMonth()+\", \";\n\n\t\t}\n\t\telse{\n\t\t\tval=true;\n\t\t}\n\t}\n\treturn msg;\n}", "public List<Area> listarAreas(){\r\n return cVista.listarAreas();\r\n }", "public void showAllPictures(View view) {\n\n Intent intent = new Intent(this, PicturesActivity.class);\n intent.putExtra(\"show_all_pictures\", \"showAllPictures\");\n startActivity(intent);\n }" ]
[ "0.8341287", "0.71910614", "0.6743562", "0.6683344", "0.6583163", "0.6431002", "0.63398105", "0.6285376", "0.6282478", "0.6253694", "0.6241329", "0.62181205", "0.62143564", "0.6206578", "0.6193121", "0.6187785", "0.61748636", "0.6162499", "0.61511326", "0.6145566", "0.6144168", "0.6089671", "0.60786426", "0.6051665", "0.6050717", "0.5967574", "0.59567004", "0.59093356", "0.59007114", "0.5894872", "0.58845484", "0.58746076", "0.5856257", "0.5811002", "0.5792623", "0.57878625", "0.5768404", "0.57549626", "0.5734661", "0.5730715", "0.5708344", "0.5704404", "0.5695079", "0.5685357", "0.56656504", "0.5657023", "0.5655151", "0.56439006", "0.56369466", "0.5615264", "0.5610523", "0.56078136", "0.56051", "0.55993426", "0.5595593", "0.559329", "0.5586206", "0.55701494", "0.5569345", "0.55617344", "0.5561559", "0.55608565", "0.55604887", "0.5560316", "0.55569434", "0.5544177", "0.55290395", "0.5526529", "0.55127895", "0.55047596", "0.5501183", "0.5496699", "0.54924923", "0.5488305", "0.5478375", "0.5476335", "0.5475542", "0.5463347", "0.5448744", "0.5445408", "0.54450184", "0.5444098", "0.5443222", "0.5443068", "0.5436731", "0.54325277", "0.5432274", "0.542945", "0.5424404", "0.5423556", "0.54223156", "0.542009", "0.5415568", "0.54120576", "0.5398002", "0.53934443", "0.53885114", "0.5386388", "0.5382039", "0.5378952" ]
0.8482748
0
Show All Room method
public static void showAllRoom(){ ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM); displayList(roomList); showServices(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}", "@GET\n @Produces(\"application/json\")\n public static List<CRoom> roomAll() {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(CRoom.FIND_ROOM_BY_ALL);\n }", "public List<Room> findAllRooms();", "public List<Room> selectAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\treturn session.createCriteria(Room.class).list();\n\n\t}", "@Override\n public List<Room> findAll() {\n return roomRepository.findAll();\n }", "@GetMapping(path = \"/rooms\")\n public List<Room> findAllRooms() {\n return new ArrayList<>(roomService.findAllRooms());\n }", "public static void showAllRoomNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.ROOM);\n }", "@Override\n\tpublic List<Room> getAll() {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "@Override\r\n\tpublic List<Room> listAll() throws SQLException {\n\t\treturn null;\r\n\t}", "@RequestMapping(value = \"/room\", method = RequestMethod.GET)\n public ModelAndView listRoom() {\n List<Group> groups = userBean.getAllGroups();\n for (int i = 0; i < groups.size(); i++) {\n userBean.getGroupByStreamId(groups.get(1));\n }\n ModelAndView view = new ModelAndView(\"room\");\n // view.addObject(\"list\", room);\n // view.addObject(\"note\", rooms);\n //view.addObject(\"st\", streamGroups);\n return view;\n }", "public ResultSet getAllRooms() {\r\n\r\n try {\r\n\r\n SQL = \"SELECT * FROM ROOMS;\";\r\n rs = stmt.executeQuery(SQL);\r\n return rs;\r\n\r\n } catch (SQLException err) {\r\n\r\n System.out.println(err.getMessage());\r\n return null;\r\n\r\n }\r\n\r\n }", "@Transactional\r\n\tpublic List<Room> getAllRooms(){\r\n\t\tList<Room> list= new ArrayList<Room>();\r\n\t\tIterable<Room> iterable= this.roomRepository.findAll();\r\n\t\tfor(Room room: iterable)\tlist.add(room);\r\n\t\treturn list;\r\n\t}", "public void getAllSingleRoom() {\n\t\t for(SuiteRoom elem: suiteroom)\n\t {\n\t \t System.out.println (\"capacité : \" +elem.getCapacity());\n\t \t System.out.println (\"prix : \" +elem.getPrice());\n\t \t System.out.println (\"numéro : \" +elem.getIdRoom());\n\t \t System.out.println (\"nom : \" +elem.getName());\n\t \tSystem.out.println (\"-------------------\");\n\t \t \n\t }\n\t}", "@GetMapping(\"/chat-rooms\")\n public List<ChatRoom> getAllChatRooms() {\n log.debug(\"REST request to get all ChatRooms\");\n return chatRoomRepository.findAll();\n }", "@GetMapping\n public RoomsDto getRooms() {\n return roomsFacade.findRooms();\n }", "List<ExamRoom> selectAll();", "public List<Room> getAllRooms(){\n\n List<Room> rooms = null;\n\n EntityManager entityManager = getEntityManagerFactory().createEntityManager();\n entityManager.getTransaction().begin();\n\n try{\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Room> roomCriteriaQuery = criteriaBuilder.createQuery(Room.class);\n Root<Room> roomsRoot = roomCriteriaQuery.from(Room.class);\n\n roomCriteriaQuery.select(roomsRoot);\n\n rooms = entityManager.createQuery(roomCriteriaQuery).getResultList();\n }\n catch (Exception ex){\n entityManager.getTransaction().rollback();\n }\n finally {\n entityManager.close();\n }\n\n return rooms;\n }", "@GetMapping(\"/listRoom\")\r\n\tpublic String listRooms(Model theModel) {\n\t\tList<Room> theRooms = roomService.findAll();\r\n\t\t\r\n\t\t// add to the spring model\r\n\t\ttheModel.addAttribute(\"rooms\", theRooms);\r\n\t\t\r\n\t\treturn \"/rooms/list-rooms\";\r\n\t}", "public List<Room> getRooms() {\n return rooms;\n }", "@Override\n public List<Room> findAllRooms() throws AppException {\n log.info(\"RoomDAO#findAllRooms(-)\");\n Connection con = null;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n rooms = new ArrayList<>(findAllRooms(con));\n con.commit();\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem at findAllRooms(no param)\", e);\n throw new AppException(\"Can not find all rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }", "private void displayListOfRooms() {\n DatabaseReference roomsRef = FirebaseDatabase.getInstance().getReference(\"Rooms\");\n\n roomsRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // update rooms every time there's a change\n updateRooms(dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "public void displayAllRooms(){\n for(int i=0;i<roomCounter;i++){\n myHotel[i].Display();\n System.out.println();\n }\n }", "@CrossOrigin \n\t@GetMapping(\"/all/{building}\")\n\tpublic List<Room> getRooms(@PathVariable String building) {\n\t\tList<Room> returned = new ArrayList<>();\t\t\n\t\tfor (Room room : roomDB)\n\t\t\tif (room.getBuilding().equals(building))\n\t\t\t\treturned.add(room);\n\t\treturn returned;\n\t}", "public void populateRooms(){\n }", "public ArrayList getRooms();", "Collection<Room> getRooms() throws DataAccessException;", "@RequestMapping(method = RequestMethod.GET)\n public ResponseEntity<?> getAllGameRooms() {\n try {\n return new ResponseEntity<>(ls.getAllGameRooms(), HttpStatus.ACCEPTED);\n } catch (LacmanNotFoundException e) {\n Logger.getLogger(LacmanController.class.getName()).log(Level.SEVERE, null, e);\n return new ResponseEntity<>(e.getMessage(), HttpStatus.NOT_FOUND);\n }\n }", "public static void showAllHouse(){\n ArrayList<House> houseList = getListFromCSV(FuncGeneric.EntityType.HOUSE);\n displayList(houseList);\n showServices();\n }", "Room getRoom();", "Room getRoom();", "public ArrayList<Room> getRooms() {\n return rooms;\n }", "public Set<Room> getRooms() {\n return rooms;\n }", "@Override\n\tpublic List<RoomInterface> getRooms() {\n\t\treturn rooms;\n\t}", "@RequestMapping(value = \"/vacantrooms\", method = RequestMethod.GET)\n public ArrayList<Room> vacantRooms(){\n ArrayList<Room> listroom = DatabaseRoom.getVacantRooms();\n return listroom;\n }", "private static void printRoom(Room currentRoom) {\n\t\t\n\t}", "void showAll();", "@Override\r\n\tpublic ArrayList<Board1> getAll() {\n\t\treturn dao.selectAll();\r\n\t}", "public void showHouses() {\n System.out.println(\"-----Houses List-----\");\n System.out.println(\"No\\tOwner\\tPhone\\t\\tAddress\\t\\t\\t\\tRent\\tState\");\n houseService.listHouse();\n System.out.println(\"------List Done------\");\n }", "protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }", "private void setRooms() {\r\n\t\tAccountBean bean = new AccountBean();\r\n\t\tbean.setCf(Session.getSession().getCurrUser().getAccount().getCf());\r\n\t\tRoomController ctrl = RoomController.getInstance();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tthis.myRooms=FXCollections.observableArrayList(ctrl.getMyRooms(bean));\r\n\t\t}\r\n\t\tcatch (DatabaseException ex1) {\r\n\t\t\tJOptionPane.showMessageDialog(null,ex1.getMessage(),ERROR, JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "protected static String listRooms(ArrayList<Room> roomList) {\n System.out.println(\"Room Name - Capacity-Building-Location\");\n System.out.println(\"---------------------\");\n\n for (Room room : roomList) {\n System.out.println(room.getName() + \" - \" + room.getCapacity()\n + \" - \" + room.getBuilding() + \" - \" + room.getLocation());\n }\n\n logger.info(\"---------------------\");\n\n return roomList.size() + \" Room(s)\";\n }", "public void displayAllGuests(RoomList roomList) {\n\t\tSystem.out.println(\"Display All Current Guests By.....\\n\\t1. Lecturer\\n\\t Or\\n\\t2. Student\");\n\t\tint type = keyboard.nextInt();\n\t\tif(type == 1) {\t\t\t\t\t\t\t\t\t\t\t\t//if Lecturer print the start of the this screen\n\t\t\tSystem.out.println(\"\\n ALL LECTURERS CHECKED IN TO THE HOTEL\\n*******************************************\");\n\t\t}\n\t\telse if(type == 2) {\t\t\t\t\t\t\t\t\t\t//if student print the start of this screen\n\t\t\tSystem.out.println(\"\\n ALL STUDENTS CHECKED IN TO THE HOTEL\\n*******************************************\");\n\t\t}\n\n\t\tfor(Room r: roomList.getList()){\t\t\t\t\t\t\t//scan through all the rooms in the roomList\n\t\t\tif(!r.isEmpty(r)) {\t\t\t\t\t\t\t\t\t\t//if room has guest\n\t\t\t\tif(type == 1) {\t\t\t\t\t\t\t\t\t\t//if user picked guest type lecturer\n\t\t\t\t\tr.getNamesOfLecturers(r);\t\t\t\t\t\t//get all the lecturer names\n\t\t\t\t}\n\t\t\t\telse if(type == 2)\t\t\t\t\t\t\t\t\t//if user picked guest type student\n\t\t\t\t\tr.getNamesOfStudents(r);\t\t\t\t\t\t//get all the student names\n\t\t\t}\n\t\t\t//in here room is empty. not needed\n\t\t}\n\t}", "@Override\n public List<UserRoom> getUserRoomList() {\n logger.info(\"Start getUserRoomList\");\n List<UserRoom> userRoomList = new ArrayList<>();\n try {\n connection = DBManager.getConnection();\n preparedStatement = connection.prepareStatement(Requests.SELECT_FROM_USER_ROOM);\n rs = preparedStatement.executeQuery();\n while (rs.next()) {\n userRoomList.add(myResultSet(rs));\n }\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n } finally {\n closing(connection, preparedStatement, rs);\n }\n logger.info(\"Completed getUserRoomList\");\n return userRoomList;\n }", "public Rooms getRooms(int i) {\n\t\t\tRooms buff = RoomDetails.get(i);\r\n\t\t\treturn buff;\r\n\t\t}", "public void displayRoomByStatus(RoomStatus status) {\n\t\tSystem.out.println(status.toString().toUpperCase() + \" ROOMS\\n\");\n\t\trooms.forEach((key,value) -> {\n\t\t\tif(value.status == status) {\n\t\t\t\tSystem.out.println(value.getDetails());\n\t\t\t}\n\t\t});\n\t}", "public AsyncResult<List<ChatRoom>> discoverRooms() {\r\n return serviceDiscoveryManager.discoverItems(serviceAddress).thenApply(itemNode -> {\r\n List<ChatRoom> chatRooms = new ArrayList<>();\r\n for (Item item : itemNode.getItems()) {\r\n ChatRoom chatRoom = new ChatRoom(item.getJid(), item.getName(), xmppSession, serviceDiscoveryManager, multiUserChatManager);\r\n chatRoom.initialize();\r\n chatRooms.add(chatRoom);\r\n }\r\n return chatRooms;\r\n });\r\n }", "@Query(\"from Room where id = :roomId\")\n\tRoom getRoomById(@Param(\"roomId\") long id);", "RoomInfo room(int id);", "public ArrayList<RoomList> getRoomList() {\r\n return RoomList;\r\n }", "List<Room> selectRoomList(@Param(\"building\") String building);", "public Room findRoomById(Long id);", "public List<Chatroom> getAllChatrooms() {\n\t\t// fetch chatrooms from database\n\t\tList<Chatroom> chatrooms = chatroomRepository.findAll();\n\n\t\treturn chatrooms;\n\t}", "public List<Room> getCurrentRooms() {\n return currentRooms;\n }", "@Override\n\tpublic List<Floor> findAll() {\n\t\treturn floorDao.findAll();\n\t}", "@GetMapping(\"/{hotelId}/rooms\")\n public ResponseEntity<Resources<RoomResource>> getRoomsForHotelId(@PathVariable Long hotelId){\n\n return new ResponseEntity<>(\n hotelService.findRoomsByHotelId(hotelId),HttpStatus.OK\n );\n }", "public RoomModel SelectRoomsById(int id)\r\n\t\t{\r\n\t\t\tRoomModel\trm\t\t\t\t=\tnew RoomModel();\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tp\t\t\t\t\t\t=\tcon.prepareStatement(\"select room.*,building.buil_id,building.buil_name,floor.floor_name,room_rent.rent,company_reg.comp_name from room inner join floor on floor.floor_id = room.floor_id inner join building on floor.buil_id=building.buil_id inner join room_rent on room.room_id=room_rent.room_id left join company_reg on company_reg.room_id = room.room_id where room.room_id = ? order by room.room_id asc\");\r\n\t\t\t\tp.setInt(1,id);\r\n\t\t\t\tResultSet\trs\t\t\t=\tp.executeQuery();\r\n\t\t\t\t//System.out.print(p);\r\n\t\t\t\twhile(rs.next())\r\n\t\t\t\t{\r\n\t\t\t\t\trm.setRoom_id(rs.getInt(1));\r\n\t\t\t\t\trm.setFloor_id(rs.getInt(2));\r\n\t\t\t\t\trm.setR_name(rs.getString(3));\r\n\t\t\t\t\trm.setS_feet(rs.getFloat(4));\r\n\t\t\t\t\trm.setStatus(rs.getString(6));\r\n\t\t\t\t\trm.setOccupied(rs.getInt(7));\r\n\t\t\t\t\trm.setDoor_num(rs.getString(8));\r\n\t\t\t\t\trm.setBuil_id(rs.getInt(9));\r\n\t\t\t\t\trm.setBuil_name(rs.getString(10));\r\n\t\t\t\t\trm.setFloor_name(rs.getString(11));\r\n\t\t\t\t\trm.setRent(rs.getFloat(12));\r\n\t\t\t\t\trm.setOccupied_name(rs.getString(13));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) \r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\treturn rm;\r\n\t\t}", "public void displayroomsinfo(boolean reserved , int roomtype){\n String query = \" SELECT Roomno , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Reserved = ? and RoomtypeID = ? \"; \n String status , Roomtype ;\n Room room ;\n if(reserved == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n if(roomtype == 1){\n Roomtype = \"Single Room\" ;\n room = new singleRoom();\n }\n else{\n Roomtype = \"Double Room\";\n room = new doubleRoom();\n }\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setBoolean(1 ,reserved);\n Query.setInt(2,roomtype);\n ResultSet rs = Query.executeQuery();\n \n List<String> lst = new ArrayList<>() ;\n while(rs.next()){ \n \n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\") +\"\\n\"; \n lst.add(str);\n }\n room.setinfo(lst);\n \n \n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "@Override\n public List<Room> findRooms(int offset, int limit, String orderBy) throws AppException {\n log.info(\"#findRooms offset = \" + offset + \" limit = \" + limit + \" orderBy = \" + orderBy);\n Connection con = null;\n PreparedStatement ps;\n ResultSet rs;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n ps = con.prepareStatement(SELECT_ROOMS);\n log.info(\"orderBy = \" + orderBy);\n switch (orderBy) {\n case(\"price\"):\n ps = con.prepareStatement(SELECT_ROOMS_PRICE);\n break;\n case(\"size\"):\n ps = con.prepareStatement(SELECT_ROOMS_SIZE);\n break;\n case(\"class\"):\n ps = con.prepareStatement(SELECT_ROOMS_CLASS);\n break;\n case(\"status\"):\n ps = con.prepareStatement(SELECT_ROOMS_STATUS);\n }\n int k = 1;\n ps.setInt(k++, limit);\n ps.setInt(k, offset);\n log.info(\"ps = \" + ps);\n rs = ps.executeQuery();\n rooms = new ArrayList<>();\n while (rs.next()) {\n rooms.add(extractRoom(con, rs));\n }\n con.commit();\n log.info(\"rooms = \" + rooms);\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem findRooms\");\n throw new AppException(\"Cannot find rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }", "public void generateRooms(){ //TODO it's public just for testing\n rooms = new ArrayList<>();\n for(Color color : roomsToBuild)\n rooms.add(new Room(color));\n }", "@Override\n\tpublic void onGetAllRoomsDone(AllRoomsEvent arg0) {\n\t\t\n\t}", "private static void viewRooms() \n {\n String option, roomCode;\n\n displayMyRooms(\" \");\n\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n \n while (!option.equals(\"q\"))\n {\n if (option.equals(\"v\") || option.equals(\"r\"))\n {\n System.out.print(\"Enter a room code: \");\n roomCode = \" '\" + input.next().toUpperCase() + \"'\";\n\n if(option.equals(\"v\"))\n displayDetailedRooms(roomCode);\n else\n displayDetailedReservations(\"WHERE ro.RoomId = \" + roomCode);\n }\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n }\n \n }", "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i < items.size() - 1) {\n itemList = itemList + \", \";\n }\n }\n System.out.println(itemList);\n int currentNPCsInRoom = 0;\n\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(\"There seems to be someone resting in the leaves\");\n currentNPCsInRoom++;\n }\n\n if (mysteriousCrab.getCurrentRoom() == currentRoom) {\n System.out.println(\"You sense somebody in the cave\");\n currentNPCsInRoom++;\n }\n\n if (josephSchnitzel.getCurrentRoom() == currentRoom) {\n System.out.println(\"There is an intense smell, somebody seems to be near!\");\n currentNPCsInRoom++;\n }\n if (currentNPCsInRoom == 0) {\n System.out.println(\"You are alone in the room\");\n }\n }", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "public ChatRoomTableModel getRoomlist() {\n\t\treturn roomlist;\n\t}", "public abstract List<LocationDto> viewAll();", "@Query(\"from Room where occupied = :occ and hotel_id = :hotelId\")\n\tList<Room> findOccupied(@Param(\"occ\") boolean occupied, @Param(\"hotelId\") long id);", "RoomInfo room(String name);", "public ArrayList<GameRoom> execute() {\n\t\tif(GameRooms.rooms == null) {\n\t\t\tGameRooms.rooms = new ArrayList<GameRoom>();\n\t\t}\n\t\treturn GameRooms.rooms;\n\t}", "@Override\n public int getCount() {\n Log.d(TAG, \"getCount: size\" +fromName.size());\n return rooms.size();\n }", "@GetMapping(\"/room\")\n public String room(Model model) {\n return \"room\";\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<DbLotniskoEntity> getAll() {\n \tList<DbLotniskoEntity> airports = (List<DbLotniskoEntity>)getSession().createQuery(\"from kiwi.models.DbLotniskoEntity\").list();\n\n \treturn airports;\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "public Rooms getRmTable();", "List<Room> selectRoomListWithScreenCondition(@Param(\"building\") String building, @Param(\"capacity\") Integer capacity,\n\t\t\t@Param(\"hasMultiMedia\") Integer hasMultiMedia);", "@GET\n @Produces(\"application/json\")\n @Path(\"/building/id/{id}\")\n public static List<CRoom> roomsByBuilding(@PathParam(\"id\") final int pId) {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(\n CRoom.FIND_ROOMS_BY_BUILDING, QueryParameter.with(\"Pid\", pId).parameters());\n }", "public List<String> listRoomsNames() {\n return chatRooms.stream().map(ChatRoom::getChatName).collect(Collectors.toList());\n }", "@ApiOperation(value = \"Retrieves a Room\",\n\t\t\tnickname = \"getMyRooms\")\n\t@ApiResponses(value = {\n\t\t@ApiResponse(code = 204, message = HTML_STATUS_204)\n\t})\n\t@RequestMapping(value = \"/\", method = RequestMethod.GET, params = \"statusonly=true\")\n\t@Pagination\n\tpublic List<Room> getMyRooms(\n\t\t\t@ApiParam(value = \"visitedOnly\", required = true) @RequestParam(value = \"visitedonly\", defaultValue = \"false\") final boolean visitedOnly,\n\t\t\t@ApiParam(value = \"sort by\", required = false) @RequestParam(value = \"sortby\", defaultValue = \"name\") final String sortby,\n\t\t\tfinal HttpServletResponse response\n\t\t\t) {\n\t\tList<de.thm.arsnova.entities.Room> rooms;\n\t\tif (!visitedOnly) {\n\t\t\trooms = roomService.getMyRoomsInfo(offset, limit);\n\t\t} else {\n\t\t\trooms = roomService.getMyRoomHistoryInfo(offset, limit);\n\t\t}\n\n\t\tif (rooms == null || rooms.isEmpty()) {\n\t\t\tresponse.setStatus(HttpServletResponse.SC_NO_CONTENT);\n\t\t\treturn null;\n\t\t}\n\n\t\tif (\"shortname\".equals(sortby)) {\n\t\t\tCollections.sort(rooms, new RoomShortNameComparator());\n\t\t} else {\n\t\t\tCollections.sort(rooms, new RoomNameComparator());\n\t\t}\n\t\treturn rooms.stream().map(toV2Migrator::migrate).collect(Collectors.toList());\n\t}", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public void viewReservationList(RoomList roomList) {\n\t\tSystem.out.println(\"\");\t\t\t\t\t\t\t\t\t\t\n\t\tSystem.out.println(\"\\t\\tRESERVATION LIST\t\t\t\t \");\n\t\tSystem.out.println(\"**********************************************\\n\");\n\t\tfor(Room r: roomList.getList()){\t\t\t\t\t\t\t//search for all the rooms in the room list\n\t\t\tif(!r.isEmpty(r)) {\t\t\t\t\t\t\t\t\t\t//if a room is not empty(it has at least one guest)\n\t\t\t\tr.reservationList(r);\t\t\t\t\t\t\t\t//gets all the guests in non empty rooms\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n**********************************************\\n\");\n\t}", "public ChatRoom[] getChatRooms();", "public void chat_list() {\n\n synchronized(chat_room) {\n Set chat_room_set = chat_room.keySet();\n Iterator iter = chat_room_set.iterator();\n\n clearScreen(client_PW);\n client_PW.println(\"------------Chat Room List-----------\");\n while(iter.hasNext()) {\n client_PW.println(iter.next());\n }\n client_PW.flush();\n }\n }", "public ArrayList<Room> createMaze() {\n createRooms();\n createAccess(rooms);\n\n return rooms;\n }", "public List showAll() {\n\t\tSession session = null;\n\t\tList temp = new ArrayList();\n\t\ttry {\n\n\t\t\tsession = MyUtility.getSession();// Static Method which makes only\n\t\t\t\t\t\t\t\t\t\t\t\t// one object as method is\n\t\t\t\t\t\t\t\t\t\t\t\t// static\n\n\t\t\tQuery q = session.createQuery(\"FROM AuctionVO \");\n\n\t\t\ttemp = q.list();\n\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t//session.close();\n\t\t}\n\t\treturn temp;\n\t}", "@Override\n\tpublic String showAll() {\n\t\treturn null;\n\t}", "private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }", "@Override\n public List<Door> findAll() {\n TypedQuery<Door> query = manager.createQuery(\"from Door door\",Door.class);\n return query.getResultList();\n }", "@Override\n\tpublic Iterable<Flight> viewAllFlight() {\n\t\treturn flightDao.findAll();\n\t}", "public static void displayRoom(Room currentRoom) {\n for(int i = 0; i < 10; i++) {\n for(int j = 0; j< 10; j++) {\n if(currentRoom.roomArray[i][j] instanceof Player) {\n System.out.print(\"|\" + \"p\");\n } else if(currentRoom.roomArray[i][j] instanceof Item) {\n System.out.print(\"|\" + \"i\");\n }\n else if(currentRoom.roomArray[i][j] instanceof Student) {\n System.out.print(\"|\" + \"s\");\n }\n else {\n System.out.print(\"| \"); \n }\n }\n System.out.println(\"\");\n }\n \n }", "@Override\r\n\tpublic List<Areas> queryAllHArea() {\n\t\treturn adi.queryAllHArea();\r\n\t}", "public List<Room> getRooms(){\n ArrayList<Room> returnedList = (ArrayList<Room>) rooms;\n return (ArrayList<Room>) returnedList.clone();\n }", "private static void printRoom(Player p,ArrayList<Item> a, ItemManager im, RoomManager rm) {\n\t\tSystem.out.println(p.getCurrentRoom().getName());\n\t\tSystem.out.println(p.getCurrentRoom().getShortDesc());\n\t\tSystem.out.println(p.getCurrentRoom().getLongDesc());\n\t\tconditionalActions(p,a,im,rm);\n\t\t\t\n\t}", "public Room() {\n this.isTable = false;\n this.hasStage = false;\n this.hasTech = false;\n }", "public List<Room> getByRoomType(String roomType){\r\n\t\tif(userService.adminLogIn||userService.loggedIn) {\r\n\t\t\tList<Optional<Room>> room=new ArrayList<>();\r\n\t\t\troom=roomRepository.findByRoomType(roomType);\r\n\t\t\tif (room.size()==0) {\r\n\t\t\t\tthrow new RoomTypeNotFoundException(\"Room type not available\");\r\n\t\t\t} else {\r\n\t\t\t\tList<Room> newRoom=new ArrayList<Room>();\r\n\t\t\t\tfor(Optional r:room) {\r\n\t\t\t\t\tnewRoom.add((Room) r.get());\r\n\t\t\t\t}\r\n\t\t\t\treturn newRoom;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\t\t\r\n\t}", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public Room getRoom()\r\n {\r\n return room;\r\n }", "@UiHandler(\"roomsLink\")\r\n\tprotected void onClickRoomsLink(ClickEvent event) {\r\n\t\tnavigation.goTo(RoomListPage.class, PageStates.empty());\r\n\t}", "public String displayRoom() {\n String roomDisplayString = \"\";\n roomDisplayArray = new String[roomHeight][roomWidth];\n initalizeRoomDisplayArray();\n addDoorsToRoomDisplayArray();\n addContentsToRoomDisplayArray();\n roomDisplayString = convertDisplayArrayToString(roomDisplayString);\n return (roomDisplayString);\n }", "@Test\r\n\tpublic final void testGetAllRooms() {\n\t\tList<Room> actualList = roomServices.getAllRooms();\r\n\t\t// get all data in JUnit test\r\n\r\n\t\tList<Room> expectedList = new ArrayList<Room>();\r\n\t\texpectedList.addAll(params());\r\n\t\t\r\n\t\tSystem.out.println(\"expectedList\");\r\n\t\tSystem.out.println(expectedList);\r\n\t\tSystem.out.println(\"actualList\");\r\n\t\tSystem.out.println(actualList);\r\n\t\t\r\n\t\t// see if JUnit test value is in room list\r\n\t\tassertTrue(actualList.contains(expected));\r\n\t}", "private void loadAvailableRooms() {\n\n\t\texecutor.submit(() -> {\n\t\t\troomResultsTable.setVisible(false);\n\t\t\tprogress.setVisible(true);\n\t\t\troom.clear();\n\t\t\thotel.clear();\n\t\t\tquality.clear();\n\t\t\trooms = FXCollections.observableArrayList(dbParser.checkAvailableRoomsBetweenDates(arrivalDate.toEpochDay(),\n\t\t\t\t\tdepartureDate.toEpochDay(), hotelChoice.getName(), roomQualityChoice.getQuality()));\n\t\t\troomResultsTable.setItems(rooms);\n\t\t\tprogress.setVisible(false);\n\t\t\troomResultsTable.setVisible(true);\n\t\t});\n\n\t}", "public Room getRoom(){\n\t\treturn this.room;\n\t}" ]
[ "0.82505137", "0.77608556", "0.7677721", "0.7538157", "0.7499622", "0.7377199", "0.7308925", "0.72798365", "0.7226118", "0.7038173", "0.6933345", "0.68756384", "0.68630767", "0.6824342", "0.6739352", "0.668206", "0.6659442", "0.6619435", "0.6599557", "0.65881073", "0.6564367", "0.65273505", "0.6519061", "0.64882094", "0.6466071", "0.64172", "0.63914335", "0.6294105", "0.6206314", "0.6206314", "0.61761045", "0.6173173", "0.6170278", "0.61493355", "0.61178327", "0.6089707", "0.6076688", "0.60717875", "0.60717404", "0.6058176", "0.60521317", "0.60237527", "0.6019954", "0.6007513", "0.6003811", "0.5995999", "0.59947455", "0.5973951", "0.59727573", "0.59566104", "0.595532", "0.59497696", "0.5948635", "0.59421444", "0.5932607", "0.5931843", "0.5921041", "0.5911164", "0.58991754", "0.5891506", "0.58909726", "0.5890383", "0.58751726", "0.58745", "0.5865264", "0.5863021", "0.58610827", "0.5831268", "0.5821366", "0.5815684", "0.5810878", "0.5788703", "0.5776409", "0.5754154", "0.574385", "0.57410747", "0.57252425", "0.5719958", "0.5718436", "0.5716553", "0.57061285", "0.5684791", "0.567947", "0.567415", "0.5672886", "0.56599146", "0.56590927", "0.5650506", "0.56403613", "0.56213444", "0.5618975", "0.5611463", "0.5609901", "0.56009", "0.559982", "0.5585211", "0.5584322", "0.5577207", "0.55763084", "0.5575228" ]
0.8622591
0
Show All Villa Not Duplicate method
public static void showAllVillaNotDuplicate(){ showAllNameNotDuplicate(FuncGeneric.EntityType.VILLA); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void duplicate() {\n System.out.println(\"Je bent al in bezit van deze vragenlijst!\");\n }", "public static void showAllHouseNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.HOUSE);\n }", "public static void showAllRoomNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.ROOM);\n }", "private void printNonDuplicates( Collection< String > collection )\r\n {\r\n // create a HashSet \r\n Set< String > set = new HashSet< String >( collection ); \r\n\r\n System.out.println( \"\\nNonduplicates are: \" );\r\n\r\n for ( String s : set )\r\n System.out.printf( \"%s \", s );\r\n\r\n System.out.println();\r\n }", "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}", "private void printNonDuplicates( Collection< String > collection )\r\n {\r\n \t // create a HashSet using a collection as parameter\r\n \t Set< String > set = new HashSet< String >( collection );\r\n \t System.out.println( \"Nonduplicates are: \" );\r\n \t for ( String s : set )\r\n \t\t System.out.printf( \"%s \", s );\r\n \t System.out.println();\r\n \t }", "public String showAllNhanvien();", "private void searchShow() {\n ArrayList<Show> searchShows = new ArrayList<>();\n for (Show show : clientController.getUser().getShows()) {\n if (show.getName().toLowerCase().contains(getText().toLowerCase())) {\n searchShows.add(show);\n }\n// else {\n// JOptionPane.showMessageDialog(null, \"The search gave no result!\");\n// }\n\n }\n pnlShowList.removeAll();\n pnlShowList.setBackground(Color.decode(\"#6A86AA\"));\n draw(searchShows);\n }", "void showAll();", "public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}", "public static void showAllVilla(){\n ArrayList<Villa> villaList = getListFromCSV(FuncGeneric.EntityType.VILLA);\n displayList(villaList);\n showServices();\n }", "public void containsNoDuplicates() {\n List<Entry<T>> duplicates = Lists.newArrayList();\n for (Multiset.Entry<T> entry : LinkedHashMultiset.create(getSubject()).entrySet()) {\n if (entry.getCount() > 1) {\n duplicates.add(entry);\n }\n }\n if (!duplicates.isEmpty()) {\n failWithRawMessage(\"%s has the following duplicates: <%s>\", getDisplaySubject(), duplicates);\n }\n }", "public VNode duplicate() throws VlException\n\t{\n\t\tthrow new nl.uva.vlet.exception.NotImplementedException(\"Duplicate method not implemented\"); \n\t}", "public void show_NotOverlappingSessions(){\n \n ArrayList<notOverlapping> list= getNotOverlappingSessionList();\n DefaultTableModel model=(DefaultTableModel)notoverlappingsessions.getModel();\n Object[] row=new Object[3];\n \n for(int i=0; i<list.size(); i++){\n row[0]=list.get(i).getoId();\n row[1]=list.get(i).getSessionId();\n row[2]=list.get(i).getSubject();\n\n model.addRow(row);\n }\n \n }", "private void addUniqueToViewNodes() {\n\t\taddFilterButton();\n\t\t\n\t\t/* Button Initialization */\n\t\t//This Button Creates a Report\n\t\tcreateReportBtn = new Button(\"Create Report\");\n\t\tcreateReportBtn.getStyleClass().add(\"GreenButton\");\n\t\tcreateReportBtn.setOnAction(e -> {\n\t\t\tCreateReportPopup crPopup = new CreateReportPopup(\"Create Report\");\n\t\t\tcrPopup.show();\n\t\t});\n\t\t\n\t\t// This Button views the currently selected report in more detail\n\t\treportDetailsBtn = new Button(\"Report Details\");\n\t\treportDetailsBtn.getStyleClass().add(\"GreenButton\");\n\t\t\n\t\t/* Assembly */\n\t\tactionButtons.getChildren().addAll(createReportBtn, reportDetailsBtn);\n\t\t\n\t\tactionButtons.setPrefHeight(Values.ACTION_BUTTONS_PREF_WIDTH);\n\t}", "public String listViaje() {\n\t\t\t//resetForm();\n\t\t\treturn \"/boleta/list.xhtml\";\t\n\t\t}", "@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Encuesta> getEncuestasCodigoDuplicado() {\n\t\t// Retrieve session from Hibernate\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t// Create a Hibernate query (HQL)\n\t\tQuery query = session.createQuery(\"FROM Encuesta enc where (enc.codigo in (Select enc2.codigo from Encuesta enc2 where enc.pasive ='0' group by (enc2.codigo) Having count(enc2.codigo)>1 ))\");\n\t\t// Retrieve all\n\t\treturn query.list();\n\t}", "private void HaveDuplicate() {\n haveDuplicate = false;\n duplicateCounter = 0;\n try {\n query=\"SELECT * FROM category WHERE category_id = '\"+ txtCategoryNo.getText() +\"' OR category_name = '\"+\n txtCategoryName.getText() + \"'\";\n rset = connection.createStatement().executeQuery(query);\n while (rset.next()) {\n haveDuplicate = true;\n duplicateCounter++;\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "public Collection<BundleEntry> getDuplicates() {\n return duplicates;\n }", "public void ShowAllRep() {\n IntRepList.OpNode current = this.iRepBetter.head;\n while (null != current) {\n this.ShowRep(current.opArray);\n current = current.next;\n }\n }", "public String show() {\n\t\t \t\tString result =\"\";\n\t\t \t\tGson gson = new Gson();\n\t\t \t\tfor(Olders o : collectionsOlders){\n\t\t\t\t\t\tresult+=gson.toJson(o,Olders.class) + \"\\n\";\n\n\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t }", "public void imprimir(){\n for(int i = 0;i < this.listaEtiquetas.size();i++){\n System.out.println(\"- \"+(i+1)+this.listaEtiquetas.get(i).getEtiqueta()+\" descripcion\"+this.listaEtiquetas.get(i).getDescripcion());\n }\n }", "@SuppressWarnings({ \"unchecked\", \"static-access\" })\r\n\tpublic boolean checkArticleIsDuplicated(){\r\n\t\r\n\t\tnum_DupInDBLP = 0;\r\n\t\t\t\t\r\n\t\tCheckExist check = new CheckExist();\r\n\t\t\r\n\t\tnumberArray = (ArrayList<Integer>) check.CheckTitleSignaturePublications(dbsaPublicationCheckList).clone();\r\n\t\tduplicateNumber = numberArray.size();\r\n\t\t\r\n\t\tduplicationArtilce = false;\r\n\t\tif(numberArray.size() > 0){\r\n\t\t\tfor(int i = 0; i < numberArray.size(); i++)\r\n\t\t\t{\t\r\n\t\t\t\tmodel.setValueAt(true, numberArray.get(i), 8);\r\n\t\t\t\tresultsJTable.addRowToPaint(numberArray.get(i), Color.red);\r\n\t\t\t\tduplicationArtilce = true;\r\n\t\t\t\t\r\n\t\t\t\tnum_DupInDBLP ++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgetFetcherInfo();\r\n\t\t//System.out.println(num_DupInDBLP);\r\n\t\tcheckDuplicateJButton.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\tDBSAApplication.statisticPanel.updateStatistic(num_Total);\r\n\t\treturn duplicationArtilce;\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t int arr[] = { 1, 2, 3,4, 4, 5, 6, 7 ,6}; \n\t\t \n\t\t printDuplicate(arr);\n\n\n\t}", "public void displaySelections() {\n List<VendingItem> listOfItems = service.getAllItemsNonZero(); //<-- uses lambda\n view.displaySelections(listOfItems);\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 SetTest()\r\n {\r\n List< String > list = Arrays.asList( colors );\r\n System.out.printf( \"ArrayList: %s\\n\", list );\r\n printNonDuplicates( list );\r\n }", "public static void main(String[] args) {\n\t\tArrayList<String> arrayListWithDups = new ArrayList<String>();\n\n\t\tarrayListWithDups.add(\"nonie\");\n\t\tarrayListWithDups.add(\"test\");\n\t\tarrayListWithDups.add(\"中中中\");\n\t\tarrayListWithDups.add(\"test\");\n\t\tarrayListWithDups.add(\"nonie\");\n\t\tarrayListWithDups.add(null);\n\t\tarrayListWithDups.add(\"中中中\");\n\t\tarrayListWithDups.add(\"homework\");\n\t\tarrayListWithDups.add(null);\n\n\t\t// Printing listWithDuplicateElements\n\t\tSystem.out.print(\"Input:\");\n\t\tSystem.out.println(arrayListWithDups);\n\n\t\t// Constructing HashSet using listWithDuplicateElements\n\t\tHashSet<String> removeDups = new HashSet<String>(arrayListWithDups);\n\n\t\t// Constructing listWithoutDuplicateElements using set\n\t\tArrayList<String> arrayListNoDups = new ArrayList<String>(removeDups);\n\n\t\t// Printing listWithoutDuplicateElements\n\t\tSystem.out.print(\"Ouput: \");\n\t\tSystem.out.println(arrayListNoDups);\n\t}", "public static ArrayList<Vkladi> idPoiskVkladi() {\r\n\t\tArrayList<Vkladi> foundVkladi = new ArrayList<Vkladi>();\r\n\r\n\t\tint i = 0;\r\n\t\tScanner n = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Vvedite Id\");\r\n\t\tint t = n.nextInt();\r\n\t\tfor (Vkladi vkla : vklad) {\r\n\t\t\tif (vkla.getId() == t) {\r\n\t\t\t\tfoundVkladi.add(vkla);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn foundVkladi;\r\n\t}", "@Override\r\n public List<Visitors> visfindAll() {\n return userMapper.visfindAll();\r\n }", "public List<String> viewExams() {\n List<String> list = new ArrayList<>();\n if (examList.size() == 0) {\n list.add(\"No Exams have been created yet!\");\n } else {\n for (int i = 0; i < examList.size(); i++) {\n String entry = (i + 1) + \".\" + examList.get(i).toString();\n list.add(entry);\n }\n }\n return list;\n }", "public void visOversikt() {\r\n System.out.println(\"\\nPerson Oversikt:\");\r\n\r\n for(Person person : personListe.values()) {\r\n System.out.println(\"\\n\" + person);\r\n System.out.println(person + \" eier \" + (person.eierSize() + person.utlaantSize()) + \" DVD'er\");\r\n System.out.println(person + \" laaner ut \" + person.utlaantSize() + \" DVD'er\");\r\n System.out.println(person + \" laaner \" + person.laanerSize() + \" DVD'er\");\r\n }\r\n }", "public boolean getDuplicateSuppression() {\n return duplicate_suppression;\n }", "private static void showMemoList() {\n\t\t\n\t}", "private void showList() {\n try {\n swipeRefreshLayout.setVisibility(View.VISIBLE);\n tvMessage.setVisibility(View.GONE);\n\n /* to void duplicate data*/\n Set<NewsDetail> newsDetailSet = new HashSet<NewsDetail>(newsList);\n\n newsList.clear();\n newsList = new ArrayList<NewsDetail>(newsDetailSet);\n if (adapter == null) {\n adapter = new NewsListAdapter(mContext, newsList);\n listView.setAdapter(adapter);\n } else {\n adapter.notifyDataSetChanged();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void printOwners(){\n ArrayList<String> ownerList = new ArrayList<String>();\n\n for(RegistrationPlate plates: this.registrationList.keySet()){\n if(!ownerList.contains(this.registrationList.get(plates)))\n ownerList.add(this.registrationList.get(plates));\n }\n\n printAllOwners(ownerList);\n }", "public static void main(String[] args) {\n\t\t\n\t\tString[] niz = { \"abc\",\"bcd\",\"efg\",\"ijk\",\"lmn\",\"abc\",\"bcd\"};\n\n\t\tfor(int i=0;i<niz.length-1;i++) {\n\t\t\tfor(int j=i+1;j<niz.length;j++) {\n\t\t\t\tif(niz[i]== niz[j] && (i !=j)) { // moze ici i ovako if( (my_array[i].equals(my_array[j])) && (i != j) )\n\t\t\t\t\tSystem.out.println(\"dupli elementi su : \" + niz[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tList<Integer> numbers = Arrays.asList(9, 10, 3, 4, 7, 3, 4);\n\t\tList<Integer> distinct = numbers.stream().map(i -> i * i).distinct().collect(Collectors.toList());\n\t\tSystem.out.printf(\"Original List : %s, Square Without duplicates : %s %n\", numbers, distinct);\n\t}", "public void showEmptyListMessage() {\n Toast.makeText(getBaseContext(), \"Lista de opiniones vacia!\", Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic String showAll() {\n\t\treturn null;\n\t}", "List<T> getAllDistinct();", "@Override\n public void visualize() {\n if (this.count() > 0){\n for (int i = 0; i < this.count(); i++){\n System.out.println(i + \".- \" + this.bench.get(i).getName() + \" (ID: \" + this.bench.get(i).getId() + \")\");\n }\n } else {\n System.out.println(\"La banca está vacía.\");\n }\n\n }", "public static void main(String args[]) {\n\t\t\n\t\tint arr[]= {1,2,3,2,3,4,5,4,6};\n\t\t\n\t\tSystem.out.print(\"The original including the duplicate elements is: \");\n\t\tfor(int i=0; i<arr.length; i++) {\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" \\n \");\n\t\t\n//\t\tThe search for the duplicate array begins here.\n\t\t\n\t\tSystem.out.print(\"The array of duplicate elements are the following: \");\n\t\t\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\t\t\n\t\t\tfor(int j=i+1;j<arr.length;j++) {\n\t\t\t\tif(arr[i]==arr[j]) {\n\t\t\t\t\tSystem.out.print(arr[j] + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void imprimirLista() {\n NodoListaDoble<T> tmp = raiz;\n\n if (this.raiz == null) {\n System.out.println(\"Lista vacia\");\n } else {\n System.out.println(\"--------------------------\");\n while (tmp != null) {\n System.out.println(tmp.toString());\n tmp = tmp.getSiguiente();\n }\n System.out.println(\"--------------------------\");\n }\n }", "public static ArrayList<Vkladi> falseScetVkladi() {\r\n\t\tArrayList<Vkladi> foundVkladi = new ArrayList<Vkladi>();\r\n\t\tint i = 0;\r\n\t\tfor (Vkladi vkla : vklad) {\r\n\t\t\tif (vkla.getStat() == false) {\r\n\t\t\t\tfoundVkladi.add(vkla);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn foundVkladi;\r\n\t}", "public static void removeDuplicateSample() {\n Node ll1 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll2 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(4, null)))));\n Node ll3 = new Node(1, new Node(1, new Node(3, new Node(4, new Node(5, null)))));\n Node ll4 = new Node(1, new Node(1, new Node(1, new Node(4, new Node(5, null)))));\n\n System.out.println(\"1===\");\n ll1.printList();\n ll1 = ll1.removeDuplicate();\n ll1.printList();\n\n System.out.println(\"2===\");\n ll2.printList();\n ll2 = ll2.removeDuplicate();\n ll2.printList();\n\n System.out.println(\"3===\");\n ll3.printList();\n ll3 = ll3.removeDuplicate();\n ll3.printList();\n\n System.out.println(\"4===\");\n ll4.printList();\n ll4 = ll4.removeDuplicate();\n ll4.printList();\n\n }", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tint a[] = { 1, 2, 3, 6, 7, 8, 2, 3 };\r\n\r\n\t\tSystem.out.println(\"The Duplicates in the array is: \");\r\n\t\t\r\n\t\t//1 1\r\n\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tfor (int j=i+1; j < a.length; j++) {\r\n\t\t\t\tif (a[i] == a[j]) {\r\n\t\t\t\t\tSystem.out.println(a[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint a[] = {1,2,2,6,7,3,4,4,5,5,6,7};\n\t\t\n\t\t\n\t\tMap<Integer,Integer> map =new HashMap<Integer,Integer>();\n\t\t\n\t\tfor (Integer num :a) {\n\t\t\tInteger Count =map.get(num);\n\t\t\tif(Count==null) {\n\t\t\t\tmap.put(num, 1);\n\t\t\t}else {\n\t\t\t\tmap.put(num, ++Count);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tSet<Entry<Integer, Integer>> entryset =map.entrySet();\n\t\tArrayList<Integer> list =new ArrayList<Integer>();\n\t\tfor(Entry<Integer, Integer> entry :entryset) {\n\t\t\tif(entry.getValue()>1) {\n\t\t\t\tlist.add(entry.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\tSystem.out.println(\"Duplicates are \" +list);\n\t\t\n\t\tSet<Entry<Integer, Integer>> entryset1 =map.entrySet();\n\t\tArrayList<Integer> nonduplist =new ArrayList<Integer>();\n\t\tfor(Entry<Integer, Integer> entry1 :entryset1) {\n\t\t\tif(entry1.getValue()==1) {\n\t\t\t\tnonduplist.add(entry1.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\tSystem.out.println(\"Non Duplicates are \" +nonduplist);\n\t\t\n \n}", "public void displayVragenlijst() {\n List<Vragenlijst> vragenlijst = winkel.getVragenlijst();\n\n System.out.println(\"Kies een vragenlijst: \");\n\n for (int i = 0; i < vragenlijst.size(); i++) {\n System.out.println((i + 1) + \". \" + vragenlijst.get(i));\n }\n }", "public void printVottingQuestion(){\n for (Voting voting : votingList){\n System.out.println(\"question : \"+voting.getQuestion());\n }\n\n }", "public SortedSet<WVnfInstance> getAllVnfInstances ()\n\t{\n\t\treturn n.getResources().stream().filter(r->!r.getType().contains(WNetConstants.LISTSEPARATORANDINVALIDNAMECHARACTER)).map(r->new WVnfInstance(r)).collect(Collectors.toCollection(TreeSet::new));\n\t}", "public void listar() {\r\n Collections.sort(coleccion);\r\n for (int i = 0; i < coleccion.size(); i++) {\r\n String resumen = (coleccion.get(i).toString());\r\n JOptionPane.showMessageDialog(null, resumen);\r\n }\r\n }", "private void getNewVacunas(){\n mNewVacunas = estudioAdapter.getListaNewVacunasSinEnviar();\n //ca.close();\n }", "void printFilteredItems();", "public void btnShowUnpaid_onClick(View view) {\n setTitle(R.string.title_booklist_unpaid);\n\n mBookingList = mDataSource.getAllBookings();\n ArrayList<Booking> mUnpaidBookings = new ArrayList<>();\n\n for(int i=0;i<mBookingList.size();i++){\n if(mBookingList.get(i).isPaid()==0)\n mUnpaidBookings.add(mBookingList.get(i));\n }\n\n mAdapter = new BookingListAdapter(this, mUnpaidBookings);\n mRV.setAdapter(mAdapter);\n mRV.setLayoutManager(new LinearLayoutManager(this));\n }", "public void mostrarLista() {\n\n Nodo recorrer = temp;\n while (recorrer != null) {\n\n System.out.println(\"[ \" + recorrer.getDato() + \"]\");\n recorrer = recorrer.getSiguiente();\n\n }\n\n }", "@Override\r\n\tpublic int dupMovieChk(Search search) throws Exception {\n\t\treturn 0;\r\n\t}", "public void printRemoval() {\n System.out.println(\"\\n\" + \"=== Removed Files ===\");\n List<String> deleting = Utils.plainFilenamesIn(REMOVAL);\n for (String filesName: deleting) {\n System.out.println(filesName);\n }\n }", "private void skrivOversikt() {\n System.out.println(\"\\n- Leger -\\n\");\n for (Lege lege : leger){\n System.out.println(lege);\n }\n\n System.out.println(\"\\n- Pasienter -\");\n for (Pasient pasient : pasienter){\n System.out.println(\"\\n\" + pasient);\n }\n\n System.out.println(\"\\n- Legemidler -\");\n for (Legemiddel legemiddel : legemidler){\n System.out.println(\"\\n\" + legemiddel);\n }\n\n System.out.println(\"\\n- Resepter -\");\n for (Resept resept : resepter){\n System.out.println(\"\\n\" + resept);\n }\n }", "public void mostrarlistainicifin(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = inicio;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")<=>\";\n auxiliar = auxiliar.sig;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de inicio a fin\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }", "public void printList() {\n userListCtrl.showAll();\n }", "public void imprimir() {\r\n NodoPila reco=raiz;\r\n System.out.println(\"Listado de todos los elementos de la pila:\");\r\n while (reco!=null) {\r\n System.out.print(reco.dato+\" \");\r\n reco=reco.sig;\r\n System.out.println();\r\n }\r\n System.out.println();\r\n }", "public static void main(String[] args) {\n int a[]={1,2,3,4,4,3,2,6,6,9,9,6,7,4,7};\n\n ArrayList<Integer> al= new ArrayList<Integer>();\n\n for (int i =0;i<a.length;i++){\n int k=0;\n if (!al.contains(a[i])){\n al.add(a[i]);\n k++;\n\n for (int j=0;j<a.length;j++){\n if(a[i]==a[j]){\n k++;\n }\n }\n System.out.println(\"The number \"+ a[i] +\"repeats \"+ k+\" number of times.\");\n if (1==k)\n System.out.println(a[i]+ \" is the unique number.\");\n }\n\n\n }\n\n\n\n }", "public void refreshGameSearchList() {\n gamesSearchListModel.clear();\n List<String> games = dbMgr.getAllGameTitles(username);\n List<String> gamesOwned = dbMgr.getGameTitles(username);\n\n // fill list with games user does not own\n for (int i = 0; i < games.size(); i++) {\n if(!gamesOwned.contains(games.get(i)))\n gamesSearchListModel.addElement(games.get(i)); \n }\n\n gamesSearchList.setModel(gamesSearchListModel);\n\n }", "private void findUniqueInBoxes() {\n findUniqueInBox(1,3,1,3);\n findUniqueInBox(1,3,4,6);\n findUniqueInBox(1,3,7,9);\n findUniqueInBox(4,6,1,3);\n findUniqueInBox(4,6,4,6);\n findUniqueInBox(4,6,7,9);\n findUniqueInBox(7,9,1,3);\n findUniqueInBox(7,9,4,6);\n findUniqueInBox(7,9,7,9);\n\n }", "public void viewDetailAllPlantCanHarvest() {\n\t\tint i = 1;\n\t\tint l = 0;//check Harvest\n\t\tfor(Plant p : getListofplant()){\n\t\t\tif(p.canHarvest()){\n\t\t\t\tl++;\n\t\t\t}\n\t\t}\n\t\t// TODO Auto-generated method stub\n\t\tif(!checkPlantCanHarvest()){\n\t\t\tSystem.out.println(\"No Plant\");\n\t\t}\n\t\telse{\n\t\tfor(Plant p : getListofplant()){\n\t\t\tif(p.canHarvest()){\n\t\t\tSystem.out.println( i + \" \" + p.viewDetail() + \" StatusWater : \" + p.getStatusWater()\n\t\t\t+ \" StatusHarvest : \" + p.getStatusHarvest());\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t}\n\t\t\n\t}", "public void validateAdd(Stock s){\n Set<String> stock_symbols_set = new HashSet<>();\n for(Stock stock: stockList){\n stock_symbols_set.add(stock.getStockSymbol());\n }\n if(stock_symbols_set.contains(s.getStockSymbol())){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setIcon(R.drawable.baseline_warning_black_36);\n builder.setMessage(\"Stock Symbol \" + s.getStockSymbol() + \" is already displayed. \");\n builder.setTitle(\"Duplicate Stock\");\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n else{\n stockList.add(s);\n //keep the list in alphabetical order\n Collections.sort(stockList, new Comparator<Stock>() {\n @Override\n public int compare(Stock t1, Stock t2) {\n return t1.getStockSymbol().compareTo(t2.getStockSymbol());\n }\n });\n\n writeJSONData();\n myAdapter.notifyDataSetChanged();\n }\n }", "public static void main(String[] args) {\n\t\tList<Conta> lista = new Vector<Conta>();\n\t\t\n\t\tConta cc = new ContaCorrente(2121, 333);\n\t\tlista.add(cc);\n\n\t\tConta cco = new ContaCorrente(222, 456);\n\t\tlista.add(cco);\n\n\t\tConta cco2 = new ContaCorrente(222, 456);\n\t\t// lista.add(cco2);\n\n\t\tboolean existe = lista.contains(cco);\n\t\t//boolean existe = cc.equals(cco);\n\t\tSystem.out.println(\"JŠ existe: \" + existe);\n\n\t\t\n\n\t\tfor (Conta contas : lista) {\n\t\t\tif (contas.equals(cco2)) {\n\t\t\t\tSystem.out.println(contas);\t\n\t\t\t}\n\t\t}\n\n\t}", "public void verEstado(){\n for(int i = 0;i <NUMERO_AMARRES;i++) {\n System.out.println(\"Amarre nº\" + i);\n if(alquileres.get(i) == null) {\n System.out.println(\"Libre\");\n }\n else{\n System.out.println(\"ocupado\");\n System.out.println(alquileres.get(i));\n } \n }\n }", "void showPatients() {\n\t\t\t\n\t}", "public void showCatalogue() {\n for (Record r : cataloue) {\n System.out.println(r);\n }\n }", "private void showGraphFilterDiaglog() {\n mSeletedGraphDialogItems = new ArrayList();\n\n boolean[] checkedSelections = new boolean[6];\n Arrays.fill(checkedSelections, Boolean.FALSE);\n\n String userSelections = sharedPrefsUtilInst.getDoctorGraphFilter(defValueGraphFilters);\n\n if (userSelections.equals(\"\") == false) {\n\n String[] parts = userSelections.split(\"@\");\n\n for (int i = 0; i < parts.length; ++i) {\n\n int ind = Integer.parseInt(parts[i]);\n checkedSelections[ind] = true;\n mSeletedGraphDialogItems.add(ind);\n }\n }\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());\n View convertView = getActivity().getLayoutInflater().inflate(R.layout.patient_alert_dialog_title, null);\n alertDialog.setCustomTitle(convertView);\n alertDialog.setMultiChoiceItems(mGraphDialogItems, checkedSelections, new DialogInterface.OnMultiChoiceClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int indexSelected, boolean isChecked) {\n\n if (isChecked == true) {\n\n mSeletedGraphDialogItems.add(indexSelected);\n }\n else if (mSeletedGraphDialogItems.contains(indexSelected)) {\n\n mSeletedGraphDialogItems.remove(Integer.valueOf(indexSelected));\n }\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int id) {\n }\n })\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n saveGraphFilters();\n }\n });\n\n // Set the line color\n Dialog d = alertDialog.show();\n int dividerId = d.getContext().getResources().getIdentifier(\"android:id/titleDivider\", null, null);\n View divider = d.findViewById(dividerId);\n divider.setBackground(new ColorDrawable(Color.parseColor(\"#00274c\")));\n }", "private void ucitajPodatke() {\n \n DefaultListModel<Voznja> m = new DefaultListModel<>();\n obrada.getPodaci().forEach(s->m.addElement(s));\n lstPodaci.setModel(m);\n\n }", "public List removeDuplicate() throws ComputationException {\n log.debug(\"Removing duplicate using List......\");\n List<Integer> uniqueList = new ArrayList();\n int[] intArray = getRandomArray();\n log.debug(\"Actual size of int array:\" + intArray.length);\n log.debug(Arrays.toString(intArray));\n for (int i = 0; i < intArray.length; i++) {\n if (!isAdded(uniqueList, intArray[i])) {\n uniqueList.add(intArray[i]);\n }\n\n }\n log.debug(\"refined size of int array: \" + uniqueList.size());\n log.debug(uniqueList.toString());\n return uniqueList;\n\n }", "public List<DocumentoVinculadoDTO> getListaNoEspecifico() {\n System.out.println(\"entrei getListaNoEspecifico \");\n listar1Produto();\n return listaNoEspecifico;\n }", "public void listarHospedes() {\n System.out.println(\"Hospedes: \\n\");\n if (hospedesCadastrados.isEmpty()) {\n// String esta = hospedesCadastrados.toString();\n// System.out.println(esta);\n System.err.println(\"Não existem hospedes cadastrados\");\n } else {\n String esta = hospedesCadastrados.toString();\n System.out.println(esta);\n // System.out.println(Arrays.toString(hospedesCadastrados.toArray()));\n }\n\n }", "public List<TVShow> getAllShows(){\n\tList<TVShow> shows = new ArrayList<>();\n\ttvShowRepo.findAll().forEach(show->shows.add(show));\n\treturn shows;\n}", "@Override\n\tpublic List<vip> selectAll() {\n\t\treturn this.vd.selectAll();\n\t}", "@Override\r\n\tpublic List<ProductOptionVO> checkOptionBarcodeDupli(OrderSearchVO osVO) {\n\t\treturn getSqlSession().selectList(namespace+\".checkOptionBarcodeDupli\", osVO);\r\n\t}", "String showAllPublications() {\n\n PrintModelVisitor printVisitor = new PrintModelVisitor();\n visitPublications(mBooks, printVisitor);\n visitPublications(mMagazines, printVisitor);\n\n return printVisitor.getPublications();\n }", "public void showAnimalList() {\n\t\tshowAnimalList(Calendar.getInstance().getTime());\n\t}", "public void ocultaBotoesDeSegundoPlanoAtd(){\n JButton[] botSegPlan = botoesDeSegPlanoAtd();\n \n for(int i = 0; i<botSegPlan.length; i++){\n botSegPlan[i].setVisible(false);\n }\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Lista de todos los Inmuebles\";\n\t}", "protected void showReservations() {\n storageDao.findAllRented()\n .forEach(System.out::println);\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}", "public String visibleItems() {\n \tStringBuilder s = new StringBuilder(\"\");\n for (Item item : items) {\n if (item instanceof Visible && item.isVisible()) {\n s.append(\"\\nThere is a '\").append(item.detailDescription()).append(\"' (i.e. \" + item.description() + \" ) here.\");\n }\n }\n return s.toString();\n }", "private static void showsExtendAndQueryParameters() {\n\n\t\tQuery<BugReport> queryNoneAssigned = Ebean.createQuery(BugReport.class,\n\t\t\t\"assignedStatusCount\");\n\t\tqueryNoneAssigned.setParameter(\"status\", \"NEW\");\n\t\tqueryNoneAssigned.setParameter(\"count\", 0);\n\t\tqueryNoneAssigned.where().isNotNull(\"assigned.id\");\n\n\t\tList<BugReport> newBugsAssigned = queryNoneAssigned.findList();\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"\");\n\n\t\tfor (BugReport bugReport : newBugsAssigned) {\n\t\t\tInteger userId = bugReport.getAssigned().getId();\n\t\t\tint count = bugReport.getCount();\n\t\t\tString status = bugReport.getStatus().getCode();\n\n\t\t\tSystem.out.println(\" new bugs assigned: \" + count + \" to \" + userId + \" as \" + status);\n\t\t}\n\t}", "private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}", "@Override\r\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder ();\r\n\t\tsb.append(\"Ci sono \"+voti.size()+\" voti\\n\");\r\n\t\tfor (Voto v : this.voti)\r\n\t\t{\r\n\t\t\tsb.append(v); // chiama il toString() di voto\r\n\t\t\tsb.append(\"\\n\");\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public void verVerConvocatorias()\r\n\t{\r\n\t\tactualizarFinalizacionConvocatorias();\r\n\t\tverconvocatorias = new VerConvocatorias(this);\r\n\t\tverconvocatorias.setVisible(true);\r\n\t}", "public void mostrarlistafininicio(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = fin;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")->\";\n auxiliar = auxiliar.ant;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de fin a inicio\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }", "public static void mostrarVehiculos() {\n for (Vehiculo elemento : vehiculos) {\n System.out.println(elemento);\n }\n\t}", "public Collection findOtherPresentationsUnrestricted(Agent owner, String toolId, String showHidden);", "public static void main(String[] args)\n\t{\n\t\tHashSet<String> wordsWithNoDuplicates = new HashSet<>();\n\t\t\n\t\twordsWithNoDuplicates.add(\"poop\");\n\t\twordsWithNoDuplicates.add(\"butt\");\n\t\twordsWithNoDuplicates.add(\"ass\");\n\t\twordsWithNoDuplicates.add(\"ass\");\n\t\t\n\t\tfor (String word : wordsWithNoDuplicates)\n\t\t{\n\t\t\tSystem.out.println(word);\n\t\t}\n\n\t}", "public LinkedList Navegantes () {\r\n LinkedList lista = new LinkedList();\r\n String query = \"SELECT identificacion FROM socio WHERE eliminar = false\";\r\n try {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n lista.add(rs.getString(\"identificacion\"));\r\n }\r\n query = \"SELECT identificacion FROM capitan WHERE eliminar = false\";\r\n rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n lista.add(rs.getString(\"identificacion\"));\r\n }\r\n st.close();\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PSocio.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return lista;\r\n }", "public void popular(){\n DAO dao = new DAO();\n modelo.setNumRows(0);\n\n for(Manuais m: dao.selecTudoManuaisVenda()){\n modelo.addRow(new Object[]{m.getId(),m.getNome(),m.getClasse(),m.getEditora(),m.getPreco()+\".00 MZN\"});\n \n }\n }", "private void createShowAllButton(Composite parent) {\n\t\t\t((GridLayout) parent.getLayout()).numColumns++;\n\t\t\tButton extraButton = new Button(parent, SWT.CHECK);\n\t\t\textraButton.setText(\"Show all scannables\");\n\t\t\tsetButtonLayoutData(extraButton);\n\n\t\t\textraButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(event -> {\n\t\t\t\tmodel.clear();\n\t\t\t\tmodel.addAll(shortNameList);\n\t\t\t\tif (extraButton.getSelection()) {\n\t\t\t\t\tmodel.addAll(longNameList);\n\t\t\t\t}\n\t\t\t\tgetTableViewer().refresh();\n\t\t\t}));\n\t\t}", "public List<ProjectIdea> showAll(){\n try {\n List<ProjectIdea> result = new ArrayList<ProjectIdea>();\n CloseableIterator<ProjectIdea> itr = super.closeableIterator();\n try {\n while (itr.hasNext()) {\n ProjectIdea tmp = itr.next();\n result.add(tmp);\n }\n } finally {\n itr.close();\n }\n return result;\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n }" ]
[ "0.68188953", "0.66411734", "0.63065964", "0.5827661", "0.5784379", "0.57609934", "0.56813717", "0.567992", "0.5656932", "0.5609906", "0.5461789", "0.543115", "0.53714585", "0.5333386", "0.5267066", "0.5243598", "0.52415305", "0.5226599", "0.5221148", "0.52163917", "0.5216284", "0.5204015", "0.5199175", "0.51985013", "0.51811236", "0.5157982", "0.51572794", "0.51570326", "0.5153289", "0.51446897", "0.5135418", "0.5133493", "0.51306534", "0.5117323", "0.51040685", "0.50948566", "0.50931185", "0.5078352", "0.5076517", "0.50655437", "0.50475395", "0.5046333", "0.5045248", "0.5032646", "0.50293314", "0.50247043", "0.50160265", "0.5007862", "0.500449", "0.5002827", "0.4989076", "0.4987812", "0.4986107", "0.49677303", "0.49660337", "0.49528134", "0.49427286", "0.49350235", "0.49323216", "0.49318147", "0.49302316", "0.49272937", "0.49245754", "0.49210224", "0.49025622", "0.49005374", "0.49005044", "0.48988545", "0.489862", "0.48941454", "0.48920605", "0.4890911", "0.48890612", "0.48856536", "0.4883184", "0.48822173", "0.488067", "0.4869564", "0.48658785", "0.4865814", "0.48644304", "0.48538807", "0.48440182", "0.48418415", "0.4840731", "0.48400572", "0.48390138", "0.48346394", "0.4834553", "0.4833781", "0.48336813", "0.48335785", "0.48327902", "0.48264712", "0.48251587", "0.4823967", "0.48234817", "0.48190892", "0.4817421", "0.48077264" ]
0.7501008
0
Show All House Not Duplicate method
public static void showAllHouseNotDuplicate(){ showAllNameNotDuplicate(FuncGeneric.EntityType.HOUSE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showHouses() {\n System.out.println(\"-----Houses List-----\");\n System.out.println(\"No\\tOwner\\tPhone\\t\\tAddress\\t\\t\\t\\tRent\\tState\");\n houseService.listHouse();\n System.out.println(\"------List Done------\");\n }", "public static void showAllRoomNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.ROOM);\n }", "public static void showAllHouse(){\n ArrayList<House> houseList = getListFromCSV(FuncGeneric.EntityType.HOUSE);\n displayList(houseList);\n showServices();\n }", "public static void showAllVillaNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.VILLA);\n }", "public void duplicate() {\n System.out.println(\"Je bent al in bezit van deze vragenlijst!\");\n }", "public void findHouse() {\n\t\tSystem.out.println(\"找房子\");\n\t}", "public void printOwners(){\n ArrayList<String> ownerList = new ArrayList<String>();\n\n for(RegistrationPlate plates: this.registrationList.keySet()){\n if(!ownerList.contains(this.registrationList.get(plates)))\n ownerList.add(this.registrationList.get(plates));\n }\n\n printAllOwners(ownerList);\n }", "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}", "public boolean isFullHouse() {\n // TODO: complete this method. Hint: could you call the pair and three-of-a-kind\n // methods here?\n \treturn rankSet().size() ==2 && sameSet.size() == 2;\n }", "public static ArrayList<Neighbourhood> generateNeighbourhoods() {\n People p1 = new People(\"Peter\", \"Smith\");\n People p2 = new People(\"Anna\", \"Hunter\");\n ArrayList<People> people = new ArrayList<People>();\n people.add(p1); people.add(p2);\n\n Post post1 = new Post(p1,\"Babysitter needed\",\"Hi we need a Babysitter for next Friday. Please send me a private message if you are interested. Pay is 5 pound per hour\");\n Post post2 = new Post(p1,\"Car for sale\");\n Post post3 = new Post(p2,\"Looking for plumber\");\n Post post4 = new Post(p2,\"Free beer\");\n\n ArrayList<Post> posts = new ArrayList<Post>();\n posts.add(post1);posts.add(post2);posts.add(post3);posts.add(post4);\n\n\n Neighbourhood n1 = new Neighbourhood(\"Partick\");\n n1.setPosts(posts);\n n1.setMembers(people);\n Neighbourhood n2 = new Neighbourhood(\"West End\");\n n2.setPosts(posts);\n n2.setMembers(people);\n ArrayList<Neighbourhood> neighbourhoods = new ArrayList<Neighbourhood>();\n neighbourhoods.add(n1);\n neighbourhoods.add(n2);\n return neighbourhoods;\n }", "private void HaveDuplicate() {\n haveDuplicate = false;\n duplicateCounter = 0;\n try {\n query=\"SELECT * FROM category WHERE category_id = '\"+ txtCategoryNo.getText() +\"' OR category_name = '\"+\n txtCategoryName.getText() + \"'\";\n rset = connection.createStatement().executeQuery(query);\n while (rset.next()) {\n haveDuplicate = true;\n duplicateCounter++;\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "public boolean clearHouse() {\n boolean flag = false;\n if (calculateSumOfHouse() == 31) {\n pointsHistory.clear();\n flag = true;\n }\n return flag;\n }", "public void createNewHouseAndAddToList(){\n\t\t\tHouse newHouse = new House();\r\n\t\t\tString id = createAutomaticallyID().trim();\r\n\t\t\tnewHouse.setId(id);\r\n\t\t\tnewHouse.setPrice(Double.parseDouble(priceTextField.getText().trim()));\r\n\t\t\tnewHouse.setNumberOfBathrooms(Integer.parseInt(bathroomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setAirConditionerFeature(airConditionerComboBox.getSelectedItem().toString());\r\n\t\t\tnewHouse.setNumberOfRooms(Integer.parseInt(roomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setSize(Double.parseDouble(sizeTextField.getText().trim()));\r\n\t\t\t\r\n\t\t\toriginalHouseList.add(newHouse);//first adding newHouse to arrayList\r\n\t\t\tcopyEstateAgent.setHouseList(originalHouseList);//then set new arrayList in copyEstateAgent\r\n\r\n\t\t}", "public void show_NotOverlappingSessions(){\n \n ArrayList<notOverlapping> list= getNotOverlappingSessionList();\n DefaultTableModel model=(DefaultTableModel)notoverlappingsessions.getModel();\n Object[] row=new Object[3];\n \n for(int i=0; i<list.size(); i++){\n row[0]=list.get(i).getoId();\n row[1]=list.get(i).getSessionId();\n row[2]=list.get(i).getSubject();\n\n model.addRow(row);\n }\n \n }", "private void printNonDuplicates( Collection< String > collection )\r\n {\r\n // create a HashSet \r\n Set< String > set = new HashSet< String >( collection ); \r\n\r\n System.out.println( \"\\nNonduplicates are: \" );\r\n\r\n for ( String s : set )\r\n System.out.printf( \"%s \", s );\r\n\r\n System.out.println();\r\n }", "private void printNonDuplicates( Collection< String > collection )\r\n {\r\n \t // create a HashSet using a collection as parameter\r\n \t Set< String > set = new HashSet< String >( collection );\r\n \t System.out.println( \"Nonduplicates are: \" );\r\n \t for ( String s : set )\r\n \t\t System.out.printf( \"%s \", s );\r\n \t System.out.println();\r\n \t }", "public boolean checkDuplicate(ResultSet rsData, ResultSet rsWareHouse) {\n\t\ttry {\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= number_colum; i++) {\n\t\t\t\ttry {\n//\t\t\t\t\tSystem.out.println(rsData.getString(i));\n//\t\t\t\t\tSystem.out.println(rsWareHouse.getObject(i + 1));\n\t\t\t\t\tif (!rsData.getString(i).equals(rsWareHouse.getObject(i + 1).toString())) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count > 2) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\n\t}", "void showAll();", "public void showEmptySeats(){\n System.out.println(\"The following seats are empty: \");\n for (PlaneSeat seat:seat){\n if (! seat.isOccupied()){\n System.out.println(\"SeatID \" + seat.getSeatID());\n }\n }\n }", "private void searchShow() {\n ArrayList<Show> searchShows = new ArrayList<>();\n for (Show show : clientController.getUser().getShows()) {\n if (show.getName().toLowerCase().contains(getText().toLowerCase())) {\n searchShows.add(show);\n }\n// else {\n// JOptionPane.showMessageDialog(null, \"The search gave no result!\");\n// }\n\n }\n pnlShowList.removeAll();\n pnlShowList.setBackground(Color.decode(\"#6A86AA\"));\n draw(searchShows);\n }", "@Override\n public int getItemCount() {\n return houses.size();\n }", "public void getCardsShown(List<Room> roomList) {\n\n //Removes cards that are now in the view\n cardHolder.getChildren().clear();\n\n for (Room r : roomList) {\n HBox roomCard = roomCards.get(r.getRoomId().get());\n cardHolder.getChildren().add(roomCard);\n }\n\n\n }", "public void findHouse() {\n System.out.println(\"-----Search House-----\");\n System.out.println(\"enter id: \");\n int findId = Utility.readInt();\n //call service search method\n House h = houseService.searchHouse(findId);\n if (h != null) {\n System.out.println(h);\n } else {\n System.out.println(\"no designate house found\");\n }\n }", "@GetMapping(\"/households\")\n public ResultEntity<List<ItemDTO>> getAllHousehold()\n {\n\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Household\");\n }", "public boolean isFullHouse(){\n // TODO\n return false;\n }", "public void containsNoDuplicates() {\n List<Entry<T>> duplicates = Lists.newArrayList();\n for (Multiset.Entry<T> entry : LinkedHashMultiset.create(getSubject()).entrySet()) {\n if (entry.getCount() > 1) {\n duplicates.add(entry);\n }\n }\n if (!duplicates.isEmpty()) {\n failWithRawMessage(\"%s has the following duplicates: <%s>\", getDisplaySubject(), duplicates);\n }\n }", "private void showPool() {\n if (!(myPool==null)) {\n\n // disable buttons\n\n\n // show each genom in species\n Species s;\n Genom gnom;\n Gene gn;\n // Properties of genom\n int actLayers = -1;\n int allNeurons = 0;\n LinkedList <Neuron> [] layerList;\n\n // Loop Species\n for (int i = 0; i< myPool.size();i++) {\n s = myPool.getSpecie(i);\n\n // - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n // Loop Genom\n for (int j = 0; j < s.size(); j++) {\n\n if ( !(i==0) ){\n // wait until showing next\n try {\n for (int p = 0; p < sliNextAI.getValue()*1000+1; p=p+10) {\n Thread.sleep(10);\n }\n } catch (Exception e) {\n System.out.println(\"Menue - showPool - ThreadSleep - Fail\");\n }\n }\n\n gnom = s.getGenome(j);\n actLayers = gnom.getlayerDepth();\n lblLayerAIs.setText(\"Nodes : \" + actLayers);\n\n // LayerList shall contain all nodes in one layer\n layerList = new LinkedList[actLayers+1];\n\n // Loop Genes\n for (int k = 0; k < gnom.size(); k++) {\n // Get gene\n gn = gnom.getGene(k);\n // Sum size\n allNeurons = allNeurons + gn.getMySize();\n\n for (int layer = 0; layer < gn.getlayerDepth(); layer++) {\n // Create layers\n if (layerList[layer] == null) {\n layerList[layer] = gn.getNeuronsOnLayer(layer);\n } else {\n layerList[layer].addAll(gn.getNeuronsOnLayer(layer));\n }\n }\n layerList[actLayers] = gn.getOutgoing();\n }\n lblNodesAI.setText(\"Nodes : \" + allNeurons);\n // fitness\n lblFitnessAI.setText(\"Fitness : \" + \" - not filled in -\");\n\n gui.pntAIArea(game, layerList, myPool);\n\n // - - - - - - - - - - - -\n frame.revalidate();\n frame.repaint();\n // - - - - - - - - - - - -\n // j = s.size()+1;\n }\n // i = myPool.size()+1;\n // - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n }\n\n }\n\n }", "public static void main(String[] args) {\n Room room1 = new Room(14, 6, 2, false);\n Room room2 = new Room(8, 6, 2, false);\n Room room3 = new Room(18, 6, 2, false);\n\n ArrayList<Room> rooms = new ArrayList<>();\n rooms.add(room1);\n rooms.add(room2);\n rooms.add(room3);\n\n\n House house = new House(8, 2, 140.00, rooms);\n\n\n\n\n System.out.println(\"Aantal stoelen \" + house.aantalStoelenInHetHuis());\n\n }", "void checkStationUIExists() {\n\n int recordCount = 9999;\n int duplicateCount = 0;\n\n String where = MrnStation.DATE_START + \"=\" +\n Tables.getDateFormat(station.getDateStart()) +\n \" and \" + MrnStation.LATITUDE +\n \" between \" + (station.getLatitude()-areaRangeVal) +\n \" and \" + (station.getLatitude()+areaRangeVal) +\n \" and \" + MrnStation.LONGITUDE +\n \" between \" + (station.getLongitude()-areaRangeVal) +\n \" and \" + (station.getLongitude()+areaRangeVal) ;\n if (dbg) System.out.println(\"<br>checkStationUIExists: where = \" + where);\n //outputDebug(\"checkStationUIExists: where = \" + where);\n\n MrnStation[] stns = new MrnStation().get(where);\n if (dbg) System.out.println(\"<br>checkStationUIExists: stns.length = \" + stns.length);\n //outputDebug(\"checkStationUIExists: number of stations found = \" + stns.length);\n\n String debugMessage = \"\\ncheckStationUIExists: duplicate UI check \\n \" +\n station.getDateStart(\"\").substring(0,10) +\n \", \" + ec.frm(station.getLatitude(),10,5) +\n \", \" + ec.frm(station.getLongitude(),10,5) +\n \", \" + station.getStnnam(\"\") +\n \" (\" + station.getStationId(\"\") + \")\";\n\n if (stns.length == 0) {\n outputDebug(debugMessage + \": duplicate UI not found\");\n } else {\n\n outputDebug(debugMessage);\n\n // check for duplicate station names (stnnam)\n while (recordCount > 0) {\n\n // count station names the same\n recordCount = 0;\n for (int i = 0; i < stns.length; i++) {\n if (stns[i].getStnnam(\"\").equals(station.getStnnam(\"\"))) {\n recordCount++;\n } // if (stns[i].getStnnam(\"\").equals(station.getStnnam(\"\")))\n } // for (int i = 0; i < stns.length; i++)\n\n if (dbg) System.out.println(\"<br>checkStationUIExists: recordCount = \" +\n recordCount + \", stnnam = \" + station.getStnnam(\"\"));\n\n debugMessage = \" \" + station.getStnnam(\"\") +\n \", recordCount (same stnnam) = \" + recordCount;\n\n if (recordCount > 0) {\n duplicateCount++;\n\n station.setStnnam(station.getStnnam(\"\") + duplicateCount);\n\n debugMessage += \" - new stnnam = \" +\n station.getStnnam(\"\");\n //outputDebug(debugMessage);\n if (dbg) System.out.println(\"checkStationUIExists: new stnnam = \" +\n station.getStnnam(\"\"));\n }// if (recordCount > 0)\n\n outputDebug(debugMessage);\n\n } // while (recordCount > 0)\n\n } // if (stns.length == 0)\n\n }", "private void checkBuildHouse() {\n\t\tdouble moneyToSpend = calculateMoneyToSpend();\n\t\tif(moneyToSpend > 0) {\n\t\t\tArrayList<PropertyCard> cardsToBuildOn = new ArrayList<>();\n\t\t\tfor(PropertyCard c: getCards()) {\n\t\t\t\tif(isCollectionFull(c)) {\n\t\t\t\t\tcardsToBuildOn.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sorts so that the most expensive properties are at the start\n\t\t\tCollections.sort(cardsToBuildOn, Collections.reverseOrder());\n\t\t\tint moneySpent = 0;\n\t\t\tfor(PropertyCard c: cardsToBuildOn) {\n\t\t\t\twhile(c.getHousePrice()+moneySpent<=moneyToSpend && c.hasSpaceForHouse()) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, getName()+ \" built a house on \" + c.getName());\n\t\t\t\t\tbuildHouse(c);\n\t\t\t\t\tmoneySpent+=c.getHousePrice();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tHashSet<Student> hs = new HashSet<>();\n\t\t\n\t\ths.add(new Student(1,\"atish\",\"bsc\",2016,true));\n\t\ths.add(new Student(2,\"atul\",\"be\",2018,false));\n\t\ths.add(new Student(3,\"abhishek\",\"bca\",2019,true));\n\t\ths.add(new Student(4,\"aksahay\",\"bcs\",2020,false));\n\t\ths.add(new Student(5,\"ajay\",\"be\",2017,true));\n\t\ths.add(new Student(6,\"amit\",\"bca\",2019,false));\n\t\t\n\t\t\n\t\tArrayList<Student> placed = new ArrayList<>();\n\t\tArrayList<Student> unplaced = new ArrayList<>();\n\t\t\n\t\tIterator<Student> itr = hs.iterator();\n\t\t\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tStudent s = itr.next();\n\t\t\tif(s.isPlaced())\n\t\t\t{\n\t\t\t\tplaced.add(s);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tunplaced.add(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(placed);\n\t\tSystem.out.println(unplaced);\n\n\t}", "public static void main(String[] args) throws CloneNotSupportedException {\n\t\tHouse house1 = new House(1,140.50);\r\n\t\tHouse house2 = (House) house1.clone();\r\n\t\tSystem.out.println(\" house1 id: \"+house1.getId()+\" area: \"+house1.getArea()+\" whenBuilt: \"+house1.getWhenBuilt());\r\n\t\t\r\n\t\tSystem.out.println(\" house2 id: \"+house2.getId()+\" area: \"+house2.getArea()+\" whenBuilt: \"+house2.getWhenBuilt());\r\n\t\t\r\n\t}", "public House() {\n this.pointsHistory = new ArrayList<>();\n }", "public List<IBS2101105RsResult> getHouseList() {\n return houseList;\n }", "public void refreshGameSearchList() {\n gamesSearchListModel.clear();\n List<String> games = dbMgr.getAllGameTitles(username);\n List<String> gamesOwned = dbMgr.getGameTitles(username);\n\n // fill list with games user does not own\n for (int i = 0; i < games.size(); i++) {\n if(!gamesOwned.contains(games.get(i)))\n gamesSearchListModel.addElement(games.get(i)); \n }\n\n gamesSearchList.setModel(gamesSearchListModel);\n\n }", "public void showStreets() {\n\t\tMonopolyClient.getStreets();\n\t}", "public void winBigSquare (){\n /*for (int i =0; i<9; i++){\n for (int j=0; j<9; j++)\n System.out.print(bSquares.get(i).getSmallSquare(j).getOwnership()+\" \");\n System.out.println();\n }*/\n for (int i =0; i<9; i++){\n if (bSquares.get(i).getOwnership()==0){\n bSquares.get(i).setOwnership(bSquares.get(i).checkThreeInaRow());\n //System.out.println(\"SWAGSTA!\");\n }\n }\n \n }", "private void fetchUnknownOSpeciesNames(Session session) {\n QAQCMain.log.info(\"Getting the other species with unknown name\");\n DefaultTableModel model = (DefaultTableModel) tabDisplaySites.getModel();\n String hql = \"select species.otherSpeciesName, species.site.siteCode from OtherSpecies as species \"\n + \"where not exists (from RefSpecies as ref where ref.refSpeciesName like species.otherSpeciesName) \"\n + \"and species.otherSpeciesGroup not like 'B'\"\n + \"order by species.otherSpeciesName ASC\";\n Query q = session.createQuery(hql);\n Iterator itr = q.iterate();\n int i = 0;\n while (itr.hasNext()) {\n Object[] tabRes = (Object[]) itr.next();\n Object[] tuple = {tabRes[1], tabRes[0]};\n model.insertRow(i, tuple);\n i++;\n }\n Object[] columnNames = {\"Site\", \"Other Species Name\"};\n model.setColumnIdentifiers(columnNames);\n updateNumResults(i);\n\n }", "public Boolean checkHouseWithId(){\n\t\t\tif(removeHouse == null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}", "@SuppressWarnings({ \"unchecked\", \"static-access\" })\r\n\tpublic boolean checkArticleIsDuplicated(){\r\n\t\r\n\t\tnum_DupInDBLP = 0;\r\n\t\t\t\t\r\n\t\tCheckExist check = new CheckExist();\r\n\t\t\r\n\t\tnumberArray = (ArrayList<Integer>) check.CheckTitleSignaturePublications(dbsaPublicationCheckList).clone();\r\n\t\tduplicateNumber = numberArray.size();\r\n\t\t\r\n\t\tduplicationArtilce = false;\r\n\t\tif(numberArray.size() > 0){\r\n\t\t\tfor(int i = 0; i < numberArray.size(); i++)\r\n\t\t\t{\t\r\n\t\t\t\tmodel.setValueAt(true, numberArray.get(i), 8);\r\n\t\t\t\tresultsJTable.addRowToPaint(numberArray.get(i), Color.red);\r\n\t\t\t\tduplicationArtilce = true;\r\n\t\t\t\t\r\n\t\t\t\tnum_DupInDBLP ++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgetFetcherInfo();\r\n\t\t//System.out.println(num_DupInDBLP);\r\n\t\tcheckDuplicateJButton.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\tDBSAApplication.statisticPanel.updateStatistic(num_Total);\r\n\t\treturn duplicationArtilce;\r\n\t}", "private List<Integer>getDead(List<Box> Alive){\n List<Integer> alive = new ArrayList<>();\n List<Integer> dead = new ArrayList<>();\n\n for(Box box : Alive){\n alive.add(box.getId());\n }\n\n for(int i=1;i<17;i++){\n if(!alive.contains(i)){\n dead.add(i);\n }\n }\n\n return dead;\n }", "public void listing() {\r\n int count = 1;\r\n for (AdressEntry i : addressEntryList) {\r\n System.out.print(count + \": \");\r\n System.out.println(i);\r\n count++;\r\n }\r\n System.out.println();\r\n }", "public boolean checkDuplicates() {\n List<Booking> dupbookings = new ArrayList<>();\n try {\n dupbookings = bookingHelper.checkDuplicates(b_facility.getId(), b_evdate, b_startTime, b_endTime);\n } catch (Exception e) {\n //facesMessage(\"No other bookings found for the day and time\");\n }\n return dupbookings.size() > 0;\n }", "ObservableList<Person> getDisplayedPersonList();", "private Set<Hole> createHoleSetWithUNr(){\n ListIterator children = gridPane.getChildren().listIterator();\n Set<Hole> holeSet = new HashSet<>();\n Integer number = -1;\n for (ListIterator it = children; it.hasNext(); ) {\n Node node = (Node) it.next();\n if (node.getId() != null && node.getId().startsWith(number.toString())){\n\n Label sideLabel = (Label) node;\n Label yLabel = (Label) it.next();\n Label sizeLabel = (Label) it.next();\n TextField uNrText = (TextField) it.next();\n\n String side = sideLabel.getText();\n double y = Double.parseDouble( yLabel.getText() );\n double size = Double.parseDouble(sizeLabel.getText());\n int unr = Integer.parseInt( uNrText.getText() );\n\n Hole uniqueHole = new Hole(side,y,size,unr);\n holeSet.add(uniqueHole);\n }\n number++;\n }\n return holeSet;\n }", "public String show() {\n\t\t \t\tString result =\"\";\n\t\t \t\tGson gson = new Gson();\n\t\t \t\tfor(Olders o : collectionsOlders){\n\t\t\t\t\t\tresult+=gson.toJson(o,Olders.class) + \"\\n\";\n\n\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t }", "public void visOversikt() {\r\n System.out.println(\"\\nPerson Oversikt:\");\r\n\r\n for(Person person : personListe.values()) {\r\n System.out.println(\"\\n\" + person);\r\n System.out.println(person + \" eier \" + (person.eierSize() + person.utlaantSize()) + \" DVD'er\");\r\n System.out.println(person + \" laaner ut \" + person.utlaantSize() + \" DVD'er\");\r\n System.out.println(person + \" laaner \" + person.laanerSize() + \" DVD'er\");\r\n }\r\n }", "public boolean isHouse() {\n return (this.getId() == Player.PLAYER_1.getHouseIndex())\n || (this.getId() == Player.PLAYER_2.getHouseIndex());\n }", "private static void empty() {\n\t\t// 행과 열을 상수로\n\t\tfinal int ROW_COUNT = 5, COL_COUNT = 8;\n\t\t// 5행\n\t\tfor (int rowIdx = 0; rowIdx < ROW_COUNT; rowIdx++) {\n\t\t\t// 8열 만들기\n\t\t\tfor (int colIdx = 0; colIdx < COL_COUNT; colIdx++) {\n\t\t\t\tif (rowIdx == 0 || rowIdx == ROW_COUNT - 1) {\n\t\t\t\t\t// 첫 행과 마지막 행은 경계\n\t\t\t\t\tSystem.out.print('*');\n\t\t\t\t} else if (colIdx == 0 || colIdx == COL_COUNT - 1){\n\t\t\t\t\t// 첫 열과 마지막 열은 경계\n\t\t\t\t\tSystem.out.print('*');\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t// 가운데 공간 채우기\n\t\t\t\t\tSystem.out.print('-');\n\t\t\t\t}\n\t\t\t}\t\n\t\t\t// 행을 나누기\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "boolean isFullHouse();", "static SparseArray<TaskDetail> getCurrentMappingsDuplicated() {\n SparseArray<TaskDetail> toReturn = new SparseArray<>();\n for (int i = 0; i < TaskDetail.actionToTask.size(); i++) {\n TaskDetail detail = TaskDetail.actionToTask.valueAt(i);\n toReturn.put(TaskDetail.actionToTask.keyAt(i), detail.duplicate());\n }\n return toReturn;\n }", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }", "public String toString(){\r\n\t\t// Number of households\r\n\t\tString output = \";\\\"\" + this.getTotalHouseholds() + \"\\\"\";\r\n\t\tIterator<Data> iter = this.data.values().iterator();\r\n\t\r\n\t\t// Compile the list of the makeup of each household.\r\n\t\twhile(iter.hasNext()){\r\n\t\t\toutput += \";\" + iter.next().toString();\r\n\t\t}\t// end while\r\n\t\r\n\t\treturn output;\r\n\t}", "@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}", "public String showAllNhanvien();", "static void neighborhood()\r\n { \r\n // Puts the earth in a world and the three different color turtles in that world\r\n earth = new World();\r\n turtle1 = new Turtle(earth);\r\n turtle1.setColor(Color.BLUE);\r\n turtle2 = new Turtle(earth);\r\n turtle2.setColor(Color.RED);\r\n turtle3 = new Turtle(earth);\r\n turtle3.setColor(Color.GREEN);\r\n house(100, 100, turtle1);\r\n house(250, 100, turtle2);\r\n house(400, 100, turtle3);\r\n\r\n }", "private void showAll() {\n getAll();\n //show persons\n MainActivity.instance().displayPersonsRunnable = new DisplayPersonsRunnable(MainActivity.instance());\n this.thread = new Thread(MainActivity.instance().displayPersonsRunnable);\n this.thread.start();\n }", "public void displayAll(){\n System.out.println(\"guestCounter: \" + guestCounter);\n for(int i=0;i<guestCounter;i++){\n guest[i].dispGuest();\n }\n }", "private void setHouses() {\n for(int k = 0; k < 6; ++k ){\n topHouses.add(new Button());\n bottomHouses.add(new Button());\n }\n\n int i = 0;\n for (Button button : topHouses) {\n button.setStyle(\"-fx-background-color: brown;\");\n button.setPrefWidth(50);\n button.setPrefHeight(50);\n button.setTranslateX(780 - 80 * (i + 1));\n button.setTranslateY(150);\n button.setText(Integer.toString(kalha.getHouseVal(0,i).getInteger()));\n int finalI = i;\n button.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n try {\n sowTop(finalI); //houses[0]\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n root.getChildren().add(topHouses.elementAt(i));\n i++;\n }\n int j = 0;\n for (Button button : bottomHouses) {\n button.setStyle(\"-fx-background-color: brown;\");\n button.setPrefWidth(50);\n button.setPrefHeight(50);\n button.setTranslateX(220 + 80 * (j + 1));\n button.setTranslateY(520);\n button.setText(Integer.toString(kalha.getHouseVal(1,j).getInteger()));\n int finalI = j;\n button.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n try {\n sowBottom(finalI); //houses[1]\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n root.getChildren().add(bottomHouses.elementAt(j));\n j++;\n }\n }", "public Collection<BundleEntry> getDuplicates() {\n return duplicates;\n }", "@Test\r\n public void testCreateTourWithoutDuplicates_MultipleDups() {\r\n Tour tour = new Tour(new int[][]{{1, 1}, {2, 2}, {1, 1}, {3, 3}, {1, 1}, {1, 1}});\r\n Tour result = tour.createTourWithoutDuplicates();\r\n Tour expected = new Tour(new int[][]{{1, 1}, {2, 2}, {3, 3}});\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }", "private void displaySchalorship() {\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.toString() + \"\\n\");\n\n }\n }", "private void createDummyRepairList() {\n Repairs r = new Repairs();\n r.setId(1);\n r.setStatus(\"pending\");\n r.setmName(\"Honor 7A\");\n r.setDescription(\"Screen lag issue.\");\n r.setUserId(1);\n repairsList.add(r);\n\n r = new Repairs();\n r.setId(2);\n r.setStatus(\"approved\");\n r.setmName(\"Redmi\");\n r.setDescription(\"Charge point.\");\n r.setUserId(1);\n repairsList.add(r);\n\n r = new Repairs();\n r.setId(3);\n r.setStatus(\"approved\");\n r.setmName(\"Samsung\");\n r.setDescription(\"Battery lag.\");\n r.setUserId(1);\n repairsList.add(r);\n\n r = new Repairs();\n r.setId(4);\n r.setStatus(\"pending\");\n r.setmName(\"Honor 7A\");\n r.setDescription(\"Screen lag issue.\");\n r.setUserId(2);\n repairsList.add(r);\n\n r = new Repairs();\n r.setId(5);\n r.setStatus(\"approved\");\n r.setmName(\"Redmi\");\n r.setDescription(\"Charge point.\");\n r.setUserId(2);\n repairsList.add(r);\n\n r = new Repairs();\n r.setId(6);\n r.setStatus(\"approved\");\n r.setmName(\"Samsung\");\n r.setDescription(\"Battery lag.\");\n r.setUserId(2);\n repairsList.add(r);\n\n\n r = new Repairs();\n r.setId(7);\n r.setStatus(\"pending\");\n r.setmName(\"Honor 7A\");\n r.setDescription(\"Screen lag issue.\");\n r.setUserId(3);\n repairsList.add(r);\n\n r = new Repairs();\n r.setId(8);\n r.setStatus(\"approved\");\n r.setmName(\"Redmi\");\n r.setDescription(\"Charge point.\");\n r.setUserId(3);\n repairsList.add(r);\n\n r = new Repairs();\n r.setId(9);\n r.setStatus(\"approved\");\n r.setmName(\"Samsung\");\n r.setDescription(\"Battery lag.\");\n r.setUserId(3);\n repairsList.add(r);\n }", "public static void renderHouse(Graphics g){\n\t\tfor(int k = 0; k < avenue.length; k++)\r\n\t\t{\r\n\t\t\tint scale = 20;\r\n\t\t\tif((0 < avenue[k] && avenue[k] < 10) || (20 < avenue[k] && avenue[k] < 30)){\r\n\t\t\t\tif(avenueLevel[avenue[k]] == 4){\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k]);\r\n\t\t\t\t\thouse(g,houseX[k] + scale, houseY[k]);\r\n\t\t\t\t\thouse(g,houseX[k] + scale*2, houseY[k]);\r\n\t\t\t\t\thouse(g,houseX[k] + scale*3, houseY[k]);\r\n\t\t\t\t}else if(avenueLevel[avenue[k]] == 3){\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k]);\r\n\t\t\t\t\thouse(g,houseX[k] + scale, houseY[k]);\r\n\t\t\t\t\thouse(g,houseX[k] + scale*2, houseY[k]);\r\n\t\t\t\t}else if(avenueLevel[avenue[k]] == 2){\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k]);\r\n\t\t\t\t\thouse(g,houseX[k] + scale, houseY[k]);\r\n\t\t\t\t}else if(avenueLevel[avenue[k]] == 1){\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k]);\r\n\t\t\t\t}\r\n\t\t\t}else if((10 < avenue[k] && avenue[k] < 20) || (30 < avenue[k] && avenue[k] < 40))\r\n\t\t\t{\r\n\t\t\t\tif(avenueLevel[avenue[k]] == 4){\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k]);\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k] + scale);\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k] + scale*2);\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k] + scale*3);\r\n\t\t\t\t}else if(avenueLevel[avenue[k]] == 3){\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k]);\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k] + scale);\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k] + scale*2);\r\n\t\t\t\t}else if(avenueLevel[avenue[k]] == 2){\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k]);\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k] + scale);\r\n\t\t\t\t}else if(avenueLevel[avenue[k]] == 1){\r\n\t\t\t\t\thouse(g,houseX[k], houseY[k]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean hidden(Square[][] square)\n {\n \tboolean rem = false;\n \tArrayList<ArrayList<Integer>> poss = new ArrayList<ArrayList<Integer>>();\n for(int x = 1; x <= 9; x++)\n {\n \tArrayList<Integer> pos = new ArrayList<Integer>();\n \tfor(int r = 0; r < 9; r++)\n \t{\n \t\tif(square[r][colNum].returnPossible().indexOf(x) != -1)\n \t\t{\n \t\t\tpos.add(r);\n \t\t}\n \t}\n \tposs.add(pos);\n }\n \n for(int x = 0; x < poss.size(); x++)\n {\n \tif(poss.get(x).size() != 1)\n \t{\n \t\tArrayList<Integer> other = new ArrayList<Integer>();\n \t\tfor(int x2 = 0; x2 < poss.size(); x2++)\n \t\t{\n \t\t\tif(contains(poss.get(x), poss.get(x2)))\n \t\t{\n \t\t\t\tother.add(x2 + 1);\t\n \t\t}\t\n \t\t}\n \t\tif(other.size() == poss.get(x).size())\n \t\t{\n \t\t\tboolean now = removeElse(square, other, poss.get(x));\n \t\t\tif(now)\n \trem = true;\n \t\t}\n \t}\n }\n return rem;\n }", "HashSet<String> displayEmployee();", "public ArrayList<String> getUnlockedHouses() {\n\t\treturn unlocked_houses;\n\t}", "public void displayGame()\n { \n System.out.println(\"\\n-------------------------------------------\\n\");\n for(int i=3;i>=0;i--)\n {\n if(foundationPile[i].isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(foundationPile[i].peek());\n }\n System.out.println();\n for(int i=6;i>=0;i--)\n {\n for(int j=0;j<tableauHidden[i].size();j++)\n System.out.print(\"X\");\n System.out.println(tableauVisible[i]);\n }\n System.out.println();\n if(waste.isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(waste.peek());\n if(deck.isEmpty())\n System.out.println(\"[O]\");\n else System.out.println(\"[X]\");\n }", "public void displayAllPatients() {\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients\";\r\n\t\t\tStatement stm= super.getConnection().createStatement();\r\n\t\t\tResultSet results= stm.executeQuery(query);\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\tString[] row= new String[7];\r\n\t\t\t\trow[0]= results.getInt(1)+\"\";\r\n\t\t\t\trow[1]= results.getString(2);\r\n\t\t\t\trow[2]= results.getString(3);\r\n\t\t\t\trow[3]= results.getString(4);\r\n\t\t\t\trow[4]= results.getString(5);\r\n\t\t\t\trow[5]= results.getInt(6)+\"\";\r\n\t\t\t\tmodelHostory.addRow(row);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "private void displayAllTable() {\n\n nhacungcap = new NhaCungCap();\n nhacungcap.setVisible(true);\n jDestopTable.add(nhacungcap);\n\n thuoc = new SanPham();\n thuoc.setVisible(true);\n jDestopTable.add(thuoc);\n\n khachHang = new KhachHang();\n khachHang.setVisible(true);\n jDestopTable.add(khachHang);\n\n hoaDon = new HoaDon();\n hoaDon.setVisible(true);\n jDestopTable.add(hoaDon);\n\n }", "public static void main(String[] args) {\n\t\tint a[] = {1,2,2,6,7,3,4,4,5,5,6,7};\n\t\t\n\t\t\n\t\tMap<Integer,Integer> map =new HashMap<Integer,Integer>();\n\t\t\n\t\tfor (Integer num :a) {\n\t\t\tInteger Count =map.get(num);\n\t\t\tif(Count==null) {\n\t\t\t\tmap.put(num, 1);\n\t\t\t}else {\n\t\t\t\tmap.put(num, ++Count);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tSet<Entry<Integer, Integer>> entryset =map.entrySet();\n\t\tArrayList<Integer> list =new ArrayList<Integer>();\n\t\tfor(Entry<Integer, Integer> entry :entryset) {\n\t\t\tif(entry.getValue()>1) {\n\t\t\t\tlist.add(entry.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\tSystem.out.println(\"Duplicates are \" +list);\n\t\t\n\t\tSet<Entry<Integer, Integer>> entryset1 =map.entrySet();\n\t\tArrayList<Integer> nonduplist =new ArrayList<Integer>();\n\t\tfor(Entry<Integer, Integer> entry1 :entryset1) {\n\t\t\tif(entry1.getValue()==1) {\n\t\t\t\tnonduplist.add(entry1.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\tSystem.out.println(\"Non Duplicates are \" +nonduplist);\n\t\t\n \n}", "public MyHousesTableModel(List<House> houses) {\n\t\t\n\t\tObject[] titles = { \"ZIP code\", \"City\" };\n\t\tthis.titles = titles;\n\n\t\t// Create a matrix of table contents\n\t\tObject[][] contents = new Object[houses.size()][titles.length];\n\t\thousesArray = new House[houses.size()];\n\n\t\tint i = 0;\n\n\t\tfor (House h : houses) {\n\n\t\t\tObject[] house = {h.getZipCode(), h.getCity()};\n\n\t\t\tcontents[i] = house;\n\t\t\thousesArray[i] = h;\n\t\t\ti++;\n\t\t}\n\n\t\tthis.contents = contents;\n\t}", "public void displayAllContacts() {\n\n for (int i = 0; i < contacts.size(); i ++) {\n\n Contact contact = contacts.get(i);\n\n System.out.println(\" Name: \" + contact.getName());\n System.out.println(\" Title: \" + contact.getTitle());\n System.out.println(\" ID #: \" + contact.getID());\n System.out.println(\" Hoursrate: \" + contact.getHoursrate());\n System.out.println(\" Workhours \" + contact.getWorkhours());\n System.out.println(\"-------------\");\n\n\n\n Employee one = new Employee(\"A\", \"A\", \"A\", \"A\"); // I give it some contact information first.\n Employee two = new Employee(\"Bob\", \"Bob\", \"A\", \"A\");\n\n\n\n\n\n\n}\n\n\n//***************************************************************", "private void displayAll() {\n\t\tif(inventoryObject.totalNumCards() == 0) { // checks to see if there are 0 StockIndexCards\n\t\t\tSystem.out.println(\"The Inventory is empty\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\tSystem.out.println(inventoryObject.displayAll());\n\t\tgetUserInfo();\n\t\t}\n\t}", "public void showAnimalList() {\n\t\tshowAnimalList(Calendar.getInstance().getTime());\n\t}", "public void displayAllRooms(){\n for(int i=0;i<roomCounter;i++){\n myHotel[i].Display();\n System.out.println();\n }\n }", "public boolean win(){\n\t\tint num=0;//number of the boxes are in the areas\n\t\tfor(int i=0;i<boxes.size();i++){\n\t\t\tbox a =boxes.get(i);\n\t\t\tfor(int j=0;j<areas.size();j++){\n\t\t\t\tarea b = areas.get(j);\n\t\t\t\tif(a.getX()==b.getX()&&a.getY()==b.getY()){//check whether all the boxes have been in the certain areas\n\t\t\t\t\t//System.out.println(j);\n\t\t\t\t\t//System.out.println(\"area: \"+j);\n\t\t\t\t\tb.emptyImage();//clear the original image of boxes\n\t\t\t\t a.setImage();//change to the colorful one\n\t\t\t\t\tnum++;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//\t b.setImage(); \t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(num==areas.size()){//whether their number are same \n\t\t\tnum=0;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n\t\tList<Integer> numbers = Arrays.asList(9, 10, 3, 4, 7, 3, 4);\n\t\tList<Integer> distinct = numbers.stream().map(i -> i * i).distinct().collect(Collectors.toList());\n\t\tSystem.out.printf(\"Original List : %s, Square Without duplicates : %s %n\", numbers, distinct);\n\t}", "public boolean isFullHouse(){\r\n int temp[] = getIntArr();\r\n if(temp[0] == temp[1] && temp[1] == temp[2] && temp[3] == temp[4])\r\n return true;\r\n\r\n else if(temp[0] == temp[1] && temp[2] == temp[3] && temp[3]== temp[4] )\r\n return true;\r\n\r\n else return false;\r\n }", "public void show(Graphics g) {\n for (int row = 0; row < grid.length; row++) { //iterate through the array\r\n for (int col = 0; col < grid[0].length; col++) {\r\n if (grid[row][col]==true) //if the value is \"alive\"\r\n {\r\n g.setColor(Color.black); //display black square\r\n } else {\r\n g.setColor(Color.white); //otherwise display white square\r\n }\r\n g.fillRect(col * 5 + 2, row * 5 + 2, 5, 5); // fill the square in\r\n }\r\n }\r\n }", "public Collection findOwnerPresentations(Agent owner, String toolId, String showHidden);", "private void fetchUnknownSpeciesNames(Session session) {\n QAQCMain.log.info(\"Getting the species with unknown name\");\n DefaultTableModel model = (DefaultTableModel) tabDisplaySites.getModel();\n String hql = \"select species.speciesName, species.site.siteCode from Species as species \"\n + \"where not exists (from RefSpecies as ref where ref.refSpeciesName like species.speciesName) \"\n + \"and species.speciesGroup not like 'B'\"\n + \"order by species.speciesName ASC\";\n Query q = session.createQuery(hql);\n Iterator itr = q.iterate();\n int i = 0;\n while (itr.hasNext()) {\n Object[] tabRes = (Object[]) itr.next();\n Object[] tuple = {tabRes[1], tabRes[0]};\n\n model.insertRow(i, tuple);\n i++;\n }\n Object[] columnNames = {\"Site\", \"Species Name\"};\n model.setColumnIdentifiers(columnNames);\n\n updateNumResults(i);\n }", "public void ShowAllRep() {\n IntRepList.OpNode current = this.iRepBetter.head;\n while (null != current) {\n this.ShowRep(current.opArray);\n current = current.next;\n }\n }", "public void listarHospedes() {\n System.out.println(\"Hospedes: \\n\");\n if (hospedesCadastrados.isEmpty()) {\n// String esta = hospedesCadastrados.toString();\n// System.out.println(esta);\n System.err.println(\"Não existem hospedes cadastrados\");\n } else {\n String esta = hospedesCadastrados.toString();\n System.out.println(esta);\n // System.out.println(Arrays.toString(hospedesCadastrados.toArray()));\n }\n\n }", "public static void main(String[] args) {\n\t\tSet<Puppy> set = new LinkedHashSet<Puppy>(10);\n\t\t\n\t\t// this DS which can hold other object\n\t\tPuppy puppy1=new Puppy(\"Tommy\",10 );\n\t\tPuppy puppy2=new Puppy(\"AHH\", 12);\n\t\tPuppy puppy3=new Puppy(\"MYY\", 5);\n\t\tPuppy puppy4=new Puppy(\"NANY\", 3);\n\t\tPuppy puppy5=new Puppy(\"NANY\", 3);\n\t\t\n\t\t//dog4 and dog5 are duplicate elements\n\t\tset.add(puppy1);\n\t\tset.add(puppy2);\n\t\tset.add(puppy3);\n\t\tset.add(puppy4);\n\t\tset.add(puppy5);\n\t\t\n\t\tSystem.out.println(\"puppy4 . hashCode () = \"+puppy4.hashCode());\n\t\tSystem.out.println(\"puppy5 . hashCode () = \"+puppy5.hashCode());\n\t\t\n\t\tIterator<Puppy> iterator=set.iterator();\n\t\t\n\t\tSystem.out.println(\"Accessing data using Iterator interface!\");\n\t\twhile(iterator.hasNext()){\n\t\t\tPuppy puppy=iterator.next();\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"____________-----\");\n\t\tfor(Puppy puppy:set){\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\tPuppy puppy6=new Puppy(\"NANY\", 3);\n\t\t\n\t\tboolean b=set.contains(puppy6);\n\t\tif(b){\n\t\t\tSystem.out.println(\"puppy6 found in set!\"+puppy6);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Run it\");\n\t\t /* final Entry<K,V> getEntry(Object key) {\n\t\t int hash = (key == null) ? 0 : hash(key.hashCode());\n\t\t for (Entry<K,V> e = table[indexFor(hash, table.length)];\n\t\t e != null;\n\t\t e = e.next) {\n\t\t Object k;\n\t\t if (e.hash == hash &&\n\t\t ((k = e.key) == key || (key != null && key.equals(k))))\n\t\t return e;\n\t\t }\n\t\t return null;\n\t\t } */\n\t\t b=set.contains(puppy1);\n\t\tif(b){\n\t\t\tSystem.out.println(b+\"is found in set!\");\n\t\t}\n\t\t\n\n\t}", "public void removeAllPawns(){\n\n for (Map.Entry<Integer, ImageView> entry : actionButtons.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n }\n\n for (Map.Entry<Integer, ImageView> entry : harvestBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n harvestBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : productionBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n productionBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : gridMap.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n gridFreeSlot = 0;\n }\n }", "@Override\r\n\tpublic boolean addHouse(House h) {\n\t\treturn adi.addHouse(h);\r\n\t}", "public static boolean hasFullHouse(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 0; i< cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].getValue()){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(counter==4){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static void addHabitant(ArrayList<House> houses, Human human)\n throws NoSpaceException{\n int i = 0;\n while (i < houses.size()){\n if(!houses.get(i).is_full()){\n houses.get(i).habitant.add(human);\n return;\n }\n else {\n i++;\n }\n }\n if (i==houses.size()){\n throw new NoSpaceException();\n }\n }", "public boolean isFullHouse(){\n List<PokerCard> firstList;\r\n List<PokerCard> secondList;\r\n \r\n //First possibility: first two cards are a pair\r\n firstList = cards.subList(0, 2);\r\n secondList = cards.subList(2, cards.size());\r\n if(haveSameValue(firstList) && haveSameValue(secondList)){\r\n handValue = secondList.get(0).getValue();\r\n return true;\r\n }\r\n \r\n //Second possibility: last two cards are a pair\r\n firstList = cards.subList(0, 3);\r\n secondList = cards.subList(3, cards.size());\r\n if(haveSameValue(firstList) && haveSameValue(secondList)){\r\n handValue = firstList.get(0).getValue();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public void removeDuplicates()\n\t{\n\t\tComparator<Point> comp = new Comparator<Point>() \n\t\t{\n @Override\n public int compare(Point p, Point q) \n {\n \t return p.compareTo(q);\n }\n };\n\t\tquicksorter.quickSort(comp);\n\t\tquicksorter.getSortedPoints(points);\n\t\t\n\t\tArrayList<Point> pts = new ArrayList<Point>();\n\t\tfor(int a = 0; a < points.length; a++) //copy points into temp array\n\t\t{\n\t\t\tif(!pts.contains(points[a]))\n\t\t\t{\n\t\t\t\tpts.add(points[a]);\n\t\t\t}\n\t\t}\n\t\tpointsNoDuplicate = new Point[pts.size()]; //insert into pointsNoDuplicate\n\t\tfor(int i = 0; i < pts.size(); i++)\n\t\t{\n\t\t\tpointsNoDuplicate[i] = pts.get(i);\n\t\t}\n\t}", "private void displayScholarshipByName(String name) {\n\n int falg = 0;\n\n stdOut.println(name + \"\\n\");\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.getName() + \"\\n\");\n\n if (scholarship.getName().equals(name)) {\n\n stdOut.println(scholarship.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find scholarship\\n\");\n\n }\n }", "@ApiOperation(value = \"해당 매물의 모든 리뷰 정보 조회\", notes = \"성공시 모든 리뷰의 정보를 반환합니다.\")\n @GetMapping(\"/{house_id}\")\n public List<Review> findAll(int house_id) {\n return reviewService.findAll(house_id);\n }", "public String toString() {\n // returns information about property\n if (owner != null) {\n return owner.getName()+\",\"+numberHouses;\n }else{\n return \"NULL\";\n }\n }", "@Override\n\tpublic ArrayList<Carpo> showAllCars() {\n\t\treturn inList.showAll();\n\t}", "private static void mostrarSocios() {\n\n\t\tfor (Socio s : socios.values())\n\t\t\tSystem.out.println(s);\n\n\t}", "private void fetchUnknownSpeciesCodes(Session session) {\n QAQCMain.log.info(\"Getting the species with unknown code\");\n DefaultTableModel model = (DefaultTableModel) tabDisplaySites.getModel();\n String hql = \"select species.speciesCode, species.site.siteCode from Species as species \"\n + \"where not exists (from RefSpecies as ref where ref.refSpeciesCode like species.speciesCode) \"\n + \"and species.speciesGroup not like 'B'\"\n + \"order by species.speciesCode ASC\";\n Query q = session.createQuery(hql);\n Iterator itr = q.iterate();\n int i = 0;\n while (itr.hasNext()) {\n Object[] tabRes = (Object[]) itr.next();\n Object[] tuple = {tabRes[1], tabRes[0]};\n model.insertRow(i, tuple);\n i++;\n }\n\n Object[] columnNames = {\"Site\", \"Species Code\"};\n model.setColumnIdentifiers(columnNames);\n updateNumResults(i);\n }", "@Override\n\tpublic boolean publishNewHouse(House house) {\n\t\treturn houseDao.save(house)!=null;\n\t}", "static boolean isFullHouse(ArrayList<Card> c)\n {\n //Awkward way. If it's not five, we'll just not check at all.\n if(c.size() != 5)\n {\n return false;\n }\n \n boolean tripFound = false, pairFound = false;\n int firstRank = 0;\n \n //Check for triplet cards.\n for (int x = 0 ; x < c.size()-2 && tripFound == false ; x++)\n {\n Card card1 = c.get(x);\n Card card2 = c.get(x+1);\n Card card3 = c.get(x+2);\n if(card1.getRank() == card2.getRank() && card1.getRank() == card3.getRank())\n {\n tripFound = true;\n firstRank = card1.getRank();\n break;\n }\n }\n if(tripFound == false)\n {\n return false;\n }\n \n for (int x = 0 ; x < c.size()-1 ; x++)\n {\n Card card1 = c.get(x);\n Card card2 = c.get(x+1);\n \n //We found a pair after finding triplets. Mission success. Full House identified.\n if(card1.getRank() != firstRank && card1.getRank() == card2.getRank())\n {\n return true;\n }\n }\n \n return false;\n }", "public String showAllPersons() {\n String string = \"\";\n for(Person person: getPersons().values()){\n string += person.toString();\n }\n return string;\n }" ]
[ "0.69008744", "0.6602754", "0.63777703", "0.60573405", "0.5820766", "0.5450638", "0.5444902", "0.5436119", "0.541282", "0.53993785", "0.53461313", "0.53412944", "0.5321595", "0.5305656", "0.52945566", "0.528583", "0.5264325", "0.52500224", "0.52461755", "0.5241383", "0.5202972", "0.51911306", "0.5174222", "0.51344407", "0.51136726", "0.50854486", "0.5076209", "0.50745934", "0.5074562", "0.5067137", "0.5047337", "0.50428635", "0.5027789", "0.5010667", "0.49885368", "0.49782982", "0.49766836", "0.4973985", "0.49709237", "0.4962101", "0.49500638", "0.49457246", "0.49413657", "0.49400657", "0.4933283", "0.4903364", "0.48970294", "0.48935935", "0.48924467", "0.48636", "0.4862132", "0.48579288", "0.48544943", "0.48520306", "0.48471394", "0.48387477", "0.4837602", "0.48326945", "0.48301437", "0.48295915", "0.48287323", "0.48254615", "0.48228523", "0.48221296", "0.48212194", "0.48154873", "0.4804008", "0.48026443", "0.47994152", "0.47928", "0.47808412", "0.47797954", "0.47752482", "0.47739813", "0.4773362", "0.47723404", "0.47702357", "0.47690994", "0.47582656", "0.47498822", "0.4749869", "0.47476727", "0.4746983", "0.4737268", "0.47365814", "0.4734713", "0.47322473", "0.47310415", "0.4723109", "0.47215438", "0.47150466", "0.47062474", "0.47047532", "0.4704427", "0.47040763", "0.4699216", "0.4697996", "0.4696753", "0.4696462", "0.46937016" ]
0.75369996
0
Show All Room Not Duplicate method
public static void showAllRoomNotDuplicate(){ showAllNameNotDuplicate(FuncGeneric.EntityType.ROOM); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}", "public static void showAllHouseNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.HOUSE);\n }", "public void getAllSingleRoom() {\n\t\t for(SuiteRoom elem: suiteroom)\n\t {\n\t \t System.out.println (\"capacité : \" +elem.getCapacity());\n\t \t System.out.println (\"prix : \" +elem.getPrice());\n\t \t System.out.println (\"numéro : \" +elem.getIdRoom());\n\t \t System.out.println (\"nom : \" +elem.getName());\n\t \tSystem.out.println (\"-------------------\");\n\t \t \n\t }\n\t}", "public List<Room> findAllRooms();", "@RequestMapping(value = \"/room\", method = RequestMethod.GET)\n public ModelAndView listRoom() {\n List<Group> groups = userBean.getAllGroups();\n for (int i = 0; i < groups.size(); i++) {\n userBean.getGroupByStreamId(groups.get(1));\n }\n ModelAndView view = new ModelAndView(\"room\");\n // view.addObject(\"list\", room);\n // view.addObject(\"note\", rooms);\n //view.addObject(\"st\", streamGroups);\n return view;\n }", "public void displayroomsinfo(boolean reserved , int roomtype){\n String query = \" SELECT Roomno , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Reserved = ? and RoomtypeID = ? \"; \n String status , Roomtype ;\n Room room ;\n if(reserved == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n if(roomtype == 1){\n Roomtype = \"Single Room\" ;\n room = new singleRoom();\n }\n else{\n Roomtype = \"Double Room\";\n room = new doubleRoom();\n }\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setBoolean(1 ,reserved);\n Query.setInt(2,roomtype);\n ResultSet rs = Query.executeQuery();\n \n List<String> lst = new ArrayList<>() ;\n while(rs.next()){ \n \n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\") +\"\\n\"; \n lst.add(str);\n }\n room.setinfo(lst);\n \n \n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "@GET\n @Produces(\"application/json\")\n public static List<CRoom> roomAll() {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(CRoom.FIND_ROOM_BY_ALL);\n }", "@Override\n public List<Room> findAll() {\n return roomRepository.findAll();\n }", "List<ExamRoom> selectAll();", "private void displayListOfRooms() {\n DatabaseReference roomsRef = FirebaseDatabase.getInstance().getReference(\"Rooms\");\n\n roomsRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // update rooms every time there's a change\n updateRooms(dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "public List<Room> selectAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\treturn session.createCriteria(Room.class).list();\n\n\t}", "public void populateRooms(){\n }", "@Override\n\tpublic List<Room> getAll() {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "@Override\r\n\tpublic List<Room> listAll() throws SQLException {\n\t\treturn null;\r\n\t}", "public static void showAllVillaNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.VILLA);\n }", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i < items.size() - 1) {\n itemList = itemList + \", \";\n }\n }\n System.out.println(itemList);\n int currentNPCsInRoom = 0;\n\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(\"There seems to be someone resting in the leaves\");\n currentNPCsInRoom++;\n }\n\n if (mysteriousCrab.getCurrentRoom() == currentRoom) {\n System.out.println(\"You sense somebody in the cave\");\n currentNPCsInRoom++;\n }\n\n if (josephSchnitzel.getCurrentRoom() == currentRoom) {\n System.out.println(\"There is an intense smell, somebody seems to be near!\");\n currentNPCsInRoom++;\n }\n if (currentNPCsInRoom == 0) {\n System.out.println(\"You are alone in the room\");\n }\n }", "void showCreatorWaitingRoom();", "private List<String> retrieveObjectsInRoom(Room room) {\n List<String> retirevedInRoom = new ArrayList<>();\n for (String object : room.getObjects()) {\n if (wantedObjects.contains(object)) {\n retirevedInRoom.add(object);\n }\n }\n return retirevedInRoom;\n }", "public void displayAllRooms(){\n for(int i=0;i<roomCounter;i++){\n myHotel[i].Display();\n System.out.println();\n }\n }", "public void getCardsShown(List<Room> roomList) {\n\n //Removes cards that are now in the view\n cardHolder.getChildren().clear();\n\n for (Room r : roomList) {\n HBox roomCard = roomCards.get(r.getRoomId().get());\n cardHolder.getChildren().add(roomCard);\n }\n\n\n }", "@GetMapping(path = \"/rooms\")\n public List<Room> findAllRooms() {\n return new ArrayList<>(roomService.findAllRooms());\n }", "private static void printRoom(Room currentRoom) {\n\t\t\n\t}", "public void displayaroominfo(int roomno ){\n String query = \" SELECT Roomno, Reserved , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Roomno = ? \"; \n String status , Roomtype ;\n \n \n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setInt(1 ,roomno);\n ResultSet rs = Query.executeQuery();\n Room room;\n while(rs.next()){\n if(rs.getInt(\"RoomtypeID\") == 1){Roomtype = \"Single Room\" ;}\n else{Roomtype = \"Double Room\";}\n if(rs.getBoolean(\"Reserved\") == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\");\n if(rs.getInt(\"RoomtypeID\") == 1){\n room = new singleRoom();\n }else{\n room = new doubleRoom();\n }\n room.setroominfo(str);\n \n }\n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }", "public void showHouses() {\n System.out.println(\"-----Houses List-----\");\n System.out.println(\"No\\tOwner\\tPhone\\t\\tAddress\\t\\t\\t\\tRent\\tState\");\n houseService.listHouse();\n System.out.println(\"------List Done------\");\n }", "protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }", "public void chat_list() {\n\n synchronized(chat_room) {\n Set chat_room_set = chat_room.keySet();\n Iterator iter = chat_room_set.iterator();\n\n clearScreen(client_PW);\n client_PW.println(\"------------Chat Room List-----------\");\n while(iter.hasNext()) {\n client_PW.println(iter.next());\n }\n client_PW.flush();\n }\n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public void generateRooms(){ //TODO it's public just for testing\n rooms = new ArrayList<>();\n for(Color color : roomsToBuild)\n rooms.add(new Room(color));\n }", "public void displayRoomByStatus(RoomStatus status) {\n\t\tSystem.out.println(status.toString().toUpperCase() + \" ROOMS\\n\");\n\t\trooms.forEach((key,value) -> {\n\t\t\tif(value.status == status) {\n\t\t\t\tSystem.out.println(value.getDetails());\n\t\t\t}\n\t\t});\n\t}", "public void viewReservationList(RoomList roomList) {\n\t\tSystem.out.println(\"\");\t\t\t\t\t\t\t\t\t\t\n\t\tSystem.out.println(\"\\t\\tRESERVATION LIST\t\t\t\t \");\n\t\tSystem.out.println(\"**********************************************\\n\");\n\t\tfor(Room r: roomList.getList()){\t\t\t\t\t\t\t//search for all the rooms in the room list\n\t\t\tif(!r.isEmpty(r)) {\t\t\t\t\t\t\t\t\t\t//if a room is not empty(it has at least one guest)\n\t\t\t\tr.reservationList(r);\t\t\t\t\t\t\t\t//gets all the guests in non empty rooms\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n**********************************************\\n\");\n\t}", "public List<Room> getAllRooms(){\n\n List<Room> rooms = null;\n\n EntityManager entityManager = getEntityManagerFactory().createEntityManager();\n entityManager.getTransaction().begin();\n\n try{\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Room> roomCriteriaQuery = criteriaBuilder.createQuery(Room.class);\n Root<Room> roomsRoot = roomCriteriaQuery.from(Room.class);\n\n roomCriteriaQuery.select(roomsRoot);\n\n rooms = entityManager.createQuery(roomCriteriaQuery).getResultList();\n }\n catch (Exception ex){\n entityManager.getTransaction().rollback();\n }\n finally {\n entityManager.close();\n }\n\n return rooms;\n }", "public void show_NotOverlappingSessions(){\n \n ArrayList<notOverlapping> list= getNotOverlappingSessionList();\n DefaultTableModel model=(DefaultTableModel)notoverlappingsessions.getModel();\n Object[] row=new Object[3];\n \n for(int i=0; i<list.size(); i++){\n row[0]=list.get(i).getoId();\n row[1]=list.get(i).getSessionId();\n row[2]=list.get(i).getSubject();\n\n model.addRow(row);\n }\n \n }", "private static void printRoom(Player p,ArrayList<Item> a, ItemManager im, RoomManager rm) {\n\t\tSystem.out.println(p.getCurrentRoom().getName());\n\t\tSystem.out.println(p.getCurrentRoom().getShortDesc());\n\t\tSystem.out.println(p.getCurrentRoom().getLongDesc());\n\t\tconditionalActions(p,a,im,rm);\n\t\t\t\n\t}", "private static void viewRooms() \n {\n String option, roomCode;\n\n displayMyRooms(\" \");\n\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n \n while (!option.equals(\"q\"))\n {\n if (option.equals(\"v\") || option.equals(\"r\"))\n {\n System.out.print(\"Enter a room code: \");\n roomCode = \" '\" + input.next().toUpperCase() + \"'\";\n\n if(option.equals(\"v\"))\n displayDetailedRooms(roomCode);\n else\n displayDetailedReservations(\"WHERE ro.RoomId = \" + roomCode);\n }\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n }\n \n }", "RoomInfo room(int id);", "@Override\n public int getCount() {\n Log.d(TAG, \"getCount: size\" +fromName.size());\n return rooms.size();\n }", "private void printRoomInfo(Room room, List<String> retirevedInRoom, StringBuilder sb) {\n sb.append(room.getId());\n insertSpacing(sb, room.getId().toString());\n sb.append(room.getName());\n insertSpacing(sb, room.getName());\n if (CollectionUtils.isNotEmpty(retirevedInRoom)) {\n for (String obj : retirevedInRoom) {\n sb.append(obj);\n sb.append(\" \");\n }\n } else {\n sb.append(\"None\");\n }\n sb.append(NEWLINE);\n }", "@Transactional\r\n\tpublic List<Room> getAllRooms(){\r\n\t\tList<Room> list= new ArrayList<Room>();\r\n\t\tIterable<Room> iterable= this.roomRepository.findAll();\r\n\t\tfor(Room room: iterable)\tlist.add(room);\r\n\t\treturn list;\r\n\t}", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "public EventRoom getNewRoom(){\r\n newRoom.setRoomItems(eventRoomItems);\r\n return newRoom;\r\n }", "RoomInfo room(String name);", "private void getAllIds() {\n try {\n ArrayList<String> NicNumber = GuestController.getAllIdNumbers();\n for (String nic : NicNumber) {\n combo_nic.addItem(nic);\n\n }\n } catch (Exception ex) {\n Logger.getLogger(ModifyRoomReservation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void showAllHouse(){\n ArrayList<House> houseList = getListFromCSV(FuncGeneric.EntityType.HOUSE);\n displayList(houseList);\n showServices();\n }", "public static void displayRoom(Room currentRoom) {\n for(int i = 0; i < 10; i++) {\n for(int j = 0; j< 10; j++) {\n if(currentRoom.roomArray[i][j] instanceof Player) {\n System.out.print(\"|\" + \"p\");\n } else if(currentRoom.roomArray[i][j] instanceof Item) {\n System.out.print(\"|\" + \"i\");\n }\n else if(currentRoom.roomArray[i][j] instanceof Student) {\n System.out.print(\"|\" + \"s\");\n }\n else {\n System.out.print(\"| \"); \n }\n }\n System.out.println(\"\");\n }\n \n }", "@Query(\"from Room where occupied = :occ and hotel_id = :hotelId\")\n\tList<Room> findOccupied(@Param(\"occ\") boolean occupied, @Param(\"hotelId\") long id);", "public String toString()\n {\n String filler = new String(\"\\\"RoomId\\\", \\\"Name\\\", \\\"Surname\\\", \\\"Situation\\\"\");\n for(Room temp : data_set)\n {\n filler += \"\\n\" + temp.toString();\n }\n return filler;\n }", "public void mem_list() {\n synchronized(chat_room) {\n Set id_set = cur_chat_room.keySet();\n Iterator iter = id_set.iterator();\n clearScreen(client_PW);\n client_PW.println(\"------------online member-----------\");\n while(iter.hasNext()) {\n String mem_id = (String)iter.next();\n if(mem_id != client_ID) {\n client_PW.println(mem_id);\n }\n }\n client_PW.flush();\n }\n }", "public void displayAllGuests(RoomList roomList) {\n\t\tSystem.out.println(\"Display All Current Guests By.....\\n\\t1. Lecturer\\n\\t Or\\n\\t2. Student\");\n\t\tint type = keyboard.nextInt();\n\t\tif(type == 1) {\t\t\t\t\t\t\t\t\t\t\t\t//if Lecturer print the start of the this screen\n\t\t\tSystem.out.println(\"\\n ALL LECTURERS CHECKED IN TO THE HOTEL\\n*******************************************\");\n\t\t}\n\t\telse if(type == 2) {\t\t\t\t\t\t\t\t\t\t//if student print the start of this screen\n\t\t\tSystem.out.println(\"\\n ALL STUDENTS CHECKED IN TO THE HOTEL\\n*******************************************\");\n\t\t}\n\n\t\tfor(Room r: roomList.getList()){\t\t\t\t\t\t\t//scan through all the rooms in the roomList\n\t\t\tif(!r.isEmpty(r)) {\t\t\t\t\t\t\t\t\t\t//if room has guest\n\t\t\t\tif(type == 1) {\t\t\t\t\t\t\t\t\t\t//if user picked guest type lecturer\n\t\t\t\t\tr.getNamesOfLecturers(r);\t\t\t\t\t\t//get all the lecturer names\n\t\t\t\t}\n\t\t\t\telse if(type == 2)\t\t\t\t\t\t\t\t\t//if user picked guest type student\n\t\t\t\t\tr.getNamesOfStudents(r);\t\t\t\t\t\t//get all the student names\n\t\t\t}\n\t\t\t//in here room is empty. not needed\n\t\t}\n\t}", "Collection<Room> getRooms() throws DataAccessException;", "public void onGetRoom(GlobalMessage message) {\n JPanel newRoomPanel = new JPanel();\n NewRoomInfo newRoomInfo = (NewRoomInfo)message.getData();\n renderRoom(newRoomInfo.getRoomName(), newRoomPanel);\n roomContainer.add(newRoomPanel, roomListConstraints);\n ++roomListConstraints.gridy;\n roomEntries.put(newRoomInfo.getRoomName(), newRoomPanel);\n\n roomContainer.revalidate();\n roomContainer.repaint();\n }", "public ResultSet getAllRooms() {\r\n\r\n try {\r\n\r\n SQL = \"SELECT * FROM ROOMS;\";\r\n rs = stmt.executeQuery(SQL);\r\n return rs;\r\n\r\n } catch (SQLException err) {\r\n\r\n System.out.println(err.getMessage());\r\n return null;\r\n\r\n }\r\n\r\n }", "@Override\r\n\tpublic ArrayList<Board1> getAll() {\n\t\treturn dao.selectAll();\r\n\t}", "@CrossOrigin \n\t@GetMapping(\"/all/{building}\")\n\tpublic List<Room> getRooms(@PathVariable String building) {\n\t\tList<Room> returned = new ArrayList<>();\t\t\n\t\tfor (Room room : roomDB)\n\t\t\tif (room.getBuilding().equals(building))\n\t\t\t\treturned.add(room);\n\t\treturn returned;\n\t}", "@SuppressWarnings(\"deprecation\")\n public final void getRoomIdAndNames() {\n List<String> custom_names = getCustomRoomNames();\n TARDISARS[] ars = TARDISARS.values();\n // less non-room types\n int l = (custom_names.size() + ars.length) - 3;\n this.room_ids = new ArrayList<Integer>();\n this.room_names = new ArrayList<String>();\n for (TARDISARS a : ars) {\n if (a.getOffset() != 0) {\n this.room_ids.add(a.getId());\n this.room_names.add(a.getDescriptiveName());\n }\n }\n for (final String c : custom_names) {\n this.room_ids.add(Material.valueOf(plugin.getRoomsConfig().getString(\"rooms.\" + c + \".seed\")).getId());\n final String uc = ucfirst(c);\n this.room_names.add(uc);\n TARDISARS.addNewARS(new ARS() {\n @Override\n public int getId() {\n return Material.valueOf(plugin.getRoomsConfig().getString(\"rooms.\" + c + \".seed\")).getId();\n }\n\n @Override\n public String getActualName() {\n return c;\n }\n\n @Override\n public String getDescriptiveName() {\n return uc;\n }\n\n @Override\n public int getOffset() {\n return 1;\n }\n });\n }\n }", "public ArrayList findAllRoomsWSummary(){\n List <Room> allRooms= roomRepository.findAll();\n System.out.println(\"All rooms is:\");\n System.out.println(allRooms.toString());\n//Set an array list that contains all the data to return to the client\n ArrayList<RoomSummaryMap> dataToReturnToClient = new ArrayList<>();\n\n for (Room room : allRooms) {\n// If there is no associated msg, assign an empty array to the lastMsg.\n if(room.getAssociated_messages().size()<1){\n System.out.println(\"size is less than 1\");\n RoomSummaryMap mapObject= new RoomSummaryMap(room.getId(),room.getName(),\n room.getImage(),\n room.getCreatedBy(),\n room.getAssociated_messages(), \"\");\n System.out.println(\"map object is:\");\n System.out.println(mapObject);\n\n dataToReturnToClient.add(mapObject);\n\n continue;\n }\n System.out.println(\"Size is more than 1\");\n// Else, add the last msg\n String lasMsgObjId=\n room.getAssociated_messages().get(room.getAssociated_messages().size()-1).toString();\n//Query the db for this message\n Message messageInstance= messageService.findbyId(lasMsgObjId);\n dataToReturnToClient.add(new RoomSummaryMap(room.getId(),room.getName(),\n room.getImage(),\n room.getCreatedBy(),\n room.getAssociated_messages(), messageInstance.getMessage()));\n }\n\n System.out.println(\"data to return to client inside room service\");\n System.out.println(dataToReturnToClient);\n return dataToReturnToClient;\n }", "private void setRooms() {\r\n\t\tAccountBean bean = new AccountBean();\r\n\t\tbean.setCf(Session.getSession().getCurrUser().getAccount().getCf());\r\n\t\tRoomController ctrl = RoomController.getInstance();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tthis.myRooms=FXCollections.observableArrayList(ctrl.getMyRooms(bean));\r\n\t\t}\r\n\t\tcatch (DatabaseException ex1) {\r\n\t\t\tJOptionPane.showMessageDialog(null,ex1.getMessage(),ERROR, JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public ArrayList<Room> createMaze() {\n createRooms();\n createAccess(rooms);\n\n return rooms;\n }", "Room getRoom();", "Room getRoom();", "public ModifyRoomReservation() {\n initComponents();\n\n btn_search.requestFocus();\n\n getAllIds();\n\n }", "public List<Suspect> getNPCs(Room room) {\n List<Suspect> npcsInRoom = new ArrayList<Suspect>();\n\n for (Suspect s : game.gameSnapshot.getSuspects()) {\n if (s.getRoom().getID() == room.getID()) {\n npcsInRoom.add(s);\n }\n }\n\n return npcsInRoom;\n }", "@GetMapping(\"/chat-rooms\")\n public List<ChatRoom> getAllChatRooms() {\n log.debug(\"REST request to get all ChatRooms\");\n return chatRoomRepository.findAll();\n }", "public List<Room> getRooms() {\n return rooms;\n }", "@GetMapping\n public RoomsDto getRooms() {\n return roomsFacade.findRooms();\n }", "public void dispRoomNum(){\n System.out.print(\"Available Rooms: \");\n for(int i=0;i<SearhRoomCounter;i++){\n System.out.print(roomNumResult[i]+\", \");\n }\n System.out.println();\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"HotelSearchRoomDetail [id=\" + id + \", search_key=\" + search_key + \", api_provider=\" + api_provider\n\t\t\t\t+ \", hotelsearch_cmd=\" + Arrays.toString(hotelsearch_cmd) + \", roomstay=\" + Arrays.toString(roomstay)\n\t\t\t\t+ \"]\";\n\t}", "void showAll();", "public ArrayList getRooms();", "protected static String listRooms(ArrayList<Room> roomList) {\n System.out.println(\"Room Name - Capacity-Building-Location\");\n System.out.println(\"---------------------\");\n\n for (Room room : roomList) {\n System.out.println(room.getName() + \" - \" + room.getCapacity()\n + \" - \" + room.getBuilding() + \" - \" + room.getLocation());\n }\n\n logger.info(\"---------------------\");\n\n return roomList.size() + \" Room(s)\";\n }", "protected void showReservations() {\n storageDao.findAllRented()\n .forEach(System.out::println);\n }", "public Room() {\n this.isTable = false;\n this.hasStage = false;\n this.hasTech = false;\n }", "List<Room> selectRoomList(@Param(\"building\") String building);", "@Override\n public List<Room> findAllRooms() throws AppException {\n log.info(\"RoomDAO#findAllRooms(-)\");\n Connection con = null;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n rooms = new ArrayList<>(findAllRooms(con));\n con.commit();\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem at findAllRooms(no param)\", e);\n throw new AppException(\"Can not find all rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }", "public List<Room> getRooms(){\n ArrayList<Room> returnedList = (ArrayList<Room>) rooms;\n return (ArrayList<Room>) returnedList.clone();\n }", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "public void seeReservation(RoomList roomList){\n\t\tSystem.out.println(\"What is the name of the guest you wish to check a reservation for ?\");\n\t\tkeyboard.nextLine();\n\t\tString name = keyboard.nextLine();\n\t\tRoom room = null;\n\t\t\n\t\tfor(Room r: roomList.getList()){\n\t\t\tif(!r.isEmpty(r)) {\n\t\t\troom = r.findRoomByName(r, name);\n\t\t\troom.getGuestNames(room);\n\t\t\t}\n\t\t}\n\t}", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "private void createAccess(ArrayList<Room> rooms) {\n\n rooms.get(0).setNorth(rooms.get(1));\n\n rooms.get(1).setEast(rooms.get(2));\n rooms.get(1).setWest(rooms.get(4));\n rooms.get(1).setSouth(rooms.get(0));\n\n rooms.get(2).setWest(rooms.get(1));\n rooms.get(2).setNorth(rooms.get(10));\n rooms.get(2).setEast(rooms.get(3));\n\n rooms.get(3).setWest(rooms.get(2));\n\n rooms.get(4).setWest(rooms.get(5));\n rooms.get(4).setNorth(rooms.get(8));\n rooms.get(4).setEast(rooms.get(1));\n\n rooms.get(5).setNorth(rooms.get(7));\n rooms.get(5).setSouth(rooms.get(6));\n rooms.get(5).setEast(rooms.get(4));\n\n rooms.get(6).setNorth(rooms.get(5));\n\n rooms.get(7).setNorth(rooms.get(13));\n rooms.get(7).setSouth(rooms.get(5));\n\n rooms.get(8).setEast(rooms.get(9));\n rooms.get(8).setSouth(rooms.get(4));\n\n rooms.get(9).setWest(rooms.get(8));\n rooms.get(9).setNorth(rooms.get(15));\n rooms.get(9).setEast(rooms.get(10));\n\n rooms.get(10).setWest(rooms.get(9));\n rooms.get(10).setEast(rooms.get(11));\n rooms.get(10).setSouth(rooms.get(2));\n\n rooms.get(11).setWest(rooms.get(10));\n\n rooms.get(12).setEast(rooms.get(13));\n\n rooms.get(13).setWest(rooms.get(12));\n rooms.get(13).setEast(rooms.get(14));\n rooms.get(13).setSouth(rooms.get(7));\n\n rooms.get(14).setWest(rooms.get(13));\n rooms.get(14).setNorth(rooms.get(18));\n rooms.get(14).setEast(rooms.get(15));\n\n rooms.get(15).setWest(rooms.get(14));\n rooms.get(15).setNorth(rooms.get(19));\n rooms.get(15).setEast(rooms.get(16));\n rooms.get(15).setSouth(rooms.get(9));\n\n rooms.get(16).setWest(rooms.get(15));\n rooms.get(16).setEast(rooms.get(17));\n\n rooms.get(17).setWest(rooms.get(16));\n\n rooms.get(18).setSouth(rooms.get(14));\n\n rooms.get(19).setSouth(rooms.get(13));\n\n }", "List<Room> selectRoomListWithScreenCondition(@Param(\"building\") String building, @Param(\"capacity\") Integer capacity,\n\t\t\t@Param(\"hasMultiMedia\") Integer hasMultiMedia);", "private void setAvailableGames() {\n try {\n listView.getItems().clear();\n DataOutputStream dataOutputStream = new DataOutputStream(socket.getOutputStream());\n dataOutputStream.writeUTF(\"GLst\");\n ObjectInputStream objectInputStream = new ObjectInputStream(socket.getInputStream());\n HashMap<String, String> list = (HashMap<String, String>) objectInputStream.readObject();\n for (String roomCode : list.keySet()) {\n HBox hboxList = new HBox();\n hboxList.setSpacing(8);\n Button buttonJoin = new Button(\"Join\");\n buttonJoin.setOnAction(event -> joinGameRoom(roomCode));\n Separator separator = new Separator();\n separator.setOrientation(Orientation.VERTICAL);\n Label roomName = new Label(list.get(roomCode));\n roomName.setFont(Font.font(\"Arial\", 20));\n hboxList.getChildren().add(buttonJoin);\n hboxList.getChildren().add(separator);\n hboxList.getChildren().add(roomName);\n listView.getItems().add(hboxList);\n }\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n sendToServer(\"listRoom\");\n String cm = currentMessage;\n // Data yang diterima dari server\n currentMessage = receiveFromServer();\n System.out.println(\"Sudah kekirim pesan ini: \" + currentMessage);\n if (cm.equals(currentMessage)){\n //do nothing\n }else{\n String[] srvSentence = currentMessage.split(\" \");\n String roomlist = \"\";\n\n if (srvSentence.length != 1){\n int j = Integer.parseInt(srvSentence[1]);\n System.out.println(roomlist);\n RoomNameList = new ArrayList<String>();\n RoomMemberList = new ArrayList<Integer>();\n RoomCapacityList = new ArrayList<Integer>();\n RoomIDList = new ArrayList<Integer>();\n for(int k = 0; k < j; k++){\n String _roomname = srvSentence[k*4 + 2];\n String _roommember = srvSentence[k*4 + 3];\n String _roomcapacity = srvSentence[k*4 + 4];\n String _roomID = srvSentence[k*4 + 5];\n RoomNameList.add(_roomname);\n RoomMemberList.add(Integer.parseInt(_roommember));\n RoomCapacityList.add(Integer.parseInt(_roomcapacity));\n RoomIDList.add(Integer.parseInt(_roomID));\n }\n InsideChooseRoomPane.removeAll();\n InsideChooseRoomPane.setLayout(new BoxLayout(InsideChooseRoomPane, BoxLayout.X_AXIS));\n InsideChooseRoomPane.setBackground(new Color(153,204,255));\n ChooseRoomPane.setViewportView(InsideChooseRoomPane);\n for (int i = 0; i < RoomNameList.size(); i++){\n JPanel panelRoom = new JPanel();\n final String crn = RoomNameList.get(i);\n final int crnid = RoomIDList.get(i);\n panelRoom.setLayout(new BoxLayout(panelRoom, BoxLayout.Y_AXIS));\n panelRoom.setBackground(new Color(153,204,255));\n JLabel doorRoom = new JLabel(crn+\"door\");\n doorRoom.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/clientgomoku/door.png\")));\n doorRoom.setText(\"\");\n doorRoom.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n Roomname = crn;\n RoomID = crnid;\n doorRoomMousePressed(evt);\n }\n });\n JLabel namaRoom = new JLabel(\"\\n \"+RoomNameList.get(i)+\" (\"+RoomMemberList.get(i)+\"/\"+RoomCapacityList.get(i)+\")\");\n panelRoom.add(doorRoom);\n panelRoom.add(namaRoom);\n InsideChooseRoomPane.add(panelRoom);\n ChooseRoomPane.repaint();\n ChooseRoomPane.revalidate();\n }\n }\n }\n }", "public ViewRoom(Room r) {\n initComponents();\n this.room = r;\n this.workoutNum = 0;\n updateRoom();\n \n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\n\t}", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public List<Room> unOccupiedRooms() {\n List<Room> rooms = new ArrayList<>();\n for (int i = 0; i < numOfRooms; i++) {\n if (!internalList.get(i).isOccupied()) {\n rooms.add(internalList.get(i));\n }\n }\n return rooms;\n }", "public Set<Room> getRooms() {\n return rooms;\n }", "@Override\n public List<UserRoom> getUserRoomList() {\n logger.info(\"Start getUserRoomList\");\n List<UserRoom> userRoomList = new ArrayList<>();\n try {\n connection = DBManager.getConnection();\n preparedStatement = connection.prepareStatement(Requests.SELECT_FROM_USER_ROOM);\n rs = preparedStatement.executeQuery();\n while (rs.next()) {\n userRoomList.add(myResultSet(rs));\n }\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n } finally {\n closing(connection, preparedStatement, rs);\n }\n logger.info(\"Completed getUserRoomList\");\n return userRoomList;\n }", "@Override\n\tpublic List<PropertyRooms> findRoomByTenancyDetailsIncludingVacantRooms(\n\t\t\tTenancyForm occupiedBy) {\n\t\tList<PropertyRooms> rooms1=hibernateTemplate.find(\"from PropertyRooms where occupiedBy=? \",occupiedBy);\n\t\tList<PropertyRooms> rooms2=hibernateTemplate.find(\"from PropertyRooms where isOccupied=?\",'N');\n\t\t\n\t\trooms1.addAll(rooms2);\n\t\t\n\t\treturn rooms1;\n\t}", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}", "public Rooms getRooms(int i) {\n\t\t\tRooms buff = RoomDetails.get(i);\r\n\t\t\treturn buff;\r\n\t\t}", "private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }", "@GetMapping(\"/listRoom\")\r\n\tpublic String listRooms(Model theModel) {\n\t\tList<Room> theRooms = roomService.findAll();\r\n\t\t\r\n\t\t// add to the spring model\r\n\t\ttheModel.addAttribute(\"rooms\", theRooms);\r\n\t\t\r\n\t\treturn \"/rooms/list-rooms\";\r\n\t}", "public int getNumOfRoom() {\n\t\t\treturn RoomDetails.size();\r\n\t\t}", "public ArrayList<RoomList> getRoomList() {\r\n return RoomList;\r\n }", "public List<Room> getByRoomType(String roomType){\r\n\t\tif(userService.adminLogIn||userService.loggedIn) {\r\n\t\t\tList<Optional<Room>> room=new ArrayList<>();\r\n\t\t\troom=roomRepository.findByRoomType(roomType);\r\n\t\t\tif (room.size()==0) {\r\n\t\t\t\tthrow new RoomTypeNotFoundException(\"Room type not available\");\r\n\t\t\t} else {\r\n\t\t\t\tList<Room> newRoom=new ArrayList<Room>();\r\n\t\t\t\tfor(Optional r:room) {\r\n\t\t\t\t\tnewRoom.add((Room) r.get());\r\n\t\t\t\t}\r\n\t\t\t\treturn newRoom;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\t\t\r\n\t}" ]
[ "0.7388193", "0.70308477", "0.6649789", "0.64055854", "0.63976216", "0.6180494", "0.6165093", "0.61597127", "0.61527973", "0.61461467", "0.61157435", "0.6098476", "0.5974941", "0.5960162", "0.5955821", "0.59348303", "0.5926841", "0.59049577", "0.5903988", "0.58807594", "0.58373356", "0.58129245", "0.5800199", "0.57983774", "0.57760304", "0.5759226", "0.57554126", "0.5749181", "0.57390505", "0.5731891", "0.5712394", "0.57021236", "0.56991476", "0.5678635", "0.5669782", "0.56610614", "0.5657972", "0.56542027", "0.5635582", "0.56203943", "0.5601301", "0.55991805", "0.559515", "0.5560037", "0.55574083", "0.55563855", "0.5542389", "0.55368453", "0.5535778", "0.55345875", "0.5522313", "0.5520683", "0.5513915", "0.5513318", "0.5511855", "0.5510528", "0.55099136", "0.548875", "0.5486984", "0.5486877", "0.5484404", "0.5484404", "0.5483318", "0.5480809", "0.54614425", "0.54495543", "0.54479825", "0.54426914", "0.5440012", "0.5434231", "0.5432389", "0.5429366", "0.54274184", "0.5399401", "0.53947777", "0.5393142", "0.5385656", "0.53826475", "0.537842", "0.53680736", "0.5365877", "0.5364455", "0.5364026", "0.53534085", "0.53533065", "0.5347357", "0.5340045", "0.5329939", "0.53254616", "0.53199023", "0.5319817", "0.53185284", "0.53171605", "0.5314275", "0.5311003", "0.53047323", "0.5300436", "0.53003985", "0.52930695", "0.52804583" ]
0.85053754
0
Return Show Services Menu method
public static void returnShowServicesMenu(){ System.out.print("Please enter a number to continue:"); processShowServiesMenu(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Menu createServiceMenu() {\r\n\t\tMenu serviceMenu = new Menu(\"Service\");\r\n\r\n\t\tstartService = new MenuItem(\"Start\");\r\n\t\tstartService.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlocalPeer.startService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(startService);\r\n\r\n\t\tstopService = new MenuItem(\"Stop\");\r\n\t\tstopService.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlocalPeer.stopService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tstopService.setEnabled(false);\r\n\t\tserviceMenu.add(stopService);\r\n\r\n\t\treturn serviceMenu;\r\n\t}", "public Menu createToolsMenu();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_service_list, menu);\n\n return true;\n\n }", "public Menu createViewMenu();", "public void showMenu() {\n menuController.showMenuPanel();\n }", "public abstract void displayMenu();", "public MenuService() {\n\t\tnew DisplayMenu();\n\t}", "public String getActivationMenu();", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "void Menu();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.service_provider_home, menu);\n return true;\n }", "IMenu getMainMenu();", "@Override\n\t\t\t\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t\t\t\t}", "public Menu displayMenu() {\n return new CMDDisplayMenu(agg).execute();\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\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 }", "Menu getMenuHelp();", "public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.wbservices_example, menu);\n return true;\n }", "@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }", "@Override\n\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t}", "protected abstract void addMenuOptions();", "public boolean isOnMenu ();", "public interface DisplayMenu {\n\tpublic void DisplayMenu(); //Display Menu\n}", "String getMenuName();", "@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 }", "C getMenu();", "private Menu createSettingsMenu() {\r\n\t\tMenu serviceMenu = new Menu(\"Settings\");\r\n\r\n\t\tMenuItem networkSettings = new MenuItem(\"Service\");\r\n\t\tnetworkSettings.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tDaemon.editRunningService(localPeer);\r\n\t\t\t\tchangeDispatcher.stateChanged(new ChangeEvent(localPeer));\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(networkSettings);\r\n\r\n\t\tMenuItem securitySettings = new MenuItem(\"Backup\");\r\n\t\tsecuritySettings.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(securitySettings);\r\n\r\n\t\treturn serviceMenu;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.web_service_consumer, menu);\n return true;\n }", "public void menu(){\n super.goToMenuScreen();\n }", "protected void showSystemMenu() {\n windowMenu.doClick(0);\n }", "static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }", "IMenuFactory getMenuFactory();", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "public void initMenu(){\n\t}", "private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }", "public static void processShowServiesMenu(){\n switch (ScannerUtils.scanner.nextLine()){\n case SHOW_ALL_VILLA:\n showAllVilla();\n break;\n case SHOW_ALL_HOUSE:\n showAllHouse();\n break;\n case SHOW_ALL_ROOM:\n showAllRoom();\n break;\n case SHOW_ALL_VILLA_NOT_DUPLICATE:\n showAllVillaNotDuplicate();\n break;\n case SHOW_ALL_HOUSE_NOT_DUPLICATE:\n showAllHouseNotDuplicate();\n break;\n case SHOW_ALL_ROOM_NOT_DUPLICATE:\n showAllRoomNotDuplicate();\n break;\n case BACK_TO_MAIN_MENU_2:\n processMain();\n break;\n case EXIT_2:\n System.exit(0);\n break;\n default:\n System.out.println(\"Please select from 1 to 8\");\n returnShowServicesMenu();\n }\n }", "public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "@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 }", "String getMenus(MmtConfig cfg);", "List<ViewDefinition> listForMenu();", "IMenuView getMenuView();", "@Override\n public boolean onCreateOptionsMenu(android.view.Menu menu) {\n menu.add(1001, 100, 1, \"断开轮询服务\");\n menu.add(1002, 101, 2, \"开启轮询服务\");\n return super.onCreateOptionsMenu(menu);\n }", "private void showServices()\n {\n // Remove all of the items from the listField.\n _treeField.deleteAll();\n \n // Get a copy of the ServiceRouting class.\n ServiceRouting serviceRouting = ServiceRouting.getInstance();\n \n // Add in our new items by trolling through the ServiceBook API.\n ServiceBook sb = ServiceBook.getSB();\n ServiceRecord[] records = sb.getRecords();\n \n if( records == null ) \n {\n return;\n }\n \n int rootNode = _treeField.addChildNode( 0, \"Service Records\" );\n \n int numRecords = records.length;\n \n for( int i = 0; i < numRecords; i++ ) \n {\n String name = records[i].getName();\n String description = records[i].getDescription();\n \n if( description == null || description.length() == 0 ) \n {\n description = \"No description available\" ;\n }\n \n String uid = records[i].getUid();\n boolean serialBypass = serviceRouting.isSerialBypassActive( uid );\n\n int newParentNode = _treeField.addChildNode( rootNode, name );\n _treeField.addChildNode( newParentNode, description );\n _treeField.addChildNode( newParentNode, uid );\n _treeField.addChildNode( newParentNode, serialBypass ? \"Serial Bypass: Connected\" : \"Serial Bypass: Disconnected\");\n \n // Perform the check for the Desktop SerialRecord.\n if( name != null && name.equals( \"Desktop\" )) \n {\n _desktopUID = uid;\n }\n }\n \n _treeField.setCurrentNode( rootNode ); // Set the root as the starting point.\n }", "private void searchMenu(){\n\t\t\n\t}", "static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scout_status_page, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }", "private static void returnMenu() {\n\t\t\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_spi, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_list_clientes, menu);\n\n //para incorporar el search\n // Associate searchable configuration with the SearchView\n /* SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n SearchView searchView = (SearchView) menu.findItem(R.id.search).getActionView();// .getActionView();\n searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));\n searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default\n*/\n\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.service_order, menu);\n return true;\n }", "private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }", "@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}", "void clickAmFromMenu();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.details_cliente_menu, menu);\n return true;\n }", "private static void showMenu(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\tSystem.out.println(\"0) Show Shape information\");\r\n\t\tSystem.out.println(\"1) Create Shape\");\r\n\t\tSystem.out.println(\"2) Calculate perimeter\");\r\n\t\tSystem.out.println(\"3) Calculate area\");\r\n\t\tSystem.out.println(\"4) Scale shape\");\r\n\t}", "private static String getMenu() { // method name changes Get_menu to getMenu()\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"\\nLibrary Main Menu\\n\\n\")\r\n\t\t .append(\" M : add member\\n\")\r\n\t\t .append(\" LM : list members\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" B : add book\\n\")\r\n\t\t .append(\" LB : list books\\n\")\r\n\t\t .append(\" FB : fix books\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" L : take out a loan\\n\")\r\n\t\t .append(\" R : return a loan\\n\")\r\n\t\t .append(\" LL : list loans\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" P : pay fine\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" T : increment date\\n\")\r\n\t\t .append(\" Q : quit\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\"Choice : \");\r\n\t\t \r\n\t\treturn sb.toString();\r\n\t}", "private void callSubMenu() {\n new SubMenu().display();\n }", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "public SIPCommMenu getMenu()\n {\n return menu;\n }", "public interface IMenuService {\n\n List<Map<String,Object>> selectShowMenus(String rootId);\n\n ResultVO createMenu(MenuCreateVO createVO);\n\n ResultVO deleteMenu(String[] menuIds);\n\n ResultVO editMenu(MenuEditVO editVO);\n\n ResultVO grantPermissions(String menuId, String[] perIdArray);\n\n Pager<Map<String, Object>> getPageMenus(PagerReqVO pagerReqVO, TreeNode tree);\n\n\tResultVO getMenuTree();\n}", "private void displayMenu() {\n\t\tint option = MenuView.getMenuOption(\n\t\t\t\"Welcome \" + movieGoer.getName() + \"!\",\n\t\t\t\"View movie showtimes\",\n\t\t\t\"Book a ticket\",\n\t\t\t\"View movie details\",\n\t\t\t\"List top 5 movies\",\n\t\t\t\"View booking history\",\n\t\t\t\"Exit\"\n\t\t);\n\t\t\n\t\tswitch (option) {\n\t\t\tcase 1:\n\t\t\t\tNavigationController.load(new ShowTimeController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tNavigationController.load(new BookingController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tNavigationController.load(new MovieController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tNavigationController.load(new TopMoviesController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tNavigationController.load(new BookingHistoryController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tNavigationController.goBack();\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\tpublic boolean onMenuOpened(int featureId, Menu menu) {\n\t\tif (((BiosenseApplication) getApplication()).serviceIsRunning()) {\n\n\t\t\tmenu.findItem(R.id.itemToggleService).setTitle(\n\t\t\t\t\tR.string.titleItemStopService);\n\t\t\tmenu.findItem(R.id.itemToggleService).setIcon(\n\t\t\t\t\tandroid.R.drawable.ic_media_pause);\n\t\t} else {\n\n\t\t\tmenu.findItem(R.id.itemToggleService).setTitle(\n\t\t\t\t\tR.string.titleItemStartService);\n\n\t\t\tmenu.findItem(R.id.itemToggleService).setIcon(\n\t\t\t\t\tandroid.R.drawable.ic_media_play);\n\n\t\t}\n\n\t\treturn true;\n\t}", "private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.new_skate_spot, menu);\n \t\treturn true;\n \t}", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "public abstract Menu mo2158c();", "@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 }", "public boolean getShowMenu() {\n\t\treturn showMenu;\n\t}", "@Override\n public boolean onCreateOptionsMenu( Menu menu )\n {\n getMenuInflater().inflate( R.menu.from_server1, menu );\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.flower_class_show, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public void onMenuClick() {\n Toast.makeText(activity.getApplicationContext(), \"Menu click\",\n Toast.LENGTH_LONG).show();\n }", "public AdminMenu(JDealsController sysCtrl) {\n super(\"Select Menu\", sysCtrl);\n\n this.addItem(\"Admin Panel\", new Callable() {\n @Override\n public Boolean call() throws Exception {\n new AdminCommandList(getSysCtrl()).runMenu();\n return true;\n }\n });\n\n this.addItem(\"Default Menu\", new Callable() {\n @Override\n public Boolean call() throws Exception {\n new UserMenu(getSysCtrl()).runMenu();\n return true;\n }\n });\n }", "public abstract JSFunctionDefinition createShowMenuEventFunction();", "@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 }", "private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.server_detector, menu);\r\n return true;\r\n }", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_nova_hospedagem, menu);\n return true;\n }", "public void menu2Method() {\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_server, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.menu_find_cliente_activity, menu);\n \treturn true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_sales_point, menu);\n return true;\n }", "private void goToShop() {\n shopMenu.runMenu();\n }", "public static void activateMenu() {\n instance.getMenu().show();\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\n\t\t \n return true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n ActivityOptionsService activityOptionsService = new ActivityOptionsService();\n activityOptionsService.openActivity(this ,id);\n return super.onOptionsItemSelected(item);\n }", "void clickFmFromMenu();", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.solucao_sistemas, menu);\n\t\treturn true;\n\t}", "public abstract int getMenu();", "private void displayMenu()\r\n {\r\n System.out.println(\"\\nWelcome to Car Park System\");\r\n System.out.println(\"=============================\");\r\n System.out.println(\"(1)Add a Slot \");\r\n System.out.println(\"(2)Delete a Slot\");\r\n System.out.println(\"(3)List all Slots\");\r\n System.out.println(\"(4)Park a Car\");\r\n System.out.println(\"(5)Find a Car \");\r\n System.out.println(\"(6)Remove a Car\");\r\n System.out.println(\"(7)Exit \");\r\n System.out.println(\"\\nSelect an Option: \");\r\n }", "public int menu() {\n System.out.println(\"MENU PRINCIPAL\\n\"\n + \"1 - CADASTRO DE PRODUTOS\\n\"\n + \"2 - MOVIMENTAÇÃO\\n\"\n + \"3 - REAJUSTE DE PREÇOS\\n\"\n + \"4 - RELATÓRIOS\\n\"\n + \"0 - FINALIZAR\\n\");\n return getEscolhaMenu(); \n }", "public void readTheMenu();", "@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\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.system_info_main, menu);\n return true;\n }", "@Override\n public void onMenuClick() {\n Toast.makeText(SearchActivity_.this, \"Menu click\", Toast.LENGTH_LONG).show();\n }" ]
[ "0.7170376", "0.7080833", "0.70077866", "0.6978686", "0.69450796", "0.6940763", "0.6800058", "0.67221767", "0.6693721", "0.6690694", "0.6646612", "0.6620206", "0.6575025", "0.65661174", "0.65632766", "0.65607584", "0.65486306", "0.65156007", "0.64948255", "0.649433", "0.6482813", "0.6473091", "0.6457553", "0.64494216", "0.6440022", "0.6435518", "0.6434365", "0.64317423", "0.638974", "0.6383632", "0.6371374", "0.6332681", "0.6328307", "0.63275", "0.6324921", "0.6321535", "0.63167197", "0.6309746", "0.62963456", "0.6295664", "0.6278428", "0.6276699", "0.62719643", "0.62662673", "0.62648576", "0.6257278", "0.62564", "0.6234598", "0.62284136", "0.6227212", "0.6223725", "0.6221894", "0.622177", "0.6204413", "0.62036926", "0.61999184", "0.61983144", "0.61969376", "0.6194751", "0.61938125", "0.61908764", "0.6183101", "0.61830026", "0.61829066", "0.6169467", "0.6160156", "0.6147743", "0.61396843", "0.61383057", "0.61268693", "0.61221707", "0.6116569", "0.6116422", "0.6114548", "0.6112755", "0.61106235", "0.6110398", "0.610657", "0.61059743", "0.60931075", "0.6093085", "0.609291", "0.6090766", "0.6088192", "0.6082593", "0.60802513", "0.60745424", "0.6066392", "0.606036", "0.60581243", "0.60513943", "0.6045589", "0.60409707", "0.6035067", "0.60334474", "0.60333115", "0.6030694", "0.6016386", "0.6015259", "0.6013472" ]
0.6504553
18
Creates the server socket.
private ServerSocket createServerSocket() throws IOException { ServerSocket serverSocket = new ServerSocket(Constants.SERVER_PORT); System.out.printf("Server for chatting started at %d\n", Constants.SERVER_PORT); return serverSocket; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createServerSocket()\r\n {\r\n\t\tDebug.assert(port != 0, \"(Server/105)\");\r\n try {\r\n serverSocket = new ServerSocket(port);\r\n serverSocket.setSoTimeout(TIMEOUT);\r\n\t }\r\n\t catch (IOException e)\r\n\t \t{\r\n log(\"Could not create ServerSocket on port \" + port);\r\n\t \tDebug.printStackTrace(e);\r\n System.exit(-1);\r\n\t }\r\n }", "public Socket createSocket() {\n try {\n // Create socket\n server = new Socket(\"127.0.0.1\", 8520);\n } catch (IOException ioe) {\n System.out.println(\"IOException: \" + ioe.getMessage());\n }\n return server;\n }", "public static ServerSocket createServerSocket() {\n \t\n try {\n listener = new ServerSocket(PORT,1, InetAddress.getByName(hostname));\n } catch (IOException e) {\n e.printStackTrace();\n }\n return listener;\n }", "public int createSocket()\n\t{\n\t\t\n\t}", "private void initServerSocket()\n\t{\n\t\tboundPort = new InetSocketAddress(port);\n\t\ttry\n\t\t{\n\t\t\tserverSocket = new ServerSocket(port);\n\n\t\t\tif (serverSocket.isBound())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Server bound to data port \" + serverSocket.getLocalPort() + \" and is ready...\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unable to initiate socket.\");\n\t\t}\n\n\t}", "private ServerSocket setUpServer(){\n ServerSocket serverSocket = null;\n try{\n serverSocket = new ServerSocket(SERVER_PORT);\n\n }\n catch (IOException ioe){\n throw new RuntimeException(ioe.getMessage());\n }\n return serverSocket;\n }", "public ServerSocket createSocket (int port)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;", "public Server() throws IOException\n {\n socket = new ServerSocket(port);\n }", "public Server() throws IOException{\n\t\tsuper();\n\t\tthis.serversocket = new java.net.ServerSocket(DEFAULTPORT);\n\t\tif (DEBUG){\n\t\t\tSystem.out.println(\"Server socket created:\" + this.serversocket.getLocalPort());\n\t\t\tclient_list.add(String.valueOf(this.serversocket.getLocalPort()));\n\t\t}\n\t}", "public void creatSocket() {\n\n try {\n\n server = new ServerSocket(PORT);\n\n mExecutorService = Executors.newCachedThreadPool();\n\n while (true) {\n\n Socket client = server.accept();\n\n mExecutorService.execute(new SockectService(client));\n\n Log.d(TAG, \"Creating Socket\" );\n\n }\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }", "private static void createServerSocket() throws SocketTimeoutException, IOException, SocketTimeoutException {\r\n serverSocket.setSoTimeout(10000);\r\n socket = serverSocket.accept();\r\n System.out.println(\"Server: connection to: \" + socket.getInetAddress());\r\n }", "public Server() {\n\t\t\n\t\ttry {\n\t\t\tss= new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace(); // Default\n\t\t}\n\t}", "public void openServer() {\n try {\n this.serverSocket = new ServerSocket(this.portNumber);\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "public ServerSocket createServerSocket(int arg0) throws IOException {\n return null;\n }", "public OOXXServer(){\n\t\ttry\n\t\t{\n\t\t\tserver = new ServerSocket(port);\n\t\t\t\n\t\t}\n\t\tcatch(java.io.IOException e)\n\t\t{\n\t\t}\n\t}", "public ServerSocket createServerSocket(int arg0, int arg1) throws IOException {\n return null;\n }", "public ServerSocket createSocket (int port, int backlog)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;", "public ServerSocket createServerSocket(int arg0, int arg1, InetAddress arg2) throws IOException {\n return null;\n }", "public static RoMServer createServer() throws IOException, Exception {\r\n \t\t// Ip and Port out of config\r\n \t\tIConfig cfg = ConfigurationFactory.getConfig();\r\n \r\n \t\treturn RoMServer.createServer(cfg.getIp(), cfg.getPort());\r\n \t}", "public Server() throws IOException {\n try {\n this.serverSocket = new ServerSocket(this.port,100, InetAddress.getByName(host));\n } catch (UnknownHostException e) {\n System.out.println(\"Erreur lors de la construction du serveur (Hôte inconnu) - Server Constructor Error\");\n e.printStackTrace();\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "private Socket createClient()\n\t{\n\t\tSocket client = null;\n\t\ttry {\n\t\t\tclient = this.server.accept();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tinsertLogEntry(e.getMessage(), e.getStackTrace().toString());\n\t\t}\n\t\t\n\t\treturn client;\n\t}", "public Socket createSocket()\n/* */ {\n/* 82 */ return new Socket();\n/* */ }", "public ServidorSocket() throws IOException {\n\t\tservidor = new ServerSocket(PUERTO);\n\t\tcliente = new Socket();\n\t}", "public Server(){\n\t\ttry {\n\t\t\t// initialize the server socket with the specified port\n\t\t\tsetServerSocket(new ServerSocket(PORT));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception while creating a server\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static void openServerSocket(int port) {\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Server Error\");\n\t\t}\n\t}", "public ServerSocket createSocket (int port, int backlog,\n InetAddress ifAddress)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;", "public Server(int port) throws IOException{\n\t\tsuper();\n\t\tthis.serversocket= new java.net.ServerSocket(port);\n\t\t\n\t\tif (DEBUG){\n\t\t\tSystem.out.println(\"Server socket created:\" + this.serversocket.getLocalPort());\n\t\t\tclient_list.add(String.valueOf(this.serversocket.getLocalPort()));\n\t\t}\n\t}", "public Server() {\n try {\n welcomeSocket = new ServerSocket(PORT);\n System.out.println(\"Server listening on \" + PORT);\n } catch (IOException e) {\n System.out.println(\"Error creating welcome socket. Is this socket available?\");\n }\n }", "private void initServerSock(int port) throws IOException {\n\tserver = new ServerSocket(port);\n\tserver.setReuseAddress(true);\n }", "private static void startWebSocketServer() {\n\n Server webSocketServer = new Server();\n ServerConnector connector = new ServerConnector(webSocketServer);\n connector.setPort(PORT);\n webSocketServer.addConnector(connector);\n log.info(\"Connector added\");\n\n // Setup the basic application \"context\" for this application at \"/\"\n // This is also known as the handler tree (in jetty speak)\n ServletContextHandler webSocketContext = new ServletContextHandler(\n ServletContextHandler.SESSIONS);\n webSocketContext.setContextPath(\"/\");\n webSocketServer.setHandler(webSocketContext);\n log.info(\"Context handler set\");\n\n try {\n ServerContainer serverContainer = WebSocketServerContainerInitializer\n .configureContext(webSocketContext);\n log.info(\"Initialize javax.websocket layer\");\n\n serverContainer.addEndpoint(GreeterEndpoint.class);\n log.info(\"Endpoint added\");\n\n webSocketServer.start();\n log.info(\"Server started\");\n\n webSocketServer.join();\n log.info(\"Server joined\");\n\n } catch (Throwable t) {\n log.error(\"Error startWebSocketServer {0}\", t);\n }\n }", "public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}", "public static ServerSocket createServerSocket(String hostName, int port) throws IOException {\n\t\tServerSocket serverSocket = new ServerSocket();\n\t\tInetSocketAddress endpoint = new InetSocketAddress(hostName, port);\n\t\tserverSocket.bind(endpoint);\n\t\treturn serverSocket;\n\t}", "public interface ServerSocketFactory {\n\n\t\tpublic ServerSocket create() throws IOException;\n\n\t}", "@Override\n public Socket createSocket(final InetAddress host, final int port, \n final InetAddress localHost, final int localPort) \n throws IOException {\n return createSocket(host, port);\n }", "private void createSocket() throws Exception {\n try {\n socket = new Socket();\n socket.setTcpNoDelay(true);\n } catch (SocketException e) {\n throw new Exception();\n }\n }", "public void startClientServer() {\n try {\n this.server_socket = new ServerSocket( port );\n this.start();\n } catch (IOException e ) {\n System.err.println( \"Failure: Socket couldn't OPEN! -> \" + e );\n } finally {\n System.out.println( \"Success: Server socket is now Listening on port \" + port + \"...\" );\n }\n }", "public SocketServer() {\n \n super();\n start();\n\n }", "private void initServer() throws IOException {\r\n \t\tLogger.logMessage(\"Binding Server to \" + this.serverIpAddress + \":\" + this.serverPort);\r\n \r\n \t\tthis.isAlive = true;\r\n \t\tthis.serverSocket = new ServerSocket(this.serverPort, this.backLog, this.serverIpAddress);\r\n \t\tthis.dataLayer = DataLayerFactory.getDataLayer();\r\n \r\n \t\t// Generate the grouplist\r\n \t\tCollection<String> dbGroupList = this.dataLayer.getGroups();\r\n \r\n \t\tfor (String group : dbGroupList) {\r\n \t\t\tthis.groupList.addGroup(group);\r\n \t\t}\r\n \r\n \t\tLogger.logMessage(\"Server successfuly bound!\");\r\n \t}", "public UDPSocketServer() throws IOException {\n udpSocket = new DatagramSocket( SERVER_PORT );\n serverSocket = new ServerSocket( PORT_WEB);\n System.out.println(\"Started the UDP socket server at port \" + SERVER_PORT);\n System.out.println(\"Started the WebServer at port \" + PORT_WEB);\n\n }", "private void startListen() {\n try {\n listeningSocket = new ServerSocket(listeningPort);\n } catch (IOException e) {\n throw new RuntimeException(\"Cannot open listeningPort \" + listeningPort, e);\n }\n }", "public void start() throws IOException {\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverCallbacks.forEach(c -> c.onServerStarted(this, port));\n\t}", "public void createSocket() \n { \n try \n { \n socket = new DatagramSocket(); \n } \n catch (Exception ex) \n { \n System.out.println(\"UDPPinger Exception: \" + ex); \n } \n }", "@Override\r\n\tpublic Socket createSocket(InetAddress host, int port) throws IOException {\n\t\treturn null;\r\n\t}", "@Override\n public Socket createSocket(final String host, final int port, \n final InetAddress localHost, final int localPort)\n throws IOException, UnknownHostException {\n return createSocket(host, port);\n }", "public EnvironmentSocket createNewSocket(String host, int port) throws IOException {\n Socket socket = new Socket(host, port);\n return wrapperSocket(socket);\n }", "private Socket newSocket() throws IOException {\n try {\n InetAddress hostAddress = InetAddress.getByName(publicAddress);\n return new Socket(hostAddress, AgentRemoteService.PORT);\n } catch (IOException e) {\n throw new IOException(\"Couldn't connect to publicAddress: \" + publicAddress + \":\" + AgentRemoteService.PORT, e);\n }\n }", "public void init() throws IOException {\r\n try {\r\n serverSocket = new ServerSocket(PORT);\r\n this.running = true;\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }", "public void startServer() throws IOException {\n log.info(\"Starting server in port {}\", port);\n try {\n serverSocket = new ServerSocket(port);\n this.start();\n log.info(\"Started server. Server listening in port {}\", port);\n } catch (IOException e) {\n log.error(\"Error starting the server socket\", e);\n throw e;\n }\n }", "public EnvironmentServerSocket createServerSocket(int port) throws IOException {\n return new EnvironmentServerSocketImpl(new ServerSocket(port), this);\n }", "public DefaultTCPServer(int port) throws Exception {\r\n\t\tserverSocket = new ServerSocket(port);\t}", "public GameSocket() throws SocketException {\r\n\t\tsocket = new DatagramSocket(Main.localAddress);\r\n\t\tbufSize = socket.getReceiveBufferSize();\r\n\t\tMain.logger.info(\"Starting GameSocket at port \" + socket.getLocalPort() + \" ...\");\r\n\t}", "private static void startServer() {\n new Thread() {\n public void run() {\n Server server = new Server();\n server.startUDP();\n }\n }.start();\n }", "public static ServerSocket getServerSocket(){\n if (listener == null) {\n listener = createServerSocket();\n }\n return listener;\n }", "public static int openSocket() throws IOException {\n serverSocket = new ServerSocket(0, 10, InetAddress.getLocalHost());\n return serverSocket.getLocalPort();\n }", "public TCPCanSocket() throws IOException\n \t{\n \t\t// this(new ServerSocket(DEFAULT_PORT).accept());\n \t\tthis(new ServerSocket(DEFAULT_PORT, 100).accept());\n \t\tSystem.out.println( \"constructor: open server socket\" );\n \t}", "@Override\r\n\tpublic Socket createSocket(String host, int port, InetAddress localHost,\r\n\t\t\tint localPort) throws IOException, UnknownHostException {\n\t\treturn null;\r\n\t}", "private void setUpServerThread() {\n\t\ttry {\n\t\t\tthis.incomingMsgNodes = new TCPServerThread(0, this);\n\t\t\tThread thread = new Thread(incomingMsgNodes);\n\t\t\tthread.start();\n\t\t\tthis.myServerThreadPortNum = incomingMsgNodes.getPort();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble creating Server Socket\");\n\t\t}\n\t}", "public interface ServerSocketFactory {\n\n\n // --------------------------------------------------------- Public Methods\n\n\n /**\n * Returns a server socket which uses all network interfaces on\n * the host, and is bound to a the specified port. The socket is\n * configured with the socket options (such as accept timeout)\n * given to this factory.\n *\n * @param port the port to listen to\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n /**\n * Returns a server socket which uses all network interfaces on\n * the host, is bound to a the specified port, and uses the\n * specified connection backlog. The socket is configured with\n * the socket options (such as accept timeout) given to this factory.\n *\n * @param port the port to listen to\n * @param backlog how many connections are queued\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port, int backlog)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n /**\n * Returns a server socket which uses only the specified network\n * interface on the local host, is bound to a the specified port,\n * and uses the specified connection backlog. The socket is configured\n * with the socket options (such as accept timeout) given to this factory.\n *\n * @param port the port to listen to\n * @param backlog how many connections are queued\n * @param ifAddress the network interface address to use\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port, int backlog,\n InetAddress ifAddress)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n}", "public Socket setupSocket(final String serverIP, final String serverPort) {\n mServerIP = serverIP;\n mServerPort = serverPort;\n mServerUrl = \"http://\" + mServerIP + \":\" + mServerPort;\n try {\n mSocket = IO.socket(mServerUrl);\n return mSocket;\n } catch (URISyntaxException e) {\n throw new RuntimeException(e);\n }\n }", "@Override\r\n\tpublic Socket createSocket(InetAddress address, int port,\r\n\t\t\tInetAddress localAddress, int localPort) throws IOException {\n\t\treturn null;\r\n\t}", "public Server() {}", "public Socket createSocket(InetAddress host, int port) throws IOException {\n return new Socket(host, port);\n }", "@Override\n @SuppressWarnings(\"CallToPrintStackTrace\")\n public void simpleInitApp() {\n \n\n try {\n System.out.println(\"Using port \" + port);\n // create the server by opening a port\n server = Network.createServer(port);\n server.start(); // start the server, so it starts using the port\n } catch (IOException ex) {\n ex.printStackTrace();\n destroy();\n this.stop();\n }\n System.out.println(\"Server started\");\n // create a separat thread for sending \"heartbeats\" every now and then\n new Thread(new NetWrite()).start();\n server.addMessageListener(new ServerListener(), ChangeVelocityMessage.class);\n // add a listener that reacts on incoming network packets\n \n }", "private void initSocket(String host, String port) throws IOException {\n\t\t// check the validity of the host name\n\t\tif (host == null || host.isEmpty()) throw new IllegalArgumentException(\"host == null || host.isEmpty()\");\n\t\t// check the validity of the port number\n\t\tint p = 0;\n\t\ttry {\n\t\t\tp = Integer.parseInt(port);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal port argument\");\n\t\t}\n\t\tif (p <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal port argument\");\n\t\t}\n\t\t// establish the network connection\n\t\ttry {\n\t\t\tthis.socket = new Socket(host, p);\n\t\t} catch (IOException e) {\n\t\t\tgetErrorManager().error(\"Failed to establish the network connection\", e,\n\t\t\t\tErrorManager.OPEN_FAILURE);\n\t\t\tthrow e;\n\t\t}\n\t\tsuper.internalSetOutputStream(new BufferedOutputStream(this.socket.getOutputStream()));\n\t}", "public void startServer() {\n\r\n try {\r\n echoServer = new ServerSocket(port);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n // Whenever a connection is received, start a new thread to process the connection\r\n // and wait for the next connection.\r\n while (true) {\r\n try {\r\n clientSocket = echoServer.accept();\r\n numConnections++;\r\n ServerConnection oneconnection = new ServerConnection(clientSocket, numConnections, this);\r\n new Thread(oneconnection).start();\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n\r\n }", "public TCPServer(int port) throws IOException {\n\tthis.socket = new ServerSocket(port);\n\tthis.clients = new ArrayList();\n\n\tSystem.out.println(\"SERVER: Started\");\n }", "public void createConnection() throws ServerUnavailableException {\n clearConnection();\n while (serverSock == null) {\n try {\n // try to open a Socket to the server\n InetAddress addr = InetAddress.getByName(host);\n System.out.println(\"attempting to connect to \" + addr + \":\" + port + \"...\");\n serverSock = new Socket(addr, port);\n in = new BufferedReader(new InputStreamReader(serverSock.getInputStream()));\n out = new BufferedWriter(new OutputStreamWriter(serverSock.getOutputStream()));\n } catch (IOException e) {\n throw new ServerUnavailableException(\"Unable to connect to the server\");\n }\n }\n }", "public void establishSocketConnection() {\n\t\ttry {\n\t\t\tsocket = new Socket(serverIP, serverPort);\n\t\t\tlogger.info(\"Connection with JSON-RPC server opened at local endpoint \" + socket.getLocalAddress().getHostAddress() + \":\" + socket.getLocalPort());\n\t\t\t// create a writer to send JSON-RPC requests to the JSON-RPC server\n\t\t\twriter = new OutputStreamWriter(socket.getOutputStream(), \"utf-8\");\n\t\t\t// create a JsonReader object to receive JSON-RPC response\n\t\t\tjsonReader = new JsonReader(new InputStreamReader(socket.getInputStream(), \"utf-8\"));\n\t\t} catch (UnknownHostException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void listen() {\n\t\ttry {\n\t\t\tServerSocket servSocket = new ServerSocket(PORT);\n\t\t\tSocket clientSocket;\n\t\t\twhile(true) {\n\t\t\t\tclientSocket = servSocket.accept();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error - Could not open connection\");\n\t\t}\n\t\t\n\t}", "public Socket createSocket( Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException {\n\t return getSSLContext().getSocketFactory().createSocket( socket, host, port, autoClose );\n }", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "public ClientTSap() {\n socketFactory = SocketFactory.getDefault();\n }", "public TCPServer(int portNumber){\r\n\t\t// Abro el socket en el puerto dado y obtengo los stream\r\n\t\ttry {\r\n\t\t\tmServerSocket = new ServerSocket(portNumber);\r\n\t\t} catch (IOException e) { e.printStackTrace(); }\r\n\t}", "@Before\n public void setUp() throws IOException {\n serverSocket = new ServerSocket(0, 1);\n }", "private void startServer(){\n clients = new ArrayList<ClientThread>();\n ServerSocket ClientSocket = null;\n try {\n ClientSocket = new ServerSocket(ClientPort);\n ClientSocketConnection(ClientSocket);\n } catch (IOException e){\n e.printStackTrace();\n System.exit(1);\n }\n }", "public void startServer() throws Exception\n {\n\t\t\tString SERVERPORT = \"ServerPort\";\n\t\t\tint serverport = Integer.parseInt(ConfigurationManager.getConfig(SERVERPORT));\n\t\t\t\n \n Srvrsckt=new ServerSocket ( serverport );\n while ( true )\n {\n Sckt =Srvrsckt.accept();\n new Thread ( new ConnectionHandler ( Sckt ) ).start();\n }\n \n \n\n\n }", "public static RoMServer createServer(int serverPort) throws IOException, Exception {\r\n \t\treturn RoMServer.createServer(InetAddress.getLocalHost(), serverPort);\r\n \t}", "private static ServerSocket startServer(int port) {\n if (port != 0) {\n ServerSocket serverSocket;\n try {\n serverSocket = new ServerSocket(port);\n System.out.println(\"Server listening, port: \" + port + \".\");\n System.out.println(\"Waiting for connection... \");\n return serverSocket;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return null;\n }", "public SocketServer(Context context) {\n \t\tthis.context = context;\n \t}", "public Server(int port)\r\n\t\t{\r\n log(\"Initialising port \" + port);\r\n\r\n\t\t// Set the port\r\n\t\tthis.port = port;\r\n\r\n // Create the server socket\r\n createServerSocket();\r\n \t}", "public static void initCommunicationServerThread(ProjectType project){\r\n try{\r\n serverSocket = new ServerSocket(Attributes.PROFILING_PORT, 2, InetAddress.getLocalHost());\r\n System.out.println(\"Server - ServerSocket created on port: \" + serverSocket.getLocalPort());\r\n }catch (UnknownHostException uhe){\r\n uhe.printStackTrace();\r\n //TODO - log this stuff properly\r\n }catch (IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - log this stuff properly\r\n }\r\n new CommunicationServerThread(project);\r\n }", "private void connectToServer() {\n\t\ttry {\n\t\t\tsocket = new Socket(InetAddress.getLocalHost(), Server.SERVER_PORT);\n\t\t\tin = new BufferedReader(new InputStreamReader(\n\t\t\tsocket.getInputStream()));\n\t\t\tout = new PrintWriter(socket.getOutputStream());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot connect to server\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "private void createAndListen() {\n\n\t\t\n\t}", "public void InitSocket(String server, int port) throws IOException {\n socket = new Socket(server, port);\n outputStream = socket.getOutputStream();\n\n Thread receivingThread = new Thread() {\n @Override\n public void run() {\n try {\n \n BufferedReader reader = new BufferedReader(\n new InputStreamReader(socket.getInputStream()));\n String line;\n while ((line = reader.readLine()) != null)\n notifyObservers(line);\n } catch (IOException ex) {\n notifyObservers(ex);\n }\n }\n };\n receivingThread.start();\n }", "private void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(Server.ADDRESS, Server.PORT_NUMBER);\n\t\t\tthis.oos = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tthis.ois = new ObjectInputStream(socket.getInputStream());\n\t\t\tServerListener serverlistener = new ServerListener();\n\t\t\tserverlistener.start();\n\t\t\tRequest request = new Request(RequestCode.START_DOCUMENT_STREAM);\n\t\t\trequest.setUsername(user.getUsername());\n\t\t\toos.writeObject(request);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public WSocket() throws SocketException, UnknownHostException {\r\n\t\tthis.socket = new DatagramSocket();\r\n\t\tthis.port = socket.getLocalPort();\r\n\t\tthis.addr = InetAddress.getByName(\"localhost\");\r\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:36:07.239 -0500\", hash_original_method = \"84F635671A3C26E6B4F1228C3E17A491\", hash_generated_method = \"544C09CA031344D5713194550EB2CB9D\")\n \npublic LocalServerSocket(String name) throws IOException\n {\n impl = new LocalSocketImpl();\n\n impl.create(true);\n\n localAddress = new LocalSocketAddress(name);\n impl.bind(localAddress);\n\n impl.listen(LISTEN_BACKLOG);\n }", "public void InitSocket(String server, int port) throws IOException {\r\n socket = new Socket(server, port);\r\n outputStream = socket.getOutputStream();\r\n\r\n Thread receivingThread = new Thread() {\r\n @Override\r\n public void run() {\r\n try {\r\n BufferedReader reader = new BufferedReader(\r\n new InputStreamReader(socket.getInputStream()));\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n notifyObservers(line);\r\n }\r\n } catch (IOException ex) {\r\n notifyObservers(ex);\r\n }\r\n }\r\n };\r\n receivingThread.start();\r\n }", "public Socket createSocket( final InetAddress address,\n final int port,\n final InetAddress localAddress,\n final int localPort )\n throws IOException\n {\n return new Socket( address, port, localAddress, localPort );\n }", "public Server() {\n\t\tsession = new WelcomeSession();\n\t\tmPort = DEFAULT_PORT;\n\t\texecutor = Executors.newCachedThreadPool();\n\t}", "private void establishConnection() throws UnknownHostException, \n \t\t\t\t\t\t\t\t\t\t IOException {\n \t socket = new Socket(serverIP, serverPort);\n }", "public Server(int port, mainViewController viewController, LogViewController consoleViewController){\n isRunningOnCLI = false;\n this.viewController = viewController;\n this.port = port;\n this.consoleViewController = consoleViewController;\n viewController.serverStarting();\n log = new LoggingSystem(this.getClass().getCanonicalName(),consoleViewController);\n log.infoMessage(\"New server instance.\");\n try{\n this.serverSocket = new ServerSocket(port);\n //this.http = new PersonServlet();\n log.infoMessage(\"main.Server successfully initialised.\");\n clients = Collections.synchronizedList(new ArrayList<>());\n ServerOn = true;\n log.infoMessage(\"Connecting to datastore...\");\n //mainStore = new DataStore();\n jettyServer = new org.eclipse.jetty.server.Server(8080);\n jettyContextHandler = new ServletContextHandler(jettyServer, \"/\");\n jettyContextHandler.addServlet(servlets.PersonServlet.class, \"/person/*\");\n jettyContextHandler.addServlet(servlets.LoginServlet.class, \"/login/*\");\n jettyContextHandler.addServlet(servlets.HomeServlet.class, \"/home/*\");\n jettyContextHandler.addServlet(servlets.DashboardServlet.class, \"/dashboard/*\");\n jettyContextHandler.addServlet(servlets.UserServlet.class, \"/user/*\");\n jettyContextHandler.addServlet(servlets.JobServlet.class, \"/job/*\");\n jettyContextHandler.addServlet(servlets.AssetServlet.class, \"/assets/*\");\n jettyContextHandler.addServlet(servlets.UtilityServlet.class, \"/utilities/*\");\n jettyContextHandler.addServlet(servlets.EventServlet.class, \"/events/*\");\n //this.run();\n } catch (IOException e) {\n viewController.showAlert(\"Error initialising server\", e.getMessage());\n viewController.serverStopped();\n log.errorMessage(e.getMessage());\n }\n }", "void initAndListen() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t// Startuje nowy watek z odbieraniem wiadomosci.\n\t\t\t\tnew ClientHandler(clientSocket, this);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"Accept failed.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "public Server() {\n\t\tinit(new Config());\n\t}", "public Socket createSocket( String host, int port, InetAddress clientHost, int clientPort) throws IOException, UnknownHostException {\n return getSSLContext().getSocketFactory().createSocket( host, port, clientHost, clientPort );\n }", "private StubSocket createTestSocket(String inputStreamContents) {\n InputStream inputStream = new ByteArrayInputStream(inputStreamContents.getBytes());\n return new StubSocket(DEFAULT_HOST, inputStream, outputStream);\n }", "public Server() throws IOException {\n System.out.println(\"\\t Server Started \\n\");\n }", "public ServerThread(Socket socket) {\r\n\t\tsoc = socket;\r\n\t}", "protected void bind() throws SocketException {\n super.bind();\n\n //start the secure socket\n dtlsSocket = options.getSecurePort() > 0 ? new DatagramSocket(options.getSecurePort()) : new DatagramSocket();\n dtslReceiverThread = createDatagramServer(\"mqttsn-dtls-receiver\", options.getReceiveBuffer(), dtlsSocket);\n }", "public void start()\r\n\t\t{\r\n\t\tDebug.assert(serverSocket != null, \"(Server/123)\");\r\n\r\n \t// flag the server as running\r\n \tstate = RUNNING;\r\n\r\n // Loop while still listening, accepting new connections from the server socket\r\n while (state == RUNNING)\r\n \t{\r\n // Get a connection from the server socket\r\n\t\t\tSocket socket = null;\r\n\t\t\ttry {\r\n socket = serverSocket.accept();\r\n \tif (state == RUNNING) \r\n \t createLogin(socket);\r\n }\r\n \r\n // The socket timeout allows us to check if the server has been shut down.\r\n // In this case the state will not be RUNNING and the loop will end.\r\n\t\t catch ( InterruptedIOException e )\r\n\t\t \t{\r\n\t\t \t// timeout happened\r\n\t\t \t}\r\n\t\t \r\n\t\t // This shouldn't happen...\r\n \t catch ( IOException e )\r\n \t \t{\r\n log(\"Server: Error creating Socket\");\r\n \t \tDebug.printStackTrace(e);\r\n \t }\r\n\t }\r\n\t \r\n\t // We've finished, clean up\r\n disconnect();\r\n\t\t}" ]
[ "0.7872524", "0.78059053", "0.7709289", "0.75912434", "0.7486886", "0.7455908", "0.7436188", "0.74117", "0.7402217", "0.7294146", "0.72418857", "0.71501136", "0.71296424", "0.7104778", "0.7086299", "0.7050807", "0.6969865", "0.6965126", "0.6941967", "0.69369596", "0.69353074", "0.6893702", "0.6879227", "0.6870218", "0.68419814", "0.67942864", "0.6727148", "0.6723843", "0.670853", "0.66742146", "0.66699785", "0.665486", "0.66264445", "0.6611807", "0.66072416", "0.65787905", "0.65695333", "0.656835", "0.65312797", "0.65261817", "0.6516532", "0.6515746", "0.65111667", "0.6504111", "0.65004045", "0.6499486", "0.64979094", "0.6494543", "0.6474804", "0.6445622", "0.642579", "0.6414481", "0.6393251", "0.63638747", "0.6357929", "0.6355822", "0.6308846", "0.6303166", "0.62949276", "0.62782264", "0.627184", "0.62544477", "0.62406015", "0.6240088", "0.6239585", "0.6225876", "0.6220274", "0.62068945", "0.61878353", "0.61829996", "0.6182777", "0.6181793", "0.61760163", "0.6171479", "0.6169289", "0.6167843", "0.61665916", "0.61442333", "0.614366", "0.61408085", "0.6140354", "0.61396366", "0.61362803", "0.6131506", "0.61166036", "0.61165965", "0.6115317", "0.61084247", "0.60889876", "0.60744417", "0.6062467", "0.6061298", "0.6060316", "0.60514647", "0.6044252", "0.60434765", "0.6037668", "0.6035073", "0.6031279", "0.60221374" ]
0.8123785
0
Runs the server. Note: Server should wait only for accepting new clients. Other things like chatting for a specific client should not be handled in server thread so that is not blocked and can spend the time in accepting new clients.
private void runServer() { while(true) { // This is a blocking call and waits until a new client is connected. Socket clientSocket = waitForClientConnection(); handleClientInNewThread(clientSocket); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void runServer()\n {\n int port = Integer.parseInt(properties.getProperty(\"port\"));\n String ip = properties.getProperty(\"serverIp\");\n \n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Server started. Listening on: {0}, bound to: {1}\", new Object[]{port, ip});\n try\n {\n serverSocket = new ServerSocket();\n serverSocket.bind(new InetSocketAddress(ip, port));\n do\n {\n Socket socket = serverSocket.accept(); //Important Blocking call\n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Connected to a client. Waiting for username...\");\n ClientHandler ch = new ClientHandler(socket, this);\n clientList.add(ch);\n ch.start();\n } while (keepRunning);\n } catch (IOException ex)\n {\n Logger.getLogger(ChatServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void runServer()\n\t{\n\t\taddText(\"Server started at \" + LocalDateTime.now());\n\t\t\n\t\tint cnt = 0;\n\t\twhile(true)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// Accept a request\n\t\t\t\taddText(\"Server is waiting for connection....\");\n\t\t\t\tSocket client = server.accept();\n\t\t\t\tConnectionThread connect = new ConnectionThread(client);\n\t\t\t\t\n\t\t\t\t// Show message\n\t\t\t\taddText(\"Server is connect!\");\n\t\t\t\taddText(\"Player\" + cnt + \"'s IP address is\" + client.getInetAddress());\n\t\t\t\tcnt++;\n\t\t\t\t\n\t\t\t\t// Add to List\n\t\t\t\tconnectionPool.add(connect);\n\t\t\t\t\n\t\t\t\t// If at least two players, Start the game\n\t\t\t\taddText(\"Pool has \" + connectionPool.size() + \" connection\");\n\t\t\t\tif(connectionPool.size() >= 2)\n\t\t\t\t\tclientStart();\n\t\t\t\t\n\t\t\t\t// Start connectionThread\n\t\t\t\tconnect.start();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n\t\tMisc.log(\"Server waiting for client...\");\r\n\r\n\t\ttry {\r\n\t\t\tserver = socket.accept();\r\n\t\t\tMisc.log(server.getRemoteSocketAddress() + \" has connected.\");\r\n\t\t\t\r\n\t\t\t//get the input and output streams which are used to send and receive messages from the client\r\n\t\t\tin = new DataInputStream(server.getInputStream());\r\n\t\t\tout = new DataOutputStream(server.getOutputStream());\r\n\t\t\t\r\n\t\t\t//send host's username to the connected client by creating a hello packet with the username\r\n\t\t\tsendData(new HelloPacket(serverHost.getUsername()).getData());\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\t\r\n\t\t//server is listening until the serverRunning flag is set to false\r\n\t\twhile(serverRunning) {\t\t\t\r\n\t\t\t//construct packet object to save received data into\r\n\t\t\tbyte[] data = new byte[1024];\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t//wait to receive a packet\r\n\t\t\t\tin.read(data);\r\n\t\t\t\t//handle packet\r\n\t\t\t\tpacketHandler.handlePacket(data);\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tMisc.log(\"Exception in server.\");\r\n\t\t\t\tserverRunning = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//we are done and it has been requested that the server turns off\r\n\t\tcloseServer();\r\n\t\t\r\n\t\t//end of thread\r\n\t}", "public void runServer() throws IOException {\n\t\twhile (true) {\n\t\t\tSocket client = server.accept();\n\t\t\t// pass in protocol as argument so that there is only one protocol for\n\t\t\t// the entire server\n\t\t\tservice.submit(new PollClientHandler(client, poll));\n\t\t}\n\t}", "public void run() {\n running = true;\n System.out.println(\"Server started on port: \" + port);\n manageClients();\n receive();\n startConsole();\n }", "private void runServer() {\n while(true) {\n try {\n SSLSocket socket = (SSLSocket)listener.accept();\n\n this.establishClient(socket);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSocket socket = serverSocket.accept();\n\t\t\t\t\t\tclients.add(new Client(socket));\n\t\t\t\t\t\tSystem.out.println(\"[클라이언트 접속] \" + socket.getRemoteSocketAddress() + \": \"\n\t\t\t\t\t\t\t\t+ Thread.currentThread().getName());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tif (!serverSocket.isClosed()) {\n\t\t\t\t\t\t\tstopServer();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void run() {\n\t\twhile (true) {\n\t\t\tSocket clientSocket = null;\n\t\t\ttry {\n\t\t\t\tclientSocket = server.accept();\n\t\t\t\tview.writeLog(\"New client connected\");\n\t\t\t\tClientThread client = new ClientThread(clientSocket, this);\n\t\t\t\t(new Thread(client)).start();\n\t\t\t} catch (IOException e) {e.printStackTrace();}\n\t\t}\n\t}", "@Override\n\tpublic void run() {\n\n\t\tServerSocket sSocket;\n\t\ttry {\n\t\t\tsSocket = new ServerSocket(15001);\n\t\t\tSystem.out.println(\"server listening at \" + sSocket.getLocalPort());\n\t\t\twhile (true) {\n\t\t\t\t// this is an unique socket for each client\n\t\t\t\tSocket socket = sSocket.accept();\n\t\t\t\tSystem.out.println(\"Client with port number: \" + socket.getPort() + \" is connected\");\n\t\t\t\t// start a new thread for handling requests from the client\n\t\t\t\tClientRequestHandler requestHandler = new ClientRequestHandler(sketcher, socket, scene, playerMap);\n\t\t\t\tnew Thread(requestHandler).start();\n\t\t\t\t// start a new thread for handling responses for the client\n\t\t\t\tClientResponseHandler responseHandler = new ClientResponseHandler(socket, scene, playerMap);\n\t\t\t\tnew Thread(responseHandler).start();\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t}\n\t}", "public void run(){\n\t\t\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\tSocket s = listener.accept();\n\t\t\t\tnew ServerConnection(chatServ, s).start();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn; // stop listening\n\t\t\t}\n\t\t}\n\t}", "public void run()\n {\n try {\n clientSocket = serverSocket.accept();\n System.out.println(\"Client connected.\");\n clientOutputStream = new PrintWriter(clientSocket.getOutputStream(), true);\n clientInputStream = new BufferedReader( new InputStreamReader(clientSocket.getInputStream()));\n\n while(isRunning)\n {\n try {\n serverTick(clientSocket, clientOutputStream, clientInputStream);\n } catch (java.net.SocketException e)\n {\n //System.out.println(\"Network.Client closed connection. Ending server\");\n this.closeServer();\n }\n }\n } catch (Exception e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n\n /***Legacy Code for allowing multiple users. No point in spending time implementing\n * When this is just suppose to be one way communication\n\n try {\n acceptClients.join();\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n closeServer();\n */ }", "@Override\n\tpublic void run() {\n\t\tlog(\"Running on port \" + serverSocket.getLocalPort());\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\t// accept incomming connections\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t//log(\"New connection from \" + client_socket.getRemoteSocketAddress());\n\t\t\t\t// create a new connection handler and run in a separate thread\n\t\t\t\tTrackerRequestHandler handler = new TrackerRequestHandler(this, clientSocket);\n\t\t\t\texecutor.execute(handler);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog(\"Problem accepting a connection\");\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n int c;\n\n // Run forever, which is common for server style services\n while (true) {\n\n // Wait until someone connects, and indicate this to the user.\n try {\n Socket clientSocket = serverSocket.accept();\n System.out.println(\"Accepted connection from client.\");\n\n // Grab the input/output streams so we can write/read directly to/from them\n OutputStream os = clientSocket.getOutputStream();\n DataInputStream is = new DataInputStream(clientSocket.getInputStream());\n\n // While there is valid input to be read...\n while ( (c = is.read()) != -1) {\n // Write that input back into the output stream, and send it all immediately.\n os.write(c);\n os.flush();\n }\n\n // Close the streams/client socket since we're done.\n System.out.println(\"Closing client connection\");\n os.close();\n is.close();\n clientSocket.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\tpublic void run() {\n try {\n serverSocket = new ServerSocket(port);\n \n while (true) {\n System.out.println(\"[GenericServer.run] Waiting for connections on Port #\" + port);\n socket = serverSocket.accept();\n System.out.println(\"[GenericServer.run] A connection to a client is established!\");\n processConnection(socket);\n }\n\n } catch (IOException ioe) {\n System.err.println(\"IOException\" + ioe.getMessage());\n ioe.printStackTrace();\n }\n }", "private void runProgram() {\n\n try {\n ServerSocket ss = new ServerSocket(8088);\n Dispatcher dispatcher = new Dispatcher(allmsg,allNamedPrintwriters,clientsToBeRemoved);\n Cleanup cleanup = new Cleanup(clientsToBeRemoved,allClients);\n cleanup.start();\n dispatcher.start();\n logger.initializeLogger();\n\n while (true) {\n Socket client = ss.accept();\n InputStreamReader ir = new InputStreamReader(client.getInputStream());\n PrintWriter printWriter = new PrintWriter(client.getOutputStream(),true);\n BufferedReader br = new BufferedReader(new InputStreamReader(client.getInputStream()));\n String input = br.readLine();\n System.out.println(input);\n String name = input.substring(8);\n logger.logEventInfo(name + \" has connected to the chatserver!\");\n allClients.put(name,client);\n allNamedPrintwriters.put(name,printWriter);\n ClientHandler cl = new ClientHandler(name,br, printWriter, allmsg);\n Thread t = new Thread(cl);\n t.start();\n allmsg.add(\"ONLINE#\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void run(){\n\t\tstartServer();\n\t}", "public void runServer(){\n try {\n serverSocket = new ServerSocket(portNumber);\n } catch (IOException ioe){\n System.out.println(ioe.getMessage());\n }\n \n while (true) { \n try {\n Socket clientSocket = serverSocket.accept();\n InetAddress inetAddress = clientSocket.getInetAddress();\n System.out.println(\"Connected with \" + inetAddress.getHostName()+ \".\\n IP address: \" + inetAddress.getHostAddress() + \"\\n\");\n new Thread(new RequestHandlerRunnable(clientSocket, database)).start();\n } catch (IOException ioe){\n System.out.println(ioe.getMessage());\n }\n }\n \n }", "public void run() {\n\t\t// TODO Auto-generated method stub\n\t\twhile(true){\n\t\t\t\n\t\t\tif (DEBUG){\n\t\t\t\tSystem.out.println(\"Server_thread\");\n\t\t\t}\n\t\t\t\n\t\t\ttry{\t\n\t\t\t\trun_list.add(new ClientHandler(serversocket.accept()));\n\t\t\t\tnew Thread (run_list.get(run_list.size()-1)).start();;\n\t\t\t\n\t\t\t\n\t\t}\t\n\t\tcatch (IOException ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\ttry{\n\t\t\tThread.sleep(10);\n\t\t}\n\t\tcatch (InterruptedException ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t}\n\t}", "public void runServer() {\n\t\tint i = 0;\n\n\t\tclientList = new ArrayList<>();\n\t\ttry {\n\t\t\tServerSocket listener = new ServerSocket(port);\n\n\t\t\tSocket server;\n\n\t\t\tprintDetails();\n\n\t\t\twhile ((i++ < maxConnections) || (maxConnections == 0)) {\n\n\t\t\t\tserver = listener.accept();\n\t\t\t\tSession session = new Session(server, this.storageLocation );\n\n\t\t\t\tnew Thread(session).start();\n\n\t\t\t\tString name = session.getName();\n\t\t\t\tSystem.out.printf(\"%s STARTED\\r\\n\", name );\n\t\t\t\tclientList.add( session );\n\t\t\t\tdoGC();\n\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"IOException on socket listen: \" + ioe);\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "private static void handleServer(){\n // Main program. It should handle all connections.\n try{\n while(true){\n Socket clientSocket= serverSocket.accept();\n ServerThread thread = new ServerThread(clientSocket, connectedUsers, groups);\n thread.start();\n }\n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void run() {\n try {\n this.listener = new ServerSocket(port);\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n // On new connections, start a new thread to handle communications.\n try {\n while(true) {\n new Handler(this.listener.accept()).start();\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n this.listener.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void run() {\n //Create server socket\n try (ServerSocket serverSocket = new ServerSocket(serverPort))\n {\n //In loop to continuously accept connections from client\n //main thread doing this\n while (true)\n {\n System.out.println(\"Waiting for client(s) to connect..\");\n //Socket represents connection to client\n Socket clientSocket = serverSocket.accept();\n System.out.println(\"Accepted connection from \" + clientSocket);\n //Message to write to client when connected via outputstream\n OutputStream outputStream = clientSocket.getOutputStream();\n outputStream.write((\"You have connected. Please write: login <username> to login!\\n\" + \"Write <help> for list of additional commands!\\n\").getBytes());\n //Server worker, handles communication with client socket\n ServerWorker worker = new ServerWorker(this, clientSocket);\n //Adding worker to workerlist\n workerList.add(worker);\n //Starting thread worker\n worker.start();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void startRunning(){\r\n\t\ttry{\r\n\t\t\twhile( true ){\r\n\t\t\t\tserver = new ServerSocket(PORT);\r\n\t\t\t\ttry{\r\n\t\t\t\t\twaitForClient(1);\r\n\t\t\t\t\twaitForClient(2);\r\n\t\t\t\t\tnew ServerThread(connectionClient1, connectionClient2, this).start();\r\n\t\t\t\t}\r\n\t\t\t\tcatch( EOFException e ){\r\n\t\t\t\t\tshowMessage(\"\\nServer ended the connection\");\r\n\t\t\t\t}\r\n\t\t\t\tfinally {\r\n\t\t\t\t\tserver.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch( IOException e ){\r\n\t\t}\r\n\t}", "@Override\n public void run() {\n try {\n registerWithServer();\n initServerSock(mPort);\n listenForConnection();\n\t} catch (IOException e) {\n Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, e);\n setTextToDisplay(\"run(): \" + e.getMessage());\n setConnectedStatus(false);\n\t}\n }", "@Override\n public void run()\n {\n lock = new Lock();\n messenger = new Messenger(notifier);\n clientList = new ClientList(notifier, messenger, connectionLimit);\n publisher = new Publisher(lock, clientList);\n\n try\n {\n notifier.sendToConsole(\"Server Started\");\n LOGGER.info(\"Server Started\");\n\n // Set up networking\n socketFactory = (SSLServerSocketFactory) SSLServerSocketFactory\n .getDefault();\n serverSocket = (SSLServerSocket) socketFactory\n .createServerSocket(port);\n serverSocket.setEnabledCipherSuites(enabledCipherSuites);\n\n int idCounter = 1;\n\n // Now repeatedly listen for connections\n while (true)\n {\n // Blocks whilst waiting for an incoming connection\n socket = (SSLSocket) serverSocket.accept();\n\n conn = new ClientConnection(socket, idCounter, notifier, lock,\n publisher, clientList, password);\n new Thread((Runnable) conn).start();\n\n LOGGER.info(\"Someone connected: \" + idCounter);\n idCounter++;\n }\n\n } catch (final SocketException e)\n {\n LOGGER.severe(\"Socket Exception: Server closed?\");\n notifier.sendToConsole(\"Server Stopped\");\n } catch (final IOException e)\n {\n LOGGER.severe(e.getMessage());\n notifier.sendError(e);\n } finally\n {\n kill();\n }\n }", "@Override\n public void run() {\n this.running.set(true);\n Socket socket = null;\n // if flag is set to listen, keep listening for client connection request and keep accepting connections\n while (this.running.get()) {\n try {\n if (connectionCount.get() < Constants.MAX_CLIENT_CONNECTIONS) {\n socket = serverSocket.accept();\n socket.setSoTimeout(30000); // timeout set to 30,000 ms\n socket.setKeepAlive(true);\n log.info(\"Connection Accepted: Local Add {} Remote Add {}\", socket.getLocalAddress(),\n socket.getRemoteSocketAddress());\n // add the connected socket to the list\n socketList.add(socket);\n // Pass the socket to the RequestHandler thread for processing\n IncomingMessageHandler messageHandler = new IncomingMessageHandler(socket, logWriter, fileWriterQueue,\n periodicReportingService, orderShutdown);\n messageHandler.start();\n connectionCount.getAndIncrement();// increment connection count\n log.debug(\"Current number of connections {}\", connectionCount.get());\n } else {\n if(maxConnWarnCount < 4) {\n log.warn(\"Reached maximum connection limit {}; Stopping to accept more client connections\"\n , connectionCount.get());\n maxConnWarnCount++;\n }\n }\n } catch (IOException e) {\n log.error(\"Error in accepting connections\", e);\n if (e instanceof SocketException) {\n log.error(\"SocketException for remote connection\");\n }\n }\n }\n }", "public void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"accepting new connection\");\n\t\t\t\tSocket clientSocket = this.serverSocket.accept();\n\t\t\t\tSystem.out.println(\"this.base: \" + this.base.toString());\n\t\t\t\tConnection connection = new Connection(clientSocket,this.base, new HTTP());\n\t\t\t\tthis.fixedThreadPool.execute(connection);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tthis.serverSocket.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run() {\n try {\n BufferedReader serverInput = new BufferedReader(\n new InputStreamReader(connectionSock.getInputStream()));\n while (running) {\n // Get data sent from the server\n String serverText = serverInput.readLine();\n if (serverInput != null) {\n //System.out.println(\"CLIENT DEBUG: \" + serverText);\n parseResponse(serverText);\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.toString());\n }\n }", "public void run()\n {\n Utilities.debugLine(\"WebServer.run(): Runing Web Server\", DEBUG);\n\n running = true;\n\n ServerSocketConnection ssc;\n try\n {\n ssc = (ServerSocketConnection) Connector.open(\"socket://:\" + PORT);\n\n do\n {\n Utilities.debugLine(\"WebServer.run(): Socket Opened, Waiting for Connection...\", DEBUG);\n SocketConnection sc = null;\n sc = (SocketConnection) ssc.acceptAndOpen();\n Thread t = new Thread(new ConnectionHandler(sc));\n t.setPriority(Thread.MIN_PRIORITY);\n t.start();\n\n//--------------------------------------- DEBUG THREAD NUMBER ---------------------------------\n try\n {\n System.out.println(\"Active Threads: \" + Thread.activeCount());\n }\n catch (Exception e)\n {\n System.out.println(\"There was an eror getting the thread count.\");\n }\n//--------------------------------------- DEBUG THREAD NUMBER ---------------------------------\n\n }\n while (running);\n ssc.close();\n }\n\n catch (Exception e)\n {\n Utilities.debugLine(e.toString() + e.getMessage(), true);\n }\n }", "@Override\n\tpublic void run()\n\t{\n\t\tSocket clientSocket;\n\t\tMemoryIO serverIO;\n\t\t// Detect whether the listener is shutdown. If not, it must be running all the time to wait for potential connections from clients. 11/27/2014, Bing Li\n\t\twhile (!super.isShutdown())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Wait and accept a connecting from a possible client residing on the coordinator. 11/27/2014, Bing Li\n\t\t\t\tclientSocket = super.accept();\n\t\t\t\t// Check whether the connected server IOs exceed the upper limit. 11/27/2014, Bing Li\n\t\t\t\tif (MemoryIORegistry.REGISTRY().getIOCount() >= ServerConfig.MAX_SERVER_IO_COUNT)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// If the upper limit is reached, the listener has to wait until an existing server IO is disposed. 11/27/2014, Bing Li\n\t\t\t\t\t\tsuper.holdOn();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (InterruptedException e)\n\t\t\t\t\t{\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the upper limit of IOs is not reached, a server IO is initialized. A common Collaborator and the socket are the initial parameters. The shared common collaborator guarantees all of the server IOs from a certain client could notify with each other with the same lock. Then, the upper limit of server IOs is under the control. 11/27/2014, Bing Li\n//\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator(), ServerConfig.COORDINATOR_PORT_FOR_MEMORY);\n\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator());\n\t\t\t\t// Add the new created server IO into the registry for further management. 11/27/2014, Bing Li\n\t\t\t\tMemoryIORegistry.REGISTRY().addIO(serverIO);\n\t\t\t\t// Execute the new created server IO concurrently to respond the client requests in an asynchronous manner. 11/27/2014, Bing Li\n\t\t\t\tsuper.execute(serverIO);\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\r\n\r\n\t\tServerSocket serverSocket = null;\r\n\t\tSocket clientSocket = null;\r\n\r\n\t\tSystem.out.println(\"Creating ServerSocket...\");\r\n\r\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(this.listenerPort);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\twhile(true){\r\n\r\n\t\t\tSystem.out.println(LOG_TAG + \"waiting connection...\");\r\n\r\n\t\t\ttry {\r\n\t\t\t\tclientSocket = serverSocket.accept();\r\n\t\t\t\tString message = null;\r\n\r\n\t\t\t\tDataInputStream is = new DataInputStream(clientSocket.getInputStream());\r\n\t\t\t\tDataOutputStream os = new DataOutputStream(clientSocket.getOutputStream());\r\n\r\n\t\t\t\twhile(true){\r\n\r\n\t\t\t\t\tint current = 0;\r\n\t\t\t\t\tbyte[] buf = new byte[100000];\r\n\r\n\t\t\t\t\twhile (current < 1) {\r\n\r\n\t\t\t\t\t\tint reader = is.read(buf);\r\n\r\n\t\t\t\t\t\tif (reader != -1){\r\n\t\t\t\t\t\t\tmessage = new String(buf);\r\n\r\n\t\t\t\t\t\t\tcurrent++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tcheckIncomingMessage(message, os);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\tSystem.err.println(\"ClusterPeerListener InterruptedException\");\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tis.close();\r\n\t\t\t\t\tSystem.out.println(\"connection closed\");\r\n\t\t\t\t\tos.close();\r\n\t\t\t\t\tclientSocket.close();\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.err.println(\"Connection aborted\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public void runServer() throws IOException {\n runServer(0);\n }", "public void run() {\n clientLogger.info(\"Client \" + name + \" started working\");\n EventLoopGroup group = new NioEventLoopGroup();\n try {\n Bootstrap bootstrap = new Bootstrap()\n .group(group)\n .channel(NioSocketChannel.class)\n .handler(new ClientInitializer());\n Channel channel = bootstrap.connect(host, port).sync().channel();\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n while (true) {\n channel.write(in.readLine() + \"\\r\\n\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n group.shutdownGracefully();\n }\n clientLogger.info(\"Client \" + name + \" finished working\");\n }", "@Override\r\n\tpublic void run() {\n\t\trunClient();\r\n\t}", "@Override\n public void run() {\n while (true) {\n try {\n\n Socket clientSocket = serverSock.accept();\n Client user = new Client(this, clientSocket);\n\n } catch (IOException ex) {\n Logger.getLogger(RSAServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void run() {\r\n try {\r\n while (true) {\r\n Socket serverClient = serverSocket.accept(); //server accept the contentServerId connection request\r\n ServerClientThread sct = new ServerClientThread(serverClient, lamportClock, feeds, timers); //send the request to a separate thread\r\n sct.start();\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void runServer(){\n\t\tServer.pool = Executors.newFixedThreadPool(Server.user_limit );\n\t\t\n\t\ttry {\n\t server = new ServerSocket(Server.port, Server.user_limit); \n\t logger.logdate(\"Servidor habilitado: Esperando conexiones...\");\n\t \n\t while (Server.active) {\n\t \ttry {\n\t \tSocket serversocket = server.accept();\n\t \tServerThread connection = new ServerThread(serversocket);\n\t \tpool.execute(connection);\n\t \tServer.clients.addLast(connection);\n\t \tString hostname = connection.getConnection().getInetAddress().getHostName();\n\t \tlogger.logdate(hostname+\" entro al servidor\");\n\t \t} catch ( EOFException eofException ) {\n\t \t\tlogger.logdate( \"Error al aceptar la conexión\" );\n\t } catch(SocketException e){\n\t \n\t } \n\t \n\t }\n\t \n\t } catch ( IOException ioException ) {\n\t \tioException.printStackTrace();\n\t } \n\t \n\t}", "private void runServer()\n\t{\n\t\tif(sm == null)\n\t\t{\n\t\t\tsm = new ServerManager();\n\t\t}\n\t\t\n\t\tint port = 1209;\n\t\ttry \n\t\t{\n\t\t\twaitUser(sm, port);\n\t\t\t//이 아래 로직이 실행된다는건 유저가 다 들어왔다는 뜻임. 즉 게임 시작할 준비 되었음을 의미함\t\t\t\n\t\t\tGame.getInstance().runGame();\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"[Server.runServer()] error >>> : \" + e.getMessage());\n\t\t}\n\t}", "public void run() {\n try {\n // accepts the connection request.\n SelectableChannel peerHandle = this._handle.accept();\n if (peerHandle != null) {\n // now, create a service handler object to serve the\n // the client.\n ServiceHandler handler =\n this._factory.createServiceHandler(\n this._reactor,\n peerHandle);\n if (handler != null)\n // give the service handler object a chance to initialize itself.\n handler.open();\n }\n } catch (IOException ex) {\n MDMS.ERROR(ex.getMessage());\n }\n }", "public void run() {\n\t\tString choice = null;\n\t\tBufferedReader inFromClient = null;\n\t\tDataOutputStream outToClient = null;\n\t\t\n\t\ttry {\n\t\t\tinFromClient = new BufferedReader(new InputStreamReader(client.getInputStream()));\n\t\t\toutToClient = new DataOutputStream(client.getOutputStream());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\t// Loops until the client's connection is lost\n\t\t\twhile (true) {\t\n\t\t\t\t// Request that was sent from the client\n\t\t\t\tchoice = inFromClient.readLine();\n\t\t\t\tif(choice != null) {\n\t\t\t\t\tSystem.out.println(choice);\n\t\t\t\t\tswitch (choice) {\n\t\t\t\t\t\t// Calculates the next even fib by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTEVENFIB\":\n\t\t\t\t\t\t\tnew EvenFib(client).run();\n\t\t\t\t\t\t\t// Increments the fib index tracker so no duplicates\n\t\t\t\t\t\t\t// are sent\n\t\t\t\t\t\t\tServer.fib++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// Calculates the next even nextLargerRan by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTLARGERRAND\":\n\t\t\t\t\t\t\tnew NextLargeRan(client).run();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// Calculates the next prime by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTPRIME\":\n\t\t\t\t\t\t\tnew NextPrime(client).run();\n\t\t\t\t\t\t\t// Increments the prime index tracker so no duplicates\n\t\t\t\t\t\t\t// are sent\n\t\t\t\t\t\t\tServer.prime++;\n\t\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} catch (Exception e) {\n\t\t\t// Displays that the client it was connected to\n\t\t\t// has disconnected\n\t\t\tSystem.out.println(\"Client Disconnected\");\n\t\t}\n\n\t}", "public void run() throws IOException {\n ServerSocket serv = new ServerSocket(port);\n System.out.println(\"*** Awaiting requests at: http://\" + InetAddress.getLocalHost().getHostName() + \":\" + port + \"/\");\n System.out.println(\"(Terminate server by pressing \\\"ctrl C\\\")\");\n while (true) {\n Socket sock = serv.accept();\n HtmlWriter w = new HtmlWriter(sock.getOutputStream());\n String response;\n try {\n response = processRequest(new BufferedReader(new InputStreamReader(sock.getInputStream(), \"UTF-8\")));\n } catch (HttpStatusException e) {\n w.open(e.getStatusLine(), \"SEServer error\");\n w.write(\"<p>\"); w.quote(e.getMessage()); w.write(\"</p>\");\n w.close();\n continue;\n } catch (Exception e) {\n w.open(STATUS_INTERNAL_SERVER_ERROR, \"SEServer error\");\n w.write(\"<p>\"); w.quote(e.toString()); w.write(\"</p>\");\n w.writeStackTrace(e);\n w.close();\n continue;\n }\n w.open(STATUS_OK, \"SEServer\");\n w.write(response);\n w.close();\n }\n }", "public void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSocket client = serverSocket.accept();\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"连接到服务器的用户:\" + client);\n\t\t\t\t\t// 定义输入输出流\n\t\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream()));\n\t\t\t\t\tPrintWriter out = new PrintWriter(client.getOutputStream(), true);\n\t\t\t\t\t// 定义request与response\n\t\t\t\t\tHttpServletRequest request = new Request(in);\n\t\t\t\t\tif (request.getMethod() == null)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tHttpServletResponse response = new Response(out);\n\t\t\t\t\t// 处理\n\n\t\t\t\t\tString url = request.getRequestURI(); // 例如/index.html\n\n\t\t\t\t\t// new Process().service(request, response);\n\n\t\t\t\t\tHttpServlet servlet = container.getServlet(url.substring(1));\n\t\t\t\t\tif (servlet != null)\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tservlet.service(request, response);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (ServletException e) {\n\t\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t\t}\n\t\t\t\t\telse { //页面不存在\n\t\t\t\t\t\tnew Process().service(request, response);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tfinally {\n\t\t\t\t\tclient.close();\n\t\t\t\t\tSystem.out.println(client + \"离开了HTTP服务器\\n----------------\\n\");\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n sendMessageToClient(\"Connexion au serveur réussie\");\n\n while (isActive) {\n try {\n String input = retrieveCommandFromClient();\n handleCommand(input);\n } catch (ServerException e) {\n System.out.println(e.getMessage());\n sendMessageToClient(e.getMessage());\n } catch (ClientOfflineException e) {\n System.out.println(\"Client # \" + clientId + \" deconnecte de facon innattendue\");\n deactivate();\n }\n }\n\n close();\n }", "public void run() {\r\n String request = \"\";\r\n\r\n try {\r\n /**\r\n * The ClientConnectionHandler constantly waits for requests from the client. Requests are the initial message\r\n * that the client sends. This initial message determines how the server receives the messages that come after\r\n * it (if there are any).\r\n */\r\n while (isOpen) {\r\n request = readMessage();\r\n processRequest(request);\r\n }\r\n clientSocket.close();\r\n System.out.println(\"Client #\" + clientNumber + \" has closed\");\r\n } catch (Exception e) {}\r\n }", "@Override\n public final void run() {\n try {\n this.serverSocket = new ServerSocket(port);\n Socket clientSocket = serverSocket.accept();\n this.panel.setVisible(false);\n this.control.createServerGame(clientSocket);\n } catch (IOException ex) {\n Logger.getLogger(ServerThread.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tTcpThreadList tcpThreadList = new TcpThreadList();\n\t\t\ttcpThreadList.start();\n\t\t\tserverSocket = new ServerSocket(tcp_port);\n\t\t\twhile(true) {\n\t\t\t\ttry {\n\t\t\t\t\tSocket recvSocket = serverSocket.accept();\n\t\t\t\t\tTcpThreadServer tcpThreadServer = new TcpThreadServer(recvSocket); \n\t\t\t\t\tlogger.debug(\"accept a tcp socket\");\n\t\t\t\t\ttcpThreadServer.start(); \n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} finally {\n\t\t\tif(serverSocket!=null) { \n\t\t\t\ttry {\n\t\t\t\t\tserverSocket.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} //socket关闭\n\t\t\t}\n\t\t\tflag = false; //标记Server结束\n\t\t}\n\t}", "public void run(){\n //wait for clients to connect to the server and start a new thread,\n //then continue waiting.\n while(true) {\n //create the packet to accept a message\n byte[] buf = new byte[bufSize];\n DatagramPacket packet = new DatagramPacket(buf, buf.length);\n try {\n //receive a message from the client\n datagramSocket.receive(packet);\n } catch (IOException e) {\n System.err.println(\"Error receiving datagram packet\");\n } catch (Exception e){\n serverGUI.displayText(\"Error: There is an issue with your connection. Please restart the program.\");\n }\n //Start a new thread for this client\n ServerThread servant = new ServerThread(mainServer, packet, serverGUI);\n servant.start();\n }\n }", "@Override\n\tpublic void run() {\n\t while (true) {\n\t try {\n\t\t\t\tsocket = serverSocket.accept();\n\n\t \tClient client = new Client(socket);\n\t \tclientList.add(client);\n\t \tSystem.out.println(\"New user connected.\");\n\n\t \tthreadProc = new Thread(client);\n\t \tthreadProc.start();\n\t \n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t }\n\t}", "protected void mainTask() {\n\ttry {\n\t socket = serverSocket.accept();\t\n\t spawnConnectionThread(socket);\n\t} catch (IOException e) {\n\t return;\n\t}\n }", "public void run() {\r\n while (!serverSocket.isClosed()) {\r\n try {\r\n Socket socket = serverSocket.accept();\r\n if (socket.isConnected()) {\r\n clientConnections.add(new ConnectionHandler(socket));\r\n }\r\n } catch (SocketException e) {\r\n System.out.println(\"Socket ist nicht verfügbar\");\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public static void main(String[] args) throws IOException {\n ServerSocket server = new ServerSocket(8080);\n ExecutorService service = Executors.newCachedThreadPool();\n while (true) {\n Socket socket = server.accept();\n System.out.println(\"Client accept\");\n service.submit(new ClientSession(socket));\n }\n\n }", "public void run()\n\t{\n\t\trunning = true;\n\t\tSystem.out.println(\"Server started on port \" + port);\n\t}", "@Override\n\tpublic void run()\n\t{\n\t\tThread serverWorker = new Thread(tcpServer); \n\t\tserverWorker.start(); \n\t\t\n\t\tThread clientManagerWorker = new Thread(clientManager);\n\t\tclientManagerWorker.start();\n\t\t\n\t\twhile(true)\n\t\t{\n\t\t\tif (tcpServer.newPlayer() == true)\n\t\t\t{\n\t\t\t\tnewClients = tcpServer.getNewClients();\n\t\t\t\tfor (Client client : newClients)\n\t\t\t\t{\n\t\t\t\t\tlog.log(\"GameEngine: Adding new client #\" + clients.size());\n\t\t\t\t\tgameState.addPlayer(client); \n\t\t\t\t\tclients.add(client); \n\t\t\t\t}\n\t\t\t\tnewClients.clear();\n\t\t\t}\n\t\t\t\n\t\t\tgameState.updatePlayers(clientManager.getPending()); \n\t\t\tgameState.update();\n\t\t\t\n\t\t\tString gameString = gameState.toJson();\n\t\t\t//System.out.println(gameString);\n\t\t\t//System.out.println(\"gameString length: \" + gameString.length());\n\t\t\ttry {\n\t\t\t\tsendUpdate(gameString, gameState.sequenceNumber);\n\t\t\t} catch (IOException e1) {\n\t\t\t\tlog.log(\"Failed to send update to clients\");\n\t\t\t\te1.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry \n\t\t\t{\n\t\t\t\tThread.sleep(15);\n\t\t\t} \n\t\t\tcatch (InterruptedException e) \n\t\t\t{\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}", "public void run() {\n\t\ttry {\n\t\t\tSystem.err.println(\"Lancement du serveur au port \" + this.listen_socket.getLocalPort());\n\t\t\twhile (true) {\n\t\t\t\tif (listen_socket.getLocalPort() == PORT_RESERVATION) {\n\t\t\t\t\tnew Thread(new ServiceReservation(listen_socket.accept())).start();\n\t\t\t\t} else if (listen_socket.getLocalPort() == PORT_EMPRUNT) {\n\t\t\t\t\tnew Thread(new ServiceEmprunt(listen_socket.accept())).start();\n\t\t\t\t} else if (listen_socket.getLocalPort() == PORT_RETOUR) {\n\t\t\t\t\tnew Thread(new ServiceRetour(listen_socket.accept())).start();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\ttry {\n\t\t\t\tthis.listen_socket.close();\n\t\t\t} catch (IOException e1) {\n\t\t\t}\n\t\t\tSystem.err.println(\"Arręt du serveur au port \" + this.listen_socket.getLocalPort());\n\t\t}\n//\t\ttry {\n//\t\t\tthis.finalize();\n//\t\t} catch (Throwable e) {\n//\t\t\te.printStackTrace();\n//\t\t}\n\t}", "@Override\n public void run()\n {\n while (true)\n {\n try\n {\n final Socket socket = m_ServerSocket.accept(); // NOFORTIFY: unreleased resource:\n //resources are managed by the remote channel lookup\n m_Logging.info(\"Connection made from %s for remote interface\", \n socket.getRemoteSocketAddress());\n \n m_RemoteChannelLookup.newServerSocketChannel(socket);\n }\n catch (final IOException e)\n {\n if (m_ServerSocket.isClosed())\n {\n m_Logging.info(\"Server socket has been closed, will stop accepting connections\");\n return;\n }\n }\n }\n }", "public void run() {\n\t\t\twhile (true) {// 保持连接直到异常发生或套接字返回\n\t\t\t\ttry {\n\t\t\t\t\tif (serverSocket != null) {\n\t\t\t\t\t\tmTempSocket = serverSocket.accept(); // 如果一个连接同意\n\t\t\t\t\t}\n\t\t\t\t\t// If a connection was accepted\n\t\t\t\t\tif (mTempSocket != null) {\n\t\t\t\t\t\t// Do work to manage the connection (in a separate\n\t\t\t\t\t\t// thread)\n\t\t\t\t\t\tmanageConnectedSocket(); // 管理一个已经连接的RFCOMM通道在单独的线程。\n\t\t\t\t\t\tserverSocket.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n\tpublic void run()\n\t{\n\t\tif (MyServer.flag)\n\t\t{\n\t\t\tTool.getPrintWriter()\n\t\t\t\t\t.println(\"Accept : 3D is online . \\nServer : \" + MyServer.getU3DSocket().size() + \" Connect . \");\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t} catch (InterruptedException e)\n\t\t\t\t{\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// return;\n\t\t} else\n\t\t{\n\t\t\tTool.getPrintWriter().println(\"Accept : Server : \" + MyServer.getSocketList().size() + \" Connect . \");\n\t\t\tTool.getPrintWriter().println(\"Accept : 用户端非3d连接.\");\n\t\t\tTool.getPrintWriter().println(\"Accept : 测试是否空 : \" + (client == null));\n\t\t\tnew Client(client);\n\t\t}\n\t}", "private static void server() throws IOException {\n\t\tServerSocket serverSocket = new ServerSocket(10999);\n\t\t//listener, waiting connection\n\t\tSocket socket = serverSocket.accept();//block\n\t\t//input --> receive / output --> send\n\t\tInputStream inputStream = socket.getInputStream();\n\t\tOutputStream outputStream = socket.getOutputStream();\n\t\t//byte array (stream)\n\t\tbyte[] b = new byte[1024];\n\t\t//read/receive\n\t\tinputStream.read(b);\n\t\t//\n\t\tString resp = client(b);\n\t\t//\n\t\toutputStream.write(resp.getBytes());\n\t\t//closing\n\t\tsocket.close();\n\t\t//close server\n\t\tserverSocket.close();\n\t}", "public void run() {\n\t\t\tPrintWriter out = null;\n\t\t\ttry {\n\n\t\t\t\t/*\n\t\t\t\t * byte[] buf = new byte[2048]; DatagramPacket packet = new\n\t\t\t\t * DatagramPacket(buf, buf.length);\n\t\t\t\t * System.out.print(\"Server: Receiving\\n\");\n\t\t\t\t * incomingUDP.receive(packet);\n\t\t\t\t * \n\t\t\t\t * System.out.print(\"Receiving successful packet with :\" +\n\t\t\t\t * packet.getLength() + \"kb\");\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tout = new PrintWriter(new OutputStreamWriter(\n\t\t\t\t\t\tincoming.getOutputStream()));\n\n\t\t\t\t// inform the server of this new client\n\t\t\t\tServerNMS.this.addClient(out);\n\n\t\t\t\tout.print(\"Welcome to AndyChat! \");\n\t\t\t\tout.println(\"Enter BYE to exit.\");\n\t\t\t\tout.flush();\n\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tincoming.getInputStream()));\n\t\t\t\tfor (;;) {\n\t\t\t\t\tString msg = in.readLine();\n\t\t\t\t\tif (msg == null) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (msg.trim().equals(\"BYE\"))\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tSystem.out.println(\"Received: \" + msg\n\t\t\t\t\t\t\t\t+ \"With size is: \" + msg.getBytes().length\n\t\t\t\t\t\t\t\t+ \"bytes\");\n\t\t\t\t\t\t// broadcast the receive message\n\t\t\t\t\t\tServerNMS.this.broadcast(msg);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tincoming.close();\n\n\t\t\t\tServerNMS.this.removeClient(out);\n\t\t\t} catch (Exception e) {\n\t\t\t\tif (out != null) {\n\t\t\t\t\tServerNMS.this.removeClient(out);\n\t\t\t\t}\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public void run() {\n debugOutput(\"Current working directory \" + this.currDirectory);\n try {\n // Input from client\n controlIn = new BufferedReader(new InputStreamReader(controlSocket.getInputStream()));\n\n // Output to client, automatically flushed after each print\n controlOutWriter = new PrintWriter(controlSocket.getOutputStream(), true);\n\n // Greeting\n sendMsgToClient(\"220 Welcome to the COMP4621 FTP-Server\");\n\n // Get new command from client\n while (!quitCommandLoop) {\n executeCommand(controlIn.readLine());\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n // Clean up\n try {\n controlIn.close();\n controlOutWriter.close();\n controlSocket.close();\n debugOutput(\"Sockets closed and worker stopped\");\n } catch (IOException e) {\n e.printStackTrace();\n debugOutput(\"Could not close sockets\");\n }\n }\n\n }", "final public void run() {\n connectionEstablished();\n\n // The message from the server\n int msg;\n\n // Loop waiting for data\n\n try {\n // messageTimer.schedule(new TimerTask() {\n // @Override\n // public void run() {\n // try {\n // sendFromMessageQueue();\n // } catch (IOException e) {}\n // }\n // }, 0, 100);\n while (!readyToStop) {\n // Get data from Server and send it to the handler\n // The thread waits indefinitely at the following\n // statement until something is received from the server\n\n try { // added in version 2.31\n\n // String cur = input.readLine();\n // handleBig5String(cur + \"\\n\");\n readByte();\n\n } catch (RuntimeException ex) { // thrown by handleMessageFromServer\n\n connectionException(ex);\n }\n }\n } catch (Exception exception) {\n if (!readyToStop) {\n try {\n closeAll();\n } catch (Exception ex) {\n }\n\n clientReader = null;\n connectionException(exception);\n }\n } finally {\n\n clientReader = null;\n connectionClosed(); // moved here in version 2.31\n }\n }", "@Override\n public void run() {\n eventLoopGroup = EPOLL ? new EpollEventLoopGroup() : new NioEventLoopGroup();\n try {\n System.out.println(startServerMsg);\n LOGGER.info(startServerMsg);\n new ServerBootstrap()\n .group(eventLoopGroup)\n .channel(EPOLL ? EpollServerSocketChannel.class : NioServerSocketChannel.class)\n .childOption(ChannelOption.TCP_NODELAY, true)\n .childOption(ChannelOption.SO_KEEPALIVE,true)\n .childOption(ChannelOption.RCVBUF_ALLOCATOR,new AdaptiveRecvByteBufAllocator(1024,16*1024,1024*1024))\n .childHandler(new ChannelInitializer() {\n @Override\n protected void initChannel(Channel ch) {\n ChannelPipeline pipeline = ch.pipeline();\n pipeline.addLast(\"decoder\", new Decoder());\n pipeline.addLast(\"handler\",new TcpServerHandler(viewModel));\n }\n })\n .bind(port).sync().channel().closeFuture().syncUninterruptibly();\n } catch (InterruptedException e) {\n LOGGER.error(\"Failed to start server : \",e);\n e.printStackTrace();\n } finally {\n System.out.println(ANSI_RED+\"Server shutting down.\"+ANSI_RESET);\n LOGGER.info(\"Server shutting down.\");\n eventLoopGroup.shutdownGracefully();\n\n }\n }", "private void listen() {\n\t\ttry {\n\t\t\tServerSocket servSocket = new ServerSocket(PORT);\n\t\t\tSocket clientSocket;\n\t\t\twhile(true) {\n\t\t\t\tclientSocket = servSocket.accept();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error - Could not open connection\");\n\t\t}\n\t\t\n\t}", "public void run() {\n ServerSocketChannelFactory acceptorFactory = new OioServerSocketChannelFactory();\n ServerBootstrap server = new ServerBootstrap(acceptorFactory);\n\n // The pipelines string together handlers, we set a factory to create\n // pipelines( handlers ) to handle events.\n // For Netty is using the reactor pattern to react to data coming in\n // from the open connections.\n server.setPipelineFactory(new EchoServerPipelineFactory());\n\n server.bind(new InetSocketAddress(port));\n }", "public static void main(String[] args) {\n new ServerControl().start();\n new UserMonitor().start();\n boolean listening = true;\n //listen for connection attempt and handle it accordingly\n try (ServerSocket socket = new ServerSocket(4044)) {\n while (listening) {\n new AwaitCommand(Singleton.addToList(socket.accept())).start();\n System.out.println(\"Connection started...\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void startServer(){\r\n try {\r\n\r\n while(true){\r\n\r\n s = sc.accept();\r\n new ServerThread(s).start();\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n try {\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public static void main(String[] args) throws Exception {\n System.out.println(\"The chat server is running.\");\n ServerSocket listener = new ServerSocket(PORT);\n try {\n while (true) {\n new Handler(listener.accept()).start();\n }\n } finally {\n listener.close();\n }\n }", "void initAndListen() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t// Startuje nowy watek z odbieraniem wiadomosci.\n\t\t\t\tnew ClientHandler(clientSocket, this);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"Accept failed.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n\t\tInputStream istream = null;\n\t\ttry {\n\t\t\tistream = (this.socket).getInputStream();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t DataInputStream dstream = new DataInputStream(istream);\n\t \n\t username = null;\n\t try {\n\t \tusername = dstream.readLine();\n\t \tSystem.out.println(username + \" on server side! (username)\");\n\t \tthis.masterServer.addUserName(username);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t // pause thread to read in from client.\n\t\tString friendUsername = null;\n\t try {\n\t \tfriendUsername = dstream.readLine();\n\t \tSystem.out.println(friendUsername + \" on server side!!!!! (friendUsername)\");\n\t \tfindFriendsThread(friendUsername);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t try {\n\t\t\tdstream.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t try {\n\t\t\tistream.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t //this.masterServer.addUserName(username);\n\t \n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\" ThriftServer start ing ....\");\n\t\t\t\ttry { \n\t\t\t\t\tif (!server.isServing()) {\n\t\t\t\t\t\tserver.serve();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tif (transport != null) {\n\t\t\t\t\t\ttransport.close();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "public void run() {\n ServerSocket serverSocket = null;\n try {\n serverSocket = new ServerSocket(8823);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // running infinite loop for getting\n // client request\n while (true)\n {\n Socket socket = null;\n\n try\n {\n // socket object to receive incoming client requests\n socket = serverSocket.accept();\n\n //System.out.println(\"A new client is connected : \" + socket);\n\n // obtaining input and out streams\n InputStream inputStream = new DataInputStream(socket.getInputStream());\n OutputStream outputStream = new DataOutputStream(socket.getOutputStream());\n\n //System.out.println(\"Assigning new thread for this client\");\n\n // create a new thread object\n Thread t = new ClientHandler(socket, inputStream, outputStream);\n\n // Invoking the start() method\n t.start();\n\n }\n catch (Exception e){\n try {\n socket.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n e.printStackTrace();\n }\n }\n }", "public static void main(String[] args) {\n\n try (ServerSocket ss = new ServerSocket(PORT)) {\n System.out.println(\"chat.Server is started...\");\n System.out.println(\"Server address: \" + getCurrentIP() + \":\" + PORT);\n\n while (true) {\n Socket socket = ss.accept();\n new Handler(socket).start();\n }\n\n } catch (IOException e) {\n System.out.println(\"chat.Server error.\");\n }\n }", "public void run(){\r\n\t\tSystem.out.println(\"Launching Server\");\r\n\t\tServer srv = new Server(log);\r\n\t\tnew CollectorServer(srv).start();\r\n\t\ttry {\r\n\t\t\tnew ServerUDPThread(srv).start();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"Error in ServerUDP Broadcast\");\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"resource\")\r\n public void run() {\r\n try {\r\n ServerSocket server = new ServerSocket(ConfigurationFile.getClientPort()[clientNumber-1]);\r\n while(true) {\r\n Socket socket =server.accept();\r\n Thread thread = new Thread(new Connection(socket,hashtable));\r\n thread.start();\r\n }\r\n }\r\n catch(IOException e) {\r\n System.out.println(\"Server socket could not be created. Check configuration file.\");\r\n }\r\n }", "protected void serveClient() {\r\n\t\tif (lineIn == null || lineOut == null) {\r\n\t\t\tSystem.err.printf(\"I/O has not been set up.%n\");\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\tString clientRequest;\r\n\t\t\t\tStringTokenizer args;\r\n\r\n\t\t\t\t// control loop, receiving client requests\r\n\t\t\t\twhile (!exitRecieved) {\r\n\t\t\t\t\t// PRESENT PROMPT\r\n\t\t\t\t\tsendMessage(PROMPT);\r\n\r\n\t\t\t\t\t// ACCEPT & PROCESS INPUT\r\n\t\t\t\t\tclientRequest = receiveMessage();\r\n\t\t\t\t\targs = new StringTokenizer(clientRequest);\r\n\t\t\t\t\tprocessCommand(args);\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tSystem.err.printf(\"IO Error receiving client input: %s%n\", ioe);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void runDeal() {\n\t\ttry {\n\t\t\t// allocate array for up to 10 server threads\n\t\t\tsockServer = new SockServer[100];\n\t\t\texecutor = Executors.newFixedThreadPool(100); // create thread pool\n\t\t\tserver = new ServerSocket(23555, 100); // create ServerSocket\n\n\t\t\twhile (true) {\n\t\t\t\ttry {\n\t\t\t\t\t// create a new runnable object to serve the next client to\n\t\t\t\t\t// call in\n\t\t\t\t\tsockServer[counter] = new SockServer(counter);\n\t\t\t\t\t// make that new object wait for a connection on that new\n\t\t\t\t\t// server object\n\t\t\t\t\tsockServer[counter].waitForConnection();\n\t\t\t\t\t// launch that server object into its own new thread\n\t\t\t\t\texecutor.execute(sockServer[counter]);\n\t\t\t\t\t// then, continue to create another object and wait (loop)\n\n\t\t\t\t} // end try\n\t\t\t\tcatch (EOFException eofException) {\n\t\t\t\t\tSystem.out.println(\"\\nServer terminated connection\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\t++counter;\n\t\t\t\t} // end finally\n\t\t\t} // end while\n\t\t} catch (IOException ioException) {\n\t\t\tSystem.out.println(\"\\nServer terminated connection\");\n\t\t}\n\t}", "public static void startServer() throws IOException {\n ServerSocket serverSocket = new ServerSocket(port_number);\n\n System.out.println(\"Server Up\");\n System.out.println(\"Port number: \" + port_number);\n\n Thread loop = loopClients(serverSocket);\n loop.start();\n\n while (running) {\n try {\n Thread.sleep(1000l);\n\n } catch (Exception e) {\n\n }\n }\n\n loop.stop();\n removeAllClients();\n }", "public static void main(String[] args) throws Throwable {\n ServerSocket server = new ServerSocket();\n server.bind(new InetSocketAddress(3000));\n System.out.println(\"Blocking Socket : listening for new Request\");\n while (true) { // <1>\n Socket socket = server.accept();\n //each incomming request(socket request) allocate in a separate thread\n new Thread(clientHandler(socket)).start();\n }\n }", "@Override\n\tpublic void run() {\n\t\tif (FrameworkHandler.DEBUG_MODE){\n\t\t\tString strType = \"\";\n\t\t\tif (type == RULE_CONNECTION) strType = \"New RemoteRule Listener\";\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(strType + \" LISTENING on port: \" + listeningSocket.getLocalPort());\n\t\t}\n\t\ttry {\n\t\t\twhile (running) {\n\t\t\t\tSocket newSocket = listeningSocket.accept();\n\t\t\t\t\n\t\t\t\tif (FrameworkHandler.DEBUG_MODE)\n\t\t\t\t\tSystem.out.println(\"New request obtained on \" + newSocket.getPort() + \"|\" + newSocket.getLocalPort());\n\t\t\t\t\n\t\t\t\tcreateNewConnection(newSocket);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tFrameworkHandler.exceptionLog(FrameworkHandler.LOG_ERROR, this, e);\n\t\t}\n\t}", "public void startRunning() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tserver = new ServerSocket(6789, 100); //6789 is the port number for docking(Where to connect). 100 is backlog no, i.e how many people can wait to access it.\n\t\t\t\twhile (true) {\n\t\t\t\t\t//This will run forever.\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitForConnection();\n\t\t\t\t\t\tsetupStreams();\n\t\t\t\t\t\twhileChatting();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcatch(EOFException eofException) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tshowMessage(\"\\n The server has ended the connection!\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinally {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcloseAll();\n\t\t\t\t\t\t//Housekeeping.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcatch(IOException ioException ) {\n\t\t\t\t\n\t\t\t\tioException.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "public void run() {\n try {\n\n // Decorate the streams so we can send characters\n // and not just bytes.  Ensure output is flushed\n // after every newline.\n BufferedReader in = new BufferedReader(\n new InputStreamReader(socket.getInputStream()));\n PrintWriter out = new PrintWriter(socket.getOutputStream(), true);\n\n // Send a welcome message to the client.\n out.println(\"Hello, you are client #\" + clientNumber + \".\");\n out.println(\"Enter a line with only a period to quit\\n\");\n\n // Get messages from the client, line by line; return them\n // capitalized\n while (true) {\n String input = in.readLine();\n if (input == null || input.equals(\".\")) {\n break;\n }\n out.println(input.toUpperCase());\n }\n } catch (IOException e) {\n log(\"Error handling client# \" + clientNumber + \": \" + e);\n } finally {\n try {\n socket.close();\n } catch (IOException e) {\n log(\"Couldn't close a socket, what's going on?\");\n }\n log(\"Connection with client# \" + clientNumber + \" closed\");\n }\n }", "public void start()\r\n\t\t{\r\n\t\tDebug.assert(serverSocket != null, \"(Server/123)\");\r\n\r\n \t// flag the server as running\r\n \tstate = RUNNING;\r\n\r\n // Loop while still listening, accepting new connections from the server socket\r\n while (state == RUNNING)\r\n \t{\r\n // Get a connection from the server socket\r\n\t\t\tSocket socket = null;\r\n\t\t\ttry {\r\n socket = serverSocket.accept();\r\n \tif (state == RUNNING) \r\n \t createLogin(socket);\r\n }\r\n \r\n // The socket timeout allows us to check if the server has been shut down.\r\n // In this case the state will not be RUNNING and the loop will end.\r\n\t\t catch ( InterruptedIOException e )\r\n\t\t \t{\r\n\t\t \t// timeout happened\r\n\t\t \t}\r\n\t\t \r\n\t\t // This shouldn't happen...\r\n \t catch ( IOException e )\r\n \t \t{\r\n log(\"Server: Error creating Socket\");\r\n \t \tDebug.printStackTrace(e);\r\n \t }\r\n\t }\r\n\t \r\n\t // We've finished, clean up\r\n disconnect();\r\n\t\t}", "public static void main(String[] args) throws IOException\n {\n ServerSocket listener = new ServerSocket(PORT);\n\n while (true)\n {\n System.out.println(\"[SERVER] Waiting for connection . . . \");\n //takes in the user client sockets\n Socket client = listener.accept();\n //Announces that the user has connected\n System.out.println(\"[SERVER] Connected to client \" + client.getInetAddress());\n ClientHandler clientThread = new ClientHandler(client, clients);\n\n pool.execute(clientThread);\n }\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlisten();\n\t\t\t\t}", "public static void main(String[] args) {\n\n // Set up the thread pool\n threadPool = Executors.newFixedThreadPool(THREAD_POOL_SIZE);\n\n // The server socket that waits for clients to connect\n // Opened in a try-catch block\n try (ServerSocket serverSocket = new ServerSocket(SERVER_PORT_NUMBER)) {\n // looping continuously to accept connections from clients\n while (true) {\n // try-catch to catch IOException cause by the accept() method\n try {\n // getting a client connection, creating a runnable and granting it a thread.\n Socket clientConnectionSocket = serverSocket.accept();\n System.out.println(\"received a request\");\n ServeRequestRunnable serveClientRunnable = new ServeRequestRunnable(clientConnectionSocket);\n threadPool.submit(serveClientRunnable);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } finally {\n threadPool.shutdown();\n }\n }", "public static void main(String[] args) {\n ServerSocket serverSocket = null;\n \n /* Create the server socket */\n try {\n serverSocket = new ServerSocket(9999);\n } catch (IOException e) {\n System.out.println(\"IOException: \" + e);\n System.exit(1);\n }\n room r = new room(\"Lobby\");\n ChatServerThread.addRoom(r);\n /* In the main thread, continuously listen for new clients and spin off threads for them. */\n while (true) {\n try {\n /* Get a new client */\n Socket clientSocket = serverSocket.accept();\n \n /* Create a thread for it and start! */\n ChatServerThread clientThread = new ChatServerThread(clientSocket);\n ChatServerThread.addClient(clientThread);\n new Thread(clientThread).start();\n\n } catch (IOException e) {\n System.out.println(\"Accept failed: \" + e);\n System.exit(1);\n }\n }\n }", "public void run() {\n try {\n while (true) {\n String s = server.readLine();\n if (s != null)\n System.out.println(s);\n else {\n server.close(); // Probably no point.\n throw new IOException(\"Got null from server\"); // Caught below.\n }\n }\n }\n catch (IOException e) {\n System.out.println(\"Server seems to have died \" + e.getMessage());\n System.exit(1); // Give up.\n }\n }", "public void run() {\n\t\tSystem.out.println(\"PingServer thread started\");\n\t\tSocket connection = null;\n\t\tServerSocket server = null;\n\t\t//Create an instance of ServerSocket\n\t\ttry {\n\n\t\t\tserver = new ServerSocket(port);}\n\n\t\t// end try\n\t\tcatch (IOException e) {\n\t\t\tSystem.err.println(e); } // end catch\n\n\t\tconnection = null;\n\t\tSystem.out.println(\"Server socket created\");\n\t\tfor(int i= 0; i < noOfClients ; i++) {\n\t\t\ttry {\n\t\t\t\tconnection = server.accept( );//to accept connection from client \n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"Server got connected to client\");\n\t\t\tif(connection==null||connection.isClosed())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Connection closed\");\n\t\t\t}\n\t\t\tHandleConnection h = new HandleConnection(connection, i+1);//to begin interacting with client \n\n\t\t\th.start();//to start thread \n\n\t\t}\n\t}", "public void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSocket s= ss.accept();\n\t\t\t\tif (DEBUG) System.out.println(s.getInetAddress() + \":\" + s.getPort() + \" connected\");\n\t\t\t\tPlayerHandler ph= new PlayerHandler(s); \n\t\t\t\tph.start();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace(); // Default\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public void run() {\n // Initial connect request comes in\n Request request = getRequest();\n\n if (request == null) {\n closeConnection();\n return;\n }\n\n if (request.getConnectRequest() == null) {\n closeConnection();\n System.err.println(\"Received invalid initial request from Remote Client.\");\n return;\n }\n\n ObjectFactory objectFactory = new ObjectFactory();\n Response responseWrapper = objectFactory.createResponse();\n responseWrapper.setId(request.getId());\n responseWrapper.setSuccess(true);\n responseWrapper.setConnectResponse(objectFactory.createConnectResponse());\n responseWrapper.getConnectResponse().setId(id);\n\n // Return connect response with our (statistically) unique ID.\n if (!sendMessage(responseWrapper)) {\n closeConnection();\n System.err.println(\"Unable to respond to connect Request from remote Client.\");\n return;\n }\n\n // register our thread with the server\n Server.register(id, this);\n\n // have handler manage the protocol until it decides it is done.\n while ((request = getRequest()) != null) {\n\n Response response = handler.process(this, request);\n\n if (response == null) {\n continue;\n }\n\n if (!sendMessage(response)) {\n break;\n }\n }\n\n // client is done so thread can be de-registered\n if (handler instanceof IShutdownHandler) {\n ((IShutdownHandler) handler).logout(Server.getState(id));\n }\n Server.unregister(id);\n\n // close communication to client.\n closeConnection();\n }", "@Override\n public void run() {\n ServerChannel channel;\n if (socketFactory == null) {\n socketFactory = this;\n }\n serverLoop : while (!shutdown) {\n try {\n serverSocket = socketFactory.createServerSocket(port);\n\n Logger.log (new LogEvent (this, \"iso-server\",\n \"listening on \" + (bindAddr != null ? bindAddr + \":\" : \"port \") + port\n + (backlog > 0 ? \" backlog=\"+backlog : \"\")\n ));\n while (!shutdown) {\n try {\n if (pool.getAvailableCount() <= 0) {\n try {\n serverSocket.close();\n fireEvent(new ISOServerShutdownEvent(this));\n } catch (IOException e){\n Logger.log (new LogEvent (this, \"iso-server\", e));\n relax();\n }\n\n for (int i=0; pool.getIdleCount() == 0; i++) {\n if (shutdown) {\n break serverLoop;\n }\n if (i % 240 == 0 && cfg.getBoolean(\"pool-exhaustion-warning\", true)) {\n LogEvent evt = new LogEvent (this, \"warn\");\n evt.addMessage (\n \"pool exhausted \" + serverSocket.toString()\n );\n evt.addMessage (pool);\n Logger.log (evt);\n }\n ISOUtil.sleep (250);\n }\n serverSocket = socketFactory.createServerSocket(port);\n }\n channel = (ServerChannel) clientSideChannel.clone();\n channel.accept (serverSocket);\n\n if (cnt[CONNECT]++ % 100 == 0) {\n purgeChannels ();\n }\n WeakReference wr = new WeakReference (channel);\n channels.put (channel.getName(), wr);\n channels.put (LAST, wr);\n pool.execute (createSession(channel));\n setChanged ();\n notifyObservers (this);\n fireEvent(new ISOServerAcceptEvent(this));\n if (channel instanceof Observable) {\n ((Observable)channel).addObserver (this);\n }\n } catch (SocketException e) {\n if (!shutdown) {\n Logger.log (new LogEvent (this, \"iso-server\", e));\n relax();\n continue serverLoop;\n }\n } catch (IOException e) {\n Logger.log (new LogEvent (this, \"iso-server\", e));\n relax();\n }\n } // while !shutdown\n } catch (Throwable e) {\n Logger.log (new LogEvent (this, \"iso-server\", e));\n relax();\n }\n }\n }", "public static void main(String args[]) {\n if (args.length == 1) {\n System.out.println(\"Attempting to start server on port: \" + args[0]);\n try {\n portNumber = Integer.parseInt(args[0]);\n }\n catch (Exception e) {\n throw new IllegalArgumentException(\"Port number invalid\");\n }\n }\n else if (args.length == 0) {\n System.out.println(\"Attempting to start server on default port: \" + portNumber);\n }\n else {\n throw new IllegalArgumentException(\"Too many arguments. \"\n + \"Should be in form: java Server <port-no>\");\n }\n\n try {\n serverSocket = new ServerSocket(portNumber);\n\n System.out.println(\"Server started\");\n\n while (true) {\n clientSocket = serverSocket.accept(); // listen for clients\n\n System.out.println(\"Client accepted \" + clientSocket.getInetAddress()\n + \":\" + clientSocket.getPort());\n\n // run ServerThread for newly connected client in a new thread and start thread\n int i = 0;\n Login.loadUsers();\n for (i = 0; i < maxClients; i++) {\n if (clients[i] == null) {\n (clients[i] = new ServerThread(clientSocket, clients)).start();\n break;\n }\n }\n\n // if client pool is full, close socket\n if (i == maxClients) {\n PrintStream os = new PrintStream(clientSocket.getOutputStream());\n os.println(\"Server too busy. Please try later.\");\n os.close();\n clientSocket.close();\n }\n }\n }\n catch (IOException i) {\n System.err.println(i);\n }\n finally {\n close();\n }\n }", "public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tthis.sendMessage(Response.WELCOME_MESSAGE);\n\t\t\t// Get new command from client\n\t\t\twhile (true) {\n\t\t\t\tthis.executeCommand();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// If a exception is catch we just close the client connection\n\t\t\ttry {\n\t\t\t\tthis.close();\n\t\t\t} catch (IOException e1) {\n\t\t\t\t/// just throw the exception of the close\n\t\t\t\tthrow new RuntimeException(e1);\n\t\t\t}\n\t\t}\n\t}", "public void startServer()\n\t{\n\t\twhile(true)\n\t\t{\n\t\t\tSystem.out.println(\"Listen\");\n\t\t\tif(listenInitialValuesRequest)\n\t\t\t{\n\t\t\t\tlistenInitialValuesRequest();\n\t\t\t}\n\t\t}\n\t}", "public void startRunning(){\n\t\ttry{\n\t\t\tserver = new ServerSocket(6789, 100);\n\t\t\t//int Port Number int 100 connections max (backlog / queue link)\n\t\t\twhile(true){\n\t\t\t\ttry{\n\t\t\t\t\twaitForConnection();\n\t\t\t\t\tsetupStreams();\n\t\t\t\t\twhileChatting();\n\t\t\t\t\t//connect and have conversation\n\t\t\t\t}catch(EOFException eofe){\n\t\t\t\t\tshowMessage(\"\\n Punk Ass Bitch.\");\n\t\t\t\t}finally{\n\t\t\t\t\tcloseChat();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(IOException ioe){\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}\n\t}", "@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tRecieveSocketOfClient(SocketForClient);\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "public static void main(String[] args) {\n\n Server server = new Server();\n // Accepts any new connections and opens a new socket for data transfer\n while (true) {\n Socket connectionSocket = server.AcceptIncomingConnections();\n if (connectionSocket != null) {\n new Thread(new ServerInstance(connectionSocket)).start();\n } else {\n // Error accepting , terminate server\n System.out.println(\"Error accepting incoming connections. Server shutting down\");\n break;\n }\n }\n }", "public void run() {\n\t\t\twhile (running) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket = mmServerSocket.accept();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tbluetooth_show_message(\"Bluetooth Error! Accepting a connection failed. Reason:\" + e);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If a connection was accepted\r\n\t\t\t\t// Do work to manage the connection (in a separate thread)\r\n\t\t\t\tif (socket != null) {\r\n\t\t\t\t\t//System.out.println(\"=========> Bluetooth Connected as Server <===========\");\r\n\t\t\t\t\tdata_thread = new Data_Thread(socket);\r\n\t\t\t\t\tdata_thread.start();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tmmServerSocket.close();\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tbluetooth.this.server_connect_thread = null;\r\n\t\t}", "public void listen() {\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\tDatagramPacket packet = new DatagramPacket(recieveData, MAX_SIZE);\n\t\t\tint available = 0;\n\t\t\t\n\t\t\ttry {\n\t\t\t\t//The 'receive(...)' method fills up the buffer of the packet we passed into it with the data received\n\t\t\t\tmainSocket.receive(packet);\n\t\t\t\t//available = packet.getLength();\n\t\t\t\tbyte[] data = packet.getData();\n\t\t\t\t\n\t\t\t\tif(data[0] == HEADER && data[1] == CONNECTION)\n\t\t\t\t\tif(askUser(packet, available))\n\t\t\t\t\t\tmakeClientThread();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\tcatch(PortUnreachableException ex) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"PortUnreachableException caught in server side.\\n Unable to recieve packet\\n\");\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"1. IOException Caught in server side.\\n Unable to vertify user\\n\");\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}" ]
[ "0.81615466", "0.8090205", "0.7946404", "0.7791606", "0.77654916", "0.7751868", "0.7706197", "0.76885974", "0.7686986", "0.76441747", "0.7613882", "0.75980663", "0.75615406", "0.748361", "0.7461497", "0.74458265", "0.7438127", "0.7415017", "0.74067456", "0.73734766", "0.7356068", "0.73434997", "0.73362935", "0.73300016", "0.7325975", "0.73233247", "0.7322761", "0.7321245", "0.73011875", "0.7274604", "0.7232098", "0.7222917", "0.72156596", "0.72111374", "0.72107685", "0.71974134", "0.71972555", "0.71945786", "0.7193491", "0.7156554", "0.7154664", "0.71340406", "0.7133822", "0.71294343", "0.71272683", "0.712212", "0.7069367", "0.70627517", "0.706188", "0.7061143", "0.70564824", "0.7042326", "0.7039013", "0.703123", "0.70266867", "0.702312", "0.70171666", "0.7014976", "0.7010187", "0.6993976", "0.6992373", "0.69890964", "0.6970278", "0.6968337", "0.69623077", "0.6959953", "0.6952225", "0.6950091", "0.6947245", "0.6926268", "0.69220537", "0.69209677", "0.69150364", "0.6907251", "0.6902559", "0.68966496", "0.6894003", "0.6891501", "0.688944", "0.6888157", "0.6879706", "0.68795955", "0.6879126", "0.6860423", "0.68552464", "0.68370444", "0.6835855", "0.682964", "0.6826382", "0.6825911", "0.6820183", "0.68158495", "0.6806026", "0.68020767", "0.67990077", "0.6791706", "0.6786231", "0.678378", "0.6778", "0.6771738" ]
0.84400904
0
Generates random 9digit student number
public static ColumnMatch isPhiTerm(final ColumnMetaData data, final String text) { if (StringUtils.isNotBlank(text) && Objects.equals(String.class, data.getColumnType()) && phiList.contains(text.trim().toLowerCase(Locale.ENGLISH))) { log.debug("PHI detected: " + text); return new ColumnMatch( data, 100.0, "phi", List.of(new Probability(text, 1.00)) ); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void studIdGenr()\n {\n \tthis.studentID = (int)(Math.random() * (2047300 - 2047100 + 1) + 2047100);\n }", "public static int generateDigit() {\n\t\t\n\t\treturn (int)(Math.random() * 10);\n\t}", "private static String accountNumberGenerator() {\n char[] chars = new char[10];\n for (int i = 0; i < 10; i++) {\n chars[i] = Character.forDigit(rnd.nextInt(10), 10);\n }\n return new String(chars);\n }", "public static String randomNumberGenerator() {\r\n\t\tint max = 999999999; // e.g. 714053349 (9 digits)\r\n\t\tRandom rand = new Random();\r\n\t\tint min = 0;\r\n\t\tint randomNum = rand.nextInt(max - min + 1) + min;\r\n\t\treturn Integer.toString(randomNum);\r\n\t}", "public static String randomNumberString() {\n\r\n Random random = new Random();\r\n int i = random.nextInt(999999);\r\n\r\n\r\n return String.format(\"%06d\", i);\r\n }", "public String getRandomNumberString() {\n Random rnd = new Random();\n int number = rnd.nextInt(899999) + 100000;\n\n // this will convert any number sequence into 6 character.\n String formatted_code = String.format(\"%06d\", number);\n\n return formatted_code;\n }", "public static String generateMobNum() {\n\t\tString number = RandomStringUtils.randomNumeric(10);\t\n\t\treturn (number);\n\t}", "public static String generateRandomInteger() {\n SecureRandom random = new SecureRandom();\n int aStart = 1;\n long aEnd = 999999999;\n long range = aEnd - (long) aStart + 1;\n long fraction = (long) (range * random.nextDouble());\n long randomNumber = fraction + (long) aStart;\n return String.valueOf(randomNumber);\n }", "public static String getRandomNumberString() {\n Random rnd = new Random();\n int number = rnd.nextInt(9999999);\n\n // this will convert any number sequence into 6 character.\n return String.format(\"%07d\", number);\n }", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "public static int getRandomNumberString() {\n // It will generate 6 digit random Number.\n // from 0 to 999999\n Random rnd = new Random();\n int number = rnd.nextInt(999999);\n\n // this will convert any number sequence into 6 character.\n return number;\n }", "private int randomNum() {\r\n\t return((int)(Math.random() * 100));\r\n\t }", "public String generateNumber(int length) {\n int maxNumber = Integer.parseInt(new String(new char[length]).replace(\"\\0\", \"9\"));\n int intAccountNumber = ThreadLocalRandom.current().nextInt(0, maxNumber + 1);\n int accountNumberLength = String.valueOf(intAccountNumber).length();\n StringBuilder stringBuilder = new StringBuilder();\n if (accountNumberLength < length) {\n stringBuilder.append(new String(new char[length - accountNumberLength]).replace(\"\\0\", \"0\"));\n }\n stringBuilder.append(intAccountNumber);\n return stringBuilder.toString();\n }", "public void generateNewSecret() {\r\n \r\n //Get Random Number With Correct Digits\r\n int intRand = randomNumberGenerator.nextInt((int)(Math.pow(10, numDigits) - Math.pow(10, numDigits - 1))) + (int)Math.pow(10, numDigits - 1);\r\n \r\n //Set To String\r\n String strRand = String.valueOf(intRand);\r\n \r\n //Set Value\r\n secretNumber = convertNumToDigitArray(strRand);\r\n \r\n }", "public int drawpseudocard(){\n Random random = new Random();\n return random.nextInt(9)+1;\n }", "public int getRandomsNumber(){\n Random random = new Random();\n int number = random.nextInt(12) + 1;\n return number;\n }", "@Override\r\n\tpublic String randString(int n) {\n\t\tString base=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n\t\treturn randString(n, base);\r\n\t}", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "private void setAccountNumber() // setare numar de cont\n {\n int random = ThreadLocalRandom.current().nextInt(1, 100 + 1);\n accountNumber = ID + \"\" + random + SSN.substring(0,2);\n System.out.println(\"Your account number is: \" + accountNumber);\n }", "private final String getRandomString() {\n StringBuffer sbRan = new StringBuffer(11);\n String alphaNum = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n int num;\n for (int i = 0; i < 11; i++) {\n num = (int) (Math.random() * (alphaNum.length() - 1));\n sbRan.append(alphaNum.charAt(num));\n }\n return sbRan.toString();\n }", "public static String generateID(int num){\n StringBuilder str=new StringBuilder();//定义变长字符串\n Random random=new Random();\n for (int i = 0; i < num; i++) {\n str.append(random.nextInt(10));\n }\n return str.toString();\n }", "public String generateString() {\n\t\tint maxLength = 9;\n\t\tRandom random = new Random();\n\t\tStringBuilder builder = new StringBuilder(maxLength);\n\n\t\t// Looping 9 times, one for each char\n\t\tfor (int i = 0; i < maxLength; i++) {\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\n\t\t}\n\t\t// Generates a random ID that has may have a quintillion different combinations\n\t\t// (1/64^9)\n\t\treturn builder.toString();\n\t}", "public int generateRandom() {\n\t\tint random = (int)(Math.random()*((6-1)+1))+1;\n\t\treturn random;\n\t}", "private String getRandomPIN(int num) {\n\t\tStringBuilder randomPIN = new StringBuilder();\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\trandomPIN.append((int) (Math.random() * 10));\n\t\t}\n\t\treturn randomPIN.toString();\n\t}", "public static String randInt(){\n return String.valueOf(rand.nextInt(10));\n }", "public int randomNum()\r\n {\r\n Random rand = new Random();\r\n int n = rand.nextInt(52)+1;\r\n return n;\r\n }", "public static int randNum() {\r\n\t\tint rand = (int)(Math.random()*((100)+1)); // Num generated between [0, 100]\r\n\t\treturn rand;\r\n\t}", "public static String createRandomNum() {\n\t\tlogger.debug(\"Navigating to URL\");\n\t\tString num = \"\";\n\t\ttry {\n\t\t\tnum = RandomStringUtils.random(4, true, true);\n\t\t\tlogger.debug(\"Generated Random Number is : \" + num);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn num;\n\t}", "private void getRandomNumber() {\n\t\tRandom random = new Random();\n\t\tint randomCount = 255;\n\t\tint randNum = 0; \n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\trandNum = random.nextInt(randomCount);\n\t\t\tswitch (numberType) {\n\t\t\tcase 1:\n\t\t\t\trandomNumbers.add(Integer.toString(randNum));\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(randNum > 15)\n\t\t\t\t\trandomNumbers.add(String.format(\"%8s\", Integer.toBinaryString(randNum)).replace(\" \", \"0\"));\n\t\t\t\telse\n\t\t\t\t\trandomNumbers.add(String.format(\"%4s\", Integer.toBinaryString(randNum)).replace(\" \", \"0\"));\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\trandomNumbers.add(Integer.toHexString(randNum));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "void setRandomNo() {\n\t\tno = 10000000 + (int) (Math.random() * 90000000);\n\t}", "public String generateTrackingNumber() {\n String randChars = \"ABCDEFGHIJ0123456789\";\n StringBuilder trackingNumber = new StringBuilder();\n Random rand = new Random();\n \n while(trackingNumber.length() < 12) {\n int i = (int) (rand.nextFloat() * randChars.length());\n trackingNumber.append(randChars.charAt(i));\n }\n String trackingNum = trackingNumber.toString();\n return trackingNum;\n }", "private int aleatorizarNumero() {\n\t\tint aux;\n\t\taux = r.getIntRand(13) + 1;\n\t\treturn aux;\n\t}", "private String generatePhone() {\n\t\tString ret = \"\";\n\t\tString[] areaCode = { \"051\", \"055\", \"045\", \"043\", \"053\" };\n\n\t\t// Gets an area code\n\t\tret = areaCode[(new Random()).nextInt(5)];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint n = (new Random()).nextInt(9);\n\n\t\t\t// Checks if the first number is 0\n\t\t\tif (i == 0 && n == 0) {\n\t\t\t\ti -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tret += n;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t}", "void generateGradeCard(String studentId);", "private int generateRandomNumber() {\n\t\treturn (int) Math.floor(Math.random() * Constants.RANDOM_NUMBER_GENERATOR_LIMIT);\n\t}", "public static int getRandomNumber(){\n int random = 0; // set variable to 0\r\n random = (int)(Math.random()*10) + 1; //generate random number between 1 and 10\r\n return random; //return random number\r\n }", "int RandomGenerator0To29 (){\n\t\t int randomInt2 = 0;\n\t\t Random randomGenerator2 = new Random();\n\t\t for (int idx2 = 1; idx2 <= 10; ++idx2) {\n\t\t\t randomInt2 = randomGenerator2.nextInt(30);\n\t\t }\n\t\t return randomInt2;\n\t }", "public static int generateRandomNumber()\n\t{\n\t\tRandom r = new Random();\n\t\treturn r.nextInt();\n\t}", "private String genNewAccountNumber(int clientId) {\r\n\t\t// keep 4 digits\r\n\t\tint acNumber = clientId * 1000 + (int) (Math.random() * 900);\r\n\t\treturn String.valueOf(acNumber);\r\n\t}", "private String getRandomSeed() {\n long newSeed = 0;\n Random randBoolean = new Random(randomSeed);\n for (int i = 0; i < 48; i++) {\n if (randBoolean.nextBoolean()) {\n newSeed += 1 << i;\n }\n }\n if (newSeed < 0) {\n newSeed = Math.abs(newSeed);\n }\n\n String s = \"\";\n if (newSeed == 0) {\n s += \"0\";\n } else {\n while (newSeed != 0) {\n long num = (newSeed & (0xF));\n if (num < 10) {\n s = num + s;\n } else {\n s = ((char) (num + 55)) + s;\n }\n newSeed = newSeed >> 4;\n }\n }\n return s;\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }", "public static int randomNumberAlg(){\r\n int max = 10;\r\n int min = 1;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }", "@Override\r\n\tpublic String randString(int n, String base) {\n\t\tint bLength = base.length();\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tRandom r = new Random();\r\n\t\tint index;\r\n\t\tfor(int i=0; i<n; i++)\r\n\t\t{\r\n\t\t\tindex = r.nextInt(bLength);\r\n\t\t\tsb.append(base.charAt(index));\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public static int randomNumber(){\r\n int max = 10;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }", "public void generatePlate(){\r\n\t\tfor(int i = 0; i<3; i++){ // Using math random to generate three upper case letter \r\n\t\t\tSystem.out.print((char)((int)'A'+Math.random()*((int)'Z'-(int)'A'+1)));\r\n\t\t}\r\n\t\tSystem.out.print(\"-\");\r\n\t\tfor(int i=0; i<4; i++){ // using math random to generate four integers\r\n\t\t\tSystem.out.print((int)(Math.random()*10));\r\n\t\t}\r\n\t}", "private int randomHelper() {\n\t\tRandom rand = new Random();\n\t\tint randomNum = rand.nextInt((10000 - 1) + 1) + 1;\n\t\treturn randomNum;\n\t}", "public String generate() {\r\n String result = RandomStringUtils.random(8,true,true);\r\n return result;\r\n }", "public synchronized static final String generateRandomString(int n) {\n\t\tchar[] chars = \"abcdefghijklmnopqrstuvwxyz1234567890\".toCharArray();\n\t\tSecureRandom random = new SecureRandom();\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsb.append(chars[random.nextInt(chars.length)]);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public int generateNumber(int difficulty) {\n Random generator = new Random();\n return 1 + generator.nextInt((int) Math.pow(10, difficulty));\n }", "private String createId() {\n int idLength = 5;\n String possibleChars = \"1234567890\";\n Random random = new Random();\n StringBuilder newString = new StringBuilder();\n\n for (int i = 0; i < idLength; i++) {\n int randomInt = random.nextInt(10);\n newString.append(possibleChars.charAt(randomInt));\n }\n\n return newString.toString();\n }", "public String getRandomCustNum() {\n\t\tString generatedCustNum = RandomStringUtils.randomAlphanumeric(Integer.valueOf(custNumLimit));\n\t\tlog.info(\"generatedCustNum: \" + generatedCustNum);\n\t\treturn generatedCustNum;\n\t}", "private String getID()\n {\n String chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+{}|:<>?/.,';][=-`~\";\n String id = \"\";\n int max = new Random().nextInt((16 - 12) + 1)+12;\n for(int i=0;i<16;i++)\n {\n int r = new Random().nextInt((chars.length()-1 - 0) + 1)+0;\n id+=chars.charAt(r);\n }\n return id;\n }", "private static String smsCode() {\n\t\t\tString random=new Random().nextInt(1000000)+\"\";\r\n\t\t\treturn random;\r\n\t\t}", "private static int getRandomNumberOfRooms(){\r\n return r.nextInt(50)+1;\r\n }", "public int generarNombreAleatori() {\n\t\tRandom random = new Random();\n\t\treturn random.nextInt((9) - 1) + 1;\n\t}", "private static int newSecretNumber(int min, int max)\n {\n Random rnd = new Random();\n return rnd.nextInt((max + 1 - min) + min);\n }", "private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();\n while (pwLength-- != 0) {\n int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());\n pw.append(ALPHA_NUMERIC_STRING.charAt(character));\n }\n return pw.toString(); //\n }", "public static int randomNumber() {\n //Random rndNumbers = new Random();\n //for(int i = 0; i < 100; i++) {\n // int rndNumber = rndNumbers.nextInt();\n // System.out.println(rndNumber);\n int rand = (int) (Math.random() * 100);\n System.out.println(rand);\n if (rand > 50) {\n return rand;\n } else {\n System.out.println(\"-1\");\n }\n return rand;\n }", "public static void main(String[] args) {\n\t\tint num=(int) (Math.random()*36 ) ;\r\n\t\tSystem.out.println( Math.random());WW\r\n\t\tSystem.out.println(num);\r\n\t}", "public static String generateRandomNonce() {\n Random r = new Random();\n StringBuffer n = new StringBuffer();\n for (int i = 0; i < r.nextInt(8) + 2; i++) {\n n.append(r.nextInt(26) + 'a');\n }\n return n.toString();\n }", "public static String generateRandomNumericString(int length) {\n return RandomStringUtils.randomNumeric(length);\n }", "int RandomGeneratorZeroToThree (){\n\t\t int randomInt = 0;\n\t\t Random randomGenerator = new Random();\n\t\t for (int idx = 1; idx <= 10; ++idx) {\n\t\t\t randomInt = randomGenerator.nextInt(4);\n\n\t\t }\n\t\t return randomInt;\n\t }", "private static int getSecretNum(int arg1) {\n Random rand = new Random();\n return rand.nextInt(UPPERBOUND)+1; //make range 1-100\n }", "private void randomNumbers(){\n ranA = n.nextInt(9) + 1;\n\n //second digit\n do {\n ranB=n.nextInt(9)+1;\n }while(ranB == ranA);\n\n //third digit\n do {\n ranC=n.nextInt(9)+1;\n }while(ranC == ranA || ranC==ranB);\n\n //fourth digit\n do {\n ranD=n.nextInt(9)+1;\n }while(ranD == ranA || ranD == ranB || ranD == ranC);\n }", "public int randomNum() {\n\t\treturn 1 + (int) (Math.random() * 3); // randomNum = minimum + (int)(Math.random() * maximum);\n\t}", "public static int genID(){\n Random rand = new Random();\n\n int theID = rand.nextInt(999)+1;\n\n return theID;\n\n }", "public String genUserToken()\n\t{\n\t\tString token = \"\";\n\t\tfor (int i = 0; i < 16; i++)\n\t\t{\n\t\t\ttoken = token + tokenGenerator.nextInt(10);\n\t\t}\n\t\treturn token;\n\t}", "private static String palindromeGenerator(int n) {\n\t\tif (n <= 0) return \"\";\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (n % 2 == 1) sb.append((char)(randomGenerator.nextInt(25) + 'a'));\n\t\twhile (sb.length() < n) {\n\t\t\tchar temp = (char)(randomGenerator.nextInt(25) + 'a');\n\t\t\tsb.insert(0, temp);\n\t\t\tsb.append(temp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "int generarNumeroNota();", "public static int randomNumber100(){\r\n int max = 100;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }", "public String generateAccountNumber() {\n // Set First part of AccountNumber\n String accountNumberFirst = \"1398\";\n\n // To Make Second, Third part Get each date and time\n String currentTime = getCurrentTime();\n\n // Get year, month, day\n String date = currentTime.split(\" \")[0];\n int year, month, day;\n year = Integer.parseInt(date.split(\"-\")[0]);\n month = Integer.parseInt(date.split(\"-\")[1]);\n day = Integer.parseInt(date.split(\"-\")[2]);\n\n // Get hour, minute, second\n String time = currentTime.split(\" \")[1];\n int hour, minute, second;\n hour = Integer.parseInt(time.split(\":\")[0]);\n minute = Integer.parseInt(time.split(\":\")[1]);\n second = Integer.parseInt(time.split(\":\")[2]);\n\n // Set Second part of AccountNumber\n String accountNumberSecond;\n accountNumberSecond = Integer.toString((year % 10)) + Integer.toString((month * second) % 10) + Integer.toString((day * minute + hour) % 10);\n\n // Set Third part of AccountNumber\n String accountNumberThird;\n accountNumberThird = Integer.toString((second * hour + minute) % 10) + Integer.toString((second * day + hour) % 10) + Integer.toString((day * month + second) % 10) + Integer.toString((second * minute + day) % 10);\n\n // Set Forth part of AccountNumber\n String accountNumberForth;\n int count = (int)accountDataRepository.count();\n if(count % 100 < 10) {\n accountNumberForth = \"0\" + Integer.toString(count % 100);\n }\n else {\n accountNumberForth = Integer.toString(count % 100);\n }\n\n // Generate AccountNumber\n String accountNumber = accountNumberFirst + \"-\" + accountNumberSecond + \"-\" + accountNumberThird + \"-\" + accountNumberForth;\n\n return accountNumber;\n }", "public NUID() {\n // Generate a cryto random int, 0 <= val < max to seed pseudorandom\n seq = nextLong(PRAND, maxSeq);\n inc = minInc + nextLong(PRAND, maxInc - minInc);\n pre = new char[preLen];\n for (int i = 0; i < preLen; i++) {\n pre[i] = '0';\n }\n randomizePrefix();\n }", "public static String generateId(int digitAmount) {\n\t\t\n\t\tfinal String upperAlpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\t\t\n\t\tString brokerOrderID = \"\";\n\t\tfor (int i = 0; i < digitAmount; i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tint randomAlphaIndex = ThreadLocalRandom.current().nextInt(0, 25 + 1);\n\t\t\t\tbrokerOrderID += upperAlpha.charAt(randomAlphaIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint randomInteger = ThreadLocalRandom.current().nextInt(1, 9 + 1);\n\t\t\t\tbrokerOrderID += Integer.toString(randomInteger);\n\t\t\t}\n\t\t}\n\t\treturn brokerOrderID;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tRandom random = new Random();\n\t\tint randonNumber = random.nextInt(100);//here we need to mention upto what range we need random number of.\n\t\tSystem.out.println(randonNumber);\n\t\t\n\t\t\n\t\t//Approach 2 for decimal\n\t\t\n\t\tSystem.out.println(Math.random());\n\t\t\n\t\t\n\t\t//Approach 3 - Apache commons-lang ApI\n\t\t\n\t\tString randNumber = RandomStringUtils.randomNumeric(10);\n\t\t\n\t\tSystem.out.println(randNumber);\n\n\t}", "static public int getHobgoblinStr(){\n str = rand.nextInt(3) + 3;\n return str;\n }", "private String crearCodigoRuta(String nombre){\n String fecha = new SimpleDateFormat(\"ddMMyyyy\").format(new Date());\n Random randomGenerator = new Random();\n int RndNum = randomGenerator.nextInt(1000);\n\n return nombre+\"_\"+fecha+\"_\"+RndNum;\n }", "static String getAlphaNumericString(int n) \n {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n + \"0123456789\"\n + \"abcdefghijklmnopqrstuvxyz\"; \n \n // create StringBuffer size of AlphaNumericString \n StringBuilder sb = new StringBuilder(n); \n \n for (int i = 0; i < n; i++) { \n \n // generate a random number between \n // 0 to AlphaNumericString variable length \n int index \n = (int)(AlphaNumericString.length() \n * Math.random()); \n \n // add Character one by one in end of sb \n sb.append(AlphaNumericString \n .charAt(index)); \n } \n \n return sb.toString(); \n }", "private String getToken() {\n\t\tString numbers = \"0123456789\";\n\t\tRandom rndm_method = new Random();\n String OTP = \"\";\n for (int i = 0; i < 4; i++)\n {\n \tOTP = OTP+numbers.charAt(rndm_method.nextInt(numbers.length()));\n \n }\n return OTP;\n\t}", "static String getRandomString(int n){\n StringBuilder sb = new StringBuilder(n); \r\n \r\n for (int i = 0; i < n; i++) { \r\n \r\n // generate a random number between \r\n // 0 to AlphaNumericString variable length \r\n int index = (int)(alphabet.length() * Math.random()); \r\n \r\n // add Character one by one in end of sb \r\n sb.append(alphabet.charAt(index)); \r\n } \r\n \r\n return sb.toString(); \r\n }", "private synchronized static String getNextNumber() {\n String toReturn;\n String number = String.valueOf(Math.round(Math.random() * 89999) + 10000);\n if(meetings.containsKey(number)) {\n toReturn = getNextNumber();\n } else {\n toReturn = number;\n }\n return toReturn;\n }", "public static String getSSN() {\n\t\tint part1 = getRandomInt(100, 999);\n\t\tint part2 = getRandomInt(0, 99);\n\t\tint part3 = getRandomInt(0, 9999);\t\t\n\t\tString ssn = paddingNumber(part1, 3) + \"-\" + paddingNumber(part2, 2) + \"-\" + paddingNumber(part3, 4);\n\t\treturn ssn;\n\t}", "public static void main(String[] args) {\n //The letters are randomly chosen through this block of code with use of ASCII code.\n char let1 = (char) ((int)(Math.random() * 26 + 65));\n char let2 = (char) ((int)(Math.random() * 26 + 65));\n char let3 = (char) ((int)(Math.random() * 26 + 65));\n \n //This generates a number of four digits to follow the letters. \n int num = (int)(Math.random() * 9000 + 999);\n \n //The combination is now printed to the screen through this. \n System.out.println(\"The plate number is \" + let1 + let2 +let3 + num); \n }", "public static void main(String[] args) {\n Random rd = new Random();\n int num;\n for (int i = 1; i < 2; i++) {\n num = rd.nextInt(8)+1;\n System.out.println(num);\n }\n }", "private static String generateRandomString(int size) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < size / 2; i++) sb.append((char) (64 + r.nextInt(26)));\n return sb.toString();\n }", "public String generate(final int count){\n return RandomStringUtils.random(count, true, true);\n }", "static String getAlphaNumericString(int n) \n {\n byte[] array = new byte[256]; \n new Random().nextBytes(array); \n \n String randomString \n = new String(array, Charset.forName(\"UTF-8\")); \n \n // Create a StringBuffer to store the result \n StringBuffer r = new StringBuffer(); \n \n // Append first 20 alphanumeric characters \n // from the generated random String into the result \n for (int k = 0; k < randomString.length(); k++) { \n \n char ch = randomString.charAt(k); \n \n if (((ch >= 'a' && ch <= 'z') \n || (ch >= 'A' && ch <= 'Z') \n || (ch >= '0' && ch <= '9')) \n && (n > 0)) { \n \n r.append(ch); \n n--; \n } \n } \n \n // return the resultant string \n return r.toString(); \n }", "public int generateStrength() {\n\t\tRandom rand = new Random();\n\t\tint strength = rand.nextInt(41) - 10;\n\t\treturn strength;\n\t}", "public void generarId() {\n try{\n int numAleatorio = (int)(Math.random()*99999);\n boolean resultado = dgt.generarIdAutomatico(numAleatorio);\n tfid.setText(String.valueOf(numAleatorio));\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "public int generateSessionID(){\r\n SecureRandom randsession = new SecureRandom();\r\n return randsession.nextInt(1234567890);\r\n }", "@Override\n public java.lang.String generateRackID() {\n String randomString = \"\";\n String rackId = \"\";\n for (int i = 0; i < 2; i++) {\n char[] arr = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\n int select = new Random().nextInt(arr.length);\n randomString += arr[select];\n }\n\n rackId = randomString.toUpperCase() + \".\" + rackCounter + \".\" + copyrightYear;\n rackCounter++;\n return rackId;\n }", "public static String getAlphaNumericString(int n) \n {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n + \"0123456789\";\n \n // create StringBuffer size of AlphaNumericString \n StringBuilder sb = new StringBuilder(n); \n \n for (int i = 0; i < n; i++) { \n \n // generate a random number between \n // 0 to AlphaNumericString variable length \n int index \n = (int)(AlphaNumericString.length() \n * Math.random()); \n \n // add Character one by one in end of sb \n sb.append(AlphaNumericString \n .charAt(index)); \n } \n \n return sb.toString(); \n }", "public static String getRandomAplhaNumeric(String characters) {\n\t\tSecureRandom secureRnd = new SecureRandom();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < 5; i++)\n\t\t\tsb.append(characters.charAt(secureRnd.nextInt(characters.length())));\n\t\treturn sb.toString();\n\t}", "private static int get() { \r\n Random r = new Random();\r\n return (r.nextInt(9));\r\n }", "String generateUID();", "@Test\n public void createRandomNumber() throws IOException {\n Assert.assertNotNull(Utils.createRandomNumber());\n }", "RandomIdNoLuhnProvider(int length) {\n this.length = length;\n }", "public String GenerateID()\n\t{\n\t\tRandom randomGenerator = new Random();\n\t\treturn Integer.toString(randomGenerator.nextInt(Integer.MAX_VALUE));\n\t}", "private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }", "private String getAlphaNumericString(int n) \n {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n + \"0123456789\"\n + \"abcdefghijklmnopqrstuvxyz\"; \n \n // create StringBuffer size of AlphaNumericString \n StringBuilder sb = new StringBuilder(n); \n \n for (int i = 0; i < n; i++) { \n \n // generate a random number between \n // 0 to AlphaNumericString variable length \n int index \n = (int)(AlphaNumericString.length() \n * Math.random()); \n \n // add Character one by one in end of sb \n sb.append(AlphaNumericString \n .charAt(index)); \n } \n \n return sb.toString(); \n }", "private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}" ]
[ "0.7500331", "0.7211322", "0.71448094", "0.7139813", "0.7077523", "0.693755", "0.6913095", "0.687542", "0.68739957", "0.68513083", "0.68214786", "0.68173426", "0.6809176", "0.678411", "0.6689483", "0.66152155", "0.6610483", "0.6573009", "0.65502495", "0.6525297", "0.6523184", "0.6517336", "0.65036875", "0.6495416", "0.6444705", "0.64363575", "0.64158714", "0.6397045", "0.63919705", "0.638981", "0.6384462", "0.63658714", "0.6364939", "0.6322611", "0.63016593", "0.6288869", "0.6267742", "0.6256028", "0.6229877", "0.62021023", "0.6197057", "0.61792284", "0.61705846", "0.61676145", "0.6165089", "0.6164777", "0.61617494", "0.61569357", "0.6154997", "0.6152062", "0.61424685", "0.61364675", "0.61284226", "0.6106668", "0.61050135", "0.61011076", "0.60982925", "0.6097191", "0.60891426", "0.6087338", "0.6085849", "0.60569763", "0.60566765", "0.6051456", "0.6026323", "0.6025756", "0.602522", "0.6011789", "0.6005311", "0.6004657", "0.5998775", "0.59868413", "0.59845823", "0.5976254", "0.5967249", "0.5954029", "0.5951425", "0.5950956", "0.5950771", "0.5949288", "0.59481025", "0.59407705", "0.59378374", "0.5937399", "0.59317684", "0.59268504", "0.59257656", "0.59248966", "0.5904468", "0.5904415", "0.5899662", "0.58993226", "0.5897333", "0.5891091", "0.58891165", "0.58863", "0.5885973", "0.5877823", "0.58772945", "0.58754617", "0.5874106" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("This is my class "); }
{ "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
create the Scanner object representing the keyboard
public static void main(String[] args) { Scanner console = new Scanner(System.in); //declare constants final double NUM = 0.5, SENTINEL = -1; //declare variables double k, m = 0, v, average, sum = 0; int count = 0; while( m != SENTINEL)//set sentinel { //input m System.out.print("\nEnter the mass of the object in Kilograms ( -1 to exit): "); m = console.nextDouble(); if(m == SENTINEL)//check sentinel { //calculate average average = sum / count; //output average System.out.printf("\nThe average kinetic energy is %,.2f", average); }// end if else if(m <= 0)//validate m { System.out.print("\nInvalid, mass must be greater than zero."); }// end else if else { //input v System.out.print("Enter the velocity of the object in meters per second: "); v = console.nextDouble(); while(v < 0)//validate v { System.out.print("\nInvalid, velocity cannot be negative."); System.out.print("\nEnter the velocity of the object in meters per second: "); v = console.nextDouble(); }// end while //increase count count ++; //calculate k k = m * (v * v) * NUM; //increase sum sum += k; //output k System.out.printf("\nThe kinetic energy of the object is %,.2f\n", k); }// end else }// end while }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public Menu() {\n scanner = new Scanner(System.in);\n }", "private ConsoleScanner() {}", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public TerminalGame()\n \t{\n \t\tsuper();\n \t\tbuilder = new StringBuilder();\n \t\tscanner = new Scanner(System.in);\n \t}", "public InputReader() {\n reader = new Scanner(System.in);\n }", "public static Keyboard getKeyboard()\r\n\t{\r\n\t\t\r\n\t\tSystem.out.println ( \"What is the brand of keyboard?\" );\r\n\t\tString brand = input.next ( );\r\n\t\tSystem.out.println ( \"What is the model of keyboard?\" );\r\n\t\tString model = input.next ( );\r\n\t\tSystem.out.println ( \"What are the types of switches?\" );\r\n\t\tString switchType = input.next( );\r\n\t\tSystem.out.println ( \"How many do you have in stock?\" );\r\n\t\tint stock = input.nextInt( );\r\n\t\tSystem.out.println ( \"What is the price?\" );\r\n\t\tdouble price = input.nextDouble( );\r\n\t\tKeyboard kb1 = new Keyboard(brand, model, switchType, stock, price);\r\n\r\n\t\treturn kb1;\r\n\t\t\r\n\t}", "public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }", "static InputScanner getInputScanner() {\n return inputScanner;\n }", "public Game() {\n\t\tsc = new Scanner(System.in);\n\t}", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public parserCapas(java_cup.runtime.Scanner s) {super(s);}", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(String source) {\n // The source code read in from stdin is stored here as a char array\n // TODO: if source is empty in Sc.java do something??\n this.source = source.toCharArray();\n this.position = 0;\n this.size = source.length();\n this.comments = false;\n this.depth = 0;\n this.called = false;\n }", "@Test\n public void testConstructor() {\n System.out.println(\"KEntry\");\n String expResult = \"a 2 - 9 3\";\n Scanner scanner = new Scanner(expResult);\n KEntry instance = new KEntry(scanner);\n assertEquals(\"direction\", Direction.HORIZONTAL, instance.getDirection());\n assertEquals(\"toString\", expResult, instance.toString());\n }", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "public In(){\n\t\tscanner=new Scanner(new BufferedInputStream(System.in),CHARSET_NAME);\n\t\tscanner.useLocale(LOCALE);\n\t}", "Input createInput();", "public GameMainMenu(Scanner in) {\n this.in = in;\n }", "INPUT createINPUT();", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "public Sintactico(java_cup.runtime.Scanner s) {super(s);}", "public QuestionsGame(Scanner input){\n //initialize questionTree by using content stored in input\n this.questionTree = this.readTree(input);\n }", "public WelcomeGame() {\r\n\t\tthis.input = new Scanner(System.in);\r\n\t}", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "TicTacToe(){\n\t\tplayerMgr=new PlayerManager();\n\t\tinterp=new Interpreter();\n\t\tgameMgr=new GameManager();\n\t\tkeyBoard=new Scanner(System.in);\n\t}", "public Scanner(String program) {\n\t\tthis.program=program;\n\t\tpos=0;\n\t\ttoken=null;\n\t\tinitWhitespace(whitespace);\n\t\tinitDigits(digits);\n\t\tinitLetters(letters);\n\t\tinitLegits(legits);\n\t\tinitKeywords(keywords);\n\t\tinitOperators(operators);\n }", "public WrongInputDataInScanner() {\n\tsuper();\n\t\n}", "private Scanner getInput(String name) {\n try {\n return new Scanner(new File(name));\n } catch (IOException excp) {\n throw error(\"could not open %s\", name);\n }\n }", "public UserInput()\n {\n try\n {\n scanner = new Scanner(System.in);\n input = new InputMethods();\n citiesTotal = new CityContainer();\n\n if(scanner != null)\n {\n askUser();\n }\n } catch(Exception ex)\n {\n }\n }", "public Menu(Calendar calendar) {\n this.calendar = calendar;\n input = new Scanner(System.in);\n }", "public ConsoleView() {\n\t\tcrapsControl = new CrapsControl();\n\t\tinput = new Scanner(System.in);\n\t}", "public CoolParser(java_cup.runtime.Scanner s) {super(s);}", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public AnalizadorSintactico(java_cup.runtime.Scanner s) {super(s);}", "public SintacticoH(java_cup.runtime.Scanner s) {\r\n super(s);\r\n }", "public JumpIN() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t\tthis.parser = new Parser();\r\n\r\n\t\t// Defaulting to level 1 for now\r\n\t\tboard = new Board(2);\r\n\t}", "public abstract Keyboard createKeyboard(Keyboard.ThemeType theme);", "public alphabetize()\n {\n word = new Scanner(System.in);\n }", "public parserCapas(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(Scanner scanner) {\n this.scanner = scanner;\n scan();\n }", "public void inputScanner(){\n\t\t Scanner sc=new Scanner(System.in); \n\t \n\t\t System.out.println(\"Enter your rollno\"); \n\t\t int rollno=sc.nextInt(); \n\t\t System.out.println(\"Enter your name\"); \n\t\t String name=sc.next(); \n\t\t System.out.println(\"Enter your fee\"); \n\t\t double fee=sc.nextDouble(); \n\t\t System.out.println(\"Rollno:\"+rollno+\" name:\"+name+\" fee:\"+fee); \n\t\t sc.close(); \n\t}", "public FractalParser(java_cup.runtime.Scanner s) {super(s);}", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return getScanner().next_token(); \n }", "private Input()\n {\n }", "public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }", "private Direction readDirectionFromKeyboard(Scanner scanner) {\n\t\tSystem.out.print(\"Qual direcao? (8,4,6,2)\");\n\t\t//le direcao como INT\n\t\tint directionInt = scanner.nextInt();\n\t\tswitch (directionInt) {\n\t\tcase 8:\n\t\t\treturn Direction.UP;\n\t\tcase 4:\n\t\t\treturn Direction.LEFT;\n\t\tcase 6:\n\t\t\treturn Direction.RIGHT;\n\t\tcase 2:\n\t\t\treturn Direction.DOWN;\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}", "void scanner() {\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\tString source = \"asdqw easd casa\";\r\n\t\tScanner s1 = new Scanner(source);\r\n\t\t// hasNext() - testuje wartosc kolejnego tokena, ale go nie pobiera\r\n\t\t// next() - pobiera kolejny token\r\n\t\t// domyslnie bialy znak jest delimiterem\r\n\t\twhile (s1.hasNext()) {\r\n\t\t\tSystem.out.println(s1.next());\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// hasNextXxx() - dla wszystkich primitives oprocz chara\r\n\t\t// nextXxx() - pobiera kolejny prymitywny token\r\n\t\tScanner s2 = new Scanner(\"1 true 34 hi\");\r\n\t\tboolean b;\r\n\t\twhile (b = s2.hasNext()) {\r\n\t\t\tif (s2.hasNextInt()) {\r\n\t\t\t\tint i = s2.nextInt();\r\n\t\t\t\tSystem.out.println(\"integer token: \" + i);\r\n\t\t\t} else if (s2.hasNextBoolean()) {\r\n\t\t\t\tboolean b2 = s2.nextBoolean();\r\n\t\t\t\tSystem.out.println(\"boolean token: \" + b2);\r\n\t\t\t} else {\r\n\t\t\t\tString str = s2.next();\r\n\t\t\t\tSystem.out.println(\"String token: \" + str);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// useDelimiter(delimiter) - ustawienie delimitera (wyrazenia regularnego) wg ktorego bedzie przetwarzany strumien\r\n\t\t// domyslnym delimiterem jest spacja, tabulator, ogolnie bialy znak lub znaki\r\n\t\tScanner s3 = new Scanner(\"Test1 true 34 hi\");\r\n\t\ts3.useDelimiter(\"\\\\d\"); // delimiterem jest cyfra\r\n\t\twhile (s3.hasNext()) {\r\n\t\t\tSystem.out.println(s3.next());\r\n\t\t}\r\n\t}", "public static String inputStringFromKeyboard(String input){\n System.out.println(\"Input the String: \");\n //Scanner, save the inputted from keyboard\n Scanner scanner = new Scanner(System.in);\n //The value 'scanner' is assigned to 'input'\n input = scanner.next();\n return input;\n }", "public interface KeyboardDriver {\n\n void type(char key);\n\n}", "public static\n Terminal in() {\n return Input.terminal;\n }", "public Game()\n {\n Scanner userInput = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Get player name\"); \n playerName = userInput.nextLine(); \n }", "public void interactWithKeyboard() {\n StdDraw.setCanvasSize(WIDTH * 16, HEIGHT * 16);\n StdDraw.setXscale(0, WIDTH);\n StdDraw.setYscale(0, HEIGHT);\n createMenu();\n StdDraw.enableDoubleBuffering();\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char input = Character.toUpperCase(StdDraw.nextKeyTyped());\n if (input == 'v' || input == 'V') {\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a name: \" + name);\n StdDraw.text(WIDTH / 2, HEIGHT * 5 / 6, \"Press # to finish.\");\n StdDraw.show();\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char next = StdDraw.nextKeyTyped();\n if (next == '#') {\n createMenu();\n break;\n } else {\n name += next;\n StdDraw.enableDoubleBuffering(); StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a name: \" + name);\n StdDraw.text(WIDTH / 2, HEIGHT * 5 / 6, \"Press # to finish.\");\n StdDraw.show();\n }\n }\n }\n }\n if (input == 'l' || input == 'L') {\n toInsert = loadWorld();\n if (toInsert.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n }\n toInsert = toInsert.substring(1);\n interactWithInputString(toInsert);\n ter.renderFrame(world);\n startCommands();\n }\n if (input == 'n' || input == 'N') {\n toInsert += 'n';\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show();\n while (true) {\n if (!StdDraw.hasNextKeyTyped()) {\n continue;\n }\n char c = StdDraw.nextKeyTyped();\n if (c == 's' || c == 'S') {\n toInsert += 's';\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show(); interactWithInputString(toInsert);\n ter.renderFrame(world); mouseLocation(); startCommands();\n break;\n }\n if (c != 'n' || c != 'N') {\n toInsert += c;\n StdDraw.enableDoubleBuffering(); StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show();\n }\n }\n }\n if (input == 'l' || input == 'L') {\n toInsert = loadWorld();\n if (toInsert.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n }\n toInsert = toInsert.substring(1); interactWithInputString(toInsert);\n ter.renderFrame(world); startCommands();\n }\n }\n }\n }", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n\n\n\n }", "public abstract void keyboardInput();", "public Scanner getScanner(){\n\t\t\n\t\tString filename = \"\";\n\t\tfor(int i = 0; i<argList.size(); i++ ){\n\t\t\tif(argList.get(i).equals(\"-f\")){\n\t\t\t\tfilename = argList.get(i+1);\n\t\t\t\t//DIFFERENT FROM OTHER INIT FILE!\n\t\t\t\tfilename = filename.trim().replace(\".s230\", \".S230\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(System.getProperty(\"user.dir\") + \" ... \" + filename);\n\t\tString dirName = System.getProperty(\"user.dir\");\n\t\tdirName = dirName.replace(\"\\\\Program_Files\\\\source\",\"\\\\\").trim();\n\t\tdirName = dirName.replace(\"\\\\Program_Files\\\\classes\",\"\\\\\").trim();\n\t\tdirName = dirName.concat(\"\\\\InputOutputFolder\\\\\");\n\t\tSystem.out.println(dirName+filename);\n\t\tFile file = new File(dirName, filename);\n\t\tScanner toReturn = null;\n\t\ttry {\n\t\t\ttoReturn = new Scanner(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn toReturn;\n\t}", "public static Keyboard[] inputFromFile() throws FileNotFoundException\r\n\t{\r\n\t\tKeyboard[] keyboards = new Keyboard[50];\r\n\t\tScanner readFile = new Scanner(new File(\"keyboards.txt\"));//may need to change the directory in order to work\r\n\t\tint i; // keep i for several parts without reseting value\r\n\t\t// loop to stick .txt file information into an array\r\n\t\tfor (i = 0; readFile.hasNextLine ( ); i++)\r\n\t\t{\r\n\t\t\tString line = readFile.nextLine ( );\r\n\t\t\tScanner scanLine = new Scanner(line);\r\n\t\t\tscanLine.useDelimiter ( \",\" );\r\n\t\t\t\r\n\t\t\t// because I know the layout of each line, I shouldn't need the .hasNext() boolean check (Maybe stick each of these into their own if blocks in the future)\r\n\t\t\tString brand = scanLine.next ( ).trim ( );\r\n\t\t\tString model = scanLine.next ( ).trim ( );\r\n\t\t\tString switchType = scanLine.next ( ).trim ( );\r\n\t\t\tString s = scanLine.next ( ).trim ( );// runtime error using .nextInt(); need to get rid of those tabs\r\n\t\t\tString p = scanLine.next ( ).trim ( );\r\n\t\t\tint stock = Integer.parseInt ( s );\r\n\t\t\tdouble price = Double.parseDouble ( p );\r\n\t\t\t// construct the keyboard into the array\r\n\t\t\tkeyboards[i] = new Keyboard(brand, model, switchType, stock, price);\r\n\t\t\tscanLine.close ( );\r\n\t\t}\r\n\t\treadFile.close ( );\r\n\t\treturn keyboards;\r\n\t}", "public void getPlayerInput() {\n System.out.println(\"Enter a Command: \");\n playerInput = inputScanner.nextLine();\n }", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public PasitoScanner(java.io.Reader in) {\n this.yy_reader = in;\n }", "public Console(Client client, Controller controller){\r\n\t\tsuper(client,controller);\r\n\t\tsc = new Scanner(System.in);\r\n\t\tnew Thread(new ReadInput()).start();\r\n\t}", "public String readCommand() {\n sc = new Scanner(System.in);\n userInput = new TextField();\n return userInput.getText();\n }", "public Keyboard(Tetris ts) {\n\t\tthis.ts = ts;\n\t}", "public GameInput() {\n keyboard = new Keyboard();\n mouse = new Mouse();\n mouseWheel = new MouseWheel();\n }", "public String weiterSpielen(){\n Scanner keyboard = new Scanner(System.in);\n return keyboard.nextLine();\n }", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}" ]
[ "0.6901285", "0.6743287", "0.66531736", "0.66355056", "0.66355056", "0.6552428", "0.6426291", "0.625488", "0.62244457", "0.6205082", "0.61200535", "0.60767186", "0.6075158", "0.6051511", "0.599895", "0.599895", "0.5900208", "0.58740264", "0.58298475", "0.58278656", "0.58213145", "0.5778282", "0.5769107", "0.57636017", "0.5759032", "0.5759032", "0.5759032", "0.5759032", "0.5759032", "0.5759032", "0.5759032", "0.5759032", "0.5752583", "0.5752583", "0.57449746", "0.57163095", "0.57079715", "0.5706187", "0.5705649", "0.5704383", "0.5696263", "0.5696263", "0.5696263", "0.5696263", "0.5696263", "0.5696263", "0.5689856", "0.56810385", "0.5661909", "0.5625272", "0.5582058", "0.55548555", "0.5521477", "0.5504911", "0.55039144", "0.5483972", "0.5473315", "0.54550505", "0.54408145", "0.54311705", "0.54167485", "0.54155326", "0.5404152", "0.5403956", "0.53860366", "0.53818697", "0.5374804", "0.5354479", "0.53528076", "0.534397", "0.534037", "0.5334126", "0.5327003", "0.53206694", "0.53029275", "0.5286387", "0.5279608", "0.5276917", "0.527336", "0.527258", "0.527258", "0.527258", "0.527258", "0.527258", "0.527258", "0.527258", "0.527258", "0.527258", "0.5269542", "0.5265672", "0.5253599", "0.52449995", "0.52388334", "0.5235866", "0.5230852", "0.5230852", "0.5230852", "0.5230852", "0.5230852", "0.5230852", "0.5230852" ]
0.0
-1
Sanity checking on output, whether it is indeed inductive.
private boolean checkAllMapsTo( Set<BooleanFormula> from, SSAMap startSSA, Set<BooleanFormula> to, SSAMap finishSSA, BooleanFormula transition ) throws SolverException, InterruptedException { return solver.isUnsat(bfmgr.and( fmgr.instantiate(bfmgr.and(from), startSSA), transition, fmgr.instantiate(bfmgr.not(bfmgr.and(to)), finishSSA) )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasOutput();", "boolean hasOutputPartialsBeforeLanguageDecision();", "public void testOutputIsVaild()\n {\n Collection<Puzzle> puzzles = new ArrayList<Puzzle>();\n\n puzzles = (Collection<Puzzle>) Config.get(\"Puzzles\", puzzles);\n\n for (Puzzle puzzle : puzzles)\n {\n byte[] grid = puzzle.getData();\n GridSolver cs = new GridSolver(grid);\n cs.solveGrid();\n assertTrue(new GridChecker(cs.getDataSolution()).checkGrid());\n }\n }", "boolean hasOutputParams();", "public boolean hasOutput() {\n return output_ != null;\n }", "private void checkInstanceOf(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n if (d instanceof AbstractDefinitionStmt) {\n AbstractDefinitionStmt def = (AbstractDefinitionStmt) d;\n Value leftSide = def.getLeftOp();\n Value rightSide = def.getRightOp();\n if(leftSide instanceof Local && rightSide instanceof AbstractInstanceOfExpr) {\n AbstractInstanceOfExpr expr = (AbstractInstanceOfExpr) rightSide;\n FlowAbstraction taint = isInTaintedSet(expr.getOp(), in);\n if(taint != null) {\n \t\n taint(leftSide, d, out);\n \n }\n }\n }\n }", "boolean getOutputPartialsBeforeLanguageDecision();", "public boolean hasOutput() {\n return outputBuilder_ != null || output_ != null;\n }", "private void checkLogicOperands(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n checkBinaryOperation(in, d, out);\n }", "public abstract boolean getOutput();", "private void checkBinaryOperation(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n if (d instanceof AbstractDefinitionStmt) {\n AbstractDefinitionStmt def = (AbstractDefinitionStmt) d;\n Value leftSide = def.getLeftOp();\n Value rightSide = def.getRightOp();\n if(leftSide instanceof Local && rightSide instanceof AbstractBinopExpr) {\n AbstractBinopExpr expr = (AbstractBinopExpr) rightSide;\n FlowAbstraction taint1 = isInTaintedSet(expr.getOp1(), in);\n FlowAbstraction taint2 = isInTaintedSet(expr.getOp2(), in);\n if(taint1 != null || taint2 != null) {\n taint(leftSide, d, out);\n }\n }\n }\n }", "public final boolean\n hasOutcome() { return hasOutcome_; }", "public static void printGivenAndGeneratedCombinationsInferredSafety() {\n\t\tSystem.out.println(GENERATE_START);\n\t\n\t\tfor(int row = 0; row < SAFE_COMBINATIONS.length; row++) {\n\t\t\tSystem.out.print(\"\");\n\t\t\tfor(int col = 0; col < SAFE_COMBINATIONS[0].length; col++) {\n\t\t\t\tSystem.out.print(SAFE_COMBINATIONS[row][col] + COMMA);\n\t\t\t}\n\t\t\tSystem.out.print(true + NEWLINE);\n\t\t}\n\t\t\n\t\tSystem.out.println(LINE_BREAK);\n\t\t\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tprintGeneratedCombinationInferredSafety();\n\t\t}\n\t}", "public abstract boolean verifyInput();", "public AnomaliesWrapper test2NF();", "boolean isOutputNeuron();", "public boolean initialConditions() {\n\n boolean evaluable;\n\n\n evaluable = diag.directedLinks();\n\n if (evaluable == false) {\n System.out.print(\"Influence Diagram with no directed links\\n\\n\");\n return (false);\n }\n\n evaluable = ((((IDWithSVNodes) diag).hasOnlyOneTerminalSVNode())\n || (((IDWithSVNodes) diag).hasOnlyOneValueNode()));\n\n\n if (evaluable == false) {\n System.out.print(\"Influence Diagram with 0 or more than 1 terminal super value nodes\\n or hasn't got an only utility node\\n\");\n return (false);\n }\n\n evaluable = diag.hasCycles();\n if (evaluable == true) {\n System.out.print(\"Influence Diagram with cycles\\n\\n\");\n return (false);\n }\n\n diag.addNonForgettingArcs();\n\n evaluable = diag.pathBetweenDecisions();\n if (evaluable == false) {\n System.out.print(\"Influence Diagram with non ordered decisions\\n\\n\");\n return (false);\n }\n\n evaluable = ((IDWithSVNodes) diag).isTreeStructureSV();\n if (evaluable == false) {\n System.out.print(\"Influence Diagram whose structure of value nodes isn't a tree\\n\\n\");\n return (false);\n }\n\n // Remove barren nodes\n\n //diag.eliminateRedundancy();\n diag.removeBarrenNodes();\n\n\n\n // Return true if OK\n\n return (true);\n }", "private void checkArithmeticOperands(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n checkBinaryOperation(in, d, out);\n }", "private boolean isTerminated(ArrayList<Instance> outputs){\n for (Instance j : outputInstances){\n boolean flag = false;\n for (Instance i : outputs){\n flag = false;\n Concept temp = i.getConcept();\n while (true){ \n if (temp == null) break;\n if (temp == j.getConcept()){\n flag = true;\n break;\n }\n temp = temp.getSuperConcept();\n }\n if (flag) break;\n }\n if (!flag) return false;\n }\n return true;\n }", "boolean hasOutputConfig();", "private boolean no_output() {\n\t\treturn _outcaptures.size() > 0 || _outhides.size() > 0;\n\t}", "@Test \n\tvoid test3() {\n\t\tassertTrue(!r1.getOutput().isEmpty());\n\t}", "@Test\n\tprivate void checkPossibilityTest() {\n\t\tint[] input = new int[] {1,1,1};\n Assertions.assertThat(checkPossibility(input)).isTrue();\n\n input = new int[] {0,0,3};\n Assertions.assertThat(checkPossibility(input)).isTrue();\n\n input = new int[] {4,2,3};\n Assertions.assertThat(checkPossibility(input)).isTrue();\n\n input = new int[] {2,3,4,2,3};\n Assertions.assertThat(checkPossibility(input)).isFalse();\n\t}", "static boolean shouldOutput(Configuration conf) {\n return conf.getBoolean(OUTPUT_FLAG, true);\n }", "boolean hasDecision();", "boolean hasDecision();", "boolean isIntroduced();", "public boolean hasInput() {\n return basePackage != DEFAULT_BASE_PACKAGE\n || !basePackages.isEmpty()\n || bannedImport != null\n || !bannedImports.isEmpty()\n || allowedImport != null\n || !allowedImports.isEmpty()\n || exclusion != null\n || !exclusions.isEmpty();\n }", "@Override\n\tpublic boolean checkHomogeneous(List<int[]> input) {\n\t\treturn false;\n\t}", "@Test\n public void shouldSucceedWithNoOutputRedirections() {\n Template template = createTemplate(\"file\", \"file\");\n new OutputRedirectionTemplateValidator(\"stdout\").validate(template, new NullHeterogeneousRegistry());\n }", "@java.lang.Override\n public boolean getOutputPartialsBeforeLanguageDecision() {\n return outputPartialsBeforeLanguageDecision_;\n }", "public static RuleViolation isOutputStandard(TransactionOutput output) {\n if (output.isDust())\n return RuleViolation.DUST;\n for (ScriptChunk chunk : output.getScriptPubKey().chunks()) {\n if (chunk.isPushData() && !chunk.isShortestPossiblePushData())\n return RuleViolation.SHORTEST_POSSIBLE_PUSHDATA;\n }\n return RuleViolation.NONE;\n }", "private void checkTaintedOperand(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n checkInstanceOf(in, d, out);\n checkLogicOperands(in, d, out);\n checkArithmeticOperands(in, d, out);\n }", "public boolean existsOutputMissingValues(){\r\n\t\treturn anyMissingValue[1];\r\n\t}", "@java.lang.Override\n public boolean getOutputPartialsBeforeLanguageDecision() {\n return outputPartialsBeforeLanguageDecision_;\n }", "boolean hasProduces();", "boolean hasEresult();", "protected void checkOuputFile(final File outputFile)\r\n\t{\r\n\t\tif(outputFile == null)\r\n\t\t{\r\n\t\t\tthrow new NullPointerException(\"Given output file is null\");\r\n\t\t}\r\n\t\t\r\n\t\t/*if(outputFile.exists())\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Given output file \" + outputFile + \" does already exist\");\r\n\t\t}*/\t\t\r\n\t}", "@Test\n public void isInputDataValidTest() {\n boolean invoke = Deencapsulation.invoke(modificationFibonacci, \"isInputDataValid\", \"1\");\n assertTrue(invoke);\n }", "public Boolean isNextOk() {\n if (!isInputValid()) {\n return Boolean.FALSE;\n }\n createReservations();\n if (containsInputErrors()) {\n return Boolean.FALSE;\n } else {\n switch (extractFeatureSet()) {\n case FREE:\n createGuestProfile();\n if (containsInputErrors()) {\n return Boolean.FALSE;\n }\n break;\n case PREMIUM:\n break;\n default:\n throw Assert.createUnreachable(\"Unknown feature set {0}.\",\n extractFeatureSet());\n }\n }\n return Boolean.TRUE;\n }", "protected abstract boolean checkInput();", "@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}", "@Test\n\tpublic void testValidatePrettyPrint() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validatePrettyPrint(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validatePrettyPrint(\"Invalid value.\");\n\t\t\t\tfail(\"The pretty print value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validatePrettyPrint(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validatePrettyPrint(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "@Override\n protected void flowThrough(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n Set<FlowAbstraction> taintsOfThisIteration = new HashSet<FlowAbstraction>();\n // several different checks for taints\n checkGetSecret(in, d, taintsOfThisIteration);\n checkTaintOverwrite(in, d, taintsOfThisIteration);\n checkAssignmentOfTaintedLocal(in, d, taintsOfThisIteration);\n checkAssignmentOfTaintedClassField(in, d, taintsOfThisIteration);\n checkLeak(in, d, taintsOfThisIteration);\n checkTaintedOperand(in, d, taintsOfThisIteration);\n\n // merge previously found taints with the taints of the current iteration\n merge(in, taintsOfThisIteration, out);\n flowThroughCount++;\n }", "public boolean hasOutputs() {\n return fieldSetFlags()[5];\n }", "@Test\n public void isInputDataValidTestWithBadInput() {\n boolean invoke = Deencapsulation.invoke(modificationFibonacci, \"isInputDataValid\", \"a\");\n assertFalse(invoke);\n }", "public final boolean produces(AnalysisFeature<?> feature) {\n return outputFeatures.contains(feature);\n }", "@java.lang.Override\n public boolean hasOutputPartialsBeforeLanguageDecision() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "private void checkRuntime(String filename, int[] input, int[] output) throws ParseException, IOException{\t\t\n\t\t\n\t\tString inputString = createInput(input);\n\t\t\n\t\tProgram prog = compiler.compile(new File(BASE_DIR, filename + EXT));\n\t\tMachine vm = new Machine();\n\t\tSimulator sim = new Simulator(prog, vm);\n\t\tvm.clear();\n\t\tsim.setIn(new ByteArrayInputStream(inputString.getBytes()));\n\t\tPipedInputStream in = new PipedInputStream();\n\t\tOutputStream out;\n\t\tout = new PipedOutputStream(in);\n\t\tsim.setOut(out);\n\t\tsim.run();\n\t\t\n\t\tString outputString = \"\";\n\t\tfor(int index = 0; index < output.length; index++)\n\t\t\toutputString += \"Output: \" + output[index] + \"\\r\\n\";\n\n\t\tassertEquals(outputString.length(), in.available());\n\t\tint max = in.available();\n\t\tfor(int index = 0; index < max; index++)\n\t\t\tassertEquals(outputString.charAt(index), (char)in.read());\n\t\t\n\t\tout.close();\n\t\tin.close();\n\t}", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.getOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // No output format defined.\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }", "@Test\n void test00_checkInitialization() {\n if (graph.size() != 0 || graph.order() != 0) {\n fail(\"graph isn't initialized with correct variables\");\n }\n }", "public boolean isProduced(){\n if(!step1.isEmpty()&&!step2.isEmpty()&&!step3.isEmpty()){\n return true;\n }else {\n return false;\n }\n }", "boolean hasPersonOutputCharacteristics();", "@java.lang.Override\n public boolean hasOutputPartialsBeforeLanguageDecision() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "public void check()\n {\n typeDec.check();\n }", "@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}", "boolean hasIsInputTo();", "boolean isEvaluable();", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n discretize0.setInvertSelection(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.getOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // No output format defined.\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }", "@Test\n\t\tpublic void noApplyGoal() {\n\t\t\tassertFailure(\" ;H; ;S; x∈{1,2} ;; {1}⊆S |- 3=3\");\n\t\t}", "public Node typeCheck () {\n\tif (declist!=null) \n\t for (Node dec:declist)\n\t\tdec.typeCheck();\n if ( !(FOOLlib.isSubtype(body.typeCheck(),type)) ){\n System.out.println(\"Wrong return type for function \"+id);\n System.exit(0);\n } \n return null;\n }", "@Override\n public boolean checkInput(String xmlid,XMLParameter env, Map input, Map output, Map config) throws Exception {\n return true;\n }", "private boolean isInputValid() {\n return true;\n }", "public static void verify(OWLOntology ont) throws OWLOntologyCreationException{\n OWLReasonerFactory reasonerFactory = new ElkReasonerFactory(); // with ELK reasoner\n\t\t\n\t\tLogManager.getLogger(\"org.semanticweb.elk\").setLevel(Level.OFF); // Level.ERROR\n\t\t//LogManager.getLogger(\"org.semanticweb.elk.reasoner.indexing\").setLevel(Level.ERROR);\n\t\t\n\t\t\n\t\tOWLReasoner reasoner = reasonerFactory.createReasoner(ont);\n\t\t\n\t\t\n\t\tboolean consistent = reasoner.isConsistent();\n\t\tSystem.out.println(\"\\n\\nOntology consistency : \" + consistent);\n\n\n\t\t/** Now print out any unsatisfiable classes*/\n\t\t//System.out.println(\"\\nUnsatisfiable classes : \");\n\t\tint i=0;\n\t\tfor (OWLClass cls : ont.getClassesInSignature()) {\n\t\t\tif (!reasoner.isSatisfiable(cls)) {\n\t\t\t\ti++;\n\t\t\t\t//System.out.println(i+\"/. \"+ cls.getIRI().getFragment());\n\t\t\t}\n\t\t}\n\n\n\t\t// Another method for extracting unsatisfiable classes\n\t\t/**\n\t\tSystem.out.println(\"\\nUnsatisfiable classes : \");\n\t\tint j=0;\n\t\tfor(OWLClass cls : reasoner.getUnsatisfiableClasses()){\n\t\t\tif(!insatis.isOWLNothing()){\n\t\t\t\tj++;\n\t\t\tSystem.out.println(j+ \"/. \"+ cls.getIRI().getFragment());\n\t\t\t}\n\t\t}\n\t\t */\n\n\n\t\t// Another method for extracting unsatisfiable classes\n\t\t/**\n\t\tSystem.out.println(\"\\nUnsatisfiable classes : \");\n\t\tNode<OWLClass> bottomNode = reasoner.getUnsatisfiableClasses();\n\t\t// This node contains owl:Nothing and all the classes that are\n\t\t// equivalent to owl:Nothing - i.e. the unsatisfiable classes. We just\n\t\t// want to print out the unsatisfiable classes excluding owl:Nothing,\n\t\t// and we can used a convenience method on the node to get these\n int k=0;\n\t\tfor (OWLClass cls : bottomNode.getEntitiesMinusBottom()) {\n\t\t\tk++;\n\t\t\tSystem.out.println(k+\"/. \"+ cls.getIRI().getFragment());\n\t\t}\n\t\t */\n\n\n\t\t//System.out.println(\"\\nOntology consistency : \" + consistent);\n\t\tSystem.out.println(\"Number of unsatisfiable classes : \" + i);\t\t\n\t\t\n\t\treasoner.dispose();\n\t}", "public boolean getOutput(){\n if (output){\n System.out.println(\"Archivo Cocol/R Aceptado\");\n return true;\n }\n else{\n System.out.println(\"Archivo Cocol/R no aceptado, tiene errores de estructura\");\n return false;\n }\n }", "@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize(\"GUIEditors.props\");\n discretize0.useBinNumbersTipText();\n // Undeclared exception!\n try { \n discretize0.output();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // No output instance format defined\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }", "public void testReportProducesCorrectOutput() throws Exception {\n try {\n final IOHelper iohelper = new IOHelper();\n final File outputFile = File.createTempFile(\"1070-codepoint-defaults-output\", \".json\");\n final OWLOntology o = generateOntologyWithLotsOfViolations();\n ReportOperation.report(o, iohelper, outputFile.toString(), Collections.emptyMap());\n } catch (YAMLException e) {\n e.printStackTrace();\n Assert.fail();\n }\n }", "private void generateIdfOutput()\n{\n getValidWords();\n scanDocuments();\n outputResults();\n}", "boolean hasProduceResType();", "public static void main(String[] args) {\n//\t\ttest1dOutput();\n\t\ttestMultimensionalOutput();\n\t}", "public void printExitDiscrepancies() {\n// violations.stream()\n// .filter((ValidationError t) -> t.getType() == ValidationError.ViolationType.SYSTEM)\n// .forEach(e -> {\n// System.out.println(e.getEmployee());\n// });\n printEmployeesForViolationType(ValidationError.ViolationType.SYSTEM);\n }", "@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input - kinda like Joel did for CSSE2310\n\t\tAssert.fail();\n\t}", "private void validCheck ()\n\t{\n\t\tassert allButLast != null || cachedFlatListOrMore != null;\n\t}", "public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }", "public ObjectInputFilter.Status checkInput(ObjectInputFilter.FilterInfo param2FilterInfo) {\n/* 603 */ if (param2FilterInfo.references() < 0L || param2FilterInfo\n/* 604 */ .depth() < 0L || param2FilterInfo\n/* 605 */ .streamBytes() < 0L || param2FilterInfo\n/* 606 */ .references() > this.maxReferences || param2FilterInfo\n/* 607 */ .depth() > this.maxDepth || param2FilterInfo\n/* 608 */ .streamBytes() > this.maxStreamBytes) {\n/* 609 */ return ObjectInputFilter.Status.REJECTED;\n/* */ }\n/* */ \n/* 612 */ Class<?> clazz = param2FilterInfo.serialClass();\n/* 613 */ if (clazz != null) {\n/* 614 */ if (clazz.isArray()) {\n/* 615 */ if (param2FilterInfo.arrayLength() >= 0L && param2FilterInfo.arrayLength() > this.maxArrayLength)\n/* */ {\n/* 617 */ return ObjectInputFilter.Status.REJECTED;\n/* */ }\n/* 619 */ if (!this.checkComponentType)\n/* */ {\n/* 621 */ return ObjectInputFilter.Status.UNDECIDED;\n/* */ }\n/* */ \n/* */ do {\n/* 625 */ clazz = clazz.getComponentType();\n/* 626 */ } while (clazz.isArray());\n/* */ } \n/* */ \n/* 629 */ if (clazz.isPrimitive())\n/* */ {\n/* 631 */ return ObjectInputFilter.Status.UNDECIDED;\n/* */ }\n/* */ \n/* 634 */ Class<?> clazz1 = clazz;\n/* */ \n/* */ \n/* */ \n/* 638 */ Optional<ObjectInputFilter.Status> optional = this.filters.stream().map(param2Function -> (ObjectInputFilter.Status)param2Function.apply(param2Class)).filter(param2Status -> (param2Status != ObjectInputFilter.Status.UNDECIDED)).findFirst();\n/* 639 */ return optional.orElse(ObjectInputFilter.Status.UNDECIDED);\n/* */ } \n/* */ \n/* 642 */ return ObjectInputFilter.Status.UNDECIDED;\n/* */ }", "public ObjectInputFilter.Status checkInput(ObjectInputFilter.FilterInfo param2FilterInfo) {\n/* 605 */ if (param2FilterInfo.references() < 0L || param2FilterInfo\n/* 606 */ .depth() < 0L || param2FilterInfo\n/* 607 */ .streamBytes() < 0L || param2FilterInfo\n/* 608 */ .references() > this.maxReferences || param2FilterInfo\n/* 609 */ .depth() > this.maxDepth || param2FilterInfo\n/* 610 */ .streamBytes() > this.maxStreamBytes) {\n/* 611 */ return ObjectInputFilter.Status.REJECTED;\n/* */ }\n/* */ \n/* 614 */ Class<?> clazz = param2FilterInfo.serialClass();\n/* 615 */ if (clazz != null) {\n/* 616 */ if (clazz.isArray()) {\n/* 617 */ if (param2FilterInfo.arrayLength() >= 0L && param2FilterInfo.arrayLength() > this.maxArrayLength)\n/* */ {\n/* 619 */ return ObjectInputFilter.Status.REJECTED;\n/* */ }\n/* 621 */ if (!this.checkComponentType)\n/* */ {\n/* 623 */ return ObjectInputFilter.Status.UNDECIDED;\n/* */ }\n/* */ \n/* */ do {\n/* 627 */ clazz = clazz.getComponentType();\n/* 628 */ } while (clazz.isArray());\n/* */ } \n/* */ \n/* 631 */ if (clazz.isPrimitive())\n/* */ {\n/* 633 */ return ObjectInputFilter.Status.UNDECIDED;\n/* */ }\n/* */ \n/* 636 */ Class<?> clazz1 = clazz;\n/* */ \n/* */ \n/* */ \n/* 640 */ Optional<ObjectInputFilter.Status> optional = this.filters.stream().map(param2Function -> (ObjectInputFilter.Status)param2Function.apply(param2Class)).filter(param2Status -> (param2Status != ObjectInputFilter.Status.UNDECIDED)).findFirst();\n/* 641 */ return optional.orElse(ObjectInputFilter.Status.UNDECIDED);\n/* */ } \n/* */ \n/* 644 */ return ObjectInputFilter.Status.UNDECIDED;\n/* */ }", "@Test\n public void testLazyComputeOutput() {\n UnboundRelation relationPlan = new UnboundRelation(StatementScopeIdGenerator.newRelationId(), ImmutableList.of(\"a\"));\n\n try {\n // throw exception when getOutput\n relationPlan.getOutput();\n throw new IllegalStateException(\"Expect an UnboundException but no exception\");\n } catch (UnboundException e) {\n // correct exception\n }\n }", "public boolean checkInput();", "@Override\n\t\tpublic boolean isValidSolution() {\n\t\t\treturn super.isValidSolution();\n\t\t}", "protected final void verifyWriteDTD()\n throws XMLStreamException\n {\n if (mCheckStructure) {\n if (mState != STATE_PROLOG) {\n throw new XMLStreamException(\"Can not write DOCTYPE declaration (DTD) when not in prolog any more (state \"+mState+\"; start element(s) written)\");\n }\n // 20-Dec-2005, TSa: and that we only output one...\n if (mDtdRootElem != null) {\n throw new XMLStreamException(\"Trying to write multiple DOCTYPE declarations\");\n }\n }\n }", "@Test\n public void sanityCheck() {\n assertThat(true, is(true));\n }", "@Test\n public void test08() throws Throwable {\n DecisionStump decisionStump0 = new DecisionStump();\n String string0 = Evaluation.makeOptionString(decisionStump0, false);\n assertEquals(\"\\n\\nGeneral options:\\n\\n-h or -help\\n\\tOutput help information.\\n-synopsis or -info\\n\\tOutput synopsis for classifier (use in conjunction with -h)\\n-t <name of training file>\\n\\tSets training file.\\n-T <name of test file>\\n\\tSets test file. If missing, a cross-validation will be performed\\n\\ton the training data.\\n-c <class index>\\n\\tSets index of class attribute (default: last).\\n-x <number of folds>\\n\\tSets number of folds for cross-validation (default: 10).\\n-no-cv\\n\\tDo not perform any cross validation.\\n-split-percentage <percentage>\\n\\tSets the percentage for the train/test set split, e.g., 66.\\n-preserve-order\\n\\tPreserves the order in the percentage split.\\n-s <random number seed>\\n\\tSets random number seed for cross-validation or percentage split\\n\\t(default: 1).\\n-m <name of file with cost matrix>\\n\\tSets file with cost matrix.\\n-l <name of input file>\\n\\tSets model input file. In case the filename ends with '.xml',\\n\\ta PMML file is loaded or, if that fails, options are loaded\\n\\tfrom the XML file.\\n-d <name of output file>\\n\\tSets model output file. In case the filename ends with '.xml',\\n\\tonly the options are saved to the XML file, not the model.\\n-v\\n\\tOutputs no statistics for training data.\\n-o\\n\\tOutputs statistics only, not the classifier.\\n-i\\n\\tOutputs detailed information-retrieval statistics for each class.\\n-k\\n\\tOutputs information-theoretic statistics.\\n-classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\\n\\tUses the specified class for generating the classification output.\\n\\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\\n-p range\\n\\tOutputs predictions for test instances (or the train instances if\\n\\tno test instances provided and -no-cv is used), along with the \\n\\tattributes in the specified range (and nothing else). \\n\\tUse '-p 0' if no attributes are desired.\\n\\tDeprecated: use \\\"-classifications ...\\\" instead.\\n-distribution\\n\\tOutputs the distribution instead of only the prediction\\n\\tin conjunction with the '-p' option (only nominal classes).\\n\\tDeprecated: use \\\"-classifications ...\\\" instead.\\n-r\\n\\tOnly outputs cumulative margin distribution.\\n-z <class name>\\n\\tOnly outputs the source representation of the classifier,\\n\\tgiving it the supplied name.\\n-xml filename | xml-string\\n\\tRetrieves the options from the XML-data instead of the command line.\\n-threshold-file <file>\\n\\tThe file to save the threshold data to.\\n\\tThe format is determined by the extensions, e.g., '.arff' for ARFF \\n\\tformat or '.csv' for CSV.\\n-threshold-label <label>\\n\\tThe class label to determine the threshold data for\\n\\t(default is the first label)\\n\\nOptions specific to weka.classifiers.trees.DecisionStump:\\n\\n-D\\n\\tIf set, classifier is run in debug mode and\\n\\tmay output additional info to the console\\n\", string0);\n }", "@Override\n public boolean hasValenceError() {\n String valenceCheck = atom.checkBadValence();\n//\n// System.out.println(\"valenceCheckBad \" + valenceCheck);\n// System.out.println(\"calling actual checkValence \" + atom.checkValence());\n// System.out.println(\"valenceCheckBad again \" + atom.checkBadValence());\n return !valenceCheck.isEmpty();\n }", "@Test\n\tpublic void testInternalTypes() {\n\t\tlogger.info(\"Run testInternalTypes\");\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\n\t\t// OrderByDirectionOutputType\n\t\tfinal IntrospectionFullType orderByDirectionOutputType = getFullType(introspection,\n\t\t\t\tgetOrderByDirectionOutputTypeName());\n\t\tAssert.assertEquals(2, orderByDirectionOutputType.getEnumValues().size());\n\t\tassertEnum(orderByDirectionOutputType, GQLOrderByDirectionEnum.ASC.toString(), false);\n\t\tassertEnum(orderByDirectionOutputType, GQLOrderByDirectionEnum.DESC.toString(), false);\n\n\t\t// OrderByInputType\n\t\tfinal IntrospectionFullType orderByInputType = getFullType(introspection, getOrderByInputTypeName());\n\t\tAssert.assertEquals(2, orderByInputType.getInputFields().size());\n\t\tassertInputField(orderByInputType, \"field\", IntrospectionTypeKindEnum.NON_NULL,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(orderByInputType, \"direction\", IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tgetOrderByDirectionOutputTypeName());\n\n\t\t// OrderByOutputType\n\t\tfinal IntrospectionFullType orderByOutputType = getFullType(introspection, getOrderByOutputTypeName());\n\t\tAssert.assertEquals(2, orderByOutputType.getFields().size());\n\t\tassertField(orderByOutputType, \"field\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertField(orderByOutputType, \"direction\", IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tgetOrderByDirectionOutputTypeName());\n\n\t\t// PagingInputType\n\t\tfinal IntrospectionFullType pagingInputType = getFullType(introspection, getPagingInputTypeName());\n\t\tAssert.assertEquals(2, pagingInputType.getInputFields().size());\n\t\tassertInputField(pagingInputType, \"offset\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertInputField(pagingInputType, \"limit\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\n\t\t// PagingOutputType\n\t\tfinal IntrospectionFullType pagingOutputType = getFullType(introspection, getPagingOutputTypeName());\n\t\tAssert.assertEquals(3, pagingOutputType.getFields().size());\n\t\tassertField(pagingOutputType, \"offset\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertField(pagingOutputType, \"limit\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertField(pagingOutputType, \"totalLength\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLLong.getName());\n\t}", "public void checkOutputXML (IInternalContest contest) {\n \n try {\n DefaultScoringAlgorithm defaultScoringAlgorithm = new DefaultScoringAlgorithm();\n String xmlString = defaultScoringAlgorithm.getStandings(contest, new Properties(), log);\n \n // getStandings should always return a well-formed xml\n assertFalse(\"getStandings returned null \", xmlString == null);\n assertFalse(\"getStandings returned empty string \", xmlString.trim().length() == 0);\n \n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n documentBuilder.parse(new InputSource(new StringReader(xmlString)));\n } catch (Exception e) {\n assertTrue(\"Error in XML output \" + e.getMessage(), true);\n e.printStackTrace();\n }\n }", "@Test\n\tpublic void typeCheckTest(){\n\t\tSystem.out.println(\"kenta\");\n\t\tSemanticActions actions = new SemanticActions();\n\t\tVariableEntry idInt = new VariableEntry(\"v1\", TokenType.INTEGER);\n\t\tVariableEntry idReal = new VariableEntry(\"v2\", TokenType.REAL);\n\t\tVariableEntry idInt2 = new VariableEntry(\"v3\", TokenType.INTEGER);\n\t\tVariableEntry idReal2 = new VariableEntry(\"v4\", TokenType.REAL);\n\t\tVariableEntry error = new VariableEntry(\"v5\", TokenType.ADDOP);\n\t\tassertTrue(actions.typeCheck(idInt, idInt2) == 0);\n\t\tassertTrue(actions.typeCheck(idReal, idReal2) == 1);\n\t\tassertTrue(actions.typeCheck(idReal, idInt2) == 2);\n\t\tassertTrue(actions.typeCheck(idInt, idReal) == 3);\n\t\tassertTrue(actions.typeCheck(idReal, error) == 4);\n\t\tassertTrue(actions.typeCheck(error, idInt) == 4);\n\t}", "boolean isSetInterpretation();", "public static void testMultimensionalOutput() {\n\t\tint vectSize = 8;\n\t\tint outputsPerInput = 10;\n\t\tdouble repeatProb = 0.8;\n\t\tdouble inpRemovalPct = 0.8;\n\t\tCollection<DataPoint> data = createMultidimensionalCorrSamples(vectSize, outputsPerInput, inpRemovalPct);\n//\t\tCollection<DataPoint> data = createMultidimensionalSamples(vectSize, outputsPerInput, repeatProb);\n\n\t\tModelLearner modeler = createModelLearner(vectSize, data);\n\t\tint numRuns = 100;\n\t\tint jointAdjustments = 18;\n\t\tdouble skewFactor = 0;\n\t\tdouble cutoffProb = 0.1;\n\t\tDecisionProcess decisioner = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\t0, skewFactor, 0, cutoffProb);\n\t\tDecisionProcess decisionerJ = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\tjointAdjustments, skewFactor, 0, cutoffProb);\n\t\t\n\t\tSet<DiscreteState> inputs = getInputSetFromSamples(data);\n\t\tArrayList<Double> realV = new ArrayList<Double>();\n\t\tArrayList<Double> predV = new ArrayList<Double>();\n\t\tArrayList<Double> predJV = new ArrayList<Double>();\n\t\tfor (DiscreteState input : inputs) {\n\t\t\tSystem.out.println(\"S\" + input);\n\t\t\tMap<DiscreteState, Double> outProbs = getRealOutputProbsForInput(input, data);\n\t\t\tMap<DiscreteState,Double> preds = countToFreqMap(decisioner\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tMap<DiscreteState,Double> predsJ = countToFreqMap(decisionerJ\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tSet<DiscreteState> outputs = new HashSet<DiscreteState>();\n\t\t\toutputs.addAll(outProbs.keySet());\n\t\t\toutputs.addAll(preds.keySet());\n\t\t\toutputs.addAll(predsJ.keySet());\n\t\t\tfor (DiscreteState output : outputs) {\n\t\t\t\tDouble realD = outProbs.get(output);\n\t\t\t\tDouble predD = preds.get(output);\n\t\t\t\tDouble predJD = predsJ.get(output);\n\t\t\t\tdouble real = (realD != null ? realD : 0);\n\t\t\t\tdouble pred = (predD != null ? predD : 0);\n\t\t\t\tdouble predJ = (predJD != null ? predJD : 0);\n\t\t\t\trealV.add(real);\n\t\t\t\tpredV.add(pred);\n\t\t\t\tpredJV.add(predJ);\n\t\t\t\tSystem.out.println(\"\tS'\" + output + \"\t\" + real + \"\t\" + pred + \"\t\" + predJ);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"CORR:\t\" + Utils.correlation(realV, predV)\n\t\t\t\t+ \"\t\" + Utils.correlation(realV, predJV));\n\t}", "protected abstract int isValidInput();", "public double evaluateOutput(T outputOfInterest, RelationManager<T> relMngr, double[] fullInput) {\n\t\tif (neuralNet == null) throw new IllegalStateException(\"train before querying\");\n\t\tfinal double[] activations = getInputs(outputOfInterest, relMngr, fullInput);\n\t\treturn getNNOutput(activations);\n\t}", "protected abstract boolean isInputValid();", "public void view(Object input)\r\n/* 51: */ {\r\n/* 52: 52 */ if (!(input instanceof Entity)) {\r\n/* 53: 53 */ return;\r\n/* 54: */ }\r\n/* 55: 55 */ Entity t = (Entity)input;\r\n/* 56: 56 */ if ((t.isAPrimed(\"goal\")) && (t.relationP()))\r\n/* 57: */ {\r\n/* 58: 57 */ Relation r = (Relation)t;\r\n/* 59: 58 */ String action = \"?\";\r\n/* 60: 59 */ if (r.getObject().isAPrimed(\"roles\"))\r\n/* 61: */ {\r\n/* 62: 60 */ Sequence s = (Sequence)r.getObject();\r\n/* 63: 61 */ for (Entity x : s.getElements()) {\r\n/* 64: 62 */ if ((x.functionP()) && (x.isAPrimed(\"object\"))) {\r\n/* 65: 63 */ action = x.getSubject().getType();\r\n/* 66: */ }\r\n/* 67: */ }\r\n/* 68: */ }\r\n/* 69: 67 */ if (r.isA(\"not\")) {\r\n/* 70: 68 */ setState(\"notWant\", r.getSubject().getType(), action);\r\n/* 71: */ } else {\r\n/* 72: 71 */ setState(\"want\", r.getSubject().getType(), r.getObject().getType());\r\n/* 73: */ }\r\n/* 74: */ }\r\n/* 75: 74 */ setTruthValue(input);\r\n/* 76: */ }", "boolean hasInputConstraints();", "@Test\n \tpublic void testCheckingAccusation() {\n \t\t//Set answer\n \t\tSolution answer = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tSolution guess = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tgame.setAnswer(answer);\n \t\t//Check correct accusation\n \t\t//correct if it contains the correct person, weapon and room\n \t\tAssert.assertTrue(game.checkAccusation(guess));\n \t\t//Check false accusation\n \t\t//not correct if the room is wrong, or if the person is wrong, if the weapon is wrong, or if all three are wrong\n \t\t//wrong room\n \t\tguess = new Solution(\"Colonel Mustard\", \"Knife\", \"Billiards Room\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong weapon\n \t\tguess = new Solution(\"Colonel Mustard\", \"Lead Pipe\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong person\n \t\tguess = new Solution(\"Ms. Peacock\", \"Knife\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t}", "public static void printGeneratedCombinationInferredSafety() {\n\t\tfinal int random_distance = randomizer(LARGE_DISTANCE * 3);\n\t\tfinal int random_duration = randomizer(LARGE_DURATION * 3);\n\t\tfinal int random_exhalation = randomizer(LARGE_EXHALATION_LEVEL * 3);\n\t\t\n\t\tfinal boolean isSafe = isInferredSafe(random_distance, random_duration, random_exhalation);\n\t\t\n\t\tSystem.out.println(\"\" + random_distance + COMMA + random_duration + COMMA + random_exhalation + COMMA + isSafe + \"\");\n\t}", "void printCheck();", "public boolean validateDataset(PrintWriter out, PrintWriter err) {\n boolean acePresent = aceFiles.size() > 0;\n boolean domePresent = domeFiles.size() > 0;\n boolean linkPresent = linkageFiles.size() > 0;\n boolean acmoPresent = acmoFiles.size() > 0;\n boolean passedRequiredTests = false;\n\n if (!acePresent && !domePresent && !linkPresent && !acmoPresent) {\n err.println(\"Nothing to verify\");\n return false;\n }\n\n // These are approximate guesses to make loading easier\n Set<String> eids = new HashSet<>(150);\n Set<String> wids = new HashSet<>(25);\n Set<String> sids = new HashSet<>(25);\n Set<String> dids = new HashSet<>(200);\n Set<String> domeNames = new HashSet<>(200);\n Set<String> acmoNames = new HashSet<>(200);\n Map<String, String> acmoRename = new HashMap<>();\n Map<String, StringBuilder> acmoDups = new HashMap<>();\n Set<String> exnames = new HashSet<>(150);\n Set<String> wstclim = new HashSet<>(100);\n Set<String> soilids = new HashSet<>(25);\n\n boolean acebsValid = true;\n if (acePresent) {\n out.println(\"\\n------------------------------------------------------------------------\");\n out.println(\"Validating ACEB files\");\n out.println(\"------------------------------------------------------------------------\\n\");\n out.println(\"Checking \" + aceFiles.size() + \" ACEB files...\\n\");\n for (ACEFile ace : aceFiles) {\n try {\n AceDataset ds = AceParser.parseACEB(ace.getPath().toFile());\n for (AceExperiment exp : ds.getExperiments()) {\n try {\n if (!eids.contains(exp.getId())) {\n eids.add(exp.getId());\n }\n String exname = exp.getValueOr(\"exname\", \"\");\n if (!exname.equals(\"\") && !exnames.contains(exname)) {\n exnames.add(exname);\n }\n } catch (IOException ex) {\n acebsValid = false;\n err.println(\"[FAILED] \" + ace.getPath().toFile());\n err.println(\" Error loading experiments in file\");\n LOG.log(Level.WARNING, null, ex);\n }\n }\n\n for (AceWeather wth : ds.getWeathers()) {\n try {\n if (!wids.contains(wth.getId())) {\n wids.add(wth.getId());\n }\n String wst_id = wth.getValueOr(\"wst_id\", \"\");\n String clim_id = wth.getValueOr(\"clim_id\", \"\");\n if (!wst_id.equals(\"\") && !wstclim.contains(wst_id + \"|\" + clim_id)) {\n wstclim.add(wst_id + \"|\" + clim_id);\n }\n } catch (IOException ex) {\n acebsValid = false;\n err.println(\"[FAILED] \" + ace.getPath().toFile());\n err.println(\" Error loading weather in file.\");\n LOG.log(Level.WARNING, null, ex);\n }\n }\n for (AceSoil soil : ds.getSoils()) {\n try {\n if (!sids.contains(soil.getId())) {\n sids.add(soil.getId());\n }\n String soil_id = soil.getValueOr(\"soil_id\", \"\");\n if (!soil_id.equals(\"\") && !soilids.contains(soil_id)) {\n soilids.add(soil_id);\n }\n } catch (IOException ex) {\n acebsValid = false;\n err.println(\"[FAILED] \" + ace.getPath().toFile());\n err.println(\" Error loading soils in file.\");\n LOG.log(Level.WARNING, \"Failure to parse for weather {0}: {1}\", new Object[]{ace.getPath().toString(), ex});\n }\n }\n } catch (IOException ex) {\n acebsValid = false;\n err.println(\"[FAILED] \" + ace.getPath().toFile());\n err.println(\" This file is either corrupted or has an invalid structure.\");\n LOG.log(Level.WARNING, \"Failure to parse {0}: {1}\", new Object[]{ace.getPath().toString(), ex});\n }\n }\n\n out.println(\"Found \" + eids.size() + \" unique experiment IDs\");\n out.println(\"Found \" + sids.size() + \" unique soil IDs\");\n out.println(\"Found \" + wids.size() + \" unique weather IDs\");\n out.println(\"Found \" + exnames.size() + \" unique EXNAMEs\");\n out.println(\"Found \" + soilids.size() + \" unique SOIL_IDs\");\n out.println(\"Found \" + wstclim.size() + \" unique WST_ID and CLIM_ID combinations\");\n }\n\n boolean domesValid = true;\n if (domePresent) {\n // Next we need to get the DOME IDs\n out.println(\"\\n------------------------------------------------------------------------\");\n out.println(\"Validating DOME files\");\n out.println(\"------------------------------------------------------------------------\\n\");\n out.println(\"Checking \" + domeFiles.size() + \" DOME files...\\n\");\n domeFiles.stream().forEach((path) -> {\n dids.addAll(DOMEHandler.getDomeIds(path.getPath()));\n domeNames.addAll(DOMEHandler.getDomeNames(path.getPath()));\n });\n out.println(\"Found \" + dids.size() + \" unique DOME IDs\");\n out.println(\"Found \" + domeNames.size() + \" unique DOME Names\");\n if (dids.size() != domeNames.size()) {\n err.println(\"[FAILED] More than one DOME share the same name with different values.\");\n err.println(\" Please check the DOME metadata. Make each unique by using the DESCRIPTION field.\");\n domesValid = false;\n }\n }\n\n boolean acmosValid = true;\n boolean acmoShadow = false;\n if (acmoPresent) {\n out.println(\"\\n------------------------------------------------------------------------\");\n out.println(\"Verifying ACMO files\");\n out.println(\"------------------------------------------------------------------------\\n\");\n out.println(\"Checking \" + acmoFiles.size() + \" ACMO files...\");\n for (ACMOFile acmo : acmoFiles) {\n String fname = acmo.getCleanFilename().getFileName().toString();\n LOG.log(Level.INFO, \"Renaming {0} to {1}\",\n new Object[]{acmo.getPath().toString(),\n acmo.getCleanFilename().getFileName().toString()});\n if (acmoNames.contains(fname)) {\n StringBuilder sb;\n if (!acmoDups.containsKey(fname)) {\n sb = new StringBuilder();\n sb.append(\" \");\n sb.append(acmoRename.get(fname));\n sb.append(\"\\n\");\n } else {\n sb = acmoDups.get(fname);\n }\n sb.append(\" \");\n sb.append(acmo.getPath().toString());\n sb.append(\"\\n\");\n acmoDups.put(fname, sb);\n } else {\n acmoNames.add(fname);\n acmoRename.put(fname, acmo.getPath().toString());\n }\n\n boolean isValid = acmo.isValid();\n if (!isValid) {\n acmosValid = false;\n err.println(\"[FAILED] \" + acmo.getPath().toString());\n err.println(acmo.getErrorReport());\n }\n if (!acmo.getWarnings().equals(\"\")) {\n out.println(\"[WARNING] \" + acmo.getPath().toString());\n out.println(\" Suspected multiple crop failures because of blank output lines in ACMO.\\n\");\n //out.println(acmo.getWarnings());\n }\n }\n out.println(\"\\n------------------------------------------------------------------------\");\n out.println(\"Checking ACMO renaming conflict\");\n out.println(\"------------------------------------------------------------------------\\n\");\n out.println(\"NOTE: This product renames ACMO files to match the AgMIP protocols.\\n\");\n if (!acmoDups.isEmpty()) {\n acmoShadow = true;\n err.println(\"[FAILED] More than one ACMO file will share the same name.\");\n err.println(\" Please check the MAN_ID and RAP_ID columns in the ACMO files.\");\n err.println(\" MAN_ID should be blank unless using an adaptation.\");\n err.println(\" RAP_ID should be blank unless working with RAPs.\");\n\n for (Map.Entry<String, StringBuilder> dup : acmoDups.entrySet()) {\n err.println(\" The following files will be written as \" + dup.getKey().toString());\n err.println(dup.getValue());\n }\n }\n }\n\n //if (linkPresent && !acmoPresent) {\n // out.println(\"Verifying AgMIP linkage files.\");\n //}\n boolean acmoLinkageTest = true;\n if (acmoPresent && acePresent) {\n out.println(\"\\n------------------------------------------------------------------------\");\n out.println(\"Verifying linkages between ACEB, DOME and ACMO files\");\n out.println(\"------------------------------------------------------------------------\\n\");\n out.println(\"Checking linkages in \" + acmoFiles.size() + \" ACMO files...\\n\");\n boolean acmoLinkageAll = true;\n for (ACMOFile path : acmoFiles) {\n String cm = path.getCMSeries().orElse(\"\");\n if (cm.equals(\"C3MP\") || cm.equals(\"CTWN\")) {\n out.println(\"- Skipping senstivity analysis linkage checking on \" + path.getPath().toString() + \"\\n\");\n } else if (!path.isValid()) {\n err.println(\"- Skipping invalid ACMO file \" + path.getPath().toString() + \"\\n\");\n } else {\n boolean thisLinkage = LinkChecker.checkLinkedData(path.getPath(), out, err, eids, sids, wids, exnames, soilids, wstclim);\n if (!thisLinkage) {\n acmoLinkageAll = false;\n }\n }\n }\n if (!acmoLinkageAll) {\n acmoLinkageTest = false;\n }\n }\n\n out.println(\"------------------------------------------------------------------------\");\n out.println(\"Summary Report:\");\n out.println(\"ACEB Validation......................... \" + (acebsValid ? \"SUCCESS\" : \"FAILED\"));\n out.println(\"DOME Validation......................... \" + (domesValid ? \"SUCCESS\" : \"FAILED\"));\n out.println(\"ACMO Validation......................... \" + (acmosValid ? \"SUCCESS\" : \"FAILED\"));\n out.println(\"ACMO Renaming........................... \" + (!acmoShadow ? \"SUCCESS\" : \"FAILED\"));\n out.println(\"Linkage Validation...................... \" + (acmoLinkageTest ? \"SUCCESS\" : \"FAILED\"));\n datasetValid = acebsValid && domesValid && acmosValid && !acmoShadow && acmoLinkageTest;\n return datasetValid;\n\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.findNumBinsTipText();\n // Undeclared exception!\n try { \n discretize0.output();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // No output instance format defined\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }", "public static void main(String[] args) {\n\t\tDemo d = new Demo();\n\t\tinferenceEngine inf = new inferenceEngine();\n\t\td.takeInput(inf);\n\t\t// while writing the output check the number of input statements and the one's\n\t\t// left to prove and perform a sanity check to see if same number of statements\n\t\t// are written to output file\n\t\t\n\t\t//how to detect an infinite loop? refer pdf\n\t\t\n\t\t//\n\t\t\n//\t\tSystem.out.print(\"\\nIn Inference engine\\n\"+ inf.toString());\n\t\tpredicate q = new predicate();\n//\t\tArrayList<String> arguments = new ArrayList();\n\t\tq.name=\"~P\";\n\t\tq.arguments.add(\"Joe\");\n\t\tq.arguments.add(\"Mary\");\n//\t\targuments.add(\"z\");\n\n//\t\tq.arguments = arguments;\n//\t\tq.testRunSet(\"OmAmma\", arguments);\n\t\t//System.out.println(inf.negateQuery(q).toString());\n///*sc*/\t\tsentence s3 = sentence.copySentence(inf.knowledgeBase.sentenceslist.get(2));\n\n//sc\t\tsentence s4 = sentence.copySentence(inf.knowledgeBase.sentenceslist.get(5));\n//\t\tHashMap<String, String> substitutionMap = new HashMap(); \n//\t\tsubstitutionMap.put(\"x4\", \"Charlie\");\n//\t\tsubstitutionMap.put(\"y4\", \"Billy\");\n//\t\tsubstitutionMap.put(\"x5\", \"Charlie\");\n//\t\tsubstitutionMap.put(\"y5\", \"Billy\");\n//\t\tsubstitutionMap.put(\"z5\", \"Liz\");\n//\t\tsubstitutionMap.put(\"z5\", \"x6\");\n//\t\tSystem.out.println(substitutionMap);\n//\t\tSystem.out.println(\"My first predicate \"+ inf.knowledgeBase.sentenceslist.get(0).predicatelist.get(0));\n//\t\tSystem.out.println(\"My second predicate \"+ inf.knowledgeBase.sentenceslist.get(2).predicatelist.get(0));\n//\t\tpredicate p1 = new predicate();\n//\t\tpredicate p2 = new predicate();\n//\t\tp1.name = p2.name = \"Amma\" ;\n//\t\tp1.arguments.add(\"AB\");\n//\t\tp1.arguments.add(\"y\");\n//\t\tp1.arguments.add(\"s\");\n//\t\tp2.arguments.add(\"z\");\n//\t\tp2.arguments.add(\"Hello\");\n//\t\tp2.arguments.add(\"t\");\n//\t\tinf.checkPredicate(p1, p2, substitutionMap);\n//\t\tSystem.out.println(\"Original sentence is\"+s.toString());\n//\t\tsentence copy =sentence.copySentence(s);\n//\t\tcopy.predicatelist.get(0).arguments.add(\"x\");\n//\t\tSystem.out.println(\"Copy sentence \"+copy.toString());\n//\t\t\t\tSystem.out.println(\"The first negated query is\\n\"+ s.toString());\n\t//\tSystem.out.println(\"The value of 1st resolution is\");\n\t\t//boolean set = inf.Resolution(s);\n//\t\tsentence ab = inf.merge(inf.knowledgeBase.sentenceslist.get(4), inf.knowledgeBase.sentenceslist.get(5), inf.knowledgeBase.sentenceslist.get(4).predicatelist.get(1));\n//\t\tSystem.out.println(\"The resolved sentence now is \\n\"+ab.toString());\n//\t\tSystem.out.println(\"The substitutioin map\\n\"+substitutionMap);\n//\t\tSystem.out.println(\"The sentence passed is\\n\"+s.toString());\n//\t\tinf.applySubstitution(s, substitutionMap);\n//\t\tSystem.out.println(\"Hi the substituted sentence \\n\"+ s.toString());\n//\t\tArrayList<String> A = new ArrayList();\n//\t\tSystem.out.println(A.size());\n//\t\tSystem.out.println(\"The third sentence is \\n\"+s3);\n//\t\tSystem.out.println(\"The fourth sentence is \\n\"+s4);\n//\t\tinf.merge(s3, s4, substitutionMap);\n\t\tsentence s = new sentence();\n\t\ts.predicatelist.add(inf.queryList.get(0));\n//\t\tSystem.out.println(inf.queryList.get(0).toString());\n//\t\tHashMap<String, String> theta = inf.copyHashMap(substitutionMap);\n//\t\ttheta.put(\"Om\", \"Amma\");\n//\t\tSystem.out.println(\"Map = \"+substitutionMap+\"\\nTheta = \"+theta);\n//\t\ttheta = inf.Unify(s, inf.knowledgeBase.sentenceslist.get(5), theta);\n//\t\tSystem.out.println(\"The Theta mapping is \"+ theta);\n//\t\tSystem.out.println(q.toString());\n//\t\tSystem.out.println(s3.toString());\n//\t\tSystem.out.println(s3.contains(q));\t\n//\t\tSystem.out.println(\"Start here!\"+ inf.queryList.get(0));\n//\t\tSystem.out.println(inf.knowledgeBase.toString());\n\t\tboolean b[] = d.runResolution(inf);\n//\t\tSystem.out.println(\"My first Query \"+ b);\n\t\t\n\t\td.writeOutput(b);\n\t\t\n\t}" ]
[ "0.64962804", "0.6138284", "0.59576577", "0.57881755", "0.56893045", "0.5625267", "0.56110245", "0.55435324", "0.5484283", "0.5464419", "0.5439931", "0.53977406", "0.5366676", "0.5296676", "0.5282157", "0.52348703", "0.523114", "0.5225755", "0.51881886", "0.5157997", "0.5156658", "0.5156459", "0.5145936", "0.51305884", "0.5130387", "0.5130387", "0.5102729", "0.50995696", "0.5098809", "0.5094083", "0.50901246", "0.50836897", "0.5034048", "0.5033592", "0.503196", "0.5004644", "0.49993858", "0.49978033", "0.4995479", "0.49940026", "0.49909803", "0.4985299", "0.49833637", "0.4983285", "0.4982738", "0.49788684", "0.496695", "0.49592963", "0.4958762", "0.49583283", "0.49536988", "0.49456617", "0.4931452", "0.49235746", "0.49184698", "0.49150696", "0.4891994", "0.48911035", "0.4881097", "0.48795614", "0.48775882", "0.48731205", "0.48627415", "0.4856604", "0.48507968", "0.485039", "0.48364058", "0.48319444", "0.48306572", "0.48278093", "0.4826837", "0.4823595", "0.4811199", "0.48060903", "0.48001578", "0.47977012", "0.4796065", "0.47931525", "0.4782246", "0.47812885", "0.47807637", "0.47789094", "0.4774527", "0.4768006", "0.4763453", "0.47626638", "0.47596794", "0.47528893", "0.47527137", "0.4749463", "0.47417676", "0.47272512", "0.47265115", "0.47262025", "0.4724999", "0.47226268", "0.47198436", "0.47133678", "0.47111136", "0.4709949", "0.4706791" ]
0.0
-1
Assume the formula to be a conjunction over disjunctions.
public BooleanFormula removeRedundancies(BooleanFormula input) throws InterruptedException { BooleanFormula nnf = fmgr.applyTactic(input, Tactic.NNF); return bfmgr.transformRecursively(nnf, new BooleanFormulaTransformationVisitor(fmgr) { @Override public BooleanFormula visitAnd(List<BooleanFormula> processedOperands) { try { return bfmgr.and(simplifyArgs(processedOperands)); } catch (SolverException|InterruptedException pE) { throw new UnsupportedOperationException("Error while " + "simplifying", pE); } } @Override public BooleanFormula visitOr(List<BooleanFormula> processedOperands) { try { return bfmgr.or(simplifyArgs(processedOperands)); } catch (SolverException|InterruptedException pE) { throw new UnsupportedOperationException("Error while " + "simplifying", pE); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final ManchesterOWLSyntaxAutoComplete.conjunction_return conjunction() {\n ManchesterOWLSyntaxAutoComplete.conjunction_return retval = new ManchesterOWLSyntaxAutoComplete.conjunction_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.unary_return conjunct = null;\n ManchesterOWLSyntaxAutoComplete.unary_return u = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:130:2:\n // ( ^( CONJUNCTION (conjunct= unary )+ ) | u= unary )\n int alt6 = 2;\n int LA6_0 = input.LA(1);\n if (LA6_0 == CONJUNCTION) {\n alt6 = 1;\n } else if (LA6_0 >= IDENTIFIER && LA6_0 <= ENTITY_REFERENCE\n || LA6_0 == NEGATED_EXPRESSION || LA6_0 >= SOME_RESTRICTION\n && LA6_0 <= ONE_OF) {\n alt6 = 2;\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 6, 0, input);\n throw nvae;\n }\n switch (alt6) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:131:2:\n // ^( CONJUNCTION (conjunct= unary )+ )\n {\n match(input, CONJUNCTION, FOLLOW_CONJUNCTION_in_conjunction328);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:131:17:\n // (conjunct= unary )+\n int cnt5 = 0;\n loop5: do {\n int alt5 = 2;\n int LA5_0 = input.LA(1);\n if (LA5_0 >= IDENTIFIER && LA5_0 <= ENTITY_REFERENCE\n || LA5_0 == NEGATED_EXPRESSION\n || LA5_0 >= SOME_RESTRICTION && LA5_0 <= ONE_OF) {\n alt5 = 1;\n }\n switch (alt5) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:131:18:\n // conjunct= unary\n {\n pushFollow(FOLLOW_unary_in_conjunction334);\n conjunct = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(conjunct.node\n .getCompletions());\n }\n }\n break;\n default:\n if (cnt5 >= 1) {\n break loop5;\n }\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n EarlyExitException eee = new EarlyExitException(5, input);\n throw eee;\n }\n cnt5++;\n } while (true);\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:134:4:\n // u= unary\n {\n pushFollow(FOLLOW_unary_in_conjunction349);\n u = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(u.node\n .getCompletions());\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "public ArrayList<Predicate> expandInConjunctiveFormula(){\n\t\tArrayList<Predicate> formula = new ArrayList<Predicate>();\n\t\t\n\t\t// (x, (0,2)) (y,1) \n\t\t//holds positions of the vars\n\t\tHashtable<String,ArrayList<String>> pos = new Hashtable<String,ArrayList<String>>();\n\t\t//(const3, \"10\")\n\t\t//holds vars that have constants assigned\n\t\tHashtable<String,String> constants = new Hashtable<String,String>();\n\t\t\n\t\tRelationPredicate p = this.clone();\n\t\t//rename each term to a unique name\n\t\tfor(int i=0; i<p.terms.size(); i++){\n\t\t\tTerm t = p.terms.get(i);\n\t\t\tt.changeVarName(i);\n\n\t\t}\n\t\tformula.add(p);\n\n\t\tArrayList<String> attrsOld = getVarsAndConst();\n\t\tArrayList<String> attrsNew = p.getVarsAndConst();\n\n\t\t\n\t\tfor(int i=0; i<attrsOld.size(); i++){\n\t\t\tTerm t = terms.get(i);\n\t\t\tif(t instanceof ConstTerm){\n\t\t\t\t//get the constant value\n\t\t\t\tconstants.put(attrsNew.get(i),t.getVal());\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> posVals = pos.get(attrsOld.get(i));\n\t\t\tif(posVals==null){\n\t\t\t\tposVals=new ArrayList<String>();\n\t\t\t\tpos.put(attrsOld.get(i),posVals);\n\t\t\t}\n\t\t\tposVals.add(String.valueOf(i));\n\n\t\t}\n\t\t\n\t\t//System.out.println(\"Position of attrs=\" + pos + \" Constants= \" + constants);\n\t\n\t\t//deal with var equality x0=x2\n\t\tIterator<String> it = pos.keySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString key = (String)it.next();\n\t\t\tArrayList<String> vals = pos.get(key);\n\t\t\tif(vals.size()>1){\n\t\t\t\t//add x0=x2 & x2=x9, etc\n\t\t\t\tfor(int i=1; i<vals.size(); i++){\n\t\t\t\t\tBuiltInPredicate p1 = new BuiltInPredicate(MediatorConstants.EQUALS);\n\t\t\t\t\t//p1.addTerm(new VarTerm(key+vals.get(i)));\n\t\t\t\t\t//p1.addTerm(new VarTerm(key+vals.get(i+1)));\n\t\t\t\t\tVarTerm v1 = new VarTerm(key);\n\t\t\t\t\tv1.changeVarName(Integer.valueOf(vals.get(i-1)).intValue());\n\t\t\t\t\tp1.addTerm(v1);\n\t\t\t\t\tVarTerm v2 = new VarTerm(key);\n\t\t\t\t\tv2.changeVarName(Integer.valueOf(vals.get(i)).intValue());\n\t\t\t\t\tp1.addTerm(v2);\n\t\t\t\t\tformula.add(p1);\n\t\t\t\t\t//i=i+1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//deal with constants\n\t\tit = constants.keySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString key = (String)it.next();\n\t\t\tString val = constants.get(key);\n\t\t\t//it's a constant\n\t\t\t//add const3=\"10\"\n\t\t\tBuiltInPredicate p1 = new BuiltInPredicate(MediatorConstants.EQUALS);\n\t\t\tp1.addTerm(new VarTerm(key));\n\t\t\tp1.addTerm(new ConstTerm(val));\n\t\t\tformula.add(p1);\n\t\t}\n\t\treturn formula;\n\t}", "private AbstractExpression<Boolean> constructJunction(CriteriaBuilderImpl cb, Object q, Tree junctionDef) {\n \t\tfinal List<AbstractExpression<Boolean>> predictions = Lists.newArrayList();\n \n \t\tfor (int i = 0; i < junctionDef.getChildCount(); i++) {\n \t\t\tfinal Tree childDef = junctionDef.getChild(i);\n \t\t\tif ((childDef.getType() == JpqlParser.LOR) || (childDef.getType() == JpqlParser.LAND)) {\n \t\t\t\tpredictions.add(this.constructJunction(cb, q, childDef));\n \t\t\t}\n \t\t\telse {\n \t\t\t\tpredictions.add(this.getExpression(cb, q, childDef, Boolean.class));\n \t\t\t}\n \t\t}\n \n \t\tif (predictions.size() == 1) {\n \t\t\treturn predictions.get(0);\n \t\t}\n \n \t\tif (junctionDef.getType() == JpqlParser.LOR) {\n \t\t\treturn cb.or(predictions.toArray(new Predicate[predictions.size()]));\n \t\t}\n \n \t\tfinal Predicate[] predicates = new Predicate[predictions.size()];\n \n \t\tfor (int i = 0; i < predictions.size(); i++) {\n \t\t\tfinal AbstractExpression<Boolean> expression = predictions.get(i);\n \t\t\tif (expression instanceof PredicateImpl) {\n \t\t\t\tpredicates[i] = (Predicate) expression;\n \t\t\t}\n \t\t\telse {\n \t\t\t\tpredicates[i] = new PredicateImpl(expression);\n \t\t\t}\n \t\t}\n \n \t\treturn cb.and(predicates);\n \t}", "public void testConjunctionResolves() throws Exception\n {\n resolveAndAssertSolutions(\"[[g, h, (f :- g, h)], (?- f), [[]]]\");\n }", "public boolean isConjunction() {\r\n\t\treturn conjunction;\r\n\t}", "public boolean isConjunctive() { return true; }", "public void setConjunction(boolean conjunction) {\r\n\t\tthis.conjunction = conjunction;\r\n\t}", "protected Disjunction clause(Argument a) {\n\t\tDisjunction result = new Disjunction(\"clause_\" + a.getName());\n\t\tSet<Argument> attackers = this.CAF.getArgumentAttackers(this.instance, a);\n\t\tFormula accepted = this.isAccepted(a, attackers);\n\t\tFormula notAccepted = this.isNotAccepted(a, attackers);\n\t\tresult.addSubformula(accepted);\n\t\tif(notAccepted != null) {\n\t\t\tresult.addSubformula(notAccepted);\n\t\t}\n\t\treturn result;\n\t}", "private static Triple<SetFormula, Literal, Set<AtomicFormula>> getEquisatisfiableCNFRec(Formula f, Set<AtomicFormula> occurences) {\n\t\tif (f instanceof AtomicFormula) {\n\t\t\tLiteral l = new Literal((AtomicFormula) f);\n\t\t\tSetFormula s = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\t// Just return essentially the inital formula\n\t\t\treturn new Triple<>(s,l, occurences);\n\t\t}\n\t\tif(f instanceof NOTFormula)\n\t\t{\n\t\t\tNOTFormula g = (NOTFormula)f;\n\t\t\tLiteral l = new Literal((AtomicFormula) g.getArgumentFormula(), false);\n\t\t\tSetFormula s = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\t// Just return essentially the inital formula\n\t\t\treturn new Triple<>(s,l, occurences);\n\t\t}\n\t\tif(f instanceof ORFormula)\n\t\t{\n\t\t\tORFormula g = (ORFormula)f;\n\t\t\tSetFormula setFormula = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\tHolder<SetFormula> setFormulaHolder = new Holder<SetFormula>(setFormula);\n\t\t\tSet<AtomicFormula> newOccurences = new HashSet<>(occurences);\n\t\t\tSet<Literal> leadingLiterals = new HashSet<>();\n\t\t\tg.getOrigList().forEach(e -> {\n\t\t\t\tTriple<SetFormula, Literal, Set<AtomicFormula>> triple = getEquisatisfiableCNFRec(e, newOccurences);\n\t\t\t\tnewOccurences.addAll(triple.getThird());\n\t\t\t\tleadingLiterals.add(triple.getSecond());\n\t\t\t\tsetFormulaHolder.set(setFormulaHolder.get().and(triple.getFirst()));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder.get();\n\t\t\tLiteral leadingLiteral = new Literal(Formula.getNewAtomicFormula(newOccurences));\n\t\t\tnewOccurences.add(leadingLiteral.getFormula());\n\t\t\tSet<Literal> firstSet = new HashSet<>(leadingLiterals);\n\t\t\tfirstSet.add(leadingLiteral.negate());\n\t\t\tsetFormula = setFormula.and(new SetFormula(LogicHelper.createSet(firstSet), Type.CNF));\n\t\t\tHolder<SetFormula> setFormulaHolder2 = new Holder<SetFormula>(setFormula);\n\t\t\tleadingLiterals.forEach(l -> {\n\t\t\t\tsetFormulaHolder2.set(setFormulaHolder2.get().and(new SetFormula(LogicHelper.createSet(LogicHelper.createSet(leadingLiteral, l.negate())),Type.CNF)));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder2.get();\n\t\t\treturn new Triple<>(setFormula, leadingLiteral, newOccurences);\n\t\t}\n\t\tif(f instanceof ANDFormula)\n\t\t{\n\t\t\tANDFormula g = (ANDFormula)f;\n\t\t\tSetFormula setFormula = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\tHolder<SetFormula> setFormulaHolder = new Holder<SetFormula>(setFormula);\n\t\t\tSet<AtomicFormula> newOccurences = new HashSet<>(occurences);\n\t\t\tSet<Literal> leadingLiterals = new HashSet<>();\n\t\t\tg.getOrigList().forEach(e -> {\n\t\t\t\tTriple<SetFormula, Literal, Set<AtomicFormula>> triple = getEquisatisfiableCNFRec(e, newOccurences);\n\t\t\t\tnewOccurences.addAll(triple.getThird());\n\t\t\t\tleadingLiterals.add(triple.getSecond());\n\t\t\t\tsetFormulaHolder.set(setFormulaHolder.get().and(triple.getFirst()));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder.get();\n\t\t\tLiteral leadingLiteral = new Literal(Formula.getNewAtomicFormula(newOccurences));\n\t\t\tnewOccurences.add(leadingLiteral.getFormula());\n\t\t\tSet<Literal> firstSet = new HashSet<>(LogicHelper.convert(leadingLiterals, l -> l.negate()));\n\t\t\tfirstSet.add(leadingLiteral);\n\t\t\tsetFormula = setFormula.and(new SetFormula(LogicHelper.createSet(firstSet), Type.CNF));\n\t\t\tHolder<SetFormula> setFormulaHolder2 = new Holder<SetFormula>(setFormula);\n\t\t\tLiteral leadingLiteralNegation = leadingLiteral.negate();\n\t\t\tleadingLiterals.forEach(l -> {\n\t\t\t\tsetFormulaHolder2.set(setFormulaHolder2.get().and(new SetFormula(LogicHelper.createSet(LogicHelper.createSet(leadingLiteralNegation, l)),Type.CNF)));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder2.get();\n\t\t\treturn new Triple<>(setFormula, leadingLiteral, newOccurences);\n\t\t}\n\t\tthrow new IllegalArgumentException(\"Formula type not supported\");\n\t}", "public void testConjunctionResolvesWhenFirstPathRevisitsSecond() throws Exception\n {\n resolveAndAssertSolutions(\"[[g, (h :- g), (f :- h, g)], (?- f), [[]]]\");\n }", "private boolean isInNormalForm (OWLDescription cls_left, OWLDescription cls_right) throws OWLException\n\t{\n\t\tif (isConjunction(cls_left) && isPureConjunction(cls_right))\n\t\t\treturn true;\n\t\t\n\t\tif (isPureDisjunction(cls_left) && isConjunction(cls_right))\n\t\t\treturn true;\n\t\t\n\t\tif (isPureConjunction(cls_left) && isPureDisjunction(cls_right))\n\t\t\treturn true;\n\t\t\t\n\t\treturn false;\n\t}", "public void testSuccesiveConjunctiveTermsOk() throws Exception\n {\n resolveAndAssertSolutions(\"[[f(a), g(b), h(c)], (?- f(X), g(Y), h(Z)), [[X <-- a, Y <-- b, Z <-- c]]]\");\n }", "public void testX1andX2orNotX1() {\n \tCircuit circuit = new Circuit();\n \t\n \tBoolean b1 = Boolean.TRUE;\n \tBoolean b2 = Boolean.FALSE;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tOr or = (Or) circuit.getFactory().getGate(Gate.OR);\n\t\tand.setLeftInput(b1);\n\t\tand.setRightInput(b2);\n\t\tand.eval();\n\t\tnot.setInput(b1);\n\t\tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n\t\tassertEquals(Boolean.FALSE, or.eval());\n\t\tassertEquals(Boolean.FALSE, circuit.eval());\n//\t\t==========================================\n\t\tb1 = Boolean.FALSE;\n \tb2 = Boolean.TRUE;\n// \tand.eval();\n// \tnot.eval();\n \tassertEquals(Boolean.FALSE, circuit.eval());\n// \t============================================\n \tDouble d1 = 0.0;\n \tDouble d2 = 1.0;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n\t\tnot.setInput(d1);\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(1.0), or.eval());\n// \t============================================\n \td1 = 0.5;\n \td2 = 0.5;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n// \t============================================\n \ttry {\n \td1 = 0.5;\n \td2 = 2.0;\n \tand.setLeftInput(d1);\n \t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n \t\tor.setLeftInput(and.getOutput());\n \t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n \t} catch (IllegalArgumentException e) {\n \t\tSystem.err.println(\"IllegalArgumentException: \" + e.getMessage());\n \t}\n\n }", "public void testConjunctionResolvesWhenSecondPathRevisitsFirst() throws Exception\n {\n resolveAndAssertSolutions(\"[[g, (h :- g), (f :- g, h)], (?- f), [[]]]\");\n }", "private Expr conjunction(Position pos, List<Expr> clauses, Expr self) {\n assert clauses.size() > 0;\n Substitution<Expr> subst = new Substitution<Expr>(Expr.class, Collections.singletonList(self)) {\n protected Expr subst(Expr n) {\n if (n instanceof X10Special && ((X10Special) n).kind() == X10Special.SELF)\n return by.get(0);\n return n;\n }\n };\n Expr left = null;\n for (Expr clause : clauses) {\n Expr right = (Expr) clause.visit(subst);\n right = (Expr) right.visit(this);\n if (left == null)\n left = right;\n else {\n left = xnf.Binary(pos, left, X10Binary_c.COND_AND, right).type(xts.Boolean());\n try {\n left = visitBinary((X10Binary_c) left);\n } catch (SemanticException e) {\n assert false : \"Unexpected exception when typechecking \"+left+\": \"+e;\n }\n }\n }\n return left;\n }", "private double logicalAnd() {\n\t\tdouble q = p<=0.5?p:1-p;\n\t\treturn num * configMap.get('r') + (num-1) * configMap.get('l') + num * configMap.get('f') + configMap.get('t') + q * configMap.get('m') + p * configMap.get('a');\n\t}", "protected Expression convertDisjunctive(Sequence seq) throws SugarException {\n converter.checkArity(seq, 1);\n if (!seq.get(1).isSequence()) {\n converter.syntaxError(seq);\n }\n if (!Converter.DECOMPOSE_DISJUNCTIVE) {\n return seq.hold();\n }\n Sequence seq1 = (Sequence) seq.get(1);\n int n = seq1.length();\n List<Expression> xs = new ArrayList<Expression>();\n xs.add(Expression.AND);\n for (int i = 0; i < n; i++) {\n if (!seq1.get(i).isSequence(1)) {\n converter.syntaxError(seq);\n }\n Sequence task1 = (Sequence) seq1.get(i);\n Expression origin1 = task1.get(0);\n Expression duration1 = task1.get(1);\n for (int j = i + 1; j < n; j++) {\n Sequence task2 = (Sequence) seq1.get(j);\n Expression origin2 = task2.get(0);\n Expression duration2 = task2.get(1);\n Expression x1 = origin1.add(duration1).le(origin2);\n Expression x2 = origin2.add(duration2).le(origin1);\n xs.add(duration1.eq(0).or(duration2.eq(0)).or(x1).or(x2));\n }\n }\n Expression x = Expression.create(xs);\n return x;\n }", "private static void andify(List<ExternalizedStateComponent> inputs, ExternalizedStateComponent output, ExternalizedStateConstant trueProp) {\n\t\tfor(ExternalizedStateComponent c : inputs) {\n\t\t\tif(c instanceof ExternalizedStateConstant && !((ExternalizedStateConstant)c).getValue()) {\n\t\t\t\t//Connect false (c) to the output\n\t\t\t\toutput.addInput(c);\n\t\t\t\tc.addOutput(output);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t//For reals... just skip over any true constants\n\t\tExternalizedStateAnd and = new ExternalizedStateAnd();\n\t\tfor(ExternalizedStateComponent in : inputs) {\n\t\t\tif(!(in instanceof ExternalizedStateConstant)) {\n\t\t\t\tin.addOutput(and);\n\t\t\t\tand.addInput(in);\n\t\t\t}\n\t\t}\n\t\t//What if they're all true? (Or inputs is empty?) Then no inputs at this point...\n\t\tif(and.getInputs().isEmpty()) {\n\t\t\t//Hook up to \"true\"\n\t\t\ttrueProp.addOutput(output);\n\t\t\toutput.addInput(trueProp);\n\t\t\treturn;\n\t\t}\n\t\t//If there's just one, on the other hand, don't use the and gate\n\t\tif(and.getInputs().size() == 1) {\n\t\t\tExternalizedStateComponent in = and.getSingleInput();\n\t\t\tin.removeOutput(and);\n\t\t\tand.removeInput(in);\n\t\t\tin.addOutput(output);\n\t\t\toutput.addInput(in);\n\t\t\treturn;\n\t\t}\n\t\tand.addOutput(output);\n\t\toutput.addInput(and);\n\t}", "boolean isCommutative();", "private List<ParseTree> separateAND(ParseTree t){\n List<ParseTree> nodes = new ArrayList<ParseTree>();\n List<ParseTree> aux = getNodes(t, RulesParser.RULE_conjuncion);\n List<ParseTree> factores = getNodes(t, RulesParser.RULE_factor); // factors enclosed in parentheses, such as ((1+2)+3)\n int count = 0;\n for (int i = 0; i < factores.size(); i++) {\n if (((RulesParser.FactorContext) factores.get(i)).PA() != null){\n count++;\n }\n }\n int params = Trees.findAllRuleNodes(t, RulesParser.RULE_parametros).size();\n params = aux.size() == params ? 0 : params;\n for (int i = 0; i < aux.size() - params - count; i++) {\n if (aux.get(i).getChild(i) instanceof RulesParser.ConjuncionContext){\n nodes.add(((RulesParser.ConjuncionContext) aux.get(i)).igualdad());\n } else{\n nodes.add(aux.get(i));\n }\n }\n Collections.reverse(nodes);\n return nodes;\n }", "public String getAndOr();", "public Object visitLogicalAndExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n \n if (a instanceof Long && b instanceof Long) {\n return (Long) a & (Long) b;\n }\n else {\n return parens(a) + \" && \" + parens(b);\n }\n }\n else {\n BDD a, b, bdd;\n \n a = ensureBDD(dispatch(n.getGeneric(0)));\n b = ensureBDD(dispatch(n.getGeneric(1)));\n \n bdd = a.andWith(b);\n \n return bdd;\n }\n }", "public void execute() {\n\t\tnot_a.in.set(a.get());\n\t\tnot_b.in.set(b.get());\n\n\t\t/* we now execute both of the NOT gates. Each one should\n\t\t * write a value to their output.\n\t\t */\n\t\tnot_a.execute();\n\t\tnot_b.execute();\n\n\n\t\t/* ----- IMPORTANT NOTE 2: -----\n\t\t *\n\t\t * We need to perform NOT twice in this component - since XOR\n\t\t * uses the NOT value of each of the inputs a,b. But we MUST\n\t\t * NOT use the same object twice! Instead, we use two\n\t\t * different NOT objects.\n\t\t *\n\t\t * In a program, this is of course a silly design. But\n\t\t * remember that we are trying to simulate hardware here - and\n\t\t * each component (such as a NOT gate) can only generate one\n\t\t * result per clock tick. So if we want to negate two different\n\t\t * signals for the same calculation, we need two differnt gates.\n\t\t */\n\n\n\t\t/* we now connect various wires to each AND gate. Each AND\n\t\t * checks for \"this value is true, the other is false\"; it does\n\t\t * this by doing the AND of one of the inputs, and the NOT of\n\t\t * the other.\n\t\t *\n\t\t * Note that it's perfectly OK to connect the same input to\n\t\t * two different devices - we just run wires to two different\n\t\t * physical places.\n\t\t */\n\t\tand1.a.set(a.get());\n\t\tand1.b.set(not_b.out.get());\n\n\t\tand2.a.set(not_a.out.get());\n\t\tand2.b.set(b.get());\n\n\t\t/* we execute the two AND gates *AFTER* their inputs are\n\t\t * in place.\n\t\t */\n\t\tand1.execute();\n\t\tand2.execute();\n\n\n\t\t/* the value of XOR is \"this and not that, or not this and that\" -\n\t\t * or, more formally,\n\t\t * (A ~B) + (~A B)\n\t\t * So our last step is to OR the result of the two AND gates\n\t\t * together. Its output is the output from our XOR gate.\n\t\t */\n\t\tor.a.set(and1.out.get());\n\t\tor.b.set(and2.out.get());\n\t\tor.execute();\n\t\tout.set(or.out.get());\n\t}", "@Override\n\tpublic String toString() {\n\t\tFormula[] literals = new Formula[posLiterals.size() + negLiterals.size()];\n\t\tint i;\n\t\tfor (i = 0; i < posLiterals.size(); i++)\n\t\t\tliterals[i] = new Negation(posLiterals.get(i));\n\t\tfor (int j = 0; j < negLiterals.size(); j++)\n\t\t\tliterals[i++] = negLiterals.get(j);\n\t\t\n\t\treturn (literals.length > 1) ? new Disjunction(literals).toString() : literals[0].toString();\n\t}", "ANDDecomposition createANDDecomposition();", "private Expr or() { // This uses the same recursive matching structure as other binary operators.\n Expr expr = and(); // OR takes precedence over AND.\n while(match(OR)) {\n Token operator = previous();\n Expr right = and();\n expr = new Expr.Logical(expr, operator, right);\n }\n return expr;\n }", "public abstract boolean isCongruent(LambdaTerm P);", "public void testConjoinedVariablesPropagateAccrossConjunction() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), h(x), (f(X, Y) :- g(X), h(Y))], (?- f(X, X)), [[X <-- x]]]\");\n }", "boolean getDoCommonSubexpressionElimination();", "public static BinaryExpression andAlso(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final void rule__AstExpressionAnd__OperatorAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2818:1: ( ( '&&' ) | ( 'and' ) )\n int alt13=2;\n int LA13_0 = input.LA(1);\n\n if ( (LA13_0==17) ) {\n alt13=1;\n }\n else if ( (LA13_0==18) ) {\n alt13=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 13, 0, input);\n\n throw nvae;\n }\n switch (alt13) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2819:1: ( '&&' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2819:1: ( '&&' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2820:1: '&&'\n {\n before(grammarAccess.getAstExpressionAndAccess().getOperatorAmpersandAmpersandKeyword_1_1_0_0()); \n match(input,17,FOLLOW_17_in_rule__AstExpressionAnd__OperatorAlternatives_1_1_06085); \n after(grammarAccess.getAstExpressionAndAccess().getOperatorAmpersandAmpersandKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2827:6: ( 'and' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2827:6: ( 'and' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2828:1: 'and'\n {\n before(grammarAccess.getAstExpressionAndAccess().getOperatorAndKeyword_1_1_0_1()); \n match(input,18,FOLLOW_18_in_rule__AstExpressionAnd__OperatorAlternatives_1_1_06105); \n after(grammarAccess.getAstExpressionAndAccess().getOperatorAndKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public dFormula asFormula() {\n\t\treturn new ElementaryFormula(0, phonstringCondition);\n\t}", "public void testConjunctionInQueryVarNotLastFailsWhenBindingsDoNotMatch() throws Exception\n {\n resolveAndAssertFailure(new String[] { \"f(x)\", \"g(y)\" }, \"?- f(X), g(X), g(X)\");\n }", "public void testConjunctionInQueryVarFailsWhenBindingsDoNotMatch() throws Exception\n {\n resolveAndAssertFailure(new String[] { \"g(x)\", \"f(y)\" }, \"?- f(X), g(X)\");\n }", "private String parseConjunction(Expression<String> exp) throws Exception{\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tfor (Expression<String> keyword : exp.getChildren()) {\r\n \t\tif(builder.length() > 0) {\r\n \t\t\tbuilder.append(\" \");\r\n\t\t\t}\r\n \t\tString kw = keyword.getAllK().toArray()[0].toString();\r\n \t\tif (kw.length() > KEYWORD_LENGTH_MAX) {\r\n \t\t\tthrow new KeywordLengthViolationException(KEYWORD_LENGTH_MAX_ERROR);\r\n \t\t}\r\n \t\tif (keyword.getExprType() == \"variable\") {\r\n \t\t\tbuilder.append(kw);\r\n \t\t} else if (keyword.getExprType() == \"not\") {\r\n \t\t\tbuilder.append(\"-\" + kw);\r\n \t\t}\r\n \t}\r\n\t\treturn builder.toString();\r\n\t}", "protected String roleMapToFormula() {\n List<String> pieces = new ArrayList<String>();\n for ( Map.Entry<SecurityOwner, String> entry : roleBasedConstraintMap.entrySet() ) {\n SecurityOwner owner = entry.getKey();\n String formula = entry.getValue();\n\n StringBuilder formulaBuf = new StringBuilder();\n formulaBuf.append( FUNC_AND ).append( PARAM_LIST_BEGIN ).append( FUNC_IN ).append( PARAM_LIST_BEGIN ).append(\n PARAM_QUOTE ).append( owner.getOwnerName() ).append( PARAM_QUOTE ).append( PARAM_SEPARATOR ).append(\n owner.getOwnerType() == SecurityOwner.OWNER_TYPE_ROLE ? FUNC_ROLES : FUNC_USER ).append( PARAM_LIST_END )\n .append( PARAM_SEPARATOR ).append( formula ).append( PARAM_LIST_END );\n pieces.add( formulaBuf.toString() );\n\n }\n\n StringBuilder buf = new StringBuilder();\n buf.append( FUNC_OR );\n buf.append( PARAM_LIST_BEGIN );\n int index = 0;\n for ( String piece : pieces ) {\n if ( index > 0 ) {\n buf.append( PARAM_SEPARATOR );\n }\n buf.append( piece );\n index++;\n }\n buf.append( PARAM_LIST_END );\n\n logger.debug( \"singleFormula: \" + buf );\n\n return buf.toString();\n }", "public final ManchesterOWLSyntaxAutoComplete.incompleteConjunction_return incompleteConjunction() {\n ManchesterOWLSyntaxAutoComplete.incompleteConjunction_return retval = new ManchesterOWLSyntaxAutoComplete.incompleteConjunction_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.incompleteUnary_return e = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:573:1:\n // ( ^( INCOMPLETE_CONJUNCTION (e= incompleteUnary )? ) )\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:574:5:\n // ^( INCOMPLETE_CONJUNCTION (e= incompleteUnary )? )\n {\n match(input, INCOMPLETE_CONJUNCTION,\n FOLLOW_INCOMPLETE_CONJUNCTION_in_incompleteConjunction2159);\n if (state.failed) {\n return retval;\n }\n if (input.LA(1) == Token.DOWN) {\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:574:33:\n // (e= incompleteUnary )?\n int alt25 = 2;\n int LA25_0 = input.LA(1);\n if (LA25_0 >= INCOMPLETE_NEGATED_EXPRESSION\n && LA25_0 <= INCOMPLETE_VALUE_RESTRICTION) {\n alt25 = 1;\n }\n switch (alt25) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:574:33:\n // e= incompleteUnary\n {\n pushFollow(FOLLOW_incompleteUnary_in_incompleteConjunction2166);\n e = incompleteUnary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n if (state.backtracking == 1) {\n if (e != null) {\n retval.completions = e.completions;\n } else {\n retval.completions = new ArrayList<>(\n symtab.getOWLClassCompletions());\n }\n }\n }\n if (state.backtracking == 1 && retval.completions != null) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(retval.completions);\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "public static ArrayList<Expression> extractDisjunct(Expression e){\n\t\tArrayList<Expression> result = new ArrayList<Expression>();\n\t\tif (!(e instanceof OrExpression))\n\t\t\tresult.add(e);\n\t\telse \n\t\t\taddDisjunct(result,e);\n\t\treturn result;\n\t}", "public And(Formula f1, Formula f2) {\n\t\tsuper(f1, f2);\n\t}", "public void testConjunctionInQueryVarResolvesWhenBindingsMatch() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), f(x)], (?- f(X), g(X)), [[X <-- x]]]\");\n }", "public void testVariableBindingFromQueryPropagatesAccrossConjunction() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), h(x), (f(X) :- g(X), h(X))], (?- f(x)), [[]]]\");\n }", "boolean isAtom(Formula f);", "private Object eval(OrExpr expr) {\n if (expr.getExpr().size() == 1) {\n return eval(expr.getExpr().get(0));\n }\n\n boolean result = false;\n for (AndExpr e : expr.getExpr()) {\n Object res = eval(e);\n if (res instanceof Boolean) {\n result = result || (Boolean) res;\n } else {\n throw new RaydenScriptException(\"Expression error: Part expression result is not a boolean. Type: '\" + res.getClass() + \"'\");\n }\n\n if (result) {\n return true;\n }\n }\n return false;\n }", "public static BinaryExpression and(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private Term parseLogicalAnd(final boolean required) throws ParseException {\n Term t1 = parseComparison(required);\n while (t1 != null) {\n /*int tt =*/ _tokenizer.next();\n if (isSpecial(\"&&\") || isKeyword(\"and\")) {\n Term t2 = parseComparison(true);\n if ((t1.isB() && t2.isB()) || !isTypeChecking()) {\n t1 = new Term.AndB(t1, t2);\n } else {\n reportTypeErrorB2(\"'&&' or 'and'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public static BinaryExpression exclusiveOr(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@FunctionalInterface\n/* */ public interface DoublePredicate\n/* */ {\n/* */ default DoublePredicate and(DoublePredicate paramDoublePredicate) {\n/* 69 */ Objects.requireNonNull(paramDoublePredicate);\n/* 70 */ return paramDouble -> (test(paramDouble) && paramDoublePredicate.test(paramDouble));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default DoublePredicate negate() {\n/* 81 */ return paramDouble -> !test(paramDouble);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default DoublePredicate or(DoublePredicate paramDoublePredicate) {\n/* 101 */ Objects.requireNonNull(paramDoublePredicate);\n/* 102 */ return paramDouble -> (test(paramDouble) || paramDoublePredicate.test(paramDouble));\n/* */ }\n/* */ \n/* */ boolean test(double paramDouble);\n/* */ }", "@Override\n public ILogical and(ILogical operador) {\n return operador.andBinary(this);\n }", "public static void main(String[] args) {\nboolean a, b, c;\na =true;\nb = false;\nc =a && b;\n\nSystem.out.println(\"c = a&&B:\" + c);\nc = a||b;\nSystem.out.println(\"c = a||b:\" + c);\nc = a==b;\nSystem.out.println(\"c = a==b:\" + c);\nc = a!=b;\nSystem.out.println(\"c = a!=b:\" + c);\n\n\n\n\t}", "public static void main(String[] args) { , or , not\n // truth table -> t=1 f=0\n // a =t b= f c = a and b => a.b =0=>f\n\n // except 0 every no. is treated as true\n // int a=1 int b=2 a and b => a.b\n // and -> a=1 , b=2, a and b => a.b\n\n\n // and\n boolean a= false;\n boolean b= false;\n\n boolean c= a && b; // a.b\n System.out.println(c);\n\n //or\n boolean f= true;\n boolean d= true;\n\n boolean e= f || d; // a+b\n System.out.println(e);\n\n // not\n boolean g =true;\n boolean h= !g;\n System.out.println(h);\n\n }", "public final EObject ruleDisjunction() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_Conjunction_0 = null;\r\n\r\n EObject lv_operator_2_1 = null;\r\n\r\n EObject lv_operator_2_2 = null;\r\n\r\n EObject lv_right_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2173:28: ( (this_Conjunction_0= ruleConjunction ( () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleConjunction ) ) )* ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2174:1: (this_Conjunction_0= ruleConjunction ( () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleConjunction ) ) )* )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2174:1: (this_Conjunction_0= ruleConjunction ( () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleConjunction ) ) )* )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2175:5: this_Conjunction_0= ruleConjunction ( () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleConjunction ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getDisjunctionAccess().getConjunctionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleConjunction_in_ruleDisjunction4662);\r\n this_Conjunction_0=ruleConjunction();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_Conjunction_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2183:1: ( () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleConjunction ) ) )*\r\n loop29:\r\n do {\r\n int alt29=2;\r\n int LA29_0 = input.LA(1);\r\n\r\n if ( ((LA29_0>=47 && LA29_0<=50)) ) {\r\n alt29=1;\r\n }\r\n\r\n\r\n switch (alt29) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2183:2: () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleConjunction ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2183:2: ()\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2184:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getDisjunctionAccess().getDisjunctionLeftAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2189:2: ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2190:1: ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2190:1: ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2191:1: (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2191:1: (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator )\r\n \t int alt28=2;\r\n \t int LA28_0 = input.LA(1);\r\n\r\n \t if ( ((LA28_0>=47 && LA28_0<=48)) ) {\r\n \t alt28=1;\r\n \t }\r\n \t else if ( ((LA28_0>=49 && LA28_0<=50)) ) {\r\n \t alt28=2;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return current;}\r\n \t NoViableAltException nvae =\r\n \t new NoViableAltException(\"\", 28, 0, input);\r\n\r\n \t throw nvae;\r\n \t }\r\n \t switch (alt28) {\r\n \t case 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2192:3: lv_operator_2_1= ruleOrOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getDisjunctionAccess().getOperatorOrOperatorParserRuleCall_1_1_0_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleOrOperator_in_ruleDisjunction4694);\r\n \t lv_operator_2_1=ruleOrOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getDisjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_1, \r\n \t \t\t\"OrOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n \t case 2 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2207:8: lv_operator_2_2= ruleXOrOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getDisjunctionAccess().getOperatorXOrOperatorParserRuleCall_1_1_0_1()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleXOrOperator_in_ruleDisjunction4713);\r\n \t lv_operator_2_2=ruleXOrOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getDisjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_2, \r\n \t \t\t\"XOrOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2225:2: ( (lv_right_3_0= ruleConjunction ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2226:1: (lv_right_3_0= ruleConjunction )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2226:1: (lv_right_3_0= ruleConjunction )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2227:3: lv_right_3_0= ruleConjunction\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getDisjunctionAccess().getRightConjunctionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleConjunction_in_ruleDisjunction4737);\r\n \t lv_right_3_0=ruleConjunction();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getDisjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"right\",\r\n \t \t\tlv_right_3_0, \r\n \t \t\t\"Conjunction\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop29;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "private void processAxioms(){\n if(isComplexAxiom()){\n isTerminology = false;\n isTerminologyWithRCIs = false;\n }\n else{\n inspectAxiomLHS();\n\n Predicate<OWLClass> repeatedEquality = e -> equalityNameCount.get(e) > 1;\n Predicate<OWLClass> repeatedInclusion = e -> inclusionNameCount.get(e) > 1;\n\n //No shared names or repeated equalities\n if(containsSharedNames() || equalityNameCount.keySet().stream().anyMatch(repeatedEquality)){\n isTerminology = false;\n isTerminologyWithRCIs = false;\n }\n //Has some repeated inclusions\n else if(inclusionNameCount.keySet().stream().anyMatch(repeatedInclusion)){\n isTerminology = false;\n isTerminologyWithRCIs = true;\n }\n else{\n //Is a terminology hence is a terminology with RCIs\n isTerminology = true;\n isTerminologyWithRCIs = true;\n }\n\n }\n }", "public final EObject ruleGoalDisjunction() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_GoalConjunction_0 = null;\r\n\r\n EObject lv_operator_2_1 = null;\r\n\r\n EObject lv_operator_2_2 = null;\r\n\r\n EObject lv_right_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1460:28: ( (this_GoalConjunction_0= ruleGoalConjunction ( () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleGoalConjunction ) ) )* ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1461:1: (this_GoalConjunction_0= ruleGoalConjunction ( () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleGoalConjunction ) ) )* )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1461:1: (this_GoalConjunction_0= ruleGoalConjunction ( () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleGoalConjunction ) ) )* )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1462:5: this_GoalConjunction_0= ruleGoalConjunction ( () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleGoalConjunction ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getGoalDisjunctionAccess().getGoalConjunctionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleGoalConjunction_in_ruleGoalDisjunction3056);\r\n this_GoalConjunction_0=ruleGoalConjunction();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_GoalConjunction_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1470:1: ( () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleGoalConjunction ) ) )*\r\n loop21:\r\n do {\r\n int alt21=2;\r\n int LA21_0 = input.LA(1);\r\n\r\n if ( ((LA21_0>=47 && LA21_0<=50)) ) {\r\n alt21=1;\r\n }\r\n\r\n\r\n switch (alt21) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1470:2: () ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) ) ( (lv_right_3_0= ruleGoalConjunction ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1470:2: ()\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1471:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getGoalDisjunctionAccess().getGoalDisjunctionLeftAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1476:2: ( ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1477:1: ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1477:1: ( (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1478:1: (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1478:1: (lv_operator_2_1= ruleOrOperator | lv_operator_2_2= ruleXOrOperator )\r\n \t int alt20=2;\r\n \t int LA20_0 = input.LA(1);\r\n\r\n \t if ( ((LA20_0>=47 && LA20_0<=48)) ) {\r\n \t alt20=1;\r\n \t }\r\n \t else if ( ((LA20_0>=49 && LA20_0<=50)) ) {\r\n \t alt20=2;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return current;}\r\n \t NoViableAltException nvae =\r\n \t new NoViableAltException(\"\", 20, 0, input);\r\n\r\n \t throw nvae;\r\n \t }\r\n \t switch (alt20) {\r\n \t case 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1479:3: lv_operator_2_1= ruleOrOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getGoalDisjunctionAccess().getOperatorOrOperatorParserRuleCall_1_1_0_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleOrOperator_in_ruleGoalDisjunction3088);\r\n \t lv_operator_2_1=ruleOrOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getGoalDisjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_1, \r\n \t \t\t\"OrOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n \t case 2 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1494:8: lv_operator_2_2= ruleXOrOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getGoalDisjunctionAccess().getOperatorXOrOperatorParserRuleCall_1_1_0_1()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleXOrOperator_in_ruleGoalDisjunction3107);\r\n \t lv_operator_2_2=ruleXOrOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getGoalDisjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_2, \r\n \t \t\t\"XOrOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1512:2: ( (lv_right_3_0= ruleGoalConjunction ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1513:1: (lv_right_3_0= ruleGoalConjunction )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1513:1: (lv_right_3_0= ruleGoalConjunction )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1514:3: lv_right_3_0= ruleGoalConjunction\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getGoalDisjunctionAccess().getRightGoalConjunctionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleGoalConjunction_in_ruleGoalDisjunction3131);\r\n \t lv_right_3_0=ruleGoalConjunction();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getGoalDisjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"right\",\r\n \t \t\tlv_right_3_0, \r\n \t \t\t\"GoalConjunction\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop21;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public static Conjunction and(Criterion... criteria) {\n return new Conjunction(criteria);\n }", "private SingleRuleBuilder or(boolean negate, String predicate, String... variables) {\n literals.add( new MLNText.Literal(!negate, predicate, variables[0], variables[1]));\n return this;\n }", "public Operation zCombinedAnd(Operation op)\r\n {\r\n if (op.equals(this))\r\n {\r\n return this;\r\n }\r\n return null;\r\n }", "public CtlFormula(String expression, State state, KripkeStructure kripke) {\r\n this._convertionString = new HashMap<String, String>();\r\n this._convertionString.put(\"and\", \"&\");\r\n this._convertionString.put(\"or\", \"|\");\r\n this._convertionString.put(\"->\", \">\");\r\n this._convertionString.put(\"not\", \"!\");\r\n this._kripke = kripke;\r\n this._state = state;\r\n this._expression = this.ConvertToSystemFormula(expression);\r\n }", "public String join(String conjunction, Iterable<String> list) {\n\t\treturn join(conjunction, list.iterator());\n\t}", "public static BinaryExpression andAlso(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public static Disjunction or(Criterion... criteria) {\n return new Disjunction(criteria);\n }", "private static void orify(Collection<ExternalizedStateComponent> inputs, ExternalizedStateComponent output, ExternalizedStateConstant falseProp) {\n\t\t//TODO: Look for already-existing ors with the same inputs?\n\t\t//Or can this be handled with a GDL transformation?\n\n\t\t//Special case: An input is the true constant\n\t\tfor(ExternalizedStateComponent in : inputs) {\n\t\t\tif(in instanceof ExternalizedStateConstant && ((ExternalizedStateConstant) in).getValue()) {\n\t\t\t\t//True constant: connect that to the component, done\n\t\t\t\tin.addOutput(output);\n\t\t\t\toutput.addInput(in);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t//Special case: An input is \"or\"\n\t\t//I'm honestly not sure how to handle special cases here...\n\t\t//What if that \"or\" gate has multiple outputs? Could that happen?\n\n\t\t//For reals... just skip over any false constants\n\t\tExternalizedStateOr or = new ExternalizedStateOr();\n\t\tfor(ExternalizedStateComponent in : inputs) {\n\t\t\tif(!(in instanceof ExternalizedStateConstant)) {\n\t\t\t\tin.addOutput(or);\n\t\t\t\tor.addInput(in);\n\t\t\t}\n\t\t}\n\t\t//What if they're all false? (Or inputs is empty?) Then no inputs at this point...\n\t\tif(or.getInputs().isEmpty()) {\n\t\t\t//Hook up to \"false\"\n\t\t\tfalseProp.addOutput(output);\n\t\t\toutput.addInput(falseProp);\n\t\t\treturn;\n\t\t}\n\t\t//If there's just one, on the other hand, don't use the or gate\n\t\tif(or.getInputs().size() == 1) {\n\t\t\tExternalizedStateComponent in = or.getSingleInput();\n\t\t\tin.removeOutput(or);\n\t\t\tor.removeInput(in);\n\t\t\tin.addOutput(output);\n\t\t\toutput.addInput(in);\n\t\t\treturn;\n\t\t}\n\t\tor.addOutput(output);\n\t\toutput.addInput(or);\n\t}", "public final EObject ruleGoalConjunction() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_GoalComparison_0 = null;\r\n\r\n EObject lv_operator_2_0 = null;\r\n\r\n EObject lv_right_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1550:28: ( (this_GoalComparison_0= ruleGoalComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleGoalComparison ) ) )* ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1551:1: (this_GoalComparison_0= ruleGoalComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleGoalComparison ) ) )* )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1551:1: (this_GoalComparison_0= ruleGoalComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleGoalComparison ) ) )* )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1552:5: this_GoalComparison_0= ruleGoalComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleGoalComparison ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getGoalConjunctionAccess().getGoalComparisonParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleGoalComparison_in_ruleGoalConjunction3226);\r\n this_GoalComparison_0=ruleGoalComparison();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_GoalComparison_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1560:1: ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleGoalComparison ) ) )*\r\n loop22:\r\n do {\r\n int alt22=2;\r\n int LA22_0 = input.LA(1);\r\n\r\n if ( ((LA22_0>=51 && LA22_0<=52)) ) {\r\n alt22=1;\r\n }\r\n\r\n\r\n switch (alt22) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1560:2: () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleGoalComparison ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1560:2: ()\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1561:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getGoalConjunctionAccess().getGoalConjunctionLeftAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1566:2: ( (lv_operator_2_0= ruleAndOperator ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1567:1: (lv_operator_2_0= ruleAndOperator )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1567:1: (lv_operator_2_0= ruleAndOperator )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1568:3: lv_operator_2_0= ruleAndOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getGoalConjunctionAccess().getOperatorAndOperatorParserRuleCall_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleAndOperator_in_ruleGoalConjunction3256);\r\n \t lv_operator_2_0=ruleAndOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getGoalConjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_0, \r\n \t \t\t\"AndOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1584:2: ( (lv_right_3_0= ruleGoalComparison ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1585:1: (lv_right_3_0= ruleGoalComparison )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1585:1: (lv_right_3_0= ruleGoalComparison )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1586:3: lv_right_3_0= ruleGoalComparison\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getGoalConjunctionAccess().getRightGoalComparisonParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleGoalComparison_in_ruleGoalConjunction3277);\r\n \t lv_right_3_0=ruleGoalComparison();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getGoalConjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"right\",\r\n \t \t\tlv_right_3_0, \r\n \t \t\t\"GoalComparison\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop22;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "protected String getIntermediateFormula() {\n if ( isGlobal() ) {\n return globalConstraint;\n } else if ( isRoleBased() ) {\n return roleMapToFormula();\n } else {\n // rls is disabled\n return EMPTY_STRING;\n }\n }", "@Test\n\tvoid attributeGroupDisjunction2() {\n\t\tassertEquals(\n\t\t\t\"Match procedure with left OR right foot (grouped)\",\n\t\t\tSets.newHashSet(AMPUTATION_FOOT_LEFT, AMPUTATION_FOOT_RIGHT, AMPUTATION_FOOT_BILATERAL),\n\t\t\tstrings(selectConceptIds(\"< 71388002 |Procedure|: { 363704007 |Procedure site| = 22335008 |Left Foot| } OR { 363704007 |Procedure site| = 7769000 |Right Foot| }\")));\n\n\t}", "private static boolean checkAndOperations(String expression, Lexemes lexemes, SymbolTable table) {\n\t\tif (expression.contains(\"and\")) {\n\t\t\tString[] arr = expression.split(\"and\");\n\t\t\tint finalIndex = arr.length - 1;\n\n\t\t\tfor (int i = 0; i <= finalIndex; i++) {\n\t\t\t\tString s = arr[i];\n\n\t\t\t\tif (table.contains(s)) {\n\t\t\t\t\tint id = table.getIdOfVariable(s);\n\t\t\t\t\tlexemes.insertLexeme(\"ID\", ((Integer) id).toString());\n\t\t\t\t} else {\n\n\t\t\t\t\tif (s.equals(\"true\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"true\");\n\t\t\t\t\t} else if (s.equals(\"false\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"false\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!checkOrOperations(s.trim(), lexemes, table)) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < finalIndex) {\n\t\t\t\t\tlexemes.insertLexeme(\"LOGOP\", \"and\");\n\t\t\t\t} else if (expression.endsWith(\"and\")) {\n\t\t\t\t\tlexemes.insertLexeme(\"LOGOP\", \"and\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (!checkOrOperations(expression.trim(), lexemes, table)) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "public static String punctuateAnd(List<String> elements)\r\n/* 43: */ {\r\n/* 44: 43 */ return punctuateSequence(elements, \"and\");\r\n/* 45: */ }", "private Term parseBitwiseAnd(final boolean required) throws ParseException {\n Term t1 = parseAdd(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '&') {\n Term t2 = parseAdd(true);\n if ((t1.isI() && t2.isI()) || !isTypeChecking()) {\n t1 = new Term.AndI(t1, t2);\n } else {\n reportTypeErrorI2(\"'&'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public static BinaryExpression exclusiveOr(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "private Term parseLogicalOr(final boolean required) throws ParseException {\n Term t1 = parseLogicalAnd(required);\n while (t1 != null) {\n /*int tt =*/ _tokenizer.next();\n if (isSpecial(\"||\") || isKeyword(\"or\")) {\n Term t2 = parseLogicalAnd(true);\n if ((t1.isB() && t2.isB()) || !isTypeChecking()) {\n t1 = new Term.OrB(t1, t2);\n } else {\n reportTypeErrorB2(\"'||' or 'or'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "private boolean conditionAndOr( String condition, String[] ligne )\r\n {\n if( !condition.contains(\"AND\") || !condition.contains(\"OR\") )\r\n return this.conditionSimple(condition, ligne);\r\n \r\n // on suppose que cette fonction ne peut être utilisée que si\r\n // la condition ne contient pas des ( ou )\r\n // dans le cas d'une succession de AND et OR\r\n // on donne la priorité pour le AND\r\n boolean resultat = false;\r\n boolean resAnd = true;\r\n boolean resOr = false;\r\n \r\n // pour supprimer tous les espaces\r\n condition = condition.replaceAll(\" \", \"\");\r\n String[] conditionsAnd = condition.split(\"AND\");\r\n for( String cdsAnd : conditionsAnd ) // cds abréviation de conditions\r\n {\r\n String[] conditionsOr = cdsAnd.split(\"OR\");\r\n for( String cdsOr : conditionsOr )\r\n {\r\n resOr |= this.conditionSimple(cdsOr, ligne);\r\n }\r\n resAnd &= resOr;\r\n }\r\n resultat = resAnd;\r\n return resultat;\r\n }", "private Query makeMulti(Collection<Query> queries, boolean disjunct) throws\n ParseException {\n if (queries.isEmpty()) {\n return null; // Stopwords?\n }\n if (disjunct) {\n return new DisjunctionMaxQuery(queries, tieBreakerMultiplier);\n }\n //noinspection UseOfObsoleteCollectionType\n Vector<BooleanClause> clauses = new Vector<>(queries.size());\n for (Query query: queries) {\n //noinspection unchecked\n clauses.add(new BooleanClause(query, BooleanClause.Occur.SHOULD));\n }\n return getBooleanQuery(clauses, true);\n }", "public void testConjunctionFailsToResolveWhenSecondPathFails() throws Exception\n {\n resolveAndAssertFailure(new String[] { \"g\", \"f :- g, h\" }, \"?- f\");\n }", "private Object eval(AndExpr expr) {\n if (expr.getExpr().size() == 1) {\n return eval(expr.getExpr().get(0));\n }\n\n boolean result = true;\n for (RelExpr e : expr.getExpr()) {\n Object res = eval(e);\n if (res instanceof Boolean) {\n result = result && (Boolean) res;\n } else {\n throw new RaydenScriptException(\"Expression error: Part expression result is not a boolean. Type: '\" + res.getClass() + \"'\");\n }\n\n if (!result) {\n return false;\n }\n }\n return true;\n }", "public String join(String conjunction, Iterator<String> iterator) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean first = true;\n\t\twhile (iterator.hasNext()) {\n\t\t\tString item = iterator.next();\n\t\t\tif (first) {\n\t\t\t\tfirst = false;\n\t\t\t} else {\n\t\t\t\tsb.append(conjunction);\n\t\t\t}\n\t\t\tsb.append(item);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public Formula() {\t\n\t\t// TODO: implement this.\n\t\t// throw new RuntimeException(\"not yet implemented.\");\n\t\tclauses=new EmptyImList<Clause>();\n\t}", "public static BinaryExpression and(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "private void and() {\n // PROGRAM 1: Student must complete this method\n //loop through the output array\n for (int i = 0; i < output.length; i++) {\n //take the and of index i of inputA and inputB and place result in output[i]\n output[i] = inputA[i] & inputB[i];\n }\n }", "@Test\n\tpublic void explicitANDTest() {\n\t\tString query = \"hello goodbye\";\n\t\tString query2 = \"hello goodbye hello\";\n\t\tString query3 = \"( hello ( goodbye | hello bye ) )\";\n\t\t\n\t\tString queryResults = \"hello & goodbye\";\n\t\tString query2Results = \"hello & goodbye & hello\";\n\t\tString query3Results = \"( hello & ( goodbye | hello & bye ) )\";\n\n\t\tassertEquals(queryResults, String.join(\" \", queryTest.addExplicitAND(query.split(\" \"))));\n\t\tassertEquals(query2Results, String.join(\" \", queryTest.addExplicitAND(query2.split(\" \"))));\n\t\tassertEquals(query3Results, String.join(\" \", queryTest.addExplicitAND(query3.split(\" \"))));\n\t}", "private Formula (Clause c, ImList<Clause> r) {\n\t\t//System.out.println(\"Test1\"+r.toString());\n\t\t//System.out.println(\"Test1\"+c);\n\t\tclauses=r.add(c);\n\t\t//System.out.println(\"Test2\"+clauses.toString());\n\t\tcheckRep();\n\t}", "boolean hasOperator();", "public LogicGateAND() {\r\n\t\t// Initialize input and output ports\r\n\t\tsuper(Operators.AND, new IDynamicInterface(2), new IFixedInterface(new IPort()));\r\n\t}", "public String join(String conjunction, String[] list) {\n\t\treturn join(conjunction, Arrays.asList(list));\n\t}", "boolean isQuantification(Formula f);", "static TreeSet<Conjunction> parseConjunctions(Scanner data){\n\t\tArrayList<String[]> raw = parseDataToArray(data);\n\t\tTreeSet<Conjunction> output = new TreeSet<Conjunction>();\n\n\t\tfor(String[] current : raw){ //iterate over each line from the original file.\n\n\t\t\tif(current.length != Values.CONJUNCTION_DATA_ARRAY_LENGTH_CORRECT){\n\t\t\t\tSystem.err.println(\"Error parsing a line.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//System.out.println(\"Raw: \" + Arrays.toString(current));\n\n\t\t\t//current[] contains a split based on tabs. Generally {chapter, nom/gen/gender, definition}.\n\n\t\t\tint chapter = 0;\n\t\t\tString Conjunction = null;\n\t\t\tArrayList<String> definitions = new ArrayList<String>();\n\n\t\t\t//Values.betterStringArrayPrint(current);\n\n\t\t\ttry{ //try to read a noun, assuming that the chapter IS specified\n\t\t\t\tchapter = Integer.parseInt(current[0]);\n\t\t\t\tConjunction = current[1];\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(Exception e){\n\t\t\t\tSystem.err.println(\"Could not read a line!\");\n\t\t\t\tcontinue; //We can't make a noun out of the botrked line.\n\t\t\t}\n\t\t\ttrimAll(definitions);\n\t\t\tConjunction currentConjunction = new Conjunction(Conjunction, chapter, definitions);\n\t\t\tSystem.out.println(\"Added: \" + currentConjunction);\n\t\t\toutput.add(currentConjunction);\n\t\t}\n\n\t\treturn output;\n\t}", "public Formula intersect(Formula a, Formula b) {\n Set<Variable> variables = Collections.emptySet();\n\n if (!a.equals(Utils.trueConst())) {\n VariableExtractorVisitor visitor = new VariableExtractorVisitor();\n a.accept(visitor);\n variables = visitor.getResult();\n }\n FormulaEvaluatorVisitor evaluator = new FormulaEvaluatorVisitor(variables);\n b.accept(evaluator);\n return evaluator.isCurrentValue() ? a : null;\n }", "public static int expression()\r\n {\r\n //get the start state of this term\r\n int r,t1,f1;\r\n t1=r=term();\r\n\r\n //if there is no more input, we are done\r\n if(index>expression.length()-1)\r\n {\r\n return r;\r\n }\r\n\r\n //if this is concatenation\r\n if(expression.charAt(index)=='.'||isVocab(expression.charAt(index))||expression.charAt(index)=='\\\\'\r\n ||expression.charAt(index)=='['||expression.charAt(index)=='(')\r\n {\r\n //get the start state of this expression and\r\n //update next1 and next2\r\n int t2,cur;\r\n cur=state-1;\r\n t2=expression();\r\n if(stateList.get(cur).getNext1()==stateList.get(cur).getNext2())\r\n {\r\n stateList.get(cur).setNext1(t2);\r\n }\r\n stateList.get(cur).setNext2(t2);\r\n\r\n }\r\n\r\n //if there is no more input, we are done\r\n if(index>=expression.length())\r\n {\r\n return r;\r\n }\r\n\r\n //if this is alternation\r\n if(expression.charAt(index)=='|')\r\n {\r\n //if there is nothing after '|', it is a invalid expression\r\n index++;\r\n if(index>expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n //create a branch state,set the nex1 of the branch state to the term\r\n //so a|b and a|b|c both work\r\n int t2;\r\n f1=state-1;\r\n\r\n state st=new state(state,\"BR\",t1,-1);\r\n stateList.add(st);\r\n r=state;\r\n state++;\r\n\r\n //get the start state of this expression\r\n t2=expression();\r\n\r\n //update the branch state's next2 to the start state of the expression\r\n stateList.get(f1+1).setNext2(t2);\r\n\r\n //update term's next1 and next2\r\n if(stateList.get(f1).getNext1()==stateList.get(f1).getNext2())\r\n {\r\n stateList.get(f1).setNext1(state);\r\n }\r\n stateList.get(f1).setNext2(state);\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n return r;\r\n }", "public IComplexFormula getFormula(){\r\n\t\treturn formula;\r\n\t}", "public String getANDClause()\n {\n StringBuilder builder = new StringBuilder();\n\n String colName;\n String term;\n\n for (int i = 0; i < columnNames.length; i++)\n {\n colName = columnNames[i];\n\n String[] terms = Spans.prepareStrings(keywords);\n\n builder.append(\"(\");\n for(int j = 0; j < terms.length; j++)\n {\n term = terms[j];\n builder.append(colName + \" LIKE '%\"+ term + \"%'\" );\n\n if (j != terms.length - 1)\n {\n builder.append(\" AND \");\n }\n }\n builder.append(\")\");\n\n if (i != columnNames.length - 1)\n {\n builder.append(\" OR \");\n }\n }\n\n return builder.toString();\n }", "public final EObject ruleConjunction() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_Comparison_0 = null;\r\n\r\n EObject lv_operator_2_0 = null;\r\n\r\n EObject lv_right_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2263:28: ( (this_Comparison_0= ruleComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) ) )* ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2264:1: (this_Comparison_0= ruleComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) ) )* )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2264:1: (this_Comparison_0= ruleComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) ) )* )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2265:5: this_Comparison_0= ruleComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getConjunctionAccess().getComparisonParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleComparison_in_ruleConjunction4832);\r\n this_Comparison_0=ruleComparison();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_Comparison_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2273:1: ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) ) )*\r\n loop30:\r\n do {\r\n int alt30=2;\r\n int LA30_0 = input.LA(1);\r\n\r\n if ( ((LA30_0>=51 && LA30_0<=52)) ) {\r\n alt30=1;\r\n }\r\n\r\n\r\n switch (alt30) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2273:2: () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2273:2: ()\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2274:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getConjunctionAccess().getConjunctionLeftAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2279:2: ( (lv_operator_2_0= ruleAndOperator ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2280:1: (lv_operator_2_0= ruleAndOperator )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2280:1: (lv_operator_2_0= ruleAndOperator )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2281:3: lv_operator_2_0= ruleAndOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getConjunctionAccess().getOperatorAndOperatorParserRuleCall_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleAndOperator_in_ruleConjunction4862);\r\n \t lv_operator_2_0=ruleAndOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getConjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_0, \r\n \t \t\t\"AndOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2297:2: ( (lv_right_3_0= ruleComparison ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2298:1: (lv_right_3_0= ruleComparison )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2298:1: (lv_right_3_0= ruleComparison )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2299:3: lv_right_3_0= ruleComparison\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getConjunctionAccess().getRightComparisonParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleComparison_in_ruleConjunction4883);\r\n \t lv_right_3_0=ruleComparison();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getConjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"right\",\r\n \t \t\tlv_right_3_0, \r\n \t \t\t\"Comparison\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop30;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "Expression andExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = eqExpression();\r\n\t\twhile(isKind(OP_AND)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = eqExpression();\r\n\t\t\te0 = new ExpressionBinary(first, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "@Test\n public void t1()\n {\n \tFormula f1;\n \tEnvironment retenv;\n \tClause clause1,clause2,clause3;\n \tclause1 = make (na);\n\n \tf1=new Formula(clause1);\n \tSystem.out.println(\"---\");\n \tSystem.out.println(f1);\n \tretenv=SATSolver.solve(f1);\n \tSystem.out.println(\"Solution: \"+retenv);\n \t\n \tassertTrue(Boolean.TRUE);\n }", "public static boolean formula(String f) {\n\n String[] parts = f.split(\"=\");\n int[] res = new int[parts.length];\n\n for (int k = 0; k < parts.length; k++) {\n\n String[] sum = parts[k].trim().replaceAll(\"-\", \"+-\").split(\"\\\\+\");\n int[] terms = new int[sum.length];\n for (int j = 0; j < sum.length; j++) {\n String[] operands = sum[j].trim().replaceAll(\"-\\\\s*\", \"-\")\n .replaceAll(\"\\\\s{2}\", \" \").split(\" \");\n Integer[] term = new Integer[operands.length];\n for (int i = 1; i < operands.length - 1; i++) {\n if (operands[i].equals(\"*\") || operands[i].equals(\"/\")) {\n int first = 0;\n int second = 0;\n try {\n first = term[i - 1] == null ? Integer.parseInt(operands[i - 1]) : term[i - 1];\n second = Integer.parseInt(operands[i + 1]);\n } catch (NumberFormatException e) {\n return false;\n }\n term[i + 1] = operands[i].equals(\"*\") ? first * second : first / second;\n }\n }\n if (term.length == 1) {\n try {\n term[0] = Integer.parseInt(operands[0]);\n } catch (NumberFormatException e) {\n return false;\n }\n }\n terms[j] = term[term.length - 1];\n }\n res[k] = Arrays.stream(terms).reduce(0, Integer::sum);\n }\n\n for (int i = 1; i < res.length; i++)\n if (res[i] != res[0]) return false;\n\n return true;\n }", "public final ManchesterOWLSyntaxAutoComplete.expression_return expression() {\n ManchesterOWLSyntaxAutoComplete.expression_return retval = new ManchesterOWLSyntaxAutoComplete.expression_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.conjunction_return c = null;\n ManchesterOWLSyntaxAutoComplete.expression_return chainItem = null;\n ManchesterOWLSyntaxAutoComplete.conjunction_return conj = null;\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return cpe = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:106:2:\n // ( ^( DISJUNCTION (c= conjunction )+ ) | ^( PROPERTY_CHAIN\n // (chainItem= expression )+ ) | conj= conjunction | cpe=\n // complexPropertyExpression )\n int alt4 = 4;\n switch (input.LA(1)) {\n case DISJUNCTION: {\n alt4 = 1;\n }\n break;\n case PROPERTY_CHAIN: {\n alt4 = 2;\n }\n break;\n case IDENTIFIER:\n case ENTITY_REFERENCE:\n case CONJUNCTION:\n case NEGATED_EXPRESSION:\n case SOME_RESTRICTION:\n case ALL_RESTRICTION:\n case VALUE_RESTRICTION:\n case CARDINALITY_RESTRICTION:\n case ONE_OF: {\n alt4 = 3;\n }\n break;\n case INVERSE_OBJECT_PROPERTY_EXPRESSION: {\n alt4 = 4;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 4, 0, input);\n throw nvae;\n }\n switch (alt4) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:107:4:\n // ^( DISJUNCTION (c= conjunction )+ )\n {\n match(input, DISJUNCTION, FOLLOW_DISJUNCTION_in_expression226);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:107:19:\n // (c= conjunction )+\n int cnt2 = 0;\n loop2: do {\n int alt2 = 2;\n int LA2_0 = input.LA(1);\n if (LA2_0 >= IDENTIFIER && LA2_0 <= ENTITY_REFERENCE\n || LA2_0 == CONJUNCTION || LA2_0 == NEGATED_EXPRESSION\n || LA2_0 >= SOME_RESTRICTION && LA2_0 <= ONE_OF) {\n alt2 = 1;\n }\n switch (alt2) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:107:21:\n // c= conjunction\n {\n pushFollow(FOLLOW_conjunction_in_expression235);\n c = conjunction();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(c.node.getCompletions());\n }\n }\n break;\n default:\n if (cnt2 >= 1) {\n break loop2;\n }\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n EarlyExitException eee = new EarlyExitException(2, input);\n throw eee;\n }\n cnt2++;\n } while (true);\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:110:6:\n // ^( PROPERTY_CHAIN (chainItem= expression )+ )\n {\n match(input, PROPERTY_CHAIN, FOLLOW_PROPERTY_CHAIN_in_expression248);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:110:24:\n // (chainItem= expression )+\n int cnt3 = 0;\n loop3: do {\n int alt3 = 2;\n int LA3_0 = input.LA(1);\n if (LA3_0 >= IDENTIFIER && LA3_0 <= ENTITY_REFERENCE\n || LA3_0 >= DISJUNCTION && LA3_0 <= NEGATED_EXPRESSION\n || LA3_0 >= SOME_RESTRICTION && LA3_0 <= ONE_OF\n || LA3_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt3 = 1;\n }\n switch (alt3) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:110:25:\n // chainItem= expression\n {\n pushFollow(FOLLOW_expression_in_expression256);\n chainItem = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(chainItem.node\n .getCompletions());\n }\n }\n break;\n default:\n if (cnt3 >= 1) {\n break loop3;\n }\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n EarlyExitException eee = new EarlyExitException(3, input);\n throw eee;\n }\n cnt3++;\n } while (true);\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:114:5:\n // conj= conjunction\n {\n pushFollow(FOLLOW_conjunction_in_expression276);\n conj = conjunction();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(conj.node\n .getCompletions());\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:118:5:\n // cpe= complexPropertyExpression\n {\n pushFollow(FOLLOW_complexPropertyExpression_in_expression291);\n cpe = complexPropertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(cpe.node\n .getCompletions());\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "String getBooleanTrueExpression();", "private Query applySynonymQueries(Query query, List<Query> synonymQueries, float originalBoost, float synonymBoost) {\n if (query instanceof BoostedQuery) {\n return applySynonymQueries(((BoostedQuery) query).getQuery(), synonymQueries, originalBoost, synonymBoost);\n } else if (query instanceof BooleanQuery) {\n BooleanQuery.Builder booleanQueryBuilder = new BooleanQuery.Builder();\n for (BooleanClause booleanClause : ((BooleanQuery) query).clauses()) {\n if (Occur.MUST == booleanClause.getOccur()) {\n BooleanQuery.Builder combinedQueryBuilder = new BooleanQuery.Builder();\n combinedQueryBuilder.add(new BoostQuery(booleanClause.getQuery(), originalBoost), Occur.SHOULD);\n // standard 'must occur' clause - i.e. the main user query\n \n for (Query synonymQuery : synonymQueries) {\n BooleanQuery.Builder booleanSynonymQueryBuilder = new BooleanQuery.Builder();\n booleanSynonymQueryBuilder.add(new BoostQuery(synonymQuery, synonymBoost), Occur.SHOULD);\n combinedQueryBuilder.add(booleanSynonymQueryBuilder.build(), Occur.SHOULD);\n }\n booleanQueryBuilder.add(combinedQueryBuilder.build(), Occur.MUST);\n } else {\n booleanQueryBuilder.add(booleanClause);\n }\n }\n query = booleanQueryBuilder.build();\n queryToHighlight = query;\n }\n return query;\n }", "public Object visitBitwiseAndExpression(GNode n) {\n Object a, b, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(1));\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n result = (Long) a & (Long) b;\n }\n else {\n result = parens(a) + \" & \" + parens(b);\n }\n \n return result;\n }", "public SeparateChainingHashTable<Character, Boolean> solve2SAT(String formula) {\n HashSet<Character> variables = new HashSet<>();\n char[] charsInFormula = formula.toCharArray();\n for (int i = 0; i < charsInFormula.length; i++) {\n if (charsInFormula[i] != '('\n && charsInFormula[i] != ')'\n && charsInFormula[i] != 'V'\n && charsInFormula[i] != '^'\n && charsInFormula[i] != ' '\n && charsInFormula[i] != '!') {\n variables.add(charsInFormula[i]);\n }\n }\n\n Digraph digraph = new Digraph(variables.size() * 2);\n\n String[] values = formula.split(\" \");\n\n SeparateChainingHashTable<String, Integer> variableToIdMap = new SeparateChainingHashTable<>();\n SeparateChainingHashTable<Integer, String> idToVariableMap = new SeparateChainingHashTable<>();\n\n // Second pass to get vertices\n for (int i = 0; i < values.length; i += 2) {\n boolean isVariable1Negation;\n boolean isVariable2Negation;\n\n // Read variables\n String variable1;\n String variable2;\n\n String variable1Negation;\n String variable2Negation;\n\n if (values[i].charAt(1) == '!') {\n variable1 = values[i].substring(2, 3);\n isVariable1Negation = true;\n } else {\n variable1 = String.valueOf(values[i].charAt(1));\n isVariable1Negation = false;\n }\n variable1Negation = \"!\" + variable1;\n\n i += 2;\n\n if (values[i].charAt(0) == '!') {\n variable2 = values[i].substring(1, 2);\n isVariable2Negation = true;\n } else {\n variable2 = String.valueOf(values[i].charAt(0));\n isVariable2Negation = false;\n }\n variable2Negation = \"!\" + variable2;\n\n // Add variables to mappings if they do not exist yet\n if (!variableToIdMap.contains(variable1)) {\n addVariableToMappings(variable1, variableToIdMap, idToVariableMap);\n addVariableToMappings(variable1Negation, variableToIdMap, idToVariableMap);\n }\n if (!variableToIdMap.contains(variable2)) {\n addVariableToMappings(variable2, variableToIdMap, idToVariableMap);\n addVariableToMappings(variable2Negation, variableToIdMap, idToVariableMap);\n }\n\n // Add edges to implication digraph\n // Map (A V B) to (A -> !B) and (B -> !A)\n // based on http://www.geeksforgeeks.org/2-satisfiability-2-sat-problem/\n int variable1Id = variableToIdMap.get(variable1);\n int variable1NegationId = variableToIdMap.get(variable1Negation);\n int variable2Id = variableToIdMap.get(variable2);\n int variable2NegationId = variableToIdMap.get(variable2Negation);\n\n if (!isVariable1Negation) {\n if (!isVariable2Negation) {\n digraph.addEdge(variable1Id, variable2NegationId);\n digraph.addEdge(variable2Id, variable1NegationId);\n } else {\n digraph.addEdge(variable1Id, variable2Id);\n digraph.addEdge(variable2NegationId, variable1NegationId);\n }\n } else {\n if (!isVariable2Negation) {\n digraph.addEdge(variable1NegationId, variable2NegationId);\n digraph.addEdge(variable2Id, variable1Id);\n } else {\n digraph.addEdge(variable1NegationId, variable2Id);\n digraph.addEdge(variable2NegationId, variable1Id);\n }\n }\n }\n\n // Compute strongly connected components\n KosarajuSharirSCC kosarajuSharirSCC = new KosarajuSharirSCC(digraph);\n\n // Check if formula is satisfiable\n if (!isFormulaSatisfiable(digraph, kosarajuSharirSCC)) {\n return null;\n }\n\n // Solve 2-SAT by assigning variables to true using the strongly connected components topological order\n List<Integer>[] stronglyConnectedComponents = (List<Integer>[]) new ArrayList[kosarajuSharirSCC.count()];\n\n for (int scc = 0; scc < stronglyConnectedComponents.length; scc++) {\n stronglyConnectedComponents[scc] = new ArrayList<>();\n }\n\n for (int vertex = 0; vertex < digraph.vertices(); vertex++) {\n int stronglyConnectedComponentId = kosarajuSharirSCC.id(vertex);\n stronglyConnectedComponents[stronglyConnectedComponentId].add(vertex);\n }\n\n SeparateChainingHashTable<Character, Boolean> solution = new SeparateChainingHashTable<>();\n\n // Iterate through strongly connected components in topological order to assign the variables.\n // There is a lot of conflicting literature as how the variables should be assigned and in which order.\n // The only correct literature that I found was in the Competitive Programmers Handbook, by Antti Laaksonen\n // This implementation uses a reverse approach of the approach described in the book, because it seems\n // more logical to iterate in topological order and assign a value of TRUE to variables X\n // and FALSE to variables !X found along the way.\n for (int scc = stronglyConnectedComponents.length - 1; scc >= 0; scc--) {\n for (int vertexId : stronglyConnectedComponents[scc]) {\n String vertexVariable = idToVariableMap.get(vertexId);\n\n char variable;\n\n boolean isNegation = vertexVariable.charAt(0) == '!';\n if (!isNegation) {\n variable = vertexVariable.charAt(0);\n } else {\n variable = vertexVariable.charAt(1);\n }\n\n if (!solution.contains(variable)) {\n if (!isNegation) {\n solution.put(variable, true);\n } else {\n solution.put(variable, false);\n }\n }\n }\n }\n\n return solution;\n }", "public TheoremCongruenceClosureImpl(TypeGraph g, PExp p) {\n m_typeGraph = g;\n m_theorem = p;\n m_theoremString = p.toString();\n isEquality = p.getTopLevelOperation().equals(\"=\");\n m_theoremRegistry = new Registry(g);\n m_matchConj =\n new ConjunctionOfNormalizedAtomicExpressions(m_theoremRegistry);\n\n if (isEquality) {\n m_matchConj.addFormula(p.getSubExpressions().get(0));\n m_insertExpr = p;\n }\n else if (p.getTopLevelOperation().equals(\"implies\")) {\n m_matchConj.addExpression(p.getSubExpressions().get(0));\n m_insertExpr = p.getSubExpressions().get(1);\n }\n else {\n /* experimental\n \n Is_Permutation((S o T), (T o S)) for example,\n should go into matchConj as itself, but equal to a boolean variable.\n .\n */\n m_matchConj.addFormula(p);\n m_insertExpr = p; // this will add \"= true\"\n }\n\n }", "public Formula encodeConflictFree() {\n\t\tConjunction result = new Conjunction(\"conflictfree\");\n\t\tSet<Argument> args = this.instance.getAllArguments();\n\t\tfor(Argument a : args) {\n\t\t\tresult.addSubformula(this.clause(a));\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic IPredicate intersection(final IPredicate state1, final IPredicate state2) {\n\n\t\tfinal Set<HcPredicateSymbol> state1PredSymbols = new HashSet<>();\n\t\tstate1PredSymbols.addAll(((HCPredicate) state1).getHcPredicateSymbols());\n//\t\tassert state1PredSymbols.size() == 1 : \"what does this mean??\";\n\n//\t\tfinal Term conjoinedFormula = mSimplifier.getSimplifiedTerm(\n//\t\t\t\tSmtUtils.and(mBackendSmtSolverScript.getScript(), state1.getFormula(), state2.getFormula()));\n\t\tfinal IPredicate conjoinedPred = mPredicateFactory.and(state1, state2);\n\n\t\tif (mPredicateFactory.isDontCare(conjoinedPred)) {\n\t\t\treturn mPredicateFactory.newPredicate(state1PredSymbols, conjoinedPred.getFormula(),\n\t\t\t\tCollections.emptyList());\n//\t\t\treturn conjoinedPred;\n\t\t}\n\n\t\tfinal Term conjoinedFormula = new CommuhashNormalForm(mServices, mMgdScript.getScript())\n\t\t\t\t.transform(conjoinedPred.getFormula());\n\n//\t\tfinal Set<IPredicate> ps = new HashSet<>();\n//\t\tps.add(state1);\n//\t\tps.add(state2);\n\n\t\treturn mPredicateFactory.newPredicate(state1PredSymbols, conjoinedFormula,\n\t\t\t\tArrays.asList(state1.getFormula().getFreeVars()));\n\t}" ]
[ "0.66139466", "0.6470983", "0.6304428", "0.6293862", "0.61852926", "0.61308247", "0.5933291", "0.5771849", "0.5770589", "0.5717676", "0.5681996", "0.56761676", "0.55978584", "0.55688673", "0.55263895", "0.55235636", "0.54545975", "0.54318523", "0.5431663", "0.5392183", "0.5382525", "0.53813386", "0.5335769", "0.53334624", "0.5312089", "0.5279329", "0.5271059", "0.5246472", "0.5242082", "0.52410334", "0.52320063", "0.520783", "0.5198326", "0.51928854", "0.5188051", "0.51720387", "0.5146848", "0.51334673", "0.5130657", "0.51220953", "0.50973815", "0.50892776", "0.50851595", "0.50849813", "0.5082912", "0.50753146", "0.5029431", "0.50198436", "0.4989775", "0.49781334", "0.49768633", "0.49715665", "0.49702802", "0.49647895", "0.49550483", "0.49443895", "0.49386162", "0.49371478", "0.49319327", "0.49219885", "0.49195164", "0.489797", "0.4888435", "0.4881526", "0.4865779", "0.4863271", "0.48603767", "0.48596102", "0.48575544", "0.48451084", "0.4840246", "0.48301107", "0.48287138", "0.48177925", "0.4813801", "0.48119628", "0.48118037", "0.48093337", "0.48085594", "0.48071897", "0.47955045", "0.47933272", "0.47890475", "0.4779954", "0.47790945", "0.47730583", "0.4770801", "0.47622463", "0.47575244", "0.4757056", "0.47536647", "0.47532046", "0.47494677", "0.47476187", "0.47461826", "0.47449937", "0.4743143", "0.47416025", "0.47403094", "0.4735371" ]
0.4991759
48
Create a TickEventMap that uses tick rounding (instead of tick clustering) to normalize starting tick.
public TickEventMap(long tickRoundingFactor) { this.tickRoundingFactor = tickRoundingFactor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void _setTicks() {\n if (!Double.isNaN(tickIncrement)) {\n setTicksByIncr(tickIncrement);\n return;\n }\n double diff = Math.abs(max - min);\n if (!(diff > 0.)) {\n int tn = 2;\n tn += nanW > 0 ? 2 : 0;\n tn += negW > 0 ? 2 : 0;\n tn += nanW > 0 || negW > 0 ? 2 : 0;\n tn += posW > 0 ? 4 : 0;\n ticks = new double[tn];\n int i = 0;\n if (nanW > 0) {\n ticks[i++] = 0.;\n ticks[i++] = Double.NaN;\n if (!(negW > 0)) {\n ticks[i++] = 0. + nanW;\n ticks[i++] = Double.NaN;\n }\n }\n if (negW > 0) {\n ticks[i++] = 0. + nanW;\n ticks[i++] = Double.NEGATIVE_INFINITY;\n ticks[i++] = 0. + nanW + negW;\n ticks[i++] = Double.NEGATIVE_INFINITY;\n }\n ticks[i++] = 0. + nanW + posW;\n ticks[i++] = min;\n if (posW > 0) {\n ticks[i++] = size-posW+1;\n ticks[i++] = Double.POSITIVE_INFINITY;\n ticks[i++] = size-1;\n ticks[i++] = Double.POSITIVE_INFINITY;\n }\n return;\n }\n double exp = Math.log(diff) * 0.43429448190325176; // log10\n int expi = -(int)Math.floor(exp);\n double scale = Math.pow(10.,expi);\n double smin = Math.floor(min * scale);\n double smax = Math.ceil(max * scale);\n int siz = size - nanW - negW - nanW;\n int sdiff = (int)(smax - smin);\n if (sdiff > siz/2)\n scale *= .5;\n else if (sdiff < 3)\n scale *= 4;\n else if (sdiff < 5)\n scale *= 2;\n double incr = 1./scale;\n int count = 0;\n double sval = smin / scale;\n if (max > min) {\n smin = Math.ceil(min * scale);\n smax = Math.floor(max * scale) / scale + .2 * incr;\n sval = smin / scale;\n while ( sval <= smax ) {\n count+=2;\n sval += incr;\n }\n } else {\n incr *= -1.;\n smin = Math.floor(min * scale);\n smax = Math.ceil(max * scale) / scale + .2 * incr;\n sval = smin / scale;\n while ( sval >= smax ) {\n count+=2;\n sval += incr;\n }\n }\n int tn = count;\n tn += nanW > 0 ? 2 : 0;\n tn += negW > 0 ? 2 : 0;\n tn += nanW > 0 || negW > 0 ? 2 : 0;\n tn += posW > 0 ? 4 : 0;\n sval = smin / scale;\n ticks = new double[tn];\n int pi = 0; // pixelIndex\n if (nanW > 0 && pi < tn) {\n ticks[pi++] = 0.;\n ticks[pi++] = Double.NaN;\n if (!(negW > 0)) {\n ticks[pi++] = 0. + nanW;\n ticks[pi++] = Double.NaN;\n }\n }\n if (negW > 0 && pi < tn) {\n ticks[pi++] = 0. + nanW;\n ticks[pi++] = Double.NEGATIVE_INFINITY;\n ticks[pi++] = 0. + nanW + negW;\n ticks[pi++] = Double.NEGATIVE_INFINITY;\n }\n for (int i = 0; i < count && pi < tn; i += 2) {\n ticks[pi++] = nanW + negW + (siz - 1) * ((sval - min ) / (max - min));\n ticks[pi++] = Math.round(sval*scale)/scale;\n sval += incr;\n }\n if (posW > 0 && pi < tn) {\n ticks[pi++] = size-posW+1;\n ticks[pi++] = Double.POSITIVE_INFINITY;\n ticks[pi++] = size-1;\n ticks[pi++] = Double.POSITIVE_INFINITY;\n }\n }", "private TimeMap(double startTick, double timeSize, double tempoFactor) {\n if (tempoFactor == 0.0D) {\n throw new IllegalArgumentException(\"Zero tempoFactor.\");\n }\n if (startTick < 0.0F) {\n throw new IllegalArgumentException(\"startTick is less that zero.\");\n }\n this.startTick = startTick;\n this.timeStretch = 1 / tempoFactor;\n //we start with the tempo event that just precedes the starting tick.\n int startIdx = indexForTick((long) startTick);\n TempoEvent start = tempoList.get(startIdx);\n int localIdx = 0;\n //we calculate the position expressed in microseconds of the starting\n //tempo event. This offset is expressed relativ to the startTick, because\n // the starting tempo-event precedes the startTick this will give a negativ number.\n Double timeOffset = new Double((timeStretch * start.toSeconds(start.getTickPos() - startTick)));\n timePositions.add(timeOffset);\n mappedTempoEvents.add(start);\n\n //we continue to calculate micro-seconds offset for a number of\n //tempo-events until we have at least covered the given timeSize.\n for (int i = startIdx + 1; i < tempoList.size(); i++) {\n // note: \"i\" points into the tempo track's tempoList.\n // \"localIdx\" points into the mappedTempoEvents.\n TempoEvent end = tempoList.get(i);\n double tickDistance = end.getTickPos() - start.getTickPos();\n double timeDistance = (timeStretch * start.toSeconds(tickDistance));\n timeOffset = new Double(timePositions.get(localIdx) + timeDistance);\n timePositions.add(timeOffset);\n mappedTempoEvents.add(end);\n\n if (timeOffset > timeSize) {\n break;\n }\n //--- prepare next round\n localIdx++;\n start = end;\n }\n }", "public static TickUnitSource createStandardDateTickUnits() {\n/* 1139 */ return createStandardDateTickUnits(TimeZone.getDefault(), \n/* 1140 */ Locale.getDefault());\n/* */ }", "protected void normalizeEventTimes()\n {\n this.m_eventStartTime = (this.event_start_time == EASMessage.IMMEDIATE_START_TIME) ? System.currentTimeMillis()\n : (this.event_start_time * 1000L) + EASMessage.START_TIME_EPOCH;\n\n this.m_eventExpirationTime = (this.event_duration == EASMessage.INDEFINITE_EVENT_DURATION) ? Long.MAX_VALUE\n : this.m_eventStartTime + (this.event_duration * 60L * 1000L);\n }", "public static NumberAxis calcAxisX() {\n double minX = 0;\n double maxX = Collections.max(GlobalVariables.systemCorridor.getDistances())\n / GlobalVariables.systemCorridor.getSpeed()\n + GlobalVariables.cycleLen.get();\n maxX = 3 * GlobalVariables.cycleLen.get() > maxX ? 3 * GlobalVariables.cycleLen.get() : maxX;\n maxX = Math.round(maxX / 10) * 10;\n double scaleX = 0.1 * (maxX - minX);\n scaleX = Math.round(scaleX / 10) * 10;\n NumberAxis axis = new NumberAxis(\"Time (sec)\", minX, maxX, scaleX);\n axis.setTickLabelFont(Font.font(18));\n return axis;\n }", "protected NumberAxis createHAxis() {\n final NumberAxis xAxis = new NumberAxis();\n //xAxis.setLabel(\"Time\");\n xAxis.setTickMarkVisible(false);\n xAxis.setMinorTickVisible(false);\n xAxis.setMinorTickCount(0);\n xAxis.setTickLabelFormatter(new StringConverter<Number>() {\n @Override\n public String toString(Number number) {\n Date d = new Date(number.longValue());\n return d.getMinutes() + \":\" + d.getSeconds();\n }\n\n @Override\n public Number fromString(String s) {\n return null;\n }\n });\n return xAxis;\n }", "public abstract EnumSet<TickType> ticks();", "public final double encoderTicksToInches(double ticks) {\n return WHEEL_RADIUS * 2 * Math.PI * GEAR_RATIO * ticks / TICKS_PER_REV;\n }", "private int normalizeTime() {\n int currentTimeSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // The graphing interval in minutes\n // TODO not hardcoded :3\n int interval = 30;\n\n // calculate the devisor denominator\n int denom = interval * 60;\n\n return (int) Math.round((currentTimeSeconds - (denom / 2d)) / denom) * denom;\n }", "@Override\n public final void tickStart(EnumSet<TickType> type, Object... tickData)\n {\n keyTick(type, false);\n }", "public static InfiniteTimeunitToBarConverter of() {\n return new InfiniteTimeunitToBarConverter(TimeSignature.STANDARD_4_4);\n }", "IDateTimeValueType normalize();", "private static int inchesToTicks(double inches) {\r\n\r\n double neededRevolutions = (inches - 2) / 11.75;\r\n int ticks = (int) (neededRevolutions * 1120);\r\n return ticks;\r\n }", "void tick(long ticksSinceStart);", "protected void selectHorizontalAutoTickUnit(Graphics2D g2, Rectangle2D dataArea, RectangleEdge edge) {\n/* 1368 */ long shift = 0L;\n/* 1369 */ if (this.timeline instanceof SegmentedTimeline) {\n/* 1370 */ shift = ((SegmentedTimeline)this.timeline).getStartTime();\n/* */ }\n/* 1372 */ double zero = valueToJava2D(shift + 0.0D, dataArea, edge);\n/* 1373 */ double tickLabelWidth = estimateMaximumTickLabelWidth(g2, \n/* 1374 */ getTickUnit());\n/* */ \n/* */ \n/* 1377 */ TickUnitSource tickUnits = getStandardTickUnits();\n/* 1378 */ TickUnit unit1 = tickUnits.getCeilingTickUnit(getTickUnit());\n/* 1379 */ double x1 = valueToJava2D(shift + unit1.getSize(), dataArea, edge);\n/* 1380 */ double unit1Width = Math.abs(x1 - zero);\n/* */ \n/* */ \n/* 1383 */ double guess = tickLabelWidth / unit1Width * unit1.getSize();\n/* 1384 */ DateTickUnit unit2 = (DateTickUnit)tickUnits.getCeilingTickUnit(guess);\n/* 1385 */ double x2 = valueToJava2D(shift + unit2.getSize(), dataArea, edge);\n/* 1386 */ double unit2Width = Math.abs(x2 - zero);\n/* 1387 */ tickLabelWidth = estimateMaximumTickLabelWidth(g2, unit2);\n/* 1388 */ if (tickLabelWidth > unit2Width) {\n/* 1389 */ unit2 = (DateTickUnit)tickUnits.getLargerTickUnit(unit2);\n/* */ }\n/* 1391 */ setTickUnit(unit2, false, false);\n/* */ }", "protected List refreshTicksHorizontal(Graphics2D g2, Rectangle2D dataArea, RectangleEdge edge) {\n/* 1614 */ List result = new ArrayList();\n/* */ \n/* 1616 */ Font tickLabelFont = getTickLabelFont();\n/* 1617 */ g2.setFont(tickLabelFont);\n/* */ \n/* 1619 */ if (isAutoTickUnitSelection()) {\n/* 1620 */ selectAutoTickUnit(g2, dataArea, edge);\n/* */ }\n/* */ \n/* 1623 */ DateTickUnit unit = getTickUnit();\n/* 1624 */ Date tickDate = calculateLowestVisibleTickValue(unit);\n/* 1625 */ Date upperDate = getMaximumDate();\n/* */ \n/* 1627 */ boolean hasRolled = false;\n/* 1628 */ while (tickDate.before(upperDate)) {\n/* */ \n/* 1630 */ if (!hasRolled) {\n/* 1631 */ tickDate = correctTickDateForPosition(tickDate, unit, this.tickMarkPosition);\n/* */ }\n/* */ \n/* */ \n/* 1635 */ long lowestTickTime = tickDate.getTime();\n/* 1636 */ long distance = unit.addToDate(tickDate, this.timeZone).getTime() - lowestTickTime;\n/* */ \n/* 1638 */ int minorTickSpaces = getMinorTickCount();\n/* 1639 */ if (minorTickSpaces <= 0) {\n/* 1640 */ minorTickSpaces = unit.getMinorTickCount();\n/* */ }\n/* 1642 */ for (int minorTick = 1; minorTick < minorTickSpaces; minorTick++) {\n/* 1643 */ long minorTickTime = lowestTickTime - distance * minorTick / minorTickSpaces;\n/* */ \n/* 1645 */ if (minorTickTime > 0L && getRange().contains(minorTickTime) && \n/* 1646 */ !isHiddenValue(minorTickTime)) {\n/* 1647 */ result.add(new DateTick(TickType.MINOR, new Date(minorTickTime), \"\", TextAnchor.TOP_CENTER, TextAnchor.CENTER, 0.0D));\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1653 */ if (!isHiddenValue(tickDate.getTime())) {\n/* */ TextAnchor rotationAnchor, anchor;\n/* */ String tickLabel;\n/* 1656 */ DateFormat formatter = getDateFormatOverride();\n/* 1657 */ if (formatter != null) {\n/* 1658 */ tickLabel = formatter.format(tickDate);\n/* */ } else {\n/* */ \n/* 1661 */ tickLabel = this.tickUnit.dateToString(tickDate);\n/* */ } \n/* */ \n/* 1664 */ double angle = 0.0D;\n/* 1665 */ if (isVerticalTickLabels()) {\n/* 1666 */ anchor = TextAnchor.CENTER_RIGHT;\n/* 1667 */ rotationAnchor = TextAnchor.CENTER_RIGHT;\n/* 1668 */ if (edge == RectangleEdge.TOP) {\n/* 1669 */ angle = 1.5707963267948966D;\n/* */ } else {\n/* */ \n/* 1672 */ angle = -1.5707963267948966D;\n/* */ }\n/* */ \n/* */ }\n/* 1676 */ else if (edge == RectangleEdge.TOP) {\n/* 1677 */ anchor = TextAnchor.BOTTOM_CENTER;\n/* 1678 */ rotationAnchor = TextAnchor.BOTTOM_CENTER;\n/* */ } else {\n/* */ \n/* 1681 */ anchor = TextAnchor.TOP_CENTER;\n/* 1682 */ rotationAnchor = TextAnchor.TOP_CENTER;\n/* */ } \n/* */ \n/* */ \n/* 1686 */ Tick tick = new DateTick(tickDate, tickLabel, anchor, rotationAnchor, angle);\n/* */ \n/* 1688 */ result.add(tick);\n/* 1689 */ hasRolled = false;\n/* */ \n/* 1691 */ long currentTickTime = tickDate.getTime();\n/* 1692 */ tickDate = unit.addToDate(tickDate, this.timeZone);\n/* 1693 */ long nextTickTime = tickDate.getTime();\n/* 1694 */ for (int minorTick = 1; minorTick < minorTickSpaces; \n/* 1695 */ minorTick++) {\n/* 1696 */ long minorTickTime = currentTickTime + (nextTickTime - currentTickTime) * minorTick / minorTickSpaces;\n/* */ \n/* */ \n/* 1699 */ if (getRange().contains(minorTickTime) && \n/* 1700 */ !isHiddenValue(minorTickTime)) {\n/* 1701 */ result.add(new DateTick(TickType.MINOR, new Date(minorTickTime), \"\", TextAnchor.TOP_CENTER, TextAnchor.CENTER, 0.0D));\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ continue;\n/* */ } \n/* */ \n/* */ \n/* 1710 */ tickDate = unit.rollDate(tickDate, this.timeZone);\n/* 1711 */ hasRolled = true;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1716 */ return result;\n/* */ }", "public interface IsDefaultTicks extends IsDefaultFontContainer {\n\n\t/**\n\t * Returns the major tick defaults.\n\t * \n\t * @return the major tick defaults.\n\t */\n\tIsDefaultMajor getMajor();\n\n\t/**\n\t * Returns the number formatting options.\n\t * \n\t * @return the number formatting options\n\t */\n\tIsDefaultNumberFormatOptions getNumberFormat();\n\n\t/**\n\t * If true, show tick marks\n\t * \n\t * @return if true, show tick marks.\n\t */\n\tboolean isDisplay();\n\n\t/**\n\t * If true, automatically calculates how many labels that can be shown and hides labels accordingly. Turn it off to show all labels no matter what\n\t * \n\t * @return If true, automatically calculates how many labels that can be shown and hides labels accordingly. Turn it off to show all labels no matter what.\n\t */\n\tboolean isAutoSkip();\n\n\t/**\n\t * Returns the padding between the ticks on the horizontal axis when autoSkip is enabled. Note: Only applicable to horizontal scales.\n\t * \n\t * @return padding between the ticks on the horizontal axis when autoSkip is enabled. Note: Only applicable to horizontal scales.\n\t */\n\tint getAutoSkipPadding();\n\n\t/**\n\t * If <code>true</code>, the defined minimum and maximum values should be presented as ticks even if they are not \"nice\".\n\t * \n\t * @return if <code>true</code>, the defined min and maximum values should be presented as ticks even if they are not \"nice\"\n\t */\n\tboolean isIncludeBounds();\n\n\t/**\n\t * Returns the distance in pixels to offset the label from the center point of the tick (in the y direction for the x axis, and the x direction for the y axis).<br>\n\t * Note: this can cause labels at the edges to be cropped by the edge of the canvas.\n\t * \n\t * @return the distance in pixels to offset the label from the center point of the tick (in the y direction for the x axis, and the x direction for the y axis).\n\t */\n\tint getLabelOffset();\n\n\t/**\n\t * Returns the number of ticks to generate.<br>\n\t * If specified, this overrides the automatic generation.\n\t * \n\t * @return the number of ticks to generate.<br>\n\t * If specified, this overrides the automatic generation\n\t */\n\tint getCount();\n\n\t/**\n\t * Returns the maximum rotation for tick labels when rotating to condense labels. Note: Rotation doesn't occur until necessary. Note: Only applicable to horizontal scales.\n\t * \n\t * @return maximum rotation for tick labels when rotating to condense labels. Note: Rotation doesn't occur until necessary. Note: Only applicable to horizontal scales.\n\t */\n\tint getMaxRotation();\n\n\t/**\n\t * Returns the minimum rotation for tick labels. Note: Only applicable to horizontal scales.\n\t * \n\t * @return minimum rotation for tick labels. Note: Only applicable to horizontal scales.\n\t */\n\tint getMinRotation();\n\n\t/**\n\t * Returns the flips tick labels around axis, displaying the labels inside the chart instead of outside. Note: Only applicable to vertical scales.\n\t * \n\t * @return flips tick labels around axis, displaying the labels inside the chart instead of outside. Note: Only applicable to vertical scales.\n\t */\n\tboolean isMirror();\n\n\t/**\n\t * Returns the padding between the tick label and the axis. When set on a vertical axis, this applies in the horizontal (X) direction. When set on a horizontal axis, this\n\t * applies in the vertical (Y) direction.\n\t * \n\t * @return padding between the tick label and the axis. When set on a vertical axis, this applies in the horizontal (X) direction. When set on a horizontal axis, this applies\n\t * in the vertical (Y) direction.\n\t */\n\tint getPadding();\n\n\t/**\n\t * Returns the maximum number of ticks and grid to show.\n\t * \n\t * @return maximum number of ticks and grid to show.\n\t */\n\tint getMaxTicksLimit();\n\n\t/**\n\t * Returns the user defined fixed step size for the scale.\n\t * \n\t * @return user defined fixed step size for the scale.\n\t */\n\tdouble getStepSize();\n\n\t/**\n\t * Returns the color of label backdrops.\n\t * \n\t * @return color of label backdrops.\n\t */\n\tString getBackdropColorAsString();\n\n\t/**\n\t * Returns the padding of label backdrop.\n\t * \n\t * @return padding of label backdrop.\n\t */\n\tIsDefaultPadding getBackdropPadding();\n\n\t/**\n\t * If true, draw a background behind the tick labels.\n\t * \n\t * @return if true, draw a background behind the tick labels.\n\t */\n\tboolean isShowLabelBackdrop();\n\n\t/**\n\t * Returns the property controls the ticks generation.\n\t * \n\t * @return property controls the ticks generation.\n\t */\n\tTickSource getSource();\n\n\t/**\n\t * If defined and stepSize is not specified, the step size will be rounded to this many decimal places.\n\t * \n\t * @return if defined and stepSize is not specified, the step size will be rounded to this many decimal places.\n\t */\n\tint getPrecision();\n\n\t/**\n\t * Returns z-index of tick layer. Useful when ticks are drawn on chart area.<br>\n\t * Values less than or equals to 0 are drawn under datasets, greater than 0 on top.\n\t * \n\t * @return z-index of tick layer. Useful when ticks are drawn on chart area.<br>\n\t * Values less than or equals to 0 are drawn under datasets, greater than 0 on top.\n\t */\n\tint getZ();\n\n\t/**\n\t * Returns the number of ticks to examine when deciding how many labels will fit.<br>\n\t * Setting a smaller value will be faster, but may be less accurate when there is large variability in label length.\n\t * \n\t * @return the number of ticks to examine when deciding how many labels will fit.\n\t */\n\tint getSampleSize();\n\n\t/**\n\t * Returns the tick alignment along the axis.\n\t * \n\t * @return the tick alignment along the axis\n\t */\n\tTickAlign getAlign();\n\n\t/**\n\t * Returns the tick alignment perpendicular to the axis.\n\t * \n\t * @return the tick alignment perpendicular to the axis\n\t */\n\tCrossAlign getCrossAlign();\n\n\t/**\n\t * Returns the text stroke color as string.\n\t * \n\t * @return the text stroke color as string.\n\t */\n\tString getTextStrokeColorAsString();\n\n\t/**\n\t * Returns the text stroke width.\n\t * \n\t * @return the text stroke width.\n\t */\n\tint getTextStrokeWidth();\n\n}", "private void initTickMarksPixelMap() {\n LogUtil.info(TAG, \"initTickMarksPixelMap() begin\");\n if (mTickMarksDrawable instanceof StateElement) {\n StateElement listDrawable = (StateElement) mTickMarksDrawable;\n try {\n int stateCount = listDrawable.getStateCount();\n if (stateCount == 2) {\n setTickMarksPixelMapValues(listDrawable, stateCount);\n } else {\n\n //please check your selector drawable's format, please see above to correct.\n throw new IllegalArgumentException(\"the format of the selector TickMarks drawable is wrong!\");\n }\n } catch (IllegalArgumentException e) {\n mUnselectedTickMarksPixelMap = getPixelMapFromDrawable(mTickMarksDrawable, false);\n mSelectTickMarksPixelMap = mUnselectedTickMarksPixelMap;\n }\n } else {\n mUnselectedTickMarksPixelMap = getPixelMapFromResId(false, false);\n mSelectTickMarksPixelMap = mUnselectedTickMarksPixelMap;\n }\n LogUtil.info(TAG, \"initTickMarksPixelMap() end\");\n }", "public static TickUnitSource createStandardDateTickUnits(TimeZone zone, Locale locale) {\n/* 1160 */ ParamChecks.nullNotPermitted(zone, \"zone\");\n/* 1161 */ ParamChecks.nullNotPermitted(locale, \"locale\");\n/* 1162 */ TickUnits units = new TickUnits();\n/* */ \n/* */ \n/* 1165 */ DateFormat f1 = new SimpleDateFormat(\"HH:mm:ss.SSS\", locale);\n/* 1166 */ DateFormat f2 = new SimpleDateFormat(\"HH:mm:ss\", locale);\n/* 1167 */ DateFormat f3 = new SimpleDateFormat(\"HH:mm\", locale);\n/* 1168 */ DateFormat f4 = new SimpleDateFormat(\"d-MMM, HH:mm\", locale);\n/* 1169 */ DateFormat f5 = new SimpleDateFormat(\"d-MMM\", locale);\n/* 1170 */ DateFormat f6 = new SimpleDateFormat(\"MMM-yyyy\", locale);\n/* 1171 */ DateFormat f7 = new SimpleDateFormat(\"yyyy\", locale);\n/* */ \n/* 1173 */ f1.setTimeZone(zone);\n/* 1174 */ f2.setTimeZone(zone);\n/* 1175 */ f3.setTimeZone(zone);\n/* 1176 */ f4.setTimeZone(zone);\n/* 1177 */ f5.setTimeZone(zone);\n/* 1178 */ f6.setTimeZone(zone);\n/* 1179 */ f7.setTimeZone(zone);\n/* */ \n/* */ \n/* 1182 */ units.add(new DateTickUnit(DateTickUnitType.MILLISECOND, true, f1));\n/* 1183 */ units.add(new DateTickUnit(DateTickUnitType.MILLISECOND, 5, DateTickUnitType.MILLISECOND, true, f1));\n/* */ \n/* 1185 */ units.add(new DateTickUnit(DateTickUnitType.MILLISECOND, 10, DateTickUnitType.MILLISECOND, true, f1));\n/* */ \n/* 1187 */ units.add(new DateTickUnit(DateTickUnitType.MILLISECOND, 25, DateTickUnitType.MILLISECOND, 5, f1));\n/* */ \n/* 1189 */ units.add(new DateTickUnit(DateTickUnitType.MILLISECOND, 50, DateTickUnitType.MILLISECOND, 10, f1));\n/* */ \n/* 1191 */ units.add(new DateTickUnit(DateTickUnitType.MILLISECOND, 100, DateTickUnitType.MILLISECOND, 10, f1));\n/* */ \n/* 1193 */ units.add(new DateTickUnit(DateTickUnitType.MILLISECOND, 'ú', DateTickUnitType.MILLISECOND, 10, f1));\n/* */ \n/* 1195 */ units.add(new DateTickUnit(DateTickUnitType.MILLISECOND, 'Ǵ', DateTickUnitType.MILLISECOND, 50, f1));\n/* */ \n/* */ \n/* */ \n/* 1199 */ units.add(new DateTickUnit(DateTickUnitType.SECOND, true, DateTickUnitType.MILLISECOND, 50, f2));\n/* */ \n/* 1201 */ units.add(new DateTickUnit(DateTickUnitType.SECOND, 5, DateTickUnitType.SECOND, true, f2));\n/* */ \n/* 1203 */ units.add(new DateTickUnit(DateTickUnitType.SECOND, 10, DateTickUnitType.SECOND, true, f2));\n/* */ \n/* 1205 */ units.add(new DateTickUnit(DateTickUnitType.SECOND, 30, DateTickUnitType.SECOND, 5, f2));\n/* */ \n/* */ \n/* */ \n/* 1209 */ units.add(new DateTickUnit(DateTickUnitType.MINUTE, true, DateTickUnitType.SECOND, 5, f3));\n/* */ \n/* 1211 */ units.add(new DateTickUnit(DateTickUnitType.MINUTE, 2, DateTickUnitType.SECOND, 10, f3));\n/* */ \n/* 1213 */ units.add(new DateTickUnit(DateTickUnitType.MINUTE, 5, DateTickUnitType.MINUTE, true, f3));\n/* */ \n/* 1215 */ units.add(new DateTickUnit(DateTickUnitType.MINUTE, 10, DateTickUnitType.MINUTE, true, f3));\n/* */ \n/* 1217 */ units.add(new DateTickUnit(DateTickUnitType.MINUTE, 15, DateTickUnitType.MINUTE, 5, f3));\n/* */ \n/* 1219 */ units.add(new DateTickUnit(DateTickUnitType.MINUTE, 20, DateTickUnitType.MINUTE, 5, f3));\n/* */ \n/* 1221 */ units.add(new DateTickUnit(DateTickUnitType.MINUTE, 30, DateTickUnitType.MINUTE, 5, f3));\n/* */ \n/* */ \n/* */ \n/* 1225 */ units.add(new DateTickUnit(DateTickUnitType.HOUR, true, DateTickUnitType.MINUTE, 5, f3));\n/* */ \n/* 1227 */ units.add(new DateTickUnit(DateTickUnitType.HOUR, 2, DateTickUnitType.MINUTE, 10, f3));\n/* */ \n/* 1229 */ units.add(new DateTickUnit(DateTickUnitType.HOUR, 4, DateTickUnitType.MINUTE, 30, f3));\n/* */ \n/* 1231 */ units.add(new DateTickUnit(DateTickUnitType.HOUR, 6, DateTickUnitType.HOUR, true, f3));\n/* */ \n/* 1233 */ units.add(new DateTickUnit(DateTickUnitType.HOUR, 12, DateTickUnitType.HOUR, true, f4));\n/* */ \n/* */ \n/* */ \n/* 1237 */ units.add(new DateTickUnit(DateTickUnitType.DAY, true, DateTickUnitType.HOUR, true, f5));\n/* */ \n/* 1239 */ units.add(new DateTickUnit(DateTickUnitType.DAY, 2, DateTickUnitType.HOUR, true, f5));\n/* */ \n/* 1241 */ units.add(new DateTickUnit(DateTickUnitType.DAY, 7, DateTickUnitType.DAY, true, f5));\n/* */ \n/* 1243 */ units.add(new DateTickUnit(DateTickUnitType.DAY, 15, DateTickUnitType.DAY, true, f5));\n/* */ \n/* */ \n/* */ \n/* 1247 */ units.add(new DateTickUnit(DateTickUnitType.MONTH, true, DateTickUnitType.DAY, true, f6));\n/* */ \n/* 1249 */ units.add(new DateTickUnit(DateTickUnitType.MONTH, 2, DateTickUnitType.DAY, true, f6));\n/* */ \n/* 1251 */ units.add(new DateTickUnit(DateTickUnitType.MONTH, 3, DateTickUnitType.MONTH, true, f6));\n/* */ \n/* 1253 */ units.add(new DateTickUnit(DateTickUnitType.MONTH, 4, DateTickUnitType.MONTH, true, f6));\n/* */ \n/* 1255 */ units.add(new DateTickUnit(DateTickUnitType.MONTH, 6, DateTickUnitType.MONTH, true, f6));\n/* */ \n/* */ \n/* */ \n/* 1259 */ units.add(new DateTickUnit(DateTickUnitType.YEAR, true, DateTickUnitType.MONTH, true, f7));\n/* */ \n/* 1261 */ units.add(new DateTickUnit(DateTickUnitType.YEAR, 2, DateTickUnitType.MONTH, 3, f7));\n/* */ \n/* 1263 */ units.add(new DateTickUnit(DateTickUnitType.YEAR, 5, DateTickUnitType.YEAR, true, f7));\n/* */ \n/* 1265 */ units.add(new DateTickUnit(DateTickUnitType.YEAR, 10, DateTickUnitType.YEAR, true, f7));\n/* */ \n/* 1267 */ units.add(new DateTickUnit(DateTickUnitType.YEAR, 25, DateTickUnitType.YEAR, 5, f7));\n/* */ \n/* 1269 */ units.add(new DateTickUnit(DateTickUnitType.YEAR, 50, DateTickUnitType.YEAR, 10, f7));\n/* */ \n/* 1271 */ units.add(new DateTickUnit(DateTickUnitType.YEAR, 100, DateTickUnitType.YEAR, 20, f7));\n/* */ \n/* */ \n/* 1274 */ return units;\n/* */ }", "public abstract int getTickOffset();", "@JSProperty(\"tickPositions\")\n void setTickPositions(double[] value);", "public static TickUnitSource createStandardDateTickUnits(TimeZone zone) { return createStandardDateTickUnits(zone, Locale.getDefault()); }", "public String toString()\n {\n return \"WrapperTickEvent[ticks=\" + getTicks() + \", tickOffset=\" + getTickOffset() + \"]\";\n }", "@JSProperty(\"tickPositions\")\n @Nullable\n double[] getTickPositions();", "private static IModelSpace initializeModelSpace() {\n String modelSpaceName = \"Default Trace-Time Space\";\n String yAxisName = \"Time\";\n Unit yUnit = UnitPreferences.getInstance().getTimeUnit();\n IAxis xAxis = new TraceAxis(new AxisRange(1, 10));\n ILabel yAxisLabel = new Label(yAxisName, Orientation.VERTICAL, Alignment.CENTER, true);\n IAxis yAxis = new Axis(yAxisLabel, yUnit, new AxisRange(0, 1000), Orientation.VERTICAL, AxisDirection.TOP_TO_BOTTOM);\n return new ModelSpace(modelSpaceName, xAxis, yAxis);\n }", "@JSProperty(\"tickPixelInterval\")\n double getTickPixelInterval();", "double getDefaultTimerTrig();", "@Test\n public void testEpochToEpochDateTimeConvert() {\n testTimeConvert(\n \"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:EPOCH', '30:MINUTES') > 1620830760000\",\n new Range(1620831600000L, true, null, false));\n testTimeConvert(\n \"DATE_TIME_CONVERT(col, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:EPOCH', '30:MINUTES') < 1620917160000\",\n new Range(null, false, 1620918000000L, false));\n testTimeConvert(\n \"datetimeconvert(col, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:EPOCH', '30:MINUTES') BETWEEN 1620830760000 AND\"\n + \" 1620917160000\", new Range(1620831600000L, true, 1620918000000L, false));\n testTimeConvert(\n \"DATETIMECONVERT(col, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:EPOCH', '30:MINUTES') = 1620830760000\",\n new Range(1620831600000L, true, 1620831600000L, false));\n\n // Value on granularity boundary\n testTimeConvert(\n \"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:EPOCH', '30:MINUTES') > 1620831600000\",\n new Range(1620833400000L, true, null, false));\n testTimeConvert(\n \"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:EPOCH', '30:MINUTES') < 1620918000000\",\n new Range(null, false, 1620918000000L, false));\n testTimeConvert(\n \"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:EPOCH', '30:MINUTES') BETWEEN 1620831600000 AND\"\n + \" 1620918000000\", new Range(1620831600000L, true, 1620919800000L, false));\n testTimeConvert(\n \"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:EPOCH', '30:MINUTES') = 1620831600000\",\n new Range(1620831600000L, true, 1620833400000L, false));\n\n // Other output format\n testTimeConvert(\"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '1:MINUTES:EPOCH', '30:MINUTES') > 27013846\",\n new Range(1620831600000L, true, null, false));\n testTimeConvert(\"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '10:MINUTES:EPOCH', '30:MINUTES') < 2701528\",\n new Range(null, false, 1620918000000L, false));\n testTimeConvert(\n \"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '1:SECONDS:EPOCH', '30:MINUTES') BETWEEN 1620830760 AND \"\n + \"1620917160\", new Range(1620831600000L, true, 1620918000000L, false));\n testTimeConvert(\"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '30:MINUTES:EPOCH', '30:MINUTES') > 900462\",\n new Range(1620833400000L, true, null, false));\n testTimeConvert(\"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '1:HOURS:EPOCH', '30:MINUTES') < 450255\",\n new Range(null, false, 1620918000000L, false));\n testTimeConvert(\n \"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '1:DAYS:EPOCH', '30:MINUTES') BETWEEN 18759 AND 18760\",\n new Range(1620777600000L, true, 1620950400000L, false));\n testTimeConvert(\"dateTimeConvert(col, '1:MILLISECONDS:EPOCH', '1:DAYS:EPOCH', '30:MINUTES') = 18759\",\n new Range(1620777600000L, true, 1620864000000L, false));\n\n // Other input format\n testTimeConvert(\"dateTimeConvert(col, '1:SECONDS:EPOCH', '1:MINUTES:EPOCH', '30:MINUTES') > 27013846\",\n new Range(1620831600L, true, null, false));\n testTimeConvert(\"dateTimeConvert(col, '1:MINUTES:EPOCH', '10:MINUTES:EPOCH', '30:MINUTES') < 2701528\",\n new Range(null, false, 27015300L, false));\n testTimeConvert(\n \"dateTimeConvert(col, '1:DAYS:EPOCH', '1:SECONDS:EPOCH', '30:MINUTES') BETWEEN 1620830760 AND 1620917160\",\n new Range(18759L, false, 18760L, true));\n testTimeConvert(\"dateTimeConvert(col, '1:SECONDS:EPOCH', '30:MINUTES:EPOCH', '30:MINUTES') > 900462\",\n new Range(1620833400L, true, null, false));\n testTimeConvert(\"dateTimeConvert(col, '1:MINUTES:EPOCH', '1:HOURS:EPOCH', '30:MINUTES') < 450255\",\n new Range(null, false, 27015300L, false));\n testTimeConvert(\"dateTimeConvert(col, '1:DAYS:EPOCH', '1:DAYS:EPOCH', '30:MINUTES') BETWEEN 18759 AND 18760\",\n new Range(18759L, true, 18761L, false));\n testTimeConvert(\"dateTimeConvert(col, '1:DAYS:EPOCH', '1:DAYS:EPOCH', '30:MINUTES') = 18759\",\n new Range(18759L, true, 18760L, false));\n\n // Invalid time\n testInvalidTimeConvert(\"dateTimeConvert(col, '1:SECONDS:EPOCH', '1:MINUTES:EPOCH', '30:MINUTES') > 27013846.5\");\n testInvalidTimeConvert(\"dateTimeConvert(col, '1:SECONDS:EPOCH', '30:MINUTES:EPOCH', '30:MINUTES') > 27013846\");\n }", "void tick(long tickSinceStart);", "protected WrapperTickEvent()\n {\n }", "@Override protected void updateAxisRange() {\n final Axis<X> xa = getXAxis();\n final Axis<Y> ya = getYAxis();\n List<X> xData = null;\n List<Y> yData = null;\n if(xa.isAutoRanging()) xData = new ArrayList<X>();\n if(ya.isAutoRanging()) yData = new ArrayList<Y>();\n if(xData != null || yData != null) {\n for(Series<X,Y> series : getData()) {\n for(Data<X,Y> data: series.getData()) {\n if(xData != null) {\n xData.add(data.getXValue());\n xData.add(xa.toRealValue(xa.toNumericValue(data.getXValue()) + getLength(data.getExtraValue())));\n }\n if(yData != null){\n yData.add(data.getYValue());\n }\n }\n }\n if(xData != null) xa.invalidateRange(xData);\n if(yData != null) ya.invalidateRange(yData);\n }\n }", "public StockDateTime getTicks(Boolean ticks) {\n StockDateTime item = new StockDateTime(jsBase + \".ticks(\" + ticks + \")\");\n getTicks2.add(item);\n return item;\n }", "@Override\n protected void updateAxisRange(){\n Axis<X> xAxis = getXAxis();\n Axis<Y> yAxis = getYAxis();\n ArrayList<X> xList = null;\n ArrayList<Y> yList = null;\n if(xAxis.isAutoRanging()) { xList = new ArrayList<>(); }\n if(yAxis.isAutoRanging()) { yList = new ArrayList<>(); }\n\n if(xAxis != null || yAxis != null) {\n for (Series<X, Y> series : getData()) {\n for (Data<X, Y> data : series.getData()) {\n if(xList != null) {\n xList.add(data.getXValue());\n xList.add(xAxis.toRealValue(xAxis.toNumericValue(data.getXValue())\n + getLength(data.getExtraValue())));\n }\n if(yList != null) {\n yList.add(data.getYValue());\n }\n }\n }\n if(xList != null) { xAxis.invalidateRange(xList); }\n if(yList != null) { yAxis.invalidateRange(yList); }\n }\n\n }", "@Override\n\tpublic Map<String, Double> getTickSize() {\n\t\treturn null;\n\t}", "public Map<EventKey, EventMethod> createEventMap() {\n\t\tfinal Map<EventKey, EventMethod> eventMap = new EnumMap<>(EventKey.class);\n\t\tfinal Pair<Map<String, Object>, Set<Class<?>>> eventPair = prepareEventPair();\n\n\t\tfor (Class<?> eventClass : eventPair.getSecond()) {\n\t\t\tfor (Method eventMethod : prepareEventMethods(eventClass)) {\n\t\t\t\teventMap.put(eventMethod.getAnnotation(EventMapping.class).key(),\n\t\t\t\t\t\tnew EventMethod(eventPair.getFirst().get(eventClass.getName()), eventMethod));\n\t\t\t}\n\t\t}\n\t\treturn eventMap;\n\t}", "@JSProperty(\"tickPixelInterval\")\n void setTickPixelInterval(double value);", "public void setTicks(final int t) {\r\n ticks = t;\r\n }", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {9}, optParamIndex = {0, 1, 2, 3, 4, 5, 6, 7, 8}, javaType = {com.exceljava.com4j.excel.XlTrendlineType.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.Int32, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_I4, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"-4132\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=9)\n com.exceljava.com4j.excel.Trendline add();", "double convertTicksPer100msToRPM(double ticks) {\n return ticks * HUNDRED_MS_PER_SECOND / TALON_TICKS_PER_REV * SECONDS_PER_MINUTE;\n }", "@JSProperty(\"tickInterval\")\n void setTickInterval(double value);", "public double getTickForOffset(double timeOffset) {\n // find the index of the tempo event preceding the timeOffset time\n int idx = -1;\n for (int i = timePositions.size() - 1; i >= 0; i--) {\n if (timePositions.get(i) <= timeOffset) {\n idx = i;\n break;\n }\n }\n if (idx == -1) {\n //oops, the offset is before the first tempo event. We'll use\n //the the first tempo event, but the result will not be reliable..\n idx = 0;\n }\n\n TempoEvent tempoEvent = mappedTempoEvents.get(idx);\n if (tempoEvent.getTickPos() > startTick) {\n double timeDistance = timeOffset - timePositions.get(idx);\n double tickDist = tempoEvent.toMidiTicks(timeDistance / timeStretch);\n return tempoEvent.getTickPos() + tickDist;\n } else {\n double tickDist = tempoEvent.toMidiTicks(timeOffset / timeStretch);\n return startTick + tickDist;\n }\n }", "public TimeInterval createByMultiplying(int factor) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 1; i < _numberOfIntervals.length; i++) {\r\n\t\t\tnti._numberOfIntervals[i] = factor * this._numberOfIntervals[i];\r\n\t\t}\r\n\t\treturn nti;\r\n\t}", "public static Map<Integer, Double> InitializeMark() {\n\t\tMap<Integer, Double> mark = new HashMap<Integer, Double>();\r\n\t\tfinal Double giantConstant = 1.0E+45;\r\n\t\tfor (Entry<Integer, Vertex> currentVertex : vertexes.entrySet())\r\n\t\t\tmark.put(currentVertex.getKey(), giantConstant);\r\n\t\treturn mark;\r\n\t}", "@Override\n protected void init(Context context)\n {\n super.init(context);\n \n // initialize time related objects for the x-axis\n _xAxisMinTimestamp = new Time();\n _xAxisMaxTimestamp = new Time();\n\n // get the size of the text for a default string along the x-axis\n _xAxisTextPaint.getTextBounds(\"00:00:00\", 0, 8, _xAxisBounds); \n \n // disable history mode (used when scrolling back in time)\n _inHistoryMode = false;\n \n // set the min and max allowed seconds to display along the x-axis\n _xAxisMinTimeSecondsDisp = MIN_ALLOWED_SECONDS_DISPLAYED;\n _xAxisMaxTimeSecondsDisp = MAX_ALLOWED_SECONDS_DISPLAYED;\n \n // default the number of seconds to display along the x-axis\n _xAxisNumSecondsDisplayed = DEFAULT_NUM_SECONDS_DISPLAYED;\n }", "void setInhabitedTime(long ticks);", "public void tick(Integer tickerPos) {\n ticker.setY(tickerPos * CELL_HEIGHT);\n ticker.toFront();\n\n }", "private void prePreTickUpdates() {\n\t\t// <- LOGGING\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Pre PreTick\\t\\t (DefaultSchedule ID \" + id + \")\");\n\t\t}\n\t\t// LOGGING ->\n\n\t\t// copy to prevent concurrent modifications:\n\t\tList<PrePreTickAction> prePreTickActionsCopy = new ArrayList<PrePreTickAction>(\n\t\t\t\tprePreTickActions);\n\n\t\tfor (PrePreTickAction p : prePreTickActionsCopy) {\n\t\t\t// <- LOGGING\n\t\t\tif (logger.isTraceEnabled()) {\n\t\t\t\tlogger.trace(\"Do PrePreTick action \" + p);\n\t\t\t}\n\t\t\t// LOGGING ->\n\n\t\t\tp.prePreTick();\n\t\t}\n\t}", "public PaxosRound createRound()\n {\n return createRound(0);\n }", "@Override\n\tpublic void setStartTick(int tick) {\n\t\tthis.startTick = tick;\n\t\tthis.tick = tick;\n\t}", "double getMinTimerTrig();", "public HBox simulationTicks() { \r\n\t\t// Setup Ticks\r\n\t\t// Accessed 26/08/2020\r\n\t\t// Adapted from: https://www.tutorialspoint.com/javafx/javafx_text.htm#:~:text=You%20can%20change%20the%20font,scene.\r\n\t\tsimTicks.setFont(Font.font(\"verdana\", FontWeight.NORMAL, FontPosture.REGULAR, 11));\r\n\t\t\r\n\t\t// Setup HBox\r\n\t\tHBox ticks = new HBox(); \r\n\t\tticks.setAlignment(Pos.CENTER); \r\n\t\t\r\n\t\t// Add Slider To HBox\r\n\t\tticks.getChildren().add(simTicks);\r\n\t\t\r\n\t\treturn ticks;\r\n\t}", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 9}, optParamIndex = {3, 4, 5, 6, 7, 8}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=9)\n com.exceljava.com4j.excel.Trendline add(\n @Optional @DefaultValue(\"-4132\") com.exceljava.com4j.excel.XlTrendlineType type,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object order,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object period);", "private static List<TimeSeriesExt> initTimeSeriesExtList(List<TimeSeriesExt> tseList) {\r\n\r\n\t\tTimeSeriesExt tse0 = tseList.get(0);\r\n\t\ttse0.setHighIncrease(0);\r\n\t\ttse0.setLowDecrease(0);\r\n\t\t\r\n\t\tfor(int i=1; i<tseList.size(); i++) {\r\n\t\t\ttse0 = tseList.get(i-1);\r\n\t\t\tTimeSeriesExt tse1 = tseList.get(i);\r\n\t\t\ttse1.setHighIncrease(tse1.getHigh()-tse0.getClose());\r\n\t\t\ttse1.setHighIncreaseP(tse1.getHighIncrease()/tse0.getClose());\r\n\t\t\t\r\n\t\t\ttse1.setLowDecrease(tse1.getLow()-tse0.getClose());\r\n\t\t\ttse1.setLowDecreaseP(tse1.getLowDecrease()/tse0.getClose());\r\n\t\t\t\r\n\t\t\ttse1.setCloseIncrease(tse1.getClose()-tse0.getClose());\r\n\t\t\ttse1.setCloseIncreaseP(tse1.getCloseIncrease()/tse0.getClose());\r\n\t\t}\r\n\t\t\r\n\t\treturn tseList;\r\n\t}", "@JSProperty(\"tickInterval\")\n double getTickInterval();", "public StockDateTime getTicks(String ticks) {\n StockDateTime item = new StockDateTime(jsBase + \".ticks(\" + wrapQuotes(ticks) + \")\");\n getTicks1.add(item);\n return item;\n }", "double getTickBorderDashOffset();", "public List refreshTicks(Graphics2D g2, AxisState state, Rectangle2D dataArea, RectangleEdge edge) {\n/* 1558 */ List result = null;\n/* 1559 */ if (RectangleEdge.isTopOrBottom(edge)) {\n/* 1560 */ result = refreshTicksHorizontal(g2, dataArea, edge);\n/* */ }\n/* 1562 */ else if (RectangleEdge.isLeftOrRight(edge)) {\n/* 1563 */ result = refreshTicksVertical(g2, dataArea, edge);\n/* */ } \n/* 1565 */ return result;\n/* */ }", "public TimeMap() {\n timeMap = new HashMap<>();\n }", "@Test\n public void assertTaxBracketBoundariesWithoutPrecision() {\n BigDecimal minimumSalary = BigDecimal.ZERO;\n BigDecimal maximumSalary = new BigDecimal(10000);\n TaxBracket zeroTo10k = createTaxBracket(minimumSalary, maximumSalary);\n validateSalaryFitsWithinBracket(zeroTo10k, minimumSalary);\n validateSalaryFitsWithinBracket(zeroTo10k, maximumSalary);\n validateSalaryFitsWithinBracket(zeroTo10k, minimumSalary.add(BigDecimal.ONE));\n validateSalaryFitsWithinBracket(zeroTo10k, maximumSalary.subtract(BigDecimal.ONE));\n\n // Make sure when the bounds are breached, that the tax bracket does not apply anymore\n validateSalaryDoesNotFitWithinBracket(zeroTo10k, minimumSalary.subtract(BigDecimal.ONE));\n validateSalaryDoesNotFitWithinBracket(zeroTo10k, maximumSalary.add(BigDecimal.ONE));\n }", "private void generateDefaultTimeSlots() {\n\t\tLocalTime startTime = LocalTime.of(9, 0); // 9AM start time\n\t\tLocalTime endTime = LocalTime.of(19, 0); // 5PM end time\n\n\t\tfor (int i = 1; i <= 7; i++) {\n\t\t\tList<Timeslot> timeSlots = new ArrayList<>();\n\t\t\tLocalTime currentTime = startTime.plusMinutes(15);\n\t\t\twhile (currentTime.isBefore(endTime) && currentTime.isAfter(startTime)) {\n\t\t\t\tTimeslot newSlot = new Timeslot();\n\t\t\t\tnewSlot.setTime(currentTime);\n\t\t\t\tnewSlot = timeslotRepository.save(newSlot);\n\t\t\t\ttimeSlots.add(newSlot);\n\t\t\t\tcurrentTime = currentTime.plusHours(1); // new slot after one hour\n\t\t\t}\n\t\t\tDay newDay = new Day();\n\t\t\tnewDay.setTs(timeSlots);\n\t\t\tnewDay.setDayOfWeek(DayOfWeek.of(i));\n\t\t\tdayRepository.save(newDay);\n\t\t}\n\t}", "PreloadedTimeScales(\n final Collection<? extends OffsetModel> leapSeconds,\n final BiFunction<\n ? super IERSConventions,\n ? super TimeScales,\n ? extends Collection<? extends EOPEntry>> eopSupplier) {\n tai = new TAIScale();\n tt = new TTScale();\n gps = new GPSScale();\n qzss = new QZSSScale();\n gst = new GalileoScale();\n irnss = new IRNSSScale();\n bdt = new BDTScale();\n tcg = new TCGScale(tt, tai);\n utc = new UTCScale(tai, leapSeconds);\n glonass = new GLONASSScale(utc);\n tdb = new TDBScale(tt, getJ2000Epoch());\n tcb = new TCBScale(tdb, tai);\n final int n = IERSConventions.values().length;\n eopMap = new ConcurrentHashMap<>(n);\n this.eopSupplier = eopSupplier;\n }", "void setTick(int tick);", "public double getTimeOffset(double tick) {\n // find the index of the tempo event preceding the tick\n int idx = -1;\n for (int i = mappedTempoEvents.size() - 1; i >= 0; i--) {\n if (mappedTempoEvents.get(i).getTickPos() <= tick) {\n idx = i;\n break;\n }\n }\n if (idx == -1) {\n //oops, should never happen\n throw new IllegalArgumentException(\"internal error: tick is not within this time-map\");\n }\n TempoEvent tempoEvent = mappedTempoEvents.get(idx);\n if (tempoEvent.getTickPos() > startTick) {\n double tickDistance = tick - tempoEvent.getTickPos();\n double timeDistance = timeStretch * tempoEvent.toSeconds(tickDistance);\n double timeOffset = timePositions.get(idx) + timeDistance;\n return timeOffset;\n } else {\n //in this case above calculation should yield a correct result but we can do simpler:\n double tickDistance = tick - startTick;\n double timeOffset = timeStretch * tempoEvent.toSeconds(tickDistance);\n return timeOffset;\n }\n\n }", "void incrementTick();", "public static XWilkinson forSeconds(double eps) {\n return XWilkinson.of(new double[]{1, 2, 3, 5, 10, 15, 20, 30}, 60, eps);\n }", "public void Resample(double value, String units) {\n\n // dictionary with number of seconds per sampling unit\n Map<String, Double> units_dict = new HashMap<>();\n units_dict.put(\"week\", 7.0 * 24 * 60 * 60 * 60);\n units_dict.put(\"day\", 1.0 * 24 * 60 * 60 * 60);\n units_dict.put(\"hour\", 1.0 * 60 * 60);\n units_dict.put(\"minute\", 60.0);\n units_dict.put(\"second\", 1.0);\n\n int m = index.values.length;\n Double[] xnow = index.convert_to_seconds(); // get the index times in seconds to be able to resample\n\n // compute the new times array\n Double span = units_dict.get(units) * value; // get the selected time interval to resample\n int n = (int) Math.floor((xnow[m - 1] - xnow[0]) / span); //number of intervals\n Double[] xnew = new Double[n]; // new array of times\n Date[] new_dates = new Date[n];\n xnew[0] = Math.floor(xnow[0] / span) * span;\n for (int j = 1; j < n; j++) {\n xnew[j] = xnew[j - 1] + span;\n new_dates[j] = new Date((long) (xnew[j] * 1000));\n }\n // create the coefficients matrix A\n double T = 1.0 / n; // period\n Double[][] A = new Double[m][n];\n\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n A[i][j] = sinc((xnow[i] - xnew[j]) / T);\n\n Double[] ynew = new Double[n];\n }", "@Test\n public void assertTaxBracketBoundariesWithPrecisions() {\n String minimumSalaryString = \"60000.555555555555555555555555555555555555555555555555555555555555\";\n String maximumSalaryString = \"130000.555555555555555555555555555555555555555555555555555555555555\";\n\n BigDecimal minimumSalary = new BigDecimal(minimumSalaryString).setScale(DEFAULT_DECIMAL_SCALE, DEFAULT_ROUNDING);\n BigDecimal maximumSalary = new BigDecimal(maximumSalaryString).setScale(DEFAULT_DECIMAL_SCALE, DEFAULT_ROUNDING);\n TaxBracket sixtyTo130k = createTaxBracket(minimumSalary, maximumSalary);\n validateSalaryFitsWithinBracket(sixtyTo130k, minimumSalary);\n validateSalaryFitsWithinBracket(sixtyTo130k, maximumSalary);\n // Since we expect the rounding to make the last digit of the decimal a \"6\", we can change scales directly\n // Increase the minimum salary scale\n validateSalaryFitsWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(minimumSalary.toString(), \"6\") + \"61\"));\n // Same for the max salary\n validateSalaryFitsWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(maximumSalary.toString(), \"6\" + \"59\")));\n // Now do the reverse, reduce the scale so that it falls outside the range\n validateSalaryDoesNotFitWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(minimumSalary.toString(), \"6\") + \"59\"));\n validateSalaryDoesNotFitWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(maximumSalary.toString(), \"6\") + \"61\"));\n }", "@JSProperty(\"tickPosition\")\n void setTickPosition(TickPosition value);", "public static Attribute eotBinsAttribute() {\n\t\tFastVector binnedTimesToEOT = new FastVector(EOT_BINS.length);\n\t\tfor (int i = 0; i < EOT_BINS.length; i++) {\n\t\t\tbinnedTimesToEOT.addElement(EOT_BINS[i]);\n\t\t}\n\t\tAttribute a = new Attribute(\"binnedTimeToEOT\", binnedTimesToEOT);\n\t\treturn a;\n\t}", "public void setTickMarksDrawable(Element drawable) {\n LogUtil.info(TAG, \"setTickMarksDrawable(Element drawable) begin\");\n this.mTickMarksDrawable = drawable;\n mTickRadius = Math.min(THUMB_MAX_WIDTH, mTickMarksSize) / 2.0f;\n mCustomDrawableMaxHeight = Math.max(mThumbTouchRadius, mTickRadius) * 2.0f;\n initTickMarksPixelMap();\n invalidate();\n LogUtil.info(TAG, \"setTickMarksDrawable(Element drawable) end\");\n }", "public static NumberAxis calcAxisY() {\n double minY = Math.round(\n Collections.min(GlobalVariables.systemCorridor.getDistances()) / 100) * 100 - 100;\n double maxY = Math.round(\n Collections.max(GlobalVariables.systemCorridor.getDistances()) / 100) * 100 + 100;\n double scaleY = Math.round(0.1 * (maxY - minY) / 100) * 100;\n NumberAxis axis = new NumberAxis(\"Distance (ft)\", minY, maxY, scaleY);\n axis.setTickLabelFont(Font.font(16));\n axis.setMinorTickCount(4);\n return axis;\n }", "public int getTicks()\r\n\t{\r\n\t\treturn m_ticks;\r\n\t}", "public int getTicks() {\n\t\treturn 0;\n\t}", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 9}, optParamIndex = {2, 3, 4, 5, 6, 7, 8}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=9)\n com.exceljava.com4j.excel.Trendline add(\n @Optional @DefaultValue(\"-4132\") com.exceljava.com4j.excel.XlTrendlineType type,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object order);", "public static TimeAxis<Unit, CopticCalendar> axis() {\n\n return ENGINE;\n\n }", "private void emitTicks() {\n if (gameModel == null || lastTickTime == 0) return; // the game is paused\n\n while (lastTickTime < System.currentTimeMillis()) {\n lastTickTime += 1000f / gameModel.ticksPerSecond();\n ;\n for (Entity go : gameModel.entities) go.tick();\n }\n }", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 9}, optParamIndex = {4, 5, 6, 7, 8}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=9)\n com.exceljava.com4j.excel.Trendline add(\n @Optional @DefaultValue(\"-4132\") com.exceljava.com4j.excel.XlTrendlineType type,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object order,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object period,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object forward);", "public TimedTrigger ticksBeforeStartLooping(int ticksBeforeStartLooping) {\n this.ticksBeforeStartLooping = ticksBeforeStartLooping;\n return this;\n }", "Integer networkTickRate();", "@Test\n public void test01() throws Throwable {\n SimpleTimeZone simpleTimeZone0 = (SimpleTimeZone)SegmentedTimeline.NO_DST_TIME_ZONE;\n DateAxis dateAxis0 = new DateAxis(\"\", (TimeZone) simpleTimeZone0);\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) dateAxis0);\n ZoneInfo zoneInfo0 = (ZoneInfo)TimeZone.getDefault();\n JFreeChart jFreeChart0 = new JFreeChart(\"The renderer has changed and I don't know what to do!\", (Plot) combinedRangeCategoryPlot0);\n ChartPanel chartPanel0 = new ChartPanel(jFreeChart0, (-1747), (-1747), 952, 952, 0, 855, true, false, false, true, true, false);\n ChartRenderingInfo chartRenderingInfo0 = chartPanel0.getChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n Point2D.Double point2D_Double0 = new Point2D.Double();\n combinedRangeCategoryPlot0.zoomDomainAxes(0.0, plotRenderingInfo0, (Point2D) point2D_Double0, false);\n double double0 = point2D_Double0.getX();\n Rectangle2D.Double rectangle2D_Double0 = new Rectangle2D.Double(0.0, 1794.185816547, (double) 0, (double) (-1747));\n double double1 = rectangle2D_Double0.x;\n DefaultPolarItemRenderer defaultPolarItemRenderer0 = new DefaultPolarItemRenderer();\n Color color0 = (Color)defaultPolarItemRenderer0.getBaseOutlinePaint();\n BasicStroke basicStroke0 = (BasicStroke)WaferMapPlot.DEFAULT_GRIDLINE_STROKE;\n CategoryMarker categoryMarker0 = new CategoryMarker((Comparable) 0.0, (Paint) color0, (Stroke) basicStroke0);\n Layer layer0 = Layer.BACKGROUND;\n combinedRangeCategoryPlot0.addRangeMarker((Marker) categoryMarker0, layer0);\n combinedRangeCategoryPlot0.setDomainGridlinePaint(color0);\n double double2 = rectangle2D_Double0.getWidth();\n }", "public abstract int getTicks();", "public TimeMap2() {\n map = new HashMap<>();\n }", "public double[] getTicks(int levels) {\n double step = Short.MAX_VALUE/(double)levels;\n\n double[] retdata = new double[levels];\n\n for (int i=0; i<levels; i++) {\n short v = (short)((i+1)*step);\n retdata[i] = calculate(new short[]{v});\n\n }\n return retdata;\n }", "public DateTickUnit getTickUnit() { return this.tickUnit; }", "private void initializeAggTradesCache(String symbol) {\r\n\r\n\t\tBinanceApiClientFactory factory = BinanceApiClientFactory.newInstance();\r\n\t\tBinanceApiRestClient client = factory.newRestClient();\r\n\t\tList<AggTrade> aggTrades = client.getAggTrades(symbol.toUpperCase());\r\n\t\tthis.aggTradesCache = new HashMap<>();\r\n\r\n\t\t/*\r\n\t\t * List<Tick> ticks = null; Long tickIndex = 0L; List<AggTrade> listAggTrade =\r\n\t\t * new CopyOnWriteArrayList<AggTrade>(); this.aggTradeTicksCashe = new\r\n\t\t * HashMap<Long, List<AggTrade>>();\r\n\t\t * \r\n\t\t *\r\n\t\t * ZonedDateTime tickStartTime = ZonedDateTime.now(ZoneId.systemDefault());\r\n\t\t * ZonedDateTime tickEndTime = ZonedDateTime.now(ZoneId.systemDefault());\r\n\t\t */\r\n\r\n\t\t// Check server time\r\n\t\ttradeSessionStartTime = client.getServerTime();\r\n\r\n\t\tList<Integer> xData = new CopyOnWriteArrayList<Integer>();\r\n\t\tList<Double> yData = new CopyOnWriteArrayList<Double>();\r\n\t\tList<Double> errorBars = new CopyOnWriteArrayList<Double>();\r\n\r\n\t\tlong startTimestamp = tradeSessionStartTime;\r\n\t\tlong endTimestamp = tradeSessionStartTime;\r\n\t\tfor (AggTrade aggTrade : aggTrades) {\r\n\t\t\tLong currentTimestamp = aggTrade.getTradeTime();\r\n\t\t\tif (currentTimestamp < startTimestamp)\r\n\t\t\t\tstartTimestamp = currentTimestamp;\r\n\t\t\tif (currentTimestamp > endTimestamp)\r\n\t\t\t\tendTimestamp = currentTimestamp;\r\n\t\t}\r\n\r\n\t\tfor (AggTrade aggTrade : aggTrades) {\r\n\r\n\t\t\t/*\r\n\t\t\t * ZonedDateTime tradeTimestamp =\r\n\t\t\t * ZonedDateTime.ofInstant(Instant.ofEpochMilli(aggTrade.getTradeTime()),\r\n\t\t\t * ZoneId.systemDefault()); if ( tradeTimestamp.isBefore(tickStartTime))\r\n\t\t\t * tickStartTime = tradeTimestamp; if (!tradeTimestamp.isBefore(tickEndTime))\r\n\t\t\t * tickEndTime = tradeTimestamp;\r\n\t\t\t * \r\n\t\t\t * if (!tradeTimestamp.isBefore(tickEndTime)) { // new tick if ( (tickIndex >0)\r\n\t\t\t * && (listAggTrade.size() > 0)) aggTradeTicksCashe.put( tickIndex, listAggTrade\r\n\t\t\t * ); tickEndTime = tradeTimestamp.plus(tickDuration); listAggTrade = new\r\n\t\t\t * CopyOnWriteArrayList<AggTrade>(); tickIndex++; } listAggTrade.add(aggTrade);\r\n\t\t\t */\r\n\r\n\t\t\tLong currentTimestamp = aggTrade.getTradeTime();\r\n\t\t\tDouble price = new Double(aggTrade.getPrice());\r\n\t\t\tDouble quantity = new Double(aggTrade.getQuantity());\r\n\t\t\tDouble amount = price * quantity;\r\n\t\t\txData.add((int) (50 * (currentTimestamp - startTimestamp) / (endTimestamp - startTimestamp)));\r\n\t\t\tyData.add(amount);\r\n\t\t\terrorBars.add(0.0);\r\n\t\t\taggTradesCache.put(aggTrade.getAggregatedTradeId(), aggTrade);\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * realTimeChart = new MercuryRealTimeChart(xData,yData, errorBars, response ->\r\n\t\t * {\r\n\t\t * \r\n\t\t * } );\r\n\t\t */\r\n\t}", "@Override\n public void adjustStartEventSubscriptions(ProcessDefinitionEntity newLatestProcessDefinition, ProcessDefinitionEntity oldLatestProcessDefinition) {\n super.adjustStartEventSubscriptions(newLatestProcessDefinition, oldLatestProcessDefinition);\n\n LOG.debug(\"Adding start event simulation timers.\");\n removeObsoleteStartEventSimulationJobs(newLatestProcessDefinition);\n addStartEventSimulationJobs(newLatestProcessDefinition);\n }", "public void setTickPeriod(TimeSpan tickperiod)\r\n\t{\r\n\t\ttickPeriod = tickperiod.Ticks();\r\n\t}", "private void doNormalization(int minute, HashMap<Integer, Float> map) {\n\t\tFloat currentValue = map.get(minute);\n\t\tif (currentValue < BLOOD_SUGAR_START) {\n\t\t\tFloat newValue = currentValue + NORMALIZATION_RATE;\n\t\t\tif (newValue > BLOOD_SUGAR_START) newValue = BLOOD_SUGAR_START;\n\t\t\tmap.put(minute, newValue);\n\t\t} else if (currentValue > BLOOD_SUGAR_START) {\n\t\t\tFloat newValue = currentValue - NORMALIZATION_RATE;\n\t\t\tif (newValue < BLOOD_SUGAR_START) newValue = BLOOD_SUGAR_START;\n\t\t\tmap.put(minute, newValue);\n\t\t}\n\t}", "public TimeMap() {\n hashMap = new HashMap<String, List<Data>>();\n }", "@Test\n public void test77() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) null);\n combinedDomainCategoryPlot0.setDrawSharedDomainAxis(false);\n DecimalFormat decimalFormat0 = (DecimalFormat)NumberFormat.getCurrencyInstance();\n NumberTickUnit numberTickUnit0 = new NumberTickUnit((-28.552), (NumberFormat) decimalFormat0);\n Color color0 = (Color)Axis.DEFAULT_TICK_MARK_PAINT;\n boolean boolean0 = numberTickUnit0.equals((Object) null);\n TimeTableXYDataset timeTableXYDataset0 = new TimeTableXYDataset();\n RectangleEdge rectangleEdge0 = combinedDomainCategoryPlot0.getDomainAxisEdge();\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis(0.0, 0.0);\n XYAreaRenderer2 xYAreaRenderer2_0 = new XYAreaRenderer2();\n XYPlot xYPlot0 = new XYPlot((XYDataset) timeTableXYDataset0, (ValueAxis) cyclicNumberAxis0, (ValueAxis) cyclicNumberAxis0, (XYItemRenderer) xYAreaRenderer2_0);\n BasicStroke basicStroke0 = (BasicStroke)xYPlot0.getRangeZeroBaselineStroke();\n CategoryMarker categoryMarker0 = new CategoryMarker((Comparable) numberTickUnit0, (Paint) color0, (Stroke) basicStroke0, (Paint) color0, cyclicNumberAxis0.DEFAULT_ADVANCE_LINE_STROKE, 0.85F);\n combinedDomainCategoryPlot0.addRangeMarker((Marker) categoryMarker0);\n int int0 = combinedDomainCategoryPlot0.getRangeAxisIndex(cyclicNumberAxis0);\n Layer layer0 = Layer.BACKGROUND;\n combinedDomainCategoryPlot0.addDomainMarker(0, categoryMarker0, layer0);\n combinedDomainCategoryPlot0.setRenderer((CategoryItemRenderer) null);\n boolean boolean1 = combinedDomainCategoryPlot0.isRangeZoomable();\n Point2D.Double point2D_Double0 = new Point2D.Double((-862.0), 1.0E-6);\n point2D_Double0.y = (double) 0;\n AxisLocation axisLocation0 = combinedDomainCategoryPlot0.getDomainAxisLocation((-2040));\n combinedDomainCategoryPlot0.setDomainAxisLocation(axisLocation0);\n }", "public void setTickFreq(long tickFreq) {\n\t\tthis.tickFreq = tickFreq;\n\t}", "private void initialiseTimers() {\r\n for (Map.Entry<String, Feed> entry : feeds.entrySet()) {\r\n String key = entry.getKey();\r\n Timer timer = new Timer();\r\n timer.schedule(new TimerTask() {\r\n @Override\r\n public void run() {\r\n feeds.remove(key);\r\n timers.remove(key);\r\n }\r\n }, 15 * 1000, 15 * 1000);\r\n timers.put(key, timer);\r\n }\r\n }", "@Test\n public void testPrediction1() throws Exception {\n\n final CalUtils.InstantGenerator instantGenerator =\n new LocalTimeMinutes(5);\n \n final double coreDailyVols[][] = new double[][] {\n new double[] {55219 , 262256 , 202661 , 218359 , 178244 , 99610 , 92348 , 124795 , 214370 , 153854 , 204116 , 173501 , 85390 , 156835 , 108070 , 23755 , 118573 , 70117 , 55768 , 52643 , 71485 , 407645 , 442909 , 129109 , 188896 , 79590 , 422121 , 290067 , 227955 , 69257 , 41634 , 446002 , 579188 , 86237 , 1606794 , 83676 , 166393 , 84987 , 875905 , 117013 , 399084 , 116190 , 149507 , 207221 , 60857 , 155612 , 448006 , 198637 , 67695 , 65423 , 180038 , 88774 , 80273 , 86065 , 85231 , 38867 , 29330 , 116353 , 26887 , 34170 , 102518 , 72246 , 21274 , 70752 , 37912 , 49367 , 100472 , 49461 , 41735 , 45795 , 36578 , 311945 , 249039 , 70487 , 121906 , 136424 , 195136 , 166308 , 331734 , 343180 , 419616 , 104613 , 1354058 , 162678 , 141067 , 147039 , 149115 , 271162 , 543989 , 184421 , 340679 , 201939 , 293860 , 171035 , 263964 , 260198 , 428087 , 565126 , 385874 , 547890 , 384416 , 256696 , 0 , 4738359},\n new double[] {1298630 , 678084 , 488607 , 224766 , 434263 , 356933 , 576571 , 219236 , 252805 , 414776 , 166828 , 174665 , 146281 , 110944 , 145234 , 179739 , 253111 , 175685 , 64925 , 216682 , 494507 , 100205 , 67371 , 101019 , 158026 , 316281 , 334067 , 954850 , 115547 , 163051 , 130303 , 107600 , 1407996 , 90357 , 110452 , 451866 , 238004 , 3096215 , 2672803 , 190170 , 111282 , 107135 , 453389 , 60821 , 98292 , 1310864 , 1132267 , 241907 , 89915 , 175676 , 61621 , 521553 , 212388 , 288651 , 193578 , 272161 , 256777 , 236382 , 802159 , 230248 , 387068 , 160647 , 106999 , 391933 , 465080 , 374577 , 340378 , 330708 , 416320 , 200347 , 251986 , 336664 , 311970 , 600559 , 508011 , 922379 , 311581 , 352459 , 508727 , 159316 , 1355635 , 246541 , 389672 , 805957 , 370754 , 382556 , 316971 , 564228 , 437166 , 277733 , 1284505 , 1763095 , 169661 , 280682 , 969102 , 540315 , 451895 , 308036 , 715130 , 642966 , 981563 , 900778 , 0 , 7155528},\n new double[] {679280 , 229518 , 346536 , 347215 , 316025 , 313890 , 235844 , 199995 , 1920617 , 129356 , 172084 , 207860 , 317578 , 10369008 , 480990 , 1403537 , 1021730 , 156125 , 94833 , 366987 , 145687 , 322957 , 328120 , 66657 , 176001 , 271003 , 133121 , 558624 , 264638 , 638663 , 165080 , 129439 , 5126344 , 5438632 , 248806 , 250616 , 112716 , 54523 , 198097 , 67772 , 1414565 , 244509 , 246205 , 151540 , 98584 , 51217 , 94193 , 111763 , 104726 , 45880 , 64242 , 78893 , 60706 , 48117 , 133085 , 101941 , 5103803 , 5084823 , 168230 , 75537 , 815036 , 73409 , 422412 , 437127 , 115802 , 326536 , 54707 , 81759 , 94420 , 208637 , 50361 , 1458556 , 84257 , 129114 , 54632 , 105873 , 57165 , 77578 , 233302 , 195560 , 134194 , 180928 , 140433 , 123154 , 221422 , 339866 , 1343886 , 114699 , 170052 , 150679 , 181731 , 160943 , 192590 , 125556 , 132656 , 154740 , 320932 , 140929 , 117889 , 381656 , 393635 , 306177 , 0 , 21629250},\n new double[] {526909 , 167180 , 199570 , 149154 , 142141 , 320881 , 223750 , 102275 , 258400 , 202197 , 120202 , 93404 , 178631 , 106401 , 346186 , 231729 , 163656 , 1622531 , 125689 , 2656587 , 5336032 , 2385985 , 335692 , 86118 , 130551 , 99047 , 81695 , 98846 , 238413 , 4831684 , 293262 , 124652 , 106642 , 112048 , 14284646 , 111209 , 2204635 , 128940 , 83395 , 134816 , 116320 , 65412 , 165020 , 126511 , 92217 , 111751 , 47320 , 82219 , 19044177 , 70827 , 21676 , 211214 , 103108 , 22771 , 61629 , 4816563 , 63806 , 33989 , 130104 , 146897 , 15046441 , 44977 , 40889 , 54584 , 54591 , 76634 , 238536 , 68583 , 110591 , 75012 , 503760 , 209479 , 217929 , 86397 , 102284 , 81878 , 252785 , 135884 , 129149 , 112760 , 266851 , 110863 , 67866 , 55205 , 150165 , 699438 , 184450 , 270270 , 4270036 , 345303 , 895116 , 217142 , 145398 , 301231 , 10260595 , 136317 , 442910 , 371357 , 189023 , 538928 , 438973 , 926728 , 9137 , 8879481},\n new double[] {1318228 , 1391326 , 574558 , 441739 , 719144 , 522626 , 404351 , 383602 , 490710 , 284952 , 2984474 , 216339 , 10220195 , 247067 , 166223 , 224310 , 10181837 , 126161 , 9764418 , 692337 , 25907353 , 1518741 , 1179929 , 120730 , 10173292 , 290045 , 19824327 , 402527 , 277859 , 3116841 , 7164061 , 332021 , 10560006 , 2334129 , 121753 , 200177 , 246402 , 10106648 , 1137272 , 2084673 , 461849 , 125108 , 465907 , 156972 , 139083 , 127389 , 237263 , 311691 , 156536 , 155322 , 133368 , 329715 , 256088 , 116835 , 5192615 , 823762 , 183836 , 1110239 , 2414836 , 385072 , 599637 , 387285 , 291580 , 2796924 , 12977051 , 338582 , 884415 , 525622 , 322587 , 223348 , 668858 , 143039 , 627590 , 239797 , 232788 , 256503 , 209425 , 375474 , 558106 , 290991 , 1176648 , 286550 , 149539 , 297435 , 602136 , 152733 , 212363 , 178992 , 179644 , 295428 , 933636 , 349405 , 660749 , 226061 , 868852 , 318539 , 469303 , 538061 , 273643 , 444084 , 347730 , 825808 , 12011 , 7792372}};\n\n final SimpleDateFormat dateBuilder = new SimpleDateFormat(\"yyyy-MM-dd\");\n final Calendar moments[] = new Calendar[] { Calendar.getInstance(), \n Calendar.getInstance(), Calendar.getInstance(), \n Calendar.getInstance(), Calendar.getInstance(),\n Calendar.getInstance() };\n\n moments[0].setTime(dateBuilder.parse(\"2011-10-26\"));\n moments[1].setTime(dateBuilder.parse(\"2011-10-27\"));\n moments[2].setTime(dateBuilder.parse(\"2011-10-28\"));\n moments[3].setTime(dateBuilder.parse(\"2011-10-30\"));\n moments[4].setTime(dateBuilder.parse(\"2011-11-01\"));\n moments[5].setTime(dateBuilder.parse(\"2011-11-02\"));\n\n // Nomralize data to sum 100 (i.e., have an expectance of 100/104)\n for(int i=0; i<5; i++) {\n double sum = 0;\n for(int j=0; j<104; j++) sum += coreDailyVols[i][j];\n for(int j=0; j<104; j++) {\n coreDailyVols[i][j] = coreDailyVols[i][j]*100 / sum;\n }\n }\n\n final double[][] synthesizedDailyVols = new double[\n coreDailyVols.length][instantGenerator.maxInstantValue()];\n final Calendar openTime = Calendar.getInstance();\n final int n = 9*60 / 5;\n final int m = n + coreDailyVols[0].length;\n for(int i=0; i<5; i++) {\n for(int j=0; j<n; j++) {\n synthesizedDailyVols[i][j] = Double.NaN;\n }\n for(int j=0; j<coreDailyVols[i].length; j++) {\n synthesizedDailyVols[i][j+n] = coreDailyVols[i][j];\n }\n for(int j=m; j<instantGenerator.maxInstantValue(); j++) {\n synthesizedDailyVols[i][j] = Double.NaN;\n }\n }\n\n\n final Predictor predictor = new PCAPredictorTransposed(\n instantGenerator, 5);\n for(int i=0; i<5; i++) {\n predictor.learnVector(moments[i], synthesizedDailyVols[i]);\n }\n final double prediction[] = predictor.predictVector(moments[5]);\n final double coreExpectedPrediction[] = new double[] {\n0.21383323, -0.08665493, -0.28527934, -0.45293966, -0.35525111, -0.49117788,\n-0.38114565, -0.60141152, -0.09029406, -0.44815719, -0.45152723, -0.58079146,\n-0.29110153, 1.54262599, -0.59900211, -0.48107804, -0.03280398, -0.59369964,\n-0.44886852, -0.43868587, 0.88745208, -0.10900099, -0.26251035, -0.71557572,\n-0.20051598, -0.57674404, 0.53793693, 0.15857465, -0.53212067, -0.13529962,\n-0.49171709, -0.32334222, 2.16101856, 0.46824882, 2.13337330, -0.48802957,\n-0.40084079, 1.62077396, 1.93080019, -0.59114756, -0.09429057, -0.68952951,\n-0.39819841, -0.63019599, -0.78762027, 0.12458423, 0.34847712, -0.52481068,\n0.69730449, -0.74290105, -0.68866588, -0.45964670, -0.69174165, -0.64825389,\n-0.49908622, -0.30049621, 0.35726449, 0.47210113, -0.25058065, -0.72112704,\n0.79345044, -0.73245678, -0.75581875, -0.40885896, -0.08033429, -0.56030291,\n-0.54967743, -0.63571829, -0.58889882, -0.71099478, -0.67055922, -0.03850658,\n-0.40339282, -0.43003588, -0.44813762, -0.14347007, -0.48441216, -0.48851502,\n-0.15427010, -0.39484463, 0.52701151, -0.61335693, 0.89776479, -0.18821502,\n-0.46457371, -0.39850394, -0.26234640, -0.21535441, 0.33669589, -0.48879971,\n0.43892192, 0.52101182, -0.42851659, -0.51364225, 0.85831207, -0.24052028,\n-0.04192086, -0.02287821, 0.01522206, 0.24307671, 0.27369478, 0.11058009,\n-0.95575786, 14.90733910 };\n final double synthesizedExpectedPrediction[] = new double[\n instantGenerator.maxInstantValue()];\n for(int j=0; j<n; j++) {\n synthesizedExpectedPrediction[j] = Double.NaN;\n }\n for(int j=0; j<coreExpectedPrediction.length; j++) {\n synthesizedExpectedPrediction[j+n] = coreExpectedPrediction[j];\n }\n for(int j=m; j<instantGenerator.maxInstantValue(); j++) {\n synthesizedExpectedPrediction[j] = Double.NaN;\n }\n\n assertEquals(prediction.length, synthesizedExpectedPrediction.length);\n\n for(int i=0; i<prediction.length; i++) {\n assertEquals(prediction[i], synthesizedExpectedPrediction[i], \n 0.0001d);\n }\n System.out.println(\"Ok\");\n }", "public void setTimeScaleTickProvider(TickProvider timeScaleTickProvider) {\n \n }", "public void addTicks(int toAdd)\r\n\t{\r\n\t\tm_ticks += toAdd;\r\n\t}", "@Test\n public void floorToQuarterHour() throws Exception {\n DateTime dt0 = new DateTime(2009,6,24,23,29,30,789,DateTimeZone.UTC);\n\n Assert.assertNull(DateTimeUtil.floorToQuarterHour(null));\n \n // floor to nearest half hour\n DateTime dt1 = DateTimeUtil.floorToQuarterHour(dt0);\n\n Assert.assertEquals(2009, dt1.getYear());\n Assert.assertEquals(6, dt1.getMonthOfYear());\n Assert.assertEquals(24, dt1.getDayOfMonth());\n Assert.assertEquals(23, dt1.getHourOfDay());\n Assert.assertEquals(15, dt1.getMinuteOfHour());\n Assert.assertEquals(0, dt1.getSecondOfMinute());\n Assert.assertEquals(0, dt1.getMillisOfSecond());\n Assert.assertEquals(DateTimeZone.UTC, dt1.getZone());\n\n DateTime dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,0,0,0));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,1,23,456));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,30,12,56));\n Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,59,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,55,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,46,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n }", "public void normalizeWeekends(int weekDay) {\r\n\t\tvalidateInput(weekDay, 0);\r\n\t\tint[] weekends = {0, 6};\r\n\t\tfor(int i : weekends)\r\n\t\t\tif( i != weekDay) {\r\n\t\t\t\tfor(int j = MIN_SEGMENT; j <= MAX_SEGMENT; j++) {\r\n\t\t\t\t\tschedule[i][j] = schedule[weekDay][j];\r\n\t\t\t\t\tnotifyListeners(i, j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}", "@Override\r\n\tpublic void precalc()\r\n\t{\n\t\tthis.axisLine = new Line2d( (float)this.config.getMinValue(), 0,\r\n\t\t\t\t(float)this.config.getMaxValue(), 0 );\r\n\r\n\t\t// Transform to (0,0) in data units\r\n\t\tthis.transform = TransformUtilities.translateMatrix( -this.config.getMinValue(), 0 );\r\n\r\n\t\t// Scale to pixels\r\n\t\tthis.currentScale = this.axisLength / (this.config.getMaxValue() - this.config.getMinValue());\r\n\t\tthis.transform = TransformUtilities.scaleMatrix( (float)this.currentScale, 1 )\r\n\t\t\t\t.times(this.transform);\r\n\r\n\t\t// Rotate to the preferred orientation\r\n\t\tthis.transform = TransformUtilities.rotationMatrix( this.config.getOrientation()[0] )\r\n\t\t\t\t.times(this.transform);\r\n\r\n\t\t// Translate to the preferred position\r\n\t\tthis.transform = TransformUtilities.translateMatrix(\r\n\t\t\t\tthis.config.getLocation()[0], this.config.getLocation()[1] )\r\n\t\t\t\t.times( this.transform );\r\n\r\n\t\t// Transform the axis\r\n\t\tthis.axisLine = this.axisLine.transform( this.transform );\r\n\t}", "@Override\n protected Interval adjustInterval(Interval i) {\n RangeDivision iInfo = RangeDivision.getRangeDivision(i, TimeLineController.getJodaTimeZone());\n final long lowerBound = iInfo.getLowerBound();\n final long upperBound = iInfo.getUpperBound();\n final DateTime lowerDate = new DateTime(lowerBound, TimeLineController.getJodaTimeZone());\n final DateTime upperDate = new DateTime(upperBound, TimeLineController.getJodaTimeZone());\n //add extra block to end that gets cut of by conversion from string/category.\n return new Interval(lowerDate, upperDate.plus(countsChart.rangeInfo.getPeriodSize().toUnitPeriod()));\n }", "protected void autoAdjustRange() {\n/* 1284 */ Plot plot = getPlot();\n/* */ \n/* 1286 */ if (plot == null) {\n/* */ return;\n/* */ }\n/* */ \n/* 1290 */ if (plot instanceof ValueAxisPlot) {\n/* 1291 */ ValueAxisPlot vap = (ValueAxisPlot)plot;\n/* */ \n/* 1293 */ DateRange dateRange = vap.getDataRange(this);\n/* 1294 */ if (dateRange == null) {\n/* 1295 */ if (this.timeline instanceof SegmentedTimeline) {\n/* */ \n/* */ \n/* */ \n/* 1299 */ DateRange dateRange1 = new DateRange(((SegmentedTimeline)this.timeline).getStartTime(), (((SegmentedTimeline)this.timeline).getStartTime() + 1L));\n/* */ }\n/* */ else {\n/* */ \n/* 1303 */ dateRange = new DateRange();\n/* */ } \n/* */ }\n/* */ \n/* 1307 */ long upper = this.timeline.toTimelineValue(\n/* 1308 */ (long)dateRange.getUpperBound());\n/* */ \n/* 1310 */ long fixedAutoRange = (long)getFixedAutoRange();\n/* 1311 */ if (fixedAutoRange > 0.0D) {\n/* 1312 */ lower = upper - fixedAutoRange;\n/* */ } else {\n/* */ \n/* 1315 */ lower = this.timeline.toTimelineValue((long)dateRange.getLowerBound());\n/* 1316 */ double range = (upper - lower);\n/* 1317 */ long minRange = (long)getAutoRangeMinimumSize();\n/* 1318 */ if (range < minRange) {\n/* 1319 */ long expand = (long)(minRange - range) / 2L;\n/* 1320 */ upper += expand;\n/* 1321 */ lower -= expand;\n/* */ } \n/* 1323 */ upper += (long)(range * getUpperMargin());\n/* 1324 */ lower -= (long)(range * getLowerMargin());\n/* */ } \n/* */ \n/* 1327 */ upper = this.timeline.toMillisecond(upper);\n/* 1328 */ long lower = this.timeline.toMillisecond(lower);\n/* 1329 */ DateRange dr = new DateRange(new Date(lower), new Date(upper));\n/* 1330 */ setRange(dr, false, false);\n/* */ } \n/* */ }" ]
[ "0.57477695", "0.5144445", "0.49747938", "0.47778818", "0.4767009", "0.45286164", "0.45080125", "0.44562674", "0.44293725", "0.432355", "0.4322619", "0.42602357", "0.425356", "0.42533708", "0.42339227", "0.42011046", "0.4197036", "0.41966504", "0.41893512", "0.41858035", "0.41658184", "0.41431236", "0.409024", "0.40824687", "0.4074773", "0.40593994", "0.40457308", "0.40244558", "0.40186143", "0.4006009", "0.40009147", "0.39921257", "0.39828226", "0.39704973", "0.39697155", "0.3956352", "0.39403617", "0.39189118", "0.38979706", "0.3876817", "0.3859719", "0.38590702", "0.3851798", "0.385116", "0.38474637", "0.38090134", "0.3803412", "0.38020575", "0.3796092", "0.37859744", "0.37843713", "0.3777499", "0.37692818", "0.37585187", "0.37533742", "0.37491122", "0.3748201", "0.37399864", "0.37383118", "0.3737306", "0.37369728", "0.37299964", "0.37276706", "0.3726259", "0.3717683", "0.37161973", "0.37156898", "0.37062165", "0.3703091", "0.37012053", "0.36828622", "0.36814278", "0.36713928", "0.36626738", "0.36589754", "0.36575413", "0.3654888", "0.36518872", "0.3649519", "0.36483106", "0.36451653", "0.3636341", "0.36310002", "0.36296177", "0.36290604", "0.36284608", "0.36176908", "0.36098632", "0.36092243", "0.36067727", "0.36063877", "0.36020464", "0.35960987", "0.35922706", "0.3588798", "0.35883954", "0.35869876", "0.35863847", "0.35863808", "0.35842365" ]
0.69856894
0
Only after logs have been read?
private void connectToABBOE() throws IOException, IllegalArgumentsException { Socket socket = Biomine3000Utils.connectToServer(args); this.connection = new ABBOEConnection(CLIENT_PARAMS, socket, log); this.connection.init(new ObjectHandler()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void completeLogs() throws IOException;", "void completeCurrentLog() throws IOException;", "private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}", "public void startOnNewTread() {\n stop();\n\n mReadLogsHandler = new ReadLogsHandler();\n\n mReadLogThread = new ReadLogsThread();\n mReadLogThread.start();\n }", "abstract void initiateLog();", "void initializeLogging();", "private void logAllMessages() {\r\n HistoricalMessage message;\r\n SessionProvider provider = SessionProvider.createSystemProvider();\r\n while (!logQueue.isEmpty()) {\r\n message = logQueue.poll();\r\n if (message != null) {\r\n this.addHistoricalMessage(message, provider);\r\n }\r\n }\r\n provider.close();\r\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tlogger.log();\n\t}", "public void startLog()\n\t{\n\t\tint lastRow = m_records.size() - 1;\n\t\tif(lastRow >= 0)\n\t\t{\n\t\t\tm_records.clear();\n\t\t\tfireTableRowsDeleted(0, lastRow);\n\t\t}\n\t}", "public interface LogListener {\n void onReadLogComplete();\n}", "void setupFileLogging();", "public void fulshLog() {\n\t\tif (logConfigurator!=null) {\n\t\t\tlogConfigurator.setImmediateFlush(true);\n\t\t\tlogConfigurator.setImmediateFlush(false);\n\t\t\tlogConfigurator.configure();\n\t\t}\n\t}", "LogTailer startTailing();", "void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}", "public void cleanupLogs() {\n logger.debug(\"Beginning log cleanup...\");\n int total = 0;\n long startMs = time.milliseconds();\n for (Log log : allLogs()) {\n if (log.config.dedupe)\n continue;\n\n logger.debug(\"Garbage collecting '{}'\", log.name());\n total += cleanupExpiredSegments(log) + cleanupSegmentsToMaintainSize(log);\n }\n logger.debug(\"Log cleanup completed. \" + total + \" files deleted in \" + (time.milliseconds() - startMs) / 1000 + \" seconds\");\n }", "private synchronized void updateLogCount() {\n this.logCount++;\n }", "private void initLog() {\n _logsList = (ListView) findViewById(R.id.lv_log);\n setupLogger();\n }", "private void logToFile() {\n }", "public void process(LogReader.Log log) throws IOException {\n }", "private void repetitiveWork(){\n\t PropertyConfigurator.configure(\"log4j.properties\");\n\t log = Logger.getLogger(BackupRestore.class.getName());\n }", "public void logReadWait()\n {\n try{\n waitLock.lock();\n while(logReadSector != -1){\n \t logReadDone.awaitUninterruptibly();\n }\n return;\n }\n finally{\n waitLock.unlock();\n }\n }", "public LogReader.Log nextLog(BufferedReader dataIS) throws IOException {\r\n\r\n ServletLog log = new ServletLog();\r\n boolean haveLog = false;\r\n\r\n while (true) {\r\n dataIS.mark(20 * 1000); // track where we are\r\n String line = dataIS.readLine();\r\n if (line == null) {\r\n return haveLog ? log : null;\r\n }\r\n // if (count++ < limit) System.out.println(\"\\n\" + line); nTest reqe\r\n\r\n try {\r\n Matcher m = commonPattern.matcher(line);\r\n if (m.matches()) {\r\n if (haveLog) { // have a log, next one matches, proceed\r\n try {\r\n dataIS.reset();\r\n return log;\r\n\r\n } catch (Throwable t) {\r\n System.out.println(\"Cant reset \" + line); \r\n }\r\n }\r\n haveLog = true; // next match will return the current log\r\n\r\n log.date = convertDate( m.group(1));\r\n log.reqTime = parseLong(m.group(2));\r\n log.reqSeq = parseLong(m.group(3));\r\n log.level = m.group(4).intern();\r\n log.where = m.group(5);\r\n\r\n String rest = m.group(6);\r\n if (rest.contains(\"Request Completed\")) {\r\n int pos = rest.indexOf(\"Request Completed\");\r\n Matcher m2 = donePattern.matcher(rest.substring(pos));\r\n if (m2.matches()) {\r\n log.returnCode = parse(m2.group(1));\r\n log.sizeBytes = parseLong(m2.group(2));\r\n log.msecs = parseLong(m2.group(3));\r\n log.isDone = true;\r\n\r\n } else {\r\n System.out.println(\"Cant parse donePattern= \" + rest);\r\n System.out.println(\" line= \" + line);\r\n log.addExtra(rest);\r\n }\r\n\r\n } else if (rest.contains(\"Remote host\")) {\r\n int pos = rest.indexOf(\"Remote host\");\r\n Matcher m2 = startPattern.matcher(rest.substring(pos));\r\n if (m2.matches()) {\r\n log.ip = m2.group(1);\r\n log.verb = m2.group(2).intern();\r\n log.path = EscapeStrings.urlDecode(m2.group(3)); //old URLDecoder.decode(m2.group(3));\r\n if (m2.groupCount() > 4)\r\n log.http = m2.group(4).intern();\r\n log.isStart = true;\r\n\r\n } else {\r\n System.out.println(\"Cant parse startPattern= \" + rest);\r\n System.out.println(\" line= \" + line);\r\n log.addExtra(rest);\r\n }\r\n\r\n } else { // a non-start, non-done log\r\n log.addExtra(rest);\r\n }\r\n\r\n } else { // the true extra line\r\n //System.out.println(\"No match on \" + line);\r\n log.addExtra(line);\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Cant parse \" + line);\r\n log.addExtra(line);\r\n }\r\n }\r\n\r\n }", "public boolean hasLog() {\r\n\t\treturn hasLog;\r\n\t}", "public void recordLog(){\r\n\t\tthis.finishLog(resourceFiles.getString(\"PathHepparIITestDirectory\") + \"/\" + TEST_FILE_NAME); \r\n\t}", "@Override\n public void logs() {\n \n }", "public void beginLogging() {\n\t\ttry {\n\t\t\tserverSocket.setSoTimeout(0);\n\t\t} catch(SocketException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"Beginning logging...\");\t\t\n\n\t\twhile(keepRunning) {\n\n\t\t\ttry {\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\n\t\t\t\tSystem.out.println(\"Accepted a client for a NetworkDatum log!\");\n\t\t\t\t\n\t\t\t\tObjectInputStream inputData = new ObjectInputStream(clientSocket.getInputStream());\n\n\t\t\t\tSystem.out.println(\"Trying to add NetworkDatum to our list...\");\n\n\t\t\t\ttry {\n\t\t\t\t\tNetworkDatum nd = (NetworkDatum) inputData.readObject();\n\t\t\t\t\tnetworkLog.add(nd);\n\n\t\t\t\t\tSystem.out.println(\"NetworkDatum added from \" + nd.username + \" at playback time: \" + nd.time);\n\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t} catch(IOException e) {\n\t\t\t\tnetworkLog.registerError();\n\t\t\t}\n\n\t\t}\n\t}", "public void logStreams() {\n logger.debug(\"error stream:\");\n logStream(this.bufferedErrorStream, false);\n logger.debug(\"input stream:\");\n logStream(this.bufferedInputStream, true);\n }", "public synchronized void readLog() {\n MemoryCache instance = MemoryCache.getInstance();\n try (Stream<String> stream = Files.lines(Paths.get(path)).skip(instance.getSkipLine())) {\n stream.forEach(s -> {\n Result result = readEachLine(s);\n instance.putResult(result);\n instance.setSkipLine(instance.getSkipLine() + 1);\n });\n } catch (IOException e) {\n logger.error(\"error during reading file \" + e.getMessage());\n }\n }", "public static void idle(){\n Logger.getGlobal().log(Level.INFO,\" Waiting....\");\n }", "public void finishCapturingLog() {\n if (logFileHandle_ == null) {\n // Either starting the capture failed, or we were erroneously called\n // when capture is not running.\n endCfg_ = getCurrentConfigFile();\n syncEndingConfig();\n return;\n }\n\n final String logFileName = logFileName_;\n\n core_.logMessage(\"Problem Report: End of log capture\");\n try {\n core_.stopSecondaryLogFile(logFileHandle_);\n } catch (Exception ignore) {\n // This is an unlikely error unless there are programming errors.\n // Let's continue and see if we can read the file anyway.\n }\n logFileHandle_ = null;\n logFileName_ = null;\n\n File logFile = new File(logFileName);\n capturedLogContent_ = null;\n try {\n capturedLogContent_ = readTextFile(logFile);\n } catch (IOException ioe) {\n ReportingUtils.logError(ioe);\n }\n if (capturedLogContent_ == null) {\n capturedLogContent_ = \"<<<Failed to read captured log file>>>\";\n }\n if (reportDir_ == null) { // We used an ad-hoc temporary file\n logFile.delete();\n }\n\n endCfg_ = getCurrentConfigFile();\n syncEndingConfig();\n }", "void ReadChatLog()\r\n {\r\n try{\r\n BufferedReader chatLogReader = new BufferedReader(new FileReader(pda_TCPServerMT.chatLog));\r\n while(chatLogReader.ready())\r\n WriteCypherMessage(chatLogReader.readLine());\r\n\r\n chatLogReader.close();\r\n } catch (Exception e){}\r\n }", "private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }", "@Override\n protected void append(LoggingEvent event) {\n if (event.getMessage() instanceof WrsAccessLogEvent) {\n WrsAccessLogEvent wrsLogEvent = (WrsAccessLogEvent) event.getMessage();\n\n try {\n HttpServletRequest request = wrsLogEvent.getRequest();\n if (request != null) {\n String pageHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_PAGEHASH));\n String requestHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_REQUESTHASH));\n String sessionId = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_SESSION_ID));\n String requestUrl = request.getRequestURL().toString();\n String reqQuery = request.getQueryString();\n requestUrl += (reqQuery != null ? \"?\" + reqQuery : \"\");\n if (requestUrl.length()> 2000)\n requestUrl = requestUrl.substring(0, 2000);\n String bindingSetName = wrsLogEvent.getBindingSetName();\n if (bindingSetName != null && bindingSetName.length()> 255)\n bindingSetName = bindingSetName.substring(0, 255);\n String requestXML = wrsLogEvent.getRequestDoc()!=null ? Utils.serializeElement(wrsLogEvent.getRequestDoc()) : null;\n\n // log access\n if(AccessSqlLogger.getInstance().isEnabled()) {\n final AccessSqlLogger.LogRecord recordAccess = new AccessSqlLogger.LogRecord(\n sessionId\n , requestUrl\n , pageHash\n , requestHash\n , bindingSetName\n , requestXML\n , wrsLogEvent.getRowCount()\n , wrsLogEvent.getValueCount()\n , wrsLogEvent.getRsStartTime()\n , wrsLogEvent.getRsEndTime()\n , wrsLogEvent.getWriteDuration()\n , wrsLogEvent.getExecuteDuration()\n );\n AccessSqlLogger.getInstance().process(recordAccess);\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "private void postInitializeLogger( final Logger logger ) {\n final Handler customHandler = getCustomHandler( );\n final Filter customFilter = getCustomFilter( );\n if( ( customHandler == null)\n &&( customFilter == null ) ) {\n return;\n }\n java.security.AccessController.doPrivileged(\n new java.security.PrivilegedAction<Object>() {\n public Object run() {\n if( customHandler != null ) {\n logger.addHandler( customHandler );\n }\n if( customFilter != null ) {\n logger.setFilter( customFilter );\n }\n return null;\n }\n }\n );\n }", "public void finishUp() throws IOException {\n log.close();\r\n }", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "void deleteCompletedLogs() throws IOException;", "@Override\n\tpublic void initLogger() {\n\t\t\n\t}", "@Override\n public void log()\n {\n }", "void updateLocalCallLogs() {\n setIncludePairedCallLogs();\n buildCallLogsList();\n\n notifyCallDataChanged();\n }", "@Override\n public void onLoging() {\n }", "@Override\n public void initializeLogging() {\n // Wraps Android's native log framework.\n LogWrapper logWrapper = new LogWrapper();\n // Using Log, front-end to the logging chain, emulates android.util.log method signatures.\n Log.setLogNode(logWrapper);\n\n // Filter strips out everything except the message text.\n MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();\n logWrapper.setNext(msgFilter);\n\n // On screen logging via a fragment with a TextView.\n //LogFragment logFragment = (LogFragment) getSupportFragmentManager()\n // .findFragmentById(R.id.log_fragment);\n //msgFilter.setNext(logFragment.getLogView());\n\n mLogFragment = (LogFragment) getSupportFragmentManager()\n .findFragmentById(R.id.log_fragment);\n msgFilter.setNext(mLogFragment.getLogView());\n\n Log.i(TAG, \"Ready\");\n }", "@Override\n public void closeLog() {\n \n }", "public void viewLogs() {\n\t}", "public void clearLog() {\n try {\n Runtime.getRuntime().exec(new String[] { \"logcat\", \"-c\" });\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void clear() {\r\n\t\tlock_.lock();\r\n\r\n\t\ttry {\r\n\t\t\tlog_.clear();\r\n\t\t} finally {\r\n\t\t\tlock_.unlock();\r\n\t\t}\r\n\t}", "public void logSensorData () {\n\t}", "@Override\n\tpublic void update() {\n\t\tFile logFile = new File(AppStorage.getInstance().getLogFileLocation());\n\t\tlogFile.getParentFile().mkdirs();\n\n\t\ttry {\n\t\t\tFileHandler fileHandler = new FileHandler(AppStorage.getInstance().getLogFileLocation(), true);\n\t\t\tSimpleFormatter formatter = new SimpleFormatter();\n\t\t\tfileHandler.setFormatter(formatter);\n\n\t\t\twhile (logger.getHandlers().length > 0) {\n\t\t\t\tFileHandler prevFileHandler = (FileHandler)logger.getHandlers()[0];\n\t\t\t\tlogger.removeHandler(prevFileHandler);\n\t\t\t\tprevFileHandler.close();\n\t\t\t}\n\n\t\t\tlogger.addHandler(fileHandler);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "abstract void initiateErrorLog();", "private static void shutdownGracefully() {\n //record out file time for the last access to the stream.\n try {\n disruptor.shutdown();\n setLastReadTime();\n closeCouchbaseClient();\n } catch (Exception ex) {\n //not much we can do, what if our logging is already shutdown or not up\n // when this happens?\n ex.printStackTrace();\n }\n\n }", "public void parseLog2(){\n\t\ttry{\n\t\t\tMxmlFile eventlog=new MxmlFile(res.getFileName());\n\t\t\t//log.info(\"processing \"+res.getFileName());\n\t\t\tres=eventlog.parse(eventlog.read(), res);\n\t\t\teventlog.close();\n\t\t}catch(Exception e){\n\t\t\tlog.warn(e.toString());\n\t\t}\n\t}", "protected void onNewWatchLog(ChannelRecord channelRecord) {\n }", "private void startFresh() throws JournalException {\n try {\n this.log = this.node.getWriter(this.filename, false);\n } catch (IOException e) {\n throw new JournalException(\"Failed to create initial log file.\");\n }\n }", "public void lastReaderAdded(){\r\n\t\tdoneAddingReaders = true;\r\n\t}", "@FXML\n private void seeAllLogsEvent() throws IOException {\n loadNextScene(rootPane, \"/views/LogPane.fxml\");\n }", "public void logData(){\n }", "@Override\n public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n log();\n }", "public void logMessage(HistoricalMessage message) {\n if (message.getBody() != null) {\r\n logQueue.add(message);\r\n }\r\n }", "private void flushDirtyLogs() {\n logger.debug(\"Checking for dirty logs to flush...\");\n Utils.foreach(logs, new Callable1<Map.Entry<TopicAndPartition, Log>>() {\n @Override\n public void apply(Map.Entry<TopicAndPartition, Log> _) {\n TopicAndPartition topicAndPartition = _.getKey();\n Log log = _.getValue();\n\n try {\n long timeSinceLastFlush = time.milliseconds() - log.lastFlushTime();\n logger.debug(\"Checking if flush is needed on \" + topicAndPartition.topic + \" flush interval \" + log.config.flushMs + \" last flushed \" + log.lastFlushTime() + \" time since last flush: \" + timeSinceLastFlush);\n if (timeSinceLastFlush >= log.config.flushMs)\n log.flush();\n } catch (Throwable e) {\n logger.error(\"Error flushing topic \" + topicAndPartition.topic, e);\n if (e instanceof IOException) {\n logger.error(\"Halting due to unrecoverable I/O error while flushing logs: \" + e.getMessage(), e);\n System.exit(1);\n }\n }\n }\n });\n }", "public void postInitAfterConfiguration() {\n\t\t// each configuration are only supporting one log handler\n\t\tcrawlerRecordHandler = new CrawlerRecord(this);\n\t\t// TODO: other configurations needs to be added after all configurations are set\n\t}", "private void getloggersStatus() { \n\t\tAppClientFactory.getInjector().getSearchService().isClientSideLoggersEnabled(new SimpleAsyncCallback<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String result) {\n\t\t\t\tAppClientFactory.setClientLoggersEnabled(result);\n\t\t\t}\n\t\t\t\n\t\t});\n\t}", "private Log() {\r\n readFile(\"Save.bin\",allLogs);\r\n readFile(\"Tag.bin\", allTags);\r\n readFile(\"Password.bin\", userInfo);\r\n }", "@Override\n\t\tpublic void clear() {\n\t\t\tsuper.clear();\n\t\t\tLogCateManager.getInstance().onLogsChanged();\n\t\t}", "public boolean logging() {\n\treturn logging;\n }", "static public void storeLogs(final boolean shouldStoreLogs) {\n ThreadPoolWorkQueue.execute(new Runnable() {\n @Override public void run() {\n setCaptureSync(shouldStoreLogs);\n // we do this mostly to enable unit tests to logger.wait(100) instead of\n // Thread.sleep(100) -- it's faster, more stable, and more deterministic that way\n synchronized (WAIT_LOCK) {\n WAIT_LOCK.notifyAll ();\n }\n }\n });\n }", "private synchronized void flush() {\r\n\t\tif (!buffer.isEmpty()) {\r\n\t\t\tfor (final LoggingRecord record : buffer) {\r\n\t\t\t\thandler.handle(record);\r\n\t\t\t}\r\n\t\t\tbuffer.clear();\r\n\t\t}\r\n\t}", "private void waitForLogSpace(Connection conn, JdbcHelper jdbc) {\r\n this.curLogCounter.incrementAndGet();\r\n\r\n // only trigger the check every \"maxLogCounter\" checks\r\n if (this.curLogCounter.get() == maxLogCounter) {\r\n boolean firstTime = true;\r\n\r\n while (true) {\r\n int percentFull = getPercentLogFullInDb(conn, jdbc);\r\n\r\n int thresholdToCheck = firstTime ? stopLogSpaceThreshold : resumeLogSpaceThreshold;\r\n firstTime = false;\r\n\r\n if (percentFull < thresholdToCheck) {\r\n break;\r\n } else {\r\n try {\r\n Seconds seconds = Seconds.seconds(3);\r\n LOG.info(String\r\n .format(\"Pausing for %d seconds as the log level hit a high mark of %d; will resume when it gets back to %d\",\r\n seconds.getSeconds(), percentFull, resumeLogSpaceThreshold));\r\n Thread.sleep(seconds.getSeconds() * 1000);\r\n } catch (InterruptedException e) {\r\n throw new DeployerRuntimeException(e);\r\n }\r\n }\r\n }\r\n\r\n this.curLogCounter.set(0); // reset the log counter after doing the check\r\n } else if (this.curLogCounter.get() > maxLogCounter) {\r\n // in this case, some concurrent execution caused the ID to exceed the maxLogCounter. In this case, just\r\n // reset the counter to 0 (the thread that has the counter at the right value would execute this code\r\n this.curLogCounter.set(0);\r\n }\r\n }", "public void logOpen() throws IOException {\n\t\t\t\t// Initialization:\n\t\t\t\tfileCleaner(\"failed.log\");\n\t\t\t\tfileCleaner(\"failed.num\");\n\t\t\t\tfileCleaner(\"finish.time\");\n\t\t\t\tfileCleaner(\"ini.time\");\n\t\t\t\tfileCleaner(\"run.log\");\n\t\t\t\tfileCleaner(\"print.log\");\n\t\t\t\tfileCleaner(\"start.time\");\n\t\t\t\tfileCleaner(\"stack.trace\");\n\t\t\t\tfileCleaner(\"test.num\");\n\t\t\t\tfileCleaner(\"wait.log\");\n\t\t\t\tfileCleaner(\"xml.path\");\n\t\t\t\tfileCleaner(\"source.html\");\n\t\t\t\tString time = getCurrentDateTimeFull(); // System.out.print(\" TEST START: \" + time + \"\\n\");\n\t\t\t\tfileWriter(\"ini.time\", convertLongToString(System.currentTimeMillis()));\n\t\t\t\t// Initial Log record:\n\t\t\t\tfileWriter(\"run.log\", \" TEST START: \" + time);\n\t\t\t\tfileWriter(\"run.log\", \"\");\n\t\t\t}", "public void log(boolean log) {\n this.log = log;\n }", "public void logClose() throws IOException {\n\t\t\t\tlong finish = System.currentTimeMillis();\n\t\t\t\tString time = getCurrentDateTimeFull();\n\t\t\t\t// Scanning Failure Counter record:\n\t\t\t\tint failed = 0;\n\t\t\t\tif (fileExist(\"failed.num\", false)) { failed = Integer.valueOf(fileScanner(\"failed.num\")); }\n\t\t\t\t// Scanning Test Counter record:\n\t\t\t\tint n = 1;\n\t\t\t\tif (fileExist(\"test.num\", false)) {\n\t\t\t\t\tif (!fileScanner(\"test.num\").equals(null)) { n = Integer.valueOf(fileScanner(\"test.num\")); }\n\t\t\t\t}\n\t\t\t\tif (n > 1) {\n\t\t\t\t\t// Scanning Initialization record:\n\t\t\t\t\tString startingTime = fileScanner(\"ini.time\");\n\t\t\t\t\tlong start = convertStringToLong(startingTime);\n\t\t\t\t\tfileWriterPrinter(\"TOTAL TESTS: \" + Integer.valueOf(fileScanner(\"test.num\")));\n\t\t\t\t\tfileWriterPrinter(\" FAILED: \" + failed);\n\t\t\t\t\tfileWriterPrinter(\"TEST START: \" + convertCalendarMillisecondsAsLongToDateTimeHourMinSec(start));\n\t\t\t\t\tfileWriterPrinter(\"TEST FINISH: \" + time);\n\t\t\t\t\tfileWriterPrinter(\"TOTAL TIME: \" + convertTimeMillisecondsAsLongToDuration(finish - start));\n\t\t\t\t\tfileWriterPrinter();\n\t\t\t\t\t// Final Log record:\n\t\t\t\t\tif (fileExist(\"run.log\")) { \n\t\t\t\t\t\tfileWriter(\"run.log\", \"\");\n\t\t\t\t\t\tfileWriter(\"run.log\", \"TOTAL TESTS: \" + Integer.valueOf(fileScanner(\"test.num\")));\n\t\t\t\t\t\tfileWriter(\"run.log\", \" FAILED: \" + failed);\n\t\t\t\t\t\tfileWriter(\"run.log\", \"TEST START: \" + convertCalendarMillisecondsAsLongToDateTimeHourMinSec(start));\n\t\t\t\t\t\tfileWriter(\"run.log\", \"TEST FINISH: \" + time);\n\t\t\t\t\t\tfileWriter(\"run.log\", \"TOTAL TIME: \" + convertTimeMillisecondsAsLongToDuration(finish - start));\n\t\t\t\t\t\tfileWriter(\"run.log\", \"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Clean-up unnecessary file(s)\n\t\t\t\tfileCleaner(\"failed.num\");\n\t\t\t\tfileCleaner(\"finish.time\");\n\t\t\t\tfileCleaner(\"ini.time\");\n\t\t\t\tfileCleaner(\"start.time\");\n\t\t\t\tfileCleaner(\"stack.trace\");\n\t\t\t\tfileCleaner(\"test.num\");\n\t\t\t\tfileCleaner(\"xml.path\");\n\t\t\t}", "public void checkState( )\n {\n if( null == this.logfilename )\n {\n throw new IllegalStateException( \"Tried to operate on WriteLogger while it had not been initialized yet. You first need to set the logfilename!!\" );\n }\n }", "public void log(View view) {\n Log.i(TAG, \"LOGGING FOR \" + X + \", \" + Y);\n logButton.setText(R.string.logging_message);\n logButton.setEnabled(false);\n progressBar.setVisibility(View.VISIBLE);\n\n numLogs = 0;\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n numLogs++;\n if (numLogs < NUM_LOGS){\n log();\n mHandler.postDelayed(this, SCAN_PERIOD);\n } else {\n mScanning = false;\n scanBLEDevice(false);\n logButton.setText(R.string.start_log_message);\n logButton.setEnabled(true);\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n }, SCAN_PERIOD);\n\n mScanning = true;\n scanBLEDevice(true);\n\n }", "private static void writeLog(String log) {\n\t\twriteLog(log, true);\n\t}", "private static void initLog() {\n LogManager.mCallback = null;\n if (SettingsManager.getDefaultState().debugToasts) {\n Toast.makeText(mContext, mContext.getClass().getCanonicalName(), Toast.LENGTH_SHORT).show();\n }\n if (SettingsManager.getDefaultState().debugLevel >= LogManager.LEVEL_ERRORS) {\n new TopExceptionHandler(SettingsManager.getDefaultState().debugMail);\n }\n //Si hubo un crash grave se guardo el reporte en el sharedpreferences, por lo que al inicio\n //levanto los posibles crashes y, si el envio por mail está activado , lo envio\n String possibleCrash = StoreManager.pullString(\"crash\");\n if (!possibleCrash.equals(\"\")) {\n OtherAppsConnectionManager.sendMail(\"Stack\", possibleCrash, SettingsManager.getDefaultState().debugMailAddress);\n StoreManager.removeObject(\"crash\");\n }\n }", "@Override\n protected void onStart() {\n super.onStart();\n initializeLogging();\n }", "private void logUser() {\n }", "private void logToServer(PrintWriter out, BufferedReader in) throws InterruptedException, IOException {\n\t\tif (System.currentTimeMillis() - lastLog > 10_000) { // only log every 5 sec\n\t\t\tlogToServerNow(out, in);\n\t\t}\n\t}", "protected void checkLog() {\n String keyword = \"Connected controllable Agent to the Introscope Enterprise Manager\";\n LogUtils util = utilities.createLogUtils(umAgentConfig.getLogPath(), keyword);\n assertTrue(util.isKeywordInLog());\n\t}", "public void configLog()\n\t{\n\t\tlogConfigurator.setFileName(Environment.getExternalStorageDirectory() + File.separator + dataFileName);\n\t\t// Set the root log level\n\t\t//writerConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\t///writerConfigurator.setMaxFileSize(1024 * 1024 * 500);\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 1024);\n\t\t// Set log level of a specific logger\n\t\t//writerConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setImmediateFlush(true);\n\t\t//writerConfigurator.configure();\n\t\tlogConfigurator.configure();\n\n\t\t//gLogger = Logger.getLogger(this.getClass());\n\t\t//gWriter = \n\t\tgLogger = Logger.getLogger(\"vdian\");\n\t}", "private void initJulLogger() {\n SLF4JBridgeHandler.removeHandlersForRootLogger();\n SLF4JBridgeHandler.install();\n }", "private void logStream(BufferedReader br, boolean appendSerial) {\n try {\n if (br != null) {\n while (br.ready()) {\n String line = br.readLine();\n logger.debug(\"vm> \" + line);\n\n if (appendSerial) {\n serialConsoleMessages.add(line);\n }\n }\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tLog.i(\"imi\", \"Delete Log Start\");\n\t\t\t\tLog.i(\"imi\",mVIPIncomingNumber);\n\t\t\t\tif(deleteLastCallLogEntry(mVIPIncomingNumber))\n\t\t\t\t\tLog.i(\"imi\",\"true\");\n\t\t\t\telse\n\t\t\t\t\tLog.i(\"imi\",\"false\");\n\t\t\t}", "void log();", "public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }", "private void initCemsLogger() {\n if (logger == null) {\n final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n final Formatter formatter = new Formatter() {\n @Override\n public String format(LogRecord record) {\n final StringBuilder sb = new StringBuilder();\n sb.append(dateFormat.format(new Date(record.getMillis())));\n sb.append(\" - \");\n sb.append(record.getLevel().getName());\n sb.append(\": \");\n sb.append(record.getMessage());\n sb.append(\"\\n\");\n @SuppressWarnings(\"ThrowableResultOfMethodCallIgnored\")\n final Throwable thrown = record.getThrown();\n if (thrown != null) {\n sb.append(thrown.toString());\n sb.append(\"\\n\");\n }\n return sb.toString();\n }\n };\n\n final ConsoleHandler handler = new ConsoleHandler();\n handler.setFormatter(formatter);\n handler.setLevel(Level.ALL);\n\n logger = Logger.getLogger(\"ga.cems\");\n final Handler[] handlers = logger.getHandlers();\n for (Handler h : handlers) {\n logger.removeHandler(h);\n }\n\n logger.setUseParentHandlers(false);\n logger.addHandler(handler);\n }\n// logger.setLevel(Level.INFO);\n logger.setLevel(logLevel);\n }", "public void onReadError(Exception ex) {\n logger.error(\"Encountered error on read\");\n }", "private void run(){\n AccessLogParser accessLogParser = new AccessLogParser(accessLog);\n accessLogParser.parse();\n\n search();\n\n\n HibernateUtil.shutdown();\n }", "LogRecorder getLogRecorder();", "LogRecorder getLogRecorder();", "public void enableLogging();", "protected void writeLog() {\r\n\r\n // get the current date/time\r\n DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);\r\n\r\n // write to the history area\r\n if (Preferences.is(Preferences.PREF_LOG) && completed) {\r\n\r\n if (destImage != null) {\r\n\r\n if (srcImage != null) {\r\n destImage.getHistoryArea().setText(srcImage.getHistoryArea().getText());\r\n }\r\n\r\n if (historyString != null) {\r\n destImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n } else if (srcImage != null) {\r\n\r\n if (historyString != null) {\r\n srcImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n }\r\n }\r\n }", "protected void log(Object msg) {\n\t\n\t\tSystem.out.println(\"MusicDataAccessor: \" + msg);\n\t}", "public void setLog(boolean log)\n {\n this.log = log;\n }", "@Override\n\tpublic void run() {\n\n\t\treceiveClients();\n\n\t\tbeginLogging();\n\t}", "public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}", "public boolean isLogging();", "String getLogHandled();", "public void logStoreAppendSuccess(AppendLogCommand cmd) {\r\n\r\n\r\n\r\n if (logger.isInfoEnabled())\r\n logger.info(\"LogStore call back MemberAppend {}\",\r\n new String(cmd.getTerm() + \" \" + cmd.getLastIndex()));\r\n\r\n\r\n\r\n // send to all follower and self\r\n\r\n\r\n\r\n }", "private HipaaLogMessage takeLogMsg() throws InterruptedException {\n return AuditLogQueue.getInstance().poll();\n }" ]
[ "0.74499744", "0.70698375", "0.64453876", "0.6372334", "0.62677485", "0.6174632", "0.6127734", "0.6083961", "0.6068239", "0.60569376", "0.60526097", "0.6034052", "0.6020825", "0.5983669", "0.5941501", "0.59251904", "0.5876518", "0.5875057", "0.5853929", "0.5849206", "0.5824423", "0.58007574", "0.5794588", "0.5794457", "0.5763454", "0.5762522", "0.57503134", "0.57461876", "0.573677", "0.5735316", "0.5729555", "0.5713187", "0.5685517", "0.5684962", "0.5659978", "0.56439126", "0.56439126", "0.56439126", "0.56386805", "0.56242037", "0.5621665", "0.5619383", "0.56188273", "0.5612401", "0.56103", "0.5600245", "0.5598971", "0.5593633", "0.557068", "0.55704087", "0.55635333", "0.5561354", "0.5557873", "0.5530991", "0.55301553", "0.55284226", "0.55269074", "0.5501571", "0.54926836", "0.54908425", "0.54889864", "0.54856235", "0.54850715", "0.5478735", "0.5471062", "0.54707503", "0.5469198", "0.546247", "0.54608625", "0.5436338", "0.5424026", "0.5423029", "0.54226756", "0.5409921", "0.5405561", "0.5403595", "0.54011154", "0.5399295", "0.53892726", "0.5376495", "0.53739727", "0.53561574", "0.5353445", "0.5351368", "0.5350888", "0.53459406", "0.5334322", "0.53313553", "0.5330179", "0.5327423", "0.5327423", "0.5319246", "0.5313836", "0.53033763", "0.53033555", "0.5302621", "0.53003836", "0.52975667", "0.5284685", "0.52830637", "0.5282359" ]
0.0
-1
Fragment may be destroyed after this.
@Override public void onPause(){ if(myVM != null && myVM.UpdateEvent != null) myVM.UpdateEvent.unregister(updateListener); super.onPause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDestroyView() {\n super.onDestroyView();\n Log.i(sFragmentName, \"onDestroyView()\");\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n Log.i(sFragmentName, \"onDestroy()\");\n }", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tLog.d(\"Fragment02\",\"onDestroy\");\n\t}", "@Override\n\tpublic void onDestroyView() {\n\t\tsuper.onDestroyView();\n\t\tLog.d(\"Fragment02\",\"onDestroyView\");\n\t}", "@Override\n public void onFragmentDestroyed(@NonNull FragmentManager fm, @NonNull Fragment f) {\n }", "@Override\r\n\tpublic void onFragmentStop() {\n\t}", "@Override\r\n\t public void onDestroy() {\r\n\t super.onDestroy();\r\n\t getActivity().finish();\r\n\t }", "@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}", "@Override\n public void onDestroyView() {\n super.onDestroyView();\n\n/* try {\n Fragment fragment = (getFragmentManager()\n .findFragmentById(R.id.mandiMap));\n if(fragment!=null) {\n FragmentTransaction ft = getActivity().getSupportFragmentManager()\n .beginTransaction();\n ft.remove(fragment);\n ft.commit();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }*/\n }", "@Override\n\tpublic void onDestroy() {\n\t\tinstance=null;\n\t\tsuper.onDestroy();\n\t\tLog.v(\"huahua\", \"fragment1-->onDestroy()\");\n\t}", "@Override\n public void onDetach() {\n super.onDetach();\n Log.i(sFragmentName, \"onDetach()\");\n }", "@Override\n public void onDestroy(){\n super.onDestroy();\n\n //Previous fragment has no toolbar\n// setToolbarVisibility(false);\n }", "@Override\r\n \tpublic void onDetach() {\r\n \t super.onDetach();\r\n \t try {\r\n \t Field childFragmentManager = Fragment.class.getDeclaredField(\"mChildFragmentManager\");\r\n \t childFragmentManager.setAccessible(true);\r\n \t childFragmentManager.set(this, null);\r\n\r\n \t } catch (NoSuchFieldException e) {\r\n \t throw new RuntimeException(e);\r\n \t } catch (IllegalAccessException e) {\r\n \t throw new RuntimeException(e);\r\n \t }\r\n\r\n \t}", "public void onUPP()\r\n {\r\n Fragment frag = getSupportFragmentManager().findFragmentById(R.id.fragmentSad);\r\n// //android.app.FragmentManager fm = getFragmentManager();\r\n// FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n// ft.remove(frag);\r\n// ft.commit();\r\n//}\r\n\r\n FragmentManager fm = getSupportFragmentManager();\r\n fm.beginTransaction()\r\n .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)\r\n .show(frag)\r\n .commit();\r\n\r\n }", "private void updateFragment() {\n Fragment fragment = getSupportFragmentManager().findFragmentByTag(CURRENT_FRAGMENT);\n if (fragment != null) {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n ft.detach(fragment).attach(fragment).commit();\n }\n }", "@Override\n\tpublic void onDetach() {\n\t\tsuper.onDetach();\n\t\tLog.d(\"Fragment02\",\"onDetach\");\n\t}", "@Override\r\n\tpublic void onDestroyView() {\n\t\tLog.v(TAG, \"onDestroyView\");\r\n\t\tsuper.onDestroyView();\r\n\t\t//Toast.makeText(getActivity(), TAG+ \" \"+i+\" onDestroyView\", Toast.LENGTH_SHORT).show();\r\n\t}", "private void onClick_recargar(){\n this.onDestroy();\n ((principal)getActivity()).loadLastFragment();\n }", "@Override\r\n\tpublic void onFragmentPaused() {\n\t}", "@Override\n public void refreshFragment() {\n }", "@Override\n public void onFragmentAttached() {\n }", "protected abstract Fragment createFragment();", "public final void finishFragment() {\n android.support.v4.app.FragmentActivity activity = getActivity();\n\n if (activity == null) {\n throw new IllegalStateException(\"Fragment \" + this\n + \" not attached to Activity\");\n }\n\n activity.onBackPressed();\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // retain this fragment\n setRetainInstance(true);\n }", "public void onViewDestroy(){}", "@Override\n public void onDestroyView() {\n super.onDestroyView();\n }", "@Override\n public void onDestroyView() {\n super.onDestroyView();\n }", "@Override\n public void onPause() {\n super.onPause();\n Log.i(sFragmentName, \"onPause()\");\n }", "@Override\n public void onViewDestroy() {\n }", "@Override\r\n\tpublic void onDestroyView() {\n\t\tsuper.onDestroyView();\r\n\t}", "public void createFragment() {\n\n }", "@Override\n public void onStop() {\n super.onStop();\n Log.i(sFragmentName, \"onStop()\");\n }", "public void onfff() {\r\n\r\n Fragment frag = getSupportFragmentManager().findFragmentById(R.id.fragmentSad);\r\n if(!(frag.isHidden()))\r\n {\r\n// //android.app.FragmentManager fm = getFragmentManager();\r\n// FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n// ft.remove(frag);\r\n// ft.commit();\r\n//}\r\n\r\n FragmentManager fm = getSupportFragmentManager();\r\n fm.beginTransaction()\r\n .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)\r\n .hide(frag)\r\n .commit();\r\n }\r\n }", "@Override\n public void onDetach() {\n super.onDetach();\n //\n selectedFragmentFromFAB = null;\n }", "@Override\n\tpublic void onDestroyView() {\n\t\tsuper.onDestroyView();\n\n\t}", "@Override\n\tpublic void onDestroyView() {\n\t\tsuper.onDestroyView();\n\t\tLog.i(TAG, \"onDestroyView\");\n\t}", "public void onDestroy() {\r\n\t\tLog.w(LOG_TAG, \"Simple iMeeting base view = \" + this\r\n\t\t\t\t+ \" onDestroy method not implement\");\r\n\t}", "@Override\n public void onDestroyView() {\n super.onDestroyView();\n\n }", "@Override\n public void onStop() {\n super.onStop();\n //this unregister this fragment to stop any EventBus messages\n EventBus.getDefault().unregister(this);\n }", "@Override\r\n\tpublic void onFragmentStart() {\n\t}", "private void resetFragment() {\n\t\tFragment fragment = hMapTabs.get(mSelectedTab).get(0);\n\t\thMapTabs.get(mSelectedTab).clear();\n\t\thMapTabs.get(mSelectedTab).add(fragment);\n\t\tFragmentManager manager = getSupportFragmentManager();\n\t\tFragmentTransaction ft = manager.beginTransaction();\n\t\tft.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);\n\t\tft.replace(R.id.realtabcontent, fragment);\n\t\tft.commit();\n\n\t\tshouldDisplayHomeUp();\n\n\t}", "@Override\n public void onResultViewFinished() {\n MainFragment mainFragment = new MainFragment();\n\n createTransactionAndReplaceFragment(mainFragment, getString(R.string.frg_tag_main));\n }", "@Override\n public void onViewDestroyed() {\n\n }", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tLog.i(TAG, \"Serview destroy\");\n\t}", "@Override\n public void onSwipeRight() {\n getFragmentManager().beginTransaction().remove(LongAddFragment.this).commit();\n super.onSwipeRight();\n }", "@Override\n public void onPause() {\n super.onPause();\n\n Toast.makeText(getContext(),\"on pause\",Toast.LENGTH_SHORT).show();\n Log.e(\"fragmentlifecycle\",\"on pause\");\n }", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n registeredFragments.remove(position);\n super.destroyItem(container, position, object);\n }", "public void onDestroy() {\n if (view != null) {\n view.clear();\n view = null;\n }\n }", "public void returnFromFragment(View v) {\n blankFrag.setVisibility(View.VISIBLE);\n itemFrag.setVisibility(View.INVISIBLE);\n userFrag.setVisibility(View.INVISIBLE);\n Toast.makeText(AdminActivity.this, \"Back\", Toast.LENGTH_SHORT).show();\n }", "@Override\n protected void onViewCreatedFinish(Bundle saveInstanceState) {\n\n addFragments();\n addListener();\n mVpContent.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {\n @Override\n public Fragment getItem(int position) {\n return mFragments.get(position);\n }\n\n @Override\n public int getCount() {\n return mFragments.size();\n }\n });\n mVpContent.setOffscreenPageLimit(4);\n mTbIndexTab.setTabItemSelected(R.id.ti_index_store);\n mVpContent.setCurrentItem(0);\n refreshMeDot(0);\n\n ActivityManager.getInstance().popOtherActivity(MainActivity.class);\n\n createFile();\n }", "private void newFragmentCall() {\n\n dismissDialog();\n\n Fragment fragment = new HotelDetailsTabFragment();\n Bundle bundle = new Bundle();\n\n bundle.putParcelable(\"HotelDetails\", hotelDetailInfoResponse);\n bundle.putParcelable(\"TripAdvisorDeatil\", tripAdvisorDataResponse);\n bundle.putParcelable(\"HotelRoomRate\", hotelRatesResponse);\n fragment.setArguments(bundle);\n\n setFragmentTransaction(fragment, \"NOAnimation\");\n }", "@Override\n public void onClick(View v) {\n android.app.Fragment onjF = null;\n onjF = new BlankFragment();\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.fragment,onjF).commit();\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tvideoView.release();\r\n\t}", "@Override\n public void onDestroyView(){\n DataStore.getInstance(getActivity()).unregisterLiveLeagueDBObserver(mViewPagerAdapter);\n super.onDestroyView();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_activity_summary, container, false);\n\n // Transaction party\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction ft = fragmentManager.beginTransaction();\n\n if(fragmentManager.findFragmentById(R.id.frame1)!=null) {\n ft.remove(fragmentManager.findFragmentById(R.id.frame1));\n }\n Fragment fragment = new SummaryFragment();\n ft.replace(R.id.frame1, fragment).commit();\n return v;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t FragmentManager fm = getFragmentManager(); \n\t\t FragmentTransaction tx = fm.beginTransaction();\n\t\t tx.remove(FragmentManagementHistoryResult.this);\n\t\t tx.commit();\n\t\t\t}", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\tmExploreDetailsFragHandler.removeMessages(1101);\n\t\t\tmExploreDetailsFragHandler = null;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "protected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n fragmentView = inflater.inflate(R.layout.fragment_event_friend_list, container, false);\n\n linlaHeaderProgress = (LinearLayout) fragmentView.findViewById(R.id.linlaHeaderProgress);\n\n eventFriendListRelativeLayout = (RelativeLayout) fragmentView.findViewById(R.id.eventFriendListRelativeLayout);\n eventFriendListRelativeLayout.setVisibility(View.GONE);\n\n try {\n checkAndHandleNotification();\n } catch (FaroObjectNotFoundException e) {\n // Event has been deleted.\n Toast.makeText(getActivity(), \"Event has been deleted\", LENGTH_LONG).show();\n Log.e(TAG, MessageFormat.format(\"Event {0} has been deleted\", eventId));\n getActivity().finish();\n }\n\n return fragmentView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_permit_valid, container, false);\n\n // Button Exit\n Button btnExitVerifiedPermits = (Button) v.findViewById(R.id.btnExitVerifiedPermits);\n btnExitVerifiedPermits.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Toast.makeText(getActivity(), \"Exit clicked\", Toast.LENGTH_SHORT).show();\n sendJSON();\n\n// // Works...but crashes\n// // https://www.youtube.com/watch?v=eUG3VWnXFtg\n// // https://www.programcreek.com/java-api-examples/?class=android.support.v4.app.FragmentManager&method=popBackStack\n// FragmentManager manager = getActivity().getSupportFragmentManager();\n// manager.popBackStack(null, POP_BACK_STACK_INCLUSIVE);\n\n\n// FragmentManager manager = getActivity().getSupportFragmentManager();\n// manager.popBackStack(\"fragment map B\", POP_BACK_STACK_INCLUSIVE);\n\n FragmentManager manager = getActivity().getSupportFragmentManager();\n manager.popBackStack();\n\n\n\n// final PermitValidFragment fragment = new PermitValidFragment();\n// FragmentManager manager = getActivity().getSupportFragmentManager();\n// android.support.v4.app.FragmentTransaction trans = manager.beginTransaction();\n// trans.remove(fragment);\n// trans.commit();\n// manager.popBackStack();\n\n// FragmentManager fm = getActivity().getSupportFragmentManager();\n// fm.popBackStack(FragmentManager.POP_BACK_STACK_INCLUSIVE);\n// fm.popBackStack(\"PermitValidFragment\", FragmentManager.POP_BACK_STACK_INCLUSIVE);\n\n\n// MapAFragment fragment = new MapAFragment();\n// final android.support.v4.app.FragmentTransaction ft = getFragmentManager().beginTransaction();\n// ft.replace(R.id.frame, fragment, \"fragment map A\");\n// ft.commit();\n\n// String userid = \"1429392\";\n// String uuidTwelve = \"defaultTwelve\";\n//\n// MapBFragment fragment = null;\n// fragment = new MapBFragment().newInstance(userid, uuidTwelve);\n// final android.support.v4.app.FragmentTransaction ft = getFragmentManager().beginTransaction();\n// ft.replace(R.id.frame, fragment, \"fragment map B\");\n// ft.commit();\n\n// if (getFragmentManager().getBackStackEntryCount() == 0) {\n// getActivity().finish();\n// } else {\n// getFragmentManager().popBackStack();\n// }\n\n// getActivity().getFragmentManager().beginTransaction().remove(fragment).commit();\n\n// getActivity().getSupportFragmentManager().popBackStackImmediate();\\\n\n\n// FragmentActivity myContext = null;\n//\n// final FragmentManager fragManager = myContext.getSupportFragmentManager();\n// while (fragManager.getBackStackEntryCount() != 0) {\n// fragManager.popBackStackImmediate();\n// }\n\n// MapAFragment fragment = new MapAFragment();\n// final android.support.v4.app.FragmentTransaction ft = getFragmentManager().beginTransaction();\n// ft.replace(R.id.frame, fragment, \"fragment map A\");\n// ft.commit();\n\n// MapAFragment fragment = new MapAFragment();\n// final android.support.v4.app.FragmentTransaction ft = getFragmentManager().beginTransaction();\n// ft.replace(R.id.frame, fragment, \"fragment map A\");\n// ft.commit();\n\n// // This portion works\n// String userid = \"1429392\";\n// String uuidTwelve = \"defaultTwelve\";\n// final android.support.v4.app.FragmentTransaction ft = getFragmentManager().beginTransaction();\n// ft.replace(R.id.frame, new MapBFragment().newInstance(userid, uuidTwelve), \"waiting fragment\");\n// ft.commit();\n\n\n }\n });\n\n return v;\n }", "@Override\n public Fragment getFragment() {\n// uuid = (UUID)getIntent().getSerializableExtra(UUID);\n// return GoalDetailViewFragment.newInstance(uuid);\n return null;\n }", "public abstract Fragment getFragment();", "@Override\n protected void onDestroy() {\n super.onDestroy();\n Log.i(TAG, \"onDestroy: 1st view\");\n }", "@Override\n\tpublic void onDestroy() {\n\t\tmOrionVideoView.onDestroy();\n\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tpublic void onDestroy() {\n\t\tmOrionVideoView.onDestroy();\n\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tpublic void onDestroy() {\n\t\tmOrionVideoView.onDestroy();\n\n\t\tsuper.onDestroy();\n\t}", "@Override\n public void onClick(View v) {\n fragment = fragmentManager.findFragmentByTag(\"frag1\"); // you gonna find a fragment by a tag ..u defined that in acitivty when you called that fragment\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n if (fragment != null) {\n fragmentTransaction.remove(fragment); // remove Transaction\n }\n\n // now calling and adding another fragment after remove its parent fragment (where you are calling fragmetn from) fragment to fragment call\n fragment = new Fragment2();\n fragmentTransaction.add(R.id.base_layout, fragment, \"frag2\"); //giving tag to fragment\n fragmentTransaction.commit();\n }", "private void initFragment(View v) {\n spotDescription = v.findViewById(R.id.spotDescription);\n spotName = v.findViewById(R.id.spotName);\n spotCreator = v.findViewById(R.id.creatorText);\n spotCategory = v.findViewById(R.id.spotCategory);\n removeBtn = v.findViewById(R.id.removeBtn);\n\n // Checks if the spot is owned by the current user, if it is the remove spot button appears and becomes activated\n // Otherwise it will not appear nor be activated\n if (currentSpot.getCreatorId().equals(CurrentRun.getActiveUser().getId())) {\n removeBtn.setVisibility(View.VISIBLE);\n removeBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n database.removeSpot(getActivity().getIntent().getStringExtra(\"SpotId\"));\n\n //closes the activity and returns to previous\n getActivity().onBackPressed();\n }\n });\n\n } else {\n removeBtn.setVisibility(View.GONE);\n }\n }", "private void startValveFragment() {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n Fragment valveFragment = new vavlesFragment(mUser, ProfileActivity.this, dialogCallBack);\n ft.replace(R.id.fragment_container, valveFragment).commit();\n }", "public Fragment getFragment() {\n return fragment;\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n finish();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_retainedfragment, container, false);\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "public BookDetailFragment() {\n setRetainInstance(true);\n }", "private void setFragment() {\r\n dataModelArrayList.clear();\r\n fm = getSupportFragmentManager();\r\n mTaskFragment = (ViewPagerAsyncTask) fm.findFragmentByTag(TAG_TASK_FRAGMENT);\r\n\r\n // If the Fragment is non-null, then it is currently being\r\n // retained across a configuration change.\r\n if (mTaskFragment == null) {\r\n mTaskFragment = new ViewPagerAsyncTask();\r\n fm.beginTransaction().add(mTaskFragment, TAG_TASK_FRAGMENT).commit();\r\n }\r\n }", "@Override\n public void onSClicked() {\n Log.d(TAG, \"onSClicked: starts\");\n\n //calling Fragment Manager\n FragmentManager fManager = getSupportFragmentManager();\n //finding Fragment which needs to be removed using its Container ID\n Fragment fragment = fManager.findFragmentById(R.id.task_detail_container);\n //checking if there is that present or not\n if(fragment!=null){\n //if fragment present remove it\n /*FragmentTransaction fTransaction = fManager.beginTransaction();\n fTransaction.remove(fragment);\n fTransaction.commit();*/\n\n //short for above code\n getSupportFragmentManager().beginTransaction().remove(fragment).commit();\n }\n\n }", "@Override\n public void onDestroy() {\n LocalBroadcastManager.getInstance(getActivity()).unregisterReceiver(mMessageReceiver);\n super.onDestroy();\n }", "@Override\r\n protected void onSaveInstanceState(Bundle outState) {\n getSupportFragmentManager().putFragment(outState, \"myFragment\", stepVideoFragment);\r\n super.onSaveInstanceState(outState);\r\n }", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\tfragment.refreshComplete();\n\t\t\t}", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\tfragment.refreshComplete();\n\t\t\t}", "@Override\n public void onDestroy() {\n super.onDestroy();\n }", "@Override\r\n\tpublic void onFragmentResume() {\n\t}", "public void listaVacia() {\n\n mProgressDialog.dismiss();\n\n Bundle arguments = new Bundle();\n\n arguments.putString(\"ficha\", ActivosFragment.TAG);\n\n mBlankFragment = BlankFragment.newInstance(arguments);\n FragmentTransaction mFragmentTransaction = getFragmentManager().beginTransaction();\n mFragmentTransaction.replace(R.id.main_content, mBlankFragment, BlankFragment.TAG);\n //mFragmentTransaction.addToBackStack(FragmentDepartamento.TAG); // Agrega a la pila el fragmento para poder retroceder\n mFragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE); //Agrega una transición al fragment\n\n mFragmentTransaction.commit();\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, final ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.registrado, container, false);\n\n // aButton = (Button)rootView.findViewById(R.id.button_registrado);\n\n ((Button) rootView.findViewById(R.id.button_registrado)).setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n //Log.d(\"ENTRO\", \"ENTRAAAAAA***************************************************888888888\");\n FragmentManager manager=getActivity().getSupportFragmentManager();\n FragmentTransaction ft = manager.beginTransaction();\n PerfilFragment perfil= new PerfilFragment();\n //Eventos perfil= new Eventos();\n Fragment newFragment = perfil;\n Fragment actual= visualiza();\n actual.onDestroy();\n ft.remove(actual);\n ft.replace(container.getId(),newFragment);\n //container is the ViewGroup of current fragment\n ft.addToBackStack(null);\n ft.commit();\n }\n });\n\n return rootView;\n }", "public void onDestroy() {\n if (this.b != null) {\n this.b.clear();\n }\n super.onDestroy();\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (mHasLoad) {\n return;\n }\n initFragment();\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}" ]
[ "0.75836945", "0.75400156", "0.74547124", "0.7396591", "0.7341476", "0.72232807", "0.71246946", "0.7007738", "0.70009595", "0.69652826", "0.69353974", "0.69090885", "0.6872715", "0.6798206", "0.6706052", "0.67059225", "0.6688188", "0.6670521", "0.66235906", "0.65682036", "0.65193474", "0.65103954", "0.64992255", "0.64965713", "0.6488279", "0.64829713", "0.64829713", "0.6475356", "0.6464542", "0.6441821", "0.64361787", "0.64313513", "0.64297044", "0.64270884", "0.6405561", "0.6402066", "0.63701147", "0.6369989", "0.636709", "0.6365487", "0.63639385", "0.6362232", "0.6361068", "0.63449734", "0.63379544", "0.6333451", "0.6312897", "0.6275029", "0.62731403", "0.626887", "0.6260473", "0.62518555", "0.62434256", "0.6231054", "0.6227397", "0.6223883", "0.62222815", "0.62202954", "0.6207557", "0.620158", "0.6197083", "0.61807764", "0.6171026", "0.616425", "0.616425", "0.616425", "0.6159442", "0.6148879", "0.6146239", "0.61452234", "0.6142874", "0.6134079", "0.6129147", "0.6129147", "0.6129147", "0.6129147", "0.6124881", "0.6119942", "0.6114935", "0.6107611", "0.609659", "0.609443", "0.609443", "0.6090125", "0.60819477", "0.60803026", "0.6073079", "0.6063644", "0.6061565", "0.60614413", "0.60614413", "0.60614413", "0.60614413", "0.6060573", "0.6060573", "0.6060573", "0.6060573", "0.6060573", "0.6060573", "0.6060573", "0.6060573" ]
0.0
-1
Select logic by btn id:
@Override public void onClick(View v) { try{ switch(v.getId()) { case R.id.deletePinButton: myVM.pressPinButton(10); break; case R.id.cancelPinButton: NavigationManager.Instance().setPage(PageTags.CHARGE_PAGE); break; case R.id.okPinButton: myVM.okPressed(); break; case R.id.zeroPinButton: myVM.pressPinButton(0); break; case R.id.onePinButton: myVM.pressPinButton(1); break; case R.id.twoPinButton: myVM.pressPinButton(2); break; case R.id.threePinButton: myVM.pressPinButton(3); break; case R.id.fourPinButton: myVM.pressPinButton(4); break; case R.id.fivePinButton: myVM.pressPinButton(5); break; case R.id.sixPinButton: myVM.pressPinButton(6); break; case R.id.sevenPinButton: myVM.pressPinButton(7); break; case R.id.eightPinButton: myVM.pressPinButton(8); break; case R.id.ninePinButton: myVM.pressPinButton(9); break; default: MessageManager.Instance().AddMessage("Unknown button clicked: " + v.getId(), true); break; } }catch (Exception ex){ MessageManager.Instance().AddMessage(ex.toString(), true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void selectGolem(int id) {\n }", "Button getBtn();", "public void setButtonSelection(String action);", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.A11:\n buttonPressed = \"A-11\";\n parse_Field = \"arena=A 11-manna (Gstad)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.B11:\n buttonPressed = \"B-11\";\n parse_Field = \"arena=B 11-manna (Gstad)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.C11:\n buttonPressed = \"C-11\";\n parse_Field = \"arena=C 11-manna (Byavallen)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.C1_7:\n buttonPressed = \"C1-7\";\n parse_Field = \"arena=C1 7-manna (Gstad)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.C2_7:\n buttonPressed = \"C2-7\";\n parse_Field = \"arena=C2 7-manna (Gstad)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.C3_5:\n buttonPressed = \"C3-5\";\n parse_Field = \"arena=C3 5-manna (Gstad)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.C4_5:\n buttonPressed = \"C4-5\";\n parse_Field = \"arena=C4 5-manna (Gstad)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.D_7:\n buttonPressed = \"D-7\";\n parse_Field = \"arena=D 7-manna (Gstad)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.E1:\n buttonPressed = \"E1-7\";\n parse_Field = \"arena=E1 7-manna (Gstad)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.E2:\n buttonPressed = \"E2-5\";\n parse_Field = \"arena=E2 5-manna (Gstad)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.E3:\n buttonPressed = \"E3-5\";\n parse_Field = \"arena=E3 5-manna (Gstad)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.S1:\n buttonPressed = \"S1-11\";\n parse_Field = \"arena=S1 11-manna (Sunderbyn)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.R1:\n buttonPressed = \"R1-5\";\n parse_Field = \"arena=R1 5-manna (Rutvik)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.R2:\n buttonPressed = \"R2-5\";\n parse_Field = \"arena=R2 5-manna (Rutvik)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.R3:\n buttonPressed = \"R3-7\";\n parse_Field = \"arena=R3 7-manna (Rutvik)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.R4:\n buttonPressed = \"R4-7\";\n parse_Field = \"arena=R4 7-manna (Rutvik)\";\n out.setText(\"Field selected: \" + buttonPressed);\n break;\n\n case R.id.NextActivity:\n if(buttonPressed != null) {\n // If any button has been pressed, the continue button leads you to Screen 3\n // And sends through all necessary data\n Intent i = new Intent(this, Screen3.class);\n String date = getIntent().getStringExtra(\"DATE\");\n String email = getIntent().getStringExtra(\"ADMIN_EMAIL\");\n String adminOverride = getIntent().getStringExtra(\"ADMIN_OVERRIDE\");\n i.putExtra(\"FIELD_SELECTED\", buttonPressed);\n i.putExtra(\"PARSE_STRING_FIELD\", parse_Field);\n i.putExtra(\"DATE\", date);\n i.putExtra(\"ADMIN_EMAIL\", email);\n i.putExtra(\"ADMIN_OVERRIDE\", adminOverride);\n startActivity(i);\n } else {\n Toast toast = Toast.makeText(getApplicationContext(), \"Please select a field.\", Toast.LENGTH_SHORT);\n toast.show();\n }\n\n default:\n break;\n }\n }", "@Override\r\n public void onClick(View v) {\n switch (v.getId()) {\r\n case R.id.btnAllSelect:\r\n allSelect();\r\n break;\r\n case R.id.btnUnSelect:\r\n unSelect();\r\n break;\r\n case R.id.btnEnter:\r\n Save();\r\n break;\r\n }\r\n \r\n }", "@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n\t\tcase R.id.btn_three_direct_sum_xuan_0:\r\n\t\t\tselectxuan0();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_1:\r\n\t\t\tselectxuan1();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_2:\r\n\t\t\tselectxuan2();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_3:\r\n\t\t\tselectxuan3();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_4:\r\n\t\t\tselectxuan4();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_5:\r\n\t\t\tselectxuan5();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_6:\r\n\t\t\tselectxuan6();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_7:\r\n\t\t\tselectxuan7();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_8:\r\n\t\t\tselectxuan8();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_9:\r\n\t\t\tselectxuan9();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_10:\r\n\t\t\tselectxuan10();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_11:\r\n\t\t\tselectxuan11();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_12:\r\n\t\t\tselectxuan12();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_13:\r\n\t\t\tselectxuan13();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_14:\r\n\t\t\tselectxuan14();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_15:\r\n\t\t\tselectxuan15();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_16:\r\n\t\t\tselectxuan16();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_17:\r\n\t\t\tselectxuan17();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_18:\r\n\t\t\tselectxuan18();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_19:\r\n\t\t\tselectxuan19();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_20:\r\n\t\t\tselectxuan20();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_21:\r\n\t\t\tselectxuan21();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_22:\r\n\t\t\tselectxuan22();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_23:\r\n\t\t\tselectxuan23();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_24:\r\n\t\t\tselectxuan24();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_25:\r\n\t\t\tselectxuan25();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_26:\r\n\t\t\tselectxuan26();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_three_direct_sum_xuan_27:\r\n\t\t\tselectxuan27();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\r\n public void onClick(View v) {\n switch (v.getId()) {\r\n case R.id.btn_u_one:\r\n startTest(ONE);\r\n break;\r\n case R.id.btn_u_two:\r\n startTest(TWO);\r\n break;\r\n }\r\n }", "@Override\n public void onClick(View whichbtn) {\n\n switch (whichbtn.getId()) {\n case R.id.bt_ssspp:\n intent.setClass(ShowBranchAndBound.this, BranchAndBoundSSSPPActivity.class);\n startActivity(intent);\n break;\n case R.id.bt_loading_prob:\n intent.setClass(ShowBranchAndBound.this, BranchAndBoundLoadingProbActivity.class);\n startActivity(intent);\n break;\n case R.id.bt_0and1k_pro:\n intent.setClass(ShowBranchAndBound.this, BranchAndBound0And1KProbActivity.class);\n startActivity(intent);\n break;\n }\n }", "public void selected(String action);", "private static By bButton(String sBy) {\n String sBy1 = sBy.toLowerCase().trim();\n String sBy2 = \"Continue\";\n switch(sBy1){\n case \"continue\": sBy2 = \"Continue\";\n break;\n case \"complete\": sBy2 = \"Complete\";\n break;\n case \"mvp plans\": sBy2 = \"MVP Plans\";\n break;\n case \"vip report\": sBy2 = \"VIP Report\";\n break;\n }\n String locator = \"//button[text()='\"+sBy2+\"']\";\n return By.xpath(locator) ;\n }", "void onClick(int id);", "private Technique clickButton(TextButton button) {\n\t\tInputEvent event1 = new InputEvent();\n event1.setType(InputEvent.Type.touchDown);\n button.fire(event1);\n InputEvent event2 = new InputEvent();\n event2.setType(InputEvent.Type.touchUp);\n button.fire(event2);\n return selectedTechnique;\n\t}", "@Override\n\tpublic void onClick(View arg0) {\n \t\t\n \t\t\n \t\t\n \t\tswitch(arg0.getId())\n \t\t{\n \t\tcase R.id.button1 : result();\n \t\t\t\t\t\t\tbreak;\n \t\tcase R.id.button2 : clr1();\n \t\t\t\t\t\t\tbreak;\n \t\t}\t\t\n\t\t\n\t}", "public void regular(int buttonId) {\n\t\tswitch (stage) {\n\t\tcase 0:\n\t\t\tinterpreter.sendOptions(\"Select an Option\", \"Who are you?\", \"Sorry, I haven't got any.\", \"Go get a job!\", \"Ok. Here you go.\", \"Is there anything down this alleyway?\");\n\t\t\tstage = 1;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tswitch (buttonId) {\n\t\t\tcase 1:\n\t\t\t\tinterpreter.sendDialogues(player, FacialExpression.NORMAL, \"Who are you?\");\n\t\t\t\tstage = 10;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tinterpreter.sendDialogues(player, FacialExpression.NORMAL, \"Sorry, I haven't got any.\");\n\t\t\t\tstage = 20;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tinterpreter.sendDialogues(player, FacialExpression.NORMAL, \"Go get a job!\");\n\t\t\t\tstage = 30;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tinterpreter.sendDialogues(player, FacialExpression.NORMAL, \"Ok. Here you go.\");\n\t\t\t\tstage = 40;\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tinterpreter.sendDialogues(player, FacialExpression.NORMAL, \"Is there anything down this alleyway?\");\n\t\t\t\tstage = 50;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tinterpreter.sendDialogues(npc, FacialExpression.NORMAL, \"Charles. Charles E. Trampin' at your service. Now, about\", \"that change you were going to give me...\");\n\t\t\tstage = 0;\n\t\t\tbreak;\n\t\tcase 20:\n\t\t\tinterpreter.sendDialogues(npc, FacialExpression.NORMAL, \"Thanks anyways!\");\n\t\t\tstage = 21;\n\t\t\tbreak;\n\t\tcase 21:\n\t\t\tend();\n\t\t\tbreak;\n\t\tcase 30:\n\t\t\tinterpreter.sendDialogues(npc, FacialExpression.NORMAL, \"You startin? I hope your nose falls off!\");\n\t\t\tstage = 21;\n\t\t\tbreak;\n\t\tcase 40:\n\t\t\tinterpreter.sendDialogues(npc, FacialExpression.NORMAL, \"Hey, thanks alot!\");\n\t\t\tstage = 41;\n\t\t\tbreak;\n\t\tcase 41:\n\t\t\tinterpreter.sendOptions(\"Select an Option\", \"No problem.\", \"Don't I get some sort of quest hint or something now?\");\n\t\t\tstage = 42;\n\t\t\tbreak;\n\t\tcase 42:\n\t\t\tswitch (buttonId) {\n\t\t\tcase 1:\n\t\t\t\tinterpreter.sendDialogues(player, FacialExpression.NORMAL, \"No problem.\");\n\t\t\t\tstage = 180;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tinterpreter.sendDialogues(player, FacialExpression.NORMAL, \"So...don't I get some sort of quest hint or something now?\");\n\t\t\t\tstage = 190;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 180:\n\t\t\tend();\n\t\t\tif (player.getInventory().contains(995, 1))\n\t\t\t\tplayer.getInventory().remove(new Item(995, 1));\n\t\t\telse\n\t\t\t\tplayer.getPacketDispatch().sendMessage(\"You need one coin to give away.\");\n\t\t\tbreak;\n\t\tcase 190:\n\t\t\tinterpreter.sendDialogues(npc, FacialExpression.NORMAL, \"Huh? What do you mean? That wasn't why\", \" I asked you for money.\");\n\t\t\tstage = 191;\n\t\t\tbreak;\n\t\tcase 191:\n\t\t\tinterpreter.sendDialogues(npc, FacialExpression.NORMAL, \"I just need to eat...\");\n\t\t\tstage = 192;\n\t\t\tbreak;\n\t\tcase 192:\n\t\t\tend();\n\t\t\tbreak;\n\t\tcase 800:\n\t\t\tnpc(\"The ruthless and notorious criminal gang known as the\", \"Black Arm Gang have their headquarters down there.\");\n\t\t\tstage = 801;\n\t\t\tbreak;\n\t\tcase 801:\n\t\t\toptions(\"Thank you for the warning!\", \"Do you think they would let me join?\");\n\t\t\tstage = 802;\n\t\t\tbreak;\n\t\tcase 802:\n\t\t\tswitch (buttonId) {\n\t\t\tcase 1:\n\t\t\t\tplayer(\"Thanks for the warning!\");\n\t\t\t\tstage = 803;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tplayer(\"Do you think they would let me join?\");\n\t\t\t\tstage = 804;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 803:\n\t\t\tnpc(\"Don't worry about it.\");\n\t\t\tstage = 806;\n\t\t\tbreak;\n\t\tcase 804:\n\t\t\tnpc(\"You never know. You'll find a lady down there called\", \"Katrine. Speak to her.\");\n\t\t\tstage = 807;\n\t\t\tbreak;\n\t\tcase 807:\n\t\t\tnpc(\"But don't upset her, she's pretty dangerous.\");\n\t\t\tstage = 808;\n\t\t\tbreak;\n\t\tcase 808:\n\t\t\tnpc(\"I also heard that Reldo the librarian\", \"knows more about them, go talk to him.\");\n\t\t\tstage = 809;\n\t\t\tbreak;\n\t\tcase 809:\n\t\t\tend();\n\t\t\tbreak;\n\t\tcase 806:\n\t\t\tplayer(\"Do you think they would let me join?\");\n\t\t\tstage = 804;\n\t\t\tbreak;\n\t\tcase 50:\n\t\t\tif (quest.getStage() == 0) {\n\t\t\t\tnpc(\"Funny you should mention that...there is actually.\");\n\t\t\t\tstage = 800;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (quest.getStage() == 30 || quest.getStage() == 40 || quest.getStage() == 50) {\n\t\t\t\tnpc(\"Funny you should mention that...there is actually.\");\n\t\t\t\tstage = 51;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tinterpreter.sendDialogues(npc, FacialExpression.NORMAL, \"Nope, nothing at all.\");\n\t\t\tstage = 192;\n\t\t\tbreak;\n\t\tcase 51:\n\t\t\tnpc(\"The ruthless and notorious criminal gang known as the\", \"Black Arm Gang have their headquarters down there.\");\n\t\t\tstage = 52;\n\t\t\tbreak;\n\t\tcase 52:\n\t\t\toptions(\"Thank you for the warning!\", \"Do you think they would let me join?\");\n\t\t\tstage = 53;\n\t\t\tbreak;\n\t\tcase 53:\n\t\t\tswitch (buttonId) {\n\t\t\tcase 1:\n\t\t\t\tplayer(\"Thanks for the warning!\");\n\t\t\t\tstage = 54;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tplayer(\"Do you think they would let me join?\");\n\t\t\t\tstage = 55;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 54:\n\t\t\tnpc(\"Don't worry about it.\");\n\t\t\tstage = 56;\n\t\t\tbreak;\n\t\tcase 55:\n\t\t\tnpc(\"You never know. You'll find a lady down there called\", \"Katrine. Speak to her.\");\n\t\t\tstage = 57;\n\t\t\tbreak;\n\t\tcase 57:\n\t\t\tnpc(\"But don't upset her, she's pretty dangerous.\");\n\t\t\tstage = 58;\n\t\t\tbreak;\n\t\tcase 58:\n\t\t\tquest.setStage(50);\n\t\t\tend();\n\t\t\tbreak;\n\t\tcase 56:\n\t\t\tplayer(\"Do you think they would let me join?\");\n\t\t\tstage = 55;\n\t\t\tbreak;\n\t\t}\n\t}", "public void buttonPress(ActionEvent event) {\r\n Button clickedButton = (Button) event.getSource();\r\n String selectedButton = clickedButton.getId();\r\n System.out.print(selectedButton);\r\n \r\n // If the user correctly guesses the winning button\r\n if (correctButtonName.equals(selectedButton)) {\r\n \r\n //Displays a popup alerting the user that they won the game.\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"You Win!\");\r\n alert.setHeaderText(\"Congratulations, you found the treasure!\");\r\n alert.setContentText(\"Would you like to play again?\");\r\n ButtonType okButton = new ButtonType(\"Play again\");\r\n ButtonType noThanksButton = new ButtonType(\"No Thanks!\");\r\n alert.getButtonTypes().setAll(okButton, noThanksButton);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n \r\n //If the user selects \"Play again\" a new button will be randomly selected\r\n if (result.get() == okButton ){\r\n //Chooses a random button from the list of buttons\r\n correctButtonName = buttonList[(int)(Math.random() * buttonList.length)];\r\n }\r\n //If the user does not select \"Play again\", the application will be closed\r\n else {System.exit(0);}\r\n \r\n }\r\n \r\n //If the user chooses any button except for the winning button\r\n else if (!selectedButton.equals(correctButtonName)) {\r\n \r\n //Displays a popup alerting the user that they did not find the treasure.\r\n Alert alert2 = new Alert(Alert.AlertType.INFORMATION);\r\n alert2.setTitle(\"No treasure!\");\r\n alert2.setHeaderText(\"There was no treasure found on that island\");\r\n alert2.setContentText(\"Would you like to continue searching for treasure?\");\r\n ButtonType ayeCaptain = new ButtonType (\"Continue Searching\");\r\n ButtonType noCaptain = new ButtonType (\"Quit\");\r\n alert2.getButtonTypes().setAll(ayeCaptain,noCaptain);\r\n Optional<ButtonType> result2 = alert2.showAndWait();\r\n \r\n if (result2.get() == ayeCaptain){\r\n //The search for treasure continues!\r\n }\r\n else{ \r\n System.exit(0);\r\n }\r\n }\r\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tswitch (v.getId()){\n\t\t\t\tcase R.id.search_add_btn:\n\t\t\t\t\tfind_add_ll.setVisibility(View.VISIBLE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase R.id.find_distence_ll:\n\t\t\t\t\tchoice = \"place\";\n\t\t\t\t\tFindHttpPost();\n\t\t\t\t\tfind_add_ll.setVisibility(View.GONE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase R.id.find_hot_ll:\n\t\t\t\t\tchoice = \"heat\";\n\t\t\t\t\tFindHttpPost();\n\t\t\t\t\tfind_add_ll.setVisibility(View.GONE);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\t}\n\t}", "public void clickById(String id) {\n\n\n driver.findElementById(id).click();\n\n\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n }\n }", "void onConfigureClick(long id);", "@Override\n public void onClick(View v) {\n buttonPressed = 0;\n switch (v.getId()) {\n case R.id.button01:\n buttonPressed = 1;\n break;\n\n case R.id.button02:\n buttonPressed = 2;\n break;\n }\n launchTask();\n }", "@Override\n\tpublic void onClick(View p1)\n\t{\n\t\tswitch(p1.getId()){\n\t\t\tcase R.id.btn_look:\n\t\t\t\tlook();\n\t\t\t\tbreak;\n\t\t\tcase R.id.btn_save:\n\t\t\t\tsave();\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n public void onClick(View arg0) {\n if (arg0 != null) {\n switch(arg0.getId()){\n case R.id.one:\n digitButtonPressed(\"1\");\n break;\n\n case R.id.two:\n digitButtonPressed(\"2\");\n break;\n\n case R.id.three:\n digitButtonPressed(\"3\");\n break;\n\n case R.id.four:\n digitButtonPressed(\"4\");\n break;\n\n case R.id.five:\n digitButtonPressed(\"5\");\n break;\n\n case R.id.six:\n digitButtonPressed(\"6\");\n break;\n\n case R.id.seven:\n digitButtonPressed(\"7\");\n break;\n\n case R.id.eight:\n digitButtonPressed(\"8\");\n break;\n\n case R.id.nine:\n digitButtonPressed(\"9\");\n break;\n\n case R.id.zero:\n digitButtonPressed(\"0\");\n break;\n\n case R.id.dot:\n digitButtonPressed(\".\");\n break;\n\n case R.id.add:\n symbolButtonPressed(\"+\");\n break;\n\n case R.id.subtract:\n symbolButtonPressed(\"-\");\n break;\n\n case R.id.multiply:\n symbolButtonPressed(\"x\");\n break;\n\n case R.id.divide:\n symbolButtonPressed(\"/\");\n break;\n\n case R.id.equal:\n pressedEqualButton();\n break;\n\n case R.id.clear:\n clear();\n break;\n\n case R.id.delete:\n pressedDeleteButton();\n break;\n\n default:\n loge(\"no support this operator, do nothing!\");\n break;\n }\n }\n }", "public void actionButton(String text);", "public void clica(String id) {\n getDriver().findElement(By.id(id)).click();\n }", "@Override\n public void onClick(View btn) {\n debug(\"onClick\");\n\n int caras = btn.getId();\n\n switch (caras) {\n case R.id.buttond2:\n case R.id.buttond3:\n case R.id.buttond4:\n case R.id.buttond6:\n case R.id.buttond8:\n case R.id.buttond10:\n case R.id.buttond12:\n case R.id.buttond20:\n case R.id.buttond24:\n case R.id.buttond100:\n int carasDado = getNumeroCaras(btn);\n debug(\"onClick\", \"\", carasDado);\n getDiceRollerPresenter().dicePressed(carasDado);\n break;\n\n case R.id.buttonListaTiradas:\n debug(\"onClick\");\n getDiceRollerPresenter().botonListaPressed();\n break;\n }\n }", "public void toSelectingAction() {\n }", "@Override\n public void onClick(View v) {\n switch(v.getId()) {\n case R.id.button1:\n display.setText(button1.getText());\n button1.setBackgroundColor(Color.BLUE);\n reset(1);\n tuningF = getNoteFrequency(1, tuning);\n tuningIndex = 1;\n break;\n case R.id.button2:\n display.setText(button2.getText());\n button2.setBackgroundColor(Color.BLUE);\n reset(2);\n tuningF = getNoteFrequency(2, tuning);\n tuningIndex = 2;\n break;\n case R.id.button3:\n display.setText(button3.getText());\n button3.setBackgroundColor(Color.BLUE);\n reset(3);\n tuningF = getNoteFrequency(3, tuning);\n tuningIndex = 3;\n break;\n case R.id.button4:\n display.setText(button4.getText());\n button4.setBackgroundColor(Color.BLUE);\n reset(4);\n tuningF = getNoteFrequency(4, tuning);\n tuningIndex = 4;\n break;\n case R.id.button5:\n display.setText(button5.getText());\n button5.setBackgroundColor(Color.BLUE);\n reset(5);\n tuningF = getNoteFrequency(5, tuning);\n tuningIndex = 5;\n break;\n case R.id.button6:\n display.setText(button6.getText());\n button6.setBackgroundColor(Color.BLUE);\n reset(6);\n tuningF = getNoteFrequency(6, tuning);\n tuningIndex = 6;\n break;\n }\n }", "public void evaluarRespuesta_1(View view){\n int valdiar = btnOpcion1.getId();\n btnOpcion1.setBackgroundColor(Color.rgb(246, 165, 241));\n idRespValidar.setText( Integer.toString( valdiar ) );\n\n // opciones\n btnOpcion2.setBackgroundColor(Color.rgb(208, 215, 211));\n btnOpcion3.setBackgroundColor(Color.rgb(208, 215, 211));\n btnOpcion4.setBackgroundColor(Color.rgb(208, 215, 211));\n Toast.makeText(this, \"Puedes cambiar de opción y luego Clic en Calificar.\", Toast.LENGTH_SHORT).show();\n\n // Muestro Boton de Calificar\n btnCalificar.setVisibility(View.VISIBLE);\n\n }", "public void ButtonStatusToOneWay() throws InterruptedException {\n\n Thread.sleep(10000);\n //action=new Actions(this.driver);\n if (oneWayButton.isSelected()) {\n System.out.println(\"One way Button is already selected\");\n } else {\n wait.until(ExpectedConditions.elementSelectionStateToBe(oneWayButton,false));\n oneWayButton.click();\n System.out.println(\"one way button is clicked\");\n }\n\n\n }", "AppStandard selectById(String id);", "private void checkButton(ActionEvent e) {\n List<PuzzleButton> selectedButtons = buttons.stream()\n .filter(PuzzleButton::isSelectedButton)\n .collect(Collectors.toList());\n PuzzleButton currentButton = (PuzzleButton) e.getSource();// getting current button\n currentButton.setSelectedButton(true);\n int currentButtonIndex = buttons.indexOf(currentButton);\n //if no button are selected, do not update collection of PuzzleButton\n if (selectedButtons.size() == 1) {\n int lastClickedButtonIndex = 0;\n\n for (PuzzleButton button : buttons) {\n if (button.isSelectedButton() && !button.equals(currentButton)) {\n lastClickedButtonIndex = buttons.indexOf(button);\n }\n }\n Collections.swap(buttons, lastClickedButtonIndex, currentButtonIndex);\n updateButtons();\n }\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tint id= v.getId();\n\t\t\n\t\tswitch (id){\n\t\tcase R.id.button1:\n\t\t\tshowDialog();\n\t\t\tbreak;\n\t\t}\n\t}", "private void refreshButtons() {\n flowPane.getChildren().clear();\n\n for(String testName : Files.listTests()) {\n TestJson info;\n try {\n info = TestParser.read(testName);\n } catch(FileNotFoundException e) {\n continue; /* Skip */\n }\n\n JFXButton button = new JFXButton(testName);\n button.pseudoClassStateChanged(PseudoClass.getPseudoClass(\"select-button\"), true);\n\n button.setOnAction(e -> buttonPressed(info));\n\n if(!filter(info, button))\n continue;\n\n // If this model asked to be put in a specific place, put it there\n if(!info.custom && info.order >= 0)\n flowPane.getChildren().add(Math.min(info.order, flowPane.getChildren().size()), button);\n else\n flowPane.getChildren().add(button);\n }\n }", "private void init_buttons(){\r\n /**\r\n * BOTON NUEVO\r\n */\r\n im_tool1.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n botonNuevo();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON EDITAR\r\n */\r\n im_tool2.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEditar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON GUARDAR\r\n */\r\n im_tool3.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonGuardar();\r\n }\r\n }\r\n }); \r\n /**\r\n * BOTON ELIMINAR\r\n */\r\n im_tool4.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEliminar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON IMPRIMIR\r\n */\r\n im_tool5.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){ \r\n botonImprimir();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON REGRESAR\r\n */\r\n im_tool6.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON POR ASIGNAR\r\n */\r\n im_tool7.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON NOTAS DE CREDITO\r\n */\r\n im_tool8.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON DEVOLUCION\r\n */\r\n im_tool9.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON BUSCAR\r\n */\r\n im_tool12.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n switch (mouseEvent.getClickCount()){\r\n case 1:\r\n botonInicio();\r\n botonBuscar();\r\n break;\r\n case 2:\r\n Datos.setIdButton(2003041);\r\n Gui.getInstance().showBusqueda(\"Busqueda\"); \r\n break;\r\n }\r\n }\r\n });\r\n /**\r\n * SELECCION EN LA TABLA\r\n */\r\n tb_guias.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n if ((tb_guias.getItems() != null) && (!tb_guias.getItems().isEmpty()))\r\n selectedRowGuide();\r\n }\r\n }\r\n }); \r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nroguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nroguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n Datos.setLog_cguias(new log_CGuias()); \r\n boolean boo = Ln.getInstance().check_log_CGuias_rela_caja(tf_nroguia.getText()); \r\n numGuias = 0;\r\n if(boo){\r\n Datos.setRep_log_cguias(Ln.getInstance().find_log_CGuias(tf_nroguia.getText(), \"\", \"ncaja\", Integer.parseInt(rows)));\r\n loadTable(Datos.getRep_log_cguias()); \r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de \" + ScreenName + \" NO existe!\", \"A\");\r\n tf_nroguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nrorguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nrorguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n boolean booa = true; \r\n if(booa){\r\n boolean booc = Ln.getInstance().check_log_CGuias_caja(tf_nrorguia.getText()); \r\n if(booc){\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n else{\r\n for (int i = 0; i < log_guide_guia.size(); i++) {\r\n if(tf_nrorguia.getText().equals(tb_guias.getItems().get(i).getGuias())){\r\n booa = false;\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n break;\r\n }\r\n } \r\n if(booa){\r\n log_Guide_rel_inv guide_carga = new log_Guide_rel_inv();\r\n\r\n List<Fxp_Archguid_gfc> data = \r\n Ln.getList_log_Archguid_gfc(Ln.getInstance().find_Archguid_gfc(tf_nrorguia.getText()));\r\n\r\n if (data.get(0).getStat_guia().equals(\"X\")\r\n || data.get(0).getStat_guia().equals(\"C\")){\r\n guide_carga.setNumorden(String.valueOf((log_guide_guia.size() + 1)));\r\n guide_carga.setGuias(tf_nrorguia.getText());\r\n guide_carga.setNumfact(data.get(0).getNumfact());\r\n guide_carga.setNumclie(data.get(0).getNumclie());\r\n\r\n if (data.get(0).getStat_guia().equals(\"A\")){\r\n if (tipoOperacion == 1)\r\n guide_carga.setStat_guia(null);\r\n else\r\n guide_carga.setStat_guia(data.get(0).getStat_guia());\r\n }\r\n else{\r\n guide_carga.setStat_guia(null);\r\n }\r\n \r\n \r\n log_guide_guia.add(guide_carga);\r\n\r\n loadTableGuide_guias();\r\n change_im_val(200, im_checkg); \r\n\r\n numFactCarga = numFactCarga + data.get(0).getNumfact();\r\n numClieCarga = numClieCarga + data.get(0).getNumclie();\r\n\r\n tf_nrorguia.setText(\"\");\r\n }else{\r\n if (data.get(0).getStat_guia().equals(\"\")){\r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO tiene relación de Guia de Carga!\", \"A\");\r\n }\r\n else{\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n }\r\n tf_nrorguia.requestFocus();\r\n }\r\n \r\n }\r\n }\r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO existe!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n }", "void buttonPressed(ButtonType type);", "public void radioButtonChenged() {\n if (this.radioButtons.getSelectedToggle().equals(this.btn1))\r\n radioButtonlabel.setText(\"You selected table 1\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn2))\r\n radioButtonlabel.setText(\"You selected table 2\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn3))\r\n radioButtonlabel.setText(\"You selected table 3\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn4))\r\n radioButtonlabel.setText(\"You selected table 4\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn5))\r\n radioButtonlabel.setText(\"You selected table 5\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn6))\r\n radioButtonlabel.setText(\"You selected table 6\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn7))\r\n radioButtonlabel.setText(\"You selected table 7\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn8))\r\n radioButtonlabel.setText(\"You selected table 8\");\r\n\r\n }", "public void onClick(View v){\n\n //El id del boton seleccionado es v.getId\n switch (v.getId()) {\n\n //El id del boton seleccionado es v.getId\n case R.id.button:\n //Se manda a llamar la Facil\n Intent intent = new Intent(MainActivity.this,Niveles.class);\n startActivity(intent);\n break;\n\n //Esto también\n case R.id.settings_button:\n // Toast.makeText(getApplicationContext(),R.string.Pao,Toast.LENGTH_SHORT).show();\n Intent settings = new Intent(MainActivity.this,Configuracion.class);\n startActivity(settings);\n break;\n\n case R.id.credits_button:\n Intent credits = new Intent(MainActivity.this,Creditos.class);\n startActivity(credits);\n break;\n case R.id.salir:\n finish();\n break;\n }\n }", "protected void buttonPressed(int id, boolean checked, boolean bRefresh) {\r\n\t\t\t\t\r\n\t\tswitch (id) {\r\n\t\t\r\n\t\tcase BID_DUPLICATES :\r\n\t\t\tshowDuplicates = checked;\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t\t\r\n\t\tcase BID_FROM_WORKSPACE :\r\n\t\tcase BID_FROM_XML_CATALOG :\r\n\t\tcase BID_FROM_PROJECT :\r\n\t\tcase BID_FROM_REPOSITORY :\t\r\n\t\tcase BID_FROM_IMPORTS_ONLY :\t\t\t\r\n\t\t\tif (!checked) {\r\n\t\t\t\treturn ;\r\n\t\t\t}\t\t\t\r\n\t\t\tif (checked) {\r\n\t\t\t\tVIEW_FROM = id;\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\tdefault : \t\t\t\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\r\n\t\r\n\t\tif (bRefresh) {\r\n\t\t\trefresh();\r\n\t\t}\r\n\t}", "public abstract void executeBagButton();", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.btn_scan:\n btnSignalScan();\n break;\n default:\n break;\n }\n }", "public int handleButtonClicked(NumberPuzzleGame game){\n\t\tint emptyCellId = game.getEmptyCellId();\n\t\tButton buttonClicked = game.getButtonClicked();\n\t\tButton[] buttons = game.getButtons();\n\t\t\n\t\t//Your logic here\n\t\t//System.out.println(emptyCellId);\n\t\t//System.out.println(buttonClicked);\n\t\tint clicked_btn_id = -1;\n\t\tfor(int i=0;i<buttons.length;i++) {\n\t\t\tif(buttons[i] == buttonClicked) {\n\t\t\t\tclicked_btn_id = i;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(clicked_btn_id);\n\t\tif((clicked_btn_id<=15)&&(clicked_btn_id == emptyCellId-1 || clicked_btn_id == emptyCellId+1 || clicked_btn_id == emptyCellId-4 || clicked_btn_id == emptyCellId+4)){\n\t\t\tswapButton(buttons[emptyCellId], buttonClicked);\n\t\t\temptyCellId = clicked_btn_id;\n\t\t}\n\t\t\n\t\t//if(buttons[])\n\t\t/*for(int i=0;i<buttons.length;i++) {\n\t\t\tif(buttons[i] == buttonClicked) {\n\t\t\t\tSystem.out.println(buttons[i]);\n\t\t\t\tSystem.out.println(buttonClicked);\n\t\t\t\temptyCellId = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} */\n\t\t\n\t\treturn emptyCellId;\n\n\t}", "public String findButtonId(ActionEvent event) {\n Button buttonObj = (Button) event.getSource();\n return buttonObj.getId();\n }", "public void clickYes ();", "@Override\n public void onClick(View v) {\n ans1.setBackgroundColor(getResources().getColor(R.color.ans_btn));\n ans2.setBackgroundColor(getResources().getColor(R.color.ans_btn));\n ans3.setBackgroundColor(getResources().getColor(R.color.ans_btn));\n\n //Set new background color to highlight selected answer.\n //Save selected answer button view in userSelection.\n switch (v.getId()) {\n case R.id.ans1:\n System.out.println(\"Answer 1 is selected\");\n ans1.setBackgroundColor(getResources().getColor(R.color.selected_answer_btn));\n userSelection = ans1;\n break;\n\n case R.id.ans2:\n System.out.println(\"Answer 2 is selected\");\n ans2.setBackgroundColor(getResources().getColor(R.color.selected_answer_btn));\n userSelection = ans2;\n break;\n case R.id.ans3:\n System.out.println(\"Answer 3 is selected\");\n ans3.setBackgroundColor(getResources().getColor(R.color.selected_answer_btn));\n userSelection = ans3;\n break;\n }\n }", "@Override\n public void onClick(View v) {\n int id = v.getId();\n\n if (id == R.id.mini) {\n onWork();\n }\n }", "public void changedEventClicktoJavaFX(int id) {\n }", "@Override\n public void onClick(View view) {\n switch (view.getId()){\n case R.id.temp_rbt:\n isTemp = true;\n break;\n case R.id.temp_rbf:\n isTemp = false;\n break;\n case R.id.idf_rbt:\n isIdf = true;\n break;\n case R.id.idf_rbf:\n isIdf = false;\n break;\n case R.id.sig_rbt:\n isSig = true;\n break;\n case R.id.sig_rbf:\n isSig = false;\n break;\n case R.id.healthcode_rbt:\n isHcode = true;\n break;\n case R.id.healthcode_rbf:\n isHcode = false;\n break;\n }\n }", "Optional<ButtonSliderType> getBtnSwitch(TypeUnitSound typeUnitSound);", "@Override\n\tpublic void onClick(View v) {\n\t\tint id=v.getId();\n\t\tif(id==mainView.titleBarView.rightBtn.getId()||\n\t\t id==mainView.titleBarView.search_ImageView.getId())\n\t\t{\n\t\t\tlogic_clickSearchBtn();\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n int selectedId = radioGroup.getCheckedRadioButtonId();\n\n\n int selectedRadioButtonID = radioGroup.getCheckedRadioButtonId();\n checkedStateExperience = tvExpYrs.getText().toString();\n\n switch (selectedRadioButtonID) {\n case R.id.radioButton1:\n checkStatesButton = \"1\";\n\n\n\n String str = checkedStateExperience;\n String strNew = str.replace(\"+\", \"\");\n getFullData(mlat, mlng, prefManager.getApikey(), query, rad, strNew);\n\n break;\n case R.id.radioButton2:\n checkStatesButton = \"2\";\n String ast = checkedStateExperience;\n String nnew = ast.replace(\"+\", \"\");\n\n getData(mlat, mlng, prefManager.getApikey(), query, rad, nnew);\n\n break;\n\n }\n\n\n bts.dismiss();\n\n }", "public static Gliders forId(int id) {\r\n\t\tfor (Gliders i : Gliders.values()) {\r\n\t\t\tif (i.getButton() == id) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String button1_action() {\n getSessionBean1().setSelected_algos(listbox1.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_tiers(listbox2.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_runs(listbox3.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_storageelems(listbox4.getValueAsStringArray(this.getContext()));\n //getSessionBean1().setSelected_branches(listbox5.getValueAsStringArray(this.getContext()));\n \n //String selected_primary = (String)dropDown1.getSelected().toString();\n //log(\"Selected Primary is\"+selected_primary);\n \n if ( dropDown1.getSelected() != null ||\n getSessionBean1().getSelected_algos().length !=0 || \n getSessionBean1().getSelected_tiers().length !=0 ||\n getSessionBean1().getSelected_runs().length != 0 ||\n getSessionBean1().getSelected_storageelems().length !=0 \n //getSessionBean1().getSelected_branches().length !=0\n ) {\n getSessionBean1().setItems_selected(\"1\");\n }\n return null;\n }", "public void settingBtnClick() {\n\t}", "AfterServiceSheet selectByPrimaryKey(Long id);", "public void actionPerformed(ActionEvent e) {\n JRadioButton radioButton = (JRadioButton) MainUi.map.get(\"xiaoGuoDengSuCaiTypeButton\");\r\n JList suCai_list = (JList) MainUi.map.get(\"suCai_list\");\r\n JList suCaiLightType = (JList) MainUi.map.get(\"suCaiLightType\");\r\n if (suCai_list.getSelectedIndex() != -1) {\r\n String suCaiName = suCai_list.getSelectedValue().toString();\r\n if (!radioButton.isSelected()) {\r\n int suCaiNum = Integer.valueOf(suCaiName.split(\"--->\")[1]).intValue();\r\n new DongZuoSuCaiEditUI().show(suCaiName, suCaiNum);\r\n } else {\r\n int denKuNum = suCaiLightType.getSelectedIndex();\r\n int suCaiNum = Integer.valueOf(suCaiName.split(\"--->\")[1]).intValue();\r\n\r\n new SuCaiEditUI().show(suCaiName, suCaiNum, denKuNum);\r\n }\r\n }\r\n }", "@Override\n public void onClick(View arg0) {\n\n // get selected radio button from radioGroup\n int selectedId = RadioType.getCheckedRadioButtonId();\n\n // find the radiobutton by returned id\n RadioButton radioButton = (RadioButton) findViewById(selectedId);\n rdButtonSelectedText = radioButton.getText().toString();\n //Call method to get Adjustment List\n if (common.isConnected()) {\n AsyncStockReturnListWSCall task = new AsyncStockReturnListWSCall();\n task.execute();\n }\n }", "public void chooseSeat(ActionEvent actionEvent) {\n for (int i = 0; i < 20; i++) {\n if (actionEvent.getSource().toString().trim().equals(seatsArray.get(i).toString().trim())) {\n if (chosenBtn != null)\n chosenBtn.setStyle(\"\"); //For changing the colour back to clear if they choose another seat\n this.chosenBtn = seatsArray.get(i);\n seatNum = this.chosenBtn.getId();\n seatsArray.get(i).setStyle(\"-fx-background-color: LIGHTBLUE\");\n }\n }\n }", "public void doButtonEinfuegen() {\n\t\tDialogSelectionDjinn dsd = new DialogSelectionDjinn((Frame) this.owner, \"Auswahl Tabellenspalte\",\n\t\t\t\tnew DefaultListViewComponentFactory((allts ? this.tabelle.getDiagramm().getFieldCache()\n\t\t\t\t\t\t: new Vector<Object>(Arrays.asList(this.tabelle.getColumns())))));\n\t\tif (dsd.isSelected()) {\n\t\t\tVector v = dsd.getSelection();\n\t\t\tVector values = new Vector();\n\t\t\tfor (int i = 0, len = v.size(); i < len; i++) {\n\t\t\t\tif (this.getType() == 0) {\n\t\t\t\t\tvalues.addElement(v.elementAt(i));\n\t\t\t\t} else if ((this.getType() == 1) || (this.getType() == 2)) {\n\t\t\t\t\tvalues.addElement(new ToStringContainer((TabellenspaltenModel) v.elementAt(i), this.tabelle));\n\t\t\t\t} else if (this.getType() == 3) {\n\t\t\t\t\tvalues.addElement(Archimedes.Factory.createOrderMember((TabellenspaltenModel) v.elementAt(i)));\n\t\t\t\t} else if (this.getType() == 4) {\n\t\t\t\t\tvalues.addElement(Archimedes.Factory.createSelectionMember((TabellenspaltenModel) v.elementAt(i)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0, len = values.size(); i < len; i++) {\n\t\t\t\tboolean found = false;\n\t\t\t\tfor (int j = 0, lenj = this.tabellenspalten.size(); j < lenj; j++) {\n\t\t\t\t\tif (this.getType() == 0) {\n\t\t\t\t\t\tTabellenspaltenModel tsm = (TabellenspaltenModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (values.elementAt(i) == tsm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ((this.getType() == 1) || (this.getType() == 2)) {\n\t\t\t\t\t\tToStringContainer tsc = (ToStringContainer) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((ToStringContainer) values.elementAt(i)).getTabellenspalte() == tsc) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.getType() == 3) {\n\t\t\t\t\t\tOrderMemberModel omm = (OrderMemberModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((OrderMemberModel) values.elementAt(i)).getOrderColumn() == omm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.getType() == 4) {\n\t\t\t\t\t\tSelectionMemberModel smm = (SelectionMemberModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((SelectionMemberModel) values.elementAt(i)).getColumn() == smm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!found) {\n\t\t\t\t\tif (this.anzeige.getSelectedRow() >= 0) {\n\t\t\t\t\t\tthis.tabellenspalten.add(this.anzeige.getSelectedRow(), values.get(i));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.tabellenspalten.add(values.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.doRepaint();\n\t\t}\n\t}", "public abstract void executeRunButton();", "public Button getCustomButton(String id) {\n\t\treturn customButtons.get(id);\n\t}", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.btn_create:\n SelectFragment(0);\n tabColorClear();\n btn_create.setBackground(getResources().getDrawable(R.drawable.lines_bg5));\n btn_create.setTextColor(Color.argb(255,66,143,219));\n break;\n case R.id.btn_add_option:\n if(!App.voteInfo.isFirstStepFinished()){\n Toast.makeText(StartActivity.this,\"请先完成第一步\",Toast.LENGTH_SHORT).show();\n return;\n }\n SelectFragment(1);\n tabColorClear();\n btn_add_option.setBackground(getResources().getDrawable(R.drawable.lines_bg5));\n btn_add_option.setTextColor(Color.argb(255,66,143,219));\n break;\n case R.id.btn_select_voters:\n if(!App.voteInfo.isSecondStepFinished()){\n Toast.makeText(StartActivity.this,\"请先完成第二步\",Toast.LENGTH_SHORT).show();\n return;\n }\n SelectFragment(2);\n tabColorClear();\n btn_select_voters.setBackground(getResources().getDrawable(R.drawable.lines_bg5));\n btn_select_voters.setTextColor(Color.argb(255,66,143,219));\n break;\n case R.id.btn_set_reward:\n if(!App.voteInfo.getIfSetReward()){\n Toast.makeText(StartActivity.this,\"还未开启设置奖励,请在第一步中开启\",Toast.LENGTH_SHORT).show();\n return;\n }\n if(!App.voteInfo.isThirdStepFinished()){\n Toast.makeText(StartActivity.this,\"请先完成第三步\",Toast.LENGTH_SHORT).show();\n return;\n }\n SelectFragment(3);\n tabColorClear();\n btn_set_reward.setBackground(getResources().getDrawable(R.drawable.lines_bg5));\n btn_set_reward.setTextColor(Color.argb(255,66,143,219));\n break;\n }\n }", "public void buttonClicked();", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tLog.d(\"vggg\", \"bjbjb\");\r\n\t\t\t\tgetnumber_Fourgroup6_xuan_clear();\r\n\t\t\t\tgetrand();\r\n\t\t\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\t\t\tint xuan = rand[i];\r\n\t\t\t\t\tswitch (xuan) {\r\n\t\t\t\t\tcase 0:\r\n\r\n\t\t\t\t\t\tselectxuan0();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\tselectxuan1();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\tselectxuan2();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\tselectxuan3();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\tselectxuan4();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 5:\r\n\t\t\t\t\t\tselectxuan5();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 6:\r\n\t\t\t\t\t\tselectxuan6();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 7:\r\n\t\t\t\t\t\tselectxuan7();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 8:\r\n\t\t\t\t\t\tselectxuan8();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 9:\r\n\t\t\t\t\t\tselectxuan9();\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Then(\"^I click by Park radio button$\")\n public void i_click_by_Park_radio_button() {\n onViewWithId(R.id.byPark).click();\n }", "public void onClick(View arg0) {\n\n int i = arg0.getId();\n // login button was pressed\n\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.tv_praise:\n tv_praise(v);\n break;\n case R.id.tv_bad_review:\n tv_bad_review(v);\n break;\n case R.id.tv_custom:\n tv_custom(v);\n break;\n//\n default:\n break;\n }\n }", "@Override\n\tprotected void setOnClickForButtons() {\n\t\tthis.buttons[0].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getActivity(), MainScreenActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\tMainFunctions.selectedOption = 1;\n\t\t\t\tdestroyServices();\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\t/* message box - onclick event */\n\t\tthis.buttons[1].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdestroyServices();\n\t\t\t\tMainFunctions.selectedOption = 2;\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t\t/* one tick sound */\n\t\tfor (int i = 0; i < this.totalButtons; i++){\n\t\t\tfinal String desc = buttons[i].getTag().toString();\n\t\t\tbuttons[i].setOnFocusChangeListener(new View.OnFocusChangeListener() {\n\t\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\t\tif (hasFocus) {\n\t\t\t\t\t\tLog.i(TAG, \"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tlogFunctions.logTextFile(\"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tspeakButton(desc, 1.0f, 1.0f);\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}", "public static void queryButtonSelection(ActionContext actionContext){\n Button editButton = actionContext.getObject(\"editButton\");\n Button deleteButton = actionContext.getObject(\"deleteButton\");\n Thing queryForm = actionContext.getObject(\"queryForm\");\n Thing store = actionContext.getObject(\"store\");\n \n editButton.setEnabled(false);\n deleteButton.setEnabled(false);\n \n Object params = queryForm.doAction(\"getValues\", actionContext);\n store.doAction(\"load\", actionContext, \"params\", params);\n }", "@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n\t\tcase R.id.btn_Fourgroup6_xuan_big:\r\n\t\t\tclearxuan();\r\n\r\n\t\t\tbtn_Fourgroup6_xuan_big.setTextColor(0xff000000);\r\n\t\t\tbtn_Fourgroup6_xuan_big.setBackgroundResource(R.drawable.change);\r\n\t\t\tvibrator.vibrate(new long[] { 0, 100 }, -1);\r\n\t\t\tgetnumber_Fourgroup6_xuan_big();\r\n\t\t\t// RelativeLayout_addbasket.setBackgroundResource(R.drawable.yellow_button);\r\n\t\t\t// imagebtn_addbasket.setVisibility(View.VISIBLE);\r\n\t\t\t// LinearLayout_nochoose.setVisibility(View.GONE);\r\n\t\t\tmMainActivity.getresultint(getresultint());\r\n\t\t\tmMainActivity.showresult(getresult());\r\n\t\t\tmMainActivity.getmoney();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_little:\r\n\t\t\tclearxuan();\r\n\t\t\tbtn_Fourgroup6_xuan_little.setTextColor(0xff000000);\r\n\t\t\tbtn_Fourgroup6_xuan_little.setBackgroundResource(R.drawable.change);\r\n\t\t\tvibrator.vibrate(new long[] { 0, 100 }, -1);\r\n\t\t\tgetnumber_Fourgroup6_xuan_little();\r\n\t\t\tmMainActivity.getresultint(getresultint());\r\n\t\t\tmMainActivity.showresult(getresult());\r\n\t\t\tmMainActivity.getmoney();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_all:\r\n\t\t\tclearxuan();\r\n\t\t\tbtn_Fourgroup6_xuan_all.setTextColor(0xff000000);\r\n\t\t\tbtn_Fourgroup6_xuan_all.setBackgroundResource(R.drawable.change);\r\n\t\t\tvibrator.vibrate(new long[] { 0, 100 }, -1);\r\n\t\t\tgetnumber_Fourgroup6_xuan_all();\r\n\t\t\tmMainActivity.getresultint(getresultint());\r\n\t\t\tmMainActivity.showresult(getresult());\r\n\t\t\tmMainActivity.getmoney();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_odd:\r\n\t\t\tclearxuan();\r\n\t\t\tbtn_Fourgroup6_xuan_odd.setTextColor(0xff000000);\r\n\t\t\tbtn_Fourgroup6_xuan_odd.setBackgroundResource(R.drawable.change);\r\n\t\t\tvibrator.vibrate(new long[] { 0, 100 }, -1);\r\n\t\t\tgetnumber_Fourgroup6_xuan_odd();\r\n\t\t\tmMainActivity.getresultint(getresultint());\r\n\t\t\tmMainActivity.showresult(getresult());\r\n\t\t\tmMainActivity.getmoney();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_even:\r\n\t\t\tclearxuan();\r\n\t\t\tbtn_Fourgroup6_xuan_even.setTextColor(0xff000000);\r\n\t\t\tbtn_Fourgroup6_xuan_even.setBackgroundResource(R.drawable.change);\r\n\t\t\tvibrator.vibrate(new long[] { 0, 100 }, -1);\r\n\t\t\tgetnumber_Fourgroup6_xuan_even();\r\n\t\t\tmMainActivity.getresultint(getresultint());\r\n\t\t\tmMainActivity.showresult(getresult());\r\n\t\t\tmMainActivity.getmoney();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_clear:\r\n\t\t\tclearxuan();\r\n\t\t\tbtn_Fourgroup6_xuan_clear.setTextColor(0xff000000);\r\n\t\t\tbtn_Fourgroup6_xuan_clear.setBackgroundResource(R.drawable.change);\r\n\t\t\tvibrator.vibrate(new long[] { 0, 100 }, -1);\r\n\t\t\tgetnumber_Fourgroup6_xuan_clear();\r\n\t\t\tmMainActivity.getresultint(getresultint());\r\n\t\t\tmMainActivity.showresult(getresult());\r\n\t\t\tmMainActivity.getmoney();\r\n\t\t\tbreak;\r\n\r\n\t\tcase R.id.btn_Fourgroup6_xuan_0:\r\n\t\t\tselectxuan0();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_1:\r\n\t\t\tselectxuan1();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_2:\r\n\t\t\tselectxuan2();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_3:\r\n\t\t\tselectxuan3();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_4:\r\n\t\t\tselectxuan4();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_5:\r\n\t\t\tselectxuan5();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_6:\r\n\t\t\tselectxuan6();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_7:\r\n\t\t\tselectxuan7();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_8:\r\n\t\t\tselectxuan8();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_Fourgroup6_xuan_9:\r\n\t\t\tselectxuan9();\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void clickOnEditButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary.ant-btn-circle\"), SHORTWAIT);\r\n\t}", "public void checkBtn(View v){\n int id = radioGroup.getCheckedRadioButtonId();\n\n radioButton= findViewById(id);\n estatSTR=radioButton.getText().toString();\n //Toast.makeText(this, \"select: \"+ radioButton.getText(),Toast.LENGTH_SHORT).show();\n txtEstat.setText(\"Estat com a \"+estatSTR);\n }", "int getActionCommand();", "public void clickFirstQviewbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Qview First Buy button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\t/*List<WebElement> eles=driver.findElements((locator_split(\"btnQview\")));\r\n\t\t\tSystem.out.println(eles.size());\r\n\t\t\teles.get(0).click();*/\r\n\r\n\t\t\tclick(locator_split(\"btnQview\"));\t\t\t\t\r\n\t\t\tSystem.out.println(\"Clicked on the First Buy button\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- First Buy Button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Qview First Buy button is not clicked or Not Available\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnQview\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public void onClick(View arg0) {\n\t\tboolean isSTART = false;\n\t\tButton stopBtn = null;\n\t\tint command = 0;\n\t\tif (arg0.getId() == mBtn1Start.getId()) {\t\t\t\n\t\t\tcommand = TEST_SE0_NAK;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn1Stop;\n\t\t} else if (arg0.getId() == mBtn2Start.getId()) {\n\t\t\tcommand = TEST_J;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn2Stop;\n\t\t}else if (arg0.getId() == mBtn3Start.getId()) {\n\t\t\tcommand = TEST_K;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn3Stop;\n\t\t}else if (arg0.getId() == mBtn4Start.getId()) {\n\t\t\tcommand = TEST_PACKET;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn4Stop;\n\t\t}else if (arg0.getId() == mBtn5Start.getId()) {\n\t\t\tcommand = SUSPEND_RESUME;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn5Stop;\n\t\t}else if (arg0.getId() == mBtn6Start.getId()) {\n\t\t\tcommand = GET_DESCRIPTOR;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn6Stop;\n\t\t}else if (arg0.getId() == mBtn7Start.getId()) {\n\t\t\tcommand = SET_FEATURE;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn7Stop;\n\t\t}\n\t\t\n\t\telse if (arg0.getId() == mBtn1Stop.getId()) {\t\t\t\t\n\t\t\tcommand = TEST_SE0_NAK;\n\t\t\tisSTART = false;\n\t\t} else if (arg0.getId() == mBtn2Stop.getId()) {\n\t\t\tcommand = TEST_J;\n\t\t\tisSTART = false;\n\t\t}else if (arg0.getId() == mBtn3Stop.getId()) {\n\t\t\tcommand = TEST_K;\n\t\t\tisSTART = false;\n\t\t}else if (arg0.getId() == mBtn4Stop.getId()) {\n\t\t\tcommand = TEST_PACKET;\n\t\t\tisSTART = false;\n\t\t}else if (arg0.getId() == mBtn5Stop.getId()) {\n\t\t\tcommand = SUSPEND_RESUME;\n\t\t\tisSTART = false;\n\t\t}else if (arg0.getId() == mBtn6Stop.getId()) {\n\t\t\tcommand = GET_DESCRIPTOR;\n\t\t\tisSTART = false;\n\t\t}else if (arg0.getId() == mBtn7Stop.getId()) {\n\t\t\tcommand = SET_FEATURE;\n\t\t\tisSTART = false;\n\t\t}\n\t\telse{\n\t\t\tShowDialog(\"Error\", \"Unknown button is pressed.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(isSTART)\n\t\t{\n\t\t\tif(task != null)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tTaskThread thr = new TaskThread();\n\t\t\tthr.setParam(command);\n\t\t\tthr.start();\n\t\t\t\n\t\t\tmakeOneBtnEnable(stopBtn);\n\t\t\ttask = new TaskRunnable();\n\t\t\ttask.start();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(task != null)\n\t\t\t{\t\t\n\t\t\t\ttask.mRun = false;\t\t\t\t\t\n\t\t\t\tif(!UsbIF.NativeStopTest(command))\n\t\t\t\t{\n\t\t\t\t\tShowDialog(\"Error\", \"NativeStopTest Fail.\");\n\t\t\t\t\tUsbIF.NativeCleanMsg();\n\t\t\t\t}\t\t\t\t\n\t\t\t\ttask = null;\t\n\t\t\t\tupdateAllBtn(true);\n\t\t\t}\n\t\t}\n\t}", "WebElement getSearchButton();", "private static void menuSelector(){\r\n\t\tint answer= getNumberAnswer();\r\n\t\tswitch (answer) {\r\n\t\tcase 0:\r\n\t\t\tshowShapeInfo(shapes[0]);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcreateShape();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Its Perimeter is equal to: \" +calcShapePerimeter(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Its Area is equal to: \" +calcShapeArea(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Provide integer to use for scaling shape: \");\r\n\t\t\tscaleShape(shapes[0], getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"That's not actually an option.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void setVisualizerButtonSelected(String btnText) {\n visualizerButtonSelected = btnText;\n }", "private void newOrderbutton(String txt) {\n Button btn = new Button(txt);\n newBtnStyle(btn);\n\n boolean containsbtn = false;\n btn.setId(txt);\n for (Node node : activeOrders.getChildren()) {\n String button = ((Button) node).getText();\n if (txt.equals(button))\n containsbtn = true;\n\n }\n if (!containsbtn) {\n activeOrders.getChildren().add(btn);\n\n changeActive(btn);\n } else {\n //Alert clerc about the amount to pay back.\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Nyt bord\");\n alert.setHeaderText(\"Bord: \" + txt + \" eksistere allerede\");\n alert.showAndWait();\n }\n }", "@Override\n public void onClick(View v) {\n\n switch (v.getId()) {\n\n case R.id.btn_PingPlay:\n Toast.makeText(getApplicationContext(), \"Start Button Clicked\", Toast.LENGTH_SHORT).show();\n RunTest();\n break;\n case R.id.btn_stop :\n StopTest();\n break;\n case R.id.btn_pause :\n PauseTest();\n break;\n }\n }", "public void createControl() {\n Button button1 = new Button(getShell(), SWT.PUSH);\n button1.setText(\"PolicyValueSelectionDialog with valid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog1 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy1\", selectionElement1);\n button1.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog1.open();\n String[] results = (String[]) dialog1.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n dialog1.setInitialSelections(new String[]{\"choice7\", \"choice3\"});\n\n Button button2 = new Button(getShell(), SWT.PUSH);\n button2.setText(\"PolicyValueSelectionDialog with invalid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog2 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy2\", selectionElement2);\n button2.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog2.open();\n String[] results = (String[]) dialog2.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n\n\n }", "@FXML\n private void handleButtonAction(MouseEvent event)\n {\n\n if(event.getTarget() == btn_bcconfig)\n {\n pane_bcconf.setVisible(false);\n pane_rtread.setVisible(false);\n gp_bc.setVisible(false);\n }\n else if (event.getTarget() == btn_bcread)\n {\n pane_bcconf.setVisible(true);\n pane_rtread.setVisible(false);\n if (cb_bcrt.isSelected() == true)\n {\n gp_bc.setVisible(true);\n }\n else\n {\n \t gp_bc.setVisible(false);\n }\n }\n else if (event.getTarget() == btn_rtread)\n {\n pane_bcconf.setVisible(false);\n pane_rtread.setVisible(true);\n }\n }", "private ActionRow getButtons(String currentButtonId, MatchStats matchStats) {\n ArrayList<Button> buttons = new ArrayList<>();\n buttons.add(currentButtonId.equals(stats.getId()) ? stats.asDisabled() : stats);\n\n if(shouldDisplayLoadoutsButton(matchStats)) {\n buttons.add(currentButtonId.equals(loadouts.getId()) ? loadouts.asDisabled() : loadouts);\n }\n\n return ActionRow.of(buttons);\n }", "@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.ivHookCat:\n unselectAllCategories();\n findViewById(R.id.btnEduCat).setSelected(true);\n toggleSubCategoryView();\n break;\n\n case R.id.btnEduCat:\n unselectAllCategories();\n findViewById(R.id.btnEduCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_EDU);\n break;\n\n case R.id.btnFunCat:\n unselectAllCategories();\n findViewById(R.id.btnFunCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_FUN);\n break;\n\n case R.id.btnGovtCat:\n unselectAllCategories();\n findViewById(R.id.btnGovtCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_GOVT);\n break;\n\n case R.id.btnHealthCat:\n unselectAllCategories();\n findViewById(R.id.btnHealthCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_HEALTH);\n break;\n\n case R.id.btnJobCat:\n unselectAllCategories();\n findViewById(R.id.btnJobCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_JOB);\n break;\n\n case R.id.btnLawCat:\n unselectAllCategories();\n findViewById(R.id.btnLawCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_LAW);\n break;\n\n case R.id.btnMoneyCat:\n unselectAllCategories();\n findViewById(R.id.btnMoneyCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_MONEY);\n break;\n\n case R.id.ivOpenerCat:\n if (llFlowingDetails.getWidth() < 1)\n showFlowingDetails();\n else\n hideFlowingDetails();\n break;\n\n default:\n break;\n\n }\n }", "private JButton getVycvik1Button() {\n\t\tif (vycvik1Button == null) {\n\t\t\tvycvik1Button = new JButton();\n\t\t\tvycvik1Button.setText(\"Výcvik\");\n\t\t\tvycvik1Button.setEnabled(false);\n\t\t\tvycvik1Button.setSize(new Dimension(74, 25));\n\t\t\tvycvik1Button.setLocation(new Point(148, 166));\n\t\t\tvycvik1Button.setVisible(true);\n\t\t\tvycvik1Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"1v\";\n\t\t\t\t\tucivoText.setText(\"úroveň 1: Základné a rozšírené intervaly\");\n\t\t\t\t\tcvicenieText.setText(\"Výcvik\");\n\t\t\t\t\tsuzvukText.setText(\"Náhodný interval\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\tr = 0;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(rand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1], p[2]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn vycvik1Button;\n\t}", "public void onClick(View arg0) {\n\t\t//This method of using a switch statement is helpful for more than 1 button used within any activity. \n\t\t\n\t\tswitch (arg0.getId()){\n\t\t\n\t\tcase R.id.button_id_defined_in_xml_code:\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t//Write what you want the button click to do\n\t\t\t\t\n\t\t\t} catch (Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.button_id_defined_in_xml_code_other:\n\t\t\ttry {\n\t\t\t\n\t\t\t//Write what you want the button click to do\n\t\t\t\t\n\t\t\t} catch (Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}", "public static Boolean getButtonSelected(int x, int y){\n\t\treturn display[x][y].isSelected();\n\t}", "public boolean buttonNemo(View v) { return (v.getId() == R.id.bestRated); }", "String getAction();", "String getAction();", "public void onClick(View v) {\r\n\r\n switch (v.getId()) {\r\n case R.id.bt1:\r\n checkAnswer(String.valueOf(c1.getText()));\r\n count++;\r\n loadQuestion();\r\n break;\r\n\r\n case R.id.bt2:\r\n checkAnswer(String.valueOf(c2.getText()));\r\n count++;\r\n loadQuestion();\r\n break;\r\n\r\n case R.id.bt3:\r\n checkAnswer(String.valueOf(c3.getText()));\r\n count++;\r\n loadQuestion();\r\n break;\r\n\r\n }\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.atscFunctionFlag:\n Log.e(\"11111\",\"22222\");\n break;\n case R.id.atscLocalIp:\n utils = new Utils();\n utils.textOnDialog(R.string.atsc_local_ip,mContext);\n// builder = new TextDialog.Builder(mContext).setTitile(\"Local IP\").setMessage(null).setDefaultBtn(null, new OnClickListener() {\n// @Override\n// public void onClick(View v) {\n// Log.e(\"qqq\",\"eeee\");\n// }\n// });\n// builder.show();\n\n// builder1 = new TextDialog.Builder(mContext);\n// builder1.setTitle(R.string.atsc_local_ip);\n// builder1.show();\n// new AlertDialog.Builder(mContext).setTitle(R.id.)\n// new AlertDialog.Builder(mContext).setTitle(\"请输入\").setIcon(android.R.drawable.ic_dialog_info).setView(new EditText(mContext)).setPositiveButton(\"确定\", null).setNegativeButton(\"取消\", null).show();\n break;\n case R.id.atscBoardcastProfile:\n// new AlertDialog.Builder(mContext).setTitle(\"单选框\").setMultiChoiceItems(new String[] { \"Item1\", \"Item2\" },0,new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int which) {\n// dialog.dismiss();\n// }\n// }).setNegativeButton(\"取消\", null).show();\n break;\n }\n }", "public void modifHandler(ActionEvent event) throws Exception\n\t{\n\t\t\n\t\t String id= new String();\n\t\t\tfor (Button bouton : list_bouton)\n\t\t\t{\n\t\t\t\tif(event.getSource()==bouton)\n\t\t\t\t{\n\t\t\t bouton.setOnAction(new EventHandler<ActionEvent>() {\n\t private String args;\n\n\t\t\t\t@Override\n\t\t\t public void handle(ActionEvent arg0) {\n\t\t\t\t\t try {\n\t\t\t\t\t\t//choisir l'activité à modifier\n\t\t\t\t\t mod= new ChoixActiviteModif();\n\t\t\t\t\t} catch (Exception e) {e.printStackTrace();} \n\t\t\t\t\t\t}});\n\t\t\t ChoixControler.selectedDomaine=bouton.getId();\n\t\t\t }\n\t\t\t }\n\t\t\n }", "public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-tab-panel-noborder') and not(contains(@class,'x-hide-display'))]//button[contains(@class,'icon-ov-edit')]\").click();\r\n\t\t\r\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\t// change module based on button clicked\n\t\t\tint buttonId = v.getId();\n\t\t\tswitch (buttonId) {\n case R.id.module1Radio:\n selectedModule = 1;\n break;\n case R.id.module2Radio:\n selectedModule = 2;\n break;\n case R.id.module3Radio:\n selectedModule = 3;\n break;\n case R.id.module4Radio:\n selectedModule = 4;\n break;\n\t\t\t}\n\t\t\t// update immediately so it doesn't ever show the wrong data\n\t\t\ttitanoboaModel.updateDataSelected(selectedModule, titanoboaPacketReader.getPackets());\n\n\t\t\t// change header label to appropriate module\n\t\t\t((TextView) findViewById(R.id.moduleHeader))\n\t\t\t\t\t.setText(getString(R.string.module) + \" \" + selectedModule);\n\t\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tJButton source = (JButton) e.getSource();\r\n\t\tif (source.equals(btn_them)) {\r\n\t\t\tclickThem = true;\r\n\t\t\tdisablePanelInput();\r\n\t\t\tlbl_status.setText(\"Clicked Button Them\");\r\n\t\t} else if (source.equals(btn_nhap)) {\r\n\t\t\tclickThem = false;\r\n\t\t\tSinhVien mSinhVien = new SinhVien(txt_mssv.getText(),\r\n\t\t\t\t\ttxt_hoten.getText(), (String) comboSex.getSelectedItem(),\r\n\t\t\t\t\t(Date) txt_ntns.getValue());\r\n\t\t\tif (mSinhViens.contains(mSinhVien)) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\t\"Không thể lưu 2 sinh viên có cùng MSSV\",\r\n\t\t\t\t\t\t\"Lỗi nhập dữ liệu\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t\tmSinhViens.add(mSinhVien);\r\n\t\t\trefreshTable();\r\n\t\t\tdisablePanelInput();\r\n\t\t\tlbl_status.setText(\"Clicked Button Nhap\");\r\n\t\t} else if (source.equals(btn_sapxep)) {\r\n\t\t\tif (list_sort.getSelectedIndex() == 0) { // sap xep theo MSSV\r\n\t\t\t\tTreeSet<SinhVien> temp = new TreeSet<SinhVien>(\r\n\t\t\t\t\t\tnew MssvComperator());\r\n\t\t\t\ttemp.addAll(mSinhViens);\r\n\t\t\t\tmSinhViens = temp;\r\n\t\t\t\trefreshTable();\r\n\t\t\t\tlbl_status.setText(\"Sap xep theo MSSV\");\r\n\t\t\t} else if (list_sort.getSelectedIndex() == 1) { // sap xep theo Ho\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Ten\r\n\t\t\t\tTreeSet<SinhVien> temp = new TreeSet<SinhVien>(\r\n\t\t\t\t\t\tnew HoTenComperator());\r\n\t\t\t\ttemp.addAll(mSinhViens);\r\n\t\t\t\tmSinhViens = temp;\r\n\t\t\t\trefreshTable();\r\n\t\t\t\tlbl_status.setText(\"Sap xep theo Ho Ten\");\r\n\t\t\t} else {\r\n\t\t\t\tTreeSet<SinhVien> temp = new TreeSet<SinhVien>(\r\n\t\t\t\t\t\tnew NTNSComperator());\r\n\t\t\t\ttemp.addAll(mSinhViens);\r\n\t\t\t\tmSinhViens = temp;\r\n\t\t\t\trefreshTable();\r\n\t\t\t\tlbl_status.setText(\"Sap xep theo NTNS\");\r\n\t\t\t}\r\n\t\t} else if (source.equals(btn_save)) {\r\n\r\n\t\t\tint reValue = fc.showSaveDialog(GUI2.this);\r\n\t\t\tif (reValue == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tFile f = fc.getSelectedFile();\r\n\t\t\t\t\tObjectOutputStream os = new ObjectOutputStream(\r\n\t\t\t\t\t\t\tnew BufferedOutputStream(new FileOutputStream(f)));\r\n\t\t\t\t\tos.writeObject(mSinhViens);\r\n\t\t\t\t\tos.flush();\r\n\t\t\t\t\tos.close();\r\n\t\t\t\t\tlbl_status.setText(\"Saved\");\r\n\t\t\t\t} catch (Exception e2) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (source.equals(btn_load)) {\r\n\t\t\tint reValue = fc.showOpenDialog(GUI2.this);\r\n\t\t\tif (reValue == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tFile f = fc.getSelectedFile();\r\n\t\t\t\t\tObjectInputStream ois = new ObjectInputStream(\r\n\t\t\t\t\t\t\tnew BufferedInputStream(new FileInputStream(f)));\r\n\t\t\t\t\tmSinhViens = (TreeSet<SinhVien>) ois.readObject();\r\n\t\t\t\t\tois.close();\r\n\t\t\t\t\trefreshTable();\r\n\t\t\t\t\tlbl_status.setText(\"Loaded\");\r\n\t\t\t\t} catch (Exception e2) {\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (source.equals(btn_xoa)) {\r\n\t\t\tint[] index = mTable.getSelectedRows();\r\n\t\t\tStringBuilder mBuilder = new StringBuilder();\r\n\t\t\tDefaultTableModel mModel = (DefaultTableModel) mTable.getModel();\r\n\t\t\tfor (int i : index) {\r\n\t\t\t\t/*\r\n\t\t\t\t * mBuilder.append(i + \",\"); String mssv = (String)\r\n\t\t\t\t * mModel.getValueAt(i, 0); String hoten = (String)\r\n\t\t\t\t * mModel.getValueAt(i, 1); String gioitinh = (String)\r\n\t\t\t\t * mModel.getValueAt(i, 2); Date ntns = (Date)\r\n\t\t\t\t * mModel.getValueAt(i, 3); mSinhViens.remove(new SinhVien(mssv,\r\n\t\t\t\t * hoten, gioitinh, ntns));\r\n\t\t\t\t */\r\n\t\t\t\tIterator<SinhVien> it = mSinhViens.iterator();\r\n\t\t\t\tint j = 0;\r\n\t\t\t\twhile (j < i) {\r\n\t\t\t\t\tit.next();\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n\t\t\t\tit.remove();\r\n\t\t\t}\r\n\t\t\trefreshTable();\r\n\t\t\tlbl_status.setText(\"Xoa cac dong : \" + mBuilder.toString());\r\n\t\t}\r\n\t}", "public void performButton(int i){\n\t\tif(ClientWindow.retButtons()[i].getIcon()!=null){\n\t\t\tresetSelected();\n\t\t\tClientWindow.retButtons()[i].setBackground(Color.BLACK);\n\t\t\tClientWindow.currentlySelected=ClientWindow.rPackage.getInventory().get(i);\n\t\t}\n\t\telse{\n\t\t\tresetSelected();\n\t\t\tClientWindow.currentlySelected=null;\n\t\t}\n\t}", "void clickSomewhereElse();", "@Override\n\tpublic void onSelect(int id, boolean status) {\n\t\tswitch (id) {\n\t\tcase 0:\n\t\t\tif (Application.isInitialize && endPointSwitch != null) {\n\t\t\t\tif (status) {\n\t\t\t\t\tAPI.ZBCLUSTEROnOffToggle(endPointSwitch.get(0), 0);\n\t\t\t\t} else {\n\t\t\t\t\tAPI.ZBCLUSTEROnOffToggle(endPointSwitch.get(0), 1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tToast.makeText(this, \"Initialize SDK failed!Please try again!\",\n\t\t\t\t\t\t0).show();\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif (Application.isInitialize && endPointSwitch != null\n\t\t\t\t\t&& endPointSwitch.size() >= 2) {\n\t\t\t\tif (status) {\n\t\t\t\t\tAPI.ZBCLUSTEROnOffToggle(endPointSwitch.get(1), 0);\n\t\t\t\t} else {\n\t\t\t\t\tAPI.ZBCLUSTEROnOffToggle(endPointSwitch.get(1), 1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tToast.makeText(this, \"Initialize SDK failed!Please try again!\",\n\t\t\t\t\t\t0).show();\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "private void onClickOption(View view) {\n int id = view.getId();\n if (id == 0) {\n Intent intent = new Intent(this, LearnActivityCardiacCycle.class);\n startActivity(intent);\n }\n else if (id == 1) {\n Intent intent = new Intent(this, LearnActivityS1.class);\n startActivity(intent);\n }\n else if (id == 2) {\n Intent intent = new Intent(this, LearnActivityS2.class);\n startActivity(intent);\n }\n else if (id == 3) {\n Intent intent = new Intent(this, LearnActivityS3.class);\n startActivity(intent);\n }\n else if (id == 4) {\n Intent intent = new Intent(this, LearnActivityS4.class);\n startActivity(intent);\n }\n else if (id == 5) {\n Intent intent = new Intent(this, LearnActivityAorticStenosis.class);\n startActivity(intent);\n }\n else if (id == 6) {\n Intent intent = new Intent(this, LearnActivityMitralStenosis.class);\n startActivity(intent);\n }\n else if (id == 7) {\n Intent intent = new Intent(this, LearnActivityAorticRegurgitation.class);\n startActivity(intent);\n }\n else if (id == 8) {\n Intent intent = new Intent(this, LearnActivityMitralRegurgitation.class);\n startActivity(intent);\n }\n else if (id ==9) {\n Intent intent = new Intent(this, LearnActivityAllSounds.class);\n startActivity(intent);\n }\n view.startAnimation(buttonAnimation());\n\n }", "public void submit_intsatpos(View button) {\n }" ]
[ "0.6165474", "0.61260366", "0.59637207", "0.59346473", "0.589252", "0.58701086", "0.5810608", "0.58041686", "0.5779823", "0.57036746", "0.56856674", "0.5673556", "0.5652994", "0.5647508", "0.56473124", "0.5644101", "0.5586719", "0.55095863", "0.54999185", "0.54963297", "0.5463633", "0.5451969", "0.5451177", "0.54387575", "0.5437838", "0.5424209", "0.5421409", "0.5400191", "0.53981644", "0.5374324", "0.53736645", "0.5373625", "0.5369275", "0.53686017", "0.53673863", "0.5365083", "0.5361756", "0.5355263", "0.53465074", "0.53348744", "0.533198", "0.5328146", "0.5325806", "0.53231597", "0.5316926", "0.5308844", "0.5306469", "0.530111", "0.5298308", "0.5267895", "0.52625126", "0.5261806", "0.5258635", "0.5245096", "0.5243841", "0.5243091", "0.5218743", "0.521869", "0.52185553", "0.521839", "0.5216812", "0.52161235", "0.5213948", "0.52107155", "0.5208749", "0.5208146", "0.5207032", "0.5205501", "0.5205322", "0.5196124", "0.51947224", "0.51924247", "0.51880103", "0.5187529", "0.5185473", "0.5184774", "0.5179379", "0.5175166", "0.51740825", "0.5168514", "0.5162701", "0.51559734", "0.51533055", "0.51518434", "0.5146071", "0.5144224", "0.5141689", "0.5138113", "0.51351106", "0.51351106", "0.51341707", "0.5126031", "0.51253366", "0.51223326", "0.51213205", "0.51213145", "0.5117706", "0.51162916", "0.5115977", "0.5115604", "0.5105556" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) throws IOException { Scanner scan = new Scanner(System.in); Process Process = new Process(); Scheduler Schedule = new Scheduler(); String fileInput; //ReadyQue //test for single file System.out.println("Press 1 to choose a file "); System.out.println("Press 2 to choose multiple files "); int choiceInput = scan.nextInt(); if(choiceInput == 1) { System.out.println("What file would you liked to use :"); fileInput = scan.next(); Process.runProgram(fileInput); } else if(choiceInput == 2) { System.out.println("How many programs do you want to run"); int fileNumber = scan.nextInt(); for(int PS = 0; PS <= fileNumber; PS ++) { Scheduler.positionofLL(PS); if(PS%2 == 0) { fileInput = "paint.txt"; } else { fileInput = "ide.txt"; } Process.runProgram(fileInput); } } else { System.out.println("Invalid Choice.\n Please Run program again."); } scan.close(); }
{ "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
DOG REQUESTS START HERE. MAYBE SPLIT UP into two services..
public List<Dog> findAllDogsByOwner(int id) { List<Dog> dogs = dogRep.findDogByOwner_OwnerId(id); return dogs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void service_REQ(){\n if ((eccState == index_HasRequest) && (PEExit.value)) state_BagPassedEye();\n else if ((eccState == index_IDLE) && (TokenIn.value)) state_START();\n else if ((eccState == index_IDLE) && (PERequest.value)) state_NoTokenButRequest();\n else if ((eccState == index_NoTokenButRequest) && (TokenIn.value)) state_START();\n else if ((eccState == index_START) && (NoPERequest.value)) state_IDLE();\n }", "private static void startService() {\n //noinspection deprecation\n setPort(configuration.getPort());\n get(\":version/route/:user\", (request, response) -> {\n try {\n String apiVersion = request.params(\":version\");\n String user = request.params(\":user\");\n String version = request.headers(\"version\"); \n if (!isValidApiVersion(apiVersion)) {\n response.status(400);\n return new RouteResponse(\"Wrong API version\", \"400\", \"\");\n }\n return new RouteResponse(splitter.getGroupForUser(user)); // no overhead measured compared to using string concat or StringBuilder\n } catch (Exception e) {\n logger.error(\"Problem serving the request.\", e);\n response.status(500);\n return new RouteResponse(e.getMessage(), \"500\", \"\");\n }\n }, new JsonTransformer());\n }", "public interface RequestService {\n //http://gank.io/api/data/Android/10/1\n /*@GET(\"api/data/Android/10/1\")\n Call<ResponseBody> getAndroidInfo();*/\n @GET(\"api/data/Android/10/1\")\n Call<GankBean> getAndroidInfo();\n @GET(\"api/data/Android/10/{page}\")\n Call<GankBean> getAndroidInfo(@Path(\"page\") int page);\n @GET(\"api/data/query?cityname=深圳\")\n Call<ResponseBody> getWeather(@Query(\"key\") String key,@Query(\"area\") String area);\n @GET(\"group/{id}/users\")\n Call<List<User2>> groupList(@Field(\"id\") int groupId, @QueryMap Map<String,String> options);\n @GET\n Call<GankBean> getAndroid2Info(@Url String url);\n\n}", "void getRequests();", "abstract protected void doService(HttpServletRequest request,\r\n\t\t\t\t\t\t\t\t\t HttpServletResponse response) throws ServletException, IOException,ApplicationException;", "public interface GPAdimWS {\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.provincia\")\n Call<List<Provincia>> listProvincia();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.especialidad\")\n Call<List<Especialidad>> listEspecialidad();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.cobertura\")\n Call<List<Cobertura>> listCobertura();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.medico/byCoberturaProvinciaEspecialidad/{cobertura}/{provincia}/{especialidad}\")\n Call<List<Medico>> listMedico(@Path(\"cobertura\") String cobertura, @Path(\"provincia\") Long provincia, @Path(\"especialidad\") Long especialidad);\n @POST(\"webresources/com.gylgroup.gp.turno\")\n Call<Turno> createTurno(@Body Turno turno);\n}", "protected void doService(HttpServletRequest req, HttpServletResponse resp) throws Exception {\r\n // This class has been removed from all places where it was used and replaced by the Spring\r\n // dispatcher from which it inherits. Delegate to super for now in case this ever gets called.\r\n // There is one place that depends on the tool constants above, in CommentListGenerator.\r\n // These constants should be relocated and this class purged.\r\n super.doService(req, resp);\r\n }", "protected void service(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tString actionType=req.getParameter(\"actionType\");\n\t\tif(actionType.equals(\"query\"))\n\t\t{\n\t\t\tquery(req,resp);\n\t\t}\n\t\tif(actionType.equals(\"kanweizhang\"))\n\t\t{\n\t\t\tkanweizhang(req,resp);\n\t\t}\n\t\tif(actionType.equals(\"tuiweizhang\"))\n\t\t{\n\t\t\ttuiweizhang(req,resp);\n\t\t}\n\t\t\n\t\tif(actionType.equals(\"querywenlei\"))\n\t\t{\n\t\t\tquerywenlei(req,resp);\n\t\t}\n\t}", "private void insertServiceRequest() {\n Random rand = new Random();\r\n service_id = rand.nextInt(Integer.MAX_VALUE);\r\n int tokenSeed = rand.nextInt(Integer.MAX_VALUE);\r\n current_token = md5(tokenSeed + \"\");\r\n\r\n Calendar cal = Calendar.getInstance();\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\r\n String fecha = sdf.format(cal.getTime());\r\n\r\n int deliver_state = 1;\r\n\r\n int costo = (int) Math.round(destinations.get(0).total_price);\r\n\r\n ArrayList<String> param = new ArrayList<>();\r\n param.add(service_id + \"\");\r\n param.add(current_token);\r\n param.add(fecha);\r\n param.add(deliver_state + \"\");\r\n param.add(id_cliente + \"\");\r\n param.add(costo + \"\");\r\n param.add(\"0\");\r\n RestClient.get().executeCommand(\"8\", param.toString(), new Callback<Response>() {\r\n @Override\r\n public void success(Response response, retrofit.client.Response response2) {\r\n\r\n insertRoutes();\r\n }\r\n\r\n @Override\r\n public void failure(RetrofitError error) {\r\n hideOverlay();\r\n showDialog(\r\n getResources().getString(\r\n R.string.msg_serverError_title),\r\n getResources().getString(\r\n R.string.msg_serverError), false, false);\r\n }\r\n });\r\n\r\n\r\n }", "@Override\r\n\tpublic void service(AgiRequest request, AgiChannel channel)\r\n\t\t\tthrows AgiException {\n\t\t\r\n\t\tString numsel = getVariable(\"EXTEN\");\r\n\t\tif (numsel.endsWith(\"#\"))\r\n\t\t\tnumsel = numsel.substring(0, numsel.length()-1);\r\n\t\t\r\n\t\tString oilnum = getVariable(\"oilponum\");\r\n\t\t\r\n\t\t\r\n\t\tint iNumSel = Integer.parseInt(numsel);\r\n\t\tint ioilNum = Integer.parseInt(oilnum);\r\n\t\t\r\n\t\t\r\n\t\tif (iNumSel>ioilNum || iNumSel<1)\r\n\t\t{\r\n\t\t\tsetExtension(\"i\");\r\n\t\t\tsetPriority(\"1\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tString docid = getVariable(\"DOC\" + iNumSel);\r\n\t\tString phone = getVariable(\"PHONE\" + iNumSel);\r\n\t\t\r\n\t\t\r\n\t\tsetVariable(\"DOCID\", docid);\r\n\t\tsetVariable(\"oilcomphone\", phone);\r\n\t\t\r\n\t//\tString conPhone = getVariable(\"custphone\" + iNumSel);\r\n\t//\tString cellphone = getVariable(\"cellphone\" + iNumSel);\r\n\t\t\r\n\t//\tsetVariable(\"spphone\", conPhone);\r\n\t//\tsetVariable(\"SPDIALNUM\", conName);\r\n\t//\tsetVariable(\"spphone\", conPhone);\r\n\t//\tsetVariable(\"cellphone\", cellphone);\r\n\r\n\t}", "public void createServiceRequest() {\n getMainActivity().startService(new Intent(getMainActivity(), RequestService.class));\n }", "private void dispatchRequests(RoutingContext context) {\n int initialOffset = 5; // length of `/api/`\n // Run with circuit breaker in order to deal with failure\n circuitBreaker.execute(future -> {\n getAllEndpoints().setHandler(ar -> {\n if (ar.succeeded()) {\n List<Record> recordList = ar.result();\n // Get relative path and retrieve prefix to dispatch client\n String path = context.request().uri();\n if (path.length() <= initialOffset) {\n notFound(context);\n future.complete();\n return;\n }\n\n String prefix = (path.substring(initialOffset).split(\"/\"))[0];\n String newPath = path.substring(initialOffset + prefix.length());\n\n // Get one relevant HTTP client, may not exist\n Optional<Record> client = recordList.stream()\n .filter(record -> record.getMetadata().getString(\"api.name\") != null)\n .filter(record -> record.getMetadata().getString(\"api.name\").equals(prefix))\n .findAny(); // simple load balance\n\n if (client.isPresent()) {\n doDispatch(context, newPath, discovery.getReference(client.get()).get(), future);\n } else {\n notFound(context);\n future.complete();\n }\n } else {\n future.fail(ar.cause());\n }\n });\n }).setHandler(ar -> {\n if (ar.failed()) {\n badGateway(ar.cause(), context);\n }\n });\n }", "@Override\r\n\tpublic void service(Request request,Response response) {\n\t\tresponse.print(\"lalaa\");\r\n\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void doService(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tSystem.out.println(\"in child doService\");\r\n\t\t\r\n\t}", "@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void handle(final HttpServerRequest req) {\n\t\t\t\tString startTime = \"1355620946302\"; //--separate-comp\r\n\t\t\t\tIterator<EventInfo> iter = \r\n\t\t\t\t\t\tdataService.events()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(EventInfo.class).iterator();\r\n\t\t\t\tEventCounter multiCounter = new EventCounter(\"/multicomp\");\r\n\t\t\t\tint processed = 0;\r\n\t\t\t\twhile (iter.hasNext() && processed < limit) {\r\n\t\t\t\t\tEventInfo event = iter.next();\r\n\t\t\t\t\tmultiCounter.countEvent(event);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treq.response.setChunked(true);\r\n\t\t\t\tmultiCounter.printDistance(req, \"sep_comp\");\r\n\t\t\t\t\r\n\t\t\t\t//multiCounter.printResponse(req, \"sep_comp\");\r\n\t\t\t\t// use response time data\r\n\t\t\t\tIterator<ResponseInfo> respIter = \r\n\t\t\t\t\t\tdataService.response()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(ResponseInfo.class).iterator();\r\n\t\t\t\tResponseCounter responseCounter = new ResponseCounter();\r\n\t\t\t\tprocessed = 0;\r\n\t\t\t\twhile (respIter.hasNext() && processed < limit) {\r\n\t\t\t\t\tResponseInfo resp = respIter.next();\r\n\t\t\t\t\tresponseCounter.count(resp);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\tresponseCounter.printResponse(req, \"sep_comp\");\r\n\r\n\t\t\t\treq.response.end();\r\n\t\t\t}", "public interface GiftSvcApi {\n\n public static final String PASSWORD_PARAMETER = \"password\";\n\n public static final String USERNAME_PARAMETER = \"username\";\n\n public static final String TITLE_PARAMETER = \"title\";\n\n public static final String TOKEN_PATH = \"/oauth/token\";\n\n public static final String DATA_PARAMETER = \"data\";\n\n public static final String ID_PARAMETER = \"id\";\n\n public static final String OBSCENE_PARAMETER = \"obscene\";\n\n // The path where we expect the GiftSvc to live\n public static final String GIFT_SVC_PATH = \"/gift\";\n\n public static final String GIFT_DATA_PATH = GIFT_SVC_PATH + \"/{id}/data\";\n\n public static final String GIFT_OBSCENE_PATH = GIFT_SVC_PATH + \"/{id}/obscene\";\n\n public static final String GIFT_UPDATE_PATH = GIFT_SVC_PATH + \"/update\";\n\n public static final String GIFT_TITLE_SEARCH_PATH = GIFT_SVC_PATH + \"/search/findByTitle\";\n\n public static final String GIFT_OBSCENE_SEARCH_PATH = GIFT_SVC_PATH + \"/search/findByObscene\";\n\n @GET(GIFT_SVC_PATH)\n public Collection<Gift> getGiftList();\n\n @POST(GIFT_SVC_PATH)\n public Gift addGift(@Body Gift gift);\n\n @POST(GIFT_SVC_PATH + \"/{id}\")\n public List<Long> deleteGift(@Path(ID_PARAMETER) long id);\n\n @GET(GIFT_TITLE_SEARCH_PATH)\n public Collection<Gift> findByTitle(@Query(TITLE_PARAMETER) String title);\n\n @Multipart\n @POST(GIFT_DATA_PATH)\n public GiftStatus setGiftData(@Path(ID_PARAMETER) long id, @Part(DATA_PARAMETER) TypedFile giftData);\n\n @GET(GIFT_DATA_PATH)\n Response getData(@Path(ID_PARAMETER) long id);\n\n @POST(GIFT_UPDATE_PATH)\n public Long updateGift(@Body Gift gift);\n\n @POST(GIFT_SVC_PATH + \"/{id}/touch\")\n public Long touchGift(@Path(\"id\") long id);\n\n @POST(GIFT_SVC_PATH + \"/{id}/untouch\")\n public Long untouchGift(@Path(\"id\") long id);\n\n @POST(GIFT_OBSCENE_PATH)\n public Boolean obsceneGift(@Path(\"id\") long id);\n\n public static final String USER_SVC_PATH = \"/user\";\n\n @GET(USER_SVC_PATH)\n public Collection<User> getUserList();\n\n @GET(GIFT_SVC_PATH + \"/{user}\")\n public Collection<Gift> getGiftListForUser(@Path(\"user\") User user);\n\n @POST(USER_SVC_PATH)\n public boolean addUser(@Body User user);\n}", "public interface RokyInfoService {\n\n @FormUrlEncoded\n @POST(\"SpiritServiceApp/v1/send/singleEbike\")\n Call<ResponseBody> singleEbike(@Field(\"ueSn\") String ueSn, @Field(\"data\") String data);\n\n @GET(\"SpiritServiceApp/v1/devices\")\n Call<DevicesMsg> devices(@Query(\"ue_sn_array\") String ueSnArray);\n\n\n @GET(\"SpiritServiceApp/stock/ccus\")\n Call<DevicesMsg> ccus(@Query(\"maxId\") String maxId);\n\n}", "@Override\n\tpublic void processRequest() {\n\t\ttry {\n\t\t\tkoncept.setTextcat(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_TEXT_CA)[0]);\n\t\t\tkoncept.setTextjap(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_TEXT_JP)[0]);\n\t\t\tif (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_LLISTA_ESTUDI)) {\n\t\t\t\tkoncept.setIdLlista(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_LLISTA_ESTUDI)[0]);\n\t\t\t}\n\n\t\t\tif (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_PRON_JAP)) {\n\t\t\t\tkoncept.setPronjap(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_PRON_JAP)[0]);\n\t\t\t}\n\n\t\t\t// TODO Gestionar amb excepcions.\n\t\t\tboolean b = DBController.konceptExists(koncept);\n\t\t\tString id = null;\n\n\t\t\tif (!b) {\n\t\t\t\tid = DBController.createKoncept(koncept);\n\t\t\t\tkoncept.setId(id);\n\n\t\t\t\tlogger.info(\"Koncept created. ID = \" + id);\n\n\t\t\t\tif (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_JP)) {\n\t\t\t\t\tString pathJP = processAudio(getParams(), PFCConstants.LANG_JAP, koncept);\n\t\t\t\t\tkoncept.setAudioJapones(pathJP);\n\t\t\t\t}\n\n\t\t\t\tif (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_CA)) {\n\t\t\t\t\tString pathCA = processAudio(getParams(), PFCConstants.LANG_CAT, koncept);\n\t\t\t\t\tkoncept.setAudioCatala(pathCA);\n\t\t\t\t}\n\n\t\t\t\t// Actualitzem valor audio.\n\t\t\t\tDBController.update(koncept);\n\n\t\t\t\tKonceptIdResponseBean rb = new KonceptIdResponseBean(koncept.getId());\n\t\t\t\twriteResponse(rb);\n\t\t\t} else {\n\t\t\t\tResponseBean rb = new ErrorResponseBean(\"La paraula ja existeix\");\n\t\t\t\twriteResponse(rb);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error processing request!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public interface MyServiceTwo {\n\n @GET(\"kehuduan/PAGE14503485387528442/index.json\")\n Call<XiongMao> getTwoImg();\n\n @GET(\"http://api.cntv.cn/apicommon/index?path=iphoneInterface/general/getArticleAndVideoListInfo.json&primary_id=PAGE1449807494852603,PAGE1451473625420136,PAGE1449807502866458,PAGE1451473627439140,PAGE1451473547108278,PAGE1451473628934144&serviceId=panda\")\n Call<Todal> getTwoTodal();\n}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n HttpTransport HTTP_TRANSPORT = new NetHttpTransport();\r\n JsonFactory JSON_FACTORY = new JacksonFactory();\r\n HttpRequestFactory requestFactory\r\n = HTTP_TRANSPORT.createRequestFactory(new HttpRequestInitializer() {\r\n @Override\r\n public void initialize(HttpRequest request) {\r\n request.setParser(new JsonObjectParser(JSON_FACTORY));\r\n }\r\n });\r\n\r\n GenericUrl url = new GenericUrl(\"https://openbus.emtmadrid.es:9443/emt-proxy-server/last/geo/GetArriveStop.php\");\r\n\r\n GenericData data = new GenericData();\r\n data.put(\"idClient\",\"[email protected]\");\r\n data.put(\"passKey\", \"3C162353-56FE-4572-9FB4-ED7D2D79E58E\");\r\n data.put(\"idStop\", \"3727\");\r\n\r\n HttpRequest requestGoogle = requestFactory.buildPostRequest(url, new UrlEncodedContent(data));\r\n\r\n\r\n GenericJson json = requestGoogle.execute().parseAs(GenericJson.class);\r\n\r\n \r\n ArrayList arrives = (ArrayList) json.get(\"arrives\");\r\n request.setAttribute(\"llegadas\", arrives);\r\n //para jsp\r\n //request.getRequestDispatcher(\"pintaremt.jsp\").forward(request, response);\r\n //para freemarker\r\n try {\r\n HashMap root = new HashMap();\r\n \r\n //root.put(\"content\",\"hola\");\r\n root.put(\"llegadas\",arrives);\r\n Template temp = Configuration.getInstance().getFreeMarker().getTemplate(\"Freebus.ftl\");\r\n temp.process(root, response.getWriter());\r\n } catch (TemplateException ex) {\r\n Logger.getLogger(GoogleHttpConsumingApi.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n\r\n }", "@Override\r\n\t\t\tpublic void handle(final HttpServerRequest req) {\n\t\t\t\tString startTime = \"1355562000000\"; //--multi-dist\r\n\t\t\t\tIterator<EventInfo> iter = \r\n\t\t\t\t\t\tdataService.events()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(EventInfo.class).iterator();\r\n\t\t\t\tEventCounter multiCounter = new EventCounter(\"/multi\");\r\n\t\t\t\tint processed = 0;\r\n\t\t\t\twhile (iter.hasNext() && processed < limit) {\r\n\t\t\t\t\tEventInfo event = iter.next();\r\n\t\t\t\t\tmultiCounter.countEvent(event);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treq.response.setChunked(true);\r\n\t\t\t\tmultiCounter.printDistance(req, \"multidist\");\r\n\t\t\t\t//multiCounter.printResponse(req, \"multidist\");\r\n\t\t\t\t//use response time data\r\n\t\t\t\tIterator<ResponseInfo> respIter = \r\n\t\t\t\t\t\tdataService.response()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(ResponseInfo.class).iterator();\r\n\t\t\t\tResponseCounter responseCounter = new ResponseCounter();\r\n\t\t\t\tprocessed = 0;\r\n\t\t\t\twhile (respIter.hasNext() && processed < limit) {\r\n\t\t\t\t\tResponseInfo resp = respIter.next();\r\n\t\t\t\t\tresponseCounter.count(resp);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\tresponseCounter.printResponse(req, \"multidist\");\r\n\r\n\t\t\t\treq.response.end();\r\n\t\t\t}", "private void servicesManager(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\t// Extract service and command\r\n\t\tif ( req.getPathInfo().length() > 0 ) {\r\n\t\t\tString path = req.getPathInfo().substring(1);\r\n\t\t\tif ( path.indexOf(\"/\") > 0 ) {\r\n\t\t\t\tString service = path.substring(0, path.indexOf(\"/\"));\r\n\t\t\t\tString cmd = path.substring(path.indexOf(\"/\")+1);\r\n\t\t\t\t// Search service manager and execute it \r\n\t\t\t\tServiceJSManager serv = this.services.get(service);\r\n\t\t\t\tif ( serv != null ) {\r\n\t\t\t\t\tServiceJSResponse r;\r\n\t\t\t\t\tthis.dsp.startProcessing(req);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tr = serv.execute(this.dsp,cmd,req.getParameterMap());\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: manage exception\r\n\t\t\t\t\t\tthrow new ServletException(e);\r\n\t\t\t\t\t} finally {\r\n\t\t\t\t\t\tthis.dsp.endProcessing();\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (LOG != null && LOG.isDebugEnabled() ) LOG.debug(\"packaging response: %s\",req.getRequestURI());\r\n\t\t\t\t\t\tthis.serviceResponser(r, resp);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// TODO: service unknown\r\n\t\t\r\n\t\t\r\n\t\tString out = \"DONE\\n\\r\"\r\n\t\t\t\t+\"XXX\";\r\n\t\tresp.setContentLength(out.length());\r\n\t\tresp.setContentType(\"text/plain\");\r\n\t\tresp.getWriter().println(out);\r\n\t\tresp.getWriter().close();\r\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response)\n {\n super.onSuccess(statusCode, headers, response);\n LogUtil.i(TAG, \"getservBookResource\", response.toString());\n if (response.opt(\"code\").equals(\"00000\"))\n {\n JSONObject dataJsonObject = response.optJSONObject(\"data\");\n JSONArray trafficJSONList = dataJsonObject.optJSONArray(\"traffic\");\n if (trafficJSONList != null && trafficJSONList.length() > 0)\n {\n for (int j = 0; j < trafficJSONList.length(); j++)\n {\n JSONObject serviceJSON = trafficJSONList.optJSONObject(j);\n ServResrouce service = new ServResrouce();\n service.setServId(serviceJSON.optString(\"servId\"));\n service.setServName(serviceJSON.optString(\"servName\"));\n service.setServAlias(serviceJSON.optString(\"servAlias\"));\n service.setServType(serviceJSON.optString(\"servType\"));\n service.setRank(serviceJSON.optString(\"rank\"));\n service.setTitleImage(serviceJSON.optString(\"titleImg\"));\n service.setServDesc(serviceJSON.optString(\"servDesc\"));\n if (service.getServType().equals(\"airplane\") || service.getServType().equals(\"Iairplane\"))\n {\n airPlaneList.add(service);\n }\n else\n {\n carOrBoaticList.add(service);\n }\n }\n }\n JSONArray stayJSONList = dataJsonObject.optJSONArray(\"stay\");\n if (stayJSONList != null && stayJSONList.length() > 0)\n {\n for (int j = 0; j < stayJSONList.length(); j++)\n {\n JSONObject serviceJSON = stayJSONList.optJSONObject(j);\n ServResrouce service = new ServResrouce();\n service.setServId(serviceJSON.optString(\"servId\"));\n service.setServName(serviceJSON.optString(\"servName\"));\n service.setServAlias(serviceJSON.optString(\"servAlias\"));\n service.setServType(serviceJSON.optString(\"servType\"));\n service.setRank(serviceJSON.optString(\"rank\"));\n service.setTitleImage(serviceJSON.optString(\"titleImg\"));\n service.setServDesc(serviceJSON.optString(\"servDesc\"));\n stayList.add(service);\n }\n }\n mAirListViewAdapter.notifyDataSetChanged();\n mNoAirAdapter.notifyDataSetChanged();\n mHotelAdapter.notifyDataSetChanged();\n }\n }", "Call mo35727a(Request request);", "public void process()\n {\n ClientRequest clientRequest = threadPool.remove();\n\n if (clientRequest == null)\n {\n return;\n }\n\n\n // Do the work\n // Create new Client\n ServiceLogger.LOGGER.info(\"Building client...\");\n Client client = ClientBuilder.newClient();\n client.register(JacksonFeature.class);\n\n // Get uri\n ServiceLogger.LOGGER.info(\"Getting URI...\");\n String URI = clientRequest.getURI();\n\n ServiceLogger.LOGGER.info(\"Getting endpoint...\");\n String endpointPath = clientRequest.getEndpoint();\n\n // Create WebTarget\n ServiceLogger.LOGGER.info(\"Building WebTarget...\");\n WebTarget webTarget = client.target(URI).path(endpointPath);\n\n // Send the request and save it to a Response\n ServiceLogger.LOGGER.info(\"Sending request...\");\n Response response = null;\n if (clientRequest.getHttpMethodType() == Constants.getRequest)\n {\n // Create InvocationBuilder\n ServiceLogger.LOGGER.info(\"Starting invocation builder...\");\n Map<String, Object> queryMap = clientRequest.getQueryParams();\n String pathParam = clientRequest.getPathParam();\n\n if (pathParam != null)\n {\n webTarget = webTarget.path(pathParam);\n }\n\n if (queryMap != null)\n {\n ServiceLogger.LOGGER.info(\"QUERY MAP NOT NULL.\");\n for (Map.Entry<String, Object> entry : queryMap.entrySet())\n {\n webTarget = webTarget.queryParam(entry.getKey(), entry.getValue());\n }\n }\n ServiceLogger.LOGGER.info(\"WEBTARGET: \" + webTarget.toString());\n\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\n ServiceLogger.LOGGER.info(\"Got a GET request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .get();\n }\n else if (clientRequest.getHttpMethodType() == Constants.postRequest)\n {\n // Create InvocationBuilder\n ServiceLogger.LOGGER.info(\"Starting invocation builder...\");\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Map<String, Object> queryMap = clientRequest.getQueryParams();\n\n if (queryMap != null)\n {\n ServiceLogger.LOGGER.info(\"QUERY MAP NOT NULL.\");\n for (Map.Entry<String, Object> entry : queryMap.entrySet())\n {\n webTarget = webTarget.queryParam(entry.getKey(), entry.getValue());\n }\n }\n ServiceLogger.LOGGER.info(\"WEBTARGET: \" + webTarget.toString());\n\n ServiceLogger.LOGGER.info(\"Got a POST request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .post(Entity.entity(clientRequest.getRequest(), MediaType.APPLICATION_JSON));\n }\n else if (clientRequest.getHttpMethodType() == Constants.deleteRequest)\n {\n String pathParam = clientRequest.getPathParam();\n if (pathParam != null)\n {\n webTarget = webTarget.path(pathParam);\n }\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\n ServiceLogger.LOGGER.info(\"Got a DELETE request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .delete();\n }\n else\n {\n ServiceLogger.LOGGER.warning(ANSI_YELLOW + \"Request was not sent successfully\");\n }\n ServiceLogger.LOGGER.info(ANSI_GREEN + \"Sent!\" + ANSI_RESET);\n\n // Check status code of request\n String jsonText = \"\";\n int httpstatus = response.getStatus();\n\n jsonText = response.readEntity(String.class);\n\n // Add response to database\n String email = clientRequest.getEmail();\n String sessionID = clientRequest.getSessionID();\n ResponseDatabase.insertResponseIntoDB(clientRequest.getTransactionID(), jsonText, email, sessionID, httpstatus);\n\n }", "public void start() {\n \t\tLog.info(\"Starting service of repository requests\");\n \t\ttry {\n \t\t\tresetNameSpace();\n \t\t} catch (Exception e) {\n \t\t\tLog.logStackTrace(Level.WARNING, e);\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\tbyte[][]markerOmissions = new byte[2][];\n \t\tmarkerOmissions[0] = CommandMarkers.COMMAND_MARKER_REPO_START_WRITE;\n \t\tmarkerOmissions[1] = CommandMarkers.COMMAND_MARKER_BASIC_ENUMERATION;\n \t\t_markerFilter = new Exclude(markerOmissions);\n \t\t\n \t\t_periodicTimer = new Timer(true);\n \t\t_periodicTimer.scheduleAtFixedRate(new InterestTimer(), PERIOD, PERIOD);\n \n \t}", "Fog_Services createFog_Services();", "public interface RESTService {\n\n /**\n * Check Voter Services\n **/\n\n //TODO to check this is work or not\n //@GET(Config.REGISTER) Call<User> registerUser(@Header(\"uuid\") String uuid,\n // @QueryMap Map<String, String> body);\n\n @GET(Config.REGISTER) Call<User> registerUser(@QueryMap Map<String, String> body);\n\n /**\n * Maepaysoh services\n **/\n\n //candidate\n @GET(Config.CANDIDATE_LIST_URL) Call<CandidateListReturnObject> getCandidateList(\n @QueryMap Map<String, String> optionalQueries);\n\n @GET(Config.CANDIDATE_URL + \"/{id}\") Call<JsonObject> getCandidate(@Path(\"id\") String id,\n @QueryMap Map<String, String> optionalQueries);\n\n //geo location\n @GET(Config.GEO_LOCATION_URL) Call<GeoReturnObject> getLocationList(\n @QueryMap Map<String, String> optionalQueries);\n\n @GET(Config.GEO_LOCATION_SEARCH) Call<JsonObject> searchLocation(\n @QueryMap Map<String, String> optionalQueries);\n\n //party\n @GET(Config.PARTY_LIST_URL) Call<PartyReturnObject> getPartyList(\n @QueryMap Map<String, String> optionalQueries);\n\n @GET(Config.PARTY_LIST_URL + \"/{id}\") Call<JsonObject> getPartyDetail(@Path(\"id\") String id);\n\n //OMI service\n @GET(Config.MOTION_DETAIL_URL) Call<JsonObject> getMotionDetail(@Query(\"mpid\") String mpId);\n\n @GET(Config.MOTION_COUNT) Call<JsonObject> getMotionCount(@Query(\"mpid\") String mpId);\n\n @GET(Config.QUESTION_DETAIL_URL) Call<JsonObject> getQuestionDetail(@Query(\"mpid\") String mpId);\n\n @GET(Config.QUESTION_COUNT) Call<JsonObject> getQuestionCount(@Query(\"mpid\") String mpId);\n\n @GET(Config.QUESTION_MOTION) Call<JsonObject> getQuestionAndMotion(@Query(\"mpid\") String mpId);\n\n @GET(Config.COMPARE_QUESTION) Call<JsonElement> getCompareQuestion(\n @Query(\"first\") String first_candidate_id, @Query(\"second\") String second_candidate_id);\n\n @GET(Config.CANDIDTE_AUTO_SEARCH) Call<ArrayList<CandidateSearchResult>> searchCandidate(\n @Query(\"q\") String keyWord, @QueryMap Map<String, Integer> options);\n\n @GET(Config.CANDIDATE_COUNT) Call<JsonObject> getCandidateCount(@Query(\"party\") String party_id);\n\n @GET(Config.CURRENT_COUNT) Call<JsonObject> getCurrentCount();\n\n @GET(Config.FAQ_LIST_URL) Call<FAQListReturnObject> listFaqs(\n @QueryMap Map<String, String> options);\n\n @GET(Config.FAQ_SEARCH) Call<FAQListReturnObject> searchFaq(@Query(\"q\") String keyWord,\n @QueryMap Map<String, String> options);\n\n @GET(\"/faq/{faq_id}\") Call<FAQDetailReturnObject> searchFaqById(@Path(\"faq_id\") String faqId,\n @QueryMap Map<String, String> options);\n\n @GET(Config.APP_VERSIONS) Call<JsonObject> checkUpdate();\n}", "WebClientServiceRequest serviceRequest();", "private boolean invoke(HttpRequest request, HttpResponse response) {\n\t\t\n\t\tString[] requestSplit=request.getPath().split(\"/\",3);\n\t\t// first: empty (string starts with '/')\n\t\t// second: service name\n\t\t// third: URI rest\n\t\tString serviceName=\"\";\n\t\tString methodName=\"\";\n\t\tString restURI=\"\";\n\t\tString content=\"\";\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tserviceName=requestSplit[1];\n\t\t\tmethodName=REST_DECODER; //special method in service\n\t\t\t\n\t\t\tif(requestSplit.length>=3)\n\t\t\t{\n\t\t\t\tint varsstart=requestSplit[2].indexOf('?');\n\t\t\t\tif(varsstart>0)\n\t\t\t\t\trestURI=requestSplit[2].substring(0,varsstart);\n\t\t\t\telse\n\t\t\t\t\trestURI=requestSplit[2];\n\t\t\t}\n\t\t\t\n\t\t\tcontent=request.getContentString();\n\t\t\t\n\t\t\tint httpMethodInt=request.getMethod();\n\t\t\tString httpMethod=\"get\";\n\t\t\t\n\t\t\tswitch (httpMethodInt) \n\t\t\t{\n\t\t\t\tcase HttpRequest.METHOD_GET:\n\t\t\t\t\thttpMethod=\"get\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase HttpRequest.METHOD_HEAD:\n\t\t\t\t\thttpMethod=\"head\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase HttpRequest.METHOD_DELETE:\n\t\t\t\t\thttpMethod=\"delete\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase HttpRequest.METHOD_POST:\n\t\t\t\t\thttpMethod=\"post\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase HttpRequest.METHOD_PUT:\n\t\t\t\t\thttpMethod=\"put\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(content==null)\n\t\t\t\tcontent=\"\";\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tString[][] variables = {};//extract variables from request\n\t\t\t\n\t\t\tArrayList<String[]> variablesList=new ArrayList<String[]>();\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tEnumeration en = request.getGetVarNames();\t\t\n\t\t\tString querystr=\"\";\n\t\t\twhile(en.hasMoreElements())\n\t\t\t{\n\t\t\t\tString param = (String) en.nextElement();\n\t\t\t\tString val= request.getGetVar(param);\n\t\t\t\t\n\t\t\t\tString[] pair={param,val};\n\t\t\t\t//connector.logMessage(param+\" \"+val);\n\t\t\t\tvariablesList.add(pair);\n\t\t\t\tquerystr+=param+\" = \"+val+\" \";\n\t\t\t}\n\t\t\tconnector.logMessage(request.getMethod()+\" \"+request.getUrl()+\" \"+querystr);\n\t\t\tvariables=variablesList.toArray(new String[variablesList.size()][2]);\n\t\t\t\n\t\t\t//connector.logMessage(content);\n\t\t\tSerializable[] parameters={httpMethod,restURI,variables,content};\n\t\t\t\n\t\t\tSerializable result;\t\n\t\t\tMediator mediator = _userSessions.get(_currentUserId).getMediator();//get registered mediator\n\t\t\tresult= mediator.invoke(serviceName,methodName, parameters, connector.preferLocalServices());// invoke service method\n\t\t\t\n\t\t\tsendInvocationSuccess ( result, response );\n\t\t\treturn true;\n\t\t\t\n\t\t} catch ( NoSuchServiceException e ) {\n\t\t\tsendNoSuchService(request, response, serviceName);\t\t\t\n\t\t} catch ( TimeoutException e ) {\n\t\t\tsendNoSuchService(request, response, serviceName);\n\t\t} catch ( NoSuchServiceMethodException e ) {\n\t\t\tsendNoSuchMethod(request, response);\n\t\t} catch ( L2pSecurityException e ) {\n\t\t\tsendSecurityProblems(request, response, e);\t\t\t\t\t\n\t\t} catch ( ServiceInvocationException e ) {\n\t\t\tif ( e.getCause() == null )\n\t\t\t\tsendResultInterpretationProblems(request, response);\n\t\t\telse\n\t\t\t\tsendInvocationException(request, response, e);\t\t\t\t\t\t\t\t\n\t\t} catch ( InterruptedException e ) {\n\t\t\tsendInvocationInterrupted(request, response);\n\t\t} catch ( InvalidCodingException e ) {\n\t\t\tsendConnectorProblems(request, response, e);\n\t\t} catch ( CodingException e ) {\n\t\t\tsendResultInterpretationProblems(request, response);\n\t\t} catch (Exception e)\n\t\t{\n\t\t\n\t\t}\n\t\treturn false;\n\t}", "public interface IPokeapiService {\n\n\n\n// @GET(\"lp_iem/result.json\")\n// Call<PokemonWs> listPokemon();\n\n @GET(\"?action=cardlist&\")\n Call<List<Pokemon>> listPokemon(@Query(\"user\")int user);\n //@Query(\"user\")int user\n\n @GET(\"?action=details&\")\n Call<Pokemon> getPokemon(@Query(\"card\")int id_card);\n\n @GET(\"?action=pokedex\")\n Call<List<Pokemon>> getPokedex();\n\n}", "public interface HttpService {\n//banner/query?type=1\n // public static final String BASE_URL=\"http://112.124.22.238:8081/course_api/\";\n @GET(\"banner/query\")\n Call<List<HeaderBean>> getHeaderData(@Query(\"type\") String type);\n @GET(\"campaign/recommend\")\n Call<List<RecommendBean>> getRecommendData();\n}", "public void request() {\n }", "@Override\n\tprotected void service(HttpServletRequest arg0, HttpServletResponse arg1)\n\t\t\tthrows ServletException, IOException {\n\t\tBaseServlet exeAc = bac.createAC(); \n\t\texeAc.ucache = bac.ucache;\n\t\texeAc.init(this.getServletConfig()); \n\t\t//扫描服务\n\t\t//KernelActivitor.fetchService2(exeAc); \n\t\tif(null == exeAc.gservice)\n\t\t\texeAc.gservice = UBaseService.getInstance();\n\t\texeAc.service(arg0, arg1);\n\t\t//c.setTime(new Date());\n\t\t//long endTime = c.getTimeInMillis();\n\t\t//log.debug(\"--处理总时长为:\"+(endTime-startTime)+\"毫秒\");\n\t}", "public interface BeaconQuestService {\n\n @GET(\"/beaconQuest/index/takeChallenge/{accountId}/{beaconId}\")\n Call<ResponseBody> takeChallenge (@Path(\"accountId\") String accountId,\n @Path(\"beaconId\") String beaconId\n );\n\n @GET(\"beaconQuest/index/challengeAnswer/{accountId}/{beaconId}/{answer}\")\n Call<ResponseBody> challengeAnswer(@Path(\"accountId\") String userid,\n @Path(\"beaconId\") String beaconid,\n @Path(\"answer\") String answer\n );\n\n @GET(\"beaconQuest/index//challengeCancel/{accountId}/{beaconId}\")\n Call<ResponseBody> challengeAnswer(@Path(\"accountId\") String userid,\n @Path(\"beaconId\") String beaconid\n );\n\n @GET(\"beaconQuest/index//register/{username}/{password}\")\n Call<ResponseBody> registerAccount(@Path(\"username\") String username,\n @Path(\"password\") String password\n );\n\n @GET(\"beaconQuest/index//login/{username}/{password}/\")\n Call<ResponseBody> login(@Path(\"username\") String username,\n @Path(\"password\") String password\n );\n}", "@Override\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tString customerEmail = req.getParameter(\"email\");\n\t\tInteger min = null;\n\t\tInteger max = null;\n\t\tint numSeats = Integer.parseInt(req.getParameter(\"num\"));\n\t\tif(req.getParameter(\"min\") != null){\n\t\t\tmin = Integer.parseInt(req.getParameter(\"min\"));\n\t\t}\n\t\tif(req.getParameter(\"max\") != null){\n\t\t\tmax = Integer.parseInt(req.getParameter(\"max\"));\n\t\t}\n\t\tOptional<Integer> minLevel = Optional.ofNullable(min);\n\t\tOptional<Integer> maxLevel = Optional.ofNullable(max);\n\t\t\n\t\tSeatHold hold = service.findAndHoldSeats(numSeats, minLevel, maxLevel, customerEmail);\n\t\tresp.setIntHeader(\"HOLD-ID\", hold.getHoldId());\n\t\tresp.getWriter().print(hold.toString());\n\t}", "public void infoServiceRequest(String requestType, String param){\r\n \r\n InetAddress destAddr = null;\r\n String[] nodeInfo = null;\r\n String ip = this.getPeerIP().split(\":\")[0].substring(2);\r\n try {\r\n destAddr = InetAddress.getByName(ip);\r\n } catch (UnknownHostException ex) {\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(ex), \"severe\");\r\n }\r\n int destPort = Integer.parseInt(managerInfoServicePort);\r\n \r\n DataOutputStream output;\r\n DataInputStream input;\r\n \r\n Socket sock = null;\r\n boolean connected = false;\r\n while (!connected) {\r\n try {\r\n sock = new Socket(destAddr, destPort);\r\n connected = true;\r\n } catch (IOException ex) {\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException ex1) {\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(ex1), \"severe\");\r\n }\r\n }\r\n }\r\n try {\r\n output = new DataOutputStream(sock.getOutputStream());\r\n input = new DataInputStream(sock.getInputStream()); \r\n \r\n if(requestType.equals(\"UPDATE\")){\r\n output.writeUTF(requestType+\"-LOCAL\");\r\n output.flush();\r\n String infoServiceList = input.readUTF();\r\n infoSys.updateInfo(infoServiceList);\r\n }\r\n else if(requestType.equals(\"POISON\")){\r\n output.writeUTF(requestType+\"-LOCAL-\"+param);\r\n output.flush();\r\n infoSys.removeInfo(param);\r\n }\r\n else if(requestType.equals(\"ADD\")){\r\n output.writeUTF(requestType+\"-LOCAL-\"+param);\r\n output.flush();\r\n String infoServiceList = input.readUTF();\r\n //update local information service list\r\n infoSys.updateInfo(infoServiceList);\r\n }\r\n else if(requestType.equals(\"CPT-UPDATE\")){\r\n output.writeUTF(requestType);\r\n output.flush();\r\n String cptNode = input.readUTF();\r\n String[] cptNodes = cptNode.split(\", \");\r\n List singleCptList = new ArrayList<String>();\r\n for(int i = 0 ; i < cptNodes.length; ++i){\r\n singleCptList.add(cptNodes[i].substring(1,cptNodes[i].indexOf(\"]\")));\r\n }\r\n updateSubscriberList(\"CPT\",singleCptList); \r\n }\r\n else if(requestType.equals(\"CPT-DELETE\")){\r\n output.writeUTF(requestType+\"-\"+param);\r\n output.flush();\r\n subscriberList.get(\"CPT\").remove(param);\r\n }\r\n else if(requestType.equals(\"REQ-UPDATE\")){\r\n output.writeUTF(requestType);\r\n output.flush();\r\n String reqNode = input.readUTF();\r\n String[] reqNodes = reqNode.split(\", \");\r\n List reqList = new ArrayList<String>();\r\n for(int i = 0 ; i < reqNodes.length; ++i){\r\n reqList.add(reqNodes[i].substring(1,reqNodes[i].indexOf(\"]\")));\r\n }\r\n updateSubscriberList(\"REQ\",reqList); \r\n }\r\n else if(requestType.equals(\"REQ-DELETE\")){\r\n output.writeUTF(requestType+\"-\"+param);\r\n output.flush();\r\n subscriberList.get(\"REQ\").remove(param);\r\n }\r\n output.close();\r\n input.close();\r\n sock.close();\r\n } catch (IOException ex) {\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(ex), \"severe\");\r\n }\r\n }", "@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}", "protected abstract void nextRequest ();", "@Override\r\n\tpublic Answer handle(Request request) throws Exception {\r\n\t\tGPS startPoint = request.getStartPos();\r\n\t\tGPS endPoint = request.getEndPos();\r\n\t\tCurrentDistribution curDis = CurrentDistribution.getInstance();\r\n\t\tArrayList<Station> givenTypeAvaStations = null;// whether this init is a correct choice in case that ArrayList can not be covered directly \r\n\t\tdouble ridingSpeed = 0.00001;//if not given proper bicycle type, time cost would be extremely large\r\n\t\tif(request.getBikeType().equalsIgnoreCase(\"E\")) {\r\n\t\t\tridingSpeed = Server.eleRidingSpeed;\r\n\t\t\tgivenTypeAvaStations = curDis.geteAvaStationList();\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getBikeType().equalsIgnoreCase(\"M\")) {\r\n\t\t\tridingSpeed = Server.mecRidingSpeed;\r\n\t\t\tgivenTypeAvaStations = curDis.getmAvaStationList();\r\n\t\t}\r\n\r\n\t\tif(givenTypeAvaStations.size() == 0) {\r\n\t\t\tServer.error(\"no available station containing given type of bicycle\");\r\n\t\t}\r\n\r\n\t\tStation minStartStation = givenTypeAvaStations.get(0);\r\n\t\tStation minEndStation = curDis.getReturnableStationList().get(0);\r\n\t\t\r\n\t\tdouble minEndDis = Math.sqrt((minEndStation.getPos().getX() - endPoint.getX()) * (minEndStation.getPos().getX() - endPoint.getX()) + \r\n\t\t\t\t(minEndStation.getPos().getY() - endPoint.getY())*(minEndStation.getPos().getY() - endPoint.getY()));\r\n\t\t\r\n\t\tfor(Station s: curDis.getReturnableStationList()) {\r\n\t\t\tdouble endDis = Math.sqrt((s.getPos().getX() - endPoint.getX())*(s.getPos().getX() - endPoint.getX()) + \r\n\t\t\t\t\t(s.getPos().getY() - endPoint.getY()) * (s.getPos().getY() - endPoint.getY()));\r\n\t\t\tif( endDis < minEndDis) {\r\n\t\t\t\tminEndStation = s;\r\n\t\t\t\tminEndDis = endDis; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdouble minWalkRideTime = Math.sqrt((minStartStation.getPos().getX() - startPoint.getX()) * (minStartStation.getPos().getX() - startPoint.getX())+\r\n\t\t\t\t(minStartStation.getPos().getY() - startPoint.getY()) * (minStartStation.getPos().getY() - startPoint.getY()))/\r\n\t\t\t\tServer.walkingSpeed +\r\n\t\t\t\t(Math.abs(minStartStation.getPos().getX() - endPoint.getX())+ \r\n\t\t\t\t\t\tMath.abs(minStartStation.getPos().getY() - endPoint.getY()))/\r\n\t\t\t\tridingSpeed;\r\n\t\t\r\n\t\tfor(Station s: givenTypeAvaStations) {\r\n\t\t\tdouble walkRideTime = Math.sqrt((s.getPos().getX() - startPoint.getX()) * (s.getPos().getX() - startPoint.getX())+\r\n\t\t\t\t\t(s.getPos().getY() - startPoint.getY()) * (s.getPos().getY() - startPoint.getY()))/\r\n\t\t\t\t\tServer.walkingSpeed +\r\n\t\t\t\t\t(Math.abs(s.getPos().getX() - endPoint.getX())+ \r\n\t\t\t\t\t\t\tMath.abs(s.getPos().getY() - endPoint.getY()))/\r\n\t\t\t\t\tridingSpeed;\r\n\t\t\tif( walkRideTime < minWalkRideTime) {\r\n\t\t\t\tminStartStation = s;\r\n\t\t\t\tminWalkRideTime = walkRideTime; \r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\r\n\t\tdouble minStartDis = Math.sqrt((minStartStation.getPos().getX() - startPoint.getX())*(minStartStation.getPos().getX() - startPoint.getX())\r\n\t\t\t\t+ (minStartStation.getPos().getY() - startPoint.getY())*(minStartStation.getPos().getY() - startPoint.getY()));\r\n\t\tdouble minRideDis = (Math.abs(minStartStation.getPos().getX() - minEndStation.getPos().getX())+ \r\n\t\t\t\tMath.abs(minStartStation.getPos().getY() - minEndStation.getPos().getY()));\r\n\t\tdouble minTime = (minEndDis + minStartDis)/ Server.walkingSpeed + minRideDis/ridingSpeed;\r\n\t\tdouble minDis = minStartDis + minEndDis + minRideDis;\r\n\t\tif(minTime > 500) {\r\n\t\t\tthrow new Exception(\"BikeType input illegal.\");\r\n\t\t}\r\n\t\t\r\n\t\tAnswer ans = new Answer(minStartStation, minEndStation, minTime, minDis);\r\n\t\treturn ans;\r\n\t}", "public void sendGetRequest() {\r\n\t\tString[] requests = this.input.substring(4, this.input.length()).split(\" \"); \r\n\t\t\r\n\t\tif(requests.length <= 1 || !(MyMiddleware.readSharded)){\r\n\t\t\tnumOfRecipients = 1;\r\n\t\t\trecipient = servers.get(loadBalance());\r\n\r\n\t\t\trecipient.send(this, input);\r\n\t\t\tsendTime = System.nanoTime();\r\n\r\n\t\t\tworkerTime = sendTime - pollTime;\r\n\r\n\t\t\t\r\n\t\t\tif(requests.length <= 1) {\r\n\t\t\t\tnumOfGets++;\r\n\t\t\t\ttype= \"10\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumOfMultiGets++;\r\n\t\t\t\ttype = requests.length+\"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString reply = recipient.receive();\r\n\t\t\treceiveTime = System.nanoTime();\r\n\t\t\tprocessingTime = receiveTime - sendTime;\r\n\t\t\t\r\n\t\t\tint hit = 0;\r\n\t\t\thit += reply.split(\"VALUE\").length - 1;\r\n\t\t\tmiss += requests.length-hit;\r\n\r\n\t\t\tif(!(reply.endsWith(\"END\"))) {\r\n\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tsendBack(currentJob.getClient(), reply);\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnumOfMultiGets++;\r\n\t\t\ttype = requests.length+\"\";\r\n\t\t\tnumOfRecipients = servers.size();\r\n\t\t\trequestsPerServer = requests.length / servers.size();\r\n\t\t\tremainingRequests = requests.length % servers.size() ;\r\n\t\t\t\r\n\t\t\t//The worker thread sends a number of requests to each server equal to requestsPerServer \r\n\t\t\t//and at most requestsPerServer + remainingRequests\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < servers.size(); i++) {\r\n\t\t\t\tmessage = requestType;\r\n\t\t\t\tfor(int j = 0; j < requestsPerServer; j++){\r\n\t\t\t\t\tmessage += \" \";\r\n\t\t\t\t\tmessage += requests[requestsPerServer*i+j];\r\n\t\t\t\t\tif(i < remainingRequests) {\r\n\t\t\t\t\t\tmessage += \" \";\r\n\t\t\t\t\t\tmessage += requests[requests.length - remainingRequests + i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tservers.get(i).send(this, message);\r\n\t\t\t}\r\n\t\t\tsendTime = System.nanoTime();\r\n\r\n\t\t\tworkerTime = sendTime - pollTime;\r\n\r\n\t\t\tint hit = 0;\r\n\t\t\tfor(ServerHandler s : servers) {\r\n\t\t\t\tString ricevuto = s.receive();\r\n\t\t\t\thit += ricevuto.split(\"VALUE\").length - 1;\r\n\t\t\t\treplies.add(ricevuto);\r\n\t\t\t}\r\n\t\t\treceiveTime = System.nanoTime();\r\n\t\t\tprocessingTime = receiveTime - sendTime;\r\n\r\n\t\t\tmiss += requests.length-hit;\r\n\t\t\t\r\n\t\t\tfinalReply = \"\";\r\n\t\t\tfor(String reply : replies) {\r\n\t\t\t\tif(!(reply.endsWith(\"END\"))) {\r\n\t\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\t\treplies.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treply = reply.substring(0, reply.length() - 3);\r\n\t\t\t\t\tfinalReply += reply;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalReply += \"END\";\r\n\t\t\tsendBack(currentJob.getClient(), finalReply);\r\n\t\t\treplies.clear();\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "void service(ServletRequest req, ServletResponse res) throws ServletException, IOException;", "public abstract void mo20157a(DogHomeRsp dogHomeRsp);", "@GetMapping(value = \"/getInfo\")\n @ResponseBody\n public String getInfo() {\n System.out.println(\"discoveryClient.getServices().size() = \" + discoveryClient.getServices().size());\n\n StringBuffer stringBuffer = new StringBuffer();\n for( String s : discoveryClient.getServices()){\n System.out.println(\"services \" + s);\n List<ServiceInstance> serviceInstances = discoveryClient.getInstances(s);\n for(ServiceInstance si : serviceInstances){\n stringBuffer.append(\" services:\" + s + \":getHost()=\" + si.getHost());\n stringBuffer.append(\"\\n\");\n stringBuffer.append(\" services:\" + s + \":getPort()=\" + si.getPort());\n stringBuffer.append(\"\\n\");\n stringBuffer.append(\" services:\" + s + \":getServiceId()=\" + si.getServiceId());\n stringBuffer.append(\"\\n\");\n stringBuffer.append(\" services:\" + s + \":getUri()=\" + si.getUri());\n stringBuffer.append(\"\\n\");\n stringBuffer.append(\" services:\" + s + \":getMetadata()=\" + si.getMetadata());\n stringBuffer.append(\"\\n\");\n stringBuffer.append(\" services:\" + s + \":getScheme()=\" + si.getScheme());\n stringBuffer.append(\"\\n\");\n\n System.out.println(\" services:\" + s + \":getHost()=\" + si.getHost());\n System.out.println(\" services:\" + s + \":getPort()=\" + si.getPort());\n System.out.println(\" services:\" + s + \":getServiceId()=\" + si.getServiceId());\n System.out.println(\" services:\" + s + \":getUri()=\" + si.getUri());\n System.out.println(\" services:\" + s + \":getMetadata()=\" + si.getMetadata());\n System.out.println(\" services:\" + s + \":getScheme()=\" + si.getScheme());\n System.out.println();\n }\n }\n return \"ok\";\n }", "private static void doRequestLogic(Map<String, String[]> requestParameters) {\n if (requestParameters.containsKey(\"fortuneRequest\") && requestParameters.containsKey(\"msisdn\")) {\n String[] fortuneRequestStringArray = requestParameters.get(\"fortuneRequest\");\n if (fortuneRequestStringArray.length == 0) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"Request was attempted with no parameters\");\n } else {\n String fortuneRequest = fortuneRequestStringArray[0]; // get the bytecode data\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"Received the ByteCode: {0}\", fortuneRequest);\n if (fortuneRequest.equalsIgnoreCase(\"0\")) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"Request is for Fortune Data\");\n\n String outStream = null;\n String errStream = null;\n String fortune = null;\n try {\n // run the Fortune command\n Process p = Runtime.getRuntime().exec(\"/usr/local/bin/fortune\");\n\n BufferedReader stdIn = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\n BufferedReader stdErr = new BufferedReader(new InputStreamReader(p.getErrorStream()));\n\n while ((outStream = stdIn.readLine()) != null) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"STDOUT: {0}\", outStream);\n if(!outStream.equalsIgnoreCase(\"null\")) {\n fortune += outStream;\n }\n }\n\n while ((errStream = stdErr.readLine()) != null) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"STDERR: {0}\", errStream);\n }\n\n } catch (IOException ex) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"IOException when attmpeting to process Fortune command.\", ex);\n }\n \n if (fortune != null) {\n if (0 != fortune.length()) {\n\n ByteString bs = null;\n\n try {\n\n // regex by alex to replace any patters of > 2 spaces with 1 space\n \n fortune = fortune.trim().replaceAll(\" +\", \" \");\n\n if (fortune.length() > 70) {\n fortune = fortune.substring(0, 67) + \"...\";\n }\n\n byte[] fortuneAscii = fortune.getBytes(\"ASCII\");\n bs = new ByteString(fortuneAscii);\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.SEVERE, null, ex);\n doRequestLogic(requestParameters);\n }\n\n\n if (bs == null) {\n doRequestLogic(requestParameters);\n }\n\n // transmit the fortune message to the handset\n CardSettings cs = new CardSettings(\n \"0000\",\n \"NONE\",\n \"NONE\",\n \"1\",\n \"NONE\",\n \"NONE\",\n \"1\",\n \"555559\",\n \"0000000000\",\n \"0\",\n \"0\",\n requestParameters.get(\"msisdn\")[0]);\n \n String toHex = bs.toHex();\n \n toHex = toHex.replace(\"6E756C6C\", \"\");\n \n String transmit = \"0A010000\" + \n ((toHex.length() / 2 < 0x0F) ? \"0\" + Integer.toHexString(toHex.length() / 2) : Integer.toHexString(toHex.length() / 2)) + toHex;\n\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"Transmitting APDU: {0}\", transmit);\n\n if (SendSms.sendMessage(transmit, cs, \"http://simulity.co.uk/ota/ram/command\")) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"The SMS {0} transmitted successfully.\", fortune);\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The SMS failed to transmit.\");\n }\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The Fortune length was zero.\");\n }\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The Fortune data was not set.\");\n }\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The request is not supported.\");\n }\n }\n }\n }", "private void requestIntercepts() {\n TrafficSelector.Builder selector = DefaultTrafficSelector.builder();\n selector.matchEthType(Ethernet.TYPE_IPV4);\n packetService.requestPackets(selector.build(), PacketPriority.REACTIVE, appId);\n selector.matchEthType(Ethernet.TYPE_ARP);\n packetService.requestPackets(selector.build(), PacketPriority.REACTIVE, appId);\n\n selector.matchEthType(Ethernet.TYPE_IPV6);\n if (ipv6Forwarding) {\n packetService.requestPackets(selector.build(), PacketPriority.REACTIVE, appId);\n } else {\n packetService.cancelPackets(selector.build(), PacketPriority.REACTIVE, appId);\n }\n }", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.service(req, resp);\r\n\t}", "private void onPreRequestData(int tag) {\n }", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "void handleRequest();", "@Override\n\tpublic void service(ServletRequest arg0, ServletResponse arg1)\n\t\t\tthrows ServletException, IOException\n\t{\n\t\tsuper.service(arg0, arg1);\n\t\trenewObject(arg0, arg1);\n\t\tout.print(\"do my service\");\n\t}", "public interface RequestURLs {\n String DEFAULT_URL = \"http://aperturedev.co.kr:21002/petcommunity/\";\n\n /*\n 매칭 서비스 관련\n */\n String GET_PET_TYPES = DEFAULT_URL + \"services/get-pettypes.php\"; // 강아지 종을 가져온다.\n String REGIST_MATCH_PET = DEFAULT_URL + \"matching/regist-new-pet.php\"; // 팻 등록 실시\n String MATCHING_OTHER_PET = DEFAULT_URL + \"matching/matching.php\"; // 매칭할 팻을 하나 가져옵니다.\n\n /*\n 사용자 정보 관련\n */\n String GET_USER_INFO = DEFAULT_URL + \"users/get-info.php\"; // UUID -> 사용자 정보\n String REGIST_SERVICE = DEFAULT_URL + \"users/signup.php\"; // 회원가입을 실시한다.\n String IS_REGIST_SERVICE = DEFAULT_URL + \"/users/is-registed.php\"; // 회원가입 되어 있는지 확인한다.\n String LOGIN_SERVICE = DEFAULT_URL + \"users/signin.php\"; // 로그인 처리한다.\n\n\n\n\n}", "private void buscarLista(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "public interface ReceiveThirdDataService {\n\n /**\n * 解析第三数据,每叫号业务推送\n *\n * @param courtTakeNumPojo\n * @return\n */\n RestApiMsg<String> transferThirdData(CourtTakeNumPojo courtTakeNumPojo, HttpServletRequest request);\n}", "private void getMall(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "@Override\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.service(req, resp);\n\t}", "public interface RedPacketService {\n\n /**\n * @param userId 用户id\n * @param redPacketId 红包Id\n * @param pageNum\n * @param pageSize\n * @return\n */\n\n @FormUrlEncoded\n @POST(\"api/finance/redpacket/v1/selectRedpacketInfo\")\n Observable<ResponseNBean<RedPacketDetailEntity>> redPacketDetail(@Field(\"userId\") String userId, @Field(\"redPacketId\") String redPacketId,\n @Field(\"pageNum\") int pageNum, @Field(\"pageSize\") int pageSize);\n\n /**\n * 确认发红包接口\n *\n * @param userId\n * @param redPacketId\n * @param pwd\n * @return\n */\n @FormUrlEncoded\n @POST(\"api/finance/redpacket/v1/sendRedPackets\")\n Observable<PayReusltBean> sendRedPacket(@Field(\"userId\") String userId, @Field(\"redPacketId\") String redPacketId, @Field(\"password\") String pwd);\n\n\n /**\n * 发送单个或群随机红包\n *\n * @param userId\n * @param type\n * @param money\n * @param friendAccid\n * @param size\n * @param leaveMessage\n * @param payType\n * @return\n */\n @FormUrlEncoded\n @POST(\"api/finance/redpacket/v1/sendRedPacketsInit\")\n Observable<ResponseBean<RedPacketDetailEntity>> sendRedPacket(@Field(\"userId\") String userId, @Field(\"type\") String type,\n @Field(\"money\") String money, @Field(\"friendAccid\") String friendAccid, @Field(\"size\") int size, @Field(\"leaveMessage\") String leaveMessage, @Field(\"payType\") String payType);\n\n @POST(\"api/finance/redpacket/v1/sendRedPacketsInit\")\n Observable<ResponseNBean<RedInit>> sendRedPacket(@Query(\"userId\") String userId, @Query(\"type\") String type,\n @Query(\"money\") String money, @Query(\"friendAccid\") String friendAccid, @Query(\"size\") int size, @Query(\"leaveMessage\") String leaveMessage, @Query(\"payType\") String payType,\n @Query(\"unitPrice\") String unitPrice);\n\n\n /**\n * 转账接口\n *\n * @param amount\n * @param payPass\n * @param meAccId\n * @param otherAccId\n * @param leaveMessage\n * @return\n */\n @FormUrlEncoded\n @POST(\"api/finance/transfer/v1/transferMoney\")\n Observable<ResponseNBean<String>> transfer(@Field(\"amount\") String amount, @Field(\"payPass\") String payPass,\n @Field(\"meAccId\") String meAccId, @Field(\"otherAccId\") String otherAccId, @Field(\"leaveMessage\") String leaveMessage);\n\n\n}", "private void caseForfeit(Request request) {\n }", "protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\treq.setCharacterEncoding(\"utf-8\");\n\t\tString method = req.getParameter(\"method\");\n//\t\tSystem.out.println(\"PPPPPPPPPPPPPPP\");\n\t\tif (\"Time_qunee\".equals(method)) {\n\t\t\ttry {\n\t\t\t\tTime_qunee(req, resp);\n\t\t\t} catch (SQLException 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\telse if (\"Time_qunee_pre\".equals(method)) {\n\t\t\ttry {\n\t\t\t\tTime_qunee_pre(req, resp);\n\t\t\t} catch (SQLException 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\telse if (\"Time_qunee_fold\".equals(method)) {\n\t\t\ttry {\n\t\t\t\tTime_qunee_fold(req, resp);\n\t\t\t} catch (SQLException 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\telse if(\"Create_root_json\".equals(method)) {\n\t\t\tresp.setCharacterEncoding(\"utf-8\");\n\t\t\tresp.getWriter().write(DataServlet.createRootInfoJson());\n\t\t}\n\t\telse if(\"Create_montior_json\".equals(method)) {\n\t\t\tresp.setCharacterEncoding(\"utf-8\");\n\t\t\tresp.getWriter().write(DataServlet.createMontiorInfoJson());\n\t\t}\n\t}", "public interface FairRepairService {\n String ENDPOINT = \"http://fairrepair.onsisdev.info/providerapi/\";\n\n @POST(\"signup\")\n @Multipart\n Call<SignInResponse> signUp(@PartMap Map<String, RequestBody> requestMap);\n\n @POST(\"login\")\n @FormUrlEncoded\n Call<SignInResponse> login(@FieldMap Map<String, String> params);\n\n @POST(\"forgotpassword\")\n @FormUrlEncoded\n Call<SignInResponse> forgotPassword(@FieldMap Map<String, String> params);\n\n @POST(\"logout\")\n @FormUrlEncoded\n Call<SignInResponse> logout(@FieldMap Map<String, String> params);\n\n @POST(\"getprofile\")\n @FormUrlEncoded\n Call<SignInResponse> getProfile(@FieldMap Map<String, String> params);\n\n @POST(\"editprofile\")\n @Multipart\n Call<SignInResponse> editProfile(@PartMap Map<String, RequestBody> params);\n\n @POST(\"changepassword\")\n @FormUrlEncoded\n Call<SignInResponse> resetPassword(@FieldMap Map<String, String> params);\n\n @POST(\"staticpages\")\n @FormUrlEncoded\n Call<SignInResponse> getStaticPages(@FieldMap Map<String, String> params);\n\n @POST(\"getservicetype\")\n @FormUrlEncoded\n Call<SignInResponse> getServiceType(@FieldMap Map<String, String> params);\n\n @POST(\"changeAvailability\")\n @FormUrlEncoded\n Call<SignInResponse> changeAvailability(@FieldMap Map<String, String> params);\n\n @POST(\"requestaccept\")\n @FormUrlEncoded\n Call<SignInResponse> acceptRequest(@FieldMap Map<String, String> requestMap);\n\n @POST(\"cancelrequest\")\n @FormUrlEncoded\n Call<SignInResponse> cancelRequest(@FieldMap Map<String, String> requestMap);\n\n @POST(\"billing\")\n @FormUrlEncoded\n Call<SignInResponse> generateBill(@FieldMap Map<String, String> requestMap);\n\n @POST(\"completerequest\")\n @FormUrlEncoded\n Call<SignInResponse> completeRequest(@FieldMap Map<String, String> requestMap);\n\n @POST(\"updatelatlong\")\n @FormUrlEncoded\n Call<SignInResponse> updateLatLng(@FieldMap Map<String, String> requestMap);\n\n @POST(\"arraived\")\n @FormUrlEncoded\n Call<SignInResponse> arrived(@FieldMap Map<String, String> requestMap);\n\n /********\n * Factory class that sets up a new ribot services\n *******/\n class Factory {\n\n public static FairRepairService makeFairRepairService(Context context) {\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n\n OkHttpClient okHttpClient = new OkHttpClient.Builder()\n .connectTimeout(2, TimeUnit.MINUTES)\n .readTimeout(2, TimeUnit.MINUTES)\n .addInterceptor(new UnauthorisedInterceptor(context))\n .addInterceptor(logging)\n .build();\n\n Gson gson = new GsonBuilder()\n .setDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\")\n .create();\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(FairRepairService.ENDPOINT)\n .client(okHttpClient)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .build();\n return retrofit.create(FairRepairService.class);\n }\n }\n}", "@Override\n @HystrixCommand(fallbackMethod = \"fallback\")\n public SearchResponse fetchAds(SearchRequest request) {\n List<AdSlot> adSlots = request.getRequestInfo().getAdSlots();\n\n // features in FeatureInfo\n KeywordFeature keywordFeature = request.getFeatureInfo().getKeywordFeature();\n InterestFeature interestFeature = request.getFeatureInfo().getInterestFeature();\n DistrictFeature districtFeature = request.getFeatureInfo().getDistrictFeature();\n\n\n // Match all features (AND) or either one (OR)\n FeatureRelation relation = request.getFeatureInfo().getRelation();\n\n // construct response\n SearchResponse response = new SearchResponse();\n Map<String, List<SearchResponse.Creative>> adSlot2Ads =\n response.getAdSlot2Ads();\n\n for (AdSlot adSlot : adSlots) {\n\n Set<Long> targetUnitIdSet;\n\n /**\n * 1. Screening procedure\n *\n * Get AdUnit based on Ads position type (e.g: Screen, Card, Card Middle, Ads Card\n * while video pausing etc..)\n */\n Set<Long> adUnitIdSet = DataTable.of(\n AdUnitIndex.class\n ).match(adSlot.getPositionType());\n\n\n /**\n * 2. Filtering process based on FeatureInfo\n * (e.g: keywords, district, interest)\n */\n if (relation == FeatureRelation.AND) {\n\n filterKeywordFeature(adUnitIdSet, keywordFeature);\n filterDistrictFeature(adUnitIdSet, districtFeature);\n filterInterestTagFeature(adUnitIdSet, interestFeature);\n\n targetUnitIdSet = adUnitIdSet;\n\n } else {\n\n targetUnitIdSet = getOrRelationUnitIds(\n adUnitIdSet,\n keywordFeature,\n districtFeature,\n interestFeature\n );\n }\n\n\n /**\n * 3. Filtering process based on Status\n * (e.g: VALID / INVALID)\n */\n List<AdUnitObject> unitObjects = DataTable.of(AdUnitIndex.class)\n .fetch(targetUnitIdSet);\n\n filterAdUnitAndPlanStatus(unitObjects, CommonStatus.VALID);\n\n /**\n * 4. Filtering process based on AdSlot info (e.g: width, height, type)\n *\n */\n List<Long> adCreativeIds = DataTable.of(AdCreativeUnitIndex.class)\n .selectCreativeAds(unitObjects);\n\n List<AdCreativeObject> creatives = DataTable.of(AdCreativeIndex.class)\n .fetch(adCreativeIds);\n\n filterCreativeByAdSlot(\n creatives,\n adSlot.getWidth(),\n adSlot.getHeight(),\n adSlot.getType()\n );\n\n /**\n * 5. Finally, select the corresponding Ad-creatives (ads),\n * convert it to creativeResponse\n * put it into adSlot2Ads map (key: adSlotCode, value: List<Creative>)\n *\n */\n adSlot2Ads.put(\n adSlot.getAdSlotCode(),\n buildCreativeResponse(creatives)\n );\n }\n\n log.info(\"fetchAds: {}-{}\",\n JSON.toJSONString(request),\n JSON.toJSONString(response));\n\n return response;\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) {\n\t\tList<Singer> singers = new ArrayList<>();\n\t\tsingers = serviceSinger.listar();\n\t\ttry {\n\t\t\tPrintWriter out = response.getWriter();\n\t\t\tfor(Singer singer : singers) {\n\t\t\t\tout.println(singer.getId() + \" || \" + singer.getFirst_name() + \" || \" \n\t\t\t\t\t\t+ singer.getLast_name() + \" || \" + singer.getBirth_date());\n\t\t\t}\n\t\t\tout.close();\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tprotected void service(HttpServletRequest arg0, HttpServletResponse arg1)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.service(arg0, arg1);\n\t}", "@Override\n protected void service(HttpServletRequest req, HttpServletResponse resp) {\n OData odata = OData.newInstance();\n ServiceMetadata edm = odata.createServiceMetadata(new DemoEdmProvider(), new ArrayList<EdmxReference>());\n ODataHttpHandler handler = odata.createHandler(edm);\n handler.register(new DemoEntityCollectionProcessor());\n\n // let the handler do the work\n handler.process(req, resp);\n }", "boolean service(Request request, Response response) throws IOException;", "@Override\n\tpublic void service(ServletRequest req, ServletResponse res)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n ResponseResult result = null;\n\n try {\n P2PBridgeWebServiceStub stub = new P2PBridgeWebServiceStub();\n GetStatus stat = new GetStatus();\n stat.setIpAddress(request.getParameter(\"ip_address\"));\n stat.setMake(request.getParameter(\"device\"));\n stat.setModel(request.getParameter(\"model\"));\n stat.setUserName(request.getParameter(\"username\"));\n stat.setPassword(request.getParameter(\"password\"));\n\n GetStatusResponse res = stub.getStatus(stat);\n result = res.get_return();\n\n System.out.println(result.getResult());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n Utils.generateResponse(result, response);\n }", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service getServiceReq(Service service){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service serviceReq =\n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service();\n\t\t\n\t\tserviceReq.setServiceCode( service.getServiceCode() );\n\t\tserviceReq.setServiceName( service.getServiceName() );\n\t\tserviceReq.setGateway( service.getGateway() );\n\t\tserviceReq.setDestination( service.getDestination() );\n\t\tserviceReq.setAdultPrice( new Double( service.getAdultPrice() ) );\n\t\tserviceReq.setChild1Price( new Double( service.getChild1Price() ) );\n\t\tserviceReq.setChild2Price( new Double( service.getChild2Price() ) );\n\t\tserviceReq.setChild3Price( new Double( service.getChild3Price() ) );\n\t\tserviceReq.setChild1MinAge( new Byte( service.getChild1MinAge() ) );\n\t\tserviceReq.setChild2MinAge( new Byte( service.getChild2MinAge() ) );\n\t\tserviceReq.setChild3MinAge( new Byte( service.getChild3MinAge() ) );\n\t\tserviceReq.setChild1MaxAge( new Byte( service.getChild1MaxAge() ) );\n\t\tserviceReq.setChild2MaxAge( new Byte( service.getChild2MaxAge() ) );\n\t\tserviceReq.setChild3MaxAge( new Byte( service.getChild3MaxAge() ) );\n\t\tserviceReq.setCurrency( service.getCurrency() );\n\t\tserviceReq.setMaxQuantity( new Double( service.getMaxQuantity() ) );\n\t\tserviceReq.setUnitOfMeasure( service.getUnitOfMeasure() );\n\t\tserviceReq.setMandatory( new Boolean( service.isMandatory() ) );\n\t\tserviceReq.setFree( new Boolean( service.isFree() ) );\n\t\tserviceReq.setOccupancyBased( new Boolean( service.isOccupancyBased() ) );\n\t\tserviceReq.setDateSpecific( new Boolean( service.isDateSpecific() ) );\n\t\tserviceReq.setAllOrNothing( new Boolean( service.isAllOrNothing() ) );\n\t\tserviceReq.setWeightBased( new Boolean( service.isWeightBased() ) );\n\t\tserviceReq.setTierBased( new Boolean( service.isTierBased() ) );\n\t\tserviceReq.setGroupCode( service.getGroupCode() );\n\t\tserviceReq.setGroupDescription( service.getGroupDescription() );\n\t\tserviceReq.setMonday( new Boolean( service.isMonday() ) );\n\t\tserviceReq.setTuesday( new Boolean( service.isTuesday() ) );\n\t\tserviceReq.setWednesday( new Boolean( service.isWednesday() ) );\n\t\tserviceReq.setThursday( new Boolean( service.isThursday() ) );\n\t\tserviceReq.setFriday( new Boolean( service.isFriday() ) );\n\t\tserviceReq.setSaturday( new Boolean( service.isSaturday() ) );\n\t\tserviceReq.setSunday( new Boolean( service.isSunday() ) );\n\t\tserviceReq.setAdultQty( new Byte( service.getAdultQty() ) );\n\t\tserviceReq.setChild1Qty( new Byte( service.getChild1Qty() ) );\n\t\tserviceReq.setChild2Qty( new Byte( service.getChild2Qty() ) );\n\t\tserviceReq.setChild3Qty( new Byte( service.getChild3Qty() ) );\n\t\tserviceReq.setTravelAgentFee( new Double( service.getTravelAgentFee() ) );\n\t\tserviceReq.setFlightMaterialCode( service.getFlightMaterialCode() );\n\t\tserviceReq.setHotelMaterialCode( service.getHotelMaterialCode() );\n\t\tserviceReq.setParentItemRph(service.getParentItemRph() );\n\t\tserviceReq.setGuestAllocation( service.getGuestAllocation() );\n\t\tserviceReq.setTotalPrice( new Double( service.getTotalPrice() ) );\n\t\tserviceReq.setPosnr( service.getPosnr() );\n\t\tserviceReq.setOldPosnr( service.getOldPosnr() );\n\t\tif( service.getSelectedDate() != null ){\n\t\t\tserviceReq.setSelectedDate( this.getDate( service.getSelectedDate() ) );\n\t\t}\n\t\tif( service.getDepatureDate() != null ){\n\t\t\tserviceReq.setDepatureDate( this.getDate( service.getDepatureDate() ) );\n\t\t}\n\t\tif( service.getReturnDate() != null ){\n\t\t\tserviceReq.setReturnDate( this.getDate( service.getReturnDate() ));\n\t\t}\n\t\tif( (service.getAvailableDates() != null) && (service.getAvailableDates().size() > 0) ){\n\t\t\tfor(int i=0; i < service.getAvailableDates().size();i++){\n\t\t\t\tserviceReq.getAvailableDates().add( this.getDate( service.getAvailableDates().get(i) ) );\n\t\t\t}\n\t\t}\n\t\tif( (service.getServiceDescription() != null) && (service.getServiceDescription().size() > 0) ){\n\t\t\tfor(int i=0; i < service.getServiceDescription().size();i++){\n\t\t\t\tserviceReq.getServiceDescription().add( service.getServiceDescription().get(i) );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn serviceReq;\n\t}", "public interface RequestServer {\n\n @GET(\"caseplatform/mobile/system-eventapp!register.action\")\n Call<StringResult> register(@Query(\"account\") String account, @Query(\"password\") String password, @Query(\"name\") String name,\n @Query(\"mobilephone\") String mobilephone, @Query(\"identityNum\") String identityNum);\n\n @GET(\"caseplatform/mobile/login-app!login.action\")\n Call<String> login(@Query(\"name\") String username, @Query(\"password\") String password);\n\n @GET(\"caseplatform/mobile/system-eventapp!setUserPassword.action\")\n Call<StringResult> setPassword(@Query(\"account\") String account,\n @Query(\"newPassword\") String newPassword,\n @Query(\"oldPassword\") String oldPassword);\n\n @GET(\"caseplatform/mobile/system-eventapp!getEventInfo.action\")\n Call<Event> getEvents(@Query(\"account\") String account, @Query(\"eventType\") String eventType);\n\n @GET(\"caseplatform/mobile/system-eventapp!reportEventInfo.action \")\n Call<EventUpload> reportEvent(\n @Query(\"account\") String account,\n @Query(\"eventType\") String eventType,\n @Query(\"address\") String address,\n @Query(\"eventX\") String eventX,\n @Query(\"eventY\") String eventY,\n @Query(\"eventMs\") String eventMs,\n @Query(\"eventMc\") String eventMc,\n @Query(\"eventId\") String eventId,\n @Query(\"eventClyj\") String eventClyj,\n @Query(\"eventImg\") String eventImg,\n @Query(\"eventVideo\") String eventVideo,\n @Query(\"eventVoice\") String eventVoice\n );\n\n @GET(\"caseplatform/mobile/system-eventapp!getUserInfo.action\")\n Call<UserInfo> getUserInfo(@Query(\"orgNo\") String orgNo, @Query(\"account\") String account);\n\n @GET(\"caseplatform/mobile/system-eventapp!getOrgDataInfo.action\")\n Call<OrgDataInfo> getOrgData(@Query(\"orgNo\") String orgNo, @Query(\"account\") String account);\n\n @Multipart\n @POST(\"caseplatform/mobile/video-upload!uplodVideo.action\")\n Call<FileUpload> uploadVideo(@Part(\"video\") File video, @Part(\"videoFileName\") String videoFileName);\n\n @POST(\"caseplatform/mobile/video-upload!uplodVideo.action\")\n Call<FileUpload> uploadVideo(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/video-upload!uplodAudio.action\")\n Call<FileUpload> uploadAudio(@Query(\"audio\") File audio, @Query(\"audioFileName\") String audioFileName);\n\n @POST(\"caseplatform/mobile/video-upload!uplodAudio.action\")\n Call<FileUpload> uploadAudio(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/file-upload!uplodFile.action\")\n Call<FileUpload> uploadImage(@Query(\"img\") File img, @Query(\"imgFileName\") String imgFileName);\n\n @POST(\"caseplatform/mobile/file-upload!uplodFile.action\")\n Call<FileUpload> uploadImage(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/system-eventapp!jobgps.action\")\n Call<StringResult> setCoordinate(@Query(\"account\") String account,\n @Query(\"address\") String address,\n @Query(\"x\") String x,\n @Query(\"y\") String y,\n @Query(\"coordsType\") String coordsType,\n @Query(\"device_id\") String device_id\n );\n\n @GET(\"caseplatform/mobile/system-eventapp!Mbtrajectory.action\")\n Call<Task> getTask(@Query(\"account\") String account);\n\n}", "@Override\n public void response(String o, String requestTag) {\n switch (NoisyConstants.Requests.valueOf(requestTag.toUpperCase())) {\n case GET_COMICS: {\n\n mComicDataWrapper = (ComicDataWrapper) NoisyUtils.getFromJson(o, ComicDataWrapper.class);\n\n if(mComicDataWrapper.getData().getResults().size() == 0){\n notAvailable.setVisibility(View.VISIBLE);\n }else {\n gallery.setAdapter(new ComicsAdapter(this, mComicDataWrapper));\n gallery.invalidate();\n syncAll(comicsURI, mComicDataWrapper.getData().getResults().size());\n }\n break;\n }\n case GET_ALL_COMICS: {\n\n ComicDataWrapper tComicDataWrapper = (ComicDataWrapper) NoisyUtils.getFromJson(o, ComicDataWrapper.class);\n merge(tComicDataWrapper);\n gallery.invalidate();\n syncAll(comicsURI, mComicDataWrapper.getData().getResults().size() + 1);\n break;\n }\n default: {\n NoisyUtils.showDialog(this, NoisyConstants.INVALID_NETWORK_REQUEST, NoisyConstants.INVALID_NETWORK_REQUEST);\n }\n }\n }", "private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (ParseException ex) {\r\n Logger.getLogger(SearchAvaliableFlights.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "private void onRequestData(int tag) {\n \ttry {\n \t data = request.request();\n \t} catch(MatjiException e) {\n \t lastOccuredException = e;\n \t}\n }", "public void handleRequest(Request req) {\n\n }", "public CallForService(String address, Date serviceRequestDate, String probDescrip, int ageOfwaterHeater){\n this.address = address;\n this.serviceRequestDate = serviceRequestDate;\n this.probDescrip = probDescrip ;\n this.ageOfwaterHeater = ageOfwaterHeater;\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException, ParseException {\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n String method = request.getMethod().toLowerCase();\n System.out.println(\"method = \" + method);\n boolean doOutput = false;\n if (\"post\".equals(method) || \"put\".equals(method) || \"delete\".equals(method) || \"trace\".equals(method)) {\n try (ServletInputStream r = request.getInputStream()) {\n byte buff[] = new byte[300000];\n int cant;\n while ((cant = r.read(buff)) != -1) {\n baos.write(buff, 0, cant);\n }\n baos.flush();\n baos.close();\n }\n doOutput = true;\n }\n String host = request.getParameter(\"host\");\n Utils.getInstance().getManagers(host);\n String port = request.getParameter(\"port\");\n String urlS = URLDecoder.decode(request.getParameter(\"url\"), \"US-ASCII\");\n System.out.println(\"url = \" + urlS);\n System.out.println(\"query = \" + request.getQueryString());\n URL url = new URL(urlS);\n //la base del sitio pedido\n String base = url.getProtocol() + \"://\" + url.getHost() + (url.getPort() != -1 ? \":\" + url.getPort() : \"\");\n\n //la url que representa a el host donde esta montada esta app\n String thishost = \"http://\" + request.getLocalName() + \":\" + request.getLocalPort() + \"/\";\n System.out.println(\"thishost = \" + thishost);\n// System.out.println(\"request server name = \" + request.getServerName());\n// boolean debug = false;\n// if (host != null) {\n//// debug = true;\n// thishost = \"http://ostest.tt:8080/\";\n// } else {\n// thishost = \"http://test-truetest.rhcloud.com/\";\n// }\n\n HttpURLConnection openConnection;\n if (host == null) {\n openConnection = (HttpURLConnection) url.openConnection();\n } else {\n Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(host, Integer.parseInt(port))); // or whatever your proxy is\n openConnection = (HttpURLConnection) url.openConnection(proxy);\n }\n openConnection.setConnectTimeout(0);\n openConnection.setReadTimeout(0);\n openConnection.setRequestMethod(request.getMethod());\n //por si acaso no cambia automatico cuando cambio el metodo\n\n Enumeration<String> headerNames = request.getHeaderNames();\n while (headerNames.hasMoreElements()) {\n String headerName = headerNames.nextElement();\n Enumeration<String> headers = request.getHeaders(headerName);\n while (headers.hasMoreElements()) {\n String headerValue = headers.nextElement();\n if (headerName != null && !\"accept-encoding\".equals(headerName.toLowerCase())) {\n openConnection.addRequestProperty(headerName, headerValue);\n }\n }\n }\n openConnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.102 Safari/537.36\");\n// openConnection.connect();\n if (doOutput) {\n openConnection.setDoOutput(true);\n try (OutputStream out = openConnection.getOutputStream()) {\n out.write(baos.toByteArray());\n out.flush();\n }\n }\n boolean nis = false;\n InputStream inputStream = null;\n try {\n inputStream = openConnection.getInputStream();\n } catch (IOException e) {\n nis = true;\n }\n String contentType = openConnection.getContentType();\n System.out.println(\"contentType basico = \" + contentType);\n// String guessContentTypeFromName = HttpURLConnection.guessContentTypeFromName(urlS);\n ContentType ct = null;\n if (contentType != null) {\n ct = new ContentType(contentType);\n }\n //usod de jsoup para modificar la pag para que todas las url se dirijan a este servidor\n Document parse = null;//\n if (ct != null && ct.match(\"text/html\") && !nis) {\n String charset = ct.getParameter(\"charset\");\n System.out.println(\"charset = \" + charset);\n parse = Jsoup.parse(inputStream, charset, urlS);\n parse.outputSettings().escapeMode(EscapeMode.xhtml);\n String arrayURLAtt[] = new String[]{\"src\", \"data\", \"cite\"};\n for (String attr : arrayURLAtt) {\n Elements linksatt = parse.select(\"[\" + attr + \"]\");\n for (Element link : linksatt) {\n link.attr(attr, link.attr(\"abs:\" + attr));\n }\n }\n //para mandar los post y get de los formularios a travez de este proxy html\n //FIXME poner iframe\n String attr[] = new String[]{\"action\", \"href\", \"src\"};\n for (String att : attr) {\n String select;\n switch (att) {\n case \"href\":\n select = \"a[\" + att + \"],link[\" + att + \"]\";\n break;\n case \"src\":\n select = \"iframe[\" + att + \"],script[\" + att + \"]\";\n break;\n default:\n select = \"[\" + att + \"]\";\n break;\n }\n Elements links = parse.select(select);\n for (Element link : links) {\n String abs = link.attr(\"abs:\" + att);\n if (host == null) {\n String finalUrl = thishost + \"?url=\" + URLEncoder.encode(abs, \"US-ASCII\") + \"&d=true\";\n link.attr(att, finalUrl);\n } else {\n link.attr(att, thishost + \"?url=\" + URLEncoder.encode(abs, \"US-ASCII\") + \"&host=\" + host + \"&port=\" + port);\n }\n }\n }\n }\n\n Map<String, List<String>> headerFields = openConnection.getHeaderFields();\n for (Map.Entry<String, List<String>> entry : headerFields.entrySet()) {\n String header = entry.getKey();\n// System.out.println(\"header = \" + header);\n List<String> list = entry.getValue();\n for (String headerValue : list) {\n if (header != null) {\n// System.out.println(\"header = \" + header);\n if (\"location\".equals(header.toLowerCase()) || \"referer\".equals(header.toLowerCase())) {\n if (host == null) {\n headerValue = \"http://ostest.tt:8081/?url=\" + headerValue + \"&d=true\";\n } else {\n headerValue = \"http://test-truetest.rhcloud.com/?url=\" + headerValue + \"&host=\" + host + \"&port=\" + port;\n }\n }\n if (\"host\".equals(header.toLowerCase())) {\n headerValue = url.getHost() + \":\" + (url.getPort() != -1 ? url.getPort() : url.getDefaultPort());\n }\n if (!\"content-length\".equals(header.toLowerCase())) {\n headerValue = url.getHost() + \":\" + (url.getPort() != -1 ? url.getPort() : url.getDefaultPort());\n }\n// System.out.println(\"headerValue = \" + headerValue);\n if (!\"content-length\".equals(header.toLowerCase()) && !\"content-encoding\".equals(header.toLowerCase())) {\n response.addHeader(header, headerValue);\n }\n }\n }\n }\n\n// response.setStatus(openConnection.getResponseCode());\n// System.out.println(\"content = \" + openConnection.getContentType());\n response.setContentType(openConnection.getContentType());\n if (parse != null) {\n try (PrintWriter writer = response.getWriter()) {\n StringBuilder builder = new StringBuilder(parse.outerHtml());\n String cabecera = \"<head>\";\n int indexOf = builder.indexOf(cabecera);\n if (indexOf != -1) {\n String scripText = \"<script id=\\\"prox\\\" >(function(open) {\\n\"\n + \" XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {\\n\"\n + \" open.call(this, method, '\" + thishost + \"?url=\" + base + \"'+encodeURIComponent(url)+'\" + (host == null ? \"&d=true\" : \"&host=\" + host + \"&port=\" + port) + \"', true, user, pass);\\n\"\n + \" };\\n\"\n + \" })(XMLHttpRequest.prototype.open);\"\n + \"\"\n + \"window.location.origin='\" + base + \"'</script>\";\n builder.insert(indexOf + cabecera.length(), scripText);\n }\n writer.print(builder);\n writer.flush();\n }\n } else {\n try (OutputStream out = response.getOutputStream(); BufferedInputStream in = new BufferedInputStream((openConnection.getInputStream()))) {\n byte buff[] = new byte[300000];\n int cant;\n while ((cant = in.read(buff)) != -1) {\n out.write(buff, 0, cant);\n }\n out.flush();\n }\n }\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n try {\n Client client = ClientBuilder.newClient();\n\n String result = request.getParameter(\"result\");\n double caloByMeal = Double.parseDouble(result) / 3;\n List<FoodDTO> foodContainer = FoodDAO.getListFoodByCalo(caloByMeal);\n request.setAttribute(\"foodContainer\", foodContainer);\n request.setAttribute(\"CALOMEAL\", (int) Math.round(caloByMeal));\n request.setAttribute(\"CALODAY\", result);\n\n Response res = client.target(URI_WS_JDBC).path(\"/getProductByRange\")\n .queryParam(\"bmr\", (int) caloByMeal)\n .request()\n .accept(MediaType.APPLICATION_XML_TYPE)\n .get(Response.class);\n List<FoodDTO> list = res.readEntity(new GenericType<List<FoodDTO>>() {\n });\n request.setAttribute(\"LISTPRODUCT\", list);\n request.setAttribute(\"TITLE\", \"Maintain Weight Suggestion Foods For 3 main meals\");\n request.setAttribute(\"OFFSET\", list.size());\n\n WebTarget webTarget = client.target(URI_WS_JDBC).path(\"/getProductByRangeXML\");\n res = webTarget.queryParam(\"bmr\", (int) caloByMeal)\n .request().get();\n String listXML = res.readEntity(String.class);\n request.setAttribute(\"MAINTAIN\", listXML.replaceAll(\"\\\"\", \"\"));\n\n double totalCaloFor50Percent = Double.parseDouble(result) - 556;\n double percentage50OnFirstCalo = Math.round((totalCaloFor50Percent * 100) / Double.parseDouble(result));\n double caloByMeal50Percent = Math.round(totalCaloFor50Percent / 3);\n request.setAttribute(\"CALODAY50\", (int) totalCaloFor50Percent);\n request.setAttribute(\"CALOMEAL50\", (int) caloByMeal50Percent);\n request.setAttribute(\"PERCENT50\", (int) percentage50OnFirstCalo);\n\n double totalCaloFor1Kg = Double.parseDouble(result) - 1111;\n double percentage1KgOnFirstCalo = Math.round((totalCaloFor1Kg * 100) / Double.parseDouble(result));\n double caloByMeal1Kg = Math.round(totalCaloFor1Kg / 3);\n request.setAttribute(\"CALODAY1\", (int) totalCaloFor1Kg);\n request.setAttribute(\"CALOMEAL1\", (int) caloByMeal1Kg);\n request.setAttribute(\"PERCENT1\", (int) percentage1KgOnFirstCalo);\n\n String advise = \"\";\n String heightBMI = request.getParameter(\"height\");\n String weightBMI = request.getParameter(\"weight\");\n double heightInCM = Double.parseDouble(heightBMI) / 100;\n double resultBIM = Double.parseDouble(weightBMI) / (heightInCM * heightInCM);\n if (resultBIM < 18.5) {\n advise = \"You should gain weight\";\n } else if (resultBIM >= 18.5 && resultBIM <= 25) {\n advise = \"You should maintain weight\";\n } else {\n advise = \"You should lose weight\";\n }\n request.setAttribute(\"ADVISE\", advise);\n\n HttpSession session = request.getSession();\n UserDTO user = (UserDTO) session.getAttribute(\"USER\");\n String checkMe = request.getParameter(\"me\");\n if (checkMe != null) {\n if (checkMe.equalsIgnoreCase(\"me\")) {\n String height = request.getParameter(\"height\");\n String weight = request.getParameter(\"weight\");\n String activity = request.getParameter(\"activity\");\n HistoryOfUserDTO historyOfUserDTO = new HistoryOfUserDTO();\n historyOfUserDTO.setHeight(Double.parseDouble(height));\n historyOfUserDTO.setWeight(Double.parseDouble(weight));\n historyOfUserDTO.setActivity(activity);\n historyOfUserDTO.setCalories(Integer.parseInt(result));\n historyOfUserDTO.setUserId(user.getUserId());\n Date date = new Date();\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n historyOfUserDTO.setDateCreated(formatter.format(date));\n HistoryOfUserDAO.insertHistoryOfUser(historyOfUserDTO);\n }\n }\n List<CategoryDTO> listCategory = CategoryDAO.getAllCategory();\n request.setAttribute(\"CATEGORY\", listCategory);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n request.getRequestDispatcher(\"result.jsp\").forward(request, response);\n }\n }", "private void parseDataNamesForPendingRequestServices() {\n \n synchronized(this) {\n if (localReferentialDataMap.isEmpty()) {\n // add entries for common local referential data\n addDataNamesForRequestType(commonReferentialFilename, \"All\");\n }\n \n Iterator unparsedRequestServicesIt = unparsedRequestServices.iterator();\n while (unparsedRequestServicesIt.hasNext()) {\n IRequestService service = (IRequestService) unparsedRequestServicesIt.next();\n // add entries for local referential data map\n addDataNamesForRequestType(service.getLocalReferentialFilename(),\n service.getLabel());\n \n // update all known local authorities with new request type\n Iterator localAuthoritiesIt = allLocalAuthorities.iterator();\n while (localAuthoritiesIt.hasNext()) {\n String localAuthorityName = (String) localAuthoritiesIt.next();\n addLocalReferentialForLocalAuthority(localAuthorityName,\n service.getLocalReferentialFilename(),\n service.getLabel());\n }\n \n parsedRequestServices.add(service);\n }\n \n unparsedRequestServices.clear();\n }\n }", "public interface SeatYudingOrderService {\n\n\n void yudingOrder(String uid, String workday, String route, String time,String dateType);\n void yudingOrder(String uid, String workday, String route, String time,String startDate,String endDate);\n void yudingOrder(String uid, String route, String time, String bizDate, Integer dayNum);\n void addOrder();\n\n Map<String,Object> shikebiao(String route, String holiday, String uid,String dateType);\n\n void sendMsgBanci(String first,String yuanyin,String content,String url);\n\n void pingjia(String uid,String orderId,String content,Integer fuwu) throws Exception;\n}", "@Override\n protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.service(req, resp);\n logger.log(Level.INFO, \"service(req, resp) Invoked\");\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String name = request.getParameter(GenericConstants.COMPONENT_PNAME);\n \n RealTimeSUStateHelper suRTHelper = new RealTimeSUStateHelper(name);\n String responseData = suRTHelper.getServiceUnitsState();\n response.setStatus(HttpServletResponse.SC_OK);\n response.setHeader(RealTimeStatisticServlet.CONTENT_TYPE_HEADER, \n RealTimeStatisticServlet.CONTENT_TYPE_VALUE);\n response.setHeader(RealTimeStatisticServlet.CACHE_CONTROL_HEADER, \n RealTimeStatisticServlet.CACHE_CONTROL_VALUE);\n \n // Write out the message on the response stream\n OutputStream outputStream = response.getOutputStream();\n try {\n outputStream.write(responseData.getBytes());\n } catch (IOException e2) {\n }\n outputStream.flush();\n \n }", "@Override\n\t\t\tpublic void onNext(GreetingRequest request) {\n\t\t\t\tSystem.out.println(\"GreetingsServiceImpl.greetAll greet rqeuested by \"+request);\n\t\t\t\t\n\t\t\t\t//mimicking delay\n\t\t\t\tThreadUtils.sleep(2000);\n\t\t\t\t\n\t\t\t\t//lets respond back for every request\n\t\t\t\tHuman human = request.getHuman();\n\t\t\t\tresponseObserver.onNext(GreetingResponse.newBuilder().setMessage(\"jai shree ram says \"+human.getFirstName()+\" \"+human.getLastName()).build());\n\t\t\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (SQLException ex) {\n Logger.getLogger(loadServices.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@RequestMapping(value = \"/{serviceName}\", method = RequestMethod.GET)\n ResponseEntity<Object> getServiceDocker(@PathVariable(\"serviceName\") String serviceName,\n HttpServletRequest request) throws Exception {\n HttpHeaders headers = new HttpHeaders();\n headers.set(\"X-Forwarded-Host\", String.format(\"%s:%d\", request.getServerName(), request.getServerPort()));\n if (StringUtils.isNotEmpty(contextPath) && ! \"/\".equals(contextPath)) {\n headers.set(\"X-Forwarded-Prefix\", contextPath);\n }\n HttpEntity entity = new HttpEntity(headers);\n\n String serviceNameKey = String.format(\"gateway.services.%s\", serviceName);\n String url = environment.getProperty(serviceNameKey) + docketUri;\n ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.GET, entity, String.class);\n return new ResponseEntity<>(response.getBody(), HttpStatus.OK);\n }", "public void doService() {\n }", "ThingsResponse loadThingsDetails(ThingsRequest request);", "public interface RequestServiceMzitu {\n\n @GET(\"{number}\")\n Observable<String> getDetialData(@Path(\"number\") String number, @Query(\"time\") long time);\n\n @GET(\"page/{pageNumber}\")\n Observable<String> getIndexMoreData(@Path(\"pageNumber\") int pageNumber, @Query(\"time\") long time);\n\n @GET(UrlPath.BaseUrlRequestServiceMzitu)\n Observable<String> getIndexData(@Query(\"time\") long time);\n\n @GET(\"/tag/{path}\")\n Observable<String> getTagData(@Path(\"path\") String path, @Query(\"time\") long time);\n\n @GET(\"/tag/{path}/page/{pageNumber}\")\n Observable<String> getTagMoreData(@Path(\"path\") String path, @Path(\"pageNumber\") int pageNumber, @Query(\"time\") long time);\n}", "public void service() {\n\t}", "private GxyService getGxyService() {\r\n\t\tthis.visitNo = 0;\r\n\t\tfor (int i = 0; i < this.visitTime.length; i++) {\r\n\t\t\tif (visitTime[i] != null) {\r\n\t\t\t\tthis.visitNo = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\tGxyService gxyService = new GxyService();\r\n\r\n\t\tdoctors[visitNo] = new Doctor();\r\n\t\tdoctors[visitNo].setDoctorId(this.doctorId[visitNo]);\r\n\t\tgxyService.setId(System.nanoTime());\r\n\t\tgxyService.setDoctor(doctors[visitNo]);\r\n\t\tBp[visitNo] = Bp[visitNo] & this.drugReaction[visitNo];\r\n\t\tgxyService.setIf_BpOK(this.Bp[visitNo]);\r\n\t\t// gxyService.setOtherDeal(otherDeal);\r\n\t\tgxyService.setServiceNumberInYear(visitNo + 1);\r\n\t\tgxyService.setServiceTime(this.visitTime[visitNo]);\r\n\t\treturn gxyService;\r\n\t}", "@Get\n public String serviceRequest() {\n counter.increment(endpoint);\n\n boolean rateResult = false;\n boolean cdrResult = false;\n boolean tcdrResult = false;\n\n // Get the list of enabled resources\n enabledResourceList = getEnabledResources();\n // Service the request\n try {\n if (action.equalsIgnoreCase(\"rate\")) {\n logger.debug(\"Attempting to generate a Rate\");\n rateResult = generateRate();\n } else if (action.equalsIgnoreCase(\"cdr\")) {\n logger.debug(\"Attempting to generate a CDR\");\n cdrResult = generateCdr();\n } else if (action.equalsIgnoreCase(\"t-cdr\")) {\n logger.debug(\"Attempting to generate a CDR for T-nova\");\n tcdrResult = generateTNovaCdr();\n }\n // Construct the response\n if (rateResult) {\n return \"The rate generation was successful\";\n } else if (cdrResult) {\n return \"The cdr generation was successful\";\n } else if (tcdrResult) {\n return \"The T-Nova cdr generation was successful\";\n } else {\n return \"Operation Failed\";\n }\n }catch (Exception e){\n logger.error(\"Error while generating it: \"+e.getMessage());\n return \"Operation Failed\";\n }\n }", "@FeignClient(UserServiceConstants.SERVER_NAME)//服务名\n@RequestMapping(UserServiceConstants.SERVER_PRIFEX)//内部服务前缀\n@Api(tags = \" 红包服务server层接口\")\npublic interface ImRedService {\n\n @ApiOperation(\"发送红包\")\n @PostMapping(\"/add\")\n ImRed add(@RequestBody ImRedDto imRedDto);\n\n @ApiOperation(\"加入红包\")\n @PostMapping(\"/join\")\n void join(@RequestParam(\"id\") Long id,@RequestParam(\"address\")String address);\n\n\n @ApiOperation(\"红包详情\")\n @GetMapping(\"/findById\")\n ImRedDetailDto findById(@RequestParam(\"id\") Long id,@RequestParam(\"userAddress\")String userAddress);\n\n @ApiOperation(\"我发送的红包\")\n @GetMapping(\"/findMySendRed\")\n ImRedMyDetailDto findMySendRed(@RequestParam(\"userAddress\")String userAddress,@RequestParam(\"year\")Integer year);\n\n\n @ApiOperation(\"我接收的红包\")\n @GetMapping(\"/findMyReceiveRed\")\n ImRedMyDetailDto findMyReceiveRed(@RequestParam(\"userAddress\")String userAddress,@RequestParam(\"year\")Integer date);\n\n\n @ApiOperation(\"我待支付红包\")\n @GetMapping(\"/findMyPaidRed\")\n List<ImRedList> findMyPaidRed(@RequestParam(\"userAddress\")String userAddress);\n\n\n @ApiOperation(\"修改红包状态\")\n @PostMapping(\"/updateRed\")\n void updateRed(@RequestParam(\"id\") Long id);\n\n\n\n @ApiOperation(\"修改红包领取状态\")\n @PostMapping(\"/updateRedReceive\")\n void updateRedReceive(@RequestParam(\"redId\") Long redId,@RequestParam(\"address\") String address,@RequestParam(\"hash\")String hash);\n\n\n\n\n}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (ParseException ex) {\r\n Logger.getLogger(SearchAvaliableFlights.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "private CdsHooksResponse invoke(CdsHooksPreparedRequest preparedRequest) {\n CdsHooksResponse response;\n Service service = preparedRequest.getService();\n String serviceId = service.getId();\n String hookId = service.getHook();\n\n try {\n ResponseEntity<String> responseEntity = restTemplate.postForEntity(\n discoveryEndpoint + \"/\" + serviceId, preparedRequest.getBody(), String.class);\n CdsResponse resp = CdsHooksUtil.GSON.fromJson(responseEntity.getBody(), CdsResponse.class);\n response = new CdsHooksResponse(service, resp);\n } catch (Exception e) {\n log.error(\"Error invoking CDS hook \" + hookId + \" @ \" + serviceId, e);\n response = new CdsHooksResponse(service);\n response.setException(e);\n }\n\n return response;\n }", "@Override\n protected void handleRequest(final Message request, final ConnectionKey connkey, final Peer peer) {\n final Message answer = new Message();\n answer.prepareResponse(request);\n AVP avp;\n avp = request.find(ProtocolConstants.DI_SESSION_ID);\n if (avp != null) {\n answer.add(avp);\n }\n node().addOurHostAndRealm(answer);\n avp = request.find(ProtocolConstants.DI_CC_REQUEST_TYPE);\n if (avp == null) {\n answerError(answer, connkey, ProtocolConstants.DIAMETER_RESULT_MISSING_AVP,\n new AVP[]{new AVP_Grouped(ProtocolConstants.DI_FAILED_AVP,\n new AVP[]{new AVP(ProtocolConstants.DI_CC_REQUEST_TYPE, new byte[]{})})});\n return;\n }\n final int ccRequestType; // = -1;\n try {\n ccRequestType = new AVP_Unsigned32(avp).queryValue();\n } catch (final InvalidAVPLengthException ex) {\n throw new AssertionError(\"Unexpected exception: \" + ex, ex);\n }\n if (ccRequestType != ProtocolConstants.DI_CC_REQUEST_TYPE_INITIAL_REQUEST\n && ccRequestType != ProtocolConstants.DI_CC_REQUEST_TYPE_UPDATE_REQUEST\n && ccRequestType != ProtocolConstants.DI_CC_REQUEST_TYPE_TERMINATION_REQUEST\n && ccRequestType != ProtocolConstants.DI_CC_REQUEST_TYPE_EVENT_REQUEST) {\n answerError(answer, connkey, ProtocolConstants.DIAMETER_RESULT_INVALID_AVP_VALUE,\n new AVP[]{new AVP_Grouped(ProtocolConstants.DI_FAILED_AVP, new AVP[]{avp})});\n return;\n }\n\n //This test server does not support multiple-services-cc\n avp = request.find(ProtocolConstants.DI_MULTIPLE_SERVICES_CREDIT_CONTROL);\n if (avp != null) {\n answerError(answer, connkey, ProtocolConstants.DIAMETER_RESULT_INVALID_AVP_VALUE,\n new AVP[]{new AVP_Grouped(ProtocolConstants.DI_FAILED_AVP, new AVP[]{avp})});\n return;\n }\n avp = request.find(ProtocolConstants.DI_MULTIPLE_SERVICES_INDICATOR);\n if (avp != null) {\n int indicator = -1;\n try {\n indicator = new AVP_Unsigned32(avp).queryValue();\n } catch (final InvalidAVPLengthException ex) {\n throw new AssertionError(\"Unexpected exception: \" + ex, ex);\n }\n if (indicator != ProtocolConstants.DI_MULTIPLE_SERVICES_INDICATOR_MULTIPLE_SERVICES_NOT_SUPPORTED) {\n answerError(answer, connkey, ProtocolConstants.DIAMETER_RESULT_INVALID_AVP_VALUE,\n new AVP[]{new AVP_Grouped(ProtocolConstants.DI_FAILED_AVP, new AVP[]{avp})});\n return;\n }\n }\n\n answer.add(new AVP_Unsigned32(ProtocolConstants.DI_RESULT_CODE, ProtocolConstants.DIAMETER_RESULT_SUCCESS));\n avp = request.find(ProtocolConstants.DI_AUTH_APPLICATION_ID);\n if (avp != null) {\n answer.add(avp);\n }\n avp = request.find(ProtocolConstants.DI_CC_REQUEST_TYPE);\n if (avp != null) {\n answer.add(avp);\n }\n avp = request.find(ProtocolConstants.DI_CC_REQUEST_NUMBER);\n if (avp != null) {\n answer.add(avp);\n }\n\n switch (ccRequestType) {\n case ProtocolConstants.DI_CC_REQUEST_TYPE_INITIAL_REQUEST:\n case ProtocolConstants.DI_CC_REQUEST_TYPE_UPDATE_REQUEST:\n case ProtocolConstants.DI_CC_REQUEST_TYPE_TERMINATION_REQUEST:\n //grant whatever is requested\n avp = request.find(ProtocolConstants.DI_REQUESTED_SERVICE_UNIT);\n if (avp != null) {\n final AVP g = new AVP(avp);\n g.code = ProtocolConstants.DI_GRANTED_SERVICE_UNIT;\n answer.add(avp);\n }\n break;\n case ProtocolConstants.DI_CC_REQUEST_TYPE_EVENT_REQUEST:\n //examine requested-action\n avp = request.find(ProtocolConstants.DI_REQUESTED_ACTION);\n if (avp == null) {\n answerError(answer, connkey, ProtocolConstants.DIAMETER_RESULT_MISSING_AVP,\n new AVP[]{new AVP_Grouped(ProtocolConstants.DI_FAILED_AVP,\n new AVP[]{new AVP(ProtocolConstants.DI_REQUESTED_ACTION, new byte[]{})})});\n return;\n }\n int requestedAction = -1;\n try {\n requestedAction = new AVP_Unsigned32(avp).queryValue();\n } catch (final InvalidAVPLengthException ex) {\n throw new AssertionError(\"Unexpected exception: \" + ex, ex);\n }\n switch (requestedAction) {\n case ProtocolConstants.DI_REQUESTED_ACTION_DIRECT_DEBITING:\n //nothing. just indicate success\n break;\n case ProtocolConstants.DI_REQUESTED_ACTION_REFUND_ACCOUNT:\n //nothing. just indicate success\n break;\n case ProtocolConstants.DI_REQUESTED_ACTION_CHECK_BALANCE:\n //report back that the user has sufficient balance\n answer.add(new AVP_Unsigned32(ProtocolConstants.DI_CHECK_BALANCE_RESULT,\n ProtocolConstants.DI_DI_CHECK_BALANCE_RESULT_ENOUGH_CREDIT));\n break;\n case ProtocolConstants.DI_REQUESTED_ACTION_PRICE_ENQUIRY:\n //report back a price of DKK42.17 per kanelsnegl\n answer.add(new AVP_Grouped(ProtocolConstants.DI_COST_INFORMATION,\n new AVP[]{new AVP_Grouped(ProtocolConstants.DI_UNIT_VALUE,\n new AVP[]{new AVP_Integer64(ProtocolConstants.DI_VALUE_DIGITS, 4217),\n new AVP_Integer32(ProtocolConstants.DI_EXPONENT, -2)\n }),\n new AVP_Unsigned32(ProtocolConstants.DI_CURRENCY_CODE, 208),\n new AVP_UTF8String(ProtocolConstants.DI_COST_UNIT, \"kanelsnegl\")\n }));\n break;\n default: {\n answerError(answer, connkey, ProtocolConstants.DIAMETER_RESULT_INVALID_AVP_VALUE,\n new AVP[]{new AVP_Grouped(ProtocolConstants.DI_FAILED_AVP, new AVP[]{avp})});\n return;\n }\n\n }\n break;\n default:\n throw new AssertionError(\"Unexpected value:\" + ccRequestType);\n }\n\n Utils.setMandatory_RFC3588(answer);\n\n try {\n answer(answer, connkey);\n } catch (final NotAnAnswerException ex) {\n throw new AssertionError(\"Unexpected exception: \" + ex, ex);\n }\n }", "public interface PIService {\n @POST(\"learningrace1/rest/participante\")\n Call<List<Participante>> getParticipante(@Body Participante participante);\n\n @GET(\"learningrace1/rest/evento/{identificador}\")\n Call<List<Evento>> getEvento(@Path(\"identificador\") String identificador);\n\n}", "private void startOtherServices() {\n Object obj;\n String str;\n String str2;\n boolean tuiEnable;\n TelephonyRegistry telephonyRegistry;\n VibratorService vibrator;\n InputManagerService inputManager;\n WindowManagerService wm;\n AlarmManagerService wm2;\n boolean safeMode;\n ILockSettings lockSettings;\n IConnectivityManager iConnectivityManager;\n INetworkManagementService iNetworkManagementService;\n IpSecService ipSecService;\n INetworkPolicyManager iNetworkPolicyManager;\n MediaRouterService mediaRouter;\n CountryDetectorService countryDetector;\n NetworkTimeUpdateService networkTimeUpdater;\n INetworkStatsService iNetworkStatsService;\n LocationManagerService location;\n Resources.Theme systemTheme;\n IpSecService ipSecService2;\n INetworkManagementService iNetworkManagementService2;\n IpSecService ipSecService3;\n IpSecService ipSecService4;\n INetworkPolicyManager iNetworkPolicyManager2;\n INetworkStatsService iNetworkStatsService2;\n IConnectivityManager iConnectivityManager2;\n IBinder iBinder;\n INotificationManager notification;\n IBinder iBinder2;\n MediaRouterService mediaRouter2;\n boolean hasFeatureFace;\n boolean hasFeatureIris;\n boolean hasFeatureFingerprint;\n MediaRouterService mediaRouter3;\n Class<SystemService> serviceClass;\n MediaRouterService mediaRouter4;\n Throwable e;\n ?? mediaRouterService;\n NetworkTimeUpdateService networkTimeUpdater2;\n Throwable e2;\n IBinder iBinder3;\n Throwable e3;\n IBinder iBinder4;\n Throwable e4;\n Throwable e5;\n Throwable e6;\n Throwable e7;\n Throwable e8;\n ?? r2;\n IBinder iBinder5;\n Throwable e9;\n Throwable e10;\n Throwable e11;\n IpSecService ipSecService5;\n Throwable e12;\n ?? create;\n Throwable e13;\n VibratorService vibrator2;\n RuntimeException e14;\n TelephonyRegistry telephonyRegistry2;\n ?? vibratorService;\n InputManagerService inputManager2;\n ?? r9;\n Context context = this.mSystemContext;\n INetworkStatsService iNetworkStatsService3 = null;\n WindowManagerService wm3 = null;\n IBinder iBinder6 = null;\n NetworkTimeUpdateService networkTimeUpdater3 = null;\n InputManagerService inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n MmsServiceBroker mmsService = null;\n AlarmManagerService alarmManager = null;\n this.mHwRogEx = HwServiceFactory.getHwRogEx();\n boolean disableSystemTextClassifier = SystemProperties.getBoolean(\"config.disable_systemtextclassifier\", false);\n boolean disableNetworkTime = SystemProperties.getBoolean(\"config.disable_networktime\", false);\n boolean disableCameraService = SystemProperties.getBoolean(\"config.disable_cameraservice\", false);\n boolean disableSlices = SystemProperties.getBoolean(\"config.disable_slices\", false);\n boolean tuiEnable2 = SystemProperties.getBoolean(\"ro.vendor.tui.service\", false);\n boolean isEmulator = SystemProperties.get(\"ro.kernel.qemu\").equals(ENCRYPTED_STATE);\n boolean enableRms = SystemProperties.getBoolean(\"ro.config.enable_rms\", false);\n boolean enableIaware = SystemProperties.getBoolean(\"ro.config.enable_iaware\", false);\n boolean isChinaArea = \"CN\".equalsIgnoreCase(SystemProperties.get(\"ro.product.locale.region\", \"\"));\n boolean isWatch = context.getPackageManager().hasSystemFeature(\"android.hardware.type.watch\");\n boolean isArc = context.getPackageManager().hasSystemFeature(\"org.chromium.arc\");\n boolean enableVrService = context.getPackageManager().hasSystemFeature(\"android.hardware.vr.high_performance\");\n boolean isStartSysSvcCallRecord = \"3\".equals(SystemProperties.get(\"ro.logsystem.usertype\", \"0\")) && \"true\".equals(SystemProperties.get(\"ro.syssvccallrecord.enable\", \"false\"));\n if (Build.IS_DEBUGGABLE) {\n if (SystemProperties.getBoolean(\"debug.crash_system\", false)) {\n throw new RuntimeException();\n }\n }\n try {\n if (MAPLE_ENABLE) {\n try {\n Slog.d(TAG, \"wait primary zygote preload default resources\");\n ConcurrentUtils.waitForFutureNoInterrupt(this.mPrimaryZygotePreload, \"Primary Zygote preload\");\n Slog.d(TAG, \"primary zygote preload default resources finished\");\n this.mPrimaryZygotePreload = null;\n } catch (RuntimeException e15) {\n e14 = e15;\n str2 = \"false\";\n telephonyRegistry = null;\n vibrator2 = null;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n }\n }\n try {\n this.mZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$NlJmG18aPrQduhRqASIdcn7G0z8.INSTANCE, \"SecondaryZygotePreload\");\n traceBeginAndSlog(\"StartKeyAttestationApplicationIdProviderService\");\n ServiceManager.addService(\"sec_key_att_app_id_provider\", (IBinder) new KeyAttestationApplicationIdProviderService(context));\n traceEnd();\n traceBeginAndSlog(\"StartKeyChainSystemService\");\n this.mSystemServiceManager.startService(KeyChainSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSchedulingPolicyService\");\n ServiceManager.addService(\"scheduling_policy\", (IBinder) new SchedulingPolicyService());\n traceEnd();\n if (hasSystemServerFeature(\"telecomloader\")) {\n traceBeginAndSlog(\"StartTelecomLoaderService\");\n this.mSystemServiceManager.startService(TelecomLoaderService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"telephonyregistry\")) {\n traceBeginAndSlog(\"StartTelephonyRegistry\");\n if (HwSystemManager.mPermissionEnabled == 0) {\n r9 = new TelephonyRegistry(context);\n } else {\n HwServiceFactory.IHwTelephonyRegistry itr = HwServiceFactory.getHwTelephonyRegistry();\n if (itr != null) {\n r9 = itr.getInstance(context);\n } else {\n r9 = new TelephonyRegistry(context);\n }\n }\n ServiceManager.addService(\"telephony.registry\", (IBinder) r9);\n traceEnd();\n telephonyRegistry2 = r9;\n } else {\n telephonyRegistry2 = null;\n }\n try {\n traceBeginAndSlog(\"StartEntropyMixer\");\n this.mEntropyMixer = new EntropyMixer(context);\n traceEnd();\n this.mContentResolver = context.getContentResolver();\n traceBeginAndSlog(\"StartAccountManagerService\");\n this.mSystemServiceManager.startService(ACCOUNT_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartContentService\");\n this.mSystemServiceManager.startService(CONTENT_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"InstallSystemProviders\");\n this.mActivityManagerService.installSystemProviders();\n SQLiteCompatibilityWalFlags.reset();\n traceEnd();\n traceBeginAndSlog(\"StartDropBoxManager\");\n this.mSystemServiceManager.startService(DropBoxManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartVibratorService\");\n vibratorService = new VibratorService(context);\n } catch (RuntimeException e16) {\n e14 = e16;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = null;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7 = null;\n LocationManagerService location2 = null;\n CountryDetectorService countryDetector2 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n try {\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n } catch (Throwable e17) {\n reportWtf(\"starting StorageManagerService\", e17);\n }\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n try {\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n } catch (Throwable e18) {\n reportWtf(\"starting StorageStatsService\", e18);\n }\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config = wm.computeNewConfiguration(0);\n DisplayMetrics metrics = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics);\n context.getResources().updateConfiguration(config, metrics);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e19) {\n e14 = e19;\n str2 = \"false\";\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n telephonyRegistry = null;\n vibrator2 = null;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72 = null;\n LocationManagerService location22 = null;\n CountryDetectorService countryDetector22 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2);\n context.getResources().updateConfiguration(config2, metrics2);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n try {\n ServiceManager.addService(\"vibrator\", (IBinder) vibratorService);\n traceEnd();\n if (hasSystemServerFeature(\"dynamicsystem\")) {\n try {\n traceBeginAndSlog(\"StartDynamicSystemService\");\n try {\n ServiceManager.addService(\"dynamic_system\", (IBinder) new DynamicSystemService(context));\n traceEnd();\n } catch (RuntimeException e20) {\n e14 = e20;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722 = null;\n LocationManagerService location222 = null;\n CountryDetectorService countryDetector222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22);\n context.getResources().updateConfiguration(config22, metrics22);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e21) {\n e14 = e21;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222 = null;\n LocationManagerService location2222 = null;\n CountryDetectorService countryDetector2222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222);\n context.getResources().updateConfiguration(config222, metrics222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n }\n if (!isWatch && hasSystemServerFeature(\"consumerir\")) {\n traceBeginAndSlog(\"StartConsumerIrService\");\n ServiceManager.addService(\"consumer_ir\", (IBinder) new ConsumerIrService(context));\n traceEnd();\n }\n try {\n traceBeginAndSlog(\"StartAlarmManagerService\");\n alarmManager = HwServiceFactory.getHwAlarmManagerService(context);\n if (alarmManager == null) {\n try {\n alarmManager = new AlarmManagerService(context);\n } catch (RuntimeException e22) {\n e14 = e22;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222 = null;\n LocationManagerService location22222 = null;\n CountryDetectorService countryDetector22222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222);\n context.getResources().updateConfiguration(config2222, metrics2222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n }\n } catch (RuntimeException e23) {\n e14 = e23;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722222 = null;\n LocationManagerService location222222 = null;\n CountryDetectorService countryDetector222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222);\n context.getResources().updateConfiguration(config22222, metrics22222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n try {\n this.mSystemServiceManager.startService(alarmManager);\n traceEnd();\n this.mActivityManagerService.setAlarmManager(alarmManager);\n traceBeginAndSlog(\"StartInputManagerService\");\n InputManagerService inputManager4 = HwServiceFactory.getHwInputManagerService().getInstance(context, null);\n if (inputManager4 == null) {\n inputManager2 = new InputManagerService(context);\n } else {\n inputManager2 = inputManager4;\n }\n try {\n traceEnd();\n traceBeginAndSlog(\"StartHwSysResManagerService\");\n if (enableRms || enableIaware) {\n try {\n this.mSystemServiceManager.startService(\"com.android.server.rms.HwSysResManagerService\");\n } catch (Throwable e24) {\n Slog.e(TAG, e24.toString());\n }\n }\n traceEnd();\n traceBeginAndSlog(\"StartWindowManagerService\");\n ConcurrentUtils.waitForFutureNoInterrupt(this.mSensorServiceStart, START_SENSOR_SERVICE);\n this.mSensorServiceStart = null;\n try {\n Slog.i(TAG, \"initial SystemService \" + Class.forName(\"android.os.SystemService\"));\n } catch (ClassNotFoundException e25) {\n Slog.i(TAG, \"initial SystemService fail because : \" + e25.getMessage());\n } catch (RuntimeException e26) {\n e14 = e26;\n str2 = \"false\";\n inputManager3 = inputManager2;\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222222 = null;\n LocationManagerService location2222222 = null;\n CountryDetectorService countryDetector2222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222);\n context.getResources().updateConfiguration(config222222, metrics222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n telephonyRegistry = telephonyRegistry2;\n str2 = \"false\";\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator = vibratorService;\n try {\n WindowManagerService wm4 = WindowManagerService.main(context, inputManager2, !this.mFirstBoot, this.mOnlyCore, HwPolicyFactory.getHwPhoneWindowManager(), this.mActivityManagerService.mActivityTaskManager);\n try {\n if (this.mHwRogEx != null) {\n try {\n this.mHwRogEx.initRogModeAndProcessMultiDpi(wm4, context);\n } catch (RuntimeException e27) {\n e14 = e27;\n wm3 = wm4;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n inputManager3 = inputManager2;\n }\n }\n ServiceManager.addService(\"window\", wm4, false, 17);\n ?? r8 = inputManager2;\n try {\n ServiceManager.addService(\"input\", (IBinder) r8, false, 1);\n traceEnd();\n traceBeginAndSlog(\"SetWindowManagerService\");\n this.mActivityManagerService.setWindowManager(wm4);\n traceEnd();\n traceBeginAndSlog(\"WindowManagerServiceOnInitReady\");\n wm4.onInitReady();\n traceEnd();\n SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$JQH6ND0PqyyiRiz7lXLvUmRhwRM.INSTANCE, START_HIDL_SERVICES);\n if (!isWatch && enableVrService) {\n traceBeginAndSlog(\"StartVrManagerService\");\n this.mSystemServiceManager.startService(VrManagerService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartInputManager\");\n r8.setWindowManagerCallbacks(wm4.getInputManagerCallback());\n r8.start();\n traceEnd();\n traceBeginAndSlog(\"DisplayManagerWindowManagerAndInputReady\");\n this.mDisplayManagerService.windowManagerAndInputReady();\n traceEnd();\n if (this.mFactoryTestMode == 1) {\n Slog.i(TAG, \"No Bluetooth Service (factory test)\");\n } else if (!context.getPackageManager().hasSystemFeature(\"android.hardware.bluetooth\")) {\n Slog.i(TAG, \"No Bluetooth Service (Bluetooth Hardware Not Present)\");\n } else {\n traceBeginAndSlog(\"StartBluetoothService\");\n this.mSystemServiceManager.startService(BluetoothService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"IpConnectivityMetrics\");\n this.mSystemServiceManager.startService(IpConnectivityMetrics.class);\n traceEnd();\n traceBeginAndSlog(\"NetworkWatchlistService\");\n this.mSystemServiceManager.startService(NetworkWatchlistService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"pinner\")) {\n traceBeginAndSlog(\"PinnerService\");\n ((PinnerService) this.mSystemServiceManager.startService(PinnerService.class)).setInstaller(this.installer);\n traceEnd();\n }\n traceBeginAndSlog(\"ZRHungServiceBridge\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.zrhung.ZRHungServiceBridge\");\n } catch (Throwable th) {\n Slog.e(TAG, \"Fail to begin and Slog ZRHungServiceBridge\");\n }\n traceEnd();\n traceBeginAndSlog(\"SignedConfigService\");\n SignedConfigService.registerUpdateReceiver(this.mSystemContext);\n traceEnd();\n if (!SystemProperties.get(\"ro.config.hw_fold_disp\").isEmpty() || !SystemProperties.get(\"persist.sys.fold.disp.size\").isEmpty()) {\n traceBeginAndSlog(\"HwFoldScreenManagerService\");\n try {\n this.mSystemServiceManager.startService(\"com.huawei.server.fsm.HwFoldScreenManagerService\");\n } catch (Throwable th2) {\n Slog.e(TAG, \"Failed to start HwFoldScreenManagerService.\");\n }\n traceEnd();\n }\n if (isWatch) {\n traceBeginAndSlog(\"HwWatchConnectivityService\");\n try {\n this.mSystemServiceManager.startService(\"com.huawei.android.server.HwWatchConnectivityServiceBridge\");\n } catch (Throwable th3) {\n Slog.e(TAG, \"Failed to start HwWatchConnectivityService.\");\n }\n traceEnd();\n }\n wm = wm4;\n inputManager = r8;\n wm2 = alarmManager;\n } catch (RuntimeException e28) {\n e14 = e28;\n wm3 = wm4;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n inputManager3 = r8;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222222 = null;\n LocationManagerService location22222222 = null;\n CountryDetectorService countryDetector22222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222);\n context.getResources().updateConfiguration(config2222222, metrics2222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e29) {\n e14 = e29;\n inputManager3 = inputManager2;\n wm3 = wm4;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722222222 = null;\n LocationManagerService location222222222 = null;\n CountryDetectorService countryDetector222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222);\n context.getResources().updateConfiguration(config22222222, metrics22222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e30) {\n e14 = e30;\n inputManager3 = inputManager2;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222222222 = null;\n LocationManagerService location2222222222 = null;\n CountryDetectorService countryDetector2222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222);\n context.getResources().updateConfiguration(config222222222, metrics222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e31) {\n e14 = e31;\n str2 = \"false\";\n inputManager3 = inputManager2;\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222222222 = null;\n LocationManagerService location22222222222 = null;\n CountryDetectorService countryDetector22222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222);\n context.getResources().updateConfiguration(config2222222222, metrics2222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e32) {\n e14 = e32;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722222222222 = null;\n LocationManagerService location222222222222 = null;\n CountryDetectorService countryDetector222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222);\n context.getResources().updateConfiguration(config22222222222, metrics22222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e33) {\n e14 = e33;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222222222222 = null;\n LocationManagerService location2222222222222 = null;\n CountryDetectorService countryDetector2222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222);\n context.getResources().updateConfiguration(config222222222222, metrics222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e34) {\n e14 = e34;\n str2 = \"false\";\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n telephonyRegistry = null;\n vibrator2 = null;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222222222222 = null;\n LocationManagerService location22222222222222 = null;\n CountryDetectorService countryDetector22222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222);\n context.getResources().updateConfiguration(config2222222222222, metrics2222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n this.mActivityManagerService.enterSafeMode();\n Settings.Global.putInt(context.getContentResolver(), \"airplane_mode_on\", 1);\n }\n IBinder iBinder722222222222222 = null;\n LocationManagerService location222222222222222 = null;\n CountryDetectorService countryDetector222222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n traceBeginAndSlog(\"StartInputMethodManagerLifecycle\");\n if (InputMethodSystemProperty.MULTI_CLIENT_IME_ENABLED) {\n this.mSystemServiceManager.startService(MultiClientInputMethodManagerService.Lifecycle.class);\n } else {\n this.mSystemServiceManager.startService(InputMethodManagerService.Lifecycle.class);\n }\n if (isChinaArea) {\n try {\n Slog.i(TAG, \"Secure Input Method Service\");\n this.mSystemServiceManager.startService(\"com.android.server.inputmethod.HwSecureInputMethodManagerService$MyLifecycle\");\n } catch (Throwable e35) {\n reportWtf(\"starting Secure Input Manager Service\", e35);\n }\n }\n traceEnd();\n if (hasSystemServerFeature(\"accessibility\")) {\n traceBeginAndSlog(\"StartAccessibilityManagerService\");\n try {\n this.mSystemServiceManager.startService(ACCESSIBILITY_MANAGER_SERVICE_CLASS);\n } catch (Throwable e36) {\n reportWtf(\"starting Accessibility Manager\", e36);\n }\n traceEnd();\n }\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n try {\n wm.displayReady();\n } catch (Throwable e37) {\n reportWtf(\"making display ready\", e37);\n }\n traceEnd();\n if (this.mFactoryTestMode != 1 && !str.equals(SystemProperties.get(\"system_init.startmountservice\"))) {\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n traceBeginAndSlog(\"UpdatePackagesIfNeeded\");\n if (HwTvUtils.isBootTimeOpt()) {\n Slog.i(TAG, \"boottimeopt ignore dexopt\");\n } else {\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"dexopt\");\n this.mPackageManagerService.updatePackagesIfNeeded();\n } catch (Throwable th4) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"dexopt\");\n throw th4;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"dexopt\");\n }\n traceEnd();\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n try {\n this.mPackageManagerService.performFstrimIfNeeded();\n } catch (Throwable e38) {\n reportWtf(\"performing fstrim\", e38);\n }\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n traceBeginAndSlog(\"StartLockSettingsService\");\n try {\n this.mSystemServiceManager.startService(LOCK_SETTINGS_SERVICE_CLASS);\n lockSettings = ILockSettings.Stub.asInterface(ServiceManager.getService(\"lock_settings\"));\n } catch (Throwable e39) {\n reportWtf(\"starting LockSettingsService service\", e39);\n }\n traceEnd();\n boolean hasPdb = !SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals(obj);\n boolean hasGsi = SystemProperties.getInt(GSI_RUNNING_PROP, 0) > 0;\n if (!hasPdb || hasGsi) {\n ipSecService2 = null;\n } else {\n traceBeginAndSlog(\"StartPersistentDataBlock\");\n ipSecService2 = null;\n this.mSystemServiceManager.startService(PersistentDataBlockService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"testharness\")) {\n traceBeginAndSlog(\"StartTestHarnessMode\");\n this.mSystemServiceManager.startService(TestHarnessModeService.class);\n traceEnd();\n }\n if (hasPdb || OemLockService.isHalPresent()) {\n traceBeginAndSlog(\"StartOemLockService\");\n this.mSystemServiceManager.startService(OemLockService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartDeviceIdleController\");\n this.mSystemServiceManager.startService(DeviceIdleController.class);\n traceEnd();\n traceBeginAndSlog(\"StartDevicePolicyManager\");\n this.mSystemServiceManager.startService(DevicePolicyManagerService.Lifecycle.class);\n traceEnd();\n if (!isWatch && hasSystemServerFeature(\"statusbar\")) {\n traceBeginAndSlog(\"StartStatusBarManagerService\");\n try {\n iBinder722222222222222 = HwServiceFactory.createHwStatusBarManagerService(context, wm);\n ServiceManager.addService(\"statusbar\", iBinder722222222222222);\n } catch (Throwable e40) {\n reportWtf(\"starting StatusBarManagerService\", e40);\n }\n traceEnd();\n }\n startContentCaptureService(context);\n startAttentionService(context);\n startSystemCaptionsManagerService(context);\n if (hasSystemServerFeature(\"appprediction\")) {\n traceBeginAndSlog(\"StartAppPredictionService\");\n this.mSystemServiceManager.startService(APP_PREDICTION_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartContentSuggestionsService\");\n this.mSystemServiceManager.startService(CONTENT_SUGGESTIONS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"InitNetworkStackClient\");\n try {\n NetworkStackClient.getInstance().init();\n } catch (Throwable e41) {\n reportWtf(\"initializing NetworkStackClient\", e41);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNetworkManagementService\");\n try {\n iNetworkManagementService2 = NetworkManagementService.create(context);\n try {\n ServiceManager.addService(\"network_management\", iNetworkManagementService2);\n } catch (Throwable th5) {\n e13 = th5;\n }\n } catch (Throwable th6) {\n e13 = th6;\n iNetworkManagementService2 = null;\n reportWtf(\"starting NetworkManagement Service\", e13);\n iNetworkManagementService2 = iNetworkManagementService2;\n traceEnd();\n traceBeginAndSlog(\"StartIpSecService\");\n create = IpSecService.create(context);\n try {\n ServiceManager.addService(INetd.IPSEC_INTERFACE_PREFIX, (IBinder) create);\n ipSecService3 = create;\n } catch (Throwable th7) {\n e12 = th7;\n ipSecService5 = create;\n }\n traceEnd();\n if (hasSystemServerFeature(\"text\")) {\n }\n if (!disableSystemTextClassifier) {\n }\n traceBeginAndSlog(\"StartNetworkScoreService\");\n this.mSystemServiceManager.startService(NetworkScoreService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkStatsService\");\n iNetworkStatsService3 = NetworkStatsService.create(context, iNetworkManagementService2);\n ServiceManager.addService(\"netstats\", iNetworkStatsService3);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkPolicyManagerService\");\n iNetworkPolicyManager2 = HwServiceFactory.getHwNetworkPolicyManagerService().getInstance(context, this.mActivityManagerService, iNetworkManagementService2);\n try {\n ServiceManager.addService(\"netpolicy\", iNetworkPolicyManager2);\n } catch (Throwable th8) {\n e11 = th8;\n }\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\")) {\n }\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartConnectivityService\");\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n try {\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n } catch (Throwable th9) {\n e10 = th9;\n }\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n try {\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n } catch (Throwable th10) {\n e9 = th10;\n reportWtf(\"starting Service Discovery Service\", e9);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification2 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n try {\n ServiceManager.addService(\"serial\", iBinder4);\n } catch (Throwable th11) {\n e4 = th11;\n }\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager = this.mSystemServiceManager;\n Context context2 = this.mSystemContext;\n systemServiceManager.startService(new RoleManagerService(context2, new LegacyRoleResolutionPolicy(context2)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222);\n context.getResources().updateConfiguration(config22222222222222, metrics22222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification22 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n try {\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n } catch (Throwable th12) {\n e4 = th12;\n iBinder4 = null;\n Slog.e(TAG, \"Failure starting SerialService\", e4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2 = this.mSystemServiceManager;\n Context context22 = this.mSystemContext;\n systemServiceManager2.startService(new RoleManagerService(context22, new LegacyRoleResolutionPolicy(context22)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222);\n context.getResources().updateConfiguration(config222222222222222, metrics222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n try {\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n } catch (Throwable th13) {\n e3 = th13;\n Slog.e(TAG, \"Failure starting HardwarePropertiesManagerService\", e3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22 = this.mSystemServiceManager;\n Context context222 = this.mSystemContext;\n systemServiceManager22.startService(new RoleManagerService(context222, new LegacyRoleResolutionPolicy(context222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222);\n context.getResources().updateConfiguration(config2222222222222222, metrics2222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222 = this.mSystemServiceManager;\n Context context2222 = this.mSystemContext;\n systemServiceManager222.startService(new RoleManagerService(context2222, new LegacyRoleResolutionPolicy(context2222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n try {\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n } catch (Throwable th14) {\n e = th14;\n mediaRouter4 = mediaRouterService;\n }\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222);\n context.getResources().updateConfiguration(config22222222222222222, metrics22222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartIpSecService\");\n try {\n create = IpSecService.create(context);\n ServiceManager.addService(INetd.IPSEC_INTERFACE_PREFIX, (IBinder) create);\n ipSecService3 = create;\n } catch (Throwable th15) {\n e12 = th15;\n ipSecService5 = ipSecService2;\n reportWtf(\"starting IpSec Service\", e12);\n ipSecService3 = ipSecService5;\n traceEnd();\n if (hasSystemServerFeature(\"text\")) {\n }\n if (!disableSystemTextClassifier) {\n }\n traceBeginAndSlog(\"StartNetworkScoreService\");\n this.mSystemServiceManager.startService(NetworkScoreService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkStatsService\");\n iNetworkStatsService3 = NetworkStatsService.create(context, iNetworkManagementService2);\n ServiceManager.addService(\"netstats\", iNetworkStatsService3);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkPolicyManagerService\");\n iNetworkPolicyManager2 = HwServiceFactory.getHwNetworkPolicyManagerService().getInstance(context, this.mActivityManagerService, iNetworkManagementService2);\n ServiceManager.addService(\"netpolicy\", iNetworkPolicyManager2);\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\")) {\n }\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartConnectivityService\");\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222 = this.mSystemServiceManager;\n Context context22222 = this.mSystemContext;\n systemServiceManager2222.startService(new RoleManagerService(context22222, new LegacyRoleResolutionPolicy(context22222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222, metrics222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n if (hasSystemServerFeature(\"text\")) {\n traceBeginAndSlog(\"StartTextServicesManager\");\n ipSecService4 = ipSecService3;\n this.mSystemServiceManager.startService(TextServicesManagerService.Lifecycle.class);\n traceEnd();\n } else {\n ipSecService4 = ipSecService3;\n }\n if (!disableSystemTextClassifier) {\n traceBeginAndSlog(\"StartTextClassificationManagerService\");\n this.mSystemServiceManager.startService(TextClassificationManagerService.Lifecycle.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartNetworkScoreService\");\n this.mSystemServiceManager.startService(NetworkScoreService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkStatsService\");\n try {\n iNetworkStatsService3 = NetworkStatsService.create(context, iNetworkManagementService2);\n ServiceManager.addService(\"netstats\", iNetworkStatsService3);\n } catch (Throwable e42) {\n reportWtf(\"starting NetworkStats Service\", e42);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNetworkPolicyManagerService\");\n try {\n iNetworkPolicyManager2 = HwServiceFactory.getHwNetworkPolicyManagerService().getInstance(context, this.mActivityManagerService, iNetworkManagementService2);\n ServiceManager.addService(\"netpolicy\", iNetworkPolicyManager2);\n } catch (Throwable th16) {\n e11 = th16;\n iNetworkPolicyManager2 = null;\n reportWtf(\"starting NetworkPolicy Service\", e11);\n iNetworkPolicyManager2 = iNetworkPolicyManager2;\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\")) {\n }\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartConnectivityService\");\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification2222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222 = this.mSystemServiceManager;\n Context context222222 = this.mSystemContext;\n systemServiceManager22222.startService(new RoleManagerService(context222222, new LegacyRoleResolutionPolicy(context222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222, metrics2222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n traceBeginAndSlog(\"StartWifi\");\n this.mSystemServiceManager.startService(WIFI_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartWifiScanning\");\n this.mSystemServiceManager.startService(\"com.android.server.wifi.scanner.WifiScanningService\");\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n traceBeginAndSlog(\"StartRttService\");\n this.mSystemServiceManager.startService(\"com.android.server.wifi.rtt.RttService\");\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n traceBeginAndSlog(\"StartWifiAware\");\n this.mSystemServiceManager.startService(WIFI_AWARE_SERVICE_CLASS);\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n traceBeginAndSlog(\"StartWifiP2P\");\n this.mSystemServiceManager.startService(WIFI_P2P_SERVICE_CLASS);\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n traceBeginAndSlog(\"StartLowpan\");\n this.mSystemServiceManager.startService(LOWPAN_SERVICE_CLASS);\n traceEnd();\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\") || this.mPackageManager.hasSystemFeature(\"android.hardware.usb.host\")) {\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartConnectivityService\");\n try {\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n } catch (Throwable th17) {\n e10 = th17;\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n iConnectivityManager2 = null;\n reportWtf(\"starting Connectivity Service\", e10);\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification22222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222 = this.mSystemServiceManager;\n Context context2222222 = this.mSystemContext;\n systemServiceManager222222.startService(new RoleManagerService(context2222222, new LegacyRoleResolutionPolicy(context2222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222, metrics22222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n try {\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n } catch (Throwable th18) {\n e9 = th18;\n iBinder5 = null;\n reportWtf(\"starting Service Discovery Service\", e9);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification222222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222 = this.mSystemServiceManager;\n Context context22222222 = this.mSystemContext;\n systemServiceManager2222222.startService(new RoleManagerService(context22222222, new LegacyRoleResolutionPolicy(context22222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222, metrics222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n try {\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n } catch (Throwable e43) {\n reportWtf(\"starting SystemUpdateManagerService\", e43);\n }\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n try {\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n } catch (Throwable e44) {\n reportWtf(\"starting UpdateLockService\", e44);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n } catch (RuntimeException e45) {\n this.mSystemServiceManager.startService(NotificationManagerService.class);\n }\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification2222222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n notification = notification2222222;\n try {\n ServiceManager.addService(\"tui\", (IBinder) new TrustedUIService(context));\n } catch (Throwable e46) {\n Slog.e(TAG, \"Failure starting TUI Service \", e46);\n }\n } else {\n notification = notification2222222;\n }\n if (hasSystemServerFeature(\"location\")) {\n traceBeginAndSlog(\"StartLocationManagerService\");\n try {\n HwServiceFactory.IHwLocationManagerService hwLocation = HwServiceFactory.getHwLocationManagerService();\n if (hwLocation != null) {\n r2 = hwLocation.getInstance(context);\n } else {\n r2 = new LocationManagerService(context);\n }\n try {\n ServiceManager.addService(\"location\", (IBinder) r2);\n location222222222222222 = r2;\n } catch (Throwable th19) {\n e8 = th19;\n location222222222222222 = r2;\n reportWtf(\"starting Location Manager\", e8);\n traceEnd();\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222222 = this.mSystemServiceManager;\n Context context222222222 = this.mSystemContext;\n systemServiceManager22222222.startService(new RoleManagerService(context222222222, new LegacyRoleResolutionPolicy(context222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222, metrics2222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th20) {\n e8 = th20;\n reportWtf(\"starting Location Manager\", e8);\n traceEnd();\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222222 = this.mSystemServiceManager;\n Context context2222222222 = this.mSystemContext;\n systemServiceManager222222222.startService(new RoleManagerService(context2222222222, new LegacyRoleResolutionPolicy(context2222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222, metrics22222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n traceBeginAndSlog(\"StartCountryDetectorService\");\n try {\n ?? countryDetectorService = new CountryDetectorService(context);\n try {\n ServiceManager.addService(\"country_detector\", (IBinder) countryDetectorService);\n countryDetector222222222222222 = countryDetectorService;\n } catch (Throwable th21) {\n e7 = th21;\n countryDetector222222222222222 = countryDetectorService;\n reportWtf(\"starting Country Detector\", e7);\n traceEnd();\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222222 = this.mSystemServiceManager;\n Context context22222222222 = this.mSystemContext;\n systemServiceManager2222222222.startService(new RoleManagerService(context22222222222, new LegacyRoleResolutionPolicy(context22222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222, metrics222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th22) {\n e7 = th22;\n reportWtf(\"starting Country Detector\", e7);\n traceEnd();\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222222222 = this.mSystemServiceManager;\n Context context222222222222 = this.mSystemContext;\n systemServiceManager22222222222.startService(new RoleManagerService(context222222222222, new LegacyRoleResolutionPolicy(context222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222222, metrics2222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n traceBeginAndSlog(\"StartTimeDetectorService\");\n try {\n try {\n this.mSystemServiceManager.startService(TIME_DETECTOR_SERVICE_CLASS);\n } catch (Throwable th23) {\n e6 = th23;\n }\n } catch (Throwable th24) {\n e6 = th24;\n reportWtf(\"starting StartTimeDetectorService service\", e6);\n traceEnd();\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222222222 = this.mSystemServiceManager;\n Context context2222222222222 = this.mSystemContext;\n systemServiceManager222222222222.startService(new RoleManagerService(context2222222222222, new LegacyRoleResolutionPolicy(context2222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222222, metrics22222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n if (!isWatch) {\n traceBeginAndSlog(\"StartSearchManagerService\");\n try {\n this.mSystemServiceManager.startService(SEARCH_MANAGER_SERVICE_CLASS);\n } catch (Throwable e47) {\n reportWtf(\"starting Search Service\", e47);\n }\n traceEnd();\n }\n if (context.getResources().getBoolean(17891453)) {\n traceBeginAndSlog(\"StartWallpaperManagerService\");\n this.mSystemServiceManager.startService(WALLPAPER_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n this.mSystemServiceManager.startService(AudioService.Lifecycle.class);\n iNetworkPolicyManager = iNetworkPolicyManager2;\n iConnectivityManager = iConnectivityManager2;\n } else {\n String className = context.getResources().getString(17039829);\n try {\n SystemServiceManager systemServiceManager3 = this.mSystemServiceManager;\n iNetworkPolicyManager = iNetworkPolicyManager2;\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(className);\n iConnectivityManager = iConnectivityManager2;\n try {\n sb.append(\"$Lifecycle\");\n systemServiceManager3.startService(sb.toString());\n } catch (Throwable th25) {\n e5 = th25;\n }\n } catch (Throwable th26) {\n e5 = th26;\n iConnectivityManager = iConnectivityManager2;\n reportWtf(\"starting \" + className, e5);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222222222 = this.mSystemServiceManager;\n Context context22222222222222 = this.mSystemContext;\n systemServiceManager2222222222222.startService(new RoleManagerService(context22222222222222, new LegacyRoleResolutionPolicy(context22222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222222, metrics222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th27) {\n e5 = th27;\n iNetworkPolicyManager = iNetworkPolicyManager2;\n iConnectivityManager = iConnectivityManager2;\n reportWtf(\"starting \" + className, e5);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222222222222 = this.mSystemServiceManager;\n Context context222222222222222 = this.mSystemContext;\n systemServiceManager22222222222222.startService(new RoleManagerService(context222222222222222, new LegacyRoleResolutionPolicy(context222222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222222222, metrics2222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n traceBeginAndSlog(\"StartBroadcastRadioService\");\n this.mSystemServiceManager.startService(BroadcastRadioService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n traceBeginAndSlog(\"StartDockObserver\");\n this.mSystemServiceManager.startService(DockObserver.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n try {\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n } catch (Throwable e48) {\n reportWtf(\"starting WiredAccessoryManager\", e48);\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n traceBeginAndSlog(\"StartMidiManager\");\n this.mSystemServiceManager.startService(MIDI_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartAdbService\");\n try {\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n } catch (Throwable th28) {\n Slog.e(TAG, \"Failure starting AdbService\");\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.usb.host\") || this.mPackageManager.hasSystemFeature(\"android.hardware.usb.accessory\") || isEmulator) {\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n }\n if (!isWatch && hasSystemServerFeature(\"serial\")) {\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n }\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n try {\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n } catch (Throwable th29) {\n e3 = th29;\n iBinder3 = null;\n Slog.e(TAG, \"Failure starting HardwarePropertiesManagerService\", e3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222222222222 = this.mSystemServiceManager;\n Context context2222222222222222 = this.mSystemContext;\n systemServiceManager222222222222222.startService(new RoleManagerService(context2222222222222222, new LegacyRoleResolutionPolicy(context2222222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222222222, metrics22222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n traceBeginAndSlog(\"StartBackupManager\");\n this.mSystemServiceManager.startService(BACKUP_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.app_widgets\") || context.getResources().getBoolean(17891433)) {\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222222222222 = this.mSystemServiceManager;\n Context context22222222222222222 = this.mSystemContext;\n systemServiceManager2222222222222222.startService(new RoleManagerService(context22222222222222222, new LegacyRoleResolutionPolicy(context22222222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n traceBeginAndSlog(\"StartGestureLauncher\");\n this.mSystemServiceManager.startService(GestureLauncherService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n try {\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n } catch (Throwable e49) {\n reportWtf(\"starting DiskStats Service\", e49);\n }\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n try {\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n } catch (Throwable e50) {\n reportWtf(\"starting RuntimeService\", e50);\n }\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n traceBeginAndSlog(\"StartTimeZoneRulesManagerService\");\n this.mSystemServiceManager.startService(TIME_ZONE_RULES_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (!disableNetworkTime) {\n traceBeginAndSlog(\"StartNetworkTimeUpdateService\");\n try {\n networkTimeUpdater2 = new NewNetworkTimeUpdateService(context);\n try {\n Slog.d(TAG, \"Using networkTimeUpdater class=\" + networkTimeUpdater2.getClass());\n ServiceManager.addService(\"network_time_update_service\", networkTimeUpdater2);\n networkTimeUpdater3 = networkTimeUpdater2;\n } catch (Throwable th30) {\n e2 = th30;\n reportWtf(\"starting NetworkTimeUpdate service\", e2);\n networkTimeUpdater3 = networkTimeUpdater2;\n traceEnd();\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222222222, metrics222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th31) {\n e2 = th31;\n networkTimeUpdater2 = null;\n reportWtf(\"starting NetworkTimeUpdate service\", e2);\n networkTimeUpdater3 = networkTimeUpdater2;\n traceEnd();\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222222222222, metrics2222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n traceBeginAndSlog(\"CertBlacklister\");\n try {\n new CertBlacklister(context);\n } catch (Throwable e51) {\n reportWtf(\"starting CertBlacklister\", e51);\n }\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n traceBeginAndSlog(\"StartEmergencyAffordanceService\");\n this.mSystemServiceManager.startService(EmergencyAffordanceService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n traceBeginAndSlog(\"StartPrintManager\");\n this.mSystemServiceManager.startService(PRINT_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n traceBeginAndSlog(\"StartCompanionDeviceManager\");\n this.mSystemServiceManager.startService(COMPANION_DEVICE_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n traceBeginAndSlog(\"StartHdmiControlService\");\n this.mSystemServiceManager.startService(HdmiControlService.class);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.live_tv\") || this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n traceBeginAndSlog(\"StartMediaResourceMonitor\");\n this.mSystemServiceManager.startService(MediaResourceMonitorService.class);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n traceBeginAndSlog(\"StartTvRemoteService\");\n this.mSystemServiceManager.startService(TvRemoteService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n try {\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n } catch (Throwable th32) {\n e = th32;\n mediaRouter4 = null;\n reportWtf(\"starting MediaRouterService\", e);\n mediaRouter2 = mediaRouter4;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222222222222, metrics22222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n traceBeginAndSlog(\"StartFaceSensor\");\n mediaRouter3 = mediaRouter2;\n this.mSystemServiceManager.startService(FaceService.class);\n traceEnd();\n } else {\n mediaRouter3 = mediaRouter2;\n }\n if (hasFeatureIris) {\n traceBeginAndSlog(\"StartIrisSensor\");\n this.mSystemServiceManager.startService(IrisService.class);\n traceEnd();\n }\n if (hasFeatureFingerprint) {\n traceBeginAndSlog(\"StartFingerprintSensor\");\n try {\n HwServiceFactory.IHwFingerprintService ifs = HwServiceFactory.getHwFingerprintService();\n if (ifs != null) {\n Class<SystemService> serviceClass2 = ifs.createServiceClass();\n Slog.i(TAG, \"serviceClass doesn't null\");\n serviceClass = serviceClass2;\n } else {\n Slog.e(TAG, \"HwFingerPrintService is null!\");\n serviceClass = null;\n }\n if (serviceClass != null) {\n Slog.i(TAG, \"start HwFingerPrintService\");\n this.mSystemServiceManager.startService(serviceClass);\n } else {\n this.mSystemServiceManager.startService(FingerprintService.class);\n }\n Slog.i(TAG, \"FingerPrintService ready\");\n } catch (Throwable e52) {\n Slog.e(TAG, \"Start fingerprintservice error\", e52);\n }\n traceEnd();\n }\n if (hasFeatureFace || hasFeatureIris || hasFeatureFingerprint) {\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n try {\n BackgroundDexOptService.schedule(context);\n } catch (Throwable e53) {\n reportWtf(\"starting StartBackgroundDexOptService\", e53);\n }\n traceEnd();\n if (!isWatch) {\n traceBeginAndSlog(\"StartDynamicCodeLoggingService\");\n try {\n DynamicCodeLoggingService.schedule(context);\n } catch (Throwable e54) {\n reportWtf(\"starting DynamicCodeLoggingService\", e54);\n }\n traceEnd();\n }\n if (!isWatch) {\n traceBeginAndSlog(\"StartPruneInstantAppsJobService\");\n try {\n PruneInstantAppsJobService.schedule(context);\n } catch (Throwable e55) {\n reportWtf(\"StartPruneInstantAppsJobService\", e55);\n }\n traceEnd();\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n traceBeginAndSlog(\"StartLauncherAppsService\");\n this.mSystemServiceManager.startService(LauncherAppsService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n traceBeginAndSlog(\"StartCrossProfileAppsService\");\n this.mSystemServiceManager.startService(CrossProfileAppsService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n } else {\n ipSecService = null;\n iNetworkPolicyManager = null;\n iConnectivityManager = null;\n location = null;\n iNetworkManagementService = null;\n iNetworkStatsService = null;\n mediaRouter = null;\n countryDetector = null;\n networkTimeUpdater = null;\n }\n if (!isWatch) {\n traceBeginAndSlog(\"StartMediaProjectionManager\");\n this.mSystemServiceManager.startService(MediaProjectionManagerService.class);\n traceEnd();\n }\n if (!disableSlices) {\n traceBeginAndSlog(\"StartSliceManagerService\");\n this.mSystemServiceManager.startService(SLICE_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (!disableCameraService) {\n traceBeginAndSlog(\"StartCameraServiceProxy\");\n this.mSystemServiceManager.startService(CameraServiceProxy.class);\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n traceBeginAndSlog(\"StartIoTSystemService\");\n this.mSystemServiceManager.startService(IOT_SERVICE_CLASS);\n traceEnd();\n }\n if (hasSystemServerFeature(\"helper\")) {\n traceBeginAndSlog(\"StartStatsCompanionService\");\n this.mSystemServiceManager.startService(StatsCompanionService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartIncidentCompanionService\");\n this.mSystemServiceManager.startService(IncidentCompanionService.class);\n traceEnd();\n if (safeMode) {\n this.mActivityManagerService.enterSafeMode();\n }\n }\n if (hasSystemServerFeature(\"mms\")) {\n traceBeginAndSlog(\"StartMmsService\");\n traceEnd();\n mmsService = (MmsServiceBroker) this.mSystemServiceManager.startService(MmsServiceBroker.class);\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n traceBeginAndSlog(\"StartAutoFillService\");\n this.mSystemServiceManager.startService(AUTO_FILL_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n try {\n traceBeginAndSlog(\"StartBastetService\");\n this.mSystemServiceManager.startService(\"com.android.server.HwBastetService\");\n traceEnd();\n } catch (Throwable th33) {\n Slog.w(TAG, \"HwBastetService not exists.\");\n }\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n traceBeginAndSlog(\"startSysSvcCallRecordService\");\n startSysSvcCallRecordService();\n traceEnd();\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n try {\n vibrator.systemReady();\n } catch (Throwable e56) {\n reportWtf(\"making Vibrator Service ready\", e56);\n }\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n try {\n lockSettings.systemReady();\n } catch (Throwable e57) {\n reportWtf(\"making Lock Settings Service ready\", e57);\n }\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n try {\n wm.systemReady();\n } catch (Throwable e58) {\n reportWtf(\"making Window Manager Service ready\", e58);\n }\n traceEnd();\n if (safeMode) {\n this.mActivityManagerService.showSafeModeOverlay();\n }\n Configuration config222222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222222222222, metrics222222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n systemTheme.rebase();\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n try {\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n } catch (Throwable e59) {\n reportWtf(\"making Power Manager Service ready\", e59);\n }\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n try {\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n } catch (Throwable e60) {\n reportWtf(\"making PG Manager Service ready\", e60);\n }\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n try {\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n } catch (Throwable e61) {\n reportWtf(\"making Display Manager Service ready\", e61);\n }\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n for (String className2 : classes222222222222222222222222222222222) {\n traceBeginAndSlog(\"StartDeviceSpecificServices \" + className2);\n try {\n this.mSystemServiceManager.startService(className2);\n } catch (Throwable e62) {\n reportWtf(\"starting \" + className2, e62);\n }\n traceEnd();\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }", "@Override\n public void doPost(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] POST request \" + request.getRequestURI());\n\n response.setContentType(FrontEndServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n String requestBody = parseRequest(request);\n JsonObject body = (JsonObject) parseJson(requestBody);\n String[] arguments = request.getRequestURI().replace(\"/events/\", \"\").split(\"/\");\n int tickets = body.get(\"tickets\").getAsInt();\n\n String url = FrontEndServiceDriver.primaryEventService + \"/\" + arguments[1] + \"/\" + arguments[0];\n String uuid = UUID.randomUUID().toString();\n JsonObject newRequestBody = getNewRequestBody(arguments, tickets, uuid);\n\n int failure = 0;\n while (failure < 3) {\n try {\n HttpURLConnection connection = doPostRequest(url, newRequestBody);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n response.setStatus(HttpURLConnection.HTTP_OK);\n System.out.println(\"[Servlet] request with uuid: \" + uuid + \" has been completed\");\n }\n else {\n System.out.println(\"[Servlet] request with uuid: \" + uuid + \" failed\");\n }\n\n break; // exit loop after completing the request without broken connection\n }\n catch (IOException ignored) {\n failure++;\n blockAndRetry(uuid, failure);\n }\n }\n }\n catch (Exception ignored) {\n // other failures like JsonParseException\n }\n }", "public interface TaggedService {\n @GET(\"/v2/tagged\")\n Call<BaseBean<List<PostsItem>>> getTaggedPosts(@Query(\"tag\") String tag,\n @Query(\"filter\") String filter,\n @Query(\"before\") long timestamp,\n @Query(\"limit\") int limit);\n\n}", "private void requestBucks() {\n\n\t}", "public interface HueService {\n @PUT(\"/api/{auth}/lights/{id}/state\")\n Call<List<HueResponse>> putDevice(@Path(\"auth\") String auth,\n @Path(\"id\") String id,\n @Body HueCi body);\n @GET(\"/api/nupnp\")\n Call<List<Hub>> getInternalAddress();\n @POST(\"/api\")\n Call<List<ConnectionRes>> getHueUserName(@Body ConnectionReq devicetype);\n @GET(\"/api/{username}/lights\")\n Call<HashMap<String,Object>> getLights(@Path(\"username\") String username);\n @PUT(\"/api/{username}/lights/{ID}/state\")\n Call<List<ConnectionRes>> changeBulbState(@Path(\"username\") String username,\n @Path(\"ID\") String ID,\n @Body ConnectionReq onOffState);\n public class HueCi {\n public boolean on;\n\n public HueCi(boolean on) {\n this.on = on;\n }\n }\n\n public class HueResponse {\n public Map<String, Boolean> success;\n }\n}" ]
[ "0.60733265", "0.5952743", "0.59443265", "0.57740456", "0.57443905", "0.57220536", "0.5709338", "0.5699279", "0.56941664", "0.56574297", "0.56480896", "0.5646378", "0.560463", "0.5601865", "0.5573456", "0.5543115", "0.55224895", "0.55185544", "0.55134875", "0.55098546", "0.55088484", "0.5507439", "0.55000895", "0.54812926", "0.547761", "0.5475315", "0.5469522", "0.54460865", "0.5441146", "0.54349023", "0.54248714", "0.54245347", "0.54168373", "0.5416754", "0.5415661", "0.53972536", "0.5394826", "0.5379593", "0.5377651", "0.53722453", "0.5370076", "0.5368286", "0.53617", "0.5359022", "0.5356858", "0.53491944", "0.53459907", "0.53370327", "0.5334325", "0.53246266", "0.5322722", "0.5317648", "0.53171134", "0.5316526", "0.53064966", "0.53043854", "0.5300814", "0.52918863", "0.5288231", "0.52879053", "0.5285513", "0.52778375", "0.5274767", "0.52731997", "0.5271617", "0.52706516", "0.5256364", "0.5255918", "0.52537084", "0.5253471", "0.5252518", "0.5239798", "0.5236156", "0.5227472", "0.52206033", "0.52086294", "0.519599", "0.5195494", "0.5194411", "0.51866347", "0.51813924", "0.5177959", "0.5176295", "0.51760787", "0.517471", "0.5174364", "0.51710296", "0.5169041", "0.51605105", "0.5160043", "0.51539296", "0.5153404", "0.5151469", "0.51489", "0.5146781", "0.51422524", "0.5138529", "0.51380104", "0.5136932", "0.51357424", "0.5134747" ]
0.0
-1
We geven het resultaat van de laatste geevalueerde node terug, dus we moeten ook het type van deze node terug geven.
@Override public Type getType() { return nodeList.get(nodeList.size() - 1).getType(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getNodeValue ();", "public abstract int getNodeType();", "private static Object getValue(Object tree,Map context,Object root,Class resultType) throws OgnlException{\n Object result;\n OgnlContext ognlContext = (OgnlContext) addDefaultContext(root, context);\n\n Node node = (Node) tree;\n\n if (node.getAccessor() != null){\n result = node.getAccessor().get(ognlContext, root);\n }else{\n result = node.getValue(ognlContext, root);\n }\n\n if (resultType != null){\n result = getTypeConverter(context).convertValue(context, root, null, null, result, resultType);\n }\n return result;\n }", "public String getNodeValue(Node node) throws Exception;", "@Override\r\n\t\tpublic short getNodeType()\r\n\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t}", "NodeType getType();", "public abstract AbstractNodeType getType();", "@Override\r\n public Object getValueFromNode(Node node_p) throws Exception\r\n {\n return null;\r\n }", "public Node<T> darTope();", "public short getNodeType();", "@Override\r\n public Node getNodeFromValue(Object value_p, Document doc_p) throws Exception\r\n {\n return null;\r\n }", "public BiType getType() {\n return BiType.NODE;\n }", "public AbstractNode getValue()\n\t\t{\n\t\t\treturn value;\n\t\t}", "@Override\n\tpublic void outACastExpr(ACastExpr node) {\n\t\tType t = nodeTypes.get(node.getExpr());\n\t\tboxIt(t); \n\t\tType result = nodeTypes.get(node.getType()); \n\t\til.append(fi.createCast(getBecelType(t), getBecelType(result)));\n\t\tunboxIt(result); \t\n\t}", "@Override\n\tpublic int getNodeType() {\n\t\treturn nodeType;\n\t}", "public RegressionTreeNode traverseNode(Serializable value){\n\t\tif(value instanceof Number && this.value instanceof Number){\n\t\t\tDouble number = ((Number) value).doubleValue();\n\t\t\treturn this.traverseNumericalNode(number);\n\t\t}else{\n\t\t\treturn this.traverseNominalNode(value);\n\t\t}\n\t}", "uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode.NodeType getType();", "public String printNodeData(Node<T> node){\n return String.valueOf(node.data);\n }", "@Override\n public String toString() {\n return (this.originalValue == null ? this.getValue() : this.originalValue) + (this.nodeType.getName() == null\n ? \"\" : (\":\" + this.nodeType.getName()));\n }", "@Override\n public TypeNode evaluate() {\n return this.hijo.evaluate().toBoolNode();\n }", "private RegressionTreeNode traverseNominalNode(Serializable value) {\n\t\tif(value.equals(this.value)){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}", "public abstract Object \t\tgetNodeValue(int nodeIndex,int nodeColumn);", "public ASTType getTypeNode() {\n return (ASTType) getChild(0);\n }", "public void testNodeConversion() throws Exception {\n StringMetadataDefinition string = new StringMetadataDefinition(\"string\", \"myValue\");\n TreeNodeMetadataDefinition tree = new TreeNodeMetadataDefinition(\"tree\");\n tree.addChild(string);\n List<AbstractMetadataDefinition> list = new LinkedList<AbstractMetadataDefinition>();\n list.add(tree);\n PluginImpl.getInstance().setDefinitions(list);\n FreeStyleProject freeStyleProject = createFreeStyleProject();\n configRoundtrip(freeStyleProject);\n MetadataJobProperty property = freeStyleProject.getProperty(MetadataJobProperty.class);\n assertNotNull(\"No MetadataJobProperty\", property);\n StringMetadataValue stringMetadataValue =\n (StringMetadataValue)TreeStructureUtil.getLeaf(property, \"tree\", \"string\");\n assertNotNull(stringMetadataValue);\n assertEquals(\"myValue\", stringMetadataValue.getValue());\n }", "public static Object getValue(Node tree, Map context, Object root, Class resultType)\n throws OgnlException {\n Object result;\n OgnlContext ognlContext = (OgnlContext) addDefaultContext(root, context);\n\n Node node = (Node) tree;\n\n if (node.getAccessor() != null)\n result = node.getAccessor().get(ognlContext, root);\n else\n result = node.getValue(ognlContext, root);\n\n if (resultType != null) {\n result = getTypeConverter(context).convertValue(context, root, null, null, result, resultType);\n }\n return result;\n }", "public NodeType getNodeType();", "public E value()\r\n\t// post: returns value associated with this node\r\n\t{\r\n\t\treturn val;\r\n\t}", "Class<?> getNodeType() {\n return nodeType;\n }", "short getNodeType(Object node);", "@Override\n\tpublic void VisitInstanceOfNode(BunInstanceOfNode Node) {\n\n\t}", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value xgetValue();", "public NodeType getType() {\n return type;\n }", "public static Object getValue(Node tree, Object root, Class resultType)\n throws OgnlException {\n return getValue(tree, createDefaultContext(root), root, resultType);\n }", "public abstract T queryRootNode();", "public SqlNode asNode() {\n return node;\n }", "public Object visitBinaryExpr(GoIRBinaryExprNode node){\n\t\tString l = node.getType();\n\t\tif(l!= null) {//already discovered type of children\n\t\t\treturn l;\n\t\t}\n\t\tl = (String) node.getLeft().accept(this);\n\t\tString r = (String) node.getRight().accept(this);\n\t\tGoException error = Compare(l,r,\"visitbinary\");\n\t\tif(error != null) {\n\t\t\tthrow error;\n\t\t}\n\t\tnode.setType(l);//so it doesnt have to repeatedly check\n\t\t// like 3+3+3+3+3... would make a big tree and we dont need to repeatedly check\n\t\treturn l;\n\t}", "protected Object handleNode(CantoNode node, Object data) {\n //if (!node.isPrimitive()) {\n data = ((AbstractNode) node).childrenAccept(this, data);\n //}\n return data;\n }", "@Override\r\n public String toString(){\r\n return Integer.toString(node);\r\n }", "public Object getValue(JmmNode node) {\n Object left = (node.getNumChildren() > 0) ? getValue(node.getChildren().get(0)) : null;\n Object right = (node.getNumChildren() > 1) ? getValue(node.getChildren().get(1)) : null;\n\n switch (node.getKind()) {\n case \"Add\":\n return ((left == null) || (right == null)) ? null : (Integer) left + (Integer) right;\n case \"Sub\":\n return ((left == null) || (right == null)) ? null : (Integer) left - (Integer) right;\n case \"Mul\":\n return ((left == null) || (right == null)) ? null : (Integer) left * (Integer) right;\n case \"Div\":\n return ((left == null) || (right == null)) ? null : (Integer) left / (Integer) right;\n case \"LessThan\":\n return ((left == null) || (right == null)) ? null : (Integer) left < (Integer) right;\n case \"And\":\n return ((left == null) || (right == null)) ? null : (Boolean) left && (Boolean) right;\n case \"Not\":\n return (left == null) ? null : !(Boolean) left;\n case \"Int\":\n return Integer.parseInt(node.get(\"value\"));\n case \"False\":\n return false;\n case \"True\":\n return true;\n case \"Var\":\n return getVariableValue(getVariableSymbol(node.get(\"name\")));\n default:\n return null;\n }\n }", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllEncodedBy_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ENCODEDBY, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "@Override\n\tpublic java.lang.String getNode_1() {\n\t\treturn _dictData.getNode_1();\n\t}", "Object visitValue(ValueNode node, Object state);", "Node getNode();", "private static String setAttributesForStoring( Value value, Node node )\n\t{\n\t\tNamedNodeMap map = node.getAttributes();\n\t\tString type = \"\";\n\t\tif ( map != null ) {\n\t\t\tNode attr;\n\t\t\tfor( int i = 0; i < map.getLength(); i++ ) {\n\t\t\t\tattr = map.item( i );\n\t\t\t\tif ( !attr.getNodeName().equals( JOLIE_TYPE_ATTRIBUTE ) ) { // do not consider attribute type\n\t\t\t\t\tgetAttribute( value, (attr.getLocalName() == null) ? attr.getNodeName() : attr.getLocalName() ).setValue( attr.getNodeValue() );\n\t\t\t\t} else {\n\t\t\t\t\ttype = attr.getNodeValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn type;\n\t}", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllContentType_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), CONTENTTYPE, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "public int getNodeType() {\n return mNodeType;\n }", "public String toString(){\n return \"Node: \" + data;\n }", "public Name getNodeTypeName() {\n return nodeTypeName;\n }", "@Override\n protected final int compareNodeFields(Node o) {\n TypedNodeWithUuids other = (TypedNodeWithUuids) o;\n if (!typeConceptUuid.equals(other.typeConceptUuid)) {\n return typeConceptUuid.compareTo(other.typeConceptUuid);\n }\n return compareTypedNodeFields(o);\n }", "public String treeType();", "public GraphElementType getElementType();", "Object get(Node node);", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllTime_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), TIME, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "@Override\n\tpublic java.lang.String getNode_2() {\n\t\treturn _dictData.getNode_2();\n\t}", "public E getData() {\r\n\t\t//System.out.println(headNode.link.data);\r\n\t\tif(headNode.link.data != null) {\r\n\t\t\treturn headNode.link.data;\r\n\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllFileType_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), FILETYPE, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "public abstract Node getNode();", "private void printNode() {\n System.out.println(\"value:\" + value + \" next:\" + nextNode);\n }", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllInterpretedBy_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), INTERPRETEDBY, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "@Override\n public String toString() {\n return \"Node [id=\" + id + \", data=\" + data + \", red=\" + red + \"]\";\n }", "private Type set_value_type(Node n, long xx ) {\n Type[] alltypes = Type.ALL_TYPES();\n _gvn.setype(_ins[0], alltypes[xx(xx,0)]);\n _gvn.setype(_ins[1],((ConNode)_ins[1])._t = alltypes[xx(xx,1)]);\n _gvn.setype(_ins[2],((ConNode)_ins[2])._t = alltypes[xx(xx,2)]);\n _gvn.setype(_ins[3],((ConNode)_ins[3])._t = alltypes[xx(xx,3)]);\n Type vt = n.value(_gvn);\n Type old = _values.put(xx,vt);\n assert old==null;\n return vt;\n }", "private Class<?> getType(final Object metadata, final ValueNode node) throws ParseException {\n if (node.type != null) {\n return readType(node);\n }\n Class type;\n if (metadata instanceof ReferenceSystemMetadata || metadata instanceof Period || metadata instanceof AbstractTimePosition || metadata instanceof Instant) {\n final Method getter = ReflectionUtilities.getGetterFromName(node.name, metadata.getClass());\n return getter.getReturnType();\n } else {\n type = standard.asTypeMap(metadata.getClass(), KeyNamePolicy.UML_IDENTIFIER, TypeValuePolicy.ELEMENT_TYPE).get(node.name);\n }\n final Class<?> special = specialized.get(type);\n if (special != null) {\n return special;\n }\n return type;\n }", "E getValue();", "private static interface Node {\n\t\t/**\n\t\t * Set value to child node identified by given ID.\n\t\t * \n\t\t * @param childID child ID is a field name or array/list index.\n\t\t * @param value node value.\n\t\t * @throws ConverterException if value is primitive and fail to convert to field type.\n\t\t * @throws IllegalAccessException this exception is required by reflective field signature but never thrown.\n\t\t */\n\t\tvoid setValue(String childID, Object value) throws ConverterException, IllegalAccessException;\n\n\t\t/**\n\t\t * Returns child node identified by its ID or null if not found. A child ID is the field name or array/list index.\n\t\t * \n\t\t * @param childID child ID is a field name or array/list index.\n\t\t * @return child node or null.\n\t\t * @throws IllegalAccessException this exception is required by reflective field signature but never thrown.\n\t\t */\n\t\tNode getChild(String childID) throws IllegalAccessException;\n\t}", "private static boolean make_type_x(String query, DataDir dir, \n\t\t\t\t int query_type, Z39session zsession, boolean addOID) {\n\t StringTokenizer st = new StringTokenizer(query);\n\t nodes node[] = new nodes[st.countTokens()];\n\t int rc = 0;\n\t DataDir parm = dir;\n\n//System.out.println(\"make type x: num nodes: \" + node.length);\n\n\t if (node.length==0)\n\t {\n if (zsession != null && zsession.logger != null && \n\t\t zsession.logger.getLevel() != Z39logging.OFF)\n\t\t zsession.logger.println(\"No query provided!\");\n\t\treturn false;\n\t }\n\n \t String q = query.trim();\n\n \t int i=0, j, o, len, nodecnt=0;\n\n try {\n \t for (o=0, len = q.length(); o < len; o=j+1) {\n \t if (q.charAt(o) == '\"') {\n\t\ti = q.indexOf('\"', o+1);\n\t\tif (i == -1)\n\t\t i = o;\n \t }\n\t else\n\t\ti = o;\n\n \t j = q.indexOf(' ', i);\n \t if (j == -1)\n\t j = q.length();\n\n // If length > 0, add new node \n if ( (j-o) > 0 ) {\n node[nodecnt] = new nodes(q.substring(o,j), query_type, zsession);\n\n if (zsession != null && zsession.logger != null && \n\t\t zsession.logger.getLevel() != Z39logging.OFF)\n\t\t zsession.logger.println(\n\t\t \"node[\"+nodecnt+\"].type=\" + nodes.operators[node[nodecnt].type]+\n\t\t \", .term='\"+node[nodecnt].term+\"'\");\n\n \t //System.out.println(\"node[\"+nodecnt+\"].type=\" + nodes.operators[node[nodecnt].type]+\n\t\t //\", .term='\"+node[nodecnt].term+\"'\");\n\n nodecnt++; \n }\n\t }\n }\n catch (Exception e) {\n System.out.println(\"caught exception from nodemaker\");\n e.printStackTrace();\n }\n\n\n//System.out.println(\"link nodes \" + (nodecnt-1));\n\n\n\t rc=nodes.linkNodes(node, nodecnt-1); //node.length-1);\n\t if (rc != -1)\n\t {\n if (zsession != null && zsession.logger != null && \n\t\t zsession.logger.getLevel() != Z39logging.OFF)\n\t\t zsession.logger.println(\n\t\t \"Ill formed query, linkNodes returned \" + rc);\n\t\treturn false;\n\t }\n\n if (zsession != null && zsession.logger != null && \n\t\tzsession.logger.getLevel() != Z39logging.OFF)\n\t\tzsession.logger.println(\"building type-\"+query_type+\" query\");\n\n if (addOID) {\n \t parm = dir.add(query_type, ASN1.CONTEXT);\n\t parm.addOID(ASN1.OBJECTIDENTIFIER, ASN1.UNIVERSAL, \n\t\t\"1.2.840.10003.3.1\");\n }\n\t node[nodecnt-1].buildQuery(parm);\n\n\t return true;\n\t}", "public String getTextValue (Node node);", "@Override\n\t\tpublic void outALtExpr(ALtExpr node) {\n\t\t\ttypes2.put(node, BOOL);\n\t\t}", "org.apache.calcite.avatica.proto.Common.TypedValue getValue();", "@Override\n\t\tpublic void outANoExpr(ANoExpr node) {\n\t\t\ttypes2.put(node, BOOL);\n\t\t}", "public int getNode() {\r\n\t\t\treturn data;\r\n\t\t}", "public Node raiz(){\r\n\treturn this.raiz;\r\n}", "private boolean compatibleNodeTypes(AxiomTreeNode t1, AxiomTreeNode t2) {\n if (!t1.getNodeType().equals(t2.getNodeType())) {\n return false;\n }\n \n switch (t1.getNodeType()) {\n case CARD:\n int label1 = (Integer) t1.getLabel();\n int label2 = (Integer) t2.getLabel();\n return (label1 == label2);\n \t\n case OWLOBJECT:\n OWLObject o1 = (OWLObject) t1.getLabel();\n OWLObject o2 = (OWLObject) t2.getLabel();\n //System.out.println(o1.getClass());\n //System.out.println(o2.getClass());\n //Check for datatypes - then check datatype to see match. Else, return true if compatible.\n if(o1.getClass() == o2.getClass())\n {\n \tif(!o1.getDatatypesInSignature().isEmpty())\n \t{\n \t\t//Need to check if built in first. First check is convenience, datatypes should match\n \t\t//If one is built in, so should other. If neither is built in, this is also a viable match\n \t\t//If not equal and at least one is built in, its not a match.\n \t\tOWLDatatype dt1 = (OWLDatatype) o1.getDatatypesInSignature().toArray()[0];\n \t\t\tOWLDatatype dt2 = (OWLDatatype) o2.getDatatypesInSignature().toArray()[0];\n \t\t\t//System.out.println(\"DT1: \" + dt1);\n \t\t\t//System.out.println(\"DT2: \" + dt2);\n \t\tif(dt1.equals(dt2) && dt1.isBuiltIn())\n \t\t{\t\n \t\t\t//System.out.println(\"Standard state\");\n \t\t\t//System.out.println(o1.equals(o2));\n \t\t\treturn o1.equals(o2);\n \t\t}\n \t\telse if(!dt1.isBuiltIn() && !dt2.isBuiltIn())\n \t\t{\n \t\t\t//System.out.println(\"Unique state\");\n \t\t\treturn true;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t//System.out.println(\"Rejection state\");\n \t\t\treturn false;\n \t\t}\n \n \t}\n \telse\n \t{\n \t\treturn true;\n \t}\n }\n else\n {\n \treturn false;\n }\n }\n return false;\n }", "public interface DataNode\r\n{\r\n /** @return type name of this data node */\r\n public String get_type_name();\r\n /** @return the bits of this data node */\r\n public String get_bitsequence_value() ;\r\n \r\n /** @return size of this data in bits*/\r\n public int get_bit_size(); \r\n \r\n /** @return size of this data as an integer (for expresion evaluation\r\n * purpose */\r\n public int get_int_value() throws Exception;\r\n \r\n /** @return the number of bits this type takes */ \r\n public int get_fieldsize();\r\n \r\n /** set the expression for number of bits this type takes*/\r\n public void set_fieldsize(AST fieldsize);\r\n \r\n /** set valid ok nok */\r\n public void set_verify_then_else(AST verify_ast,AST then_ast , AST else_ast) throws Exception;\r\n \r\n /** sets the contaxt for evaluation of expressions for this data node*/\r\n public void set_context(VariableSymbolTable context);\r\n \r\n /** print a human readable form of this node */\r\n public String print();\r\n \r\n /** print with formatting \r\n * 0 = print() [debug formatted]\r\n * 1 = as string [useful to write to a file]\r\n * 2 = debug with strings [similar to 0, but with strings instad of bytes]\r\n * @return Formatted output ready to be printed\r\n */\r\n public String print(int format);\r\n public void set_name(String name);\r\n public String get_name();\r\n \r\n /** returns the maximum size this object can accept (hold) or -1 for infinity */\r\n public int get_max_accept() throws Exception;\r\n public void assign(DataNodeAbstract rhs) throws Exception;\r\n public void populate(BdplFile rhs) throws Exception;\r\n \r\n}", "private static String getType(Node node) {\r\n NodeList children = node.getChildNodes();\r\n for (int j = 0; j < children.getLength(); j++) {\r\n Node type = children.item(j); \r\n if( type.getNodeName().equals(\"type\") ) {\r\n return getAttribute(type, \"xlink:href\");\r\n }\r\n }\r\n \r\n return null; \r\n }", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllOntologies20070510nid3Language_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ONTOLOGIES20070510NID3LANGUAGE, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "protected interface TypeCheckingNode {\n /**\n * Checks whether an object is known to be subtype in the cache.\n *\n * @param isSub - the cache of subtypes\n * @param expected - the expected type\n * @param argument - the object being checked\n * @param type - the type of the argument\n * @param sourceSection - the location in source of the type check\n * @param exception - the node used to throw errors\n * @return The argument if it is a subtype. Null if it wasn't in the cache. Otherwise an\n * error is thrown.\n */\n default <E> E checkTable(final byte[] isSub,\n final SObjectWithClass expected, final E argument, final SType type,\n final SourceSection sourceSection, final ExceptionSignalingNode exception) {\n byte sub = isSub[type.id];\n if (sub == SUBTYPE) {\n return argument;\n } else if (sub == FAIL) {\n reportError(argument, type, expected, sourceSection, exception);\n }\n return null;\n }\n\n /**\n * The method that should call throwTypeError.\n */\n void reportError(Object argument, Object type, Object expected,\n SourceSection sourceSection, ExceptionSignalingNode exception);\n\n /**\n * Checks whether an object is Nil.\n */\n default boolean isNil(final SObjectWithoutFields obj) {\n return obj == Nil.nilObject;\n }\n }", "@Override\n\t\tpublic void outALeExpr(ALeExpr node) {\n\t\t\ttypes2.put(node, BOOL);\n\t\t}", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "entities.Torrent.NodeId getNode();", "entities.Torrent.NodeId getNode();", "@Override\n\tpublic T somme() {\n\t\treturn val;\n\t}", "@AutoEscape\n\tpublic String getNode_1();" ]
[ "0.63625973", "0.61511874", "0.61217713", "0.6042117", "0.6027557", "0.60204107", "0.5811887", "0.5810626", "0.5806643", "0.5799926", "0.5783794", "0.577636", "0.57649463", "0.5737233", "0.57259196", "0.5720548", "0.570785", "0.56579417", "0.56577444", "0.5646137", "0.5631038", "0.5605425", "0.5586826", "0.558159", "0.5573672", "0.5573219", "0.55724543", "0.55590826", "0.55582434", "0.5542562", "0.5519697", "0.55001223", "0.54889905", "0.5474038", "0.54564846", "0.5449042", "0.5439042", "0.543817", "0.54334176", "0.5423552", "0.54099655", "0.5409233", "0.53732044", "0.53731495", "0.5372342", "0.5360988", "0.5360988", "0.5360988", "0.5360988", "0.5360988", "0.5360988", "0.5360988", "0.5360988", "0.5360988", "0.5360988", "0.5360988", "0.5360988", "0.5360988", "0.53592813", "0.5357642", "0.5355867", "0.53263", "0.53245944", "0.53130203", "0.53101575", "0.5300642", "0.5294222", "0.5293052", "0.5286809", "0.52765983", "0.5273717", "0.52730614", "0.52710056", "0.5263512", "0.5262653", "0.52614206", "0.5244696", "0.5239641", "0.5232042", "0.52225375", "0.52222854", "0.5210329", "0.5209951", "0.5209069", "0.5208679", "0.52048635", "0.5203883", "0.52005696", "0.51983005", "0.5195473", "0.5185595", "0.5185595", "0.5185595", "0.5185595", "0.5185595", "0.5185595", "0.51813024", "0.51813024", "0.5177398", "0.51737213" ]
0.54740536
33
Add edges to result matching and reconstruct graph (remove adjacent vertices, and connect stumps as paths can go) Return all available branches
public static ArrayList<State<BaseGenome>> shrink(State<BaseGenome> baseState, ArrayList<Graph.Edge> edges) throws GenomeException { ArrayList<State<BaseGenome>> results = new ArrayList<>(); results.add(baseState); for (Graph.Edge edge : edges) { ArrayList<State<BaseGenome>> newResults = new ArrayList<>(); for (State<BaseGenome> state : results) { newResults.addAll(shrinkWithSavingIndexes(state, edge)); } results = newResults; } for (State<BaseGenome> result : results) { result.data.getNeighbours().applyForceReconstruction(); } return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<Branch> findBranchs()\r\n\t{\t\r\n\t\tList<Branch> localBranchs = new ArrayList<>();\r\n\t\tHashMap<String, Node> destinationNodes = new HashMap<>();\r\n\t\t\r\n\t\t// Percorre todos os arcos da rede\r\n\t\tfor (Edge edge: this.getEdges())\r\n\t\t{\t\r\n\t\t\t// Se ha carga no no destino do arco, este no � uma folha da rede\r\n\t\t\tif (edge != null && edge.getDestinationNode().getLoads().size() > 0) \r\n\t\t\t{\t\r\n\t\t\t\t// Verifica se h� mais de um arco com a mesma carga\r\n\t\t\t\tif (!destinationNodes.containsKey(edge.getDestinationNode().getLabel()))\r\n\t\t\t\t{\t\t\t\t\t\r\n\t\t\t\t\tBranch branch = new Branch(edge.getDestinationNode().getLabel());\r\n\t\t\t\t\tbranch.addEdges(edge);\r\n\t\t\t\t\tEdge newEdge = edge.getReference();\r\n\t\t\t\t\tdestinationNodes.put(edge.getDestinationNode().getLabel(), edge.getDestinationNode());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// percorre os elementos amontantes do no e monta o laco\r\n\t\t\t\t\twhile (newEdge != null) \r\n\t\t\t\t\t{\t\t\r\n\t\t\t\t\t\tbranch.addEdges(newEdge.getReference());\r\n\t\t\t\t\t\tnewEdge = newEdge.getReference();\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tlocalBranchs.add(branch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t\r\n\t\treturn localBranchs; \r\n\t}", "private List<Node> findBranchsMesh()\r\n\t{\t\r\n\t\t// Nos que fecham o laco\r\n\t\tList<Node> nodes = new ArrayList<>();\r\n\t\t\r\n\t\tfor (Entry<String, Integer> value : cacheDestinationNodes.entrySet())\r\n\t\t{\r\n\t\t\t// No possui mais de um arco chegando (ANEL!)\r\n\t\t\tif (value.getValue() > 1)\r\n\t\t\t{\r\n\t\t\t\tString label = value.getKey();\r\n\t\t\t\tNode node = cacheNodes.get(label);\r\n\t\t\t\tnodes.add(node);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// nodes > 1 indica que esta rede possui anel\r\n\t\treturn nodes; \r\n\t}", "public abstract Multigraph buildMatchedGraph();", "@Override\r\n public Set<List<String>> findAllPaths(int sourceId, int targetId, int reachability) {\r\n //all paths found\r\n Set<List<String>> allPaths = new HashSet<List<String>>();\r\n //collects path in one iteration\r\n Set<List<String>> newPathsCollector = new HashSet<List<String>>();\r\n //same as the solution but with inverted edges\r\n Set<List<String>> tmpPathsToTarget = new HashSet<List<String>>();\r\n //final solution\r\n Set<List<String>> pathsToTarget = new HashSet<List<String>>();\r\n \r\n String[] statementTokens = null; \r\n Set<Integer> allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n List<String> statementsFound = new ArrayList<String>();\r\n \r\n for (int i = 0; i < reachability; i++) {\r\n if (i == 0) { \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(sourceId);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n //allProcessedNodes.add(inNodeId); \r\n //Incoming nodes are reversed\r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n allPaths.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(sourceId);\r\n \r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n statementsFound.add(outEdge);\r\n allPaths.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n } else {\r\n newPathsCollector = new HashSet<List<String>>();\r\n\r\n for (List<String> statements: allPaths) {\r\n allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n int lastNodeInPath = 0;\r\n \r\n for (String predicate: statements) {\r\n if (predicate.contains(\">-\")) {\r\n statementTokens = predicate.split(\">-\");\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[0]).reverse().toString()));\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString()));\r\n lastNodeInPath = Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString());\r\n } else {\r\n statementTokens = predicate.split(\"->\"); \r\n allProcessedNodes.add(Integer.parseInt(statementTokens[0]));\r\n allProcessedNodes.add(Integer.parseInt(statementTokens[2]));\r\n lastNodeInPath = Integer.parseInt(statementTokens[2]);\r\n }\r\n }\r\n \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(lastNodeInPath);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n if (allProcessedNodes.contains(inNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n newPathsCollector.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(lastNodeInPath);\r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n if (allProcessedNodes.contains(outNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(outEdge);\r\n newPathsCollector.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n }\r\n allPaths.addAll(newPathsCollector);\r\n }\r\n \r\n //System.out.println(\"*****End of iteration \" + i);\r\n //System.out.println(\"#SIZE OF allPaths: \" + allPaths.size());\r\n int numItems = 0;\r\n for (List<String> currList: allPaths) {\r\n numItems = numItems + currList.size();\r\n }\r\n //System.out.println(\"#NUMBER OF ELEMS OF ALL LISTS: \" + numItems);\r\n //System.out.println(\"#SIZE OF tmpPathsToTarget : \" + tmpPathsToTarget.size());\r\n }\r\n \r\n //We need to reverse back all the predicates\r\n for (List<String> statements: tmpPathsToTarget) { \r\n List<String> fixedStatements = new ArrayList<String>(); \r\n for (int i = 0; i < statements.size(); i++) { \r\n String statement = statements.get(i); \r\n if (statement.contains(\">-\")) {\r\n fixedStatements.add(new StringBuilder(statement).reverse().toString());\r\n } else {\r\n fixedStatements.add(statement);\r\n } \r\n }\r\n pathsToTarget.add(fixedStatements);\r\n }\r\n return pathsToTarget;\r\n }", "private Set<Edge> reachableDAG(Vertex start, Vertex obstacle) {\n \tHashSet<Edge> result = new HashSet<Edge>();\n \tVector<Vertex> currentVertexes = new Vector<Vertex>();\n \tint lastResultNumber = 0;\n \tcurrentVertexes.add(start);\n \t\n \tdo {\n \t\t//System.out.println(\"size of currentVertexes:\" + currentVertexes.size());\n \t\t\n \t\tVector<Vertex> newVertexes = new Vector<Vertex>();\n \t\tlastResultNumber = result.size();\n \t\t\n \t\tfor (Vertex v : currentVertexes) {\n \t\t\t//System.out.println(\"layerID:\" + v.layerID + \"\\tlabel:\" + v.label);\n \t\t\taddIncomingEdges(v, obstacle, result, newVertexes);\n \t\t\taddOutgoingEdges(v, obstacle, result, newVertexes);\n \t\t}\n \t\t\n \t\t//System.out.println(\"size of newVertexes:\" + newVertexes.size());\n \t\t\n \t\tcurrentVertexes = newVertexes;\t\n \t\t//System.out.println(\"lastResultNumber:\" + lastResultNumber);\n \t\t//System.out.println(\"result.size():\" + result.size());\n \t} while (lastResultNumber != result.size());\n \t\n\t\treturn result;\n }", "private void BFS() {\n\n int fruitIndex = vertices.size()-1;\n Queue<GraphNode> bfsQueue = new LinkedList<>();\n bfsQueue.add(vertices.get(0));\n while (!bfsQueue.isEmpty()) {\n GraphNode pollNode = bfsQueue.poll();\n pollNode.setSeen(true);\n for (GraphNode node : vertices) {\n if (node.isSeen()) {\n continue;\n } else if (node.getID() == pollNode.getID()) {\n continue;\n } else if (!los.isIntersects(pollNode.getPoint(), node.getPoint())) {\n pollNode.getNeigbours().add(node);\n if (node.getID() != fruitIndex) {\n bfsQueue.add(node);\n node.setSeen(true);\n }\n }\n }\n }\n }", "private List<List<Edge>> walker(String sourceNode, String destNode, List<Edge> currentPath, List<List<Edge>> paths) {\n if (currentPath == null) {\n currentPath = new ArrayList<>();\n }\n if (paths == null) {\n paths = new ArrayList<>();\n }\n\n if (sourceNode.equals(destNode)) {\n return paths;\n }\n\n\n// List<Edge> edges = findByNodeA(sourceNode);\n List<Edge> edges = allEdges.stream().filter(edge -> edge.nodeA.equals(sourceNode)).collect(Collectors.toList());\n\n\n for (Edge edge : edges) {\n if (!currentPath.contains(edge)&&!containsBidirectionalRef(currentPath,edge)) {\n List<Edge> forkPath = (List<Edge>) ((ArrayList<Edge>) currentPath).clone();\n\n forkPath.add(edge);\n\n if (edge.getNodeB().equals(destNode)) {\n paths.add(forkPath);\n } else {\n walker(edge.getNodeB(), destNode,forkPath,paths);\n }\n }\n }\n\n return paths;\n }", "@Override\n\tpublic void run() {\n\t\tMap<Integer, Integer> roots = new TreeMap<Integer, Integer>();\n\t\t\n\t\tEdge[] edges = new Edge[this.edges.length];\n\t\tint n, weight, relevantEdges, root, lowerBound = 0;\n\t\n\t\t// Sort edges by weight.\n\t\tquickSort(0, this.edges.length - 1);\n\t\n\t\t// Compute initial lower bound (best k - 1 edges).\n\t\t// Choosing the cheapest k - 1 edges is not very intelligent. There is no guarantee\n\t\t// that this subset of edges even induces a subgraph over the initial graph.\n\t\t// TODO: Find a better initial lower bound.\n\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\tlowerBound += this.edges[i].weight;\n\t\t}\n\t\n\t\t// Iterate over all nodes in the graph and run Prim's algorithm\n\t\t// until k - 1 edges are fixed.\n\t\t// As all induced subgraphs have k nodes and are connected according to Prim, they\n\t\t// are candidate solutions and thus submitted.\n\t\tfor (root = 0; root < taken.length; root++) {\n\t\t\ttaken = new boolean[taken.length];\n\t\t\tSystem.arraycopy(this.edges, 0, edges, 0, this.edges.length);\n\n\t\t\ttaken[root] = true;\n\t\t\tn = 0;\n\t\t\tweight = 0;\n\t\t\trelevantEdges = this.edges.length;\n\n\t\t\twhile (n < solution.length) { \n\t\t\t\tfor (int i = 0; i < relevantEdges; i++) {\n\t\t\t\t\t// XOR to check if connected and no circle.\n\t\t\t\t\tif (taken[edges[i].node1] ^ taken[edges[i].node2]) {\n\t\t\t\t\t\ttaken[taken[edges[i].node1] ? edges[i].node2 : edges[i].node1] = true;\n\t\t\t\t\t\tsolution[n++] = edges[i];\n\t\t\t\t\t\tweight += edges[i].weight;\n\t\t\t\t\t\tSystem.arraycopy(edges, i + 1, edges, i, --relevantEdges - i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Check for circle.\n\t\t\t\t\telse if (taken[edges[i].node1]) {\n\t\t\t\t\t\tSystem.arraycopy(edges, i + 1, edges, i, --relevantEdges - i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sum up what we've just collected and submit this\n\t\t\t// solution to the framework.\n\t\t\tHashSet<Edge> set = new HashSet<Edge>(solution.length);\n\t\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\t\tset.add(solution[i]);\n\t\t\t}\n\t\t\tsetSolution(weight, set);\n\t\t\troots.put(weight, root);\n\t\t}\n\n\t\t// Now for the real business, let's do some Branch-and-Bound. Roots of \"k Prim Spanning Trees\"\n\t\t// are enumerated by weight to increase our chances to obtain the kMST earlier.\n\t\tfor (int item : roots.values()) {\n\t\t\ttaken = new boolean[taken.length];\n\t\t\tSystem.arraycopy(this.edges, 0, edges, 0, this.edges.length);\n\t\t\ttaken[item] = true;\n\t\t\tbranchAndBound(edges, solution.length, 0, lowerBound);\n\t\t}\n\t}", "private void matchOnlyCurrentGraphState(TaskMonitor monitor) {\r\n\t\t// make a new list of the matched nodes, to avoid concurrent\r\n\t\t// modification problems\r\n\t\tList matchedNodes = getMatchedNodesOrdered();\r\n\r\n\t\tint total = matchedNodes.size();\r\n\t\tint count = 0;\r\n\r\n\t\tfor (Iterator nodeIt = matchedNodes.iterator(); nodeIt.hasNext();) {\r\n\t\t\tcount++;\r\n\t\t\tmonitor.report(count, total, \"Paths tested\");\r\n\t\t\tif (monitor.isCancelRequested())\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tRoadNode subNode = (RoadNode) nodeIt.next();\r\n\t\t\tif (subNode.isMatched()) {\r\n\t\t\t\tRoadNode matchNode = subNode.getMatch();\r\n\t\t\t\tNodeMatching matching = subNode.getMatching();\r\n\t\t\t\tmatchPathsFromNodes(matching);\r\n\t\t\t}\r\n\t\t}\r\n\t\tDebugFeature.saveFeatures(MATCH,\r\n\t\t\t\t\"Y:\\\\jcs\\\\testUnit\\\\roads\\\\pathMatches.jml\");\r\n\t\tDebugFeature.saveFeatures(SPLIT,\r\n\t\t\t\t\"Y:\\\\jcs\\\\testUnit\\\\roads\\\\pathSplits.jml\");\r\n\t\tDebug.println(\"paths matched = \" + pathMatchCount);\r\n\t\tDebug.println(\"splits matched = \" + splitMatchCount);\r\n\t}", "public static ArrayList<String> connectors2(Graph g) {\n boolean[] visits = new boolean[g.members.length]; \n for (int i=0;i<=g.members.length-1;i++) {\n \tvisits[i]=false;\n }\n int[] dfsnum = new int[g.members.length];\n int[] back = new int[g.members.length];\n ArrayList<String> answer = new ArrayList<String>();\n\n //driver portion\n for (Person person : g.members) {\n //if it hasn't been visited\n if (visits[g.map.get(person.name)]==false){\n //for different islands\n dfsnum = new int[g.members.length];\n dfs(g.map.get(person.name), g.map.get(person.name), g, visits, dfsnum, back, answer);\n }\n }\n \n //check if vertex has one neighbor\n for (int i = 0; i < answer.size(); i++) {\n Friend ptr = g.members[g.map.get(answer.get(i))].first;\n //counts number of neighbors\n int count = 0;\n while (ptr != null) {\n ptr = ptr.next;\n count++;\n }\n if (count == 1) answer.remove(i);\n if (count == 0) answer.remove(i);\n } \n for (Person member : g.members) {\n if (member.first!=null&& member.first.next == null) {\n if (answer.contains(g.members[member.first.fnum].name)==false)\n \t\t answer.add(g.members[member.first.fnum].name);\n }\n }\n answer=modify(answer,g);\n if (answer==null||answer.size()==0) return null;\n return answer;\n }", "public static void main(String[] args) {\n Graph graph = new Graph();\n graph.addEdge(0, 1);\n graph.addEdge(0, 4);\n\n graph.addEdge(1,0);\n graph.addEdge(1,5);\n graph.addEdge(1,2);\n graph.addEdge(2,1);\n graph.addEdge(2,6);\n graph.addEdge(2,3);\n\n graph.addEdge(3,2);\n graph.addEdge(3,7);\n\n graph.addEdge(7,3);\n graph.addEdge(7,6);\n graph.addEdge(7,11);\n\n graph.addEdge(5,1);\n graph.addEdge(5,9);\n graph.addEdge(5,6);\n graph.addEdge(5,4);\n\n graph.addEdge(9,8);\n graph.addEdge(9,5);\n graph.addEdge(9,13);\n graph.addEdge(9,10);\n\n graph.addEdge(13,17);\n graph.addEdge(13,14);\n graph.addEdge(13,9);\n graph.addEdge(13,12);\n\n graph.addEdge(4,0);\n graph.addEdge(4,5);\n graph.addEdge(4,8);\n graph.addEdge(8,4);\n graph.addEdge(8,12);\n graph.addEdge(8,9);\n graph.addEdge(12,8);\n graph.addEdge(12,16);\n graph.addEdge(12,13);\n graph.addEdge(16,12);\n graph.addEdge(16,17);\n graph.addEdge(17,13);\n graph.addEdge(17,16);\n graph.addEdge(17,18);\n\n graph.addEdge(18,17);\n graph.addEdge(18,14);\n graph.addEdge(18,19);\n\n graph.addEdge(19,18);\n graph.addEdge(19,15);\n LinkedList<Integer> visited = new LinkedList();\n List<ArrayList<Integer>> paths = new ArrayList<ArrayList<Integer>>();\n int currentNode = START;\n visited.add(START);\n new searchEasy().findAllPaths(graph, visited, paths, currentNode);\n for(ArrayList<Integer> path : paths){\n for (Integer node : path) {\n System.out.print(node);\n System.out.print(\" \");\n }\n System.out.println();\n }\n }", "public int[] shortestAlternatingPaths(int n, int[][] red_edges, int[][] blue_edges) {\n int[] result = new int[n];\n if (n == 1) {\n result[0] = 0;\n return result;\n }\n Arrays.fill(result, -1); // initialize result array\n // build graph for future access\n boolean[][] redEdgesMatrix = new boolean[n][n];\n for (int i = 0; i < red_edges.length; i++) {\n redEdgesMatrix[red_edges[i][0]][red_edges[i][1]] = true;\n }\n boolean[][] blueEdgesMatrix = new boolean[n][n];\n for (int i = 0; i < blue_edges.length; i++) {\n blueEdgesMatrix[blue_edges[i][0]][blue_edges[i][1]] = true;\n }\n // run bfs\n Deque<Node> queue = new LinkedList<>();\n // enqueue entry point (the node 0 is special, it supports both R and B)\n queue.offer(new Node(0, \"RB\"));\n // set initial result\n result[0] = 0;\n // initialize level\n int level = 1;\n while(!queue.isEmpty()) {\n int nodeAtCurrentLevel = queue.size();\n for (int i = 0; i < nodeAtCurrentLevel; i++) {\n Node node = queue.poll();\n // visit node\n int from = node.value;\n String currentColor = node.color;\n for (int to = 0; to < n; to++) { // all entry points need to enqueue, including itself or some nodes that are already visited\n if ((currentColor.equals(\"R\") || currentColor.equals(\"RB\")) && blueEdgesMatrix[from][to]) {\n // update matrix\n blueEdgesMatrix[from][to] = false;\n // set result\n if (result[to] == -1) {\n result[to] = level;\n } else {\n result[to] = Math.min(result[to], level); \n }\n // enqueue\n queue.offer(new Node(to, \"B\"));\n }\n if ((currentColor.equals(\"B\") || currentColor.equals(\"RB\")) && redEdgesMatrix[from][to]) {\n // update matrix\n redEdgesMatrix[from][to] = false;\n // set result\n if (result[to] == -1) {\n result[to] = level;\n } else {\n result[to] = Math.min(result[to], level); \n }\n // enqueue\n queue.offer(new Node(to, \"R\"));\n }\n }\n }\n level++;\n }\n return result;\n }", "public void fillEdges() {\n\t\tfor (int y = 0; y < mapSize; y++) {\n\t\t\tfor (int x = 0; x < mapSize; x++) {\n\t\t\t\tCoordinates coordinates = new Coordinates(x, y);\n\t\t\t\tint vertexSrc = coordinateToVertex(coordinates);\n\n\t\t\t\tif (deletedVertices.contains(vertexSrc)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tDirection[] directions = Direction.values();\n\n\t\t\t\tfor (Direction direction : directions) {\n\t\t\t\t\tCoordinates destCoordinates = new Coordinates(x, y);\n\n\t\t\t\t\tdestCoordinates = destCoordinates.addCoordinates(direction.coordinates());\n\n\t\t\t\t\tif (destCoordinates.areCorrect(mapSize)) {\n\t\t\t\t\t\tint vertexDest = coordinateToVertex(destCoordinates);\n\t\t\t\t\t\tif (!deletedVertices.contains(vertexDest)) {\n\t\t\t\t\t\t\taddEdge(vertexSrc, vertexDest);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "private static BigInteger connectedGraphs(\n final int v, final int e) {\n if (v == 0) {\n return ZERO;\n }\n if (v == 1) {\n // Fast exit #1: single-vertex\n return e == 0 ? ONE : ZERO;\n }\n final int allE = v * (v - 1) >> 1;\n if (e == allE) {\n // Fast exit #2: complete graph (the only result)\n return ONE;\n }\n final int key = v << 16 | e;\n if (CONN_GRAPHS_CACHE.containsKey(key)) {\n return CONN_GRAPHS_CACHE.get(key);\n }\n BigInteger result;\n if (e == v - 1) {\n // Fast exit #3: trees -> apply Cayley's formula\n result = BigInteger.valueOf(v).pow(v - 2);\n } else if (e > allE - (v - 1)) {\n // Fast exit #4: e > edges required to build a (v-1)-vertex\n // complete graph -> will definitely form connected graphs\n // in all cases, so just calculate allGraphs()\n result = allGraphs(v, e);\n } else {\n /*\n * In all other cases, we'll have to remove\n * partially-connected graphs from all graphs.\n *\n * We can define a partially-connected graph as a graph\n * with 2 sub-graphs A and B with no edges between them.\n * In addition, we require one of the sub-graphs (say, A)\n * to hold the following properties:\n * 1. A must be connected: this implies that the number\n * of possible patterns for A could be counted\n * by calling connectedGraphs().\n * 2. A must contain at least one fixed vertex:\n * this property - combined with 1. -\n * implies that A would not be over-counted.\n *\n * Under the definitions above, the number of\n * partially-connected graphs to be removed will be:\n *\n * (Combinations of vertices to be added from B to A) *\n * (number of possible A's, by connectedGraphs()) *\n * (number of possible B's, by allGraphs())\n * added up iteratively through v - 1 vertices\n * (one must be fixed in A) and all possible distributions\n * of the e edges through A and B\n */\n result = allGraphs(v, e);\n for (int vA = 1; vA < v; vA++) {\n // Combinations of vertices to be added from B to A\n final BigInteger aComb = nChooseR(v - 1, vA - 1);\n final int allEA = vA * (vA - 1) >> 1;\n // Maximum number of edges which could be added to A\n final int maxEA = allEA < e ? allEA : e;\n for (int eA = vA - 1; eA < maxEA + 1; eA++) {\n result = result.subtract(aComb\n // Number of possible A's\n .multiply(connectedGraphs(vA, eA))\n // Number of possible B's\n .multiply(allGraphs(v - vA, e - eA)));\n }\n }\n }\n CONN_GRAPHS_CACHE.put(key, result);\n return result;\n }", "List<String> branches();", "public static void main(String[] args) {\n\n BDNode a = new BDNode(\"A\");\n BDNode b = new BDNode(\"B\");\n BDNode c = new BDNode(\"C\");\n BDNode d = new BDNode(\"D\");\n BDNode e = new BDNode(\"E\");\n\n a.link(b);\n a.link(d);\n b.link(a);\n b.link(c);\n b.link(e);\n c.link(b);\n c.link(d);\n d.link(a);\n d.link(c);\n d.link(e);\n e.link(b);\n e.link(d);\n\n BDNode target = e;\n\n/*\n // BFS\n Queue<BDNode> queue = new LinkedList<>();\n queue.offer(a);\n\n while(!queue.isEmpty()) {\n BDNode n = queue.poll();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if(n.equals(target)) {\n System.out.println(\"BFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if(l.isVisited()) continue;\n if (queue.contains(l)) continue;\n queue.offer(l);\n }\n\n // 위랑 같은 표현\n// n.links.stream()\n// .filter(l -> !queue.contains(l))\n// .forEach(queue::offer);\n }\n*/\n\n // DFS\n Stack<BDNode> stack = new Stack<>();\n stack.push(a);\n\n while(!stack.isEmpty()) {\n BDNode n = stack.pop();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if (n.equals(target)) {\n System.out.println(\"DFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if (l.isVisited()) continue;\n if (stack.contains(l)) continue;\n\n stack.push(l);\n }\n }\n\n\n }", "private void buildReachable() {\n // This is a simple search algorithm.\n // It doesn't matter whether it's depth-first or breadth-first.\n this.reachables = new ArrayList<Boolean>();\n for (int n = 0; n < code.size(); n++) {\n this.reachables.add(false);\n }\n\n ArrayDeque<Integer> next = new ArrayDeque<Integer>();\n if (!code.isEmpty()) {\n next.add(0);\n }\n \n while (!next.isEmpty()) {\n int here = next.remove();\n \n if (this.reachables.get(here)) {\n continue;\n }\n this.reachables.set(here, true);\n next.addAll(this.succ(here));\n }\n }", "private List<Set<GraphChange>> findChanges(Map<Collection<Node>, List<PossibleDConnectingPath>> paths) {\n List<Set<GraphChange>> pagChanges = new ArrayList<>();\n\n Set<Map.Entry<Collection<Node>, List<PossibleDConnectingPath>>> entries = paths.entrySet();\n /* Loop through each entry, ie each conditioned set of variables. */\n for (Map.Entry<Collection<Node>, List<PossibleDConnectingPath>> entry : entries) {\n Collection<Node> conditions = entry.getKey();\n List<PossibleDConnectingPath> dConnecting = entry.getValue();\n\n /* loop through each path */\n for (PossibleDConnectingPath possible : dConnecting) {\n List<Node> possPath = possible.getPath();\n /* Created with 2*# of undirectedPaths as appoximation. might have to increase size once */\n Set<GraphChange> pathChanges = new HashSet<>(2 * possPath.size());\n\n /* find those conditions which are not along the path (used in colider) */\n List<Node> outsidePath = new ArrayList<>(conditions.size());\n for (Node condition : conditions) {\n if (!possPath.contains(condition))\n outsidePath.add(condition);\n }\n\n /* Walk through path, node by node */\n for (int i = 0; i < possPath.size() - 1; i++) {\n Node current = possPath.get(i);\n Node next = possPath.get(i + 1);\n GraphChange gc;\n\n /* for each pair of nodes, add the operation to remove their edge */\n gc = new GraphChange();\n gc.addRemove(possible.getPag().getEdge(current, next));\n pathChanges.add(gc);\n\n /* for each triple centered on a node which is an element of the conditioning\n * set, add the operation to orient as a nonColider around that node */\n if (conditions.contains(current) && i > 0) {\n gc = new GraphChange();\n Triple nonColider = new Triple(possPath.get(i - 1), current, next);\n gc.addNonCollider(nonColider);\n pathChanges.add(gc);\n }\n\n /* for each node on the path not in the conditioning set, make a colider. It\n * is necessary though to ensure that there are no undirectedPaths implying that a\n * conditioned variable (even outside the path) is a decendant of a colider */\n if ((!conditions.contains(current)) && i > 0) {\n Triple colider = new Triple(possPath.get(i - 1), current, next);\n\n if (possible.getPag().isUnderlineTriple(possPath.get(i - 1), current, next))\n continue;\n\n Edge edge1 = possible.getPag().getEdge(colider.getX(), colider.getY());\n Edge edge2 = possible.getPag().getEdge(colider.getZ(), colider.getY());\n\n if (edge1.getNode1().equals(colider.getY())) {\n if (edge1.getEndpoint1().equals(Endpoint.TAIL)) {\n continue;\n }\n } else if (edge1.getNode2().equals(colider.getY())) {\n if (edge1.getEndpoint2().equals(Endpoint.TAIL)) {\n continue;\n }\n }\n\n if (edge2.getNode1().equals(colider.getY())) {\n if (edge2.getEndpoint1().equals(Endpoint.TAIL)) {\n continue;\n }\n } else if (edge2.getNode2().equals(colider.getY())) {\n if (edge2.getEndpoint2().equals(Endpoint.TAIL)) {\n continue;\n }\n }\n\n /* Simple case, no conditions outside the path, so just add colider */\n if (outsidePath.size() == 0) {\n gc = new GraphChange();\n gc.addCollider(colider);\n pathChanges.add(gc);\n continue;\n }\n\n /* ensure nondecendency in possible path between getModel and each conditioned\n * variable outside the path */\n for (Node outside : outsidePath) {\n\n /* list of possible decendant undirectedPaths */\n\n List<PossibleDConnectingPath> decendantPaths = new ArrayList<>();\n decendantPaths\n = PossibleDConnectingPath.findDConnectingPaths\n (possible.getPag(), current, outside, new ArrayList<Node>());\n\n if (decendantPaths.isEmpty()) {\n gc = new GraphChange();\n gc.addCollider(colider);\n pathChanges.add(gc);\n continue;\n }\n\n /* loop over each possible path which might indicate decendency */\n for (PossibleDConnectingPath decendantPDCPath : decendantPaths) {\n List<Node> decendantPath = decendantPDCPath.getPath();\n\n /* walk down path checking orientation (path may already\n * imply non-decendency) and creating changes if need be*/\n boolean impliesDecendant = true;\n Set<GraphChange> colideChanges = new HashSet<>();\n for (int j = 0; j < decendantPath.size() - 1; j++) {\n Node from = decendantPath.get(j);\n // chaneges from +1\n Node to = decendantPath.get(j + 1);\n Edge currentEdge = possible.getPag().getEdge(from, to);\n\n if (currentEdge.getEndpoint1().equals(Endpoint.ARROW)) {\n impliesDecendant = false;\n break;\n }\n\n gc = new GraphChange();\n gc.addCollider(colider);\n gc.addRemove(currentEdge);\n colideChanges.add(gc);\n\n gc = new GraphChange();\n gc.addCollider(colider);\n gc.addOrient(to, from);\n colideChanges.add(gc);\n }\n if (impliesDecendant)\n pathChanges.addAll(colideChanges);\n }\n }\n }\n }\n\n pagChanges.add(pathChanges);\n }\n }\n return pagChanges;\n }", "protected void addEdges(IWeightedGraph<GraphNode, WeightedEdge> graph) {\r\n\t\tQueue<GraphNode> nodesToWorkOn = new LinkedList<GraphNode>();\r\n\r\n\t\taddDefaultEdges(graph, nodesToWorkOn);\r\n\r\n\t\t// Check each already connected once node against all other nodes to\r\n\t\t// find a possible match between the combined effects of the path + the\r\n\t\t// worldState and the preconditions of the current node.\r\n\t\twhile (!nodesToWorkOn.isEmpty()) {\r\n\t\t\tGraphNode node = nodesToWorkOn.poll();\r\n\r\n\t\t\t// Select only node to which a path can be created (-> targets!)\r\n\t\t\tif (!node.equals(this.startNode) && !this.endNodes.contains(node)) {\r\n\t\t\t\ttryToConnectNode(graph, node, nodesToWorkOn);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "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 }", "public void makeComplete() {\n\t\t// A complete graph has N(N-1)/2 edges. Create an ArrayList for those\n\t\t// for performance.\n\t\tint n = nodeArray.size();\n\t\tthis.edges = new ArrayList<Edge>(n * (n - 1) / 2);\n\n\t\t// Connect every node to the others\n\t\tfor (int i = 0; i < nodeArray.size(); i++) {\n\t\t\tfor (int k = i + 1; k < nodeArray.size(); k++) {\n\n\t\t\t\tEdge edge = new Edge(nodeArray.get(i), nodeArray.get(k));\n\t\t\t\tedges.add(edge);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }", "private void GreedySearch(){\n\n Queue<Node> expanded = new LinkedList<>();\n ArrayList<Node> fringe = new ArrayList<>();\n ArrayList<Node> fringeTemp = new ArrayList<>();\n\n\n Node current = startNode;\n\n while(expanded.size() < 1000){\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal is reached.\n solutionPath(current);\n expanded.add(current);\n printExpanded(expanded);\n System.exit(0);\n }\n\n\n boolean b = cycleCheck(current,expanded);\n\n if(!b) {\n expanded.add(current);\n }\n\n if(!b){\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\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\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())){\n fringe.add(child_node);\n }\n\n }\n }\n\n if(current.getDigit().last_changed != 1){\n\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())){\n fringe.add(child_node);\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())){\n fringe.add(child_node);\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())){\n fringe.add(child_node);\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())){\n fringe.add(child_node);\n }\n }\n }\n\n }\n\n\n\n for(Node n : fringe){\n heuristicSetter(n);\n\n }\n\n fringeTemp.addAll(fringe);\n //now all the nodes in fringe have the heuristic value.\n //We can get the last added minm\n Node minm;\n if(fringeTemp.size() != 0){\n minm = fringeTemp.get(0);\n }else{\n break;\n }\n for(int i = 1; i<fringeTemp.size(); i++){\n if(fringeTemp.get(i).getHeuristic() <= minm.getHeuristic()){\n minm = fringeTemp.get(i);\n }\n }\n\n //now we have the minm for the next stage.\n current = minm;\n fringeTemp.remove(minm);\n fringe.clear();\n }\n\n //While loop ends\n System.out.println(\"No solution found.\");\n printExpanded(expanded);\n\n\n\n }", "public void BFS() {\n visitedCells = 1;\n\n // Initialize the vertices\n for (int j = 0; j < maze.getGrid().length; j++) {\n for (int k = 0; k < maze.getGrid().length; k++) {\n Cell cell = maze.getGrid()[j][k];\n cell.setColor(\"WHITE\");\n cell.setDistance(0);\n cell.setParent(null);\n }\n }\n\n Cell sourceCell = maze.getGrid()[0][0];\n Cell neighbor = null;\n Cell currentCell;\n int distance = 0;\n\n // Initialize the source node\n sourceCell.setColor(\"GREY\");\n sourceCell.setDistance(0);\n sourceCell.setParent(null);\n\n queue.add(sourceCell);\n\n // Visits each cell until the queue is empty\n while (!queue.isEmpty()) {\n currentCell = queue.remove();\n\n for (int i = 0; i < currentCell.mazeNeighbors.size(); i++) {\n neighbor = currentCell.mazeNeighbors.get(i);\n\n // Stop the search if you reach the final cell\n if (neighbor.x == r - 1 && neighbor.y == r - 1) {\n distance++;\n if (distance == 10)\n distance = 0;\n neighbor.setDistance(distance);\n neighbor.setParent(currentCell);\n neighbor.visited = true;\n visitedCells++;\n break;\n }\n\n // Checks each neighbor and adds it to the queue if its color is white\n if (neighbor.getColor().equalsIgnoreCase(\"WHITE\")) {\n distance++;\n if (distance == 10)\n distance = 0;\n neighbor.setColor(\"GREY\");\n neighbor.setDistance(distance);\n neighbor.setParent(currentCell);\n neighbor.visited = true;\n queue.add(neighbor);\n visitedCells++;\n }\n }\n // Stop the search if you reach the final cell\n if (neighbor.x == r - 1 && neighbor.y == r - 1)\n break;\n\n currentCell.setColor(\"BLACK\");\n }\n }", "private void reachable() {\r\n\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\t\tbfs(v);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static void bridge()\n {\n // Mark all the vertices as not visited\n boolean visited[] = new boolean[V];\n int disc[] = new int[V];\n int low[] = new int[V];\n int parent[] = new int[V];\n \n \n // Initialize parent and visited, and ap(articulation point)\n // arrays\n for (int i = 0; i < V; i++)\n {\n parent[i] = NIL;\n }\n \n // Call the recursive helper function to find Bridges\n // in DFS tree rooted with vertex 'i'\n for (int i = 0; i < V; i++)\n if (!visited[i])\n bridgeUtil(i, visited, disc, low, parent);\n }", "HashMap<GamePiece, GamePiece> bfs(GamePiece from) {\n ArrayDeque<GamePiece> worklist = new ArrayDeque<GamePiece>();\n ArrayList<GamePiece> seen = new ArrayList<GamePiece>();\n HashMap<GamePiece, GamePiece> graph = new HashMap<GamePiece, GamePiece>();\n worklist.addFirst(from);\n graph.put(from, from);\n while (worklist.size() > 0) {\n GamePiece next = worklist.removeFirst();\n if (seen.contains(next)) {\n // if seen has the next element, don't do anything with it\n }\n else {\n for (String s : this.directions) {\n if (next.hasNeighbor(s) && next.connected(s)) {\n worklist.addFirst(next.neighbors.get(s));\n graph.put(next.neighbors.get(s), next);\n }\n }\n seen.add(next);\n }\n }\n return graph;\n }", "private static void findBridges() {\n Map<Integer, Integer> lastSeen = new HashMap<>();\n for (int i = 0; i < columns.length; i++) {\n if (!lastSeen.containsKey(columns[i])) {\n lastSeen.put(columns[i], i);\n }\n }\n bridgesCount = 0;\n\n int lastBridgeIndex = 0;\n for (int i = 1; i < columns.length; i++) {\n\n //returns prev index of columns[i]\n int columnPrevIndex = lastSeen.get(columns[i]);\n //columnPrevIndex must be to the right from lastBridgeIndex to avoid crossing\n if (columnPrevIndex != i &&\n columnPrevIndex >= lastBridgeIndex) {\n lastBridgeIndex = i;\n bridgesCount++;\n connections[i] = true;\n connections[columnPrevIndex] = true;\n }\n //not optimized solution -> for every element we search to it's left side\n //from lastBridgeIndex to i and if we meet same element -> connect new bridge\n// for (int j = lastBridgeIndex; j < i; j++) {\n//\n// if (columns[j] == columns[i]) {\n// lastBridgeIndex = i;\n// connections[j] = true;\n// connections[i] = true;\n// bridgesCount++;\n// break;\n// }\n// }\n\n //update index of columns[i]\n lastSeen.put(columns[i], i);\n }\n }", "private SchedulePaths calculateAllPaths(final SchedulePaths schedulePaths, final Set<Edge> path,\n final Operation operation) {\n\n final Set<Edge> parentEdges;\n if (operation instanceof EndVertex) {\n parentEdges = ((EndVertex) operation).getEndParentEdges();\n } else {\n parentEdges = operation.getParentEdges();\n }\n\n LOG.trace(\"Checking operation J: {}, M: {}\", operation.getJob(), operation.getMachine());\n LOG.trace(\"Number of parent edges: {}\", parentEdges.size());\n\n //Runs while not root operation\n if (!parentEdges.isEmpty()) {\n\n //Gets maximum edge size\n Integer maxEdge = 0;\n for (final Edge edge : parentEdges) {\n\n if (path.contains(edge)) {\n LOG.trace(\"Detected loop\");\n LOG.trace(\"Loop parent: {}\\n From path: {}\", edge.toString(), path.toString());\n schedulePaths.setIsFeasible(false);\n schedulePaths.setNodeCausingCycle(edge);\n\n return schedulePaths;\n }\n\n LOG.trace(\"Parent of operation: J:{} M:{}\", edge.getOperationFrom().getJob(), edge.getOperationFrom()\n .getMachine());\n if (edge.getMaxDistanceToMe() > maxEdge) {\n maxEdge = edge.getMaxDistanceToMe();\n }\n }\n\n LOG.trace(\"Maximum edge is {}\", maxEdge);\n\n Set<Edge> pathCopy = null;\n boolean firstEdge = true;\n for (final Edge edge : parentEdges) {\n\n if (Objects.equals(edge.getMaxDistanceToMe(), maxEdge)) {\n\n LOG.trace(\"Edge: {} maxd: {}\", edge, edge.getMaxDistanceToMe());\n\n if (firstEdge) {\n\n pathCopy = new LinkedHashSet<>(path);\n\n path.add(edge);\n LOG.trace(\"Adding edge: {}\", edge);\n firstEdge = false;\n calculateAllPaths(schedulePaths, path, edge.getOperationFrom());\n } else {\n\n final Set<Edge> newPath = new LinkedHashSet<>(pathCopy);\n LOG.trace(\"Creating new path, copying: {}\", pathCopy);\n\n newPath.add(edge);\n LOG.trace(\"New Path copy, adding edge: {}\", edge);\n calculateAllPaths(schedulePaths, newPath, edge.getOperationFrom());\n }\n }\n }\n } else {\n\n LOG.trace(\"Added new path to path set.\");\n schedulePaths.addPath(path);\n }\n\n return schedulePaths;\n }", "Set<String> bfsTraversal(Graph graph, String root) {\n Set<String> seen = new LinkedHashSet<String>();\n Queue<String> queue = new LinkedList<String>();\n queue.add(root);\n seen.add(root);\n\n while (!queue.isEmpty()) {\n String node = queue.poll();\n for (Node n : graph.getAdjacentNodes(node)) {\n if (!seen.contains(n.data)) {\n seen.add(n.data);\n queue.add(n.data);\n }\n }\n }\n\n return seen;\n }", "private void connectAll()\n {\n\t\tint i = 0;\n\t\tint j = 1;\n\t\twhile (i < getNodes().size()) {\n\t\t\twhile (j < getNodes().size()) {\n\t\t\t\tLineEdge l = new LineEdge(false);\n\t\t\t\tl.setStart(getNodes().get(i));\n\t\t\t\tl.setEnd(getNodes().get(j));\n\t\t\t\taddEdge(l);\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++; j = i+1;\n\t\t}\n\n }", "IList<Edge> getWalls(ArrayList<ArrayList<Vertex>> v, ArrayList<Edge> all) {\n IList<Edge> finalEdges = new Empty<Edge>();\n for (Edge e : all) {\n boolean valid = true;\n for (ArrayList<Vertex> l : v) {\n for (Vertex vt : l) {\n for (Edge e2 : vt.outEdges) {\n if (e.equals(e2) || (e.to == e2.from && e.from == e2.to)) {\n valid = false;\n }\n }\n }\n }\n if (valid) {\n finalEdges = finalEdges.add(e);\n }\n }\n return finalEdges;\n }", "@Test\n\t\t\t\tpublic void test4() {\n\t\t\t\t\tConvertGraphToBinaryTree tester=new ConvertGraphToBinaryTree();\n\t\t\t\t\tGraphNode n1=tester.new GraphNode(1);GraphNode n2=tester.new GraphNode(2);\n\t\t\t\t\tGraphNode n3=tester.new GraphNode(3);GraphNode n4=tester.new GraphNode(4);\n\t\t\t\t\tGraphNode n5=tester.new GraphNode(5);GraphNode n6=tester.new GraphNode(6);\n\t\t\t\t\tGraphNode n7=tester.new GraphNode(7);GraphNode n8=tester.new GraphNode(8);\n\t\t\t\t\tGraphNode n9=tester.new GraphNode(9);\n\t\t\t\t\tn1.neighbor.add(n2);n1.neighbor.add(n6);\n\t\t\t\t\tn2.neighbor.add(n1);n2.neighbor.add(n3);n2.neighbor.add(n7);\n\t\t\t\t\tn3.neighbor.add(n2);n3.neighbor.add(n4);n3.neighbor.add(n8);\n\t\t\t\t\tn4.neighbor.add(n3);n6.neighbor.add(n1);\n\t\t\t\t\tn7.neighbor.add(n2);n8.neighbor.add(n3);\n\t\t\t\t\tassertTrue(tester.isBinaryTree(n1));\n\t\t\t\t\tGraphNode root=tester.convertToBinaryTree(n1);\n\t\t\t\t\tGraphNode last=null;\n\t\t\t\t\tGraphNode curr=root;\n\t\t\t\t\twhile(curr!=null){\n\t\t\t\t\t\tSystem.out.print(curr.val+\"->\");\n\t\t\t\t\t\tif(curr.neighbor.size()<=1&&root!=curr){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int i=0;i<curr.neighbor.size();i++){\n\t\t\t\t\t\t\tGraphNode next=curr.neighbor.get(i);\n\t\t\t\t\t\t\tif(next!=last){\n\t\t\t\t\t\t\t\tlast=curr;\n\t\t\t\t\t\t\t\tcurr=next;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}", "ComparableEdge[] fillEdgeArray(int maxWeight) {\n Map<String, ComparableEdge> edgeMap = new HashMap<String, ComparableEdge>();\n\n // process all vertex combinations so that we get the complete set\n // the edge hash that we constructed narrows the candidates for each\n // label pattern saving us from checking all possible edges.\n\n // for each vertex:\n // look up the hashKey for each possible 'missing bit' pattern\n // examine all matching candidates 'other vertices'\n // create a ComparableEdge for each vertex at distance <= maxWeight\n // add the ComparableEdges to the edgeList\n //\n // after processing all vertices:\n // copy the edgeList to an Array and sort the Array.\n // the Array is ready to drive the Kruskal Algorithm.\n //\n\n for (int i = 0; i < vertices.length; i++) {\n HammingVertex v = vertices[i];\n if (v == null) continue; // should not happen\n\n log.debug(\" **** vertex \" + i);\n System.err.println(\" **** vertex \" + i);\n\n // all users of the array MUST use exactly the same algorithm lookup sequence\n int missingBitsVertexMapsIndex = 0;\n\n // check all 'missing 2 bit' combinations for this vertex\n for (int j = 0; j < (labelSize - 1); j++) {\n for (int k = (j + 1); k < labelSize; k++) {\n int missingBitsKey = v.labelWithoutMissingBitsAsInt(j, k);\n\n Map missingBitsVertexMap = missingBitsVertexMaps[missingBitsVertexMapsIndex];\n\n List<Integer> l = (List<Integer>) missingBitsVertexMap.get(missingBitsKey);\n addQualifedEdgesFromVertexList(v, l, edgeMap, 2);\n\n // next missing bit hashMap in sequence\n missingBitsVertexMapsIndex++;\n }\n }\n }\n\n //ComparableEdge[] e = (ComparableEdge[])edgeList.toArray();\n Collection<ComparableEdge> edgeSet = edgeMap.values();\n int numEdges = edgeSet.size();\n ComparableEdge[] e = new ComparableEdge[numEdges];\n int i = 0;\n for (ComparableEdge edge : edgeSet) {\n e[i] = edge;\n i++;\n }\n Arrays.sort(e);\n\n if (isP())\n log.debug(\" --- there are \" + e.length + \" sorted edges.\");\n return e;\n }", "private final void computeAllEdgeLevelsFast() {\n int[] currentLevelEdgeNodes = new int[nEdges*2];\n int[] currentLevelEdgeIndexes = new int[nEdges*2];\n int currEdge = 0;\n int nextLevelEnd = 0;\n\n /**\n * \\ neighbours are behind the current edge.\n * '. \\\n * '. \\ nNeighbours[vi][ei] = 2\n * '.\\\n * O-----------> [next]\n * vi ei\n */\n\n\n int[][] nNeighbours = new int[nNodes][];\n for (int vi=0; vi<nNodes; ++vi) {\n int currX = xPositions[vi];\n int currY = yPositions[vi];\n\n int nOutgoingEdges = nOutgoingEdgess[vi];\n int[] outgoingEdges = outgoingEdgess[vi];\n \n int[] currNodeNNeighbours = new int[nOutgoingEdges];\n for (int ei=0; ei<nOutgoingEdges; ++ei) {\n // For each directed edge\n int ni = outgoingEdges[ei];\n int nextX = xPositions[ni];\n int nextY = yPositions[ni];\n\n // Count taut outgoing edges\n int count = 0;\n\n int nNextOutgoingEdges = nOutgoingEdgess[vi];\n int[] nextOutgoingEdges = outgoingEdgess[vi];\n for (int j=0; j<nNextOutgoingEdges; ++j) {\n int di = nextOutgoingEdges[j];\n if (graph.isTaut(nextX, nextY, currX, currY, xPositions[di], yPositions[di])) {\n ++count;\n }\n }\n\n currNodeNNeighbours[ei] = count;\n if (count == 0) {\n currentLevelEdgeNodes[nextLevelEnd] = vi;\n currentLevelEdgeIndexes[nextLevelEnd] = ei;\n ++nextLevelEnd;\n }\n }\n nNeighbours[vi] = currNodeNNeighbours;\n }\n\n \n int currLevel = 1;\n while (currEdge < nextLevelEnd && currLevel < levelLimit) {\n\n int currentLevelEnd = nextLevelEnd;\n for (; currEdge < currentLevelEnd; ++currEdge) {\n int currNode = currentLevelEdgeNodes[currEdge];\n int currEdgeIndex = currentLevelEdgeIndexes[currEdge];\n\n if (edgeLevels[outgoingEdgeIndexess[currNode][currEdgeIndex]] != LEVEL_W) continue;\n // Set edge level\n edgeLevels[outgoingEdgeIndexess[currNode][currEdgeIndex]] = currLevel;\n\n /**\n * Curr side must have no neighbours.\n * Opp side (next node) may have neighbours.\n * So remove neighbours from opposite side.\n * __\n * /| __\n * / .-'|\n * (no neighbours) / .-'\n * /.-'\n * O-----------> [n]\n * vi ei\n */\n // No need to remove neighbours from opposite edge. They are ignored automatically.\n\n\n int nextNode = outgoingEdgess[currNode][currEdgeIndex];\n\n int currX = xPositions[currNode];\n int currY = yPositions[currNode];\n int nextX = xPositions[nextNode];\n int nextY = yPositions[nextNode];\n\n int[] outgoingEdges = outgoingEdgess[nextNode];\n int nOutgoingEdges = nOutgoingEdgess[nextNode];\n\n int[] outgoingEdgeIndexes = outgoingEdgeIndexess[nextNode];\n\n int[] nextNodeNNeighbours = nNeighbours[nextNode];\n for (int j=0; j<nOutgoingEdges; ++j) {\n if (edgeLevels[outgoingEdgeIndexes[j]] != LEVEL_W) continue;\n int nextnextNode = outgoingEdges[j];\n int nextnextX = xPositions[nextnextNode];\n int nextnextY = yPositions[nextnextNode];\n if (!graph.isTaut(currX, currY, nextX, nextY, nextnextX, nextnextY)) continue;\n\n --nextNodeNNeighbours[j];\n if (nextNodeNNeighbours[j] == 0) {\n // push into next level's list.\n currentLevelEdgeNodes[nextLevelEnd] = nextNode;\n currentLevelEdgeIndexes[nextLevelEnd] = j;\n ++nextLevelEnd;\n }\n\n if (nextNodeNNeighbours[j] < 0) System.out.println(\"ERROR\");\n }\n }\n\n ++currLevel;\n }\n }", "private void buildLinks() {\n ArrayDeque<Node> nodeQueue = new ArrayDeque<>();\n //Failure Rule 1: root has no failure link\n //Failure Rule 2: nodes one layer deeper than root have failure links pointing to root\n //Note: all root and depth 1 nodes have null dictionary links, so no work to be done there\n for (Edge e : root.edges.values()) {\n Node current = e.getTo();\n current.setFailureLink(root);\n for (Edge edge : current.edges.values())\n nodeQueue.add(edge.getTo());\n }\n //BFS while applying other rules\n while (!nodeQueue.isEmpty()) {\n Node current = nodeQueue.pollFirst();\n //First: find current's failure link node\n Node linked = current.getEdgeIn().getFrom().getFailureLink();\n while (true) {\n if (linked.hasEdge(current.getEdgeIn().getChar())) {\n //Failure Rule 3: if linked has a edge and node corresponding to current's edgeIn character,\n //link current to that node\n current.setFailureLink(linked.getEdge(current.getEdgeIn().getChar()).getTo());\n break;\n } else if (root == linked) {\n //Failure Rule 4: if linked is root and doesn't satisfy rule 3, current is linked to root\n current.setFailureLink(root);\n break;\n } else\n //Failure Rule 5: update linked and repeat until rule 3 or 4 applies\n linked = linked.getFailureLink();\n }\n //Second: use the failure link to find current's dictionaryLink\n Node currentLink = current.getFailureLink();\n if (currentLink.isWordEnd()) {\n //Dictionary Rule 1: if the failure link corresponds to a word, set current's dictionary link to it\n current.setDictionaryLink(currentLink);\n } else {\n //Dictionary Rule 2: if rule 1 doesn't apply, set current's DL to it's failure link's DL.\n current.setDictionaryLink(currentLink.getDictionaryLink());\n }\n //Third: add next layer of nodes into queue to continue BFS\n for (Edge e : current.edges.values())\n nodeQueue.add(e.getTo());\n }\n }", "public Collection<Stmt> branches() {\n if(branches_computed) {\n return branches_value;\n }\n ASTNode$State state = state();\n int num = state.boundariesCrossed;\n boolean isFinal = this.is$Final();\n branches_value = branches_compute();\n if (isFinal && num == state().boundariesCrossed) {\n branches_computed = true;\n } else {\n }\n\n return branches_value;\n }", "public Iterable<Board> solution() {\n if (!isSolvable()) {\n return null;\n }\n Stack<Board> st = new Stack<>();\n SearchNode node = resultNode;\n while (node != null) {\n st.push(node.board);\n node = node.predecessor;\n }\n return st;\n\n }", "private void computeAllPaths()\n {\n for (Station src : this.graph.stations)\n {\n List<Station> visited = new ArrayList<Station>();\n computePathsForNode(src, null, null, visited);\n }\n Print.printTripList(this.tripList);\n }", "public static void main(String[] args) throws IOException {\n\n // read in graph\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt(), m = scanner.nextInt();\n ArrayList<Integer>[] graph = new ArrayList[n];\n for (int i = 0; i < n; i++)\n graph[i] = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n scanner.nextLine();\n int u = scanner.nextInt() - 1, v = scanner.nextInt() - 1; // convert to 0 based index\n graph[u].add(v);\n graph[v].add(u);\n }\n\n int[] dist = new int[n];\n Arrays.fill(dist, -1);\n // partition the vertices in each of the components of the graph\n for (int u = 0; u < n; u++) {\n if (dist[u] == -1) {\n // bfs\n Queue<Integer> queue = new LinkedList<>();\n queue.add(u);\n dist[u] = 0;\n while (!queue.isEmpty()) {\n int w = queue.poll();\n for (int v : graph[w]) {\n if (dist[v] == -1) { // unvisited\n dist[v] = (dist[w] + 1) % 2;\n queue.add(v);\n } else if (dist[w] == dist[v]) { // visited and form a odd cycle\n System.out.println(-1);\n return;\n } // otherwise the dist will not change\n }\n }\n }\n\n }\n\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));\n // vertices with the same dist are in the same group\n List<Integer>[] groups = new ArrayList[2];\n groups[0] = new ArrayList<>();\n groups[1] = new ArrayList<>();\n for (int u = 0; u < n; u++) {\n groups[dist[u]].add(u + 1);\n }\n for (List<Integer> g: groups) {\n writer.write(String.valueOf(g.size()));\n writer.newLine();\n for (int u: g) {\n writer.write(String.valueOf(u));\n writer.write(' ');\n }\n writer.newLine();\n }\n\n writer.close();\n\n\n }", "private void buildGraph() {\n\t\tfor (Map<String, Channel> map: this.channels.values()) {\n\t\t\t// Add all channels\n\t\t\t\n\t\t\t// TODO: deal with channels spread over multiple redis instances (replicated)\n\t\t\t\n\t\t\t// Add all but ignore if some channels should be ignored\n\t\t\tfor (Map.Entry<String, Channel> entry: map.entrySet()) {\n\t\t\t\tif (IGNORE_UNICAST_AND_SUBSCRIBE) {\n\t\t\t\t\tif (entry.getKey().startsWith(\"unicast\") == false && entry.getKey().startsWith(\"sub\") == false) {\n\t\t\t\t\t\tif (entry.getKey().startsWith(\"tile\")) {\n\t\t\t\t\t\t\tchannelList.add(entry.getValue());\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tchannelList.add(entry.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t\t//channelList.addAll(map.values());\n\t\t}\n\t\t\n\t\t// Double-iteration to build pairs\n\t\tfor (Channel channel1: channelList) {\n\t\t\tfor (Channel channel2: channelList) {\n\t\t\t\tif (channel1 != channel2) {\n\t\t\t\t\t// Put channels as nodes in the set\n\t\t\t\t\tthis.nodes.add(channel1.getChannelName());\n\t\t\t\t\tthis.nodes.add(channel2.getChannelName());\n\t\t\t\t\t\n\t\t\t\t\t// Build pair\n\t\t\t\t\tChannelPair pair = new ChannelPair(channel1.getChannelName(), channel2.getChannelName());\n\t\t\t\t\t\n\t\t\t\t\t// Check if it is contained in the map\n\t\t\t\t\tif (this.pairMultiplicity.containsKey(pair) == false) {\n\t\t\t\t\t\t// Count common subscribers\n\t\t\t\t\t\tint commonSubscribers = countCommonSubscribers(channel1, channel2);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (commonSubscribers > 0) {\n\t\t\t\t\t\t\t// Perform computation and add it\n\t\t\t\t\t\t\tthis.pairMultiplicity.put(pair, commonSubscribers);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "public ArrayList<Edge> Prim (String s){\n Node Start = nodeMap.get(s);\n mst = new ArrayList<>();\n HashMap<String, String> inserted = new HashMap<String, String>();\n ArrayList<Edge> failed = new ArrayList<Edge>();\n PriorityQueue<Edge> pq = new PriorityQueue<Edge>();\n ArrayList<Edge> ed = new ArrayList<Edge>(edgeMap.values());\n Edge first = ed.get(0);\n mst.add(first);\n inserted.put(first.w, first.w);\n inserted.put(first.v, first.v);\n\n priorityEdgeInsert(pq, first);\n\n while (inserted.size() <= edges() && pq.size() != 0){ //O(E log(V))\n //runs for E checking the possible V, where the number of V is devided each time, or log(V), giving ELog(V)\n Edge e = pq.poll();\n String w = inserted.get(e.w);\n String v = inserted.get(e.v);\n\n if ((w == null) ^ (v == null)){\n priorityEdgeInsert(pq, e);\n for(Edge f : failed){\n if(f.v == e.v || f.v == e.w || f.w == e.v || f.w == e.w){\n\n }\n else{\n pq.add(f);\n }\n }\n failed.clear();\n mst.add(e);\n inserted.put(e.w, e.w); //only puts one, the null one is hashed to a meaningless spot\n inserted.put(e.v, e.v);\n }\n else if ((w == null) && (v == null) ){\n failed.add(e);\n }\n else if (!(w == null) && !(v == null) ){\n failed.remove(e);\n pq.remove(e);\n }\n else if (e == null){\n System.out.println(\"HOW?\"); //should never happen.\n }\n }\n return mst;\n }", "public List<Branch> getBranchs()\r\n\t{\t\r\n\t\tif (branchs.size() == 0)\r\n\t\t{\r\n\t\t\t//Lacos abertos carga x terra (redes radiais)\r\n\t\t\tbranchs.addAll(findBranchs());\t\t\r\n\t\t\r\n\t\t}\r\n\t\treturn branchs; \r\n\t}", "@Test\n public void testShortestPathEstacoes() {\n completeMap = new Graph(false);\n incompleteMap = new Graph(false);\n\n completeMap.insertVertex(porto);\n Company.getParkRegistry().getParkMap().put(porto, portoL);\n completeMap.insertVertex(braga);\n Company.getParkRegistry().getParkMap().put(braga, bragaL);\n completeMap.insertVertex(vila);\n Company.getParkRegistry().getParkMap().put(vila, vilaL);\n completeMap.insertVertex(aveiro);\n Company.getParkRegistry().getParkMap().put(aveiro, aveiroL);\n completeMap.insertVertex(coimbra);\n Company.getParkRegistry().getParkMap().put(coimbra, coimbraL);\n completeMap.insertVertex(leiria);\n Company.getParkRegistry().getParkMap().put(leiria, leiriaL);\n\n completeMap.insertVertex(viseu);\n Company.getParkRegistry().getParkMap().put(viseu, viseuL);\n completeMap.insertVertex(guarda);\n Company.getParkRegistry().getParkMap().put(guarda, guardaL);\n completeMap.insertVertex(castelo);\n Company.getParkRegistry().getParkMap().put(castelo, casteloL);\n completeMap.insertVertex(lisboa);\n Company.getParkRegistry().getParkMap().put(lisboa, lisboaL);\n completeMap.insertVertex(faro);\n Company.getParkRegistry().getParkMap().put(faro, faroL);\n\n completeMap.insertEdge(porto, aveiro, c, 75);\n completeMap.insertEdge(porto, braga, c2, 60);\n completeMap.insertEdge(porto, vila, c3, 100);\n completeMap.insertEdge(viseu, guarda, c4, 75);\n completeMap.insertEdge(guarda, castelo, c5, 100);\n completeMap.insertEdge(aveiro, coimbra, c6, 60);\n completeMap.insertEdge(coimbra, lisboa, c7, 200);\n completeMap.insertEdge(coimbra, leiria, c8, 80);\n completeMap.insertEdge(aveiro, leiria, c9, 120);\n completeMap.insertEdge(leiria, lisboa, c10, 150);\n\n completeMap.insertEdge(aveiro, viseu, c11, 85);\n completeMap.insertEdge(leiria, castelo, c12, 170);\n completeMap.insertEdge(lisboa, faro, c13, 280);\n\n incompleteMap = completeMap.clone();\n\n incompleteMap.removeEdge(aveiro, viseu);\n incompleteMap.removeEdge(leiria, castelo);\n incompleteMap.removeEdge(lisboa, faro);\n\n System.out.println(\"Test of shortest path\");\n\n LinkedList<String> shortPath = new LinkedList<>();\n double lenpath = 0;\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(completeMap, porto, l, shortPath);\n assertTrue(\"Length path should be 0 if vertex does not exist\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(incompleteMap, porto, faro, shortPath);\n assertTrue(\"Length path should be 0 if there is no path\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPath(completeMap, porto, porto, shortPath);\n assertTrue(\"Number of nodes should be 1 if source and vertex are the same\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPath(incompleteMap, porto, lisboa, shortPath);\n assertTrue(\"Path between Porto and Lisboa should be 335 Km\", lenpath == 335);\n\n Iterator<String> it = shortPath.iterator();\n assertTrue(\"First in path should be Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Coimbra\", it.next().equals(coimbra));\n assertTrue(\"then Lisboa\", it.next().equals(lisboa));\n completeMap.insertEdge(porto, lisboa, c, 10);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(incompleteMap, braga, leiria, shortPath);\n assertEquals(\"Path between Braga and Leiria should be close to 152.89\", lenpath, 152, 1);\n\n it = shortPath.iterator();\n\n assertTrue(\"First in path should be Braga\", it.next().equals(braga));\n assertTrue(\"then Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Coimbra\", it.next().equals(coimbra));\n assertTrue(\"then Leiria\", it.next().equals(leiria));\n\n shortPath.clear();\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(completeMap, porto, castelo, shortPath);\n assertEquals(\"Path between Porto and Castelo Branco should be close to 202.86\", lenpath, 202, 1);\n assertTrue(\"N. cities between Porto and Castelo Branco should be 5 \", shortPath.size() == 5);\n\n it = shortPath.iterator();\n\n assertTrue(\"First in path should be Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Viseu\", it.next().equals(viseu));\n assertTrue(\"then Viseu\", it.next().equals(guarda));\n assertTrue(\"then Castelo Branco\", it.next().equals(castelo));\n\n //Changing Edge: aveiro-viseu with Edge: leiria-C.Branco \n //should change shortest path between porto and castelo Branco\n completeMap.removeEdge(aveiro, viseu);\n completeMap.insertEdge(leiria, castelo, c12, 170);\n shortPath.clear();\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPath(completeMap, porto, castelo, shortPath);\n assertTrue(\"Path between Porto and Castelo Branco should now be 330 Km\", lenpath == 330);\n assertTrue(\"Path between Porto and Castelo Branco should be 4 cities\", shortPath.size() == 4);\n\n }", "public void greedyBFS(String input)\r\n\t{\r\n\t\tNode root_gbfs = new Node (input);\r\n\t\tNode current = new Node(root_gbfs.getState());\r\n\t\t\r\n\t\tNodeComparator gbfs_comparator = new NodeComparator();\r\n\t\tPriorityQueue<Node> queue_gbfs = new PriorityQueue<Node>(12, gbfs_comparator);\r\n\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\r\n\t\tint nodes_popped = 0;\r\n\t\tint pqueue_max_size = 0;\r\n\t\tint pq_size = 0;\r\n\t\t\r\n\t\tcurrent.cost = 0;\r\n\t\tcurrent.total_cost = 0;\r\n\t\t\r\n\t\twhile(!goal_gbfs)\r\n\t\t{\r\n\t\t\tvisited.add(current.getState());\r\n\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\r\n\t\t\tfor (String a : children)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\tvisited.add(nino.getState());\r\n\t\t\t\t\t\r\n\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\tint greedy_cost = greedybfsCost(nino.getState(), root_gbfs.getState());\r\n\t\t\t\t\tnino.setTotalCost(greedy_cost);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue_gbfs.add(nino);\r\n\t\t\t\t\t\tpq_size++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Repeated State checking. Removing the same node from PQ if the path cost is less then the current one \r\n\t\t\t\t\telse if (queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (Node original : queue_gbfs)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (original.equals(nino))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tNode copy = original;\r\n\t\t\t\t\t\t\t\tif (nino.getTotalCost() < copy.getTotalCost())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.remove(copy);\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.add(nino);\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\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = queue_gbfs.poll();\r\n\t\t\tnodes_popped++;\r\n\t\t\t\r\n\t\t\tif (pq_size > pqueue_max_size)\r\n\t\t\t{\r\n\t\t\t\tpqueue_max_size = pq_size;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpq_size--;\r\n\t\t\tgoal_gbfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tgoal_gbfs = false;\r\n\t\tSystem.out.println(\"GBFS Solved!!\");\r\n\t\tSolution.performSolution(current, root_gbfs, nodes_popped, pqueue_max_size);\r\n\t}", "private void populateBranches() {\n\t\tStationsDTO[] station = null;\n\t\ttry {\n\t\t\tstation = handler.getAllBranches();\n\t\t\tif (null != station) {\n\t\t\t\tint len = station.length;\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tcoBranch.add(station[i].getName() + \" - \"\n\t\t\t\t\t\t\t+ station[i].getId());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}", "static int[] bfs(int n, int m, int[][] edges, int s) {\r\n \r\n HashSet<Integer> aList[] = new HashSet[n];\r\n // Array of the nodes of the tree\r\n\r\n Queue<Integer> bfsQueue = new LinkedList();\r\n\r\n boolean visited[] = new boolean[n];\r\n // check if a node is visited or not\r\n\r\n\r\n int cost[] = new int[n];\r\n // cost to travel from one node to other\r\n\r\n for (int i = 0; i < n; i++) {\r\n // intialising the values\r\n visited[i] = false;\r\n cost[i] = -1;\r\n\r\n aList[i] = new HashSet<Integer>();\r\n // Each element of aList is a Set\r\n // To store the neighbouring nodes of a particular node\r\n }\r\n\r\n for (int i = 0; i < m; i++) {\r\n // let node[i] <--> node[j]\r\n\r\n // adding node[j] to neighbours list of node[i]\r\n aList[edges[i][0] - 1].add(edges[i][1] - 1);\r\n\r\n // adding node[i] to neighbours list of node[j]\r\n aList[edges[i][1] - 1].add(edges[i][0] - 1);\r\n }\r\n\r\n //\r\n s = s - 1;\r\n bfsQueue.add(s);\r\n visited[s] = true;\r\n cost[s] = 0;\r\n //\r\n \r\n \r\n while (!bfsQueue.isEmpty()) {\r\n \r\n int curr = bfsQueue.poll();\r\n // takes the last element of the queue\r\n \r\n for (int neigh : aList[curr]) { // iterating the neighbours of node 'curr'\r\n if (!visited[neigh]) { // checking if node neigh id already visited during the search\r\n visited[neigh ] = true;\r\n bfsQueue.add(neigh); //add the node neigh to bfsqueue\r\n cost[neigh] = cost[curr] + 6; \r\n }\r\n }\r\n }\r\n\r\n int result[] = new int[n-1];\r\n\r\n for (int i=0, j=0; i<n && j<n-1; i++, j++) {\r\n if (i == s){\r\n i++;\r\n }\r\n result[j] = cost[i];\r\n }\r\n \r\n return result;\r\n }", "private List<String> getAllConnectionsFromGroundTruthThatAreSubjectOfInvestigation(PostVersion postVersion) {\n List<BlockPair> blockPairsInCurrentPostVersionOfGT = new ArrayList<>();\n for (BlockPair blockPairsGT : blockPairs_groundTruth) {\n if (blockPairsGT.leftBlock.postBlock.getPostHistoryId().equals(postVersion.getPostHistoryId())) {\n blockPairsInCurrentPostVersionOfGT.add(blockPairsGT);\n }\n }\n\n // get all connections from ground truth that are subject of investigation\n List<String> connectionsInGT = new ArrayList<>();\n for (BlockPair blockPair : blockPairsInCurrentPostVersionOfGT) {\n\n if (!matchesPostBlockTypeOfInvestigation(blockPair)) {\n continue;\n }\n\n connectionsInGT.add(\n blockPair.leftBlock.postBlock.getPostId() + \", \" +\n blockPair.leftBlock.postBlock.getPostHistoryId() + \", \" +\n blockPair.leftBlock.postBlock.getLocalId() + \" -> \" +\n blockPair.rightBlock.postBlock.getLocalId()\n );\n }\n return connectionsInGT;\n }", "public static void main(String args[]) {\n int V = 4;\n Graph g = new Graph(V);\n g.addEdge(0, 1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n g.addEdge(3, 3);\n\n int src = 1;\n int dest = 3;\n boolean[] visited = new boolean[V];\n\n // To store the complete path between source and destination\n Stack<Integer> path1 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path1)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path1);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n src = 3;\n dest = 1;\n // To store the complete path between source and destination\n Stack<Integer> path2 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path2)) System.out.println(\"There is a path from \" + src + \" to \" + dest);\n else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n // total number of nodes in the graph (labeled from 0 to 7)\n int n = 8;\n\n // List of graph edges as per the above diagram\n Graph g2 = new Graph(n);\n /**\n * There is a path from 1 to 3\n * The complete path is [1, 2, 3]\n * There is no path from 3 to 1\n * There is a path from 0 to 7\n * The complete path is [0, 3, 4, 6, 7]\n */\n\n g2.addEdge(0, 3);\n g2.addEdge(1, 0);\n g2.addEdge(1, 2);\n g2.addEdge(1, 4);\n g2.addEdge(2, 7);\n g2.addEdge(3, 4);\n g2.addEdge(3, 5);\n g2.addEdge(4, 3);\n g2.addEdge(4, 6);\n g2.addEdge(5, 6);\n g2.addEdge(6, 7);\n\n // source and destination vertex\n src = 0;\n dest = 7;\n\n // To store the complete path between source and destination\n Stack<Integer> path = new Stack<>();\n boolean[] visited2 = new boolean[n];\n\n if (hasPathDFS(g2, src, dest, visited2, path)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n\n }", "public Iterable<Board> solution()\n {\n SearchNode element = getSolutionNode();\n\n Stack<Board> returnList= new Stack<>();\n returnList.push(element.board);\n while (element!=null &&element.previusNode!=null){\n\n element = element.previusNode;\n returnList.push(element.board);\n }\n\n return new Iterable<Board>() {\n @Override\n public Iterator<Board> iterator()\n {\n return returnList.iterator();\n }\n };\n }", "public static strictfp void main(String... args) {\n\t\tArrayList<Vertex> graph = new ArrayList<>();\r\n\t\tHashMap<Character, Vertex> map = new HashMap<>();\r\n\t\t// add vertices\r\n\t\tfor (char c = 'a'; c <= 'i'; c++) {\r\n\t\t\tVertex v = new Vertex(c);\r\n\t\t\tgraph.add(v);\r\n\t\t\tmap.put(c, v);\r\n\t\t}\r\n\t\t// add edges\r\n\t\tfor (Vertex v: graph) {\r\n\t\t\tif (v.getNodeId() == 'a') {\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t} else if (v.getNodeId() == 'b') {\r\n\t\t\t\tv.getAdjacents().add(map.get('a'));\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t} else if (v.getNodeId() == 'c') {\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'd') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('e'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t} else if (v.getNodeId() == 'e') {\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t} else if (v.getNodeId() == 'f') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('e'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t} else if (v.getNodeId() == 'g') {\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'h') {\r\n\t\t\t\tv.getAdjacents().add(map.get('a'));\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'i') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t// graph created\r\n\t\t// create disjoint sets\r\n\t\tDisjointSet S = null, V_S = null;\r\n\t\tfor (Vertex v: graph) {\r\n\t\t\tchar c = v.getNodeId();\r\n\t\t\tif (c == 'a' || c == 'b' || c == 'd' || c == 'e') {\r\n\t\t\t\tif (S == null) {\r\n\t\t\t\t\tS = v.getDisjointSet();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDisjointSet set = DisjointSet.union(S, v.getDisjointSet());\r\n\t\t\t\t\tv.setDisjointSet(set);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (V_S == null) {\r\n\t\t\t\t\tV_S = v.getDisjointSet();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDisjointSet set = DisjointSet.union(V_S, v.getDisjointSet());\r\n\t\t\t\t\tv.setDisjointSet(set);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Disjoint sets created\r\n\t\tfor (Vertex u: graph) {\r\n\t\t\tfor (Vertex v: u.getAdjacents()) {\r\n\t\t\t\tif (DisjointSet.findSet((DisjointSet) u.getDisjointSet()) == \r\n\t\t\t\t DisjointSet.findSet((DisjointSet) v.getDisjointSet())) {\r\n\t\t\t\t\tSystem.out.println(\"The cut respects (\" + u.getNodeId() + \", \" + v.getNodeId() + \").\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void subsetOneBundlePerEdge() {\n Set<Bundle> set = new HashSet<Bundle>();\n for (int ent_i=0;ent_i<digraph.getNumberOfEntities();ent_i++) {\n for (int i=0;i<digraph.getNumberOfNeighbors(ent_i);i++) {\n int nbor_i = digraph.getNeighbor(ent_i,i);\n\tIterator<Bundle> it = digraph.linkRefIterator(digraph.linkRef(ent_i,nbor_i));\n\tset.add(it.next());\n }\n }\n getRTParent().push(getRTParent().getRootBundles().subset(set));\n }", "private ArrayList<Edge>getFullyConnectedGraph(){\n\t\tArrayList<Edge> edges = new ArrayList<>();\n\t\tfor(int i=0;i<nodes.size();i++){\n\t\t\tfor(int j=i+1;j<nodes.size();j++){\n\t\t\t\tEdge edge = new Edge(nodes.get(i), nodes.get(j),Utils.distance(nodes.get(i), nodes.get(j)));\n\t\t\t\tedges.add(edge);\n\t\t\t}\n\t\t}\n\t\treturn edges;\n\t}", "@Test\n\tpublic void test1() {\n\t\tConvertGraphToBinaryTree tester=new ConvertGraphToBinaryTree();\n\t\tGraphNode n1=tester.new GraphNode(1);GraphNode n2=tester.new GraphNode(2);\n\t\tGraphNode n3=tester.new GraphNode(3);GraphNode n4=tester.new GraphNode(4);\n\t\tGraphNode n5=tester.new GraphNode(5);GraphNode n6=tester.new GraphNode(6);\n\t\tGraphNode n7=tester.new GraphNode(7);GraphNode n8=tester.new GraphNode(8);\n\t\tGraphNode n9=tester.new GraphNode(9);\n\t\tn1.neighbor.add(n2);n1.neighbor.add(n5);n1.neighbor.add(n6);n1.neighbor.add(n9);\n\t\tn2.neighbor.add(n1);n2.neighbor.add(n3);n2.neighbor.add(n7);\n\t\tn3.neighbor.add(n2);n3.neighbor.add(n4);n3.neighbor.add(n8);\n\t\tn4.neighbor.add(n3);n5.neighbor.add(n1);n6.neighbor.add(n1);\n\t\tn7.neighbor.add(n2);n8.neighbor.add(n3);n9.neighbor.add(n1);\n\t\tassertTrue(!tester.isBinaryTree(n1));\n\t\tGraphNode root=tester.convertToBinaryTree(n1);\n\t\tGraphNode last=null;\n\t\tGraphNode curr=root;\n\t\twhile(curr!=null){\n\t\t\tSystem.out.print(curr.val+\"->\");\n\t\t\tif(curr.neighbor.size()<=1&&root!=curr){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i=0;i<curr.neighbor.size();i++){\n\t\t\t\tGraphNode next=curr.neighbor.get(i);\n\t\t\t\tif(next!=last){\n\t\t\t\t\tlast=curr;\n\t\t\t\t\tcurr=next;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println();\n\t}", "private void testBuildGraph() {\n\t\t// All test graphs have a node 8 with children [9, 10]\n\t\tSet<Node> expectedChildren = new HashSet<>();\n\t\texpectedChildren.add(new Node(9));\n\t\texpectedChildren.add(new Node(10));\n\n\t\tStudySetGraph disconnectedGraphWithoutCycle = new StudySetGraph(Edges.disconnectedGraphWithoutCycle);\n\t\tNode node = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph disconnectedGraphWithCycle = new StudySetGraph(Edges.disconnectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph connectedGraphWithCycle = new StudySetGraph(Edges.connectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\n\t\tStudySetGraph connectedGraphWithoutCycle = new StudySetGraph(Edges.connectedGraphWithoutCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t}", "public static void main(String[] args) throws IOException {\n File file = new File(\"tinyGex2.txt\");\n Scanner sc = new Scanner(file);\n Graph graph = new Graph(sc.nextInt());\n int temp = sc.nextInt();\n\n for(int i = 0; i < temp; i++){\n graph.addEdge(sc.nextInt(), sc.nextInt());\n }\n\n sc.close();\n\n //here is my test client for this portion of the homework. The implementation is super simple. I did have to add a 'contains' method to Sedgwick's Bag class. Found that a bit odd, but oh well.\n System.out.println(graph.hasEdge(10, 3));\n System.out.println(graph.hasEdge(11, 1));\n System.out.println(graph.hasEdge(9, 11));\n System.out.println();\n\n /*\n * HW6\n * 4.2.4\n *\n */\n\n file = new File(\"tinyDGex2.txt\");\n sc = new Scanner(file);\n Digraph digraph = new Digraph(sc.nextInt());\n temp = sc.nextInt();\n\n for(int i = 0; i < temp; i++){\n digraph.addEdge(sc.nextInt(), sc.nextInt());\n }\n\n sc.close();\n\n //Really nothing different here. Modded the test client to make sure it was seeing that the paths only went one way. 10 and 3 are connected in both directions; 11 and 8 are not.\n System.out.println(digraph.hasEdge(10, 3));\n System.out.println(digraph.hasEdge(3, 10));\n System.out.println(digraph.hasEdge(11, 8));\n System.out.println(digraph.hasEdge(8, 11));\n System.out.println();\n\n\n /*\n * HW6\n * 4.4.3\n * Note: Since you didn't specify which graph we should use for input, I used the edge-weighted DAG on page 658 as input\n */\n\n file = new File(\"tinyEWDAG.txt\");\n sc = new Scanner(file);\n EdgeWeightedDigraph ewd = new EdgeWeightedDigraph(sc);\n sc.close();\n\n //I wanted to output the list back into the input form. It's not in the same order, but it has the same values\n //saves to 'output.txt' in the root folder if you want to look at the output\n FileWriter fw = new FileWriter(\"output.txt\");\n fw.write(ewd.toString());\n fw.close();\n\n System.out.println(ewd.edgeWeight(4, 0));\n System.out.println(ewd.edgeWeight(2, 3));\n System.out.println(ewd.edgeWeight(6, 2));\n System.out.println(ewd.edgeWeight(5, 4));\n }", "private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tVertex vertexF = new Vertex(\"F\");\n\t\tVertex vertexG = new Vertex(\"G\");\n\n\t\tList<Edge> edges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 2));\n\t\tedges.add(new Edge(vertexD, 6));\n\t\tedges.add(new Edge(vertexF, 5));\n\t\tvertexA.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 2));\n\t\tedges.add(new Edge(vertexC, 7));\n\t\tvertexB.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 7));\n\t\tedges.add(new Edge(vertexD, 9));\n\t\tedges.add(new Edge(vertexF, 1));\n\t\tvertexC.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 6));\n\t\tedges.add(new Edge(vertexC, 9));\n\t\tedges.add(new Edge(vertexE, 4));\n\t\tedges.add(new Edge(vertexG, 8));\n\t\tvertexD.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 4));\n\t\tedges.add(new Edge(vertexF, 3));\n\t\tvertexE.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 5));\n\t\tedges.add(new Edge(vertexC, 1));\n\t\tedges.add(new Edge(vertexE, 3));\n\t\tvertexF.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 8));\n\t\tvertexG.incidentEdges = edges;\n\n\t\tgraph.add(vertexA);\n\t\tgraph.add(vertexB);\n\t\tgraph.add(vertexC);\n\t\tgraph.add(vertexD);\n\t\tgraph.add(vertexE);\n\t\tgraph.add(vertexF);\n\t\tgraph.add(vertexG);\n\n\t\treturn graph;\n\t}", "ArrayList<Edge> getAdjacencies();", "public List<Graph> search() {\n\n long start = System.currentTimeMillis();\n TetradLogger.getInstance().log(\"info\", \"Starting ION Search.\");\n logGraphs(\"\\nInitial Pags: \", this.input);\n TetradLogger.getInstance().log(\"info\", \"Transfering local information.\");\n long steps = System.currentTimeMillis();\n\n /*\n * Step 1 - Create the empty graph\n */\n List<Node> varNodes = new ArrayList<>();\n for (String varName : variables) {\n varNodes.add(new GraphNode(varName));\n }\n Graph graph = new EdgeListGraph(varNodes);\n\n /*\n * Step 2 - Transfer local information from the PAGs (adjacencies\n * and edge orientations)\n */\n // transfers edges from each graph and finds definite noncolliders\n transferLocal(graph);\n // adds edges for variables never jointly measured\n for (NodePair pair : nonIntersection(graph)) {\n graph.addEdge(new Edge(pair.getFirst(), pair.getSecond(), Endpoint.CIRCLE, Endpoint.CIRCLE));\n }\n TetradLogger.getInstance().log(\"info\", \"Steps 1-2: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n System.out.println(\"step2\");\n System.out.println(graph);\n\n /*\n * Step 3\n *\n * Branch and prune step that blocks problematic undirectedPaths, possibly d-connecting undirectedPaths\n */\n steps = System.currentTimeMillis();\n Queue<Graph> searchPags = new LinkedList<>();\n // place graph constructed in step 2 into the queue\n searchPags.offer(graph);\n // get d-separations and d-connections\n List<Set<IonIndependenceFacts>> sepAndAssoc = findSepAndAssoc(graph);\n this.separations = sepAndAssoc.get(0);\n this.associations = sepAndAssoc.get(1);\n Map<Collection<Node>, List<PossibleDConnectingPath>> paths;\n// Queue<Graph> step3PagsSet = new LinkedList<Graph>();\n HashSet<Graph> step3PagsSet = new HashSet<>();\n Set<Graph> reject = new HashSet<>();\n // if no d-separations, nothing left to search\n if (separations.isEmpty()) {\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(graph);\n step3PagsSet.add(graph);\n }\n // sets length to iterate once if search over path lengths not enabled, otherwise set to 2\n int numNodes = graph.getNumNodes();\n int pl = numNodes - 1;\n if (pathLengthSearch) {\n pl = 2;\n }\n // iterates over path length, then adjacencies\n for (int l = pl; l < numNodes; l++) {\n if (pathLengthSearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path lengths: \" + l + \" of \" + (numNodes - 1));\n }\n int seps = separations.size();\n int currentSep = 1;\n int numAdjacencies = separations.size();\n for (IonIndependenceFacts fact : separations) {\n if (adjacencySearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path nonadjacencies: \" + currentSep + \" of \" + numAdjacencies);\n }\n seps--;\n // uses two queues to keep up with which PAGs are being iterated and which have been\n // accepted to be iterated over in the next iteration of the above for loop\n searchPags.addAll(step3PagsSet);\n recGraphs.add(searchPags.size());\n step3PagsSet.clear();\n while (!searchPags.isEmpty()) {\n System.out.println(\"ION Step 3 size: \" + searchPags.size());\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n // deques first PAG from searchPags\n Graph pag = searchPags.poll();\n // Part 3.a - finds possibly d-connecting undirectedPaths between each pair of nodes\n // known to be d-separated\n List<PossibleDConnectingPath> dConnections = new ArrayList<>();\n // checks to see if looping over adjacencies\n if (adjacencySearch) {\n for (Collection<Node> conditions : fact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, fact.getX(), fact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, fact.getX(), fact.getY(), conditions));\n }\n }\n } else {\n for (IonIndependenceFacts allfact : separations) {\n for (Collection<Node> conditions : allfact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, allfact.getX(), allfact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, allfact.getX(), allfact.getY(), conditions));\n }\n }\n }\n }\n // accept PAG go to next PAG if no possibly d-connecting undirectedPaths\n if (dConnections.isEmpty()) {\n// doFinalOrientation(pag);\n// Graph p = screenForKnowledge(pag);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(pag);\n continue;\n }\n // maps conditioning sets to list of possibly d-connecting undirectedPaths\n paths = new HashMap<>();\n for (PossibleDConnectingPath path : dConnections) {\n List<PossibleDConnectingPath> p = paths.get(path.getConditions());\n if (p == null) {\n p = new LinkedList<>();\n }\n p.add(path);\n paths.put(path.getConditions(), p);\n }\n // Part 3.b - finds minimal graphical changes to block possibly d-connecting undirectedPaths\n List<Set<GraphChange>> possibleChanges = new ArrayList<>();\n for (Set<GraphChange> changes : findChanges(paths)) {\n Set<GraphChange> newChanges = new HashSet<>();\n for (GraphChange gc : changes) {\n boolean okay = true;\n for (Triple collider : gc.getColliders()) {\n\n if (pag.isUnderlineTriple(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n\n }\n if (!okay) {\n continue;\n }\n for (Triple collider : gc.getNoncolliders()) {\n if (pag.isDefCollider(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n }\n if (okay) {\n newChanges.add(gc);\n }\n }\n if (!newChanges.isEmpty()) {\n possibleChanges.add(newChanges);\n } else {\n possibleChanges.clear();\n break;\n }\n }\n float starthitset = System.currentTimeMillis();\n Collection<GraphChange> hittingSets = IonHittingSet.findHittingSet(possibleChanges);\n recHitTimes.add((System.currentTimeMillis() - starthitset) / 1000.);\n // Part 3.c - checks the newly constructed graphs from 3.b and rejects those that\n // cycles or produce independencies known not to occur from the input PAGs or\n // include undirectedPaths from definite nonancestors\n for (GraphChange gc : hittingSets) {\n boolean badhittingset = false;\n for (Edge edge : gc.getRemoves()) {\n Node node1 = edge.getNode1();\n Node node2 = edge.getNode2();\n Set<Triple> triples = new HashSet<>();\n triples.addAll(gc.getColliders());\n triples.addAll(gc.getNoncolliders());\n if (triples.size() != (gc.getColliders().size() + gc.getNoncolliders().size())) {\n badhittingset = true;\n break;\n }\n for (Triple triple : triples) {\n if (node1.equals(triple.getY())) {\n if (node2.equals(triple.getX()) ||\n node2.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n if (node2.equals(triple.getY())) {\n if (node1.equals(triple.getX()) ||\n node1.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n }\n if (badhittingset) {\n break;\n }\n for (NodePair pair : gc.getOrients()) {\n if ((node1.equals(pair.getFirst()) && node2.equals(pair.getSecond())) ||\n (node2.equals(pair.getFirst()) && node1.equals(pair.getSecond()))) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (!badhittingset) {\n for (NodePair pair : gc.getOrients()) {\n for (Triple triple : gc.getNoncolliders()) {\n if (pair.getSecond().equals(triple.getY())) {\n if (pair.getFirst().equals(triple.getX()) &&\n pag.getEndpoint(triple.getZ(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n\n }\n if (pair.getFirst().equals(triple.getZ()) &&\n pag.getEndpoint(triple.getX(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n }\n if (badhittingset) {\n continue;\n }\n Graph changed = gc.applyTo(pag);\n // if graph change has already been rejected move on to next graph\n if (reject.contains(changed)) {\n continue;\n }\n // if graph change has already been accepted move on to next graph\n if (step3PagsSet.contains(changed)) {\n continue;\n }\n // reject if null, predicts false independencies or has cycle\n if (predictsFalseIndependence(associations, changed)\n || changed.existsDirectedCycle()) {\n reject.add(changed);\n }\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(changed);\n // now add graph to queue\n\n// Graph p = screenForKnowledge(changed);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(changed);\n }\n }\n // exits loop if not looping over adjacencies\n if (!adjacencySearch) {\n break;\n }\n }\n }\n TetradLogger.getInstance().log(\"info\", \"Step 3: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n Queue<Graph> step3Pags = new LinkedList<>(step3PagsSet);\n\n /*\n * Step 4\n *\n * Finds redundant undirectedPaths and uses this information to expand the list\n * of possible graphs\n */\n steps = System.currentTimeMillis();\n Map<Edge, Boolean> necEdges;\n Set<Graph> outputPags = new HashSet<>();\n\n while (!step3Pags.isEmpty()) {\n Graph pag = step3Pags.poll();\n necEdges = new HashMap<>();\n // Step 4.a - if x and y are known to be unconditionally associated and there is\n // exactly one trek between them, mark each edge on that trek as necessary and\n // make the tiples on the trek definite noncolliders\n // initially mark each edge as not necessary\n for (Edge edge : pag.getEdges()) {\n necEdges.put(edge, false);\n }\n // look for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n List<List<Node>> treks = treks(pag, fact.x, fact.y);\n if (treks.size() == 1) {\n List<Node> trek = treks.get(0);\n List<Triple> triples = new ArrayList<>();\n for (int i = 1; i < trek.size(); i++) {\n // marks each edge in trek as necessary\n necEdges.put(pag.getEdge(trek.get(i - 1), trek.get(i)), true);\n if (i == 1) {\n continue;\n }\n // makes each triple a noncollider\n pag.addUnderlineTriple(trek.get(i - 2), trek.get(i - 1), trek.get(i));\n }\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // Part 4.b - branches by generating graphs for every combination of removing\n // redundant undirectedPaths\n boolean elimTreks;\n // checks to see if removing redundant undirectedPaths eliminates every trek between\n // two variables known to be nconditionally assoicated\n List<Graph> possRemovePags = possRemove(pag, necEdges);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n for (Graph newPag : possRemovePags) {\n elimTreks = false;\n // looks for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n if (treks(newPag, fact.x, fact.y).isEmpty()) {\n elimTreks = true;\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // add new PAG to output unless a necessary trek has been eliminated\n if (!elimTreks) {\n outputPags.add(newPag);\n }\n }\n }\n outputPags = removeMoreSpecific(outputPags);\n// outputPags = applyKnowledge(outputPags);\n\n TetradLogger.getInstance().log(\"info\", \"Step 4: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n\n /*\n * Step 5\n *\n * Generate the Markov equivalence classes for graphs and accept only\n * those that do not predict false d-separations\n */\n steps = System.currentTimeMillis();\n Set<Graph> outputSet = new HashSet<>();\n for (Graph pag : outputPags) {\n Set<Triple> unshieldedPossibleColliders = new HashSet<>();\n for (Triple triple : getPossibleTriples(pag)) {\n if (!pag.isAdjacentTo(triple.getX(), triple.getZ())) {\n unshieldedPossibleColliders.add(triple);\n }\n }\n\n PowerSet<Triple> pset = new PowerSet<>(unshieldedPossibleColliders);\n for (Set<Triple> set : pset) {\n Graph newGraph = new EdgeListGraph(pag);\n for (Triple triple : set) {\n newGraph.setEndpoint(triple.getX(), triple.getY(), Endpoint.ARROW);\n newGraph.setEndpoint(triple.getZ(), triple.getY(), Endpoint.ARROW);\n }\n doFinalOrientation(newGraph);\n }\n for (Graph outputPag : finalResult) {\n if (!predictsFalseIndependence(associations, outputPag)) {\n Set<Triple> underlineTriples = new HashSet<>(outputPag.getUnderLines());\n for (Triple triple : underlineTriples) {\n outputPag.removeUnderlineTriple(triple.getX(), triple.getY(), triple.getZ());\n }\n outputSet.add(outputPag);\n }\n }\n }\n\n// outputSet = applyKnowledge(outputSet);\n outputSet = checkPaths(outputSet);\n\n output.addAll(outputSet);\n TetradLogger.getInstance().log(\"info\", \"Step 5: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n runtime = ((System.currentTimeMillis() - start) / 1000.);\n logGraphs(\"\\nReturning output (\" + output.size() + \" Graphs):\", output);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n return output;\n }", "public Iterable<Board> solution()\n {\n Stack<Board> solution = new Stack<Board>();\n \n // for case where initial board is goal board\n if (moves == 0) {\n solution.push(goalNode.board);\n return solution;\n }\n\n step = goalNode;\n \n // add chain of previous node from goal node \n while (step != null) {\n solution.push(step.board);\n step = step.prev;\n }\n \n return solution;\n }", "static void bfs(int[][] G){\n\t\tQueue<Integer> q = new LinkedList<Integer>();\t\t\n\t\tfor (int ver_start = 0; ver_start < N; ver_start ++){\n\t\t\tif (visited[ver_start]) continue;\n\t\t\tq.add(ver_start);\n\t\t\tvisited[ver_start] = true;\n\n\t\t\twhile(!q.isEmpty()){\n\t\t\t\tint vertex = q.remove();\n\t\t\t\tSystem.out.print((vertex+1) + \" \");\n\t\t\t\tfor (int i=0; i<N; i++){\n\t\t\t\t\tif (G[vertex][i] == 1 && !visited[i]){\n\t\t\t\t\t\t// find neigbor of current vertex and not visited\n\t\t\t\t\t\t// add into the queue\n\t\t\t\t\t\tq.add(i);\n\t\t\t\t\t\tvisited[i] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"--\");\t\t\t\n\t\t}\n\t}", "public static boolean Util(Graph<V, DefaultEdge> g, ArrayList<V> set, int colors, HashMap<String, Integer> coloring, int i, ArrayList<arc> arcs, Queue<arc> agenda)\n {\n /*if (i == set.size())\n {\n System.out.println(\"reached max size\");\n return true;\n }*/\n if (set.isEmpty())\n {\n System.out.println(\"Set empty\");\n return true;\n }\n //V currentVertex = set.get(i);\n\n /*System.out.println(\"vertices and mrv:\");\n V start = g.vertexSet().stream().filter(V -> V.getID().equals(\"0\")).findAny().orElse(null);\n Iterator<V> iterator = new DepthFirstIterator<>(g, start);\n while (iterator.hasNext()) {\n V v = iterator.next();\n System.out.println(\"vertex \" + v.getID() + \" has mrv of \" + v.mrv);\n }*/\n\n // Find vertex with mrv\n V currentVertex;\n int index = -1;\n int mrv = colors + 10;\n for (int it = 0; it < set.size(); it++)\n {\n if (set.get(it).mrv < mrv)\n {\n mrv = set.get(it).mrv;\n index = it;\n }\n }\n currentVertex = set.remove(index);\n\n //System.out.println(\"Got vertex: \" + currentVertex.getID());\n\n\n // Try to assign that vertex a color\n for (int c = 0; c < colors; c++)\n {\n currentVertex.color = c;\n if (verifyColor(g, currentVertex))\n {\n\n // We can assign color c to vertex v\n // See if AC3 is satisfied\n /*currentVertex.domain.clear();\n currentVertex.domain.add(c);*/\n if (!agenda.isEmpty()) numAgenda++;\n while(!agenda.isEmpty())\n {\n arc temp = agenda.remove();\n\n // Make sure there exists v1, v2, in V1, V2, such that v1 != v2\n V v1 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.x)).findAny().orElse(null);\n V v2 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.y)).findAny().orElse(null);\n\n\n\n // No solution exists in this branch if a domain is empty\n //if ((v1.domain.isEmpty()) || (v2.domain.isEmpty())) return false;\n\n if (v2.color == -1) continue;\n else\n {\n Boolean[] toRemove = new Boolean[colors];\n Boolean domainChanged = false;\n for (Integer it : v1.domain)\n {\n if (it == v2.color)\n {\n toRemove[it] = true;\n }\n }\n for (int j = 0; j < toRemove.length; j++)\n {\n if ((toRemove[j] != null))\n {\n v1.domain.remove(j);\n domainChanged = true;\n }\n }\n // Need to check constraints with v1 on the right hand side\n if (domainChanged)\n {\n for (arc it : arcs)\n {\n // Add arc back to agenda to check constraints again\n if (it.y.equals(v1.getID()))\n {\n agenda.add(it);\n }\n }\n }\n }\n if ((v1.domain.isEmpty()) || (v2.domain.isEmpty()))\n {\n System.out.println(\"returning gfalse here\");\n return false;\n }\n }\n\n // Reset agenda to check arc consistency on next iteration\n for (int j = 0; j < arcs.size(); j++)\n {\n agenda.add(arcs.get(i));\n }\n\n\n //System.out.println(\"Checking if vertex \" + currentVertex.getID() + \" can be assigned color \" + c);\n coloring.put(currentVertex.getID(), c);\n updateMRV(g, currentVertex);\n if (Util(g, set, colors, coloring, i + 1, arcs, agenda))\n {\n\n return true;\n }\n\n //System.out.println(\"Assigning vertex \" + currentVertex.getID() + \" to color \" + currentVertex.color + \" did not work\");\n coloring.remove(currentVertex.getID());\n currentVertex.color = -1;\n }\n }\n return false;\n }", "private void createEdges() throws IOException {\r\n\t\tString line;\r\n\t\tString fromVertex=null;\r\n\t\tString toVertex=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\ttoVertex= line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"is_a:\"))\r\n\t\t\t\t{\r\n\t\t\t\tfromVertex = nocomment(line.substring(colon+1));\r\n\t\t\t\t//System.out.println(fromVertex+\" to be connected to: \"+toVertex);\r\n\t\t\t\tTerm fromNode = terms.get(fromVertex);\r\n\t\t\t\tTerm toNode = terms.get(toVertex);\r\n\t\t\t\tif (fromNode.namespace.equals(\"molecular_function\") && toNode.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse if (fromNode.namespace.equals(\"biological_process\") && toNode.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addEdge(fromNode, toNode);\r\n\t\t\t\t} \r\n\t\t\t\telse if (fromNode.namespace.equals(\"cellular_component\") && toNode.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"FAILED TO ADD TO DAG, not belonging to the same NAMESPACE\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "private List<List<EdgeType>> buildLongerPaths(List<EdgeType> pathSoFar)\r\n {\r\n\tfinal List<List<EdgeType>> returnList\r\n\t = new ArrayList<List<EdgeType>>();\r\n\tfinal String nextSourceNodeType\r\n\t = pathSoFar.get(pathSoFar.size()-1).getDestType();\r\n\t\r\n\tfor (final EdgeType et : getEdgeTypes(nextSourceNodeType))\r\n\t{\r\n\t final List<EdgeType> listCopy = new ArrayList<EdgeType>(pathSoFar);\r\n\t listCopy.add(et);\r\n\t returnList.add(listCopy);\r\n\t}\r\n\treturn returnList;\r\n }", "public boolean correctCheckConnectGraph(ArrayList<MECountry> countryArr){\n Queue<String> queue = new LinkedList<String>();\n\n //If it is a empty map.\n if(countryArr.isEmpty()){\n return true;\n }\n\n HashMap<String,Boolean> visited = new HashMap<String,Boolean>();\n for(int i=0 ; i<countryArr.size(); i++ ){\n String countryTemp = countryArr.get(i).getCountryName();\n visited.put(countryTemp,false);\n }\n String firstCountry = countryArr.get(0).getCountryName();\n queue.offer(firstCountry);\n //bfs\n while(!queue.isEmpty()){\n String queueHead = queue.poll();\n visited.put(queueHead, Boolean.TRUE);\n for(int j=0 ;j<countryArr.size();j++){\n if(countryArr.get(j).getCountryName().equals(queueHead)){\n String countryNeighbor = countryArr.get(j).getNeighbor();\n countryNeighbor = countryNeighbor.replaceAll(\"\\\\[\",\"\");\n countryNeighbor = countryNeighbor.replaceAll(\"\\\\]\",\"\");\n countryNeighbor = countryNeighbor.replaceAll(\", \",\",\");\n String[] countryNeighbors = countryNeighbor.split(\",\");\n for(int k = 1;k<countryNeighbors.length;k++){\n String readyToAddInQueue = countryNeighbors[k];\n if(visited.get(readyToAddInQueue)==false){\n queue.offer(readyToAddInQueue);\n }\n }\n }\n }\n }\n for (String key: visited.keySet()) {\n if(visited.get(key)==false){\n checkFlagCG = false;\n break;\n }\n }\n return checkFlagCG;\n }", "public void getAllPaths(Graph<Integer> graph) {\n\t\tTopologicalSort obj = new TopologicalSort();\r\n\t\tStack<Vertex<Integer>> result = obj.sort(graph);\r\n\t\t\r\n\t\t// source (one or multiple) must lie at the top\r\n\t\twhile(!result.isEmpty()) {\r\n\t\t\tVertex<Integer> currentVertex = result.pop();\r\n\t\t\t\r\n\t\t\tif(visited.contains(currentVertex.getId())) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstack = new Stack<Vertex<Integer>>();\r\n\t\t\tSystem.out.println(\"Paths: \");\r\n\t\t\tvisited = new ArrayList<Long>();\r\n\t\t\tdfs(currentVertex);\r\n\t\t\t//System.out.println(stack);\r\n\t\t\t//GraphUtil.print(stack);\t\t\t\r\n\t\t}\r\n\r\n\t}", "private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}", "public static void main(String[] args) {\n\t\tint[][] edges = {{0,1},{1,2},{1,3},{4,5}};\n\t\tGraph graph = createAdjacencyList(edges, true);\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) unDirected : \"+getNumberOfConnectedComponents(graph));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) Directed: \"+getNumberOfConnectedComponents(createAdjacencyList(edges, false)));\n\t\t\n\t\t//Shortest Distance & path\n\t\tint[][] edgesW = {{0,1,1},{1,2,4},{2,3,1},{0,3,3},{0,4,1},{4,3,1}};\n\t\tgraph = createAdjacencyList(edgesW, true);\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(graph, 0, 3));\n\t\t\n\t\t//Graph represented in Adjacency Matrix\n\t\tint[][] adjacencyMatrix = {{0,1,0,0,1,0},{1,0,1,1,0,0},{0,1,0,1,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};\n\t\t\n\t\t// Connected components or Friends circle\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Recursive: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Iterative: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(adjacencyMatrix, 0, 3));\n\t\t\n\t\t// Number of Islands\n\t\tint[][] islandGrid = {{1,1,0,1},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Recursive: \"+ getNumberOfIslands(islandGrid));\n\t\t// re-initialize\n\t\tint[][] islandGridIterative = {{1,1,0,0},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Iterative: \"+ getNumberOfIslandsIterative(islandGridIterative));\n\n\n\t}", "public static void main(String[] args) {\n\n Graph myGraph = new Graph();\n myGraph.addNode(\"8\");\n myGraph.addNode(\"1\");\n myGraph.addNode(\"2\");\n myGraph.addNode(\"9\");\n myGraph.addNode(\"7\");\n myGraph.addNode(\"5\");\n myGraph.addEdge(\"8\" , \"1\" , 50);\n myGraph.addEdge(\"5\" , \"1\" , 70);\n myGraph.addEdge(\"7\" , \"5\", 20);\n myGraph.addEdge(\"8\" , \"9\", 100);\n myGraph.addEdge(\"8\" , \"2\", 40);\n String[] trip = {\"8\" , \"1\" , \"5\"};\n String[] trip2 = {\"8\" , \"5\"};\n String[] trip3 = {\"8\" , \"1\" , \"5\" , \"7\" , \"5\" , \"1\" , \"8\" , \"9\"};\n String[] trip4 = {\"8\" , \"9\" , \"5\" };\n String[] trip5 = {\"8\"};\n String[] trip6 = {\"8\" , \"2\"};\n// System.out.println(myGraph);\n// System.out.println(myGraph.getNodes());\n// System.out.println(myGraph.getNeighbors(\"8\"));\n// System.out.println(myGraph.getNeighbors(\"7\"));\n// System.out.println(myGraph.getNeighbors(\"5\"));\n// System.out.println(myGraph.size());\n// System.out.println(myGraph.breadthFirst(\"8\"));\n// System.out.println(myGraph.weightList);\n// System.out.println(myGraph.breadthFirst(\"7\"));\n// System.out.println(myGraph.breadthFirst(\"5\"));\n// System.out.println(myGraph.businessTrip(\"8\",trip));\n// System.out.println(myGraph.businessTrip(\"8\",trip2));\n// System.out.println(myGraph.businessTrip(\"8\",trip3));\n// System.out.println(myGraph.businessTrip(\"8\",trip4));\n// System.out.println(myGraph.businessTrip(\"8\",trip5));\n// System.out.println(myGraph.businessTrip(\"8\",trip6));\n System.out.println(myGraph.depthFirst(\"8\"));\n }", "@Test\n\t\tpublic void test2() {\n\t\t\tConvertGraphToBinaryTree tester=new ConvertGraphToBinaryTree();\n\t\t\tGraphNode n1=tester.new GraphNode(1);GraphNode n2=tester.new GraphNode(2);\n\t\t\tGraphNode n3=tester.new GraphNode(3);GraphNode n4=tester.new GraphNode(4);\n\t\t\tGraphNode n5=tester.new GraphNode(5);GraphNode n6=tester.new GraphNode(6);\n\t\t\tGraphNode n7=tester.new GraphNode(7);GraphNode n8=tester.new GraphNode(8);\n\t\t\tGraphNode n9=tester.new GraphNode(9);\n\t\t\tn1.neighbor.add(n2);n1.neighbor.add(n5);n1.neighbor.add(n6);n1.neighbor.add(n9);\n\t\t\tn2.neighbor.add(n1);n2.neighbor.add(n3);n2.neighbor.add(n7);\n\t\t\tn3.neighbor.add(n2);n3.neighbor.add(n4);n3.neighbor.add(n8);\n\t\t\tn4.neighbor.add(n3);n5.neighbor.add(n1);n6.neighbor.add(n1);\n\t\t\tn7.neighbor.add(n2);n8.neighbor.add(n3);n9.neighbor.add(n1);\n\t\t\tn7.neighbor.add(n6);n6.neighbor.add(n7);n7.neighbor.add(n8);\n\t\t\tn8.neighbor.add(n7);\n\t\t\tassertTrue(!tester.isBinaryTree(n1));\n\t\t\tGraphNode root=tester.convertToBinaryTree(n1);\n\t\t\tGraphNode last=null;\n\t\t\tGraphNode curr=root;\n\t\t\twhile(curr!=null){\n\t\t\t\tSystem.out.print(curr.val+\"->\");\n\t\t\t\tif(curr.neighbor.size()<=1&&root!=curr){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<curr.neighbor.size();i++){\n\t\t\t\t\tGraphNode next=curr.neighbor.get(i);\n\t\t\t\t\tif(next!=last){\n\t\t\t\t\t\tlast=curr;\n\t\t\t\t\t\tcurr=next;\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\tSystem.out.println();\n\t\t}", "public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }", "public ArrayList <Branch> createBranch(){\n\t\tPVector dir1 =PVector.sub(loc_end,loc_begin);\n\t\tPVector dir2 =PVector.sub(loc_end,loc_begin);\n\t\t//println(\"loc_newEnd1: \"+loc_end.x+\" : \"+loc_end.y);\n\t\t//println(\"loc_newEnd1: \"+dir1.x+\" : \"+dir1.y);\n\t\tdir1.rotate(random(PI/4,PI/5));\n\t\tdir1.mult(0.67f);\n\t\tPVector loc_newEnd1 = PVector.add(loc_end,dir1);\n\t\tBranch branch_a = new Branch(this.loc_end,loc_newEnd1);\n\t\t\n\t\tdir2.rotate(random(-PI/4,-PI/5));\n\t\tdir2.mult(0.67f);\n\t\tPVector loc_newEnd2 = PVector.add(loc_end,dir2);\n\t\tBranch branch_b = new Branch(this.loc_end,loc_newEnd2);\n\n\t\tArrayList<Branch> bs = new ArrayList<Branch>() ;\n\t\tbs.add(branch_a);\n\t\tbs.add(branch_b);\n\t\tcomplete=true;\n\n\t\t\n\t\t//println(\"loc_newEnd2: \"+loc_newEnd2.x+\" : \"+loc_newEnd2.y);\n\t\t\n\t\treturn bs;\n\n\t}", "public void kruskalMST()\n\t\t{\n\t\t\tPriorityQueue<Edge> pq = new PriorityQueue<>(allEdges.size(), Comparator.comparingInt(o -> o.roadCost));\n\n\t\t\tfor(int i = 0; i < allEdges.size(); i++)\n\t\t\t{\t\n\t\t\t\tpq.add(allEdges.get(i));\n\t\t\t}\t\t\t\n\n\t\t\tint [] parent = new int[edges];\n\t\t\tmakeSet(parent);\n\t\t\tArrayList<Edge> mst = new ArrayList<>();\n\t\t\tint index = 0, tempCost = 0;\n\n\t\t\t// Step 2: Pick the lowest cost edges to add to our result\n\t\t\twhile(index < edges - 1)\n\t\t\t{\n\t\t\t\tEdge edge = pq.remove();\n\t\t\t\tint x_set = find(parent, edge.source);\n\t\t\t\tint y_set = find(parent, edge.destination);\n\n\t\t\t\t// If creates a cycle, or a road with n wagons can't support the total weight ignore it\n\t\t\t\tif(x_set == y_set /* ||edge.weightCap * wagons < shipWeight */ ){\n\t\t\n\t\t\t\t}else{\n\t\t\t\t\t// These are valid edges for our MST\n\t\t\t\t\tmst.add(edge);\n\t\t\t\t\ttempCost += edge.roadCost;\n\t\t\t\t\tindex++;\n\t\t\t\t\tunion(parent, x_set, y_set);\n\t\t\t\t}\n\t\t\t\t// If there are no edges left, break out of the while loop\n\t\t\t\tif(pq.size() < 1)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ----------- Output working MSTs ----------- \n\t\t\t// printGraph(allEdges);\n\t\t\t// printCities(allCities);\n\n\t\t}", "public void buildPathes() {\n\n for (Fruit fruit :game.getFruits()) {\n\n GraphNode.resetCounterId();\n changePlayerPixels();\n addBlocksVertices();\n Point3D fruitPixels = new Point3D(fruit.getPixels()[0],fruit.getPixels()[1]);\n GraphNode fruitNode = new GraphNode(fruitPixels);\n vertices.add(fruitNode);\n Target target = new Target(fruitPixels, fruit);\n\n //find the neigbours\n BFS();\n\n // build the grpah\n buildGraph(target);\n }\n }", "@Test\n\tpublic void testDAG() {\n\t\tDirectedGraph<Integer, DirectedEdge<Integer>> directedGraph = new DirectedGraph<Integer, DirectedEdge<Integer>>();\n\t\tdirectedGraph.addNode(1);\n\t\tdirectedGraph.addNode(2);\n\t\tdirectedGraph.addNode(3);\n\t\tdirectedGraph.addNode(4);\n\t\tdirectedGraph.addNode(5);\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(1, 2));\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(1, 3));\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(2, 3));\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(4, 5));\n\t\t\n\t\t// tested method calls\n\t\tSet<Integer> reachableNodesFrom1 = service.getReachableNodes(directedGraph, 1);\n\t\tSet<Integer> reachableNodesFrom2 = service.getReachableNodes(directedGraph, 2);\n\t\tSet<Integer> reachableNodesFrom3 = service.getReachableNodes(directedGraph, 3);\n\t\tSet<Integer> reachableNodesFrom4 = service.getReachableNodes(directedGraph, 4);\n\t\tSet<Integer> reachableNodesFrom5 = service.getReachableNodes(directedGraph, 5);\n\t\t\n\t\t// assertions\n\t\tassertEquals(ImmutableSet.of(2, 3), reachableNodesFrom1);\n\t\tassertEquals(ImmutableSet.of(3), reachableNodesFrom2);\n\t\tassertEquals(ImmutableSet.of(), reachableNodesFrom3);\n\t\tassertEquals(ImmutableSet.of(5), reachableNodesFrom4);\n\t\tassertEquals(ImmutableSet.of(), reachableNodesFrom5);\n\t}", "private ScheduleGrph initializeIdenticalTaskEdges(ScheduleGrph input) {\n\n\t\tScheduleGrph correctedInput = (ScheduleGrph) SerializationUtils.clone(input);\n\t\t// FORKS AND TODO JOINS\n\t\t/*\n\t\t * for (int vert : input.getVertices()) { TreeMap<Integer, List<Integer>> sorted\n\t\t * = new TreeMap<Integer, List<Integer>>(); for (int depend :\n\t\t * input.getOutNeighbors(vert)) { int edge = input.getSomeEdgeConnecting(vert,\n\t\t * depend); int weight = input.getEdgeWeightProperty().getValueAsInt(edge); if\n\t\t * (sorted.get(weight) != null) { sorted.get(weight).add(depend); } else {\n\t\t * ArrayList<Integer> a = new ArrayList(); a.add(depend); sorted.put(weight, a);\n\t\t * }\n\t\t * \n\t\t * } int curr = -1; for (List<Integer> l : sorted.values()) { for (int head : l)\n\t\t * {\n\t\t * \n\t\t * if (curr != -1) { correctedInput.addDirectedSimpleEdge(curr, head); } curr =\n\t\t * head; }\n\t\t * \n\t\t * } }\n\t\t */\n\n\t\tfor (int vert : input.getVertices()) {\n\t\t\tfor (int vert2 : input.getVertices()) {\n\t\t\t\tint vertWeight = input.getVertexWeightProperty().getValueAsInt(vert);\n\t\t\t\tint vert2Weight = input.getVertexWeightProperty().getValueAsInt(vert2);\n\n\t\t\t\tIntSet vertParents = input.getInNeighbors(vert);\n\t\t\t\tIntSet vert2Parents = input.getInNeighbors(vert2);\n\n\t\t\t\tIntSet vertChildren = input.getOutNeighbors(vert);\n\t\t\t\tIntSet vert2Children = input.getOutNeighbors(vert2);\n\n\t\t\t\tboolean childrenEqual = vertChildren.containsAll(vert2Children)\n\t\t\t\t\t\t&& vert2Children.containsAll(vertChildren);\n\n\t\t\t\tboolean parentEqual = vertParents.containsAll(vert2Parents) && vert2Parents.containsAll(vertParents);\n\n\t\t\t\tboolean inWeightsSame = true;\n\t\t\t\tfor (int parent : vertParents) {\n\t\t\t\t\tfor (int parent2 : vert2Parents) {\n\t\t\t\t\t\tif (parent == parent2 && input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(parent, vert)) == input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(parent2, vert2))) {\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinWeightsSame = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!inWeightsSame) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tboolean outWeightsSame = true;\n\t\t\t\tfor (int child : vertChildren) {\n\t\t\t\t\tfor (int child2 : vert2Children) {\n\t\t\t\t\t\tif (child == child2 && input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(vert, child)) == input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(vert2, child2))) {\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\toutWeightsSame = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!outWeightsSame) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tboolean alreadyEdge = correctedInput.areVerticesAdjacent(vert, vert2)\n\t\t\t\t\t\t|| correctedInput.areVerticesAdjacent(vert2, vert);\n\n\t\t\t\tif (vert != vert2 && vertWeight == vert2Weight && parentEqual && childrenEqual && inWeightsSame\n\t\t\t\t\t\t&& outWeightsSame && !alreadyEdge) {\n\t\t\t\t\tint edge = correctedInput.addDirectedSimpleEdge(vert, vert2);\n\t\t\t\t\tcorrectedInput.getEdgeWeightProperty().setValue(edge, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn correctedInput;\n\t}", "Success() {\n this.edges = Set.of();\n }", "public static void main(String[] args) {\n /* *************** */\n /* * QUESTION 7 * */\n /* *************** */\n /* *************** */\n\n for(double p=0; p<1; p+=0.1){\n for(double q=0; q<1; q+=0.1){\n int res_1 = 0;\n int res_2 = 0;\n for(int i=0; i<100; i++){\n Graph graph_1 = new Graph();\n graph_1.generate_full_symmetric(p, q, 100);\n //graph_2.setVertices(new ArrayList<>(graph_1.getVertices()));\n Graph graph_2 = (Graph) deepCopy(graph_1);\n res_1+=graph_1.resolve_heuristic_v1().size();\n res_2+=graph_2.resolve_heuristic_v2();\n }\n res_1/=100;\n System.out.format(\"V1 - f( %.1f ; %.1f) = %s \\n\", p, q, res_1);\n res_2/=100;\n System.out.format(\"V2 - f( %.1f ; %.1f) = %s \\n\", p, q, res_2);\n }\n }\n\n }", "@Test\n\t\t\tpublic void test3() {\n\t\t\t\tConvertGraphToBinaryTree tester=new ConvertGraphToBinaryTree();\n\t\t\t\tGraphNode n1=tester.new GraphNode(1);GraphNode n2=tester.new GraphNode(2);\n\t\t\t\tGraphNode n3=tester.new GraphNode(3);GraphNode n4=tester.new GraphNode(4);\n\t\t\t\tGraphNode n5=tester.new GraphNode(5);GraphNode n6=tester.new GraphNode(6);\n\t\t\t\tGraphNode n7=tester.new GraphNode(7);GraphNode n8=tester.new GraphNode(8);\n\t\t\t\tGraphNode n9=tester.new GraphNode(9);\n\t\t\t\tn1.neighbor.add(n2);n1.neighbor.add(n6);\n\t\t\t\tn2.neighbor.add(n1);n2.neighbor.add(n3);n2.neighbor.add(n7);\n\t\t\t\tn3.neighbor.add(n2);n3.neighbor.add(n4);n3.neighbor.add(n8);\n\t\t\t\tn4.neighbor.add(n3);n6.neighbor.add(n1);\n\t\t\t\tn6.neighbor.add(n7);n7.neighbor.add(n6);\n\t\t\t\tn7.neighbor.add(n2);n8.neighbor.add(n3);\n\t\t\t\tassertTrue(!tester.isBinaryTree(n1));\n\t\t\t\tGraphNode root=tester.convertToBinaryTree(n1);\n\t\t\t\tGraphNode last=null;\n\t\t\t\tGraphNode curr=root;\n\t\t\t\twhile(curr!=null){\n\t\t\t\t\tSystem.out.print(curr.val+\"->\");\n\t\t\t\t\tif(curr.neighbor.size()<=1&&root!=curr){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i=0;i<curr.neighbor.size();i++){\n\t\t\t\t\t\tGraphNode next=curr.neighbor.get(i);\n\t\t\t\t\t\tif(next!=last){\n\t\t\t\t\t\t\tlast=curr;\n\t\t\t\t\t\t\tcurr=next;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}", "private void applyLocationAlgorithms() {\n List<NodeState> states = new ArrayList<NodeState>();\n List<RemoteNode> nodes = new ArrayList<RemoteNode>(nodeManager.getNodes());\n AlgorithmMatchCriteria criteria;\n\n for (Algorithm la : algorithmManager.getAlgorithms()) {\n if (!la.isEnabled()) continue;\n criteria = algorithmManager.getCriteria(la);\n\n List<Node> filteredNodes = criteria.filter(nodes);\n if (filteredNodes.size() > 0) {\n states.add(la.applyTo(nodeManager.getLocalNode(), filteredNodes));\n }\n }\n for (NodeState s : states) {\n nodeManager.getLocalNode().addPending(s);\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Node<A>> neighbours(){\n\t\t\n\t\tArrayList<Node<A>> output = new ArrayList<Node<A>>();\n\t\t\n\t\tif (g == null) return output;\n\t\t\n\t\tfor (Object o: g.getEdges()){\n\n\t\t\t\n\t\t\tif (((Edge<?>)o).getTo().equals(this)) {\n\t\t\t\t\n\t\t\t\tif (!output.contains(((Edge<?>)o).getFrom()))\n\t\t\t\t\t\toutput.add((Node<A>) ((Edge<?>)o).getFrom());\n\t\t\t\t\n\t\t\t}\n\n\t\t} \n\t\treturn output;\n\t\t\n\t}", "public Collection<LazyRelationship2> getEdges() {\n long relCount=0;\n ArrayList l = new ArrayList();\n \n for(Path e : getActiveTraverser()){\n for(Path p : getFlushTraverser(e.endNode())){\n if((relCount++%NEO_CACHE_LIMIT)==0){\n l.add(p.lastRelationship());\n clearNeoCache();\n }\n }\n }\n return l; \n }", "public Stack<Vertex> next() {\n Vertex u = lov.pop();\n for (Edge e : u.outEdges) {\n if (!e.to.visited) {\n cameFromEdge.put(e.to.toIdentifier(), e.from);\n if (e.to.x == MazeWorld.width - 1 && e.to.y == MazeWorld.height - 1) {\n reconstruct(cameFromEdge, e.to);\n lov = new Stack<Vertex>();\n }\n else {\n lov.push(u);\n e.to.visited = true;\n lov.push(e.to);\n break;\n }\n }\n }\n return lov;\n }", "private Set<Cell> findShortestRoad(Set<Cell> b, Land land) {\n\t\tfor (Cell cell : b) {\n\t\t\tif (isNextToRoad(cell.i, cell.j, land))\n\t\t\t\treturn new HashSet<Cell>();\n\t\t}\n\t\t\n\t\tSet<Cell> output = new HashSet<Cell>();\n\t\tboolean[][] checked = new boolean[land.side][land.side];\n\t\tQueue<Cell> queue = new LinkedList<Cell>();\n\t\t// add border cells that don't have a road currently\n\t\t// dummy cell to serve as road connector to perimeter cells\n\t\tCell source = new Cell(Integer.MAX_VALUE, Integer.MAX_VALUE);\n\t\tfor (int z = 0; z < land.side; z++) {\n\t\t\tif (b.contains(new Cell(0, z)) || b.contains(new Cell(z, 0)) || b.contains(new Cell(land.side - 1, z))\n\t\t\t\t\t|| b.contains(new Cell(z, land.side - 1)))\n\t\t\t\treturn output;\n\t\t\tif (land.unoccupied(0, z))\n\t\t\t\tqueue.add(new Cell(0, z, source));\n\t\t\tif (land.unoccupied(z, 0))\n\t\t\t\tqueue.add(new Cell(z, 0, source));\n\t\t\tif (land.unoccupied(z, land.side - 1))\n\t\t\t\tqueue.add(new Cell(z, land.side - 1, source));\n\t\t\tif (land.unoccupied(land.side - 1, z))\n\t\t\t\tqueue.add(new Cell(land.side - 1, z, source));\n\t\t}\n\t\t// add cells adjacent to current road cells\n\t\tfor (Cell p : road_cells) {\n\t\t\tfor (Cell q : p.neighbors()) {\n\t\t\t\tif (!road_cells.contains(q) && land.unoccupied(q) && !b.contains(q))\n\t\t\t\t\tqueue.add(new Cell(q.i, q.j, p)); // use tail field of cell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to keep track of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// previous road cell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// during the search\n\t\t\t}\n\t\t}\n\t\twhile (!queue.isEmpty()) {\n\t\t\tCell p = queue.remove();\n\t\t\tchecked[p.i][p.j] = true;\n\t\t\tfor (Cell x : p.neighbors()) {\n\t\t\t\tif (b.contains(x)) { // trace back through search tree to find\n\t\t\t\t\t\t\t\t\t\t// path\n\t\t\t\t\tCell tail = p;\n\t\t\t\t\twhile (!b.contains(tail) && !road_cells.contains(tail) && !tail.equals(source)) {\n\t\t\t\t\t\toutput.add(new Cell(tail.i, tail.j));\n\t\t\t\t\t\ttail = tail.previous;\n\t\t\t\t\t}\n\t\t\t\t\tif (!output.isEmpty())\n\t\t\t\t\t\treturn output;\n\t\t\t\t} else if (!checked[x.i][x.j] && land.unoccupied(x.i, x.j)) {\n\t\t\t\t\tx.previous = p;\n\t\t\t\t\tqueue.add(x);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tif (output.isEmpty() && queue.isEmpty())\n\t\t\treturn null;\n\t\telse\n\t\t\treturn output;\n\t}", "public List<Set<SDGNode>> firstPass() {\n Object[] edges = icfg.edgeSet().toArray();\n\n // first, temporarily remove all edges but CF and CALL\n for (int i = 0; i < edges.length; i++) {\n SDGEdge e = (SDGEdge) edges[i];\n if (e.getKind() != SDGEdge.Kind.CONTROL_FLOW\n && e.getKind() != SDGEdge.Kind.CALL) {\n\n buffer.addFirst(e);\n icfg.removeEdge(e);\n }\n }\n\n // then compute SCCs\n StrongConnectivityInspector<SDGNode, SDGEdge> sci = new StrongConnectivityInspector<SDGNode, SDGEdge>(icfg);\n List<Set<SDGNode>> erg = sci.stronglyConnectedSets();\n\n // put return edges back\n for (SDGEdge e : buffer) {\n icfg.addEdge(e);\n }\n buffer.clear();\n\n return erg;\n }", "public List<SearchNode> expand() {\n\n List<SearchNode> neighbours = new ArrayList<>();\n\n if (this.getX() > 0) {\n SearchNode left = new SearchNode(this.getX() - 1, this.getY(), this.getDepth() + 1);\n neighbours.add(left);\n }\n if (this.getX() < 14) {\n SearchNode right = new SearchNode(this.getX() + 1, this.getY(), this.getDepth() + 1);\n neighbours.add(right);\n }\n if (this.getY() > 0) {\n SearchNode up = new SearchNode(this.getX(), this.getY() - 1, this.getDepth() + 1);\n neighbours.add(up);\n }\n if (this.getY() < 14) {\n SearchNode down = new SearchNode(this.getX(), this.getY() + 1, this.getDepth() + 1);\n neighbours.add(down);\n }\n\n return neighbours;\n }", "List<IEdge> getAllEdges();", "public List<Integer> findMinHeightTrees(int n, int[][] edges) {\n List<Integer> ans = new ArrayList<>();\n if (n == 0) return ans;\n if (n == 1) {\n ans.add(0);\n return ans;\n }\n if (n == 2) {\n ans.add(0);\n ans.add(1);\n return ans;\n }\n\n //build graph\n List<Integer>[] graph = new ArrayList[n];\n for (int i = 0; i < n; i++) {\n graph[i] = new ArrayList<>();\n }\n for (int i = 0; i < edges.length; i++) {\n int v1 = edges[i][0];\n int v2 = edges[i][1];\n\n graph[v1].add(v2);\n graph[v2].add(v1);\n }\n\n //initial leaves\n List<Integer> leaves = new ArrayList<>();\n for (int i = 0; i < n; i++) {\n if (graph[i].size() == 1) {\n leaves.add(i);\n }\n }\n\n int count = n;\n\n while (count > 2) {\n int leasize = leaves.size();\n count -= leasize;\n List<Integer> newleaves = new ArrayList<Integer>();\n for (int i = 0; i < leasize; i++) {\n int leavenode = leaves.get(i);\n int verToleave = graph[leavenode].get(0);\n graph[verToleave].remove(Integer.valueOf(leavenode));\n if (graph[verToleave].size() == 1) {\n newleaves.add(verToleave);\n }\n }\n\n leaves = newleaves;\n }\n return leaves;\n\n\n }", "public static void main(String[] args) {\n\n Node n1 = new Node(1);\n Node n2 = new Node(2);\n Node n3 = new Node(3);\n Node n4 = new Node(4);\n\n n1.neighbors.add(n2);\n n1.neighbors.add(n4);\n n2.neighbors.add(n1);\n n2.neighbors.add(n4);\n n3.neighbors.add(n2);\n n3.neighbors.add(n4);\n n4.neighbors.add(n1);\n n4.neighbors.add(n3);\n\n for (Node n : n1.neighbors) {\n System.out.print(n.val + \" \");\n }\n for (Node n : n2.neighbors) {\n System.out.print(n.val + \" \");\n }\n for (Node n : n3.neighbors) {\n System.out.print(n.val + \" \");\n }\n for (Node n : n4.neighbors) {\n System.out.print(n.val + \" \");\n }\n\n System.out.println();\n Node result = Solution.cloneGraph(n1);\n printGraph(result, 4);\n\n }", "public void createEdges() {\n \tfor(String key : ways.keySet()) {\n \t Way way = ways.get(key);\n \t if(way.canDrive()) {\n \t\tArrayList<String> refs = way.getRefs();\n \t\t\t\n \t\tif(refs.size() > 0) {\n \t\t GPSNode prev = (GPSNode) this.getNode(refs.get(0));\n \t\t drivableNodes.add(prev);\n \t\t \n \t\t GPSNode curr = null;\n \t\t for(int i = 1; i <refs.size(); i++) {\n \t\t\tcurr = (GPSNode) this.getNode(refs.get(i));\n \t\t\tif(curr == null || prev == null)\n \t\t\t continue;\n \t\t\telse {\n \t\t\t double distance = calcDistance(curr.getLatitude(), curr.getLongitude(),\n \t\t\t\t prev.getLatitude(), prev.getLongitude());\n\n \t\t\t GraphEdge edge = new GraphEdge(prev, curr, distance, way.id);\n \t\t\t prev.addEdge(edge);\n \t\t\t curr.addEdge(edge);\n \t\t\t \n \t\t\t drivableNodes.add(curr);\n \t\t\t prev = curr;\n \t\t\t}\n \t\t }\t\n \t\t}\n \t }\n \t}\n }", "@Test\n public void testSimplify2() {\n ControlFlowGraph graph = new ControlFlowGraph();\n\n ControlFlowNode branch1 = new ControlFlowNode(null, graph, BRANCH);\n ControlFlowNode branch2 = new ControlFlowNode(null, graph, BRANCH);\n ControlFlowNode node1 = new ControlFlowNode(null, graph, STATEMENT);\n ControlFlowNode node2 = new ControlFlowNode(null, graph, STATEMENT);\n ControlFlowNode fictitious = new ControlFlowNode(null, graph, CONVERGE);\n ControlFlowNode fictitious2 = new ControlFlowNode(null, graph, CONVERGE);\n\n\n\n graph.addEdge(branch1, branch2);\n graph.addEdge(branch1, fictitious);\n graph.addEdge(branch2, node1);\n graph.addEdge(branch2, fictitious);\n graph.addEdge(node1, fictitious);\n graph.addEdge(fictitious, fictitious2);\n graph.addEdge(fictitious2, node2);\n\n graph.simplifyConvergenceNodes();\n\n assertTrue(graph.containsEdge(branch1, node2));\n assertTrue(graph.containsEdge(branch2, node2));\n assertTrue(graph.containsEdge(node1, node2));\n assertFalse(graph.containsVertex(fictitious));\n assertFalse(graph.containsVertex(fictitious2));\n }", "@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }", "public Map<Node, MyNode> extractNodes(int numNodes){\r\n\t\t//If numNodes is less than one or there aren't enough nodes, return null\r\n\t\tif (numNodes < 1 || nodesMap.size() < numNodes){\r\n\t\t\treturn null;\r\n\t\t} \r\n\r\n\t\t//Initialize the result set\r\n\t\tMap<Node, MyNode> result = new HashMap<Node, MyNode>();\r\n\r\n\t\t//Special case: If there are no relationships, then return all nodes.\r\n\t\tif(rels.size() == 0){\r\n\t\t\tfor (Node node : nodesMap.keySet()){\r\n\t\t\t\tresult.put(node, nodesMap.get(node));\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\t//tempRels (used for crawling through the gp)\r\n\t\tList<Relationship> tempRels = new ArrayList<Relationship>();\r\n\t\ttempRels.addAll(relsMap.keySet());\r\n\r\n\t\t//Shuffle the tempRels list for random order.\r\n\t\tCollections.shuffle(tempRels, random);\r\n\r\n\t\tboolean first = true;\t//flag for first run\r\n\r\n\t\twhile (result.size() < numNodes) {\t//Loop until we have reached the required result size.\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\t\t\t\t\r\n\t\t\t\tif (first){\t\t\t//On the first run\r\n\t\t\t\t\tfirst = false;\t//Update flag\r\n\r\n\t\t\t\t\t//Pick a random relationship and extract its nodes\r\n\t\t\t\t\tRelationship rel = tempRels.get(random.nextInt(tempRels.size()));\r\n\t\t\t\t\ttempRels.remove(rel);\r\n\t\t\t\t\tNode src = rel.getStartNode();\r\n\t\t\t\t\tNode tgt = rel.getEndNode();\r\n\r\n\r\n\t\t\t\t\tif (numNodes > 1){\r\n\t\t\t\t\t\t//If numNodes > 1, then add both nodes to result\r\n\t\t\t\t\t\tresult.put(src, nodesMap.get(src));\r\n\t\t\t\t\t\tresult.put(tgt, nodesMap.get(tgt));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//If numNodes == 1, then randomly pick one of the nodes to add to result\r\n\t\t\t\t\t\tif (random.nextBoolean()){\r\n\t\t\t\t\t\t\tresult.put(src, nodesMap.get(src));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tresult.put(tgt, nodesMap.get(tgt));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\t//On subsequent runs\r\n\r\n\t\t\t\t\tboolean done = false;\t//Flag to specify we're done with this iteration\r\n\t\t\t\t\tint idx = 0;\t\t\t//Loop index counter\r\n\t\t\t\t\twhile (!done){\r\n\t\t\t\t\t\t//Pick the next relationship in tempRels\r\n\t\t\t\t\t\tRelationship rel = tempRels.get(idx);\r\n\t\t\t\t\t\tidx++;\r\n\t\t\t\t\t\tNode other = null;\r\n\r\n\t\t\t\t\t\tif (result.keySet().contains(rel.getStartNode()) && (!result.keySet().contains(rel.getEndNode()))){\r\n\t\t\t\t\t\t\t//If the startNode of the relationship is already in results, but not the end node\r\n\t\t\t\t\t\t\t//then set other to be the end node\r\n\t\t\t\t\t\t\tother = rel.getEndNode();\r\n\t\t\t\t\t\t\tdone = true;\r\n\t\t\t\t\t\t} else if ((!result.keySet().contains(rel.getStartNode())) && result.keySet().contains(rel.getEndNode())){\r\n\t\t\t\t\t\t\t//If the startNode of the relationship is not in results, but the end node is\r\n\t\t\t\t\t\t\t//then set other to be the start node\r\n\t\t\t\t\t\t\tother = rel.getStartNode();\r\n\t\t\t\t\t\t\tdone = true;\r\n\t\t\t\t\t\t} else if (result.keySet().contains(rel.getStartNode()) && result.keySet().contains(rel.getEndNode())){\r\n\t\t\t\t\t\t\t//If both of the nodes of the relationship are in result, remove it from the list\r\n\t\t\t\t\t\t\ttempRels.remove(rel);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//If we found a matching relationship\r\n\t\t\t\t\t\tif (done){\r\n\t\t\t\t\t\t\t//Add other to the result, and its corresponding mapping\r\n\t\t\t\t\t\t\tresult.put(other, nodesMap.get(other));\r\n\t\t\t\t\t\t\t//Remove rel from the list\r\n\t\t\t\t\t\t\ttempRels.remove(rel);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static void main(String[] args) {\n BinaryTreeNode<Integer> tree = new BinaryTreeNode<>(3);\n tree.setLeft(new BinaryTreeNode<>(2));\n tree.getLeft().setLeft(new BinaryTreeNode<>(1));\n tree.getLeft().getLeft().setLeft(new BinaryTreeNode<>(10));\n tree.getLeft().getLeft().getLeft().setRight(new BinaryTreeNode<>(13));\n tree.setRight(new BinaryTreeNode<>(5));\n tree.getRight().setLeft(new BinaryTreeNode<>(4));\n tree.getRight().setRight(new BinaryTreeNode<>(6));\n List<List<Integer>> result = btDepthOrder(tree);\n List<List<Integer>> goldenRes = new ArrayList<>();\n goldenRes.add(Arrays.asList(3));\n goldenRes.add(Arrays.asList(2, 5));\n goldenRes.add(Arrays.asList(1, 4, 6));\n goldenRes.add(Arrays.asList(10));\n goldenRes.add(Arrays.asList(13));\n goldenRes.add(new ArrayList());\n System.out.println(goldenRes.equals(result));\n System.out.println(result);\n }", "Set<Edge> getIncomingNeighborEdges(boolean onUpwardPass) {\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID < v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn _outgoingEdges;\n\t\t\t\treturn outgoingEdges;\n\t\t}", "private int createEdges() {\n\t\t// Use random numbers to generate random number of edges for each vertex\n\t\tint avgNumEdgesPerVertex = this.desiredTotalEdges / this.vertices.size();\n\t\tint countSuccessfulEdges = 0;\n\t\t// In order to determine the number of edges to create for each vertex\n\t\t// get a random number between 0 and 2 times the avgNumEdgesPerVertex\n\t\t// then add neighbors (edges are represented by the number of neighbors each\n\t\t// vertex has)\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\tfor (int j = 0; j <= (this.randomGen(avgNumEdgesPerVertex * 50) + 1); j++) {\n\t\t\t\t// select a random vertex from this.vertices (vertex list) and add as neighbor\n\t\t\t\t// ensure we don't add a vertex as a neighbor of itself\n\t\t\t\tint neighbor = this.randomGen(this.vertices.size());\n\t\t\t\tif (neighbor != i)\n\t\t\t\t\tif (this.vertices.get(i).addNeighbor(this.vertices.get(neighbor))) {\n\t\t\t\t\t\tthis.vertices.get(neighbor).addNeighbor(this.vertices.get(i));\n\t\t\t\t\t\tcountSuccessfulEdges++;\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn countSuccessfulEdges;\n\t}", "public static ArrayList<PathEdge> kruskals(Graph g) {\n Set<Vertex> setVertexes = new HashSet<Vertex>(g.getVertexes());\n\t\tDisjointSets<Vertex> ds = new DisjointSets<Vertex>(setVertexes);\n\n PriorityQueue<PathEdge> pq = new PriorityQueue<PathEdge>();\n ArrayList<PathEdge> mst = new ArrayList<PathEdge>();\n for (PathEdge e : g.getEdges()) {\n pq.add(e);\n }\n\t\tSystem.out.println(\"value of pq\"+pq);\n\n while (!pq.isEmpty() && mst.size() < g.getVertexes().size() - 1) {\n PathEdge e = pq.poll();\n Vertex v = e.getSource();\n Vertex u = e.getDestination();\n if (!ds.sameSet(u, v)) {\n ds.merge(v, u);\n mst.add(e);\n }\n if(g.getVertexes().size()-1 == mst.size()){\n return mst;\n }\n }\n return null;\n }", "public void aEstrella2 (String input)\r\n\t{\r\n\t\tNode root_aEstrella2 = new Node (input);\r\n\t\tNode current = new Node(root_aEstrella2.getState());\r\n\t\t\r\n\t\tHeuristicComparator aEstrella_comparator = new HeuristicComparator();\r\n\t\tPriorityQueue<Node> queue_gbfs = new PriorityQueue<Node>(12, aEstrella_comparator);\r\n\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\r\n\t\tint nodes_popped = 0;\r\n\t\tint pqueue_max_size = 0;\r\n\t\tint pq_size = 0;\r\n\t\t\r\n\t\tcurrent.cost = 0;\r\n\t\t\r\n\t\twhile(!goal_aEstrella2)\r\n\t\t{\r\n\t\t\tvisited.add(current.getState());\r\n\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\r\n\t\t\tfor (String a : children)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\tvisited.add(nino.getState());\r\n\t\t\t\t\t\r\n\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\tint manhattanD = manhattanDistance(nino.getState(), root_aEstrella2.getState());\r\n\t\t\t\t\tnino.setTotalCost(nino.parent.getTotalCost() + nino.cost);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// f(n) = g(n) + h(n)\r\n\t\t\t\t\tnino.setHeuristicCost(nino.getTotalCost() + manhattanD);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue_gbfs.add(nino);\r\n\t\t\t\t\t\tpq_size++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Repeated State checking. Removing the same node from PQ if the path cost is less then the current one \r\n\t\t\t\t\telse if (queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (Node original : queue_gbfs)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (original.equals(nino))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tNode copy = original;\r\n\t\t\t\t\t\t\t\tif (nino.getHeuristicCost() < copy.getHeuristicCost())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.remove(copy);\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.add(nino);\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\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = queue_gbfs.poll();\r\n\t\t\tnodes_popped++;\r\n\t\t\t\r\n\t\t\tif (pq_size > pqueue_max_size)\r\n\t\t\t{\r\n\t\t\t\tpqueue_max_size = pq_size;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpq_size--;\r\n\t\t\tgoal_aEstrella2 = isGoal(current.getState());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tgoal_aEstrella2 = false;\r\n\t\tSystem.out.println(\"A*2 Solved!!\");\r\n\t\tSolution.performSolution(current, root_aEstrella2, nodes_popped, pqueue_max_size);\r\n\t}", "void findSearchOrder() {\n boolean filled = false;\n for(int node: queryGraphNodes.keySet()) {\n\n vertexClass vc = queryGraphNodes.get(node);\n searchOrderSeq.add(node);\n for(int edge: queryGraphNodes.get(node).edges.keySet()) {\n filled = calcOrdering(edge);\n if (filled)\n break;\n }\n if(searchOrderSeq.size() == queryGraphNodes.size())\n break;\n\n }\n\n }", "private void processOverlay(){\n \n // go for as long as edges still exist.\n while(this.availableVertices.size() > 0)\n {\n \n // pick the least weight vertex.\n Vertex next = this.availableVertices.poll(); // finding the least weight vertex.\n int distanceToNext = this.distances.get(convertToString(next.getVertexPortNum())); // must use the string version of the portnum.\n \n // and for each available squad member of the chosen vertex\n List<Edge> nextSquad = next.getSquad(); \n for(Edge e: nextSquad)\n {\n Vertex other = e.getNeighbor(next);\n if(this.visitedVertices.contains(other))\n {\n continue; // continue the while loop in this case.\n }\n \n // check for a shorter path, update if a new path is found within the overlay.\n int currentWeight = this.distances.get(convertToString(other.getVertexPortNum())); // using string version of the port number.\n int newWeight = distanceToNext + e.getWeight();\n \n if(newWeight < currentWeight){\n this.predecessors.put(convertToString(other.getVertexPortNum()), convertToString(next.getVertexPortNum())); // use the string versions of the port numbers.\n this.distances.put(convertToString(other.getVertexPortNum()), newWeight); // use the string version of the port numbers.\n // updating here.\n this.availableVertices.remove(other);\n this.availableVertices.add(other);\n }\n \n }\n \n this.visitedVertices.add(next); // add this vertex as \"visited\" so we do not visit it again.\n }\n }" ]
[ "0.7156566", "0.647335", "0.6265242", "0.6177326", "0.6132542", "0.5799891", "0.5779478", "0.5776345", "0.57624584", "0.5712768", "0.566525", "0.56618506", "0.55477107", "0.5533663", "0.5524141", "0.54794496", "0.54691076", "0.5464939", "0.54453534", "0.54421127", "0.54349875", "0.5416614", "0.5416596", "0.5416305", "0.5412221", "0.5387194", "0.53806746", "0.5370909", "0.53649986", "0.53436303", "0.5340474", "0.53395265", "0.533471", "0.5334176", "0.5309961", "0.5265268", "0.52617645", "0.52580535", "0.52465606", "0.5240777", "0.5240752", "0.5240391", "0.5228236", "0.5220823", "0.5219158", "0.5212393", "0.52116215", "0.52059036", "0.51974446", "0.51802063", "0.5178679", "0.5172368", "0.51721543", "0.5168984", "0.5167422", "0.51590186", "0.51576316", "0.514819", "0.5129275", "0.51127714", "0.51107216", "0.51070434", "0.5105747", "0.51053596", "0.5093975", "0.50927854", "0.5090656", "0.5087857", "0.50844467", "0.5083386", "0.5066884", "0.50631654", "0.5060095", "0.5058689", "0.50569314", "0.5054755", "0.50439376", "0.5038238", "0.5029131", "0.50286466", "0.5023005", "0.5014777", "0.5011443", "0.5006246", "0.5004206", "0.5002309", "0.4996286", "0.49940902", "0.4992834", "0.4990446", "0.49896467", "0.49895546", "0.49878234", "0.49868348", "0.4984066", "0.4981775", "0.49729952", "0.49720213", "0.49693584", "0.49683255", "0.4964487" ]
0.0
-1
used to set movie page
public void setPage(View view){ HashMap movie = movieDataJson.getItem(0); String movieName = (String)movie.get("name"); String movieStars = (String)movie.get("stars"); String movieYear = (String)movie.get("year"); String movieDescription = (String)movie.get("description"); movieDescrip = movieDescription; String movieDirector = (String)movie.get("director"); String movieLength = (String)movie.get("length"); double movieRating = (double)movie.get("rating"); movieNameTV = (TextView)view.findViewById(R.id.movieName); movieStarsIV = (TextView)view.findViewById(R.id.stars); movieYearIV = (TextView)view.findViewById(R.id.year); movieDescriptionIV = (TextView)view.findViewById((R.id.description)); movieDirectorIV = (TextView)view.findViewById(R.id.director); movieLengthIV = (TextView)view.findViewById(R.id.length); movieRatingIV = (TextView)view.findViewById(R.id.rating); movieRatingBar = (RatingBar)view.findViewById(R.id.ratingBar); movieNameTV.setText(movieName); movieStarsIV.setText(movieStars); movieDescriptionIV.setText(movieDescription); movieYearIV.setText("("+movieYear+")"); movieDirectorIV.setText(movieDirector); movieLengthIV.setText(movieLength); movieRatingIV.setText(String.valueOf(movieRating)+"/10"); movieRatingBar.setRating((float)movieRating/2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onLoadMovie(Movie movie);", "private void setMovie() {\n Movie movie = getIntent().getExtras().getParcelable(MOVIE);\n Glide.with(mMoviePoster).setDefaultRequestOptions(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.ALL)).load(BuildConfig.IMG_DIR + movie.getPosterPath())\n .into(mMoviePoster);\n setTitle(movie.getTitle());\n mMovieTitle.setText(movie.getTitle());\n mMovieRating.setText(String.valueOf(movie.getVoteAverage()));\n mMovieDate.setText(movie.getReleaseDate());\n mMovieGenre.setText(movie.isAdult() ? getString(R.string.genre_type_adults) : getString(R.string.genre_type_all));\n mMovieDesc.setText(movie.getOverview());\n }", "void movieScreenData(MovieStoreResponse movieStoreResponse, boolean isFirstPage);", "public void setPage(Page page) {this.page = page;}", "public void setThisManual()\n { \n actual = 1;\n \n nextPage = new Label();\n addObject(nextPage, 1132, 2001);\n \n prePage = new Label();\n addObject(prePage, 122, 2007);\n \n prePage.setImage(new GreenfootImage(\"\", 0, null, null));\n nextPage.setImagine(\"sipka1\");\n \n callMenu = new CallMenu();\n addObject(callMenu, 667, 60);\n }", "void setPageStart(short start);", "public void setMovie(Movie movie) {\n this.movie = movie;\n }", "public VideoPage()\r\n\t{\r\n\t}", "public void setPage(Page page) {\n this.page=page;\n }", "public void setPage(Page page) {\n this.page=page;\n }", "public void setPageInfo(){\n\t\tif(AllP>=1){\n\t\t\tPageInfo=\"<table border='0' cellpadding='3'><tr><td>\";\n\t\t\tPageInfo+=\"Show: \"+PerR+\"/\"+AllR+\" Records!&nbsp;\";\n\t\t\tPageInfo+=\"Current page: \"+CurrentP+\"/\"+AllP;\n\t\t\tPageInfo+=\"</td></tr></table>\";\t\t\t\n\t\t}\t\t\t\t\n\t}", "public void setPage(int page) {\n this.page = page;\n }", "void openNextFrameSet();", "public void newPage(FrameDesc fdesc) {\n // no need to update frame state\n }", "public void gotoVideoLandingPage(){\r\n\t\twebAppDriver.get(baseUrl+\"/videos.aspx\");\r\n\t\t//need to add verification text\r\n\t}", "private void showMovieDetails() {\n\n if (movie != null) {\n\n // Display movie title, year, and overview into corresponding labels\n if (movie.getReleaseDate().equals(\"\")) {\n\n lblTitle.setText(movie.getMovieTitle());\n lblOverview.setText(movie.getMovieOverview());\n } else {\n\n lblTitle.setText(String.format(\"%s (%s)\", movie.getMovieTitle(), movie.getReleaseDate()));\n lblOverview.setText(movie.getMovieOverview());\n }\n\n // Display movie media into an image view\n downloadPoster();\n }\n }", "public void setUpVideo() {\n\n videosViewPager.setVisibility(VISIBLE);\n StorageReference filePath = storageReference.child(\"images\").child(new ArrayList<>(videos.keySet()).get(position));\n filePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n videosViewPager.setVideoURI(uri);\n videosViewPager.setMediaController(mediaController);\n mediaController.setAnchorView(videosViewPager);\n videosViewPager.requestFocus();\n }\n });\n //String videoPath = \"android.resource://\"+activity.getPackageName()+\"/\";\n //Uri uri = Uri.parse(videoPath);\n\n// DisplayMetrics displayMetrics = new DisplayMetrics();\n// activity.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n// int height = displayMetrics.heightPixels;\n// int width = displayMetrics.widthPixels;\n//\n//\n// videosViewPager.setMinimumHeight(height);\n// videosViewPager.setMinimumWidth(width);\n// videosViewPager.setVideoURI(uri);\n// videosViewPager.setMediaController(mediaController);\n// mediaController.setAnchorView(videosViewPager);\n// videosViewPager.requestFocus();\n //videosViewPager.start();\n\n\n\n }", "public void setCurrentPage(int pageNumber) {\n\t\t\n\t}", "static public void set_movie_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"movie name:\", \"rating:\", \"release year:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct a.id, a.name, a.num_links, a.year_born \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_cinema_actors a, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_cinema_actor_movie am\" +\n\t\t\t\t\t\t\t\t\t\t\t\" where am.actor_id=a.id and am.movie_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by num_links desc \";\n\t\t\n\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct a.id, a.name, a.num_links, a.year_born \" +\n\t\t\t\t\" from curr_cinema_actors a \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"actor name\", \"rating\", \"birth year\"};\n\t\tEdit_row_window.label_min_parameter=\"min. birth year:\";\n\t\tEdit_row_window.linked_category_name = \"ACTORS\";\n\t}", "@Override\n public void onPageSelected(int page) {\n \n Multimedia m = multimediaList.get(page);\n \n if(m.getMas_info() == null || m.getMas_info().trim().equals(\"\"))\n {\n moreInfoButton.setVisibility(View.GONE);\n }\n else\n {\n moreInfoButton.setVisibility(View.VISIBLE);\n }\n \n\n if(m.getTipo() != MMType.Video){\n continuarButton.setVisibility(View.GONE);\n }\n else\n {\n continuarButton.setVisibility(View.VISIBLE);\n }\n }", "private void videoVisible() {\n }", "public void pressMovieButton() {\n System.out.println(\"Home: You must pick an app to show movies.\\n\");\n }", "@Override\n public void pressMovieButton() {\n System.out.println(\"Home: You must pick an app to show movies.\");\n }", "void setUsePage(boolean page);", "public void setVideo(String video) {\n this.video = video;\n }", "public void setVideo(File video){\n\t\tthis.video = video;\n\t}", "@Override\n\tvoid postarVideo() {\n\n\t}", "public void movieDisplay(){\n actor.display();\n }", "public void setRequestPage(PageRequest pageable) {\n List<PlayInfo> playInfoList = new ArrayList<>();\n PlayInfo playInfo1 = new PlayInfo();\n playInfo1.name = \"Adventures of Huckleberry Finn\";\n playInfo1.briefIntro = \"a boy's story\";\n playInfo1.posterURL = \"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1521049025342&di=b8152a98cb6aee22fc5cdd20e2562bbb&imgtype=0&src=http%3A%2F%2Fwww.kfzimg.com%2FG05%2FM00%2F52%2F01%2Fp4YBAFfXiF2ASrT7AALI-jIjL0M031_b.jpg\";\n PlayInfo playInfo2 = new PlayInfo();\n playInfo2.name = \"Blue whale\";\n playInfo2.briefIntro = \"a big mammal\";\n playInfo2.posterURL = \"http://pic28.photophoto.cn/20130727/0035035114302168_b.jpg\";\n playInfoList.add(playInfo1);\n playInfoList.add(playInfo2);\n Resource<List<PlayInfo>> a = Resource.success(playInfoList);\n setValue(a);\n }", "public void setPage(Page page) {\n\t\tthis.page = page;\n\t}", "public void onPageChange(int newPage){\n if(newPage == MediaReviewerPagerActivity.MEDIA_PAGE){\n onEnterPage();\n } else {\n onExitPage();\n }\n }", "protected void auto() {\n\t\tmPagefactory.onDraw(mCurPageCanvas);\n\t\tmPageWidget.setBitmaps(mCurPageBitmap, mNextPageBitmap);\n\t\tmPageWidget.startAnimation(1000);\n\t}", "private void startMovieDownload() {\n String sortOrder = AppPrefs.getInstance(this).getLastSortOrder();\n if (null == sortOrder) {\n sortOrder = SortBy.getDefaultSortOrder();\n }\n downloadData(sortOrder);\n }", "public void setPage(int value) {\n this.page = value;\n }", "public void pageSwitch(ActionEvent event, String filename, Stage stage) throws IOException {\n //// PAGE SWITCHING ////\n //////////////////////////////////////////////////////\n Parent root;\n// Stage stage;\n// stage=(Stage) b.getScene().getWindow();\n FXMLLoader loader = new FXMLLoader();\n // System.out.println(new File(\"src/main/java/UI/WelcomePage.fxml\").toURI());\n // System.out.println(getClass().getResource(\"/src/main/java/UI/WelcomePage.fxml\"));\n\n //loader.setLocation(new File(\"src/main/java/UI/\" + filename).toURI().toURL());\n loader.setLocation(getClass().getResource(\"/\" + filename));\n\n AttributeContainer ac = AttributeContainer.getInstance();\n printStackTrace(filename, ac);\n ac.backlog.push(filename);\n root = loader.load();\n Scene scene = new Scene(root, 1360, 760);\n stage.setScene(scene);\n stage.show();\n stage.setResizable(false);\n //////////////////////////////////////////////////////\n //// DATA SHARING & CONTROLLER INITIALIZATION ////\n //////////////////////////////////////////////////////\n PageControllerUI controller = loader.getController();\n// controller.setStage_DontTouch(stage);\n AttributeContainer.getInstance().current_page = controller;\n controller.onLoad();\n }", "public void SetUrl(String url)\n\t{\n\t if (video_view.isPlaying())\n\t {\n\t video_view.stopPlayback();\n\t }\n\t \n Uri uri = Uri.parse(url);\n video_view.setVideoURI(uri);\n\t}", "public void setPage(ICPage page) {\n \t\t_page = page;\n \t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onLoadVideo(String result) {\n\n\t\t\t\t\t\t\t\t}", "private void printMovieMiniMenu() throws IOException{\n\t\tprintMiniMenu(\"2.Back to Movie Menu\");\n\t\t//if we passed the printMiniMenu() call, we know the user chose to search again rather than going back to the login menu\n\t\tsearchMovies();\t\n\t}", "public void setFrame(String frame){\r\n\t\taddAttribute(new PointingElement(\"frame\",frame));\r\n\t}", "public void viePage(URL link) throws IOException\n {\n this.mainEditorPane.setPage(link);\n }", "private void parseMovie(String url) {\n\t\tBoolean is3D = false;\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(WOLFF + url).get();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\t\t\n\n\t\tString movietitle = doc.select(\"#wrapper_left h2\").first().text().trim();\n\t\tSystem.out.println(\"Movie: \" + movietitle);\n\t\t\n\t\t// check if it is 3D movie\n\t\tif(url.contains(\"-3d\")) {\n\t\t\tis3D = true;\n\t\t}\n\n\t\t//create resource movie with the type 'Movie' and data property 'title'\n\t\tResource movie = m.createResource(MOVIE + url.replace(\"/film/\", \"\"));\n\t\tmovie.addProperty(RDF.type, m.getProperty(NS + \"Movie\"))\n\t\t\t .addProperty(m.getProperty(NS + \"title\"), movietitle);\n\n\t\t//if it is 3D movie..\n\t\tif(is3D)\n\t\t\tmovie.addProperty(m.getProperty(NS + \"hasPresentation\"), m.getResource(NS + \"3D\"));\n\n\t\t// does it have corresponding dbpedia resource?\n\t\tString mResult;\n\t\tif((mResult = SparqlQuery.movieInDbpediaEn(movietitle)) != null) {\n\t\t\ttemp = ResourceFactory.createResource(mResult);\n\t\t\tmovie.addProperty(OWL.sameAs, temp);\n\t\t} //else if((mResult = SparqlQuery.movieInDbpediaNl(movietitle)) != null) {\n//\t\t\ttemp = ResourceFactory.createResource(mResult);\n//\t\t\tmovie.addProperty(OWL.sameAs, temp);\n//\t\t}else if((mResult = SparqlQuery.movieInDbpediaDe(movietitle)) != null) {\n//\t\t\ttemp = ResourceFactory.createResource(mResult);\n//\t\t\tmovie.addProperty(OWL.sameAs, temp);\n//\t\t}\n//\t\t\n\t\t//parse sidebar information\n\t\tElements sidebar = doc.select(\".sidebar_container\").get(1).select(\".table_view tr td\");\n\t\t\n\t\tfor (Element element:sidebar) {\n\t\t\tswitch (element.select(\"strong\").text()) {\n\t\t\t//get all actors\n\t\t\tcase \"Acteurs\":\n\t\t\t\tString[] actors = element.text().substring(8).split(\", \"); //Remove \"Acteurs\" from string\n\t\t\t\tfor(String actor : actors) {\n\t\t\t\t\tResource person = m.createResource(PERSON + actor.replace(\" \", \"_\"));\n\t\t\t\t\tperson.addProperty(RDF.type, m.getProperty(NS + \"Person\"))\n\t\t\t\t\t\t .addProperty(m.getProperty(NS + \"name\"), actor.trim());\n\t\t\t\t\tmovie.addProperty(m.getProperty(NS + \"hasActor\"), person);\n\t\t\t\t\t\n\t\t\t\t\t//check if the actor has dbpedia page. Describe as sameAs if true\n\t\t\t\t\tString qResult;\n\t\t\t\t\tif((qResult = SparqlQuery.personInDbpediaEn(actor)) != null) { // in dbpedia.org\n\t\t\t\t\t\ttemp = ResourceFactory.createResource(qResult);\n\t\t\t\t\t\tperson.addProperty(OWL.sameAs, temp);\n\t\t\t\t\t} //else if((qResult = SparqlQuery.personInDbpediaNl(actor)) != null) { // in nl.dbpedia.org\n//\t\t\t\t\t\ttemp = ResourceFactory.createResource(qResult);\n//\t\t\t\t\t\tperson.addProperty(OWL.sameAs, temp);\n//\t\t\t\t\t} else if((qResult = SparqlQuery.personInDbpediaDe(actor)) != null) { // in de.dbpedia.org\n//\t\t\t\t\t\ttemp = ResourceFactory.createResource(qResult);\n//\t\t\t\t\t\tperson.addProperty(OWL.sameAs, temp);\n//\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t//get the director\n\t\t\tcase \"Regie\": //director\n\t\t\t\tString nameString = element.text().substring(6).toString().trim(); //Remove \"Regie\" from string\n\t\t\t\tResource person = m.createResource(PERSON + nameString.replace(\" \", \"_\"));\n\t\t\t\tperson.addProperty(m.getProperty(NS + \"name\"), nameString);\n\t\t\t\tmovie.addProperty(m.getProperty(NS + \"hasDirector\"), person);\n\t\t\t\t\n\t\t\t\t//check if the director has dbpedia page. Describe as sameAs if true \n\t\t\t\tString qResult;\n\t\t\t\tif((qResult = SparqlQuery.personInDbpediaEn(nameString)) != null) { // in dbpedia.org\n\t\t\t\t\tperson.addProperty(OWL.sameAs, DBR + qResult);\n\t\t\t\t}// else if((qResult = SparqlQuery.personInDbpediaNl(nameString)) != null) { // in nl.dbpedia.org\n//\t\t\t\t\tperson.addProperty(OWL.sameAs, DBR_NL + qResult);\n//\t\t\t\t} else if((qResult = SparqlQuery.personInDbpediaDe(nameString)) != null) { // in de.dbpedia.org\n//\t\t\t\t\tperson.addProperty(OWL.sameAs, DBR_DE + qResult);\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// a little bit cheating for JJ Abrams\n\t\t\t\tif(nameString.equals(\"Jeffrey (J.J.) Abrams\")) {\n\t\t\t\t\tperson.addProperty(OWL.sameAs, DBR + \"J._J._Abrams\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t//get the duration\n\t\t\tcase \"Speelduur\":\n\t\t\t\tmovie.addProperty(m.getProperty(NS + \"duration\"), last(element).toString().trim().split(\" \")[0], XSDDatatype.XSDint);\n\t\t\t\tbreak;\n\n\t\t\t//get the genre\n\t\t\tcase \"Genre\":\n\t\t\t\tString[] genres = last(element).toString().toLowerCase().split(\", \");\n\t\t\t\tfor (String genreName:genres) {\n\t\t\t\t\tif(GENRE_MAP.containsKey(genreName))\n\t\t\t\t\t\tgenreName = GENRE_MAP.get(genreName);\n\t\t\t\t\telse { //unknown genre; report it and create new resource to acommodate\n\t\t\t\t\t\tSystem.out.println(\"*) another genre found: \" + genreName);\n\t\t\t\t\t\tm.createResource(GENRE + genreName)\n\t\t\t\t\t\t .addProperty(RDF.type, m.getProperty(NS + \"Genre\"));\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\tmovie.addProperty(m.getProperty(NS + \"hasGenre\"), m.getResource(GENRE + genreName));\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t//get the language presentation\n\t\t\tcase \"Taal\":\n\t\t\t\tString lang = last(element).toString().trim().toLowerCase();\n\t\t\t\tif(LANGUAGE.containsKey(lang)) {\n\t\t\t\t\tlang = LANGUAGE.get(lang);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"another language found: \" + lang);\n\t\t\t\t}\n\n\t\t\t\tmovie.addProperty(m.getProperty(NS + \"language\"), lang);\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t//get the release date\n\t\t\tcase \"In de bioscoop sinds\":\n\t\t\t\tString[] releasedate = last(element).toString().trim().split(\" \");\n\t\t\t\tString day = releasedate[0];\n\t\t\t\tString month = String.valueOf((Arrays.asList(DUTCH_MONTH).indexOf(releasedate[1].toLowerCase()) + 1));\n\t\t\t\tString year = releasedate[2];\n\t\t\t\tString formatteddate = year + \"-\" + month + \"-\" + day + \"T00:00:00\";\n\t\t\t\tmovie.addProperty(m.getProperty(NS + \"releaseDate\"), formatteddate, XSDDatatype.XSDdateTime);\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t//get the local distributor\n\t\t\tcase \"Distributeur\":\n\t\t\t\tNode distributorLink = (Node) last(element);\n\t\t\t\tResource distributorResource;\n\t\t\t\tif (distributorLink instanceof Element) {\n\t\t\t\t\tdistributorResource = m.createResource(COMPANY + ((Element) distributorLink).text().replace(\" \", \"_\"));\n\t\t\t\t\tdistributorResource.addProperty(m.getProperty(NS + \"companyURL\"), distributorLink.attr(\"href\"));\n\t\t\t\t\tdistributorResource.addProperty(m.getProperty(NS + \"companyName\"), ((Element) distributorLink).text());\n\t\t\t\t\tmovie.addProperty(m.getProperty(NS + \"isDistributedBy\"), distributorResource);\n\t\t\t\t} else {\n\t\t\t\t\tdistributorResource = m.createResource(COMPANY + distributorLink.toString().replace(\" \", \"_\"));\n\t\t\t\t\tdistributorResource.addProperty(m.getProperty(NS + \"companyName\"), distributorLink.toString());\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tmovie.addProperty(m.getProperty(NS + \"isDistributedBy\"), distributorResource);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void setPage(org.biocatalogue.x2009.xml.rest.PageParameter page)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.PageParameter target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.PageParameter)get_store().find_element_user(PAGE$2, 0);\r\n if (target == null)\r\n {\r\n target = (org.biocatalogue.x2009.xml.rest.PageParameter)get_store().add_element_user(PAGE$2);\r\n }\r\n target.set(page);\r\n }\r\n }", "public void testSetTitle() {\n System.out.println(\"setTitle\");\n String s = \"\";\n Wizard instance = new Wizard();\n instance.setTitle(s);\n }", "private void setVideo(){\n /* if(detailsBean==null){\n showToast(\"没有获取到信息\");\n return;\n }\n UserManager.getInstance().setDetailsBean(detailsBean);\n upCallShowSetVideoData = new UpCallShowSetVideoData();\n upCallShowSetVideoData.smobile = Preferences.getString(Preferences.UserMobile,null);\n upCallShowSetVideoData.iringid = detailsBean.iringid;\n if (callShowSetVideoProtocol == null) {\n callShowSetVideoProtocol = new CallShowSetVideoProtocol(null, upCallShowSetVideoData, handler);\n callShowSetVideoProtocol.showWaitDialog();\n }\n callShowSetVideoProtocol.stratDownloadThread(null, ServiceUri.Spcl, upCallShowSetVideoData, handler,true);*/\n }", "private void setupView() {\n refresh();\n if (isEmpty(movies)) {\n // Ok. so we have no movies. THat means one of two things. Either\n // we're trying to download the movies, or we tried and failed to\n // download them. In the former case just wait. We'll get a\n // notification when they're done. In the latter case, let the user\n // know.\n if (!isNullOrEmpty(getService().getUserAddress()) && getService().getDataProviderState() == DataProvider.State.Finished) {\n showNoInformationFoundDialog();\n }\n } else {\n setupMovieGrid();\n }\n }", "@Override\r\n public void showMovieDetails(MovieEntry movie) {\n Fragment fragment = new DetailsFragment();\r\n Bundle args = new Bundle();\r\n args.putParcelable(DetailsFragment.MOVIE_ARG_POSITION, movie);\r\n fragment.setArguments(args);\r\n\r\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\r\n if(!twoPane) {\r\n transaction.replace(R.id.master_fragment, fragment, DetailsFragment.FRAGMENT_TAG);\r\n if(screenSize == Configuration.SCREENLAYOUT_SIZE_NORMAL) {\r\n transaction.addToBackStack(null);\r\n }\r\n } else {\r\n transaction.replace(R.id.details_fragment, fragment, DetailsFragment.FRAGMENT_TAG);\r\n }\r\n\r\n transaction.commit();\r\n }", "protected void doInit(String titlepageid) {\n if (titlepageid != null) {\n title = titlepageid;\n pageid = titlepageid;\n stringaPageIds = titlepageid;\n domain = this.getDomain();\n super.doInit();\n }// fine del blocco if\n }", "@Override\n\t\t\tpublic void doMyThings() {\n\t\t\t\tsetVideoScale(SCREEN_DEFAULT);\n\t\t\t}", "@Override\r\n public String getParamPostFix(){return \"Movie\";}", "@Override\r\n\tpublic void mypage() {\n\t\t\r\n\t}", "public void setPage(Integer page) {\n this.page = page;\n }", "public void setNewScene() {\n switch (game.getCurrentRoomId()) {\n case 14:\n WizardOfTreldan.setFinishScene();\n break;\n\n }\n }", "@Override\n public void changePage(int newPage) {\n\n if ( (newPage >= 0) && (newPage< bookInitial.getListAllTextToDisplay().size()))\n {\n\n if (isManual)\n {\n bookInitial.setCurrentPage(newPage);\n updateCurrentPage();\n displayPage();\n }else\n {\n int a = bookInitial.getCurrentPage();\n bookInitial.setCurrentPage(newPage);\n updateCurrentPage();\n displayPage();\n updateAutoWPop(a);\n }\n\n\n }\n\n\n }", "private void displayVideo(){\n ButtonBack displayVideo = new ButtonBack(\"/view/VideoWindow.fxml\");\n displayVideo.displayVideo(\"winner\",\"Congratulation\");\n }", "CartogramWizardShowURL (String url)\n\t{\n\t\tmUrl = url;\n\t\n\t}", "private void setdata(){\n final Handler handler = new Handler();\n final Runnable Update = new Runnable() {\n public void run() {\n if (currentPage == img.length) {\n currentPage = 0;\n }\n viewPager.setCurrentItem(currentPage++, true);\n }\n };\n Timer swipeTimer = new Timer();\n swipeTimer.schedule(new TimerTask() {\n @Override\n public void run() {\n handler.post(Update);\n }\n }, 2500, 2500);\n }", "public NewPageWizard(IXWikiSpace sapce)\n {\n super();\n setWindowTitle(\"Add New Page...\");\n setNeedsProgressMonitor(false);\n this.space = sapce;\n }", "private void init() {\n CycleViewPage page = (CycleViewPage) findViewById(R.id.main_view_page);\n page.setAdapter(new InfiniteImageAdapter(createImages()));\n page.setCurrentItem(Integer.MAX_VALUE / 2);\n page.setCycleSwitch(true);\n }", "private void setListener() {\n\n mManagerPlay.setmOnSuccessPlayer(new ManagerPlay.OnSuccessPlayer() {\n @Override\n public void onSuccess(Tracks tracks) {\n\n mTxtNameMediaPlayer.setText(checkLimitText(tracks.getTitle(), 15));\n mTxtArtistMediaPlayer.setText(checkLimitText(tracks.getArtist(), 20));\n mManagerPlay.setIsPause(false);\n mImgPause.setImageResource(R.drawable.ic_pause);\n\n if(mManagerPlay.isRepeat()) {\n mImgRepeat.setImageResource(R.drawable.icon_repeat_selected);\n\n } else {\n mImgRepeat.setImageResource(R.drawable.ic_repeat);\n }\n\n if (tracks.getArtwork_url() != null) {\n ImageLoader.getInstance().displayImage(tracks.getArtwork_url(), mImgMediaPlayer);\n }\n }\n });\n\n mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {\n @Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n\n }\n\n @Override\n public void onPageSelected(int position) {\n mTabBar.clickTab(position);\n }\n\n @Override\n public void onPageScrollStateChanged(int state) {\n\n }\n });\n\n mTabBar.setOnClickTabBar(new TabBar.OnClickTabBar() {\n @Override\n public void onClick(int position) {\n mViewPager.setCurrentItem(position);\n }\n });\n }", "public void setPage(final int number) {\n final int oldPage = this.currentPage;\n if (this.displayMode == CONTINUOUS || this.displayMode == CONT_FACING) {\n this.currentPage = number;\n this.gridPanel\n .scrollRectToVisible(this.pagePanels[this.currentPage]\n .getBounds());\n } else { // single page mode\n this.currentPage = number;\n this.firstPage = this.currentPage;\n }\n showPage();\n firePageChange(oldPage, this.currentPage);\n }", "public void showTexturePage(String selection, int page){\n \n ArrayList<String> idSubStages = control.getIdsSubStages(selection);\n ArrayList<String> idsTexturesOrSubMeshes = control.getIdsTexturesORSubMeshes(idSubStages.get(0));\n unCheck();\n subStageSelected = \"\";\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n for(int i=page*TEXTURES_PAGE; i<control.getNumTexturesORSubMeshes(idSubStages.get(0)); i++){\n if(i<((page+1)*TEXTURES_PAGE)){\n Element image = nifty.getScreen(stageType).findElementByName(\"i\"+Integer.toString(i%TEXTURES_PAGE));\n List<Effect> effects = image.getEffects(EffectEventId.onHover,Tooltip.class);\n String idTexturesOrSubMeshes = i18nModel.getString(control.getTextTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i)));\n if(idTexturesOrSubMeshes==null){\n idTexturesOrSubMeshes=control.getTextTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i));\n }\n effects.get(0).getParameters().setProperty(\"hintText\",idTexturesOrSubMeshes);\n image.setVisible(true);\n ImageRenderer imager = image.getRenderer(ImageRenderer.class);\n String imagePath = control.getIconPathTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i));\n if(imagePath!=null){\n imager.setImage(nifty.getRenderEngine().createImage(imagePath, false));\n }\n else{\n imager.setImage(nifty.getRenderEngine().createImage(Resources.x, false));\n }\n if (control.isChecked(idSubStages.get(0), idsTexturesOrSubMeshes.get(i))){\n nifty.getScreen(stageType).findElementByName(\"t\"+Integer.toString(i%TEXTURES_PAGE)).setVisible(true);\n subStageSelected = idSubStages.get(0);\n if(!seleccionado.containsKey(subStageSelected)){\n seleccionado.put(subStageSelected, idsTexturesOrSubMeshes.get(i));\n }\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"t\"+Integer.toString(i%TEXTURES_PAGE)).setVisible(false);\n }\n }\n }\n if(seleccionado.containsKey(subStageSelected)){\n if(!(control.getTextureType(seleccionado.get(subStageSelected)) == TexturesMeshType.simpleTexture)){\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n }\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n }\n for(int i=control.getNumTexturesORSubMeshes(idSubStages.get(0));i<((page+1)*TEXTURES_PAGE);i++){\n Element image = nifty.getScreen(stageType).findElementByName(\"i\"+Integer.toString(i%TEXTURES_PAGE));\n image.setVisible(false);\n }\n if(page > 0){\n nifty.getScreen(stageType).findElementByName(\"leftT\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"leftT\").setVisible(false);\n }\n if((((double)control.getNumTexturesORSubMeshes(idSubStages.get(0))/(double)TEXTURES_PAGE) - page) > 1){\n nifty.getScreen(stageType).findElementByName(\"rightT\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"rightT\").setVisible(false);\n }\n }", "private void setTheScene()\n {\n board.setLocalRotation(Quaternion.IDENTITY);\n board.rotate(-FastMath.HALF_PI, -FastMath.HALF_PI, 0);\n board.setLocalTranslation(0, 0, -3);\n\n cam.setLocation(new Vector3f(0, 0, 10));\n cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);\n }", "public static void move() {\r\n\t\t\r\n\t\tif (ths.page == 1) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "protected void loadMedia(Page page) {\n \t\tif (mMessageStream == null) {\n \t\t\treturn;\n \t\t}\n \n \t\tmMetaData.setTitle(\"odr\");\n \t\ttry {\n \t\t\tString ip = getLocalIpAddress();\n \t\t\tString fileName = page.getUri().getLastPathSegment();\n \n \t\t\tMediaProtocolCommand cmd = mMessageStream.loadMedia(\"http://\" + ip\n \t\t\t\t\t+ \":1993/\" + fileName, mMetaData, true);\n \t\t\tcmd.setListener(new MediaProtocolCommand.Listener() {\n \n \t\t\t\t@Override\n \t\t\t\tpublic void onCompleted(MediaProtocolCommand mPCommand) {\n \t\t\t\t}\n \n \t\t\t\t@Override\n \t\t\t\tpublic void onCancelled(MediaProtocolCommand mPCommand) {\n \t\t\t\t}\n \t\t\t});\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \n \t\t\tshowCrouton(R.string.chromecast_failed, null, AppMsg.STYLE_ALERT);\n \t\t}\n \t}", "private static void loadMovies() {\n\tbookmarks[1][0]=BookmarkManager.getInstance().createMovie(3000,\"Citizen Kane\",1941,new String[] {\"Orson Welles,Joseph Cotten\"},new String[] {\"Orson Welles\"},MovieGenre.CLASSICS,8.5);\n\tbookmarks[1][1]=BookmarkManager.getInstance().createMovie(3001,\"The Grapes of Wrath\",1940,new String[] {\"Henry Fonda,Jane Darwell\"},new String[]{\"John Ford\"},MovieGenre.CLASSICS,8.2);\n\tbookmarks[1][2]=BookmarkManager.getInstance().createMovie(3002,\"A Touch of Greatness\",2004,new String[] {\"Albert Cullum\"},new String[] {\"Leslie Sullivan\"},MovieGenre.DOCUMENTARIES,7.3);\n\tbookmarks[1][3]=BookmarkManager.getInstance().createMovie(3003,\"The Big Bang Theory\",2007,new String[] {\"Kaley Cuoco,Jim Parsons\"},new String[] {\"Chuck Lorre,Bill Prady\"},MovieGenre.TV_SHOWS,8.7);\n\tbookmarks[1][3]=BookmarkManager.getInstance().createMovie(3004,\"Ikiru\",1952,new String[] {\"Takashi Shimura,Minoru Chiaki\"},\tnew String[] {\"Akira Kurosawa\"}\t,MovieGenre.FOREIGN_MOVIES,8.4);\n}", "public void setText (String page) {\r\n setText (page.getBytes ());\r\n }", "public void openAutoPlayScreen(final AppCMSVideoPageBinder binder, Action1<Object> action1) {\n String url = null;\n binder.setCurrentMovieName(binder.getContentData().getGist().getTitle());\n if (!binder.isOffline()) {\n final String filmId =\n binder.getRelateVideoIds().get(binder.getCurrentPlayingVideoIndex() + 1);\n if (currentActivity != null &&\n !loadingPage && appCMSMain != null &&\n !TextUtils.isEmpty(appCMSMain.getApiBaseUrl()) &&\n !TextUtils.isEmpty(appCMSSite.getGist().getSiteInternalName())) {\n url = currentActivity.getString(R.string.app_cms_video_detail_api_url,\n appCMSMain.getApiBaseUrl(),\n filmId,\n appCMSSite.getGist().getSiteInternalName());\n }\n } else {\n ContentDatum contentDatum = realmController.getDownloadById(\n binder.getRelateVideoIds().get(\n binder.getCurrentPlayingVideoIndex() + 1))\n .convertToContentDatum(getLoggedInUser());\n binder.setCurrentPlayingVideoIndex(binder.getCurrentPlayingVideoIndex() + 1);\n binder.setContentData(contentDatum);\n }\n String pageId = getAutoplayPageId();\n if (!TextUtils.isEmpty(pageId)) {\n navigateToAutoplayPage(pageId,\n currentActivity.getString(R.string.app_cms_page_autoplay_key),\n url,\n binder,\n action1);\n } else {\n //Log.e(TAG, \"Can't find autoplay page ui in pageIdToPageNameMap\");\n }\n }", "public void setPreviousPage(IWizardPage page);", "Point onPage();", "public void setCurrentPage(String sCurrentPage){\n\t\tthis.sCurrentPage = sCurrentPage;\n\t}", "public void actionPerformed(ActionEvent e) {\r\n\t\t// create an instance of NewPage\r\n\t\tNewPage newPage = new NewPage(canvas);\r\n\t\t// create new WhiteBoard Page\r\n\t\tnewPage.createNewWbPage();\r\n\t\t// create an instance PresentationInfoListData object to \r\n\t\t//add to PresentationList.\r\n\t\tPresentationInfoListData data =\r\n\t\t\tnew PresentationInfoListData(0, false, newPage.getKey());\r\n\t\tpresentationInfo.add(data);\r\n\t\t// notify all the participants that a new WhiteBoard has been opened\r\n\t\t// and selected\r\n\t\tDataEvent.notifySender(\r\n\t\t\tcanvas.getApplicationType(),\r\n\t\t\tpresentationInfo.getListModel().getSize(),\r\n\t\t\tnewPage.getKey(),\r\n\t\t\tgetToolString());\r\n\t\t\t\r\n\t\t// select the current new WhiteBoard\r\n\t\tpresentationInfo.getPresentationList().setSelectedValue(data, true);\r\n\r\n\t}", "private void switchTo(String pageValue) {\n\t\tthis.fenetre.getCardLayout().show(this.fenetre.getContentPane(), pageValue);\n\t}", "public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}", "@Override\n\tpublic void videoStart() {\n\t\t\n\t}", "void setMovieId(int movieID) {\n this.movieID = movieID;\n }", "void nextFrame(Welcome welcomeF, int pageChoice){\n\t\twelcomeF.setVisible(false);\n\t\tif(pageChoice == Globals.SHOPPING_PAGE){\n\t\t\tshoppingF.setVisible(true);\n\t\t\t\n\t\t\t//to fill the shopping tables in the SHOPPING Frame before displaying the frame.\n\t\t\tshoppingF.setTables();\n\t\t\t\n\t\t}\n\t\telse if(pageChoice == Globals.PREV_RECORDS_PAGE){\n\t\t\tprevRecordsF.reset();\n\t\t\tprevRecordsF.setVisible(true);\n\t\t}\n\t\telse if(pageChoice == Globals.CUST_REG_PAGE){\n\t\t\tcustRegF.setVisible(true);\n\t\t}\n\t}", "@Override\n public void run() {\n for (int pg = PreviewPanel.this.firstPage; pg < PreviewPanel.this.firstPage\n + PreviewPanel.this.pageRange; pg++) {\n PreviewPanel.this.pagePanels[pg - PreviewPanel.this.firstPage]\n .setPage(pg);\n }\n revalidate();\n }", "@Override\n public void onPageSelected(int arg0) {\n current = arg0;\n // title.setText(content[current]);\n\n //\tToast.makeText(LearningActivity.this, \"Current = \"+arg0, Toast.LENGTH_SHORT).show();\n\n }", "private void setUpPageItem() {\n displaylimit = xmlhandler.getItemDisplayLimit();\n itemrow = inventory.getItemRow();\n Back.setEnabled(false);\n Begin.setEnabled(false);\n if(getPageEnd()==1) {\n Forward.setEnabled(false);\n End.setEnabled(false);\n }\n }", "@Override\r\n\tpublic void play() {\n\t\tSystem.out.println(\"Play Movie\");\r\n\t\t\r\n\t}", "private void initAreaImageFilm() {\n\n }", "public String setTestURL(int position) {\n if (position == 0) {\n return \"http://plazacam.studentaffairs.duke.edu/mjpg/video.mjpg\";\n } else if (position == 1) {\n return \"http://webcam.st-malo.com/axis-cgi/mjpg/video.cgi?resolution=640x480\";\n } else if (position == 2) {\n return \"http://webcams.hotelcozumel.com.mx:6003/axis-cgi/mjpg/video.cgi?resolution=320x240&dummy=1458771208837\";\n } else if (position == 3) {\n return \"http://iris.not.iac.es/axis-cgi/mjpg/video.cgi?resolution=320x240\";\n } else if (position == 4) {\n return \"http://bma-itic1.iticfoundation.org/mjpeg2.php?camid=61.91.182.114:1111\";\n } else if (position == 5) {\n return \"http://bma-itic1.iticfoundation.org/mjpeg2.php?camid=61.91.182.114:1112\";\n } else {\n return \"http://plazacam.studentaffairs.duke.edu/mjpg/video.mjpg\";\n }\n }", "void updatePage(String name, String park);", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "public static void changeFrame() {\r\n\t\t\r\n\t}", "@Override\r\n\t\t\t\t\t\t\tprotected void onSetResponsePage() {\n\t\t\t\t\t\t\t\tsetResponsePage(new DriversPage());\r\n\t\t\t\t\t\t\t}", "private void nexttest(){\n\t\tif (TestListPanel.ktea2yn = true){\n\t\tnextframe = new Ktea2frame();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\t/*else if (wiscyn = true){\n\t\tnextframe = new Wiscframe();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\telse if (basc2yn = true){\n\t\tnextframe = new Basc2frame();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\n\t\t}*/\n\t\t\n\t}", "public void setUpScene() {\r\n\r\n\t\tif (forecasts == null) {\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tDateFormatter.formatDates(forecasts);\r\n\r\n\t\tsetLabels(forecasts);\r\n \r\n\t\tWeatherDAO weatherDAO = new WeatherDAO();\r\n\r\n\t\tweatherDAO.saveForecasts(forecasts, getSceneNumber());\r\n\t\t\r\n\t\tsetGif(forecasts[0].getDayPhrase());\r\n\t}", "public void setupView() {\n PagerAdapter mPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());\n viewPager.setAdapter(mPagerAdapter);\n viewPager.setCurrentItem(0);\n\n }", "public void setVid(java.lang.String param) {\r\n localVidTracker = param != null;\r\n\r\n this.localVid = param;\r\n }", "@Override\n public void onPageSelected(int position) {\n// Toast.makeText(AlarmSettingActivity.this,\n// \"Selected page position: \" + position, Toast.LENGTH_SHORT).show();\n setIndicator(position);\n play(position);\n }", "public static MovieListFragment newInstance(int page, String title) {\r\n MovieListFragment fragmentFirst = new MovieListFragment();\r\n\r\n Bundle args = new Bundle();\r\n\r\n args.putInt(\"someInt\", page);\r\n args.putString(\"someTitle\", title);\r\n\r\n\r\n fragmentFirst.setArguments(args);\r\n return fragmentFirst;\r\n }", "public void showPage_MainContainer(String page){\n if(!(this.currentPage_ActionPanel.equals(page))){\n cardLayout_Action.show(mainActionPanel,page);\n currentPage_ActionPanel = page;\n }\n }", "@Override\r\n\tpublic void pause() {\n\t\tSystem.out.println(\"Pause Movie\");\r\n\t\t\r\n\t}", "public void addPage(String name, String park);", "public ProcessPage() {\n\t\tPageFactory.initElements(driver, this);\n\t\t \n\n\t}", "@Override\n\tpublic void setContentView() {\n\t\tsetContentView(R.layout.mode_screen);\n\t\ttitle = (TextView) findViewById(R.id.title);\n\t\tmoShiTxt = (TextView) findViewById(R.id.moShiTxt);\n\t\tdangWeiSeekBar = (SeekBar) findViewById(R.id.moShiSeekBar);\n\t}", "public void setVideoPort(int port);", "public void showPage_GameControlContainer(String page){\n if(!(this.currentPage_ControlPanel.equals(page))){\n gameCon_Layout.show(gameControlPanel,page);\n currentPage_ControlPanel = page;\n }\n }" ]
[ "0.65922934", "0.6394061", "0.63168895", "0.61942875", "0.6166268", "0.6056237", "0.5895981", "0.5837192", "0.5775089", "0.5775089", "0.5766532", "0.57317054", "0.5664356", "0.56477636", "0.5633888", "0.562433", "0.5587382", "0.5584427", "0.55722123", "0.5545986", "0.5542363", "0.5534162", "0.5521822", "0.5516932", "0.5516318", "0.55117697", "0.5504238", "0.54691255", "0.54392445", "0.54385895", "0.5429778", "0.5421798", "0.54169285", "0.5405936", "0.5399831", "0.53969526", "0.53963876", "0.5387998", "0.5385613", "0.53700495", "0.53639346", "0.53595614", "0.53469115", "0.5337781", "0.5333757", "0.5333636", "0.5329319", "0.5323253", "0.53230965", "0.53141797", "0.5306226", "0.5298737", "0.5293848", "0.52894413", "0.5288957", "0.52870196", "0.52845824", "0.5280405", "0.52771837", "0.5277034", "0.52744186", "0.5273413", "0.52719206", "0.52711916", "0.5270629", "0.52677035", "0.52626467", "0.5254294", "0.52523553", "0.52522475", "0.52518606", "0.5250519", "0.5245746", "0.5241016", "0.5237049", "0.5232128", "0.5228038", "0.52270013", "0.52246004", "0.5217092", "0.52117294", "0.52089316", "0.52044654", "0.52012116", "0.51973844", "0.51922387", "0.5190956", "0.51904136", "0.5187374", "0.5184307", "0.5181749", "0.51779824", "0.5168788", "0.5166392", "0.51577395", "0.5157677", "0.51518345", "0.51503307", "0.5146795", "0.5144373" ]
0.59111446
6