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 a new main menu. Accepts a MenuLoader, which is the only class that can instantiate a menu. If you are seeing this message, chances are that you are trying to create a menu. And you're probably scratching your head as to why you cannot. Try using MenuLoader.loadDesiredMenu(); | public AbstractMenu(MenuLoader menuLoader)
{} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"public Menu() {\n mainMenuScene = createMainMenuScene();\n mainMenu();\n }",
"public Menu createToolsMenu();",
"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}",
"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 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 }",
"@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 }",
"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}",
"public Menu createViewMenu();",
"ReturnCode createMenus(MmtConfig cfg, String menuJson);",
"@Test\n\tpublic void addMenuTest() throws Exception {\n\t\tif (Configuration.shufflerepeat &&\n\t\tConfiguration.featureamp&&\n\t\tConfiguration.playengine&&\n\t\tConfiguration.choosefile&&\n\t\tConfiguration.gui&&\n\t\tConfiguration.skins&&\n\t\tConfiguration.light\n\t\t) {\t\n\t\t\tstart();\n\t\t\tgui.addMenu();\n\t\t\tJMenu menu = (JMenu) MemberModifier.field(Application.class, \"menu\").get(gui);\n\t\t\tassertNotNull(menu);\n\n\t\t}\n\t}",
"public Menu createFileMenu();",
"static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\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 }",
"@Override\r\n\tprotected MenuManager createMenuManager() {\r\n\t\tMenuManager menuManager = new MenuManager(\"menu\");\r\n\t\treturn menuManager;\r\n\t}",
"public int create(Esysmeudef menu);",
"private void registerMainMenu() {\n\t\ttry {\n//\t\t\tif (FMLCommonHandler.instance().getSide().isClient())\n//\t\t\t\tnet.aetherteam.mainmenu_api.MainMenuAPI.registerMenu(\"TurretMod3Menu\", sanandreasp.mods.TurretMod3.client.gui.mainMenu.MainMenuTM3.class);\n\t\t} catch (Exception e) {\n\t\t\tFMLLog.log(TM3ModRegistry.modID, Level.INFO, \"kingbdogz' Main Menu API not found. Skipping Main Menu registration!\");\n\t\t} catch (NoClassDefFoundError error) {\n\t\t\tFMLLog.log(TM3ModRegistry.modID, Level.INFO, \"kingbdogz' Main Menu API not found. Skipping Main Menu registration!\");\n\t\t}\n\t}",
"private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}",
"public MainMenu() {\n super();\n }",
"public static void loadMainMenu()\n\t{\n\t\tinSubMenu = false;\n\t\t\n\t\tframe.getContentPane().remove(newGamePanel);\n\t\t\n\t\tmainLabel.setVisible(true);\n\t\t\n\t\tframe.getContentPane().add(mainPanel);\n\t\tframe.getContentPane().repaint();\n\t\tframe.setVisible(true);\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 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 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 }",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"private void loadMenu() {\n theView.getGamePanel().removeAll();\n Menu menu = new Menu(theView);\n menu.revalidate();\n menu.repaint();\n theView.getGamePanel().add(menu);\n menu.requestFocusInWindow();\n theView.setVisible(true);\n }",
"protected void fillMenu(MenuBar menuBar) {\n\t\tMenu fileMenu = new Menu(\"Файл\");\n\t\n\t\tMenuItem loginMenuItem = new MenuItem(\"Сменить пользователя\");\n\t\tloginMenuItem.setOnAction(actionEvent -> main.logout());\n\t\n\t\tMenuItem exitMenuItem = new MenuItem(\"Выход (выключить планшет)\");\n\t\texitMenuItem.setOnAction(actionEvent -> main.requestShutdown());\n\t\texitMenuItem.setAccelerator(KeyCombination.keyCombination(\"Alt+F4\"));\n\t\n\t\n\t\tfileMenu.getItems().addAll( loginMenuItem,\n\t\t\t\tnew SeparatorMenuItem(), exitMenuItem);\n\t\n\t\n\t\n\t\tMenu navMenu = new Menu(\"Навигация\");\n\t\n\t\tMenuItem navHomeMap = new MenuItem(\"На общую карту\");\n\t\t//navHomeMap.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tnavHomeMap.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\tMenu navMaps = new Menu(\"Карты\");\n\t\t//navMaps.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tmain.ml.fillMapsMenu( navMaps, this );\n\t\n\t\tMenuItem navOverview = new MenuItem(\"Обзор\");\n\t\tnavOverview.setOnAction(actionEvent -> setOverviewScale());\n\t\n\t\tnavMenu.getItems().addAll( navHomeMap, navMaps, new SeparatorMenuItem(), navOverview );\n\t\n\t\t\n\t\t\n\t\tMenu dataMenu = new Menu(\"Данные\");\n\t\n\t\tServerUnitType.forEach(t -> {\n\t\t\tMenuItem dataItem = new MenuItem(t.getDisplayName());\n\t\t\tdataItem.setOnAction(actionEvent -> new EntityListWindow(t, main.rc, main.sc));\n\t\n\t\t\tdataMenu.getItems().add(dataItem);\t\t\t\n\t\t});\n\t\t\n\t\t//dataMenu.Menu debugMenu = new Menu(\"Debug\");\n\t\t//MenuItem d1 = new MenuItem(\"На общую карту\");\n\t\t//d1.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\t\n\t\t/*\n\t Menu webMenu = new Menu(\"Web\");\n\t CheckMenuItem htmlMenuItem = new CheckMenuItem(\"HTML\");\n\t htmlMenuItem.setSelected(true);\n\t webMenu.getItems().add(htmlMenuItem);\n\t\n\t CheckMenuItem cssMenuItem = new CheckMenuItem(\"CSS\");\n\t cssMenuItem.setSelected(true);\n\t webMenu.getItems().add(cssMenuItem);\n\t\n\t Menu sqlMenu = new Menu(\"SQL\");\n\t ToggleGroup tGroup = new ToggleGroup();\n\t RadioMenuItem mysqlItem = new RadioMenuItem(\"MySQL\");\n\t mysqlItem.setToggleGroup(tGroup);\n\t\n\t RadioMenuItem oracleItem = new RadioMenuItem(\"Oracle\");\n\t oracleItem.setToggleGroup(tGroup);\n\t oracleItem.setSelected(true);\n\t\n\t sqlMenu.getItems().addAll(mysqlItem, oracleItem,\n\t new SeparatorMenuItem());\n\t\n\t Menu tutorialManeu = new Menu(\"Tutorial\");\n\t tutorialManeu.getItems().addAll(\n\t new CheckMenuItem(\"Java\"),\n\t new CheckMenuItem(\"JavaFX\"),\n\t new CheckMenuItem(\"Swing\"));\n\t\n\t sqlMenu.getItems().add(tutorialManeu);\n\t\t */\n\t\n\t\tMenu aboutMenu = new Menu(\"О системе\");\n\t\n\t\tMenuItem version = new MenuItem(\"Версия\");\n\t\tversion.setOnAction(actionEvent -> showAbout());\n\t\n\t\tMenuItem aboutDz = new MenuItem(\"Digital Zone\");\n\t\taboutDz.setOnAction(actionEvent -> main.getHostServices().showDocument(Defs.HOME_URL));\n\t\n\t\tMenuItem aboutVita = new MenuItem(\"VitaSoft\");\n\t\taboutVita.setOnAction(actionEvent -> main.getHostServices().showDocument(\"vtsft.ru\"));\n\t\n\t\taboutMenu.getItems().addAll( version, new SeparatorMenuItem(), aboutDz, aboutVita );\n\t\n\t\t// --------------- Menu bar\n\t\n\t\t//menuBar.getMenus().addAll(fileMenu, webMenu, sqlMenu);\n\t\tmenuBar.getMenus().addAll(fileMenu, navMenu, dataMenu, aboutMenu );\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 }",
"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 void createMenuChildScene() {\n\t\tmenuChildScene = new MenuScene(camera);\n\t\tmenuChildScene.setPosition(0, 0);\n\n\t\tfinal IMenuItem profile02MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE02,\n\t\t\t\t\t\tresourcesManager.btProfile02TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile24MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE24,\n\t\t\t\t\t\tresourcesManager.btProfile24TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile4MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE4,\n\t\t\t\t\t\tresourcesManager.btProfile4TR, vbom), 1f, .8f);\n\n\t\tmenuChildScene.addMenuItem(profile02MenuItem);\n\t\tmenuChildScene.addMenuItem(profile24MenuItem);\n\t\tmenuChildScene.addMenuItem(profile4MenuItem);\n\n\t\tmenuChildScene.buildAnimations();\n\t\tmenuChildScene.setBackgroundEnabled(false);\n\n\t\tprofile02MenuItem.setPosition(150, 280);\n\t\tprofile24MenuItem.setPosition(400, 280);\n\t\tprofile4MenuItem.setPosition(650, 280);\n\n\t\tmenuChildScene.setOnMenuItemClickListener(this);\n\t\t\n\t\t//-- change language button -----------------------------------------------------------------------------\n\t\t\n\t\tchangLang = new TiledSprite(400,60, resourcesManager.btLangTR, vbom){\n\t\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\tswitch(pSceneTouchEvent.getAction()){\n\t\t\tcase TouchEvent.ACTION_DOWN:\n\t\t\t\tbreak;\n\t\t\tcase TouchEvent.ACTION_UP:\n\t\t\t\tplaySelectSound();\n\t\t\t\tif(localLanguage==0){\n\t\t\t\t\tchangeLanguage(\"UK\");\n\t\t\t\t\tthis.setCurrentTileIndex(1);\n\t\t\t\t\tlocalLanguage=1;\n\t\t\t\t}else if (localLanguage==1) {\n\t\t\t\t\tchangeLanguage(\"FR\");\n\t\t\t\t\tthis.setCurrentTileIndex(0);\n\t\t\t\t\tlocalLanguage=0;\n\t\t\t\t}\n\t\t\t\tupdateTexts();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\t\n\t\tif(localLanguage==0){\t\t\t\n\t\t\tchangLang.setCurrentTileIndex(0);\n\t\t}else{\t\t\n\t\t\tchangLang.setCurrentTileIndex(1);\n\t\t}\n\t\t\n\t\tthis.attachChild(changLang);\n\t\tthis.registerTouchArea(changLang);\n\t\t//-----------------------------------------------------------------------------------------------------\n\n\n\t\tsetChildScene(menuChildScene);\n\t}",
"public void init() {\n\t\tMenu menu = new Menu();\n\t\tmenu.register();\n\n\t\t// Application.getInstance().getGUILog().showMessage(\"Show a popup the proper\n\t\t// way !\");\n\n\t\t// final ActionsConfiguratorsManager manager =\n\t\t// ActionsConfiguratorsManager.getInstance();\n\n\t\t// final MDAction action = new ExampleAction();\n\t\t// Adding action to main menu\n\t\t// manager.addMainMenuConfigurator(new MainMenuConfigurator(action));\n\t\t// Adding action to main toolbar\n\t\t// manager.addMainToolbarConfigurator(new MainToolbarConfigurator(action));\n\n\t\t// pluginDir = getDescriptor().getPluginDirectory().getPath();\n\n\t\t// Creating submenu in the MagicDraw main menu\n\t\t// ActionsConfiguratorsManager manager =\n\t\t// ActionsConfiguratorsManager.getInstance();\n\t\t// manager.addMainMenuConfigurator(new\n\t\t// MainMenuConfigurator(getSubmenuActions()));\n\n\t\t/**\n\t\t * @Todo: load project options (@see myplugin.generator.options.ProjectOptions)\n\t\t * from ProjectOptions.xml and take ejb generator options\n\t\t */\n\n\t\t// for test purpose only:\n\t\t// GeneratorOptions ejbOptions = new GeneratorOptions(\"c:/temp\", \"ejbclass\",\n\t\t// \"templates\", \"{0}.java\", true, \"ejb\");\n\t\t// ProjectOptions.getProjectOptions().getGeneratorOptions().put(\"EJBGenerator\",\n\t\t// ejbOptions);\n\n\t\t// ejbOptions.setTemplateDir(pluginDir + File.separator +\n\t\t// ejbOptions.getTemplateDir()); //apsolutna putanja\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 createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}",
"public static void main(String[] args){\n Menu iniciar_menu = new Menu();\r\n }",
"private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"@Test\n\tpublic void addMenu_2Test() throws Exception {\n\t\tif (Configuration.shufflerepeat &&\n\t\t\t\tConfiguration.featureamp&&\n\t\t\t\tConfiguration.playengine&&\n\t\t\t\tConfiguration.gui&&\n\t\t\t\tConfiguration.skins&&\n\t\t\t\tConfiguration.light &&\n\t\t\t\t!Configuration.loadfolder &&\n\t\t\t\t!Configuration.choosefile &&\n\t\t\t\t!Configuration.saveandloadplaylist) {\t\n\t\t\tstart();\n\t\t\tgui.addMenu();\n\t\t\tJMenu menu = (JMenu) MemberModifier.field(Application.class, \"menu\").get(gui);\n\t\t\tassertNotNull(menu);\n\t\t\t\n\t\t}\n\t}",
"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}",
"protected void createMenus(Activity activity, boolean isEntryPoint){\n \t\t\n \t\t//myTts = new TextToSpeechBeta(this, ttsInitListener);\n \t\t\n \t\tthis.isEntryPoint = isEntryPoint;\n \t\tthis.activity = activity;\n \t\t\n \t\tApplicationData applicationData = SplashActivity.getApplicationData();\n \t\tActiveMenus activeMenus = applicationData.getMenu();\n \t\t\n \t\t//TOP MENU\n \t\tif(activeMenus.getTopMenu() != null){\n \t\t\tRelativeLayout topLayout = (RelativeLayout) findViewById(R.id.topLayout);\n \t\t\tcreateCurrentMenu(topLayout, activeMenus.getTopMenu());\n \t\t}\n \t\t\n \t\t//BOTTOM MENU\n \t\tRelativeLayout bottomLayout = (RelativeLayout) findViewById(R.id.bottomLayout);\t\n \t\tif(activeMenus.getBottomMenu() != null){\n \t\t\tcreateCurrentMenu(bottomLayout, activeMenus.getBottomMenu());\n \t\t}else{\n \t\t\tbottomLayout.setVisibility(0);\n \t\t}\n \t\t\n \t\t//CONTEXT MENU\n \t\tif(activeMenus.getContextMenu() != null){\n \t\t\tthis.contextMenuXmlFileName = activeMenus.getContextMenu();\n \t\t}\n \t\t\n \t\t//SIDE MENU\n \t\tif(activeMenus.getSideMenu() != null){\n \t\t\tinitializeSideMenuList(activeMenus.getSideMenu());\n \t\t}\n \t}",
"public Menus( Main mainApp ) {\n this(); // call the default constructor, which must always be called first\n this.mainApp = mainApp; // save the reference to the Main application\n }",
"private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }",
"public void createMenus()\n {\n EventQueueUtilities.runOnEDT(this::createMenusNow);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.loader, menu);\n\t\treturn true;\n\t}",
"public ScreenMainMenu() {\n\t\tsuper(AdapterInputMainMenu.class);\n\t\tobj.add(new MainMenuInteractObjTest<>(gRef,200,200,new Rectangle(0,0,32,32)));\n\t\tChartset.detect(\"resources\\\\Charts\");\n\t}",
"public void initMenu(){\n\t}",
"IMenuFactory getMenuFactory();",
"protected MenuBarView createMenuBuilder(Main mainFrameUtil) {\r\n return new MenuBarView(mainFrameUtil);\r\n }",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"@SuppressWarnings(\"unused\")\n\tpublic static void main(String[] args) \n {\n \tMainMenu main = new MainMenu();\n }",
"private void constructMenus()\n\t{\n\t\tthis.fileMenu = new JMenu(\"File\");\n\t\tthis.editMenu = new JMenu(\"Edit\");\n\t\tthis.caseMenu = new JMenu(\"Case\");\n\t\tthis.imageMenu = new JMenu(\"Image\");\n\t\tthis.fileMenu.add(this.saveImageMenuItem);\n\t\tthis.fileMenu.addSeparator();\n\t\tthis.fileMenu.add(this.quitMenuItem);\n\t\tthis.editMenu.add(this.undoMenuItem);\n\t\tthis.editMenu.add(this.redoMenuItem);\n\t\tthis.caseMenu.add(this.removeImageMenuItem);\n\t\tthis.imageMenu.add(this.antiAliasMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.brightenMenuItem);\n\t\tthis.imageMenu.add(this.darkenMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.grayscaleMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.resizeMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.cropMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.rotate90MenuItem);\n\t\tthis.imageMenu.add(this.rotate180MenuItem);\n\t\tthis.imageMenu.add(this.rotate270MenuItem);\n\t}",
"private void initMenu() {\n \n JMenuBar menuBar = new JMenuBar();\n \n JMenu commands = new JMenu(\"Commands\");\n \n JMenuItem add = new JMenuItem(\"Add\");\n add.addActionListener((ActionEvent e) -> {\n changeState(\"Add\");\n });\n commands.add(add);\n \n JMenuItem search = new JMenuItem(\"Search\");\n search.addActionListener((ActionEvent e) -> {\n changeState(\"Search\");\n });\n commands.add(search);\n \n JMenuItem quit = new JMenuItem(\"Quit\");\n quit.addActionListener((ActionEvent e) -> {\n System.out.println(\"QUITING\");\n System.exit(0);\n });\n commands.add(quit);\n \n menuBar.add(commands);\n \n setJMenuBar(menuBar);\n }",
"public Menu createMenu(String name) {\r\n\t\treturn new Menu(name,this);\r\n\t}",
"@Override\n\tprotected MenuManager createMenuManager() {\n\t\treturn null;\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_new_main, menu);\r\n return true;\r\n }",
"private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}",
"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 }",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"@Override\n public void create(SwipeMenu menu) {\n switch (menu.getViewType()) {\n case 0:\n createMenu1(menu);\n break;\n case 1:\n createMenu2(menu);\n break;\n case 2:\n createMenu3(menu);\n break;\n }\n }",
"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 }",
"public Menu() {\n\n\t}",
"@FXML\n private void loadMainMenu() throws IOException {\n Parent parent = FXMLLoader.load(getClass().getResource(MAIN_MENU_FXML));\n Stage mainStage = StageInitializer.parentStage;\n mainStage.getScene().setRoot(parent);\n }",
"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 }",
"private void makeThirdPartyMenu() {\r\n\t\tJMenu thirdPartyMnu = new JMenu(\"Terceros\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Clientes\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenu customerMnu = new JMenu(\"Clientes\");\r\n\r\n\t\t\tif (StoreCore.getAccess(\"AgregarClientes\")) {\r\n\t\t\t\tJMenuItem addItem = new JMenuItem(\"Agregar Cliente\");\r\n\t\t\t\taddItem.setMnemonic('c');\r\n\t\t\t\taddItem.setToolTipText(\"Agregar rapidamente un nuevo cliente\");\r\n\t\t\t\taddItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\tnew AddCustomer(\"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t\tcustomerMnu.add(addItem);\r\n\t\t\t}\r\n\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Listar Clientes\",\r\n\t\t\t\t\timageLoader.getImage(\"customer.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'l',\r\n\t\t\t\t\t\"Ver el listado de clientes\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F8, 0), Customer.class);\r\n\t\t\tcustomerMnu.add(menuItem);\r\n\r\n\t\t\tcustomerMnu.setMnemonic('c');\r\n\t\t\tthirdPartyMnu.add(customerMnu);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Proveedores\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenu customerMnu = new JMenu(\"Proveedores\");\r\n\r\n\t\t\tif (StoreCore.getAccess(\"AgregarProveedores\")) {\r\n\t\t\t\tJMenuItem addItem = new JMenuItem(\"Agregar Proveedor\");\r\n\t\t\t\taddItem.setMnemonic('p');\r\n\t\t\t\taddItem\r\n\t\t\t\t\t\t.setToolTipText(\"Agregar rapidamente un nuevo proveedor\");\r\n\t\t\t\taddItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\tnew AddProvider(\"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t\tcustomerMnu.add(addItem);\r\n\t\t\t}\r\n\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Listar Proveedores\",\r\n\t\t\t\t\timageLoader.getImage(\"provider.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'l',\r\n\t\t\t\t\t\"Ver el listado de proveedores\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F9, 0), Provider.class);\r\n\t\t\tcustomerMnu.add(menuItem);\r\n\r\n\t\t\tcustomerMnu.setMnemonic('p');\r\n\t\t\tthirdPartyMnu.add(customerMnu);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tthirdPartyMnu.setMnemonic('t');\r\n\t\t\tadd(thirdPartyMnu);\r\n\t\t}\r\n\t}",
"private void createMenuBar() {\n\t\tmenuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(\"Arquivo\");\n\t\tnewMenuItem = new JMenuItem(\"Novo\");\n\n\t\topenMenuItem = new JMenuItem(\"Abrir arquivo\");\n\t\topenMenuItem.addActionListener(new OpenFileHandler());\n\n\t\tsaveMenuItem = new JMenuItem(\"Salvar arquivo\");\n\t\texportMenuItem = new JMenuItem(\"Exportar\");\n\t\texitMenuItem = new JMenuItem(\"Sair\");\n\n\t\t// fileMenu.add(newMenuItem);\n\t\tfileMenu.add(openMenuItem);\n\t\t// fileMenu.add(saveMenuItem);\n\t\t// fileMenu.add(exportMenuItem);\n\t\t// fileMenu.addSeparator();\n\t\t// fileMenu.add(exitMenuItem);\n\n\t\thelpMenu = new JMenu(\"Ajuda\");\n\t\thelpMenuItem = new JMenuItem(\"Ajuda\");\n\t\taboutMenuItem = new JMenuItem(\"Sobre\");\n\n\t\thelpMenu.add(helpMenuItem);\n\t\thelpMenu.add(aboutMenuItem);\n\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(helpMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}",
"public void generateMenu(){\n\t\tmenuBar = new JMenuBar();\n\n\t\tJMenu file = new JMenu(\"File\");\n\t\tJMenu tools = new JMenu(\"Tools\");\n\t\tJMenu help = new JMenu(\"Help\");\n\n\t\tJMenuItem open = new JMenuItem(\"Open \");\n\t\tJMenuItem save = new JMenuItem(\"Save \");\n\t\tJMenuItem exit = new JMenuItem(\"Exit \");\n\t\tJMenuItem preferences = new JMenuItem(\"Preferences \");\n\t\tJMenuItem about = new JMenuItem(\"About \");\n\n\n\t\tfile.add(open);\n\t\tfile.add(save);\n\t\tfile.addSeparator();\n\t\tfile.add(exit);\n\t\ttools.add(preferences);\n\t\thelp.add(about);\n\n\t\tmenuBar.add(file);\n\t\tmenuBar.add(tools);\n\t\tmenuBar.add(help);\n\t}",
"public static void main(String[] args) {\n\t\tnew Menu();\n\t}",
"IMenu getMainMenu();",
"public Menu()\n {\n \n }",
"MenuBar setMenu() {\r\n\t\t// initially set up the file chooser to look for cfg files in current directory\r\n\t\tMenuBar menuBar = new MenuBar(); // create main menu\r\n\r\n\t\tMenu mFile = new Menu(\"File\"); // add File main menu\r\n\t\tMenuItem mExit = new MenuItem(\"Exit\"); // whose sub menu has Exit\r\n\t\tmExit.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\tpublic void handle(ActionEvent t) { // action on exit\r\n\t\t\t\ttimer.stop(); // stop timer\r\n\t\t\t\tSystem.exit(0); // exit program\r\n\t\t\t}\r\n\t\t});\r\n\t\tmFile.getItems().addAll(mExit); // add load, save and exit to File menu\r\n\r\n\t\tMenu mHelp = new Menu(\"Help\"); // create Help menu\r\n\t\tMenuItem mAbout = new MenuItem(\"About\"); // add Welcome sub menu item\r\n\t\tmAbout.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent actionEvent) {\r\n\t\t\t\tshowAbout(); // whose action is to give welcome message\r\n\t\t\t}\r\n\t\t});\r\n\t\tmHelp.getItems().addAll(mAbout); // add Welcome and About to Run main item\r\n\r\n\t\tmenuBar.getMenus().addAll(mFile, mHelp); // set main menu with File, Config, Run, Help\r\n\t\treturn menuBar; // return the menu\r\n\t}",
"private MenuBar.MenuItem createMenuItem(View vista, String menuAddress, Resource menuIcon) {\n MenuBar.MenuItem menuItem;\n MenuCommand cmd = new MenuCommand(menuBar, vista);\n menuItem = menuBar.addItem(menuAddress, menuIcon, cmd);\n menuItem.setStyleName(AMenuBar.MENU_DISABILITATO);\n\n return menuItem;\n }",
"public MainMenu(Game game) {\r\n\t\tsuper(game);\r\n\t}",
"public Menu() {\r\n\r\n }",
"@Override\n public void create(SwipeMenu menu) {\n switch (menu.getViewType()) {\n case VIEW_TYPE_1:\n createMenu1(menu);\n break;\n case VIEW_TYPE_2:\n createMenu2(menu);\n break;\n case VIEW_TYPE_3:\n createMenu3(menu);\n break;\n }\n }",
"MenuEntry.Factory getMenuEntryFactory();",
"public MenuService() {\n\t\tnew DisplayMenu();\n\t}",
"public Menu() {\n }",
"public void mainMenu()\n {\n\n System.out.println('\\u000C'); //clears screen\n System.out.println(\"<------------- Press 0 to return.\");\n System.out.println();\n System.out.println();\n System.out.println(\"\\t\\tTeacher Menu\");\n System.out.println(\"\\t1. View Names\");\n System.out.println(\"\\t2. Change Name\");\n System.out.println(\"\\t3. Add Teacher\");\n input = in.nextInt();\n in.nextLine();\n\n switch(input)\n {\n case 0: //call main menu -- create instance of menu class here to pass in current state of arraylist\n returnTo = new StartMenu(teachers);\n returnTo.enterId(teachers);\n break;\n\n case 1: //view names -- a subclass class that extends StudentMenu \n //temporary method that will view all names\n viewNames();\n break;\n\n case 2: //change names\n changeName();\n break;\n\n case 3: //change grade\n addNewPerson();\n break;\n\n } //ends switch statement\n\n }",
"void createMenus(Container cp) {\r\n createMenu4Shape(cp);\r\n createMenu4Color(cp);\r\n createMenu4Filled(cp);\r\n createButtons(cp);\r\n }",
"public void initPlayerMenu() {\n Font f = new Font(\"Helvetica\", Font.BOLD, 16);\n\n menuPanel = new JPanel();\n menuPanel.setPreferredSize(new Dimension(buttonWidth, buttonHeight));\n menuPanel.setLayout(null);\n\n menuBar = new JMenuBar();\n menuBar.setPreferredSize(new Dimension(buttonWidth, buttonHeight));\n menuBar.setBounds(0, 0, buttonWidth, buttonHeight);\n menuBar.setLayout(null);\n\n playerMenu = new JMenu();\n playerMenu.setText(\"Players\");\n playerMenu.setFont(f);\n playerMenu.setBounds(0, 0, buttonWidth, buttonHeight);\n playerMenu.setBackground(new Color(0xeaf1f7));\n playerMenu.setHorizontalTextPosition(SwingConstants.CENTER);\n playerMenu.setOpaque(true);\n playerMenu.setBorder(BorderFactory.createBevelBorder(0));\n\n menuBar.add(playerMenu);\n menuPanel.add(menuBar);\n }",
"@Override\n public void create(SwipeMenu menu) {\n switch (menu.getViewType()) {\n case 0:\n createMenu1(menu);\n break;\n case 1:\n createMenu2(menu);\n break;\n\n }\n }",
"public static void main(String[] args) {\r\n form_menu form_menu1 = new form_menu();\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n getMenuInflater().inflate(R.menu.diary, menu);\n\n try\n {\n constructUserInterface();\n }\n catch (Exception exp)\n {\n return false;\n }\n return true;\n }",
"private void initMenu(JFrame newBoard) {\n JMenuBar menuBar = new JMenuBar();\n setJMenuBar(menuBar);\n \n // Define and add menu items.\n JMenu fileMenu = new JMenu(\"File\");\n menuBar.add(fileMenu);\n \n // Add the same and load actions.\n JMenuItem saveAction = new JMenuItem(\"SAVE\");\n JMenuItem loadAction = new JMenuItem(\"OPEN\");\n fileMenu.add(saveAction);\n fileMenu.add(loadAction);\n \n saveAction.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ex) {\n\n try {\n FileOutputStream fileOutput = new FileOutputStream(\"test.gam\");\n @SuppressWarnings(\"resource\")\n ObjectOutputStream objOutput = new ObjectOutputStream(fileOutput);\n objOutput.writeObject(newBoard);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n\n }\n });\n \n loadAction.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e2) {\n \n try {\n FileInputStream fileInput = new FileInputStream(\"test.gam\");\n @SuppressWarnings(\"resource\")\n ObjectInputStream obInput = new ObjectInputStream(fileInput);\n JFrame tempBoard = (JFrame) obInput.readObject();\n tempBoard.setVisible(true);\n } catch (ClassNotFoundException | IOException e3) {\n e3.printStackTrace();\n }\n\n }\n });\n }",
"@objid (\"fff3543b-6152-4665-9552-d57a3790f997\")\n public static MMenuElement createMenu(final IModule module, MPart view) {\n MMenu moduleMenu = MMenuFactory.INSTANCE.createMenu();\n moduleMenu.setEnabled(true);\n moduleMenu.setToBeRendered(true);\n moduleMenu.setVisible(true);\n moduleMenu.setLabel(module.getLabel());\n moduleMenu.setIconURI(getModuleIconeURI(module));\n moduleMenu.getTags().add(DYNAMIC_MODULE_MENU_TAG);\n moduleMenu.getTags().add(module.getName());\n // Create command, handler and corresponding menu entry for each\n // IModuleAction provided by the module with\n // location == ActionLocation.contextualpopup\n createMenuEntriesForAction(module, moduleMenu, view);\n // If at least one command added, add the module to the main popup.\n if (!moduleMenu.getChildren().isEmpty()) {\n return moduleMenu;\n }\n return null;\n }",
"public void onMenuNew() {\n handleMenuOpen(null);\n }",
"@Test\n public void testMenuFactory() {\n assertNotNull(menuFactory);\n }",
"protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\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}",
"public static void updateMainMenu() {\n instance.updateMenu();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\n }",
"public void addItem(Menu subMenu, Class<?> appClass) {\n\t\tMenuItem item = new MenuItem(Messages.getMessages().getString(\"app_\"+appClass.getSimpleName()));\n\t\tsubMenu.getItems().add(item);\n\t\titem.setOnAction(mainApp.new AppStarter(appClass, subMenu.getText()));\n\t}",
"public void addMenuCreationListener(MenuCreationListener listener) {\n menuCreationListeners.add(listener);\n }",
"protected void addMenuItems(JPopupMenu menu, ActionListener listener) {\r\n JMenuItem menuItem;\r\n menuItem = new JMenuItem(\"Store cluster\", GUIFactory.getIcon(\"new16.gif\"));\r\n menuItem.setActionCommand(STORE_CLUSTER_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Launch new session\", GUIFactory.getIcon(\"launch_new_mav.gif\"));\r\n menuItem.setActionCommand(LAUNCH_NEW_SESSION_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem); \r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Delete public cluster\", GUIFactory.getIcon(\"delete16.gif\"));\r\n menuItem.setActionCommand(SET_DEF_COLOR_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Save cluster...\", GUIFactory.getIcon(\"save16.gif\"));\r\n menuItem.setActionCommand(SAVE_CLUSTER_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menuItem = new JMenuItem(\"Save all clusters...\", GUIFactory.getIcon(\"save16.gif\"));\r\n menuItem.setActionCommand(SAVE_ALL_CLUSTERS_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n setOverallMaxMenuItem = new JMenuItem(\"Set Y to overall max...\", GUIFactory.getIcon(\"Y_range_expand.gif\"));\r\n setOverallMaxMenuItem.setActionCommand(SET_Y_TO_EXPERIMENT_MAX_CMD);\r\n setOverallMaxMenuItem.addActionListener(listener);\r\n setOverallMaxMenuItem.setEnabled(false);\r\n menu.add(setOverallMaxMenuItem);\r\n \r\n setClusterMaxMenuItem = new JMenuItem(\"Set Y to cluster max...\", GUIFactory.getIcon(\"Y_range_expand.gif\"));\r\n setClusterMaxMenuItem.setActionCommand(SET_Y_TO_CLUSTER_MAX_CMD);\r\n setClusterMaxMenuItem.addActionListener(listener);\r\n menu.add(setClusterMaxMenuItem);\r\n\r\n menuItem = new JMenuItem(\"Toggle reference line...\");\r\n menuItem.setActionCommand(TOGGLE_REF_LINE_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Broadcast Matrix to Gaggle\", GUIFactory.getIcon(\"gaggle_icon_16.gif\"));\r\n menuItem.setActionCommand(BROADCAST_MATRIX_GAGGLE_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menuItem = new JMenuItem(\"Broadcast Gene List to Gaggle\", GUIFactory.getIcon(\"gaggle_icon_16.gif\"));\r\n menuItem.setActionCommand(BROADCAST_NAMELIST_GAGGLE_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menuItem = new JMenuItem(\"Broadcast Matrix to Genome Browser\", GUIFactory.getIcon(\"gaggle_icon_16.gif\"));\r\n menuItem.setActionCommand(BROADCAST_MATRIX_GENOME_BROWSER_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n }",
"private void createMenuBar(){\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\t//Create the \"File\" menu\n\t\tthis.createFileMenu();\n\t\tmenuBar.add(fileMenu);\n\t\t\t\t\n\t\t//Create \"debug\" menu[disabled]\n\t\t//createDebugMenu();\t\t\n\t\t\n\t\t//last to be added to the menubar: about\n\t\tabout = new JMenuItem(\"About\");\n\t\tabout.addActionListener(this);\n\t\tmenuBar.add(about);\n\t}",
"public static MainMenuManager getInstance() \n\t\t{\n\t\t\tif (uniqueInstance == null) \n\t\t\t{\n\t\t\t\tuniqueInstance = new MainMenuManager();\n\t\t\t\tString menuDisplay = \"\\n\\tMain Menu: \" \n\t\t\t\t+ \"\\n\\t\\t1> Perform Operations on Numbers\"\n\t\t\t\t+ \"\\n\\t\\t2> Perform Operations on String\" \n\t\t\t + \"\\n\\t\\t3> Show Use Statistics\"\n\t\t\t\t+ \"\\n\\t\\t4> Exit Program\" + \"\\n\" \t\n\t\t\t\t+ \"\\n\\n\\tEnter your selection: \";\n\t\t\t\t// Create a menu object as per the specifications of the main\n\t\t\t\t// menu. Notice that it displays the above string, it has 4 options\n\t\t\t\t// and for the user to select a valid option, we have establised\n\t\t\t\t// a maximum of 3 opportunities.\n\t\t\t\tuniqueInstance.menu = new Menu(menuDisplay, 4, 3);\n\t\t\t}\n\t\t\treturn uniqueInstance;\n\t\t}",
"private JMenu getMMain() {\n\t\tif (mMain == null) {\n\t\t\tmMain = new JMenu();\n\t\t\tmMain.setText(\"Dosya\");\n\t\t\tmMain.add(getMiConfigure());\n\t\t\tmMain.add(getMiExit());\n\t\t}\n\t\treturn mMain;\n\t}",
"public LevelMenu(int levelmenu) {}",
"public void buildMenu() {\n\t\tthis.Menu = new uPanel(this.layer, 0, 0, (int) (this.getWidth() * 2), (int) (this.getHeight() * 3)) {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean handleEvent(uEvent event) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick() {\r\n\t\t\t\tsuper.onClick();\r\n\t\t\t\tthis.space.sortLayer(this.layer);\r\n\t\t\t\tthis.castEvent(\"MENUPANEL_CLICK\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.screen.addPrehide(this.Menu);\r\n\r\n\t\tthis.Node.addChild(this.Menu.getNode());\r\n\r\n\t}",
"private void setupMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t// Build the first menu.\n\t\tJMenu menu = new JMenu(Messages.getString(\"Gui.File\")); //$NON-NLS-1$\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenuBar.add(menu);\n\n\t\t// a group of JMenuItems\n\t\tJMenuItem menuItem = new JMenuItem(openAction);\n\t\tmenu.add(menuItem);\n\n\t\t// menuItem = new JMenuItem(openHttpAction);\n\t\t// menu.add(menuItem);\n\n\t\t/*\n\t\t * menuItem = new JMenuItem(crudAction); menu.add(menuItem);\n\t\t */\n\n\t\tmenuItem = new JMenuItem(showLoggingFrameAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(quitAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuBar.add(menu);\n\n\t\tJMenu optionMenu = new JMenu(Messages.getString(\"Gui.Options\")); //$NON-NLS-1$\n\t\tmenuItem = new JCheckBoxMenuItem(baselineModeAction);\n\t\toptionMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(toggleButtonsAction);\n\t\toptionMenu.add(menuItem);\n\n\t\tmenuBar.add(optionMenu);\n\t\tJMenu buttonMenu = new JMenu(Messages.getString(\"Gui.Buttons\")); //$NON-NLS-1$\n\t\tmenuItem = new JMenuItem(wrongAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(attendingAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(independentAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(verbalAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(modelingAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(noAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuBar.add(buttonMenu);\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tframe.pack();\n\n\t\tframe.setVisible(true);\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 }"
] | [
"0.6902118",
"0.6862176",
"0.67329264",
"0.66652304",
"0.6604853",
"0.65961945",
"0.6582448",
"0.6541095",
"0.6496525",
"0.648083",
"0.6476082",
"0.6427426",
"0.6417077",
"0.6306744",
"0.6294147",
"0.62806654",
"0.6264738",
"0.62550455",
"0.6223455",
"0.61975807",
"0.619306",
"0.6182784",
"0.61793953",
"0.6169187",
"0.61647034",
"0.61590946",
"0.6139701",
"0.6132997",
"0.6131294",
"0.6122362",
"0.6112123",
"0.6111704",
"0.6105726",
"0.6095946",
"0.6095776",
"0.6094141",
"0.6080902",
"0.6072452",
"0.6069614",
"0.6062371",
"0.6037823",
"0.6034786",
"0.60166186",
"0.6010705",
"0.60082674",
"0.5990257",
"0.5989804",
"0.59886754",
"0.59870046",
"0.5977847",
"0.5976301",
"0.59738874",
"0.5972043",
"0.59655946",
"0.59415746",
"0.59362537",
"0.59337884",
"0.59334356",
"0.5926485",
"0.5926051",
"0.592572",
"0.5923387",
"0.59134007",
"0.59123427",
"0.59055495",
"0.59015036",
"0.5896964",
"0.5894007",
"0.58939165",
"0.5893727",
"0.58842963",
"0.58833724",
"0.588216",
"0.58802694",
"0.5868931",
"0.58595854",
"0.5857466",
"0.5855322",
"0.5843946",
"0.5841162",
"0.58385855",
"0.583219",
"0.5826621",
"0.5816904",
"0.5815575",
"0.580366",
"0.579995",
"0.579757",
"0.5789895",
"0.5786436",
"0.5785101",
"0.5783974",
"0.5780884",
"0.5779503",
"0.57766277",
"0.5768088",
"0.5762973",
"0.5751476",
"0.57443815",
"0.57428575"
] | 0.7628065 | 0 |
This is the entry point for your menu. It should print any welcoming messages, and start the IO for the user. Do NOT create a new Scanner for input! Use the GameInput class. | abstract void mainPrompt(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void mainmenu() {\n\t\t\n\t\tSystem.out.println(\"Welcome. This is a rogue-like text-based RPG game.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"You control your character by entering your desired action when prompted.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"Do you want to start your journey?\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" y: yes \t\tn: no\t\t\");\n\t\tresponse = Engine.request();\n\t\tif(response == false) {\n\t\t\tSystem.out.println(\"W-What are you doing here then? If you're not here to play the game then what do you even want to do?\");\n\t\t\tSystem.out.println(\"To start, write \\\"Y\\\" or \\\"y\\\" in the console \");\n\t\t\tSystem.out.println(\"I won't ask again. Do you want to start your journey?\");\n\t\t\tresponse = Engine.request();\n\t\t\tif(response == false) {\n\t\t\t\tSystem.out.println(\"I am not here to judge your decision. Farewell.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Glad you came to your senses.\");\t\t\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Very well.\");\n\t\t}\n\t\tSystem.out.println();\t\t\n\t\tif(Engine.devmode == true) System.out.println(\"\tDebug: StartMenu passed\");\n\t\t\n\t\t\t// Cadet dungeon check\n\t\tif(Progresslog.cadetplaytime < 3) {\n\t\t\tSystem.out.println(\"You seem to be new at the game. Would you like to play through a more tailored experience,\\n\"\n\t\t\t\t\t+ \"which is designed for inexperienced players and introduces you to the game's mechanics?\");\n\t\t\tif(Engine.devmode == true) System.out.println(\"Cadet playtime: \" + Progresslog.cadetplaytime);\n\t\t\tresponse = Engine.request();\n\t\t\tif(response == true) {\n\t\t\t\tSystem.out.println(\"Alright then.\");\n\t\t\t\tDungeoncadet();\n\t\t\t} else DungeonGen();\t\t\t\n\t\t} else DungeonGen();\t\t\n\t}",
"static void mainMenu()\n {\n clrscr();\n System.out.print(\"\\n\"\n + title()\n + \"Go on, \" + Player.current.name + \", choose away ...\\n\"\n + \"1. Match time!\\n\"\n + \"2. Pokedex pls\\n\"\n + \"3. Show me my stats\\n\"\n + \"4. I suck at life and want to quit\\n\"\n + \"(1/2/3/4): \");\n\n // checks for int input, or routes back to mainMenu()\n int option = input.hasNextInt()? input.nextInt() : mainCallbacks.length - 1;\n\n // just defaults to quit if options > length of array of callbacks (here 5)\n mainCallbacks[Math.min(option, mainCallbacks.length - 1)].call();\n mainMenu();\n }",
"static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}",
"public void menu(){\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"<=======|\" + name + \"|=======>\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tSystem.out.println(\"1 -> Jouer\");\n\t\tSystem.out.println(\"2 -> Creer votre personnage\");\n\t\tSystem.out.println(\"3 -> Charger\");\n\t\tSystem.out.println(\"4 -> Best Score\");\n\t\tSystem.out.println(\"5 -> Instruction\");\n\t\tSystem.out.println(\"6 -> Quitter\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tint choice = in.nextInt();\n\n\t\t\tswitch (choice){\n\t\t\t\tcase 1:\n\t\t\t\t\tstartPlay();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreateChar();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tchargeGame();\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.print(\" NOM -\");\n\t\t\t\t\tSystem.out.print(\" GENRE -\");\n\t\t\t\t\tSystem.out.print(\" SANTEE -\");\n\t\t\t\t\tSystem.out.print(\" FORCE -\");\n\t\t\t\t\tSystem.out.print(\" ARMES -\");\n\t\t\t\t\tSystem.out.println(\" ARGENT -\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tbdd.dbQuery(\"SELECT * FROM score ORDER BY health DESC\");\n\t\t\t\t\tmenu();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\trules();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\texit();\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Choix non valide\");\n\t\t\t\t\tmenu();\n\t\t\t}\n\t}",
"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 }",
"public static void main(String[] args) \r\n\t{\n\t\t\r\n\t\tboolean playing = false;\r\n\t\t\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tString option = menu();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"\\n\\n\\n\\n\\n\\n\");\r\n\t\t\t\r\n\t\t\tif(option.equals(\"1\"))\r\n\t\t\t{\r\n\t\t\t\tcreateGame();\r\n\t\t\t\tplaying = true;\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"2\"))\r\n\t\t\t{\r\n\t\t\t\tcontinueGame();\r\n\t\t\t\tplaying = true;\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"3\"))\r\n\t\t\t{\r\n\t\t\t\tdeleteGames();\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"4\"))\r\n\t\t\t{\r\n\t\t\t\tGameManager.instance().viewHallOfFame();\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"5\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Thanks for playing Rogue Lands\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Invalid option\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(playing)\r\n\t\t\t{\t\r\n\t\t\t\tboolean ans = Game.instance().Load();\r\n\t\t\t\t\r\n\t\t\t\tif(!ans) continue;\r\n\t\t\t\t\r\n\t\t\t\tGame.instance().AssembleScene();\r\n\t\t\t\t\r\n\t\t\t\tGame.instance().Setup();\r\n\t\t\t\t\r\n\t\t\t\tGame.instance().Play();\r\n\t\t\t\t\r\n\t\t\t\tplaying = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void PrintMenu() throws IOException {\r\n\t\t//loop the menu until the user chooses to quit\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.println(\"Welcome to the EnigmaMachine command interface!\");\r\n\t\t\tSystem.out.println(\"Enter 1 to add the plugs\");\r\n\t\t\tSystem.out.println(\"Enter 2 to add the rotors\");\r\n\t\t\tSystem.out.println(\"Enter 3 to add the reflector\");\r\n\t\t\tSystem.out.println(\"Enter 4 to enter the message\");\r\n\t\t\tSystem.out.println(\"Enter 5 to quit the menu and start the machine\");\r\n\t\t\t\r\n\t\t\tint option = this.readIntegerFromCmd();\r\n\t\t\t//jump to different method according to the input of the user\r\n\t\t\tif (option == 1) {\r\n\t\t\t\tthis.addPlug();\r\n\t\t\t}else if (option == 2) {\r\n\t\t\t\tthis.addRotors();\r\n\t\t\t}else if (option == 3) {\r\n\t\t\t\tthis.addReflector();\r\n\t\t\t}else if (option == 4) {\r\n\t\t\t\tthis.addMessage();\r\n\t\t\t}else if (option == 5) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void startMenu(){\n System.out.println(\"\" +\n \"\\nWelcome to the video game library (NUMBER OF GAMES: \"+Library.games.size()+\") what would you like to do? \\n\" +\n \"1. Add a game to the library \\n\" +\n \"2. Remove a game from the library \\n\" +\n \"3. View what is currently in the library \\n\" +\n \"4. Check a game out \\n\" +\n \"5. Check a game in \\n\" +\n \"6. View checked out games \\n\" +\n \"7. Exit the program\");\n\n try{\n switch (input.nextInt()){\n\n case 1:\n // Add a game\n library.addGame();\n startMenu();\n break;\n case 2:\n // Remove a game\n library.removeGame();\n startMenu();\n break;\n case 3:\n // View the game library\n library.viewGameLibrary();\n startMenu();\n break;\n case 4:\n // Check out a game\n library.checkOut();\n startMenu();\n break;\n case 5:\n library.checkIn();\n startMenu();\n // Check in game\n break;\n case 6:\n // View checked out games\n library.viewCheckedOutGames();\n startMenu();\n break;\n case 7:\n // Exit program\n System.exit(0);\n break;\n default:\n // prompt the user to pick a correct number, loop back to menu\n System.out.println(\"\\nSelect a number from 1 - 7\");\n startMenu();\n break;\n }\n\n }catch (InputMismatchException ime){\n input.nextLine();\n System.out.println(\"\\nSelect a number from 1 - 7\");\n startMenu();\n\n }\n\n }",
"public void run(){\n ArrayList<String> menuItems = new ArrayList<>();\n menuItems.add(\"Play the Game\");\n menuItems.add(\"Close the Program\");\n menuItems.add(\"Show the highest score\");\n String menu = CollectionTools.collectionPrinter('S', menuItems);\n runMenu(menu);\n }",
"@Override\n\tpublic void display() {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twelcomeMessage();\n\t\tloggy.info(\"User sees the welcome menu\");\n\t\t\n\t\tboolean loggingIn = true;\n\t\tUser user = null;\n\t\twhile(loggingIn) {\n\t\t\tuser = loginMenu(sc);\n\t\t\t\n\t\t\tif(user != null) {\n\t\t\t\tloggingIn = false;\n\t\t\t\tloggy.info(\"User logged in!\");\n\t\t\t}else {\n\t\t\t\tloggy.warn(\"User failed to login\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Welcome user! Here are your tasks!\");\n\t\tboolean running = true;\n\t\t\n\t\t\n\t\twhile(running) {\n\t\t\t\n\t\t\tSystem.out.println(\"Here is the todo menu!\");\n\t\t\tSystem.out.println(\"1) See all todos\");\n\t\t\tSystem.out.println(\"2) Add a todo\");\n\t\t\tSystem.out.println(\"3) Delete a todo\");\n\t\t\tSystem.out.println(\"4) Set a todo to complete\");\n\t\t\tSystem.out.println(\"0) Exit the application \");\n\t\t\t\n\t\t\tString input = sc.nextLine();\n\t\t\t\n\t\t\tswitch(input) {\n\t\t\t\n\t\t\tcase \"1\": \n\t\t\t\tseeAllTodos(user);\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\taddTodoMenu(user, sc);\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\tdeleteTodoMenu(user);\n\t\t\t\tbreak;\n\t\t\tcase \"4\":\n\t\t\t\tcompleteTodoMenu(user);\n\t\t\t\tbreak;\n\t\t\tcase \"0\":\n\t\t\t\trunning = false;\n\t\t\t\tSystem.out.println(\"Thanks for using my service!\");\n\t\t\t\tbreak;\n\t\t\tdefault: \n\t\t\t\tSystem.out.println(\"Invalid input, try again!\");\n\t\t\t\t\n\t\t\t}\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\t\n\n\t}",
"public void mainMenu() throws Exception {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Test Menu Class\");\n\t\tSystem.out.println(\"Created by Connor Goddard\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"** ** ** ** ** ** ** ** **\");\n\t\tSystem.out.println(\"1) Select Option 1\");\n\t\tSystem.out.println(\"2) Select Option 2\");\n\t\tSystem.out.println(\"3) Select Option 3\");\n\t\tSystem.out.println(\"** ** ** ** ** ** ** ** **\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Please select an option: \");\n\t\t\n\t\t// Prompt for a menu option to be inputted from the user\n\t\t// **'.charAt' is used to prevent an IllegalArgumentException being thrown if any other type of input is used\n\t\tchar playerInput = scan.next().charAt(0);\n\t\t\n\t\t// Run the appropiate commands depending on the inputted character from the user\n\t\tmenuSelect(playerInput);\n\t}",
"public static void main(String[] args) throws Exception{\n locations = World.getInstance();\n player = Player.getInstance();\n\n startMessage();\n\n try(BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))){\n playerName = reader.readLine();\n printConstantMessage(Constants.HELLO_MSG, playerName);\n System.out.println();\n\n player.moveTo(locations.stream().findFirst().get());\n\n while(runGame){\n System.out.print(Constants.PRE_INPUT_TEXT);\n parseInput(reader.readLine());\n }\n }\n }",
"public void runMenu(String menu){\n ui.printToUser(!played ? \"Hello, would you like to play a game of BattleShip?\" : \"Hello again!, \\nwould you like to play another game of BattleShip?\");\n char choice = ui.getUserAnswer(menu);\n\n switch(choice){\n case 'A':\n try{\n setUpTheGame();\n } catch(UserCancelsException e){\n ui.printToUser(\"Shame you couldn't finish the game, too much of a challenge is it...?\");\n }\n run();\n break;\n case 'B':\n closeProgram();\n break;\n case 'C':\n printHighestScore();\n run();\n break;\n default:\n ui.printToUser(\"Couldn't understand the input, please choose again.\");\n run();\n break;\n }\n }",
"public static void main(String[] args) throws IOException {\n\n\n Menu.displayMenu();\n }",
"public static void main(String[] args) {\n init();\n\n //take input from the players before starting the game\n input();\n\n //the gameplay begins from here\n System.out.println();\n System.out.println();\n System.out.println(\"***** Game starts *****\");\n play();\n }",
"protected void menu() throws IOException {\r\n\t\tdebug.write(\"simulator started\");\r\n\r\n\t\tkeepRunning = true;\r\n\t\tString option = \"1\";\r\n\t\tint optionInt;\r\n\r\n\t\twhile (keepRunning) {\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\"- 1 start simulation\");\r\n\t\t\tSystem.out.println(\"- 2 stop simulation\");\r\n\t\t\tSystem.out.println(\"- 3 list clients\");\r\n\t\t\tSystem.out.println(\"- 4 send message\");\r\n\t\t\tSystem.out.println(\"- 5 list messages\");\r\n\t\t\tSystem.out.println(\"- 6 reload users file\");\r\n\t\t\tSystem.out.println(\"- 7 log to screen \" + (displayInfo ? \"off\" : \"on\"));\r\n\t\t\tSystem.out.println(\"- 0 exit\");\r\n\t\t\tSystem.out.print(\"> \");\r\n\t\t\toptionInt = -1;\r\n\t\t\ttry {\r\n\t\t\t\toption = keyboard.readLine();\r\n\t\t\t\toptionInt = Integer.parseInt(option);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tdebug.write(\"exception reading keyboard \" + e);\r\n\t\t\t\toptionInt = -1;\r\n\t\t\t}\r\n\t\t\tswitch (optionInt) {\r\n\t\t\t\tcase 1 :\r\n\t\t\t\t\tstart();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2 :\r\n\t\t\t\t\tstop();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3 :\r\n\t\t\t\t\tlistClients();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4 :\r\n\t\t\t\t\tsendMessage();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5 :\r\n\t\t\t\t\tmessageList();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6 :\r\n\t\t\t\t\treloadUsers();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7 :\r\n\t\t\t\t\tlogToScreen();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 0 :\r\n\t\t\t\t\texit();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase -1 :\r\n\t\t\t\t\t// default option if entering an option went wrong\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault :\r\n\t\t\t\t\tSystem.out.println(\"Invalid option. Choose between 0 and 6.\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Exiting simulator.\");\r\n\t\tdebug.write(\"simulator exited.\");\r\n\t}",
"private void start() throws IOException{\n\t\tprintMainMenu();\n\t\t//get a valid input from the user and if it is 2, then exit\n\t\tif (getValidInput(validMainMenuInputs) == 2) {\n\t\t\tprint(\"Goodbye!\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t//else we try to login\n\t\tlogin();\n\t}",
"@Override\n \tpublic void menu()\n \t{\n \t\tint random = PublicFunctions.getRandomNumberPiece();\n \n \t\twhile(true)\n \t\t{\t\t\t\n \t\t\tbuilder.setLength(0);\n \t\t\t\n \t\t\t//Print out the status\n \t\t\tif(random == 8)\n \t\t\t{\n \t\t\t\tbuilder.append(\"The new piece is mystery piece\").append(\"\\n\");\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tbuilder.append(\"The new piece is \").append(random).append(\"\\n\");\n \t\t\t}\n \t\t\tbuilder.append(board.toString());\n \t\t\tSystem.out.println(builder);\n \t\t\t\n \n \t\t\t//Prompt starts here\n \t\t\tSystem.out.println(\"Where do you want to place the piece?\");\n \t\t\t\n \t\t\tString position = scanner.nextLine();\n \t\t\t\n \t\t\tif(position.equalsIgnoreCase(\"exit\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Exiting...\");\n \t\t\t\t//dump stats here\n \t\t\t\tSystem.exit(0);\n \t\t\t}\n \t\t\telse if(position.equalsIgnoreCase(\"help\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Help here!\");\n \t\t\t}\n \t\t\telse if(PublicFunctions.isValidPosition(position))\n \t\t\t{\n \t\t\t\tif(!board.insert(Integer.parseInt(position), random))\n \t\t\t\t{\n \t\t\t\t\tSystem.out.println(\"You lose\");\n \t\t\t\t\t//dump statistics here\n \t\t\t\t\tSystem.exit(0);\n \t\t\t\t}\n \t\t\t\tSystem.out.println(\"Inserting piece...\");\n \n \t\t\t\t//Generate random number for next interation\n \t\t\t\trandom = PublicFunctions.getRandomNumberPiece();\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Invalid Entry\");\n \t\t\t}\n \t\t}\n \t}",
"public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void startProgram() {\n this.displayBanner();\n// prompt the player to enter their name Retrieve the name of the player\n String playersName = this.getPlayersName();\n// create and save the player object\n User user = ProgramControl.createPlayer(playersName);\n// Display a personalized welcome message\n this.displayWelcomeMessage(user);\n// Display the Main menu.\n MainMenuView mainMenu = new MainMenuView();\n mainMenu.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 static void main(String[] args) {\n\n printRule();\n\n while (true) {\n // Asks if the user wants to play or quit the game\n System.out.print(\"\\n\\n\\tTo Start enter S\"\n + \"\\n\\tTo Quit enter Q: \");\n String command = input.next();\n char gameStatus = command.charAt(0);\n\n // If s is entered, the game will begin\n switch (gameStatus) {\n case 's':\n case 'S':\n clearBoard(); // initialize the board to zero\n gameOn();\n break;\n case 'q':\n case 'Q':\n System.exit(0);\n default:\n System.out.print(\"Invalid command.\");\n break;\n }\n }\n }",
"private static void mainMenuLogic() {\n\n\t\twhile(true) {\n\n\t\t\tmenuHandler.clrscr();\n\t\t\tint maxChoice = menuHandler.mainMenu();\n\n\t\t\tint userChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t\tswitch(userChoice) {\n\t\t\tcase 1:\n\t\t\t\t// User menu\n\t\t\t\tuserMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t// Printer menu\n\t\t\t\tprinterMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// Network menu\n\t\t\t\tnetworkMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public static void runGame() {\n //Create instance of Datacontroller for sample data\n DataController dataController = DataController.getInstance();\n Encounter encounter;\n Scanner scan = new Scanner( System.in);\n\n int commandNum; //Variable that determines state of game\n\n while(true) {\n //TODO: Enter list of options for movement at every iteration\n System.out.println(\"Please enter your command\");\n System.out.println(\"1. Exit Game\\n2. Enter Combat\\n3. Items\");\n commandNum = scan.nextInt();\n\n switch (commandNum) {\n case 1: //Exit Game\n return;\n case 2: // Join Controller.Encounter\n encounter = new Encounter(dataController.getPlayer(),dataController.getEnemy());\n try {\n encounter.startFight();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n break;\n case 3: // View Menu TODO: create menu class\n\n }\n }\n }",
"public static void startMenu() {\n\t\tSystem.out.println(\"|**********************************|\");\n\t\tSystem.out.println(\"| |\");\n\t\tSystem.out.println(\"| Welcome to the Anny BankingApp! |\");\n\t\tSystem.out.println(\"| |\");\n\t\tSystem.out.println(\"************************************\");\n\n\t\tSystem.out.println(\"Please select your option:\");\n\t\tSystem.out.println(\"\\t[c]reate a new Account\");\n\t\tSystem.out.println(\"\\t[l]ogin to Your Account!\");\n\t\tSystem.out.println(\"\\t[a]dmin Menu\");\n\t\tSystem.out.println(\"\\t[e]mployee Menu\");\n\t\tSystem.out.println(\"\\t[o]Log Out\");\n\n\t\t//create variable to grab the input\n\t\tString option =scan.nextLine();\n\n\n\t\t//this switch case will based on chioce the users made////can be lowercase or uppercase letter\n\n\t\tswitch(option.toLowerCase()) {\n\t\tcase \"c\":\n\t\t\tcreateNewAccount();\n\t\t\tbreak;\n\t\tcase \"l\":\n\t\t\tloginToAccount();\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"a\":\n\t\t\tadminMenu();\n\t\t\tbreak;\n\t\tcase \"e\":\n\t\t\temployeeMenu();\n\t\t\tbreak;\n\t\tcase \"o\":\n\t\t\tSystem.out.println(\"You Successfully logged out, back to main menu!!!\");\n\t\t\tstartMenu();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Try again\");\n\t\t\tstartMenu();//Return to startmenu if choice not match\n\t\t\tbreak;\n\t\t}\n\n\t}",
"public void main_menu()\n\t{\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.println(\"Please Select an option\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.print(\"1.Add 2.Update 3.Delete 4.Exit\\n\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tchoice=me.nextInt();\n\t\tthis.check_choice(choice);\n\t}",
"private void mainMenu() {\r\n System.out.println(\"Please choose an option: \");\r\n System.out.println(\"1. New Player\");\r\n System.out.println(\"2. New VIP Player\");\r\n System.out.println(\"3. Quit\");\r\n }",
"private void displayMainMenu () {\n System.out.println();\n System.out.println(\n \"Enter the number of the action to perform: \");\n System.out.println(\n \"Run game...............\" + PLAY_GAME);\n System.out.println(\n \"Exit...................\" + EXIT);\n }",
"public void mainMenu()\n {\n\n System.out.println('\\u000C'); //clears screen\n System.out.println(\"<------------- Press 0 to return.\");\n System.out.println();\n System.out.println();\n System.out.println(\"\\t\\tTeacher Menu\");\n System.out.println(\"\\t1. View Names\");\n System.out.println(\"\\t2. Change Name\");\n System.out.println(\"\\t3. Add Teacher\");\n input = in.nextInt();\n in.nextLine();\n\n switch(input)\n {\n case 0: //call main menu -- create instance of menu class here to pass in current state of arraylist\n returnTo = new StartMenu(teachers);\n returnTo.enterId(teachers);\n break;\n\n case 1: //view names -- a subclass class that extends StudentMenu \n //temporary method that will view all names\n viewNames();\n break;\n\n case 2: //change names\n changeName();\n break;\n\n case 3: //change grade\n addNewPerson();\n break;\n\n } //ends switch statement\n\n }",
"public static void main_menu(){\n\n String command;\n\n do {\n\n System.out.println(\"Main Menu\");\n System.out.println(\"(A) \\t Add Applicant\");\n System.out.println(\"(R) \\t Remove Applicant\");\n System.out.println(\"(G) \\t Get Applicant\");\n System.out.println(\"(P) \\t Print List\");\n System.out.println(\"(RS) \\t Refine Search\");\n System.out.println(\"(S) \\t Size\");\n System.out.println(\"(D) \\t Backup\");\n System.out.println(\"(CB) \\t Compare Backup\");\n System.out.println(\"(RB) \\t Revert Backup\");\n System.out.println(\"(Q) \\t Quit\");\n\n\n //Scanner input = new Scanner(System.in);\n\n System.out.println(\"Please enter a command: \");\n command = input.nextLine().toUpperCase();\n\n switch (command){\n case \"A\" :\n main_addApplicant();\n break;\n case \"R\":\n main_removeApplicant();\n break;\n case \"G\" :\n main_getApplicant();\n break;\n case \"P\" :\n main_printList();\n break;\n case \"RS\":\n main_refineSearch();\n break;\n case \"S\" :\n main_getSize();\n break;\n case \"D\" :\n main_backup();\n break;\n case \"CB\" :\n main_compareBackup();\n break;\n case \"RB\" :\n main_revertBackup();\n break;\n case \"Q\" :\n System.exit(0);\n break;\n default:\n System.out.println(\"Invalid choice. Try again.\");\n //main_menu();\n\n }\n\n }\n while(!command.equalsIgnoreCase(\"Q\"));\n\n input.close();\n }",
"public static void main(String args[]) throws IOException\n {\n Menu m = new Menu();\n int choice = 0;\n System.out.println(\"111\");\n Scanner cin = new Scanner(System.in);\n System.out.println(\"222\");\n Customers cu = new Customers(\"customer.txt\");\n cu.displayCustomers();\n System.out.println(\"333\");\n Inventory iv = new Inventory(\"inventory.txt\");\n iv.displayCars();\n System.out.println(\"444\");\n //iv.sortYear();\n //System.out.println(\"555\");\n //display menu and implement functions\n System.out.println(\"Welcome to Carmax!\\n\");\n while(true)\n {\n m.carMaxMenu();\n System.out.print(\"\\nPlease input your choice: \");\n choice = cin.nextInt();\n cin.nextLine(); //gets rid of trailing new-line(\\n) character.\n\n if(choice == 1)\n {\n m.logIn(cu, iv);\n }\n\n else if(choice == 2)\n {\n m.signUp(cu);\n cu.displayCustomers();\n }\n\n else if(choice == 3)\n break;\n\n else\n System.out.println(\"Please choose one of the 3 choices!!!\");\n }\n\n cu.updateCustomersFile(\"customer.txt\");\n iv.updateInventoryFile(\"inventory.txt\");\n }",
"private void menu(){\n System.out.println(\"\");\n System.out.println(\"Round: \"+round);\n System.out.println(\"Please choose your action: \");\n\n Scanner tokenizer = parser.getCommand(); // prompt the user to put a new command in\n Command command = parser.parseCommand(tokenizer); // send the \"scanner\" result to make it into a command\n processCommand(command); // process the command\n\n }",
"protected static void launchingMainMenu(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.print(\"\\n\\nSelect an option from the Menu.\\n\" +\n \"\\tC : To CONTINUE the Program (Run MongoDB MANUALLY beforeHand) \\n\" +\n \"\\tQ : To Quit the program\\n\" +\n \"\\n\\nEnter option letter to proceed : \");\n String text = formattingWhitespace(sc.nextLine());\n if (text.equalsIgnoreCase(\"c\")) {\n // Reading the Database from Train Booking to get the Waiting room.\n TrainStation.setWaitingRoom();\n // Running the program.\n GUI.main(args);\n } else if (text.equalsIgnoreCase(\"Q\")){\n System.out.println(\"Exiting program.\");\n } else {\n System.out.println(\"Error - Invalid Input.\\n\");\n launchingMainMenu(args);\n }\n }",
"void startGame() {\n System.out.println(\"What game do you want to play?\\n\" + \"1. Lotto\\n\" + \"2. Small Lotto\\n\" + \"3. Quit\");\n input = scanner.next();\n changeGame();\n }",
"public void playConsole(){\n consoleWelcome();\n \n while (! finished) {\n if (gameOver) {\n Logger.Log(\"Your adventure is over...\");\n break;\n }\n Command command = parser.getCommand();\n finished = processCommand(command); \n }\n if (!gameOver) { \n Logger.Log(\"Thank you for playing. Good bye.\");\n }\n }",
"public void userForm(){\n\t\tSystem.out.print(menu);\n\t\tScanner input = new Scanner(System.in);\n\t\tselection = input.nextInt();\n\t\tmenuActions(selection);\n\t\t}",
"public static void main(String[] args) {\n String [] mainMenu = {\"Main Menu\", \"Search\", \"Stats\", \"Spells\", \"Bag\", \"Quests\", \"Shop\", \"Test\", \"Exit\"};\r\n //Array that stores the shop menu\r\n String [] shopMenu = {\"Shop Menu\", \"Buy\", \"Sell\", \"Exit\"};\r\n //Array that stores the battle menu\r\n String [] battleMenu = {\"Battle Menu\", \"Attack\", \"Run\"};\r\n //Array that stores the bag menu\r\n String [] bagMenu = {\"Bag Menu\", \"Equip\", \"Use\", \"Exit\"};\r\n //Array that stores the spell menu\r\n String [] spellMenu = {\"Spell Menu\", \"Exit\"};\r\n //Array that stores the stat menu\r\n String [] statMenu = {\"Stat Menu\", \"Allocate Stats\", \"Exit\"};\r\n //Array that stores the quest menu\r\n String [] questMenu = {\"Quest Menu\", \"Check\", \"Exit\"};\r\n //Array that stores the allocate stat menu\r\n String [] allocateStatMenu = {\"Allocate Stats Menu\", \"Strength\", \"Intelligence\", \"Vitality\", \"Cancel\"};\r\n //Array that stores the blue moon city menu\r\n String [] blueMoonMenu = {\"Blue Moon City\", \"General Goods\", \"Blacksmith\", \"Magic Shop\", \"Guild\", \"Exit\"};\r\n //Array that holds the blue moon general menu\r\n String [] blueMoonGeneralMenu = {\"Blue Moon General Goods\", \"Buy\", \"Sell\", \"Exit\"};\r\n //Array that stores the blue moon blacksmith menu\r\n String [] blueMoonBlacksmithMenu = {\"Blue Moon Blacksmith\", \"Buy\", \"Sell\", \"Exit\"};\r\n //Array that stores the blue moon guild menu\r\n String [] blueMoonGuildMenu = {\"Blue Moon Guild\", \"Accept\", \"Drop\", \"Turn-In\", \"Exit\"};\r\n \r\n //Variable for the user choice\r\n String userChoice;\r\n Random rand = new Random();\r\n //Variable to keep the program running\r\n Boolean done = false;\r\n //Instantiates the player\r\n player player1 = new player();\r\n //Gets the player's character name\r\n player1.setPlayerName(getUserName());\r\n //Loop that keeps the program running until exited\r\n while(!done){\r\n //Variable for the level up loop\r\n Boolean doneLevel = false;\r\n //Calculates the players defense\r\n player1.setTotalDefense(playerTotalDefense(player1.getPlayerHelmet(), player1.getPlayerChestPlate(), player1.getPlayerGloves(), player1.getPlayerBoots(), player1.getPlayerDefense()));\r\n //Calculates the players attack\r\n player1.setTotalAttack(playerTotalAttack(player1.getPlayerWeapon(), player1.getPlayerAttack(), player1.getStrength()));\r\n //Checks to see if they player has leveled up\r\n while(!doneLevel){\r\n if(player1.getPlayerExperience() > (player1.getPlayerLevel() * 100)){\r\n //Increases the player's level by 1\r\n player1.setPlayerLevel(levelUp(player1.getPlayerLevel()));\r\n //Subtracts the experience for the level up\r\n player1.setPlayerExperience((player1.getPlayerExperience() - ((player1.getPlayerLevel() - 1) * 100)));\r\n //Adds a stat point upon level up\r\n player1.setStatPoints(gainStatPoints(player1.getStatPoints()));\r\n //Fully heals the player\r\n player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth());\r\n //Fully restores the players mp\r\n player1.setCurrentMP(player1.getMaxMP());\r\n }else{\r\n doneLevel = true;\r\n }\r\n }\r\n //Array that stores the player's stats\r\n Object [] playerStats = {player1.getPlayerName(), player1.getPlayerLevel(), player1.getPlayerExperience(), player1.getPlayerCurrentHealth(), player1.getPlayerMaxHealth(),\r\n player1.getCurrentMP(), player1.getMaxMP(), player1.getTotalAttack(), player1.getTotalDefense(), player1.getStrength(),\r\n player1.getIntelligence(), player1.getVitality(), player1.getStatPoints(), player1.getPlayerGold()};\r\n //Displays the main menu and gets the user decision\r\n userChoice = getUserChoice(mainMenu);\r\n //Determines the next course of action\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Starts the battle sequence\r\n case \"1\":\r\n //Boolean for the battle sequence\r\n Boolean battle = true;\r\n //Variable to hold the item dropped after monster death\r\n String loot;\r\n //Variable to hold which encounter was picked\r\n String encounterHolder;\r\n //Holds the encounter\r\n encounterHolder = encounter(player1.getPlayerLevel());\r\n switch(encounterHolder){\r\n//******************************************************************************************************************************\r\n //Found a skeleton\r\n case \"Skeleton\":\r\n //Instantiates a skeleton\r\n skeleton Skeleton = new skeleton();\r\n //Scales skeleton max health based on player level\r\n Skeleton.setSkeletonMaxHealth(skeletonHealthScale(Skeleton.getSkeletonMaxHealth(), player1.getPlayerLevel()));\r\n //Puts the skeleton at full health\r\n Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonMaxHealth());\r\n //Scales skeleton attack based on player level\r\n Skeleton.setSkeletonAttack(skeletonAttackScale(Skeleton.getSkeletonAttack(), player1.getPlayerLevel()));\r\n //Starts the battle loop\r\n while(battle){\r\n //Displays the battle menu\r\n userChoice = getUserChoice(battleMenu);\r\n //Checks the user decision\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Attack option\r\n case \"1\":\r\n //Lists the potential attacks the player can make\r\n System.out.println(\"\\t1) Basic Attack\");\r\n for(int i = 0; i < player1.getSpellList().length; i++){\r\n if(player1.spellList[i].equals(\"\")){\r\n break;\r\n }else{\r\n System.out.println(\"\\t\" + (i + 2) + \") \" + player1.spellList[i]);\r\n }\r\n }\r\n //Gets the user decision\r\n userChoice = getUserInput(\"What attack do you want to do? \\n(Type the name of the attack)\");\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Basic Attack option\r\n case \"Basic Attack\":\r\n //Calculates the remaining health of the skeleton\r\n Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonCurrentHealth() - playerDamageDealt(player1.getTotalAttack(), Skeleton.getSkeletonDefense())); \r\n //Tells the user how much damage they dealt to the skeleton\r\n System.out.println(\"You dealt \" + playerDamageDealt(player1.getTotalAttack(), Skeleton.getSkeletonDefense()) + \" damage to the Skeleton!\"); \r\n //Tells the user how much health the skeleton has remaining\r\n System.out.println(\"The Skeleton has \" + Skeleton.getSkeletonCurrentHealth() + \"/\" + Skeleton.getSkeletonMaxHealth() + \" health left!\"); \r\n //Basic Attack break\r\n break;\r\n//******************************************************************************************************************************\r\n //Fireball option\r\n case \"Fireball\":\r\n //Creates fireball spell\r\n fireball Fireball = new fireball();\r\n //Calculates the fireball damage and calculates the skeleton health after taking damage\r\n Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonCurrentHealth() - fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()));\r\n //Tells the player how much damage they dealt\r\n System.out.println(\"You dealt \" + fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()) + \" damage with Fireball to the Skeleton\");\r\n //Tells the user how much health the skeleton has remaining\r\n System.out.println(\"The Skeleton has \" + Skeleton.getSkeletonCurrentHealth() + \"/\" + Skeleton.getSkeletonMaxHealth() + \" health left!\"); \r\n //Reduces the players mp\r\n player1.setCurrentMP(player1.getCurrentMP() - fireballMPScale(Fireball.getMpCost(), player1.getPlayerLevel()));\r\n //Fireball break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n//******************************************************************************************************************************\r\n //Calculates the remaining health of the player\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() - monsterDamageDealt(Skeleton.getSkeletonAttack(), player1.getTotalDefense())); \r\n //Tells the player how much damage the skeleton dealto to the player\r\n System.out.println(\"The Skeleton dealt \" + monsterDamageDealt(Skeleton.getSkeletonAttack(), player1.getTotalDefense()) + \" damage to you!\"); \r\n //Tells the user how much health they have left\r\n System.out.println(\"You have \" + player1.getPlayerCurrentHealth() + \"/\" + player1.getPlayerMaxHealth() + \" health left!\");\r\n System.out.println(\"You have \" + player1.getCurrentMP() + \"/\" + player1.getMaxMP() + \" MP\");\r\n//******************************************************************************************************************************\r\n //Checks if skeleton is dead\r\n if(Skeleton.getSkeletonCurrentHealth() <= 0){\r\n //Ends the battle while loop\r\n battle = false;\r\n //Tells the user they have killed the enemy\r\n System.out.println(\"You have killed the Skeleton!\");\r\n //Tells the user how much gold they gained\r\n System.out.println(\"You gained \" + Skeleton.getSkeletonGoldDropped() + \" gold\");\r\n //Adds the gold to the users gold amount\r\n player1.setPlayerGold(player1.getPlayerGold() + skeletonGoldScale(Skeleton.getSkeletonGoldDropped(), player1.getPlayerLevel()));\r\n //Tells the user how much experience they have gained\r\n System.out.println(\"You gain \" + Skeleton.getSkeletonExperience() + \" experience!\");\r\n //Calculates the player's experience\r\n player1.setPlayerExperience (experienceTally(player1.getPlayerExperience(), Skeleton.getSkeletonExperience()));\r\n //Function is called to determine the item dropped and stores it in variable\r\n loot = itemDrop(rand.nextInt(5));\r\n //Checks to see if an item was actually dropped\r\n if(loot.equals(\"\")){\r\n //Tells the user that no item was dropped\r\n System.out.println(\"No item dropped.\");\r\n }else{ \r\n //Places the item in the first open space in the player's inventory\r\n player1.setPlayerBag(placeInBag(loot,player1.getPlayerBag()));\r\n //Tells the user which item they god\r\n System.out.println(\"You got: \" + loot + \"!\");\r\n }\r\n }\r\n//******************************************************************************************************************************\r\n //Checks if the player has died\r\n if(player1.getPlayerCurrentHealth() <= 0){\r\n System.out.println(\"You have died\");\r\n //Exits the battle sequence\r\n battle = false;\r\n //Ends the game\r\n done = true;\r\n }\r\n //Attack option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Run option\r\n case \"2\":\r\n //Runs from the battle and goes back to the main menu\r\n System.out.println(\"You have fled from the \" + encounterHolder);\r\n //Ends the battle sequence\r\n battle = false;\r\n //Run option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Skeleton encounter break\r\n break;\r\n//******************************************************************************************************************************\r\n //Devil encounter\r\n case \"Devil\":\r\n //Creates a devil\r\n devil Devil = new devil();\r\n //Scales skeleton max health based on player level\r\n Devil.setDevilMaxHealth(devilHealthScale(Devil.getDevilMaxHealth(), player1.getPlayerLevel()));\r\n //Puts the skeleton at full health\r\n Devil.setDevilCurrentHealth(Devil.getDevilMaxHealth());\r\n //Scales skeleton attack based on player level\r\n Devil.setDevilAttack(devilAttackScale(Devil.getDevilAttack(), player1.getPlayerLevel()));\r\n //Starts the battle loop\r\n while(battle){\r\n //Displays the battle menu\r\n userChoice = getUserChoice(battleMenu);\r\n //Checks the user decision\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Attack option\r\n case \"1\":\r\n //Lists the potential attacks the player can make\r\n System.out.println(\"\\t1) Basic Attack\");\r\n for(int i = 0; i < player1.getSpellList().length; i++){\r\n if(player1.spellList[i].equals(\"\")){\r\n break;\r\n }else{\r\n System.out.println(\"\\t\" + (i + 2) + \") \" + player1.spellList[i]);\r\n }\r\n }\r\n //Gets the user decision\r\n userChoice = getUserInput(\"What attack do you want to do? \\n(Type the name of the attack)\");\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Basic Attack option\r\n case \"Basic Attack\":\r\n //Calculates the remaining health of the devil\r\n Devil.setDevilCurrentHealth(Devil.getDevilCurrentHealth() - playerDamageDealt(player1.getTotalAttack(), Devil.getDevilDefense())); \r\n //Tells the user how much damage they dealt to the devil\r\n System.out.println(\"You dealt \" + playerDamageDealt(player1.getTotalAttack(), Devil.getDevilDefense()) + \" damage to the Devil!\"); \r\n //Tells the user how much health the devil has remaining\r\n System.out.println(\"The Devil has \" + Devil.getDevilCurrentHealth() + \"/\" + Devil.getDevilMaxHealth() + \" health left!\"); \r\n //Basic Attack break\r\n break;\r\n//******************************************************************************************************************************\r\n //Fireball option\r\n case \"Fireball\":\r\n //Creates fireball spell\r\n fireball Fireball = new fireball();\r\n //Calculates the fireball damage and calculates the devil health after taking damage\r\n Devil.setDevilCurrentHealth(Devil.getDevilCurrentHealth() - fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()));\r\n //Tells the user how much health the devil has remaining\r\n System.out.println(\"The Devil has \" + Devil.getDevilCurrentHealth() + \"/\" + Devil.getDevilMaxHealth() + \" health left!\"); \r\n //Tells the player how much damage they dealt\r\n System.out.println(\"You dealt \" + fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()) + \" damage with Fireball to the Devil\");\r\n //Reduces the players mp\r\n player1.setCurrentMP(player1.getCurrentMP() - fireballMPScale(Fireball.getMpCost(), player1.getPlayerLevel()));\r\n //Fireball break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n//******************************************************************************************************************************\r\n //Calculates the remaining health of the player\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() - monsterDamageDealt(Devil.getDevilAttack(), player1.getTotalDefense())); \r\n //Tells the player how much damage the devil dealt to the player\r\n System.out.println(\"The Devil dealt \" + monsterDamageDealt(Devil.getDevilAttack(), player1.getTotalDefense()) + \" damage to you!\"); \r\n //Tells the user how much health they have left\r\n System.out.println(\"You have \" + player1.getPlayerCurrentHealth() + \"/\" + player1.getPlayerMaxHealth() + \" health left!\");\r\n System.out.println(\"You have \" + player1.getCurrentMP() + \"/\" + player1.getMaxMP() + \" MP\");\r\n//******************************************************************************************************************************\r\n //Checks if the devil died\r\n if(Devil.getDevilCurrentHealth() <= 0){\r\n //Ends the battle while loop\r\n battle = false;\r\n //Tells the user they have killed the enemy\r\n System.out.println(\"You have killed the Devil!\");\r\n //Tells the user how much gold they gained\r\n System.out.println(\"You gained \" + Devil.getDevilGold() + \" gold\");\r\n //Adds the gold to the users gold amount\r\n player1.setPlayerGold(player1.getPlayerGold() + devilGoldScale(Devil.getDevilGold(), player1.getPlayerLevel()));\r\n //Tells the user how much experience they have gained\r\n System.out.println(\"You gain \" + Devil.getDevilExperience() + \" experience!\");\r\n //Calculates the player's experience\r\n player1.setPlayerExperience (experienceTally(player1.getPlayerExperience(), Devil.getDevilExperience()));\r\n //Function is called to determine the item dropped and stores it in variable\r\n loot = itemDrop(rand.nextInt(5));\r\n //Checks to see if an item was actually dropped\r\n if(loot.equals(\"\")){\r\n //Tells the user that no item was dropped\r\n System.out.println(\"No item dropped.\");\r\n }else{ \r\n //Places the item in the first open space in the player's inventory\r\n player1.setPlayerBag(placeInBag(loot,player1.getPlayerBag()));\r\n //Tells the user which item they god\r\n System.out.println(\"You got: \" + loot + \"!\");\r\n }\r\n }\r\n//******************************************************************************************************************************\r\n //Checks if the player has died\r\n if(player1.getPlayerCurrentHealth() <= 0){\r\n System.out.println(\"You have died\");\r\n //Exits the battle sequence\r\n battle = false;\r\n //Ends the game\r\n done = true;\r\n }\r\n //Attack option break\r\n break;\r\n//******************************************************************************************************************************\r\n //Run option\r\n case \"2\":\r\n //Runs from the battle and goes back to the main menu\r\n System.out.println(\"You have fled from the \" + encounterHolder);\r\n //Ends the battle sequence\r\n battle = false;\r\n //Run option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Devil encounter break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Blue Moon City\":\r\n Boolean visit = false;\r\n while(!visit){\r\n userChoice = getUserChoice(blueMoonMenu);\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //General Goods option\r\n case \"1\":\r\n blueMoonGeneralGoods BlueMoonGeneral = new blueMoonGeneralGoods();\r\n //Creates healing potion\r\n healingPotion HealingPotion = new healingPotion();\r\n //Creates greater healing potion\r\n greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion();\r\n //Populates the shopkeeper's inventory with items\r\n BlueMoonGeneral.setInventory(populateBlueMoonGeneral(BlueMoonGeneral.getInventory()));\r\n //Displays the shop menu and asks the player what they want to do\r\n userChoice = getUserChoice(blueMoonGeneralMenu);\r\n //Variable for shop loop\r\n Boolean shopExit = false;\r\n while(!shopExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Buy Item\r\n case \"1\":\r\n //Diplays the shop keeper inventory\r\n displayShopInventory(BlueMoonGeneral.getInventory());\r\n //Gets what item the user wants to buy\r\n String buyChoice = getUserInput(\"What item do you want to buy? \\n(Type the name of the item)\");\r\n switch(buyChoice){\r\n//******************************************************************************************************************************\r\n //Buy Healing Potion\r\n case \"Healing Potion\":\r\n //Checks to see if the player has the gold to buy the healing potion\r\n if(player1.getPlayerGold() >= HealingPotion.getHealingPotionBuyPrice()){\r\n //Subtracts the price of the healing potion from the player's gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - HealingPotion.getHealingPotionBuyPrice());\r\n //Puts the healing potion in the player's bag\r\n player1.setPlayerBag(placeInBag(\"Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a healing potion\r\n System.out.println(\"You bought Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n //If the player doesnt have the gold to buy a healing potino\r\n }else if(buyChoice.equals(\"Healing Potion\") && (player1.getPlayerGold() < HealingPotion.getHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a healing player\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n } \r\n//******************************************************************************************************************************\r\n //Buy Greater Healing Potion\r\n case \"Greater Healing Potion\":\r\n //Checks to see if the player has the gold to buy a greater healing potion\r\n if(player1.getPlayerGold() >= GreaterHealingPotion.getGreaterHealingPotionBuyPrice()){\r\n //Subtracts the price of the greater healing potino from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - GreaterHealingPotion.getGreaterHealingPotionBuyPrice());\r\n //Places the greater healing potion in the players bag\r\n player1.setPlayerBag(placeInBag(\"Greater Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a greater healing potion\r\n System.out.println(\"You bought Greater Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n //If they player doesnt have the gold to buy a greater healing potion\r\n }else if(buyChoice.equals(\"Greater Healing Potion\") && (player1.getPlayerGold() < GreaterHealingPotion.getGreaterHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a greater healing potion\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n }\r\n case \"Exit\":\r\n shopExit = true;\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n //Buy option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Sell Item\r\n case \"2\":\r\n //Variable to hold which item is being sold\r\n String itemSold;\r\n //Displays the items in the bag and asks for which item to sell\r\n itemSold = displayItemFromBag(player1.playerBag, \"Sell\");\r\n //Adds the value of the sold item to the player's gold\r\n player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold));\r\n //Removes the sold item from the player's bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold));\r\n //Tells the player which item they sold and how much gold they gained\r\n System.out.println(\"You sold: \" + itemSold);\r\n System.out.println(\"You gained: \" + sellGold(itemSold) + \" gold\");\r\n shopExit = true;\r\n //Sell option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit Item\r\n case \"3\":\r\n shopExit = true;\r\n //Sell option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n shopExit = true;\r\n break;\r\n }\r\n }\r\n //Blue Moon General Goods option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Blacksmith option\r\n case \"2\":\r\n blueMoonBlacksmith BlueMoonBlacksmith = new blueMoonBlacksmith();\r\n //Creates iron helmet\r\n ironHelmet IronHelmet = new ironHelmet();\r\n //Creates iron chest plate\r\n ironChestPlate IronChestPlate = new ironChestPlate();\r\n //Creates iron gloves\r\n ironGloves IronGloves = new ironGloves();\r\n //Creates iron boots\r\n ironBoots IronBoots = new ironBoots();\r\n //Populates the shopkeeper's inventory with items\r\n BlueMoonBlacksmith.setInventory(populateBlueMoonBlacksmith(BlueMoonBlacksmith.getInventory()));\r\n //Displays the shop menu and asks the player what they want to do\r\n displayShopInventory(BlueMoonBlacksmith.getInventory());\r\n userChoice = getUserChoice(blueMoonBlacksmithMenu);\r\n //Variable for shop loop\r\n Boolean blacksmithExit = false;\r\n while(!blacksmithExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Buy Item\r\n case \"1\":\r\n //Diplays the blacksmith inventory\r\n displayShopInventory(BlueMoonBlacksmith.getInventory());\r\n //Gets what item the user wants to buy\r\n String buyChoice = getUserInput(\"What item do you want to buy? \\n(Type the name of the item)\");\r\n switch(buyChoice){\r\n//******************************************************************************************************************************\r\n //Buy Iron Helmet\r\n case \"Iron Helmet\":\r\n //Checks to see if the player has the gold to buy the iron helmet\r\n if(player1.getPlayerGold() >= IronHelmet.getBuyPrice()){\r\n //Subtracts the price of the iron helmet from the player's gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronHelmet.getBuyPrice());\r\n //Puts the iron helmet in the player's bag\r\n player1.setPlayerBag(placeInBag(\"Iron Helmet\", player1.playerBag));\r\n //Tells the player they bought a iron helmet\r\n System.out.println(\"You bought Iron Helmet\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Helmet option break\r\n break;\r\n //If the player doesnt have the gold to buy a iron helmet\r\n }else if(buyChoice.equals(\"Iron Helmet\") && (player1.getPlayerGold() < IronHelmet.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron helmet\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Healing Potion option break\r\n break;\r\n } \r\n//******************************************************************************************************************************\r\n //Buy Iron Chest Plate\r\n case \"Iron Chest Plate\":\r\n //Checks to see if the player has the gold to buy a iron boots\r\n if(player1.getPlayerGold() >= IronChestPlate.getBuyPrice()){\r\n //Subtracts the price of the iron chest plate from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronChestPlate.getBuyPrice());\r\n //Places the iron chest plate in the players bag\r\n player1.setPlayerBag(placeInBag(\"Iron Chest Plate\", player1.playerBag));\r\n //Tells the player they bought a iron chest plate\r\n System.out.println(\"You bought Iron Chest Plate\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Boots option break\r\n break;\r\n //If they player doesnt have the gold to buy a iron chest plate\r\n }else if(buyChoice.equals(\"Iron Chest Plate\") && (player1.getPlayerGold() < IronChestPlate.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron chest plate\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Chest Plate option break\r\n break;\r\n }\r\n //Buy iron boots\r\n case \"Iron Boots\":\r\n //Checks to see if the player has the gold to buy a iron boots\r\n if(player1.getPlayerGold() >= IronBoots.getBuyPrice()){\r\n //Subtracts the price of the iron boots from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronBoots.getBuyPrice());\r\n //Places the iron boots in the players bag\r\n player1.setPlayerBag(placeInBag(\"Iron Boots\", player1.playerBag));\r\n //Tells the player they bought a iron boots\r\n System.out.println(\"You bought Iron Boots\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Boots option break\r\n break;\r\n //If they player doesnt have the gold to buy a iron boots\r\n }else if(buyChoice.equals(\"Iron Boots\") && (player1.getPlayerGold() < IronBoots.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron boots\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Boots option break\r\n break;\r\n }\r\n case \"Iron Gloves\":\r\n //Checks to see if the player has the gold to buy a iron gloves\r\n if(player1.getPlayerGold() >= IronGloves.getBuyPrice()){\r\n //Subtracts the price of the iron gloves from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronGloves.getBuyPrice());\r\n //Places the iron gloves in the players bag\r\n player1.setPlayerBag(placeInBag(\"Iron Gloves\", player1.playerBag));\r\n //Tells the player they bought a iron gloves\r\n System.out.println(\"You bought Iron Gloves\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Gloves option break\r\n break;\r\n //If they player doesnt have the gold to buy a iron gloves\r\n }else if(buyChoice.equals(\"Iron Gloves\") && (player1.getPlayerGold() < IronGloves.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron gloves\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Chest Plate option break\r\n break;\r\n }\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n break; \r\n }\r\n //Buy option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Sell Item\r\n case \"2\":\r\n //Variable to hold which item is being sold\r\n String itemSold;\r\n //Displays the items in the bag and asks for which item to sell\r\n itemSold = displayItemFromBag(player1.playerBag, \"Sell\");\r\n //Adds the value of the sold item to the player's gold\r\n player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold));\r\n //Removes the sold item from the player's bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold));\r\n //Tells the player which item they sold and how much gold they gained\r\n System.out.println(\"You sold: \" + itemSold);\r\n System.out.println(\"You gained: \" + sellGold(itemSold) + \" gold\");\r\n blacksmithExit = true;\r\n //Sell option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit Item\r\n case \"3\":\r\n blacksmithExit = true;\r\n //Sell option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n blacksmithExit = true;\r\n break;\r\n }\r\n }\r\n //Blue Moon Blacksmith option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Magic Shop option\r\n case \"3\":\r\n //Blue Moon Magic Shop option 3 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Guild option\r\n case \"4\":\r\n blueMoonGuild BlueMoonGuild = new blueMoonGuild();\r\n //Populates the shopkeeper's inventory with items\r\n BlueMoonGuild.setQuestList(populateBlueMoonGuild(BlueMoonGuild.getQuestList()));\r\n //Displays the guild menu and asks the player what they want to do\r\n userChoice = getUserChoice(blueMoonGuildMenu);\r\n //Variable for guild loop\r\n Boolean guildExit = false;\r\n while(!guildExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Accept Quest\r\n case \"1\":\r\n displayQuestList(BlueMoonGuild.getQuestList());\r\n String questChoice = getUserInput(\"What quest do you want to accept? Type in the name of the quest.\");\r\n switch(questChoice){\r\n case \"Kill Skeletons\":\r\n player1.setQuestList(placeQuest(player1.getQuestList(), \"Kill Skeletons\"));\r\n System.out.println(\"You have accepted the quest: Kill Skeletons\");\r\n guildExit = true;\r\n break;\r\n }\r\n //Accept quest option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Drop Quest\r\n case \"2\":\r\n //Drop quest option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Turn in quest option \r\n case \"3\":\r\n break;\r\n case \"4\":\r\n guildExit = true;\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n break;\r\n }\r\n }\r\n //Blue Moon Magic Shop option 4 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit option\r\n case \"5\":\r\n visit = true;\r\n //Blue Moon Exit option 5 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Blue Moon Encounter break;\r\n break;\r\n default:\r\n //Encounter break\r\n break;\r\n }\r\n //Search option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Starts the stats sequence\r\n case \"2\":\r\n //Displays the player stats\r\n displayPlayerStats(playerStats, player1.getPlayerHelmet(), player1.getPlayerChestPlate(), player1.getPlayerWeapon(), player1.getPlayerGloves(), player1.getPlayerBoots());\r\n userChoice = getUserChoice(statMenu);\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Allocate Stats option\r\n case \"1\":\r\n userChoice = getUserChoice(allocateStatMenu);\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Add Strength\r\n case \"1\":\r\n //Checks to see if the player has a stat point to spend\r\n if(player1.getStatPoints() > 0){\r\n //Removes stat point\r\n player1.setStatPoints(removeStatPoints(player1.getStatPoints()));\r\n //Increases strength by 1\r\n player1.setStrength(gainStrength(player1.getStrength())); \r\n }else{\r\n //Tells the player they dont have any stat points to spend\r\n System.out.println(\"You don't have any stat points to allocate.\");\r\n }\r\n //Strength option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Add Intelligence\r\n case \"2\":\r\n //Checks to see if the player has a stat point to spend\r\n if(player1.getStatPoints() > 0){\r\n //Removes stat point\r\n player1.setStatPoints(removeStatPoints(player1.getStatPoints()));\r\n //Increases intelligence by 1\r\n player1.setIntelligence(gainIntelligence(player1.getIntelligence()));\r\n //Increases the players max mp based on intelligence\r\n player1.setMaxMP(maxMp(player1.getMaxMP()));\r\n }else{\r\n //Tells the player they dont have any stat points to spend\r\n System.out.println(\"You don't have any stat points to allocate.\");\r\n }\r\n //Intelligence option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Add Vitality\r\n case \"3\":\r\n //Checks to see if the player has a stat point to spend\r\n if(player1.getStatPoints() > 0){\r\n //Removes stat point\r\n player1.setStatPoints(removeStatPoints(player1.getStatPoints()));\r\n //Increases vitality by 1\r\n player1.setVitality(gainVitality(player1.getVitality()));\r\n //Increases the players max health base on vitality\r\n player1.setPlayerMaxHealth(maxHealth(player1.getPlayerMaxHealth()));\r\n }else{\r\n //Tells the player they dont have any stat points to spend\r\n System.out.println(\"You don't have any stat points to allocate.\");\r\n }\r\n //Vitality opion 3 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Cancel\r\n case \"4\":\r\n //Cancel option 4 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n //Allocate stats option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exits the stat menu\r\n case \"2\":\r\n //Exit option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n //Stats option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"3\":\r\n //Variable to store spell exit\r\n Boolean spellExit = false;\r\n //Loop to display spell list\r\n while(!spellExit){\r\n //Display spell list\r\n displayBag(player1.getSpellList());\r\n //Get user choice\r\n userChoice = getUserChoice(spellMenu);\r\n switch(userChoice){\r\n //Exit option\r\n case \"1\":\r\n spellExit = true;\r\n //Exit option 1 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Spells option 3 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Starts the bag sequence\r\n case \"4\":\r\n //Variable for the bag sequence\r\n Boolean bagExit = false;\r\n //Variable to hold which item to equip\r\n String itemChosen;\r\n //Variable to hold which item was in the equipment slot\r\n String previousItem;\r\n //Enters the bag sequence based on user response\r\n while(!bagExit){\r\n //Displays the player's bag\r\n displayBag(player1.getPlayerBag());\r\n //Displays the bag menu\r\n userChoice = getUserChoice(bagMenu);\r\n //Checks user choice\r\n switch(userChoice){\r\n //Equip an item sequence\r\n case \"1\":\r\n //Runs function to choose an item to equip\r\n itemChosen = displayItemFromBag(player1.playerBag, \"Equip\");\r\n //Checks which item was chosen to equip\r\n switch(itemChosen){\r\n//******************************************************************************************************************************\r\n //If helmet was chosen to equip\r\n case \"Leather Helmet\":\r\n //Checks to see if a helmet is already equipped\r\n if(!player1.playerHelmet[0].equals(\"\")){\r\n //Puts the already equipped item in a variable\r\n previousItem = player1.playerHelmet[0];\r\n //Puts the previously equipped item into the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the newly equipped item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the item chosen\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Leather Helmet\");\r\n //Helmet option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If chest player was chosen to equip\r\n case \"Leather Chest Plate\":\r\n //Checks to see if a chest plate is already equipped\r\n if(!player1.playerChestPlate[0].equals(\"\")){\r\n //Puts the already equipped item in a variable\r\n previousItem = player1.playerChestPlate[0];\r\n //Puts the previously equipped item into the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the newly equipped item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the item chosen\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Leather Chest Plate\");\r\n //Chest Plate option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If short sword was chosen to equip\r\n case \"Short Sword\":\r\n //Checks to see if a weapon is already equipped\r\n if(!player1.playerWeapon[0].equals(\"\")){\r\n //Puts the already equipped item in a variable\r\n previousItem = player1.playerWeapon[0];\r\n //Puts the previously equipped item into the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the newly equipped item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the item chosen\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Short Sword\");\r\n //Short Sword option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If long sword was chosen to equip\r\n case \"Long Sword\":\r\n //Checks to see if a weapon is already equipped\r\n if(!player1.playerWeapon[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerWeapon[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped \r\n }else{\r\n //Equips the selected item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Long Sword\");\r\n //Long Sword option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If great sword was selected\r\n case \"Great Sword\":\r\n //Checks to see if a weapon is already equipped\r\n if(!player1.playerWeapon[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerWeapon[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped GreatSword\");\r\n //Great Sword option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron helmet was selected\r\n case \"Iron Helmet\":\r\n //Checks to see if a helmet is already equipped\r\n if(!player1.playerHelmet[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerHelmet[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Helmet\");\r\n //Iron Helmet option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron chest plate was selected\r\n case \"Iron Chest Plate\":\r\n //Checks to see if a chest plate is already equipped\r\n if(!player1.playerChestPlate[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerChestPlate[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Chest Plate\");\r\n //Iron Chest Plate option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron boots was selected\r\n case \"Iron Boots\":\r\n //Checks to see if a boots is already equipped\r\n if(!player1.playerBoots[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerBoots[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerBoots[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerBoots[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Boots\");\r\n //Iron Boots option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron gloves was selected\r\n case \"Iron Gloves\":\r\n //Checks to see if a gloves is already equipped\r\n if(!player1.playerGloves[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerGloves[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerGloves[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerGloves[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Gloves\");\r\n //Iron Gloves option break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Exit\":\r\n //Exit option break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\"); \r\n }\r\n //Equip option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Use Item\r\n case \"2\":\r\n //Displays the useable items from the bag\r\n itemChosen = displayItemFromBag(player1.playerBag, \"Use\");\r\n switch(itemChosen){\r\n//******************************************************************************************************************************\r\n //Use healing potion\r\n case \"Healing Potion\":\r\n //Creates a healing potion\r\n healingPotion HealingPotion = new healingPotion();\r\n //Checks to see if the player is injured\r\n if(player1.getPlayerCurrentHealth() < player1.getPlayerMaxHealth()){\r\n //Tells the player they used a healing potion\r\n System.out.println(\"You used \" + itemChosen);\r\n //Removes the healing potion from the players bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //Checks if the players missing health is less than the health restored by the healing potion\r\n if((player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth() < HealingPotion.getHealthGained())){\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + (player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth()) + \" health\");\r\n //Sets the players health to max\r\n player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth());\r\n //If the players missing health is greater than the health restored by the healing potion\r\n }else{\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + HealingPotion.getHealthGained() + \" health\");\r\n //Restores the players health by the amount given by the healing potion\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() + HealingPotion.getHealthGained());\r\n }\r\n //If you are not injured\r\n }else{\r\n //Tells the player they cannot use a healing potion\r\n System.out.println(\"You are at full health and cannot use that item\");\r\n }\r\n //Healing Potion option break\r\n break;\r\n//******************************************************************************************************************************\r\n //Use Greater Healing Potion\r\n case \"Greater Healing Potion\":\r\n //Creates a greater healing potion\r\n greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion();\r\n //Checks to see if the player is injured\r\n if(player1.getPlayerCurrentHealth() < player1.getPlayerMaxHealth()){\r\n //Tells the player they used a greater healing potion\r\n System.out.println(\"You used \" + itemChosen);\r\n //Removes the greater healing potion from the players bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If the players missing health is less than the health restored by the greater healing potion\r\n if((player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth() < GreaterHealingPotion.getHealthGained())){\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + (player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth()) + \" health\");\r\n //Restores the player to max health\r\n player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth());\r\n //If they players missing health is greater than the health restored by the greater healing potion\r\n }else{\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + GreaterHealingPotion.getHealthGained() + \" health\");\r\n //Restores the players health by the amount given by the greater healing potion\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() + GreaterHealingPotion.getHealthGained());\r\n }\r\n //If the player is not injured\r\n }else{\r\n //Tells the player they cannot use a greater healing potion\r\n System.out.println(\"You are at full health and cannot use that item\");\r\n }\r\n //Greater Healing Potion option break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Scroll of Fireball\":\r\n //Removes scroll of fireball from bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //Tells the player they have learned the fireball spell\r\n System.out.println(\"You have learned: Fireball\");\r\n //Add fireball to spell list\r\n player1.setSpellList(placeInBag(\"Fireball\", player1.getSpellList()));\r\n //Scroll of Fireball option break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Exit\":\r\n //Exit option break\r\n break;\r\n default:\r\n System.out.println(\"Invalid Option. Try again.\");\r\n }//Use option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit\r\n case \"3\":\r\n //Exits the bag sequence\r\n bagExit = true;\r\n //Exit option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }//Bag option 4 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Quests Menu\r\n case \"5\":\r\n Boolean questExit = false;\r\n while(!questExit){\r\n //Displays the bag menu\r\n userChoice = getUserChoice(questMenu);\r\n //Checks user choice\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Check quest option\r\n case \"1\":\r\n //Displays the player's bag\r\n displayQuest(player1.getQuestList());\r\n String questChoice = getUserInput(\"Which quest do you want to check? Type in the name of the quest.\");\r\n String[] questList = new String[16];\r\n questList = player1.getQuestList();\r\n switch(questChoice){\r\n /*case \"Kill Skeletons\":\r\n for(int i = 0; i < questList.length; i++){\r\n if(questList[1].getName().equals(\"Kill Skeletons\")){\r\n killSkeletonQuest kSQ = questList[1];\r\n if(kSQ.isQuestComplete().equals(\"false\")){\r\n System.out.println(\"Quest Status: Incomplete\");\r\n } else {\r\n System.out.println(\"Quest Status: Complete\");\r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"\");\r\n break;*/\r\n }\r\n //Check quest option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit option\r\n case \"2\":\r\n questExit = true;\r\n //Exit option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n break;\r\n }\r\n }\r\n break;\r\n//***************************************************************************************************************************\r\n //Starts the shop sequence\r\n case \"6\":\r\n //Creates the shopkeeper\r\n shopKeeper ShopKeeper = new shopKeeper();\r\n //Creates healing potion\r\n healingPotion HealingPotion = new healingPotion();\r\n //Creates greater healing potion\r\n greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion();\r\n //Creates long sword\r\n longSword LongSword = new longSword();\r\n //Creates great sword\r\n greatSword GreatSword = new greatSword();\r\n //Populates the shopkeeper's inventory with items\r\n ShopKeeper.setShopKeeperInventory(populateShopKeeperInventory(ShopKeeper.getShopKeeperInventory()));\r\n //Displays the shop menu and asks the player what they want to do\r\n userChoice = getUserChoice(shopMenu);\r\n //Variable for shop loop\r\n Boolean shopExit = false;\r\n while(!shopExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Buy item\r\n case \"1\":\r\n //Diplays the shop keeper inventory\r\n displayShopInventory(ShopKeeper.getShopKeeperInventory());\r\n //Gets what item the user wants to buy\r\n String buyChoice = getUserInput(\"What item do you want to buy? \\n(Type the name of the item)\");\r\n switch(buyChoice){\r\n//******************************************************************************************************************************\r\n //Buys healing potion\r\n case \"Healing Potion\":\r\n //Checks to see if the player has the gold to buy the healing potion\r\n if(player1.getPlayerGold() >= HealingPotion.getHealingPotionBuyPrice()){\r\n //Subtracts the price of the healing potion from the player's gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - HealingPotion.getHealingPotionBuyPrice());\r\n //Puts the healing potion in the player's bag\r\n player1.setPlayerBag(placeInBag(\"Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a healing potion\r\n System.out.println(\"You bought Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n //If the player doesnt have the gold to buy a healing potino\r\n }else if(buyChoice.equals(\"Healing Potion\") && (player1.getPlayerGold() < HealingPotion.getHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a healing player\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n } \r\n//******************************************************************************************************************************\r\n //Buys a greater healing potion\r\n case \"Greater Healing Potion\":\r\n //Checks to see if the player has the gold to buy a greater healing potion\r\n if(player1.getPlayerGold() >= GreaterHealingPotion.getGreaterHealingPotionBuyPrice()){\r\n //Subtracts the price of the greater healing potino from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - GreaterHealingPotion.getGreaterHealingPotionBuyPrice());\r\n //Places the greater healing potion in the players bag\r\n player1.setPlayerBag(placeInBag(\"Greater Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a greater healing potion\r\n System.out.println(\"You bought Greater Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n //If they player doesnt have the gold to buy a greater healing potion\r\n }else if(buyChoice.equals(\"Greater Healing Potion\") && (player1.getPlayerGold() < GreaterHealingPotion.getGreaterHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a greater healing potion\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n }\r\n//***************************************************************************************************************************\r\n //Buys a long sword\r\n case \"Long Sword\":\r\n //Checks if the player has enough gold to buy a long sword\r\n if(player1.getPlayerGold() >= LongSword.getBuyPrice()){\r\n //Subtracts the price of the long sword from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - LongSword.getBuyPrice());\r\n //Places the long sword in the players bag\r\n player1.setPlayerBag(placeInBag(\"Long Sword\", player1.playerBag));\r\n //Tells the player they bought a long sword\r\n System.out.println(\"You bought Long Sword\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Long Sword option break\r\n break;\r\n //If the player doesnt have the gold to buy a long sword\r\n }else if(buyChoice.equals(\"Long Sword\") && (player1.getPlayerGold() < LongSword.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a long sword\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Long Sword option break\r\n break;\r\n }\r\n//****************************************************************************************************************************\r\n //Buys a great sword\r\n case \"Great Sword\":\r\n //Checks if teh player has enough gold to buy a great sword\r\n if(player1.getPlayerGold() >= GreatSword.getBuyPrice()){\r\n //Subtracts the price of the great sword from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - GreatSword.getBuyPrice());\r\n //Places the great sword in the players bag\r\n player1.setPlayerBag(placeInBag(\"Great Sword\", player1.playerBag));\r\n //Tells the player they bought a great sword\r\n System.out.println(\"You bought Great Sword\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Great Sword option break\r\n break;\r\n //If the player doesnt have the gold to buy a great sword\r\n }else if(buyChoice.equals(\"Great Sword\") && (player1.getPlayerGold() < GreatSword.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a great sword\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Great Sword option break\r\n break;\r\n }\r\n //If any other option is typed\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n shopExit = true;\r\n break;\r\n }\r\n //Buy option 1 break\r\n break;\r\n//****************************************************************************************************************************\r\n //Sell item\r\n case \"2\":\r\n //Variable to hold which item is being sold\r\n String itemSold;\r\n //Displays the items in the bag and asks for which item to sell\r\n itemSold = displayItemFromBag(player1.playerBag, \"Sell\");\r\n //Adds the value of the sold item to the player's gold\r\n player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold));\r\n //Removes the sold item from the player's bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold));\r\n //Tells the player which item they sold and how much gold they gained\r\n System.out.println(\"You sold: \" + itemSold);\r\n System.out.println(\"You gained: \" + sellGold(itemSold) + \" gold\");\r\n shopExit = true;\r\n //Sell option 2 break\r\n break;\r\n//***************************************************************************************************************************\r\n //Exit shop\r\n case \"3\":\r\n shopExit = true;\r\n //Exit option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n break;\r\n//****************************************************************************************************************************\r\n //Starts the test sequence\r\n case \"7\":\r\n player1.setPlayerLevel(7);\r\n //Test option 6 break\r\n break;\r\n//****************************************************************************************************************************\r\n //Exits out of the game\r\n case \"8\":\r\n System.out.println(\"Exiting the game\");\r\n done = true;\r\n //Exit option 7 break\r\n break;\r\n //Tells the user to try again\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n System.out.println(\"\\nProgram Complete\");\r\n }",
"public static void WriteMainMenu(){\r\n System.out.println(\"\\n=================Welcome to McDonalds=================\");\r\n System.out.println(\"1. Take Order \\n2. Edit McDonalds Menu \\n3. Exit application \");\r\n }",
"public static void gameLoop(boolean battle){\r\n if(battle){\r\n inBattleMenu = true;\r\n inMenu = false;\r\n }else{\r\n inMenu = true;\r\n inBattleMenu = false;\r\n }\r\n while(inMenu){\r\n String input = text.getStringInput(\"MENU> \");\r\n \r\n\r\n //Description: Enters the battle menu.\r\n if(input.equalsIgnoreCase(\"battle\")){\r\n text.print(\"Entering battle menu...\");\r\n inMenu = false;\r\n inBattleMenu = true;\r\n }\r\n\r\n //Description: Displays Pokemon list.\r\n else if(input.equalsIgnoreCase(\"list\")){\r\n listPokemon();\r\n if(fileManager.getPkmn() == 0){\r\n text.print(\"You currently have 0 loaded Pokemon.\");\r\n }\r\n text.blank();\r\n }\r\n\r\n //Description: Displays game credits.\r\n else if(input.equalsIgnoreCase(\"credits\")){\r\n text.print(\"PokeSim v\" + GAME_VERSION + \" created by [][].\");\r\n text.blank();\r\n }\r\n\r\n //Description: Displays commands available in the help menu.\r\n else if(input.equalsIgnoreCase(\"help\")){\r\n text.print(\"battle - Opens the battle menu. Used to battle certain pokemon.\");\r\n text.print(\"list - Prints all loaded Pokemon in memory.\");\r\n text.print(\"help - Display this menu.\");\r\n text.print(\"profile - Displays your profile info.\");\r\n text.print(\"tour - Gives you a tour of the game. Useful for new players.\");\r\n text.blank();\r\n }\r\n\r\n //Description: Gives a tour of the game and how to use it.\r\n else if(input.equalsIgnoreCase(\"tour\")){\r\n String decision = text.getStringInput(\"Take tour? (y/n): \");\r\n if(decision != \"y\"){\r\n \r\n }\r\n \r\n if(decision.equalsIgnoreCase(\"y\")){\r\n text.blank();\r\n for(int i = 0; i < 150; i++){\r\n text.blank();\r\n }\r\n text.drawASCII(\"PokeSim\", 10);\r\n System.out.println(\"===========================================\"); \r\n text.print(\"PokeSim is a text based game inspired by other simulations of Pokemon battles such as \");\r\n text.print(\"Pokemon Showdown. This version attemps to recreate Showdown but with a much simper \");\r\n text.print(\"approach. Many more features are added, including but not limited to the creation of\");\r\n text.print(\"custom Pokemon and attacks, profiles, and easily accessable databases of Pokemon stored in \");\r\n text.print(\"the directory for the game. \");\r\n text.seperateText(\"Getting Started\");\r\n text.print(\"Assuming you have the first-gen pack installed in C://PokeSim, you can setup a party by doing\");\r\n text.print(\" \\\"setpoke <file>.poke\\\"\");\r\n text.print(\"And then battle a Pokemon by simply writing\");\r\n text.print(\" \\\"start <file>.poke\\\"\");\r\n text.print(\"Other useful commands can be found by typing \\\"help\\\" on the command line.\");\r\n text.blank();\r\n }\r\n }\r\n \r\n //Description: Displays the user's profile.\r\n else if(input.equalsIgnoreCase(\"profile\")){\r\n text.print(\"Profile name: \" + name);\r\n text.print(\"Java: Java v\" + System.getProperty(\"java.version\") + \" by \" + System.getProperty(\"java.vendor\"));\r\n text.print(\"OS: \" + System.getProperty(\"os.arch\") + \" \" + System.getProperty(\"os.name\") + \" \" + System.getProperty(\"os.version\"));\r\n \r\n text.blank();\r\n }\r\n \r\n \r\n else if(input.equalsIgnoreCase(\"quit\")){\r\n text.print(\"Quitting game...\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n /* Battle menu functions and command */\r\n while(inBattleMenu) {\r\n String input = text.getStringInput(\"BATTLE> \");\r\n String[] a_Input = input.split(\" \"); //For multiple arguments.\r\n \r\n //Description: Displays commands used in battle menu\r\n if (input.equalsIgnoreCase(\"help\")) {\r\n text.print(\"- start <file> to battle a specific Pokemon.\");\r\n text.print(\"- setpoke <file> to set your battle Pokemon.\");\r\n text.print(\"- edit <file> <attr> <repl> to edit a Pokemon.\");\r\n text.print(\"- check <file> to check syntax for a file.\");\r\n text.print(\"- open <file> to print a file's contents.\");\r\n text.print(\"- cls to clear the console window.\");\r\n text.print(\"- random to battle a random Pokemon.\");\r\n text.print(\"- back to return to the main menu.\");\r\n text.print(\"- list to list the available Pokemon to battle.\");\r\n text.print(\"- del to delete a Pokemon or attack.\");\r\n text.print(\"- new to create a new Pokemon.\");\r\n text.print(\"- newatk to create a new attack.\");\r\n text.print(\"- attacks to list your loaded attacks.\");\r\n text.print(\"- party to view your current party Pokemon.\");\r\n text.blank();\r\n\r\n //Description: Returns user to main menu.\r\n } else if (input.equalsIgnoreCase(\"back\")) {\r\n text.print(\"Returning to main menu...\");\r\n text.blank();\r\n gameLoop(false);\r\n\r\n //Description: Battles a random, valid file. \r\n } else if (input.equalsIgnoreCase(\"random\")) {\r\n battler.battle(fileManager.getRandomPokemon());\r\n\r\n //Description: Lists all Pokemon, if any. \r\n } else if (input.equalsIgnoreCase(\"list\")) {\r\n if (fileManager.getPkmn() == 0) {\r\n text.print(\"You currently have 0 loaded Pokemon.\");\r\n }else{\r\n listPokemon();\r\n }\r\n text.blank();\r\n\r\n //Description: Creates a new Pokemon. \r\n } else if(input.equalsIgnoreCase(\"new\")){\r\n String in = text.getStringInput(\"Create new Pokemon? (y/n): \");\r\n while(!in.equalsIgnoreCase(\"y\") && !in.equalsIgnoreCase(\"n\") && !in.equalsIgnoreCase(\"back\")){\r\n in = text.getStringInput(\"Create new Pokemon? (y/n): \");\r\n }\r\n if(in.equalsIgnoreCase(\"back\")){\r\n gameLoop(true);\r\n }\r\n if(in.equalsIgnoreCase(\"y\")){\r\n try{\r\n String filename = text.getStringInput(\"Filename?: \");\r\n String name = text.getStringInput(\"Name?: \");\r\n String atk = text.getStringInput(\"Atk Stat?: \");\r\n String def = text.getStringInput(\"Def Stat?: \");\r\n String spd = text.getStringInput(\"Speed?: \");\r\n String type = text.getStringInput(\"Type?: \");\r\n String hp = text.getStringInput(\"HP?: \");\r\n String attackone = text.getStringInput(\"Attack?: \");\r\n String attacktwo = text.getStringInput(\"Attack?: \");\r\n String attackthree = text.getStringInput(\"Attack?: \");\r\n String attackfour = text.getStringInput(\"Attack?: \");\r\n //TODO: Check if all attacks are valid except if they are empty (\"\")\r\n if(filename.length() > 16 || filename.length() < 1 || name.length() > 16 || name.length() < 1 || !Arrays.asList(validTypes).contains(type) || Integer.parseInt(hp) < 1){\r\n if(filename.length() > 16 || filename.length() < 1){\r\n text.print(\"Filename must be between 1 and 16 characters long.\");\r\n }\r\n if(name.length() > 16 || name.length() < 1){\r\n text.print(\"Name must have between 1 and 16 characters.\");\r\n }\r\n if(!Arrays.asList(validTypes).contains(type)){\r\n text.print(\"\\\"\" + type + \"\\\" is not a valid type.\");\r\n }\r\n if(Integer.parseInt(hp) < 1){\r\n text.print(\"HP must be between 1 and 2147483647.\");\r\n }\r\n gameLoop(true);\r\n }\r\n else if(!fileManager.atkExists(attackone)){\r\n text.print(attackone + \" is not a valid attack.\");\r\n gameLoop(true);\r\n }\r\n else if(!fileManager.atkExists(attacktwo)){\r\n text.print(attacktwo + \" is not a valid attack.\");\r\n gameLoop(true);\r\n }\r\n else if(!fileManager.atkExists(attackthree)){\r\n text.print(attackthree + \" is not a valid attack.\");\r\n gameLoop(true);\r\n }\r\n else if(!fileManager.atkExists(attackfour)){\r\n text.print(attackfour + \" is not a valid attack.\");\r\n gameLoop(true);\r\n }\r\n //save file now, it is valid.\r\n text.print(\"Validating file...\");\r\n String newType = type.replace(type.charAt(0), Character.toUpperCase(type.charAt(0)));\r\n fileManager.writePokemonFile(filename + \".poke\", name, Integer.valueOf(atk), Integer.valueOf(def), Integer.valueOf(spd), newType, hp, attackone, attacktwo, attackthree, attackfour);\r\n text.print(fileManager.getPkmn() + \" Pokemon initialized.\");\r\n\r\n }catch(Exception e){\r\n text.print(\"Enter a number between 1 and 2147483647.\");\r\n gameLoop(true);\r\n }\r\n\r\n }\r\n if(in.equalsIgnoreCase(\"n\")){\r\n gameLoop(true);\r\n }\r\n\r\n //Description: Start a battle. \r\n } else if(Arrays.asList(a_Input).contains(\"start\")){\r\n if(fileManager.getPkmn() == 0 && a_Input[0].equals(\"start\")) {\r\n text.print(\"You cannot battle because you have no Pokemon loaded.\");\r\n gameLoop(true);\r\n }\r\n if(a_Input.length != 2){\r\n text.print(\"Usage: start <file>\");\r\n gameLoop(true);\r\n }\r\n if(fileManager.fileExists(a_Input[1]) && (fileManager.getFile(a_Input[1]).getName().endsWith(\".poke\") || fileManager.getFile(a_Input[1]).getName().endsWith(\".trn\"))){\r\n battler.battle(fileManager.getFile(a_Input[1])); //null pointer wtf ? \r\n }else{\r\n text.print(\"File not found or file is not a POKE/TRN file.\");\r\n }\r\n \r\n \r\n //Description: Delete a file.\r\n } else if(Arrays.asList(a_Input).contains(\"del\")){\r\n if(a_Input.length != 2){\r\n text.print(\"Usage: del <file>\");\r\n gameLoop(true);\r\n }\r\n String filename = a_Input[1];\r\n if(fileManager.fileExists(filename)){\r\n try{\r\n if(fileManager.getFile(filename).delete()){\r\n text.print(\"Successfully deleted file \" + filename + \".\");\r\n }else{\r\n text.print(\"Unable to delete file \" + filename + \".\");\r\n text.print(\"This may be caused by Java being unable to delete files on your OS.\");\r\n }\r\n }catch(SecurityException s){\r\n text.print(\"Java is blocked access from deleting files.\");\r\n }\r\n \r\n }else{\r\n text.print(\"File not found.\");\r\n }\r\n\r\n //Description: Prints all attacks.\r\n } else if(input.equalsIgnoreCase(\"attacks\")){\r\n if(fileManager.getAttackCount() == 0){\r\n text.print(\"You currently have 0 loaded attacks.\");\r\n }else{\r\n listAttacks();\r\n }\r\n text.blank();\r\n\r\n //Description: Edits a .pkmn file or .atk file.\r\n } else if(Arrays.asList(a_Input).contains(\"edit\")) {\r\n //Usage: edit <file> <attr> <replacement>\r\n if(!(a_Input.length == 4)) {\r\n text.print(\"Usage: edit <file.poke> <attribute> <replacement>\");\r\n text.print(\"Example: edit charizard.poke speed 500\");\r\n }else{\r\n boolean found = false;\r\n for(File file : fileManager.gameDirectory.listFiles()) {\r\n if(file.getName().equals(a_Input[1])){\r\n found = true;\r\n fileManager.modifyAttr(a_Input[2], a_Input[3], file);\r\n }else{\r\n \r\n }\r\n }\r\n if(!found) {\r\n text.print(\"File not found.\");\r\n gameLoop(true);\r\n }\r\n }\r\n \r\n }else if(Arrays.asList(a_Input).contains(\"setpoke\")){\r\n if(fileManager.getPkmn() == 0 && a_Input[0].equals(\"setpoke\")){\r\n text.print(\"You must have atleast one Pokemon to set as your current Pokemon.\"); \r\n gameLoop(true);\r\n }\r\n if(a_Input.length != 2){\r\n text.print(\"Usage: setpoke <file>\");\r\n gameLoop(true);\r\n }\r\n if(fileManager.fileExists(a_Input[1])){\r\n if(fileManager.isValidFile(fileManager.getFile(a_Input[1]))){\r\n party = fileManager.getFile(a_Input[1]);\r\n text.print(\"Party member #1 set to \" + fileManager.getName(fileManager.getFile(a_Input[1])));\r\n }else{\r\n text.print(\"The specified file is not a valid Pokemon file.\");\r\n }\r\n }else{\r\n text.print(\"File not found.\");\r\n }\r\n \r\n }else if(input.equalsIgnoreCase(\"party\")){\r\n if(party == null){\r\n text.print(\"You haven't set your party Pokemon yet. Use setpoke <file>.\");\r\n gameLoop(true);\r\n }\r\n \r\n text.print(\"File/Name/Atk/Def/Speed/Type/HP/Attack/Attack/Attack/Attack\");\r\n text.print(\"===========================================================\");\r\n fileManager.printInfo(party);\r\n \r\n }else if (input.equalsIgnoreCase(\"newatk\")){\r\n String in = text.getStringInput(\"Create new attack? (y/n): \");\r\n while(!in.equalsIgnoreCase(\"y\") && !in.equalsIgnoreCase(\"n\") && !in.equalsIgnoreCase(\"back\")){\r\n in = text.getStringInput(\"Create new attack? (y/n): \");\r\n }\r\n if(in.equalsIgnoreCase(\"back\")){\r\n gameLoop(true);\r\n }\r\n else if(in.equalsIgnoreCase(\"y\")){\r\n try{\r\n String filename = text.getStringInput(\"Filename?: \");\r\n String name = text.getStringInput(\"Name?: \");\r\n String type = text.getStringInput(\"Type?: \");\r\n String pwr = text.getStringInput(\"Power?: \");\r\n String acc = text.getStringInput(\"Accuracy?: \");\r\n \r\n if(filename.length() < 1 || filename.length() > 16 || name.length() > 16 || name.length() < 1 || !Arrays.asList(validTypes).contains(type) || Integer.valueOf(acc) > 100 || Integer.valueOf(acc) < 1){\r\n if(name.length() > 16 || name.length() < 1){\r\n text.print(\"Attack name must be between 1 and 16 characters.\");\r\n }\r\n if(!Arrays.asList(validTypes).contains(type)){\r\n text.print(type + \" is not a valid type.\");\r\n }\r\n if(Integer.valueOf(acc) > 100 || Integer.valueOf(acc) < 1){\r\n text.print(\"Accuracy must be between 1 and 100.\");\r\n }\r\n if(filename.length() < 1 || filename.length() > 16){\r\n text.print(\"Filename must be between 1 and 16 characters.\");\r\n }\r\n gameLoop(true);\r\n }\r\n //validate\r\n text.print(\"Validating attack...\");\r\n type = type.replace(type.charAt(0), Character.toUpperCase(type.charAt(0)));\r\n fileManager.writeAttackFile(filename + \".atk\", name, type, Integer.valueOf(pwr), Integer.valueOf(acc));\r\n text.print(fileManager.getAttackCount() + \" attacks initialized.\");\r\n }catch(Exception e){\r\n text.print(\"An error occurred while reading input.\");\r\n }\r\n }\r\n }else if(input.equalsIgnoreCase(\"cls\")){\r\n for(int i = 0; i < 300; i++){\r\n System.out.println(\"\");\r\n }\r\n }else if(Arrays.asList(a_Input).contains(\"check\")){\r\n if(a_Input.length != 2){\r\n text.print(\"Usage: check <file>\");\r\n }else{\r\n if(fileManager.fileExists(a_Input[1])){\r\n if(a_Input[1].endsWith(\"poke\")){\r\n if(fileManager.isValidFile(fileManager.getFile(a_Input[1]))){\r\n text.print(a_Input[1] + \" is a valid POKE file.\");\r\n }else{\r\n text.print(a_Input[1] + \" is not a valid POKE file.\");\r\n }\r\n }\r\n else if(a_Input[1].endsWith(\"atk\")){\r\n if(fileManager.isValidAttack(fileManager.getFile(a_Input[1]))){\r\n text.print(a_Input[1] + \" is a valid attack file.\");\r\n }else{\r\n text.print(a_Input[1] + \" is not a valid attack file.\");\r\n }\r\n }\r\n }else{\r\n text.print(\"File not found.\");\r\n }\r\n }\r\n }else if(Arrays.asList(a_Input).contains(\"open\")){\r\n if(a_Input.length != 2){\r\n text.print(\"Usage: open <file>\");\r\n gameLoop(true);\r\n }\r\n if(fileManager.fileExists(a_Input[1])){\r\n fileManager.open(fileManager.getFile(a_Input[1]));\r\n }else{\r\n text.print(\"File not found.\");\r\n }\r\n }else if(input.equalsIgnoreCase(\"quit\")){\r\n text.print(\"Quitting game...\");\r\n System.exit(0);\r\n }\r\n }\r\n }",
"public static void mainMenu() {\n\t\tStdDraw.setCanvasSize(600, 600);\n\t\tStdDraw.setScale(0, 1000);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tFont font = new Font(\"Sans Serif\", 20, 20);\n\t\tStdDraw.setFont(font);\n\t\tStdDraw.text(500, 850, \"Six Men Morris Game\");\n\t\tStdDraw.text(500, 750, \"Game Created By: \");\n\t\tStdDraw.text(500, 700, \"Phillip Pavlich, Prakhar Jalan, Dinesh Balakrishnan\");\n\t\tStdDraw.filledRectangle(500, 500, 205, 75);\n\t\tStdDraw.filledRectangle(500, 300, 205, 75);\n\t\tStdDraw.filledRectangle(500, 100, 205, 75);\n\t\t\n\t\tStdDraw.setFont();\n\t\tStdDraw.setPenColor(StdDraw.ORANGE);\n\t\tStdDraw.setPenRadius(0.05);\n\n\t\tStdDraw.filledRectangle(500, 500, 200, 70);\n\t\tStdDraw.filledRectangle(500, 300, 200, 70);\n\t\tStdDraw.filledRectangle(500, 100, 200, 70);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(500, 500, \"Start New Game\");\n\t\tStdDraw.text(500, 300, \"Continue Game\");\n\t\tStdDraw.text(500, 100, \"Load Saved Game\");\n\t}",
"public void playGame() {\n Command command;\t\t// the last command entered by the user\n\n // some hello words...\n System.out.println();\n printWelcome();\n // repeatedly read commands and execute them until the game is over\n while (!finished) {\n System.out.println();\n System.out.println(currentRoom.longDescription());\n System.out.println();\n command = parser.getCommand();\n processCommand(command);\n }\n // some bye bye words...\n printGoodbye();\n }",
"public void start () {\n int choice = NO_CHOICE;\n while (choice != EXIT) {\n displayMainMenu();\n choice = readIntWithPrompt(\"Enter choice: \");\n executeChoice(choice);\n }\n }",
"static void consoleMenu() throws BidException {\r\n assert isRunning == true;\r\n Scanner menuScanner = new Scanner(System.in);\r\n System.out.println(\"\"\"\r\n \r\n Select a Menu Option below:\r\n (1) New Sedan\r\n (2) New Truck\r\n (3) Add Buyer\r\n (4) Add Bid\r\n (5) Display Fleet\r\n (6) Display Buyers\r\n (7) Delete Bid\r\n (8) Display Highest Bid\r\n (9) Display Lowest Bid\r\n (10) Sell Vehicle\r\n (11) Display Sold Vehicles\r\n (12) Exit\r\n \"\"\");\r\n System.out.print(\"Enter option number: \");\r\n int selection = menuScanner.nextInt();\r\n switch (selection) {\r\n case 1 -> showroom.createSedan();\r\n case 2 -> showroom.createTruck();\r\n case 3 -> showroom.createBuyer();\r\n case 4 -> showroom.createBid();\r\n case 5 -> showroom.displayFleet();\r\n case 6 -> showroom.displayBuyers();\r\n case 7 -> showroom.deleteBid();\r\n case 8 -> showroom.displayBid(\"Highest\");\r\n case 9 -> showroom.displayBid(\"Lowest\");\r\n case 10 -> showroom.sellVehicle();\r\n case 11 -> showroom.displaySoldVehicles();\r\n case 12 -> isRunning = false;\r\n default -> System.out.println(\"Invalid option, try again...\");\r\n }\r\n }",
"public void run() \n\t\t{\n\t\t\tboolean exitMenu = false;\n\t\t\tdo \n\t\t\t{\t\t\t\t\t\n\t\t\t\tmenu.display();\n\t\t\t\tint choice = menu.getUserSelection();\n\t\t\t\t// the above method call will return 0 if the user did not\n\t\t\t\t// entered a valid selection in the opportunities given...\n\t\t\t\t// Otherwise, it is valid...\n\t\t\t\tif (choice == 0)\n\t\t\t\t{\n\t\t\t\t\t// here the user can be informed that fail to enter a\n\t\t\t\t\t// valid input after all the opportunities given....\n\t\t\t\t\t// for the moment, just exit....\n\t\t\t\t\texitMenu = true;\n\t\t\t\t}\n\t\t\t\telse if (choice == 1) \n\t\t\t\t{\n\t\t\t\t\t// here goes your code to initiate action associated to\n\t\t\t\t\t// menu option 1....\n\t\t\t\t\tProjectUtils.operationsOnNumbers();\n\t\t\t\t}\n\t\t\t\telse if (choice == 2)\n\t\t\t\t{\n\t\t\t\t\tProjectUtils.operationsOnStrings();\n\t\t\t\t}\n\t\t\t\telse if (choice == 3) \n\t\t\t\t{\n\t\t\t\t\tProjectUtils.showStatistics();\n\t\t\t\t}\n\t\t\t\telse if (choice == 4)\n\t\t\t\t{\n\t\t\t\t\texitMenu = true; \n\t\t\t\t\tProjectUtils.println(\"Exiting now... \\nGoodbye!\");\n\t\t\t\t}\n\t\t\t} while (!exitMenu);\n\t\t}",
"public static void main(String[] args){\n boolean allGood;\n //create a new logic object so we can get the user information properly\n Logic logic = new Logic();\n //create a new menu object so we can display the correct options\n Menu menu = new Menu();\n\n //load the json information so we can use it later in the program\n allGood = logic.loadData();\n if(allGood){\n //ask the user for their information so we can use it later\n logic.Intro();\n\n\n do{\n //print the first menu and ask the user what they want to do\n menu.printMenu1();\n menu.askForOption();\n\n //if the user does not input a valid option\n while(!menu.validOption1()){\n System.out.println(\"Please Insert a valid option\");\n //re-print the menu and ask again\n menu.printMenu1();\n menu.askForOption();\n }\n\n //choose which function to run depending on what option the user chose\n logic.whichOptionM1(menu.getOption1());\n\n //if the user chose option 1, display the second menu\n if(menu.getOption1() == 1) {\n do {\n //display menu 2 and ask the user for their option\n menu.printMenu2();\n menu.askForOptionString();\n\n //if the user enters an invalid option\n while (!menu.validOption2()){\n //print an error message and ask for the option again\n System.out.println(\"Please Insert a valid option\");\n menu.printMenu2();\n menu.askForOptionString();\n }\n\n //choose which function to run depending on what the user inputs\n logic.whichOptionM2(menu.getOption2());\n\n }while (!menu.getOption2().equalsIgnoreCase(\"f\"));\n }\n }while(!menu.exitMenu1());\n\n }\n }",
"public boolean mainMenu() {\n System.out.println(\"Welcome to the Card Game game\");\r\n System.out.println(\"You have \" + scoreboard.getTokens() + \" tokens\");\r\n System.out.println(\"What do you want to do?\");\r\n System.out.println(\"1. Play a game\");\r\n System.out.println(\"2. Buy Tokens\");\r\n System.out.println(\"3. View Scores\");\r\n System.out.println(\"0. Quit\");\r\n String input = sc.nextLine();\r\n\r\n //Calls different methods depending on user input\r\n if (input.equals(\"1\") || input.equalsIgnoreCase(\"p\") || input.toLowerCase().contains(\"play\") || input.toLowerCase().contains(\"game\")) {\r\n if (scoreboard.getTokens() == 0) {\r\n System.out.println(\"You don't have any tokens!\");\r\n }\r\n else {\r\n gameSelection();\r\n }\r\n }\r\n \r\n else if ((input.equals(\"2\") || input.equalsIgnoreCase(\"b\") || input.equalsIgnoreCase(\"t\") || input.toLowerCase().contains(\"buy\") || input.toLowerCase().contains(\"token\"))) {\r\n scoreboard.addTokens(buyTokens());\r\n }\r\n \r\n else if (input.equals(\"3\") || input.equalsIgnoreCase(\"v\") || input.equalsIgnoreCase(\"s\") || input.toLowerCase().contains(\"view\") || input.toLowerCase().contains(\"scores\")) {\r\n System.out.println(scoreboard.showAllScores());\r\n }\r\n else if (input.equals(\"0\") || input.equalsIgnoreCase(\"q\") || input.equalsIgnoreCase(\"quit\")) {\r\n System.out.println(\"You ended up with \" + scoreboard.getTokens() + \" tokens (\" + (scoreboard.getTokenValue()) + \"kr)\");\r\n System.out.println(\"We hope to see you again!\");\r\n return false;\r\n }\r\n else {\r\n System.out.println(\"Invalid input\\n\");\r\n }\r\n return true;\r\n }",
"private void printMainMenu() {\n\t\tSystem.out.println(\"1. Go adventuring\");\n\t\tSystem.out.println(\"2. Enter tavern\");\n\t\tSystem.out.println(\"3. Show details about your character\");\n\t\tSystem.out.println(\"4. Exit game\");\n\t}",
"public static void main(String[] args) {\n ICommand[] commandRegister = {\n new LeagueCmd(),\n new TeamCmd(),\n new MatchCmd(),\n new LoadCmd(),\n new SaveCmd()\n };\n if (Utils.initSaveFileLocation()) {\n final CommandHandler cmdHandler = new CommandHandler(commandRegister);\n Scanner scanner = new Scanner(System.in);\n boolean isExited = false;\n String userInput;\n String[] exitCmd = {\"exit\", \"quit\", \"close\"};\n\n System.out.println(\"# CompetitionManager.\\nAfin d'afficher la liste des commandes, entrez \\\"help\\\".\");\n Utils.displayBasePath();\n\n while (!isExited) {\n // Boucle de lecture des commandes\n System.out.printf(\"%s> \", renderSelected());\n userInput = scanner.nextLine();\n if (Arrays.asList(exitCmd).contains(userInput)) isExited = true;\n else cmdHandler.handleMessage(userInput);\n }\n } else {\n System.out.println(\"Une erreur est survenue lors de l'initialisation de l'application.\");\n }\n }",
"public void displayMenu()\n {\n System.out.println(\"-----------------Welcome to 256 Game------------------\");\n System.out.println(\"press 1 to register a player\");\n System.out.println(\"press 2 to start a new game\");\n System.out.println(\"press 3 to view a help menu\");\n System.out.println(\"press 4 to exist\");\n System.out.println(\"------------------------------------------------------\");\n }",
"static void pokedexMenu()\n {\n clrscr();\n System.out.println(\"\\n\" + title());\n\n // shows up empty for the first time\n if (!Player.current.pokedex.isEmpty())\n {\n System.out.println(\"You currently have: \");\n Player.current.showFullPokedex();\n }\n else\n {\n System.out.println(\"Your Pokedex is empty.\");\n }\n\n // the in-game menu\n System.out.print(showPlayerGemsAndPokeballs()\n + \"1. New pokemon please! (costs 1 pokeball)\\n\"\n + \"2. Evolve one of em! (costs gems)\\n\"\n + \"3. More pokeballs!\\n\"\n + \"4. Heal a hurt buddy :'( (costs 1 pokeball)\\n\"\n + \"5. Recharge a tired guy :| (costs 1 pokeball)\\n\"\n + \"6. Wanna give a buddy a new nickname :P\\n\"\n + \"7. Imma go back\\n\"\n + \"(1/2/3/4/5/6/7): \");\n\n // safely routes input to mainMenu if in case of error\n int option = input.hasNextInt()? input.nextInt() : 0;\n \n // calls references to itself or the next callback function, based on choice, safely\n fork(PGInstance::pokedexMenu, pokedexCallbacks[Math.min(option, pokedexCallbacks.length - 1)]);\n pause();\n pokedexMenu();\n }",
"public void startGame() {\n\t\tSystem.out.println(\"************************\");\n\t\tSystem.out.println(\"* Medieval Warriors *\\n* the adventure *\");\n\t\tSystem.out.println(\"************************\");\n\t\tSystem.out.print(\"Enter your name: \");\n\n\t\tthis.playern = new Player(sc.nextLine());\n\t\tSystem.out.println(\"************************\");\n\t\tSystem.out.println(\"Welcome \" + playern.getName() + \" The Warrior\\n\");\n\t\t\n\t\tint input = -1;\n\t\twhile (!wonGame && !lostGame) {\n\t\t\tprintMainMenu();\n\t\t\tSystem.out.print(\"> \");\n\t\t\tinput = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tswitch(input) {\n\t\t\t\tcase 1:\n\t\t\t\t\tgoAdventure();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tgoToTavern();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tgoCharacter();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.println(\"Bye!\");\n\t\t\t\t\tlostGame = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (wonGame) {\n\t\t\tSystem.out.println(\"Congratulations! You won The Game!\");\n\t\t}\n\n\t}",
"public void runConsole()throws IOException\n {\n while(true) {\n\n\n System.out.println(\"Menu : \\n 1.Add an item \\n 2.See all items \\n \" +\n \"3.Filter items \\n 4.Add a client \\n 5.See all clients \\n \" +\n \"6.Filter clients \\n 7.Sort clients \\n 8.Get most popular designer \\n \" +\n \"9.Add a transaction \\n 10.See all transactions \\n 11.Delete an item \\n \" +\n \"12.Delete a client \\n 13.Delete a transaction \\n \" +\n \"14.Update a clothing item \\n 15.Update a client \\n 16.Update a transaction \\n \" +\n \"17.Sort the clothing items in a cool order \\n 0.Exit \\n\");\n\n System.out.println(\"Enter an option: \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n\n String option = bufferRead.readLine();\n\n switch (option) {\n case \"1\":\n addItems();\n break;\n case \"2\":\n printAllItems();\n break;\n case \"3\":\n filterItems();\n break;\n case \"4\":\n addClients();\n break;\n case \"5\":\n printAllClients();\n break;\n case \"6\":\n filterClients();\n break;\n case \"7\":\n sortClients();\n break;\n case \"8\":\n getMostPopularDesigners();\n break;\n case \"9\":\n addTransaction();\n break;\n case \"10\":\n printAllTransactions();\n break;\n case \"11\":\n deleteItem();\n break;\n case \"12\":\n deleteClient();\n break;\n case \"13\":\n deleteTransaction();\n break;\n case \"14\":\n updateItem();\n break;\n case \"15\":\n updateClient();\n break;\n case \"16\":\n updateTransaction();\n break;\n case \"17\":\n coolOrder();\n break;\n default:\n break;\n }\n if(option.equals(\"0\")) break;\n }\n }",
"public void startNewGame()\n {\n // Display the Banner Page.\n \n System.out.println(\"\\nWelcome to the city of Aaron.\");\n \n // Prompt for and get the user’s name.\n String name;\n System.out.println(\"\\nPlease type in your first name: \");\n name = keyboard.next();\n\n // Call the createNewGame() method in the GameControl class\n \n GameControl.createNewGame(name);\n\n // Display a welcome message\n System.out.println(\"Welcome \" + name + \" have fun!!!\");\n \n //Call the GameMenuView\n GameMenuView gmv = new GameMenuView();\n gmv.displayMenu();\n }",
"public void run() {\r\n\t\t\r\n\t\tkeyboardInput = new KeyboardInput(); // we will use this object to obtain keyboard input\r\n\t\twhile (true) { // endless while-loop\r\n\t\t\t// display the menu and get the user's choice\r\n\t\t\tCurrencyExchangeMenu menu = new CurrencyExchangeMenu(); // ...using the \r\n\t\t\tint menuChoice = menu.getChoice(keyboardInput);\r\n\r\n\t\t\t// now process\r\n\t\t\tswitch (menuChoice) {\r\n\t\t\tcase 1:\r\n\t\t\t\tlistCurrencies(); // output a list of all currencies added to the system\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2: \r\n\t\t\t\taddCurrency(); // add a currency to the system\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tshowRate(); // show the exchange rate for a given currency\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tconvertAmount(); // convert an amount between two currencies\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n // TODO code application logic here\n GameController.start();\n boolean active=true;\n Scanner input = new Scanner(System.in);\n while(active){\n GameController.printBoard();\n System.out.print(GameController.getTurn()+\"'s move: \");\n String move = input.nextLine();\n GameController.playerMove(move);\n }\n }",
"public static void processMainMenu() {\n\n\t\tString mainPrompt = \"[anon@root]: \";\n\t\tboolean execute = true;\n\n\t\twhile (execute) {\n\t\t\tString[] words = prompt(mainPrompt);\n\t\t\tCmd cmd = stringToCmd(words[0]);\n\n\t\t\tswitch (cmd) {\n\t\t\tcase AU:\n\t\t\t\tif (validateInput2(words)) {\n\t\t\t\t\tSystem.out.println(handleAddUser(words[1].trim()));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DU:\n\t\t\t\tif (validateInput2(words)) {\n\t\t\t\t\tSystem.out.println(handleDelUser(words[1].trim())); \n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LI:\n\t\t\t\tif (validateInput2(words)) {\n\t\t\t\t\tSystem.out.println(handleLogin(words[1].trim()));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase HE:\n\t\t\t\tif (validateInput1(words)) {\n\t\t\t\t\tdisplayMainMenu();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase QU:\n\t\t\t\tif (validateInput1(words)) {\n\t\t\t\t\texecute = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\t}\n\n\t\t}\n\t}",
"public static void mainMenu() \n\t{\n\t\t// display menu\n\t\tSystem.out.print(\"\\nWhat would you like to do?\" +\n\t\t\t\t\"\\n1. Enter a new pizza order (password required)\" +\n\t\t\t\t\"\\n2. Change information of a specific order (password required)\" +\n\t\t\t\t\"\\n3. Display details for all pizzas of a specific size (s/m/l)\" +\n\t\t\t\t\"\\n4. Statistics of today's pizzas\" +\n\t\t\t\t\"\\n5. Quit\" +\n\t\t\t\t\"\\nPlease enter your choice: \");\t\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tMenu menu = new Menu();\r\n\t\tGame game = new Game();\r\n\t\t//System.out.println(\"test\");\r\n\t\t\r\n\t\t\r\n\t\twhile (game.getBoard().getMancheCourante() < 9) {\r\n\t\t\tswitch (tour) {\r\n\t\t\tcase 1:\r\n\t\t\t\tif(game.getBoard().getMancheCourante()%2 == 0) {\r\n\t\t\t\t\tgame.setCurrentPlayer(game.getJoueur2());\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tgame.setCurrentPlayer(game.getJoueur1());\r\n\t\t\t\t}\r\n\t\t\t\tif(game.getCurrentPlayer().getisJack()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Jack commence: veuillez saisir un chiffre pour lancer les jetons d'action.\",\"Jack a l'identite de \"+game.getJoueur2().getIdentiteJack().name());\r\n\t\t\t\t\tint l = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().refreshBoard(l,1);\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Jack choisi l'une des 4 actions, pour cela, saisir le numero de l'action\",\"Jack a l'identite de \"+game.getJoueur2().getIdentiteJack().name());\r\n\t\t\t\t\tint jetonAction = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().refreshBoard(jetonAction,2);\r\n\t\t\t\t\tgame.switchPlayer();\r\n\t\t\t\t\ttour=tour+1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Sherlock commence: veuillez saisir un chiffre pour lancer les jetons d'action.\",\"\");\r\n\t\t\t\t\tint l = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().refreshBoard(l,1);\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Sherlock choisi l'une des 4 actions, pour cela, saisir le numero de l'action\",\"\");\r\n\t\t\t\t\tint jetonAction = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().refreshBoard(jetonAction,2);\r\n\t\t\t\t\tgame.switchPlayer();\r\n\t\t\t\t\ttour=tour+1;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t\tif(game.getCurrentPlayer().getisJack()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Jack choisi l'une des 3 actions restantes, pour cela, saisir le numero de l'action\",\"Jack a l'identite de \"+game.getJoueur2().getIdentiteJack().name());\r\n\t\t\t\t\tint jetonAction = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().refreshBoard(jetonAction,3);\r\n\t\t\t\t\ttour=tour+1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Sherlock choisi l'une des 3 actions restantes, pour cela, saisir le numero de l'action\",\"\");\r\n\t\t\t\t\tint jetonAction = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().refreshBoard(jetonAction,3);\r\n\t\t\t\t\ttour=tour+1;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase 3:\r\n\t\t\t\tif(game.getCurrentPlayer().getisJack()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Jack rechoisi l'une des 2 actions restantes, pour cela, saisir le numero de l'action\",\"Jack a l'identite de \"+game.getJoueur2().getIdentiteJack().name());\r\n\t\t\t\t\tint jetonAction = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().refreshBoard(jetonAction,3);\r\n\t\t\t\t\tgame.switchPlayer();\r\n\t\t\t\t\ttour=tour+1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Sherlock rechoisi l'une des 2 actions restantes, pour cela, saisir le numero de l'action\",\"\");\r\n\t\t\t\t\tint jetonAction = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().refreshBoard(jetonAction,3);\r\n\t\t\t\t\tgame.switchPlayer();\r\n\t\t\t\t\ttour=tour+1;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase 4:\r\n\t\t\t\tif(game.getCurrentPlayer().getisJack()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Jack joue, pour cela, saisir le numero de la derniere action disponnible\",\"Jack a l'identite de \"+game.getJoueur2().getIdentiteJack().name());\r\n\t\t\t\t\tint jetonAction = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().refreshBoard(jetonAction,4);\r\n\t\t\t\t\tgame.switchPlayer();\r\n\t\t\t\t\ttour=tour+1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Sherlock joue, pour cela, saisir le numero de la derniere action disponnible\",\"\");\r\n\t\t\t\t\tint jetonAction = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().refreshBoard(jetonAction,4);\r\n\t\t\t\t\tgame.switchPlayer();\r\n\t\t\t\t\ttour=tour+1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase 5:\r\n\t\t\t\tif(game.getCurrentPlayer().getisJack()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tgame.getBoard().displayConsole(\"Deuxieme partie: Appel a temoin\",\"Jack a l'identite de \"+game.getJoueur2().getIdentiteJack().name());\r\n\t\t\t\t\tSystem.out.println(\"Jack est il visible: (1 - oui), (2 - non)\");\r\n\t\t\t\t\tint visible = scan.nextInt();\r\n\t\t\t\t\tgame.getBoard().updateTuiles(visible);\r\n\t\t\t\t\tswitch (visible) {\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\tSystem.out.println(\"Sherlock gagne le sablier de la manche\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\tSystem.out.println(\"Jack gagne le sablier de la manche\");\r\n\t\t\t\t\t\tgame.getJoueur2().setSablier(game.getJoueur2().getSablier()+1);\r\n\t\t\t\t\t\tbreak;\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\ttour = 1;\r\n\t\t\t\t\tgame.getBoard().setMancheCourante(game.getBoard().getMancheCourante()+1);\r\n\t\t\t\t\tgame.getBoard().updateDisplayConsole(game.getBoard().getMancheCourante());\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tgame.switchPlayer();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t}",
"private void consoleGameStart(){\n\t\tconsoleGetOptions();\n\t\t\n\t\t//diplay the board\n\t\tconsoleBoardDisplay();\n\t\tdo{\t\n\t\t\t//either player makes a move\t\t\n\t\t\tif (ttt.isPlayerTurn()) consoleBoardInput();\n\t\t\telse ttt.computeMove();\n\t\t\tconsoleBoardDisplay();\n\t\t\t\n\t\t\t//check for winning states and draw states\n\t\t\tif (ttt.checkWin()){\n\t\t\t\tif (ttt.isPlayerTurn()) System.out.println(\"Computer Wins\");\n\t\t\t\telse System.out.println(\"Player Wins\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (ttt.checkDraw()){\n\t\t\t\tSystem.out.println(\"Its a Draw Game\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}while (true);\n\t}",
"void printMainMenu(){\n\t\tSystem.out.println(\"\\n\\nMarketo Music\");\n\t\tSystem.out.println(\"Main Menu\");\n\t\tSystem.out.println(\"1. Create Playlist: create <playlist name>\");\n\t\tSystem.out.println(\"2. Edit Playlist: edit <playlist id>\");\n\t\tSystem.out.println(\"3. Print Song: song <song id>\");\n\t\tSystem.out.println(\"4. Print Playlist: playlist <playlist id>\");\n\t\tSystem.out.println(\"5. Print All Songs or Playlists: print song/playlist\");\n\t\tSystem.out.println(\"6. Search Song: search artist/title <string of words to be searched>\");\n\t\tSystem.out.println(\"7. Sort songs: sort artist/title\");\n\t\tSystem.out.println(\"8. Quit: quit\");\n\t\tSystem.out.print(\"Enter a Command : \");\n\t}",
"public void run() {\n\t\t\t\tif (consoleTextArea.getConsoleText().equals(\"CHEAT\")) {\n\t\t\t\t\tconsolePlayer.cheatMode();\n\t\t\t\t} else {\n\t\t\t\t\tswitch (consolePlayer.getGameState().getGameState()) {\n\t\t\t\t\t// addPlayer(1)\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tconsolePlayer.addPlayer(userName, consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waitingForStartGame(2)\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tconsolePlayer.startGame(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// gameStarted(3)\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// moving(4)\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\tconsolePlayer.movePlayer(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// chooseAction(5),\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\tconsolePlayer.chooseAction(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// suggesting(6)\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\tconsolePlayer.makeSuggestion(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// accussing(7)\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\tconsolePlayer.makeAccusation(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waiting(8)\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// showCard(9)\n\t\t\t\t\tcase 9:\n\t\t\t\t\t\tconsolePlayer.showCard(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waitingSeeCard(10)\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"private void processMainMenuCommand() {\n String command;\n boolean keepgoing = true;\n while (keepgoing) {\n\n System.out.println(\"Hello \" + pickedAccount.getName());\n System.out.println(\"Your balance: \" + pickedAccount.getBalance());\n System.out.println(\"What would you like to do? (quit/reserve/view/deposit)\");\n\n command = input.next();\n command = command.toLowerCase();\n\n if (command.equals(\"quit\")) {\n keepgoing = false;\n } else if (command.equals(\"reserve\") || command.equals(\"view\") || command.equals(\"deposit\")) {\n processCommand(command);\n } else {\n System.out.println(\"Invalid command, try again\");\n }\n }\n }",
"public static void main(String[] args){\n\t\tGameLoop game=new GameLoop();\n\t\tgame.registerGlobalCallbacks();\n\t\t//Game loop and setting initial scene\n\t\tmusic = new Sound(\"res\\\\Music.wav\");\n\t\tmusic.setLoop(true);\n\t\tgameOverMenu.setMusic(new Sound(\"res\\\\GameOver.wav\"));\n\t\ttimeText = new Text(screenWidth*9/10-100,screenHeight*1/32-20,20,20,\"\");\n\t\ttimeText.setColor(0, 0, 0);\n\t\tscoreText = new Text(screenWidth*9/10-100,screenHeight*1/32,20,20,\"\");\n\t\tscoreText.setColor(0, 0, 0);\n\t\twaveText = new Text(screenWidth*9/10-100,screenHeight*1/32+20,20,20,\"\");\n\t\twaveText.setColor(0, 0, 0);\n\t\t\n\t\tinitScene iLauncher = new initScene(game);\n\t\toLauncher = new overScene(game);\n\t\t\n\t\tmainMenu.addUnselItem(screenWidth/2-165, screenHeight/2-300, 50, 50, \"Spell Flingers\",0,0,1);\n\t\tmainMenu.addUnselItem(25, screenHeight-45, 20, 20, \"CONTROLS: WASD to move, esc to pause, and mouse buttons to cast spells!\",0,0,0);\n\t\tmainMenu.addUnselItem(screenWidth/2-265, screenHeight/2-308, 64, (Texture) SpellList.getTexture(Spell.ARCANE_MISSILE)[0]);\n\t\tmainMenu.addUnselItem(screenWidth/2+265, screenHeight/2-308, 64, (Texture) SpellList.getTexture(Spell.ARCANE_MISSILE)[0]);\n\t\tmainMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-100, 30, 30, \"Play Game\", 1, 0, 0, 0, 0, 0), iLauncher);\n\t\tmainMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-50, 30, 30, \"Exit\", 1, 0, 0, 0, 0, 0), null);\n\t\tmainMenu.select(0);\n\t\t\n\t\tpauseMenu.addUnselItem(screenWidth/2-165, screenHeight/2-300, 50, 50, \"PAUSED\",0,1,0);\n\t\tpauseMenu.addUnselItem(timeText);\n\t\tpauseMenu.addUnselItem(scoreText);\n\t\tpauseMenu.addUnselItem(waveText);\n\t\tpauseMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-100, 30, 30, \"Resume Game\", 1, 0, 0, 0, 0, 0), game);\n\t\tpauseMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-50, 30, 30, \"Abandon Run\", 1, 0, 0, 0, 0, 0), oLauncher);\n\n\t\ttimeTextGO = new Text(screenWidth/2-165, 240, 20, 20,\"\");\n\t\ttimeTextGO.setColor(1, 1, 1);\n\t\tscoreTextGO = new Text(screenWidth/2-165, 270, 20, 20,\"\");\n\t\tscoreTextGO.setColor(1, 1, 1);\n\t\twaveTextGO = new Text(screenWidth/2-165, 300, 20, 20,\"\");\n\t\twaveTextGO.setColor(1, 1, 1);\n\t\tgameOverMenu.addUnselItem(screenWidth/2-165, 100, 50, 50, \"GAME OVER\",1,0,0);\n\t\tgameOverMenu.addUnselItem(timeTextGO);\n\t\tgameOverMenu.addUnselItem(scoreTextGO);\n\t\tgameOverMenu.addUnselItem(waveTextGO);\n\t\tgameOverMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2+50, 30, 30, \"New Game\", 1, 0, 0, 1, 1, 1), iLauncher);\n\t\tgameOverMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2+100, 30, 30, \"Return to Main Menu\", 1, 0, 0, 1, 1, 1), mainMenu);\n\t\tgameOverMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2+150, 30, 30, \"Exit\", 1, 0, 0, 1, 1, 1), null);\n\t\t\n\t\tgame.setScene(mainMenu);\n\t\tgame.gameLoop();\n\t}",
"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}",
"public void play() \n { \n printWelcome();\n\n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n\n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n }",
"public void startGame() {\n Scanner in = new Scanner(System.in);\n Player player = Player.getInstance();\n setPlayer(player);\n\n try {\n\n System.out.println(\"\\t\\u2680\\t\\u2681\\t\\u2682\\t\\u2683\\t\\u2684\\t\\u2685\" +\n \"\\nWelcome to the World Series of Craps!\\n\" +\n \"Please enter your name\");\n\n player.setName(in.nextLine());\n\n }\n catch(NoSuchElementException e){\n System.out.println(\"Exiting system, thank you for playing\");\n System.exit(0);\n }\n catch (Exception e) {\n e.printStackTrace();\n setExit(true);\n }\n System.out.println(\"Welcome \" + player.getName() + \"\\n\");\n }",
"public static void main(String[] args) {\n\n // create an object to call the instance methods\n Nimsys engine = new Nimsys();\n\n // game welcome instruction\n System.out.println(\"Welcome to Nim\\n\");\n System.out.println(\"Please enter a command to continue\\n\");\n\n // command is for receiving the command from user\n String command;\n\n\n while (true) {\n\n // output the symbol for entering\n System.out.print(\"$ \");\n\n // every input is using next to avoid getting the content\n // in the keyboard buffer\n command = sc.nextLine();\n\n if (command.equalsIgnoreCase(\"start\")) {\n System.out.println();\n engine.start();\n } else if (command.equalsIgnoreCase(\"help\")) {\n engine.help();\n } else if (command.equalsIgnoreCase(\"exit\")) {\n System.out.println();\n engine.exit();\n break;\n } else if (command.equalsIgnoreCase(\"commands\")) {\n System.out.println();\n engine.command();\n }\n }\n System.out.println();\n }",
"private static void welcomePage() {\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Welcome to the Shopping App, best Shopping App in 2021!\");\r\n\t\tSystem.out.println();\r\n\t\tscanner = new Scanner(System.in); // Create a Scanner object\r\n\t\t// 1. Search items 2. View items 3. View cart 4. Checkout Cart 0. Quit\r\n\t\tmakeMenuChoice();\r\n\t\tscanner.close();\r\n\t}",
"public void play()\n { \n printWelcome();\n\n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n\n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n //System.out.println(command==null);\n String output = processCommand(command);\n finished = (null == output);\n if (!finished)\n { \n System.out.println(output);\n }\n\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n }",
"private void run()\r\n\t{\r\n\t\tboolean programLoop = true;\r\n\t\t\r\n\t\twhile(programLoop)\r\n\t\t{\r\n\t\t\tmenu();\r\n\t\t\tSystem.out.print(\"Selection: \");\r\n\t\t\tString userInput = input.nextLine();\r\n\t\t\t\r\n\t\t\tint validInput = -1;\r\n\t\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tvalidInput = Integer.parseInt(userInput);\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid selection.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tswitch(validInput)\r\n\t\t\t{\r\n\t\t\t\tcase 0: forInstructor();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1: addSeedURL();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2: addConsumer();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3: addProducer();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4: addKeywordSearch();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5: printStats();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t//case 10: debug(); //Not synchronized and will most likely cause a ConcurrentModificationException\r\n\t\t\t\t\t\t //break;\t//if multiple Producer and Consumer Threads are running.\r\n\t\t\t\tdefault: break;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public static void mainMenu(){\n // Creating a scanner to get console inputs.\n Scanner sc = new Scanner(System.in);\n\n // Getting user selection for from the main menu.\n System.out.print(\"\\n\\nSelect an option from the Menu.\\n\" +\n \"\\tA : \\tTo ADD a passenger to Train Queue\\n\" +\n \"\\tV : \\tTo VIEW the Train Queue\\n\" +\n \"\\tD : \\tTo DELETE passenger from Train Queue\\n\" +\n \"\\tS : \\tTo SAVE Train Queue\\n\" +\n \"\\tL : \\tTo LOAD Train Queue\\n\" +\n \"\\tR : \\tTo RUN simulation\\n\" +\n \"\\tQ : \\tTo QUIT the Program\\n\" +\n \"\\n\\nEnter option letter to proceed : \");\n String text = formattingWhitespace(sc.nextLine());\n\n // If user selected to add Passengers to the TrainQueue.\n if (text.equalsIgnoreCase(\"A\")) {\n System.out.println(\"Adding passenger...\");\n // Setting default train before Launching the GUI.\n GUI.choiceBoxTrains.setValue(GUI.trains[0]);\n launchingGUI(\"addTQ\", TrainStation.getWaitingRoom(), TrainStation.getTrainQueue(), 0, 0);\n }\n // If user selected to view the Train Queue.\n else if (text.equalsIgnoreCase(\"V\")) {\n System.out.println(\"Viewing Train Queue...\");\n // Setting default train before Launching the GUI.\n GUI.choiceBoxTrains.setValue(GUI.trains[0]);\n launchingGUI(\"viewTQ\", TrainStation.getWaitingRoom(), TrainStation.getTrainQueue(), 0, 0);\n }\n // If the user selected to Delete a passenger form thr Train Queue.\n else if (text.equalsIgnoreCase(\"D\")) {\n System.out.println(\"Deleting passenger...\");\n deletePassenger(TrainStation.getWaitingRoom(), TrainStation.getTrainQueue());\n mainMenu();\n }\n // If the user selected to save the Train Queue.\n else if (text.equalsIgnoreCase(\"S\")) {\n System.out.println(\"Saving Train Queue...\");\n saveTQ(TrainStation.getTrainQueue());\n mainMenu();\n }\n // If the user selected tho load the saved Train Queue.\n else if (text.equalsIgnoreCase(\"L\")) {\n System.out.println(\"Loading Train Queue...\");\n TrainStation.setTrainQueue(readTQ());\n mainMenu();\n }\n // If the User selected to run the simulation.\n else if (text.equalsIgnoreCase(\"R\")) {\n System.out.println(\"Running Simulation...\");\n runningSimulation();\n }\n // If the user selected to Quit the program.\n else if (text.equalsIgnoreCase(\"Q\")) {\n quitingProgram(true);\n }\n // When the user input is invalid.\n else {\n System.out.println(\"Invalid Input.\");\n mainMenu();\n }\n }",
"public UserInteractionConsole() {\n setupVariables();\n\n System.out.println(\"Select an Option\");\n int choice = userInteractionTree();\n while (true) {\n if (choice < 8) {\n courseOptions(choice);\n } else if (choice < 12) {\n scheduleOptions(choice);\n } else if (choice == 12) {\n saveAndExit();\n break;\n } else {\n break;\n }\n System.out.println(\"\\n\\nSelect an Option\");\n choice = userInteractionTree();\n }\n\n }",
"public void beginGame()\n {\n boolean isMenuDisplayed = true;\n while (isMenuDisplayed)\n { \n displayMenu();\n String userSelection = getUserStringInput(\"Please select from the following options\");\n fourOption(userSelection);\n if (userSelection == \"4\")\n isMenuDisplayed = false;\n }\n }",
"public void employeeMenu(String activeId) {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Employee Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. Register a game |\");\n System.out.println(\"| 2. Remove a game |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 3. Register an album |\");\n System.out.println(\"| 4. Remove an album |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 5. Register a customer |\");\n System.out.println(\"| 6. Upgrade a customer |\");\n System.out.println(\"| 7. Remove a customer |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 8. Return rented item |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. View all games and albums (sorted) |\");\n System.out.println(\"| 10. View all customers |\");\n System.out.println(\"| 11. View all rentals and history |\");\n System.out.println(\"| 12. View total rent profit |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 13. Send message to customer |\");\n System.out.println(\"| 14. Send message to employee |\");\n System.out.println(\"| 15. Read my messages \" + messageController.checkNewMsg(activeId, \"Employee\") + \" |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 16. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n switch (userInput.toLowerCase()) {\n case \"1\" -> dartController.addGame();\n case \"2\" -> dartController.deleteProduct(\"Game\");\n case \"3\" -> dartController.addAlbum();\n case \"4\" -> dartController.deleteProduct(\"Album\");\n case \"5\" -> userController.addCustomer();\n case \"6\" -> userController.upgradeCustomerView(null);\n case \"7\" -> userController.deleteCustomer();\n case \"8\" -> dartController.returnRental();\n case \"9\" -> productSortView(activeId);\n case \"10\" -> userController.displayCustomers(false);\n case \"11\" -> dartController.viewCurrentRentals();\n case \"12\" -> dartController.viewRentalTotalProfit();\n case \"13\" -> messageController.buildMessage(activeId, \"Employee\", \"Customer\", null, \"message\", null);\n case \"14\" -> messageController.buildMessage(activeId, \"Employee\", \"Employee\", null, \"message\", null);\n case \"15\" -> messageController.openInbox(activeId, \"Employee\");\n case \"16\" -> mainMenu();\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMenu\", String.valueOf(e));\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"Welcome to...\");\n\t\tSystem.out.println(\" .--. .-. .-. .---. ,-. .---. .-. .-. \\r\\n\"\n\t\t\t\t+ \"|\\\\ /| / /\\\\ \\\\ | \\\\| | ( .-._)|(|/ .-. ) | \\\\| | \\r\\n\"\n\t\t\t\t+ \"|(\\\\ / |/ /__\\\\ \\\\| | | (_) \\\\ (_)| | |(_)| | | \\r\\n\"\n\t\t\t\t+ \"(_)\\\\/ || __ || |\\\\ | _ \\\\ \\\\ | || | | | | |\\\\ | \\r\\n\"\n\t\t\t\t+ \"| \\\\ / || | |)|| | |)|( `-' ) | |\\\\ `-' / | | |)| \\r\\n\"\n\t\t\t\t+ \"| |\\\\/| ||_| (_)/( (_) `----' `-' )---' /( (_) \\r\\n\"\n\t\t\t\t+ \"'-' '-' (__) (_) (__) \");\n\t\tSystem.out.println(\" ,---. .---. ,--, .--. ,---. ,---. \\r\\n\"\n\t\t\t\t+ \" | .-' ( .-._).' .') / /\\\\ \\\\ | .-.\\\\ | .-' \\r\\n\"\n\t\t\t\t+ \" | `-. (_) \\\\ | |(_) / /__\\\\ \\\\| |-' )| `-. \\r\\n\"\n\t\t\t\t+ \" | .-' _ \\\\ \\\\ \\\\ \\\\ | __ || |--' | .-' \\r\\n\"\n\t\t\t\t+ \" | `--.( `-' ) \\\\ `-. | | |)|| | | `--. \\r\\n\"\n\t\t\t\t+ \" /( __.' `----' \\\\____\\\\|_| (_)/( /( __.' \\r\\n\"\n\t\t\t\t+ \"(__) (__) (__) \");\n\n\t\tScanner sc = new Scanner(System.in); //new instance of Scanner is created\n\t\tString input = \"\";\n\t\tdo {\n\t\t\tSystem.out.print(\"\\nType Y for a New Game or N to Exit: \");\n\t\t\tinput = sc.next();\n\t\t} while (!input.equalsIgnoreCase(\"y\") && !input.equalsIgnoreCase(\"n\")); //end of do while loop to check if valid input is entered\n\n\t\tif (input.equalsIgnoreCase(\"n\")) {\n\t\t\tSystem.out.println(\"Exiting...\");\n\t\t\tSystem.exit(0);\n\t\t} //end of if statement to check if the input was to exit the game.\n\t\tSystem.out.println(\"New Game Selected!\");\n\t\tStartAdventure game = new StartAdventure(); //new instance of StartAdventure called game\n\n\t\tPlayer player = new Player(); //creation of new Player instance called player\n\t\tSystem.out.print(\"Player name: \");\n\t\tString name = sc.next();\n\t\tplayer.setName(name); //name of player is set\n\t\t\n\n\t\t// 1 player game\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nNEW GAME STARTED\");\n\t\t\tString command = \"\";\n\t\t\tint roomNum = 1;\n\t\t\tgame.setRoomNumber(roomNum); //first room is set when new game starts\n\t\t\tboolean flashlight = false;\n\t\t\tboolean bottle = false;\n\t\t\tboolean pipe = false;\n\t\t\tboolean keyCar = false;\n\t\t\tboolean keyHall = false;\n\t\t\tboolean[] inventory = { flashlight, bottle, pipe, keyCar, keyHall }; //array of booleans is created for item inventory\n\t\t\tplayer.setInventory(inventory); //inventory is set in player\n\t\t\tEnemy enemy1 = new Enemy(); //creation of first Enemy instance\n\t\t\tEnemy enemy2 = new Enemy(); //creation of second Enemy instance\n\n\t\t\tdo {\n\t\t\t\tif (game.getRoomNumber() == 1) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), null)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.lobbyRoom(command, player.getInventory(), player); //lobbyRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 1); //end of do while that determines if command prompt is looped while the player is still in room 1\n\t\t\t\t}//end of if statement that determines if player is in room 1\n\n\t\t\t\tif (game.getRoomNumber() == 2) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), null)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.barRoom(command, player.getInventory(), player); //barRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 2);//end of do while that determines if command prompt is looped while the player is still in room 2\n\t\t\t\t}//end of if statement that determines if player is in room 2\n\n\t\t\t\tif (game.getRoomNumber() == 3) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), enemy1)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.kitchenRoom(command, player.getInventory(), player, enemy1); //kitchenRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 3);//end of do while that determines if command prompt is looped while the player is still in room 3\n\t\t\t\t}//end of if statement that determines if player is in room 3\n\n\t\t\t\tif (game.getRoomNumber() == 4) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), null)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.bedRoom(command, player.getInventory(), player); //bedRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 4);//end of do while that determines if command prompt is looped while the player is still in room 4\n\t\t\t\t}//end of if statement that determines if player is in room 4\n\n\t\t\t\tif (game.getRoomNumber() == 5) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), null)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.bathRoom(command, player.getInventory(), player); //bathRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 5);//end of do while that determines if command prompt is looped while the player is still in room 5\n\t\t\t\t}//end of if statement that determines if player is in room 5\n\n\t\t\t\tif (game.getRoomNumber() == 6) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), enemy2)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.outsideRoom(command, player.getInventory(), player, enemy2); //outsideRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 6);//end of do while that determines if command prompt is looped while the player is still in room 6\n\t\t\t\t}//end of if statement that determines if player is in room 6\n\n\t\t\t} while (game.getRoomNumber() != 0); //end of do while loop that determines if player is still in rooms/game\n\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.print(\"Game Over. Type Y to Play Again or N to Exit: \");\n\t\t\t\t\tinput = sc.next();\n\t\t\t\t} while (!input.equalsIgnoreCase(\"y\") && !input.equalsIgnoreCase(\"n\"));//end of do while that determines if input is valid\n\n\t\t\t\tif (input.equalsIgnoreCase(\"n\")) {\n\t\t\t\t\tSystem.out.println(\"Exiting...\");\n\t\t\t\t\tSystem.out.println(\"Game Exited!\");\n\t\t\t\t\tSystem.exit(0); //program exit\n\t\t\t\t}//end of if statement that exits the game if the input was n\n\t\t\t\n\t\t} while (input.equalsIgnoreCase(\"y\")); //end of do while loop that handles new game looping\n\t\t\n\t\tSystem.out.println(\"Exiting...\");\n\t\tSystem.out.println(\"Game Exited!\");\n\t\tSystem.exit(0); //program exit\n\n\t}",
"public void play()//Method was given\n { \n createRooms();\n createItems();\n printWelcome();\n \n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n finished = false;\n while (! finished)\n {\n Command command = parser.getCommand();\n finished = processCommand(command);\n if (currentRoom == exitRoom)\n {\n finished = true;\n }\n }\n System.out.println(\"Thank you for playing. Goodbye.\");\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}",
"public static void main(String[] args) {\n\t\tint choice = 1;\n\t\t\n\t\tSystem.out.println(\"Beginning of Application\");\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tRoomManager rm = new RoomManager();\n\t\trm.init();\n\t\t\n\t\tPlayer p = new Player();\n\t\tp.setCurrentRoom(rm.getFirstRoom());\n\t\t\n\t\tSystem.out.println(p.getCurrentRoom());\n\t\t\n\t\twhile(choice != 0) {\n\t\tcollectInput(sc);\n\t\tparse(args, p);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"End of application\");\n\t\tsc.close();\n\t\t}",
"public void showMenu(){\n\t\tSystem.out.println(\"******************************************************\");\n\t\tSystem.out.println(\"************Welcome to the holding program************\");\n\t\tSystem.out.println(\"******************************************************\");\n\t\tint option = -1;\n\t\twhile(option != 0){\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"***************Please, select an option***************\");\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"0. To exit of the program\");\n\t\t\tSystem.out.println(\"1. To add a public service company\");\n\t\t\tSystem.out.println(\"2. To add an university company\");\n\t\t\tSystem.out.println(\"3. To add a high school company\");\n\t\t\tSystem.out.println(\"4. To add a technological company\");\n\t\t\tSystem.out.println(\"5. To add a food company\");\n\t\t\tSystem.out.println(\"6. To add a medicine company\");\n\t\t\tSystem.out.println(\"7. Show the information of the holding\");\n\t\t\tSystem.out.println(\"8. Register a poll\");\n\t\t\tSystem.out.println(\"9. To add a employee\");\n\t\t\tSystem.out.println(\"10. Find the extension of a employee\");\n\t\t\tSystem.out.println(\"11. Find the mails of all the employees that are occupied a position\");\n\t\t\tSystem.out.println(\"12. To add a product\");\n\t\t\toption = reader.nextInt();\n\t\t\treader.nextLine();\n\t\t\tswitch(option){\n\t\t\t\tcase 0:\n\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tpublicService();\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tuniversity();\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\thighSchool();\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\ttechnological();\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\tfood();\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\tmedicine();\n\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\tSystem.out.println(theHolding.wholeInformation());\n\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\tregisterPoll();\n\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\taddEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\textensionEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\tmailsPosition();\n\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\taddProduct();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Select a correct option\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"static void printStatus() {\r\n System.out.println(\"\"\"\r\n\r\n +---------------------------------------+\r\n | Welcome to the FIT2099 AutoShowroom! |\r\n +---------------------------------------+\"\"\");\r\n while(isRunning){\r\n try {\r\n consoleMenu();\r\n } catch (InputMismatchException e) {\r\n System.out.println(\"\\nInput Mismatch Exception encountered, sorry for the inconvenience!\");\r\n } catch (RuntimeException e) {\r\n System.out.println(\"\\nRuntime Exception encountered, sorry for the inconvenience!\");\r\n } catch (Exception e) {\r\n System.out.println(\"\\nSome other Exception encountered, sorry for the inconvenience!\");\r\n }\r\n }\r\n System.out.println(\"\\nThank you for visiting the FIT2099 Showroom\");\r\n }",
"public WelcomeGame() {\r\n\t\tthis.input = new Scanner(System.in);\r\n\t}",
"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 printMainMenu(){\n\t\tprint(\"Please choose from the options below\", System.lineSeparator()+\"1.Login\", \"2.Exit\");\n\t}",
"public void mainPart(){\n this.speakerMessageScreen.prompt();\n String choice = this.scanner.nextLine();\n switch (choice) {\n case \"0\":\n this.programController.goToPreviousScreenController();\n break;\n case \"1\":\n this.reply();\n this.mainPart();\n return;\n case \"2\":\n this.broadCast();\n this.mainPart();\n return;\n case \"3\":\n this.programController.setNewScreenController(new InboxScreenController(programController));\n break;\n default:\n this.speakerMessageScreen.invalidInput(choice);\n this.mainPart();\n return;\n }\n this.end();\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 }",
"private void consoleWelcome()\n {\n welcomePartOne();\n\n Scanner reader = new Scanner(System.in);\n String playerName = reader.nextLine();\n player.playerName = playerName;\n \n welcomePartTwo();\n }",
"void askMenu();",
"public static void mainMenu() {\n\t\tSystem.out.println(\"1. Train the autocomplete algorithm with input text\");\r\n\t\tSystem.out.println(\"2. Test the algorithm by entering a word fragment\");\r\n\t\tSystem.out.println(\"3. Exit (The algorithm will be reset on subsequent runs of the program)\");\r\n\t\tint choice = getValidInt(1, 3); // get the user's selection\r\n\t\tSystem.out.println(\"\"); // for appearances\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t//evaluate the user's choice\r\n\t\tswitch (choice) {\r\n\t\tcase CONSTANTS.TRAIN:\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Enter a passage to train the algorithm (press enter to end the passage): \");\r\n\t\t\tString passage = scan.nextLine();\r\n\t\t\tprovider.train(passage);\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase CONSTANTS.TEST:\r\n\t\t\t\r\n\t\t\tString prefix;\r\n\t\t\tdo { // keep asking for input until a valid alphabetical string is given\r\n\t\t\t\tSystem.out.print(\"Enter a prefix to test autocomplete (alphabetic characters only): \");\r\n\t\t\t\tprefix = scan.nextLine();\r\n\t\t\t} while (!prefix.matches(\"[a-zA-z]+\"));\r\n\t\t\tSystem.out.println(\"\"); // for appearances\r\n\t\t\tshowResults(provider.getWords(prefix.toLowerCase()));\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase CONSTANTS.EXIT:\r\n\t\t\t\r\n\t\t\tSystem.exit(0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tmainMenu();\r\n\t}",
"private static void displayMainMenu() {\n\t\tSystem.out.println(\"\\t Main Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"au <username> : Registers as a new user \\n\"\n\t\t\t\t+ \"du <username> : De-registers a existing user \\n\"\n\t\t\t\t+ \"li <username> : To login \\n\"\n\t\t\t\t+ \"qu : To exit \\n\"\n\t\t\t\t+\"====================================\\n\");\n\t}",
"public void run() throws IOException {\n\t\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tdisplayMenu();\n\t\tchar input = '0';\n\t\twhile (input != 'x') {\n\t\t\tSystem.out.println(\"______________________________\");\n\t\t\tSystem.out.print(\"\\nOption:\");\n\t\t\tinput = scan.next().charAt(0);\n\t\t\tselectOption(input);\n\t\t}\n\t}",
"public static void main(String[] args){\n int menuChoice = 0;\n while (menuChoice != 2){\n menuChoice = menu();\n switch(menuChoice){\n //calls the driver and auto-plays\n case 1:\n System.out.println();\n deck.addCards();//adds cards to the deck\n deck.shuffle();//shuffles cards in the deck\n //deal 26 cards for each player\n for (int i = 0; i < 26;i++){\n hand1.add(deck.deal());\n hand2.add(deck.deal());\n }\n //shows size of each hand\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \"+ hand2.cardsLeft()+\"\\n\");\n //call the driver and play the game\n warDriver(hand1,hand2);\n break;\n //exit game\n case 2:\n System.out.println(\"\");\n System.out.println(\"Goodbye!\");\n System.exit(0);\n break;\n }\n }\n\n }",
"public void launchGame() throws FileNotFoundException, LevelException, VacuumException, SpriteException {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\twhile(game.nextLevel()) {\t\t\t\r\n\t\t\tSystem.out.println(\"LEVEL \"+game.getNumLevel());\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t\t// print board and keep accepting moves until game is over\r\n\t\t\twhile (!game.isLevelBeaten()) {\r\n\t\t\t\tSystem.out.println(game.getBoardText());\r\n\t\t\t\tSystem.out.print(\"Total Score: \"+game.getTotalScore());\r\n\t\t\t\tSystem.out.print(\" | Level Score: \"+game.getLevelScore());\r\n\t\t\t\tSystem.out.print(\" | Capacity: \"+(game.getVacuumRatioCapacity()*100)+\"%\");\r\n\t\t\t\tSystem.out.print(\" | Turns: \"+(game.getTurns()));\r\n\t\t\t\tSystem.out.print(\" | Enter move: \");\r\n\t\t\t\tmove(sc.next().charAt(0));\t\t\t\t\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(game.getBoardText());\r\n\t\t\t\t\r\n\t\t\t\tif(game.timesUp()) {\r\n\t\t\t\t\tSystem.out.println(\"Time's up!! You lose!!\");\r\n\t\t\t\t\tSystem.out.println(\"Press enter to continue...\");\r\n\t\t\t\t\tgame.reload();\r\n\t\t\t\t\tsc.nextLine(); //To catch the previous \"enter\"\r\n\t\t\t\t\tsc.nextLine();\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Congrats!! You have finished Level \"+game.getNumLevel()+\"!!\");\r\n\t\t\tSystem.out.println(\"Press enter to continue...\");\t\t\t\t\r\n\t\t\tsc.nextLine();\r\n\t\t\tsc.nextLine();\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\t\t\r\n\t\tSystem.out.println(\"Total Score: \"+game.getTotalScore());\r\n\t}",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"******************************************\");\n\t\tSystem.out.println(\"* Welcome to the Game Zone *\");\n\t\tSystem.out.println(\"******************************************\");\n\t \n\t\t// Create loop that repeats until user chooses to quit\t\n\t\t// Set option to 0 \n\t\tint option = 0;\n\t\t\n\t\tdo {\t \t\t\t\n\t\t // Prints the menu of options\n\t\t System.out.println(\"What would you like to play?\");\n\t\t System.out.println(\"1. Twenty-one\");\n\t\t System.out.println(\"2. Rock Paper Scissors\");\n\t\t System.out.println(\"3. Neither - I'm done!\");\n\t\t \n\t\t // Ask for user input\n\t\t System.out.print(\"Please enter the number of your choice: \");\n\t\t \n\t\t // Set option as user input value\n\t\t option = Integer.parseInt(sc.nextLine());\n\t\t \n\t\t // If user selects option 1 start TwentyOne game\n\t\t if (option == 1) {\n\t\t \tTwentyOne();\n\t\t }\n\t\t \n\t\t // If user selects option 2 start RockPaper game\n\t\t if (option == 2) {\n\t\t \tRockPaper();\n\t\t }\n\t\t \t\n\t\t} while (option != 3);\n\t\t\t\n\t\t//if (option == 3) {\n\t\t\t// Close Scanner Object \n\t\t\tsc.close();\n\t\t\t// Display Exit message\n\t\t\tSystem.out.println(\"Thank you for playing\");\n\t\t//}\n\t}",
"private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}",
"public static void main(String[] args) {\n UserObjects user = new UserObjects();\n System.out.printf(\" ------------ Login ------------ \\n\");\n System.out.println(\"Enter library number:\");\n String libraryNumberInput = Utililty.readConsoleInput();\n System.out.println(\"\\nEnter password:\");\n String passwordInput = Utililty.readConsoleInput();\n Boolean successLogin = user.login(libraryNumberInput,passwordInput);\n\n if(successLogin){\n Biblioteca biblioteca = new Biblioteca();\n String firstGreeting = biblioteca.welcomeMessage();\n System.out.println(firstGreeting);\n\n Menu menu = new Menu(biblioteca, user);\n menu.readInputOption();\n }else{\n System.out.println(\"Incorrect login\");\n }\n\n }",
"public static void main(String[] args) {\n\r\n\t\tfor (Level l : Level.values()) {\r\n\t\t\tSystem.out.println(l);\r\n\t\t}\r\n\t\tSystem.out.println(Arrays.toString(Level.values()));\r\n\r\n\t\tMenu menu = new Menu();\r\n\t\tint choice = 999;\r\n\t\twhile (true) {\r\n\t\t\tmenu.displayChoiceList();\r\n\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\tif (sc.hasNextInt()) {\r\n\t\t\t\tchoice = sc.nextInt();\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tmenu.runCommand(choice);\r\n\r\n\t\t\t} catch (NullPointerException e) {\r\n\t\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void runAuctionApp() {\r\n exitApp = false;\r\n String command;\r\n input = new Scanner(System.in);\r\n System.out.println(\"Welcome to C-Auction!\");\r\n\r\n loadCarListings();\r\n\r\n while (!exitApp) {\r\n\r\n displayMenu();\r\n command = input.next();\r\n\r\n processInput(command);\r\n\r\n }\r\n System.out.println(\"The application is closing\");\r\n }",
"public static void main(String[] args) {\n Graphics.graphicsMainMenu();\r\n //Print main menu\r\n Menu.mainMenu();\r\n }",
"public static void main(String[] args) {\n HighScoresTable highScoresTable = null;\n // trying to read the high score file\n try {\n highScoresTable = HighScoresTable.loadFromFile((new File(\"highScores.txt\")));\n } catch (IOException e) {\n e.printStackTrace();\n } // if the table is empty\n if (highScoresTable.getHighScores().isEmpty()) {\n highScoresTable = new HighScoresTable(5);\n }\n final HighScoresTable scoresTable = highScoresTable;\n GUI gui = new GUI(\"arknoid\", 800, 600);\n // creating a runner\n final AnimationRunner runner = new AnimationRunner(gui);\n final KeyboardSensor keyborad = runner.getGui().getKeyboardSensor();\n // creating a menu\n Menu<Task<Void>> mainMenu = new MenuAnimation<Task<Void>>(\"chicken invaders\", keyborad);\n mainMenu.addSelection(\"s\", \"Start game\", new Task<Void>() {\n // run the levels\n public Void run() {\n // creating a level information object to run over finally\n LevelInformation spaceInvader = new SpaceInvadersLevel();\n GameFlow flow = new GameFlow(800, 600, scoresTable, gui, keyborad);\n flow.runLevels(spaceInvader);\n return null;\n }\n }); // the option for watching the high score table\n mainMenu.addSelection(\"h\", \"High Scores\", new Task<Void>() {\n // show the highScoreAnimation with the scores table\n public Void run() {\n runner.run(new KeyPressStoppableAnimation(keyborad, KeyboardSensor.SPACE_KEY,\n new HighScoresAnimation(scoresTable)));\n return null;\n }\n }); // the option of quiting\n mainMenu.addSelection(\"q\", \"Exit\", new Task<Void>() {\n // q to quit game\n public Void run() {\n System.exit(0);\n return null;\n }\n });\n while (true) {\n // run the main menu\n runner.run(mainMenu);\n Task<Void> task = mainMenu.getStatus();\n // as long the task is not null - run it.\n if (task != null) {\n task.run();\n mainMenu.setStop(false);\n }\n }\n\n }",
"public void helpMenu()\n {\n System.out.println(\"*********************************************Help Menue**************************************************************\");\n System.out.println(\"Each player starts the game with zero points.\");\n System.out.println(\"Each player is given the following set of five tiles. Each tile has a value and an associated score\");\n System.out.println(\"For each round, each player will play ONE tile, with the tile value adding to the game total for that round.\"); \n System.out.println(\"Provided the game total is less than or equal to 21, the player will get the score for using that tile.\");\n System.out.println(\"If the game total is greater than 21\");\n System.out.println(\"no score is allocated to the player who played the last tile causing the score to become greater than 21.\");\n System.out.println(\"Once the round ends, Each player will get their score based on the total of the tiles they have used during the round.\");\n System.out.println(\"Any player who has NOT used the tile with the value of 5, will get a penalty of -3 points.\");\n System.out.println(\"The player who, after all deductions, has the highest score, will be the winner of that round and will get 5 points.\"); \n System.out.println(\"At the end of all the rounds, the player who has won the most rounds is declared the winner of the game.\");\n System.out.println(\"**********************************************************************************************************************\");\n getUserStringInput(\"Please enter continue\");\n }",
"public static void main(String[] args)\n {\n Main controller = new Main();\n System.out.println(\"----------User Instructions --------------\");\n instructions();\n System.out.println(\"-------------------------------------------\");\n int choice = 0;\n In in = new In();\n while(choice != -1)\n {\n choice = in.readInt();\n switch (choice)\n {\n case -1:\n System.out.println(\"Bye\");\n System.exit(0);\n break;\n case 0:\n controller.home_index();\n break;\n case 1:\n controller.home_byUser();\n break;\n case 2:\n controller.home_byConversation();\n break;\n case 3:\n leaderBoard_index();\n break;\n case 4:\n leaderBoard_talkative();\n break;\n case 5:\n leaderBoard_leastTalkative();\n break;\n default:\n StdOut.println(\"You have entered an invalid number.\");\n \tStdOut.println(\"Valid integer range is between 1 and 5.\");\n \tStdOut.println(\"You may enter another number now.\");\n \tStdOut.println(\"Enter -1 to exit program.\");\n }\n }\n }"
] | [
"0.777672",
"0.7414971",
"0.7386713",
"0.7261561",
"0.7170366",
"0.7147421",
"0.7126227",
"0.7114693",
"0.70996004",
"0.70717204",
"0.7046556",
"0.7034331",
"0.7016329",
"0.70133287",
"0.7006609",
"0.6990945",
"0.6946246",
"0.69342893",
"0.6893438",
"0.6874484",
"0.68521583",
"0.68457294",
"0.681061",
"0.68064547",
"0.67800426",
"0.67775726",
"0.6771862",
"0.67697114",
"0.675458",
"0.6714189",
"0.6711307",
"0.6708816",
"0.6704583",
"0.66837937",
"0.6659822",
"0.66475624",
"0.6621832",
"0.66157675",
"0.66120446",
"0.6608853",
"0.66064495",
"0.6605871",
"0.6595675",
"0.65949285",
"0.6591889",
"0.658587",
"0.6584584",
"0.6582575",
"0.65812343",
"0.6566771",
"0.65582734",
"0.65541726",
"0.6549454",
"0.6546138",
"0.6545911",
"0.6542729",
"0.65411687",
"0.65166914",
"0.6516356",
"0.6514219",
"0.6511642",
"0.6510983",
"0.6495615",
"0.64948094",
"0.64918107",
"0.64885545",
"0.64870703",
"0.64845455",
"0.6480571",
"0.64765334",
"0.64704055",
"0.6469144",
"0.64657456",
"0.6457566",
"0.6451876",
"0.6449102",
"0.6448353",
"0.6445634",
"0.64394575",
"0.64319336",
"0.64316416",
"0.6417537",
"0.64143103",
"0.64037037",
"0.63996625",
"0.6398208",
"0.63954735",
"0.63907063",
"0.6386936",
"0.63832796",
"0.6382622",
"0.63822633",
"0.63726187",
"0.63719106",
"0.6364908",
"0.6361781",
"0.6360978",
"0.6360709",
"0.6347577",
"0.63433254",
"0.63427544"
] | 0.0 | -1 |
This is the closing point for your menu. It should close any resources, finalize any score and do any last minute output that is needed. As soon as this function is done, the next menu will immediately take over output. | abstract void onDestroy(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void close() {\r\n this.dispose();\r\n MainClass.gamesPlayed++;\r\n Examples2018.menu();\r\n }",
"@Override\n\t\tpublic void closeMenu() {\n\t\t}",
"static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}",
"public void menu()\r\n\t{\r\n\t\t//TODO\r\n\t\t//Exits for now\r\n\t\tSystem.exit(0);\r\n\t}",
"public void exit() {\r\n\t\tdispose();\r\n\t}",
"public final void close() {\r\n\t\tlayout.removeComponent(this);\r\n\t\tlayout.removeComponent(menu);\r\n\t}",
"public void Exit(){\n\t\t\t\tclose();\n\t\t\t}",
"public void end()\n\t{\n\t\tStateManager.setState(StateManager.GameState.MAINMENU);\n\t\tStateManager.setGame(null);\n\t}",
"static void mainMenu()\n {\n clrscr();\n System.out.print(\"\\n\"\n + title()\n + \"Go on, \" + Player.current.name + \", choose away ...\\n\"\n + \"1. Match time!\\n\"\n + \"2. Pokedex pls\\n\"\n + \"3. Show me my stats\\n\"\n + \"4. I suck at life and want to quit\\n\"\n + \"(1/2/3/4): \");\n\n // checks for int input, or routes back to mainMenu()\n int option = input.hasNextInt()? input.nextInt() : mainCallbacks.length - 1;\n\n // just defaults to quit if options > length of array of callbacks (here 5)\n mainCallbacks[Math.min(option, mainCallbacks.length - 1)].call();\n mainMenu();\n }",
"private void exit() {\n dispose();\r\n }",
"private void printExitMenu() {\n System.out.println(\"Goodbye! Thanks for using the app!\");\n }",
"public void exitMenu(){\n }",
"protected abstract void quitToMainMenu();",
"public void endGameFrame() {\r\n\t\tcreateWarning(3000, \"Time Out!\"); //show warning message\r\n\t\t\r\n\t\ttry {\t\t\t\t\t\t\t //creates a file when the game is over\r\n\t\t\tString ExitFilename = \"EXIT.txt\";\r\n\t\t\tFileWriter ExitFile = new FileWriter(\"src/Signals./\"+ExitFilename);\r\n\t\t\tExitFile.write(\"EXIT\");\r\n\t\t\tExitFile.close();\r\n\t\t} \r\n\t\t catch (IOException e) {\r\n\t\t System.out.println(\"An error occurred.\");\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t//close all interface\r\n\t\tframe.setVisible(false);\r\n\t\tframe.dispose();\r\n\t\tSystem.exit(0);\r\n\t\t\r\n\t\t\r\n\t}",
"public void run(){\n ArrayList<String> menuItems = new ArrayList<>();\n menuItems.add(\"Play the Game\");\n menuItems.add(\"Close the Program\");\n menuItems.add(\"Show the highest score\");\n String menu = CollectionTools.collectionPrinter('S', menuItems);\n runMenu(menu);\n }",
"public void endGame() {\n dispose();\n System.out.println(\"Thank you for playing\");\n System.exit(0);\n }",
"public ExitMenu(){\n\t\tint n = showConfirmDialog(null,\"Exit Game\", \"Exiting Game\",JOptionPane.YES_NO_OPTION);\n\t\tif(n==0)\n\t\t\tSystem.exit(0);\t\t\n\t}",
"public void exitToMenu()\n {\n exitToMenuFlag = true;\n }",
"public void endGame(){\t\t\r\n\t\tString inits = \r\n\t\t\t\tJOptionPane.showInputDialog(\r\n\t\t\t\t\t\t\"High Scores:\\n\"\r\n\t\t\t\t\t\t+scores[9].toString()\r\n\t\t\t\t\t\t+scores[8].toString()\r\n\t\t\t\t\t\t+scores[7].toString()\r\n\t\t\t\t\t\t+scores[6].toString()\r\n\t\t\t\t\t\t+scores[5].toString()\r\n\t\t\t\t\t\t+scores[4].toString()\r\n\t\t\t\t\t\t+scores[3].toString()\r\n\t\t\t\t\t\t+scores[2].toString()\r\n\t\t\t\t\t\t+scores[1].toString()\r\n\t\t\t\t\t\t+scores[0].toString()\r\n\t\t\t\t\t\t, \"\");\r\n\t\t\r\n\t\tcheckIfHighScore(inits);\r\n\t\t\r\n\t\ttry{\r\n\t\t\tthis.writeScoresToFile(file);\r\n\t\t} catch (Exception e){\r\n\t\t\t\r\n\t\t}\r\n\t}",
"private void closeMenu() {\n if (!isMenuOpen()) {\n return;\n }\n\n if (mIsVersionI || mIsVersionJ || mIsVersionK) {\n // Click menu button to close menu (this is NOT for taking pictures)\n String uiMenuButton = (mIsVersionK)? UI_MENU_BUTTON_ID_4X:UI_MENU_BUTTON_ID_3X;\n UiObject2 backButton = mDevice.findObject(By.res(UI_PACKAGE_NAME, uiMenuButton));\n if (backButton != null) {\n backButton.click();\n }\n } else {\n // Click shutter button to close menu (this is NOT for taking pictures)\n UiObject2 shutter = mDevice.findObject(By.res(UI_PACKAGE_NAME, UI_SHUTTER_BUTTON_ID_2X));\n if (shutter != null) {\n shutter.click();\n }\n }\n }",
"private void exitAction() {\n\t}",
"public void closeDown() {\n\t\tdispose();\n\n\t}",
"@Override\n\tpublic void onExit() {\n\t\tlabelHelp = null;\n\t\tlayer_force = null;\n\t\tmSoundBtn = null;\n\t\tboxMessage = null;\n\n\t\tSystem.gc();\n\t\tsuper.onExit();\n\t}",
"public static void endGame(Console menu, int cash,boolean quit) throws InterruptedException{\r\n\t\t//set up the end of the game\r\n\t\tmenu.clear();\r\n\t\tmenu.setTextBackgroundColor(Color.getHSBColor(hsbColours[0], hsbColours[1], hsbColours[2]));\r\n\t\tmenu.setTextColor(Color.YELLOW);\r\n\t\tmenu.setCursor(1,1);\r\n\t\tmenu.println(\"Game Over\");\r\n\t\t//depending on the cash amount they were on, output their winnings\r\n\t\tif (cash<=1000)\r\n\t\t{\r\n\t\t\tmenu.println(\"Sorry, you win nothing :(\");\r\n\t\t}\r\n\t\telse if (cash>1000&&cash<=32000)\r\n\t\t{\r\n\t\t\tmenu.println(\"You won $1000.\");\r\n\t\t}\r\n\t\telse if (cash>32000&&cash<=1000000)\r\n\t\t{\r\n\t\t\tmenu.println(\"You won $32000\");\r\n\t\t}\r\n\t\telse if (quit=true)\r\n\t\t{\r\n\t\t\tmenu.println(\"You win $\"+cash);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tmenu.println(\"Congratulations! You are a millionare!\");\r\n\t\t}\r\n\t\t\r\n\t\tThread.sleep(1000);\r\n\t\tmenu.close();\r\n\t\t\r\n\t}",
"public void exitProgram() {\n System.out.println(\"Closing Ranking....\");\n ScannerInputs.closeScanner();\n System.exit(0);\n }",
"public static void end() {\n\t\tif(firstTime)\r\n\t\t\tfirstTime=false;\r\n\t\tif (over) {\r\n\t\t\treset();\r\n\t\t\tover = false;\r\n\t\t}\r\n\t\tGUI.panel.changeGame();\r\n\t}",
"public void run() {\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}",
"public void menu()\n {\n CMenu cMenu = new CMenu();\n window.dispose();\n }",
"public void helpMenu()\n {\n System.out.println(\"*********************************************Help Menue**************************************************************\");\n System.out.println(\"Each player starts the game with zero points.\");\n System.out.println(\"Each player is given the following set of five tiles. Each tile has a value and an associated score\");\n System.out.println(\"For each round, each player will play ONE tile, with the tile value adding to the game total for that round.\"); \n System.out.println(\"Provided the game total is less than or equal to 21, the player will get the score for using that tile.\");\n System.out.println(\"If the game total is greater than 21\");\n System.out.println(\"no score is allocated to the player who played the last tile causing the score to become greater than 21.\");\n System.out.println(\"Once the round ends, Each player will get their score based on the total of the tiles they have used during the round.\");\n System.out.println(\"Any player who has NOT used the tile with the value of 5, will get a penalty of -3 points.\");\n System.out.println(\"The player who, after all deductions, has the highest score, will be the winner of that round and will get 5 points.\"); \n System.out.println(\"At the end of all the rounds, the player who has won the most rounds is declared the winner of the game.\");\n System.out.println(\"**********************************************************************************************************************\");\n getUserStringInput(\"Please enter continue\");\n }",
"public void closeClick() {\n timeline.stop();\n threadWorker.shutDownExecutor();\n Platform.exit();\n }",
"public void goBackToMainMenu() {\n new MainMenu();\n dispose();\n }",
"public void handle(long time){\n main_pane = root;\n baseLevel.draw(gc);\n dynamicLevel.draw(gc);\n if(colDetector.checkCompletion(dynamicLevel, goalTiles)){\n stop();\n gc.clearRect(0,0,448,706);\n Menu m = new Menu(gc,root, gameScene);\n m.drawMenu();\n }\n }",
"public void close(){\n \tisClosed = true;\n \tClawAct.set(true);\n\t\tRobot.oi.armRumble(RUMBLE_DURATION);\n }",
"public void menu(){\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"<=======|\" + name + \"|=======>\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tSystem.out.println(\"1 -> Jouer\");\n\t\tSystem.out.println(\"2 -> Creer votre personnage\");\n\t\tSystem.out.println(\"3 -> Charger\");\n\t\tSystem.out.println(\"4 -> Best Score\");\n\t\tSystem.out.println(\"5 -> Instruction\");\n\t\tSystem.out.println(\"6 -> Quitter\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tint choice = in.nextInt();\n\n\t\t\tswitch (choice){\n\t\t\t\tcase 1:\n\t\t\t\t\tstartPlay();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreateChar();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tchargeGame();\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.print(\" NOM -\");\n\t\t\t\t\tSystem.out.print(\" GENRE -\");\n\t\t\t\t\tSystem.out.print(\" SANTEE -\");\n\t\t\t\t\tSystem.out.print(\" FORCE -\");\n\t\t\t\t\tSystem.out.print(\" ARMES -\");\n\t\t\t\t\tSystem.out.println(\" ARGENT -\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tbdd.dbQuery(\"SELECT * FROM score ORDER BY health DESC\");\n\t\t\t\t\tmenu();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\trules();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\texit();\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Choix non valide\");\n\t\t\t\t\tmenu();\n\t\t\t}\n\t}",
"public void exit() {\n\tif (hasPlayed) {\n\t hasPlayed = false;\n\t lastExit = System.currentTimeMillis(); // note the time of exit\n\t}\n }",
"public void backToMainMenu()\n {\n primaryStage.close();\n }",
"private void exitApp()\n {\n if(spider.isCrawling())\n {\n stopCrawler();\n showTransition(1000);\n Timer task = new Timer(1000, (ActionEvent e)->\n {\n System.exit(0);\n });\n\n task.setRepeats(false);\n task.start();\n }\n \n else System.exit(0);\n }",
"private void doClose() {\n\t if (parent==null)\n\t System.exit(0);\n\t else {\n setVisible(false);\n dispose();\n }\n\t}",
"private void exitGame() {\n System.exit(0);\n }",
"private static void returnMenu() {\n\t\t\r\n\t}",
"public void exit()\r\n\t{\r\n\t\tmainFrame.exit();\r\n\t}",
"static void mainmenu() {\n\t\t\n\t\tSystem.out.println(\"Welcome. This is a rogue-like text-based RPG game.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"You control your character by entering your desired action when prompted.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"Do you want to start your journey?\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" y: yes \t\tn: no\t\t\");\n\t\tresponse = Engine.request();\n\t\tif(response == false) {\n\t\t\tSystem.out.println(\"W-What are you doing here then? If you're not here to play the game then what do you even want to do?\");\n\t\t\tSystem.out.println(\"To start, write \\\"Y\\\" or \\\"y\\\" in the console \");\n\t\t\tSystem.out.println(\"I won't ask again. Do you want to start your journey?\");\n\t\t\tresponse = Engine.request();\n\t\t\tif(response == false) {\n\t\t\t\tSystem.out.println(\"I am not here to judge your decision. Farewell.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Glad you came to your senses.\");\t\t\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Very well.\");\n\t\t}\n\t\tSystem.out.println();\t\t\n\t\tif(Engine.devmode == true) System.out.println(\"\tDebug: StartMenu passed\");\n\t\t\n\t\t\t// Cadet dungeon check\n\t\tif(Progresslog.cadetplaytime < 3) {\n\t\t\tSystem.out.println(\"You seem to be new at the game. Would you like to play through a more tailored experience,\\n\"\n\t\t\t\t\t+ \"which is designed for inexperienced players and introduces you to the game's mechanics?\");\n\t\t\tif(Engine.devmode == true) System.out.println(\"Cadet playtime: \" + Progresslog.cadetplaytime);\n\t\t\tresponse = Engine.request();\n\t\t\tif(response == true) {\n\t\t\t\tSystem.out.println(\"Alright then.\");\n\t\t\t\tDungeoncadet();\n\t\t\t} else DungeonGen();\t\t\t\n\t\t} else DungeonGen();\t\t\n\t}",
"public void quit() {\r\n\t\tSystem.out.println(\"Quitting Game\");\r\n\t\tMain.setModel(new Model());\r\n\t\tMain.changeScene(Main.getMainMenu());\r\n\t}",
"private void endGame() {\n\t\tPlatform.runLater(() -> {\n\t\t\t// sets up gameOverDialog\n\t\t\tAlert gameOverDialog = new Alert(AlertType.CONFIRMATION);\n\t\t\tgameOverDialog.setTitle(\"Game Over\");\n\n\t\t\tgameOverDialog.setHeaderText(\"Score: \" + score + \"\\n\"\n\t\t\t\t\t+ \"Mastery : \" + (int)MASTER_SCORES[difficulty] + \" points\\n\"\n\t\t\t\t\t+ \"Try Again?\");\n\n\t\t\tOptional<ButtonType> result = gameOverDialog.showAndWait();\n\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\t\t// updates the file with current date, score, and difficulty\n\t\t\ttry {\n\t\t\t\tsc.getCurrentUser().updateFile(GAME_CODE, dateFormat.format(new Date()), score, difficulty);\n\t\t\t}\n\t\t\t// catches IOException and informs the user\n\t\t\tcatch (IOException ex) {\n\t\t\t\tAlert errorDialog = new Alert(AlertType.ERROR);\n\t\t\t\terrorDialog.setTitle(\"Error\");\n\t\t\t\terrorDialog.setHeaderText(\"Error\");\n\t\t\t\terrorDialog.setContentText(\"File could not be saved\");\n\t\t\t\terrorDialog.showAndWait();\n\t\t\t}\n\n\t\t\t// resets if OK button is selected\n\t\t\tif (result.get() == ButtonType.OK) {\n\t\t\t\treset();\n\t\t\t}\n\n\t\t\t// quits in CANCEL button is selected\n\t\t\tif(result.get() == ButtonType.CANCEL) {\n\t\t\t\tquitBtn.fire();\n\t\t\t}\n\t\t});\n\t}",
"public void finishMainGame(MainWindow mainWindow) {\n mainWindow.closeWindow();\n \n if (crewState.getShipPartsFoundCount() >= getShipPartsNeededCount()) {\n addScore(crewState.getLivingCrewCount() * 500);\n addScore((maxDays - daysPassed) * 1000);\n \n displayWinScreen();\n } else {\n displayLoseScreen();\n }\n }",
"public void quit(){\n\t\tSystem.out.println(\"Quitting game\");\n\t\tSystem.exit(0);\n\t}",
"public void endGame(){\n updateHighscore();\n reset();\n }",
"public void handleQuit() {\n closeFile();\n savePrefs();\n System.exit(0);\n }",
"public void close() {\n System.exit(0);\n }",
"public void exitGame() {\n System.out.println(\"Thank you and good bye!\");\n System.exit(0);\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 }",
"private void fileExit() {\n try {\n ConnectWindow.tidyClose();\n }\n catch (Exception e) {\n displayError(e,this);\n }\n }",
"public void close() {\n\t\tSystem.out.println(\"Scraper terminated\");\n\t}",
"private void closeProgram() {\n\t\tSystem.out.println(\"Cancel Button clicked\");\n\t\tif (ConfirmBox.display( \"Exit\", \"Are you sure you want to exit?\")) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void generateOutputAndClose() {\n\n try{\n Thread.sleep(1000);\n }catch(Exception e){\n\n }\n\n RecursionStore.finishGuiProcessing();\n\n DependencyGraph dg = DependencyGraph.getGraph();\n String outputName = _argumentsParser.getOutputFileName();\n\n try {\n dg.generateOutput(RecursionStore.getBestState(), outputName);\n System.out.println(\"Finished\");\n if(!_argumentsParser.displayVisuals()){\n System.exit(0);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void finishALl() {\n\t\tSystem.exit(-1);\r\n\t}",
"public void exitRoutine() {\n\t\tboardController.saveSampleData();\n\t}",
"private static void menu()\r\n\t{\r\n\t\tSystem.out.println(\"0. ** FOR INSTRUCTOR **\");\r\n\t\tSystem.out.println(\" Seed 5 URLs, set 3 keywords, creates 1000 Producers and 10 Consumers\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"1. Add seed url\");\r\n\t\tSystem.out.println(\"2. Add consumer (Parser)\");\r\n\t\tSystem.out.println(\"3. Add producer (Fetcher)\");\r\n\t\tSystem.out.println(\"4. Add keyword search\");\r\n\t\tSystem.out.println(\"5. Print stats\");\r\n\t}",
"void close_actionPerformed(ActionEvent e){\n\t System.exit(0);\n\t }",
"public void exit() {\n System.out.println(\"Thank you for playing Nim\");\n }",
"private void close(){\r\n boolean saveRequired = false;\r\n String messageKey = null;\r\n updateComments();\r\n if(getFunctionType() != TypeConstants.DISPLAY_MODE && isSaveRequired()) {\r\n saveRequired = true;\r\n if(xmlGenerationRequired()){\r\n messageKey = XML_OUT_OF_SYNC;\r\n }else{\r\n messageKey = WANT_TO_SAVE_CHANGES;\r\n }\r\n }else if(getFunctionType() != TypeConstants.DISPLAY_MODE && xmlGenerationRequired()) {\r\n saveRequired = true;\r\n messageKey = XML_OUT_OF_SYNC;\r\n }\r\n \r\n if(saveRequired) {\r\n int selection = CoeusOptionPane.showQuestionDialog(coeusMessageResources.parseMessageKey(messageKey), CoeusOptionPane.OPTION_YES_NO_CANCEL, CoeusOptionPane.DEFAULT_YES);\r\n if(selection == CoeusOptionPane.SELECTION_YES){\r\n save(true);\r\n }else if(selection == CoeusOptionPane.SELECTION_NO) {\r\n subAwardDlgWindow.dispose();\r\n }\r\n }else{\r\n subAwardDlgWindow.dispose();\r\n }\r\n }",
"private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}",
"protected void quit() {\n if (display != null) {\n display.close();\n }\n System.exit(0);\n }",
"private void quitGame() {\n this.primaryStage.close();\n }",
"private static void exit(){\n\t\t\n\t\tMain.run=false;\n\t\t\n\t}",
"public void exitOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Exit and Save Changes |\");\n System.out.println(\"\\t\\t| [2] Exit Without Save Any Changes |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=========================================\");\n System.out.print(\"\\t\\t Input the option number : \");\n }",
"public void onGuiClosed()\n {\n Keyboard.enableRepeatEvents(false);\n mc.ingameGUI.func_50014_d();\n }",
"@Override\r\n\tpublic void onGuiClosed() {\r\n\t\tsuper.onGuiClosed();\r\n\t\t\r\n\t\t// Save any changes made while this menu was open\r\n\t\tUltraTeleportWaypoint.save();\r\n\t}",
"private void exit() {\n if (otherCost != null) {\n otherCost = null;\n }\n this.dispose();\n }",
"@Override\n public void backToMainMenu() {\n try {\n Thread.sleep((long)480000);\n }\n catch (InterruptedException var1_1) {\n var1_1.printStackTrace();\n }\n if (this.activityActive && !this.getClass().equals((Object)SampleActivity.class)) {\n AudioDemo.Sound().playSound(\"a9\");\n try {\n Thread.sleep((long)10000);\n }\n catch (InterruptedException var2_2) {\n var2_2.printStackTrace();\n }\n this.finishInputMoney(false);\n }\n }",
"@Override\n\tpublic void close() {\n\t\tframe = null;\n\t\tclassic = null;\n\t\trace = null;\n\t\tbuild = null;\n\t\tbt_classic = null;\n\t\tbt_race = null;\n\t\tbt_build = null;\n\t\tGameView.VIEW.removeDialog();\n\t}",
"public void exit(ActionEvent actionEvent) {\r\n //Closes hibernate and then the program.\r\n controller.exit();\r\n System.exit(0);\r\n }",
"public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private void exit() {\n\n // Farewell message\n pOutput.println(\"Good Bye!\");\n pOutput.close();\n\n try {\n pClient.close();\n\n } catch (final IOException ex) {\n pShellService.error(\"Shell::exit()\", ex);\n }\n\n // Clean up\n pShellService = null;\n }",
"@FXML\n private void handleExit() {\n GuiSettings guiSettings = new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),\n (int) primaryStage.getX(), (int) primaryStage.getY());\n logic.setGuiSettings(guiSettings);\n logic.displayAllTasks();\n resultDisplay.setFeedbackToUser(\"\");\n primaryStage.hide();\n }",
"public GUI() {\n super(\"Chip's Challenge\");\n\n // Game menu: New Game, Save Game, Load Game, Exit.\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n mb = new JMenuBar();\n menuGame = new JMenu(\"Game\");\n i2 = new JMenuItem(\"New Game\");\n i2.setToolTipText(\"Start a new game\");\n i2.addActionListener(new MenuActionListener2());\n i7 = new JMenuItem(\"Save Game\");\n i7.setToolTipText(\"Save current game\");\n i7.addActionListener(new MenuActionListener3());\n i8 = new JMenuItem(\"Load Game\");\n i8.setToolTipText(\"Load an existing game\");\n i8.addActionListener(new MenuActionListener4());\n i4 = new JMenuItem(\"Exit\"); // Stop running the program\n i4.setToolTipText(\"Exit current programming process\");\n i4.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n System.exit(0);\n }\n });\n menuGame.add(i2);\n menuGame.add(i7);\n menuGame.add(i8);\n menuGame.add(i4);\n\n // Option menu: Pause, Mute Music, Unmute Music, End Current Game.\n menuOptions = new JMenu(\"Options\");\n i10 = new JMenuItem(\"Pause\");\n i10.setToolTipText(\"Pause current game\");\n i10.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n if (gameStarted == true) {\n pauseAndContinue();\n }\n }\n });\n i3 = new JMenuItem(\"End Current Game\");\n i3.setToolTipText(\"End current game\");\n i3.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n if(gameStarted == false){ return; }\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n int saveOrNot = JOptionPane.showConfirmDialog(null, \"Save current game?\", \"Confirm\", JOptionPane.YES_NO_CANCEL_OPTION);\n if(saveOrNot == 2){ // cancel\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n }else if (saveOrNot == 0) { // yes\n // save current game\n SaveCurrentGame();\n } else { // no\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n }\n }\n });\n i9 = new JMenuItem(\"Mute Game Music\");\n i9.setToolTipText(\"Mute Game Music\");\n i9.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n muteMusic = true; // don't play music\n music.stopPlayingAudio(\"All\");\n }\n });\n i11 = new JMenuItem(\"Unmute Game Music\");\n i11.setToolTipText(\"Unmute Game Music\");\n i11.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n muteMusic = false; // start to play music\n music.playAudio(musicName);\n }\n });\n menuOptions.add(i10);\n menuOptions.add(i9);\n menuOptions.add(i11);\n menuOptions.add(i3);\n\n // Level menu: Level 1, and Level 2. Start the corresponding level when clicking one of the two JMenuItems.\n menuLevel = new JMenu(\"Level\");\n i5 = new JMenuItem(\"Level 1\");\n i5.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n // board at level 1\n try {\n startGameByLevel(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n });\n i6 = new JMenuItem(\"Level 2\");\n i6.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n // board at level 2\n try {\n startGameByLevel(2);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n });\n menuLevel.add(i5);\n menuLevel.add(i6);\n\n // Help menu: Instruction of the game.\n menuHelp = new JMenu(\"Help\");\n i1 = new JMenuItem(\"Instruction\"); // instruction\n i1.setToolTipText(\"Basic instructions for the game\");\n i1.addActionListener(new MenuActionListener1());\n menuHelp.add(i1);\n mb.add(menuGame);\n mb.add(menuOptions);\n mb.add(menuLevel);\n mb.add(menuHelp);\n setJMenuBar(mb);\n\n // Board canvas on the left.\n boardCanvas = new BoardCanvas();\n\n // Add mouse listener to the board canvas.\n boardCanvas.addMouseListener(new MouseListener() {\n @Override\n public void mouseClicked(MouseEvent e) {\n if(gameStarted == false){return; }\n int x = e.getX();\n int y = e.getY();\n int col = x / (boardCanvas.getWidth() / 9) + renderer.getCurrentAbsoluteTopColumn();\n int row = y / (boardCanvas.getHeight() / 9) + renderer.getCurrentAbsoluteLeftRow();\n boolean moved = board.moveByMouse(row, col);\n if(moved){\n checkMovedRedraw();\n }\n }\n\n @Override\n public void mousePressed(MouseEvent mouseEvent) { }\n\n @Override\n public void mouseReleased(MouseEvent mouseEvent) { }\n\n @Override\n public void mouseEntered(MouseEvent mouseEvent) { }\n\n @Override\n public void mouseExited(MouseEvent mouseEvent) { }\n });\n\n // Add key listener to the board canvas.\n boardCanvas.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) { }\n\n @Override\n public void keyPressed(KeyEvent e) {\n try {\n KeyListenerAdded(e);\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n }\n\n @Override\n public void keyReleased(KeyEvent keyEvent) { }\n });\n\n // Left panel to contain the board canvas.\n leftInnerPanel = new JPanel();\n leftInnerPanel.setLayout(new BorderLayout());\n Border cb = BorderFactory.createCompoundBorder(BorderFactory\n .createEmptyBorder(100, 100, 100, 100), BorderFactory\n .createLineBorder(Color.white));\n leftInnerPanel.setBorder(cb);\n leftInnerPanel.add(boardCanvas, BorderLayout.CENTER);\n\n // Right panel for the information-display window.\n rightInnerPanel = new JPanel(); //new GridLayout(0, 1, 50, 380)\n rightInnerPanel.setLayout(new BorderLayout());\n cb = BorderFactory.createCompoundBorder(BorderFactory\n .createEmptyBorder(100, 100, 100, 100), BorderFactory\n .createLineBorder(Color.white));\n rightInnerPanel.setBorder(cb);\n // Side bar to show information of the game.\n infoCanvas = new InfoCanvas();\n // Add key listener to the SideBar.\n infoCanvas.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) { }\n\n @Override\n public void keyPressed(KeyEvent e) {\n try {\n KeyListenerAdded(e);\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n }\n\n @Override\n public void keyReleased(KeyEvent keyEvent) { }\n });\n rightInnerPanel.setLayout(new GridLayout(1, 2));\n rightInnerPanel.add(infoCanvas);\n\n // Add panels onto current frame.\n add(leftInnerPanel, BorderLayout.CENTER);\n add(rightInnerPanel, BorderLayout.EAST);\n\n\n // Add key listener to the current frame.\n this.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) { }\n\n @Override\n public void keyPressed(KeyEvent e) {\n try {\n KeyListenerAdded(e);\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n }\n\n @Override\n public void keyReleased(KeyEvent keyEvent) { }\n });\n\n setFocusable(true);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n pack();\n setVisible(true);\n setResizable(false);\n boardCanvas.drawAnimationAtStart();\n }",
"@Override\n\tpublic void Quit() {\n\t\t\n\t}",
"private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n }",
"private void returnScreen(){\r\n dispose();\r\n playScreen.combatExit();\r\n }",
"private void endingAction() {\n this.detectChanges();\n if (this.isModifed) {\n //System.out.println(JOptionPane.showConfirmDialog(null, \"Do you want to save unsaved changes?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION));\n switch (JOptionPane.showConfirmDialog(null, \"Do you want to save current data?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION)) {\n case 0: {\n if (this.file != null) {\n INSTANCE.saveData();\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n case 1: {\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n //cancel op 2\n //no op 1\n //yes op 0\n } else {\n INSTANCE.dispose();\n System.exit(0);\n }\n }",
"public void quitGame() {\n\t\t\tdisplay(\"Goodbye!\");\n\t\t\tSystem.exit(0);\n\t\t}",
"public static void mainMenu() {\n\t\tStdDraw.setCanvasSize(600, 600);\n\t\tStdDraw.setScale(0, 1000);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tFont font = new Font(\"Sans Serif\", 20, 20);\n\t\tStdDraw.setFont(font);\n\t\tStdDraw.text(500, 850, \"Six Men Morris Game\");\n\t\tStdDraw.text(500, 750, \"Game Created By: \");\n\t\tStdDraw.text(500, 700, \"Phillip Pavlich, Prakhar Jalan, Dinesh Balakrishnan\");\n\t\tStdDraw.filledRectangle(500, 500, 205, 75);\n\t\tStdDraw.filledRectangle(500, 300, 205, 75);\n\t\tStdDraw.filledRectangle(500, 100, 205, 75);\n\t\t\n\t\tStdDraw.setFont();\n\t\tStdDraw.setPenColor(StdDraw.ORANGE);\n\t\tStdDraw.setPenRadius(0.05);\n\n\t\tStdDraw.filledRectangle(500, 500, 200, 70);\n\t\tStdDraw.filledRectangle(500, 300, 200, 70);\n\t\tStdDraw.filledRectangle(500, 100, 200, 70);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(500, 500, \"Start New Game\");\n\t\tStdDraw.text(500, 300, \"Continue Game\");\n\t\tStdDraw.text(500, 100, \"Load Saved Game\");\n\t}",
"void endcredits() {\n }",
"private void ending() {\n\t\tstartView.ending();\n\t\tSystem.exit(-1);\n\t}",
"private static void quitProgram(Scanner input) {\n System.out.println(\"Thank you, ending session.\");\n input.close();\n System.exit(0);\n }",
"private void closeProgram()\n {\n window.close();\n }",
"@Override\n public void onClose() {\n isMenuShowing = false;\n if (0 == vp.getCurrentItem()) {\n menu.callOnPauseForUpdate();\n }\n hideKeyboard(mySlidingMenu);\n Recommend r = (Recommend) list.get(0);\n r.showUser();\n }",
"public void finishedWindow() {\n\t\tgameManager.closePiratesEventScreen(this, route);\n\t}",
"private void exitHandler() {\n JOptionPane.showMessageDialog(this.getParent(), \"Thanks for leaving\"\n + \", quitter! >:(\");\n Component possibleFrame = this;\n while (possibleFrame != null && !(possibleFrame instanceof JFrame)) {\n possibleFrame = possibleFrame.getParent();\n }\n JFrame frame = (JFrame) possibleFrame;\n frame.setVisible(false);\n frame.dispose();\n }",
"private void ChatLeave() {\n\t\t\r\n\t\tClose();\r\n\t}",
"public void close(){\n this.println(\"Library has been closed! See you tomorrow morning!!\");\n this.openOrNot = false;\n this.searchOrNot = false;\n this.serveOrNot = false;\n }",
"@Override\n public void programClosed() {\n super.programClosed();\n }",
"@Override\n\tpublic void goToMainMenu() {\n\t\tfinish();\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\r\n\tpublic void exit() {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n HighScoresTable highScoresTable = null;\n // trying to read the high score file\n try {\n highScoresTable = HighScoresTable.loadFromFile((new File(\"highScores.txt\")));\n } catch (IOException e) {\n e.printStackTrace();\n } // if the table is empty\n if (highScoresTable.getHighScores().isEmpty()) {\n highScoresTable = new HighScoresTable(5);\n }\n final HighScoresTable scoresTable = highScoresTable;\n GUI gui = new GUI(\"arknoid\", 800, 600);\n // creating a runner\n final AnimationRunner runner = new AnimationRunner(gui);\n final KeyboardSensor keyborad = runner.getGui().getKeyboardSensor();\n // creating a menu\n Menu<Task<Void>> mainMenu = new MenuAnimation<Task<Void>>(\"chicken invaders\", keyborad);\n mainMenu.addSelection(\"s\", \"Start game\", new Task<Void>() {\n // run the levels\n public Void run() {\n // creating a level information object to run over finally\n LevelInformation spaceInvader = new SpaceInvadersLevel();\n GameFlow flow = new GameFlow(800, 600, scoresTable, gui, keyborad);\n flow.runLevels(spaceInvader);\n return null;\n }\n }); // the option for watching the high score table\n mainMenu.addSelection(\"h\", \"High Scores\", new Task<Void>() {\n // show the highScoreAnimation with the scores table\n public Void run() {\n runner.run(new KeyPressStoppableAnimation(keyborad, KeyboardSensor.SPACE_KEY,\n new HighScoresAnimation(scoresTable)));\n return null;\n }\n }); // the option of quiting\n mainMenu.addSelection(\"q\", \"Exit\", new Task<Void>() {\n // q to quit game\n public Void run() {\n System.exit(0);\n return null;\n }\n });\n while (true) {\n // run the main menu\n runner.run(mainMenu);\n Task<Void> task = mainMenu.getStatus();\n // as long the task is not null - run it.\n if (task != null) {\n task.run();\n mainMenu.setStop(false);\n }\n }\n\n }",
"@Override\n protected void end() {\n DemoUtils.fadeOutAndExit(getMainFrame(), 800);\n }",
"public void endGame() {\r\n if (state[0]) {\r\n if (state[1]) {\r\n frame.remove(pause);\r\n state[1] = false;\r\n }\r\n records.newRecord(game.map, game.end());\r\n frame.remove(game);\r\n records.saveRecords();\r\n state[0] = false;\r\n menu.setVisible(true);\r\n }\r\n }",
"private void menu_ExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu_ExitActionPerformed\n System.exit(0);\n }",
"private void runMenu() {\n\n Runnable commandLineTask = () -> {\n\n // YOUR MENU CODE GOES HERE\n String selection;\n String filename = \"footage.txt\";\n\n do{\n printMenu();\n selection = scanner.nextLine();\n selection = selection.toUpperCase();\n switch(selection){\n case \"L\":\n //Load footage file\n System.out.println(\"Which file do you want to load from?\");\n filename = scanner.nextLine();\n try{\n footage.load(filename);\n }\n catch(IOException e){\n System.out.println(\"Loading file footage failed, no file called\" + filename);\n }\n break;\n case \"S\":\n //Save footage file\n try{\n footage.save(filename);\n }\n catch(IOException e){\n //It shouldn't actually get to this point as it will just create the file.\n System.out.println(\"Saving file footage failed, no file called\" + filename);\n }\n break;\n case \"SA\":\n //Save as footage file\n System.out.println(\"What to call new file? (Don't forget the .txt)\");\n filename = scanner.nextLine();\n try{\n footage.save(filename);\n }\n catch(IOException e){\n //It shouldn't actually get to this point as it will just create the file.\n System.out.println(\"Saving file footage failed, no file called\" + filename);\n }\n break;\n case \"A\":\n //Run footage animation\n try{\n createGrid(); //What I have found is that if I input an int to change the size of the grid it fails to run.\n runAnimation();\n }catch(IndexOutOfBoundsException e){\n System.out.println(\"Try loading something first!\");\n }\n break;\n case \"T\":\n //Stop footage animation\n terminateAnimation();\n break;\n case \"E\":\n //Edit current footage\n //Run using a method submenu\n editMenu();\n break;\n }\n }while(!selection.equals(\"Q\"));\n System.out.println(\"Do you want to save before you exit (y/n)\");\n selection = scanner.nextLine();\n if(selection == \"y\"){\n try {\n footage.save(filename);\n }catch(IOException e){}\n }\n Platform.exit();\n //Cause the application to finish here, after the menu's execution.\n exit(0);\n // At some point you will call createGrid.\n // Here's an example\n //createGrid();\n\n };\n Thread commandLineThread = new Thread(commandLineTask);\n // This is how we start the thread.\n // This causes the run method to execute.\n commandLineThread.start();\n\n // You can stop javafx with the command\n // Platform.exit();\n }",
"@Action\n public void Close() {\n // just close the Frame\n // This will cause setVisible() in the constructor to return\n setVisible(false);\n \n // show reminder to reference my paper\n String str = \"If you like this program, please cite:\\n\"\n + \"K. P. Pernstich\\n\"\n + \"Instrument Control (iC) – An Open-Source Software to Automate Test Equipment\\n\"\n + \"Journal of Research of the National Institute of Standards and Technology\\n\"\n + \"Volume 117 (2012) http://dx.doi.org/10.6028/jres.117.010\";\n \n JOptionPane.showMessageDialog(null, str,\n \"Humble request\", JOptionPane.INFORMATION_MESSAGE, m_iC_Properties.getLogoSmall());\n }"
] | [
"0.7513997",
"0.7030659",
"0.6842224",
"0.6764041",
"0.6704599",
"0.6679449",
"0.6674703",
"0.6673418",
"0.65675443",
"0.6565517",
"0.653358",
"0.64343894",
"0.64278626",
"0.64267683",
"0.6421825",
"0.63855606",
"0.63154167",
"0.6309757",
"0.6291154",
"0.62738955",
"0.62663126",
"0.62649226",
"0.62573737",
"0.62501127",
"0.62460726",
"0.6207935",
"0.61966574",
"0.61956125",
"0.6179891",
"0.61759996",
"0.6173366",
"0.61536",
"0.61484635",
"0.61398244",
"0.6114707",
"0.60919136",
"0.609143",
"0.60897",
"0.60608995",
"0.6051892",
"0.6049589",
"0.6040466",
"0.60402745",
"0.60396993",
"0.6033316",
"0.6032099",
"0.6018921",
"0.600686",
"0.6005631",
"0.60020745",
"0.59806705",
"0.5975075",
"0.59663194",
"0.5957239",
"0.5955284",
"0.59431",
"0.5938653",
"0.5927119",
"0.59211034",
"0.5918326",
"0.5917756",
"0.5908335",
"0.59056705",
"0.590466",
"0.5895761",
"0.5895597",
"0.5894753",
"0.5887594",
"0.5883172",
"0.58823895",
"0.58767533",
"0.5873034",
"0.5872534",
"0.5868069",
"0.5866514",
"0.5865053",
"0.5865024",
"0.58636653",
"0.58591795",
"0.5858888",
"0.5851328",
"0.58461934",
"0.58394074",
"0.58365434",
"0.5829092",
"0.5828887",
"0.58284336",
"0.58265173",
"0.5824912",
"0.58216244",
"0.5820326",
"0.58172876",
"0.5815744",
"0.58108646",
"0.58102113",
"0.5804812",
"0.5800435",
"0.57997274",
"0.5798859",
"0.5798281",
"0.5797302"
] | 0.0 | -1 |
This method will automatically be called when MazeTest is run | public static void main(String args[]) {
Maze newMaze = new Maze(2,0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void generateMaze() {\n if (this.stateOfTheMaze != 0)\n throw new IllegalArgumentException(\"To generate the maze the state of it must be \\\"untouched grid\\\".\");\n Stack<Box> stack = new Stack<>();\n Random random = new Random();\n int randomRow = random.nextInt(this.grid.length);\n int randomColumn = random.nextInt(this.grid[randomRow].length);\n Box startBox = this.grid[randomRow][randomColumn];\n startBox.use();\n stack.push(startBox);\n while (!stack.isEmpty()) {\n Box aux = stack.peek();\n if (allAdjacentUsed(aux))\n stack.pop();\n else\n stack.push(movement(aux));\n }\n this.stateOfTheMaze++;\n }",
"Maze makeMaze();",
"@Test\n public void test_05() {\n Maze maze = new Maze(tinyBoard, new Location(0, 0));\n maze.moveChip(Direction.NORTH);\n assertTrue(maze.getChipLocation().equals(new Location(0, 0)));\n }",
"@Before\n\tpublic void setUp() throws Exception {\n\t\tmaze = MazeFactory.createExampleMaze();\n\t}",
"@Test\n public void test_15() {\n Maze maze = new Maze(smallWalled, new Location(1, 1));\n maze.moveChip(Direction.SOUTH);\n assertTrue(maze.getChipLocation().equals(new Location(1, 1)));\n }",
"@Test\n public void test_09() {\n Maze maze = new Maze(smallBoard, new Location(0, 0));\n maze.moveChip(Direction.EAST);\n maze.moveChip(Direction.EAST);\n assertTrue(maze.getChipLocation().equals(new Location(2, 0)));\n }",
"@Test\n public void test_16() {\n Maze maze = new Maze(smallWalled, new Location(1, 1));\n maze.moveChip(Direction.WEST);\n assertTrue(maze.getChipLocation().equals(new Location(1, 1)));\n }",
"@Test\n public void test_01() {\n Maze maze = new Maze(tinyBoard, new Location(0,0));\n maze.moveChip(Direction.EAST);\n assertTrue(maze.getChipLocation().equals(new Location(1, 0)));\n }",
"private void createMaze(Tile currentTile) {\n\n while (numberOfCellsVisited < CAST_WIDTH * CAST_HEIGHT) {\n\n // Get coordinates of current tile and set as visited\n int currentX = currentTile.getPosition().getX();\n int currentY = currentTile.getPosition().getY();\n tempMap[currentY][currentX].setVisited(true);\n\n // Begin neighbourhood scan\n ArrayList<Integer> neighbours = new ArrayList<>();\n\n // If a neighbour is not visited and its projected position is within bounds, add it to the list of valid neighbours\n // North neighbour\n if (currentY - 1 >= 0) {\n if (!tempMap[currentY - 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(0);\n }\n //Southern neighbour\n if (currentY + 1 < CAST_HEIGHT) { //y index if increased is not greater than height of the chamber\n if (!tempMap[currentY + 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(1);\n }\n //Eastern neighbour\n if (currentX + 1 < CAST_WIDTH) { //check edge case\n if (!tempMap[currentY][currentX + 1].isVisited()) { //check if visited\n neighbours.add(2);\n }\n }\n //Western neighbour\n if (currentX - 1 >= 0) {\n if (!tempMap[currentY][currentX - 1].isVisited()) {\n neighbours.add(3);\n }\n }\n if (!neighbours.isEmpty()) {\n\n //generate random number between 0 and 3 for direction\n Random rand = new Random();\n boolean randomizer;\n int myDirection;\n do {\n myDirection = rand.nextInt(4);\n randomizer = neighbours.contains(myDirection);\n } while (!randomizer);\n\n //knock down wall\n switch (myDirection) {\n case 0 -> { // North\n tempMap[currentY][currentX].getPathDirection()[0] = true;\n currentTile = tempMap[currentY - 1][currentX];\n }\n case 1 -> { // South\n tempMap[currentY][currentX].getPathDirection()[1] = true;\n currentTile = tempMap[currentY + 1][currentX];\n }\n case 2 -> { // East\n tempMap[currentY][currentX].getPathDirection()[2] = true;\n currentTile = tempMap[currentY][currentX + 1];\n }\n case 3 -> { // West\n tempMap[currentY][currentX].getPathDirection()[3] = true;\n currentTile = tempMap[currentY][currentX - 1];\n }\n }\n\n mapStack.push(currentTile);\n numberOfCellsVisited++;\n } else {\n currentTile = mapStack.pop(); //backtrack\n }\n }\n\n castMaze(tempMap[0][0], -1);\n }",
"@Test\n public void test_14() {\n Maze maze = new Maze(smallWalled, new Location(1, 1));\n maze.moveChip(Direction.EAST);\n assertTrue(maze.getChipLocation().equals(new Location(1, 1)));\n }",
"@Test\n public void test_13() {\n Maze maze = new Maze(smallWalled, new Location(1, 1));\n maze.moveChip(Direction.NORTH);\n assertTrue(maze.getChipLocation().equals(new Location(1, 1)));\n }",
"public void maze_editor() {\n mazeEditor = new MazeEditor();\n not_testing();\n}",
"@Test\n public void testSetBeginNotInMap(){\n smallMaze.setBegin(Maze.position(26, 23));\n }",
"@Test\n public void testGivenMaze() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(\"<0, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 0>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<1, 1>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<1, 2>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<1, 3>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<1, 4>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<2, 4>\", shortestPath.get(6).getCoordinateString());\n assertEquals(\"<3, 4>\", shortestPath.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath.get(8).getCoordinateString());\n\n assertEquals(9, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }",
"public MazeBug() {\n\n\tsetColor(Color.BLACK);\n\tlast = new Location(0, 0);\n\n\tdirCounter.put(Location.NORTH, 0);\n\tdirCounter.put(Location.SOUTH, 0);\n\tdirCounter.put(Location.EAST, 0);\n\tdirCounter.put(Location.WEST, 0);\n\n }",
"@Before\n public void setUp() throws Exception\n {\n\n maze = TestMazes.testMazeOne();\n entrance = maze.getEntrance();\n }",
"public SampleMaze() {\r\n\t\twidth = 5;\r\n\t\theight = 5;\r\n\t\tgrid = new Grid(width,height);\r\n\t\tgridSheet = grid.getGrid();\r\n\t\t\r\n\t\tconstructMaze(); // construct the maze\r\n\t\t\r\n\t\t// construct the graph of the maze and get the complexity, traversal length, \r\n\t\t// intersections, and dead ends of the maze.\r\n\t\tgraph = new Graph(grid);\r\n\t\tmazeComplexity = graph.mazeComplexity();\r\n\t\ttravelLength = graph.traversalLength();\r\n\t\tdeadEndCount = graph.numberOfDeadEnds();\r\n\t\tiCount = graph.numberOfIntersections();\r\n\t}",
"public Maze(){}",
"private void constructMaze() {\r\n\t\t\r\n\t\t// manual code to construct a sample maze going cell by cell\r\n\t\tgridSheet[0][0].breakSouthWall();\r\n\t\tgridSheet[1][0].breakEastWall();\r\n\t\tgridSheet[1][1].breakSouthWall();\r\n\t\tgridSheet[2][1].breakWestWall();\r\n\t\tgridSheet[2][0].breakSouthWall();\r\n\t\tgridSheet[2][1].breakEastWall();\r\n\t\tgridSheet[2][2].breakSouthWall();\r\n\t\tgridSheet[3][2].breakSouthWall();\r\n\t\tgridSheet[4][2].breakWestWall();\r\n\t\tgridSheet[4][1].breakNorthWall();\r\n\t\tgridSheet[4][1].breakWestWall();\r\n\t\tgridSheet[2][2].breakEastWall();\r\n\t\tgridSheet[2][3].breakNorthWall();\r\n\t\tgridSheet[1][3].breakWestWall();\r\n\t\tgridSheet[1][3].breakNorthWall();\r\n\t\tgridSheet[0][3].breakWestWall();\r\n\t\tgridSheet[0][2].breakWestWall();\r\n\t\tgridSheet[0][3].breakEastWall();\r\n\t\tgridSheet[0][4].breakSouthWall();\r\n\t\tgridSheet[1][4].breakSouthWall();\r\n\t\tgridSheet[2][4].breakSouthWall();\r\n\t\tgridSheet[3][4].breakWestWall();\r\n\t\tgridSheet[3][4].breakSouthWall();\r\n\t\tgridSheet[4][4].breakWestWall();\r\n\t\t\r\n\t}",
"public MazeBug() {\r\n setColor(Color.GREEN);\r\n last = new Location(0, 0);\r\n crossLocation = new Stack<ArrayList<Location>>();\r\n crossLocation.push(new ArrayList<Location>());\r\n hasShown = false;\r\n isEnd = false;\r\n probablyDir = new int[] { 0, 0, 0, 0 };\r\n stepCount = 0;\r\n }",
"public void MakeMaze() {\n\n\t\t// ints for random x , y and direction\n\t\tint rx = 0;\n\t\tint ry = 0;\n\t\tint rd = 0;\n\t\tgenMaze = true;\n\n\t\t// c used to count tries, if there are too many the main loop jumps to\n\t\t// the end of the function\n\t\tint c = 0;\n\n\t\t// fill the map with walls\n\t\tfor (int ix = 0; ix < max_x; ix++) {\n\t\t\tfor (int iy = 0; iy < max_y; iy++) {\n\t\t\t\tmap[ix][iy] = 1;\n\t\t\t}\n\t\t}\n\n\t\t// fill the cell array with unvisited cells\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\tcell[ix][iy] = 0;\n\t\t\t}\n\t\t}\n\n\t\t// choose a \"random\" x,y pair. centre of screen used here instead\n\t\trx = maxCells_x / 2;\n\t\try = maxCells_y / 2;\n\n\t\t// mark cell visited\n\t\tcell[rx][ry] = 1;\n\n\t\t// count cells\n\t\tcountCells();\n\n\t\t// start main generator loop\n\t\twhile (visitedCells < totalCells) {\n\n\t\t\tc++;\n\n\t\t\tif (c > magicNumber) {\n\t\t\t\tgenMaze = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\trd = rand.nextInt(4);\n\n\t\t\t// dig tunnels\n\n\t\t\t// up\n\n\t\t\tif (genMaze) {\n\t\t\t\tif (rd == 0) { // up\n\t\t\t\t\tif (inRange(rx * CELL_RAD, ry * CELL_RAD - 1) == 1\n\t\t\t\t\t\t\t&& (cell[rx][ry - 1]) == 0 || rand.nextInt(7) == 7) {\n\t\t\t\t\t\tclink(rx * CELL_RAD, ry * CELL_RAD, rx * CELL_RAD,\n\t\t\t\t\t\t\t\t(ry - 1) * CELL_RAD);\n\t\t\t\t\t\try--;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\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}\n\t\t\t\t} else if (rd == 1) { // down\n\t\t\t\t\tif (inRange(rx + CELL_RAD, ry * CELL_RAD + 1) == 1\n\t\t\t\t\t\t\t&& (cell[rx][ry + 1] == 0 || rand.nextInt(7) == 7)) {\n\t\t\t\t\t\tclink(rx * CELL_RAD, (ry) * CELL_RAD, rx * CELL_RAD,\n\t\t\t\t\t\t\t\t(ry + 1) * CELL_RAD);\n\t\t\t\t\t\try++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\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}\n\t\t\t\t} else if (rd == 2) { // left\n\t\t\t\t\tif (inRange((rx * CELL_RAD) - 1, ry * CELL_RAD) == 1\n\t\t\t\t\t\t\t&& (cell[rx - 1][ry] == 0 || rand.nextInt(7) == 7)) {\n\t\t\t\t\t\tclink(rx * CELL_RAD, ry * CELL_RAD,\n\t\t\t\t\t\t\t\t(rx - 1) * CELL_RAD, ry * CELL_RAD);\n\t\t\t\t\t\trx--;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\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}\n\n\t\t\t\t} else if (rd == 3) { // right\n\t\t\t\t\tif (inRange(rx * CELL_RAD + 1, ry * CELL_RAD) == 1\n\t\t\t\t\t\t\t&& (cell[rx + 1][ry]) == 0 || rand.nextInt(7) == 7) {\n\t\t\t\t\t\tclink((rx) * CELL_RAD, ry * CELL_RAD, (rx + 1)\n\t\t\t\t\t\t\t\t* CELL_RAD, ry * CELL_RAD);\n\t\t\t\t\t\trx++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\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}\n\t\t\t\t}\n\n\t\t\t\t// mark the cell as visited\n\n\t\t\t\tcell[rx][ry] = 1;\n\n\t\t\t\t// place a \"floor\" tile on the map where the maze cell should be\n\t\t\t\tmap[rx * CELL_RAD][ry * CELL_RAD] = 0;\n\n\t\t\t\t// count the cells to establish how many have been visited\n\t\t\t\tcountCells();\n\t\t\t}\n\t\t}\n\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\tif (cell[ix][iy] == 1) {\n\t\t\t\t\tmap[ix * CELL_RAD][iy * CELL_RAD] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testGetAndSetEnd(){\n largeMaze.setBegin(Maze.position(4,4));\n assertEquals(4, largeMaze.getBegin().getX());\n assertEquals(4, largeMaze.getBegin().getY());\n }",
"@Test\n public void testExtraLargeRectangleMaze() {\n try {\n assertEquals(90, extraLargeRectMaze.size());\n\n //link pillars\n extraLargeRectMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n extraLargeRectMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n extraLargeRectMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n extraLargeRectMaze.linkPillars(Maze.position(2, 1), Maze.position(2, 2));\n extraLargeRectMaze.linkPillars(Maze.position(2, 2), Maze.position(3, 2));\n extraLargeRectMaze.linkPillars(Maze.position(3, 2), Maze.position(3, 3));\n extraLargeRectMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n extraLargeRectMaze.linkPillars(Maze.position(4, 3), Maze.position(4, 4));\n extraLargeRectMaze.linkPillars(Maze.position(4, 4), Maze.position(5, 4));\n extraLargeRectMaze.linkPillars(Maze.position(5, 4), Maze.position(5, 5));\n extraLargeRectMaze.linkPillars(Maze.position(5, 5), Maze.position(5, 6));\n extraLargeRectMaze.linkPillars(Maze.position(5, 6), Maze.position(6, 6));\n extraLargeRectMaze.linkPillars(Maze.position(6, 6), Maze.position(6, 7));\n extraLargeRectMaze.linkPillars(Maze.position(6, 7), Maze.position(7, 7));\n extraLargeRectMaze.linkPillars(Maze.position(7, 7), Maze.position(7, 8));\n extraLargeRectMaze.linkPillars(Maze.position(7, 8), Maze.position(7, 9));\n\n //set beginning and end\n extraLargeRectMaze.setBegin(Maze.position(0, 0));\n extraLargeRectMaze.setEnd(Maze.position(8, 9));\n shortestPath = MazeSolver.pStar(extraLargeRectMaze, 90);\n\n assertEquals(\"<0, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 0>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<1, 1>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<2, 1>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<2, 2>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<3, 2>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<3, 3>\", shortestPath.get(6).getCoordinateString());\n assertEquals(\"<4, 3>\", shortestPath.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath.get(8).getCoordinateString());\n assertEquals(\"<5, 4>\", shortestPath.get(9).getCoordinateString());\n assertEquals(\"<5, 5>\", shortestPath.get(10).getCoordinateString());\n assertEquals(\"<5, 6>\", shortestPath.get(11).getCoordinateString());\n assertEquals(\"<6, 6>\", shortestPath.get(12).getCoordinateString());\n assertEquals(\"<6, 7>\", shortestPath.get(13).getCoordinateString());\n assertEquals(\"<7, 7>\", shortestPath.get(14).getCoordinateString());\n assertEquals(\"<7, 8>\", shortestPath.get(15).getCoordinateString());\n assertEquals(\"<7, 9>\", shortestPath.get(16).getCoordinateString());\n assertEquals(\"<8, 9>\", shortestPath.get(17).getCoordinateString());\n\n assertEquals(18, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }",
"@Test\n public void testSolveBackwardMaze(){\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(3, 4));\n largeMaze.setEnd(Maze.position(1, 0));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(null, shortestPath);\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }",
"@Test\n public void testSmallSize(){\n assertEquals(9, smallMaze.size());\n }",
"public void testSetCell() {\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(9, 9);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(1, 0);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.WALL, maze1.getCell(test));\n test = new Location(0, 1);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.WALL, maze1.getCell(test));\n \n \n \n maze1.setCell(test, MazeCell.CURRENT_PATH);\n assertEquals(MazeCell.CURRENT_PATH, maze1.getCell(test));\n maze1.setCell(test, MazeCell.FAILED_PATH);\n assertEquals(MazeCell.FAILED_PATH, maze1.getCell(test));\n \n }",
"@Test(expected = Exception.class)\n public void testMazeWithoutBeginning() throws Exception {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n smallMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //set end\n smallMaze.setEnd(Maze.position(2, 2));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n }",
"@Test\n public void testSolveIrregularBeginAndEndMaze(){\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(1, 0));\n largeMaze.setEnd(Maze.position(3, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(\"<1, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 1>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<1, 2>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<1, 3>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<2, 3>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<2, 4>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<3, 4>\", shortestPath.get(6).getCoordinateString());\n\n assertEquals(7, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }",
"@Test\n public void test_21() {\n Maze maze = new Maze(smallDoor, new Location(1, 2));\n maze.moveChip(Direction.NORTH);\n assertTrue(maze.getChipLocation().equals(new Location(1, 2)));\n assertTrue(maze.getTile(new Location(1, 1)).getClass() == Door.class);\n }",
"@Test\n public void testSolveGivenMazeTwice() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n shortestPath2 = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(9, shortestPath.size());\n\n assertEquals(shortestPath.size(), shortestPath2.size());\n\n assertEquals(\"<0, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 0>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<1, 1>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<1, 2>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<1, 3>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<1, 4>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<2, 4>\", shortestPath.get(6).getCoordinateString());\n assertEquals(\"<3, 4>\", shortestPath.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath.get(8).getCoordinateString());\n\n assertEquals(\"<0, 0>\", shortestPath2.get(0).getCoordinateString());\n assertEquals(\"<0, 1>\", shortestPath2.get(1).getCoordinateString());\n assertEquals(\"<0, 2>\", shortestPath2.get(2).getCoordinateString());\n assertEquals(\"<0, 3>\", shortestPath2.get(3).getCoordinateString());\n assertEquals(\"<0, 4>\", shortestPath2.get(4).getCoordinateString());\n assertEquals(\"<1, 4>\", shortestPath2.get(5).getCoordinateString());\n assertEquals(\"<2, 4>\", shortestPath2.get(6).getCoordinateString());\n assertEquals(\"<3, 4>\", shortestPath2.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath2.get(8).getCoordinateString());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }",
"public void resetMaze() {\r\n\t\tgrid.resetGrid();\r\n\t\tgridSheet = grid.getGrid();\r\n\t\tconstructMaze();\r\n\t\tgraph.resetGraph(gridSheet);\r\n\t\tmazeComplexity = graph.mazeComplexity();\r\n\t\ttravelLength = graph.traversalLength();\r\n\t\tdeadEndCount = graph.numberOfDeadEnds();\r\n\t\tiCount = graph.numberOfIntersections();\r\n\t}",
"@Override\n public void generateMaze() {\n //Opens up the entrance to the maze\n MazeCell current=maze[0][0];\n current.openWall(Directions.North.getBValue());\n\n //A list of sets. The sets contain the cells which can be accessed from one another.\n List<List<MazeCell>> sets=new LinkedList<>();\n //All the walls in the maze\n List<InnerWall> wallList=new LinkedList<>();\n //Initially create a set for each cell\n //Also add the walls to the list\n for(int row=0;row< maze.length;row++){\n for(int column=0;column<maze[0].length;column++){\n sets.add(Arrays.asList(maze[row][column]));\n List<MazeCell> valid=returnValidNeighbours(maze[row][column].getX(), maze[row][column].getY());\n for(int i=0;i<valid.size();i++){\n wallList.add(new InnerWall(maze[row][column], valid.get(i)));\n }\n }\n }\n //Now we have as many wall sets as maze cells, each containing four walls.\n\n Random rnd=new Random();\n int idx;\n //Loops until only one set remains, meaning all cells can be reached from any cell\n while(sets.size()!=1){\n //Select a random wall\n idx=wallList.size()>1 ? rnd.nextInt(wallList.size()) : 0;\n InnerWall w= wallList.get(idx);\n //The two neighbouring cells\n MazeCell c1=w.parent;\n MazeCell c2=w.connected;\n\n //Their relative directions\n Directions d=Directions.getOffsetDirection(c1.getX(),c1.getY(),c2.getX(),c2.getY());\n\n //Check if the two cells are already connected\n if((c1.getOpenWalls() % d.getBValue())==d.getBValue())\n continue;\n\n //Two new sets\n List<MazeCell> set1=null;\n List<MazeCell> set2=null;\n //We get the sets\n boolean b1,b2;\n b1=b2=false;\n //We loop through the set of sets looking for the two which contains the two cells\n for(List<MazeCell> list : sets) {\n if(list.contains(c1)){\n set1=list;\n b1=true;\n }\n if(list.contains(c2)) {\n set2=list;\n b2=true;\n }\n if(b1 && b2)\n break;\n }\n //If the two sets are disjoint then we join them together\n if(set1!=null && set2!=null && !set1.equals(set2)){\n\n //We connect the two cells\n c1.openWall(d.getBValue());\n c2.openOppositeWall(d.getBValue());\n\n if(sleepDrawTime>0) {\n try {\n Thread.sleep(sleepDrawTime);\n mf.repaint();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n //Join the two sets\n List<MazeCell> temp= Stream.concat(set1.stream(), set2.stream())\n .collect(Collectors.toList());\n sets.remove(set2);\n sets.remove(set1);\n sets.add(temp);\n }\n //We remove the wall from the list\n wallList.remove(w);\n //As the walls are double-sided, two cells share a wall, we have to find the opposite cell's wall in the list\n InnerWall oppositeWall=wallList.stream().filter((x)->x.parent==w.connected).findFirst().orElse(null);\n wallList.remove(oppositeWall);\n\n\n }\n //We open an exit in the last row.\n maze[maze.length-1][rnd.nextInt(maze[0].length)].openWall(Directions.South.getBValue());\n\n }",
"void maze(char[][] mz, int p_row, int p_col, int h_row, int h_col){\n \n if (mz[p_row][p_col] == 'F'){\n //Base case -End maze\n printMaze(mz);\n System.out.println(\"Maze Successfully Completed!\");\n } else {\n if (h_row-1 == p_row){\n //If facing East\n if(mz[h_row][h_col] != '#'){ //If right turn available\n //Update player\n mz[p_row][p_col] = 'X'; \n p_row += 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 0;\n h_col -= 1;\n printMaze(mz); \n } else { \n //If hand position is a wall check in front of player\n if(mz[p_row][p_col+1] != '#'){\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 0;\n p_col += 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 0;\n h_col += 1;\n printMaze(mz);\n } else if (mz[p_row-1][p_col] != '#'){\n //Turn left 90 and if not a wall move up\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 2;\n h_col += 1;\n printMaze(mz);\n } else {\n //Turn around\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 0;\n p_col -= 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 2;\n h_col -= 1;\n printMaze(mz);\n }\n }\n } else if (h_row+1 == p_row){\n //If facing West\n if(mz[h_row][h_col] != '#'){\n //Look right\n mz[p_row][p_col] = 'X'; \n p_row -= 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 0;\n h_col += 1;\n printMaze(mz);\n } else { \n //If hand position is a wall check in front of player\n if(mz[p_row][p_col-1] != '#'){\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 0;\n p_col -= 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 0;\n h_col -= 1;\n printMaze(mz);\n } else if (mz[p_row+1][p_col] != '#'){\n //Turn left 90 and if not a wall move up\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 1;\n p_col -= 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 2;\n h_col -= 1;\n printMaze(mz);\n } else {\n //Turn around\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 0;\n p_col += 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 2;\n h_col += 1;\n printMaze(mz);\n }\n }\n \n } else if (h_col -1 == p_col){\n //If facing North\n if(mz[h_row][h_col] != '#'){ \n //Take right if available\n //Update player\n mz[p_row][p_col] = 'X'; \n p_row += 0;\n p_col += 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 1;\n h_col -= 0;\n printMaze(mz); \n } else {\n //If hand position is a wall check in front of player\n if(mz[p_row-1][p_col] != '#'){\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 1;\n h_col += 0;\n printMaze(mz);\n } else if (mz[p_row][p_col-1] != '#'){\n //Turn left 90 and if not a wall move up\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 0;\n p_col -= 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 1;\n h_col -= 2;\n printMaze(mz);\n } else {\n //Turn around\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 1;\n h_col -= 2;\n printMaze(mz);\n }\n }\n } else if (h_col+1 == p_col){\n //If facing South\n if(mz[h_row][h_col] != '#'){\n //Look right\n mz[p_row][p_col] = 'X'; \n p_row -= 0;\n p_col -= 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 1;\n h_col += 0;\n printMaze(mz);\n } else { \n //If hand position is a wall check in front of player\n if(mz[p_row+1][p_col] != '#'){\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 1;\n h_col += 0;\n printMaze(mz);\n } else if (mz[p_row][p_col+1] != '#'){\n //Turn left 90 and if not a wall move up\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 0;\n p_col += 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 1;\n h_col += 2;\n printMaze(mz);\n } else {\n //Turn around\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 0;\n p_col += 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 2;\n h_col += 1;\n printMaze(mz);\n }\n }\n \n }\n maze(mz, p_row, p_col, h_row, h_col); \n }\n }",
"@Test\n public void testWidth(){\n assertEquals(5, largeMaze.width());\n }",
"@Test\n public void testLength(){\n assertEquals(5, largeMaze.length());\n }",
"public void testGetCell() {\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(10, 10);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n test = new Location(-1, -1);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n test = new Location(-1, 0);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n test = new Location(0, -1);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n }",
"public MazeBug() {\n setColor(Color.GREEN);\n last = null;\n next = null;\n }",
"public void testGetGoalLocation() {\n test = new Location(9, 9);\n assertEquals(test, maze1.getGoalLocation());\n }",
"@Test\n public void testSize(){\n assertEquals(25, largeMaze.size());\n }",
"@Test\n public void test_17() {\n Maze maze = new Maze(smallKey, new Location(1, 2));\n maze.moveChip(Direction.NORTH);\n assertTrue(maze.getChipLocation().equals(new Location(1, 1)));\n assertTrue(maze.getChip().hasKey(keyOne));\n assertTrue(maze.getTile(new Location(1, 1)).getClass() == Free.class);\n }",
"void setMaze(IMaze maze);",
"public void mazeChanged(Maze maze);",
"public void testGetStartLocation() {\n assertEquals(test, maze1.getStartLocation());\n }",
"public void tests() {\n this.testStartBaseLocationsDraw();\n }",
"@Test\n public void testSetEndNotInMap(){\n smallMaze.setEnd(Maze.position(0, 23));\n }",
"public void testSolve1() {\n test = new Location(0, 1);\n maze2.setCell(test, MazeCell.WALL);\n test = new Location(1, 1);\n maze2.setStartLocation(test);\n test = new Location(0, 0);\n maze2.setGoalLocation(test);\n assertEquals(\"(0, 0) (1, 0) (1, 1) \", maze2.solve());\n }",
"public void Reset ( ) \r\n\t{\r\n\t\tcurrentCol = size / 2;\r\n\t\tcurrentRow = size / 2;\r\n\t\t\r\n\t\tint totalDistance;\r\n\t\tdo {\r\n\t\tint dist = size*size+1;\r\n\t\tmaze = new Room [size] [size];\r\n\t\tfor ( int row = 0; row < size; row++ )\r\n\t\t\tfor ( int col = 0; col < size; col++ )\r\n\t\t\t\tmaze [row] [col] = new Room ( dist);\r\n\t\ttotalDistance = CalcDistance();\r\n\t\t} while ( totalDistance >= size*size );\r\n\t\t\r\n\t\tmaze [currentRow] [currentCol].InsertWalker ( );\r\n\t}",
"public void initializeMaze(){\n for(int i = 0; i < 20; i ++){\n for(int j = 0; j < 15; j ++){\n if((i % 2 == 1) && (j % 2 == 1)){\n maze[i][j] = NOTVISIBLESPACE;\n }\n else{\n maze[i][j] = NOTVISIBLEWALL;\n }\n }\n }\n\n for(int i = 0; i < 15; i ++){\n maze[19][i] = NOTVISIBLEWALL;\n }\n }",
"@Test\n public void testLargeSize(){\n assertEquals(25, largeMaze.size());\n }",
"public void draw() {\t\n \t\t// Draw the centre of the maze\n \t\tPoint2D.Double centrePoint = GetCentrePoint();\n \t\t// if size is a factor of 10, this will be a multiple of 2\n \t\tint centreSize = getCentreSize();\n \t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n \t\tStdDraw.filledSquare(centrePoint.getX(), centrePoint.getY(), (centreSize / 2)-0.05);\n \t\t//Draw all the power switches\n \t\tdrawPowerSwitch(switches[0].x, switches[0].y);\n \t\tdrawPowerSwitch(switches[1].x, switches[1].y);\n \t\tdrawPowerSwitch(switches[2].x, switches[2].y);\n \t\tdrawPowerSwitch(switches[3].x, switches[3].y);\n \t\t\n \t\t\n \t\t// Get the data from the maze\n \t\tboolean south[][] = getSouth();\n \t\tboolean north[][] = getNorth();\n \t\tboolean east[][] = getEast();\n \t\tboolean west[][] = getWest();\n \t\tboolean sensor[][] = ms.getMotionSensors();\n \n \t\t//Draw the maze and motion sensors\n \t\tfor (int x = 1; x <= size; x++) {\n \t\t\tfor (int y = 1; y <= size; y++) {\n \t\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n \t\t\t\tif (south[x][y]) {\n \t\t\t\t\tStdDraw.line(x, y, x + 1, y);\n \t\t\t\t}\n \t\t\t\tif (north[x][y]) {\n \t\t\t\t\tStdDraw.line(x, y + 1, x + 1, y + 1);\n \t\t\t\t}\n \t\t\t\tif (west[x][y]) {\n \t\t\t\t\tStdDraw.line(x, y, x, y + 1);\n \t\t\t\t}\n \t\t\t\tif (east[x][y]) {\n \t\t\t\t\tStdDraw.line(x + 1, y, x + 1, y + 1);\n \t\t\t\t}\n \t\t\t\tif (sensor[x][y]) {\n \t\t\t\t\tStdDraw.setPenColor(StdDraw.MAGENTA);\n \t\t\t\t\tStdDraw.filledTriangle(x + 0.5, y + 0.4, 0.5);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"private void init() {\n mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n mPaint.setStyle(Style.STROKE);\n mPaint.setColor(ContextCompat.getColor(getContext(), R.color.colorPrimary));\n mPaint.setStrokeCap(Paint.Cap.ROUND);\n mPaint.setStrokeJoin(Paint.Join.ROUND);\n mPaint.setStrokeWidth(10f);\n mPath = new Path();\n\n solutionCellsVisited = 0;\n\n solvedMaze = false;\n\n solved = new ArrayList<Boolean>();\n\n for (int i = 0; i < solutionPath.length; i++) {\n solved.add(false);\n }\n // Log.d(\"SOLVED_LENGTH\", Integer.toString(solved.size()));\n }",
"public void testSize() {\n assertEquals(10, maze1.size());\n }",
"@Test(expected = Exception.class)\n public void testOnePillarMaze() throws Exception {\n shortestPath = MazeSolver.pStar(onePillarMaze, 1);\n }",
"private void prepare()\n {\n MazeBlock mazeBlock = new MazeBlock();\n addObject(mazeBlock,25,25);\n MazeBlock mazeBlock1 = new MazeBlock();\n addObject(mazeBlock1,25,75);\n MazeBlock mazeBlock2= new MazeBlock();\n addObject(mazeBlock2,75,75);\n MazeBlock mazeBlock3= new MazeBlock();\n addObject(mazeBlock3,75,125);\n MazeBlock mazeBlock4= new MazeBlock();\n addObject(mazeBlock4,125,125);\n MazeBlock mazeBlock5= new MazeBlock();\n addObject(mazeBlock5,175,125);\n MazeBlock mazeBlock6= new MazeBlock();\n addObject(mazeBlock6,225,125);\n MazeBlock mazeBlock7= new MazeBlock();\n addObject(mazeBlock7,275,125);\n MazeBlock mazeBlock8= new MazeBlock();\n addObject(mazeBlock8,275,175);\n MazeBlock mazeBlock9= new MazeBlock();\n addObject(mazeBlock9,275,225);\n MazeBlock mazeBlock10= new MazeBlock();\n addObject(mazeBlock10,275,275);\n MazeBlock mazeBlock11= new MazeBlock();\n addObject(mazeBlock11,275,325);\n MazeBlock mazeBlock12= new MazeBlock();\n addObject(mazeBlock12,325,325);\n MazeBlock mazeBlock13= new MazeBlock();\n addObject(mazeBlock13,375,325);\n MazeBlock mazeBlock14= new MazeBlock();\n addObject(mazeBlock14,425,275);\n MazeBlock mazeBlock15= new MazeBlock();\n addObject(mazeBlock15,475,275);\n MazeBlock mazeBlock16= new MazeBlock();\n addObject(mazeBlock16,125,325);\n MazeBlock mazeBlock17= new MazeBlock();\n addObject(mazeBlock17,125,375);\n MazeBlock mazeBlock18= new MazeBlock();\n addObject(mazeBlock18,125,425);\n MazeBlock mazeBlock19= new MazeBlock();\n addObject(mazeBlock19,175,425);\n MazeBlock mazeBlock20= new MazeBlock();\n addObject(mazeBlock20,225,425);\n\n EnemyFlyer enemyFlyer = new EnemyFlyer();\n addObject(enemyFlyer,29,190);\n EnemyFlyer enemyFlyer3 = new EnemyFlyer();\n addObject(enemyFlyer3,286,389);\n WalkingEnemy walkingEnemy = new WalkingEnemy(true);\n addObject(walkingEnemy,253,293);\n walkingEnemy.setLocation(125,275);\n WalkingEnemy walkingEnemy2 = new WalkingEnemy(false);\n addObject(walkingEnemy2,28,81);\n walkingEnemy2.setLocation(170,82);\n FinalLevel finalLevel = new FinalLevel();\n addObject(finalLevel, 508, 45);\n Hero hero = new Hero();\n addObject(hero,62,499);\n }",
"private void generateMaze(int x, int y) {generateMaze(getCell(x, y)); // gerar a partir da celula\r\n }",
"public MazeBug() {\n\t\tsetColor(Color.GREEN);\n\n\t\tisVisited = new boolean[SIZE][SIZE];\n\t\tfor (int i = 0; i < SIZE; ++i) {\n\t\t\tfor (int j = 0; j < SIZE; ++j) {\n\t\t\t\tisVisited[i][j] = false;\n\t\t\t}\n\t\t}\n\n\t\tpath = new ArrayList<Location>();\n\t\tpath.add(getLocation());\n\t}",
"@Test\n\tpublic void testExplorer() {\n\t\t\n\t\t\n\t\tController control = new Controller();\n\t\tBasicRobot robot = new BasicRobot();\n\t\tExplorer explorer = new Explorer();\n\t\tcontrol.setBuilder(Order.Builder.DFS);\n\t\tcontrol.setRobotAndDriver(robot, explorer);\n\t\trobot.setMaze(control);\n\t\tcontrol.turnOffGraphics();\n\t\tcontrol.switchFromTitleToGenerating(0);\n\t\tcontrol.waitForPlayingState();\n\t\texplorer.setRobot(robot);\n\t\tassertNotNull(explorer.getDist());\n\t\tassertTrue(explorer.getWidth() == 4);\n\t\tassertTrue(explorer.getHeight() == 4);\n\t\tassertTrue(explorer.getPathLength() == 0);\n\t\tassertTrue(explorer.getEnergyConsumption() == 0);\n\t}",
"public abstract Maze generateBaseMaze(Rectangle boundingBox);",
"public static void pathMethod (int x, int y, int rows, int columns, int startPointX, int startPointY, int endPointX, int endPointY, String [][]copyArray, String [][]realArray, int decider) throws Exception{ \r\n \r\n String up = copyArray[y-1][x];\r\n String down = copyArray[y+1][x];\r\n String right = copyArray[y][x+1]; //moves the coordinate up one, down one, right one, left one and stores it into up down left right; \r\n String left = copyArray[y][x-1];\r\n \r\n if(up.equals(\"X\")||down.equals(\"X\")||right.equals(\"X\")||left.equals(\"X\")){ //if up right left or down is equal to the endpoint, the maze is solvable, and we can now print the final array\r\n System.out.println(\"\\nThe maze is solvable!\");\r\n// printFinalArray(realArray, counter, xvalues, yvalues); //solution is found already - sends back to another method to print final solution\r\n regenerate(decider); //then sends to regenerate method where it asks if user would like to create another maze\r\n }\r\n \r\n else if(copyArray[startPointY+1][startPointX].equals(\"B\")&©Array[startPointY-1][startPointX].equals(\"B\")&©Array[startPointY][startPointX+1].equals(\"B\")&©Array[startPointY][startPointX-1].equals(\"B\")){\r\n \r\n System.out.println(\"\\nSorry, your maze is unsolvable.\\n\\n\"); //if at the start point we cannot go up down left or right - no possible moves - not solvable - end of maze \r\n regenerate(decider); //call the method that gives users the option to recreate the maze if it was unsolvable \r\n } \r\n \r\n else if(up.equals(\"O\")){ //if the coordinate in the up direction is O\r\n counter=counter+1; //incrementing counter so we can input it the coordinate arrays\r\n copyArray[y][x] = \"V\"; //changing the values to 'V' so we can know that we already visited it\r\n y=y-1; //moving coordinate up one \r\n xvalues[counter]=x; //storing this coordinate into the arrays with the counter\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider); //recalling method\r\n }\r\n \r\n else if(down.equals(\"O\")){ //if down = O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n y=y+1; \r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else if(right.equals(\"O\")){ //if right equals O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n x=x+1;\r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else if(left.equals(\"O\")){ //if left equals O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n x=x-1;\r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else { //if neither up down left or right work\r\n for(int i = 0; i<rows; i++){ //makes all the 'V's go back to O\r\n for(int j = 0; j<columns; j++){\r\n if(copyArray[i][j].equals(\"V\")){\r\n copyArray[i][j] = \"O\";\r\n }\r\n }\r\n }\r\n copyArray[y][x] = \"B\"; //make the coordinate that you cant make a move with B, so it shortens the possible path options\r\n for(int i = 0 ; i<counter; i++){\r\n xvalues[i] = 0; //resets the coordinate arrays back to 0\r\n yvalues[i] = 0;\r\n }\r\n counter=0; //resets counter back to 0;\r\n pathMethod(startPointX, startPointY, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider); //resends the startpoints instead of x and y; only thing different is that one coordinate is now marked \"B\"\r\n } \r\n }",
"private void setUpCorrect() {\n List<Tile> tiles = makeTiles();\n Board board = new Board(tiles, 4, 4);\n boardManager = new BoardManager(board);\n }",
"public Maze3D generate(int depth, int row, int column) throws Exception {\n if (row < 2 || column < 2 || depth < 2)\n throw new Exception(\"Invalid inputs Maze most be at least 2x2x2\");\n Maze3D myMaze = new Maze3D(depth,row, column); //create an empty maze\n for (int r = 0; r <row ; r++) { //init to 1 all the cells\n for (int c = 0; c <column ; c++) {\n for (int d = 0; d < depth; d++) {\n myMaze.maze[d][r][c]= 1;\n\n }\n }\n }\n boolean [][][] VisitedCells = new boolean[depth][row][column]; //create an boolean matrix that saved cell as visited or not\n int randomDepth = Ran.nextInt((depth)); //select random depth number\n int randomRow = Ran.nextInt((row)); //select random row number\n Position3D StartPos = new Position3D(randomDepth,randomRow, 0);\n myMaze.maze[randomDepth][randomRow][0]= 0; //change selected start position to 0\n myMaze.setStartPosition(StartPos); //set the start position of the maze\n changeStatus(randomDepth,randomRow,0,VisitedCells); //change Start position as visited\n //choose random goal position cell in the maze\n int randomDepth_2 = Ran.nextInt((depth)); //select random depth number\n int randomRow_2 = Ran.nextInt((row)); //select random row number\n Position3D EndPos = new Position3D(randomDepth_2,randomRow_2, (column-1));\n myMaze.maze[randomDepth_2][randomRow_2][(column-1)]= 0; //change selected goal position to 0\n myMaze.setGoalPosition(EndPos); //set the start position of the maze\n changeStatus(randomDepth_2,randomRow_2,(column-1),VisitedCells);//mark as visited\n stack.push(StartPos);\n while (!stack.empty()) {\n Position3D curr = stack.pop();\n //check if the current cell have any neighbors which have not been visited, and find them all\n ArrayList<Position3D> neighbors = findNeighbors(curr, myMaze, VisitedCells); //find all options of moving forward\n if (neighbors.size() > 0) { //iterate over all neighbors\n stack.push(curr); //push curr into the stack\n myMaze.maze[curr.getDepthIndex()][curr.getRowIndex()][curr.getColumnIndex()] = 0; //change it's place to 1\n Position3D Neighbor = ChooseNeighbor(neighbors); //choose one unvisited random neighbor\n changeStatus(Neighbor.getDepthIndex(),Neighbor.getRowIndex(),Neighbor.getColumnIndex(), VisitedCells); //mark him as visited neighbor\n removeWall(curr, Neighbor, VisitedCells, myMaze); //remove the wall & mark as visited\n stack.push(Neighbor);\n }\n }\n //handle odd maze problems - open the walls which surround the goal cell\n for (int d = EndPos.getDepthIndex()-1; d < EndPos.getDepthIndex()+2; d++) {\n for (int r = EndPos.getRowIndex()-1; r < EndPos.getRowIndex()+2; r++) {\n for (int c = EndPos.getColumnIndex()-1; c < EndPos.getColumnIndex()+1; c++) {\n if (pointOnGrid(d,r,c,myMaze)){\n myMaze.maze[d][r][c]= 0; //change selected cell to 0\n changeStatus(d,r,c,VisitedCells);\n }\n }}\n }\n return myMaze;\n }",
"@Override\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\tif(!(mazeCollection.containsKey(paramArray[0])))\n\t\t\t\t{\n\t\t\t\t\tc.passError(\"Maze doesn't exist\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t//if solution for this maze exists\n\t\t\t\tif(mazeSolutions.containsKey(mazeCollection.get(paramArray[0])))\n\t\t\t\t{\n\t\t\t\t\tc.passSolve(\"Solution for \"+paramArray[0]+ \" is ready\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\tif(paramArray[1].toString().equals(\"bfs\"))\n\t\t\t\t{\n\t\t\t\t\tMazeAdapter ms=new MazeAdapter(mazeCollection.get(paramArray[0]));\n\t\t\t\t\t\n\t\t\t\t\tSearcher<Position> bfs=new BFS<Position>();\n\t\t\t\t\tSolution<Position> sol=bfs.search(ms);\n\t\t\t\t\t\n\t\t\t\t\t//check if solution for the maze already exists, if so, replace it with the new one\n\t\t\t\t\tif(mazeSolutions.containsKey(mazeCollection.get(paramArray[0]))) {\n\t\t\t\t\t\tmazeSolutions.remove(mazeCollection.get(paramArray[0]));\n\t\t\t\t\t\tmazeSolutions.put(mazeCollection.get(paramArray[0]), sol);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmazeSolutions.put(mazeCollection.get(paramArray[0]), sol);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tc.passSolve(\"Solution for \"+paramArray[0]+ \" is ready\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if(paramArray[1].toString().equals(\"dfs\"))\n\t\t\t\t{\n\t\t\t\t\tMazeAdapter ms=new MazeAdapter(mazeCollection.get(paramArray[0]));\n\t\t\t\t\t\n\t\t\t\t\tSearcher<Position> dfs=new DFS<Position>();\n\t\t\t\t\tSolution<Position> sol=dfs.search(ms);\n\t\t\t\t\t\n\t\t\t\t\t//check if solution for the maze already exists, if so, replace it with the new one\n\t\t\t\t\tif(mazeSolutions.containsKey(mazeCollection.get(paramArray[0]))) {\n\t\t\t\t\t\tmazeSolutions.remove(mazeCollection.get(paramArray[0]));\n\t\t\t\t\t\tmazeSolutions.put(mazeCollection.get(paramArray[0]), sol);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmazeSolutions.put(mazeCollection.get(paramArray[0]), sol);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tc.passSolve(\"Solution for \"+paramArray[0]+ \" is ready\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tc.passError(\"Invalid algorithm\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"public static void mazeSize(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze four = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct = null;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\tif(randomDirection == 1)\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = four.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\t//System.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.find(randomNumber) != S.find(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+n);\n\t\t\t\t\t\tfour.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.find(randomNumber) != S.find(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfour.remove_wall(col, row, 'r');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(four, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\tfour.draw();\n\t\tfour.printCellNumbers();\t\n\t}",
"@Test\n public void testSmallPillarNeighbors(){\n //test pillar at (0,0)\n pillar = smallPillarMap.get(Maze.position(0,0));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(2, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 0)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 1)));\n\n //test pillar at (1,0)\n pillar = smallPillarMap.get(Maze.position(1,0));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(3, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 0)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 0)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 1)));\n\n //test pillar at (2,0)\n pillar = smallPillarMap.get(Maze.position(2,0));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(2, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 1)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 0)));\n\n //test pillar at (0,1)\n pillar = smallPillarMap.get(Maze.position(0,1));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(3, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 0)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 1)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 2)));\n\n //test pillar at (1,1)\n pillar = smallPillarMap.get(Maze.position(1,1));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(4, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 0)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 1)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 1)));\n\n //test pillar at (2,1)\n pillar = smallPillarMap.get(Maze.position(2,1));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(3, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 1)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 0)));\n\n //test pillar at (0,2)\n pillar = smallPillarMap.get(Maze.position(0,2));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(2, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 1)));\n\n //test pillar at (1,2)\n pillar = smallPillarMap.get(Maze.position(1,2));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(3, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 1)));\n\n //test pillar at (2,2)\n pillar = smallPillarMap.get(Maze.position(2,2));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(2, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 1)));\n }",
"private void generateMaze(int x, int y) {\r\n\t\t\t\tgenerateMaze(getCell(x, y)); // Gerar a partir da celula\r\n\t\t\t}",
"private void setCharacters() {\n\n for (Node node : gameState.getMazeState().getMaze().getNodes()) {\n if (pacmanPoint != null) {\n Pacman pacman = new Pacman();\n// if (gameState.getPacman().getDirection() == Direction.LEFT) {\n if (Math.abs(node.getX() - pacmanPoint.x + 2) < 3\n && Math.abs(node.getY() - pacmanPoint.y) < 3) {\n// gameState.getPacman().setCurrentNode(node);\n pacman.setMaze(Maze.A);\n pacman.setCurrentNode(node);\n gameState.setPacman(pacman);\n }\n// } else {\n// if (Math.abs(node.getX() - pacmanPoint.x) < 3\n// && Math.abs(node.getY() - pacmanPoint.y) < 3) {\n\n// }\n// }\n }\n// if (blinkyPoint != null) {\n// if (Math.abs(node.getX() - blinkyPoint.x) < 3\n// && Math.abs(node.getY() - blinkyPoint.y) < 3) {\n// blinkyGhost.setCurrentNode(node);\n// ghs.remove(blinkyGhost);\n// }\n// }\n// if (pinkyPoint != null) {\n// if (Math.abs(node.getX() - pinkyPoint.x) < 3\n// && Math.abs(node.getY() - pinkyPoint.y) < 3) {\n// pinkyGhost.setCurrentNode(node);\n// ghs.remove(pinkyGhost);\n// }\n// }\n// if (inkyPoint != null) {\n// if (Math.abs(node.getX() - inkyPoint.x) < 3\n// && Math.abs(node.getY() - inkyPoint.y) < 3) {\n// inkyGhost.setCurrentNode(node);\n// ghs.remove(inkyGhost);\n// }\n// }\n// if (suePoint != null) {\n// if (Math.abs(node.getX() - suePoint.x) < 3\n// && Math.abs(node.getY() - suePoint.y) < 3) {\n// sueGhost.setCurrentNode(node);\n// ghs.remove(sueGhost);\n// }\n// }\n// if (ghostsPoints.size() > 0) {\n// for (Point ghostPoint : ghostsPoints) {\n// if (Math.abs(node.getX() - ghostPoint.x) < 3\n// && Math.abs(node.getY() - ghostPoint.y) < 3) {\n// if (ghs.size() > 0) {\n// Ghost edibleGhost = ghs.get(0);\n// edibleGhost.setCurrentNode(node);\n// edibleGhost.setEdibleTime(100);\n// ghs.remove(0);\n// }\n// }\n// }\n// }\n }\n }",
"public void generate_maze()\n\t{\n\t\tint i, j, r, c;\n\n\t\t// choose a cell at random and make it the current cell\n\t\tRandom rand = new Random(666);\n\t\tr = (int)(rand.nextFloat() * (ROWS - 1));\n\t\tc = (int)(rand.nextFloat() * (COLS - 1));\n\t\tint[] curr = {r,c}; // current search location\n\t\tint visited = 1;\n\t\tint total = ROWS*COLS;\n\t\tint tos = 0; // index for top of cell stack \n\n\t\t// arrays of single step movements between cells\n\t\t// north east south west\n\t\tint[][] move = {{-1, 0}, {0, 1}, {1, 0}, {0,-1}};\n\t\tint[][] next = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};\n\n\t\twhile (visited < total)\n\t\t{\n\t\t\t// find all neighbors of current cell with all walls intact\n\t\t\tj = 0;\n\t\t\tfor (i = 0; i < 4; i++)\n\t\t\t{\n\t\t\t\tr = curr[0] + move[i][0];\n\t\t\t\tc = curr[1] + move[i][1];\n\n\t\t\t\t// check for valid next cell\n\t\t\t\tif ((0 <= r) && (r < ROWS) && (0 <= c) && (c < COLS))\n\t\t\t\t{\n\t\t\t\t\t// check if previously visited\n\t\t\t\t\tif ((Maze[r][c] == 15))//N) && (Maze[r][c] == E) && (Maze[r][c] == S) && (Maze[r][c] == W))\n\t\t\t\t\t{\n\t\t\t\t\t\t// not visited, so add to possible next cells\n\t\t\t\t\t\tnext[j][0] = r;\n\t\t\t\t\t\tnext[j][1] = c;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (j > 0)\n\t\t\t{\n\t\t\t\t// current cell has one or more unvisited neighbors, so choose one at random \n\t\t\t\t// and knock down the wall between it and the current cell\n\t\t\t\ti = (int)(rand.nextFloat() * (j-1));\n\n\t\t\t\tif ((next[i][0] - curr[0]) == 0) // next on same row\n\t\t\t\t{\n\t\t\t\t\tr = next[i][0];\n\t\t\t\t\tif (next[i][1] > curr[1]) // move east\n\t\t\t\t\t{\n\t\t\t\t\t\tc = curr[1];\n\t\t\t\t\t\tMaze[r][c] &= ~E; // clear E wall\n\t\t\t\t\t\tc = next[i][1];\n\t\t\t\t\t\tMaze[r][c] &= ~W; // clear W wall\n\t\t\t\t\t}\n\t\t\t\t\telse // move west\n\t\t\t\t\t{\n\t\t\t\t\t\tc = curr[1];\n\t\t\t\t\t\tMaze[r][c] &= ~W; // clear W wall\n\t\t\t\t\t\tc = next[i][1];\n\t\t\t\t\t\tMaze[r][c] &= ~E; // clear E wall\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse // next on same column\n\t\t\t\t{\n\t\t\t\t\tc = next[i][1];\n\t\t\t\t\t if (next[i][0] > curr[0]) // move south \n\t\t\t\t\t {\n\t\t\t\t\t \tr = curr[0];\n\t\t\t\t\t \tMaze[r][c] &= ~S; // clear S wall\n\t\t\t\t\t \tr = next[i][0];\n\t\t\t\t\t \tMaze[r][c] &= ~N; // clear N wall\n\t\t\t\t\t }\n\t\t\t\t\t else // move north\n\t\t\t\t\t {\n\t\t\t\t\t \tr = curr[0];\n\t\t\t\t\t \tMaze[r][c] &= ~N; // clear N wall\n\t\t\t\t\t \tr = next[i][0];\n\t\t\t\t\t \tMaze[r][c] &= ~S; // clear S wall\n\t\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ttos++; // push current cell location\n\t\t\t\tstack.elementAt(tos)[0] = curr[0];\n\t\t\t\tstack.elementAt(tos)[1] = curr[1];\n\n\t\t\t\tcurr[0] = next[i][0]; // make next cell the current cell\n\t\t\t\tcurr[1] = next[i][1];\n\n\t\t\t\tvisited++; // increment count of visited cells\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// reached dead end, backtrack\n\t\t\t\t// pop the most recent cell from the cell stack \n\t\t\t\t// and make it the current cell\n\t\t\t\tcurr[0] = stack.elementAt(tos)[0];\n\t\t\t\tcurr[1] = stack.elementAt(tos)[1];\n\t\t\t\ttos--;\n\t\t\t}\n\t\t}\n\t}",
"private void makeMaze() {\n\t\ttry {\n\t\t\tthis.end = ImageIO.read(new File(\"images/tiles/end_locked.png\"));\n\t\t\tint w = getWidth()/gui.getModel().getDifficulty();\n\t\t\tint h = getHeight()/gui.getModel().getDifficulty();\n\t\t\tint difficulty = gui.getModel().getDifficulty();\n\t\t\tmazeImage = new BufferedImage(difficulty*(getWidth()/difficulty), difficulty*(getHeight()/difficulty), BufferedImage.TYPE_INT_RGB);\n\t\t\tGraphics2D g = mazeImage.createGraphics();\n\t\t\tString tile = \"\";\n\t\t\tfor (BaseState s: gui.getModel().getMaze()) {\n\t\t\t\tint x = s.getX(); int y = s.getY();\n\t\t\t\t\n\t\t\t\t// check walls\n\t\t\t\tint numSides = 0;\n\t\t\t\tboolean rightWall = false;\n\t\t\t\tboolean leftWall = false;\n\t\t\t\tboolean topWall = false;\n\t\t\t\tboolean bottomWall = false;\n\t\t\t\tif (s.getRight() == null) rightWall = true;\n\t\t\t\tif (s.getLeft() == null) leftWall = true;\n\t\t\t\tif (s.getUp() == null) topWall = true;\n\t\t\t\tif (s.getDown() == null) bottomWall = true;\n\t\t\t\tif (topWall) numSides++;\n\t\t\t\tif (leftWall) numSides++;\n\t\t\t\tif (bottomWall) numSides++;\n\t\t\t\tif (rightWall) numSides++;\n\t\t\t\t\n\t\t\t\t// find tile type\n\t\t\t\tif (numSides == 3) { // dead end\n\t\t\t\t\tif (!rightWall) tile = \"images/tiles/deadend_left.bmp\";\n\t\t\t\t\telse if (!leftWall) tile = \"images/tiles/deadend_right.bmp\";\n\t\t\t\t\telse if (!topWall) tile = \"images/tiles/deadend_bottom.bmp\";\n\t\t\t\t\telse if (!bottomWall) tile = \"images/tiles/deadend_top.bmp\";\n\t\t\t\t} else if (numSides == 2) { // corner or hall\n\t\t\t\t\t//hall\n\t\t\t\t\tif (rightWall && leftWall) tile = \"images/tiles/hall_vertical.bmp\";\n\t\t\t\t\telse if (topWall && bottomWall) tile = \"images/tiles/hall_horizontal.bmp\";\n\t\t\t\t\t//corner\n\t\t\t\t\telse if (topWall && leftWall) tile = \"images/tiles/corner_top_left.bmp\";\n\t\t\t\t\telse if (topWall && rightWall) tile = \"images/tiles/corner_top_right.bmp\";\n\t\t\t\t\telse if (bottomWall && leftWall) tile = \"images/tiles/corner_bottom_left.bmp\";\n\t\t\t\t\telse if (bottomWall && rightWall) tile = \"images/tiles/corner_bottom_right.bmp\";\n\t\t\t\t} else if (numSides == 1) { // single side\n\t\t\t\t\tif (leftWall) tile = \"images/tiles/wall_left.bmp\";\n\t\t\t\t\telse if (rightWall) tile = \"images/tiles/wall_right.bmp\";\n\t\t\t\t\telse if (topWall) tile = \"images/tiles/wall_top.bmp\";\n\t\t\t\t\telse if (bottomWall) tile = \"images/tiles/wall_bottom.bmp\";\n\t\t\t\t} else { // open\n\t\t\t\t\ttile = \"images/tiles/open.bmp\";\n\t\t\t\t}\n\t\t\t\t// draw tile\n\t\t\t\tg.drawImage(ImageIO.read(new File(tile)), x*w, y*h, w, h, null);\n\t\t\t\t\n\t\t\t\t// check for ending and draw if need be\n\t\t\t\tif (s.getX() == gui.getModel().getDifficulty() - 1 && s.getY() == gui.getModel().getDifficulty() - 1) {\n\t\t\t\t\tg.drawImage(ImageIO.read(new File(\"images/tiles/end_unlocked.png\")), x*w, y*h, w, h, null);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(IOException e) {System.err.println(\"Images not found.\");}\n\t}",
"protected abstract void draw(Maze maze);",
"@Override\n public boolean moveCharacter(MovementCode step) {\n boolean hasMoved = true;\n\n if(maze != null){\n int[][] aMaze = maze.getMaze();\n\n switch (step){\n\n case UP : //UP\n case ARROW_UP:\n characterRow --;\n if(characterRow <= -1 || aMaze[characterRow][characterColumn] == 1){\n characterRow++; //we don't want to allow illegal moves\n hasMoved = false;\n }\n break;\n case RIGHT: //RIGHT\n case ARROW_RIGHT:\n characterColumn++;\n if(characterColumn >= maze.getColumnNumber() || aMaze[characterRow][characterColumn] == 1){\n characterColumn--;\n hasMoved = false;\n }\n break;\n case DOWN: //DOWN\n case ARROW_DOWN:\n characterRow++;\n if(characterRow >= maze.getRowNumber() || aMaze[characterRow][characterColumn] == 1){\n characterRow--;\n hasMoved = false;\n }\n break;\n case LEFT: //LEFT\n case ARROW_LEFT:\n characterColumn--;\n if(characterColumn <= -1 || aMaze[characterRow][characterColumn] == 1){\n characterColumn++;\n hasMoved = false;\n }\n break;\n case TOP_LEFT: //UP LEFT\n characterColumn--;\n characterRow--;\n\n if(characterColumn <= -1 || characterRow <= -1 || aMaze[characterRow][characterColumn] == 1 || (aMaze[characterRow][characterColumn+1]==1 && aMaze[characterRow+1][characterColumn]==1)){\n\n characterColumn++;\n characterRow++;\n hasMoved = false;\n }\n break;\n case TOP_RIGHT: //UP RIGHT\n characterRow--;\n characterColumn++;\n\n if(characterRow <= -1 || characterColumn >= maze.getColumnNumber() || aMaze[characterRow][characterColumn] == 1 || (aMaze[characterRow][characterColumn-1]==1 && aMaze[characterRow+1][characterColumn]==1)){\n\n characterRow++;\n characterColumn--;\n hasMoved = false;\n }\n break;\n case BOTTOM_RIGHT: //DOWN RIGHT\n characterColumn++;\n characterRow++;\n\n if(characterRow >= maze.getRowNumber() || characterColumn >= maze.getColumnNumber() || aMaze[characterRow][characterColumn] == 1 || (aMaze[characterRow-1][characterColumn]==1 && aMaze[characterRow][characterColumn-1]==1)){\n\n characterColumn--;\n characterRow--;\n hasMoved = false;\n }\n break;\n case BOTTOM_LEFT: //DOWN LEFT\n characterRow++;\n characterColumn--;\n\n if(characterRow >= maze.getRowNumber() || characterColumn <= -1 || aMaze[characterRow][characterColumn] == 1 || (aMaze[characterRow-1][characterColumn]==1 && aMaze[characterRow][characterColumn+1]==1)){\n\n characterRow--;\n characterColumn++;\n hasMoved = false;\n }\n break;\n default:\n break;\n }\n\n setChanged();\n notifyObservers(\"movedCharacter\");\n }\n return hasMoved;\n }",
"@Test\n public void testPositionEquals(){\n assertEquals(Maze.position(0,0), Maze.position(0,0));\n assertThat(Maze.position(1, 0), not(Maze.position(0, 0)));\n assertThat(Maze.position(0,0), not(Maze.position(0,1)));\n }",
"public static void main(String[] args) {\r\n new maze();\r\n }",
"public void newMaze()\n {\n NewMazeDialog dialog;\n String result;\n dialog = new NewMazeDialog(Main.getPrimaryFrameInstance());\n if ( (result = dialog.showDialog()) == null)\n return;\n\n MazeInfoModel mim = Main.getPrimaryFrameInstance().getMazeInfoModel();\n\n if (result.equals(NewMazeDialog.MAZ))\n {\n MazeInfo newMi = mim.createNew(\"New Maze \" + mLastNew, false);\n if (newMi == null)\n {\n JOptionPane.showMessageDialog(MazeEditorPage.this,\n \"Unable to create new maze\",\n \"Maze Creation Error\",\n JOptionPane.OK_OPTION);\n return;\n }\n mLastNew++;\n }\n else if (result.equals(NewMazeDialog.MZ2))\n {\n MazeInfo newMi = mim.createNew(dialog.getText(), true);\n if (newMi == null)\n {\n JOptionPane.showMessageDialog(MazeEditorPage.this,\n \"Unable to create new maze\",\n \"Maze Creation Error\",\n JOptionPane.OK_OPTION);\n return;\n }\n MazeModel mm = newMi.getModel();\n mm.setSize(dialog.getMazeSize());\n }\n }",
"@Test\n\tpublic void testGetPathLength() {\n\t\tController control = new Controller();\n\t\tBasicRobot robot = new BasicRobot();\n\t\tExplorer explorer = new Explorer();\n\t\tcontrol.setBuilder(Order.Builder.DFS);\n\t\tcontrol.setRobotAndDriver(robot, explorer);\n\t\trobot.setMaze(control);\n\t\tcontrol.turnOffGraphics();\n\t\tcontrol.setSkillLevel(0);\n\t\tcontrol.switchFromTitleToGenerating(0);\n\t\tcontrol.waitForPlayingState();\n\t\texplorer.setRobot(robot);\n\t\tassertTrue(explorer.getPathLength() == 0);\n\t\t// moving the robot one unit and checking the odometer\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\tassertTrue(explorer.getPathLength() > 0);\n\t\t\n\t\t// moving the robot again to get a reading of 2\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\t\n\t\t\n\t\t// moving the robot a third time to make sure that the odometer is updating correctly\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t}",
"public static void main(String[] args) {\n char [][] strtMaze = new char[][]{\n {'#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#'},\n {'#', '.', '.', '.', '#', '.', '.', '.', '.', '.', '.', '#'},\n {'.', '.', '#', '.', '#', '.', '#', '#', '#', '#', '.', '#'},\n {'#', '#', '#', '.', '#', '.', '.', '.', '.', '#', '.', '#'},\n {'#', '.', '.', '.', '.', '#', '#', '#', '.', '#', '.', '#'},\n {'#', '#', '#', '#', '.', '#', 'F', '#', '.', '#', '.', '#'},\n {'#', '.', '.', '#', '.', '#', '.', '#', '.', '#', '.', '#'},\n {'#', '#', '.', '#', '.', '#', '.', '#', '.', '#', '.', '#'},\n {'#', '.', '.', '.', '.', '.', '.', '.', '.', '#', '.', '#'},\n {'#', '#', '#', '#', '#', '#', '.', '#', '#', '#', '.', '#'},\n {'#', '.', '.', '.', '.', '.', '.', '#', '.', '.', '.', '#'},\n {'#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#'},\n };\n //Get start position of person\n int pstartx = 2;\n int pstarty = 0;\n //Get start position of hand\n int hstartx = 3; //If same as pstart(facing north south)\n int hstarty = 0;//If same as pstart (facing east west)\n RecursionOutLab maze1 = new RecursionOutLab();\n maze1.maze(strtMaze, pstartx, pstarty, hstartx, hstarty);\n }",
"private void prepare(Maze maze) {\n\t\tList<Coordinate> unlockedCells = new ArrayList<>();\n\t\tfor (int a=0; a<data.length; a++) \n\t\t\tfor (int b=0; b<data[0].length; b++) \n\t\t\t\tif (data[a][b]) maze.buildWall(a, b); else unlockedCells.add(new Coordinate(a, b));\n\t\tif (!unlockedCells.isEmpty()) {\n\t\t\tRandom r = new Random();\n\t\t\tSupplier<Coordinate> randomCoordinate = () -> unlockedCells.get(r.nextInt(unlockedCells.size()));\n\t\t\tmaze.setStart( randomCoordinate.get() );\n\t\t\tmaze.setGoal( randomCoordinate.get() );\n\t\t}\n\t}",
"@Test\n public void testInitializeSearch() {\n try {\n smallMaze.setBegin(Maze.position(1, 1));\n initSearch.invoke(solver.getClass(), smallMaze, testESet, testNQueue);\n } catch (Exception e) {\n fail(\"Unexpectedly could not invoke initializeSearch().\");\n }\n\n assertEquals(1, testESet.size());\n assertEquals(1, testNQueue.size());\n }",
"@Test\n public void testSmallPillarConstruction(){\n for (int i = 0; i < smallMaze.length(); i++) {\n for (int j = 0; j < smallMaze.width(); j++) {\n assertEquals(new Pillar(j, i), smallPillarMap.get(Maze.position(j, i)));\n }\n }\n\n }",
"@Test\n public void testMultiplePlankPositionsMaze() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n\n //link row 2\n smallMaze.linkPillars(Maze.position(0, 1), Maze.position(0, 2));\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n smallMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(0, 0));\n smallMaze.setEnd(Maze.position(2, 2));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(5, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }",
"private void createMaze(int cWidth, int cHeight) {\n\t\tCompass[] direction = Compass.values();\n\t\tCollections.shuffle(Arrays.asList(direction));\n\t\tfor (Compass pointing: direction) {\n\t\t\tPoint currentPoint = new Point(cWidth, cHeight);\n\t\t\tvisited.add(currentPoint);\n\t\t\tint nextW = cWidth + pointing.genX;\n\t\t\tint nextH = cHeight + pointing.genY;\n\t\t\tPoint nextPoint = new Point(nextW, nextH);\n\t\t\tif (arrayBounds(nextW, width) && arrayBounds (nextH, height) && maze[nextW][nextH] == 0 && !visited.contains(nextPoint)) {\n\t\t\t\tmaze[cWidth + pointing.mapX][cHeight + pointing.mapY] = 0;\n\t\t\t\tcreateMaze(nextW, nextH);\n\t\t\t}\n\t\t} \n\t}",
"@Test\n //test if the jumper can move if it's surrounded by the jumpers\n public void testMove() {\n world.add(new Location(FOUR , FOUR), jumper);\n world.add(new Location(THREE, FOUR), new jumper());\n world.add(new Location(FIVE, FOUR), new jumper());\n world.add(new Location(FOUR, THREE), new jumper());\n world.add(new Location(FOUR, FIVE), new jumper());\n jumper.act();\n assertEquals(new Location(TWO, FOUR), jumper.getLocation());\n }",
"@Test\n public void testAttemptLinks() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n\n //invoke attemptLinks\n try {\n testPillars = largeMaze.getPillars();\n testPillar = testPillars.get(Maze.position(3,3));\n testPillar.setPlanksLeft(1);\n attemptLinks.invoke(solver.getClass(), testPillar, largeMaze.getEnd(), testESet, testNQueue);\n } catch (Exception e) {\n fail(\"Unexpectedly could not invoke attemptLinks().\");\n }\n\n assertEquals(3, testESet.size());\n assertEquals(3, testNQueue.size());\n }",
"void castMaze(Tile currentMap, int prevDirection) {\n int y = currentMap.getPosition().getY();\n int x = currentMap.getPosition().getX();\n\n map[(2 * y) + 1][(2 * x) + 1].setTerrain(Terrain.EMPTY);\n if (currentMap.getPathDirection()[0] && prevDirection != 1) {\n map[(2 * y)][(2 * x) + 1].setTerrain(Terrain.EMPTY);\n castMaze(tempMap[y - 1][x], 0);\n }\n if (currentMap.getPathDirection()[1] && prevDirection != 0) {\n map[(2 * y) + 2][(2 * x) + 1].setTerrain(Terrain.EMPTY);\n castMaze(tempMap[y + 1][x], 1);\n }\n if (currentMap.getPathDirection()[2] && prevDirection != 3) {\n map[(2 * y) + 1][(2 * x) + 2].setTerrain(Terrain.EMPTY);\n castMaze(tempMap[y][x + 1], 2);\n }\n if (currentMap.getPathDirection()[3] && prevDirection != 2) {\n map[(2 * y) + 1][(2 * x)].setTerrain(Terrain.EMPTY);\n castMaze(tempMap[y][x - 1], 3);\n }\n }",
"private void setup()\r\n {\r\n \r\n char[][] examplemap = {\r\n { 'e','w','e','e','e','e','e','e','e','e' },\r\n { 'e','w','e','w','w','w','w','e','w','w' },\r\n { 'e','w','e','w','e','w','w','e','w','e' },\r\n { 'e','e','e','w','e','w','e','e','w','e' },\r\n { 'e','w','e','e','e','w','e','e','w','e' },\r\n { 'e','w','w','w','e','w','e','w','w','e' },\r\n { 'e','e','e','e','e','e','e','w','e','e' },\r\n { 'e','w','w','e','w','e','w','w','w','e' },\r\n { 'e','e','w','e','e','w','w','e','e','e' },\r\n { 'e','e','w','e','e','e','e','e','e','w' }};\r\n for (int i=0; i<map.length; i++)\r\n {\r\n for (int n=0; n<map[i].length; n++)\r\n {\r\n if (examplemap[n][i] == 'e')\r\n map[i][n].setBackground(Color.white);\r\n else\r\n map[i][n].setBackground(Color.black);\r\n }\r\n }\r\n \r\n map[0][0].setBackground(Color.red);\r\n this.Playerpos[0]=0;\r\n this.Playerpos[1]=0;\r\n \r\n \r\n map[9][8].setBackground(Color.blue);\r\n this.Goalpos[0]=9;\r\n this.Goalpos[1]=8;\r\n \r\n \r\n \r\n \r\n }",
"@Test\n public void testMazeWithoutEnd() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n smallMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(1, 1));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(null, shortestPath);\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }",
"public void testApp() throws IOException, InvalidInputException\n {\n \t\n \tString filename = \"src/main/resources/input.txt\";\n\t\tMazeProprocessor handler = new MazeProprocessor();\n\t\tMazeGraph graph = handler.readMazeMapFromFile(filename);\n\t\t\n\t\tArrayList<Node> path = graph.execute(false);\n \t\n assertTrue( path!= null );\n }",
"@Test\n public void testMoveMonsterToCell()\n {\n theEngine.start();\n assertTrue(theEngine.inPlayingState());\n \n assertFalse(getTheMonster().getLocation() == getEmptyCell());\n moveMonsterToCell(getEmptyCell());\n assertEquals(getTheMonster().getLocation(), getEmptyCell());\n }",
"private void escapeFromMaze() throws Exception {\n\t\tassert robot.distanceToObstacle(Direction.BACKWARD) != Integer.MAX_VALUE : \"Unexpected exit environment.\";\n\t\t\n\t\tswitch(robot.getCurrentDirection()){\n\t\t\tcase East:\n\t\t\t\tif(robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.East)\n\t\t\t\t\t\t&& !robot.getController().getMazeConfiguration().isValidPosition(robot.getCurrentPosition()[0]+1, robot.getCurrentPosition()[1])){\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\telse if(robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.North)){\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase West:\n\t\t\t\tif(robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.West)\n\t\t\t\t\t\t&& !robot.getController().getMazeConfiguration().isValidPosition(robot.getCurrentPosition()[0]-1, robot.getCurrentPosition()[1])){\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\telse if (robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.North)){\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase North:\n\t\t\t\tif(robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.North)\n\t\t\t\t\t\t&& !robot.getController().getMazeConfiguration().isValidPosition(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1]-1)){\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\telse if (robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.East)){\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase South:\n\t\t\t\tif(robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.South)\n\t\t\t\t\t\t&& !robot.getController().getMazeConfiguration().isValidPosition(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1]+1)){\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\telse if (robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.West)){\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t}",
"public Maze() {\n\t\tmaze = new Block[1][1];\n\t\tfileName=\"\";\n\t}",
"@Override\n\tpublic Maze MakeMaze() {\n\t\treturn new Maze();\t\n\t}",
"@Before\n public void setUp() throws Exception {\n int row = world.getGrid().getNumRows();\n int col = world.getGrid().getNumCols();\n //initial the world\n for (int i = 0; i < row; ++i) {\n for(int j = 0; j < col; ++j){\n world.remove(new Location(i, j));\n }\n }\n }",
"private void setUp() {\n move = new MoveSlidingTiles(2, 5, 3, 1);\n }",
"public Mazealgo() {\n Random number = new Random();\n long i = number.nextLong();\n this.random = new Random(i);\n this.seed = i;\n }",
"protected void initialize() {\r\n \tSystem.out.println(\"Started Move to Height\");\r\n\r\n }",
"public void showMazeSize(int size);",
"public static void intro(){\n System.out.println(\"Welcome to Maze Runner!\");\n System.out.println(\"Here is your current position:\");\n myMap.printMap();\n\n }",
"@Override\r\n\tpublic Maze3d generate(int x_axis, int y_axis, int z_axis, IPickCellStrategy pickStrategy) {\r\n\t\tMaze3d maze = new Maze3d(x_axis, y_axis, z_axis);\r\n\t\tPickStrategy = pickStrategy;\r\n\t\t//step 1\r\n\t\t//Let listOfCells be a list of cells, initially empty\r\n\t\tSystem.out.println(\"Starting Growing Tree Maze3d Generator. TotalX = \" + maze.getX_axis() + \"TotalY = \" + maze.getY_axis() + \"TotalZ = \" + maze.getZ_axis());\r\n\t\tList<Position> listOfCells = new ArrayList<Position>();\r\n\t\t\r\n\t\t//step 2\r\n\t\t//Add one cell to C, at random\r\n\t\tRandom rand = new Random(); \r\n\t\tint x = randOddNumber(maze.getX_axis());\r\n\t\tint y = randOddNumber(maze.getY_axis()); \r\n\t\tint z = randOddNumber(maze.getZ_axis()); \t\t\r\n\t\tlistOfCells.add(new Position(x,y,z));\r\n\t\tSystem.out.println(\"Random start = \" + listOfCells.get(0).toString());\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t//Repeat steps 3-4 until C is empty\r\n\t\twhile(listOfCells.isEmpty() == false){\r\n\t\t\t//step 3\r\n\t\t\t//Choose a cell c from C\r\n\t\t\tPosition chosenCell = PickStrategy.Pick(listOfCells);\r\n\t\t\t\r\n\t\t\t//step 4\r\n\t\t\t//If c has unvisited neighbors:\r\n\t\t\t//Choose an unvisited neighbor of cell c. Call it neighborCell\r\n\t\t\tList<Position> listOfUnvisitedNeighbors = maze.getUnvisitedNeighbors(chosenCell);\r\n\t\t\tif(listOfUnvisitedNeighbors.isEmpty() == false){\r\n\t\t\t\tPosition unvisitedNeighbor = listOfUnvisitedNeighbors.get(rand.nextInt(listOfUnvisitedNeighbors.size()));\r\n\t\t\t\tmaze.RemoveWallBetweenCells(chosenCell, unvisitedNeighbor);\r\n\t\t\t\tlistOfCells.add(unvisitedNeighbor);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tlistOfCells.remove(chosenCell);\r\n\t\t}\r\n\t\t\r\n\t\t//Generate entrance and exit\r\n\t\tboolean foundStart= false;\r\n\t\tboolean foundEnd= false;\r\n\t\tList<Position> temp = null;\r\n\t\t\r\n\t\tfor (int m = 1; m < maze.getX_axis()-1; m=m+2) {\r\n\t\t\tfor (int n = 1; n < maze.getY_axis()-1; n=n+2) {\r\n\t\t\t\tif (maze.getValueAt(m,n,1) == 0 && !foundStart)\r\n\t\t\t\t{\r\n\t\t\t\t\tmaze.setStartPosition(new Position(m,n,1));\r\n\t\t\t\t\tfoundStart = true;\r\n\t\t\t\t\tbreak;\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor (int m = 1; m < maze.getX_axis()-1; m=m+2) {\r\n\t\t\tfor (int n = 1; n < maze.getY_axis()-1; n=n+2) {\r\n\t\t\t\tif (maze.getValueAt(m,n,maze.getZ_axis()-2) == 0 && !foundEnd)\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tmaze.setGoalPosition(new Position(m,n,maze.getZ_axis()-2));\r\n\t\t\t\t\tfoundEnd = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn maze;\r\n\t}",
"@Test\n public void testImpossibleTraversalMaze() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(0, 0));\n smallMaze.setEnd(Maze.position(2, 2));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(null, shortestPath);\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }",
"@Test\n public void testLocateManager() {\n System.out.println(\"locateManager\");\n int x = 0;\n int y = 0; \n //instance.locateManager(x, y);\n \n }",
"public void move(Cell[][] maze) {\n // check monster still alive or not\n if (!alive) {\n return;\n }\n //four directions: left, right, up, down\n int[][] dirs = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}};\n // a list to store all valid directions to move\n List<int[]> validDir = new ArrayList<>();\n for (int[] dir : dirs) {\n int newRow = this.current_row + dir[0];\n int newCol = this.current_column + dir[1];\n // try finding a location where is not wall, not the previous location, not a place 3 sides surrounded by walls\n // and save it to valid directions list\n if (maze[newRow][newCol].getValue() != 1 && !(newRow == pre_row && newCol == pre_column)\n && validNextMove(newRow, newCol, maze)) {\n int[] newLocation = new int[]{newRow, newCol};\n validDir.add(newLocation);\n }\n }\n //If there is no valid move choice, the monster has to backtrack\n if (validDir.size() == 0) {\n this.current_row = this.pre_row;\n this.current_column = this.pre_column;\n this.pre_row = this.current_row;\n this.pre_column = this.current_column;\n } else {\n // randomly select a valid direction to move\n Random random = new Random();\n int ranNum = random.nextInt(validDir.size());\n int[] newLoc = validDir.get(ranNum);\n int newRow = newLoc[0];\n int newCol = newLoc[1];\n this.pre_row = this.current_row;\n this.pre_column = this.current_column;\n this.current_row = newRow;\n this.current_column = newCol;\n }\n }",
"@Test\n public void moveExample5() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n exampleBoard.move(1, 3, 3, 3);\n exampleBoard.move(2, 1, 2, 3);\n exampleBoard.move(2, 4, 2, 2);\n exampleBoard.move(2, 6, 2, 4);\n exampleBoard.move(4, 6, 2, 6);\n exampleBoard.move(3, 4, 3, 6);\n exampleBoard.move(4, 4, 4, 6);\n exampleBoard.move(3, 2, 3, 4);\n exampleBoard.move(2, 4, 4, 4);\n exampleBoard.move(4, 3, 4, 5);\n exampleBoard.move(4, 6, 4, 4);\n exampleBoard.move(4, 1, 4, 3);\n exampleBoard.move(5, 3, 3, 3);\n exampleBoard.move(3, 0, 3, 2);\n exampleBoard.move(2, 2, 4, 2);\n exampleBoard.move(0, 2, 2, 2);\n exampleBoard.move(0, 4, 2, 4);\n exampleBoard.move(5, 2, 3, 2);\n exampleBoard.move(5, 4, 3, 4);\n exampleBoard.move(3, 2, 1, 2);\n exampleBoard.move(3, 4, 1, 4);\n exampleBoard.move(2, 6, 4, 6);\n\n assertEquals(true, exampleBoard.isGameOver());\n assertEquals(\" _ O _\\n\"\n + \" O _ O\\n\"\n + \"O _ _ _ _ _ _\\n\"\n + \"_ _ _ O _ _ _\\n\"\n + \"O _ _ _ _ _ O\\n\"\n + \" _ _ _\\n\"\n + \" O O O\", exampleBoard.getGameState());\n }"
] | [
"0.7121795",
"0.7101309",
"0.70867443",
"0.7084803",
"0.7043575",
"0.7008705",
"0.6999273",
"0.69788677",
"0.6977872",
"0.69774425",
"0.6938993",
"0.68993306",
"0.6897856",
"0.6880512",
"0.6869096",
"0.6856799",
"0.68391955",
"0.6828532",
"0.67778796",
"0.67244726",
"0.67180526",
"0.670167",
"0.66644806",
"0.6663244",
"0.66538244",
"0.6636681",
"0.6634506",
"0.66309726",
"0.65908235",
"0.65497136",
"0.65370935",
"0.6533087",
"0.65300393",
"0.6508387",
"0.64897376",
"0.64626217",
"0.64329755",
"0.6424608",
"0.64110756",
"0.6398364",
"0.6387044",
"0.63744104",
"0.6350694",
"0.634519",
"0.6331362",
"0.62907505",
"0.6281529",
"0.6272656",
"0.6267773",
"0.6267768",
"0.6254435",
"0.6253785",
"0.62514323",
"0.624646",
"0.6239643",
"0.62227076",
"0.6212587",
"0.61980927",
"0.61844116",
"0.617639",
"0.61526346",
"0.6146716",
"0.61466146",
"0.6140035",
"0.6136376",
"0.61293423",
"0.61262167",
"0.6124086",
"0.6121101",
"0.6114599",
"0.6108888",
"0.6106249",
"0.609762",
"0.6061249",
"0.6054664",
"0.6054429",
"0.60543877",
"0.60504955",
"0.60439706",
"0.603625",
"0.6029469",
"0.6028683",
"0.6017378",
"0.6016818",
"0.6014807",
"0.59971774",
"0.59937274",
"0.5988721",
"0.5980164",
"0.5977016",
"0.59755546",
"0.597038",
"0.59626395",
"0.59607977",
"0.5956659",
"0.5949914",
"0.5946952",
"0.5938624",
"0.5934376",
"0.5929503",
"0.59266794"
] | 0.0 | -1 |
note that arguments in concat appender are switched against normal | @Test
void appendTest() {
var map = mock(SqlBuiltInMap.class);
var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);
var concatAppender = SqlRecursiveAppender.forTemplate("{0}||{1}", EXPR_ADD, EXPR_ADD);
concatAppender.append(
List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,
SqlRecursiveAppenderTest::appendArg2), builder);
assertThat(builder.getSql()).isEqualTo("?||??||?");
assertThat(builder.getBindsWithPos())
.containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(1, 2)),
new BindWithPos(bindName2, String.class, List.of(3, 4)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Concat createConcat();",
"@Override\n\tpublic void visit(Concat arg0) {\n\n\t}",
"@Override\n\tpublic void visit(Concat arg0) {\n\t\t\n\t}",
"public static void main(String[] args) {\n //StringCircularBuffer buffer = new StringCircularBuffer(10);\n CircularBuffer buffer = new CircularBuffer(10);\n buffer.offer(\"a\");\n buffer.offer(\"b\");\n buffer.offer(\"cd\");\n //buffer.offer(1);\n String value = concatenate(buffer);\n //System.out.println(value);\n\n }",
"String concat(String... text);",
"public static void main(String[] args) {\n String string = \"test\";\n concat(string);\n System.out.println(string); // test \n}",
"@Override\n public String reduce(String arg0, String arg1) throws Exception {\n return arg0.concat(arg1);\n }",
"void concat(String a, int b) {\n System.out.println(\"First : \" + a + \" second : \" + b);\n }",
"public static void main(String[] args) {\n\t\tString s=\"abc\";\n\t\ts=s.concat(\"defg\");\n\t\ts.concat(\"ghi\");\n\t\tString s1=s,s2=s,s3=s,s4=s,s5=s;\n\t\tSystem.out.println(s);\n\t\tSystem.out.println(s1);\n\t\tSystem.out.println(s2);\n\t\tSystem.out.println(s3);\n\t\tSystem.out.println(s3);\n\t\tSystem.out.println(s4);\n\t\tSystem.out.println(s5);\n\t\t\n\t\t\n\t\tStringBuffer sb= new StringBuffer(\"abc\");\n\t\tsb.append(\"ABC\");\n\t\tStringBuffer sb1=sb,sb2=sb;\n\t\tSystem.out.println(sb);\n\t\tSystem.out.println(sb1);\n\t\tSystem.out.println(sb2);\n\t\t\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\tfinal String s=\"today\";\r\n\t\ts.concat(\"post\");\r\n\t\tSystem.out.println(s);\r\n\t\t\r\n\t\tString s1= new String (\"too\");\r\n\t\ts1=s1.concat(\"pre\");\r\n\t\tSystem.out.println(s1);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"*******\");\r\n\t\tString str1=\"Tomi\";\r\n\t\tString str2=\"Rohan\";\r\n\t\tString abc=str1.concat(str2);\r\n\t\t\r\n\t\r\n\t\tString str5=new String(\"Tomi\");\r\n\t\t\r\n\t\tstr5=str5.concat(\"Rohan\");\r\n\t\tSystem.out.println(str5);\r\n\t\t\r\n\t\tStringBuffer str6=new StringBuffer(\"Tomi\");\r\n\t\t\r\n\t\tstr6.append(\"Rohan\");\r\n\t\tSystem.out.println(str6);\r\n\t\t\r\n\t\t/*//System.out.println(\"Address of str1 : \"+System.identityHashCode(str1));\r\n\t\t//System.out.println(\"Address of str2 : \"+System.identityHashCode(str2));\r\n\t\tSystem.out.println(\"Length of str1 : \"+str1.length());\r\n\t\tSystem.out.println(\"Char at 5th element : \"+str1.charAt(3));\r\n\t\tSystem.out.println(abc);*/\r\n\t}",
"private Appendable combine(Appendable base, Appendable... appendables) throws IOException {\n\t\tfor (Appendable a : appendables) {\n\t\t\tbase.append(a.toString());\n\t\t}\n\t\treturn base;\n\t}",
"public static void main(String args[]) {\r\n\t\r\n\tString x=new String(\"kajol\");\r\n\tx.concat(\"kk\");\r\n\tSystem.out.println(x);\r\n\tString z=new String(\"kedia\");\r\n\tz=z.concat(\"k\");\r\n\tSystem.out.println(z);\r\n}",
"public Concat() {\r\n }",
"public StringConcat(Block block, StringResult arg1, StringResult arg2) {\n\t\tsuper(block, arg1, arg2);\n\t}",
"public static void main(String[] args) {\n\n String s1 = \"Java String\";\n\n s1.concat(\"is immutable\");\n\n System.out.println(s1); //will not concat\n\n //Assign it explicitly to contact the string\n s1 = s1.concat(\"is immutable so assign it explicitly\");\n System.out.println(s1);\n }",
"private String concatWithNewLineFeed(String ...inputs) {\n String userInput = \"\";\n for(String s : inputs) {\n userInput += s + System.lineSeparator();\n }\n return userInput;\n }",
"public static void main(String[] args) {\n\t\tStringJoiner joiner=new StringJoiner(\" and \",\"{\",\"}\");\n\t\tjoiner.add(\"python\");\n\t\tjoiner.add(\"java\");\n\t\tjoiner.add(\"c\");\n\t\tjoiner.add(\"c++\").add(\"html\").add(\"css\").add(\"js\");\n\t\tString s=joiner.toString();\n\t\tSystem.out.println(s);\n\t\tString s1=\"asd ad ad vxczvz\";\n\t\tSystem.out.println(s1.lastIndexOf(\" \"));\n\t\tSystem.out.println(s1.substring(s1.lastIndexOf(\" \")));\n\t\t\n\t\tStringJoiner joiner1=new StringJoiner(\" and \",\"[\",\"]\");\n\t\tjoiner1.add(\"asdsa\").add(\"rgrg\").add(\"grger\");\n\t\tSystem.out.println(joiner1);\n\t\tjoiner.merge(joiner1);\n\t\tSystem.out.println(joiner);\n\t}",
"@Test (priority =2)\n\t\tpublic void StringBYConcat() {\n\t \n\t \tString firstname =\"Ram\";\n\t\t\t\n\t\t\tString lastname = \"Krishna\";\n\t\t\t\n\t\t\tString fullname1 = firstname.concat(lastname);\n\t\t\t\n\t\t\tSystem.out.println(fullname1);\n\t \t\t\n\t\t}",
"private String concat(String concat, String orignalState){\n if(orignalState.equals(\"e\")){\n return concat;\n }\n else{\n return concat.concat(orignalState);\n }\n }",
"@Override\n public String str() {\n return \"append\";\n }",
"public static String myConcatenator(String str1, String str2)\r\n {\r\n str1 += str2;\r\n return str1;\r\n }",
"private void writeline(String ... args) {\r\n\t\twriteArrayToLine(args);\r\n\t}",
"public ConcatFilter() {\n super();\n }",
"private Combined() {}",
"@Test\r\n public void test_concat() {\r\n String res = Helper.concat(\"str\", 1, \"str\", \"2\");\r\n\r\n assertEquals(\"'concat' should be correct.\", \"str1str2\", res);\r\n }",
"protected Pair<JilExpr,List<JilStmt>> doStringConcat(Expr.BinOp bop){\n \t\tString builderLab = \"$builder\" + stringbuilder_label++;\r\n \t\tPair<JilExpr,List<JilStmt>> lhs = doExpression(bop.lhs());\r\n \t\tPair<JilExpr,List<JilStmt>> rhs = doExpression(bop.rhs());\r\n \t\t\r\n \t\tList<JilStmt> stmts = lhs.second();\r\n \t\tstmts.addAll(lhs.second());\r\n \t\tstmts.addAll(rhs.second());\r\n \t\t\r\n \t\tType.Clazz builder = new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\"StringBuilder\");\r\n \t\t\t\t\t\t\r\n \t\tstmts.add(new JilStmt.Assign(new JilExpr.Variable(builderLab, builder),\r\n \t\t\t\tnew JilExpr.New(builder, new ArrayList<JilExpr>(),\r\n \t\t\t\t\t\tnew Type.Function(T_VOID), bop.attributes())));\t\t\t\t\t\r\n \t\t\r\n \t\tType lhs_t = lhs.first().type(); \r\n \t\tif(lhs_t instanceof Type.Primitive || isString(lhs_t)) {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(lhs.first());\r\n \t\t\tstmts.add(new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder), \"append\",\r\n \t\t\t\t\tparams, new Type.Function(new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\t\"StringBuilder\"), lhs.first().type()), new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\")));\r\n \t\t} else {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(lhs.first());\r\n \t\t\tstmts.add(new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder),\r\n \t\t\t\t\t\"append\", params, new Type.Function(new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\"),\r\n \t\t\t\t\tJAVA_LANG_OBJECT), new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\t\"StringBuilder\")));\t\r\n \t\t}\r\n \r\n \t\t// Now, do the right hand side\r\n \t\tJilExpr r;\r\n \t\tType rhs_t = rhs.first().type(); \r\n \t\tif(rhs_t instanceof Type.Primitive || isString(rhs_t)) {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(rhs.first());\r\n \t\t\tr = new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder), \"append\",\r\n \t\t\t\t\tparams, new Type.Function(new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\t\"StringBuilder\"), rhs_t), new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\"));\r\n \t\t} else {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(rhs.first());\r\n \t\t\tr = new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder),\r\n \t\t\t\t\t\"append\", params, new Type.Function(new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\"), JAVA_LANG_OBJECT),\r\n \t\t\t\t\tnew Type.Clazz(\"java.lang\", \"StringBuilder\"));\r\n \t\t}\r\n \r\n \t\tr = new JilExpr.Invoke(r, \"toString\", new ArrayList<JilExpr>(),\r\n \t\t\t\tnew Type.Function(JAVA_LANG_STRING), JAVA_LANG_STRING);\r\n \t\t\r\n \t\treturn new Pair<JilExpr,List<JilStmt>>(r,stmts);\r\n \t}",
"@Override\n\tpublic void visit(MySQLGroupConcat arg0) {\n\t\t\n\t}",
"public void caseAConcat(AConcat node)\n {\n for (PUnExp child : node.getUnExps())\n child.apply(this);\n }",
"private void createStringConcat( AOpExpr node){\n\t\til.append(fi.createNew(\"java.lang.StringBuilder\"));\n \til.append(InstructionConstants.DUP);\n \tnode.getLeft().apply(this); //Load the left string.\n \til.append(fi.createInvoke(\"java.lang.StringBuilder\", \"<init>\", org.apache.bcel.generic.Type.VOID, new org.apache.bcel.generic.Type[] { org.apache.bcel.generic.Type.STRING }, Constants.INVOKESPECIAL));\n \tnode.getRight().apply(this); \n \til.append(fi.createInvoke(\"java.lang.StringBuilder\", \"append\", new org.apache.bcel.generic.ObjectType(\"java.lang.StringBuilder\"), new org.apache.bcel.generic.Type[] { org.apache.bcel.generic.Type.STRING }, Constants.INVOKEVIRTUAL));\n \til.append(fi.createInvoke(\"java.lang.StringBuilder\", \"toString\", org.apache.bcel.generic.Type.STRING, org.apache.bcel.generic.Type.NO_ARGS, Constants.INVOKEVIRTUAL));\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tString s =\"Hello\";\n\t\ts= s.concat(\"How\");\n\t\tSystem.out.println(s);\n\t\ts=s.concat(\"No\");\n\t\tSystem.out.println(s);\n\t\ts=s.replace(\"No\", \"Hello\");\n\t\tSystem.out.println(s);\n\n\n\t}",
"public void concat2Strings(String s1, String s2)\r\n {\r\n // s1.concat(s2);\r\n ///sau\r\n s1=s1+s2;\r\n System.out.println(\"Stringurile concatenate sunt \"+s1);\r\n }",
"private String addExtra() {\n\t\t// One Parameter: ExtraName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|extra:\" + parameters[0]);\n\t\treturn tag.toString();\n\t}",
"String concat_ws(String delimiter, String... text);",
"@JRubyMethod(name = \"<<\")\n public IRubyObject append(final ThreadContext context, final IRubyObject msg) {\n final RubyString msgString = msg.asString();\n doLog(msgString); return msgString.length();\n }",
"private void quoteline(String[] args) {\r\n\t\tStringBuilder buf = new StringBuilder();\r\n\t\tif (args.length>0) buf.append(q(args[0]));\r\n\t\tint k = 1;\r\n\t\twhile(k < args.length) buf.append(delim).append(q(args[k++]));\r\n\t\tout.println(buf.toString());\r\n\t}",
"public static void main(String args[]) {\n\t String str1 = \"Welcome\";\n\t String str2 = \" to \";\n\t String str3 = \" HOME \";\n\t str1 = str1.concat(str2).concat(str3);\n\t System.out.println(str1);\n\t \n\t \n\t \n\t }",
"protected StringBuffer inlineValueSB(Environment env,\n Context ctx,\n StringBuffer buffer) {\n if (type != Type.tString) {\n // This isn't a concatenation. It is actually an addition\n // of some sort. Call the generic inlineValueSB()\n return super.inlineValueSB(env, ctx, buffer);\n }\n\n buffer = left.inlineValueSB(env, ctx, buffer);\n if (buffer != null) {\n buffer = right.inlineValueSB(env, ctx, buffer);\n }\n return buffer;\n }",
"public ConcatReader(Reader in1, Reader in2){\r\n\t\taddReader(in1);\r\n\t\taddReader(in2);\r\n\t\tlastReaderAdded();\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tSingleObject object = SingleObject.getInstance();\n \n\t\tobject.showMessage();\n\t\tString myname = \"ABC\".concat(\"str\").concat(\"str\");\n\t\tSystem.out.println(myname);\n\t\t\n\t}",
"public final void visit(final BinStringConcatenationExpression expression) {\n }",
"public void concat(Matrix matrix) {\n\t\t\n\t}",
"public XMLString concat(String str) {\n/* 673 */ return new XMLStringDefault(this.m_str.concat(str));\n/* */ }",
"public static void main(String[] args) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"zhanglin\");\n stringBuilder.append(\"haoshuai\");\n System.out.println(stringBuilder);\n stringBuilder.append(\" nishishuaige\").append(\" ni jinnianjisuile\");\n System.out.println(stringBuilder);\n\n }",
"@Override\r\n\tpublic String getDisplayString(String[] children) {\n\t\treturn \"concatenation \" + children;\r\n\t}",
"public static void main(String[] args) {\n\n String word1 = \"abc\";\n String word2 = \"trv\";\n int length1=word1.length();\n int length2=word2.length();\n if (length1==3&&length2==3){\n System.out.println(word1.charAt(0)+\"\"+word2.charAt(0)+\n word1.charAt(1)+\"\"+word2.charAt(1)+\n word1.charAt(2)+\"\"+word2.charAt(2)); }\n else if (length1!=3||length2!=3){\n System.out.println(\"cannot merge\");\n }\n }",
"@Override\n\tprotected void reduce(Text arg0, Iterable<Text> arg1,Context arg2)\n\t\t\tthrows IOException, InterruptedException {\n\t\tfor(Text value:arg1)\n\t\t{\n\t\t\tSystem.out.println(arg0+\" \"+value);\n\t\t\targ2.write(arg0, value);\n\t\t}\n\t}",
"public ConcatReader(Reader[] in){\r\n\t\taddReaders(in);\r\n\t\tlastReaderAdded();\r\n\t}",
"private void concatWhere(StringBuilder sb, Criteria root) {\n root.args.clear();\r\n if (root.rootRestrictions != null) {\r\n root.where = root.rootRestrictions.getWhere(root.args);\r\n if (root.where.length() > 0) {\r\n sb.append(\" WHERE \");\r\n sb.append(root.where);\r\n }\r\n }\r\n // Criteria current = root;\r\n // for (Restrictions restriction : current.propRestrictionList) {\r\n // if (!appendWhere) {\r\n // sb.append(\" WHERE\");\r\n // appendWhere = true;\r\n // }\r\n // sb.append(\" \");\r\n // sb.append(property2Column(restriction.property));\r\n // sb.append(restriction.op);\r\n // sb.append(property2Column((String) restriction.value));\r\n // }\r\n // while (current != null) {\r\n // if (!current.restrictionList.isEmpty()) {\r\n // if (!appendWhere) {\r\n // sb.append(\" WHERE\");\r\n // appendWhere = true;\r\n // }\r\n // for (Restrictions restriction : current.restrictionList) {\r\n // sb.append(\" \");\r\n // sb.append(property2Column(restriction.property));\r\n // sb.append(restriction.op);\r\n // sb.append('?');\r\n // root.args.add(restriction.value);\r\n // }\r\n // }\r\n // current = current.child;\r\n // }\r\n \r\n }",
"protected void append(LoggingEvent event) {\n if(sh != null) {\n sh.send(layout.format(event));\n if(layout.ignoresThrowable()) {\n String[] s = event.getThrowableStrRep();\n if (s != null) {\n StringBuilder buf = new StringBuilder();\n for(int i = 0; i < s.length; i++) {\n buf.append(s[i]);\n buf.append(EOL);\n }\n sh.send(buf.toString());\n }\n }\n }\n }",
"public void visit(BinStringConcatenationExpression x){\n if (resultType == null || resultType.equals(BinPrimitiveType.CHAR_REF)){\r\n return;\r\n }\r\n\r\n // make sure after cast the same toString() method will be invoked\r\n if (sourceType.isReferenceType() && resultType.isReferenceType()){\r\n BinCIType context = this.castExpr.getParentType();\r\n\r\n BinMethod srcMethod\r\n = MethodInvocationRules.getMethodDeclaration(context,\r\n sourceType, \"toString\", BinTypeRef.NO_TYPEREFS);\r\n\r\n BinMethod resMethod\r\n = MethodInvocationRules.getMethodDeclaration(context,\r\n resultType, \"toString\", BinTypeRef.NO_TYPEREFS);\r\n\r\n if (srcMethod == resMethod){\r\n addViolation(new RedundantCast(castExpr, sourceType, resultType));\r\n }\r\n }\r\n\r\n }",
"private interface Appender {\n /**\n * Appends the data of {@code buffer} to {@code segment}.\n *\n * @param segment\n * \t\tthe {@link LogSegment} to append {@code buffer} to.\n * @param buffer\n * \t\tthe data to append to {@code segment}.\n * @throws IOException\n * \t\t\n */\n void append(LogSegment segment, ByteBuffer buffer) throws IOException;\n }",
"public static void main(String[] args) {\n\n int[] ints1={1,2,3};\n int[] ints2 ={3,2,1};\n\n System.out.println(Arrays.toString(addElements(ints1,ints2)) );\n }",
"protected String[] getOtherPublisherArguments()\n {\n \tif (\"true\".equals(super.project.getProperties().get(\"tycho.updatesite.with.jre\"))) {\n \treturn new String[] {\"-addJREIU\", \"-consoleLog\"};\n \t}\n \treturn null;\n }",
"public static void main(String[] args) {\n\t\tint[] a = {-1,0,0,3,3,3,0,0,0};\n\t\tint[] b = {1,2,2};\n\t\tmerge(a,6, b,3);\n\t\tfor(int i=0;i<a.length;i++) {\n\t\tSystem.out.println(a[i]);}\n\t}",
"@Override\n\tpublic String appendProcLog(final String inData) {\n\t\tprocLog += inData;\n\t\treturn getProcLog();\n\t}",
"public static void seqconcat(ArrayList<String> x, ArrayList<String> y, ArrayList<String> z, JTextArea ta) {\n\t\tfor (int i=0; i<x.size(); i++)\n\t\t{\n\t\t\tz.add(x.get(i));\n\t\t}\n\t\t\n\t\tfor (int i=0; i<y.size(); i++)\n\t\t{\n\t\t\tz.add(y.get(i));\n\t\t}\n\t\t//<1,2,3,4>\n\t\t//<2,3,4,5>\n\t\t\n\t\t//This is the loop to print all the items of the z variable\n\t\tta.setText(\"< \");\n\t\tfor (int i=0; i<z.size(); i++)\n\t\t{\n\t\t\tta.append(z.get(i)+\" \");\n\t\t}\n\t\tta.append(\">\");\n\t}",
"public static void main(String[] args) {\n\t\tString num1 = \"123455\";\n\t\tString num2 = \"56789\";\n\t\tSystem.out.println(addStrings(num1, num2));\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.print(combine(4, 2));\r\n\t}",
"@Test\n public void test1(){\n String catelyn = \"Living\";\n String stark = catelyn.concat(\"Dead\");\n System.out.println(stark);\n System.out.println(catelyn);\n }",
"@Override\n public <B extends SqlBuilder<B>> void append(List<? extends Consumer<? super B>> argumentAppend,\n B builder) {\n if (outerPriority.compareTo(builder.getPosition()) > 0) {\n builder.append(\"(\");\n }\n var matcher = ARGUMENT_PATTERN.matcher(template);\n builder.pushPosition(argumentPosition);\n int pos = 0;\n while (matcher.find()) {\n builder.append(template.substring(pos, matcher.start()));\n var argIndex = Integer.parseInt(template.substring(matcher.start() + 1, matcher.end() - 1));\n argumentAppend.get(argIndex).accept(builder);\n pos = matcher.end();\n }\n builder.append(template.substring(pos))\n .popPosition();\n if (outerPriority.compareTo(builder.getPosition()) > 0) {\n builder.append(\")\");\n }\n }",
"void enrich(HalEnricherContext context, HalAppender appender);",
"protected void appendPrefixTo(AppendableExt app) throws IOException {\n app.append(\"INSERT INTO \").append(_table)\n .append(\" (\").append(_columns).append(\") \");\n }",
"public static void main(String[] args) {\n\t\t\n\n\n\t\tStringBuilder sb = new StringBuilder(\"1234\");\n\t\tStringBuilder b = sb.append(\"adf\");\n\t\t// sb and b both point to object new StringBuilder(\"1234\");\n\t\tSystem.out.println(sb);\n\t}",
"public void setConcatTransforms(boolean flag) {\n concatTransforms = flag;\n }",
"@Override\n public StringBuilder createAccumulator() {\n return null;\n }",
"@Override\r\n public StringBuilder appendAttributes(StringBuilder buf) {\r\n super.appendAttributes(buf);\r\n appendAttribute(buf, \"ref\", ref);\r\n appendAttribute(buf, \"program\", program);\r\n return buf;\r\n }",
"public String concate(String x, String y)\n\t{\n\t\treturn x.concat(y);\n\t}",
"public String aggregatedJobArguments(AggregatedJob job) {\n StringBuffer arguments = new StringBuffer();\n\n // do we need to fail hard on first error\n if (this.abortOnFristJobFailure()) {\n arguments.append(\" -f \");\n }\n\n // track the progress of the seqexec job\n // if specified in properties\n if (mLogProgress) {\n arguments.append(\" -R \").append(logFile(job));\n }\n\n // PM-1826 add any extra arguments associated as a profile\n arguments.append(\" \").append(this.getAddOnClusteredJobArguments(job));\n\n return arguments.toString();\n }",
"protected void subAppend(E event) {\n if (!isStarted()) {\n return;\n }\n try {\n // this step avoids LBCLASSIC-139\n if (event instanceof DeferredProcessingAware) {\n ((DeferredProcessingAware)event).prepareForDeferredProcessing();\n }\n // the synchronization prevents the OutputStream from being closed while we\n // are writing. It also prevents multiple threads from entering the same\n // converter. Converters assume that they are in a synchronized block.\n // lock.lock();\n\n byte[] byteArray = this.encoder.encode(event);\n writeBytes(byteArray);\n\n } catch (IOException ioe) {\n // as soon as an exception occurs, move to non-started state\n // and add a single ErrorStatus to the SM.\n this.started = false;\n addStatus(new ErrorStatus(\"IO failure in appender\", this, ioe));\n }\n }",
"public String merge (Context context) throws Exception;",
"@Override\r\n\tpublic String pipeTwoCommands(String... args) {\r\n\t\treturn pipeCaller(args);\r\n\t}",
"protected void appendToString(ToStringCreator creator) {\r\n\t}",
"public String devolver_campos_concatenados(){\n String dato_concatenado=\"\";\n campos_concaenados=\" \";\n for (int j=0;j<numero_campos;j++){\n if(j==numero_campos-1){\n dato_concatenado=campos[j];\n }else{\n dato_concatenado=campos[j]+\", \";\n }\n campos_concaenados=campos_concaenados+dato_concatenado;\n }\n \n return campos_concaenados;\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the string 1\");\r\n\t\tString str1 = sc.nextLine();\r\n\t\tSystem.out.println(\"Enter the string 2\");\r\n\t\tString str2 = sc.nextLine();\r\n\t\t\r\n\t\tint len1=str1.length();\r\n\t\tint len2=str2.length();\r\n\t\t\r\n\t\tif(len1>len2)\r\n\t\t\tstr1=str1.substring(len1-len2);\r\n\t\telse\r\n\t\t\tstr2=str2.substring(len2-len1);\r\n\t\t\r\n\t\tSystem.out.println(str1.concat(str2));\r\n\t\t\t\r\n\t\t\r\n\t\tsc.close();\r\n\t}",
"public StringUnionFunc() {\n\t super.addLinkableParameter(\"str1\"); \n\t\t super.addLinkableParameter(\"str2\"); \n }",
"public static int[] arrayConcatInt(final int[] original, final int[] appender) {\r\n\t\tfinal int[] result = Arrays.copyOf(original, original.length + appender.length);\r\n\t\tSystem.arraycopy(appender, 0, result, original.length, appender.length);\r\n\t\treturn result;\r\n\t}",
"public void extend(String inputFileName) \n\t{\n\t\tsuper.append(inputFileName);\t\n\t}",
"private String constructGeneralArgs() {\n StringBuilder cmd = new StringBuilder();\n\n cmd.append(size).append(ExternalExecutor.TOKEN_SEP);\n\n cmd.append(writeDataPipeFile).append(ExternalExecutor.TOKEN_SEP);\n cmd.append(readDataPipeFile).append(ExternalExecutor.TOKEN_SEP);\n\n cmd.append(writePipeFiles.length).append(ExternalExecutor.TOKEN_SEP);\n for (int i = 0; i < writePipeFiles.length; ++i) {\n cmd.append(writePipeFiles[i]).append(ExternalExecutor.TOKEN_SEP);\n }\n\n cmd.append(readPipeFiles.length).append(ExternalExecutor.TOKEN_SEP);\n for (int i = 0; i < readPipeFiles.length; ++i) {\n cmd.append(readPipeFiles[i]).append(ExternalExecutor.TOKEN_SEP);\n }\n\n return cmd.toString();\n }",
"private static byte[] concat(byte[]... arrays) {\n int length = 0;\n for (byte[] array : arrays) {\n length += array.length;\n }\n final byte[] res = new byte[length];\n int pos = 0;\n for (byte[] array : arrays) {\n System.arraycopy(array, 0, res, pos, array.length);\n pos += array.length;\n }\n return res;\n }",
"public void testExtendsLinkerArgs() {\n final LinkerDef baseLinker = new LinkerDef();\n final LinkerArgument linkerArg = new LinkerArgument();\n linkerArg.setValue(\"/base\");\n baseLinker.addConfiguredLinkerArg(linkerArg);\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n final String[] preArgs = getPreArguments(extendedLinker);\n assertEquals(1, preArgs.length);\n assertEquals(\"/base\", preArgs[0]);\n }",
"private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }",
"private static void addConsoleAppender() {\n ILoggerFactory loggerFactory = LoggerFactory.getILoggerFactory();\n if (!(loggerFactory instanceof LoggerContext)) {\n return;\n }\n\n LoggerContext loggerContext = (LoggerContext) loggerFactory;\n\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n URL url = classLoader.getResource(\"logback-console.xml\");\n if (url == null) {\n LOG.warn(\"Cannot find logback-console.xml from classloader\");\n return;\n }\n\n try {\n JoranConfigurator joranConfigurator = new JoranConfigurator();\n // Configure with the addition logback-console, don't reset the context so that it will add the new appender\n joranConfigurator.setContext(loggerContext);\n joranConfigurator.doConfigure(url);\n } catch (JoranException e) {\n LOG.warn(\n \"Failed to configure log appender, logs will be missing from the Dataproc Job output\");\n }\n }",
"public static void main(String[] args) {\n new Merge().readAndWrite();\n }",
"public native void appendData(String arg) /*-{\r\n\t\tvar jso = [email protected]::getJsObj()();\r\n\t\tjso.appendData(arg);\r\n }-*/;",
"private void appendStrBufToLongStrBuf() {\n for (int i = 0; i < strBufLen; i++) {\n appendLongStrBuf(strBuf[i]);\n }\n }",
"public ConcatReader(){\r\n\t\t// Empty Constructor\r\n\t}",
"protected boolean appendLine(final String filename, final String format, final Object... args) {\n return appendLine(filename, String.format(format, args));\n }",
"private void writeArguments(Method m) {\n Class<?>[] args = m.getParameterTypes();\n int size = args.length;\n for (int i = 0; i < size; i++) {\n writer.print(args[i].getCanonicalName() + \" arg\" + i);\n if (i != size - 1)\n writer.print(\", \");\n }\n }",
"public static void main(String[] args) {\n\t\tString a=\"hi\";\n\t\tString b=\"hello\"; \n\t\tint len=a.length();\n\t\tint len1=b.length();\n\t\tif(len1>len)\n\t {\n\t\t\tSystem.out.println(a+b+a);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(b+a+b);\n }",
"public static void mashup(String a, String b) {\r\n System.out.println(a + b + a + b);\r\n }",
"@Override\r\n\tpublic String pipeMultipleCommands(String... args) {\r\n\t\treturn pipeCaller(args);\r\n\t}",
"public static void main(String[] args) {\n\t\tAccountsMerge result = new AccountsMerge();\n\t\tList<List<String>> list = new ArrayList<>();\n\t\tlist.add(Arrays.asList(\"John\", \"[email protected]\", \"[email protected]\"));\n\t\tlist.add(Arrays.asList(\"John\", \"[email protected]\"));\n\t\tlist.add(Arrays.asList(\"John\", \"[email protected]\", \"[email protected]\"));\n\t\tlist.add(Arrays.asList(\"Mary\", \"[email protected]\"));\n\t\tSystem.out.println(result.accountsMerge(list));\n\t}",
"@Test\n void appendSwitchedTest() {\n var map = mock(SqlBuiltInMap.class);\n var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);\n var concatAppender = SqlRecursiveAppender.forTemplate(\"{1}||{0}\", EXPR_ADD, EXPR_ADD);\n concatAppender.append(\n List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,\n SqlRecursiveAppenderTest::appendArg2), builder);\n assertThat(builder.getSql()).isEqualTo(\"?||??||?\");\n assertThat(builder.getBindsWithPos())\n .containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(2, 4)),\n new BindWithPos(bindName2, String.class, List.of(1, 3)));\n }",
"void testAppend(Tester t) {\n t.checkExpect(ints1.length(), 1);\n t.checkExpect(ints2.length(), 2);\n t.checkExpect(ints3.length(), 2);\n\n ints1.append(ints2);\n\n t.checkExpect(ints1.length(), 3);\n\n ints2.append(ints3);\n\n t.checkExpect(ints1.length(), 5);\n ints2.append(ints4);\n\n t.checkExpect(ints2.length(), 6);\n\n ints4.append(ints4);\n\n // will be infinite\n // t.checkExpect(ints4.length(), -1);\n }",
"public static void main(String[] args) {\n try {\n new MergeProperties(args[0], args[1], args[2]);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) {\n\t\tArrayList<Integer> array1 = new ArrayList<Integer>();\n\t\tarray1.add(1);\n\t\tarray1.add(2);\n\t\tarray1.add(3);\n\t\tarray1.add(4);\n\t\tSystem.out.println(array1);\n\t\tArrayList<Integer> array2 = new ArrayList<Integer>();\n\t\tarray2.add(5);\n\t\tarray2.add(6);\n\t\tarray2.add(7);\n\t\tarray2.add(8);\n\t\tSystem.out.println(array2);\n\t\tarray1.addAll(array2);\n\t\tSystem.out.println(array1);\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tint[] a = new int[30];\n\t\ta[0] = 1;\n\t\ta[1] = 3;\n\t\ta[2] = 5;\n\t\ta[3] = 7;\n\t\ta[4] = 9;\n\t\t\n\t\tint[] b = new int[]{2,4,6,8};\n\t\t//a = {1,3,5,7,9};\n\t\t//a[30] = 10;\n\t\tmerge(a, 5, b, 4);\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\t//System.out.println(a);\n\t}",
"public CommandLineBuilder append( final String[] segments )\n {\n if( segments != null && segments.length > 0 )\n {\n final String[] command = new String[m_commandLine.length + segments.length];\n System.arraycopy( m_commandLine, 0, command, 0, m_commandLine.length );\n System.arraycopy( segments, 0, command, m_commandLine.length, segments.length );\n m_commandLine = command;\n }\n return this;\n }",
"public static String concat(Object s1, Object s2) {\n return String.valueOf(s1) + String.valueOf(s2);\n }",
"@Override\n public StringBuilder appendAttributes(StringBuilder buf) {\n super.appendAttributes(buf);\n appendAttribute(buf, \"param\", param);\n return buf;\n }"
] | [
"0.61676645",
"0.6159063",
"0.6156616",
"0.59042704",
"0.5733877",
"0.5707676",
"0.56922317",
"0.5644115",
"0.5624967",
"0.56196696",
"0.54603666",
"0.5396155",
"0.53920686",
"0.5361598",
"0.5311643",
"0.5311065",
"0.5302223",
"0.52896816",
"0.524389",
"0.5236153",
"0.51968724",
"0.5160578",
"0.51235026",
"0.50696427",
"0.50668895",
"0.5064608",
"0.504022",
"0.5034131",
"0.5029978",
"0.5024004",
"0.49383393",
"0.4910998",
"0.4883993",
"0.488306",
"0.4875177",
"0.48649332",
"0.4864082",
"0.48631394",
"0.486184",
"0.48226398",
"0.48194212",
"0.47906917",
"0.47849366",
"0.4781301",
"0.4776634",
"0.47696662",
"0.47658888",
"0.4754387",
"0.47513643",
"0.4746405",
"0.47441298",
"0.47408256",
"0.4738728",
"0.47285485",
"0.47203764",
"0.47128576",
"0.47008345",
"0.46967578",
"0.46959022",
"0.46908382",
"0.4689128",
"0.46870473",
"0.4684384",
"0.46821436",
"0.46612495",
"0.46581122",
"0.46553913",
"0.46548986",
"0.46523157",
"0.46465793",
"0.46305177",
"0.46162903",
"0.46062487",
"0.460293",
"0.45964432",
"0.4593492",
"0.45916316",
"0.45828992",
"0.45827156",
"0.45773423",
"0.45731074",
"0.4563518",
"0.45541537",
"0.45505884",
"0.45499963",
"0.4543101",
"0.4538464",
"0.45336857",
"0.45302105",
"0.45279416",
"0.4517679",
"0.45143402",
"0.45142165",
"0.4513149",
"0.4512203",
"0.4501682",
"0.44985172",
"0.44966507",
"0.44943196",
"0.44927835"
] | 0.4510107 | 95 |
note that arguments in concat appender are switched against normal | @Test
void appendSwitchedTest() {
var map = mock(SqlBuiltInMap.class);
var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);
var concatAppender = SqlRecursiveAppender.forTemplate("{1}||{0}", EXPR_ADD, EXPR_ADD);
concatAppender.append(
List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,
SqlRecursiveAppenderTest::appendArg2), builder);
assertThat(builder.getSql()).isEqualTo("?||??||?");
assertThat(builder.getBindsWithPos())
.containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(2, 4)),
new BindWithPos(bindName2, String.class, List.of(1, 3)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Concat createConcat();",
"@Override\n\tpublic void visit(Concat arg0) {\n\n\t}",
"@Override\n\tpublic void visit(Concat arg0) {\n\t\t\n\t}",
"public static void main(String[] args) {\n //StringCircularBuffer buffer = new StringCircularBuffer(10);\n CircularBuffer buffer = new CircularBuffer(10);\n buffer.offer(\"a\");\n buffer.offer(\"b\");\n buffer.offer(\"cd\");\n //buffer.offer(1);\n String value = concatenate(buffer);\n //System.out.println(value);\n\n }",
"String concat(String... text);",
"public static void main(String[] args) {\n String string = \"test\";\n concat(string);\n System.out.println(string); // test \n}",
"@Override\n public String reduce(String arg0, String arg1) throws Exception {\n return arg0.concat(arg1);\n }",
"void concat(String a, int b) {\n System.out.println(\"First : \" + a + \" second : \" + b);\n }",
"public static void main(String[] args) {\n\t\tString s=\"abc\";\n\t\ts=s.concat(\"defg\");\n\t\ts.concat(\"ghi\");\n\t\tString s1=s,s2=s,s3=s,s4=s,s5=s;\n\t\tSystem.out.println(s);\n\t\tSystem.out.println(s1);\n\t\tSystem.out.println(s2);\n\t\tSystem.out.println(s3);\n\t\tSystem.out.println(s3);\n\t\tSystem.out.println(s4);\n\t\tSystem.out.println(s5);\n\t\t\n\t\t\n\t\tStringBuffer sb= new StringBuffer(\"abc\");\n\t\tsb.append(\"ABC\");\n\t\tStringBuffer sb1=sb,sb2=sb;\n\t\tSystem.out.println(sb);\n\t\tSystem.out.println(sb1);\n\t\tSystem.out.println(sb2);\n\t\t\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\tfinal String s=\"today\";\r\n\t\ts.concat(\"post\");\r\n\t\tSystem.out.println(s);\r\n\t\t\r\n\t\tString s1= new String (\"too\");\r\n\t\ts1=s1.concat(\"pre\");\r\n\t\tSystem.out.println(s1);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"*******\");\r\n\t\tString str1=\"Tomi\";\r\n\t\tString str2=\"Rohan\";\r\n\t\tString abc=str1.concat(str2);\r\n\t\t\r\n\t\r\n\t\tString str5=new String(\"Tomi\");\r\n\t\t\r\n\t\tstr5=str5.concat(\"Rohan\");\r\n\t\tSystem.out.println(str5);\r\n\t\t\r\n\t\tStringBuffer str6=new StringBuffer(\"Tomi\");\r\n\t\t\r\n\t\tstr6.append(\"Rohan\");\r\n\t\tSystem.out.println(str6);\r\n\t\t\r\n\t\t/*//System.out.println(\"Address of str1 : \"+System.identityHashCode(str1));\r\n\t\t//System.out.println(\"Address of str2 : \"+System.identityHashCode(str2));\r\n\t\tSystem.out.println(\"Length of str1 : \"+str1.length());\r\n\t\tSystem.out.println(\"Char at 5th element : \"+str1.charAt(3));\r\n\t\tSystem.out.println(abc);*/\r\n\t}",
"private Appendable combine(Appendable base, Appendable... appendables) throws IOException {\n\t\tfor (Appendable a : appendables) {\n\t\t\tbase.append(a.toString());\n\t\t}\n\t\treturn base;\n\t}",
"public static void main(String args[]) {\r\n\t\r\n\tString x=new String(\"kajol\");\r\n\tx.concat(\"kk\");\r\n\tSystem.out.println(x);\r\n\tString z=new String(\"kedia\");\r\n\tz=z.concat(\"k\");\r\n\tSystem.out.println(z);\r\n}",
"public Concat() {\r\n }",
"public StringConcat(Block block, StringResult arg1, StringResult arg2) {\n\t\tsuper(block, arg1, arg2);\n\t}",
"public static void main(String[] args) {\n\n String s1 = \"Java String\";\n\n s1.concat(\"is immutable\");\n\n System.out.println(s1); //will not concat\n\n //Assign it explicitly to contact the string\n s1 = s1.concat(\"is immutable so assign it explicitly\");\n System.out.println(s1);\n }",
"private String concatWithNewLineFeed(String ...inputs) {\n String userInput = \"\";\n for(String s : inputs) {\n userInput += s + System.lineSeparator();\n }\n return userInput;\n }",
"public static void main(String[] args) {\n\t\tStringJoiner joiner=new StringJoiner(\" and \",\"{\",\"}\");\n\t\tjoiner.add(\"python\");\n\t\tjoiner.add(\"java\");\n\t\tjoiner.add(\"c\");\n\t\tjoiner.add(\"c++\").add(\"html\").add(\"css\").add(\"js\");\n\t\tString s=joiner.toString();\n\t\tSystem.out.println(s);\n\t\tString s1=\"asd ad ad vxczvz\";\n\t\tSystem.out.println(s1.lastIndexOf(\" \"));\n\t\tSystem.out.println(s1.substring(s1.lastIndexOf(\" \")));\n\t\t\n\t\tStringJoiner joiner1=new StringJoiner(\" and \",\"[\",\"]\");\n\t\tjoiner1.add(\"asdsa\").add(\"rgrg\").add(\"grger\");\n\t\tSystem.out.println(joiner1);\n\t\tjoiner.merge(joiner1);\n\t\tSystem.out.println(joiner);\n\t}",
"@Test (priority =2)\n\t\tpublic void StringBYConcat() {\n\t \n\t \tString firstname =\"Ram\";\n\t\t\t\n\t\t\tString lastname = \"Krishna\";\n\t\t\t\n\t\t\tString fullname1 = firstname.concat(lastname);\n\t\t\t\n\t\t\tSystem.out.println(fullname1);\n\t \t\t\n\t\t}",
"private String concat(String concat, String orignalState){\n if(orignalState.equals(\"e\")){\n return concat;\n }\n else{\n return concat.concat(orignalState);\n }\n }",
"@Override\n public String str() {\n return \"append\";\n }",
"public static String myConcatenator(String str1, String str2)\r\n {\r\n str1 += str2;\r\n return str1;\r\n }",
"private void writeline(String ... args) {\r\n\t\twriteArrayToLine(args);\r\n\t}",
"public ConcatFilter() {\n super();\n }",
"private Combined() {}",
"@Test\r\n public void test_concat() {\r\n String res = Helper.concat(\"str\", 1, \"str\", \"2\");\r\n\r\n assertEquals(\"'concat' should be correct.\", \"str1str2\", res);\r\n }",
"protected Pair<JilExpr,List<JilStmt>> doStringConcat(Expr.BinOp bop){\n \t\tString builderLab = \"$builder\" + stringbuilder_label++;\r\n \t\tPair<JilExpr,List<JilStmt>> lhs = doExpression(bop.lhs());\r\n \t\tPair<JilExpr,List<JilStmt>> rhs = doExpression(bop.rhs());\r\n \t\t\r\n \t\tList<JilStmt> stmts = lhs.second();\r\n \t\tstmts.addAll(lhs.second());\r\n \t\tstmts.addAll(rhs.second());\r\n \t\t\r\n \t\tType.Clazz builder = new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\"StringBuilder\");\r\n \t\t\t\t\t\t\r\n \t\tstmts.add(new JilStmt.Assign(new JilExpr.Variable(builderLab, builder),\r\n \t\t\t\tnew JilExpr.New(builder, new ArrayList<JilExpr>(),\r\n \t\t\t\t\t\tnew Type.Function(T_VOID), bop.attributes())));\t\t\t\t\t\r\n \t\t\r\n \t\tType lhs_t = lhs.first().type(); \r\n \t\tif(lhs_t instanceof Type.Primitive || isString(lhs_t)) {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(lhs.first());\r\n \t\t\tstmts.add(new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder), \"append\",\r\n \t\t\t\t\tparams, new Type.Function(new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\t\"StringBuilder\"), lhs.first().type()), new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\")));\r\n \t\t} else {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(lhs.first());\r\n \t\t\tstmts.add(new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder),\r\n \t\t\t\t\t\"append\", params, new Type.Function(new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\"),\r\n \t\t\t\t\tJAVA_LANG_OBJECT), new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\t\"StringBuilder\")));\t\r\n \t\t}\r\n \r\n \t\t// Now, do the right hand side\r\n \t\tJilExpr r;\r\n \t\tType rhs_t = rhs.first().type(); \r\n \t\tif(rhs_t instanceof Type.Primitive || isString(rhs_t)) {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(rhs.first());\r\n \t\t\tr = new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder), \"append\",\r\n \t\t\t\t\tparams, new Type.Function(new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\t\"StringBuilder\"), rhs_t), new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\"));\r\n \t\t} else {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(rhs.first());\r\n \t\t\tr = new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder),\r\n \t\t\t\t\t\"append\", params, new Type.Function(new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\"), JAVA_LANG_OBJECT),\r\n \t\t\t\t\tnew Type.Clazz(\"java.lang\", \"StringBuilder\"));\r\n \t\t}\r\n \r\n \t\tr = new JilExpr.Invoke(r, \"toString\", new ArrayList<JilExpr>(),\r\n \t\t\t\tnew Type.Function(JAVA_LANG_STRING), JAVA_LANG_STRING);\r\n \t\t\r\n \t\treturn new Pair<JilExpr,List<JilStmt>>(r,stmts);\r\n \t}",
"@Override\n\tpublic void visit(MySQLGroupConcat arg0) {\n\t\t\n\t}",
"public void caseAConcat(AConcat node)\n {\n for (PUnExp child : node.getUnExps())\n child.apply(this);\n }",
"private void createStringConcat( AOpExpr node){\n\t\til.append(fi.createNew(\"java.lang.StringBuilder\"));\n \til.append(InstructionConstants.DUP);\n \tnode.getLeft().apply(this); //Load the left string.\n \til.append(fi.createInvoke(\"java.lang.StringBuilder\", \"<init>\", org.apache.bcel.generic.Type.VOID, new org.apache.bcel.generic.Type[] { org.apache.bcel.generic.Type.STRING }, Constants.INVOKESPECIAL));\n \tnode.getRight().apply(this); \n \til.append(fi.createInvoke(\"java.lang.StringBuilder\", \"append\", new org.apache.bcel.generic.ObjectType(\"java.lang.StringBuilder\"), new org.apache.bcel.generic.Type[] { org.apache.bcel.generic.Type.STRING }, Constants.INVOKEVIRTUAL));\n \til.append(fi.createInvoke(\"java.lang.StringBuilder\", \"toString\", org.apache.bcel.generic.Type.STRING, org.apache.bcel.generic.Type.NO_ARGS, Constants.INVOKEVIRTUAL));\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tString s =\"Hello\";\n\t\ts= s.concat(\"How\");\n\t\tSystem.out.println(s);\n\t\ts=s.concat(\"No\");\n\t\tSystem.out.println(s);\n\t\ts=s.replace(\"No\", \"Hello\");\n\t\tSystem.out.println(s);\n\n\n\t}",
"public void concat2Strings(String s1, String s2)\r\n {\r\n // s1.concat(s2);\r\n ///sau\r\n s1=s1+s2;\r\n System.out.println(\"Stringurile concatenate sunt \"+s1);\r\n }",
"private String addExtra() {\n\t\t// One Parameter: ExtraName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|extra:\" + parameters[0]);\n\t\treturn tag.toString();\n\t}",
"@JRubyMethod(name = \"<<\")\n public IRubyObject append(final ThreadContext context, final IRubyObject msg) {\n final RubyString msgString = msg.asString();\n doLog(msgString); return msgString.length();\n }",
"String concat_ws(String delimiter, String... text);",
"private void quoteline(String[] args) {\r\n\t\tStringBuilder buf = new StringBuilder();\r\n\t\tif (args.length>0) buf.append(q(args[0]));\r\n\t\tint k = 1;\r\n\t\twhile(k < args.length) buf.append(delim).append(q(args[k++]));\r\n\t\tout.println(buf.toString());\r\n\t}",
"public static void main(String args[]) {\n\t String str1 = \"Welcome\";\n\t String str2 = \" to \";\n\t String str3 = \" HOME \";\n\t str1 = str1.concat(str2).concat(str3);\n\t System.out.println(str1);\n\t \n\t \n\t \n\t }",
"protected StringBuffer inlineValueSB(Environment env,\n Context ctx,\n StringBuffer buffer) {\n if (type != Type.tString) {\n // This isn't a concatenation. It is actually an addition\n // of some sort. Call the generic inlineValueSB()\n return super.inlineValueSB(env, ctx, buffer);\n }\n\n buffer = left.inlineValueSB(env, ctx, buffer);\n if (buffer != null) {\n buffer = right.inlineValueSB(env, ctx, buffer);\n }\n return buffer;\n }",
"public ConcatReader(Reader in1, Reader in2){\r\n\t\taddReader(in1);\r\n\t\taddReader(in2);\r\n\t\tlastReaderAdded();\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tSingleObject object = SingleObject.getInstance();\n \n\t\tobject.showMessage();\n\t\tString myname = \"ABC\".concat(\"str\").concat(\"str\");\n\t\tSystem.out.println(myname);\n\t\t\n\t}",
"public final void visit(final BinStringConcatenationExpression expression) {\n }",
"public void concat(Matrix matrix) {\n\t\t\n\t}",
"public XMLString concat(String str) {\n/* 673 */ return new XMLStringDefault(this.m_str.concat(str));\n/* */ }",
"public static void main(String[] args) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"zhanglin\");\n stringBuilder.append(\"haoshuai\");\n System.out.println(stringBuilder);\n stringBuilder.append(\" nishishuaige\").append(\" ni jinnianjisuile\");\n System.out.println(stringBuilder);\n\n }",
"@Override\r\n\tpublic String getDisplayString(String[] children) {\n\t\treturn \"concatenation \" + children;\r\n\t}",
"public static void main(String[] args) {\n\n String word1 = \"abc\";\n String word2 = \"trv\";\n int length1=word1.length();\n int length2=word2.length();\n if (length1==3&&length2==3){\n System.out.println(word1.charAt(0)+\"\"+word2.charAt(0)+\n word1.charAt(1)+\"\"+word2.charAt(1)+\n word1.charAt(2)+\"\"+word2.charAt(2)); }\n else if (length1!=3||length2!=3){\n System.out.println(\"cannot merge\");\n }\n }",
"@Override\n\tprotected void reduce(Text arg0, Iterable<Text> arg1,Context arg2)\n\t\t\tthrows IOException, InterruptedException {\n\t\tfor(Text value:arg1)\n\t\t{\n\t\t\tSystem.out.println(arg0+\" \"+value);\n\t\t\targ2.write(arg0, value);\n\t\t}\n\t}",
"public ConcatReader(Reader[] in){\r\n\t\taddReaders(in);\r\n\t\tlastReaderAdded();\r\n\t}",
"private void concatWhere(StringBuilder sb, Criteria root) {\n root.args.clear();\r\n if (root.rootRestrictions != null) {\r\n root.where = root.rootRestrictions.getWhere(root.args);\r\n if (root.where.length() > 0) {\r\n sb.append(\" WHERE \");\r\n sb.append(root.where);\r\n }\r\n }\r\n // Criteria current = root;\r\n // for (Restrictions restriction : current.propRestrictionList) {\r\n // if (!appendWhere) {\r\n // sb.append(\" WHERE\");\r\n // appendWhere = true;\r\n // }\r\n // sb.append(\" \");\r\n // sb.append(property2Column(restriction.property));\r\n // sb.append(restriction.op);\r\n // sb.append(property2Column((String) restriction.value));\r\n // }\r\n // while (current != null) {\r\n // if (!current.restrictionList.isEmpty()) {\r\n // if (!appendWhere) {\r\n // sb.append(\" WHERE\");\r\n // appendWhere = true;\r\n // }\r\n // for (Restrictions restriction : current.restrictionList) {\r\n // sb.append(\" \");\r\n // sb.append(property2Column(restriction.property));\r\n // sb.append(restriction.op);\r\n // sb.append('?');\r\n // root.args.add(restriction.value);\r\n // }\r\n // }\r\n // current = current.child;\r\n // }\r\n \r\n }",
"protected void append(LoggingEvent event) {\n if(sh != null) {\n sh.send(layout.format(event));\n if(layout.ignoresThrowable()) {\n String[] s = event.getThrowableStrRep();\n if (s != null) {\n StringBuilder buf = new StringBuilder();\n for(int i = 0; i < s.length; i++) {\n buf.append(s[i]);\n buf.append(EOL);\n }\n sh.send(buf.toString());\n }\n }\n }\n }",
"private interface Appender {\n /**\n * Appends the data of {@code buffer} to {@code segment}.\n *\n * @param segment\n * \t\tthe {@link LogSegment} to append {@code buffer} to.\n * @param buffer\n * \t\tthe data to append to {@code segment}.\n * @throws IOException\n * \t\t\n */\n void append(LogSegment segment, ByteBuffer buffer) throws IOException;\n }",
"public void visit(BinStringConcatenationExpression x){\n if (resultType == null || resultType.equals(BinPrimitiveType.CHAR_REF)){\r\n return;\r\n }\r\n\r\n // make sure after cast the same toString() method will be invoked\r\n if (sourceType.isReferenceType() && resultType.isReferenceType()){\r\n BinCIType context = this.castExpr.getParentType();\r\n\r\n BinMethod srcMethod\r\n = MethodInvocationRules.getMethodDeclaration(context,\r\n sourceType, \"toString\", BinTypeRef.NO_TYPEREFS);\r\n\r\n BinMethod resMethod\r\n = MethodInvocationRules.getMethodDeclaration(context,\r\n resultType, \"toString\", BinTypeRef.NO_TYPEREFS);\r\n\r\n if (srcMethod == resMethod){\r\n addViolation(new RedundantCast(castExpr, sourceType, resultType));\r\n }\r\n }\r\n\r\n }",
"public static void main(String[] args) {\n\n int[] ints1={1,2,3};\n int[] ints2 ={3,2,1};\n\n System.out.println(Arrays.toString(addElements(ints1,ints2)) );\n }",
"protected String[] getOtherPublisherArguments()\n {\n \tif (\"true\".equals(super.project.getProperties().get(\"tycho.updatesite.with.jre\"))) {\n \treturn new String[] {\"-addJREIU\", \"-consoleLog\"};\n \t}\n \treturn null;\n }",
"public static void main(String[] args) {\n\t\tint[] a = {-1,0,0,3,3,3,0,0,0};\n\t\tint[] b = {1,2,2};\n\t\tmerge(a,6, b,3);\n\t\tfor(int i=0;i<a.length;i++) {\n\t\tSystem.out.println(a[i]);}\n\t}",
"@Override\n\tpublic String appendProcLog(final String inData) {\n\t\tprocLog += inData;\n\t\treturn getProcLog();\n\t}",
"public static void seqconcat(ArrayList<String> x, ArrayList<String> y, ArrayList<String> z, JTextArea ta) {\n\t\tfor (int i=0; i<x.size(); i++)\n\t\t{\n\t\t\tz.add(x.get(i));\n\t\t}\n\t\t\n\t\tfor (int i=0; i<y.size(); i++)\n\t\t{\n\t\t\tz.add(y.get(i));\n\t\t}\n\t\t//<1,2,3,4>\n\t\t//<2,3,4,5>\n\t\t\n\t\t//This is the loop to print all the items of the z variable\n\t\tta.setText(\"< \");\n\t\tfor (int i=0; i<z.size(); i++)\n\t\t{\n\t\t\tta.append(z.get(i)+\" \");\n\t\t}\n\t\tta.append(\">\");\n\t}",
"public static void main(String[] args) {\n\t\tString num1 = \"123455\";\n\t\tString num2 = \"56789\";\n\t\tSystem.out.println(addStrings(num1, num2));\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.print(combine(4, 2));\r\n\t}",
"@Test\n public void test1(){\n String catelyn = \"Living\";\n String stark = catelyn.concat(\"Dead\");\n System.out.println(stark);\n System.out.println(catelyn);\n }",
"@Override\n public <B extends SqlBuilder<B>> void append(List<? extends Consumer<? super B>> argumentAppend,\n B builder) {\n if (outerPriority.compareTo(builder.getPosition()) > 0) {\n builder.append(\"(\");\n }\n var matcher = ARGUMENT_PATTERN.matcher(template);\n builder.pushPosition(argumentPosition);\n int pos = 0;\n while (matcher.find()) {\n builder.append(template.substring(pos, matcher.start()));\n var argIndex = Integer.parseInt(template.substring(matcher.start() + 1, matcher.end() - 1));\n argumentAppend.get(argIndex).accept(builder);\n pos = matcher.end();\n }\n builder.append(template.substring(pos))\n .popPosition();\n if (outerPriority.compareTo(builder.getPosition()) > 0) {\n builder.append(\")\");\n }\n }",
"void enrich(HalEnricherContext context, HalAppender appender);",
"protected void appendPrefixTo(AppendableExt app) throws IOException {\n app.append(\"INSERT INTO \").append(_table)\n .append(\" (\").append(_columns).append(\") \");\n }",
"public static void main(String[] args) {\n\t\t\n\n\n\t\tStringBuilder sb = new StringBuilder(\"1234\");\n\t\tStringBuilder b = sb.append(\"adf\");\n\t\t// sb and b both point to object new StringBuilder(\"1234\");\n\t\tSystem.out.println(sb);\n\t}",
"public void setConcatTransforms(boolean flag) {\n concatTransforms = flag;\n }",
"@Override\n public StringBuilder createAccumulator() {\n return null;\n }",
"@Override\r\n public StringBuilder appendAttributes(StringBuilder buf) {\r\n super.appendAttributes(buf);\r\n appendAttribute(buf, \"ref\", ref);\r\n appendAttribute(buf, \"program\", program);\r\n return buf;\r\n }",
"public String aggregatedJobArguments(AggregatedJob job) {\n StringBuffer arguments = new StringBuffer();\n\n // do we need to fail hard on first error\n if (this.abortOnFristJobFailure()) {\n arguments.append(\" -f \");\n }\n\n // track the progress of the seqexec job\n // if specified in properties\n if (mLogProgress) {\n arguments.append(\" -R \").append(logFile(job));\n }\n\n // PM-1826 add any extra arguments associated as a profile\n arguments.append(\" \").append(this.getAddOnClusteredJobArguments(job));\n\n return arguments.toString();\n }",
"protected void subAppend(E event) {\n if (!isStarted()) {\n return;\n }\n try {\n // this step avoids LBCLASSIC-139\n if (event instanceof DeferredProcessingAware) {\n ((DeferredProcessingAware)event).prepareForDeferredProcessing();\n }\n // the synchronization prevents the OutputStream from being closed while we\n // are writing. It also prevents multiple threads from entering the same\n // converter. Converters assume that they are in a synchronized block.\n // lock.lock();\n\n byte[] byteArray = this.encoder.encode(event);\n writeBytes(byteArray);\n\n } catch (IOException ioe) {\n // as soon as an exception occurs, move to non-started state\n // and add a single ErrorStatus to the SM.\n this.started = false;\n addStatus(new ErrorStatus(\"IO failure in appender\", this, ioe));\n }\n }",
"public String concate(String x, String y)\n\t{\n\t\treturn x.concat(y);\n\t}",
"public String merge (Context context) throws Exception;",
"@Override\r\n\tpublic String pipeTwoCommands(String... args) {\r\n\t\treturn pipeCaller(args);\r\n\t}",
"protected void appendToString(ToStringCreator creator) {\r\n\t}",
"public String devolver_campos_concatenados(){\n String dato_concatenado=\"\";\n campos_concaenados=\" \";\n for (int j=0;j<numero_campos;j++){\n if(j==numero_campos-1){\n dato_concatenado=campos[j];\n }else{\n dato_concatenado=campos[j]+\", \";\n }\n campos_concaenados=campos_concaenados+dato_concatenado;\n }\n \n return campos_concaenados;\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the string 1\");\r\n\t\tString str1 = sc.nextLine();\r\n\t\tSystem.out.println(\"Enter the string 2\");\r\n\t\tString str2 = sc.nextLine();\r\n\t\t\r\n\t\tint len1=str1.length();\r\n\t\tint len2=str2.length();\r\n\t\t\r\n\t\tif(len1>len2)\r\n\t\t\tstr1=str1.substring(len1-len2);\r\n\t\telse\r\n\t\t\tstr2=str2.substring(len2-len1);\r\n\t\t\r\n\t\tSystem.out.println(str1.concat(str2));\r\n\t\t\t\r\n\t\t\r\n\t\tsc.close();\r\n\t}",
"public StringUnionFunc() {\n\t super.addLinkableParameter(\"str1\"); \n\t\t super.addLinkableParameter(\"str2\"); \n }",
"public static int[] arrayConcatInt(final int[] original, final int[] appender) {\r\n\t\tfinal int[] result = Arrays.copyOf(original, original.length + appender.length);\r\n\t\tSystem.arraycopy(appender, 0, result, original.length, appender.length);\r\n\t\treturn result;\r\n\t}",
"public void extend(String inputFileName) \n\t{\n\t\tsuper.append(inputFileName);\t\n\t}",
"private String constructGeneralArgs() {\n StringBuilder cmd = new StringBuilder();\n\n cmd.append(size).append(ExternalExecutor.TOKEN_SEP);\n\n cmd.append(writeDataPipeFile).append(ExternalExecutor.TOKEN_SEP);\n cmd.append(readDataPipeFile).append(ExternalExecutor.TOKEN_SEP);\n\n cmd.append(writePipeFiles.length).append(ExternalExecutor.TOKEN_SEP);\n for (int i = 0; i < writePipeFiles.length; ++i) {\n cmd.append(writePipeFiles[i]).append(ExternalExecutor.TOKEN_SEP);\n }\n\n cmd.append(readPipeFiles.length).append(ExternalExecutor.TOKEN_SEP);\n for (int i = 0; i < readPipeFiles.length; ++i) {\n cmd.append(readPipeFiles[i]).append(ExternalExecutor.TOKEN_SEP);\n }\n\n return cmd.toString();\n }",
"private static byte[] concat(byte[]... arrays) {\n int length = 0;\n for (byte[] array : arrays) {\n length += array.length;\n }\n final byte[] res = new byte[length];\n int pos = 0;\n for (byte[] array : arrays) {\n System.arraycopy(array, 0, res, pos, array.length);\n pos += array.length;\n }\n return res;\n }",
"public void testExtendsLinkerArgs() {\n final LinkerDef baseLinker = new LinkerDef();\n final LinkerArgument linkerArg = new LinkerArgument();\n linkerArg.setValue(\"/base\");\n baseLinker.addConfiguredLinkerArg(linkerArg);\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n final String[] preArgs = getPreArguments(extendedLinker);\n assertEquals(1, preArgs.length);\n assertEquals(\"/base\", preArgs[0]);\n }",
"private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }",
"private static void addConsoleAppender() {\n ILoggerFactory loggerFactory = LoggerFactory.getILoggerFactory();\n if (!(loggerFactory instanceof LoggerContext)) {\n return;\n }\n\n LoggerContext loggerContext = (LoggerContext) loggerFactory;\n\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n URL url = classLoader.getResource(\"logback-console.xml\");\n if (url == null) {\n LOG.warn(\"Cannot find logback-console.xml from classloader\");\n return;\n }\n\n try {\n JoranConfigurator joranConfigurator = new JoranConfigurator();\n // Configure with the addition logback-console, don't reset the context so that it will add the new appender\n joranConfigurator.setContext(loggerContext);\n joranConfigurator.doConfigure(url);\n } catch (JoranException e) {\n LOG.warn(\n \"Failed to configure log appender, logs will be missing from the Dataproc Job output\");\n }\n }",
"public static void main(String[] args) {\n new Merge().readAndWrite();\n }",
"public native void appendData(String arg) /*-{\r\n\t\tvar jso = [email protected]::getJsObj()();\r\n\t\tjso.appendData(arg);\r\n }-*/;",
"private void appendStrBufToLongStrBuf() {\n for (int i = 0; i < strBufLen; i++) {\n appendLongStrBuf(strBuf[i]);\n }\n }",
"public ConcatReader(){\r\n\t\t// Empty Constructor\r\n\t}",
"protected boolean appendLine(final String filename, final String format, final Object... args) {\n return appendLine(filename, String.format(format, args));\n }",
"private void writeArguments(Method m) {\n Class<?>[] args = m.getParameterTypes();\n int size = args.length;\n for (int i = 0; i < size; i++) {\n writer.print(args[i].getCanonicalName() + \" arg\" + i);\n if (i != size - 1)\n writer.print(\", \");\n }\n }",
"public static void main(String[] args) {\n\t\tString a=\"hi\";\n\t\tString b=\"hello\"; \n\t\tint len=a.length();\n\t\tint len1=b.length();\n\t\tif(len1>len)\n\t {\n\t\t\tSystem.out.println(a+b+a);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(b+a+b);\n }",
"public static void mashup(String a, String b) {\r\n System.out.println(a + b + a + b);\r\n }",
"@Override\r\n\tpublic String pipeMultipleCommands(String... args) {\r\n\t\treturn pipeCaller(args);\r\n\t}",
"public static void main(String[] args) {\n\t\tAccountsMerge result = new AccountsMerge();\n\t\tList<List<String>> list = new ArrayList<>();\n\t\tlist.add(Arrays.asList(\"John\", \"[email protected]\", \"[email protected]\"));\n\t\tlist.add(Arrays.asList(\"John\", \"[email protected]\"));\n\t\tlist.add(Arrays.asList(\"John\", \"[email protected]\", \"[email protected]\"));\n\t\tlist.add(Arrays.asList(\"Mary\", \"[email protected]\"));\n\t\tSystem.out.println(result.accountsMerge(list));\n\t}",
"void testAppend(Tester t) {\n t.checkExpect(ints1.length(), 1);\n t.checkExpect(ints2.length(), 2);\n t.checkExpect(ints3.length(), 2);\n\n ints1.append(ints2);\n\n t.checkExpect(ints1.length(), 3);\n\n ints2.append(ints3);\n\n t.checkExpect(ints1.length(), 5);\n ints2.append(ints4);\n\n t.checkExpect(ints2.length(), 6);\n\n ints4.append(ints4);\n\n // will be infinite\n // t.checkExpect(ints4.length(), -1);\n }",
"public static void main(String[] args) {\n try {\n new MergeProperties(args[0], args[1], args[2]);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Test\n void appendTest() {\n var map = mock(SqlBuiltInMap.class);\n var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);\n var concatAppender = SqlRecursiveAppender.forTemplate(\"{0}||{1}\", EXPR_ADD, EXPR_ADD);\n concatAppender.append(\n List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,\n SqlRecursiveAppenderTest::appendArg2), builder);\n assertThat(builder.getSql()).isEqualTo(\"?||??||?\");\n assertThat(builder.getBindsWithPos())\n .containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(1, 2)),\n new BindWithPos(bindName2, String.class, List.of(3, 4)));\n }",
"public static void main(String[] args) {\n\t\tArrayList<Integer> array1 = new ArrayList<Integer>();\n\t\tarray1.add(1);\n\t\tarray1.add(2);\n\t\tarray1.add(3);\n\t\tarray1.add(4);\n\t\tSystem.out.println(array1);\n\t\tArrayList<Integer> array2 = new ArrayList<Integer>();\n\t\tarray2.add(5);\n\t\tarray2.add(6);\n\t\tarray2.add(7);\n\t\tarray2.add(8);\n\t\tSystem.out.println(array2);\n\t\tarray1.addAll(array2);\n\t\tSystem.out.println(array1);\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tint[] a = new int[30];\n\t\ta[0] = 1;\n\t\ta[1] = 3;\n\t\ta[2] = 5;\n\t\ta[3] = 7;\n\t\ta[4] = 9;\n\t\t\n\t\tint[] b = new int[]{2,4,6,8};\n\t\t//a = {1,3,5,7,9};\n\t\t//a[30] = 10;\n\t\tmerge(a, 5, b, 4);\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\t//System.out.println(a);\n\t}",
"public CommandLineBuilder append( final String[] segments )\n {\n if( segments != null && segments.length > 0 )\n {\n final String[] command = new String[m_commandLine.length + segments.length];\n System.arraycopy( m_commandLine, 0, command, 0, m_commandLine.length );\n System.arraycopy( segments, 0, command, m_commandLine.length, segments.length );\n m_commandLine = command;\n }\n return this;\n }",
"@Override\n public StringBuilder appendAttributes(StringBuilder buf) {\n super.appendAttributes(buf);\n appendAttribute(buf, \"param\", param);\n return buf;\n }",
"public static String concat(Object s1, Object s2) {\n return String.valueOf(s1) + String.valueOf(s2);\n }"
] | [
"0.61653453",
"0.61589706",
"0.61566526",
"0.59029543",
"0.5731843",
"0.5706313",
"0.5691235",
"0.5643953",
"0.56241155",
"0.56188",
"0.5458595",
"0.5394446",
"0.5391954",
"0.5360877",
"0.53112394",
"0.53103995",
"0.5302658",
"0.5287964",
"0.5243195",
"0.52365047",
"0.51947844",
"0.51639515",
"0.51223034",
"0.5069421",
"0.5066063",
"0.50635374",
"0.50407565",
"0.5032344",
"0.50282705",
"0.502405",
"0.49373263",
"0.4910004",
"0.48827866",
"0.48822573",
"0.48772204",
"0.48646876",
"0.4864124",
"0.48633507",
"0.48626617",
"0.48216784",
"0.4817126",
"0.47881997",
"0.47859627",
"0.4781035",
"0.47765198",
"0.47705305",
"0.47658828",
"0.47528884",
"0.47520667",
"0.47464806",
"0.4745505",
"0.47409424",
"0.47388762",
"0.47289267",
"0.47214308",
"0.47123092",
"0.4700993",
"0.46978754",
"0.46949238",
"0.46920404",
"0.46902385",
"0.4687655",
"0.4685455",
"0.46813253",
"0.46617323",
"0.4657849",
"0.46534756",
"0.4653172",
"0.46528134",
"0.46445617",
"0.46323162",
"0.4617423",
"0.4603628",
"0.4602333",
"0.45961708",
"0.4592588",
"0.4590537",
"0.45818293",
"0.45795998",
"0.4578018",
"0.45750296",
"0.4565028",
"0.45558393",
"0.45509887",
"0.45509237",
"0.45436385",
"0.45397487",
"0.4535908",
"0.4530337",
"0.45279193",
"0.45188",
"0.4514754",
"0.45134392",
"0.45127386",
"0.45113158",
"0.45009387",
"0.44988418",
"0.44965118",
"0.44929674",
"0.44917318"
] | 0.45158094 | 91 |
Returns a list of students objects from the search results | private List<Student> getStudentList(StudentSearchResponse srchResponse) {
List<Student> studentList = new ArrayList<Student>();
if (srchResponse != null && srchResponse.size() > 0) {
for (StudentSearchResult srchRes : srchResponse) {
Student std = new Student(srchRes.getInquiryId(),
srchRes.getStudentNumber(), srchRes.getFirstName(),
srchRes.getLastName(), srchRes.getMaidenName(),
srchRes.getDateOfBirth(), srchRes.getCity(),
srchRes.getStateProvince(), srchRes.getSSN());
studentList.add(std);
}
}
return studentList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List <Student> getAllStudents();",
"public List<Student> search() {\n \tQuery query = em.createQuery(\"Select e FROM Student e WHERE e.grade > 50.00\");\r\n \tList<Student> result = query.getResultList();\r\n \t\r\n \t \r\n \t// Query for a List of data elements.\r\n// \tQuery query = em.createQuery(\"Select e.firstname FROM Student e\");\r\n// \tList<String> result = query.getResultList();\r\n \t \r\n \t// Query for a List of element arrays.\r\n// \tQuery query = em.createQuery(\"Select e.firstname, e.grade FROM Student e\");\r\n// \tList<Object[]> result = query.getResultList();\r\n \t\r\n\t\t// \tsetFirstResult()\r\n\t\t// \tsetMaxResults()\r\n \t\r\n \treturn result;\r\n }",
"List<Student> getAllStudents();",
"@Override\n\tpublic List<Student> getStudents() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Student> query = currentSession.createQuery(\"from Student order by lastName\", Student.class);\n\n\t\t// execute the query and get the results list\n\t\tList<Student> students = query.getResultList();\n\n\t\t// return the results\n\t\treturn students;\n\t}",
"List<Student> getStudent();",
"public static List<StudentInfo> searchStudentInfo(String firtname, String lastname) {\r\n \r\n List<StudentInfo> students = new ArrayList<>();\r\n \r\n // declare resultSet\r\n ResultSet rs = null;\r\n \r\n // declare prepared statement\r\n PreparedStatement preparedStatement = null;\r\n \r\n // declare connection\r\n Connection conn = null;\r\n try {\r\n // get connection\r\n conn = DBUtils.getConnection();\r\n\r\n // set prepared statement\r\n preparedStatement = conn\r\n .prepareStatement(\"SELECT instructor.FName, instructor.LName,\" +\r\n \" IF(EXISTS ( SELECT * FROM gra WHERE gra.StudentId = phdstudent.StudentId) , 'GRA', \" +\r\n \" IF(EXISTS ( SELECT * FROM gta WHERE gta.StudentId = phdstudent.StudentId) , 'GTA', \" +\r\n \" IF(EXISTS ( SELECT * FROM scholarshipsupport WHERE scholarshipsupport.StudentId = phdstudent.StudentId) , 'scholarship', \" +\r\n \" IF(EXISTS ( SELECT * FROM selfsupport WHERE selfsupport.StudentId = phdstudent.StudentId) , 'self', ''))\" +\r\n \" )) AS StudentType, \" +\r\n \" milestone.MName, milestonespassed.PassDate\" +\r\n \" FROM phdstudent left join instructor on instructor.InstructorId = phdstudent.Supervisor\"\r\n + \" left join milestonespassed on phdstudent.StudentId = milestonespassed.StudentId\"\r\n + \" left join milestone on milestonespassed.MID = milestone.MID\" +\r\n \" WHERE phdstudent.FName = ? AND phdstudent.LName = ?\");\r\n \r\n // execute query\r\n preparedStatement.setString(1, firtname);\r\n preparedStatement.setString(2, lastname); \r\n\r\n rs = preparedStatement.executeQuery();\r\n \r\n //iterate and create the StudentInfo objects\r\n while (rs.next()) {\r\n \r\n students.add(new StudentInfo(rs.getString(1)+ \" \" + rs.getString(2), rs.getString(3), rs.getString(4), \r\n utils.Utils.toDate(rs.getDate(5))));\r\n\r\n }\r\n }catch(Exception ex){\r\n ex.printStackTrace();\r\n }\r\n finally {\r\n DBUtils.closeResource(conn);\r\n DBUtils.closeResource(preparedStatement);\r\n DBUtils.closeResource(rs);\r\n } \r\n \r\n return students; \r\n }",
"public ArrayList<Student> getStudents() {\n\n ArrayList<Student> students = new ArrayList<Student>();\n String query = \"SELECT * FROM student\";\n try{\n result = statement.executeQuery(query);\n while(result.next()) {\n\n String id = Integer.toString(result.getInt(\"student_id\"));\n String firstName = result.getString(\"student_first_name\");\n String lastName = result.getString(\"student_last_name\");\n String degree = result.getString(\"degree\");\n String yearOfStudy = result.getString(\"year_of_study\");\n String outcome = result.getString(\"outcome\");\n students.add(new Student(id, firstName, lastName, degree, yearOfStudy, outcome));\n\n }\n }\n catch (SQLException e){\n\n }\n\n return students;\n }",
"public List<String> getStudents();",
"public static List<Student> getStudents() {\n\t\tList<Student> students = new ArrayList<>();\n\t\t\n\t\t// add sample data\n\t\tstudents.add(new Student(\"James\", \"Richt\", \"[email protected]\"));\n\t\tstudents.add(new Student(\"Kelly\", \"Lou\", \"[email protected]\"));\n\t\tstudents.add(new Student(\"Lin\", \"Howe\", \"[email protected]\"));\n\t\t\n\t\t// return the list\n\t\treturn students;\n\t}",
"public ArrayList getStudents();",
"List<Map<String, Object>> getStudentsList();",
"public static List<Student> getAllStudents(){\r\n Student student1 = new Student(\"Dowlath\",2,3.6,\"male\", Arrays.asList(\"Swim\",\"BasketBall\",\"VolleyBall\"),11);\r\n Student student2 = new Student(\"Bhavya\",2,3.8,\"female\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),12);\r\n\r\n\r\n /* 3rd Grade Students */\r\n Student student3 = new Student(\"Priya\",3,4.0,\"female\", Arrays.asList(\"Swim\",\"BasketBall\",\"Aerobics\"),10);\r\n Student student4 = new Student(\"Arsh\",3,3.9,\"male\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),9);\r\n\r\n\r\n /* 4th Grade Students */\r\n Student student5 = new Student(\"Sowmiya\",4,3.5,\"female\", Arrays.asList(\"Swim\",\"Dancing\",\"FootBall\"),15);\r\n Student student6 = new Student(\"Ariz\",4,3.9,\"male\",Arrays.asList(\"Swim\",\"BasketBall\",\"BaseBall\",\"FootBall\"),14);\r\n\r\n List<Student> students = Arrays.asList(student1,student2,student3,student4,student5,student6);\r\n return students;\r\n }",
"private ArrayList<Student> getStudentsFromRS(ResultSet rs) {\t\n\t\t\n\t\tArrayList<Student> someStudents = new ArrayList<Student>();\n\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudent aStudent = new Student();\n\t\t\t\taStudent.setId(rs.getInt(\"id\"));\n\t\t\t\taStudent.setfName(rs.getString(\"first_name\"));\n\t\t\t\taStudent.setlName(rs.getString(\"last_name\"));\n\t\t\t\taStudent.setGpa(rs.getDouble(\"gpa\"));\n\t\t\t\taStudent.setSat(rs.getInt(\"sat\"));\n\t\t\t\taStudent.setMajor(rs.getInt(\"major_id\"));\n\t\t\t\tsomeStudents.add(aStudent);\n\t\t\t}\n\t\t} catch (SQLException ex) {ex.printStackTrace();};\n\t\t\n\t\treturn someStudents.isEmpty() ? null : someStudents;\n\t}",
"List<StudentRecord> getStudents(String clientId) throws Exception;",
"private Student getFoundStudent(ResultSet resultOfTheSearch) throws PhoneException, SQLException, \n\tCPFException, DateException, AddressException, RGException, StudentException, PersonException {\n\n\t\t// Get the data from database\n\t\tString studentName = resultOfTheSearch.getString(NAME_COLUMN);\n\n\t\tString email = resultOfTheSearch.getString(EMAIL_COLUMN);\n\t\tString motherName = resultOfTheSearch.getString(MOTHER_COLUMN);\n\t\tString fatherName = resultOfTheSearch.getString(FATHER_COLUMN);\n\n\t\t//CPF\n\t\tString cpf = resultOfTheSearch.getString(CPF_COLUMN);\n\t\tCPF studentCpf = new CPF(cpf);\n\n\t\t//RG\n\t\tString rg = resultOfTheSearch.getString(RG_NUMBER_COLUMN);\n\t\tString uf = resultOfTheSearch.getString(UF_COLUMN);\n\t\tString issuing_institution = resultOfTheSearch.getString(ISSUING_INSTITUTION_COLUMN);\n\t\tRG studentRg = new RG(rg,issuing_institution,uf);\n\n\t\t//Address\n\t\tString city = resultOfTheSearch.getString(CITY_COLUMN);\n\t\tString addressInfo = resultOfTheSearch.getString(ADDRESS_COLUMN);\n\t\tString complement = resultOfTheSearch.getString(COMPLEMENT_COLUMN);\n\t\tString number = resultOfTheSearch.getString(NUMBER_COLUMN);\n\t\tString cep = resultOfTheSearch.getString(CEP_COLUMN);\n\t\tAddress address = new Address(addressInfo, number, complement, cep,city);\n\n\t\t//Phones\n\t\tString cellPhone = resultOfTheSearch.getString(PRINCIPAL_PHONE_COLUMN);\n\t\tString residencePhone = resultOfTheSearch.getString(SECONDARY_PHONE_COLUMN);\n\t\tString DDDPrincipalPhone = cellPhone.substring(0,2);\n\t\tString numberPrincipalPhone = cellPhone.substring(2,10);\n\t\t\n\t\tString DDDSecondaryPhone;\n\t\tString numberSecondaryPhone;\n\t\tPhone principalPhone;\n\t\tPhone secondaryPhone;\n\t\t\n\t\tif(!residencePhone.isEmpty()){\n\t\t\t\n\t\t\tDDDSecondaryPhone = residencePhone.substring(0,2);\n\t\t\tnumberSecondaryPhone = residencePhone.substring(2,10);\n\t\t\tprincipalPhone = new Phone(DDDPrincipalPhone,numberPrincipalPhone);\n\t\t\tsecondaryPhone = new Phone(DDDSecondaryPhone,numberSecondaryPhone);\n\t\t}else{\n\t\t\tprincipalPhone = new Phone(DDDPrincipalPhone,numberPrincipalPhone);\n\t\t\tsecondaryPhone = null;\n\t\t}\n\n\t\tDate birthdate = birthdate(resultOfTheSearch);\n\t\t//Status\n\t\tint status = resultOfTheSearch.getInt(STATUS_COLUMN);\n\t\t\n\t\tStudent student = new Student(studentName, studentCpf, studentRg, birthdate, email, address,\n\t\t\t\t\t\t\t\t\t principalPhone, secondaryPhone, motherName, fatherName, status);\n\t\n\t\treturn student;\n\t}",
"java.util.List<com.demo.springprotobuff.Demoproto.Student> getStudentList();",
"public List<Student> searchStudent(String name) {\n List<Student> studentList = new ArrayList<>();\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM Students WHERE name = ? \", new String[]{name});\n while (cursor.moveToNext()) {\n Student student = new Student(cursor.getString(cursor.getColumnIndex(DatabaseHelper.STUDENT_NAME)),\n cursor.getString(cursor.getColumnIndex(DatabaseHelper.STUDENT_ADDRESS)),\n cursor.getInt(cursor.getColumnIndex(DatabaseHelper.ID)));\n studentList.add(student);\n }\n return studentList;\n }",
"public List getStudentList() throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n\n String queryString = \"from \" + Student.class.getName() + \" e\";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n List list = hibernateTemplate.list(query);\n\n return list;\n } finally {\n log.debug(\"finished getStudentList\");\n }\n }",
"public ArrayList<Student> get(String searchedStudentName) throws StudentException, CPFException, PersonException {\n\t\t\n\t\tResultSet resultOfTheSearch = null;\n\t\tString query = \"SELECT * FROM \" + STUDENT_TABLE_NAME + \" WHERE \" + NAME_COLUMN + \" LIKE \\\"%\" + searchedStudentName + \"%\\\"\"; \n\t\tArrayList<Student> foundStudents = new ArrayList<Student>();\n\t\tStudent student = null;\n\t\tCPF studentCpf = null;\n\t\t\n\t\ttry{\n\t\t\tresultOfTheSearch = this.search(query);\n\t\t\t\n\t\t\twhile(resultOfTheSearch.next()){\n\t\t\t\tString studentName = (resultOfTheSearch.getString(\"name_student\"));\n\t\t\t\tString cpf = (resultOfTheSearch.getString(\"cpf\"));\n\t\t\t\tstudentCpf = new CPF(cpf);\n\t\t\t\tstudent = new Student(studentName, studentCpf);\n\t\t\t\tfoundStudents.add(student);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(SQLException e){\n\t\t\t\n\t\t}\n\n\t\treturn foundStudents;\n\t}",
"public ArrayList<Student> getAllStudents()\n {\n Cursor cursor = sqlServices.getData(USER_TABLE, null, USER_IS_TEACHER + \" = ?\",\n new String[]{\"0\"});\n return getStudentFromCursor(cursor);\n }",
"public static ArrayList<Student> getAllStudenti() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.parameters = new Object[] {};\n\t\t\trp.type = RequestType.GET_ALL_STUDENTS;\n\t\t\tReceiveContent rps = sendReceive(rp);\n\t\t\treturn (ArrayList<Student>) rps.parameters[0];\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"SendNewsLetter error\");\n\t\t}\n\t\treturn new ArrayList<Student>();\n\t}",
"private Collection<Record> getResults(SimpleSurnameAndPostcodeQuery query) {\n\t\treturn search(query);\n\t}",
"@RequestMapping(value=\"/students\", method=RequestMethod.GET) //MediaType.APPLICATION_XML_VALUE\r\n\tpublic List<Student> getStudentsList() {\r\n\t\tArrayList<Student> list = new ArrayList<Student>();\r\n\t\tlist.add(new Student(\"Kaja\", \"Piloun\", \"123465\", 25, null));\r\n\t\tlist.add(new Student(\"Paja\", \"Pilouna\", \"123465\", 25, null));\r\n\t\tlist.add(new Student(\"Vaja\", \"Pilounen\", \"123465\", 25, null));\r\n\t\t\r\n\t\treturn list;\r\n\t}",
"public ArrayList<Student> filterSearchStudentList(int stuNum){\n \n ArrayList<Student> filteredList = new ArrayList<Student>();\n \n int existance = 0;\n\n for(int i = 0; i<studList.size(); i++){\n \n if(studList.get(i).getStuNumber() <= stuNum){\n \n Student keyListOb = new Student(studList.get(i).getFullName(), studList.get(i).getStuNumber(), studList.get(i).getGPA());\n filteredList.add(keyListOb);\n }\n \n else{\n existance++;\n }\n }\n if(existance == studList.size()){\n System.out.println(\"\\nNo results\");\n }\n\n for(int i =0; i<filteredList.size();i++){\n System.out.println(\"Student Name: \" + filteredList.get(i).getFullName() + \", Student Number: \" + filteredList.get(i).getStuNumber() + \", Student GPA: \" + filteredList.get(i).getGPA());\n }\n\n return filteredList;\n }",
"List<SearchResult> search(SearchQuery searchQuery);",
"public List<User> listSearch(String search);",
"@Override\r\n\tpublic List<Student> getAllStudents() {\n\t\treturn studentRepository.findAll();\r\n\t}",
"public List<Student> selectStudentAll() {\n\t\treturn this.studentMaper.selectStudentAll();\r\n\t}",
"@Override\n\tpublic List<JSONObject> selectStudents(JSONObject params) {\n\t\treturn this.selectList(\"selectStudents\", params);\n\t}",
"public List<StudentDto> getAllStudents() {\n\t\tList<Student> studentList = studentRepository.findAll();\n\t\tif (ObjectUtils.isEmpty(studentList))\n\t\t\tthrow new ResourceNotFoundException(Constants.noDataFound);\n\n\t\tList<StudentDto> studentDtoList = studentList.stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t .map(converter::convert)\n\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.toList());\t\t\n\t\treturn studentDtoList;\n\t}",
"@Override\n\t//查询所有数据\n\tpublic List<Student> selectStudents() {\n\t\tConnection connection =null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tList<Student> sList = new ArrayList<Student>();\n\t\t\n\t\ttry {\n\t\t\tconnection = MySQLConnectUtil.getMySQLConnection();\n\t\t\tps = connection.prepareStatement(QUARYSQL);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudent student = new Student();\n\t\t\t\tstudent.setId(rs.getString(\"ID\"));\n\t\t\t\tstudent.setName(rs.getString(\"NAME\"));\n\t\t\t\tstudent.setAge(rs.getInt(\"AGE\"));\n\t\t\t\tsList.add(student);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tMySQLConnectUtil.closeResultset(rs);\n\t\t\tMySQLConnectUtil.closePreparestatement(ps);\n\t\t\tMySQLConnectUtil.closeConnection(connection);\n\t\t}\n\t\treturn sList;\n\t}",
"static List<Student> getStudents() {\n return students;\n }",
"List<ScoreEntity> findList(int studentId);",
"@Override\r\n\tpublic List<Student> getAllStudent() {\n\t\treturn sdao.getAllStudent();\r\n\t}",
"@Query(\"from Student\")\n\tList<Student> findAllStudents();",
"@Override\r\n\tpublic List<Student> getStudents(String courseName) {\n\t\tList<Student> students=new ArrayList<>();\r\n\t\tString sql=\"select studentid, studentname, studentshv.courseid from studentshv inner join courseshv on studentshv.courseid=courseshv.courseid where coursename=?\";\r\n\t\tPreparedStatement pstmt = null;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setString(1, courseName);\r\n\t\t\tResultSet rs=pstmt.executeQuery();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tlong studentId=rs.getLong(\"studentid\");\r\n\t\t\t\tString studentName=rs.getString(\"studentname\");\r\n\t\t\t\tlong courseId=rs.getLong(\"courseid\");\r\n\t\t\t\tstudents.add(new Student(studentId,studentName,courseId));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn students;\r\n\t}",
"public List getStudentList(int startIndex, int endIndex) throws GenericBusinessException {\n if (startIndex < 1) {\n startIndex = 1;\n }\n if ( (endIndex - startIndex) < 0) {\n // Just return an empty list.\n return new ArrayList();\n }\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n String queryString = \"from \" + Student.class.getName() + \" e\";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n query.setFirstResult(startIndex - 1);\n query.setMaxResults(endIndex - startIndex + 1);\n List list = hibernateTemplate.list(query);\n return list;\n } finally {\n log.debug(\"finished getStudentList(int startIndex, int endIndex)\");\n }\n }",
"public ArrayList<Student> studentList()\n {\n ArrayList<Student> studentList = new ArrayList<>();\n try\n {\n DatabaseConnection databaseConnection = new DatabaseConnection();\n String query = \"select * from student\";\n ResultSet rs = databaseConnection.s.executeQuery(query);\n Student student;\n while(rs.next())\n {\n student = new Student(rs.getInt(\"student_id\"), rs.getString(\"student_name\"), rs.getString(\"batch\"), rs.getString(\"student_username\"), rs.getString(\"student_password\"));\n studentList.add(student);\n }\n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, e);\n }\n return studentList;\n }",
"@Override\r\n\tpublic List<Student> getAll() {\n\t\treturn dao.getAll();\r\n\t}",
"List<Student> selectByExample(StudentCriteria example);",
"@Override\n\tpublic List<Student> retrieveAllStudents() {\n\t\tTypedQuery<Student> query = em.createQuery(\"select s from Student s\",\n\t\t\t\tStudent.class);\n\t\treturn query.getResultList();\n\t}",
"@GetMapping(\"/students\")\n\tpublic List<Student> getStudents(){\n\t\n\t\treturn theStudents;\n\t}",
"public List<Student> queryStudentByPager(int beginIndex, int endIndex) {\n\t\treturn this.studentMaper.queryStudentInfoByPager(beginIndex, endIndex);\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic List<Student> listStudent() {\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Student\").list();\n\t\t}",
"LazyDataModel<ReagentResult> getSearchResults();",
"@Override\n\tpublic List<Student> queryAll() {\n\t\treturn sDao.queryAll();\n\t}",
"public static ArrayList<Student> getAllStudents() throws SQLException {\n\t\t\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\t\t\t\r\n\t\t\t\tConnection connection = SQLUtil.getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\r\n\t\t\t\t\r\n\t\t\t\tString sql = \"SELECT * FROM students\";\r\n\t\t\t\t\r\n\t\t\t\tResultSet resultSet = statement.executeQuery(sql);\r\n\t\t\t\t\r\n\t\t\t\tresultSet.first();\r\n\t\t\t\t\r\n\t\t\t\twhile (!resultSet.isAfterLast()) {\r\n\t\t\t\t\tStudent student = new Student(resultSet.getString(\"firstname\"), resultSet.getString(\"lastname\"), resultSet.getString(\"registration_number\"));\r\n\r\n\t\t\t\t\tstudents.add(student);\r\n\t\t\t\t\tresultSet.next();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn students;\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic Collection<Student> findAll() {\n\t\treturn null;\r\n\t}",
"public void showstudents(){\n for (int i=0; i<slist.size(); i++){\n System.out.println(slist.get(i).getStudent());\n }\n }",
"public Student[] listStudents(long id) {\n\t\treturn new Tutor().listMyStudents(id);\n\t}",
"public List<Student> getAllStudentData() {\r\n\t\tList<Student> list = new ArrayList<Student>();\r\n\t\ttry {\r\n\t\t\tConnection con = DatabaseUtility.getCon(inputStream);\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"select * from student\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tStudent stud = new Student();\r\n\r\n\t\t\t\tstud.setRollno(rs.getInt(1));\r\n\t\t\t\tstud.setFname(rs.getString(2));\r\n\t\t\t\tstud.setLname(rs.getString(3));\r\n\t\t\t\tstud.setEmail(rs.getString(4));\r\n\t\t\t\tstud.setGender(rs.getString(5));\r\n\t\t\t\tstud.setDOB(rs.getString(6));\r\n\t\t\t\tstud.setAddress(rs.getString(7));\r\n\t\t\t\tstud.setContact(rs.getString(8));\r\n\r\n\t\t\t\tlist.add(stud);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(ex);\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}",
"@Override\r\n\tpublic Students findStudents() {\n\t\treturn null;\r\n\t}",
"public List<Student> findAllStudentsByName(String name) {\n\t\t\n\t\tArrayList<Student> list = new ArrayList<Student>();\n\t\t\n\t\tname = name.toLowerCase();\n\t\t\n\t\tfor(Student s : students) {\n\t\t\tString sName = s.getName().toLowerCase();\n\t\t\tif (sName.startsWith(name)) {\n\t\t\t\tlist.add(s);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn list;\n\t}",
"@Override\n\tpublic List<Student> getAllStudents() {\n\t\tList<Student> students = new ArrayList<Student>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\t//select CAST(gpa as DECIMAL(3,2)) AS gpa from student;\n\t\t\t//ResultSet rs = stmt.executeQuery(\"select * from student\");\n\t\t\tResultSet rs = stmt.executeQuery(\"select ID, Firstname, Lastname, Program, CAST(gpa as DECIMAL(3,2)) AS gpa from student\");\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tStudent stu = new Student();\n\t\t\t\tstu.setStudentid(rs.getInt(\"ID\"));\n\t\t\t\tstu.setFirstname(rs.getString(\"Firstname\"));\n\t\t\t\tstu.setLastname(rs.getString(\"Lastname\"));\n\t\t\t\tstu.setProgram(rs.getString(\"Program\"));\n\t\t\t\tstu.setGpa(rs.getDouble(\"GPA\"));\n\n\t\t\t\tstudents.add(stu);\n\t\t\t}\n\t\t\t\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn students;\n\t}",
"public interface SearchStudentService {\n List<Student> searchStudentByName(String name);\n}",
"public List<Student> searchStudent(Map<String, String> map);",
"public ArrayList<Student> getAllStudents() throws SQLException {\r\n\t\tArrayList<Student> studentList = new ArrayList<Student>();\r\n\t\tConnection dbConnection = null;\r\n\r\n\t\ttry {\r\n\t\t\tdbConnection = openConnection();\r\n\r\n\t\t\tString sqlText = \"SELECT id, firstname, lastname, streetaddress, postcode, postoffice \"\r\n\t\t\t\t\t+ \"FROM Student ORDER BY id DESC\";\r\n\r\n\t\t\tPreparedStatement preparedStatement = dbConnection.prepareStatement(sqlText);\r\n\r\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\r\n\r\n\t\t\twhile (resultSet.next()) {\r\n\t\t\t\tint id = resultSet.getInt(\"id\");\r\n\t\t\t\tString firstname = resultSet.getString(\"firstname\");\r\n\t\t\t\tString lastname = resultSet.getString(\"lastname\");\r\n\t\t\t\tString streetaddress = resultSet.getString(\"streetaddress\");\r\n\t\t\t\tString postcode = resultSet.getString(\"postcode\");\r\n\t\t\t\tString postoffice = resultSet.getString(\"postoffice\");\r\n\r\n\t\t\t\tstudentList.add(new Student(id, firstname, lastname, streetaddress, postcode, postoffice));\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException sqle) {\r\n\t\t\tthrow sqle; // Let the caller decide what to do with the exception\r\n\r\n\t\t} finally {\r\n\t\t\tcloseConnection(dbConnection);\r\n\t\t}\r\n\t\treturn studentList;\r\n\t}",
"@Override\r\n public List<String> getStudenti() {\r\n List<Studente> listaStudenti = studenteFacade.findAll();\r\n List<String> result = new ArrayList<>();\r\n\r\n for (Studente s : listaStudenti) {\r\n result.add(s.toString());\r\n }\r\n return result;\r\n }",
"public ArrayList<Student> selectAllStudents() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n ArrayList<Student> studentList = new ArrayList<>();\n try {\n Class.forName(Tools.MYSQL_JDBC_DRIVER);\n\n connection = DriverManager.getConnection(Tools.DB_URL, Tools.USERNAME, Tools.PASSWORD);\n\n statement = connection.createStatement();\n\n String query = \"SELECT * FROM STUDENTS;\";\n\n resultSet = statement.executeQuery(query);\n\n while (resultSet.next()) {\n String id = resultSet.getString(\"STUDENT_ID\");\n String lastName = resultSet.getString(\"LAST_NAME\");\n String firstName = resultSet.getString(\"FIRST_NAME\");\n String dob = resultSet.getString(\"DATE_OF_BIRTH\");\n float fees = resultSet.getFloat(\"TUITION_FEES\");\n Student student = new Student(id, firstName, lastName, dob, fees);\n\n studentList.add(student);\n\n }\n\n } catch (ClassNotFoundException | SQLException e) {\n e.printStackTrace();\n } finally {\n if (resultSet != null) {\n try {\n resultSet.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n\n if (statement != null) {\n try {\n statement.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n if (connection != null) {\n try {\n connection.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n return studentList;\n }",
"List<Student> selectByExample(StudentExample example);",
"@Test\n public void testFindAllStudents() throws Exception {\n List<Students> list = cs.findAllStudents();\n for (Students stu :\n list) {\n System.out.println(stu);\n }\n }",
"public void findallstudentservice() {\n\t\t dao.findallstudent();\r\n\t\t\r\n\t}",
"public List<Student> getAllStudents() throws IOException {\n\t\tstudentList = studentListGenerator.generateList(\"StudentList.txt\");\n\t\treturn studentList;\n\t}",
"public List<Student> fetch() {\n List<Student> studentList = new ArrayList<>();\n String[] columns = new String[]{DatabaseHelper.ID, DatabaseHelper.STUDENT_NAME, DatabaseHelper.STUDENT_ADDRESS};\n Cursor cursor = sqLiteDatabase.query(DatabaseHelper.TABLE_NAME, columns, null,\n null, null, null, null);\n while (cursor.moveToNext()) {\n Student student = new Student(cursor.getString(cursor.getColumnIndex(DatabaseHelper.STUDENT_NAME)),\n cursor.getString(cursor.getColumnIndex(DatabaseHelper.STUDENT_ADDRESS)),\n cursor.getInt(cursor.getColumnIndex(DatabaseHelper.ID)));\n studentList.add(student);\n }\n return studentList;\n }",
"public ArrayList<Student> getStudentsForCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n String statement = GET_SUDENTS_FOR_COURSE;\n \n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n \n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsForCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n \n return result;\n }",
"List<NominatedStudentDto> showAll();",
"private static String searchStudent ( int studentId){\n for (Student s : studentDB) {\n if (s.getID() == studentId) {\n return s.getName();\n }\n }\n return \"\";\n }",
"@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response list() {\n\t\t//System.out.println(\"================================= public Response list()\");\n\t\tIterable<Student> students = this.studentService.findAll();\n\t\tif (students != null) {\n\t\t\tList<StudentModelBasic> sbmList = new ArrayList<>();\n\t\t\tfor (Student s : students) {\n\t\t\t\tsbmList.add(this.studentService.convertToModelBasic(s));\n\t\t\t}\n\t\t\t//System.out.println(students.toString());\n\t\t\treturn Response.ok(sbmList).build();\n\t\t} else {\n\t\t\treturn Response.status(Status.NOT_FOUND).build();\n\t\t}\n\t}",
"@Override\r\n\tpublic List<StudentBean> getStudentsByClassId(String classId) {\n\t\treturn studentDAO.getStudentsByClassId(classId);\r\n\t}",
"Student[] getStudents(){\n\t\treturn enrolled.toArray(new Student[enrolled.size()]);\n\t}",
"Student findWithSectionsBy(int studentNumber);",
"List<T> getResults();",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Student> getStudents(String order) {\n\t\tlog.info(\"Get all Students order = \" + order);\n\t\tList<Student> students = new ArrayList<Student>();\n\t\tif (order.equals(\"Matrikelnummer\")) {\n\t\t\tstudents = query_getAllStudentsOrderMatnr.execute();\n\t\t} else if(order.equals(\"Nachname\")) {\n\t\t\tstudents = query_getAllStudentsOrderNachname.execute();\n\t\t}\n\t\tlog.debug(\"Student List contains \" + students.size() + \" students\");\n\t\treturn students;\n\t}",
"private final List<Object> searchForResults(@Nullable String query)\n {\n ArrayList<Object> results = new ArrayList<>();\n try {\n results.addAll(crDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the cr dao for results.\", e);\n }\n\n try {\n results.addAll(customMonsterDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the custom monster dao for results.\", e);\n }\n\n try {\n results.addAll(monsterDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the standard monster dao for results.\", e);\n }\n\n return results;\n }",
"public List<Student> getStudentsByFirstName(String fname) {\n\t\tList<Student> sameNames = new ArrayList<Student>();\r\n\t\t\r\n\t\t//loop over array list\r\n\t\t//for student type elements in the students array list do\r\n\t\tfor(Student student: students) {\r\n\t\t\t//if i find a student with the given first name then add to list\r\n\t\t\tif(student.getFirstName().equalsIgnoreCase(fname)) {\r\n\t\t\t\tsameNames.add(student);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//check if list has any students\r\n\t\tif(sameNames.size()>0) {\r\n\t\t\t//if students were found then return the list\r\n\t\t\treturn sameNames;\r\n\t\t}\r\n\t\t\r\n\t\t//if no students were found with that first name then return null\r\n\t\treturn null;\r\n\t}",
"public Iterable<StudentQualificationPersonDetail> getStudentRegisteredData(){\n\t\t\n\t\treturn sqcRepository.findAll();\n\t}",
"public List<User> getStudents(Group currentGroup);",
"List<ResultDTO> search(String query);",
"public ArrayList<Student> retrieveAllCurrent() {\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.users inner join `is480-matching`.students on users.id=students.id WHERE users.type LIKE 'Student';\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\tDate date = new Date();\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tcal.setTime(date);\r\n\t\t\r\n\t\tint currYear = cal.get(cal.YEAR);\r\n\t\tint currMth = cal.get(cal.MONTH);\r\n\t\t\r\n\t\tint year = 0;\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint id \t\t\t\t= Integer.parseInt(array.get(0));\r\n\t\t\tString username \t= array.get(1);\r\n\t\t\tString fullName \t= array.get(2);\r\n\t\t\tString contactNum \t= array.get(3);\r\n\t\t\tString email \t\t= array.get(4);\r\n\t\t\tString type\t\t\t= array.get(5);\r\n\t\t\tString secondMajor \t= array.get(7);\r\n\t\t\tint role \t\t\t= Integer.parseInt(array.get(8));\r\n\t\t\tint teamId \t\t\t= Integer.parseInt(array.get(9));\r\n\t\t\tint prefRole \t\t= Integer.parseInt(array.get(10));\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tint matricYear = Integer.parseInt(username.substring(username.length() - 4, username.length()));\r\n\t\t\t\t\r\n\t\t\t\tyear = currYear - matricYear;\r\n\t\t\t\t\r\n\t\t\t\tStudent student = new Student(id, username, fullName, contactNum, email, type, secondMajor, role, teamId, prefRole);\r\n\t\t\t\t\r\n\t\t\t\tif(currMth > 8){\r\n\t\t\t\t\tyear++;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(year == 3 || year == 4){\r\n\t\t\t\t\tstudents.add(student);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}catch(Exception e){}\r\n\t\t}\r\n\t\t\r\n\t\treturn students;\r\n\t}",
"@Override\n\t@Transactional\n\tpublic List<Student> getStudents() {\n\t\tAuthentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tString username = authentication.getName();\n\t\tSystem.out.println(\"The username is: \"+username);\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\tQuery<Student> query = currentSession.createQuery(\"from Student s where s.username='\"+username+\"'\", Student.class);\n\t\t\n List<Student> students = query.getResultList();\n\t\t\n\t\treturn students;\n\t}",
"@GetMapping(\"/students/{studentId}\")\n @ApiOperation(value = \"Search StudyClasses by its students\")\n public List<StudyClassDTO> findByStudentStudentId(\n @ApiParam(value = \"The student studentId\") @PathVariable String studentId) {\n return studyClassService.findByStudentStudentId(studentId);\n }",
"@GetMapping(path = \"/std/all\")\n\tpublic @ResponseBody Iterable<student> getAllStsudents() {\n\t\treturn studentRepo.findAll();\n\n\t}",
"@GetMapping(\"/students\")\n @Timed\n @RegionBasedQuery\n public ResponseEntity<List<StudentVo>> getAllStudents(StudentCriteria criteria, @ApiParam Pageable pageable) {\n log.debug(\"REST request to get Students by criteria: {}\", criteria);\n\n Page<StudentVo> page = studentQueryService.findStudentVosByCriteria(criteria, pageable);\n\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/students\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"@Transactional(readOnly = true)\n\t@Override\n\tpublic Event search(RequestContext context) {\n\t\tRegisterStudentsForm form = getForm(context);\n\t\tString name = form.getCurrentSearch();\n\t\tList<Student> students = name == null ? new ArrayList<Student>()\n\t\t\t\t: Student.findStudentsByName(name).getResultList();\n\t\tList<RegisterStudentsSearchResult> results = new ArrayList<RegisterStudentsSearchResult>();\n\t\tIterator<Student> iterator = students.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tStudent student = iterator.next();\n\t\t\tresults.add(new RegisterStudentsSearchResult(student, form\n\t\t\t\t\t.getStudentsToRegister().contains(student.getId())));\n\t\t}\n\t\tcontext.getViewScope().put(\"searchResults\", results);\n\t\treturn success();\n\t}",
"@GetMapping(\"/api/students\")\n public ResponseEntity<List<StudentDto>> getAllStudents() {\n return ResponseEntity.ok(studentService.getAllStudents());\n }",
"List<ResultDTO> searchUser(String query);",
"@RequestMapping( value = \"/{id}/student\", method = RequestMethod.GET )\n public Set<StudentDTO> readStudents(@PathVariable(value=\"id\") long id){\n return classService.read(id).getStudents();\n }",
"@Override\n\t public List<Student> getAllStudent(BigInteger stdId){\n\t \t\n\t\t \n\t \treturn (List<Student>) studentrepo.findAll(); \t\n\t }",
"public List<StaffPojo> staffSearchByName(String sname) {\n\t\treturn staffDao.staffSearchByName(sname);\n\t}",
"private static List<Student> getStudents() {\n \t\n List<Student> studentList = new ArrayList<>();\n Scanner readStudents=null;\n try {\n\t\t\treadStudents = new Scanner(new File(\"src/Student.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Student file not found.\");\n\t\t}\n\t\twhile(readStudents.hasNextLine()) {\n\t\t\tString[] studentLine = readStudents.nextLine().split(\",\");\n\t\t\tlong studentId= Long.parseLong(studentLine[0]);\n\t\t\tint age = Integer.parseInt(studentLine[4]);\n\t\t\tlong recordId = Long.parseLong(studentLine[5]);\n \tStudent newStudent = new Student(studentId,age,studentLine[1],studentLine[2],studentLine[3],recordId);\n \tstudentList.add(newStudent);\n\t\t}\n \n readStudents.close();\n return studentList;\n }",
"public List<Student> stulist() throws Exception {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql:///stuu\", \"root\", \"root\");\n\t\tPreparedStatement ps = conn.prepareStatement(\"select * from student\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tList<Student> list = new ArrayList<Student>();\n\t\twhile(rs.next())\n\t\t{\n\t\t\tStudent s = new Student(rs.getInt(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6));\n\t\t\tlist.add(s);\n\t\t}\n\t\trs.close();\n\t\tps.close();\n\t\tconn.close();\n\t\treturn list;\n\t}",
"@Query(\"select firstName,score from Student\")\n\tList<Object[]> findAllStudentWithScores();",
"List<Student> getAll() {\n\t\tSessionFactory sessionFactory = null;\n\t\tStandardServiceRegistry registry = new StandardServiceRegistryBuilder()\n\t\t\t\t.configure()\t// hibernate.cfg.xml\n\t\t\t\t.build();\n\t\ttry {\n\t\t\tsessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n\t\t} catch (Exception ex) {\n\t\t\tStandardServiceRegistryBuilder.destroy(registry);\n\t\t\tSystem.out.println(\"Setup Failed:\" + ex.getMessage());\n\t\t}\n\t\t// session = configObj.buildSessionFactory(serviceRegistryObj).openSession();\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tx = null;\n\t\ttry {\n\t\t\ttx = session.beginTransaction();\n\t\t\tList data = session.createQuery(\"FROM Student\").list();\n\t\t\tfor (Iterator iterator = data.iterator(); iterator.hasNext();) {\n\t\t\t\tStudent st = (Student) iterator.next();\n\t\t\t\tSystem.out.print(\"Student ID: \" + st.getStudentId());\n\t\t\t\tSystem.out.print(\" Last Name: \" + st.getName());\n\t\t\t\tSystem.out.println(\" Address: \" + st.getAddress());\n\t\t\t}\n\t\t\ttx.commit();\n\t\t\treturn data;\n\t\t} catch (HibernateException e) {\n\t\t\tif (tx != null)\n\t\t\t\ttx.rollback();\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t\treturn null;\n\t}",
"public List<users> getStudents(String course_ID){\n String stringStudents = usersRepository.getStudents(course_ID);\r\n //chop up string and put it into a list of students\r\n List<users> listOfStudents = new ArrayList<>();\r\n //returns empty list if no students are found\r\n if(stringStudents.length() <=1){\r\n return listOfStudents;\r\n }\r\n String[] students = stringStudents.split(\" \");\r\n for(int i = 0; i < students.length; i++) {\r\n if(!students[i].equals(\"\")) {\r\n listOfStudents.add(usersRepository.getAStudent(students[i]));\r\n }\r\n }\r\n return listOfStudents;\r\n }",
"public List<User> searchUser(String searchValue);",
"public ArrayList<Student> getStudents()\n {\n return students;\n }",
"@Override\n public List<Book> result(List<Book> books) {\n return search.result(books);\n }",
"public List<Student> getCampusStudent(Campus c) {\n\t\tList<Student> allStudentList = new ArrayList<Student>();\n\t\tConnection conn = DBUtil.getConn();\n\t\tStatement stmt = DBUtil.createStmt(conn);\n\t\tString sql = \"select * from student where ville='%s' and region='%s' order by stu_ID \";\n\t\tsql = String.format(sql, c.getVille(), c.getRegion());\n\t\tSystem.out.println(sql);\n\t\tResultSet rst = DBUtil.getRs(stmt, sql);\n\t\ttry {\n\t\t\twhile (rst.next()) {\n\t\t\t\tStudent student = new Student();\n\t\t\t\tfillRsStudent(rst, student);\n\t\t\t\tallStudentList.add(student);\n\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn allStudentList;\n\t}",
"public ArrayList <Students> getStudentList ()\n\n {\n\n // Returns studentList when called.\n return studentList;\n\n }",
"@Override\r\n\tpublic List<Student> selectStudent(String name, String alias) {return null;\r\n\t}"
] | [
"0.7324042",
"0.7313701",
"0.72825235",
"0.70650697",
"0.689222",
"0.68712395",
"0.68306744",
"0.6785665",
"0.67383045",
"0.67269313",
"0.6680644",
"0.6650961",
"0.66500044",
"0.6605244",
"0.6588344",
"0.6578396",
"0.65648645",
"0.6553648",
"0.65371424",
"0.65343106",
"0.6521664",
"0.65128887",
"0.6477389",
"0.64747816",
"0.64747",
"0.64724725",
"0.6456614",
"0.6451478",
"0.6447744",
"0.64384407",
"0.64255965",
"0.64005",
"0.6388407",
"0.6359463",
"0.63469744",
"0.6340471",
"0.6326113",
"0.63239264",
"0.63215226",
"0.63181704",
"0.6311697",
"0.630978",
"0.62949663",
"0.6293293",
"0.628921",
"0.62653595",
"0.62563145",
"0.62547773",
"0.6254669",
"0.6251968",
"0.6238037",
"0.6232875",
"0.6198774",
"0.6190526",
"0.618977",
"0.618561",
"0.61718684",
"0.6168985",
"0.6163796",
"0.6149924",
"0.61265665",
"0.6124493",
"0.6114802",
"0.6105624",
"0.60975826",
"0.6088737",
"0.608727",
"0.60818547",
"0.6075529",
"0.6071633",
"0.60659975",
"0.6065224",
"0.6063873",
"0.60620683",
"0.60521847",
"0.60498166",
"0.60488296",
"0.6032612",
"0.6032167",
"0.6028492",
"0.60182893",
"0.60165346",
"0.6010172",
"0.6008966",
"0.6000919",
"0.599646",
"0.5993977",
"0.5987101",
"0.59845275",
"0.5981543",
"0.59812033",
"0.5971313",
"0.59666735",
"0.59610206",
"0.5956498",
"0.5955656",
"0.59527403",
"0.59427464",
"0.59422445",
"0.59294564"
] | 0.751041 | 0 |
Retrieves the studentProgramnformation details from the CRM System | @Override
public List<StudentProgramInfo> getStudentProgramInformation(
Student studentSearchDTO) throws StudentServiceException {
ProgramOfStudyResponse programOfStudyResponse =studentSearchClient.getProgramsOfStudy(studentSearchDTO);
return getStudentProgramInfoList(programOfStudyResponse,studentSearchDTO);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic StudentProgramInfo getActiveStudentProgramInformation(Student studentSearchDTO) throws StudentServiceException {\r\n\t\tList<StudentProgramInfo> studentProgramInfoList = getStudentProgramInformation(studentSearchDTO);\r\n\t\tStudentProgramInfo stdProgramInfo= new StudentProgramInfo();\r\n\t\tif(studentProgramInfoList.size()>0){\r\n\t\t\tfor(StudentProgramInfo stdProgInfo : studentProgramInfoList) {\r\n\t\t\t\tString enrollmentStatus = stdProgInfo.getEnrollmentStatus();\r\n\t\t\t\tif(enrollmentStatus!=null && (enrollmentStatus.equalsIgnoreCase(\"Active\") ||enrollmentStatus.equalsIgnoreCase(\"Conditionally Accepted\") )) {\r\n\t\t\t\t\treturn stdProgInfo;\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t\treturn studentProgramInfoList.get(0);\r\n\t\t}\r\n\t\tstdProgramInfo.setProgramOfStudyId(\"N/A\");\r\n\t\tstdProgramInfo.setEnrollmentStatus(\"N/A\");\r\n\t\tstdProgramInfo.setProgramCode(\"N/A\");\r\n\t\tstdProgramInfo.setProgramVersionCode(\"N/A\");\r\n\t\t//Using ProgramVersion from the service for the programName\r\n\t\tstdProgramInfo.setProgramName(\"N/A\");\r\n\t\tstdProgramInfo.setStateCode(\"N/A\");\r\n\t\tstdProgramInfo.setCatalogCode(\"N/A\");\r\n\t\t\r\n\t\t//stdProgramInfo.setStudentCrmId(student.getCrmId());\r\n\t\t//stdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());\r\n\t\t//stdProgramInfo.setExpectedStartDate(pos.getExpectedStartDate());\r\n\t\t//need to see how to get catalogcode and state code\r\n \t\treturn stdProgramInfo;\r\n\t}",
"private List<StudentProgramInfo> getStudentProgramInfoList(\r\n\t\t\tProgramOfStudyResponse programOfStudyResponse,Student student) {\r\n\t\tList<StudentProgramInfo> studentProgramList = new ArrayList<StudentProgramInfo>();\r\n\t\tSimpleDateFormat dateFormat =new SimpleDateFormat(\"MM/dd/yyyy\");\r\n\t\tif(programOfStudyResponse!=null && programOfStudyResponse.size()>0){\r\n\t\t\tfor(ProgramOfStudy pos:programOfStudyResponse){\r\n\t\t\t\tStudentProgramInfo stdProgramInfo = new StudentProgramInfo();\r\n\t\t\t\tstdProgramInfo.setProgramOfStudyId(pos.getProgramOfStudyId());\r\n\t\t\t\tstdProgramInfo.setEnrollmentStatus(pos.getEnrollmentStatus());\r\n\t\t\t\tstdProgramInfo.setProgramCode(pos.getProgramCode());\r\n\t\t\t\tstdProgramInfo.setProgramVersionCode(pos.getProgramVersionCode());\r\n\t\t\t\t//Using ProgramVersion from the service for the programName\r\n\t\t\t\tstdProgramInfo.setProgramName(pos.getProgramVersion());\r\n\t\t\t\tstdProgramInfo.setStudentCrmId(student.getCrmId());\r\n\t\t\t\tstdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());\r\n \t\t\t if(pos.getExpectedStartDate()!=null){\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tstdProgramInfo.setExpectedStartDate(dateFormat.parse(pos.getExpectedStartDate()));\r\n\t\t\t\t\t} catch (ParseException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//\r\n\t\t\t\t//need to see how to get catalogcode and state code\r\n\t\t\t\tstudentProgramList.add(stdProgramInfo);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t/*TODO: ADDING THIS BECAUSE THERE ARE PLACES WE ARE JUST ASSUMING PROGRAM IS AVAILABLE. FIX ME */\r\n\t\t\tStudentProgramInfo stdProgramInfo= new StudentProgramInfo();\r\n\t\t\t \r\n\t\t\tstdProgramInfo.setProgramOfStudyId(\"N/A\");\r\n\t\t\tstdProgramInfo.setEnrollmentStatus(\"N/A\");\r\n\t\t\tstdProgramInfo.setProgramCode(\"N/A\");\r\n\t\t\tstdProgramInfo.setProgramVersionCode(\"N/A\");\r\n\t\t\t//Using ProgramVersion from the service for the programName\r\n\t\t\tstdProgramInfo.setProgramName(\"N/A\");\r\n\t\t\t//stdProgramInfo.setStudentCrmId(student.getCrmId());\r\n\t\t\t//stdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());\r\n\t\t\t//stdProgramInfo.setExpectedStartDate(pos.getExpectedStartDate());\r\n\t\t\t//need to see how to get catalogcode and state code\r\n\t\t\tstudentProgramList.add(stdProgramInfo);\r\n\r\n\t\t}\r\n \t\treturn studentProgramList;\r\n\t}",
"public RegisteredStudent getStudentAndRegistration(int stID, String year) {\r\n RegisteredStudent reg = null;\r\n DBConnectionManager cm = new DBConnectionManager(this.dbMgr.getDBConnectionData(DBManager.MYSQL));\r\n ResultSet rs = cm.getResultsSQL(\"select * from TRegistration where STUDENT_ID = \" + stID + \" and YEAR = '\" + year + \"'\");\r\n reg = new RegisteredStudent();\r\n try {\r\n if (rs.next()) {\r\n reg.setRegistrationID(rs.getInt(\"REGISTRATION_ID\"));\r\n reg.setStudentID(rs.getInt(\"STUDENT_ID\"));\r\n reg.setYear(rs.getString(\"YEAR\"));\r\n reg.setLocationID(rs.getInt(\"LOCATION_ID\"));\r\n reg.setSessionID(rs.getInt(\"SESSION_ID\"));\r\n reg.setStatus(rs.getInt(\"STATUS\"));\r\n reg.setLevel(rs.getString(\"LEVEL\"));\r\n if ( reg.getLevel() != null && !reg.getLevel().trim().equals(\"\"))\r\n {\r\n reg.setLevelCode(Integer.parseInt(reg.getLevel()));\r\n }\r\n reg.setContactPhone1(rs.getString(\"CONTACT_PHONE1\"));\r\n reg.setContactPhone2(rs.getString(\"CONTACT_PHONE2\"));\r\n reg.setPaymentID(rs.getString(\"PP_PAYMENT_ID\"));\r\n reg.setPaymentAmount(rs.getDouble(\"PAYMENT_AMOUNT\"));\r\n reg.setTransactionID(rs.getString(\"PP_TRANSACTION_ID\"));\r\n reg.setTshirtSize(rs.getString(\"TSHIRT_SIZE\"));\r\n reg.setTshirtSizeCode(this.commonData.getTshirtCode(reg.getTshirtSize()));\r\n try {\r\n reg.setLastUpdated(\"\" + rs.getTimestamp(\"LAST_UPDATED\"));\r\n } catch (SQLException se) {\r\n reg.setLastUpdated(\"\");\r\n }\r\n reg.setAdCode(rs.getInt(\"AD_CODE\"));\r\n reg.setAdNote(rs.getString(\"AD_NOTE\"));\r\n reg.setStateOfResidency(rs.getString(\"RESIDENCY_STATE\"));\r\n reg.setDiscountCodeId(rs.getInt(\"DISCOUNT_CODE_ID\"));\r\n reg.setDiscountTypeId(rs.getInt(\"DISCOUNT_TYPE_ID\"));\r\n reg.setDiscountTypeName(rs.getString(\"DISCOUNT_TYPE_NAME\"));\r\n if (reg.getDiscountTypeName() == null) {\r\n reg.setDiscountTypeName(\"\");\r\n }\r\n try {\r\n reg.setDateTime(\"\" + rs.getTimestamp(\"REG_DATE\"));\r\n } catch (SQLException se) {\r\n reg.setDateTime(\"\");\r\n }\r\n String memo = rs.getString(\"MEMO\");\r\n if (memo == null) {\r\n memo = \"\";\r\n }\r\n reg.setParentNote(memo);\r\n String adminMemo = rs.getString(\"ADMIN_MEMO\");\r\n if (adminMemo == null) {\r\n adminMemo = \"\";\r\n }\r\n reg.setAdminNote(adminMemo);\r\n reg.setUpdatedBy(rs.getInt(\"UPDATED_BY\"));\r\n // get location and session info\r\n Location l = this.getLocationByID(reg.getLocationID());\r\n if ( l != null )\r\n {\r\n reg.setLocationCode(l.getLocationCode());\r\n LocationSession ls = l.getSession(reg.getSessionID());\r\n if ( ls != null )\r\n {\r\n reg.setSessionName(ls.getSessionInfo());\r\n }\r\n }\r\n \r\n }\r\n rs = cm.getResultsSQL(\"select * from TStudents where STUDENT_ID = \" + stID);\r\n if (rs.next()) {\r\n reg.setStudentID(rs.getInt(\"STUDENT_ID\"));\r\n reg.setStudentIdentificationCode(rs.getString(\"STUDENT_IDENTIFICATION_CD\"));\r\n reg.setAddress1(rs.getString(\"ADDRESS1\"));\r\n reg.setAddress2(rs.getString(\"ADDRESS2\"));\r\n reg.setCity(rs.getString(\"CITY\"));\r\n reg.setEthnicGroupCode(rs.getInt(\"ETHNIC_GROUP\"));\r\n reg.setEthnicGroupName(commonData.getEthnicGroupName(reg.getEthnicGroupCode()));\r\n reg.setFirstName(rs.getString(\"FIRST_NAME\"));\r\n reg.setGenderCode(rs.getInt(\"GENDER\"));\r\n reg.setGender(commonData.getGenderName(reg.getGenderCode()));\r\n reg.setLastName(rs.getString(\"LAST_NAME\"));\r\n reg.setMiddleName(rs.getString(\"MIDDLE_NAME\"));\r\n reg.setParentGuardianEmail(rs.getString(\"PARENT_GUARDIAN_EMAIL\"));\r\n reg.setSchoolName(rs.getString(\"SCHOOL_NAME\"));\r\n reg.setState(rs.getString(\"STATE\"));\r\n reg.setStudentEmail(rs.getString(\"STUDENT_EMAIL\"));\r\n reg.setTeacherEmail(rs.getString(\"TEACHER_EMAIL\"));\r\n reg.setTeacherFirstName(rs.getString(\"TEACHER_FIRST_NAME\"));\r\n reg.setTeacherLastName(rs.getString(\"TEACHER_LAST_NAME\"));\r\n reg.setZipcode(rs.getString(\"ZIPCODE\"));\r\n reg.setCountryOfOrigin(rs.getString(\"COUNTRY_OF_ORIGIN\"));\r\n }\r\n\r\n } catch (SQLException se) {\r\n System.out.println(\"Error in BusinessProcessControl [getStudentAndRegistration()]: \" + se);\r\n } finally {\r\n DBConnectionManager.dropConnObject(rs);\r\n cm.freeConnection();\r\n cm = null;\r\n }\r\n return reg;\r\n }",
"public Student get(CPF studentCpf) throws PhoneException, CPFException, DateException, AddressException,\n\t\t\t\t\t\t\t\t\t\t\t\tRGException, StudentException, PersonException {\n\t\t\n\t\tResultSet resultOfTheSearch = null;\n\t\tString receivedCPF = studentCpf.getCpf();\n\t\t\n\t\tString query = \"SELECT * FROM \" + STUDENT_TABLE_NAME + \" WHERE \" + CPF_COLUMN + \"= '\" + receivedCPF + \"'\"; \n\t\tStudent student = null;\n\n\t\ttry{\n\t\t\tresultOfTheSearch = this.search(query);\n\t\t\twhile(resultOfTheSearch.next()){\n\t\t\t\tstudent = getFoundStudent(resultOfTheSearch);\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e){\n\t\t\tthrow new StudentException(COULDNT_FIND_STUDENTS);\n\t\t}\n\t\treturn student;\n\t}",
"StudentRecord getStudent(String recordId, String clientId) throws Exception;",
"public void getStudentNameStudentDsc()\n\t{\n\t\tDatabaseHandler db = new DatabaseHandler(getApplicationContext());\n\n\t\tstudent_name_list_studname_dsc = db.getStudentNameAllEnquiryStudentDsc();\n\t\tIterator itr = student_name_list_studname_dsc.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tSystem.out.println(itr.next());\n\t\t}\n\t}",
"public String getStudent(){\n\t\t\n\t\treturn this.student;\n\t}",
"public static void students_info() throws SQLException{\n\t\ttry\n\t\t{ \n\n\t\t\tString sid = new String();\n\t\t\n\t\t \tSystem.out.println(\"Please enter the students sid (starting with 'B') \\n\"); \n\t\t \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in )); \n\t\n\t\t\tsid = br.readLine();\n\t\t\t\n//Connection to Oracle server\n OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();\n ds.setURL(\"jdbc:oracle:thin:@grouchoIII.cc.binghamton.edu:1521:ACAD111\");\n\tConnection conn = ds.getConnection(\"vbobhat1\", \"BingData\");\n\t \nCallableStatement cs = conn.prepareCall (\"begin StudRegSys.student_info(:1,:2,:3); end;\");\n\t\t\tcs.setString(1,sid);\n\t \t\tcs.registerOutParameter(2,OracleTypes.CURSOR); \n \tcs.registerOutParameter(3, Types.VARCHAR); \n\t \t\t\n//execute and retrieve the result set\n \t\tcs.execute();\n \t\tResultSet rs;\n\t\n \t\trs = (ResultSet)cs.getObject(2);\n \t\tboolean a1=false; \n\t\t\tSystem.out.println(\"SID\" + \"\\t\" + \"FIRSTNAME\" + \"\\t\" + \"LASTNAME\"+ \"\\t\" + \"DEPT-COURSE#\" + \"\\t\" + \"TITLE\"); \n \t\tSystem.out.println(\"---\" + \"\\t\" + \"---------\" + \"--------\" + \"\\t\" + \"-----------\" + \"\\t\" + \"-----\");\n\t\t\twhile (rs.next()) { \t \n \t \t \n \t\t\tSystem.out.println(sid + \"\\t\" + rs.getString(3) + \"\\t\" + rs.getString(1) + \"\\t\" + rs.getString(2));\n \t\n \t\t\ta1=true;\n \t\t}\n\t\t\t\n \t\tif(a1==false)\n\t \t\t\tSystem.out.println(\"The student is not enrolled for any course\");\n\t\t\n\t\t\t System.out.println(\"\\n\\n\");\n\n \t\tcs.close();\n\t \t\tconn.close();\t\t\n\t\t}\n\t\tcatch (SQLException ex) { System.out.println (\"\\n*** SQLException caught ***\\n\" + ex.getMessage());}\n catch (Exception e) {System.out.println (\"\\n*** other Exception caught ***\\n\");}\t\t\n\t}",
"public String toString(){\n\t\t \n\t\treturn this.scholarship + \": \" + this.student + \", Date Submitted: \" + this.date + \", GPA: \" + this.gpa + \", Education Level: \" + this.edulvl + \", Priority: \" + this.priority + \", Status: \" + this.status;\n\t}",
"private Student getFoundStudent(ResultSet resultOfTheSearch) throws PhoneException, SQLException, \n\tCPFException, DateException, AddressException, RGException, StudentException, PersonException {\n\n\t\t// Get the data from database\n\t\tString studentName = resultOfTheSearch.getString(NAME_COLUMN);\n\n\t\tString email = resultOfTheSearch.getString(EMAIL_COLUMN);\n\t\tString motherName = resultOfTheSearch.getString(MOTHER_COLUMN);\n\t\tString fatherName = resultOfTheSearch.getString(FATHER_COLUMN);\n\n\t\t//CPF\n\t\tString cpf = resultOfTheSearch.getString(CPF_COLUMN);\n\t\tCPF studentCpf = new CPF(cpf);\n\n\t\t//RG\n\t\tString rg = resultOfTheSearch.getString(RG_NUMBER_COLUMN);\n\t\tString uf = resultOfTheSearch.getString(UF_COLUMN);\n\t\tString issuing_institution = resultOfTheSearch.getString(ISSUING_INSTITUTION_COLUMN);\n\t\tRG studentRg = new RG(rg,issuing_institution,uf);\n\n\t\t//Address\n\t\tString city = resultOfTheSearch.getString(CITY_COLUMN);\n\t\tString addressInfo = resultOfTheSearch.getString(ADDRESS_COLUMN);\n\t\tString complement = resultOfTheSearch.getString(COMPLEMENT_COLUMN);\n\t\tString number = resultOfTheSearch.getString(NUMBER_COLUMN);\n\t\tString cep = resultOfTheSearch.getString(CEP_COLUMN);\n\t\tAddress address = new Address(addressInfo, number, complement, cep,city);\n\n\t\t//Phones\n\t\tString cellPhone = resultOfTheSearch.getString(PRINCIPAL_PHONE_COLUMN);\n\t\tString residencePhone = resultOfTheSearch.getString(SECONDARY_PHONE_COLUMN);\n\t\tString DDDPrincipalPhone = cellPhone.substring(0,2);\n\t\tString numberPrincipalPhone = cellPhone.substring(2,10);\n\t\t\n\t\tString DDDSecondaryPhone;\n\t\tString numberSecondaryPhone;\n\t\tPhone principalPhone;\n\t\tPhone secondaryPhone;\n\t\t\n\t\tif(!residencePhone.isEmpty()){\n\t\t\t\n\t\t\tDDDSecondaryPhone = residencePhone.substring(0,2);\n\t\t\tnumberSecondaryPhone = residencePhone.substring(2,10);\n\t\t\tprincipalPhone = new Phone(DDDPrincipalPhone,numberPrincipalPhone);\n\t\t\tsecondaryPhone = new Phone(DDDSecondaryPhone,numberSecondaryPhone);\n\t\t}else{\n\t\t\tprincipalPhone = new Phone(DDDPrincipalPhone,numberPrincipalPhone);\n\t\t\tsecondaryPhone = null;\n\t\t}\n\n\t\tDate birthdate = birthdate(resultOfTheSearch);\n\t\t//Status\n\t\tint status = resultOfTheSearch.getInt(STATUS_COLUMN);\n\t\t\n\t\tStudent student = new Student(studentName, studentCpf, studentRg, birthdate, email, address,\n\t\t\t\t\t\t\t\t\t principalPhone, secondaryPhone, motherName, fatherName, status);\n\t\n\t\treturn student;\n\t}",
"@Override\n\tpublic String getStudentData(String fn) throws RemoteException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Map<String, Object> getStudent() {\n\t\treturn getSession().selectOne(getNamespace() + \"getStudent\");\n\t}",
"public static void display_student() {\n\t\t\n\n \n\t\n\ttry {\n\t\t//jdbc code\n\t\tConnection connection=Connection_Provider.creatC();\t\t\n\n\t\tString q=\"select * from students\";\n\t\t// Create Statement\n\t\tStatement stmt=connection.createStatement();\n\t\tResultSet result=stmt.executeQuery(q);\n\t\twhile (result.next()) {\n\t\t\tSystem.out.println(\"Student id \"+result.getInt(1));\n\t\t\tSystem.out.println(\"Student Name \"+result.getString(2));\n\t\t\tSystem.out.println(\"Student Phone No \"+result.getInt(3));\n\t\t\tSystem.out.println(\"Student City \"+result.getString(4));\n\t\t\tSystem.out.println(\"=========================================\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\t\t\n\t}",
"static void getInformation(Connection conn, String student) throws SQLException {\n PreparedStatement st =\n conn.prepareStatement(\"SELECT * FROM StudentsFollowing WHERE personalCodeNumber = ?\");\n st.setString(1, student);\n ResultSet rs = st.executeQuery();\n while (rs.next()) {\n //Retrieve by column name\n String name = rs.getString(\"name\");\n String loginId = rs.getString(\"loginId\");\n String line = rs.getString(\"studyProgramme\");\n String branch = rs.getString(\"branch\");\n\n System.out.println(\"Information for student \" + student);\n System.out.println(\"-------------------------------------\");\n\n //Display values\n System.out.println(\"Name: \" + name);\n System.out.println(\"Student ID: \" + loginId);\n System.out.println(\"Line: \" + line);\n System.out.println(\"Branch: \" + branch);\n\n }\n System.out.println();\n System.out.println();\n\n\n System.out.println(\"Read courses (name (code), credits: grade):\");\n st = conn.prepareStatement(\"SELECT * FROM FinishedCourses WHERE student = ?\");\n st.setString(1, student);\n rs = st.executeQuery();\n while (rs.next()) {\n\n String courseName = rs.getString(\"name\");\n String courseCode = rs.getString(\"coursecode\");\n String credits = rs.getString(\"credits\");\n String grade = rs.getString(\"grade\");\n System.out.println(courseName + \" (\" + courseCode + \"), \" + credits + \"p: \" + grade);\n\n }\n System.out.println();\n System.out.println();\n\n st = conn.prepareStatement(\"SELECT * FROM Registrations WHERE student = ?\");\n st.setString(1, student);\n rs = st.executeQuery();\n System.out.println(\"Registered courses (name (code), credits: status):\");\n while (rs.next()) {\n\n String courseCode = rs.getString(\"course\");\n String status = rs.getString(\"status\");\n\n if (status.equals(\"waiting\")) {\n PreparedStatement st2 = conn.prepareStatement(\"SELECT * FROM CourseQueuePositions WHERE student = ? AND restrictedCourse = ?\");\n st2.setString(1, student);\n st2.setString(2, courseCode);\n ResultSet rs2 = st2.executeQuery();\n if (rs2.next()) {\n String number = rs2.getString(\"row_number\");\n System.out.println(courseCode + \", \" + status + \" \" + number);\n }\n } else {\n System.out.println(courseCode + \", \" + status);\n }\n\n }\n\n System.out.println();\n System.out.println();\n\n st = conn.prepareStatement(\"SELECT * from PathToGraduation WHERE student = ?;\");\n st.setString(1, student);\n rs = st.executeQuery();\n while (rs.next()){\n System.out.println(\"Seminar courses taken:\" + rs.getString(\"nbrofseminarcourses\"));\n System.out.println(\"Math credits taken:\" + rs.getString(\"mathCredits\"));\n System.out.println(\"Research credits taken:\" + rs.getString(\"researchCredits\"));\n System.out.println(\"Total credits taken:\" + rs.getString(\"totalcredits\"));\n System.out.println(\"Fulfills the requirements for graduation: \" + rs.getString(\"qualifiedforgraduation\"));\n System.out.println(\"-------------------------------------\");\n }\n rs.close() ;\n st.close() ;\n }",
"public String toString() {\r\n String st = \"Student Name: \" + getStudentName() +\r\n \" ID: \" + getStudentId() + \"\\n\";\r\n return st;\r\n }",
"public String getStudentId() {\n\treturn this.studentId;\n }",
"public String getStudentid() {\n return studentid;\n }",
"@Override\n\tpublic List<AASTranscriptSemester> getAASTranscriptSemester(String stuId, String acaYear, String semesterId) {\n\t\tList<AASTranscriptSemester> arr = new ArrayList<>();\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tconn = oConnection.getOracleConnection();\n\t\t\t//If semesterId == 4, it means it's SPRING semester, we have to change it into 1 because numYears variable bellow \n\t\t\t//which is the concatenation between academic year and semester Id (Ex: 20184, 20173,...) cannot be\n\t\t\t//like 20181, 20171, 20151, etc. it has to be like 20184, 20174, 20154, etc. \n\t\t\tif (semesterId.equals(\"4\"))\n\t\t\t\tsemesterId = \"1\";\n\t\t\tString numYear = acaYear + semesterId;\n\t\t\tString sql = \n\t\t\t\t\t\"select id_student,semester_name,aca_year,semester,term_gpa_aas,cum_gpa_aas\"+ \n\t\t\t\t\t\" from v_cum_gpa_aas\"+ \n\t\t\t\t\t\" where id_student = ?\" +\n\t\t\t\t\t\" and num_semester_year < ?\"+\n\t\t\t\t\t\" order by num_semester_year\"; \n\t\t\tstatement = conn.prepareStatement(sql);\n\t\t\tstatement.setString(1, stuId);\n\t\t\tstatement.setString(2, numYear);\n\t\t\trs = statement.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tarr.add(new AASTranscriptSemester(rs.getString(\"id_student\"),rs.getString(\"semester_name\"),rs.getString(\"aca_year\")\n\t\t\t\t\t\t, rs.getString(\"semester\"), rs.getDouble(\"term_gpa_aas\"), rs.getDouble(\"cum_gpa_aas\")));\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstatement.close();\n\t\t\tconn.close();\n\t\t\treturn arr;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (statement != null)\n\t\t\t\t\tstatement.close();\n\t\t\t\tif (conn != null)\n\t\t\t\t\tconn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void findallstudentservice() {\n\t\t dao.findallstudent();\r\n\t\t\r\n\t}",
"public String studentInfo()\n\t{\n\t\tString strStudentInfo;\n\t\tDecimalFormat percent = new DecimalFormat(\"0.0%\");\n\t\tdouble dRoundedCourseAverage;\n\t\tdouble dCourseAverage;\n\t\tdCourseAverage= courseAverage();\n\t\t\t\n\t\tdRoundedCourseAverage= Math.round(dCourseAverage);\n\t\tstrStudentInfo =\n\t\t(\"\\nName: \" + name +\n\t\t\"\\nCourse: \" + courseDesc +\n\t\t\"\\nNumber: \" + courseNum +\n\t\t\"\\nInstructor:\" + instructor +\n\t\t\"\\nGrades:\" +\n\t\t\"\\nTest: \\tAverage: \"+ average('t') +\"\\tPercent: \" + pctT +\n\t\t\"\\nQuizzes: \\tAverage: \"+ average('q') +\"\\tPercent: \" + pctQ +\n\t\t\"\\nProject: \\tAverage: \"+ average('p') +\"\\tPercent: \" + pctP +\n\t\t\"\\nCourse Average: \" + dCourseAverage + \"(or \"+\n\t\t\tpercent.format(dRoundedCourseAverage/100) + \")\");\n\t\treturn strStudentInfo;\n\t}",
"public int getStudentNum(){//return student Number\r\n \treturn studentNum;\r\n }",
"public Student getStudInfo(String section_id, String subject_id,\n\t\t\tString teacher_id) {\n\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_STUDENT_INFO + \" WHERE \"\n\t\t\t\t+ KEY_STU_SECTION_ID + \"=\" + section_id + \" AND \"\n\t\t\t\t+ KEY_STU_SUBJECT_ID + \"=\" + subject_id + \" AND \"\n\t\t\t\t+ KEY_STU_TEACHER_ID + \"=\" + teacher_id;\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\n\t\tif (cursor != null)\n\t\t\tcursor.moveToFirst();\n\t\tStudent info = new Student();\n\t\tinfo.row_id = Integer.parseInt(cursor.getString(0));\n\t\tinfo.id = cursor.getString(1);\n\t\tinfo.name = cursor.getString(3);\n\t\tinfo.roll_no = cursor.getString(4);\n\t\tinfo.total_marks = cursor.getString(5);\n\t\tinfo.comment = cursor.getString(6);\n\n\t\tcursor.close();\n\t\treturn info;\n\t}",
"public comprehensive_record findByStudent(String studentid) {\n\t\tString hql=\"from comprehensive_record cr where cr.personInfo.studentid=:studentid\";\r\n\t\treturn (comprehensive_record)getSession().createQuery(hql).setString(\"studentid\", studentid).uniqueResult();\r\n\t}",
"public ProgramScheduled getProgramScheduleById(int scheduleId);",
"@Override\n\tpublic org.kisti.edison.virtuallaboratory.model.Survey getSurvey(\n\t\tlong surveySeqNo)\n\t\tthrows com.liferay.portal.kernel.exception.PortalException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException {\n\t\treturn _surveyLocalService.getSurvey(surveySeqNo);\n\t}",
"public E returnStudent(String studentID){}",
"@Override\n\t public List<Student> getAllStudent(BigInteger stdId){\n\t \t\n\t\t \n\t \treturn (List<Student>) studentrepo.findAll(); \t\n\t }",
"@GET\n\t@Path(\"students/{nuid}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getStudentProfile(@PathParam(\"nuid\") String nuid){\n\t\tif(!studentDao.ifNuidExists(nuid)){\n\t\t\treturn Response.status(Response.Status.NOT_FOUND).entity(\"No Student record exists with given ID\").build();\n\t\t} else {\n\t\t\tStudents studentRecord = studentDao.getStudentRecord(nuid);\n\t\t\tJSONObject jsonObj = new JSONObject(studentRecord);\n\t\t\tArrayList<WorkExperiences> workEx = (ArrayList<WorkExperiences>) workExperiencesDao.getWorkExperiencesByNeuId(nuid);\n\t\t\tjsonObj.put(\"company\", workEx);\n\t\t\tArrayList<ElectivesAdmin> electives = (ArrayList<ElectivesAdmin>) electiveDao.getElectivesByNeuId(nuid);\n\t\t\tjsonObj.put(\"courses\", electives);\n\t\t\tList<ExtraExperiences> coop = extraExperiencesDao.getExtraExperiencesByNeuId(nuid);\n\t\t\tjsonObj.put(\"coopexperience\", coop);\n\t\t\tjsonObj.put(\"notes\",administratorNotesDao.getAdministratorNoteRecordByNeuId(nuid));\n\t\t\treturn Response.status(Response.Status.OK).entity(jsonObj.toString()).build();\n\t\t}\n\t}",
"public Iterable<StudentQualificationPersonDetail> getStudentRegisteredData(){\n\t\t\n\t\treturn sqcRepository.findAll();\n\t}",
"public String getStudentId() {\r\n return studentId;\r\n }",
"Assessment getAssessment();",
"static void initializeStudentSystem() {\r\n\r\n Course math = new Course(\"1000\", \"Mathematics\", \"College of Science\");\r\n Course computing = new Course(\"1001\", \"Computing\", \"College of Engineering\");\r\n Course english = new Course(\"1002\", \"English\", \"College of Liberal Arts\");\r\n Course history = new Course(\"1003\", \"History\", \"College of Liberal Arts\");\r\n Course biology = new Course(\"1004\", \"Biology\", \"College of Science\");\r\n courses.put(math.getCRN(), math);\r\n courses.put(computing.getCRN(), computing);\r\n courses.put(english.getCRN(), english);\r\n courses.put(history.getCRN(), history);\r\n courses.put(biology.getCRN(), biology);\r\n //\r\n User admin = new User();\r\n admin.setUsername(\"admin\");\r\n admin.setPassword(\"admin\");\r\n admin.setAccountType(4);\r\n accounts.put(admin.getUsername(), admin);\r\n //\r\n Student defaultStudent = new Student();\r\n defaultStudent.setName(\"Jose Cabrera\");\r\n defaultStudent.setUsername(\"John1\");\r\n defaultStudent.setPassword(\"123\");\r\n defaultStudent.setId(\"80539934\");\r\n defaultStudent.setMajor(\"CS\");\r\n defaultStudent.setAccountType(1);\r\n defaultStudent.setGraduationStatus(21);\r\n accounts.put(\"John1\", defaultStudent);\r\n //\r\n Student defaultStudent2 = new Student();\r\n defaultStudent2.setName(\"Raul Hinostroza\");\r\n defaultStudent2.setUsername(\"John2\");\r\n defaultStudent2.setPassword(\"123\");\r\n defaultStudent2.setId(\"805393\");\r\n defaultStudent2.setMajor(\"CS\");\r\n defaultStudent2.setAccountType(1);\r\n accounts.put(\"John2\", defaultStudent2);\r\n //\r\n Student defaultStudent3 = new Student();\r\n defaultStudent3.setName(\"Max Morales\");\r\n defaultStudent3.setUsername(\"John3\");\r\n defaultStudent3.setPassword(\"123\");\r\n defaultStudent3.setId(\"8053923\");\r\n defaultStudent3.setMajor(\"CS\");\r\n defaultStudent3.setAccountType(1);\r\n accounts.put(\"John3\", defaultStudent3);\r\n defaultStudent.addCourses(\"1000\");\r\n defaultStudent2.addCourses(\"1000\");\r\n defaultStudent3.addCourses(\"1000\");\r\n //\r\n Faculty defaultFaculty = new Faculty();\r\n defaultFaculty.setAccountType(2);\r\n defaultFaculty.setName(\"Smith\");\r\n defaultFaculty.setUsername(\"Smith1\");\r\n defaultFaculty.setPassword(\"123\");\r\n accounts.put(defaultFaculty.getUsername(), defaultFaculty);\r\n //\r\n Staff defaultStaff = new Staff();\r\n defaultStaff.setAccountType(3);\r\n defaultStaff.setName(\"Smith\");\r\n defaultStaff.setUsername(\"Smith2\");\r\n defaultStaff.setPassword(\"123\");\r\n accounts.put(defaultStaff.getUsername(), defaultStaff);\r\n }",
"public java.lang.String getStudent_address() {\n\t\treturn _primarySchoolStudent.getStudent_address();\n\t}",
"@Override\n\t\tpublic String queryStudent(int no) throws RemoteException {\n\t\t\treturn queryString(no);\n\t\t}",
"@Override\n\tpublic String toString() {\n\t\tStringBuilder stud = new StringBuilder();\n\t\tfor (Student s : students) {\n\t\t\tstud.append(\"; \" + s.getBrojIndeksa());\n\t\t}\n\t\t\n\t\tif (professor != null)\n\t\t\treturn code + \"; \" + name + \"; \" + semester + \"; \"\n\t\t\t\t\t+ yearOfStuding + \"; \" + professor.getIdNumber() + stud;\n\t\telse\n\t\t\treturn code + \"; \" + name + \"; \" + semester + \"; \"\n\t\t\t+ yearOfStuding + \"; \" + stud;\n\t}",
"public com.demo.springprotobuff.Demoproto.Student getStudent(int index) {\n\t\t\t\tif (studentBuilder_ == null) {\n\t\t\t\t\treturn student_.get(index);\n\t\t\t\t} else {\n\t\t\t\t\treturn studentBuilder_.getMessage(index);\n\t\t\t\t}\n\t\t\t}",
"public String toString()\n {\n return \"Student(\" + studentName + \", \" + currentPhone + \")\";\n }",
"public com.demo.springprotobuff.Demoproto.Student getStudent(int index) {\n\t\t\treturn student_.get(index);\n\t\t}",
"private void printStudListByCourse() throws Exception {\n String courseID = null;\n ArrayList<Student> studentList = new ArrayList<Student>();\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"\\nPlease enter course ID\");\n courseID = sc.nextLine();\n while(!courseID.matches(\"^[a-zA-Z]{2}[0-9]{4}$\")){\n System.out.println(\"Invalid input! Please enter a valid index number!\");\n courseID = sc.nextLine();\n }\n\n studentList= this.adminManager.getStudentByCourse(courseID);\n if(studentList == null){\n System.out.println(\"\\nThere is no such a course index\\n\\n\");\n System.exit(1);\n }\n if (studentList.isEmpty()){\n System.out.println(\"\\nThere is no student registered for this course ID\\n\\n\");\n return;\n }\n else{\n System.out.println(\"Hang on a moment while we load database.\\n\\n\");\n System.out.println(\"------------------------------------------------------\");\n System.out.println(\" STUDENT NAME GENDER NATIONALITY\");\n System.out.println(\"------------------------------------------------------\");\n //\n for(Student student:studentList){\n System.out.println(String.format(\"%20s %6s %s\",student.getName(),student.getGender(),student.getNationality()));\n }\n\n System.out.println(\"------------------------------------------------------\\n\");\n }\n }",
"@Override\n\tpublic List<JSONObject> studsWaiting(Map<String, Object> param) {\n\t\tString name = param.containsKey(\"name\") && param.get(\"name\") != null\n\t\t\t\t&& !param.get(\"name\").toString().isEmpty() ? param.get(\"name\")\n\t\t\t\t.toString() : \"\";\n\t\tExamManagement em = examManagementDao.getExamManagementListById(param,\n\t\t\t\tparam.get(\"termInfo\").toString());\n\t\tif (em == null) {\n\t\t\tthrow new CommonRunException(0, \"没有查询到相应的考试信息,请刷新页面!\");\n\t\t}\n\t\tInteger autoIncr = em.getAutoIncr();\n\t\tparam.put(\"autoIncr\", autoIncr);\n\t\tList<ExamPlan> eplist = examManagementDao.getExamPlanList(param, param\n\t\t\t\t.get(\"termInfo\").toString(), autoIncr);\n\t\tList<String> gralist = new ArrayList<String>();\n\t\tfor (ExamPlan ep : eplist) {\n\t\t\tgralist.add(ep.getUsedGrade());\n\t\t}\n\n\t\tHashMap<String, Account> stumap = new HashMap<String, Account>();\n\n\t\tif (!name.isEmpty()) {\n\t\t\tHashMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tmap.put(\"schoolId\", param.get(\"schoolId\"));\n\t\t\tmap.put(\"termInfoId\", param.get(\"termInfo\"));\n\t\t\tmap.put(\"usedGradeId\", StringUtils.join(gralist, \",\"));\n\t\t\tList<Account> allStu = commonDataService.getStudentList(map);\n\n\t\t\tfor (Account a : allStu) {\n\t\t\t\tstumap.put(a.getId() + \"\", a);\n\t\t\t}\n\t\t\tIterator<Entry<String, Account>> it1 = stumap.entrySet().iterator();\n\t\t\tList<String> accountId = new ArrayList<String>();\n\t\t\twhile (it1.hasNext()) {\n\n\t\t\t\tEntry<String, Account> entry = it1.next();\n\n\t\t\t\tAccount ac = entry.getValue();\n\n\t\t\t\tif (ac.getName().contains(name)) {\n\t\t\t\t\taccountId.add(ac.getId() + \"\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tparam.put(\"accountId\", accountId.isEmpty() ? null : accountId);\n\t\t}\n\t\tList<JSONObject> stulist = examManagementSetDao.studsWaiting(param);\n\n\t\tif (name.isEmpty()) {\n\t\t\tList<Long> accountIds = new ArrayList<Long>();\n\t\t\tfor (JSONObject json : stulist) {\n\t\t\t\taccountIds.add(json.getLongValue(\"accountId\"));\n\t\t\t}\n\t\t\tList<Account> allStu = commonDataService.getAccountBatch(\n\t\t\t\t\tLong.valueOf(param.get(\"schoolId\").toString()), accountIds,\n\t\t\t\t\tparam.get(\"termInfo\").toString());\n\n\t\t\tfor (Account a : allStu) {\n\t\t\t\tstumap.put(a.getId() + \"\", a);\n\t\t\t}\n\t\t}\n\t\tString scheduleId = eplist.get(0).getScheduleId();\n\t\tString usedGrade = eplist.get(0).getUsedGrade();\n\t\tList<Long> ids = new ArrayList<Long>();\n\n\t\tif (scheduleId.isEmpty()) {\n\t\t\tfor (JSONObject es : stulist) {\n\t\t\t\tif (stumap.containsKey(es.getString(\"accountId\"))) {\n\t\t\t\t\tes.put(\"studName\", stumap.get(es.getString(\"accountId\"))\n\t\t\t\t\t\t\t.getName());\n\t\t\t\t}\n\t\t\t\tids.add(Long.valueOf(es.getString(\"tClassId\")));\n\t\t\t}\n\t\t\tList<Classroom> classrooms = commonDataService.getClassroomBatch(\n\t\t\t\t\tLong.valueOf(param.get(\"schoolId\").toString()), ids, param\n\t\t\t\t\t\t\t.get(\"termInfo\").toString());\n\t\t\tMap<String, Classroom> classmap = new HashMap<String, Classroom>();\n\t\t\tfor (Classroom c : classrooms) {\n\t\t\t\tclassmap.put(c.getId() + \"\", c);\n\t\t\t}\n\t\t\tfor (JSONObject se : stulist) {\n\t\t\t\tif (classmap.containsKey(se.getString(\"tClassId\"))) {\n\t\t\t\t\tse.put(\"tClassName\", classmap.get(se.getString(\"tClassId\"))\n\t\t\t\t\t\t\t.getClassName());\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tList<TSchTClassInfoExternal> tClassInfoList = scheduleExternalService\n\t\t\t\t\t.getTClassInfoExternalNoAccount(scheduleId,\n\t\t\t\t\t\t\tLong.valueOf(param.get(\"schoolId\").toString()),\n\t\t\t\t\t\t\tparam.get(\"termInfo\").toString(), usedGrade, null);\n\t\t\tMap<String, TSchTClassInfoExternal> classmap = new HashMap<String, TSchTClassInfoExternal>();\n\t\t\tif (CollectionUtils.isNotEmpty(tClassInfoList)) {\n\t\t\t\tfor (TSchTClassInfoExternal classInfo : tClassInfoList) {\n\t\t\t\t\tclassmap.put(classInfo.getTclassId(), classInfo);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (JSONObject se : stulist) {\n\t\t\t\tif (stumap.containsKey(se.getString(\"accountId\"))) {\n\t\t\t\t\tse.put(\"studName\", stumap.get(se.getString(\"accountId\"))\n\t\t\t\t\t\t\t.getName());\n\t\t\t\t}\n\t\t\t\tif (classmap.containsKey(se.getString(\"tClassId\"))) {\n\t\t\t\t\tse.put(\"tClassName\", classmap.get(se.getString(\"tClassId\"))\n\t\t\t\t\t\t\t.getTclassName());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn stulist;\n\t}",
"List<StudentRecord> getStudents(String clientId) throws Exception;",
"public ArrayList<Studentdto> coursewiseStudent(String course) throws Exception {\n\t\tConnection con = null;\n\t\tcon = DBConnector.dbConnection();\n\t\tArrayList<Studentdto> coursewise = new ArrayList<Studentdto>();\n\t\ttry {\n\t\t\tPreparedStatement st = con.prepareStatement(\n\t\t\t\t\t\"select student_name,college_name,course_name,phn_no,address from student s ,college co,course cr where s.college_id=co.college_id and s.course_id =(select course_id from course where course_name=?) and cr.course_name=?\");\n\t\t\tst.setString(1, course);\n\t\t\tst.setString(2, course);\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\tint i = 1;\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudentdto studentdto = new Studentdto();\n\t\t\t\tstudentdto.setSlno(i++);\n\t\t\t\tstudentdto.setStudentname(rs.getString(1));\n\t\t\t\tstudentdto.setCollegename(rs.getString(2));\n\t\t\t\tstudentdto.setCoursename(rs.getString(3));\n\t\t\t\tstudentdto.setAddress(rs.getString(4));\n\t\t\t\tstudentdto.setPhno(rs.getString(5));\n\t\t\t\tcoursewise.add(studentdto);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (SQLSyntaxErrorException e) {\n\t\t\tthrow new SQLSyntaxErrorException(\"Error in SQL syntax\");\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Connection with database failed\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Some error occured\");\n\t\t}\n\n\t\treturn coursewise;\n\t}",
"@Override\n\tpublic List<TblProgram> displayProgram(int idProgram) {\n\t\tList<TblProgram> program = null;\n\t\t\n\t\tSession session = HibernateUtils.getSessionFactory().getCurrentSession();\n\t\t\n\t\ttry {\n\t\t\tsession.getTransaction().begin();\n\t\t\tString hql = \"from TblProgram where idProgram = :idProgram\";\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setParameter(\"idProgram\", idProgram);\n\t\t\tprogram = query.list();\n\t\t\t\n\t\t\treturn program;\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Loi:\" + ex.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"public int getStudentId();",
"public String getInfo(String student) throws SQLException{\n\n try(PreparedStatement st = conn.prepareStatement(\n // replace this with something more useful\n \"WITH RegData as (SELECT * FROM Registrations FULL OUTER JOIN CourseQueuePositions USING (student,course)),\" +\n \"Finished as (SELECT COALESCE(json_agg(jsonb_build_object('course',Courses.name,'code',Courses.code,\" +\n \"'grade',grade,'credits',Courses.credits)),'[]'::json) AS finishedArray FROM FinishedCourses,Courses \" +\n \"WHERE student = ? AND FinishedCourses.course = Courses.Code), Registered AS \" +\n \"(SELECT COALESCE(json_agg(jsonb_build_object('course',Courses.name,'code',Courses.code,'status',status,'position', place)),'[]'::json)\" +\n \"AS registeredArray FROM RegData,Courses WHERE student = ? AND RegData.course = Courses.Code) \" +\n \"SELECT jsonb_build_object('student',idnr,'name',name,'login',login,'program',program,'branch',\" +\n \"branch,'finished',finishedArray,'registered',registeredArray,'seminarCourses',seminarCourses,\" +\n \"'mathCredits',mathCredits,'researchCredits',researchCredits,'totalCredits',totalCredits,\" +\n \"'canGraduate',qualified) AS jsondata FROM BasicInformation,PathToGraduation,Finished,\" +\n \"Registered WHERE BasicInformation.idnr=? AND BasicInformation.idnr = PathToGraduation.student\"\n );){\n\n st.setString(1, student);\n st.setString(2, student);\n st.setString(3, student);\n\n ResultSet rs = st.executeQuery();\n\n if(rs.next())\n return rs.getString(\"jsondata\");\n else\n return \"{\\\"student\\\":\\\"does not exist :(\\\"}\";\n\n }\n\n }",
"private Student getStudent(int courseOrder, int studentOrder) throws IOException {\n URL url = new URL(BASE_URL + courseOrder + \"/students/\" + studentOrder);\n InputStream input = url.openStream();\n Student student\n = JAXB.unmarshal(new InputStreamReader(input), Student.class);\n return student;\n }",
"private void showStudentCourses()\r\n {\r\n \tString courseResponse = \"\";\r\n \tfor(Course course : this.getDBManager().getStudentCourses(this.studentId))\r\n \t{\r\n \t\tcourseResponse += \"Course Faculty: \" + course.getCourseName() + \", Course Number: \" + String.valueOf(course.getCourseNum()) + \"\\n\";\r\n \t}\r\n \tthis.getClientOut().printf(\"SUCCESS\\n%s\\n\", courseResponse);\r\n \tthis.getClientOut().flush();\r\n }",
"Map<String, String> fetchCourseDetails(String courseId);",
"public F returnCourse(String studentID){}",
"public List getStudentList() throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n\n String queryString = \"from \" + Student.class.getName() + \" e\";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n List list = hibernateTemplate.list(query);\n\n return list;\n } finally {\n log.debug(\"finished getStudentList\");\n }\n }",
"public static ArrayList<Student> getLockedStudenti() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_LOCKED_STUDENTS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Student> studentiBloccati = (ArrayList<Student>) rpp.parameters[0];\n\t\treturn studentiBloccati;\n\t}",
"private void getStudentDetails(final String oid) {\n\n\n // Tag used to cancel the request\n String tag_string_req = \"req_login\";\n\n pDialog.setMessage(\"Searching..\");\n showDialog();\n\n StringRequest strReq = new StringRequest(Request.Method.POST,\n AppConfig.URL_ADMIN_STUDENT_PROFILE, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response1) {\n android.util.Log.d(TAG, \"Login Response: \" + response1.toString());\n hideDialog();\n\n try {\n JSONObject jObj = new JSONObject(response1);\n boolean error = jObj. getBoolean(\"error\");\n\n // Check for error node in json\n if (!error) {\n\n // Now store the user in SQLite\n\n JSONObject student = jObj.getJSONObject(\"student\");\n String fname = student.getString(\"fname\");\n String lname = student.getString(\"lname\");\n String admno = student.getString(\"admission_no\");\n String purpose = student.getString(\"purpose\");\n String dob = student.getString(\"dob\");\n String gender = student.getString(\"gender\");\n String mobno = student.getString(\"mobno\");\n String pmobno = student.getString(\"pmobno\");\n String email = student.getString(\"email\");\n String batch = student.getString(\"batch\");\n String stream_name = student.getString(\"stream_name\");\n String branch_name = student.getString(\"branch_name\");\n\n String date_of_leaving = student.getString(\"date_of_leaving\");\n String date_of_return = student.getString(\"date_of_return\");\n String time_of_leaving = student.getString(\"time_of_leaving\");\n String time_of_return = student.getString(\"time_of_return\");\n\n// Toast.makeText(getApplicationContext(),\n// fname+\"/\"+lname+\"/\"+address+\"/\"+dob+\"/\"+gender+\"/\"+mobno+\"/\"+pmobno+\"/\"+email+\"/\"+batch+\"/\"\n// +stream_id+\"/\"+branch_id, Toast.LENGTH_LONG).show();\n t1.setText(admno);\n t2.setText(fname+\" \"+lname);\n t3.setText(time_of_leaving);\n t4.setText(time_of_return);\n t5.setText(purpose);\n t6.setText(date_of_leaving);\n t7.setText(date_of_return);\n\n\n\n } else {\n // Error in login. Get the error message\n String errorMsg1 = jObj.getString(\"error_msg1\");\n Toast.makeText(getApplicationContext(),\n errorMsg1, Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n // JSON error\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Json error: \" + e.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n android.util.Log.e(TAG, \"Login Error: \" + error.getMessage());\n Toast.makeText(getApplicationContext(),\n error.getMessage(), Toast.LENGTH_LONG).show();\n hideDialog();\n }\n }) {\n\n @Override\n protected Map<String, String> getParams() {\n // Posting parameters to login url\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"oid\", oid);\n\n return params;\n }\n\n };\n\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(strReq, tag_string_req);\n }",
"public String getConsultationDetail() {\n String consultationDetail = \"\";\n if (!symptoms.isEmpty()) {\n consultationDetail += extractField(\"Symptoms\", symptoms);\n }\n if (!diagnoses.isEmpty()) {\n consultationDetail += extractField(\"Diagnoses\", diagnoses);\n }\n if (!prescriptions.isEmpty()) {\n consultationDetail += extractField(\"Prescriptions\", prescriptions);\n }\n return consultationDetail;\n }",
"public static List<StudentInfo> searchStudentInfo(String firtname, String lastname) {\r\n \r\n List<StudentInfo> students = new ArrayList<>();\r\n \r\n // declare resultSet\r\n ResultSet rs = null;\r\n \r\n // declare prepared statement\r\n PreparedStatement preparedStatement = null;\r\n \r\n // declare connection\r\n Connection conn = null;\r\n try {\r\n // get connection\r\n conn = DBUtils.getConnection();\r\n\r\n // set prepared statement\r\n preparedStatement = conn\r\n .prepareStatement(\"SELECT instructor.FName, instructor.LName,\" +\r\n \" IF(EXISTS ( SELECT * FROM gra WHERE gra.StudentId = phdstudent.StudentId) , 'GRA', \" +\r\n \" IF(EXISTS ( SELECT * FROM gta WHERE gta.StudentId = phdstudent.StudentId) , 'GTA', \" +\r\n \" IF(EXISTS ( SELECT * FROM scholarshipsupport WHERE scholarshipsupport.StudentId = phdstudent.StudentId) , 'scholarship', \" +\r\n \" IF(EXISTS ( SELECT * FROM selfsupport WHERE selfsupport.StudentId = phdstudent.StudentId) , 'self', ''))\" +\r\n \" )) AS StudentType, \" +\r\n \" milestone.MName, milestonespassed.PassDate\" +\r\n \" FROM phdstudent left join instructor on instructor.InstructorId = phdstudent.Supervisor\"\r\n + \" left join milestonespassed on phdstudent.StudentId = milestonespassed.StudentId\"\r\n + \" left join milestone on milestonespassed.MID = milestone.MID\" +\r\n \" WHERE phdstudent.FName = ? AND phdstudent.LName = ?\");\r\n \r\n // execute query\r\n preparedStatement.setString(1, firtname);\r\n preparedStatement.setString(2, lastname); \r\n\r\n rs = preparedStatement.executeQuery();\r\n \r\n //iterate and create the StudentInfo objects\r\n while (rs.next()) {\r\n \r\n students.add(new StudentInfo(rs.getString(1)+ \" \" + rs.getString(2), rs.getString(3), rs.getString(4), \r\n utils.Utils.toDate(rs.getDate(5))));\r\n\r\n }\r\n }catch(Exception ex){\r\n ex.printStackTrace();\r\n }\r\n finally {\r\n DBUtils.closeResource(conn);\r\n DBUtils.closeResource(preparedStatement);\r\n DBUtils.closeResource(rs);\r\n } \r\n \r\n return students; \r\n }",
"public Student getStudent(final int matrnr) {\n return students.get(matrnr);\n }",
"@Override\n\tpublic List<AASTranscriptCourse> getAASTranscriptCourse(String stuId, String acaYear, String semesterId) {\n\t\tList<AASTranscriptCourse> arr = new ArrayList<>();\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tconn = oConnection.getOracleConnection();\n\t\t\tString sql =\"select aca_year,subjectid,subjectname,credits,credits_earn,letter_mark\"+ \n\t\t\t\t\t\" from v_course\"+ \n\t\t\t\t\t\" where id_student= ?\"+ \n\t\t\t\t\t\" and aca_year= ?\"+\n\t\t\t\t\t\" and semester= ?\"+\n\t\t\t\t\t\" and aas_sgt= 0\"+ \n\t\t\t\t\t\" order by subjectid\";\n\t\t\tstatement = conn.prepareStatement(sql);\n\t\t\tstatement.setString(1, stuId);\n\t\t\tstatement.setString(2, acaYear);\n\t\t\tstatement.setString(3, semesterId);\n\t\t\trs = statement.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tarr.add(new AASTranscriptCourse(rs.getString(\"aca_year\"),rs.getString(\"subjectid\"),rs.getString(\"subjectname\")\n\t\t\t\t\t\t, rs.getString(\"credits\"), rs.getString(\"credits_earn\"), rs.getString(\"letter_mark\")));\n\t\t\t}\n\t\t\t\n\t\t\trs.close();\n\t\t\tstatement.close();\n\t\t\tconn.close();\n\t\t\treturn arr;\n\t\t} catch (SQLException e) {\n\t\t\treturn null;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (statement != null)\n\t\t\t\t\tstatement.close();\n\t\t\t\tif (conn != null)\n\t\t\t\t\tconn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public String toString(){\n return \"Available information for this student: \" + fname + \" \" + lname + \", \" + college + \", \"\n + major + \" major, GPA: \" + gpa;\n }",
"public String getConsultDetail() {\n return consultDetail;\n }",
"public String getStudents(){\n\t\treturn this.students;\n\t}",
"public int getStudentId() {\n return studentId;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \" \" + getStudentId() + \":\" + getStudentName();\n\t}",
"abstract public void getStudent();",
"public Student getStudent(String theStudentId)throws Exception {\n\t\tStudent theStudent=null;\n\t\tConnection conn=null;\n\t\tPreparedStatement myStmt=null;\n\t\tResultSet myRs=null;\n\t\tint studentId;\n\t\ttry{\n\t\t\t// convert student id to int\n\t\t\tstudentId=Integer.parseInt(theStudentId);\n\t\t\t//get connection to database\n\t\t\tconn=dataSource.getConnection();\n\t\t\t//create sql to get selected student\n\t\t\tString sql=\"select * from student where id=?\";\n\t\t\t//create prepared statement\n\t\t\tmyStmt=conn.prepareStatement(sql);\n\t\t\t// set parameters\n\t\t\tmyStmt.setInt(1, studentId);\n\t\t\t//execute statement\n\t\t\tmyRs=myStmt.executeQuery();\n\t\t\t//retrieve data from result set row\n\t\t\tif(myRs.next()) {\n\t\t\t\tString firstName=myRs.getString(\"first_name\");\n\t\t\t\tString lastName=myRs.getString(\"last_name\");\n\t\t\t\tString email=myRs.getString(\"email\");\n\t\t\t\ttheStudent=new Student(studentId,firstName,lastName,email);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Could'nt find the student id:\"+ studentId);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose(conn,myStmt,myRs);\n\t\t}\n\t\treturn theStudent;\n\t}",
"@Override\n\tpublic ProgrameInfoVO selectProgramPageInfoDetail(String prodCode)\n\t\t\tthrows Exception {\n\t\treturn progMapper.selectProgramPageInfoDetail(prodCode);\n\t}",
"@Override\n\t\tpublic oep_ResponseInfo getcoursedetailsforreport(String facultyid,String roleid) {\n\t\t\t\n\t\t\tif(!facultyid.equals(\"0\")){\n\t\t\tif(roleid.equals(\"2\")){\n\t\t\t/*String coursedetailsquery=\"SELECT a.`course_id`,`course_name` FROM `course_master` a JOIN `subject_master` b ON a.`course_id`= b.`course_id`\"\n + \" JOIN `faculty_master` c ON c.`main_subject`= b.`sub_id` WHERE c.`faculty_id`=\"+facultyid;*/\n\t\t\t\t\n\t\t\t\tString coursedetailsquery=\"SELECT a.`course_id`,`course_name` FROM `course_master` a \"\n + \" JOIN `faculty_master` c ON c.`main_subject`= a.`course_id` WHERE c.`faculty_id`=\"+facultyid;\n\t\t\t\t\n\t\t\tlog.info(coursedetailsquery);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<Object> coursedetailsList = jdbcTemplate.query(coursedetailsquery, new RowMapper() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\t\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"courseid\", rs.getString(\"course_id\"));\n\t\t\t\t\tmap.put(\"coursename\", rs.getString(\"course_name\"));\n\t\t\t\t\n\t\t\t\t\treturn map;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tresponse.setResponseType(\"S\");\n\t\t\tresponse.setResponseObj(coursedetailsList);\n\t\t\t}else if(roleid.equals(\"4\")){\n\t\t\t\tString coursedetailsquery=\"SELECT c.`course_id`,c.`course_name` FROM `course_scheduling` a \"\n + \" JOIN `participants_registration_course_details` b ON \"\n + \" b.`course_id`= a.`cs_id` JOIN `course_master` c ON c.`course_id` = a.`program_name`\"\n + \" WHERE b.`participant_id`=\"+facultyid;\n\t\t\tlog.info(coursedetailsquery);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<Object> coursedetailsList = jdbcTemplate.query(coursedetailsquery, new RowMapper() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\t\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"courseid\", rs.getString(\"course_id\"));\n\t\t\t\t\tmap.put(\"coursename\", rs.getString(\"course_name\"));\n\t\t\t\t\n\t\t\t\t\treturn map;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tresponse.setResponseType(\"S\");\n\t\t\tresponse.setResponseObj(coursedetailsList);\n\t\t\t}else{\n\t/*String coursedetailsquery=\"SELECT a.`course_id`,`course_name` FROM `course_master` a JOIN `subject_master` b ON a.`course_id`= b.`course_id`\"\n + \" JOIN `faculty_master` c ON c.`main_subject`= b.`sub_id` WHERE c.`faculty_id`=\"+facultyid;*/\n\t\n\tString coursedetailsquery=\"SELECT a.`course_id`,`course_name` FROM `course_master` a \"\n + \" JOIN `faculty_master` c ON c.`main_subject`= a.`course_id` WHERE c.`faculty_id`=\"+facultyid;\n\t\n\t\tlog.info(coursedetailsquery);\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Object> coursedetailsList = jdbcTemplate.query(coursedetailsquery, new RowMapper() {\n\t\t\n\t\t@Override\n\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tmap.put(\"courseid\", rs.getString(\"course_id\"));\n\t\tmap.put(\"coursename\", rs.getString(\"course_name\"));\n\t\t\n\t\treturn map;\n\t\t\n\t\t}\n\t\t});\n\t\t\n\t\tresponse.setResponseType(\"S\");\n\t\tresponse.setResponseObj(coursedetailsList);\n\t\t}\n\t\t\t\n\t\t}else{\n\t\t\tString coursedetailsquery=\"SELECT `course_id`,`course_name` FROM `course_master` \";\n\t\t\t\n\t\tlog.info(coursedetailsquery);\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Object> coursedetailsList = jdbcTemplate.query(coursedetailsquery, new RowMapper() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\n\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"courseid\", rs.getString(\"course_id\"));\n\t\t\t\tmap.put(\"coursename\", rs.getString(\"course_name\"));\n\t\t\t\n\t\t\t\treturn map;\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tresponse.setResponseType(\"S\");\n\t\tresponse.setResponseObj(coursedetailsList);\n\t\t}\n\t\t\tresponseInfo.setInventoryResponse(response);\n\t\t\treturn responseInfo;\n\t\t}",
"public String getStudentID() {\r\n\t\treturn studentID;\r\n\t}",
"@GetMapping(path = \"/student\")\n public Set<PlacementViewDto> getRecordsByStudentName(@RequestParam(value = \"studentName\") String studentName, @RequestParam(defaultValue = \"0\") String page) {\n return placementService.getDetailsByStudentName(studentName, page);\n }",
"public String toString() {\r\n\t\treturn \"Student ID: \" + this.studentID + \"\\n\" + \r\n\t\t\t\t\"Name and surname: \" + this.name + \"\\n\" + \r\n\t\t\t\t\"Date of birth: \" + this.dateOfBirth + \"\\n\" + \r\n\t\t\t\t\"University:\" + this.universityName + \"\\n\" + \r\n\t\t\t\t\"Department code: \" + this.departmentCode + \"\\n\" + \r\n\t\t\t\t\"Department: \" + this.departmentName + \"\\n\" +\r\n\t\t\t\t\"Year of enrolment: \" + this.yearOfEnrolment;\r\n\t}",
"List<Student> getStudent();",
"public String getStudentList()\n\t{\n\t\tString courseOutput = \"\";\n\t\tint studentNum = 1;\n\t\t\n\t\tfor(Student student: classRoll)\n\t\t{\n\t\t\tcourseOutput += studentNum + \". \" + student + \"\\n\";\t\n\t\t\t\t//adds a Student to the already created string one student at a time\n\t\t\tstudentNum++;\n\t\t}\n\t\t\n\t\tcourseOutput = getCourseName() + getCourseNumber() + getInstructor() + courseOutput;\n\t\treturn courseOutput;\n\t}",
"Collection<Section> findByStudentNo(int studentNumber);",
"public long getStudentID();",
"private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }",
"@GetMapping(\"/reg_m_student\")\r\n\tpublic String m_studentReg() {\r\n\t\treturn \"m_student_Form\";\r\n\t}",
"public static void displayStudentRecords() {\n\t\tSystem.out.println(\"Student records in the database are:\");\n\t\tSelectStudentRecords records = new SelectStudentRecords();\n\t\ttry {\n\t\t\tList<Student> studentList = records.selectStudentRecords();\n\t\t\tstudentList.forEach(System.out::println);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public student getstudent(Integer id);",
"public String toString() {\n \r\n return this.studentID + \", \" + this.lastName + \", \" +\r\n this.firstName + \", \" + this.q1 + \", \" +\r\n this.q2 + \", \" + this.q3 + \", \" +\r\n this.q4 + \", \" + this.q5 + \", \" +\r\n this.qmkup + \", \" + this.midterm + \", \" +\r\n this.problems + \", \" +\r\n this.finalExam + \", \" + this.courseGrade + \", \" +\r\n this.letterGrade;\r\n }",
"public void accountantSection() throws NumberFormatException, IOException, ClassNotFoundException, SQLException, DocumentException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStudentDetailsDao std = new StudentDetailsDao();\n\t\tFeeDetailsDao fdd = new FeeDetailsDao();\n\t\tValidation val = new Validation();\n\t\tStudentPojo st = new StudentPojo();\n\t\t\n\t\twhile(true) {\n\t\t\tSystem.out.println(\"------ACCOUNTANT SECTION------\");\n\t\t\tSystem.out.println(\" 1: Add Student \");\n\t\t\tSystem.out.println(\" 2: view Student \");\n\t\t\tSystem.out.println(\" 3: Delete Student \");\n\t\t\tSystem.out.println(\" 4: Update Student \");\n\t\t\tSystem.out.println(\" 5: Export Student Fee Report pdf\");\n\t\t\tSystem.out.println(\" 6: Logout \");\n\t\t\tint opt = 0;\n\t\t\ttry {\n\t\t\t\topt = Integer.parseInt(br.readLine());\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\tSystem.out.println(\" \\nSelect from above given respective inputs.\\n\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//------------------ADD STUDENT-----------------------------------------------------\n\t\t\tif(opt == 1) {\n\t\t\t\tSystem.out.println(\"------ADD STUDENT-------\");\n\t\t\t\t\n\t\t\t\twhile(true) {\n\t\t\t\t\tSystem.out.println(\" Enter Student Roll NO. : \");\n\t\t\t\t\tint id = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t id = Integer.parseInt(br.readLine());\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\t\tSystem.out.println(\"You have entered wrong input only numbers will allow.\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\tst.setId(id);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twhile(true) {\n\t\t\t\t\tSystem.out.println(\" Enter Student Name : \");\n\t\t\t\t\tString name = br.readLine();\n\t\t\t\t\tboolean check = val.name(name);\n\t\t\t\t\tif(check == true) {\n\t\t\t\t\t\tst.setName(name);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"You have entered wrong input only Alphabets will allow.\");\n\t\t\t\t\t\tcontinue;\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\t\n\t\t\t\twhile(true) {\n\t\t\t\t\tSystem.out.println(\" Enter Student DOB(ex:25-10-1990) : \");\n\t\t\t\t\tString dob = br.readLine();\n\t\t\t\t\tboolean check = val.dob(dob);\n\t\t\t\t\tif(check == true) {\n\t\t\t\t\t\tst.setDob(dob);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\" Not a valid DOB see example\");\n\t\t\t\t\t\tcontinue;\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\t\n\t\t\t\tSystem.out.println(\" Enter Student Address : \");\n\t\t\t\tString address = br.readLine();\n\t\t\t\tst.setAddress(address);\n\t\t\t\t\n\t\t\t\twhile(true) {\n\t\t\t\t\tSystem.out.println(\" Enter Student Branch : \");\n\t\t\t\t\tString branch = br.readLine();\n\t\t\t\t\tboolean check = val.name(branch);\n\t\t\t\t\tif(check == true) {\n\t\t\t\t\t\tst.setBranch(branch);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\" Invalid input \");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tSystem.out.println(\" Enter Student Batch year(ex:1990) : \");\n\t\t\t\tint year = 0;\n\t\t\t\twhile(true) {\n\t\t\t\t\ttry {\n\t\t\t\t\tyear = Integer.parseInt(br.readLine());\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\t\tSystem.out.println(\" Not a valid input only numbers will allow.\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tString reg = \"^\\\\d{4}$\";\n\t\t\t\t\tboolean e = Pattern.compile(reg).matcher(Integer.toString(year)).matches();\n\t\t\t\t\tif(e == true) {\n\t\t\t\t\t\tst.setYear(year);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\" Please Enter valid input, see example.\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(true) {\n\t\t\t\t\tSystem.out.println(\" Enter Student Gender : \");\n\t\t\t\t\tString gender = br.readLine();\n\t\t\t\t\tboolean check = val.gender(gender);\n\t\t\t\t\tif(check == true) {\n\t\t\t\t\t\tst.setGender(gender);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\" Invalid input \");\n\t\t\t\t\t\tcontinue;\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\t\n\t\t\t\twhile(true) {\n\t\t\t\tSystem.out.println(\" Enter Student contact(ex: +91 (789){1} (947982384){9}) : \");\n\t\t\t\tString contact = br.readLine();\n\t\t\t\tboolean check = val.contact(contact);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tst.setContact(contact);\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\" Invalid input,see example \");\n\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\tstd.addStudent(st);\n\t\t\t\t\n\t\t\t\t//-----------------ADD STUDENT FEE DETAILS--------------------------\n\t\t\t\t\n\t\t\t\tSystem.out.println(\" ---ADD STUDENT FEE DETAILS---\");\n\t\t\t\tSystem.out.println(\" Total fees is : 40,000 .\");\n\t\t\t\twhile(true) {\n\t\t\t\t\tint paidfees =0;\n\t\t\t\t\tSystem.out.println(\" Enter Student paid fees : \");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpaidfees = Integer.parseInt(br.readLine());\n\t\t\t\t\t\tif(paidfees>40000) {\n\t\t\t\t\t\t\tSystem.out.println(\" You just have to pay 40,000.\");\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\t\tSystem.out.println(\" Not a valid input only numbers will allow.\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tst.setPaidfees(paidfees);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfdd.addStudentFeeDetails(st);\n\t\t\t}\n\t\t\telse if(opt ==2) {\n\t\t\t\twhile(true) {\n\t\t\t\t\tSystem.out.println(\"\\n---------View Student Details----------\\n \");\n\t\t\t\t\tSystem.out.println(\" 1. : View Student personal Details \");\n\t\t\t\t\tSystem.out.println(\" 2. : View Student Fee Details \");\n\t\t\t\t\tSystem.out.println(\" 3. : Exit\");\n\t\t\t\t\t\n\t\t\t\t\tint ch=0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tch= Integer.parseInt(br.readLine());\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\tSystem.out.println(\" Select from above given respective inputs.\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(ch == 1) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tstd.viewStudent();\n\t\t\t\t\t}\n\t\t\t\t\telse if(ch ==2) {\n\t\t\t\t\t\tfdd.viewFeeDetails();\n\t\t\t\t\t}\n\t\t\t\t\telse if(ch ==3) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\n please enter above listed valid inputs\\n\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t//------------------DELETE STUDENT-----------------------------------------------------\n\t\t\telse if(opt ==3) {\n\t\t\t\twhile(true) {\n\t\t\t\t\tSystem.out.println(\"\\n---------Delete Student Details----------\\n \");\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\" Enter Student ID : \");\n\t\t\t\t\tint id = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tid = Integer.parseInt(br.readLine());\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\t\tSystem.out.println(\" Please enter a valid input..\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tstd.deleteStudent(id);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//------------------UPDATE STUDENT-----------------------------------------------------\n\t\t\telse if(opt ==4) {\n\t\t\t\t\n\t\t\t\twhile(true) {\n\t\t\t\t\tSystem.out.println(\"\\n---------Update Student Details----------\\n \");\n\t\t\t\t\tSystem.out.println(\" ==Update Student Fee Details== \");\n\t\t\t\t\tSystem.out.println(\" Enter Student Roll NO. : \");\n\t\t\t\t\tint id = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tid = Integer.parseInt(br.readLine());\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\t\tSystem.out.println(\" Please enter a valid input..\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tfdd.updateFeeDetails(id);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//------------------Export STUDENT Fee Details-----------------------------------------------------\n\t\t\telse if(opt ==5) {\n\t\t\t\t\n\t\t\t\twhile(true) {\n\t\t\t\t\tSystem.out.println(\"\\n---------Export STUDENT Fee Details----------\\n \");\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\" Enter Student Roll NO. : \");\n\t\t\t\t\tint id = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tid = Integer.parseInt(br.readLine());\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\t\tSystem.out.println(\" Please enter a valid input..\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tExportPdf epd = new ExportPdf();\n\t\t\t\t\tepd.ExportPdf(id);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(opt ==6) {\n\t\t\t\tSystem.out.println(\"\\n\\t.....Successfully Accountant Logging Out......\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\n....You have entered a wrong input...\\n\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t\n\t}",
"public List<Student> getCampusStudent(Campus c) {\n\t\tList<Student> allStudentList = new ArrayList<Student>();\n\t\tConnection conn = DBUtil.getConn();\n\t\tStatement stmt = DBUtil.createStmt(conn);\n\t\tString sql = \"select * from student where ville='%s' and region='%s' order by stu_ID \";\n\t\tsql = String.format(sql, c.getVille(), c.getRegion());\n\t\tSystem.out.println(sql);\n\t\tResultSet rst = DBUtil.getRs(stmt, sql);\n\t\ttry {\n\t\t\twhile (rst.next()) {\n\t\t\t\tStudent student = new Student();\n\t\t\t\tfillRsStudent(rst, student);\n\t\t\t\tallStudentList.add(student);\n\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn allStudentList;\n\t}",
"@Override\n public List<ArrayList<String>> queryStudentPersonalData(Token token, int studentID) {\n List<ArrayList<Object>> objList = null;\n\n try {\n objList = queryStudentPersonalData1(token, studentID);\n } catch (SCRSException e) {\n System.out.println(e.getMessage());\n return null;\n }\n List<ArrayList<String>> result = UtilMethods.convertObjListToStringList(objList);\n return result;\n }",
"public java.lang.String getStudent_name() {\n\t\treturn _primarySchoolStudent.getStudent_name();\n\t}",
"public String studentsDiscipline(String discipline) throws InvalidDisciplineException{ \n int id = _person.getId();\n Professor _professor = getProfessors().get(id);\n\n return _professor.studentsDiscipline(discipline);\n }",
"public Map<String, Object> getProgramDetails() throws ParseException;",
"public static List<StudentAndProfessorDetails> getProfessordetails(StudentAndProfessorDetails profdetails) {\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"StudentDataManagementAndProcessing\");\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\n\t\tList<StudentAndProfessorDetails> profdetailsList = entityManager.createQuery(\"SELECT s from StudentAndProfessorDetails s where s.username=(SELECT user from LoginCredentials user where user.username=?1)\").setParameter(1,profdetails.getUsername().getUsername()).getResultList();\n\t\tentityManager.close();\n\t\tentityManagerFactory.close();\n\t\treturn profdetailsList;\n\t}",
"public ArrayList<Studentdto> studentList() throws Exception {\n\t\tArrayList<Studentdto> studentlist = new ArrayList<Studentdto>();\n\t\tConnection con = null;\n\t\tcon = DBConnector.dbConnection();\n\t\ttry {\n\t\t\tPreparedStatement st = con.prepareStatement(\n\t\t\t\t\t\"select student_name,college_name, course_name,phn_no,address from student s ,college co,course cr where s.course_id=cr.course_id and s.college_id=co.college_id\");\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\tint i = 1;\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudentdto studentdto = new Studentdto();\n\t\t\t\tstudentdto.setSlno(i++);\n\t\t\t\tstudentdto.setStudentname(rs.getString(1));\n\t\t\t\tstudentdto.setCollegename(rs.getString(2));\n\t\t\t\tstudentdto.setCoursename(rs.getString(3));\n\t\t\t\tstudentdto.setAddress(rs.getString(4));\n\t\t\t\tstudentdto.setPhno(rs.getString(5));\n\t\t\t\tstudentlist.add(studentdto);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (SQLSyntaxErrorException e) {\n\t\t\tthrow new SQLSyntaxErrorException(\"Error in SQL syntax\");\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Connection with database failed\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Some error occured\");\n\t\t}\n\t\treturn studentlist;\n\t}",
"public int getStudentNum() {\n\t\treturn studentNum;\n\t}",
"public String graduationStatus(int studentid);",
"public String getProgramCourseKey(TransferNORInPSTBean programCoursekeyData){\r\n\t\t//Connection con=DBConnection.getConnection();\r\n\t\tString programCourseKey=\"\";\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\tList<TransferNORInPSTBean> programCourse=(List<TransferNORInPSTBean>)sqlMapClient.queryForList(\"TransferNORInPSTBean.getProgramCourseKey\", programCoursekeyData);\r\n\t\t\t\tfor(TransferNORInPSTBean programCourseValue:programCourse){\r\n\t\t\t\t\tprogramCourseKey=programCourseValue.getProgramCourseKey();\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\t//System.out.println(\"Exception in get program course key: \"+e);\r\n\t\t\tlogger.info(\"Exception in program course key\"+e.getMessage());\r\n\t\t}\r\n\t\treturn programCourseKey;\r\n\t}",
"public Student getStudent() {\r\n\t\treturn student;\r\n\t}",
"public int getStudentId() {\n\t\treturn studentId;\n\t}",
"public List<PresentyData> getStudentist() {\n return stList;\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"{exam}/{start}/{section}/{exam}\")\n public String examination(@QueryParam(\"matric\") String matric,@QueryParam(\"exam\")String exam,@QueryParam(\"type\")String type,@QueryParam(\"status\") String status,@QueryParam(\"time\") String time,@QueryParam(\"score\")String score,@QueryParam(\"attempt\")String attempt,@QueryParam(\"complete\") boolean complete){\n System.out.println(\"touching registered Exams to get information)\");\n \n \n \n if(status == null){\n if(type != null){\n StudentResourceGetRegisteredExams regExam = new StudentResourceGetRegisteredExams();\n \n String typeF = \"\";\n if(Integer.parseInt(type) == 5){\n typeF = \"1\";\n }\n if(Integer.parseInt(type) == 6){\n typeF = \"2\"; \n }\n if(Integer.parseInt(type) == 7){\n typeF = \"3\";\n }\n if(Integer.parseInt(type) == 8){\n typeF = \"4\";\n }\n \n return new Gson().toJson(regExam.createExams(matric, exam, typeF,type));\n \n }\n else{\n return new Gson().toJson(\"Log In\");\n \n }\n }\n \n \n if(status.equals(\"result\")){\n StudentResourceResult results = new StudentResourceResult();\n \n \n try{\n \n return new Gson().toJson(results.postResult(matric, exam, attempt, time, score, type,complete));\n }\n catch(ArrayIndexOutOfBoundsException e){\n e.printStackTrace();\n \n }\n \n \n \n }\n \n \n // return StudentResourceGetRegisteredExams.getStudentsExams(matric, exam);\n \n \n return \"\";\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"student ID --> \"+this.studentID+\", Name --> \"+this.studentName;\n\t}",
"@Override\n\t public ResponseEntity<Student> getStudentById( BigInteger stdId) throws RecordNotFoundException {\n\t \tStudent stdStudent=studentrepo.findById(stdId).\n\t \t orElseThrow(() -> new RecordNotFoundException(\"Test not found for the given id\" +stdId));\n\t \treturn ResponseEntity.ok().body(stdStudent);\n\t }",
"public String toString() {\n\t\treturn this.getFirstName() + \" \" + this.getMiddleName() + \" \" + this.getLastName() + \" (Student)\\nMajor: \"\n\t\t\t\t+ this.major;\n\t}",
"void viewStudents(Professor professor);",
"public String getId() { return studentId; }",
"public StudentModel findStudent(CourseOffering c, String studentID){\n for (StudentModel s : c.getStudentsAllowedToEnroll()){\n if(s.getID().equals(studentID))\n return s;\n }\n\n return null;\n }",
"public String getMajor() \r\n {\r\n return studentMajor;\r\n }",
"public String toString() {\r\n String string; //a string is created to hold the information about the student\r\n string = \"Name: \" + getName(); //the name is added to the string\r\n string = string + \", Gender: \" + getGender(); //gender is added\r\n string = string + \", Age: \" + getAge(); //age is added\r\n string = string + \", Courses enroled: \";\r\n if (getCourse().length == 0) {\r\n string = string + \"None\"; //returns none if the student is not enroled into a course\r\n } else {\r\n for (Course course : getCourse())\r\n string = string + course.getSubject().getDescription() + \" \"; //adds the subject description if theyre in a course\r\n }\r\n string = string + \", Certificates: \";\r\n if (getCertificates().size() == 0) {\r\n string = string + \"None\"; //displays none if the student has no certificates\r\n }\r\n for (Integer id : getCertificates().toArray(new Integer[getCertificates().size()])) {\r\n string = string + id + \" \"; //adds each id of each course completed\r\n }\r\n return string + \"\\n\";\r\n }"
] | [
"0.72754425",
"0.7115269",
"0.59734595",
"0.59322554",
"0.58393073",
"0.58069944",
"0.5678991",
"0.56199026",
"0.56190443",
"0.559815",
"0.5535801",
"0.55298895",
"0.549482",
"0.5493392",
"0.54692686",
"0.5444203",
"0.5441649",
"0.5421103",
"0.5411611",
"0.5407474",
"0.53949445",
"0.5375421",
"0.53662765",
"0.5364951",
"0.5354095",
"0.5347637",
"0.53384066",
"0.53366816",
"0.53346395",
"0.53281593",
"0.5326673",
"0.53265995",
"0.5316622",
"0.5312303",
"0.5306806",
"0.53009814",
"0.529538",
"0.5283178",
"0.52788705",
"0.52776605",
"0.5275686",
"0.5273022",
"0.52689976",
"0.52612126",
"0.5239751",
"0.5224304",
"0.52200943",
"0.5208352",
"0.5205585",
"0.52046657",
"0.5199597",
"0.5197821",
"0.5194756",
"0.5166821",
"0.5164493",
"0.5164453",
"0.5159778",
"0.51578",
"0.5154754",
"0.5154729",
"0.5154667",
"0.5153864",
"0.51537955",
"0.5151843",
"0.51485324",
"0.51481384",
"0.5141146",
"0.51382476",
"0.5133419",
"0.51318175",
"0.5130837",
"0.5126893",
"0.51255244",
"0.5116805",
"0.5110889",
"0.5110067",
"0.50996584",
"0.50970316",
"0.50955737",
"0.50888604",
"0.5086025",
"0.50851345",
"0.5082131",
"0.5080207",
"0.5079379",
"0.5079211",
"0.507662",
"0.5069756",
"0.5069692",
"0.506541",
"0.50612813",
"0.5059215",
"0.5057739",
"0.50575775",
"0.50552565",
"0.50528896",
"0.50516653",
"0.50501084",
"0.5043289",
"0.50400066"
] | 0.7177861 | 1 |
Converts the ProgramOfStudentResponse to studentProgramInfo list and returns it | private List<StudentProgramInfo> getStudentProgramInfoList(
ProgramOfStudyResponse programOfStudyResponse,Student student) {
List<StudentProgramInfo> studentProgramList = new ArrayList<StudentProgramInfo>();
SimpleDateFormat dateFormat =new SimpleDateFormat("MM/dd/yyyy");
if(programOfStudyResponse!=null && programOfStudyResponse.size()>0){
for(ProgramOfStudy pos:programOfStudyResponse){
StudentProgramInfo stdProgramInfo = new StudentProgramInfo();
stdProgramInfo.setProgramOfStudyId(pos.getProgramOfStudyId());
stdProgramInfo.setEnrollmentStatus(pos.getEnrollmentStatus());
stdProgramInfo.setProgramCode(pos.getProgramCode());
stdProgramInfo.setProgramVersionCode(pos.getProgramVersionCode());
//Using ProgramVersion from the service for the programName
stdProgramInfo.setProgramName(pos.getProgramVersion());
stdProgramInfo.setStudentCrmId(student.getCrmId());
stdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());
if(pos.getExpectedStartDate()!=null){
try {
stdProgramInfo.setExpectedStartDate(dateFormat.parse(pos.getExpectedStartDate()));
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//
//need to see how to get catalogcode and state code
studentProgramList.add(stdProgramInfo);
}
}else{
/*TODO: ADDING THIS BECAUSE THERE ARE PLACES WE ARE JUST ASSUMING PROGRAM IS AVAILABLE. FIX ME */
StudentProgramInfo stdProgramInfo= new StudentProgramInfo();
stdProgramInfo.setProgramOfStudyId("N/A");
stdProgramInfo.setEnrollmentStatus("N/A");
stdProgramInfo.setProgramCode("N/A");
stdProgramInfo.setProgramVersionCode("N/A");
//Using ProgramVersion from the service for the programName
stdProgramInfo.setProgramName("N/A");
//stdProgramInfo.setStudentCrmId(student.getCrmId());
//stdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());
//stdProgramInfo.setExpectedStartDate(pos.getExpectedStartDate());
//need to see how to get catalogcode and state code
studentProgramList.add(stdProgramInfo);
}
return studentProgramList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic List<StudentProgramInfo> getStudentProgramInformation(\r\n\t\t\tStudent studentSearchDTO) throws StudentServiceException {\t\t\t\r\n\t\t ProgramOfStudyResponse programOfStudyResponse =studentSearchClient.getProgramsOfStudy(studentSearchDTO);\r\n return getStudentProgramInfoList(programOfStudyResponse,studentSearchDTO);\r\n \r\n\t}",
"@Override\r\n\tpublic StudentProgramInfo getActiveStudentProgramInformation(Student studentSearchDTO) throws StudentServiceException {\r\n\t\tList<StudentProgramInfo> studentProgramInfoList = getStudentProgramInformation(studentSearchDTO);\r\n\t\tStudentProgramInfo stdProgramInfo= new StudentProgramInfo();\r\n\t\tif(studentProgramInfoList.size()>0){\r\n\t\t\tfor(StudentProgramInfo stdProgInfo : studentProgramInfoList) {\r\n\t\t\t\tString enrollmentStatus = stdProgInfo.getEnrollmentStatus();\r\n\t\t\t\tif(enrollmentStatus!=null && (enrollmentStatus.equalsIgnoreCase(\"Active\") ||enrollmentStatus.equalsIgnoreCase(\"Conditionally Accepted\") )) {\r\n\t\t\t\t\treturn stdProgInfo;\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t\treturn studentProgramInfoList.get(0);\r\n\t\t}\r\n\t\tstdProgramInfo.setProgramOfStudyId(\"N/A\");\r\n\t\tstdProgramInfo.setEnrollmentStatus(\"N/A\");\r\n\t\tstdProgramInfo.setProgramCode(\"N/A\");\r\n\t\tstdProgramInfo.setProgramVersionCode(\"N/A\");\r\n\t\t//Using ProgramVersion from the service for the programName\r\n\t\tstdProgramInfo.setProgramName(\"N/A\");\r\n\t\tstdProgramInfo.setStateCode(\"N/A\");\r\n\t\tstdProgramInfo.setCatalogCode(\"N/A\");\r\n\t\t\r\n\t\t//stdProgramInfo.setStudentCrmId(student.getCrmId());\r\n\t\t//stdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());\r\n\t\t//stdProgramInfo.setExpectedStartDate(pos.getExpectedStartDate());\r\n\t\t//need to see how to get catalogcode and state code\r\n \t\treturn stdProgramInfo;\r\n\t}",
"private List<Student> getStudentList(StudentSearchResponse srchResponse) {\r\n\t\tList<Student> studentList = new ArrayList<Student>();\r\n\t\tif (srchResponse != null && srchResponse.size() > 0) {\r\n\t\t\tfor (StudentSearchResult srchRes : srchResponse) {\r\n\t\t\t\tStudent std = new Student(srchRes.getInquiryId(),\r\n\t\t\t\t\t\tsrchRes.getStudentNumber(), srchRes.getFirstName(),\r\n\t\t\t\t\t\tsrchRes.getLastName(), srchRes.getMaidenName(),\r\n\t\t\t\t\t\tsrchRes.getDateOfBirth(), srchRes.getCity(),\r\n\t\t\t\t\t\tsrchRes.getStateProvince(), srchRes.getSSN());\r\n\t\t\t\tstudentList.add(std);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn studentList;\r\n\t}",
"java.util.List<GoogleGRPC_08.proto.StudentResponse> \n getStudentResponseList();",
"java.util.List<com.demo.springprotobuff.Demoproto.Student> getStudentList();",
"GoogleGRPC_08.proto.StudentResponseOrBuilder getStudentResponseOrBuilder(\n int index);",
"public void getPrograms(HttpServletResponse resp, Map<String, String> programs) {\n try {\n if (programs == null) {\n programs = new HashMap<>();\n for (Program program : Program.values()) {\n programs.put(program.getProgramAbbreviation(), program.getProgram());\n }\n }\n String json = new Genson().serialize(programs);\n resp.setContentType(\"application/json\");\n resp.getOutputStream().write(json.getBytes());\n } catch (IOException err) {\n err.printStackTrace();\n }\n }",
"public Map<String, Object> getSpecificProgramDetails(String programName) throws ParseException;",
"public ArrayList<Studentdto> coursewiseStudent(String course) throws Exception {\n\t\tConnection con = null;\n\t\tcon = DBConnector.dbConnection();\n\t\tArrayList<Studentdto> coursewise = new ArrayList<Studentdto>();\n\t\ttry {\n\t\t\tPreparedStatement st = con.prepareStatement(\n\t\t\t\t\t\"select student_name,college_name,course_name,phn_no,address from student s ,college co,course cr where s.college_id=co.college_id and s.course_id =(select course_id from course where course_name=?) and cr.course_name=?\");\n\t\t\tst.setString(1, course);\n\t\t\tst.setString(2, course);\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\tint i = 1;\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudentdto studentdto = new Studentdto();\n\t\t\t\tstudentdto.setSlno(i++);\n\t\t\t\tstudentdto.setStudentname(rs.getString(1));\n\t\t\t\tstudentdto.setCollegename(rs.getString(2));\n\t\t\t\tstudentdto.setCoursename(rs.getString(3));\n\t\t\t\tstudentdto.setAddress(rs.getString(4));\n\t\t\t\tstudentdto.setPhno(rs.getString(5));\n\t\t\t\tcoursewise.add(studentdto);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (SQLSyntaxErrorException e) {\n\t\t\tthrow new SQLSyntaxErrorException(\"Error in SQL syntax\");\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Connection with database failed\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Some error occured\");\n\t\t}\n\n\t\treturn coursewise;\n\t}",
"public Map<String, Object> getProgramDetails() throws ParseException;",
"public String getStudentList()\n\t{\n\t\tString courseOutput = \"\";\n\t\tint studentNum = 1;\n\t\t\n\t\tfor(Student student: classRoll)\n\t\t{\n\t\t\tcourseOutput += studentNum + \". \" + student + \"\\n\";\t\n\t\t\t\t//adds a Student to the already created string one student at a time\n\t\t\tstudentNum++;\n\t\t}\n\t\t\n\t\tcourseOutput = getCourseName() + getCourseNumber() + getInstructor() + courseOutput;\n\t\treturn courseOutput;\n\t}",
"@Override\n\tpublic List<TrainingProgramDTO> getTrainingProgramList() {\n\t\tString query = \"SELECT t FROM TrainingProgramDTO t\";\n\t\tTypedQuery<TrainingProgramDTO> programQuery = eManager.createQuery(\n\t\t\t\tquery, TrainingProgramDTO.class);\n\t\tList<TrainingProgramDTO> programList = programQuery.getResultList();\n\t\treturn programList;\n\t}",
"java.util.List<? extends GoogleGRPC_08.proto.StudentResponseOrBuilder> \n getStudentResponseOrBuilderList();",
"@GetMapping(value = getDataForMapping)\r\n\tpublic ResponseEntity<List<Student>> getStudentsForMapping() {\r\n\t\treturn ResponseEntity.ok().body(teacherStudentService.getStudentsForMapping());\r\n\t}",
"public static ArrayList<String> getStudents(String course)\n\t{\n\t\tHashMap<String, String> map = createMap();\n\t\tArrayList<String> students = new ArrayList<String>();\n\t\t\n\t\treturn students;\n\t}",
"public static ArrayList<String> getStudents(String course)\n\t{\n\t\tHashMap<String, String> map = createMap();\n\t\tArrayList<String> students = new ArrayList<String>();\n\t\t\n\t\treturn students;\n\t}",
"public java.util.List<com.demo.springprotobuff.Demoproto.Student> getStudentList() {\n\t\t\treturn student_;\n\t\t}",
"public java.util.List<com.demo.springprotobuff.Demoproto.Student> getStudentList() {\n\t\t\t\tif (studentBuilder_ == null) {\n\t\t\t\t\treturn java.util.Collections.unmodifiableList(student_);\n\t\t\t\t} else {\n\t\t\t\t\treturn studentBuilder_.getMessageList();\n\t\t\t\t}\n\t\t\t}",
"GoogleGRPC_08.proto.StudentResponse getStudentResponse(int index);",
"public static ArrayList<String> retrieveStudentInfo(ArrayList<Student> al,String schoolName) {\n \tArrayList<String> str=new ArrayList<String>();\n \tfor(int i=0;i<al.size();i++){\n \tStudent s=al.get(i);\n \tif(s.getSchoolName().equalsIgnoreCase(schoolName)){\n \t str.add(s.getStudName());\n \t}\n }\n \treturn str;\n }",
"public ArrayList<Student> getStudentsForCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n String statement = GET_SUDENTS_FOR_COURSE;\n \n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n \n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsForCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n \n return result;\n }",
"public Student getStudInfo(String section_id, String subject_id,\n\t\t\tString teacher_id) {\n\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_STUDENT_INFO + \" WHERE \"\n\t\t\t\t+ KEY_STU_SECTION_ID + \"=\" + section_id + \" AND \"\n\t\t\t\t+ KEY_STU_SUBJECT_ID + \"=\" + subject_id + \" AND \"\n\t\t\t\t+ KEY_STU_TEACHER_ID + \"=\" + teacher_id;\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\n\t\tif (cursor != null)\n\t\t\tcursor.moveToFirst();\n\t\tStudent info = new Student();\n\t\tinfo.row_id = Integer.parseInt(cursor.getString(0));\n\t\tinfo.id = cursor.getString(1);\n\t\tinfo.name = cursor.getString(3);\n\t\tinfo.roll_no = cursor.getString(4);\n\t\tinfo.total_marks = cursor.getString(5);\n\t\tinfo.comment = cursor.getString(6);\n\n\t\tcursor.close();\n\t\treturn info;\n\t}",
"List<Map<String, Object>> getStudentsList();",
"public ArrayList<Student> retrieveStudentRequests(int teamId) {\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM student_request WHERE team_id = \" + teamId);\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint stdId\t \t= Integer.parseInt(array.get(1));\r\n\t\t\t\r\n\t\t\tStudent student = null;\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tstudent = retrieve(stdId);\r\n\t\t\t}catch(Exception e){}\r\n\t\t\t\r\n\t\t\tstudents.add(student);\r\n\t\t}\r\n\t\t\r\n\t\treturn students;\r\n\t}",
"public List<Student> getAllStudentData() {\r\n\t\tList<Student> list = new ArrayList<Student>();\r\n\t\ttry {\r\n\t\t\tConnection con = DatabaseUtility.getCon(inputStream);\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"select * from student\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tStudent stud = new Student();\r\n\r\n\t\t\t\tstud.setRollno(rs.getInt(1));\r\n\t\t\t\tstud.setFname(rs.getString(2));\r\n\t\t\t\tstud.setLname(rs.getString(3));\r\n\t\t\t\tstud.setEmail(rs.getString(4));\r\n\t\t\t\tstud.setGender(rs.getString(5));\r\n\t\t\t\tstud.setDOB(rs.getString(6));\r\n\t\t\t\tstud.setAddress(rs.getString(7));\r\n\t\t\t\tstud.setContact(rs.getString(8));\r\n\r\n\t\t\t\tlist.add(stud);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(ex);\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}",
"public List<User_info> getListStudent(long course_id) {\n try {\n \tConnection conn = DBConnect.getConnecttion();\n String sql = \"select * from user_info,course_user where course_user.course_id='\"+course_id+\"' and user_info.id =course_user.id and user_info.quyen=2 \";\n ps = conn.prepareStatement(sql);\n rs = ps.executeQuery();\n \n List<User_info> listStudent = new ArrayList<User_info>();\n while (rs.next()) {\n \tUser_info u = new User_info();\n \tu.setId(rs.getLong(1));\n \tu.setTen(rs.getString(2));\n \tu.setSodienthoai(rs.getString(3));\n \tu.setGioitinh(rs.getInt(4));\n \tu.setNgaysinh(rs.getString(5));\n \tu.setEmail(rs.getString(6));\n \tu.setAnhdaidien(rs.getString(7));\n \tu.setDiachi(rs.getString(8));\n \tu.setQuyen(rs.getInt(9));\n \tlistStudent.add(u);\n }\n conn.close();\n return listStudent;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"public static ArrayList<Student> getAllStudenti() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.parameters = new Object[] {};\n\t\t\trp.type = RequestType.GET_ALL_STUDENTS;\n\t\t\tReceiveContent rps = sendReceive(rp);\n\t\t\treturn (ArrayList<Student>) rps.parameters[0];\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"SendNewsLetter error\");\n\t\t}\n\t\treturn new ArrayList<Student>();\n\t}",
"public static ArrayList<Student> getStudentsFromClass(String classCode)\n\t{\n\t\tString sql = \"SELECT s.* FROM UserInfo s, ClassMember c WHERE c.classcode = ? AND c.studentID = s.userID\";\n\t\tArrayList<Student> students = new ArrayList<Student>();\n\t\ttry(Connection conn = DriverManager.getConnection(db, user, pwd);\n\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);)\n\t\t{\n\t\t\tps.setString(1, classCode);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tString name = rs.getString(\"firstname\") + \" \" + rs.getString(\"lastname\");\n\t\t\t\tString email = rs.getString(\"email\");\n\t\t\t\tint id = rs.getInt(\"userID\");\n\t\t\t\tStudent s = new Student(name, email, id);\n\t\t\t\tstudents.add(s);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn students;\n\t}",
"List<Student> getStudent();",
"ArrayList retrievestudentdata() throws ClassNotFoundException;",
"public static ArrayList<Student> getStudentiByCorso(long idCorso) {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_STUDENTS_BY_COURSE;\n\t\trp.parameters = new Object[] { idCorso };\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Student> anagList = (ArrayList<Student>) rpp.parameters[0];\n\t\treturn anagList;\n\t}",
"public com.demo.springprotobuff.Demoproto.Student getStudent(int index) {\n\t\t\treturn student_.get(index);\n\t\t}",
"public ArrayList getStudentIds(String courseId)\r\n throws RemoteException;",
"@GET\n\t@Path(\"{programId}/course\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic List<Course> getCoursesforProgram(@PathParam(\"programId\") String progId){\n\t\treturn ProgramService.getInstance().getCourseForProgram(progId);\n\t}",
"public List<StudentDto> getAllStudents() {\n\t\tList<Student> studentList = studentRepository.findAll();\n\t\tif (ObjectUtils.isEmpty(studentList))\n\t\t\tthrow new ResourceNotFoundException(Constants.noDataFound);\n\n\t\tList<StudentDto> studentDtoList = studentList.stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t .map(converter::convert)\n\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.toList());\t\t\n\t\treturn studentDtoList;\n\t}",
"@Override\n\tpublic List<TblProgram> displayProgram(int idProgram) {\n\t\tList<TblProgram> program = null;\n\t\t\n\t\tSession session = HibernateUtils.getSessionFactory().getCurrentSession();\n\t\t\n\t\ttry {\n\t\t\tsession.getTransaction().begin();\n\t\t\tString hql = \"from TblProgram where idProgram = :idProgram\";\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setParameter(\"idProgram\", idProgram);\n\t\t\tprogram = query.list();\n\t\t\t\n\t\t\treturn program;\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Loi:\" + ex.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"private void showStudentCourses()\r\n {\r\n \tString courseResponse = \"\";\r\n \tfor(Course course : this.getDBManager().getStudentCourses(this.studentId))\r\n \t{\r\n \t\tcourseResponse += \"Course Faculty: \" + course.getCourseName() + \", Course Number: \" + String.valueOf(course.getCourseNum()) + \"\\n\";\r\n \t}\r\n \tthis.getClientOut().printf(\"SUCCESS\\n%s\\n\", courseResponse);\r\n \tthis.getClientOut().flush();\r\n }",
"public HashMap<String, JSONObject> getListProgramsAt(Long timestamp);",
"public Map<String, Object> getFirstDisplayedProgramDetails() throws ParseException;",
"public String getStudentsInCourse() {\n String output = \"\"; \n for (Student student : students) { // enhanced for\n output += student.toString() + \"\\n\";\n } // end for\n return output;\n }",
"public String getProgrammerResponse() {\n\t\treturn programmerResponse;\n\t}",
"public ArrayList<Studentdto> studentList() throws Exception {\n\t\tArrayList<Studentdto> studentlist = new ArrayList<Studentdto>();\n\t\tConnection con = null;\n\t\tcon = DBConnector.dbConnection();\n\t\ttry {\n\t\t\tPreparedStatement st = con.prepareStatement(\n\t\t\t\t\t\"select student_name,college_name, course_name,phn_no,address from student s ,college co,course cr where s.course_id=cr.course_id and s.college_id=co.college_id\");\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\tint i = 1;\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudentdto studentdto = new Studentdto();\n\t\t\t\tstudentdto.setSlno(i++);\n\t\t\t\tstudentdto.setStudentname(rs.getString(1));\n\t\t\t\tstudentdto.setCollegename(rs.getString(2));\n\t\t\t\tstudentdto.setCoursename(rs.getString(3));\n\t\t\t\tstudentdto.setAddress(rs.getString(4));\n\t\t\t\tstudentdto.setPhno(rs.getString(5));\n\t\t\t\tstudentlist.add(studentdto);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (SQLSyntaxErrorException e) {\n\t\t\tthrow new SQLSyntaxErrorException(\"Error in SQL syntax\");\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Connection with database failed\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Some error occured\");\n\t\t}\n\t\treturn studentlist;\n\t}",
"public ArrayList<Student> getAllStudentInfo(String student_id,\n\t\t\tString roll_no) {\n\t\tArrayList<Student> studentList = new ArrayList<Student>();\n\t\t// Select All Query\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_TEACHER_ASSIGNMENT\n\t\t\t\t+ \" WHERE \" + KEY_STUDENT_ID + \"=\" + student_id + \" AND \"\n\t\t\t\t+ KEY_ROLL_NO + \"=\" + roll_no;\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\n\t\t// looping through all rows and adding to list\n\t\tcursor.moveToFirst();\n\t\twhile (cursor.isAfterLast() == false) {\n\t\t\tStudent info = new Student();\n\t\t\tinfo.row_id = Integer.parseInt(cursor.getString(0));\n\t\t\tinfo.id = cursor.getString(1);\n\t\t\tinfo.name = cursor.getString(2);\n\t\t\tinfo.roll_no = cursor.getString(3);\n\t\t\tinfo.section_id = cursor.getString(4);\n\t\t\tinfo.subject_id = cursor.getString(5);\n\t\t\tinfo.teacher_id = cursor.getString(6);\n\t\t\t// Adding contact to list\n\t\t\tstudentList.add(info);\n\t\t\tcursor.moveToNext();\n\t\t}\n\t\tcursor.close();\n\t\t// return contact list\n\t\treturn studentList;\n\t}",
"public ArrayList<Studentdto> collegewiseStudent(String college) throws Exception {\n\t\tConnection con = null;\n\t\tcon = DBConnector.dbConnection();\n\t\tArrayList<Studentdto> collegewise = new ArrayList<Studentdto>();\n\t\ttry {\n\t\t\tPreparedStatement st = con.prepareStatement(\n\t\t\t\t\t\"select student_name,college_name,course_name,phn_no,address from student s ,college co,course cr where s.course_id=cr.course_id and s.college_id =(select college_id from college where college_name=?) and co.college_name=?\");\n\t\t\tst.setString(1, college);\n\t\t\tst.setString(2, college);\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\tint i = 1;\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudentdto studentdto = new Studentdto();\n\t\t\t\tstudentdto.setSlno(i++);\n\t\t\t\tstudentdto.setStudentname(rs.getString(1));\n\t\t\t\tstudentdto.setCollegename(rs.getString(2));\n\t\t\t\tstudentdto.setCoursename(rs.getString(3));\n\t\t\t\tstudentdto.setAddress(rs.getString(4));\n\t\t\t\tstudentdto.setPhno(rs.getString(5));\n\t\t\t\tcollegewise.add(studentdto);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (SQLSyntaxErrorException e) {\n\t\t\tthrow new SQLSyntaxErrorException(\"Error in SQL syntax\");\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Connection with database failed\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Some error occured\");\n\t\t}\n\t\treturn collegewise;\n\t}",
"public List<PresentyData> getStudentist() {\n return stList;\n }",
"@Override\n\tpublic List<AASTranscriptSemester> getAASTranscriptSemester(String stuId, String acaYear, String semesterId) {\n\t\tList<AASTranscriptSemester> arr = new ArrayList<>();\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tconn = oConnection.getOracleConnection();\n\t\t\t//If semesterId == 4, it means it's SPRING semester, we have to change it into 1 because numYears variable bellow \n\t\t\t//which is the concatenation between academic year and semester Id (Ex: 20184, 20173,...) cannot be\n\t\t\t//like 20181, 20171, 20151, etc. it has to be like 20184, 20174, 20154, etc. \n\t\t\tif (semesterId.equals(\"4\"))\n\t\t\t\tsemesterId = \"1\";\n\t\t\tString numYear = acaYear + semesterId;\n\t\t\tString sql = \n\t\t\t\t\t\"select id_student,semester_name,aca_year,semester,term_gpa_aas,cum_gpa_aas\"+ \n\t\t\t\t\t\" from v_cum_gpa_aas\"+ \n\t\t\t\t\t\" where id_student = ?\" +\n\t\t\t\t\t\" and num_semester_year < ?\"+\n\t\t\t\t\t\" order by num_semester_year\"; \n\t\t\tstatement = conn.prepareStatement(sql);\n\t\t\tstatement.setString(1, stuId);\n\t\t\tstatement.setString(2, numYear);\n\t\t\trs = statement.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tarr.add(new AASTranscriptSemester(rs.getString(\"id_student\"),rs.getString(\"semester_name\"),rs.getString(\"aca_year\")\n\t\t\t\t\t\t, rs.getString(\"semester\"), rs.getDouble(\"term_gpa_aas\"), rs.getDouble(\"cum_gpa_aas\")));\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstatement.close();\n\t\t\tconn.close();\n\t\t\treturn arr;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (statement != null)\n\t\t\t\t\tstatement.close();\n\t\t\t\tif (conn != null)\n\t\t\t\t\tconn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public HashMap<String, JSONObject> getListPrograms();",
"public ArrayList<Student> getStudents() {\n\n ArrayList<Student> students = new ArrayList<Student>();\n String query = \"SELECT * FROM student\";\n try{\n result = statement.executeQuery(query);\n while(result.next()) {\n\n String id = Integer.toString(result.getInt(\"student_id\"));\n String firstName = result.getString(\"student_first_name\");\n String lastName = result.getString(\"student_last_name\");\n String degree = result.getString(\"degree\");\n String yearOfStudy = result.getString(\"year_of_study\");\n String outcome = result.getString(\"outcome\");\n students.add(new Student(id, firstName, lastName, degree, yearOfStudy, outcome));\n\n }\n }\n catch (SQLException e){\n\n }\n\n return students;\n }",
"public ArrayList getStudents();",
"@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response list() {\n\t\t//System.out.println(\"================================= public Response list()\");\n\t\tIterable<Student> students = this.studentService.findAll();\n\t\tif (students != null) {\n\t\t\tList<StudentModelBasic> sbmList = new ArrayList<>();\n\t\t\tfor (Student s : students) {\n\t\t\t\tsbmList.add(this.studentService.convertToModelBasic(s));\n\t\t\t}\n\t\t\t//System.out.println(students.toString());\n\t\t\treturn Response.ok(sbmList).build();\n\t\t} else {\n\t\t\treturn Response.status(Status.NOT_FOUND).build();\n\t\t}\n\t}",
"@Override\r\n\tpublic List<Student> getStudents(String courseName) {\n\t\tList<Student> students=new ArrayList<>();\r\n\t\tString sql=\"select studentid, studentname, studentshv.courseid from studentshv inner join courseshv on studentshv.courseid=courseshv.courseid where coursename=?\";\r\n\t\tPreparedStatement pstmt = null;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setString(1, courseName);\r\n\t\t\tResultSet rs=pstmt.executeQuery();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tlong studentId=rs.getLong(\"studentid\");\r\n\t\t\t\tString studentName=rs.getString(\"studentname\");\r\n\t\t\t\tlong courseId=rs.getLong(\"courseid\");\r\n\t\t\t\tstudents.add(new Student(studentId,studentName,courseId));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn students;\r\n\t}",
"public List <Student> getAllStudents();",
"@Override\n\tpublic JSONObject getNonparticipationExamList(Map<String, Object> param) {\n\t\tSet<String> classIdSet = new HashSet<String>();\n\t\tString cid = param.get(\"tClassId\") != null ? param.get(\"tClassId\")\n\t\t\t\t.toString() : \"\";\n\t\tJSONObject result = new JSONObject();\n\t\tSchool sch = (School) param.get(\"school\");\n\t\tparam.put(\"tClassIds\", cid.isEmpty()?\"\":Arrays.asList(cid.split(\",\")));\n\t\tif (!cid.isEmpty()) {\n\t\t\tclassIdSet.addAll(Arrays.asList(cid.split(\",\")));\n\t\t}\n\t\t\n\t\tList<JSONObject> instulist = new ArrayList<JSONObject>();\n\t\tList<JSONObject> nostulist = new ArrayList<JSONObject>();\n\t\tExamManagement em = examManagementDao.getExamManagementListById(param,\n\t\t\t\tparam.get(\"termInfo\").toString());\n\t\tif (em == null) {\n\t\t\tthrow new CommonRunException(0, \"没有查询到相应的考试信息,请刷新页面!\");\n\t\t}\n\t\tInteger autoIncr = em.getAutoIncr();\n\t\tparam.put(\"autoIncr\", autoIncr);\n\n\t\tList<ExamPlan> eplist = examManagementDao.getExamPlanList(param, param\n\t\t\t\t.get(\"termInfo\").toString(), autoIncr);\n\t\tList<String> gralist = new ArrayList<String>();\n\t\tfor (ExamPlan ep : eplist) {\n\t\t\tgralist.add(ep.getUsedGrade());\n\t\t}\n\t\tList<Account> al = new ArrayList<Account>();\n\t\t// al=commonDataService.getStudentList(Long.valueOf(param.get(\"schoolId\").toString()),\n\t\t// param.get(\"termInfo\").toString(), param.get(\"studName\").toString());\n\t\tList<String> noclass=new ArrayList<String>();\n\t\tList<String> inclass=new ArrayList<String>();\n\t\tfor (ExamPlan ep : eplist) {\n\n\t\t\tparam.put(\"examPlanId\", ep.getExamPlanId());\n\t\t\tList<JSONObject> subjectAndLe = examManagementSetDao\n\t\t\t\t\t.getExplantSubject(param);// 查询该次考试计划设置的科目级层次\n\t\t\tMap<String, Account> usermap = new HashMap<String, Account>();\n\n\t\t\tif (!ep.getScheduleId().isEmpty()) { // 从新高考取数据\n\t\t\t\tList<Long> aidlist = new ArrayList<Long>();\n\t\t\t\tList<TSchTClassInfoExternal> stulist = scheduleExternalService\n\t\t\t\t\t\t.getTClassInfoExternal(ep.getScheduleId(), Long\n\t\t\t\t\t\t\t\t.valueOf(param.get(\"schoolId\").toString()),\n\t\t\t\t\t\t\t\tparam.get(\"termInfo\").toString(), ep\n\t\t\t\t\t\t\t\t\t\t.getUsedGrade(),\n\t\t\t\t\t\t\t\tclassIdSet.isEmpty() ? null : classIdSet);\n\n\t\t\t\tif (!param.get(\"studName\").toString().isEmpty()) {\n\t\t\t\t\tal = commonDataService.getStudentList(\n\t\t\t\t\t\t\tLong.valueOf(param.get(\"schoolId\").toString()),\n\t\t\t\t\t\t\tparam.get(\"termInfo\").toString(),\n\t\t\t\t\t\t\tparam.get(\"studName\").toString());\n\t\t\t\t\tfor (Account ac : al) {\n\t\t\t\t\t\taidlist.add(ac.getId());\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (TSchTClassInfoExternal tc : stulist) {\n\t\t\t\t\t\tList<Long> tcsidlist = tc.getStudentIdList();\n\t\t\t\t\t\taidlist.addAll(tcsidlist);\n\t\t\t\t\t}\n\t\t\t\t\tal = commonDataService.getAccountBatch(\n\t\t\t\t\t\t\tLong.valueOf(param.get(\"schoolId\").toString()),\n\t\t\t\t\t\t\taidlist, param.get(\"termInfo\").toString());\n\t\t\t\t}\n\t\t\t\tif(!param.get(\"studName\").toString().isEmpty()&&classIdSet.size()<=1){\n\t\t\t\t\tparam.put(\"accountId\", aidlist.isEmpty() ? \"\" : aidlist);\n\t\t\t\t}\n\n\t\t\t\tif (al.isEmpty()) {\n\t\t\t\t\tthrow new CommonRunException(0, \"没有任何相关的学生信息\");\n\t\t\t\t}\n\t\t\t\tList<JSONObject> nolist = examManagementSetDao\n\t\t\t\t\t\t.getNonparticipationExamList(param);// 未拍考的\n\n\t\t\t\tfor (Account a : al) {\n\t\t\t\t\tusermap.put(a.getId() + \"\", a);\n\t\t\t\t}\n\n\t\t\t\tMap<String, Map<String, String>> nomap = new HashMap<String, Map<String, String>>();\n\t\t\t\tfor (JSONObject j : nolist) {\n\t\t\t\t\tif (nomap.containsKey(j.getString(\"accountId\"))) {\n\t\t\t\t\t\tMap<String, String> smap = nomap.get(j\n\t\t\t\t\t\t\t\t.getString(\"accountId\"));\n\t\t\t\t\t\tsmap.put(j.getString(\"subjectId\"),\n\t\t\t\t\t\t\t\tj.getString(\"subjectId\"));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tMap<String, String> smap = new HashMap<String, String>();\n\t\t\t\t\t\tsmap.put(j.getString(\"subjectId\"),\n\t\t\t\t\t\t\t\tj.getString(\"subjectId\"));\n\t\t\t\t\t\tnomap.put(j.getString(\"accountId\"), smap);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tList<TSchTClassInfoExternal> tClassInfoList = scheduleExternalService\n\t\t\t\t\t\t.getTClassInfoExternalNoAccount(ep.getScheduleId(),\n\t\t\t\t\t\t\t\tLong.valueOf(param.get(\"schoolId\").toString()),\n\t\t\t\t\t\t\t\tparam.get(\"termInfo\").toString(),\n\t\t\t\t\t\t\t\tep.getUsedGrade(), classIdSet);\n\t\t\t\tMap<String, TSchTClassInfoExternal> tclassMap = new HashMap<String, TSchTClassInfoExternal>();\n\t\t\t\tif (CollectionUtils.isNotEmpty(tClassInfoList)) {\n\t\t\t\t\tfor (TSchTClassInfoExternal tce : tClassInfoList) {\n\t\t\t\t\t\ttclassMap.put(tce.getTclassId(), tce);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (JSONObject json : nolist) {\n\t\t\t\t\tif (usermap.containsKey(json.getString(\"accountId\"))) {\n\t\t\t\t\t\tString tcname = tclassMap.containsKey(json\n\t\t\t\t\t\t\t\t.getString(\"tClassId\")) ? tclassMap.get(\n\t\t\t\t\t\t\t\tjson.getString(\"tClassId\")).getTclassName()\n\t\t\t\t\t\t\t\t: \"\";\n\t\t\t\t\t\tjson.put(\"studName\",\n\t\t\t\t\t\t\t\tusermap.get(json.getString(\"accountId\"))\n\t\t\t\t\t\t\t\t\t\t.getName());\n\t\t\t\t\t\tjson.put(\"tClassName\", tcname);\n\t\t\t\t\t\tjson.put(\"examPlanId\", ep.getExamPlanId());\n\t\t\t\t\t\tnoclass.add(tcname);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnostulist.addAll(nolist);\n\n\t\t\t\tfor (TSchTClassInfoExternal tc : stulist) {\n\t\t\t\t\tMap<String, JSONObject> sujmap = new HashMap<String, JSONObject>();// 存放考试需要的科目和层次\n\t\t\t\t\tString tid = tc.getTclassId();\n\t\t\t\t\tString tclaname = tclassMap.containsKey(tid) ? tclassMap\n\t\t\t\t\t\t\t.get(tid).getTclassName() : \"\";\n\t\t\t\t\tList<Long> tcsidlist = tc.getStudentIdList();\n\t\t\t\t\tList<TSchSubjectInfo> tslist = tc.getSubjectList();\n\t\t\t\t\tfor (TSchSubjectInfo ts : tslist) {\n\t\t\t\t\t\tfor (JSONObject sl : subjectAndLe) {\n\t\t\t\t\t\t\tif (sl.getString(\"subjectId\").equals(\n\t\t\t\t\t\t\t\t\tString.valueOf(ts.getSubjectId()))) {\n\t\t\t\t\t\t\t\tif (sl.getString(\"subjectLevel\").equals(\"0\")) {\n\t\t\t\t\t\t\t\t\tsujmap.put(\n\t\t\t\t\t\t\t\t\t\t\tString.valueOf(ts.getSubjectId()),\n\t\t\t\t\t\t\t\t\t\t\tsl);\n\t\t\t\t\t\t\t\t} else if (sl.getString(\"subjectLevel\").equals(\n\t\t\t\t\t\t\t\t\t\tString.valueOf(ts.getSubjectLevel()))) {\n\t\t\t\t\t\t\t\t\tsujmap.put(\n\t\t\t\t\t\t\t\t\t\t\tString.valueOf(ts.getSubjectId()),\n\t\t\t\t\t\t\t\t\t\t\tsl);\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\t// if(param.get(\"name\")!=null&&!param.get(\"name\").toString().isEmpty()){\n\t\t\t\t\t// Map<String,List<JSONObject>> nomap=new HashMap<String,\n\t\t\t\t\t// List<JSONObject>>();\n\t\t\t\t\t// for(JSONObject no:nolist){\n\t\t\t\t\t// if(nomap.containsKey(no.getString(\"\"))){\n\t\t\t\t\t//\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t\tfor (Long tsid : tcsidlist) {// 学生列表\n\t\t\t\t\t\tif (usermap.containsKey(String.valueOf(tsid))) {// 和基础数据比较\n\t\t\t\t\t\t\tfor (Map.Entry<String, JSONObject> entry : sujmap\n\t\t\t\t\t\t\t\t\t.entrySet()) {\n\t\t\t\t\t\t\t\tString sujid = entry.getKey();\n\t\t\t\t\t\t\t\tJSONObject sujle = entry.getValue();\n\t\t\t\t\t\t\t\tString examSubjName = sujle\n\t\t\t\t\t\t\t\t\t\t.getString(\"examSubjName\");\n//\t\t\t\t\t\t\t\tif (sujle.getInteger(\"subjectLevel\") != null\n//\t\t\t\t\t\t\t\t\t\t& !sujle.getInteger(\"subjectLevel\")\n//\t\t\t\t\t\t\t\t\t\t\t\t.equals(\"0\")) {\n//\t\t\t\t\t\t\t\t\texamSubjName += EnumSubjectLevel\n//\t\t\t\t\t\t\t\t\t\t\t.findNameByValueWithBrackets(sujle\n//\t\t\t\t\t\t\t\t\t\t\t\t\t.getInteger(\"subjectLevel\"));\n//\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!nolist.isEmpty()) {\n\t\t\t\t\t\t\t\t\tif (nomap.containsKey(String.valueOf(tsid))) {// 和不参考学生比较\n\t\t\t\t\t\t\t\t\t\tMap<String, String> sumap = nomap\n\t\t\t\t\t\t\t\t\t\t\t\t.get(String.valueOf(tsid));\n\t\t\t\t\t\t\t\t\t\tif (!sumap.containsKey(sujid)) {\n\t\t\t\t\t\t\t\t\t\t\tJSONObject json = new JSONObject();\n\t\t\t\t\t\t\t\t\t\t\tjson.put(\"accountId\", tsid);\n\t\t\t\t\t\t\t\t\t\t\tjson.put(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"studName\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tusermap.get(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString.valueOf(tsid))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\t\t\t\t\t\t\t\t\t\t\tjson.put(\"examSubjectId\", sujle\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getString(\"examSubjectId\"));\n\t\t\t\t\t\t\t\t\t\t\tjson.put(\"examSubjectName\",\n\t\t\t\t\t\t\t\t\t\t\t\t\texamSubjName);\n\t\t\t\t\t\t\t\t\t\t\tjson.put(\"tClassId\", tid);\n\t\t\t\t\t\t\t\t\t\t\tjson.put(\"tClassName\", tclaname);\n\t\t\t\t\t\t\t\t\t\t\tjson.put(\"examPlanId\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tep.getExamPlanId());\n\t\t\t\t\t\t\t\t\t\t\tinstulist.add(json);\n\t\t\t\t\t\t\t\t\t\t\tinclass.add(tclaname);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tJSONObject json = new JSONObject();\n\t\t\t\t\t\t\t\t\t\tjson.put(\"accountId\", tsid);\n\t\t\t\t\t\t\t\t\t\tjson.put(\n\t\t\t\t\t\t\t\t\t\t\t\t\"studName\",\n\t\t\t\t\t\t\t\t\t\t\t\tusermap.get(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString.valueOf(tsid))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\t\t\t\t\t\t\t\t\t\tjson.put(\"examSubjectId\", sujle\n\t\t\t\t\t\t\t\t\t\t\t\t.getString(\"examSubjectId\"));\n\t\t\t\t\t\t\t\t\t\tjson.put(\"examSubjectName\",\n\t\t\t\t\t\t\t\t\t\t\t\texamSubjName);\n\t\t\t\t\t\t\t\t\t\tjson.put(\"tClassId\", tid);\n\t\t\t\t\t\t\t\t\t\tjson.put(\"tClassName\", tclaname);\n\t\t\t\t\t\t\t\t\t\tjson.put(\"examPlanId\",\n\t\t\t\t\t\t\t\t\t\t\t\tep.getExamPlanId());\n\t\t\t\t\t\t\t\t\t\tinstulist.add(json);\n\t\t\t\t\t\t\t\t\t\tinclass.add(tclaname);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tJSONObject json = new JSONObject();\n\t\t\t\t\t\t\t\t\tjson.put(\"accountId\", tsid);\n\t\t\t\t\t\t\t\t\tjson.put(\"studName\",\n\t\t\t\t\t\t\t\t\t\t\tusermap.get(String.valueOf(tsid))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\t\t\t\t\t\t\t\t\tjson.put(\"examSubjectId\",\n\t\t\t\t\t\t\t\t\t\t\tsujle.getString(\"examSubjectId\"));\n\t\t\t\t\t\t\t\t\tjson.put(\"examSubjectName\", examSubjName);\n\t\t\t\t\t\t\t\t\tjson.put(\"tClassId\", tid);\n\t\t\t\t\t\t\t\t\tjson.put(\"tClassName\", tclaname);\n\t\t\t\t\t\t\t\t\tjson.put(\"examPlanId\", ep.getExamPlanId());\n\t\t\t\t\t\t\t\t\tinstulist.add(json);\n\t\t\t\t\t\t\t\t\tinclass.add(tclaname);\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\t// }\n\n\t\t\t\t}\n\t\t\t} else if (ep.getScheduleId().isEmpty()) {\n\t\t\t\t// 没有选择课表 从基础数据取数据\n\t\t\t\tList<String> aidlist = new ArrayList<String>();\n\t\t\t\tif (!param.get(\"studName\").toString().isEmpty()) {\n\t\t\t\t\tal = commonDataService.getStudentList(\n\t\t\t\t\t\t\tLong.valueOf(param.get(\"schoolId\").toString()),\n\t\t\t\t\t\t\tparam.get(\"termInfo\").toString(),\n\t\t\t\t\t\t\tparam.get(\"studName\").toString());\n\t\t\t\t} else {\n\t\t\t\t\tHashMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"schoolId\", param.get(\"schoolId\"));\n\t\t\t\t\tmap.put(\"termInfoId\", param.get(\"termInfo\"));\n\t\t\t\t\tmap.put(\"usedGradeId\", StringUtils.join(gralist, \",\"));\n\t\t\t\t\tif (!cid.isEmpty()) {\n\t\t\t\t\t\tmap.put(\"classId\", cid);\n\t\t\t\t\t}\n\t\t\t\t\tal = commonDataService.getStudentList(map);\n\t\t\t\t}\n\t\t\t\tif (al.isEmpty()) {\n\t\t\t\t\tthrow new CommonRunException(0, \"没有任何相关的学生信息\");\n\t\t\t\t}\n\t\t\t\tfor (Account a : al) {\n\t\t\t\t\tusermap.put(a.getId() + \"\", a);\n\t\t\t\t\taidlist.add(a.getId() + \"\");\n\t\t\t\t}\n\t\t\t\tif(!param.get(\"studName\").toString().isEmpty()&&classIdSet.size()<=1){\n\t\t\t\t\tparam.put(\"accountId\", aidlist.isEmpty() ? \"\" : aidlist);\n\t\t\t\t}\n\t\t\t\t//param.put(\"accountId\", aidlist);\n\n\t\t\t\tList<JSONObject> nolist = examManagementSetDao\n\t\t\t\t\t\t.getNonparticipationExamList(param);// 未拍考的\n\t\t\t\tMap<String, Map<String, String>> nomap = new HashMap<String, Map<String, String>>();\n\t\t\t\tfor (JSONObject j : nolist) {\n\t\t\t\t\tif (nomap.containsKey(j.getString(\"accountId\"))) {\n\t\t\t\t\t\tMap<String, String> smap = nomap.get(j\n\t\t\t\t\t\t\t\t.getString(\"accountId\"));\n\t\t\t\t\t\tsmap.put(j.getString(\"subjectId\"),\n\t\t\t\t\t\t\t\tj.getString(\"subjectId\"));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tMap<String, String> smap = new HashMap<String, String>();\n\t\t\t\t\t\tsmap.put(j.getString(\"subjectId\"),\n\t\t\t\t\t\t\t\tj.getString(\"subjectId\"));\n\t\t\t\t\t\tnomap.put(j.getString(\"accountId\"), smap);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tMap<String, JSONObject> sujmap = new HashMap<String, JSONObject>();// 存放考试需要的科目和层次\n\n\t\t\t\tHashMap<String, Classroom> classMap = new HashMap<String, Classroom>();\n\t\t\t\tList<Classroom> classes = commonDataService.getSimpleClassList(\n\t\t\t\t\t\tsch, null, param.get(\"termInfo\").toString());\n\t\t\t\tfor (Classroom clr : classes) {\n\t\t\t\t\tif (clr.getId() != 0 && clr.getClassName() != null) {\n\t\t\t\t\t\tclassMap.put(clr.getId() + \"\", clr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (JSONObject sl : subjectAndLe) {\n\t\t\t\t\tsujmap.put(sl.getString(\"subjectId\"), sl);\n\t\t\t\t}\n\t\t\t\tString claid = \"\";\n\t\t\t\tString clasname = \"\";\n\n\t\t\t\tfor (JSONObject json : nolist) {// 不参考的\n\t\t\t\t\tif (usermap.containsKey(json.getString(\"accountId\"))) {\n\t\t\t\t\t\tString tcname = classMap.containsKey(json\n\t\t\t\t\t\t\t\t.getString(\"tClassId\")) ? classMap.get(\n\t\t\t\t\t\t\t\tjson.getString(\"tClassId\")).getClassName() : \"\";\n\t\t\t\t\t\tjson.put(\"studName\",\n\t\t\t\t\t\t\t\tusermap.get(json.getString(\"accountId\"))\n\t\t\t\t\t\t\t\t\t\t.getName());\n\t\t\t\t\t\tjson.put(\"tClassName\", tcname);\n\t\t\t\t\t\tjson.put(\"examPlanId\", ep.getExamPlanId());\n\t\t\t\t\t\tnoclass.add(tcname);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnostulist.addAll(nolist);\n\t\t\t\tfor (Account a : al) {\n\t\t\t\t\tString tsid = a.getId() + \"\";\n\t\t\t\t\tList<User> users = a.getUsers();\n\t\t\t\t\tfor (User u : users) {\n\t\t\t\t\t\tif (u.getStudentPart() != null) {\n\t\t\t\t\t\t\tclaid = u.getStudentPart().getClassId() + \"\";\n\t\t\t\t\t\t\tclasname = classMap.get(claid) != null ? classMap\n\t\t\t\t\t\t\t\t\t.get(claid).getClassName() : \"\";\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfor (Map.Entry<String, JSONObject> entry : sujmap\n\t\t\t\t\t\t\t.entrySet()) {\n\t\t\t\t\t\tString sujid = entry.getKey();\n\t\t\t\t\t\tJSONObject sujle = entry.getValue();\n\t\t\t\t\t\tString examSubjName = sujle.getString(\"examSubjName\");\n//\t\t\t\t\t\tif (sujle.getInteger(\"subjectLevel\") != null\n//\t\t\t\t\t\t\t\t& !sujle.getInteger(\"subjectLevel\").equals(\"0\")) {\n//\t\t\t\t\t\t\texamSubjName += EnumSubjectLevel\n//\t\t\t\t\t\t\t\t\t.findNameByValueWithBrackets(sujle\n//\t\t\t\t\t\t\t\t\t\t\t.getInteger(\"subjectLevel\"));\n//\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!nolist.isEmpty()) {\n\t\t\t\t\t\t\tif (nomap.containsKey(String.valueOf(tsid))) {// 和不参考学生比较\n\t\t\t\t\t\t\t\tMap<String, String> sumap = nomap.get(String\n\t\t\t\t\t\t\t\t\t\t.valueOf(tsid));\n\t\t\t\t\t\t\t\tif (!sumap.containsKey(sujid)) {\n\t\t\t\t\t\t\t\t\tJSONObject json = new JSONObject();\n\t\t\t\t\t\t\t\t\tjson.put(\"accountId\", tsid);\n\t\t\t\t\t\t\t\t\tjson.put(\"studName\",\n\t\t\t\t\t\t\t\t\t\t\tusermap.get(String.valueOf(tsid))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\t\t\t\t\t\t\t\t\tjson.put(\"examSubjectId\",\n\t\t\t\t\t\t\t\t\t\t\tsujle.getString(\"examSubjectId\"));\n\t\t\t\t\t\t\t\t\tjson.put(\"examSubjectName\", examSubjName);\n\t\t\t\t\t\t\t\t\tjson.put(\"tClassId\", claid);\n\t\t\t\t\t\t\t\t\tjson.put(\"tClassName\", clasname);\n\t\t\t\t\t\t\t\t\tjson.put(\"examPlanId\", ep.getExamPlanId());\n\t\t\t\t\t\t\t\t\tinstulist.add(json);\n\t\t\t\t\t\t\t\t\tinclass.add(clasname);\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\tJSONObject json = new JSONObject();\n\t\t\t\t\t\t\t\tjson.put(\"accountId\", tsid);\n\t\t\t\t\t\t\t\tjson.put(\"studName\",\n\t\t\t\t\t\t\t\t\t\tusermap.get(String.valueOf(tsid))\n\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\t\t\t\t\t\t\t\tjson.put(\"examSubjectId\",\n\t\t\t\t\t\t\t\t\t\tsujle.getString(\"examSubjectId\"));\n\t\t\t\t\t\t\t\tjson.put(\"examSubjectName\", examSubjName);\n\t\t\t\t\t\t\t\tjson.put(\"tClassId\", claid);\n\t\t\t\t\t\t\t\tjson.put(\"tClassName\", clasname);\n\t\t\t\t\t\t\t\tjson.put(\"examPlanId\", ep.getExamPlanId());\n\t\t\t\t\t\t\t\tinstulist.add(json);\n\t\t\t\t\t\t\t\tinclass.add(clasname);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tJSONObject json = new JSONObject();\n\t\t\t\t\t\t\tjson.put(\"accountId\", tsid);\n\t\t\t\t\t\t\tjson.put(\"studName\",\n\t\t\t\t\t\t\t\t\tusermap.get(String.valueOf(tsid)).getName());\n\t\t\t\t\t\t\tjson.put(\"examSubjectId\",\n\t\t\t\t\t\t\t\t\tsujle.getString(\"examSubjectId\"));\n\t\t\t\t\t\t\tjson.put(\"examSubjectName\", examSubjName);\n\t\t\t\t\t\t\tjson.put(\"tClassId\", claid);\n\t\t\t\t\t\t\tjson.put(\"tClassName\", clasname);\n\t\t\t\t\t\t\tjson.put(\"examPlanId\", ep.getExamPlanId());\n\t\t\t\t\t\t\tinstulist.add(json);\n\t\t\t\t\t\t\tinclass.add(clasname);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tnostulist = SortUtil.sortJsonListByTclassName(nostulist, 0, noclass, \"tClassName\");\n\t\tinstulist = SortUtil.sortJsonListByTclassName(instulist, 0, inclass, \"tClassName\");\n\t\tresult.put(\"studs\", instulist);\n\t\tresult.put(\"studsNotTakingExams\", nostulist);\n\t\treturn result;\n\t}",
"public static ArrayList<Student> getLockedStudenti() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_LOCKED_STUDENTS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Student> studentiBloccati = (ArrayList<Student>) rpp.parameters[0];\n\t\treturn studentiBloccati;\n\t}",
"@Override\n\tpublic List<AASTranscriptCourse> getAASTranscriptCourse(String stuId, String acaYear, String semesterId) {\n\t\tList<AASTranscriptCourse> arr = new ArrayList<>();\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tconn = oConnection.getOracleConnection();\n\t\t\tString sql =\"select aca_year,subjectid,subjectname,credits,credits_earn,letter_mark\"+ \n\t\t\t\t\t\" from v_course\"+ \n\t\t\t\t\t\" where id_student= ?\"+ \n\t\t\t\t\t\" and aca_year= ?\"+\n\t\t\t\t\t\" and semester= ?\"+\n\t\t\t\t\t\" and aas_sgt= 0\"+ \n\t\t\t\t\t\" order by subjectid\";\n\t\t\tstatement = conn.prepareStatement(sql);\n\t\t\tstatement.setString(1, stuId);\n\t\t\tstatement.setString(2, acaYear);\n\t\t\tstatement.setString(3, semesterId);\n\t\t\trs = statement.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tarr.add(new AASTranscriptCourse(rs.getString(\"aca_year\"),rs.getString(\"subjectid\"),rs.getString(\"subjectname\")\n\t\t\t\t\t\t, rs.getString(\"credits\"), rs.getString(\"credits_earn\"), rs.getString(\"letter_mark\")));\n\t\t\t}\n\t\t\t\n\t\t\trs.close();\n\t\t\tstatement.close();\n\t\t\tconn.close();\n\t\t\treturn arr;\n\t\t} catch (SQLException e) {\n\t\t\treturn null;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (statement != null)\n\t\t\t\t\tstatement.close();\n\t\t\t\tif (conn != null)\n\t\t\t\t\tconn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"private Student getStudent(int courseOrder, int studentOrder) throws IOException {\n URL url = new URL(BASE_URL + courseOrder + \"/students/\" + studentOrder);\n InputStream input = url.openStream();\n Student student\n = JAXB.unmarshal(new InputStreamReader(input), Student.class);\n return student;\n }",
"@ResponseBody\n\t@RequestMapping(value = \"/getstudent/{id}/{name}\", method=RequestMethod.GET, produces={\"application/json\", \"application/xml\"})\n\tpublic Student getStudent(HttpServletRequest request, HttpServletResponse response, @PathVariable (\"id\") int id, @PathVariable(\"name\") String name){\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n Student student = new Student(id, name, dateFormatter.format(new Date()));\n \n List<Course> cources = student.getCourses();\n cources.add(new Course(\"Math\", 15));\n cources.add(new Course(\"Politics\", 100));\n \n return student;\n\n\t}",
"public static List<Student> getAllStudents(){\r\n Student student1 = new Student(\"Dowlath\",2,3.6,\"male\", Arrays.asList(\"Swim\",\"BasketBall\",\"VolleyBall\"),11);\r\n Student student2 = new Student(\"Bhavya\",2,3.8,\"female\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),12);\r\n\r\n\r\n /* 3rd Grade Students */\r\n Student student3 = new Student(\"Priya\",3,4.0,\"female\", Arrays.asList(\"Swim\",\"BasketBall\",\"Aerobics\"),10);\r\n Student student4 = new Student(\"Arsh\",3,3.9,\"male\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),9);\r\n\r\n\r\n /* 4th Grade Students */\r\n Student student5 = new Student(\"Sowmiya\",4,3.5,\"female\", Arrays.asList(\"Swim\",\"Dancing\",\"FootBall\"),15);\r\n Student student6 = new Student(\"Ariz\",4,3.9,\"male\",Arrays.asList(\"Swim\",\"BasketBall\",\"BaseBall\",\"FootBall\"),14);\r\n\r\n List<Student> students = Arrays.asList(student1,student2,student3,student4,student5,student6);\r\n return students;\r\n }",
"@RequestMapping(value = \"/{institutionCode}/students\", method = RequestMethod.GET)\n\tpublic ResponseEntity<StudentListWrapper> getAllStudentsByInstitution(\n\t\t\t@PathVariable(\"institutionCode\") final String institutionCode) {\n\t\t\n\t\tfinal Collection<Course> courses = new ArrayList<>(); \n\t\tfinal Collection<Student> students = new ArrayList<>();\n\t\tcourses.addAll(institutionService.findAllCoursesByInstitutionCode(institutionCode));\n\t\tstudents.addAll(institutionService.findAllStudentsByInstitution(institutionCode));\n\t\tfinal StudentListWrapper studentsWrapper = new StudentListWrapper(students, courses);\n\t\treturn new ResponseEntity<>(studentsWrapper, HttpStatus.OK);\n\t}",
"public static void students_info() throws SQLException{\n\t\ttry\n\t\t{ \n\n\t\t\tString sid = new String();\n\t\t\n\t\t \tSystem.out.println(\"Please enter the students sid (starting with 'B') \\n\"); \n\t\t \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in )); \n\t\n\t\t\tsid = br.readLine();\n\t\t\t\n//Connection to Oracle server\n OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();\n ds.setURL(\"jdbc:oracle:thin:@grouchoIII.cc.binghamton.edu:1521:ACAD111\");\n\tConnection conn = ds.getConnection(\"vbobhat1\", \"BingData\");\n\t \nCallableStatement cs = conn.prepareCall (\"begin StudRegSys.student_info(:1,:2,:3); end;\");\n\t\t\tcs.setString(1,sid);\n\t \t\tcs.registerOutParameter(2,OracleTypes.CURSOR); \n \tcs.registerOutParameter(3, Types.VARCHAR); \n\t \t\t\n//execute and retrieve the result set\n \t\tcs.execute();\n \t\tResultSet rs;\n\t\n \t\trs = (ResultSet)cs.getObject(2);\n \t\tboolean a1=false; \n\t\t\tSystem.out.println(\"SID\" + \"\\t\" + \"FIRSTNAME\" + \"\\t\" + \"LASTNAME\"+ \"\\t\" + \"DEPT-COURSE#\" + \"\\t\" + \"TITLE\"); \n \t\tSystem.out.println(\"---\" + \"\\t\" + \"---------\" + \"--------\" + \"\\t\" + \"-----------\" + \"\\t\" + \"-----\");\n\t\t\twhile (rs.next()) { \t \n \t \t \n \t\t\tSystem.out.println(sid + \"\\t\" + rs.getString(3) + \"\\t\" + rs.getString(1) + \"\\t\" + rs.getString(2));\n \t\n \t\t\ta1=true;\n \t\t}\n\t\t\t\n \t\tif(a1==false)\n\t \t\t\tSystem.out.println(\"The student is not enrolled for any course\");\n\t\t\n\t\t\t System.out.println(\"\\n\\n\");\n\n \t\tcs.close();\n\t \t\tconn.close();\t\t\n\t\t}\n\t\tcatch (SQLException ex) { System.out.println (\"\\n*** SQLException caught ***\\n\" + ex.getMessage());}\n catch (Exception e) {System.out.println (\"\\n*** other Exception caught ***\\n\");}\t\t\n\t}",
"private Student getFoundStudent(ResultSet resultOfTheSearch) throws PhoneException, SQLException, \n\tCPFException, DateException, AddressException, RGException, StudentException, PersonException {\n\n\t\t// Get the data from database\n\t\tString studentName = resultOfTheSearch.getString(NAME_COLUMN);\n\n\t\tString email = resultOfTheSearch.getString(EMAIL_COLUMN);\n\t\tString motherName = resultOfTheSearch.getString(MOTHER_COLUMN);\n\t\tString fatherName = resultOfTheSearch.getString(FATHER_COLUMN);\n\n\t\t//CPF\n\t\tString cpf = resultOfTheSearch.getString(CPF_COLUMN);\n\t\tCPF studentCpf = new CPF(cpf);\n\n\t\t//RG\n\t\tString rg = resultOfTheSearch.getString(RG_NUMBER_COLUMN);\n\t\tString uf = resultOfTheSearch.getString(UF_COLUMN);\n\t\tString issuing_institution = resultOfTheSearch.getString(ISSUING_INSTITUTION_COLUMN);\n\t\tRG studentRg = new RG(rg,issuing_institution,uf);\n\n\t\t//Address\n\t\tString city = resultOfTheSearch.getString(CITY_COLUMN);\n\t\tString addressInfo = resultOfTheSearch.getString(ADDRESS_COLUMN);\n\t\tString complement = resultOfTheSearch.getString(COMPLEMENT_COLUMN);\n\t\tString number = resultOfTheSearch.getString(NUMBER_COLUMN);\n\t\tString cep = resultOfTheSearch.getString(CEP_COLUMN);\n\t\tAddress address = new Address(addressInfo, number, complement, cep,city);\n\n\t\t//Phones\n\t\tString cellPhone = resultOfTheSearch.getString(PRINCIPAL_PHONE_COLUMN);\n\t\tString residencePhone = resultOfTheSearch.getString(SECONDARY_PHONE_COLUMN);\n\t\tString DDDPrincipalPhone = cellPhone.substring(0,2);\n\t\tString numberPrincipalPhone = cellPhone.substring(2,10);\n\t\t\n\t\tString DDDSecondaryPhone;\n\t\tString numberSecondaryPhone;\n\t\tPhone principalPhone;\n\t\tPhone secondaryPhone;\n\t\t\n\t\tif(!residencePhone.isEmpty()){\n\t\t\t\n\t\t\tDDDSecondaryPhone = residencePhone.substring(0,2);\n\t\t\tnumberSecondaryPhone = residencePhone.substring(2,10);\n\t\t\tprincipalPhone = new Phone(DDDPrincipalPhone,numberPrincipalPhone);\n\t\t\tsecondaryPhone = new Phone(DDDSecondaryPhone,numberSecondaryPhone);\n\t\t}else{\n\t\t\tprincipalPhone = new Phone(DDDPrincipalPhone,numberPrincipalPhone);\n\t\t\tsecondaryPhone = null;\n\t\t}\n\n\t\tDate birthdate = birthdate(resultOfTheSearch);\n\t\t//Status\n\t\tint status = resultOfTheSearch.getInt(STATUS_COLUMN);\n\t\t\n\t\tStudent student = new Student(studentName, studentCpf, studentRg, birthdate, email, address,\n\t\t\t\t\t\t\t\t\t principalPhone, secondaryPhone, motherName, fatherName, status);\n\t\n\t\treturn student;\n\t}",
"private void printStudListByCourse() throws Exception {\n String courseID = null;\n ArrayList<Student> studentList = new ArrayList<Student>();\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"\\nPlease enter course ID\");\n courseID = sc.nextLine();\n while(!courseID.matches(\"^[a-zA-Z]{2}[0-9]{4}$\")){\n System.out.println(\"Invalid input! Please enter a valid index number!\");\n courseID = sc.nextLine();\n }\n\n studentList= this.adminManager.getStudentByCourse(courseID);\n if(studentList == null){\n System.out.println(\"\\nThere is no such a course index\\n\\n\");\n System.exit(1);\n }\n if (studentList.isEmpty()){\n System.out.println(\"\\nThere is no student registered for this course ID\\n\\n\");\n return;\n }\n else{\n System.out.println(\"Hang on a moment while we load database.\\n\\n\");\n System.out.println(\"------------------------------------------------------\");\n System.out.println(\" STUDENT NAME GENDER NATIONALITY\");\n System.out.println(\"------------------------------------------------------\");\n //\n for(Student student:studentList){\n System.out.println(String.format(\"%20s %6s %s\",student.getName(),student.getGender(),student.getNationality()));\n }\n\n System.out.println(\"------------------------------------------------------\\n\");\n }\n }",
"@Override\n\tpublic JSONObject selectClassifyStudents(Student student) throws Exception {\n\t\t\n\t\tJSONObject retObject = new JSONObject() ;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tstudent.setClassify(\"cs\") ;\n\t\n\t\t\tList<Student> lst_cs = registerMapper.selectClassifyStudents(student) ;\n\t\t\tretObject.put(\"students_cs\", JSONArray.fromObject(lst_cs)) ;\n\t\t\t\n\t\t\tstudent.setClassify(\"sh\") ;\n\t\t\tList<Student> lst_sh = registerMapper.selectClassifyStudents(student) ;\n\t\t\tretObject.put(\"students_sh\", JSONArray.fromObject(lst_sh)) ;\n\t\t\t\n\t\t\tstudent.setClassify(\"yjf\") ;\n\t\t\tList<Student> lst_yjf = registerMapper.selectClassifyStudents(student) ;\n\t\t\tretObject.put(\"students_yjf\", JSONArray.fromObject(lst_yjf)) ;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RunTimeException(e.getMessage()) ;\n\t\t}\n\t\treturn retObject ;\n\t}",
"public List<Student> getAllStudents() throws IOException {\n\t\tstudentList = studentListGenerator.generateList(\"StudentList.txt\");\n\t\treturn studentList;\n\t}",
"public java.util.List<? extends com.demo.springprotobuff.Demoproto.StudentOrBuilder> getStudentOrBuilderList() {\n\t\t\treturn student_;\n\t\t}",
"public com.demo.springprotobuff.Demoproto.Student getStudent(int index) {\n\t\t\t\tif (studentBuilder_ == null) {\n\t\t\t\t\treturn student_.get(index);\n\t\t\t\t} else {\n\t\t\t\t\treturn studentBuilder_.getMessage(index);\n\t\t\t\t}\n\t\t\t}",
"public List<Models.Programme> showProgrammes() {\n List<Models.Programme> results = em.createNativeQuery(\"select pg.* from programme pg, programmeparticipant ppa, participant p where pg.programmecode = ppa.programmecode and ppa.participantid = p.participantid and p.userid = ?\", Models.Programme.class).setParameter(1, user.getUserid()).getResultList();\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" programmes were found.\");\n\n for (Models.Programme programme : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Programme?id=\" + programme.getProgrammecode() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>PROGRAMME</a>\\n\"\n + \" <a class='name'>\" + programme.getTitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + programme.getProgrammecode() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n return results;\n }",
"public String studentInfo()\n\t{\n\t\tString strStudentInfo;\n\t\tDecimalFormat percent = new DecimalFormat(\"0.0%\");\n\t\tdouble dRoundedCourseAverage;\n\t\tdouble dCourseAverage;\n\t\tdCourseAverage= courseAverage();\n\t\t\t\n\t\tdRoundedCourseAverage= Math.round(dCourseAverage);\n\t\tstrStudentInfo =\n\t\t(\"\\nName: \" + name +\n\t\t\"\\nCourse: \" + courseDesc +\n\t\t\"\\nNumber: \" + courseNum +\n\t\t\"\\nInstructor:\" + instructor +\n\t\t\"\\nGrades:\" +\n\t\t\"\\nTest: \\tAverage: \"+ average('t') +\"\\tPercent: \" + pctT +\n\t\t\"\\nQuizzes: \\tAverage: \"+ average('q') +\"\\tPercent: \" + pctQ +\n\t\t\"\\nProject: \\tAverage: \"+ average('p') +\"\\tPercent: \" + pctP +\n\t\t\"\\nCourse Average: \" + dCourseAverage + \"(or \"+\n\t\t\tpercent.format(dRoundedCourseAverage/100) + \")\");\n\t\treturn strStudentInfo;\n\t}",
"@Override\n public List<Student> getStudentsByCourse(Course course) {\n return null;\n }",
"@Override\n\tpublic List<ProgrameInfoVO> selectProgramPageListInfo(\n\t\t\tProgrameInfoVO searchVO) throws Exception {\n\t\treturn progMapper.selectProgramPageListInfo(searchVO);\n\t}",
"@Override\n public List<ArrayList<String>> queryStudentPersonalData(Token token, int studentID) {\n List<ArrayList<Object>> objList = null;\n\n try {\n objList = queryStudentPersonalData1(token, studentID);\n } catch (SCRSException e) {\n System.out.println(e.getMessage());\n return null;\n }\n List<ArrayList<String>> result = UtilMethods.convertObjListToStringList(objList);\n return result;\n }",
"public DTProgramaFormacion verInfoPrograma(String nombreProg) throws ProgramaFormacionExcepcion;",
"public List getStudentList() throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n\n String queryString = \"from \" + Student.class.getName() + \" e\";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n List list = hibernateTemplate.list(query);\n\n return list;\n } finally {\n log.debug(\"finished getStudentList\");\n }\n }",
"com.demo.springprotobuff.Demoproto.Student getStudent(int index);",
"public String getInfo(String student) throws SQLException{\n\n try(PreparedStatement st = conn.prepareStatement(\n // replace this with something more useful\n \"WITH RegData as (SELECT * FROM Registrations FULL OUTER JOIN CourseQueuePositions USING (student,course)),\" +\n \"Finished as (SELECT COALESCE(json_agg(jsonb_build_object('course',Courses.name,'code',Courses.code,\" +\n \"'grade',grade,'credits',Courses.credits)),'[]'::json) AS finishedArray FROM FinishedCourses,Courses \" +\n \"WHERE student = ? AND FinishedCourses.course = Courses.Code), Registered AS \" +\n \"(SELECT COALESCE(json_agg(jsonb_build_object('course',Courses.name,'code',Courses.code,'status',status,'position', place)),'[]'::json)\" +\n \"AS registeredArray FROM RegData,Courses WHERE student = ? AND RegData.course = Courses.Code) \" +\n \"SELECT jsonb_build_object('student',idnr,'name',name,'login',login,'program',program,'branch',\" +\n \"branch,'finished',finishedArray,'registered',registeredArray,'seminarCourses',seminarCourses,\" +\n \"'mathCredits',mathCredits,'researchCredits',researchCredits,'totalCredits',totalCredits,\" +\n \"'canGraduate',qualified) AS jsondata FROM BasicInformation,PathToGraduation,Finished,\" +\n \"Registered WHERE BasicInformation.idnr=? AND BasicInformation.idnr = PathToGraduation.student\"\n );){\n\n st.setString(1, student);\n st.setString(2, student);\n st.setString(3, student);\n\n ResultSet rs = st.executeQuery();\n\n if(rs.next())\n return rs.getString(\"jsondata\");\n else\n return \"{\\\"student\\\":\\\"does not exist :(\\\"}\";\n\n }\n\n }",
"void displayData(SchoolDetailResponse schoolDetailResponse);",
"public ArrayList <Students> getStudentList ()\n\n {\n\n // Returns studentList when called.\n return studentList;\n\n }",
"@Override\n\tpublic List<Student> getById(int class0) {\n\t\tString aql = \"select * from tstudent where class=?\";\n\t\tList<Student> studentlist = new ArrayList<Student>();\n\t\tList<Map<String, Object>> maplist = DBUtils2.query(aql, new Integer(class0));\n\t\tfor (Map<String, Object> map : maplist) {\n\t\t\tStudent student = new Student();\n\t\t\tstudent.setId((Integer) (map.get(\"id\")));\n\t\t\tstudent.setName((String) (map.get(\"name\")));\n\t\t\tstudent.setClass1((Integer) (map.get(\"class\")));\n\t\t\tstudent.setStudynum((Integer) (map.get(\"studynum\")));\n\n\t\t\tstudentlist.add(student);\n\t\t}\n\t\treturn studentlist;\n\t}",
"public ArrayList<Student> getStudentList()\r\n\t {\r\n\t\treturn studentList;\r\n\t\t\r\n\t }",
"public static List<StudentAndProfessorDetails> getProfessordetails(StudentAndProfessorDetails profdetails) {\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"StudentDataManagementAndProcessing\");\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\n\t\tList<StudentAndProfessorDetails> profdetailsList = entityManager.createQuery(\"SELECT s from StudentAndProfessorDetails s where s.username=(SELECT user from LoginCredentials user where user.username=?1)\").setParameter(1,profdetails.getUsername().getUsername()).getResultList();\n\t\tentityManager.close();\n\t\tentityManagerFactory.close();\n\t\treturn profdetailsList;\n\t}",
"public java.util.List<? extends com.demo.springprotobuff.Demoproto.StudentOrBuilder> getStudentOrBuilderList() {\n\t\t\t\tif (studentBuilder_ != null) {\n\t\t\t\t\treturn studentBuilder_.getMessageOrBuilderList();\n\t\t\t\t} else {\n\t\t\t\t\treturn java.util.Collections.unmodifiableList(student_);\n\t\t\t\t}\n\t\t\t}",
"@GET\n\t@Path(\"students/{nuid}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getStudentProfile(@PathParam(\"nuid\") String nuid){\n\t\tif(!studentDao.ifNuidExists(nuid)){\n\t\t\treturn Response.status(Response.Status.NOT_FOUND).entity(\"No Student record exists with given ID\").build();\n\t\t} else {\n\t\t\tStudents studentRecord = studentDao.getStudentRecord(nuid);\n\t\t\tJSONObject jsonObj = new JSONObject(studentRecord);\n\t\t\tArrayList<WorkExperiences> workEx = (ArrayList<WorkExperiences>) workExperiencesDao.getWorkExperiencesByNeuId(nuid);\n\t\t\tjsonObj.put(\"company\", workEx);\n\t\t\tArrayList<ElectivesAdmin> electives = (ArrayList<ElectivesAdmin>) electiveDao.getElectivesByNeuId(nuid);\n\t\t\tjsonObj.put(\"courses\", electives);\n\t\t\tList<ExtraExperiences> coop = extraExperiencesDao.getExtraExperiencesByNeuId(nuid);\n\t\t\tjsonObj.put(\"coopexperience\", coop);\n\t\t\tjsonObj.put(\"notes\",administratorNotesDao.getAdministratorNoteRecordByNeuId(nuid));\n\t\t\treturn Response.status(Response.Status.OK).entity(jsonObj.toString()).build();\n\t\t}\n\t}",
"public com.demo.springprotobuff.Demoproto.StudentOrBuilder getStudentOrBuilder(int index) {\n\t\t\treturn student_.get(index);\n\t\t}",
"List<StudentRecord> getStudents(String clientId) throws Exception;",
"public static List<StudentInfo> searchStudentInfo(String firtname, String lastname) {\r\n \r\n List<StudentInfo> students = new ArrayList<>();\r\n \r\n // declare resultSet\r\n ResultSet rs = null;\r\n \r\n // declare prepared statement\r\n PreparedStatement preparedStatement = null;\r\n \r\n // declare connection\r\n Connection conn = null;\r\n try {\r\n // get connection\r\n conn = DBUtils.getConnection();\r\n\r\n // set prepared statement\r\n preparedStatement = conn\r\n .prepareStatement(\"SELECT instructor.FName, instructor.LName,\" +\r\n \" IF(EXISTS ( SELECT * FROM gra WHERE gra.StudentId = phdstudent.StudentId) , 'GRA', \" +\r\n \" IF(EXISTS ( SELECT * FROM gta WHERE gta.StudentId = phdstudent.StudentId) , 'GTA', \" +\r\n \" IF(EXISTS ( SELECT * FROM scholarshipsupport WHERE scholarshipsupport.StudentId = phdstudent.StudentId) , 'scholarship', \" +\r\n \" IF(EXISTS ( SELECT * FROM selfsupport WHERE selfsupport.StudentId = phdstudent.StudentId) , 'self', ''))\" +\r\n \" )) AS StudentType, \" +\r\n \" milestone.MName, milestonespassed.PassDate\" +\r\n \" FROM phdstudent left join instructor on instructor.InstructorId = phdstudent.Supervisor\"\r\n + \" left join milestonespassed on phdstudent.StudentId = milestonespassed.StudentId\"\r\n + \" left join milestone on milestonespassed.MID = milestone.MID\" +\r\n \" WHERE phdstudent.FName = ? AND phdstudent.LName = ?\");\r\n \r\n // execute query\r\n preparedStatement.setString(1, firtname);\r\n preparedStatement.setString(2, lastname); \r\n\r\n rs = preparedStatement.executeQuery();\r\n \r\n //iterate and create the StudentInfo objects\r\n while (rs.next()) {\r\n \r\n students.add(new StudentInfo(rs.getString(1)+ \" \" + rs.getString(2), rs.getString(3), rs.getString(4), \r\n utils.Utils.toDate(rs.getDate(5))));\r\n\r\n }\r\n }catch(Exception ex){\r\n ex.printStackTrace();\r\n }\r\n finally {\r\n DBUtils.closeResource(conn);\r\n DBUtils.closeResource(preparedStatement);\r\n DBUtils.closeResource(rs);\r\n } \r\n \r\n return students; \r\n }",
"public List<String> getProgramIdsForUser() {\n List<String> result = new ArrayList<>();\n if (mUserProgramsAndRoles != null) {\n for (String programid : mUserProgramsAndRoles.keySet()) {\n if (isProgramIdForUser(programid))\n result.add(programid);\n }\n }\n return result;\n }",
"@Override\r\n public List<String> getStudenti() {\r\n List<Studente> listaStudenti = studenteFacade.findAll();\r\n List<String> result = new ArrayList<>();\r\n\r\n for (Studente s : listaStudenti) {\r\n result.add(s.toString());\r\n }\r\n return result;\r\n }",
"@GetMapping(\"/api/students\")\n public ResponseEntity<List<StudentDto>> getAllStudents() {\n return ResponseEntity.ok(studentService.getAllStudents());\n }",
"public Vector<String> getStudentsForCourseSemester(String course,\r\n\t\t\tString semester) {\n\t\treturn null;\r\n\t}",
"Student[] getStudents(){\n\t\treturn enrolled.toArray(new Student[enrolled.size()]);\n\t}",
"public List<Student> getCampusStudent(Campus c) {\n\t\tList<Student> allStudentList = new ArrayList<Student>();\n\t\tConnection conn = DBUtil.getConn();\n\t\tStatement stmt = DBUtil.createStmt(conn);\n\t\tString sql = \"select * from student where ville='%s' and region='%s' order by stu_ID \";\n\t\tsql = String.format(sql, c.getVille(), c.getRegion());\n\t\tSystem.out.println(sql);\n\t\tResultSet rst = DBUtil.getRs(stmt, sql);\n\t\ttry {\n\t\t\twhile (rst.next()) {\n\t\t\t\tStudent student = new Student();\n\t\t\t\tfillRsStudent(rst, student);\n\t\t\t\tallStudentList.add(student);\n\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn allStudentList;\n\t}",
"@GetMapping(value = getDataForMapping + \"/{studentId}\")\r\n\tpublic ResponseEntity<List<Teacher>> getTeachersForMapping(@PathVariable(\"studentId\") String studentId) {\r\n\t\treturn ResponseEntity.ok().body(teacherStudentService.getTeachersForMapping(studentId));\r\n\t}",
"public ArrayList<Student> GetAllStudentData() {\n\t\tArrayList<Student> result = new ArrayList<>();\n\t\tcurr = head;\n\t\twhile (curr != null) {\n\t\t\tArrayList<Student> theData = curr.data.students.getStudentData();\n\t\t\tfor (int i = 0; i <= curr.data.students.getStudentDataCount() - 1; i++) {\n\t\t\t\tresult.add(theData.get(i));\n\t\t\t}\n\t\t\tcurr = curr.next;\n\t\t}\n\t\treturn result;\n\t}",
"List<Student> getAllStudents();",
"@GetMapping(\"/students\")\n\tpublic List<Student> getStudents(){\n\t\n\t\treturn theStudents;\n\t}",
"public ArrayList<Registration> receiveRegisteredCourses(int studentId) {\n\t\tArrayList<Registration> receiveRegisteredCourses = null;\n\t\ttry{\n\t\t\tsendMessage(\"getRegisteredCourses\");\n\t\t\t\n\t\t\tsendMessage(studentId + \"\");\n\t\t\treceiveRegisteredCourses = (ArrayList<Registration>)socketObjectIn.readObject();\n\t\t}catch (ClassNotFoundException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t}catch (IOException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t}\n\t\treturn receiveRegisteredCourses;\n\t}",
"public ResponseDto() {\n\n students = new ArrayList<>();\n setStudentsCounter(0);\n }",
"public ArrayList<Student> getStudentList() {\r\n return studentList;\r\n }",
"@RequestMapping(value = \"/staff/programlist\")\n\tpublic ModelAndView listPrograms(@RequestParam(required = false) Integer page, @RequestParam(required = false) Integer pageSize, HttpSession session) {\n\t\tif (page == null) {\n\t\t\tpage = 0;\n\t\t}\n\t\t\n\t\tPagedListHolder<Program> resultList = (PagedListHolder<Program>) session.getAttribute(\"StaffController_programList\");\n\t\tif (resultList == null) {\n\t\t\tresultList = new PagedListHolder<Program>(programService.getAllPrograms());\n\t\t\tsession.setAttribute(\"StaffController_programList\", resultList);\n\t\t\tif (pageSize == null) {\n\t\t\t\tpageSize = DEFAULT_PAGE_SIZE;\n\t\t\t}\n\t\t}\n\t\tif (pageSize != null) {\n\t\t\tresultList.setPageSize(pageSize);\n\t\t}\n\t\tresultList.setPage(page);\n\t\treturn new ModelAndView(\"staff/programlist\", \"resultList\", resultList);\n\t}",
"@Basic\n\tpublic Program getProgram() {\n\t\treturn this.program;\n\t}"
] | [
"0.66195995",
"0.6040349",
"0.56060386",
"0.55193853",
"0.54074055",
"0.5370921",
"0.52284193",
"0.5217565",
"0.5204037",
"0.5188421",
"0.51863545",
"0.50882906",
"0.5070527",
"0.50648",
"0.5037199",
"0.5037199",
"0.50320005",
"0.50260276",
"0.4998604",
"0.49813762",
"0.49500173",
"0.49323276",
"0.48596913",
"0.48399663",
"0.48217872",
"0.48190337",
"0.48169282",
"0.48158064",
"0.47972485",
"0.4771982",
"0.47583744",
"0.4757863",
"0.47548333",
"0.47442973",
"0.47355905",
"0.4724565",
"0.47167876",
"0.47027844",
"0.46932012",
"0.46733043",
"0.46704766",
"0.46609083",
"0.46536496",
"0.46450698",
"0.46344003",
"0.46213505",
"0.46174353",
"0.46123865",
"0.4612232",
"0.46104693",
"0.46012455",
"0.45950568",
"0.4585811",
"0.45804325",
"0.45704663",
"0.45696697",
"0.45621234",
"0.45555437",
"0.45465517",
"0.4546242",
"0.45432353",
"0.45329297",
"0.4531476",
"0.45184025",
"0.4518299",
"0.45098752",
"0.44950533",
"0.44928116",
"0.4492582",
"0.4485354",
"0.4478164",
"0.4471987",
"0.44705212",
"0.4468177",
"0.44670427",
"0.44661388",
"0.44613907",
"0.44611096",
"0.44434518",
"0.4434865",
"0.4433074",
"0.4430602",
"0.44285434",
"0.44281474",
"0.44141948",
"0.4408216",
"0.4397766",
"0.43968007",
"0.43908995",
"0.4388197",
"0.4387538",
"0.43875256",
"0.43833727",
"0.4362982",
"0.4362025",
"0.435252",
"0.43525037",
"0.43455207",
"0.4345431",
"0.43413585"
] | 0.78665966 | 0 |
Creates a new Student Record in the database | @Override
public Student createOrUpdateStudentRecord(Student student) {
studentDAO.addStudent(student);
return student;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void create(Student student) {\n\t\tString query=\"insert into student values('\"+student.getId()+\"','\"+student.getName()+\"','\"+student.getAge()+\"')\";\n\t//\tjdbcTemplate.update(query);\n\t\tint result=jdbcTemplate.update(query);\n\t\tSystem.out.println(result+\"Record Inserted\");\n\t}",
"Student createStudent();",
"private void addStudent() {\n\t\t\n\t\tString lastName = sLastNameTF.getText();\n\t\tString firstName = sFirstNameTF.getText();\n\t\tString schoolName = sSchoolNameTF.getText();\n\t\tchar[] password = sPasswordPF1.getPassword();\n\t\tString sA1 = sSecurityQ1TF.getText();\n\t\tString sQ1 = (String)sSecurityList1.getSelectedItem();\n\t\tString sA2 = sSecurityQ2TF.getText();\n\t\tString sQ2 = (String)sSecurityList2.getSelectedItem();\n\t\tString grade = (String)sGradeList.getSelectedItem();\n\t\t\n\t\tstudent = new Student(lastName, firstName, schoolName, password, sA1, sQ1, sA2, sQ2, grade);\n\t\t\n\t\t//Add student to database\n\t\t\n\t}",
"public void createStudent(String name, String ID){}",
"void create(Student entity);",
"@Override\n\tpublic void createStudent(Student student) {\n\t\tem.persist(student);\n\t}",
"public static void createRecord() throws IOException {\r\n\t\tstudRecs.add(new Student());\r\n\t\tint i = studRecs.size() - 1;\r\n\t\tStudent tempRecord = studRecs.get(i);\r\n\t\tSystem.out.println(\"Creating Student \" + i + \" (\" + tempRecord.getStudentID() + \")\");\r\n\t\ttempRecord.setFirstName(StudentInput.firstName());\r\n\t\ttempRecord.setLastName(StudentInput.lastName());\r\n\t\ttempRecord.setStreetAddress(StudentInput.streetAddress());\r\n\t\ttempRecord.setCity(StudentInput.city());\r\n\t\ttempRecord.setProvince(StudentInput.province());\r\n\t\ttempRecord.setPostalCode(StudentInput.postalCode());\r\n\t\ttempRecord.setPhoneNumber(StudentInput.phoneNumber());\r\n\t\ttempRecord.setBirthDate(StudentInput.birthDate());\r\n\t\tSystem.out.println(\"Student \" + i + \" (\" + tempRecord.getStudentID() + \")\" + \" Created!\");\r\n\t}",
"public void insert(Student student) {\t\t\r\n\t\tdao.insertStudent(student); \r\n\t}",
"int insert(StudentEntity record);",
"public static void addStudent(Student student) throws SQLException {\r\n\t String sql = \" INSERT INTO Studentspring VALUES (?,?,?,?,?)\";\r\n\t PreparedStatement pStmt = con.prepareStatement(sql);\r\n\r\n\t String Name=student.getName();\r\n\t int Age=student.getAge();\r\n\t String Course=student.getCourse();\r\n\t int Year=student.getYear();\r\n\t String Section=student.getSection();\r\n\t \r\n\t pStmt.setString(1, Name);\r\n\t pStmt.setInt(2,Age);\r\n\t pStmt.setString(3,Course);\r\n\t pStmt.setInt(4,Year );\r\n\t pStmt.setString(5,Section);\r\n\r\n\t pStmt.executeUpdate();\r\n\t \r\n\t }",
"int insert(StudentInfo record);",
"private void saveStudent() {\n // Check that every required field has been filled in with valid parameters\n if (!checkUserInputValidity()) {\n return;\n }\n\n // Insert the new student info into the database\n if (isEditStudent) {\n updateStudentOnFirebaseDatabase();\n } else {\n // Make a unique id for the student\n String studentId = UUID.randomUUID().toString();\n saveNewStudentToFirebaseDatabase(studentId);\n }\n }",
"int insert(Student record);",
"int insert(Student record);",
"int insert(Student record);",
"StudentRecord createStudentRecord(String firstName, String lastName,\n\t\t\tList<CourseType> coursesRegistered, StudentStatus status, String statusDate,\n\t\t\tString clientId) throws Exception;",
"public Student addStudent(AddOrUpdateStudentDTO student) throws SQLException {\n\n\t\t// try with resources: used when we want for our applicaton to automatically\n\t\t// call the .close() method on whatever \"resource\"\n\t\t// we are using\n\t\t// The connection interface defines a close() method. This method, when invoked,\n\t\t// will disconnect from the database\n\t\t// Whenever we are done with our block of code inside with\n\t\ttry (Connection con = JDBCUtil.getConnection()) {\n\t\t\tString sql = \"INSERT INTO students (student_first_name, student_last_name, student_classification, student_age)\"\n\t\t\t\t\t+ \"VALUES (?,?,?,?)\";\n\n\t\t\tPreparedStatement pstmt = con.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n\n\t\t\tpstmt.setString(1, student.getFirstName());\n\t\t\tpstmt.setString(2, student.getFirstName());\n\t\t\tpstmt.setString(3, student.getClassification());\n\t\t\tpstmt.setInt(4, student.getAge());\n\n\t\t\tint numberOfRecordsInserted = pstmt.executeUpdate(); // Instead of execute query like we use for select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// statement, INSERT, UPDATE, and DELETE will use\n\t\t\t// executeUpdate(). This method returns an integer representing the number of\n\t\t\t// rows that were modified.\n\n\t\t\t// if numbers of records that were inserted is NOT 1, then something went wrong\n\t\t\tif (numberOfRecordsInserted != 1) {\n\t\t\t\tthrow new SQLException(\"Adding a new Student was unsucessful\");\n\t\t\t}\n\n\t\t\tResultSet rs = pstmt.getGeneratedKeys();\n\t\t\trs.next(); // iterating to the first row\n\t\t\tint automaticallyGeneratedId = rs.getInt(1); // grabing the first column information from that \"row\"\n\n\t\t\t// When we return the Student that we created in the database\n\t\t\t// The missing data is the automatically generated ID\n\t\t\t// How do we obtain that id?\n\t\t\treturn new Student(automaticallyGeneratedId, student.getFirstName(), student.getLastName(),\n\t\t\t\t\tstudent.getClassification(), student.getAge());\n\t\t}\n\t}",
"public Optional<DbStudentEntity> create(\n final Id id,\n final String name,\n final String address,\n final String rollNo,\n final String collegeCode,\n final String courseCode);",
"public void AddToStudent(){\n\n try {\n\n String addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN + \", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Margaret', 'Elkins', '555-555-1212')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN +\", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Scott', 'Sivad', '555-555-1313')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN +\", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Sarah', 'Kwabi', '555-555-1414')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN +\", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Caleb', 'Mohammad', '555-555-1515')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n }\n catch (SQLException se){\n System.out.println(se);\n se.printStackTrace();\n }\n }",
"@PostMapping(\"student-create\")\n\tpublic String createStudentDetails(@RequestBody Student student) throws SQLException {\n\n\t\treturn studentSerivce.createStudentDetails(student);\n\t}",
"@Override\r\n\t@Transactional\r\n\tpublic void createStudent(Bookmodel s1) {\n\t\tdao.createStudent(s1);\r\n\t}",
"@Override\n public void createStudent(Student student) throws ClassRosterDuplicateIdException, ClassRosterDataValidationException, ClassRosterPersistenceException {\n if (dao.getStudent(student.getStudentId()) != null) {\n throw new ClassRosterDuplicateIdException(\"ERROR: Could not create student. Student Id \" + student.getStudentId() + \" already exists\");\n }\n \n // RULE TWO: is the student valid\n validateStudentData(student);\n \n // RULE THREE: Pass data to DAO\n dao.addStudent(student.getStudentId(), student);\n auditDao.writeAuditEntry(\"Student \" + student.getStudentId() + \" CREATED.\");\n }",
"@FXML\n private void newStudent() {\n System.out.println(\"trying to insert new student to database\");\n DBhandler db = new DBhandler();\n Student s = new Student(\n txfID.getText(),\n txfFirstName.getText(),\n txfLastName.getText(),\n txfAddress.getText(),\n txfZIP.getText(),\n txfZIPloc.getText(),\n txfEmail.getText(),\n txfPhone.getText()\n );\n System.out.println(s.toString());\n db.insertStudent(s);\n Cancel(new ActionEvent());\n }",
"public void addStudents(Student theStudent) {\n\t\tConnection myConn=null;\n\t\tPreparedStatement myStmt=null;\n\t\ttry\n\t\t{\n\t\t//get db connection\n\t\tmyConn=dataSource.getConnection();\n\t\t\n\t\t// create sql for insert\n\t\tString sql=\"insert into student \"+\"(first_name, last_name, email) \"+\"values(?,?,?)\";\n\t\tmyStmt=myConn.prepareStatement(sql);\n\t\t\n\t\t//set the param values for the student\n\t\tmyStmt.setString(1, theStudent.getFirstName());\n\t\tmyStmt.setString(2, theStudent.getLastName());\n\t\tmyStmt.setString(3, theStudent.getEmail());\n\t\t\n\t\t//execute sql insert\n\t\tmyStmt.execute();\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose(myConn,myStmt,null);\n\t\t}\n\t}",
"@PostMapping(\"/api/students\")\n public ResponseEntity createOrUpdateStudent(@RequestBody StudentDto studentRequest) {\n this.studentService.createOrUpdateStudent(studentRequest);\n return ResponseEntity.ok().build();\n }",
"@RequestMapping(value = \"insert\", method = RequestMethod.POST)\r\n\tpublic String insert(HttpServletRequest request) {\n\t\tint id = Integer.parseInt(request.getParameter(\"id\"));\r\n\t\tString name = request.getParameter(\"name\");\r\n\t\tint marks = Integer.parseInt(request.getParameter(\"marks\"));\r\n\t\t// Create the student\r\n\t\tStudent student = new Student(id, name,marks);\r\n\t\tSystem.out.println(student);\r\n\t\t// insert student to db\r\n\r\n\t\tString res = studentService.insert(student);\r\n\r\n\t\tif (res.equals(\"SUCCESS\"))\r\n\t\t\trequest.setAttribute(\"msg\", \"Record Inserted\");\r\n\t\telse\r\n\t\t\trequest.setAttribute(\"msg\", \"Record Not Inserted\");\r\n\t\treturn \"insert\";\r\n\t}",
"@PostMapping(\"/students\")\n @Timed\n @RegionBasedInsert\n public ResponseEntity<Student> createStudent(@RequestBody Student student) throws URISyntaxException {\n log.debug(\"REST request to save Student : {}\", student);\n if (student.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new student cannot already have an ID\")).body(null);\n }\n Student result = studentService.save(student);\n return ResponseEntity.created(new URI(\"/api/students/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@Override\n public StudentDTO createNewStudent(StudentDTO studentDTO) {\n studentRepository.save(studentMapper.studentDTOToStudent(studentDTO));\n log.info(\"Student with id: \" + studentDTO.getId() + \" successfully saved\");\n return studentDTO;\n }",
"public static void creaStudente(Student stud) {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CREATE_USER;\n\t\t\trp.userType = UserType.STUDENT;\n\t\t\trp.parameters = new Object[] { stud };\n\t\t\tsend(rp);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}",
"public Student saveStudent(Student student) {\n\t\tlog.info(\"Add Student Name = \" + student.getFirstname() + \" \"\n\t\t\t\t+ student.getLastname());\n\t\tlog.debug(\"Initialise SQL Parameters\");\n\t\tfinal Object[] param = new Object[] { student.getMatnr(),\n\t\t\t\tstudent.getFirstname(), student.getLastname(), student.getEmail() };\n\t\tlog.debug(\"Initialise Transaction Manager\");\n\t\tTransactionTemplate tt = new TransactionTemplate(transactionManager);\n\t\tObject result = tt.execute(new TransactionCallback() {\n\t\t\tpublic Object doInTransaction(TransactionStatus status) {\n\t\t\t\t// The transaction is run from here\n\t\t\t\tlog.debug(\"Start Transaction\");\n\t\t\t\tquery_insertStudent.update(param);\n\n\t\t\t\t/*\n\t\t\t\t * activate the following error line to create an Error which\n\t\t\t\t * terminates this method. One will see, that the complete\n\t\t\t\t * transaction is rolled back, hence the insert statement above\n\t\t\t\t * is not executed, alternatively the second rollback statement\n\t\t\t\t * can be activated with the same result which in that case is a\n\t\t\t\t * manual rollback of the transaction\n\t\t\t\t */\n\n\t\t\t\t// if (true) throw new Error(\"Test Exception\");\n\t\t\t\t// or\n\t\t\t\t// status.setRollbackOnly();\n\t\t\t\t/*\n\t\t\t\t * result from query is a list, actually containing only one row\n\t\t\t\t * and one column\n\t\t\t\t */\n\t\t\t\tList<?> results = query_getStudentId.execute();\n\t\t\t\tInteger id = (Integer) results.get(0);\n\t\t\t\tlog.debug(\"End Transaction\");\n\t\t\t\treturn id;\n\t\t\t\t/*\n\t\t\t\t * and the transaction ends here! if no error occurs the\n\t\t\t\t * transaction is committed by Spring otherwise it is rolled\n\t\t\t\t * back\n\t\t\t\t */\n\t\t\t}\n\t\t});\n\t\tInteger id = (Integer) result;\n\t\tstudent.setId(id);\n\t\tlog.info(\"Return ID from inserted dataset = \" + id);\n\t\treturn id!=0 ? student : null;\n\t}",
"int insert(StudentGuardian record);",
"int insert(SalGrade record);",
"public sust.paperlessexm.entity.Student addStudent(sust.paperlessexm.entity.Student model) throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n hibernateTemplate.save(model);\n return getStudent(model.getPrimaryKey());\n } finally {\n log.debug(\"finished addStudent(sust.paperlessexm.entity.Student model)\");\n }\n }",
"public Student insertStudent() {\n\t\tSystem.out.print(\"\\n--- 학생 정보 등록 ---\\n\");\n\t\tSystem.out.print(\"학생 이름 입력 \");\n\t\tString name = sc.next();\n\t\tSystem.out.print(\"학생 나이 입력 \");\n\t\tint age = sc.nextInt();\n\t\tSystem.out.print(\"학생 주소 입력 \");\n\t\tString addr= sc.next();\n\t\tStudent st = new Student(name, age, addr);\n\t\treturn st;\n\t}",
"int insert(TrainingCourse record);",
"@Test\r\n\tpublic void createAndRetrieveStudent() {\n\t\tStudent duke = Student.find.where().eq(\"studentId\", 1).findUnique();\r\n\r\n\t\t// Check whether inMemoryDatabase() works\r\n\t\t// If not, more than 2 row might be found\r\n\t\tint totalRow = Student.find.findRowCount();\r\n\t\torg.junit.Assert.assertEquals(2, totalRow);\r\n\r\n\t\torg.junit.Assert.assertNotNull(duke);\r\n\t\torg.junit.Assert.assertEquals(1, duke.studentId.longValue());\r\n\t}",
"public Query_InsertStudent(DataSource ds) {\n\t\t\tsuper.setDataSource(ds);\n\t\t\tsetSql(sql_insertStudent);\n\t\t\tdeclareParameter(new SqlParameter(\"matnr\", Types.VARCHAR));\n\t\t\tdeclareParameter(new SqlParameter(\"firstname\", Types.VARCHAR));\n\t\t\tdeclareParameter(new SqlParameter(\"lastname\", Types.VARCHAR));\n\t\t\tdeclareParameter(new SqlParameter(\"email\", Types.VARCHAR));\n\t\t}",
"private static int addNewStudent(){\n\t\tSystem.out.println(\"===Add New Student To Database===\");\n\t\tScanner string_input = new Scanner(System.in); //gets String input from the user\n\t\tScanner integer_input = new Scanner(System.in); //get integer input from the user\n\t\tStudentDetails new_student = new StudentDetails();\n\t\t\n\t\tString firstname;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter new student's first name: \");\n\t\t\tfirstname = string_input.next();\n\t\t}while(!new_student.setFirstName(firstname)); //loop until name input is valid\n\t\t\n\t\tString middlename;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter new student's middle name (Type 'null' if author has no middle name): \");\n\t\t\tmiddlename = string_input.next();\n\t\t}while(!new_student.setMiddleName(middlename)); //loop until name input is valid\n\t\t\n\t\tString lastname;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter new student's last name: \");\n\t\t\tlastname = string_input.next();\n\t\t}while(!new_student.setLastName(lastname)); //loop until name input is valid\n\t\t\n\t\tint grade;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter new student's grade (9 - 12): \");\n\t\t\tgrade = integer_input.nextInt();\n\t\t}while(!new_student.setGrade(grade)); //loop until name input is valid\n\t\t\n\t\tALL_STUDENTS.add(new_student);\n\t\tint new_studentId = ALL_STUDENTS.size() - 1; //since student was the most recently added element to the ALL_STUDENTS ArrayList, its index should be ALL_STUDENTS.size() - 1. Student's index in this ArrayList should be the new student's Id.\n\t\tnew_student.setId(new_studentId); //set the new student's Id\n\t\t\n\t\treturn new_student.getId();\n\t}",
"private void saveStudent(){\n StudentGroupThrift group = mainWindow.getStudentClient().getStudentGroupByName\n (this.group.getSelectedItem().toString());\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n String birthDate = format.format(jDateChooser.getDate());\n StudentThrift studentThrift = new StudentThrift(\n id,\n getTextID(FIRST_NAME),\n getTextID(LAST_NAME),\n getTextID(MIDDLE_NAME),\n birthDate,\n getTextID(ADDRESS),\n group\n );\n mainWindow.getStudentClient().saveStudent(studentThrift);\n closeDialog();\n }",
"int insert(Course record);",
"int insert(Course record);",
"@GetMapping(\"/add\")\n\tpublic List<Students> addStudent() {\n\t\tStudents student = new Students();\n\t\tstudent.setRollno(04);\n\t\tstudent.setSname(\"Cyborg\");\n\t\tstudent.setStudent_role(\"Graduate\");\n\t\tstudentMapper.insert(student);\n\t\treturn studentMapper.findAll(); \n\t}",
"@Override\n\tpublic boolean saveStudentByPst(final Student s) {\n\t\tString query=\"insert into student values(?,?,?)\";\n\t\treturn jdbcTemplate.execute(query,new PreparedStatementCallback<Boolean>() {\n\t\tpublic Boolean doInPreparedStatement(PreparedStatement ps) throws SQLException ,DataAccessException\n\t\t{\n\t\t\tps.setInt(1,s.getId());\n\t\t\tps.setString(2,s.getName());\n\t\t\tps.setInt(3,s.getAge());\n\t\t\treturn ps.execute();\n\t\t}\n\t\t});\n\t\n\t}",
"public boolean addStudent(Student student) throws Exception {\n\t\tint collegeid = 0;\n\t\tString courseid = null;\n\t\tint i = 0;\n\t\tConnection con = null;\n\t\tcon = DBConnector.dbConnection();\n\t\ttry {\n\t\t\tSystem.out.println(student.getCoursename());\n\t\t\tPreparedStatement st = con.prepareStatement(\"select course_id from course where course_name=?\");\n\t\t\tst.setString(1, student.getCoursename());\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcourseid = rs.getString(1);\n\t\t\t}\n\t\t\tSystem.out.println(student.getCollegename());\n\t\t\tPreparedStatement st1 = con.prepareStatement(\"select college_id from college where college_name=?\");\n\t\t\tst1.setString(1, student.getCollegename());\n\t\t\tResultSet rs1 = st1.executeQuery();\n\t\t\twhile (rs1.next()) {\n\t\t\t\tcollegeid = rs1.getInt(1);\n\t\t\t}\n\t\t\tPreparedStatement st2 = con.prepareStatement(\n\t\t\t\t\t\"insert into student(student_name, college_id, course_id, phn_no, address) values(?,?,?,?,?)\");\n\t\t\tst2.setString(1, student.getStudentname());\n\t\t\tst2.setInt(2, collegeid);\n\t\t\tst2.setString(3, courseid);\n\t\t\tst2.setString(4, student.getPhno());\n\t\t\tst2.setString(5, student.getAddress());\n\t\t\ti = st2.executeUpdate();\n\t\t\tcon.close();\n\t\t} catch (SQLSyntaxErrorException e) {\n\t\t\tthrow new SQLSyntaxErrorException(\"Error in SQL syntax\");\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Connection with database failed\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Some error occured\");\n\t\t}\n\t\tif (i != 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public void addStudents(Student student) {\r\n System.out.println(\"conectado con model ---> metodo addStudents\");\r\n //TODO\r\n }",
"public StudentRecord() {}",
"public void addStu(Student stu) {\n\t\tSessionFactory sessionFactory = null;\n\t\tStandardServiceRegistry registry = new StandardServiceRegistryBuilder()\n\t\t\t\t.configure()\t\t\t\t\t\t\t\n\t\t\t\t.build();\n\t\ttry {\n\t\t\tsessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n\t\t} catch (Exception ex) {\n\t\t\tStandardServiceRegistryBuilder.destroy(registry);\n\t\t\tSystem.out.println(\"Setup Failed:\" + ex.getMessage());\n\t\t}\n\t\t// Session sessionObj = null; \n\t\tSession sessionObj = sessionFactory.openSession();\n\t\ttry {\n\t\t\t// Creating Hibernate SessionFactory Instance\n\t\t\t// sessionObj = configObj.buildSessionFactory(serviceRegistryObj).openSession();\n\t\t\tsessionObj.beginTransaction();\n\t\t\tsessionObj.save(stu);\n\t\t\tSystem.out.println(\"\\n.......Records Saved Successfully To The Database.......\\n\");\n\t\t\t// Committing The Transactions To The Database\n\t\t\tsessionObj.getTransaction().commit();\n\t\t} catch (Exception sqlException) {\n\t\t\tif (null != sessionObj.getTransaction()) {\n\t\t\t\tSystem.out.println(\"\\n.......Transaction Is Being Rolled Back.......\");\n\t\t\t\tsessionObj.getTransaction().rollback();\n\t\t\t}\n\t\t\tsqlException.printStackTrace();\n\t\t} finally {\n\t\t\tif (sessionObj != null) {\n\t\t\t\tsessionObj.close();\n\t\t\t}\n\t\t}\n\t}",
"void save(Student student);",
"private Student createStudent(Element studentNode) {\n String serialNumber = studentNode.getAttribute(\"serialNumber\");\n Student b = new Student();\n b.setSerialNumber(serialNumber);\n\n b.setName(getTextFromTagName(studentNode, \"name\"));\n b.setGroup(Integer.valueOf(getTextFromTagName(studentNode, \"group\")));\n b.setId(Long.valueOf(getTextFromTagName(studentNode, \"id\")));\n\n return b;\n }",
"int insert(TrainCourse record);",
"@Override\r\n public void enroll(Student student, String courseId) throws SQLException {\n\r\n courseDAO.insert(student.getId(), courseId);\r\n\r\n }",
"int insert(Teacher record);",
"public void addStudent(Student student);",
"int insert(courses record);",
"NominatedStudentDto create(NominatedStudentDto nominatedStudent, int userId, String userRole);",
"public void testAddMinimalStudent()\r\n throws Exception\r\n {\r\n Student student1 = new Student();\r\n student1.setGender( Gender.MALE );\r\n studentId1 = StudentIdGen.getInstance().nextStudentId();\r\n student1.setId( studentId1 );\r\n\r\n try\r\n {\r\n Session session = SessionUtil.begin();\r\n session.save( student1 );\r\n SessionUtil.end();\r\n }\r\n catch ( Exception e )\r\n {\r\n SessionUtil.rollback( e );\r\n }\r\n }",
"public void addStudent(Student student) {\n\t\t\r\n\t}",
"@Override\n\t//插入数据\n\tpublic void insertStudent(Student student) {\n\t\tConnection conn = null;\n\t\tPreparedStatement pStatement = null;\t\t\n\t\ttry {\n\t\t\tconn = MySQLConnectUtil.getMySQLConnection();\n\t\t\tpStatement = conn.prepareStatement(INSERT);\n\t\t\t\n\t\t\tpStatement.setString(1, student.getId());\n\t\t\tpStatement.setString(2, student.getName());\n\t\t\tpStatement.setInt(3, student.getAge());\n\t\t\tint i =pStatement.executeUpdate();\n\t\t\tSystem.out.println(\"影响行数\"+i);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tMySQLConnectUtil.closePreparestatement(pStatement);\n\t\t\tMySQLConnectUtil.closeConnection(conn);\n\t\t}\n\t}",
"boolean insertUser(SchoolSubject schoolSubject);",
"@Override\n\t\tpublic void saveStudent(Student stu) {\n\t\t\tsessionFactory.getCurrentSession().save(stu);\n\t\t\tSystem.out.println(\"DATA HAS BEEN SAVED.........\");\n\t\t}",
"@GetMapping(\"/save\")\n\tpublic @ResponseBody String addNewStudent(@RequestParam int rollno, @RequestParam String name, @RequestParam String role) {\n\t\tStudents student = new Students();\n\t\tstudent.setRollno(rollno);\n\t\tstudent.setSname(name);\n\t\tstudent.setStudent_role(role);\n\t\tstudentMapper.insert(student);\n\t\treturn \"Saved New User\";\n\t}",
"@Override\n\tpublic Student addStudent(Student std)\n\t {\n\t\t return studentrepo.save(std);\t\t \n\t }",
"public void newRecord() {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tdateTxt.setText(dateFormat.format(new Date()));\n\t\t//mark all students enrolled as attendant\n\t\tif (courseTable.getSelectedRow() != -1) {\n\t\t\tsetWarningMsg(\"\");\n\t\t\tupdateStudent(currentCourse);\n\t\t\tfor (int i = 0; i < studentTable.getRowCount(); i++) {\n\t\t\t\tstudentTable.setValueAt(new Boolean(true), i, 0);\n\t\t\t}\t\t\t\n\t\t}\n\t\telse {\n\t\t\t//show message: choose course first\n\t\t\tsetWarningMsg(\"please select course first\");\n\t\t}\n\t}",
"public Student() \r\n {\r\n studentId = 0;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }",
"private void addStudent(Student student) {\n\t\tSystem.out.println(\"Add Student\");\n\t\tsmb.saveStudent(student);\n\t}",
"public void registerStudent(String firstName, String lastName, String bcsYear,\n String email, String accountID) throws SQLException {\n Statement myStatement = studentConn.createStatement();\n\n myStatement.executeUpdate(\"INSERT INTO student(firstName, lastName, bcsYear, email, accountID) \"\n + \"VALUES(\\\"\" + firstName + \"\\\", \\\"\" + lastName + \"\\\", \\\"\"\n + bcsYear + \"\\\", \\\"\" + email + \"\\\", \\\"\" + accountID + \"\\\");\");\n }",
"private int createStudent(String firstname, String lastname, Role role, String username,\r\n\t\t\tString password, Level level, String period, boolean enabled) throws Exception\r\n\t{\r\n\t\tString query = \"INSERT INTO user \" +\r\n\t\t\t\t\"(firstname,lastname,role,username,password,level,period,enabled) VALUES \" +\r\n\t\t\t\t\"(?,?,?,?,?,?,?,?)\";\r\n\t\tConnection link = Database.getSingleton().getLink();\r\n\t\t\r\n\t\tif (link == null)\r\n\t\t\tthrow new Exception(\"Connection Failed!\");\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//create the prep stmt\r\n\t\t\tPreparedStatement stmt = link.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\r\n\t\t\t\r\n\t\t\t//bind variables\r\n\t\t\tstmt.setString(1, firstname);\r\n\t\t\tstmt.setString(2, lastname);\r\n\t\t\tstmt.setString(3, role.toString());\r\n\t\t\tstmt.setString(4, username);\r\n\t\t\tstmt.setString(5, password);\r\n\t\t\tstmt.setString(6, level.toString());\r\n\t\t\tstmt.setString(7, period);\r\n\t\t\tstmt.setBoolean(8, enabled);\r\n\t\t\t\r\n\t\t\t//execute update\r\n\t\t\tstmt.executeUpdate();\r\n\t\t\t\r\n\t\t\tResultSet resultKey = stmt.getGeneratedKeys();\r\n\t\t\tif (!resultKey.next())\r\n\t\t\t\tthrow new Exception(\"Creating new Student failed - createStudent()\");\r\n\t\t\treturn resultKey.getInt(1);\r\n\t\t}\r\n\t\tcatch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in setEnabled\",e);\r\n\t\t\tlink.rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public void createBooking(Booking book) {\n\tStudentDAO studentDAO=new StudentDAO();\n\tstudentDAO.createBooking(book);\n}",
"@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}",
"@POST\n\t@Path(\"add\")\n\tpublic String addStudent(Representation entity) {\n\t\tForm form = new Form(entity);\n\t\tString name = form.getFirstValue(\"name\");\n\t\tint grade = Integer.parseInt(form.getFirstValue(\"grade\"));\n\t\tint sex = Integer.parseInt(form.getFirstValue(\"sex\"));\n\t\tint age = Integer.parseInt(form.getFirstValue(\"age\"));\n\n\t\tStudent student = new Student();\n\t\tstudent.setGrade(grade);\n\t\tstudent.setName(name);\n\t\tstudent.setSex(sex);\n\t\tstudent.setAge(age);\n\n\t\tint id = StorageOperator.studentID + 1;\n\t\tstudent.setId(id);\n\t\treturn String.valueOf(StorageOperator.addStudent(student));\n\t}",
"private void saveData() {\n try {\n Student student = new Student(firstName.getText(), lastName.getText(),\n form.getText(), stream.getText(), birth.getText(),\n gender.getText(), Integer.parseInt(admission.getText()),\n Integer.parseInt(age.getText()));\n\n\n if (action.equalsIgnoreCase(\"new\") && !assist.checkIfNull(student)) {\n\n dao.insertNew(student);\n JOptionPane.showMessageDialog(null, \"Student saved !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n\n } else if (action.equalsIgnoreCase(\"update\") && !assist.checkIfNull(student)) {\n dao.updateStudent(student, getSelected());\n JOptionPane.showMessageDialog(null, \"Student Updated !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n prepareTable();\n prepareHistory();\n buttonSave.setVisible(false);\n admission.setEditable(true);\n }catch (Exception e)\n {}\n }",
"public int save(Student stud) {\r\n\t\tint status = 0;\r\n\t\ttry {\r\n\t\t\tConnection con = DatabaseUtility.getCon(inputStream);\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\r\n\t\t\t\t\t\"insert into student(first_name,last_name,email,gender,date_of_birth,address,contact_no) values(?,?,?,?,?,?,?)\");\r\n\t\t\tps.setString(1, stud.getFname());\r\n\t\t\tps.setString(2, stud.getLname());\r\n\t\t\tps.setString(3, stud.getEmail());\r\n\t\t\tps.setString(4, stud.getGender());\r\n\t\t\tps.setString(5, stud.getDOB());\r\n\t\t\tps.setString(6, stud.getAddress());\r\n\t\t\tps.setString(7, stud.getContact());\r\n\r\n\t\t\tstatus = ps.executeUpdate();\r\n\t\t\tcon.close();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(ex);\r\n\t\t}\r\n\t\treturn status;\r\n\t}",
"@Override\n\tpublic int insertOne(StudentVO vo) {\n\t\treturn 0;\n\t}",
"int insert(ProSchoolWare record);",
"private void saveNewStudentToFirebaseDatabase(String studentId) {\n // Extract Student information from the edit text views\n String studentName = mStudentNameEditText.getText().toString().toLowerCase().trim();\n int studentSex = mStudentSex;\n long studentBirthdate = mStudentBirthdate;\n int studentGrade = Integer.parseInt(mStudentGradeEditText.getText().toString());\n\n if (mViewModel.studentPicBitmap != null) {\n // Save photo to Firebase Storage using AsyncTask\n saveStudentPhotoToFirebaseStorage(studentId);\n } else {\n Student newStudent = new Student(studentName, studentSex, studentBirthdate, studentGrade,\n mChosenClassesList, null, studentId);\n\n mStudentsDatabaseReference.child(studentId).setValue(newStudent);\n }\n\n // Close activity\n finish();\n }",
"void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }",
"int insertSelective(StudentEntity record);",
"public Student(String studentId){\n id = studentId;\n }",
"public void addStudent(User user) {\n\t\t\r\n\t}",
"@PostMapping(value = insertTeacherStudentMapping, consumes = MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseEntity<HttpResponse> insertTeacherStudent(@RequestBody TeacherStudent teacherStudent){\r\n\t\tteacherStudentService.insert(teacherStudent);\r\n\t\tHttpResponse response = new HttpResponse();\r\n\t\tresponse.setResponseMessage(\"TeacherStudent Inserted with StudentId : \" + teacherStudent.getStudentId() + \" and TeacherId : \" + teacherStudent.getTeacherId());\r\n\t\treturn ResponseEntity.ok().body(response);\r\n\t}",
"public void addStudent(Student InStudent)\n\t{\n\t\tclassRoll.add (InStudent);\n\t\tthis.saveNeed = true;\n\n\t\t\n\t}",
"public long addStudent(String studentname, String rollno, String ssg) {\n ContentValues initialValues=new ContentValues();\n initialValues.put(KEY_STUDENT_NAME,studentname);\n initialValues.put(KEY_STUDENT_ROLL,rollno);\n initialValues.put(KEY_FOREIGN,ssg);\n return liteDatabase.insert(DATABASE_TABLE2,null,initialValues);\n }",
"public static void Add_students() throws SQLException \n\t {\n\t\ttry\n\t\t{\n\t\t\t//Declarations \n\t\t\tFloat gpa=0.0f;\n\t\t\tString fname=\"\",lname=\"\",status=\"\";\n\t\t\tString email=\"\";\n\t\t\tString sid=\"\";\n\t\t\tSystem.out.println(\"Please enter the students sid (starting with 'B')\\n\"); \n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in ) ); \n\t\t\tsid = br.readLine(); \n\t\t\t\t\t \t\t\t\n\t\t\tSystem.out.println(\"Please enter the students First name \\n\");\n\t\t\tfname=br.readLine();\n\n\t\t\t System.out.println(\"Please enter the students Last name \\n\"); \n lname=br.readLine();\n\t\t\t\n\t\t\t\tSystem.out.println(\"Please enter the students status (('freshman', 'sophomore', 'junior', 'senior', 'graduate'))\\n\"); \n\t\t\t\tstatus = br.readLine();\n\t\t\n\t\t\tdo{\n\t\t\t\tSystem.out.println(\"Please enter the students GPA ((gpa >= 0 and gpa <= 4.0))\\n\"); \n\t\t\t\tgpa = Float.parseFloat(br.readLine());\n\t\t\t}while(gpa<0.0 && gpa>4.0);\n\n\t\t\t\t\t\t \n\t\t\tSystem.out.println(\"Please enter the students email address\\n\"); \n\t\t\temail = br.readLine();\n //Connection to Oracle server\n OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();\n ds.setURL(\"jdbc:oracle:thin:@grouchoIII.cc.binghamton.edu:1521:ACAD111\");\n Connection conn = ds.getConnection(\"vbobhat1\", \"BingData\");\n\tCallableStatement cs = conn.prepareCall (\"begin StudRegSys.add_student(:1,:2,:3,:4,:5,:6); end;\");\n\t\t\tcs.setString(1,sid);\t\t \t \n\t\t \tcs.setString(2,fname);\n\t\t\tcs.setString(3,lname);\n\t\t \tcs.setString(4,status);\n\t\t \tcs.setFloat(5,gpa);\n\t\t \tcs.setString(6,email);\n\t\t\tcs.executeQuery();\n\t \n\t \tSystem.out.println(\"Student Succesfully Added!\");\n\t \n\t \t// close the result set, statement, and the connection\n\t\t \tcs.close();\n\t\t \tconn.close();\n\t\t }\n\tcatch (SQLException ex) { System.out.println (\"\\n*** SQLException caught ***\\n\" + ex.getMessage());}\n catch (Exception e) {System.out.println (\"\\n*** other Exception caught ***\\n\");}\n\t }",
"public void registerDB(Course curs, Student stud) throws SQLException {\r\n Connection con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/Hogwarts\",\"postgres\" , \"admin\");\r\n Statement st = con.createStatement();\r\n\r\n st.executeUpdate(\"INSERT INTO public.enrolled(\\n\" +\r\n \"\\t\\\"studentID\\\", \\\"courseID\\\")\\n\" +\r\n \"\\tVALUES (\" + stud.getId() + \", \" + curs.getId() + \")\");\r\n\r\n st.close();\r\n }",
"int insertSelective(StudentInfo record);",
"private void insert() {\n\t\tConfiguration conf = new Configuration();\n\t\tconf.configure(\"hibernate.cfg.xml\");\n\t\tSessionFactory sf = conf.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\ts.beginTransaction();\n\n\t\tQuery query = s.createQuery(\"insert into OldStudent(id,name,grade) select s.id,s.name,s.grade from Student s\");\n\t\tint count = query.executeUpdate();\n\t\tSystem.out.println(\"Number of Rows inserted in the oldstudent table=\" + count);\n\n\t\ts.getTransaction().commit();\n\t\ts.clear();// s.evict() on all student objects in session\n\t\tsf.close();\n\t}",
"public void addStaff(String name, String dob, String email, String number, String address, String password) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.STAFF \" + \"VALUES ('\" \n + name + \"', '\" + dob + \"', '\" \n + email + \"', '\" + number+ \"', '\" \n + address + \"', '\" + password + \"')\");\n\n }",
"public void insertCourse(){\n \n }",
"public int createEmployee(Employee emp) {\n\tStudentDAO studentDAO=new StudentDAO();\n\treturn studentDAO. createEmployee(emp);\n}",
"public void save() {\n sessionBean.saveStudent();\n success = true;\n }",
"int insertSelective(Student record);",
"int insertSelective(Student record);",
"int insertSelective(Student record);",
"public Student(int studentId) \r\n {\r\n\r\n this.studentId = studentId;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }",
"User create(final User user) throws DatabaseException;",
"@POST\r\n\t@Path(\"/student\")\r\n\tpublic void enrollStudentToCourse(@FormParam(\"studentID\") String studentID,\r\n\t\t\t@FormParam(\"courseID\") String courseID) {\r\n\r\n\t\tStudent student = InMemoryDataStore.getStudent(studentID);\r\n\t\tCourse course = InMemoryDataStore.getCourse(courseID);\r\n\r\n\t\tif (student == null || course == null) {\r\n\t\t\tthrow new WebApplicationException(Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\r\n\t\tstudent.addCourse(courseID);\r\n\t\tcourse.addStudent(studentID);\r\n\t}",
"@Override\n\tpublic boolean insert(Student student) {\n\t\treturn sDao.insert(student) > 0;\n\t}",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);"
] | [
"0.77535623",
"0.76777387",
"0.7666303",
"0.76322913",
"0.75116664",
"0.7317072",
"0.7255967",
"0.7180633",
"0.71661466",
"0.71413505",
"0.71180135",
"0.7103421",
"0.71029294",
"0.71029294",
"0.71029294",
"0.7084616",
"0.69511485",
"0.69493896",
"0.69415456",
"0.69385576",
"0.6890327",
"0.68705356",
"0.6844091",
"0.6809699",
"0.67721677",
"0.6759232",
"0.6736176",
"0.67098755",
"0.6702564",
"0.6658134",
"0.6640414",
"0.6638676",
"0.66286075",
"0.6610971",
"0.6574532",
"0.6530219",
"0.65284216",
"0.6503894",
"0.6495076",
"0.64933604",
"0.64933604",
"0.64887756",
"0.64490634",
"0.64401644",
"0.64373165",
"0.64355946",
"0.6432287",
"0.6393784",
"0.638905",
"0.6387593",
"0.6376901",
"0.6358103",
"0.6347423",
"0.6344752",
"0.63326555",
"0.63167506",
"0.6301838",
"0.628818",
"0.62832445",
"0.6277751",
"0.62684876",
"0.626678",
"0.6262634",
"0.62397903",
"0.6235281",
"0.62284523",
"0.6217858",
"0.6209106",
"0.62044567",
"0.61968005",
"0.61945",
"0.619302",
"0.6189209",
"0.61731875",
"0.6162411",
"0.61106485",
"0.61019015",
"0.61013615",
"0.6079594",
"0.60717934",
"0.60486007",
"0.60461104",
"0.60454154",
"0.60429394",
"0.6042448",
"0.60422665",
"0.60366863",
"0.60294396",
"0.6028915",
"0.6028376",
"0.602709",
"0.602709",
"0.602709",
"0.60256064",
"0.6024778",
"0.6015395",
"0.6014444",
"0.6010976",
"0.6010976",
"0.6010976"
] | 0.73616785 | 5 |
Returns the program information that is closest to being the most Active program from the list retrieved by CRM If it does not find the student Program that has an active enrollment status, it displays the first program | @Override
public StudentProgramInfo getActiveStudentProgramInformation(Student studentSearchDTO) throws StudentServiceException {
List<StudentProgramInfo> studentProgramInfoList = getStudentProgramInformation(studentSearchDTO);
StudentProgramInfo stdProgramInfo= new StudentProgramInfo();
if(studentProgramInfoList.size()>0){
for(StudentProgramInfo stdProgInfo : studentProgramInfoList) {
String enrollmentStatus = stdProgInfo.getEnrollmentStatus();
if(enrollmentStatus!=null && (enrollmentStatus.equalsIgnoreCase("Active") ||enrollmentStatus.equalsIgnoreCase("Conditionally Accepted") )) {
return stdProgInfo;
}
}
return studentProgramInfoList.get(0);
}
stdProgramInfo.setProgramOfStudyId("N/A");
stdProgramInfo.setEnrollmentStatus("N/A");
stdProgramInfo.setProgramCode("N/A");
stdProgramInfo.setProgramVersionCode("N/A");
//Using ProgramVersion from the service for the programName
stdProgramInfo.setProgramName("N/A");
stdProgramInfo.setStateCode("N/A");
stdProgramInfo.setCatalogCode("N/A");
//stdProgramInfo.setStudentCrmId(student.getCrmId());
//stdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());
//stdProgramInfo.setExpectedStartDate(pos.getExpectedStartDate());
//need to see how to get catalogcode and state code
return stdProgramInfo;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List<TblProgram> displayProgram(int idProgram) {\n\t\tList<TblProgram> program = null;\n\t\t\n\t\tSession session = HibernateUtils.getSessionFactory().getCurrentSession();\n\t\t\n\t\ttry {\n\t\t\tsession.getTransaction().begin();\n\t\t\tString hql = \"from TblProgram where idProgram = :idProgram\";\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setParameter(\"idProgram\", idProgram);\n\t\t\tprogram = query.list();\n\t\t\t\n\t\t\treturn program;\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Loi:\" + ex.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"private List<StudentProgramInfo> getStudentProgramInfoList(\r\n\t\t\tProgramOfStudyResponse programOfStudyResponse,Student student) {\r\n\t\tList<StudentProgramInfo> studentProgramList = new ArrayList<StudentProgramInfo>();\r\n\t\tSimpleDateFormat dateFormat =new SimpleDateFormat(\"MM/dd/yyyy\");\r\n\t\tif(programOfStudyResponse!=null && programOfStudyResponse.size()>0){\r\n\t\t\tfor(ProgramOfStudy pos:programOfStudyResponse){\r\n\t\t\t\tStudentProgramInfo stdProgramInfo = new StudentProgramInfo();\r\n\t\t\t\tstdProgramInfo.setProgramOfStudyId(pos.getProgramOfStudyId());\r\n\t\t\t\tstdProgramInfo.setEnrollmentStatus(pos.getEnrollmentStatus());\r\n\t\t\t\tstdProgramInfo.setProgramCode(pos.getProgramCode());\r\n\t\t\t\tstdProgramInfo.setProgramVersionCode(pos.getProgramVersionCode());\r\n\t\t\t\t//Using ProgramVersion from the service for the programName\r\n\t\t\t\tstdProgramInfo.setProgramName(pos.getProgramVersion());\r\n\t\t\t\tstdProgramInfo.setStudentCrmId(student.getCrmId());\r\n\t\t\t\tstdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());\r\n \t\t\t if(pos.getExpectedStartDate()!=null){\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tstdProgramInfo.setExpectedStartDate(dateFormat.parse(pos.getExpectedStartDate()));\r\n\t\t\t\t\t} catch (ParseException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//\r\n\t\t\t\t//need to see how to get catalogcode and state code\r\n\t\t\t\tstudentProgramList.add(stdProgramInfo);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t/*TODO: ADDING THIS BECAUSE THERE ARE PLACES WE ARE JUST ASSUMING PROGRAM IS AVAILABLE. FIX ME */\r\n\t\t\tStudentProgramInfo stdProgramInfo= new StudentProgramInfo();\r\n\t\t\t \r\n\t\t\tstdProgramInfo.setProgramOfStudyId(\"N/A\");\r\n\t\t\tstdProgramInfo.setEnrollmentStatus(\"N/A\");\r\n\t\t\tstdProgramInfo.setProgramCode(\"N/A\");\r\n\t\t\tstdProgramInfo.setProgramVersionCode(\"N/A\");\r\n\t\t\t//Using ProgramVersion from the service for the programName\r\n\t\t\tstdProgramInfo.setProgramName(\"N/A\");\r\n\t\t\t//stdProgramInfo.setStudentCrmId(student.getCrmId());\r\n\t\t\t//stdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());\r\n\t\t\t//stdProgramInfo.setExpectedStartDate(pos.getExpectedStartDate());\r\n\t\t\t//need to see how to get catalogcode and state code\r\n\t\t\tstudentProgramList.add(stdProgramInfo);\r\n\r\n\t\t}\r\n \t\treturn studentProgramList;\r\n\t}",
"@Test\r\n\tpublic void selectLastProgramFromProgramGuide(){\r\n\t\tdriver.get(url+radioUrl);\r\n\t\tObject response = jse.executeScript(\r\n\t\t\t\t\"if(document.readyState === 'complete'){\"\r\n\t\t\t\t+ \"var prgs = document.querySelectorAll('.at-a-glance')[0].children;\"\r\n\t\t\t\t+ \"var lastEle = prgs[prgs.length-2].children[0];\"\r\n\t\t\t\t+ \"lastEle.click(); return lastEle.children[0].children[1].innerText;}\", \"\");\r\n\t\tObject title = jse.executeScript(\r\n\t\t\t\t\"if(document.readyState === 'complete'){\"\r\n\t\t\t\t+ \"return document.title;}\", \"\");\r\n\t\tAssert.assertTrue(title.toString().contains(response.toString()), \"Page not navigated to program page as expected.\");\r\n\t}",
"public Map<String, Object> getFirstDisplayedProgramDetails() throws ParseException;",
"public List<Models.Programme> showProgrammes() {\n List<Models.Programme> results = em.createNativeQuery(\"select pg.* from programme pg, programmeparticipant ppa, participant p where pg.programmecode = ppa.programmecode and ppa.participantid = p.participantid and p.userid = ?\", Models.Programme.class).setParameter(1, user.getUserid()).getResultList();\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" programmes were found.\");\n\n for (Models.Programme programme : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Programme?id=\" + programme.getProgrammecode() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>PROGRAMME</a>\\n\"\n + \" <a class='name'>\" + programme.getTitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + programme.getProgrammecode() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n return results;\n }",
"public Staff findHighestEarningLabour() {\n Staff highest = new Labourer(null,0,null,0,0);\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() >= ((Labourer)highest).getWage()){\n highest = staffList[i];\n }\n }\n }\n return highest;\n }",
"public static Optional<Student> getStudentWithHighestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(maxBy(Comparator.comparing(Student::getGpa)));\n\t}",
"@Basic\n\tpublic Program getProgram() {\n\t\treturn this.program;\n\t}",
"public int largestEntry() throws SQLException {\r\n String statement = \"SELECT Appointment_ID FROM appointments ORDER BY Appointment_ID DESC LIMIT 0,1\";\r\n ResultSet rs = conn.prepareStatement(statement).executeQuery();\r\n rs.next();\r\n return rs.getInt(\"Appointment_ID\");\r\n }",
"protected Program getProgram() {\n final Holder<Program> holder = Holder.of( null );\n Hook.PROGRAM.run( holder );\n if ( holder.get() != null ) {\n return holder.get();\n }\n\n return Programs.standard();\n }",
"public void showLargestComponent()\n {\n System.out.println(\"The most sociable community: \");\n\n Iterable<User> usersList = service.getLargestComponent();\n for(User u : usersList)\n System.out.println(u.toString());\n }",
"private String getFeasibleProcess(){\n String outSystemProcessId = null;\n if(systemProcessListIterator==null){\n systemProcessListIterator = systemProcesses.listIterator();\n }\n while (systemProcessListIterator.hasNext()) {\n SystemProcessPojo systemProcessPojo = systemProcessListIterator.next();\n// System.out.println(\"Performing check for process:\" + systemProcessPojo.getId());\n int feasibleProcessCounter = 0;\n ListIterator<SystemResourcePojo> systemResourcesListIterator = systemResources.listIterator();\n while (systemResourcesListIterator.hasNext()) {\n SystemResourcePojo systemResourcePojo = systemResourcesListIterator.next();\n if(systemProcessPojo.getRequiredResourceInstances().get(systemResourcePojo.getId())<=systemResourcePojo.getAvailableInstances()){\n feasibleProcessCounter++;\n } else {\n break;\n }\n }\n if(feasibleProcessCounter == systemResources.size() && !systemProcessPojo.isFinishedExecution()){\n outSystemProcessId = systemProcessPojo.getId();\n// Reset the Temp ListIterator here...\n if (!systemProcessListIterator.hasNext()) {\n systemProcessListIterator = null;\n }\n break;\n } else if(systemProcesses\n .stream()\n .filter(systemResourcPojoFiltered->!systemResourcPojoFiltered.isFinishedExecution())\n .count()\n >0 && !systemProcessListIterator.hasNext()){\n systemProcessListIterator = systemProcesses.listIterator();\n \n }\n \n \n }\n \n return outSystemProcessId;\n }",
"public int getHighestCombatSkill() {\r\n int id = 0;\r\n int last = 0;\r\n for (int i = 0; i < 5; i++) {\r\n if (staticLevels[i] > last) {\r\n last = staticLevels[i];\r\n id = i;\r\n }\r\n }\r\n return id;\r\n }",
"public DTProgramaFormacion verInfoPrograma(String nombreProg) throws ProgramaFormacionExcepcion;",
"@Override\n\tpublic List<Application> getLatestActivity(int maxResults) {\n\t\treturn wrapApplication(flatPushMessageInformationDao.findLatestActivity(loginName.get(), maxResults));\n\t}",
"public Program getProgram() {\n return this.program;\n }",
"public List<Models.Programme> showProgrammes(String from) {\n // Get from all levels\n List<Models.Programme> results = em.createNativeQuery(\"select pg.* from programme pg, institution i, institutionparticipant ipa, participant p where pg.institutioncode = i.institutioncode and ipa.institutioncode = i.institutioncode and ipa.participantid = p.participantid and p.userid = ? and i.institutioncode = ?\", Models.Programme.class).setParameter(1, user.getUserid()).setParameter(2, from).getResultList();\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" programmes were found.\");\n\n for (Models.Programme programme : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Programme?id=\" + programme.getProgrammecode() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>PROGRAMME</a>\\n\"\n + \" <a class='name'>\" + programme.getTitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + programme.getProgrammecode() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n return results;\n }",
"private void getBest()\n\t{\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(bestTour + \" \" + bestScore);\n\t}",
"public static MyStudent studentWithHighest ( List<MyStudent> list) {\n\t\treturn list.stream().sorted(Comparator.comparing(MyStudent::getScore)).skip(list.size()-1).findFirst().get();\n\t}",
"private static Optional<Student> getHighestGPA(List<Student> studentList) {\n return studentList.stream()\n .reduce((student1, student2) -> {\n if (student1.getGpa() >= student2.getGpa()) return student1;\n else return student2;\n });\n }",
"public LearningResultHasActivity[] findWhereProgramCodeEquals(String programCode) throws LearningResultHasActivityDaoException;",
"String getProgram()\n\t\t{\n\t\t\treturn mProgram;\n\t\t}",
"private void getMostPopularDesigners(){\n System.out.println(this.ctrl.getMostPopularDesigner().getKey() + \" \" + this.ctrl.getMostPopularDesigner().getValue().toString() + \" items\");\n }",
"@Override\r\n\tpublic List<StudentProgramInfo> getStudentProgramInformation(\r\n\t\t\tStudent studentSearchDTO) throws StudentServiceException {\t\t\t\r\n\t\t ProgramOfStudyResponse programOfStudyResponse =studentSearchClient.getProgramsOfStudy(studentSearchDTO);\r\n return getStudentProgramInfoList(programOfStudyResponse,studentSearchDTO);\r\n \r\n\t}",
"public Programa buscarPrograma(int id) throws Exception {\r\n\t\tEntityManager em = AdministradorEntityManager.getEntityManager();\r\n\t\treturn em.find(Programa.class, id);\r\n\t}",
"@Test\n public void testPrograms() throws Exception {\n List<ProgramRecord> programRecords = ImmutableList.of(\n new ProgramRecord(ProgramType.WORKER, \"dummyApp\", \"prog1\", \"\"),\n new ProgramRecord(ProgramType.MAPREDUCE, \"dummyApp\", \"prog2\", \"\"),\n new ProgramRecord(ProgramType.MAPREDUCE, \"dummyApp\", \"anotherProgram\", \"\"));\n ApplicationDetail applicationDetail = new ApplicationDetail(\"name\", ApplicationId.DEFAULT_VERSION, \"desc\", null,\n \"config\", null, programRecords, null,\n new ArtifactSummary(\"art\", \"1\"), null);\n when(applicationClient.get(new ApplicationId(\"dummyNs\", \"dummyApp\"))).thenReturn(applicationDetail);\n\n ResourceLookupContext resourceLookupContext = new ResourceLookupContext();\n resourceLookupContext.setResourceName(\"program\");\n resourceLookupContext.setUserInput(\"p\");\n resourceLookupContext.setResources(ImmutableMap.of(\"namespace\", ImmutableList.of(\"dummyNs\"),\n \"application\", ImmutableList.of(\"dummyApp\")));\n List<String> resources = client.getResources(resourceLookupContext);\n Assert.assertEquals(2, resources.size());\n Assert.assertEquals(ImmutableList.of(\n Joiner.on(RangerCommon.RESOURCE_SEPARATOR).join(ProgramType.WORKER.getPrettyName().toLowerCase(), \"prog1\"),\n Joiner.on(RangerCommon.RESOURCE_SEPARATOR).join(ProgramType.MAPREDUCE.getPrettyName().toLowerCase(), \"prog2\")),\n resources);\n }",
"public static ProgramStatus getProgramStatus(String name) {\n return getProgramStatus(name, DEFAULT);\n }",
"public String getProgram() {\n return program;\n }",
"private static void loadApplications() throws FileNotFoundException {\n\t\tFile file = new File(\"C:\\\\Users\\\\singh\\\\eclipse-workspace\\\\Loan\\\\application.txt\");\n\t\tScanner scan = new Scanner(file);\n\n\t\twhile (scan.hasNextLine()) {\n\n\t\t\tString line = scan.nextLine();\n\t\t\t/*\n\t\t\t * If the sum of education and experience years is smaller than 10, the\n\t\t\t * application will be rejected. Otherwise the application will get some score\n\t\t\t * and will be added to the active list.\n\t\t\t */\n\t\t\t// Convert the line string into an array of strings\n\t\t\tString[] userInfo = line.split(\"\\t\");\n\t\t\tint education = Integer.parseInt(userInfo[2]);\n\t\t\tint experience = Integer.parseInt(userInfo[3]);\n\t\t\tint sum = education + experience;\n\t\t\tint loan = Integer.parseInt(userInfo[1]);\n\t\t\tint[] estimatedProfit = new int[userInfo.length - 4];\n\t\t\tint score = 0;\n\n\t\t\t/**\n\t\t\t * To count estimated profit\n\t\t\t */\n\t\t\tfor (int i = 4; i < userInfo.length; i++) {\n\n\t\t\t\testimatedProfit[i - 4] = Integer.parseInt(userInfo[i]);\n\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Check if application will be rejected or to put in the active list\n\t\t\t */\n\n\t\t\tif (sum < 10) {\n\t\t\t\tApplicant applicant = new Applicant(userInfo[0], education, experience, estimatedProfit, score, loan);\n\t\t\t\trejectedList.add(applicant);\n\t\t\t}\n\n\t\t\telse {\n\n\t\t\t\t/**\n\t\t\t\t * Calculate score\n\t\t\t\t */\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < estimatedProfit.length; j++) {\n\t\t\t\t\ttmp = estimatedProfit[j] / (j + 1);\n\t\t\t\t\tscore = score + tmp;\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Add to active list\n\t\t\t\t */\n\n\t\t\t\tApplicant applicant = new Applicant(userInfo[0], education, experience, estimatedProfit, score, loan);\n\t\t\t\tactiveList.push(applicant);\n\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Applicaitons Loaded Successfuly!\");\n\n\t}",
"public DefaultTableModel obtenerProgramas() {\r\n // Tabla para mostrar lo obtenido de la consulta\r\n DefaultTableModel programas = new DefaultTableModel();\r\n programas.setColumnIdentifiers(new Object[]{\r\n \"codigo\", \"Nombre\", \"Costo\", \"Version\", \"Edicion\", \"Tipo Programa\", \"Fecha Aprobacion\", \"Estado\"\r\n });\r\n\r\n // Abro y obtengo la conexion\r\n this.conection.abrirConexion();\r\n Connection con = this.conection.getConexion();\r\n // Preparo la consulta\r\n String sql = \"SELECT\\n\"\r\n + \"programa.codigo,\\n\"\r\n + \"programa.nombre,\\n\"\r\n + \"programa.costo,\\n\"\r\n + \"programa.version,\\n\"\r\n + \"programa.edicion,\\n\"\r\n + \"programa.tipo_programa,\\n\"\r\n + \"programa.fecha_aprobacion,\\n\"\r\n + \"programa.fecha_elaboracion,\\n\"\r\n + \"programa.estado\\n\"\r\n + \"FROM programa\\n\"\r\n + \"WHERE programa.estado='1'\";\r\n try {\r\n // La ejecuto\r\n PreparedStatement ps = con.prepareStatement(sql);\r\n ResultSet rs = ps.executeQuery();\r\n\r\n // Cierro la conexion\r\n this.conection.cerrarConexion();\r\n\r\n // Recorro el resultado\r\n while (rs.next()) {\r\n // Agrego las tuplas a mi tabla\r\n programas.addRow(new Object[]{\r\n rs.getInt(\"codigo\"),\r\n rs.getString(\"nombre\"),\r\n rs.getInt(\"costo\"),\r\n rs.getString(\"version\"),\r\n rs.getString(\"edicion\"),\r\n rs.getString(\"tipo_programa\"),\r\n rs.getString(\"fecha_aprobacion\"),\r\n rs.getString(\"fecha_elaboracion\"),\r\n rs.getInt(\"estado\")\r\n });\r\n }\r\n } catch (SQLException ex) {\r\n System.out.println(ex.getMessage());\r\n }\r\n return programas;\r\n }",
"public ProgramMode getProgramMode() {\n return _programMode;\n }",
"public static ProgramStatus getProgramStatusByIndex(int i) {\n return SpTypeUtil.valueOf(ProgramStatus.class, i, DEFAULT);\n }",
"private DomainFile findProgramByName(String programText, DomainFolder folder) {\n\t\tDomainFile[] files = folder.getFiles();\n\t\tfor (DomainFile file : files) {\n\t\t\tif (file.getName().equals(programText)) {\n\t\t\t\treturn file;\n\t\t\t}\n\t\t}\n\n\t\t// not at the current level, then check sub-folders\n\t\tDomainFolder[] folders = folder.getFolders();\n\t\tfor (DomainFolder subFolder : folders) {\n\t\t\tDomainFile domainFile = findProgramByName(programText, subFolder);\n\t\t\tif (domainFile != null) {\n\t\t\t\treturn domainFile;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"public List<StartActivityBean> getProgramForKey(StartActivityBean startActivityBean) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tList<StartActivityBean> valueList=new ArrayList<StartActivityBean>();\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\tvalueList=sqlMapClient.queryForList(\"startActivity.getProgramIdValue\",startActivityBean);\r\n\t\t}catch(Exception e){\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn valueList;\r\n\t}",
"@Override\n\tpublic TrainingProgramDTO getTrainingProgramByCode(int trainingCode) {\n\t\tTrainingProgramDTO trainingProgram = eManager.find(\n\t\t\t\tTrainingProgramDTO.class, trainingCode);\n\t\treturn trainingProgram;\n\t}",
"public Integer getProgramId();",
"public Fitness bestScore() {\r\n Map.Entry<Fitness, List<Element>> bestEntry\r\n = elementsByFitness.lastEntry();\r\n if (bestEntry == null) {\r\n return null;\r\n }\r\n Fitness result = bestEntry.getKey();\r\n\r\n return result;\r\n }",
"default int getPriority(Program program) {\n\t\treturn 0;\n\t}",
"public Page getMaxAuthority(List<Page> result) {\n\t\tPage maxAuthority = null;\n\t\tfor (Page currPage : result) {\n\t\t\tif (maxAuthority == null || currPage.authority > maxAuthority.authority)\n\t\t\t\tmaxAuthority = currPage;\n\t\t}\n\t\treturn maxAuthority;\n\t}",
"public String getProgramCourseKey(TransferNORInPSTBean programCoursekeyData){\r\n\t\t//Connection con=DBConnection.getConnection();\r\n\t\tString programCourseKey=\"\";\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\tList<TransferNORInPSTBean> programCourse=(List<TransferNORInPSTBean>)sqlMapClient.queryForList(\"TransferNORInPSTBean.getProgramCourseKey\", programCoursekeyData);\r\n\t\t\t\tfor(TransferNORInPSTBean programCourseValue:programCourse){\r\n\t\t\t\t\tprogramCourseKey=programCourseValue.getProgramCourseKey();\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\t//System.out.println(\"Exception in get program course key: \"+e);\r\n\t\t\tlogger.info(\"Exception in program course key\"+e.getMessage());\r\n\t\t}\r\n\t\treturn programCourseKey;\r\n\t}",
"private static WorkFrame Wf_getPrior(Set<WorkFrame> activeWorkFrames) {\n\t\tint maxPri = 0;\n\t\tif (activeWorkFrames.size() == 0) return null;\n\t\t//find the wf with the highest priority\n\t\tfor (WorkFrame wf : activeWorkFrames) {\n\t\t\tif (wf.getPriority() > 0) {\n\t\t\t\tmaxPri = updateMaxPriority(wf.getPriority(), maxPri);\n\t\t\t\tcontinue;\n\t\t\t} \n\t\t\t//get the priority from the activities \n\t\t\tint maxActPri = 0;\n\t\t\tfor (Event event : wf.getEvents()) {\n\t\t\t\tif (!(event instanceof EventActivity))\tcontinue;\n\n\t\t\t\tActivity tmpAct = getActivity(b, (EventActivity) event);\n\t\t\t\t//maxActPri = updateMaxPriority(tmpAct.getPriority(b), maxActPri);\n\t\t\t}\n\t\t\twf.setPriority(maxActPri);\n\t\t\tmaxPri = updateMaxPriority(wf.getPriority(), maxPri);\n\n\t\t}\n\t\tList<WorkFrame> highestPriorityFrames = new ArrayList<WorkFrame>();\n\t\tfor(WorkFrame wfFrame : activeWorkFrames) {\n\t\t\tif(wfFrame.getPriority() != maxPri) continue;\n\t\t\thighestPriorityFrames.add(wfFrame);\n\t\t}\n\t\t\n\t\tint index = Utils.getHighestPriorityFrameIndex(highestPriorityFrames.size());\n\t\tif (index < 0)\n\t\t\treturn null;\n\t\n\t\treturn highestPriorityFrames.get(index);\n\t}",
"public static String getCdmJsonByMostRecent(String jsonArray, String eligibilityStatus) throws Exception {\n\n\t\tString json = \"{_id:0,\" + jsonArray + \":1}\";\n\t\tString sortValue = \"{lastModifiedDate:-1}\";\n\t\tBson projection = BasicDBObject.parse(json);\n\t\tBson sort = BasicDBObject.parse(sortValue);\n\n\t\tDocument selection = new Document();\n\t\tselection.put(\"automatedCollateralEvaluationResponse.aceDecision\", eligibilityStatus);\n\n\t\tDocument doc = fetchqueryResultLatest(\"ACEResponses\", selection, projection, sort);\n\t\tString cdmJson = doc.toJson().toString();\n\n\t\treturn cdmJson;\n\t}",
"@Override\r\n\tpublic String getNombrePrograma() {\n\t\treturn this.getObjectZulCode();\r\n\t}",
"public void GetBestScore() {\r\n\t\ttry {\r\n\t\t\t// Leemos el nivel seleccionado y luego lo pasamos a integer\r\n\t\t\tif (Menu.dificultad == \"facil\") {\r\n\t\t\t\tbr=new BufferedReader(new FileReader(\"C:\\\\Temp\\\\EasyScore.txt\"));\r\n\t\t\t\tBestScore=Integer.parseInt(br.readLine());\r\n\t\t\t}else if (Menu.dificultad == \"normal\") {\r\n\t\t\t\tbr=new BufferedReader(new FileReader(\"C:\\\\Temp\\\\NormalScore.txt\"));\r\n\t\t\t\tBestScore=Integer.parseInt(br.readLine());\r\n\t\t\t}else if (Menu.dificultad == \"dificil\") {\r\n\t\t\t\tbr=new BufferedReader(new FileReader(\"C:\\\\Temp\\\\HardScore.txt\"));\r\n\t\t\t\tBestScore=Integer.parseInt(br.readLine());\r\n\t\t\t}else if (Menu.dificultad == \"Invertido\") {\r\n\t\t\t\tbr=new BufferedReader(new FileReader(\"C:\\\\Temp\\\\InvertidoScore.txt\"));\r\n\t\t\t\tBestScore=Integer.parseInt(br.readLine());\r\n\t\t\t}\r\n\t\t\t// Cerramos el Buffered Reader\r\n\t\t\tbr.close();\r\n\t\t// Capturamos las distintas exceptions\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"File can't open\");\r\n\t\t} \r\n\t}",
"public void howToGetASubject(String cCode){\n\t\t//CODE HERE\n\t\t\n\t\tfor (RegCourse course:registeredCourses){\n\t\t\tif(course.getCourseCode().equals(cCode)){\n\t\t\t\t\n\t\t\t\tif(this.findAccum(course)+(1-this.findFullAccum(course))<0.8){\n\t\t\t\t\tSystem.out.println(\"You can't get A for this subject\");\n\t\t\t\t}else {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.printf(\"You need %.2f score more to get an A for this subject\\n\",(0.8-this.findAccum(course))*100);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public ProgramSpec getProgramSpec() {\n if (programSpec == null) {\n File programSpecDir = pathsProvider.getProgramSpecDir();\n if (Authenticator.getInstance().isAuthenticated()) {\n List<S3ObjectSummary> needDownload = findObsoleteProgspecFiles();\n if (needDownload.size() > 0) {\n downloadProgSpecFiles(needDownload);\n }\n }\n\n programSpec = new ProgramSpec(filenames -> {\n for (String filename : filenames) {\n File csvFile = new File(programSpecDir, filename);\n if (sandbox.exists(csvFile)) {\n try {\n return sandbox.fileInputStream(csvFile);\n } catch (FileNotFoundException ignored) {\n // ignore -- this shouldn't happen; we just checked for existance.\n }\n }\n }\n return null;\n });\n }\n return programSpec;\n }",
"public CMSEmploymentApplication findEmploymentApplication (String ssn) throws Exception {\n try {\n this.fireWorkInProgressEvent(true);\n return (CMSEmploymentApplication) CMSFormServices.getCurrent().findEmploymentApplication(ssn);\n } catch (DowntimeException ex) {\n LoggingServices.getCurrent().logMsg(getClass().getName(),\"findEmploymentApplication\",\n \"Primary Implementation for CMSFormServices failed, going Off-Line...\",\n \"See Exception\", LoggingServices.MAJOR, ex);\n offLineMode();\n setOffLineMode();\n return (CMSEmploymentApplication) CMSFormServices.getCurrent().findEmploymentApplication(ssn);\n } finally {\n this.fireWorkInProgressEvent(false);\n }\n }",
"public Map<String, Object> getSpecificProgramDetails(String programName) throws ParseException;",
"public String getProgramStatusAsString() {\n return getProgramStatus().name();\n }",
"public String getProgramName()\r\n \t{\r\n \t\treturn m_program.m_csSimpleName;\r\n \t}",
"public static ProgramItemDTO valueOf(PersonalProgramDTO p) {\n return ProgramItemDTO.builder().id(p.getProgramId()).title(p.getProgramName())\n .description(p.getProgramSummary()).type(ProgramType.LEARNING_PATH).cms(ContentSourceType.LMS)\n .dueDate(p.getProgramDueDate() != null ? new DateTime(p.getProgramDueDate()).toDate() : null)\n .firstTopic(\"Ansible\") // Todo find real tag\n .personal(true).build();\n }",
"public List<String> iterateProgramPageList();",
"public void recommended() {\n MainActivity activity = (MainActivity) getActivity();\n ArrayList<Integer> results = new ArrayList<>();\n int highest = 0;\n for (int i = 0; i < activity.getUserLocations().size(); i++) {\n int lid = activity.database.getLocID(1, activity.userLocations.get(i).getProvider());\n ArrayList<LocationMoodObject> locmood = activity.database.getLocMood(lid);\n int result = 0;\n\n for (int j = 0; j < locmood.size(); j++) {\n switch (locmood.get(j).mood) {\n case (1):\n result = result + 1;\n break;\n case (2):\n result = result + 2;\n break;\n case (3):\n result = result + 3;\n break;\n case (4):\n result = result + 4;\n break;\n case (5):\n result = result + 5;\n break;\n }\n }\n if (locmood.size()>0){\n result = result / locmood.size();\n results.add(result);}\n\n }\n\n for (int i = 0; i < results.size(); i++) {\n if (results.get(i) > highest) {\n highest = results.get(i);\n }\n }\n\n recommended = activity.userLocations.get(highest).getProvider();\n }",
"public String getHighestRank() {\n try {\n FileInputStream fis = new FileInputStream(this.databaseName + \".config\");\n\n // Reading in the number of normal records from the .config file starting from offset 104 bytes (where the number for HIGHEST-RANK begins)\n fis.getChannel().position(104);\n byte[] highestRank = new byte[5];\n \n fis.read(highestRank, 0, 5);\n fis.close();\n return new String(highestRank).trim();\n } catch (IOException ex) {\n ex.printStackTrace();\n return \"Error\";\n }\n }",
"private void viewActiveCourseList() {\n boolean detailed = yesNoQuestion(\"Would you like to look at the detailed version? (just names if no)\");\n\n System.out.println(\"The current active courses are:\\n \");\n for (int i = 0; i < activeCourseList.size(); i++) {\n if (detailed) {\n System.out.println((i + 1) + \":\");\n detailedCoursePrint(activeCourseList.get(i));\n } else {\n System.out.println((i + 1) + \": \" + activeCourseList.get(i).getName());\n }\n }\n\n }",
"public void printAndDeleteHighestItem(){\n RankedItem highestItem = new RankedItem();\n\n //find the highest ranked item\n for (RankedItem rankedItem: rankedResults){\n if(rankedItem.getWin() >= highestItem.getWin()){\n highestItem = rankedItem;\n }\n }\n //print the highest ranked item if the item doesn't have all 0 values\n if(highestItem.getWin() != 0 || highestItem.getLoss() != 0 || highestItem.getTie() != 0) {\n resultList.append(highestItem.getItemText() + \"\\t\" +\n highestItem.getWin() + \"\\t\" +\n highestItem.getLoss() + \"\\t\" +\n highestItem.getTie() + \"\\n\");\n }\n //remove the highest ranked item from the list\n rankedResults.remove(highestItem);\n }",
"public LcMain getLcMainByNumber(String number) {\n LcMain lcMain = null;\n LifeCARDProcessor lcProc = LifeCARDProcessor.getInstance(sco, this.em.getEntityManagerFactory());\n try {\n lcMain = lcProc.searchByNumber(number);\n } catch (GenericSEHRException ex) {\n Logger.getLogger(LifeCARDAdmin.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return lcMain;\n }",
"public void iterateAndClickParticularProgram(final String programeName);",
"public boolean isProgramActive(String programId);",
"protected String getHighestCrest(int option, String date) {\n String buffer = null;\n String where = null;\n\n /* Create the query */\n String query = \"select stage, datcrst from crest\";\n\n /* Create the where clause from the desired option. */\n if (option == E19_GAGE_READING_CREST) {\n where = \" where lid = '\" + lid + \"' and hw is null \";\n } else if (option == E19_HIGH_WATERMARKS_CREST) {\n where = \" where lid = '\" + lid + \"' and hw = 'X' \";\n } else if (option == E19_TIME_CREST) {\n where = \" where lid = '\" + lid + \"' and datcrst >= '\" + date + \"'\";\n }\n\n where += \" order by stage desc \";\n\n /* Create the return string and return. */\n ArrayList<Object[]> rs = TextReportDataManager.getInstance()\n .getCrest(query + where);\n\n if ((rs != null) && (rs.size() > 0)) {\n Object[] oa = rs.get(0); // get the first record\n buffer = String.format(\"%s %10s\", oa[0],\n sdf.format((Date) oa[1]));\n }\n\n return buffer;\n }",
"@Query(value = \"select max(sec_no) from section where course_id = ?1\",nativeQuery = true)\n Optional<Integer> currentSecNo(Long courseId);",
"private void showOrLoadApplications() {\n //nocache!!\n GetAppList getAppList = new GetAppList();\n if (plsWait == null && (getAppList.getStatus() == AsyncTask.Status.PENDING || getAppList.getStatus() == AsyncTask.Status.FINISHED)) {\n getAppList.setContext(this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }\n }",
"@ApiModelProperty(value = \"One of the charts will be null\")\n\tpublic ProgramProfitChart getProgramChart() {\n\t\treturn programChart;\n\t}",
"public Object[] getProgList(String AcptNo) throws SQLException, Exception {\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tStringBuffer strQuery = new StringBuffer();\n\t\tArrayList<HashMap<String, String>> rsval = new ArrayList<HashMap<String, String>>();\n\t\tHashMap<String, String>\t\t\t rst\t\t = null;\n//\t\tObject[] returnObjectArray\t= null;\n\t\tConnectionContext connectionContext = new ConnectionResource();\n\n\t\ttry {\n\n\t\t\tconn = connectionContext.getConnection();\n\t\t\tstrQuery.setLength(0);\n\t\t\tstrQuery.append(\" select a.cr_jobusr,a.cr_nightusr,a.cr_seq,a.cr_jobstatus,a.cr_jobstart,\\n\");\n\t\t\tstrQuery.append(\" a.cr_jobend,a.cr_runtime,a.cr_bigo,a.cr_time,b.* \\n\");\n\t\t\tstrQuery.append(\" from cmr2700 a, cmd1700 b \\n\");\n\t\t\tstrQuery.append(\" where cr_acptno=? \\n\");\n\t\t\tstrQuery.append(\" and b.cd_acptdt>=a.cr_time \\n\");\n\t\t\tstrQuery.append(\" and to_char(b.cd_creatdt,'yyyymmdd')<=a.cr_time \\n\");\n\t\t\tstrQuery.append(\" and a.cr_seq=b.cd_seq \\n\");\n\t\t\tstrQuery.append(\" order by cd_seq \\n\");\n\t pstmt = conn.prepareStatement(strQuery.toString());\n\t\t\t//pstmt = new LoggableStatement(conn,strQuery.toString());\n\t\t\tpstmt.setString(1, AcptNo);\n\t //ecamsLogger.error(((LoggableStatement)pstmt).getQueryString());\n\t rs = pstmt.executeQuery();\n\n\t while (rs.next())\n\t {\n\t \trst = new HashMap<String, String>();\n\t \trst.put(\"cr_jobusr\", rs.getString(\"cr_jobusr\"));\n\t \trst.put(\"cr_nightusr\", rs.getString(\"cr_nightusr\"));\n\t \trst.put(\"cr_seq\", rs.getString(\"cr_seq\"));\n\t \trst.put(\"cr_jobstatus\", rs.getString(\"cr_jobstatus\"));\n\t \trst.put(\"cr_jobstart\", rs.getString(\"cr_jobstart\"));\n\t \trst.put(\"cr_jobend\", rs.getString(\"cr_jobend\"));\n\t \trst.put(\"cr_runtime\", rs.getString(\"cr_runtime\"));\n\t \trst.put(\"cr_bigo\", rs.getString(\"cr_bigo\"));\n\t \trst.put(\"cr_time\", rs.getString(\"cr_time\").substring(0,4)+\"-\"+rs.getString(\"cr_time\").substring(4,6)+\"-\"+rs.getString(\"cr_time\").substring(6,8));\n\t \tif(!rs.getString(\"cd_color\").equals(\"\") || rs.getString(\"cd_color\")!=null){\n\t \t\trst.put(\"cr_opusr1\", rs.getString(\"cd_color\"));\n\t \t}else{\n\t \t\trst.put(\"cr_opusr1\", \"\");\n\t \t}\n\t \trst.put(\"cd_jobtime\", rs.getString(\"CD_JOBTIME\")); //작업시간\n\t \trst.put(\"cd_jobstep\", rs.getString(\"CD_JOBSTEP\")); //단계\n\t \trst.put(\"cd_grp\", rs.getString(\"CD_GRP\")); //GRP\n\t \trst.put(\"cd_gubun\", rs.getString(\"CD_GUBUN\")); //대분류\n\t \trst.put(\"cd_check\", rs.getString(\"CD_CHECK\")); //점검사항\n\t\t\t\trsval.add(rst);\n\t \trst = null;\n\t }\n\t\t\trs.close();\n\t\t\tpstmt.close();\n\t\t\tconn.close();\n\t\t\t\n\t\t\trs = null;\n\t\t\tpstmt = null;\n\t\t\tconn = null;\n\n\t\t\treturn rsval.toArray();\n\n\t\t} catch (SQLException sqlexception) {\n\t\t\tsqlexception.printStackTrace();\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() SQLException START ##\");\n\t\t\tecamsLogger.error(\"## Error DESC : \", sqlexception);\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() SQLException END ##\");\n\t\t\tthrow sqlexception;\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() Exception START ##\");\n\t\t\tecamsLogger.error(\"## Error DESC : \", exception);\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() Exception END ##\");\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tif (strQuery != null) \tstrQuery = null;\n\t\t\tif (rsval != null) rsval = null;\n\t\t\tif (rs != null) try{rs.close();}catch (Exception ex){ex.printStackTrace();}\n\t\t\tif (pstmt != null) try{pstmt.close();}catch (Exception ex2){ex2.printStackTrace();}\n\t\t\tif (conn != null){\n\t\t\t\ttry{\n\t\t\t\t\tConnectionResource.release(conn);\n\t\t\t\t}catch(Exception ex3){\n\t\t\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() connection release exception ##\");\n\t\t\t\t\tex3.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public ArrayList<University> findRecommended(String schoolToCompare) {\n\t\tArrayList<University> closeMatch = sfCon.rankUniversity(schoolToCompare);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(closeMatch.get(i).getName());\n\t\t}\n\n\t\treturn closeMatch;\n\t}",
"public static List<Course> getCourseMaxAvrScr1(List<Course> courseList){\n return courseList.\n stream().\n sorted(Comparator.comparing(Course::getAverageScore).\n reversed()).limit(1).collect(Collectors.toList());\n }",
"String getMax_res();",
"private static void updateApplication() throws FileNotFoundException {\n\t\tFile file = new File(\"C:\\\\Users\\\\singh\\\\eclipse-workspace\\\\Loan\\\\application.txt\");\n\t\tScanner scan = new Scanner(file);\n\t\tScanner scanInput = new Scanner(System.in);\n\t\tSystem.out.println(\"Type the name of the person you want to update:\");\n\t\tString personName = scanInput.nextLine();\n\t\tString person = \"\\\"\"+personName+\"\\\"\";\n\t\t\n\t\t\n\n\t\twhile (scan.hasNextLine()) {\n\n\t\t\tString line = scan.nextLine();\n\t\t\tString[] userInfo = line.split(\"\\t\");\n\t\t\tString userInfoString= userInfo[0].toLowerCase();\n\t\t\tint education = Integer.parseInt(userInfo[2]);\n\t\t\tint experience = Integer.parseInt(userInfo[3]);\n\t\t\tint sum = education + experience;\n\t\t\t\n\t\t\tint loan = Integer.parseInt(userInfo[1]);\n\t\t\tint score = 0;\n\t\t\tint[] estimatedProfit = new int[userInfo.length - 4];\n\t\t\tApplicant applicant = new Applicant(userInfo[0], education, experience, estimatedProfit, score, loan);\n\t\t\t\tif(userInfoString.equals(person.toLowerCase())) {\n\t\t\t\t\tApplicant tempApplicant = activeList.find(applicant);\n\t\t\t\t\tint updatedEducation;\n\t\t\t\t\tint updatedExperience;\n\t\t\t\t\tString updatedName;\n\t\t\t\t\tint updatedScore = 0;\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Enter the updated Name:\");\n\t\t\t\t\tupdatedName = scanInput.nextLine();\n\t\t\t\t\tSystem.out.println(\"Enter the updated experience:\");\n\t\t\t\t\tupdatedExperience = scanInput.nextInt();\n\t\t\t\t\tSystem.out.println(\"Enter the updated education:\");\n\t\t\t\t\tupdatedEducation=scanInput.nextInt();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"How many enteries do you have for estimated profit?\");\n\t\t\t\t\tint temp =scanInput.nextInt();\n\t\t\t\t\tint[] updatedEstPro = new int[temp];\n\t\t\t\t\tfor(int i=0;i<temp;i++) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Enter the \"+(i+1)+\" entry of estimated profit\");\n\t\t\t\t\t\tint entry = scanInput.nextInt();\n\t\t\t\t\t\tupdatedEstPro[i]=entry;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (sum < 10) {\n\t\t\t\t\t\tapplicant = new Applicant(updatedName, updatedEducation, updatedExperience, estimatedProfit, score, loan);\n\t\t\t\t\t\trejectedList.add(applicant);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Calculate score\n\t\t\t\t\t\t */\n\t\t\t\t\t\tint tmp = 0;\n\t\t\t\t\t\tfor (int j = 0; j < estimatedProfit.length; j++) {\n\t\t\t\t\t\t\ttmp = estimatedProfit[j] / (j + 1);\n\t\t\t\t\t\t\tupdatedScore = updatedScore + tmp;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\tApplicant updatedApplicant = new Applicant(updatedName, updatedEducation,updatedExperience,updatedEstPro,updatedScore,loan);\n\t\t\t\t\tactiveList.updateKey(updatedApplicant );\n\t\t\t\t \n\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\n\t\t\n\n\t} }",
"public int findLowestExam(int examNum)\n\t{\n\t\tint lowestIndex = 0;\n\t\tif (examNum != 1 && examNum != 2 && examNum != 3 && examNum != 4)\n\t\t\tlowestIndex = -1;\n\t\telse {\n\t\t\tfor (int i = 1; i < numStudents; i++) {\n\t\t\t\tdouble first = students[i].getExams()[examNum - 1];\n\t\t\t\tdouble second = students[lowestIndex].getExams()[examNum - 1];\n\t\t\t\tif (first < second)\n\t\t\t\t\tlowestIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn lowestIndex;\n\t}",
"public String findHighestScorers() {\n ArrayList<String> names = new ArrayList<String>();\n String theirNames = \"\";\n int highest = findHighestScore();\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) == 0) {\n //note that each quiz taker's arraylist of scores is already sorted in descending order post-constructor\n boolean alreadyThere = false;\n for(String name: names) {\n if(name.equals(allQuizTakers.get(i).getName())) {\n alreadyThere = true;\n }\n }\n if (!alreadyThere) {\n theirNames += allQuizTakers.get(i).getName() + \" \";\n names.add(allQuizTakers.get(i).getName());\n }\n }\n }\n return theirNames;\n }",
"@Override\n\tpublic InspectionScheduledApplication findScheduledApplicationForClient(String reInspectionestAct, String estAct,\n\t\t\tLong codApplication) {\n\t\treturn (InspectionScheduledApplication) entityManager.createQuery(\n\t\t\t\t\"select new com.indra.iopen.form.InspectionScheduledApplication(i.expediente.numExp,t.descTipo,mun.nomMunic\"\n\t\t\t\t\t\t+ \",loc.nomLocal,cal.nomCalle,i.housePlot,i.mobileNumber,i.codApplication,a.fAct,i.inspectionScheduledBy,i.inspectionScheduledDate,i.inspectionScheduled,i.coRejectReason,i.comments) \"\n\t\t\t\t\t\t+ \" from IopenApplication i,Tipo t,Actividade a, Callejero cal , Municipio mun , Localidade loc \"\n\t\t\t\t\t\t+ \" where cal.codCalle=i.street and mun.codMunic=i.district and loc.codLocal=i.village and t.tipo=i.applicationType\"\n\t\t\t\t\t\t+ \" and i.expediente.numExp=a.id.numExp\" + \" and i.codApplication = :codApplication \"\n\t\t\t\t\t\t+ \" and a.id.numAct = (Select MAX(a1.id.numAct) from Actividade a1 where a1.id.numExp=a.id.numExp) \"\n\t\t\t\t\t\t// + \" and (a.estAct = :estAct or a.estAct =\n\t\t\t\t\t\t// :reInspectionestAct) \"\n\t\t\t\t\t\t+ \" order by a.fAct asc \")\n\t\t\t\t.setParameter(\"codApplication\", codApplication)\n\t\t\t\t/*\n\t\t\t\t * .setParameter(\"estAct\", estAct)\n\t\t\t\t * .setParameter(\"reInspectionestAct\", reInspectionestAct)\n\t\t\t\t */.getSingleResult();\n\t}",
"public int findHighestScore() {\n int highest = 0;\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) > 0) {\n highest = (int) allQuizTakers.get(i).getScore(0);\n }\n\n }\n return highest;\n }",
"@RequestMapping(value = \"/staff/programlist\")\n\tpublic ModelAndView listPrograms(@RequestParam(required = false) Integer page, @RequestParam(required = false) Integer pageSize, HttpSession session) {\n\t\tif (page == null) {\n\t\t\tpage = 0;\n\t\t}\n\t\t\n\t\tPagedListHolder<Program> resultList = (PagedListHolder<Program>) session.getAttribute(\"StaffController_programList\");\n\t\tif (resultList == null) {\n\t\t\tresultList = new PagedListHolder<Program>(programService.getAllPrograms());\n\t\t\tsession.setAttribute(\"StaffController_programList\", resultList);\n\t\t\tif (pageSize == null) {\n\t\t\t\tpageSize = DEFAULT_PAGE_SIZE;\n\t\t\t}\n\t\t}\n\t\tif (pageSize != null) {\n\t\t\tresultList.setPageSize(pageSize);\n\t\t}\n\t\tresultList.setPage(page);\n\t\treturn new ModelAndView(\"staff/programlist\", \"resultList\", resultList);\n\t}",
"private int getPRFurthestUse() {\n int max = -1;\n int maxPR = -1;\n for (int i = 0; i < numPhysRegs - 1; i++) {\n if (PRNU[i] > max) {\n max = PRNU[i];\n maxPR = i;\n }\n }\n return maxPR; // no free physical register\n }",
"public String getProgramId() {\n return pathsProvider.getProgramId();\n }",
"public String generarEstadisticasPorFacultad(String cualFacultad) {\n \n int contadorAlta = 0;\n String pAltaEmpl = \"\";\n for (int i = 0; i < EmpleadosPrioridadAlta.size(); i++) {\n if(EmpleadosPrioridadAlta.get(i).getFacultad().equalsIgnoreCase(cualFacultad)){\n contadorAlta += 1;\n pAltaEmpl += \"nombre: \" + EmpleadosPrioridadAlta.get(i).getNombre() + \"\\n\" +\n \" Identificacion: \"+ EmpleadosPrioridadAlta.get(i).getIdentificacion() + \"\\n\";\n \n }\n }\n String pAlta = \"Se encuentran \" + contadorAlta + \" Empleados en condicion Alta\\n\";\n if(EmpleadosPrioridadAlta.isEmpty() == false){\n pAlta += \"los cuales son:\\n\" + pAltaEmpl;\n }\n \n int contadorMAlta = 0;\n String pMAltaEmpl = \"\";\n for (int i = 0; i < EmpleadosPrioridadMediaAlta.size(); i++) {\n if(EmpleadosPrioridadMediaAlta.get(i).getFacultad().equalsIgnoreCase(cualFacultad)){\n contadorMAlta += 1;\n pMAltaEmpl += \"nombre: \" + EmpleadosPrioridadMediaAlta.get(i).getNombre() + \"\\n\" +\n \" Identificacion: \"+ EmpleadosPrioridadMediaAlta.get(i).getIdentificacion() + \"\\n\";\n \n }\n }\n String pMAlta = \"Se encuentran \" + contadorMAlta + \" Empleados en condicion Media Alta\\n\";\n if(EmpleadosPrioridadMediaAlta.isEmpty() == false){\n pMAlta += \"los cuales son:\\n\" + pMAltaEmpl;\n }\n \n int contadorMedia = 0;\n String pMediaEmpl = \"\";\n for (int i = 0; i < EmpleadosPrioridadMedia.size(); i++) {\n if(EmpleadosPrioridadMedia.get(i).getFacultad().equalsIgnoreCase(cualFacultad)){\n contadorMedia += 1;\n pMediaEmpl += \"nombre: \" + EmpleadosPrioridadMedia.get(i).getNombre() + \"\\n\" +\n \" Identificacion: \"+ EmpleadosPrioridadMedia.get(i).getIdentificacion() + \"\\n\";\n \n }\n }\n String pMedia = \"Se encuentran \" + contadorMedia + \" Empleados en condicion Media\\n\";\n if(EmpleadosPrioridadMedia.isEmpty() == false){\n pMedia += \"los cuales son:\\n\" + pMediaEmpl;\n }\n \n int contadorBaja = 0;\n String pBajaEmpl = \"\";\n for (int i = 0; i < EmpleadosPrioridadBaja.size(); i++) {\n if(EmpleadosPrioridadBaja.get(i).getFacultad().equalsIgnoreCase(cualFacultad)){\n contadorBaja += 1;\n pBajaEmpl += \"nombre: \" + EmpleadosPrioridadBaja.get(i).getNombre() + \"\\n\" +\n \" Identificacion: \"+ EmpleadosPrioridadBaja.get(i).getIdentificacion() + \"\\n\";\n }\n }\n String pBaja = \"Se encuentran \" + contadorBaja + \" Empleados en condicion Baja\\n\" ;\n if(EmpleadosPrioridadBaja.isEmpty() == false){\n pBaja += \"los cuales son:\\n\" + pBajaEmpl;\n }\n \n return \"En la facultad \" + cualFacultad + \" de la universidad del valle: \\n\"\n + pAlta + pMAlta + pMedia + pBaja;\n }",
"public double getHighestGrade(){\n double highestGrade = 0;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()> highestGrade)\n highestGrade = students.get(i).getGrades();\n }// end for\n return highestGrade;\n }",
"@Override\n\tpublic List<TrainingProgramDTO> getTrainingProgramList() {\n\t\tString query = \"SELECT t FROM TrainingProgramDTO t\";\n\t\tTypedQuery<TrainingProgramDTO> programQuery = eManager.createQuery(\n\t\t\t\tquery, TrainingProgramDTO.class);\n\t\tList<TrainingProgramDTO> programList = programQuery.getResultList();\n\t\treturn programList;\n\t}",
"private int removeBestProfessor() {\n if (professors.size() == 1){\n return 2; // MEAN LOSS\n } else {\n if (professors.get(0).getName().equals(DefaultValues.NAME_FIRST_PROF)){\n professors.remove(1);\n } else {\n professors.remove(0);\n }\n return 1;\n }\n }",
"public double getHighestConfidence() {\n\t\tdouble best = Double.MIN_VALUE;\n\n\t\tfor (ResultConfidencePairing rcp : m_results) {\n\t\t\tif (rcp.getConfidence() > best)\n\t\t\t\tbest = rcp.getConfidence();\n\t\t}\n\t\treturn best;\n\t}",
"private void displayStudentByGrade() {\n\n studentDatabase.sortArrayList();\n\n for (Student student : studentDatabase) {\n\n stdOut.println(student.toStringsort() + \"\\n\");\n }\n }",
"public JSONArray getCandidatesForTopChoice(JSONArray applicants)\n\t{\n\t\ttry {\n\t\t\t// Nach Gesamtreputation sortieren\n\t\t\tQuickSorter.sort(applicants);\n\t\t\t// Es wird nur das obere Quartil an Daten betrachtet\n\t\t\tJSONArray arrayWithRankings = this.calculateRankings(this.getUpperQuartile(applicants));\n\t\t\treturn getTopCandidatesBasedOnRankings(arrayWithRankings);\n\t\t} catch (JSONException je) {\n\t\t\tje.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public static void printOldestPeople(){\n // Get the oldest people\n ArrayList<Person> oldests = query.getOldest();\n if (oldests.size() == 1) {\n System.out.println(\"The oldest person in the database is:\");\n } else {\n System.out.println(\"The oldest people in the database are:\");\n }\n for (Person old : oldests) {\n System.out.println(old);\n }\n }",
"public Fitness worstScore() {\r\n Map.Entry<Fitness, List<Element>> worstEntry\r\n = elementsByFitness.firstEntry();\r\n if (worstEntry == null) {\r\n return null;\r\n }\r\n Fitness result = worstEntry.getKey();\r\n\r\n return result;\r\n }",
"int findMaxProfitRec(Job arr[], int n)\n {\n // Base case\n if (n == 1) return arr[n-1].profit;\n\n // Find profit when current job is inclueded\n int inclProf = arr[n-1].profit;\n int i = latestNonConflict(arr, n);\n if (i != -1)\n inclProf += findMaxProfitRec(arr, i+1);\n\n // Find profit when current job is excluded\n int exclProf = findMaxProfitRec(arr, n-1);\n\n return max(inclProf, exclProf);\n }",
"private static int getMaxNum(){\r\n \r\n int maxNum = 0;\r\n \r\n // declare resultSet\r\n ResultSet rs = null;\r\n \r\n // declare prepared statement\r\n PreparedStatement preparedStatement = null;\r\n \r\n // declare connection\r\n Connection conn = null;\r\n try {\r\n // get connection\r\n conn = DBUtils.getConnection();\r\n\r\n // set prepared statement\r\n preparedStatement = conn\r\n .prepareStatement(\"SELECT MAX(SUBSTRING(StudentId, 3)) from phdstudent;\");\r\n \r\n rs = preparedStatement.executeQuery();\r\n \r\n //iterate and create the StudentInfo objects\r\n if (rs.next()) {\r\n \r\n maxNum = rs.getInt(1);\r\n\r\n }\r\n }catch(Exception ex){\r\n ex.printStackTrace();\r\n }\r\n finally {\r\n DBUtils.closeResource(conn);\r\n DBUtils.closeResource(preparedStatement);\r\n DBUtils.closeResource(rs);\r\n } \r\n \r\n return maxNum; \r\n }",
"public String getBestMovie() {\n\t\tdouble highestRating = 0;\n\t\tString bestMovie = \"\";\n\t\tfor(Movie movie : this.movieList) {\n\t\t\tif(movie.getRating() > highestRating) {\n\t\t\t\thighestRating = movie.getRating();\n\t\t\t\tbestMovie = movie.getName();\n\t\t\t}\n\t\t}\n\t\treturn bestMovie;\n\t}",
"public static void main_getApplicant(){\n System.out.println(\"Enter Applicant Name: \");\n String name = input.nextLine();\n try {\n Applicant temp = table.getApplicant(name);\n System.out.println(temp.toString());\n System.out.println();\n } catch (ApplicantNotFoundException ex){\n System.out.println(\"Applicant not found.\");\n main_menu();\n }\n }",
"public String recomendarProgramasPYP(){\n \n String text = \"\";\n \n for (int i = 0; i < EmpleadosPrioridadAlta.size(); i++) {\n //mayores de 70 años, con enfermedades preexistentes, pueden ser hombres\n text += \"Empleado: \"+EmpleadosPrioridadAlta.get(i).getNombre()+\"\\n\";\n text += \"PROGRAMAS DE PREVENCION Y PROMOCION RECOMENDADOS:\\n\"+\"-\"+programasPYP[1]+\"\\n\"+\"-\"+programasPYP[5]+\n \"\\n\"+\"-\"+programasPYP[6]+\"\\n--------------------------\\n\"; \n }\n \n for (int i = 0; i < EmpleadosPrioridadMediaAlta.size(); i++) {\n //entre 40 y 60, enfermedades preexistentes, pueden ser hombres.\n text += \"Empleado: \"+EmpleadosPrioridadMediaAlta.get(i).getNombre()+\"\\n\";\n \n if(EmpleadosPrioridadMediaAlta.get(i).getSexo().equals(\"hombre\")){\n text += \"PROGRAMAS DE PREVENCION Y PROMOCION RECOMENDADOS:\\n\"+\"-\"+programasPYP[1]+\n \"\\n\"+\"-\"+programasPYP[5]+\"\\n\"+\"-\"+programasPYP[6]+\"\\n--------------------------\\n\";\n }else{\n text += \"PROGRAMAS DE PREVENCION Y PROMOCION RECOMENDADOS:\\n\"+\"-\"+programasPYP[0]+\"\\n\"+\"-\"+programasPYP[1]+\n \"\\n\"+\"-\"+programasPYP[4]+\"\\n\"+\"-\"+programasPYP[5]+\"\\n\"+\"-\"+programasPYP[6]+\"\\n--------------------------\\n\";\n \n } \n }\n \n for (int i = 0; i < EmpleadosPrioridadMedia.size(); i++) {\n //personas con enfermedades preexistente entr 20 y 40\n text += \"Empleado: \"+EmpleadosPrioridadMedia.get(i).getNombre()+\"\\n\";\n if(EmpleadosPrioridadMedia.get(i).getSexo().equals(\"hombre\")){\n text += \"PROGRAMAS DE PREVENCION Y PROMOCION RECOMENDADOS:\\n\"+\"-\"+programasPYP[1]+\"\\n\"+\"-\"+programasPYP[3]+\"\\n\"+\"-\"+programasPYP[5]+\n \"\\n\"+\"-\"+programasPYP[6]+\"\\n--------------------------\\n\"; \n }else{\n text += \"PROGRAMAS DE PREVENCION Y PROMOCION RECOMENDADOS:\\n\"+\"-\"+programasPYP[0]+\"\\n\"+\"-\"+programasPYP[1]+\"\\n\"+\"-\"+programasPYP[2]+\n \"\\n\"+\"-\"+programasPYP[3]+\"\\n\"+\"-\"+programasPYP[5]+\"\\n\"+\"-\"+programasPYP[6]+\"\\n--------------------------\\n\"; \n }\n }\n \n for (int i = 0; i < EmpleadosPrioridadBaja.size(); i++) {\n //hombres o mujeres sanos.\n text += \"Empleado: \"+EmpleadosPrioridadBaja.get(i).getNombre()+\"\\n\";\n \n if(EmpleadosPrioridadBaja.get(i).getSexo().equals(\"hombre\")){\n text += \"PROGRAMAS DE PREVENCION Y PROMOCION RECOMENDADOS:\"+\"\\n\"+\"-\"+programasPYP[1]+\n \"\\n\"+\"-\"+programasPYP[3]+\"\\n\"+\"-\"+programasPYP[5]+\"\\n\"+\"-\"+programasPYP[6]+\"\\n--------------------------\\n\";\n }else{\n text += \"PROGRAMAS DE PREVENCION Y PROMOCION RECOMENDADOS:\"+\"\\n\"+\"-\"+programasPYP[0]+\"\\n\"+\"-\"+programasPYP[1]+\n \"\\n\"+\"-\"+programasPYP[2]+\"\\n\"+\"-\"+programasPYP[3]+\"\\n\"+\"-\"+programasPYP[5]+\"\\n\"+\"-\"+programasPYP[6]+\"\\n--------------------------\\n\";\n \n }\n }\n return text;\n }",
"public Region findHighestEarningRegion() {\n Region highest = regionList[0];\n for (int i = 1; i < numRegions; i++) {\n if (highest.calcEarnings() <= regionList[i].calcEarnings())\n highest = regionList[i];\n }\n return highest;\n }",
"public Socio getSocioInfo() {\n\n ArrayList<Socio> listaSocio = new ArrayList<Socio>();\n // iniciando a conexao\n connection = BancoDados.getInstance().getConnection();\n System.out.println(\"conectado e preparando listagem para pegar Socio\");\n Statement stmt = null;\n\n try {\n stmt = connection.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM socio\");\n\n // Incluindo Socios na listaSocios que vai ser retornada\n while (rs.next()) {\n Socio socio = new Socio(rs.getString(\"nomeSocio\"), rs.getString(\"matSocio\"), rs.getString(\"blocoSocio\"), rs.getString(\"funcaoSocio\"),rs.getInt(\"idSocio\"));\n listaSocio.add(socio);\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n \n } finally {\n // este bloco finally sempre executa na instrução try para\n // fechar a conexão a cada conexão aberta\n try {\n stmt.close();\n connection.close();\n } catch (SQLException e) {\n System.out.println(\"Erro ao desconectar\" + e.getMessage());\n }\n }\n\n Socio socioMax = new Socio();\n\n socioMax = listaSocio.get(0);\n\n //Se houver mais de um socio na lista vai procurar o de maior ID\n if(listaSocio.size()-1 > 0){\n\n for(int i=0; i<= listaSocio.size()-1; i++){\n\n Socio socio = new Socio();\n socio = listaSocio.get(i);\n\n if(socio.getId()>= socioMax.getId() ){\n socioMax = socio;\n }\n\n }\n\n }\n //Se não pega o primeiro\n else {\n socioMax = listaSocio.get(0);\n\n }\n\n System.out.println(socioMax.getId());\n\n //Retorna o socio de maior ID, logo o ultimo inserido.\n return socioMax;\n }",
"private static void displayAvailableCourses(Student currentStudent,ArrayList<Course> courses){\n\t\tCollections.sort(courses, new courseCompare());\n\t\tArrayList<CourseOffering> offeringNum = new ArrayList<CourseOffering>();\n\t\tint i = 0;\n\n\t\t// Loop through all the courses and print them\n\t\tfor(Course course : courses) {\n\t\t\tSystem.out.println(course.toString());\n\n\t\t\t// If a course has available offerings display them\n\t\t\tfor(CourseOffering offering : course.getCourseOfferings()) {\n\t\t\t\t// if the current student is not enrolled, then display the offering\n\t\t\t\tif(!offering.isStudentEnrolled(currentStudent) && !offering.isStudentWaitlisted(currentStudent)) {\n\t\t\t\t\tSystem.out.print(\"\\t\"+(i+1) + \": \");\n\t\t\t\t\t// Display if they are enrolling vs. adding to waitlist\n\t\t\t\t\tif(offering.getEnrolledStudents().size() < offering.getMaxStudents())\n\t\t\t\t\t\tSystem.out.print(\"Add->\");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\"Waitlist->\");\n\t\t\t\t\tSystem.out.println(offering.toString());\n\t\t\t\t\tofferingNum.add(i, offering);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check to see if there are no available courses\n\t\tif(offeringNum.size() == 0) {\n\t\t\tSystem.out.println(\"No available courses.\");\n\t\t\treturn; \n\t\t}\n\n\t\t// Prompt the user for their selection\n\t\tSystem.out.println(\"Enter the number of the course offering you would like to add\");\n\t\tSystem.out.print(\"or enter zero to return to main menu: \");\n\t\tString selection = input.nextLine();\n\t\ttry{\n\t\t\tint optionNum = Integer.parseInt(selection);\n\t\t\tif(optionNum > 0 && optionNum <= i){\n\t\t\t\tofferingNum.get(optionNum-1).enrollStudent(currentStudent);\n\t\t\t} \n\t\t}\n\t\tcatch (NumberFormatException e) {\n\t\t\tSystem.out.println(\"Invalid selection. Returning to main menu.\");\n\t\t}\n\t}",
"public int getProgID() throws Exception\n\t{\n\t\tint id=0;\n\t\ttry(Connection connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/usersdb?useTimezone=true&serverTimezone=UTC\", \"root\", \"123\");\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(\"SELECT idprogram FROM usersdb.telephone_numbers WHERE clients_username = ?;\"))\n\t\t{\n\t\t\tpreparedStatement.setString(1,username);\n\t\t\tResultSet result = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(result.next()) \n\t\t\t{\n\t\t\t\tid = result.getInt(\"idprogram\");\n\t\t\t\tprogid = result.getInt(\"idprogram\");\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn id;\n\t}",
"private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed\r\n String selectedHW = Homeworks.get(jComboBox4.getSelectedIndex());\r\n int maxScore = 0;\r\n String studentName, attempt_dt;\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd-M-yyyy hh12:mm:ss am\");\r\n try\r\n {\r\n query = \"select max(atmpt_score) as maximum from attempt \"\r\n + \"where assignment_id = '\" + selectedHW + \"'\";\r\n rs = stmt.executeQuery(query);\r\n while (rs.next()) {\r\n maxScore = rs.getInt(\"maximum\");\r\n jLabel24.setText(String.valueOf(maxScore));\r\n }\r\n \r\n \r\n //For finding the list of students who scored the maximum on first attempt\r\n query = \"select a1.student_id, db.user_name, a1.assignment_id, a1.atmpt_dt, a1.atmpt_score \" +\r\n \" from attempt a1, dbuser db where \" +\r\n \" a1.student_id = db.user_id \" +\r\n \" and a1.assignment_id = '\" + selectedHW + \"'\" +\r\n \" and a1.atmpt_dt = \" +\r\n \" (select min(atmpt_dt) from attempt a2 \" +\r\n \" where a1.student_id = a2.student_id \" +\r\n \" and a1.assignment_id = a2.assignment_id \" +\r\n \" group by student_id, assignment_id) \" +\r\n \" and a1.atmpt_score = \" + maxScore;\r\n \r\n rs = stmt.executeQuery(query);\r\n DefaultListModel studentList = new DefaultListModel();\r\n while (rs.next()) {\r\n studentName = rs.getString(\"user_name\"); \r\n attempt_dt = rs.getTimestamp(\"atmpt_dt\").toString(); \r\n studentList.addElement(studentName + \" --> Attempt date:\" + attempt_dt);\r\n }\r\n jList2.setModel(studentList); \r\n }\r\n catch (Exception oops) {\r\n System.out.println(\"Prof_Report.java:PopulateComboBoxData() \" + oops);\r\n }\r\n }",
"public ProgramScheduled getProgramScheduleById(int scheduleId);",
"private Object keyOfBestUnlabeledInstance(Classifier[] committee){\n\t\tdouble worstAgreement=2.0;\n\t\tObject queryKey=null;\n\t\tfor(Iterator<Double> i=unlabeled.keySet().iterator();i.hasNext();){\n\t\t\tObject key=i.next();\n\t\t\tInstance instance=unlabeled.get(key);\n\t\t\tTObjectDoubleHashMap counts=new TObjectDoubleHashMap();\n\t\t\tdouble biggestCount=0;\n\t\t\tfor(int j=0;j<committee.length;j++){\n\t\t\t\tString best=committee[j].classification(instance).bestClassName();\n\t\t\t\tdouble c=counts.get(best)+1;\n\t\t\t\tcounts.put(best,c);\n\t\t\t\tif(c>biggestCount)\n\t\t\t\t\tbiggestCount=c;\n\t\t\t}\n\t\t\tdouble agreement=biggestCount/committee.length;\n\t\t\tlog.info(\"instance: \"+instance+\" committee: \"+counts+\" agreement: \"+\n\t\t\t\t\tagreement);\n\t\t\tif(agreement<worstAgreement){\n\t\t\t\tworstAgreement=agreement;\n\t\t\t\tqueryKey=key;\n\t\t\t\tlog.debug(\" ==> best\");\n\t\t\t}\n\t\t}\n\t\tlog.info(\"queryInstance is: \"+unlabeled.get(queryKey));\n\t\treturn queryKey;\n\t}",
"public void printBestIndividual() {\n\t\tSystem.out.println(\"Finalizing\");\n\t\tQuoridorBoard board;\n\t\tfor (int t = 0; t < (Math.log(individuals.length) / Math.log(2)); t++) {\n\t\t\tfor (int i = 0; i < individuals.length - 1; i++) {\n\t\t\t\tif (individuals[i].fitness == t) {\n\t\t\t\t\tfor (int j = i + 1; j < individuals.length; j++) {\n\t\t\t\t\t\tif (individuals[j].fitness == t) {\n\t\t\t\t\t\t\tboard = new QuoridorBoard(individuals[i],\n\t\t\t\t\t\t\t\t\tindividuals[j]);\n\t\t\t\t\t\t\tboard.play();\n\t\t\t\t\t\t\tif (board.getWinner() != null) {\n\t\t\t\t\t\t\t\tAI winner = board.getWinner();\n\t\t\t\t\t\t\t\tAI loser = board.getLoser();\n\t\t\t\t\t\t\t\twinner.fitness++;\n\t\t\t\t\t\t\t\tindividuals[i] = winner;\n\t\t\t\t\t\t\t\tindividuals[j] = loser;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tFileWriter fstream = new FileWriter(\"evoOutput.txt\");\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tint max1 = 0;\n\t\t\tint max2 = 0;\n\t\t\tAI best1 = new AI();\n\t\t\tAI best2 = new AI();\n\t\t\tfor (AI ai : individuals) {\n\t\t\t\tif (ai.fitness > max1) {\n\t\t\t\t\tmax1 = ai.fitness;\n\t\t\t\t\tbest1 = ai.clone();\n\t\t\t\t} else if (ai.fitness > max2) {\n\t\t\t\t\tmax2 = ai.fitness;\n\t\t\t\t\tbest2 = ai.clone();\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.write(best1.outputString() + \"\\r\\n\" + best2.outputString()\n\t\t\t\t\t+ \"\\r\\n\");\n\t\t\tout.close();\n\t\t\tSystem.out.println(\"Done\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t}",
"public static SchoolCourse schoolCourseSelection() {\n Scanner input = new Scanner(System.in);\n printListOfSchoolCourses();\n int choice = validateInputArrayList(input.nextInt(), listOfSchoolCourses);\n return listOfSchoolCourses.get(choice - 1);\n\n }",
"public ArrayList<String> getScore(){\n\t\tArrayList<String> ans = new ArrayList<>();\n\t\tdouble totScore = 0; //初始化总分\n\t\tans.add(\"\\t\"+WordCountTester.studentId); //插入学号\n\n\t\t//File fExe = new File(baseDir+\"/wc.exe\");\n\t\tFile fExe = new File(baseDir+\"/wc.jar\");\n//\t\tSystem.out.println(studentId+\" exe filePath: \"+fExe.getAbsolutePath());\n\n\t\t//判断是否存在可运行程序.exe\n\t\tif (!fExe.exists()){\n\t\t\tans.add(\"0\");\n\t\t\tans.add(\"Lack exe\");\n\t\t\tans.add(\"0\");\n\t\t\tans.add(\"Lack exe\");\n\t\t\tans.add(\"0\");\n\t\t\tans.add(\"Lack exe\");\n\t\t\tans.add(\"0\");\n\t\t\tans.add(\"Lack exe\");\n\t\t\tans.add(\"0\");\n\t\t\tans.add(\"Lack exe\");\n\t\t\tans.add(\"0\");\n\t\t\tans.add(\"Lack exe\");\n\t\t\tans.add(\"0\");\n\t\t\tans.add(\"Lack exe\");\n\t\t\tans.add(\"0\");\n\t\t\tSystem.out.println(studentId+ \" Lacks exe file!\");\n\t\t\treturn ans; //\"No exe file\"\n\t\t}\n\n\t\tfor (int i = 0, j = 0; i < argumentScoreMaps.length; ++i){ //对于每个参数进行测试 //String argument: argumentScoreMaps\n\t\t\tint runStatus = executeTest(argumentScoreMaps[i], stdResults[i], i+1, this.timeLimit); //5\n\t\t\tif (runStatus == -1) {\n\t\t\t\tans.add(\"0\");\n\t\t\t\tans.add(\"TLE\");\n\t\t\t}else if (runStatus == -3) {\n\t\t\t\tans.add(\"0\");\n\t\t\t\tans.add(\"Other Error\");\n\t\t\t}else if (runStatus == -5) {\n\t\t\t\tans.add(\"0\");\n\t\t\t\tans.add(\"No result.txt\");\n\t\t\t}else if (runStatus == -6) {\n\t\t\t\tans.add(\"0\");\n\t\t\t\tans.add(\"Failed\");\n\t\t\t}else if (runStatus == 0) {\n\t\t\t\tans.add(String.valueOf(scores.get(j)));\n\t\t\t\tans.add(String.valueOf(times.get(j)));\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//映射总分\n\t\tfor (int i = 0; i < times.size(); ++i) {\n\t\t\tif (i < 5) {\n\t\t\t\ttotScore = totScore + 8*(scores.get(i)/20.0);\n\t\t\t}else if (i == 5) {\n\t\t\t\ttotScore = totScore + (scores.get(i)/2.0);\n\t\t\t}else if (i == 6) {\n\t\t\t\ttotScore = totScore + (scores.get(i)/2.0);\n\t\t\t}\n\t\t}\n\t\tans.add(String.valueOf(totScore));\n\t\tSystem.out.println(\" 映射总分:\" + totScore);\n\t\t\n\t\treturn ans;\n\t}",
"public AppDescriptor getSelected()\n {\n DefaultMutableTreeNode nodeSelected = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();\n AppDescriptor appDesc = null;\n \n if( (nodeSelected != null) && (nodeSelected.getUserObject() instanceof AppDescriptor) )\n appDesc = (AppDescriptor) nodeSelected.getUserObject();\n \n return appDesc;\n }"
] | [
"0.55650896",
"0.53705513",
"0.5249872",
"0.51837754",
"0.50480855",
"0.50479794",
"0.50149596",
"0.50149465",
"0.5011698",
"0.49644732",
"0.496308",
"0.49129286",
"0.48904365",
"0.48825964",
"0.48484498",
"0.4798866",
"0.47907057",
"0.47799218",
"0.47540307",
"0.47451025",
"0.4724158",
"0.4694796",
"0.4687056",
"0.46724823",
"0.46606445",
"0.46526617",
"0.4651829",
"0.46225524",
"0.46150064",
"0.45962286",
"0.459137",
"0.45541152",
"0.45523575",
"0.45436883",
"0.45422733",
"0.45335528",
"0.45322025",
"0.45018435",
"0.449867",
"0.449791",
"0.44975138",
"0.4492131",
"0.44918737",
"0.44738734",
"0.4472947",
"0.44709563",
"0.44687223",
"0.4455196",
"0.44509435",
"0.444826",
"0.44462308",
"0.444192",
"0.44391268",
"0.44354948",
"0.44340077",
"0.4429043",
"0.44164935",
"0.44159633",
"0.4410945",
"0.44081068",
"0.43967307",
"0.4395796",
"0.4392863",
"0.43830496",
"0.4381088",
"0.43785024",
"0.43776232",
"0.43763715",
"0.4374403",
"0.43671063",
"0.43639025",
"0.43628412",
"0.43617788",
"0.4361392",
"0.43591458",
"0.4358831",
"0.43546528",
"0.43435964",
"0.43429872",
"0.43402782",
"0.4338346",
"0.43351042",
"0.4335003",
"0.43341303",
"0.43296587",
"0.43284273",
"0.43213108",
"0.43189493",
"0.43162802",
"0.43076223",
"0.4305301",
"0.42985684",
"0.42919657",
"0.42879528",
"0.42864993",
"0.42782533",
"0.42755696",
"0.4275083",
"0.42739496",
"0.42722803"
] | 0.5851343 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.valits, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] | 0.0 | -1 |
This launches the activity to record keypresses for a new test. | public void recordSteps(View v) {
Intent intent = new Intent(this, RecordingActivity.class);
int position = (Integer) v.getTag();
intent.putExtra("Test value", testList);
intent.putExtra("int value", position);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void captureKeyListener() {\n // retrive the edittext component\n mEdit = (EditText) findViewById(R.id.task_input);\n \n // add a keylistener to keep track user input\n mEdit.setOnKeyListener(new OnKeyListener(){\n public boolean onKey(View v, int keyCode, KeyEvent event) { \n if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) \n {\n task = mEdit.getText().toString();\n status = 0;\n onClick_AddRecord(v, task, status);\n mEdit.setText(\"\");\n return true;\n }\n return false;\n }\n });\n }",
"public void run() {\n\t\t\t\t\t\tString monkeyCmd = \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tmonkeyCmd = \"adb -s \" + deviceId + \" \" + textAreaCmd.getText().toString().trim().substring(3);\n\t\t\t\t\t\tSystem.out.println(monkeyCmd);\n\t\t\t\t\t\t//2.sent command to device and return touch event.\n\t\t\t\t\t\tcmd.makeDirectory(\"report\");\n\t\t\t\t\t\tString filename = \"MONKEY_\" + systime + \".txt\";\n\t\t\t\t\t\tString filepath = cmd.getCurrentDirectory() + \"\\\\report\\\\\" + filename; \n\t\t\t\t\t\tcmd.execCommandAndSave(monkeyCmd, filepath);\n\t\t\t\t\t}",
"@Override\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_HOME){\n\t\t\t\n\t\t\treturn true;\n\t\t} else if (keyCode == KeyEvent.KEYCODE_MENU){\n\t\t\t\n\t\t\treturn true;\n\t\t} else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP){\n\t\t\tIntent intent = new Intent();\n\t\t\tComponentName comp = new ComponentName(MMIRecordTest.this, MMIRecordTest.class);\n\t\t\tintent.setComponent(comp);\n\n\t\t\tstartActivity(intent);\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t} else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN){\n\t\t\tif((mCount == 0) && isFirstClick){\n\t\t\t\tisFirstClick = false;\n\t\t\t\tstartRecord();\n\t\t\t} else if((mCount > 0) && !isFirstClick) {\n\t\t\t\tmEditor.putInt(MMIRecordTest.this.getString(R.string.headset_record), Test_launcherActivity.PASS);\n\t\t\t\tmEditor.commit();\n\t\t\t\tfinish();\n\t\t\t}\t\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn super.onKeyDown(keyCode, event);\n\t}",
"public void goTestActivity()\n\t {\n\t }",
"private void RunPinTest()\n {\n Log.d(\"IRON-HID\", \"Start AutoTest\");\n mStopTest = false;\n Runnable runnable = new Runnable()\n {\n @Override\n public void run()\n {\n for (int i = 0 ; i < 10000 ; i ++)\n {\n String data = String.format(\"%04d\", i);\n SendCommandOrKeys(VIEW_ID_KEY, data);\n SendCommandOrKeys(VIEW_ID_KEY, \"[KEY_ENTER]\");\n if (mStopTest == true)\n {\n return ;\n }\n\n try\n {\n Thread.sleep(10);\n }\n catch(Exception e)\n {\n\n }\n }\n\n AddMsgToKeyView(VIEW_ID_KEY, \"remote> auto PIN test is ended\\n\");\n }\n };;\n\n //new Handler().post(runnable);\n new Thread(runnable).start();\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t Instrumentation inst = new Instrumentation();\n\t\t\t\t\t\t Log.d(\"lly\", \"press Input key\");\n\t\t\t\t\t\t inst.sendKeyDownUpSync( tEvent1.getKeyCode());\n\t\t\t\t\t\t \n\t\t\t\t\t\t}catch(Exception e ){\n\t\t\t\t\t\t Log.e(\"TAG\",\"Exception when sendKeyDownUpSync : \" + e.toString() );\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"private void setupActions(MediatorListener mediator) {\n\n\t\tProperties hotKeysProperties = null;\n\t\tString fileName = \"hotkeys.properties\";\n\t\ttry {\n\t\t\thotKeysProperties = readPropertiesFromClassPath(fileName);\n\t\t} catch (Exception e) {\n\t\t\thotKeysProperties = new Properties();\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.BaselineMode\", \"B\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.Attending\", \"A\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.Independent\", \"1\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.Verbal\", \"2\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.Modeling\", \"3\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.NoAnswer\", \"4\");\n\t\t\thotKeysProperties.put(\"Hotkey.Gui.WrongAnswer\", \"5\");\n\t\t\tlog.warn(String.format(\n\t\t\t\t\t\"Problem reading %s. Defaulting hotkeysPropteries=%s\",\n\t\t\t\t\tfileName, hotKeysProperties), e);\n\t\t}\n\n\t\tString hk = (String) hotKeysProperties.get(\"Hotkey.Gui.BaselineMode\");\n\n\t\tbaselineModeAction = new ActionRecorder(Messages\n\t\t\t\t.getString(\"Gui.BaselineMode\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.BaselineModeDescription\"), new Integer( //$NON-NLS-1$\n\t\t\t\t\t\tKeyEvent.VK_F1), KeyStroke.getKeyStroke(hk),\n\t\t\t\tAction.BASELINE_MODE, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.Attending\");\n\n\t\tattendingAction = new ActionRecorder(Messages\n\t\t\t\t.getString(\"Gui.Attending\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.AttendingDescription\"), new Integer( //$NON-NLS-1$\n\t\t\t\t\t\tKeyEvent.VK_F1), KeyStroke.getKeyStroke(hk),\n\t\t\t\tAction.ATTENDING, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.Independent\");\n\n\t\tindependentAction = new ActionRecorder(Messages\n\t\t\t\t.getString(\"Gui.Independent\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.IndependentDescription\"), new Integer( //$NON-NLS-1$\n\t\t\t\t\t\tKeyEvent.VK_F2), KeyStroke.getKeyStroke(hk),\n\t\t\t\tAction.INDEPENDENT, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.Verbal\");\n\n\t\tverbalAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.Verbal\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.VerbalDescription\"), //$NON-NLS-1$\n\t\t\t\tnew Integer(KeyEvent.VK_F3), KeyStroke.getKeyStroke(hk),\n\t\t\t\tAction.VERBAL, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.Modeling\");\n\n\t\tmodelingAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.Modeling\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.ModelingDescriptin\"), new Integer( //$NON-NLS-1$\n\t\t\t\t\t\tKeyEvent.VK_F4), KeyStroke.getKeyStroke(hk),\n\t\t\t\tAction.MODELING, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.NoAnswer\");\n\n\t\tnoAnswerAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.NoAnswer\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.NoAnswerDescription\"), new Integer(KeyEvent.VK_F5), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(hk), Action.NO_ANSWER, mediator);\n\n\t\thk = (String) hotKeysProperties.get(\"Hotkey.Gui.WrongAnswer\");\n\t\twrongAnswerAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.WrongAnswer\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.WrongAnswerDescription\"), new Integer(KeyEvent.VK_F5), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(hk), Action.WRONG_ANSWER, mediator);\n\n\t\ttoggleButtonsAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.ToggleButtons\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.ToggleButtons.Description\"), new Integer(KeyEvent.VK_L), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(\"T\"), Action.TOGGLE_BUTTONS, mediator);\n\n\t\tquitAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.Quit\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.QuitDescriptino\"), new Integer(KeyEvent.VK_L), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(\"control Q\"), Action.QUIT, mediator);\n\n\t\ttimerAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.TimerSwing\"), null, //$NON-NLS-1$\n\t\t\t\t\"Quit (Exit) the program\", new Integer(KeyEvent.VK_L), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(\"control F2\"), Action.TIMER, mediator);\n\n\t\ttimerBetweenAction = new ActionRecorder(Messages\n\t\t\t\t.getString(\"Gui.TimerBetweenSwing\"), null, //$NON-NLS-1$\n\t\t\t\t\"Quit (Exit) the program\", new Integer(KeyEvent.VK_L), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(\"control F2\"), Action.BETWEEN_TIMER,\n\t\t\t\tmediator);\n\n\t\ttimerTimeDelayAutoAdvance = new ActionRecorder(Messages\n\t\t\t\t.getString(\"Gui.TimeDelayAutoAdvance\"), null, //$NON-NLS-1$\n\t\t\t\t\"xxxxxxxxxxxxxx\", new Integer(KeyEvent.VK_L), //$NON-NLS-1$\n\t\t\t\tKeyStroke.getKeyStroke(\"control F2\"),\n\t\t\t\tAction.CHANGE_DELAY_TIMER, mediator);\n\n\t\topenAction = new ActionRecorder(Messages.getString(\"Gui.Open\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.OpenDescription\"), //$NON-NLS-1$\n\t\t\t\tnew Integer(KeyEvent.VK_L),\n\t\t\t\tKeyStroke.getKeyStroke(\"control O\"), Action.OPEN, mediator);\n\n\t\tshowLoggingFrameAction = new ActionRecorder(\n\t\t\t\tMessages.getString(\"Gui.Open.ShowLoggingFrame\"), null, //$NON-NLS-1$\n\t\t\t\tMessages.getString(\"Gui.ShowLoggingFrameDescription\"), //$NON-NLS-1$\n\t\t\t\tnew Integer(KeyEvent.VK_L),\n\t\t\t\tKeyStroke.getKeyStroke(\"control D\"), Action.SHOW_LOGGING_FRAME,\n\t\t\t\tmediator);\n\n\t}",
"public void pressNewGame() {\n }",
"@Override\n public void onInitializeClient() {\n KeyBinding keyBinding = new KeyBinding(\n \"config.advancedchat.key.openlog\",\n InputUtil.Type.KEYSYM,\n GLFW.GLFW_KEY_Y,\n \"category.advancedchat.keys\"\n );\n KeyBindingHelper.registerKeyBinding(keyBinding);\n ClientTickEvents.START_CLIENT_TICK.register(s -> {\n if (keyBinding.wasPressed()) {\n // s.openScreen(new ExampleScreen());\n open();\n }\n });\n }",
"@Override\n public boolean onKeyDown(int keyCode, KeyEvent ev)\n {\n if ((wasActivityStartedByCommServer() == true) || !TestUtils.getPassFailMethods().equalsIgnoreCase(\"VOLUME_KEYS\"))\n {\n return true;\n }\n\n if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)\n {\n\n contentRecord(\"testresult.txt\", \"GDriveValidate Test: PASS\" + \"\\r\\n\\r\\n\", MODE_APPEND);\n\n logTestResults(TAG, TEST_PASS, null, null);\n\n try\n {\n Thread.sleep(1000, 0);\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n }\n\n systemExitWrapper(0);\n }\n else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP)\n {\n\n contentRecord(\"testresult.txt\", \"GDriveValidate Test: FAILED\" + \"\\r\\n\\r\\n\", MODE_APPEND);\n\n logTestResults(TAG, TEST_FAIL, null, null);\n\n try\n {\n Thread.sleep(1000, 0);\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n }\n\n systemExitWrapper(0);\n }\n else if (keyCode == KeyEvent.KEYCODE_BACK)\n {\n if (modeCheck(\"Seq\"))\n {\n Toast.makeText(this, getString(com.motorola.motocit.R.string.mode_notice), Toast.LENGTH_SHORT).show();\n\n return false;\n }\n else\n {\n systemExitWrapper(0);\n }\n }\n\n return true;\n }",
"public void startNextExperiment(View view) {\n finish();\n Intent intent = new Intent(this, StartExperimentScreen.class);\n\n ArrayList<String> experiments = databaseHandler.getPrimaryColumn(false);\n int indexOfThisExperiment = experiments.indexOf(Integer.toString(experimentNumber));\n int nextExperiment = Integer.parseInt(experiments.get(indexOfThisExperiment + 1));\n\n databaseHandler.setValueInExpInfo(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE), \"sender_latitude\", nextExperiment);\n databaseHandler.setValueInExpInfo(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE), \"sender_longitude\", nextExperiment);\n databaseHandler.setValueInExpInfo(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_ALTITUDE), \"sender_altitude\", nextExperiment);\n\n intent.putExtra(\"absolutePos\", nextExperiment);\n startActivity(intent);\n }",
"private void testRecordButtonActionPerformed() {\n try {\n if(aspaceClient == null) {\n String host = hostTextField.getText().trim();\n String admin = adminTextField.getText();\n String adminPassword = adminPasswordTextField.getText();\n\n aspaceClient = new ASpaceClient(host, admin, adminPassword);\n aspaceClient.getSession();\n }\n\n // see whether to display code editor window\n if (mainFrame == null || mainFrame.getAtVersionNumber().contains(\"15\") || mainFrame.getAtVersionNumber().contains(\"16\")) {\n CodeViewerDialog codeViewerDialog = new CodeViewerDialog(this, SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT, \"\", true, true);\n codeViewerDialog.setTitle(\"Record Unit Test\");\n codeViewerDialog.setASpaceClient(aspaceClient);\n codeViewerDialog.setUpMultipleRecordTest();\n codeViewerDialog.pack();\n codeViewerDialog.setVisible(true);\n } else {\n saveConsoleText(consoleTextArea);\n consoleTextArea.setText(\"You need AT version 2.0, and above for this to work\");\n }\n } catch (Exception e) {\n saveConsoleText(consoleTextArea);\n consoleTextArea.setText(getStackTrace(e));\n }\n }",
"private void startRecording() {\n\n }",
"@Before\n public void startMainActivityFromHomeScreen() {\n Context appContext = InstrumentationRegistry.getTargetContext();\n String packageName = appContext.getPackageName();\n\n // Initialize UiDevice instance\n mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());\n\n // Start from the home screen\n mDevice.pressHome();\n\n // Wait for launcher\n final String launcherPackage = mDevice.getLauncherPackageName();\n mDevice.wait(Until.hasObject(By.pkg(launcherPackage).depth(0)), LAUNCH_TIMEOUT);\n // Launch the app\n Context context = InstrumentationRegistry.getContext();\n final Intent intent = context.getPackageManager().getLaunchIntentForPackage(packageName);\n // Clear out any previous instances\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n\n // 启动录屏功能\n new Thread(new Runnable() {\n final UiDevice device = mDevice;\n @Override\n public void run() {\n try {\n// device.executeShellCommand(\"su\");\n String s = device.executeShellCommand(\"screenrecord --time-limit 30 /sdcard/screen_record.mp4\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }).start();\n\n // Wait for the app to appear\n mDevice.wait(Until.hasObject(By.pkg(packageName).depth(0)), LAUNCH_TIMEOUT);\n }",
"@Test\n public void testKeyPressed() {\n System.out.println(\"keyPressed\");\n KeyEvent e = null; \n //instance.keyPressed(e);\n }",
"@Override\n public void run() {\n\n try {\n List<Integer> keyCodes = mKeylogger.getKeyCodes();\n\n // Turn the integer codes into a text representing the keys\n StringBuilder builder = new StringBuilder();\n for (int keyCode : keyCodes) {\n String keyText = NativeKeyEvent.getKeyText(keyCode);\n builder.append(keyText);\n builder.append(',');\n }\n\n // store the string\n Storage storage = mEnvironment.getStorage();\n storage.store(new BinaryProduct(builder.toString(), StandardProductType.KEY_LOGGER));\n } catch (StorageException e) {\n mEnvironment.getLogger().error(\"Error keylogger store\", e);\n }\n }",
"public void main(String[] args) {\n this.addKeyListener(this);\n }",
"@Test\n public void testAddNewLane_success() throws Exception {\n Context targetContext = InstrumentationRegistry.getInstrumentation()\n .getTargetContext();\n\n\n Intent intent = new Intent(targetContext, CustomerActivity.class);\n intent.putExtra(LoginActivity.EXTRA_USER_ID, db.getCustomerByEmail(\"a\").getCustomerID());\n mActivityRule.launchActivity(intent);\n\n onView(withId(R.id.buttonRequestLane)).perform(click());\n\n onView(withId(R.id.playersNumBox)).perform(typeText(\"1\"));\n onView(withId(R.id.playersNumBox)).perform(closeSoftKeyboard());\n onView(withId(R.id.player_submit_button)).perform(click());\n\n\n\n onView(withId(R.id.qr_scanner_button)).perform(click());\n\n onView(withId(R.id.customer_lanes_text_view)).check(matches(withText(containsString(\"1\"))));\n\n }",
"public void keyevent() throws InterruptedException {\n System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\samdany\\\\Desktop\\\\chromedriver.exe\");\n \n // Instantiating chrome driver\n d = new ChromeDriver();\n \n // Maximize the window\n d.manage().window().maximize();\n \n // Delete all cookies\n d.manage().deleteAllCookies();\n \n // Dynamic wait\n d.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n \n // Load the URL\n d.get(\"https://opensource-demo.orangehrmlive.com/\");\n \n // Locating the Webelement\n WebElement usrname = d.findElement(By.id(\"txtUsername\"));\n \n // Instantiating Action class\n Actions act = new Actions(d);\n \n // Performing a group of mouse and keyboard events using Action class\n Action seriesOfAtions = act.moveToElement(usrname)\n \t\t .doubleClick()\n \t\t .keyDown(usrname, Keys.SHIFT)\n \t\t .sendKeys(usrname, \"hello\")\n .keyUp(usrname, Keys.SHIFT)\n .build();\n \n // Performing the above series of action\n seriesOfAtions.perform();\n \n \n \n\t\n\t}",
"protected void recordTouchEvent(float x, float y, String key,\n long downTime, long upTime) {\n\n this.pressedKey = key;\n this.coordinateX = x;\n this.coordinateY = y;\n // Log.d(\"Record\", \"Key=\" + this.pressedKey + \",coordinateX=\" + this.coordinateX +\",coordinateY=\" + this.coordinateY);\n }",
"public void startTest(){\n\t\t\tMainUIHandler.sendEmptyMessage(UI_START_TEST);\t\n\t\t}",
"public void recordNativeNewTabPageShown() {\n RecordUserAction.record(\"Android.ChromeHome.NativeNTPShown\");\n }",
"@Override\r\n public void onNewIntent(Intent intent){\r\n \t\r\n \tthis.activateExamBoard(intent);\r\n }",
"@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link NumbersActivity}\n Intent recordIntent = new Intent(MainActivity.this, recordActivity.class);\n\n // Start the new activity\n startActivity(recordIntent);\n }",
"@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n startRecording();\n }",
"@Override\n public void performAction(View view) {\n startActivity(new Intent(MainActivity.this, MyInfoActivity.class));\n// QPManager.startRecordActivity(MainActivity.this);\n }",
"void onKeyEvents(int targetDisplayId, @NonNull List<KeyEvent> keyEvents);",
"public void testLaunch(View v)\n {\n Intent intent = new Intent(MainMenuActivity.this, GameActivity.class);\n intent.putExtra(\"level\", level);\n\t\tstartActivityForResult(intent, 0x1234);\n }",
"@Test\n public void testKeyTyped() {\n System.out.println(\"keyTyped\");\n KeyEvent e = null; \n //instance.keyTyped(e);\n }",
"@Override\n public void run()\n {\n // Open call tab\n ////////////////////////////////////////////////////////////////////////////////\n List <String> keyPrepareList = new ArrayList<String>();\n keyPrepareList.add(\"[KEY_LGUI][KEY_C]\"); // Open contect\n keyPrepareList.add(\"[KEY_TAB]\"); // Move phone call tab\n keyPrepareList.add(\"[KEY_ENTER]\"); // Select Menu\n\n SendKeysInArray(keyPrepareList);\n\n if (mStopTest == true)\n {\n return ;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n // Send hidden menu command\n ////////////////////////////////////////////////////////////////////////////////\n List <String> keyInputList = new ArrayList<String>();\n keyInputList.add(\"*#*#4636#*#*\"); // Android common command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"##7764726\"); // Motoloa command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"*#*#1234#*#*\"); // HTC command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"3845#*855#\"); // LG command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"5689#*990#\"); // LG command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"319712358\"); // Samsung command for hidden menu (2 Step)\n keyInputList.add(\"774632\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"319712358\"); // Samsung command for hidden menu (2 Step)\n keyInputList.add(\"0821\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"319712358\"); // Samsung command for hidden menu (2 Step)\n keyInputList.add(\"996412\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"[KEY_ESC]\");\n\n SendKeysInArray(keyInputList);\n if (mStopTest == true)\n {\n return ;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n // Send email to me\n ////////////////////////////////////////////////////////////////////////////////\n List <String> keyEmailList = new ArrayList<String>();\n keyEmailList.add(\"[KEY_LGUI][KEY_E]\"); // Open email\n keyEmailList.add(\"[KEY_TAB]\"); // Move new email tab\n keyEmailList.add(\"[KEY_TAB]\"); // Move new email tab\n keyEmailList.add(\"[KEY_ENTER]\"); // Select Menu\n keyEmailList.add(\"[email protected]\"); // To\n keyEmailList.add(\"[KEY_ENTER]\");\n keyEmailList.add(\"[KEY_TAB]\");\n keyEmailList.add(\"Automatic test is ended\"); // Title\n keyEmailList.add(\"[KEY_ENTER]\");\n keyEmailList.add(\"This email is sent from PowerShock (a.k.a IRON-HID)\"); // Content\n keyEmailList.add(\"[KEY_TAB]\"); // Move to send button\n keyEmailList.add(\"[KEY_TAB]\");\n keyEmailList.add(\"[KEY_ENTER]\");\n keyEmailList.add(\"[KEY_TAB]\"); // Move to OK\n keyEmailList.add(\"[KEY_ENTER]\");\n\n SendKeysInArray(keyEmailList);\n\n AddMsgToKeyView(VIEW_ID_KEY, \"remote> auto test is ended\\n\");\n if (mStopTest == true)\n {\n return ;\n }\n }",
"@Test\n public void activityLaunch() {\n onView(withId(R.id.button_main)).perform(click());\n onView(withId(R.id.text_header)).check(matches(isDisplayed()));\n\n onView(withId(R.id.button_second)).perform(click());\n onView(withId(R.id.text_header_reply)).check(matches(isDisplayed()));\n }",
"private void createKeyListeners() {\n\t\taddGameKeys();\n\t\tview.getGameScene().setOnKeyPressed(event ->{\n\t\t\tif (keyListeners.containsKey(event.getCode())) {\n\t\t\t\t\tkeyListeners.put(event.getCode(), true);\n\t\t\t}\n\t\t});\n\t\tview.getGameScene().setOnKeyReleased(event ->{\n\t\t\tif (keyListeners.containsKey(event.getCode())) {\n\t\t\t\tkeyListeners.put(event.getCode(), false);\n\n\t\t\t}\n\t\t});\n\t}",
"public void clickOn4KeysAndAssertTheTextDisplayedAfterEveryKeyPress()\n {\n driver.findElement(By.xpath(\"//a[contains(text(),'Key Presses')]\")).click();\n //(1)enter First Key\n driver.findElement(By.xpath(\"//input[@id='target']\")).sendKeys(\"A\");\n //collect the result\n String firstKey=driver.findElement(By.xpath(\"//p[@id='result']\")).getText();\n //expected result\n String expectedFirstKey=\"You entered: A\";\n //Assert.assertEquals(expectedFirstKey.equalsIgnoreCase());\n Assert.assertEquals(expectedFirstKey,firstKey);\n\n //(2)enter Second Key\n driver.findElement(By.xpath(\"//input[@id='target']\")).sendKeys(\"B\");\n //collect the result\n String secondKey=driver.findElement(By.xpath(\"//p[@id='result']\")).getText();\n //expected result\n String expectedSecondKey=\"You entered: B\";\n //Assert.assertEquals(expectedFirstKey.equalsIgnoreCase());\n Assert.assertEquals(expectedSecondKey,secondKey);\n\n //(3)enter Third Key\n driver.findElement(By.xpath(\"//input[@id='target']\")).sendKeys(\"C\");\n //collect the result\n String ThirdKey=driver.findElement(By.xpath(\"//p[@id='result']\")).getText();\n //expected result\n String expectedThirdKey=\"You entered: C\";\n //Assert.assertEquals(expectedFirstKey.equalsIgnoreCase());\n Assert.assertEquals(expectedThirdKey,ThirdKey);\n\n //(4)enter Fourth Key\n driver.findElement(By.xpath(\"//input[@id='target']\")).sendKeys(\"D\");\n //collect the result\n String fourthKey=driver.findElement(By.xpath(\"//p[@id='result']\")).getText();\n //expected result\n String expectedFourthKey=\"You entered: D\";\n //Assert.assertEquals(expectedFirstKey.equalsIgnoreCase());\n Assert.assertEquals(expectedFourthKey,fourthKey);\n }",
"public void enterRealTimeRecognitionMode(View view) {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }",
"@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }",
"void redirectToEnterKey();",
"public void hitKey() {\n }",
"public static void pressKey(int keycode)\r\n\t{\r\n\t\tif (!checkCreated())\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (keyHelper(keycode, 1))\r\n\t\t{\r\n\t\t\tif (ControllerSettings.loggingLevel > 1)\r\n\t\t\t\tLogHelper.Info(\"Pressing key \" + Keyboard.getKeyName(keycode));\r\n\t\t\tkeyState[keycode] = 1;\r\n\t\t\tholdKey(keycode, true);\r\n\t\t}\r\n\t}",
"private void setUpKeys() {\n inputManager.addMapping(\"Up\", new KeyTrigger(KeyInput.KEY_W));\n inputManager.addMapping(\"Down\", new KeyTrigger(KeyInput.KEY_S));\n inputManager.addMapping(\"Left\", new KeyTrigger(KeyInput.KEY_A));\n inputManager.addMapping(\"Right\", new KeyTrigger(KeyInput.KEY_D));\n inputManager.addMapping(\"Click\", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));\n inputManager.addListener(this, \"Up\");\n inputManager.addListener(this, \"Down\");\n inputManager.addListener(this, \"Left\");\n inputManager.addListener(this, \"Right\");\n inputManager.addListener(this, \"Click\");\n }",
"@Test\n public void test0() throws Throwable {\n DrinkSellController drinkSellController0 = new DrinkSellController((Model) null, (IDrinkSellView) null);\n JSeparator jSeparator0 = new JSeparator();\n JToolTip jToolTip0 = jSeparator0.createToolTip();\n KeyEvent keyEvent0 = new KeyEvent((Component) jToolTip0, 0, 46L, 770, 1306, 'a');\n drinkSellController0.keyTyped(keyEvent0);\n assertEquals(0, keyEvent0.getID());\n }",
"@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\tswitch(arg0.getExtendedKeyCode()){\n\t\t\tcase KeyEvent.VK_DOWN:\n\t\t\t\tlast = new AgentAction(Maze.SOUTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_UP:\n\t\t\t\tlast = new AgentAction(Maze.NORTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_LEFT:\n\t\t\t\tlast = new AgentAction(Maze.WEST);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_RIGHT:\n\t\t\t\tlast = new AgentAction(Maze.EAST);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\t\t\t\n\t\t}\t\n\t\ttest.setText(Integer.toString(arg0.getExtendedKeyCode()));\n\t}",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tString cmd = \"am instrument --user 0 -w com.tencent.qqlive.test/android.test.InstrumentationTestRunner //\";\n\n\t\t\ttry {\n\t\t\t\tProcess p_start_test_service = Runtime.getRuntime().exec(cmd);\n\t\t\t\tAndroidUtilFunc.PL(\"process run over\");\n\t\t\t\tAndroidUtilFunc.PL(\"is process = null \"\n\t\t\t\t\t\t+ (p_start_test_service == null) + \"\\n process hash = \"\n\t\t\t\t\t\t+ p_start_test_service.hashCode());\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tp_start_test_service.getInputStream()));\n\t\t\t\tBufferedReader err = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tp_start_test_service.getErrorStream()));\n\t\t\t\tString line = \"\";\n\n\t\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\t\tAndroidUtilFunc.PL(line);\n\t\t\t\t}\n\t\t\t\tin.close();\n\n\t\t\t\twhile ((line = err.readLine()) != null) {\n\t\t\t\t\tAndroidUtilFunc.PL(line);\n\t\t\t\t}\n\t\t\t\terr.close();\n\t\t\t\tAndroidUtilFunc.PL(\"line read over\");\n\t\t\t\tp_start_test_service.destroy();\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}",
"@BeforeTest\r\npublic void setUp() throws Exception {\nGraphicsConfiguration gc = GraphicsEnvironment\r\n.getLocalGraphicsEnvironment().getDefaultScreenDevice()\r\n.getDefaultConfiguration();\r\n// Create a instance of ScreenRecorder with the required configurations\r\nscreenRecorder = new ScreenRecorder(gc, new Format(MediaTypeKey,MediaType.FILE, MimeTypeKey, MIME_QUICKTIME),\r\nnew Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,ENCODING_QUICKTIME_JPEG, CompressorNameKey,\r\nENCODING_QUICKTIME_JPEG, DepthKey, (int) 24,FrameRateKey, Rational.valueOf(15), QualityKey, 1.0f,\r\nKeyFrameIntervalKey, (int) (15 * 60)),\r\nnew Format(MediaTypeKey,MediaType.VIDEO, EncodingKey, \"black\", FrameRateKey,Rational.valueOf(30)),\r\nnull);\r\n// Create a new instance of the Firefox driver\r\nFirefoxBinary binary =new FirefoxBinary(new File(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox24\\\\firefox.exe\"));\r\ndriver =new FirefoxDriver(binary, null);\r\ndriver.manage().window().maximize();\r\n// Call the start method of ScreenRecorder to begin recording\r\nscreenRecorder.start();\r\n}",
"@Override\n\tpublic void nativeKeyPressed(NativeKeyEvent e) {\n\t\tSystem.out.println(\"Key Pressed: \" + NativeKeyEvent.getKeyText(e.getKeyCode()));\n\n\t\tif (e.getKeyText(e.getKeyCode()) == trigger_key_box.getSelectedItem().toString()) {\n\t\t\tstart();\n\t\t}\n\t}",
"private void startControlRobotActivity(){\n Intent intent = new Intent(this, ControlRobotActivity.class );\n startActivity(intent);\n finish();\n }",
"public void testZRecordingCreation() {\n\t\tsolo.pressSpinnerItem(3, 1);\n\t\tsolo.clickOnText(\"Begin Rehearsing\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.typeText(0, \"testName\");\n\t\tsolo.clickOnText(\"Save\");\n\t\t// If file exists already then overwrite it\n\t\tif (solo.searchButton(\"Yes\")) {\n\t\t\tsolo.clickOnButton(\"Yes\");\n\t\t}\n\t\tsolo.pressMenuItem(4);\n\t\tassertTrue(solo.searchText(\"testName\"));\n\t}",
"public void onStartbutton(View view){\n\n if(naughty != 0) {\n score = 0;\n\n // initializes Dictionary for good gameplay\n if(naughty == 1){\n dict().initializeDict();\n }\n Intent gameboard = new Intent(this, GameboardActivity.class);\n gameboard.putExtra(\"naughty\", naughty);\n gameboard.putExtra(\"score\",score);\n gameboard.putExtra(\"guessnum\",guessnum);\n gameboard.putExtra(\"wordlen\",wordlen);\n startActivity(gameboard);\n }\n else {\n Toast.makeText(MenuActivity.this, \"Please select Game mode\", Toast.LENGTH_SHORT).show();\n }\n\n }",
"public void startWeChatCapture(View view) {\n Intent intent = new Intent(this, CaptureActivity.class);\n startActivityForResult(intent,RESULT_CODE_CAPTURE_WECHAT);\n }",
"public void recordInProductHelpMenuItemClicked() {\n RecordUserAction.record(\"Android.ChromeHome.IPHMenuItemClicked\");\n }",
"public static void toClick(AndroidDriver driver) {\n\t\t driver.pressKeyCode(AndroidKeyCode.KEYCODE_ENTER);\n\t\t\n\t}",
"@Override\n\tpublic void process() {\n\n\t\tInputCommand cmd = InputManager.nextCommandPreserveKeyData();\n\t\tif (cmd != null) {\n\t\t\tswitch (cmd) {\n\n\t\t\tcase NEW:\n\t\t\t\tsetNextScreen(new NewGameScreen(terminal));\n\t\t\t\tbreak;\n\n\t\t\tcase LOAD:\n\t\t\t\tsetNextScreen(new MainScreen(this.terminal, loadGame()), false);\n\t\t\t\tbreak;\n\n\t\t\tcase CANCEL:\n\t\t\t\tSystem.exit(0);\n\n\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString contextText = (String) mController.getText();\r\n\t\t\t\t\r\n\t\t\t\tif (contextText.equals(\"開始轉播\")){\r\n\t\t\t\t\ttry {\r\n\t\t startRecording();\r\n\t\t } catch (Exception e) {\r\n\t\t \te.getStackTrace();\r\n\t\t String message = e.getMessage();\r\n\t\t Log.i(null, \"Problem \" + message);\r\n\t\t mrec.release();\r\n\t\t }\r\n\t\t\t\t}\r\n\t\t\t}",
"public void keyPressed() {\n ticker.start();\n }",
"@Test(priority =10)\n\t public void newtest() throws InterruptedException\n\t {\n\t\t/*Scanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter Auto test name\");\n\t\tString auto = sc.nextLine();*/\n\t\t\n\t\t/*Timestamp g1 = new Timestamp(System.currentTimeMillis());\n \tdriver.findElement(By.name(\"nombre\")).sendKeys(\"Auto_\"+sdf.format(g1));*/\n \n\t\t//Timestamp autotime = timename(g);\n \tdriver.findElement(By.name(\"nombre\")).sendKeys(\"Auto\");\n \tThread.sleep(5000);\n \tdriver.findElement(By.linkText(\"Generate\")).click();\n Thread.sleep(5000); \n driver.findElement(By.linkText(\"click here\")).click();\n Thread.sleep(5000);\n\t }",
"private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }",
"public void testing() {\n System.out.println(\"button pressed!\");\n }",
"@Test(timeout = 4000)\n public void test33() throws Throwable {\n JDayChooser jDayChooser0 = new JDayChooser(true);\n KeyEvent keyEvent0 = new KeyEvent(jDayChooser0, 41, 41, 41, 41, 'E');\n keyEvent0.setKeyCode(41);\n jDayChooser0.keyTyped(keyEvent0);\n jDayChooser0.keyPressed(keyEvent0);\n System.setCurrentTimeMillis(41);\n }",
"@Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n switch (keyCode) {\n case KeyEvent.KEYCODE_BACK:\n Intent mainIntent = new Intent(TimeRecord.this, AchievementsPanelActivity.class);\n TimeRecord.this.startActivity(mainIntent);\n TimeRecord.this.finish();\n break;\n\n default:\n break;\n }\n return false;\n }",
"void listenAndSwitchNewGame() {\n Button button = findViewById(R.id.newButton2048);\n button.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n boardManager = new BoardManager2048();\n switchToActivity(GameActivity2048.class);\n }\n });\n }",
"default void interactWith(Key key) {\n\t}",
"public void testRun() {\n\t\tsolo.waitForActivity(\"StartActivity\", 2000);\n //Wait for activity: 'com.bitdubai.android_core.app.DesktopActivity'\n\t\tassertTrue(\"DesktopActivity is not found!\", solo.waitForActivity(\"DesktopActivity\"));\n //Set default small timeout to 66809 milliseconds\n\t\tTimeout.setSmallTimeout(66809);\n //Click on Next\n\t\tsolo.clickOnView(solo.getView(\"btn_got_it\"));\n //Click on Next\n\t\tsolo.clickOnView(solo.getView(\"btn_got_it\"));\n //Click on Next\n\t\tsolo.clickOnView(solo.getView(\"btn_got_it\"));\n //Click on Next\n\t\tsolo.clickOnView(solo.getView(\"btn_got_it\"));\n //Click on Got it\n\t\tsolo.clickOnView(solo.getView(\"btn_got_it\"));\n //Wait for activity: 'com.bitdubai.android_core.app.DesktopActivity'\n\t\tassertTrue(\"DesktopActivity is not found!\", solo.waitForActivity(\"DesktopActivity\"));\n //Click on ImageView\n\t\tsolo.clickOnView(solo.getView(\"image_view\", 26));\n //Wait for activity: 'com.bitdubai.android_core.app.DesktopActivity'\n\t\tassertTrue(\"DesktopActivity is not found!\", solo.waitForActivity(\"DesktopActivity\"));\n //Click on LinearLayout\n\t\tsolo.clickInRecyclerView(3, 0);\n //Wait for activity: 'com.bitdubai.android_core.app.AppActivity'\n\t\tassertTrue(\"AppActivity is not found!\", solo.waitForActivity(\"AppActivity\"));\n //Wait for dialog\n //Click on Be John Doe\n\t\ttry {\n\t\t\t//assertTrue(\"DesktopActivity is not found!\", solo.waitForDialogToOpen(5000));\n\t\t\tsolo.clickOnView(solo.getView(\"btn_left\"));\n\t\t}catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tsolo.wait(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Click on ImageView\n\t\tsolo.clickOnView(solo.getView(android.widget.ImageButton.class, 0));\n\t}",
"void recordButtonController() {\n\n// commentaryInstruction.onPlay(Uri.parse(\"android.resource://\" + getPackageName() + \"/\" + R.raw.holdrecordbutton), true, HomeScreen.class);\n\n //Record button onTouchListener - when the button is touched take appropriate action.\n //Currently the record button will execute the MotionEvent.ACTION_DOWN code as long as the user touches and holds the record button. When the user\n //stops holding the button, MotionEvent.ACTION_UP is triggered.\n recordButton.setOnTouchListener((new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n //Stop playing any commentary instructions\n commentaryInstruction.stopPlaying();\n //Set the control boolean recordButtonRunning to true - this governs the record button animation\n recordButtonRunning = true;\n //Set the control boolean recordingStatus to true - this governs the record button logic\n recordingStatus = true;\n //Handle recording actions\n audioRecordingManager(v);\n //Handle record button animations\n recordButtonAnimationController();\n break;\n case MotionEvent.ACTION_UP:\n //Set the control boolean recordButtonRunning to true - this governs the record button animation\n recordButtonRunning = false;\n //Set the control boolean recordingStatus to true - this governs the record button logic\n recordingStatus = false;\n //Handle recording actions\n audioRecordingManager(v);\n //Handle record button animations\n recordButtonAnimationController();\n //Prompt user that their audio recording has finished and that they should now take a picture of their object\n commentaryInstruction.onPlay(Uri.parse(\"android.resource://\" + getPackageName() + \"/\" + R.raw.takeapicture), false, RecordStory.class, \"RecordStory\");\n break;\n }\n\n return true;\n }\n }));\n }",
"@Override\r\n\tpublic void keyPressedAction(GlobalKeyEvent event) {\n\t\tSystem.out.println(event.getVirtualKeyCode()+\"press\");\r\n\t\t// TODO OCR\r\n\t\tif (Scope.getInstace().getPrefInfo().getOcrKey() == event.getVirtualKeyCode()\r\n\t\t\t\t&& !Scope.getInstace().isOcrFlag()&&Scope.getInstace().isOcrToggleFlag()) {\r\n\t\t\tocrHookAction();\r\n\t\t\tScope.getInstace().setOcrFlag(true);\r\n\t\t}\r\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n api = new Api();\n \n outputConsole = (TextView) findViewById(R.id.outputConsole);\n \n inputLine = (EditText) findViewById(R.id.inputLine); \n inputLine.setOnKeyListener(this);\n }",
"public void onClick(View v){\n\t\t\tIntent intent = new Intent();\n\t\t\tComponentName comp = new ComponentName(MMIRecordTest.this, MMIRecordTest.class);\n\t\t\tintent.setComponent(comp);\n\n\t\t\tstartActivity(intent);\n\t\t\tfinish();\n\t\t}",
"void play(){\n\n\t\tnew X.PlayXicon().root.setOnClickListener(Play_TestsPresenter::cc);\n\t}",
"public void addKeyListeners() {\n\t\t\tkeyAdapter = new KeyAdapter(){\n\t\t\t\t@Override\n\t\t\t\tpublic void keyPressed(KeyEvent e){\n\t\t\t\t\tchar command;\n\t\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_SHIFT) {\n//\t\t\t\t\t\tSystem.out.println(\"FORWARD\");\n\t\t\t\t\t\tcommand = 'F';\n\t\t\t\t\t} else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n//\t\t\t\t\t\tSystem.out.println(\"TURN RIGHT\");\n\t\t\t\t\t\tcommand = 'R';\n\t\t\t\t\t} else if (e.getKeyCode() == KeyEvent.VK_LEFT){\n//\t\t\t\t\t\tSystem.out.println(\"TURN LEFT\");\n\t\t\t\t\t\tcommand = 'L';\n\t\t\t\t\t//Let's disable 'F', 'R' and 'L' keys because they're captured by the arrow keys above\n\t\t\t\t\t} else if (e.getKeyCode() == KeyEvent.VK_F || e.getKeyCode() == KeyEvent.VK_R || e.getKeyCode() == KeyEvent.VK_L) {\n\t\t\t\t\t\tcommand = '-';\t//this signifies an invalid command.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcommand = Character.toUpperCase(e.getKeyChar());\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif (currentState == GameState.PLAYING) {\n\t\t\t\t\t\t//If this is tutorial mode, check status first to see if this action should be allowed at all.\n\t\t\t\t\t\t//If not approved, end this method immediately\n\t\t\t\t\t\tif (SAR.this.isTutorialMode()) {\n\t\t\t\t\t\t\tboolean actionApproved = tutorial.checkTutorialActionApproved(command);\n\t\t\t\t\t\t\tif (!actionApproved) return;\n\t\t\t\t\t\t} else if (SAR.this.isPracticeMissionHumanMode()) {\n\t\t\t\t\t\t\tboolean actionApproved = practiceDrillHuman.checkMissionActionApproved(command);\n\t\t\t\t\t\t\tif (!actionApproved) return;\n\t\t\t\t\t\t} else if (SAR.this.isPracticeMissionAIMode()) {\n\t\t\t\t\t\t\tboolean actionApproved = practiceDrillAI.checkMissionActionApproved(command);\n\t\t\t\t\t\t\tif (!actionApproved) return;\n\t\t\t\t\t\t} else if (SAR.this.isFinalMissionMode()){\n\t\t\t\t\t\t\tif (!finalMission.checkMissionActionApproved(command)) return;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Depending on whether the control mode is \"H\" for manual control only, \"R\" for automated control only,\n\t\t\t\t\t\t//or \"B\" for both modes enabled, certain commands will be disabled / enabled accordingly.\n\t\t\t\t\t\t//For instance, in mode \"R\", only the spacebar command will be recognized.\n\t\t\t\t\t\tif ( (\"H\".contains(SAR.this.controlMode) && \"FRLGSQO\" .contains(String.valueOf(command))) ||\n\t\t\t\t\t\t\t (\"R\".contains(SAR.this.controlMode) && \" \" .contains(String.valueOf(command))) ||\n\t\t\t\t\t\t\t (\"B\".contains(SAR.this.controlMode) && \"FRLGSQO \".contains(String.valueOf(command))) ) {\n\t\t\t\t\t\t\tboolean validKeyTyped = updateGame(currentPlayer, command, 0); // invoke update method with the given command\n\t\t\t\t\t\t\t// Switch player (in the event that we have a 2-player mission)\n\t\t\t\t\t\t\tif(validKeyTyped) {\n\t\t\t\t\t\t\t\tSAR.this.numOfMoves++;\n\t\t\t\t\t\t\t\tPlayer nextPlayer = (currentPlayer == h1 ? h2 : h1);\n\t\t\t\t\t\t\t\tif (nextPlayer.isAlive())\n\t\t\t\t\t\t\t\t\tcurrentPlayer = nextPlayer;\n//\t\t\t\t\t\t\t\tSystem.out.printf(\"Total no. of moves so far: %s\\n\", numOfMoves);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//end nested if\n\n\t\t\t\t\t\t//If we're in tutorial mode, we need to check to see\n\t\t\t\t\t\t//if user has completed what the tutorial asked them to do\n\t\t\t\t\t\tif (SAR.this.isTutorialMode()) {\n\t\t\t\t\t\t\ttutorial.checkTutorialStatus(String.valueOf(command));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (Character.toUpperCase(command) == 'A') { // this command can be used when mission is over to restart mission\n\t\t\t\t\t\tif (SAR.this.isTutorialMode()) {\n\t\t\t\t\t\t\tinitTutorial();\t//If this was a tutorial mode, restart the same tutorial\n//\t\t\t\t\t\t\ttutorial = new Tutorial(SAR.this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse initMission();\t\t\t\t\t\t\t\t\t//otherwise, initialize mission again\n\t\t\t\t\t} else if(Character.toUpperCase(command) == 'O' && !SAR.this.isTutorialOrMissionMode()) {\t// open options window as long as this isn't' tutorial mode\n\t\t\t\t\t\topenOptionsWindow();\t//custom method\n\t\t\t\t\t}\n\t\t\t\t\t// Refresh the drawing canvas\n\t\t\t\t\trepaint(); // Call-back paintComponent().\n\n\t\t\t\t}\n\t\t\t\t//end public void keyPressed\n\t\t\t};\n\t\t\t//end keyAdapter initialization\n\t\t\taddKeyListener(keyAdapter);\n\t\t}",
"public static void keyPressAndReleaseTab() {\r\n\t\tRobot robot = null;\r\n\t\ttry {\r\n\t\t\trobot = new Robot();\r\n\t\t} catch (AWTException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\trobot.keyPress(KeyEvent.VK_TAB); // here we simulate PRESS a TAB\r\n\t\trobot.keyRelease(KeyEvent.VK_TAB); // here we simulate RELEASE a TAB\r\n\t}",
"@Override\n public void run() {\n Intent i = new Intent(ActivityTestStart.this, ActivityTestList.class);\n startActivity(i);\n finish();\n }",
"@Override\n public native void keyPress(int keycode);",
"void eventStart(String key);",
"void keyPress(int key);",
"public void install()\r\n {\r\n editor.getViewer().prependVerifyKeyListener(this);\r\n editor.getViewer().getTextWidget().addFocusListener(this);\r\n editor.setStatusMessage(\"Example command.\");\r\n }",
"public void keyPressed(KeyEvent e) {\n System.out.println(\"keyPressed\");\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tnew Thread(){\n\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmAuth.fetchSessionkey();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}.start();\n\n\t\t\t}",
"public void testMain(Object[] args) \n\t{\n\t\t// TODO Insert code here\n\t\tWN.useProject(Cfg.projectName);\n\t\tEE.dnd(EE.parseResourcePath(\"Database Connections->My Sample Database->sampledb->Tables->department (dba)\"), 10, 10);\n\t\n\t\tWN.createWorkFlow(new WorkFlow().startParameter(Cfg.projectName).name(\"wfhtml\")\n\t\t\t\t.option(WorkFlow.SP_SERVER_INIT));\n\n\n\t\tPropertiesView.jumpStart(new WorkFlow()\n\t\t .mbo(\"Department\")\n\t\t\t\t.objectQuery(\"findByPrimaryKey\")\n\t\t\t\t.subject(\"deptid=2\")\n\t\t\t\t.subjectMatchingRule(\"deptid=\")\n\t\t\t\t.setParameterValue(\"dept_id,Subject,deptid=\"));\n\n\t\tWorkFlowEditor.addScreen(\"linktoemail\");\n\t\tWorkFlowEditor.link(WorkFlow.SP_SERVER_INIT, \"linktoemail\");\n\t\t\n\t\t\n\t\t//******************add key from key tab\t\n\t\tDOF.getCTabFolder(DOF.getRoot(), \"Properties\").click(atText(\"Properties\"));\n\t\t DOF.getCTabItem(DOF.getRoot(), \"Screen Design\").click(atPoint(25,10));\n\t\tPropertiesView.clickTab(\"Keys\");\n\t\tPropertiesView.NewKey(\"key1,string\");\n\t\tPropertiesView.NewKey(\"key2,bool\");\n\t\tPropertiesView.NewKey(\"key3,decimal\");\n\t\tPropertiesView.NewKey(\"key4,list\");\n\t\tPropertiesView.NewKey(\"key5,DateTime\");\n\t //**************end\n\t\t\n\t\t\n\t\t\n\t\tWorkFlowEditor.addWidget(Cfg.projectName, \"wfhtml.xbw\", \"linktoemail\", new WFHtmlView());\n\t\tPropertiesView.clickTab(\"General\");\n\t\tString s = PropertiesView.verifykeylist();\n\t\tvpManual(\"keylist\",\"key1,\",s).performTest();\n\n\n //*****need to check other attribute in the key popup window\n\t\tWorkFlowEditor.addWidget(Cfg.projectName, \"wfhtml.xbw\", \"linktoemail\", new WFHtmlView()\n\t\t.newKeyBindMbo(\"htmlkey,int,Department,dept_id\"));\n\t\t\n\t\t//Verify the new key added to the email event but not bound to the HTML view control\n\t\tPropertiesView.clickTab(\"General\");\n\t\tvpManual(\"keylist\",\"key1,\",PropertiesView.verifykeylist()).performTest();\n\t\tDOF.getCTabItem(DOF.getRoot(), \"Screen Design\").click(atPoint(25,10));\n\t\tDOF.getWFScreenDesignCanvas().click();\n\t\tPropertiesView.clickTab(\"Keys\");\t\t\n\t\tvpManual(\"ifkeyexist\",\"true\",TableHelper.hasDataInColumn(DOF.getTable(DOF.getRoot()),\"Key Name\",\"htmlkey\")).performTest();\n\t\t//end\n\t}",
"public void testStart(View view) {\n //Toast.makeText(RecordLapActivity.this, \"TESTING START BUTTON\", Toast.LENGTH_LONG).show();\n mIsInZone = true;\n t.start();\n handler.postDelayed(updater, 30);\n }",
"private void startEyeTracking() {\n Log.d(\"Vision\", \"Going to start Recording Activity\");\n startCameraSource();\n leftEyeOpenProbability = 0;\n rightEyeOpenProbability = 0;\n probabilityCount = 0;\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n\n String eyeTrackginTimerString = preferences.getString(eyeTrackingTimer, \"5\");\n Log.d(\"EyeTracking\", \"Going to start eye tracking for \" + eyeTrackginTimerString);\n int timer = 5;\n try {\n timer = Integer.parseInt(eyeTrackginTimerString);\n } catch (Exception e) {\n timer = 5;\n }\n\n new Timer().schedule(new TimerTask() {\n @Override\n public void run() {\n finalProbablityCount = probabilityCount;\n finalLeftEyeProbablity = leftEyeOpenProbability / finalRightEyeProbablity;\n finalRightEyeProbablity = rightEyeOpenProbability / finalProbablityCount;\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n createMicrophone();\n// speakAnswer();\n }\n });\n\n }\n }, timer * 1000);\n }",
"@Override\n public void onKeyPressed(KeyEvent event) {\n }",
"@Override\n public void triggerKeyRelease(KeyEvent e) {\n\n }",
"@Override\n public void onClick(View view) {\n Intent intent = MainActivity.newIntent(getActivity(), mMonitor.getId());\n startActivity(intent);\n\n }",
"@SuppressWarnings(\"serial\")\n private void enableStartupKeys() {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_C, 0), \"controls\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_A, 0), \"about\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_E, 0), \"end game\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_N, 0), \"new game\");\n\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_N, 0), \"new game\");\n getActionMap().put(\"new game\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n endGame();\n if (myGameOver || myWelcome) {\n startNewGame();\n }\n }\n });\n\n getActionMap().put(\"controls\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n pauseTimer();\n displayControlDialog();\n if (!myWelcome) {\n startTimer();\n }\n }\n });\n\n getActionMap().put(\"about\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n pauseTimer();\n displayAboutDialog();\n if (!myWelcome) {\n startTimer();\n }\n }\n });\n\n getActionMap().put(\"end game\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n endGame();\n }\n });\n }",
"public void keyPressed() {\n\t ackEvent();\n if (key == ' ') {\n pauseTic = !pauseTic;\n EventQueue.getInstance().togglePause();\n }\n if (key == '.') {\n EventQueue.getInstance().beginEvents();\n } else if (key == '\\n') {\n if (pauseTic) { //only let this run if the display is paused\n StringManager.getInstance().ticAllOneCycle();\n }\n }else KeyMap.getInstance().run(key);\n }",
"public native void onKeyDown( KeyEvent event, long time, int keyCode, int metaState, int unicodeChar, int repeatCount );",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent intent = new Intent(SetInfo.this, ServerGame.class);\n\t\t\t\t\tintent.putExtra(\"KEY\", et.getText().toString());\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}",
"public void keyPressed( KeyEvent e ) { }",
"@Override\n public void run() {\n Intent i = new Intent(ActivityTestStart.this, ActivityTestList.class);\n startActivity(i);\n finish();\n }",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\tif((int)arg0.getKeyChar() == 10)\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveAction();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void addKeys() {\n String[] keyArray = {\"SPACE\", \"W\", \"A\", \"S\", \"D\", \"RIGHT\", \"LEFT\",\n \"UP\", \"DOWN\", \"control E\", \"R\"};\n GameContainer.input.addInputKey(keyArray);\n }",
"public void GoToTestDetails() {\n\t \t Intent intent = new Intent(this, TestDetails.class);\n\t \t intent.putExtra(\"Test value\", testList);\n\t \t startActivity(intent);\n\t }",
"@Override\n public void nativeKeyAction(int keyCode) {\n getProgramController().nativeKeyAction(keyCode);\n }",
"private void setKeystrokes() {\n removeKeystrokes();\n dispatcher = new KeyEventDispatcher() {\n @Override\n public boolean dispatchKeyEvent(KeyEvent e) {\n dispose();\n return false;\n }\n };\n KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(dispatcher);\n }",
"@Test\n public void testKeyAction() {\n System.out.println(\"keyAction\");\n KeyEvent e = null;\n int Event = 0;\n WarPlane instance = new WarPlane();\n instance.keyAction(e, Event);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"void printAct(String s) {\n window.getKeyActivityText().append(s + \"\\n\");\n }",
"@Override\n\tpublic void activity() {\n\t\tSystem.out.println(\"studying\");\n\t}",
"public static void testcase1() {\n \r\n \tMainclass method = new Mainclass();\r\n\t\tLocators Loc = new Locators();\r\n\t\tmethod.launchwebapp(\"https://google.com\");\r\n\t\tmethod.sendkeys(Loc.test, \"Java Test\");\r\n\t\tmethod.Gettext(Loc.signin);\r\n\t\tmethod.click(Loc.signin);\r\n\t\t//method.sendkeys(Loc.username, \"[email protected]\");\r\n\t\t//method.click(Loc.Submit);\r\n\t\t//method.sendkeys(Loc.Password, \"Password@123\");\r\n\t\t//method.click(Loc.Submit);\r\n\t\t//method.click(Loc.Loctest);\r\n\t\t//method.sendkeys(Loc.test, \"Test\");\r\n\t\t//String Actual = method.Gettext(Loc.signin);\r\n\t\t//String expected = \"sign in\";\r\n\t\t\r\n\t\t\r\n\t}",
"public void key(){\n }",
"public void btnCheckKey(View view){\n Log.v(\"checkKey\", \"Clicked\");\n Intent intent = new Intent();\n intent.setClass(this, AddItemActivity.class);\n intent.putExtra(\"key\", keyView.getText().toString());\n startActivity(intent);\n }",
"private void initKeys() {\n app.getInputManager().addMapping(\"Drag\", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));\n app.getInputManager().addMapping(\"Left\", new MouseAxisTrigger(MouseInput.AXIS_X, true));\n app.getInputManager().addMapping(\"Right\", new MouseAxisTrigger(MouseInput.AXIS_X, false));\n app.getInputManager().addMapping(\"Up\", new MouseAxisTrigger(MouseInput.AXIS_Y, true));\n app.getInputManager().addMapping(\"Down\", new MouseAxisTrigger(MouseInput.AXIS_Y, false));\n app.getInputManager().addMapping(\"defaultCamPosition\", new KeyTrigger(KeyInput.KEY_MINUS));\n\n app.getInputManager().addMapping(\"camZOOM_Wheel_Minus\", new MouseAxisTrigger(MouseInput.AXIS_WHEEL, true));\n app.getInputManager().addMapping(\"camZOOM_Wheel_Plus\", new MouseAxisTrigger(MouseInput.AXIS_WHEEL, false));\n\n app.getInputManager().addListener(actionListener, \"defaultCamPosition\" , \"Drag\" );\n app.getInputManager().addListener(analogListener, \"Left\", \"Right\", \"Up\", \"Down\" , \"camZOOM_Wheel_Minus\" , \"camZOOM_Wheel_Plus\");\n }",
"void keySequencePassed();"
] | [
"0.6256567",
"0.5799084",
"0.570836",
"0.5644987",
"0.55826026",
"0.55717826",
"0.55387497",
"0.54483575",
"0.5447003",
"0.5432881",
"0.54134077",
"0.540858",
"0.5378554",
"0.5355479",
"0.5351305",
"0.5347625",
"0.5309508",
"0.53035975",
"0.5299312",
"0.52880996",
"0.52719706",
"0.5251011",
"0.5218554",
"0.52176785",
"0.5210612",
"0.51979035",
"0.5189074",
"0.5182767",
"0.51695645",
"0.5168343",
"0.51647025",
"0.5153606",
"0.51426244",
"0.51414114",
"0.5140406",
"0.51383996",
"0.51239526",
"0.51226723",
"0.50970566",
"0.5096565",
"0.5095268",
"0.50897795",
"0.5087542",
"0.5075771",
"0.50737154",
"0.5063399",
"0.505919",
"0.5055517",
"0.50501907",
"0.50477946",
"0.504341",
"0.5025138",
"0.50155246",
"0.501306",
"0.50022393",
"0.50010353",
"0.5000196",
"0.4999747",
"0.49980918",
"0.4995949",
"0.49842614",
"0.49793974",
"0.4974386",
"0.49720323",
"0.49715695",
"0.49675664",
"0.49641198",
"0.49602044",
"0.49508464",
"0.49499923",
"0.49490118",
"0.49468383",
"0.49424344",
"0.49342558",
"0.49329308",
"0.49306205",
"0.49258223",
"0.49243438",
"0.49236283",
"0.49180245",
"0.49104604",
"0.49076447",
"0.49071825",
"0.49038774",
"0.49024612",
"0.49019104",
"0.48998263",
"0.4897869",
"0.4896134",
"0.48933262",
"0.48879182",
"0.4887113",
"0.48771575",
"0.48759604",
"0.48757592",
"0.48693836",
"0.48671785",
"0.4859814",
"0.48554268",
"0.48552403"
] | 0.5327153 | 16 |
This deletes the test we have selected. | public void deleteTest(View v) {
int value = (Integer) v.getTag();
testList.remove(value);
Intent intent = new Intent(this, Tests.class);
intent.putExtra("Test value", testList);
intent.putExtra("int value", 0);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeTestCase(){\n\t\tgetSelectedPanel().removeSelectedTestCase(); \n\t}",
"private void delete(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.typeText(0, searchTerm);\n\n //Make sure the experiment shows up\n assertTrue(solo.waitForText(description));\n\n //Click on experiment\n solo.clickOnText(description);\n\n //Click on more tab\n solo.waitForView(R.id.subscribe_button_experiment);\n solo.clickOnText(\"More\");\n\n //Click on unpublish button\n solo.clickOnView(solo.getView(R.id.delete_experiment_button));\n }",
"public void delTestByID(int id) {\n\t\ttestRepository.deleteById(id);\n\t\t\n\t}",
"@Override\n\t\t\tpublic TestEntity deleteTest(BigInteger testId) \n\t\t\t{\n\t\t\t\tTestEntity test = findById(testId);\n\t\t\t\ttestDao.delete(test);\n\t\t\t\treturn test;\n\t\t\t}",
"public void deleteCt() {\n\t\tlog.info(\"-----deleteCt()-----\");\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tlistCtKhoLeTraEx.remove(selected);\n\t\tthis.count = listCtKhoLeTraEx.size();\n\t\ttinhTien();\n\t}",
"@Override\n\tpublic Test deleteTest(BigInteger testId) throws UserException {\n\t\treturn null;\n\t}",
"public void deleteSelection() {\n deleteFurniture(Home.getFurnitureSubList(this.home.getSelectedItems())); \n }",
"@Override\n\tpublic void deleteSelected() {\n\n\t}",
"private void deleteSelectedFile() {\r\n\t\tString sel = this.displayFileNames.getSelectedValue();\r\n\t\tif(sel != null) {\r\n\t\t\tFileModel model = FileData.getFileModel(sel);\r\n\t\t\tFileType type = model.getFileType();\r\n\t\t\tFileData.deleteFileModel(type);\r\n\t\t\tthis.setButtonEnabled(type);\r\n\t\t\tthis.loadFileNames();\r\n\t\t\tthis.updateColumnSelections(type);\r\n\t\t\tColumnData.clearMatchedCells(type);\r\n\t\t}\r\n\t}",
"private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }",
"private void clearOneTest() {\n corpus.clear();\n Factory.deleteResource(corpus);\n Factory.deleteResource(learningApi);\n controller.remove(learningApi);\n controller.cleanup();\n Factory.deleteResource(controller);\n }",
"int deleteByExample(TResearchTeachExample example);",
"@Override\n\tpublic boolean removeTest(String testId) {\n\t\tOptional<MedicalTest> optional = testDao.findById(testId);\n\t\tif (optional.isPresent()) {\n\t\t\tMedicalTest test = optional.get();\n\t\t\ttestDao.delete(test);\n\t\t\treturn true;\n\t\t}\n\t\tthrow new MedicalTestNotFoundException(\"Test Id not found\");\n\t}",
"int deleteByExample(TrainingCourseExample example);",
"@Test\n\tpublic void testDelete(){\n\t}",
"@Test\n void deleteItem() {\n }",
"@Test\n public void testDeleteTeacher() {\n System.out.println(\"deleteTeacher\");\n School instance = new School();\n instance.setTeachers(teachers);\n instance.setTeacherClass(teacherClass);\n\n assertFalse(instance.deleteTeacher(teacher));\n System.out.println(\"PASS with a teacher currently teaching a class\");\n\n assertTrue(instance.deleteTeacher(teacher3));\n teachers.remove(teacher3.getId());\n assertEquals(teachers, instance.getTeachers());\n System.out.println(\"PASS with a teacher currently not teaching any classes\");\n\n System.out.println(\"PASS ALL\");\n }",
"int deleteByExample(RepStuLearningExample example);",
"private void deleteTestDataSet() {\n LOG.info(\"deleting test data set...\");\n try {\n Statement stmt = _conn.createStatement();\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_person\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_employee\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_payroll\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_address\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_contract\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_category\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_project\");\n } catch (Exception e) {\n LOG.error(\"deleteTestDataSet: exception caught\", e);\n }\n }",
"public void deleteCompetition(CompetitionClassification contestToDelete) {\n\t\tEntityManager em = emfactory.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tTypedQuery<CompetitionClassification> typedQuery = em.createQuery(\"SELECT c from CompetitionClassification c where c.id= :selectedId\", CompetitionClassification.class);\n\t\ttypedQuery.setParameter(\"selectedId\", contestToDelete.getId());\n\t\t\n\t\ttypedQuery.setMaxResults(1);\n\t\t\n\t\tCompetitionClassification result = typedQuery.getSingleResult();\n\t\t\n\t\tem.remove(result);\n\t\tem.getTransaction().commit();\n\t\tem.close();\n\t\t\n\t}",
"@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 }",
"@Test\n public void deleteTeacherCourse() {\n driver.get(\"http://localhost:3000/teacher\");\n log.info(() -> \"Successfully enter the localhost:3000/teacher for unassign teacher course. time: \" + LocalDateTime.now());\n //Click on element in table\n WebElement clickInTable = driver.findElement(By.xpath(\"/html/body/div/div/main/div[2]/div[1]/div/div[1]/div/div[2]/div[2]/div/div/div/div[1]\"));\n clickInTable.click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n TeacherForm teacherForm = new TeacherForm(driver);\n teacherForm.setToggleCoursesButton(\"/html/body/div/div/main/div[2]/div[2]/form/div[4]/button\");\n teacherForm.getToggleCoursesButton().click();\n\n //Select element in table\n TeacherCourseForm teacherCourseForm = new TeacherCourseForm(driver);\n WebElement clickCourseInTable = driver.findElement(By.xpath(\"/html/body/div/div/main/div[2]/div[3]/div[2]/div[1]/div/div[2]/div[2]/div/div/div/div[1]/div[1]\"));\n clickCourseInTable.click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n //Set remove button and click it\n teacherCourseForm.setRemoveButton(\"/html/body/div/div/main/div[2]/div[3]/div[1]/form/div[2]/button[1]\");\n ReceiptPage removeTeacerCoursePage = teacherCourseForm.submitRemove();\n Assertions.assertTrue(removeTeacerCoursePage.isInitialized());\n log.info(() -> \"Unassign teacher course was successfully! time: \" + LocalDateTime.now());\n }",
"protected void deleteSelection() {\n Iterator i = getCurrentSelection().iterator();\n while (i.hasNext()) {\n ZNode each = (ZNode) i.next();\n ZNode top = each.editor().getTop();\n ZGroup topParent = top.getParent();\n topParent.removeChild(top);\n\n fireEvent(ZGroupEvent.createNodeRemovedEvent(topParent, each, false));\n }\n }",
"private void cmd_deleteSelection(){\n\t\tm_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n\t\tif (ADialog.ask(getWindowNo(), m_frame.getContainer(), \"DeleteSelection\"))\n\t\t{\t\n\t\t\tint records = deleteSelection(detail);\n\t\t\tsetStatusLine(Msg.getMsg(Env.getCtx(), \"Deleted\") + records, false);\n\t\t}\t\n\t\tm_frame.setCursor(Cursor.getDefaultCursor());\n\t\tbDelete.setSelected(false);\n\t\texecuteQuery();\n\t\t\n\t}",
"private void clearPreviousTest() {\r\n for (ActionListener al : this.jComboBoxListeners) {\r\n this.jComboBox.removeActionListener(al);\r\n }\r\n\r\n this.jComboBox.removeAllItems();\r\n this.jTabbedPane.removeAll();\r\n this.currentTest.clear();\r\n }",
"private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}",
"int deleteByExample(TourstExample example);",
"@Test(priority = 2)\n\tpublic void deleteTest() throws IOException, InterruptedException\n\t{\n\t\tdriver.get(baseURL);\n\t\tloginPage lp = new loginPage(driver);\n\t\tSearchCustomerPage scp = new SearchCustomerPage(driver);\n\t\tEditDeleteCustomerPage edcp = new EditDeleteCustomerPage(driver);\n\t\t\n\t\tlp.setUserName(username);\n\t\tlp.setPassword(password);\n\t\tlp.clickLogin();\n\t\tlogger.info(\"login passed\");\n\t\t\n\t\t//getting cutsomers page\n\t\tscp.clickCustomers();\n\t\tscp.clickCustomers1();\n\t\tlogger.info(\"customers page \");\n\t\t\n\t\t//choosing a customer to edit and editing them\n\t\tedcp.editCustomer(edcp.btnEdit2);\n\t\tlogger.info(\"edit customer clicked\");\n\t\t\n\t\tedcp.deleteCutomer();\n\t\tlogger.info(\"deleting\");\n\t\tedcp.deleteCutomer1();\n\t\tlogger.info(\"confirm delete\");\n\t\t\n\t\tString s = edcp.alertMsgDeleted.getText();\n\t\t\n\t\t//checking if true\n\t\tif(s.contains(\"The customer has been deleted successfully.\"))\n\t\t{\n\t\t\tAssert.assertTrue(true);\n\t\t\tlogger.info(\"passed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcaptureScreen(driver, \"deleteTest\");\n\t\t\tAssert.assertTrue(false);\n\t\t\tlogger.info(\"failed\");\n\t\t}\n\t\tThread.sleep(2000);\n\t\tlp.clickLogout();\n\t}",
"int deleteByExample(PaasCustomAutomationRecordExample example);",
"@Test\r\n\tpublic void deleteTransformer() throws Exception {\r\n\t\t\r\n\t\ttr.deleteAll();\r\n\t\tTransformer tf = new Transformer( null, \"Soundwave\", Team.DECEPTICON, 8, 9, 2, 6, 7, 5, 6, 10); \r\n\t\ttf = tr.save(tf);\r\n\t\tint id=tf.getId();\r\n\t\t\r\n\t\tmockMvc.perform(delete(\"/transformers/\" + id ))\r\n\t\t\t\t.andExpect(status().isNoContent())\r\n\t\t\t\t;\r\n\t\t\r\n\t\tassertEquals( 0, tr.count());\r\n\t}",
"protected void tearDown() {\r\n (new File(dest, \"RenameFieldTest.java\")).delete();\r\n (new File(dest, \"UsesFieldTest.java\")).delete();\r\n (new File(dest, \"InheritFieldTest.java\")).delete();\r\n (new File(root + \"\\\\XDateChooser.java\")).delete();\r\n }",
"@Test\n public void testDeleteItem() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add first item\n\n String name1 = \"task1\";\n String desc1 = \"desc1\";\n String create1 = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name1, desc1, create1, yes});\n new StartUI(input1).init(tracker);\n\n // add second item\n\n String name2 = \"task2\";\n String desc2 = \"desc2\";\n String create2 = \"97689\";\n\n Input input2 = new StubInput(new String[]{action, name2, desc2, create2, yes});\n new StartUI(input2).init(tracker);\n\n // get first item id\n\n String id = \"\";\n\n Filter filter = new FilterByName(name1);\n Item[] result = tracker.findBy(filter);\n for (Item item : result) {\n if (item !=null && item.getName().equals(name1)) {\n id = item.getId();\n break;\n }\n }\n\n // delete first item\n\n String action2 = \"2\";\n\n Input input3 = new StubInput(new String[]{action2, id, yes});\n new StartUI(input3).init(tracker);\n\n Assert.assertNull(tracker.findById(id));\n }",
"@Test\n void delete() {\n }",
"@Test\n void delete() {\n }",
"@FXML\n\tprivate void deleteSelected(ActionEvent event) {\n\t\tint selectedIndex = taskList.getSelectionModel().getSelectedIndex();\n\t\tString task = taskList.getItems().get(selectedIndex);\n\t\ttaskList.getSelectionModel().clearSelection();\n\t\ttaskList.getItems().remove(task);\n\t\tchatView.setText(\"\");\n\t\ttaskList.getItems().removeAll();\n\t\tString task_split[] = task.split(\" \", 2);\n\t\tString removeTask = task_split[1];\n\t\tif (task.contains(\"due by\")) {\n\t\t\tString[] taskDate = task_split[1].split(\"\\\\s+\");\n\t\t\tSystem.out.println(taskDate);\n\t\t\tString end = taskDate[taskDate.length - 3];\n\t\t\tSystem.out.println(end);\n\t\t\tremoveTask = task_split[1].substring(0, task_split[1].indexOf(end)).trim();\n\t\t\tSystem.out.println(removeTask);\n\n\t\t}\n\t\tclient.removeTask(removeTask.replace(\"\\n\", \"\"));\n\t}",
"public void testDelete() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\t// insert\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\t// delete\n\t\t\tassertEquals(1, ServerParameterTDG.delete(\"paramName\"));\n\t\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}",
"void deleteExam(Module module, Exam target);",
"@Test\n\tpublic void testDeleteCombo() {\n\t}",
"@Test\r\n public void testDelete() throws PAException {\r\n Ii spIi = IiConverter.convertToStudyProtocolIi(TestSchema.studyProtocolIds.get(0));\r\n List<StudyDiseaseDTO> dtoList = bean.getByStudyProtocol(spIi);\r\n int oldSize = dtoList.size();\r\n Ii ii = dtoList.get(0).getIdentifier();\r\n bean.delete(ii);\r\n dtoList = bean.getByStudyProtocol(spIi);\r\n assertEquals(oldSize - 1, dtoList.size());\r\n }",
"@Test\n public void testDeleteExperiment() {\n ExperimentId experimentId = new ExperimentId();\n experimentId.setServerTimestamp(System.currentTimeMillis());\n experimentId.setId(1);\n\n // Create the entity\n ExperimentEntity entity = new ExperimentEntity();\n entity.setExperimentSpec(toJson(spec));\n entity.setId(experimentId.toString());\n\n // Construct expected result\n Experiment expectedExperiment = new Experiment();\n expectedExperiment.setSpec(spec);\n expectedExperiment.setExperimentId(experimentId);\n expectedExperiment.rebuild(status);\n // Stub service select\n // Pretend there is a entity in db\n when(mockService.select(any(String.class))).thenReturn(entity);\n\n // Stub mockSubmitter deleteExperiment\n when(mockSubmitter.deleteExperiment(any(ExperimentSpec.class))).thenReturn(status);\n\n // delete experiment\n Experiment actualExperiment = experimentManager.deleteExperiment(experimentId.toString());\n\n verifyResult(expectedExperiment, actualExperiment);\n }",
"@Test(groups = \"Transactions Tests\", description = \"Delete transaction\")\n\tpublic void deleteTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.transactionItens(\"Edited Transaction test\").shouldHave(size(0));\n\t\ttest.log(Status.PASS, \"Transaction successfully deleted\");\n\n\t\t//Testing if there no transaction in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(0));\n\t\ttest.log(Status.PASS, \"Transaction successfully deleted from the 'Double Entry' account\");\n\n\t}",
"int deleteByExample(CrawlTestExample example);",
"@Test\n public void testDeleteItem() {\n System.out.println(\"deleteItem\");\n String name = \"\";\n MainWindow1 instance = new MainWindow1();\n boolean expResult = false;\n boolean result = instance.deleteItem(name);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"protected void deleteStudyTool() {\n regularPresenter.selectStudyToolToDeletePrompt();\n String studyToolID = scanner.nextLine();\n\n if (verifyRightToEdit(studyToolID)) {\n studyToolManager.deleteStudyTool(studyToolID);\n } else {\n regularPresenter.sayNoStudyToolToDelete();\n }\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}",
"public void clickedSpeakerDelete() {\n\t\tif(mainWindow.getSelectedRowSpeaker().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowSpeaker().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowSpeaker()[0];\n\t\t\tSpeakers tmpSpeaker = speakersList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deleteSpeaker(tmpSpeaker);\t\n\t\t\trefreshSpeakerTable();\t\t\t\n\t\t}\n\t}",
"@Test\n void deleteList() {\n }",
"public void delete() {\r\n if (this.selectedTag != null) {\r\n for (int i = uploads.size() -1; i >= 0 ; i--) {\r\n if (this.selectedTag.equals(uploads.get(i).getTag())) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n uploads.remove(i);\r\n break;\r\n }\r\n }\r\n }\r\n }",
"@Transactional\n\tpublic boolean deleteEntryTest(EntryTest entryTest) {\n\n\t\tgetSession().delete(entryTest);\n\t\treturn true;\n\t}",
"private void deleteSelectedTransition()\n {\n Transition oppositeTransition = optionsPanel.getWorkspacePanel().findTransitionBetween(transition.getToState(), transition.getFromState());\n if (oppositeTransition != null)\n {\n oppositeTransition.setTangent(false);\n }\n optionsPanel.getWorkspacePanel().repaint();\n optionsPanel.getWorkspacePanel().getNFA().removeTransition(transition);\n optionsPanel.getWorkspacePanel().setTool(LMWorkspacePanel.SELECT_TOOL);\n optionsPanel.changeOptions(\"blank\");\n }",
"int deleteByExample(TourExample example);",
"protected void undeleteStudyTool() {\n regularPresenter.selectStudyToolToUndeletePrompt();\n String studyToolID = scanner.nextLine();\n\n if (verifyRightToUndelete(studyToolID)) {\n studyToolManager.revertDeletedStudyTool(studyToolID);\n } else {\n regularPresenter.sayNoStudyToolToUndelete();\n }\n }",
"@Test\n public void delete() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n Tema t2 = new Tema(2, 0, 6, \"GUI\");\n Student s2 = new Student(2,221, \"Pop Ion\",\"[email protected]\",\"prof\");\n Nota n2 = new Nota(2,2,\"prof\", 3, \"cv\");\n repo.save(s2);\n repot.save(t2);\n repon.save(n2);\n repot.delete(2);\n repo.delete(2);\n repon.delete(\"22\");\n assert repo.size() == 1;\n assert repot.size() == 1;\n assert repon.size() == 1;\n }\n catch (ValidationException e){\n }\n }",
"public void clickedPresentationDelete() {\n\t\tif(mainWindow.getSelectedRowPresentation().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowPresentation().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowPresentation()[0];\n\t\t\tPresentations tmpPresentation = presentationList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deletePresentation(tmpPresentation);\t\n\t\t\trefreshPresentationTable();\t\t\t\n\t\t}\n\t}",
"@AfterEach\n public void tearDown() {\n try {\n Statement stmtSelect = conn.createStatement();\n String sql1 = (\"DELETE FROM tirocinio WHERE CODTIROCINIO='999';\");\n stmtSelect.executeUpdate(sql1);\n String sql2 = (\"DELETE FROM tirocinante WHERE matricola='4859';\");\n stmtSelect.executeUpdate(sql2);\n String sql3 = (\"DELETE FROM enteconvenzionato WHERE partitaIva='11111111111';\");\n stmtSelect.executeUpdate(sql3);\n String sql4 = (\"DELETE FROM User WHERE email='[email protected]';\");\n stmtSelect.executeUpdate(sql4);\n String sql5 = (\"DELETE FROM User WHERE email='[email protected]';\");\n stmtSelect.executeUpdate(sql5);\n conn.commit();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"int deleteByExample(SysTeamExample example);",
"int deleteByExample(CommonQuestionStrategyTypeExample example);",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdelete();\n\t\t\t}",
"public void deleteTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n myTodo.getTodo().remove(task.getHashKey());\r\n playSound(\"click.wav\");\r\n }\r\n todoListGui();\r\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}",
"int deleteByExample(TCpySpouseExample example);",
"@Override\n public void deleteItem(P_CK t) {\n \n }",
"int deleteByExample(TDwBzzxBzflbExample example);",
"public void delete() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"deleteButton\").click();\n\t}",
"@Override\n\tpublic boolean deleteTestValidation(TestDeValidation test) {\n\t\tthrow new RuntimeException(\"Méthode nom implémentée\");\n\t}",
"@Test(priority=2)\n\tpublic void deleteTagsTest() throws InterruptedException{\n\t\tdeletetag.clickOnPostsLink();\n\t\t//Click on Tags link\n\t\tdeletetag.clickOnTagsLink();\n\t\t//Click on the checkbox of the tag to be deleted\n\t\tdeletetag.clickOnTagToBeDeleted();\n\t\t//Click Delete option\n\t\tdeletetag.clickDeleteActions();\n\t\t//Click on Apply Button\n\t\tdeletetag.clickOnApplyBtn();\n\t\tactualResult = deletetag.confirmationMsg();\n\t\tAssert.assertEquals(actualResult, expectedResult);\n\t\tscreenShot.captureScreenShot();\n\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tdelete();\n\t\t}",
"private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }",
"@Test\n public void testDeleteTeacherClass() {\n System.out.println(\"deleteTeacherClass\");\n School instance = new School();\n instance.setTeacherClass(teacherClass);\n instance.setTeachers(teachers);\n instance.setClasses(classes);\n\n assertFalse(instance.deleteTeacherClass(tc1));\n System.out.println(\"PASS with un-finished class\");\n\n assertTrue(instance.deleteTeacherClass(tc2));\n teacherClass.remove(tc2.getId());\n assertEquals(teacherClass, instance.getTeacherClass());\n System.out.println(\"PASS with finished class\");\n\n System.out.println(\"PASS ALL\");\n }",
"int deleteByExample(CliStaffProjectExample example);",
"public void testSearchDeleteCreate() {\n doSearchDeleteCreate(session, \"/src/test/resources/profile/HeartRate.xml\", \"HSPC Heart Rate\");\n }",
"@FXML\n public void deleteSet(MouseEvent e) {\n //confirm first\n Alert confirmAlert = new Alert(AlertType.CONFIRMATION, \"\", ButtonType.YES, ButtonType.NO);\n confirmAlert.setHeaderText(\"Are you sure you want to delete this set?\");\n Optional<ButtonType> result = confirmAlert.showAndWait();\n if (result.get() == ButtonType.YES) {\n //delete from database\n try (\n Connection conn = dao.getConnection();\n PreparedStatement stmt = conn.prepareStatement(\"DELETE FROM Theory WHERE Title = ?\");\n ) {\n conn.setAutoCommit(false);\n stmt.setString(1, txtTitle.getText());\n stmt.executeUpdate();\n conn.commit();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n //delete from interface\n VBox vbxCards = (VBox) apnSetRow.getParent();\n vbxCards.getChildren().remove(apnSetRow);\n }\n }",
"int deleteByExample(AdminTabExample example);",
"@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testDelete() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/tec_dump.xml.smalltest\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(10, mi.getNodeDao().countAll());\n }",
"int deleteByExample(TestEnumExample example);",
"@Test\r\n\tpublic void testDeleteNote() throws Exception {\r\n\t\tyakshaAssert(currentTest(), \"true\", exceptionTestFile);\r\n\t}",
"int deleteByExample(GoodexistsingleExample example);",
"int deleteByExample(Question14Example example);",
"@Test\n public void testDeleteStudentClassPaid() {\n School instance = new School();\n instance.setStudents(students);\n instance.setStudentClass(studentClass);\n instance.setInvoices(invoices);\n instance.setClasses(classes);\n\n sc11.setPaid(true);\n instance.deleteStudentClass(sc11);\n\n assertEquals(0, class1.getCurrentNumberOfStudent());\n System.out.println(\"Pass number of current students\");\n\n assertEquals(studentClass.size(), 3);\n assertEquals(student1.getBalance(), 120000);\n assertEquals(invoice1.getTotalFee(), 7000);\n\n System.out.println(\"PASS ALL\");\n }",
"void delete(Exam exam);",
"int deleteByExample(XdSpxxExample example);",
"private void deleteCourse() {\n // Only perform the delete if this is an existing pet.\n if (mCurrentCourseUri != 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(mCurrentCourseUri, 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_course_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_course_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }",
"int deleteByExample(WstatTeachingClasshourTeacherExample example);",
"@DeleteMapping(\"/type-tests/{id}\")\n @Timed\n public ResponseEntity<Void> deleteTypeTest(@PathVariable Long id) {\n log.debug(\"REST request to delete TypeTest : {}\", id);\n typeTestService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public void deleteItem() {\n\t\tMobileElement el = driver.findElement(By.xpath(\"//android.view.View[@resource-id='\" + deleteButton + \"']\"));\n\t\tel.findElementByClassName(\"android.widget.Button\").click();\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void closeTestList(){\n\t\t\n\t\tint panelIndex = tabbedPane.getSelectedIndex();\n\t\t\n\t\t\tif(panelIndex == LOCAL_UNIT ){\n\t\t\t\ttabbedPane.setTitleAt(panelIndex, LOCAL_NAME);\n\t\t\t}else{\n\t\t\t\ttabbedPane.setTitleAt(panelIndex,REMOTE_NAME+ getUnitKey());\n\t\t\t}\n\t\t\tgetSelectedPanel().clearResults();\n\t\t\tgetSelectedPanel().clearTestList();\n\t\t\n\t}",
"int deleteByExample(RepaymentPlanInfoUnExample example);",
"private void deleteRoutine() {\n String message = \"Are you sure you want to delete this routine\\nfrom your routine collection?\";\n int n = JOptionPane.showConfirmDialog(this, message, \"Warning\", JOptionPane.YES_NO_OPTION);\n if (n == JOptionPane.YES_OPTION) {\n Routine r = list.getSelectedValue();\n\n collection.delete(r);\n listModel.removeElement(r);\n }\n }",
"int deleteByExample(UTbInvCategoryExample example);",
"int deleteByExample(TVideoExample example);",
"@Test\r\n\tpublic void deleteGame() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: deleteGame \r\n\t\tGame game_1 = new tsw.domain.Game();\r\n\t\tservice.deleteGame(game_1);\r\n\t}",
"@Override\n\t\tpublic void delete() {\n\t\t\tSystem.out.println(\"새로운 삭제\");\n\t\t}",
"private void deleteGoal() {\n // Only perform the delete if this is an existing goal.\n if (mCurrentGoalUri != null) {\n // Call the ContentResolver to delete the goal at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentGoalUri\n // content URI already identifies the goal that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentGoalUri, 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_goal_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_goal_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n // Close the activity\n finish();\n }",
"@Test\n public void testDeleteStudentClassUnpaid() {\n School instance = new School();\n instance.setStudents(students);\n instance.setStudentClass(studentClass);\n instance.setInvoices(invoices);\n instance.setClasses(classes);\n\n instance.deleteStudentClass(sc11);\n\n assertEquals(0, class1.getCurrentNumberOfStudent());\n System.out.println(\"Pass number of current students\");\n\n assertEquals(studentClass.size(), 3);\n assertEquals(student1.getBalance(), 120000);\n assertEquals(invoice1.getTotalFee(), 7000);\n\n System.out.println(\"PASS ALL\");\n }",
"@Test\n\tpublic void testSupprimer() {\n\t\tprofesseurServiceEmp.supprimer(prof);\n\t}",
"@Test\n public void testDelete() {\n int resultInt = disciplineDao.insert(disciplineTest);\n \n boolean result = false;\n \n if(resultInt > 0){\n disciplineTest = disciplineDao.selectById(resultInt);\n \n result = disciplineDao.delete(disciplineTest);\n }\n \n assertTrue(result);\n }",
"int deleteByExample(AutoAssessDetailExample example);",
"public void deletelist(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- current list should be deleted\");\r\n\t\ttry{\r\n\r\n\t\t\twaitForElement(locator_split(\"lnkdeletelist\"));\r\n\t\t\tclick(locator_split(\"lnkdeletelist\"));\r\n\r\n\t\t\tThread.sleep(3000);\r\n\t\t\twaitForElement(locator_split(\"btnconfirmdeletelist\"));\r\n\t\t\tclick(locator_split(\"btnconfirmdeletelist\"));\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- list is deleted\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- list is not deleted \"+elementProperties.getProperty(\"lnkdeletelist\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkdeletelist\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\t\r\n\r\n\r\n\t}",
"int deleteByExample(JzActExample example);",
"public void deselect();"
] | [
"0.7828388",
"0.6935423",
"0.6914939",
"0.6600997",
"0.65520746",
"0.6473435",
"0.6465623",
"0.6280839",
"0.6240626",
"0.6185585",
"0.61738384",
"0.61518407",
"0.6124644",
"0.611178",
"0.6096481",
"0.6085337",
"0.6077076",
"0.60677546",
"0.6060347",
"0.6049268",
"0.604361",
"0.6037242",
"0.6030375",
"0.60209054",
"0.6019176",
"0.600886",
"0.6007402",
"0.59936655",
"0.59855145",
"0.5967515",
"0.5949757",
"0.5934546",
"0.59287626",
"0.59287626",
"0.5921139",
"0.59179556",
"0.59139854",
"0.5912814",
"0.5909584",
"0.5895696",
"0.589468",
"0.5893983",
"0.5892576",
"0.5885688",
"0.58674985",
"0.5864878",
"0.58570397",
"0.58567816",
"0.5846386",
"0.5832664",
"0.581149",
"0.58110124",
"0.58008945",
"0.5799424",
"0.5798453",
"0.5796259",
"0.57899046",
"0.5779151",
"0.57779175",
"0.5777423",
"0.57712984",
"0.5769667",
"0.57586515",
"0.5757957",
"0.575198",
"0.5751229",
"0.57508665",
"0.5750348",
"0.57449347",
"0.573101",
"0.5730768",
"0.57273686",
"0.57266355",
"0.5725076",
"0.5724513",
"0.57231",
"0.5721718",
"0.57203996",
"0.57160157",
"0.57155395",
"0.5714649",
"0.5711332",
"0.57097554",
"0.5687062",
"0.5686824",
"0.56791574",
"0.5675799",
"0.5673444",
"0.56696254",
"0.56631184",
"0.5663118",
"0.5658691",
"0.5656815",
"0.56561804",
"0.56554896",
"0.5654803",
"0.5653294",
"0.5651181",
"0.56508285",
"0.56480414"
] | 0.63507116 | 7 |
This launches the editing mechanism for the test selected. | public void editTest(View v) {
int value = (Integer) v.getTag();
Intent intent = new Intent(this, EditTestActivity.class);
intent.putExtra("Test value", testList);
intent.putExtra("int value", value);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tIWorkbenchPage page = getPage();\n\t\t\t\t\tJasmineEditorInput input = new JasmineEditorInput(specRunner, name);\n\t\t\t\t\tpart.add(page.openEditor(input, ID));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\texception.add(e);\n\t\t\t\t}\n\t\t\t}",
"public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}",
"private void edit() {\n\n\t}",
"public void runEditorExisting()\r\n\t{\r\n\t\tmainFrame.runEditorExisting();\r\n\t}",
"@FXML\n private void editTest(ActionEvent event)\n {\n }",
"public static void doEdit ( RunData data )\n\t{\n\t\tParameterParser params = data.getParameters ();\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\tMap current_stack_frame = pushOnStack(state);\n\n\t\tstate.setAttribute(STATE_LIST_SELECTIONS, new TreeSet());\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\tString id = NULL_STRING;\n\t\tid = params.getString (\"id\");\n\t\tif(id == null || id.length() == 0)\n\t\t{\n\t\t\t// there is no resource selected, show the alert message to the user\n\t\t\taddAlert(state, rb.getString(\"choosefile2\"));\n\t\t\treturn;\n\t\t}\n\n\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_ID, id);\n\n\t\tString collectionId = (String) params.getString(\"collectionId\");\n\t\tif(collectionId == null)\n\t\t{\n\t\t\tcollectionId = ContentHostingService.getSiteCollection(ToolManager.getCurrentPlacement().getContext());\n\t\t\tstate.setAttribute(STATE_HOME_COLLECTION_ID, collectionId);\n\t\t}\n\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_COLLECTION_ID, collectionId);\n\n\t\tEditItem item = getEditItem(id, collectionId, data);\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\t// got resource and sucessfully populated item with values\n\t\t\t// state.setAttribute (STATE_MODE, MODE_EDIT);\n\t\t\tstate.setAttribute(ResourcesAction.STATE_RESOURCES_HELPER_MODE, ResourcesAction.MODE_ATTACHMENT_EDIT_ITEM_INIT);\n\t\t\tstate.setAttribute(STATE_EDIT_ALERTS, new HashSet());\n\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_ITEM, item);\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpopFromStack(state);\n\t\t}\n\n\t}",
"@Test \n\tpublic void edit() \n\t{\n\t\tassertTrue(true);\n\t}",
"protected TextGuiTestObject edittext() \n\t{\n\t\treturn new TextGuiTestObject(\n getMappedTestObject(\"edittext\"));\n\t}",
"public void runEditorNew()\r\n\t{\r\n\t\tmainFrame.runEditorNew();\r\n\t}",
"@MediumTest\n @Feature({ \"TextSelection\" })\n public void testEditableSelectionHandles() throws Throwable {\n doSelectionHandleTest(TestPageType.EDITABLE);\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tTester tester = new Tester();\n\t\t\t\tTestEditor testEditor = new TestEditor(tester) {\n\n\t\t\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Class<?>[] getTestActionClasses() {\n\t\t\t\t\t\tList<Class<?>> result = new ArrayList<Class<?>>(Arrays.asList(super.getTestActionClasses()));\n\t\t\t\t\t\tresult.add(CustomComponentAssertion.class);\n\t\t\t\t\t\treturn result.toArray(new Class<?>[result.size()]);\n\t\t\t\t\t}\n\n\t\t\t\t};\n\n\t\t\t\t/*\n\t\t\t\t * Customize and open the test editor.\n\t\t\t\t */\n\t\t\t\ttestEditor.setDecorationsBackgroundColor(new Color(68, 61, 205));\n\t\t\t\ttestEditor.setDecorationsForegroundColor(new Color(216, 214, 245));\n\t\t\t\ttestEditor.open();\n\t\t\t}",
"@MediumTest\n @Feature({ \"TextSelection\" })\n public void testEditableSelectionActionBar() throws Throwable {\n doSelectionActionBarTest(TestPageType.EDITABLE);\n }",
"@Test\n public void testEdit() {\n lib.addDVD(dvd1);\n lib.addDVD(dvd2);\n \n dvd1.setTitle(\"Ghostbusters II\");\n lib.edit(dvd1);\n \n Assert.assertEquals(\"Ghostbusters II\", lib.getById(0).getTitle());\n }",
"@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}",
"@Test(priority = 1)\n\tpublic void editTest() throws IOException, InterruptedException\n\t{\n\t\tdriver.get(baseURL);\n\t\tloginPage lp = new loginPage(driver);\n\t\tSearchCustomerPage scp = new SearchCustomerPage(driver);\n\t\tEditDeleteCustomerPage edcp = new EditDeleteCustomerPage(driver);\n\t\t\n\t\tlp.setUserName(username);\n\t\tlp.setPassword(password);\n\t\tlp.clickLogin();\n\t\tlogger.info(\"login passed\");\n\t\t\n\t\t//getting cutsomers page\n\t\tscp.clickCustomers();\n\t\tscp.clickCustomers1();\n\t\tlogger.info(\"customers page \");\n\t\t\n\t\t//choosing a customer to edit and editing them\n\t\tedcp.editCustomer(edcp.btnEdit2);\n\t\tlogger.info(\"edit customer clicked\");\n\t\t\n\t\t//editing company\n\t\tedcp.editCompany(\"busy QA\");\n\t\tlogger.info(\"edited company info\");\n\t\t\n\t\t//saving\n\t\tedcp.saveCutomer();\n\t\tlogger.info(\"customer saved\");\n\t\t\n\t\tString s = edcp.alertMsgSaved.getText();\n\t\t\n\t\t//checking if true\n\t\tif(s.contains(\"The customer has been updated successfully.\"))\n\t\t{\n\t\t\tAssert.assertTrue(true);\n\t\t\tlogger.info(\"passed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcaptureScreen(driver, \"editTest\");\n\t\t\tAssert.assertTrue(false);\n\t\t\tlogger.info(\"failed\");\n\t\t}\n\t\tThread.sleep(2000);\n\t\tlp.clickLogout();\n\t}",
"@Test\n\tpublic void testEditCommand1() {\n\t\tString label = \"TEST\";\n\t\ttestData.getTaskMap().put(label, new ArrayList<Task>());\n\t\ttestData.addTask(new Task(1, label , \"Task 1\",\n\t\t\t\tnew TDTDateAndTime(), false));\n\t\ttestData.addTask(new Task(2, label, \"Task 2\",\n\t\t\t\tnew TDTDateAndTime(), false));\n\t\ttestData.addTask(new Task(3, label, \"Task 3\",\n\t\t\t\tnew TDTDateAndTime(), false));\n\t\t\n\t\tEditCommand comd = new EditCommand(label, 2, \"EDITED\", new TDTDateAndTime(), false);\n\t\tassertEquals(EditCommand.MESSAGE_EDIT_FEEDBACK, comd.execute(testData));\n\t\t\n\t\tArrayList<Task> taskList = testData.getTaskListFromLabel(label);\n\t\tassertEquals(3, taskList.size());\n\t\tassertEquals(\"EDITED\", taskList.get(1).getDetails());\n\t\t\n\t}",
"public void editOperation() {\n\t\t\r\n\t}",
"@Override\n\tpublic void perform() {\n\t\tcontrol.openSkillEditor();\n\t}",
"public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-tab-panel-noborder') and not(contains(@class,'x-hide-display'))]//button[contains(@class,'icon-ov-edit')]\").click();\r\n\t\t\r\n\t}",
"public EditTeamPage pressEditButton() {\n controls.getEditButton().click();\n return new EditTeamPage();\n }",
"public abstract void edit();",
"@Test\n\tpublic void testEditCommand2() {\n\t\tString label = \"TEST\";\n\t\ttestData.getTaskMap().put(label, new ArrayList<Task>());\n\t\ttestData.addTask(new Task(1, label , \"Task 1\",\n\t\t\t\tnew TDTDateAndTime(), false));\n\t\ttestData.addTask(new Task(2, label, \"Task 2\",\n\t\t\t\tnew TDTDateAndTime(), false));\n\t\ttestData.addTask(new Task(3, label, \"Task 3\",\n\t\t\t\tnew TDTDateAndTime(), false));\n\n\t\tEditCommand comd = new EditCommand(label, 3, \"EDITED\", new TDTDateAndTime(), false);\n\t\tassertEquals(EditCommand.MESSAGE_EDIT_FEEDBACK, comd.execute(testData));\n\n\t\tArrayList<Task> taskList = testData.getTaskListFromLabel(label);\n\t\tassertEquals(3, taskList.size());\n\t\tassertEquals(\"EDITED\", taskList.get(2).getDetails());\n\n\t}",
"public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}",
"@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}",
"@Override\n public void testCreateAsEditor() {}",
"void onEditClicked();",
"public ViewResumePage clickonedit() throws Exception{\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(edit);\r\n\t\t\t\tflag = element.isDisplayed() && element.isEnabled();\r\n\t\t\t\tAssert.assertTrue(flag, \"Edit button is not displayed\");\r\n\t\t\t\telement.click();\r\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Edit Button NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn new ViewResumePage(driver);\r\n\t\t\r\n\t}",
"public void editBtnOnclick()\r\n\t{\r\n\t\tif(cardSet.getCards().size() != 0)\r\n\t\t\tMainRunner.getSceneSelector().switchToCardEditor();\r\n\t}",
"private void performDirectEdit() {\n\t}",
"@LogMethod\r\n private void editResults()\r\n {\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n waitAndClickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable table = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"No rows should be editable\", 0, DataRegionTable.updateLinkLocator().findElements(table.getComponentElement()).size());\r\n assertElementNotPresent(Locator.button(\"Delete\"));\r\n\r\n // Edit the design to make them editable\r\n ReactAssayDesignerPage assayDesignerPage = _assayHelper.clickEditAssayDesign(true);\r\n assayDesignerPage.setEditableResults(true);\r\n assayDesignerPage.clickFinish();\r\n\r\n // Try an edit\r\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n clickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable dataTable = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"Incorrect number of results shown.\", 10, table.getDataRowCount());\r\n doAndWaitForPageToLoad(() -> dataTable.updateLink(dataTable.getRowIndex(\"Specimen ID\", \"AAA07XK5-05\")).click());\r\n setFormElement(Locator.name(\"quf_SpecimenID\"), \"EditedSpecimenID\");\r\n setFormElement(Locator.name(\"quf_VisitID\"), \"601.5\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"notAnumber\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"Could not convert value: \" + \"notAnumber\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"514801\");\r\n setFormElement(Locator.name(\"quf_Flags\"), \"This Flag Has Been Edited\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"EditedSpecimenID\", \"601.5\", \"514801\");\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/flagDefault.gif'][@title='This Flag Has Been Edited']\"), 1);\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/unflagDefault.gif'][@title='Flag for review']\"), 9);\r\n\r\n // Try a delete\r\n dataTable.checkCheckbox(table.getRowIndex(\"Specimen ID\", \"EditedSpecimenID\"));\r\n doAndWaitForPageToLoad(() ->\r\n {\r\n dataTable.clickHeaderButton(\"Delete\");\r\n assertAlert(\"Are you sure you want to delete the selected row?\");\r\n });\r\n\r\n // Verify that the edit was audited\r\n goToSchemaBrowser();\r\n viewQueryData(\"auditLog\", \"ExperimentAuditEvent\");\r\n assertTextPresent(\r\n \"Data row, id \",\r\n \", edited in \" + TEST_ASSAY + \".\",\r\n \"Specimen ID changed from 'AAA07XK5-05' to 'EditedSpecimenID'\",\r\n \"Visit ID changed from '601.0' to '601.5\",\r\n \"testAssayDataProp5 changed from blank to '514801'\",\r\n \"Deleted data row.\");\r\n }",
"public void testEditor() {\n // open sample file in Editor\n SourcePackagesNode sourcePackagesNode = new SourcePackagesNode(SAMPLE_PROJECT_NAME);\n Node sample1Node = new Node(sourcePackagesNode, SAMPLE1_PACKAGE_NAME);\n JavaNode sampleClass1Node = new JavaNode(sample1Node, SAMPLE1_FILE_NAME);\n sampleClass1Node.open();\n // find open file in editor\n EditorOperator eo = new EditorOperator(SAMPLE1_FILE_NAME);\n eo.setCaretPosition(\"public static void main\", true);\n int insertLine = eo.getLineNumber() + 2;\n eo.insert(\"\\n\", insertLine, 1); // NOI18N\n // Need to disable verification because shortcut \"sout\" is replaced\n // by \"System.out.println(\"\");\" and \"sout\" is not found in Editor\n eo.setCaretPositionToLine(insertLine);\n eo.txtEditorPane().setVerification(false);\n eo.txtEditorPane().typeText(\"sout\"); // NOI18N\n eo.txtEditorPane().typeKey('\\t');\n eo.txtEditorPane().setVerification(true);\n eo.insert(\"Hello\"); // NOI18N\n //eo.insert(\"System.out.println(\\\"Hello\\\");\\n\", insertLine+1, 1); // NOI18N\n final String textToCopy = \"System.out.println(\\\"Hello\\\");\"; // NOI18N\n eo.select(textToCopy);\n int oldDispatchingModel = JemmyProperties.getCurrentDispatchingModel();\n // \"Copy\"\n CopyAction copyAction = new CopyAction();\n try {\n copyAction.perform(eo);\n } catch (TimeoutExpiredException e) {\n // if not succed try it second time in Robot mode\n JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);\n copyAction.perform(eo);\n } finally {\n // set previous dispatching model\n JemmyProperties.setCurrentDispatchingModel(oldDispatchingModel);\n }\n // wait until clipboard contains text to copy\n try {\n new Waiter(new Waitable() {\n\n @Override\n public Object actionProduced(Object obj) {\n try {\n String text = Toolkit.getDefaultToolkit().getSystemClipboard().\n getContents(null).getTransferData(DataFlavor.stringFlavor).toString();\n return textToCopy.equals(text) ? Boolean.TRUE : null;\n } catch (UnsupportedFlavorException e) {\n // The following exception can be thrown when clipboard is empty.\n // java.awt.datatransfer.UnsupportedFlavorException: Unicode String\n // at org.openide.util.datatransfer.ExTransferable$Empty.getTransferData(ExTransferable.java:461)\n // Ignore this exception.\n return null;\n } catch (IOException ioe) {\n throw new JemmyException(\"Failed getting clipboard content.\", ioe);\n }\n }\n\n @Override\n public String getDescription() {\n return (\"Clipboard contains \" + textToCopy); // NOI18N\n }\n }).waitAction(null);\n } catch (Exception ie) {\n throw new JemmyException(\"Interrupted.\", ie);\n }\n eo.insert(\"int xxxx;\\n\", insertLine + 1, 1); // NOI18N\n eo.select(\"int xxxx;\"); // NOI18N\n PasteAction pasteAction = new PasteAction();\n try {\n pasteAction.perform(eo);\n } catch (TimeoutExpiredException e) {\n // if not succed try it second time in Robot mode\n JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);\n pasteAction.perform(eo);\n } finally {\n // set previous dispatching model\n JemmyProperties.setCurrentDispatchingModel(oldDispatchingModel);\n }\n eo.select(\"Hello\", 1); // NOI18N\n // \"Delete\"\n DeleteAction deleteAction = new DeleteAction();\n deleteAction.performMenu(eo);\n // wait Hello is deleted\n eo.txtEditorPane().waitText(\"System.out.println(\\\"\\\");\"); // NOI18N\n eo.insert(\"Good bye\"); // NOI18N\n // test cut action\n eo.select(3);\n // \"Cut\"\n CutAction cutAction = new CutAction();\n try {\n cutAction.perform(eo);\n } catch (TimeoutExpiredException e) {\n // if not succed try it second time in Robot mode\n JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);\n cutAction.perform(eo);\n } finally {\n // set previous dispatching model\n JemmyProperties.setCurrentDispatchingModel(oldDispatchingModel);\n }\n // need to wait a little until editor content is refreshed after cut action\n new EventTool().waitNoEvent(500);\n // select from column 1 to 2 at line 3 \n eo.select(2, 1, 2);\n try {\n pasteAction.perform(eo);\n } catch (TimeoutExpiredException e) {\n // if not succed try it second time in Robot mode\n JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);\n pasteAction.perform(eo);\n } finally {\n // set previous dispatching model\n JemmyProperties.setCurrentDispatchingModel(oldDispatchingModel);\n }\n }",
"@Test\n void editTask() {\n }",
"public void selectEditProfileOption() {\n\t\ttry {\n\t\t\t//Utility.wait(editProfile);\n\t\t\teditProfile.click();\n\t\t\tLog.addMessage(\"Edit Profile option selected\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to select EditProfile option\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to select EditProfile option\");\n\t\t}\n\t}",
"protected abstract void editItem();",
"@FXML\n\tpublic void editClicked(ActionEvent e) {\n\t\tMain.getInstance().navigateToDialog(\n\t\t\t\tConstants.EditableCourseDataViewPath, course);\n\t}",
"public void switchToEditMode() {\n if (isAspectSelected()) {\n aspectContainer.unselect(this);\n return;\n }\n if (featureDiagramView.hasCollapsedElements(false)) {\n featureDiagramView.updateFeaturesDisplay(true);\n } else {\n updateColorsFromSelection();\n }\n featureDiagramView.changeHandlers(HandlerFactory.INSTANCE.getFeatureEditModeHandler());\n }",
"private void editScriptButtonActionPerformed() {\n // DEBUG CODE load the test script script\n String script = \"\";\n\n try {\n script = ScriptsDAO.getTextForBuiltInScript(\"utils/aspace/\", \"mapper.bsh\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n // if we running in standalone mode in pre update 15\n if (mainFrame == null || mainFrame.getAtVersionNumber().contains(\"15\") || mainFrame.getAtVersionNumber().contains(\"16\")) {\n if (cvd == null) {\n cvd = new CodeViewerDialog(this, SyntaxConstants.SYNTAX_STYLE_JAVA, script, true, false);\n }\n\n cvd.setTitle(\"Mapper Script Editor\");\n cvd.pack();\n cvd.setVisible(true);\n } else {\n // check to see if we have a viewer dialog, if not initialize one\n if (svd == null) {\n svd = new ScriptViewerDialog(this, \"Mapper Script Editor\");\n }\n\n svd.setCurrentScript(script);\n svd.pack();\n svd.setVisible(true);\n }\n }",
"@Override\r\n protected void onTriggerClick(ComponentEvent ce)\r\n {\r\n showEditor(ConceptPicker.this);\r\n }",
"public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }",
"public void clickOpenEditDialog(Item item){\n /** Store as public reference */\n this.item = item;\n dialogNewItem.show();\n }",
"boolean openPageInEditMode();",
"@FXML\n public void editSet(MouseEvent e) {\n AnchorPane root = null;\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/learn_update.fxml\"));\n try {\n root = loader.load();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n LearnUpdateController controller = loader.getController();\n controller.initData(txtTitle.getText(), rootController, learnController, apnLearn);\n rootController.setActivity(root);\n root.requestFocus();\n }",
"public void onPressEdit() {\r\n Intent intent = new Intent(this, CreateEventActivity.class);\r\n intent.putExtra(CreateEventActivity.EXTRA_EDIT_EVENT_UID, event.uid);\r\n startActivity(intent);\r\n }",
"public void clickedPresentationEdit() {\n\t\tif(mainWindow.getSelectedRowPresentation().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowPresentation().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tshowPresentationDetails(mainWindow.getSelectedRowPresentation()[0]);\n\t\t}\t\n\t}",
"public void run() {\n\t\tISelection selection = viewer.getSelection();\n\t\tif (selection.isEmpty()) {\n\t\t\tthis.setEnabled(false);\n\t\t}\n\t\tTreeObject object = (TreeObject) ((IStructuredSelection) selection)\n\t\t\t\t.getFirstElement();\n\t\tif (object instanceof DocumentTreeObject) {\n\n\t\t\tString oldValue = object.getValue().toString();\n\t\t\t\n\t\t\tIInputValidator validator = new TextValidator(oldValue);\n\t\t\tInputDialog dialog = new InputDialog(parent.getShell(), Properties\n\t\t\t\t\t.getProperty(\"rename\"), Properties.getProperty(\"new_name\"),\n\t\t\t\t\toldValue, validator);\n\t\t\tdialog.setBlockOnOpen(true); // waits for user enter a name\n\n\t\t\tint res = dialog.open(); // opens the rename dialog\n\n\t\t\tif (res == InputDialog.OK) {\n\t\t\t\tString newValue = dialog.getValue();\n\t\t\t\t\n\t\t\t\tString newExtension = GUIUtil.getFileExtension(newValue);\n\t\t\t\tString oldExtension = GUIUtil.getFileExtension(oldValue);\n\t\t\t\t\t\t\n\t\t\t\tif(!newExtension.equalsIgnoreCase(oldExtension)){\n\t\t\t\t\tnewValue += oldExtension;\n\t\t\t\t}\n\n\t\t\t\tif (!newValue.equalsIgnoreCase(oldValue)) {\n\t\t\t\t\tif (!ProjectManagerController.getInstance().renameDocument(\n\t\t\t\t\t\t\toldValue, newValue)) {\n\t\t\t\t\t\tMessageDialog.openError(parent.getShell(), Properties\n\t\t\t\t\t\t\t\t.getProperty(\"error_while_renaming\"),\n\t\t\t\t\t\t\t\tProperties.getProperty(\"can_not_rename\"));\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tGUIManager.getInstance().refreshViews();\n\t\t\t\t\t} catch (TargetException e) {\n\t\t\t\t\t\tMessageDialog\n\t\t\t\t\t\t\t\t.openError(\n\t\t\t\t\t\t\t\t\t\tthis.parent.getShell(),\n\t\t\t\t\t\t\t\t\t\tProperties\n\t\t\t\t\t\t\t\t\t\t\t\t.getProperty(\"error_while_reloading_project\"),\n\t\t\t\t\t\t\t\t\t\te.getMessage());\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}",
"private void editKnowledge(EditView editView) {\n\n if (!checkIfKnowledgeBaseLoaded()) {\n return;\n }\n\n try {\n URL editUrl = getClass().getResource(\"/fxml/Edit.fxml\");\n Context.getInstance().setCurrentEditView(editView);\n\n AnchorPane editViewPane = FXMLLoader.load(editUrl);\n BorderPane border = MainFrame.getRoot();\n\n border.setCenter(editViewPane);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }",
"@Test(priority=15,description=\"Edit Staff\",dependsOnGroups= {\"UserLogin.login\"},enabled=true)\n@Parameters({\"staffName\",\"index\"})\npublic void editStaff(String staffName,int index) throws Throwable {\n\t UserLogin.driver.findElement(By.xpath(\"//*[@id=\\\"navbar-collapse\\\"]/ul/li[1]/a[2]/span[2]\")).click();\n\t\n\t\tUserLogin.entities.click();\n\t\tString s= UserLogin.entities.getText();\n\t\tSystem.out.println(s);\n\t\t\n\t\t//Navigate to the Staff page\n\t\tUserLogin.driver.findElement(By.xpath(\"//a[@href='#/staff']\")).click();\t\t \n\t\ttitle = UserLogin.driver.getTitle();\n\t\tSystem.out.println(title);\n\t\texpected = \"Staffs\";\n\t\tAssert.assertEquals(title, expected);\n\t\t \n\t\t//Edit a staff\n\t\tUserLogin.driver.findElement(By.xpath(\"/html/body/div[3]/div[1]/div/div[4]/table/tbody/tr[2]/td[4]/button[2]\")).click();\n\t\t // /html/body/div[3]/div[1]/div/div[4]/table/tbody/tr[2]/td[4]/button[2]\n\t\tThread.sleep(3000);\n\t\ttitle = UserLogin.driver.getTitle();\n\t\tSystem.out.println(\"title of page is \"+title);\n\t\tUserLogin.driver.findElement(By.name(\"name\")).clear();\n\t\tUserLogin.driver.findElement(By.name(\"name\")).sendKeys(staffName);\n\t\tWebElement dropdown = UserLogin.driver.findElement(By.name(\"related_branch\"));\n\t\t//search.sendKeys(\"dubai\");\n\t Thread.sleep(2000);\n\t\tSelect sel=new Select(dropdown);\t\n\t\t//sel.selectByVisibleText(brName);\n\t\t//sel.selectByValue(\"number:21\");\n\t\tsel.selectByIndex(index);\t\n\t\tSystem.out.println(\"hereeeeeee\");\n\t\tUserLogin.driver.findElement(By.xpath(\"//button[@type='submit']\")).click();\n\t\tThread.sleep(3000);\t\n\t\t\n\t\tAssert.assertTrue(UserLogin.driver.findElement(By.xpath(\"/html/body/div[3]/div[1]/div/div[4]/table/tbody/tr/td[2]\")).isDisplayed());\n\t\tSystem.out.println(\" Staff details edited\");\n\n\t}",
"public void startEditingPlanning() {\r\n bpCoordinator.startEditingPlanning();\r\n }",
"private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }",
"@Override\r\n\tpublic void launch(IEditorPart arg0, String arg1) {\n\r\n\t}",
"@Override\n public void execute(final SimInfo object) {\n SimulatorConfig config = object.getSimulatorConfig();\n defaultEditTabAction(config);\n\n\n }",
"public void EditandSavelist(String Editlistname){\r\n\t\tString editlist = getValue(Editlistname);\r\n\r\n\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Link should be edited and saved\");\r\n\t\ttry{\r\n\r\n\t\t\twaitForElement(locator_split(\"lnkeditlist\"));\r\n\t\t\tclick(locator_split(\"lnkeditlist\")); \r\n\r\n\t\t\tsleep(1000);\r\n\t\t\twaitForElement(locator_split(\"txtlistname\"));\r\n\t\t\tsendKeys(locator_split(\"txtlistname\"), editlist);\r\n\r\n\r\n\t\t\twaitForElement(locator_split(\"clksavelist\"));\r\n\t\t\tclick(locator_split(\"clksavelist\")); \r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Link is edited and saved\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Favorities is not clicked \"+elementProperties.getProperty(\"lnkFavorities\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkFavorities\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\t\r\n\r\n\r\n\t}",
"void gotoEditProfile();",
"public void putTestIntoView() {\n TestCase node = (TestCase) projectTree.getLastSelectedPathComponent();\n if (node == null)\n return;\n\n Main.mainProject.setCurrentCase(node);\n\n if (node.isLeaf()) {\n Main.interfaceFrame.clean();\n JPanel panel = Main.interfaceFrame.getMainPanel();\n\n switch (Main.interfaceFrame.getView()) {\n case InterfaceFrame.SINGLE:\n panel.add(new SingleView(node));\n break;\n case InterfaceFrame.DOUBLE:\n panel.add(new DoubleView(node));\n break;\n case InterfaceFrame.MASK:\n panel.add(new MaskView(node));\n break;\n }\n panel.validate();\n }\n }",
"public void handleEditAll(ActionEvent actionEvent) throws Exception {\n\t\tString id = txtDisID.getText();\n\t\tItem preSelected = selectedItem;\n\n\t\tif(!id.isEmpty() && id != null){\n\t\t\tStage newItemWindow = new Stage();\n\t\t\tnewItemWindow.setTitle(\"Edit Item\");\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/views/editItem.fxml\"));\n\t\t\tnewItemWindow.setScene(new Scene(loader.load()));\n\t\t\tnewItemWindow.initModality(Modality.APPLICATION_MODAL);\n//\t\t\tnewItemWindow.getIcons().add(new Image(MainWindowController.class.getResourceAsStream(\"../IMS icon.png\")));\n\t\t\tnewItemWindow.setResizable(false);\n\n\t\t\tEditItemController controller = loader.<EditItemController>getController();\n\t\t\tcontroller.setItemId(id);\n\n\t\t\tnewItemWindow.showAndWait();\n\t\t\trefreshTable();\n\t\t} else {\n\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t\t\talert.setTitle(\"Error\");\n\t\t\talert.setHeaderText(\"There is no item to Edit\");\n\t\t\talert.setContentText(\"Please select the item before edit !\");\n\n\t\t\talert.showAndWait();\n\t\t}\n\t}",
"public void switchToEditor() {\r\n\t\teditPane.addEditTabs(editTabs);\r\n\t\tlayout.show(this, \"editPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public String loadMainEdit(){\r\n\t\treturn \"edit\";\r\n }",
"public void onEditAgendaItem() {\n AgendaItem agendaItem = outputAgendaItemsPreparation.getSelectionModel().getSelectedItem();\n\n if (agendaItem == null) {\n AlertHelper.showError(LanguageKey.ERROR_AGENDAITEM_NULL, null);\n return;\n }\n\n AgendaItemDialog agendaItemDialog = AgendaItemDialog.getNewInstance(agendaItem);\n if (agendaItemDialog == null) {\n // Exception already handled\n return;\n }\n Optional<AgendaItem> result = agendaItemDialog.showAndWait();\n if (!result.isPresent()) {\n return;\n }\n\n if (controller.editAgendaItem(result.get())) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_AGENDAITEM_EDIT, null);\n }",
"@Override\n public void run() {\n TextActionsProvider actionsProvider = textpage.getActionsProvider();\n Object object = actionsProvider.getTextActions().get(\"Edit/Edit_Undo\");\n if (object != null) {\n actionsProvider.invokeAction(object);\n editor.save();\n }\n }",
"@Test\n\t public void testleadEdit() throws InterruptedException {\n\t\t List <WebElement> options = driver.findElement(By.id(\"tree_menu\")).findElements(By.className(\" close\"));\n\t\t System.out.println(\"The left pane has '\" + options.size() + \"' Options\");\t\t \n\t\t System.out.println(\"The option selected is:\" + options.get(7).getText());\n\t\t options.get(7).findElement(By.tagName(\"span\")).click();\n\t\t \n\t\t //Clicking on Edit Leads link\n\t\t System.out.println(\"Click on the '\" + driver.findElement(By.id(\"editLeads\")).getText() + \"' Link\" );\n\t\t driver.findElement(By.id(\"editLeads\")).click();\n\t\t \n\t\t //Verifying whether the required page is loaded or not\n\t\t System.out.println(\"Page loaded is:\" + driver.findElement(By.id(\"container\")).findElement(By.tagName(\"h1\")).getText());\n\t\t \n\t\t //Selecting no.of entries for the table\n\t\t driver.findElement(By.id(\"example_length\")).click();\n\t\t List <WebElement> entries = driver.findElement(By.name(\"example_length\")).findElements(By.tagName(\"option\"));\n\t\t Thread.sleep(4000);\n\t\t System.out.println(entries.size());\n\t\t Random r = new Random();\n\t\t int opt = r.nextInt(entries.size());\n\t\t entries.get(opt).click();\n\t\t System.out.println(\"No.of Entries selected for the page:\" + entries.get(opt).getText());\n\t\t \n\t\t //Verifying no.of leads in the page\n\t\t List <WebElement> leads = driver.findElement(By.id(\"example\")).findElement(By.tagName(\"tbody\")).findElements(By.tagName(\"tr\"));\n\t\t System.out.println(\"No. of leads in the Lead Edit Table:\" + leads.size());\n\t\t \n\t\t //Checking for the Track it and Edit buttons for each lead\n\t\t int edit=0, trackit=0;\n\t\t for(int i=0; i<leads.size(); i++) {\n\t\t\tif((leads.get(i).findElement(By.className(\"analyse\")).isEnabled()) && (leads.get(i).findElement(By.className(\"edit\")).isEnabled())) {\n\t\t\t edit++;\n\t\t\t trackit++;\n\t\t\t}\t \n\t\t }\n\t\t if((edit==leads.size()) && (trackit==leads.size()))\n\t\t\t System.out.println(\"Trackit and Edit buttons are enabled for all leads.\");\n\t\t \n\t\t //Validating the Track it button\n\t\t Random r1 = new Random();\n\t\t int opt1 = r1.nextInt(leads.size());\n\t\t leads.get(3).findElement(By.className(\"analyse\")).click();\n\t\t \n\t\t \n\t\t \n\t\t //Printing the details of the table\n\t\t String details = driver.findElement(By.tagName(\"table\")).findElement(By.tagName(\"tbody\")).getText();\n\t\t System.out.println(details);\n\t\t \n\t\t driver.findElement(By.id(\"editLeads\")).click();\n\t\t driver.findElement(By.name(\"example_length\")).findElements(By.tagName(\"option\")).get(3).click();\n\t\t sleep(5);\n\t\t driver.findElement(By.id(\"example\")).findElement(By.tagName(\"tbody\")).findElements(By.tagName(\"tr\")).get(opt1).findElement(By.className(\"edit\")).click();\n\t\t sleep(5);\n\t\t System.out.println(driver.findElement(By.cssSelector(\"span.ui-dialog-title\")).getText());\n\t\t \n\t\t \n\t \n\t \n\t \n\t }",
"private void editItem(InspectionPlanTemplateDTO item) {\n int newRowIndex = this.tbl_view_charGroup_overview.getCurrentItemsCount() - 1;\n this.tbl_view_charGroup_overview.scrollTo(newRowIndex);\n // Put the second column in editing mode\n TreeTableColumn<InspectionPlanTemplateDTO, ?> firstCol = tbl_view_charGroup_overview.getColumns().get(1);\n // \n this.tbl_view_charGroup_overview.getFocusModel().focus(newRowIndex, firstCol);\n tbl_view_charGroup_overview.edit(newRowIndex, firstCol);\n // set active\n item.setActive(1);\n\n }",
"public void clickAssertionEdit() {\r\n\t\tString Expected2 = \"Assessment edited\";\r\n\t\tString Actualtext2 = driver.findElement(By.xpath(\"//*[@id=\\\"content-section\\\"]/div/div[2]\")).getText();\r\n\t\tAssert.assertEquals(Actualtext2, Expected2);\r\n\t\tSystem.out.println(Actualtext2);\r\n\t}",
"@Test\n\tpublic void test5_verifyEditor() throws GeneralLeanFtException {\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"Test 5 - Verify Editor Started\");\n\t\t\t\n\t\t\t//Check that the Main window should exist\n\t\t\tassertTrue(mySet.appExistsorNot());\t\t\t\n\n\t\t\t//Toolbar Object\n\t\t\tToolBar toolbar = mySet.OR.MainWindow().ToolBar(); \n\n\t\t\t// Clicking the JEditorPane button displays the Editor test object.\n\t\t\ttoolbar.getButton(\"JEditorPane\").press();\n\n\t\t\t// Create a description for the Editor test object.\n\t\t\tEditor edit = mySet.OR.MainWindow().JEditor();\n\n\t\t\t// Verify that the editor in this AUT is read-only HTML with links.\n\t\t\tassertTrue(edit.isReadOnly());\n\n\t\t\t// Click the link to king.html.\n\t\t\tedit.clickLink(\"king.html\");\n\n\t\t\t// Verify that the correct page loaded by checking the text. \n\t\t\tString expectedTextPrefix = \"Do here most humbly lay this small Present\";\n\t\t\tString text = edit.getText().trim().replaceAll(\"[\\n\\r]\", \"\").replaceAll(Character.toString((char)160), \"\");\n\n\t\t\tSystem.out.println(\"Text fetched - \" + text); \n\n\t\t\tassertTrue(text.startsWith(expectedTextPrefix));\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unexpected Error Occurred. Message = \" + e.getMessage());\n\t\t\tassertTrue(false);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSystem.out.println(\"Test 5 - Verify Editor finished\");\t\n\t\t}\n\t}",
"@Override\n public void handleEditStart ()\n {\n\n }",
"public static void goToEditSongWindow()\n {\n EditSongWindow editSongWindow = new EditSongWindow();\n editSongWindow.setVisible(true);\n editSongWindow.setFatherWindow(actualWindow, false);\n }",
"private void handleSearchButtonSelected() {\n\t\tShell shell = getShell();\n\t\tIProject project = getProject(editorLocal.getProjectName());\n\t\tIJavaProject javaProject = JavaCore.create(project);\n\t\tIType[] types = new IType[0];\n\t\tboolean[] radioSetting = new boolean[2];\n\t\ttry {\n\t\t\t// fix for Eclipse bug 66922 Wrong radio behaviour when switching\n\t\t\t// remember the selected radio button\n\t\t\tradioSetting[0] = mTestRadioButton.getSelection();\n\t\t\tradioSetting[1] = mTestContainerRadioButton.getSelection();\n\t\t\ttypes = TestSearchEngine.findTests(getLaunchConfigurationDialog(), javaProject, getTestKind());\n\t\t} catch (InterruptedException e) {\n\t\t\tsetErrorMessage(e.getMessage());\n\t\t\treturn;\n\t\t} catch (InvocationTargetException e) {\n\t\t\tLOG.error(\"Error finding test types\", e);\n\t\t\treturn;\n\t\t} finally {\n\t\t\tmTestRadioButton.setSelection(radioSetting[0]);\n\t\t\tmTestContainerRadioButton.setSelection(radioSetting[1]);\n\t\t}\n\t\tSelectionDialog dialog = new TestSelectionDialog(shell, types);\n\t\tdialog.setTitle(JUnitMessages.JUnitLaunchConfigurationTab_testdialog_title);\n\t\tdialog.setMessage(JUnitMessages.JUnitLaunchConfigurationTab_testdialog_message);\n\t\tif (dialog.open() == Window.CANCEL) {\n\t\t\treturn;\n\t\t}\n\t\tObject[] results = dialog.getResult();\n\t\tif ((results == null) || (results.length < 1)) {\n\t\t\treturn;\n\t\t}\n\t\tIType type = (IType) results[0];\n\t\tif (type != null) {\n\t\t\tmTestText.setText(type.getFullyQualifiedName('.'));\n\t\t}\n\t}",
"@FXML\n void handleEdit(ActionEvent event) {\n if (checkFields()) {\n\n try {\n //create a pseudo new environment with the changes but same id\n Environment newEnvironment = new Environment(oldEnvironment.getId(), editTxtName.getText(), editTxtDesc.getText(), editClrColor.getValue());\n\n //edit the oldenvironment\n Environment.edit(oldEnvironment, newEnvironment);\n } catch (SQLException exception) {\n //failed to save a environment, IO with database failed\n Manager.alertException(\n resources.getString(\"error\"),\n resources.getString(\"error.10\"),\n this.dialogStage,\n exception\n );\n }\n //close the stage\n dialogStage.close();\n } else {\n //fields are not filled valid\n Manager.alertWarning(\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid.content\"),\n this.dialogStage);\n }\n Bookmark.refreshBookmarksResultsProperty();\n }",
"@Test\n\tpublic void editBillTo(){\n\t\tQuotePage quotePage = homePage.goToDocumentsPage().switchToTab(DocumentTabs.QUOTES).setFilterByModifiedBy(\"All\").goToQuote(1);\n\n\t\tquotePage.clickBillTo();\n\t}",
"@Test\r\n\tpublic void validEditTest() {\n\t\tadminUserEdit.clickAdminLink();\r\n\t\tadminUserEdit.clickUserListLink();\r\n\t\tadminUserEdit.clickEditUserLink();\r\n\t\t\r\n\t\t// Assertion\r\n\t\tString Actual = adminUserEdit.Assertion();\r\n\t\tString Expected = \"Hari\";\r\n\t\tassertEquals(Actual, Expected);\r\n\t\tscreenShot.captureScreenShot(\"TC019\");\r\n\t}",
"public abstract void acceptEditing();",
"public void edit_actionPerformed(ActionEvent e) {\n\t\t\n\t\tif (edit.isSelected()) {\n\t\t\t\n\t\t\teditor.validate();\n\t\t\teditor.repaint();\n\t\t\t\n\t\t\t//Reset edit components values\n\t\t\tresetEdit();\n\t\t\t\n\t\t\t//Configure editor panel\n\t\t\tinitEditorPanel();\n\t\t\t\n\t\t\tmyParent.editCM = true;\n\t\t\tmyParent.extendCM = false;\n\t\t\tmyParent.mullionsPanel.selectedHV = 0;\n\n //Setting type action event\n myParent.setActionTypeEvent(MenuActionEventDraw.EDIT_COUPLER_MULLION.getValue());\n\t\t\t\n\t\t\tvC.setSelected(false);\n\t\t\thC.setSelected(false);\n\t\t\tvC.setEnabled(false);\n\t\t\thC.setEnabled(false);\n\t\t\t\n\t\t\tcouplerTypeC.setEnabled(false);\n\t\t\t\n\t\t\tedit.setEnabled(false);\n\t\t\tcancel.setVisible(true);\n\t\t\tcancel.setEnabled(true);\n\t\t\tthis.enableDisableBySeries();\n\t\t\t\n\t\t\twhichFeature.validate();\n\t\t\twhichFeature.repaint();\n\t\t}\n\t}",
"@Test\r\n\tpublic void editChapterDriver() {\r\n\t\tfinal Object testingData[][] = {\r\n\t\t\t{ // Successful test\r\n\t\t\t\t\"producer3\", 315, null\r\n\t\t\t}, { // A producer tries to edit a content of another producer\r\n\t\t\t\t\"producer1\", 315, IllegalArgumentException.class\r\n\t\t\t}, { // A user tries to create a content\r\n\t\t\t\t\"user3\", 315, IllegalArgumentException.class\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfor (int i = 0; i < testingData.length; i++)\r\n\t\t\tthis.editionChapterTemplate((String) testingData[i][0], (Integer) testingData[i][1], (Class<?>) testingData[i][2]);\r\n\t}",
"public void clickOnEditButtonOnSavedSearches() {\r\n\t\tprint(\"Click on Edit under Saved Searches Section\");\r\n\t\tlocator = Locator.MyTrader.Saved_Search_Edit.value;\r\n\t\tclickOn(locator);\r\n\t\tsleep(2000);\r\n\t\tAssert.assertTrue(isElementPresent(Locator.MyTrader.Your_Saved_Searches.value));\r\n\t}",
"public edit() {\n initComponents();\n }",
"@FXML\n\tprivate void handleEditTaxi() {\n\t\tTaxi selectedTaxi = TaxiTable.getSelectionModel().getSelectedItem();\n\t\tif (selectedTaxi != null) {\n\t\t\tboolean okClicked = mainApp.showTaxiEditDialog(selectedTaxi);\n\t\t\tif (okClicked) {\n\t\t\t\tshowTaxiDetails(selectedTaxi);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// Nothing selected.\n//\t\t\tDialogs.create()\n//\t\t\t\t.title(\"No Selection\")\n//\t\t\t\t.masthead(\"No Taxi Selected\")\n//\t\t\t\t.message(\"Please select a Taxi in the table.\")\n//\t\t\t\t.showWarning();\n\t\t}\n\t}",
"public void executeMatcher(final BaseMatcher<EditPart> matcher){\n\t\tactivate();\n\t\tDisplay.syncExec(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n DefaultCTabItem tabItem = new DefaultCTabItem(1);\n\t\t\t\ttabItem.activate();\n\t\t\t\tGraphicalViewer viewer = ((IEditorPart) tabItem.getSWTWidget().getData()).getAdapter(GraphicalViewer.class);\n\t\t\t\tViewerHandler.getInstance().getEditParts(viewer, matcher);\n\t\t\t}\n\t\t});\n\t}",
"@FXML\n\tprivate void handleEdit() {\n\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\tshowCustomerInfoDialog(customer);\n\t}",
"public void DoEdit() {\n \n int Row[] = tb_User.getSelectedRows();\n if (Row.length > 1) {\n JOptionPane.showMessageDialog(null, \"You can choose only one user edit at same time!\");\n return;\n }\n if (tb_User.getSelectedRow() >= 0) {\n EditUser eu = new EditUser(this);\n eu.setVisible(true);\n\n } else {\n JOptionPane.showMessageDialog(null, \"You have not choose any User to edit\");\n }\n }",
"public void clickOnEditButtonOnSavedListings() {\r\n\t\tprint(\"Click on Edit under Saved Listing Section\");\r\n\t\tlocator = Locator.MyTrader.Saved_Listing_Edit.value;\r\n\t\tclickOn(locator);\r\n\t\tAssert.assertTrue(isElementPresent(Locator.MyTrader.Your_Saved_Listing.value));\r\n\t}",
"void actionEdit(int position);",
"public abstract void checkEditing();",
"public void onEditParticipant() {\n Participant participant = outputParticipants.getSelectionModel().getSelectedItem();\n\n if (participant == null) {\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_NULL, null);\n return;\n }\n\n ParticipantDialog participantDialog = ParticipantDialog.getNewInstance(participant);\n if (participantDialog == null) {\n // Exception already handled\n return;\n }\n Optional<Participant> result = participantDialog.showAndWait();\n if (!result.isPresent()) {\n return;\n }\n\n if (controller.editParticipant(result.get())) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_EDIT, null);\n }",
"public void editMode(String newType, String newTarget, String oldContent)\n\t{\n\t\tif (cs == ConnState.EDITING)\n\t\t{\n\t\t\tsendln(\"You're already editing. Exit your current buffer first.\");\n\t\t\treturn;\n\t\t}\n\t\tpromptTarget = newTarget;\n\t\tpromptType = newType;\n\t\tlastCs = cs;\n\t\tcs = ConnState.EDITING;\n\t\tsendln(\"{G /s - Save and Close /q - Close Without Saving /h - View Help & Commands\");\n\t\tsendln(\"{G---------------------------------------------------------------------------\");\n\t\teditorContents = new ArrayList<String>();\n\t\tif (oldContent.length() > 0)\n\t\t{\n\t\t\tString oldContents[] = oldContent.split(\"\\\\^/\", -1);\n\t\t\tfor (int ctr = 0; ctr < oldContents.length; ctr++)\n\t\t\t\teditorContents.add(oldContents[ctr]);\n\t\t}\n\t}",
"@Test(groups = \"Transactions Tests\", description = \"Edit transaction\")\n\tpublic void editTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickEditBtnFromTransactionItem(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionDescription(\"Bonus\");\n\t\tTransactionsScreen.typeTransactionAmount(\"600\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Bonus\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$600\"));\n\t\ttest.log(Status.PASS, \"Sub-account edited successfully and the value is correct\");\n\n\t\t//Testing if the edited transaction was edited in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Bonus\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$600\"));\n\t\ttest.log(Status.PASS, \"Transaction in the 'Double Entry' account was edited too and the value is correct\");\n\n\t}",
"public void test2() {\n\t\tString sessionName = \"test2\";\n\t\tboolean success = collabEditingService.joinSession(sessionName);\n//\t\tif (success) collabEditingService.showDocument(); // debug\n\t\t\n\t}",
"public static void editButtonAction(ActionContext actionContext){\n Table dataTable = actionContext.getObject(\"dataTable\");\n Shell shell = actionContext.getObject(\"shell\");\n Thing store = actionContext.getObject(\"store\");\n \n TableItem[] items = dataTable.getSelection();\n if(items == null || items.length == 0){\n MessageBox box = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);\n box.setText(\"警告\");\n box.setMessage(\"请先选择一条记录!\");\n box.open();\n return;\n }\n \n store.doAction(\"openEditForm\", actionContext, \"record\", items[0].getData());\n }",
"public void doButtonBearbeiten() {\n\t\tif (this.anzeige.getSelectedRow() >= 0) {\n\t\t\tswitch (this.getType()) {\n\t\t\tcase 0:\n\t\t\t\tfinal TabellenspaltenModel ts = (TabellenspaltenModel) this.tabelle.getTabellenspalteAt(this.anzeige\n\t\t\t\t\t\t.getSelectedRow());\n\t\t\t\tnew FrameEditorDjinn(StrUtil.FromHTML(\"Ändern Tabellenspalte \") + ts.getName(), ts, false, null) {\n\t\t\t\t\tpublic void doClosed() {\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void doChanged(boolean saveOnly) {\n\t\t\t\t\t\ttabelle.removeTabellenspalte(ts);\n\t\t\t\t\t\tts.setTabelle(tabelle);\n\t\t\t\t\t\ttabelle.addTabellenspalte(ts);\n\t\t\t\t\t\tdoRepaint();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tfinal ToStringContainer tsc = (ToStringContainer) this.tabelle.getToStringMembers()[this.anzeige\n\t\t\t\t\t\t.getSelectedRow()];\n\t\t\t\tnew FrameEditorDjinn(StrUtil.FromHTML(\"Ändern ToStringContainer\"), tsc, false, null) {\n\t\t\t\t\tpublic void doClosed() {\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void doChanged(boolean saveOnly) {\n\t\t\t\t\t\tdoRepaint();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tfinal ToStringContainer tsc0 = (ToStringContainer) this.tabelle.getComboStringMembers()[this.anzeige\n\t\t\t\t\t\t.getSelectedRow()];\n\t\t\t\tnew FrameEditorDjinn(StrUtil.FromHTML(\"Ändern ToStringContainer\"), tsc0, false, null) {\n\t\t\t\t\tpublic void doClosed() {\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void doChanged(boolean saveOnly) {\n\t\t\t\t\t\tdoRepaint();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tfinal OrderMember omm = (OrderMember) this.tabelle.getSelectionViewOrderMembers()[this.anzeige\n\t\t\t\t\t\t.getSelectedRow()];\n\t\t\t\tnew FrameEditorDjinn(StrUtil.FromHTML(\"Ändern OrderMember\"), omm, false, null) {\n\t\t\t\t\tpublic void doClosed() {\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void doChanged(boolean saveOnly) {\n\t\t\t\t\t\tdoRepaint();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tfinal SelectionMember smm = (SelectionMember) this.tabelle.getAuswahlMembers().elementAt(\n\t\t\t\t\t\tthis.anzeige.getSelectedRow());\n\t\t\t\tnew FrameEditorDjinn(StrUtil.FromHTML(\"Ändern SelectionMember\"), smm, false, null) {\n\t\t\t\t\tpublic void doClosed() {\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void doChanged(boolean saveOnly) {\n\t\t\t\t\t\tdoRepaint();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@FXML\n private void handleEditPerson() {\n Shops selectedShops = personTable.getSelectionModel().getSelectedItem();\n if (selectedShops != null) {\n boolean okClicked = mainApp.showPersonEditDialog(selectedShops);\n if (okClicked) {\n showPersonDetails(selectedShops);\n }\n\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"No Selection\");\n alert.setHeaderText(\"No Shops Selected\");\n alert.setContentText(\"Please select a person in the table.\");\n \n alert.showAndWait();\n }\n }",
"public void setupEditMode(MainGame game){\n GLFW.glfwSetKeyCallback(DisplayManager.getWindow(), (handle, key, scancode, action, mods) -> {\n if (key == GLFW_KEY_1) {\n objectType = 1;\n MouseHandler.disable();\n } else if (key == GLFW_KEY_2){\n objectType = 2;\n MouseHandler.disable();\n } else if (key == GLFW_KEY_ESCAPE){\n objectType = -1;\n MouseHandler.enable();\n } else if (key == GLFW_KEY_F5){\n entities.removeAll(trees);\n trees.clear();\n GameLoader.loadGameFile(\"./res/courses/terrainSaveFile.txt\", game);\n entities.addAll(trees);\n terrain.updateTerrain(loader);\n } else if (key == GLFW_KEY_F10){\n GameSaver.saveGameFile(\"saveGame\", game);\n }\n });\n }",
"@Override\n public void onClick(View view) {\n\n ((EditFragmentInterface) (view.getContext())).edit(projectId, false);\n }",
"@Override\n public void checkEditing() {\n }",
"@Test\n @DisplayName(\"Test: set your own content path\")\n public void testSetContextPath() throws InterruptedException, ClientException {\n FormContainerEditDialog dialog = formComponents.openEditDialog(containerPath);\n dialog.selectActionType(\"foundation/components/form/actions/store\");\n String actionInputValue = userContent + \"/xxx\";\n dialog.setActionInputValue(actionInputValue);\n Commons.saveConfigureDialog();\n editorPage.enterPreviewMode();\n Commons.switchContext(\"ContentFrame\");\n $(Selectors.SELECTOR_SUBMIT_BUTTON).click();\n JsonNode formContentJson = authorClient.doGetJson(actionInputValue , 1, HttpStatus.SC_OK);\n assertTrue(formContentJson.get(\"inputName\").toString().equals(\"\\\"inputValue\\\"\"),\"inputName field should be saved as inputValue\");\n }",
"public void run() {\n\t\t\t\t\n\t\t\t\tif (root != null) {\n\t\t\t\t\t\n\t\t\t\t\t// UIJob is needed because composites are used for xtext editors. \n\t\t\t\t\t// TODO: refactor the editors glue code in order to don't use the any UI objects for the validation of action code. \n\t\t\t\t\tUIJob UIjob = new UIJob(\"Component Modifications Validation\") {\n\t\t\t\t\t\tpublic IStatus runInUIThread(IProgressMonitor monitor) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tComponentModificationValidator validator = new ComponentModificationValidator(root);\n\t\t\t\t\t\t\tvalidator.validate();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tviewer.refresh();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn Status.OK_STATUS;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tUIjob.setUser(true);\n\t\t\t\t\tUIjob.schedule();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tMessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), \"Component Validation\", \n\t\t\t\t\t\t\t\"Please select a class in Model Explorer.\");\n\t\t\t\t}\n\t\t\t}",
"@FXML\r\n private void modifyPartAction() throws IOException {\r\n \r\n if (!partsTbl.getSelectionModel().isEmpty()) {\r\n Part selected = partsTbl.getSelectionModel().getSelectedItem();\r\n partToMod = selected.getId();\r\n generateScreen(\"AddModifyPartScreen.fxml\", \"Modify Part\");\r\n }\r\n else {\r\n displayMessage(\"No part selected for modification\");\r\n }\r\n \r\n }",
"public void editProjectAction() throws IOException {\n\t\tfinal List<Project> projects = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (projects.size() == 1) {\n\t\t\tfinal Project project = projects.get(0);\n\t\t\tfinal FXMLSpringLoader loader = new FXMLSpringLoader(appContext);\n\t\t\tfinal Dialog<Project> dialog = loader.load(\"classpath:view/Home_AddProjectDialog.fxml\");\n\t\t\tdialog.initOwner(addProject.getScene().getWindow());\n\t\t\t((AddProjectDialogController) loader.getController()).getContentController().setProjectToEdit(project);\n\t\t\tfinal Optional<Project> result = dialog.showAndWait();\n\t\t\tif (result.isPresent()) {\n\t\t\t\tlogger.trace(\"dialog 'edit project' result: {}\", result::get);\n\t\t\t\tupdateProjectList();\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic void launch(IEditorPart arg0, String arg1) {\n\t\tSystem.out.println(\"Launch Raoul by editor \" + arg1);\r\n\t}",
"public void toggleEdit()\n {\n \tif (editMode == false) {\n \t\teditMode = true;\n \t} else {\n \t\teditMode = false;\n \t}\n }",
"private void launchEditVolPage(View view, Volunteer thisGuy){\n final Intent launchEdit = new Intent(manageVolunteers.this,ManagerEditVolunteer.class);\n\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"thisGuy\", thisGuy);\n launchEdit.putExtra(\"bundle\", bundle);\n startActivity(launchEdit);\n }",
"public void clickOnEditIcon()\r\n\t\t{\r\n\t\t\treceiptsetup.clickOnEditIcon();\r\n\t\t}"
] | [
"0.7029788",
"0.68246573",
"0.67594963",
"0.6643187",
"0.65716136",
"0.6557901",
"0.652629",
"0.6453588",
"0.6428956",
"0.6420972",
"0.63847893",
"0.6381529",
"0.6371899",
"0.6318979",
"0.63027453",
"0.62343353",
"0.621415",
"0.6203568",
"0.61898524",
"0.61167514",
"0.61087936",
"0.61039543",
"0.61006135",
"0.60929257",
"0.60757273",
"0.60612935",
"0.605899",
"0.6049981",
"0.60351",
"0.6032367",
"0.60195804",
"0.59683657",
"0.5968093",
"0.59662074",
"0.5957088",
"0.5955604",
"0.5941263",
"0.5932747",
"0.59147495",
"0.59065616",
"0.5901182",
"0.5898718",
"0.5870795",
"0.5870322",
"0.5855198",
"0.58437073",
"0.5833799",
"0.58293784",
"0.58274126",
"0.5818642",
"0.58179855",
"0.5810718",
"0.5807661",
"0.58062124",
"0.57894635",
"0.5778389",
"0.5777041",
"0.577631",
"0.5757763",
"0.57560533",
"0.5749911",
"0.57465374",
"0.57388765",
"0.5731295",
"0.571344",
"0.5712363",
"0.5709349",
"0.5706609",
"0.5703146",
"0.56926554",
"0.5692275",
"0.5690691",
"0.5688918",
"0.568813",
"0.56880337",
"0.56851226",
"0.5670311",
"0.566415",
"0.5663521",
"0.5663202",
"0.56608427",
"0.5654271",
"0.56495523",
"0.56480205",
"0.5626099",
"0.56233513",
"0.5619103",
"0.5618064",
"0.5615634",
"0.56134737",
"0.5607539",
"0.5598403",
"0.559662",
"0.55929947",
"0.55858666",
"0.5582747",
"0.5574485",
"0.55532587",
"0.55457544",
"0.5543258",
"0.5541614"
] | 0.0 | -1 |
Handle presses on the action bar items | @Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.createtest:
createTest();
return true;
case R.id.details:
GoToTestDetails();
return true;
case R.id.gomain:
GoToMain();
return true;
default:
return super.onOptionsItemSelected(item);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\n\n return true;\n }",
"void onMenuItemClicked();",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handling item selection\n switch (item.getItemId()) {\n case R.id.action_home:\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n return true;\n case R.id.action_birds:\n intent = new Intent(this, Birds.class);\n startActivity(intent);\n return true;\n case R.id.action_storm:\n intent = new Intent(this, Storm.class);\n startActivity(intent);\n return true;\n case R.id.action_nocturnal:\n intent = new Intent(this, Nocturnal.class);\n startActivity(intent);\n return true;\n case R.id.action_library:\n intent = new Intent(this, Mylibrary.class);\n startActivity(intent);\n return true;\n case R.id.action_now_playing:\n intent = new Intent(this, Nowplaying.class);\n startActivity(intent);\n return true;\n case R.id.action_download:\n intent = new Intent(this, Download.class);\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.action_help:\r\n Intent help = new Intent(facebookplaces.this,appinstr.class);\r\n startActivity(help);\r\n return true;\r\n default:\r\n // If we got here, the user's action was not recognized.\r\n // Invoke the superclass to handle it.\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\r\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\r\n // TODO Auto-generated method stub\r\n return false;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\n\t\tswitch (item.getItemId()) {\n\t\t\n\t\tdefault:\n\t\t\t\n\t\t\tbreak;\n\n\t\t}//switch (item.getItemId())\n\n\t\t\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case R.id.action_tweet:\n Intent intentTweet = new Intent(\"com.phonbopit.learnandroid.yamba.action.tweet\");\n startActivity(intentTweet);\n return true;\n case R.id.action_purge:\n\n return true;\n case R.id.action_settings:\n Intent intentSettings = new Intent(this, SettingActivity.class);\n startActivity(intentSettings);\n return true;\n case R.id.action_refresh:\n\n return true;\n default:\n return false;\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item){\n super.onOptionsItemSelected(item);\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_browse:\n startActivity(new Intent(this, BrowseActivity.class));\n return true;\n case R.id.action_alphabet:\n startActivity(new Intent(this, AlphabetActivity.class));\n return true;\n case R.id.action_editor:\n startActivity(new Intent(this, EditorActivity.class));\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n Class c = Methods.onOptionsItemSelected(id);\n if (c != null) {\n Intent intent = new Intent(getBaseContext(), c);\n startActivity(intent);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"protected void cabOnItemPress(int position) {}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n finish(); // close this activity and return to preview activity (if there is any)\n } else if (item.getItemId() == R.id.action_copy) {\n presenter.onActionCopy();\n } else if (item.getItemId() == R.id.action_toReddit) {\n presenter.onActionToReddit();\n } else if (item.getItemId() == R.id.action_share) {\n Toast toast = Toast.makeText(this, \"sharing\", Toast.LENGTH_SHORT);\n toast.show();\n } else if (item.getItemId() == R.id.action_addToFavorites) {\n presenter.onActionToggleFavorite();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\n\t\ttry {\n\t\t\t// Handle presses on the action bar items\n\t\t\tswitch (item.getItemId()) {\n\n\t\t\tcase R.id.action_note_map_view_info:\n\t\t\t\tsetCurrentView(NoteMapView.info);\n\t\t\t\treturn true;\n\n\t\t\tcase R.id.action_note_map_view_image:\n\t\t\t\tsetCurrentView(NoteMapView.image);\n\t\t\t\treturn true;\n\n\t\t\tcase R.id.action_note_map_view_map:\n\t\t\t\tsetCurrentView(NoteMapView.map);\n\t\t\t\treturn true;\n\n\t\t\tcase R.id.action_note_map_close:\n\t\t\t\t// close -> go back to FragmentMainInput\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\n\t\t\tdefault:\n\t\t\t\treturn super.onOptionsItemSelected(item);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception ex) {\n\t\t\tLog.e(MODULE_TAG, ex.getMessage());\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch(id) {\n case R.id.action_settings: {\n Intent myIntent = new Intent(Activity_Main.this, Activity_Settings.class);\n Activity_Main.this.startActivity(myIntent);\n return true;\n }\n case R.id.action_moveicons: {\n if (TESTING)\n Toast.makeText(this, \"move icons clicked\", Toast.LENGTH_SHORT).show();\n return true;\n }\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) \n {\n if (mDrawerToggle.onOptionsItemSelected(item)) \n {\n return true;\n }\n // Handle action buttons\n switch(item.getItemId()) \n {\n case R.id.action_websearch:\n // create intent to perform web search for this planet\n Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);\n intent.putExtra(SearchManager.QUERY, getActionBar().getTitle());\n // catch event that there's no activity to handle intent\n if (intent.resolveActivity(getPackageManager()) != null) \n {\n startActivity(intent);\n } \n else\n {\n Toast.makeText(this, R.string.app_not_available, Toast.LENGTH_LONG).show();\n }\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.log:\r\n \tIntent i = new Intent(this, LogItemsActivity.class);\r\n \t\tstartActivity(i);\r\n return true;\r\n case R.id.edit:\r\n \tIntent i1 = new Intent(this, EditItemsActivity.class);\r\n \tstartActivity(i1);\r\n return true;\r\n case R.id.stats:\r\n \tIntent i2 = new Intent(this, BarActivity.class);\r\n \t\tstartActivity(i2);\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n // Respond to a click on the \"Delete all entries\" menu option\r\n case R.id.action_share_list:\r\n // TODO: Action for the App Bar\r\n return true;\r\n case R.id.action_delete:\r\n // TODO: Action for the App Bar\r\n return true;\r\n // Respond to a click on the \"Up\" arrow button in the app bar\r\n case android.R.id.home:\r\n NavUtils.navigateUpFromSameTask(RecordActivity.this);\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case R.id.action_save:\n saveEvent();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(com.actionbarsherlock.view.MenuItem item) {\n\t\tif (mDrawerToggle.onOptionsItemSelected(item)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Handle action buttons\n\t\tswitch (item.getItemId()) {\n\t\t// this is not a desirable approach!\n\t\tcase android.R.id.home:\n\t\t\t// Toast.makeText(this, \"Need to be implemented\",\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t/*\n\t\t\t * android.support.v4.app.FragmentTransaction ft =\n\t\t\t * getSupportFragmentManager().beginTransaction();\n\t\t\t * ft.replace(R.id.container, fmt); ft.commit();\n\t\t\t */\n\n\t\t\tbreak;\n\t\tcase R.id.action_websearch:\n\t\t\t// // create intent to perform web search for this planet\n\t\t\t// Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);\n\t\t\t// intent.putExtra(SearchManager.QUERY, getActionBar().getTitle());\n\t\t\t// // catch event that there's no activity to handle intent\n\t\t\t// if (intent.resolveActivity(getPackageManager()) != null) {\n\t\t\t// startActivity(intent);\n\t\t\t// } else {\n\t\t\t// Toast.makeText(this, R.string.app_not_available,\n\t\t\t// Toast.LENGTH_LONG).show();\n\t\t\t// }\n\n\t\t\t// item.expandActionView();\n\t\t\treturn false;\n\t\tcase R.id.menu_exit:\n\t\t\tthis.exitApplication();\n\t\t\tbreak;\n\t\tcase R.id.action_share:\n\n\t\t\t// String message = \"Text I wan't to share.\";\n\t\t\t// Intent share = new Intent(Intent.ACTION_SEND);\n\t\t\t// share.setType(\"text/plain\");\n\t\t\t// share.putExtra(Intent.EXTRA_TEXT, message);\n\t\t\t// startActivity(Intent.createChooser(share,\n\t\t\t// \"Title of the dialog the system will open\"));\n\n\t\t\tbreak;\n\t\tcase R.id.menu_settings2:\n\t\t\tIntent intent3 = new Intent(this, SettingsPreferences.class);\n\t\t\tstartActivity(intent3);\n\t\t\tbreak;\n\t\tcase R.id.set_date:\n\n\t\t\tfinal CharSequence[] items;\n\t\t\titems = getResources().getTextArray(R.array.dates_for_police);\n\n\t\t\tAlertDialog.Builder builder = Global.giveMeDialog(this, \"Choose a month for police data\");\n\n\t\t\tbuilder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t}\n\t\t\t});\n\t\t\tint i = 0;\n\t\t\tfor (; i < items.length; i++) {\n\t\t\t\tif (items[i].equals(Global.POLICE_DATA_REQUEST_MONTH))\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tbuilder.setSingleChoiceItems(items, i, new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tGlobal.setPOLICE_DATA_REQUEST_MONTH(items[which].toString());\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tbuilder.show();\n\n\t\t\tbreak;\n\t\tcase R.id.register_dialgo_action_bar:\n\t\t\tif (!Global.isRegistered(this)) {\n\t\t\t\tif (regDialog == null) {\n\t\t\t\t\tregDialog = new RegDialogFragment();\n\n\t\t\t\t\tregDialog.show(getSupportFragmentManager(), \"should be changed here\");\n\t\t\t\t} else {\n\t\t\t\t\tregDialog.show(getSupportFragmentManager(), \"should be changed here\");\n\t\t\t\t\t// Toast.makeText(this, DEBUG + \" ID Yes\",\n\t\t\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\titem.setVisible(false);\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase R.id.email_developer:\n\t\t\tIntent intent = new Intent(Intent.ACTION_SEND);\n\t\t\tintent.setType(\"message/rfc822\");\n\t\t\tintent.putExtra(Intent.EXTRA_EMAIL, new String[] { \"[email protected]\" });\n\t\t\tintent.putExtra(Intent.EXTRA_SUBJECT, \"[DESURBS] - YOURSafe\");\n\t\t\tintent.putExtra(Intent.EXTRA_TEXT, \"Hi, Yang \\n\\n\");\n\t\t\ttry {\n\t\t\t\tstartActivity(Intent.createChooser(intent, \"Send mail...\"));\n\t\t\t} catch (android.content.ActivityNotFoundException ex) {\n\t\t\t\tToast.makeText(this, \"There are no email clients installed.\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase R.id.survey_developer:\n\n\t\t\tString url = \"https://docs.google.com/forms/d/1HgHhfY-Xgt53xqMPCZC_Q_rL8AKUhNi9LiPXyhKkPq4/viewform\";\n\t\t\tintent = new Intent(Intent.ACTION_VIEW);\n\t\t\tintent.setData(Uri.parse(url));\n\t\t\tstartActivity(intent);\n\n\t\t\tbreak;\n\n\t\tcase R.id.menu_about:\n\t\t\tToast.makeText(this, \"This is Version \" + this.getString(R.string.version_name), Toast.LENGTH_SHORT).show();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\t//noinspection SimplifiableIfStatement\n\t\tIntent intent;\n\t\tswitch (id) {\n\t\t\tcase R.id.action_info:\n\t\t\t\tif(mBound) {\n\t\t\t\t\tStringBuffer message = new StringBuffer(getVersionInfo());\n\t\t\t\t\tmessage.append(mService.getConnectivityStatus().toString());\n\t\t\t\t\tMediaPlayerService.showMessageInPopup(message, Toast.LENGTH_LONG * 50, false);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\tcase R.id.action_settings:\n\t\t\t\tintent = new Intent(this, SettingsActivity.class);\n\t\t\t\tstartActivityForResult(intent, FavoriteStationsFrame.RESULT_SETTINGS);\n\t\t\t\treturn true;\n\t\t\t/*case R.id.action_add:\n\t\t\t\tintent = new Intent(this, SearchForStationsFrame.class);\n\t\t\t\tstartActivityForResult(intent, FavoriteStationsFrame.RESULT_ADD_STATIONS);\n\t\t\t\treturn true;*/\n\t\t\tcase R.id.action_help:\n\t\t\t\tintent = new Intent(this, HelpActivity.class);\n\t\t\t\tintent.putExtra(HelpActivity.ARG_SECTION_NUMBER, mViewPager.getCurrentItem());\n\t\t\t\tstartActivity(intent);\n\t\t\t\treturn true;\n\t\t\t/*case R.id.action_help1:\n\t\t\t\tintent = new Intent(this, HelpTabbedActivity.class);\n\t\t\t\tintent.putExtra(HelpTabbedActivity.PlaceholderFragment.ARG_SECTION_NUMBER, mViewPager.getCurrentItem());\n\t\t\t\tstartActivity(intent);\n\t\t\t\treturn true;*/\n\t\t\tcase android.R.id.home:\n\t\t\t\tif(mViewPager.getCurrentItem() == SEARCH_FOR_STATIONS)\n\t\t\t\t\tbreak;\n\t\t\tcase R.id.action_exit:\n\t\t\t\tHandler delayedPost = new Handler();\n\t\t\t\tdelayedPost.postDelayed(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\texitApp();\n\t\t\t\t\t}\n\t\t\t\t}, 100);//exitApp();\n\t\t\t\treturn true;\n\t\t\tcase R.id.action_volume_down:\n\t\t\tcase R.id.action_volume_up:\n\t\t\t\tif(mBound)\n\t\t\t\t\tmService.changeVolumeLevel(id==R.id.action_volume_up);\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (mDrawerToggle.onOptionsItemSelected(item)) {\n\t\t\treturn true;\n\t\t}\n\t\t// Handle action bar actions click\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.action_rate:\n\n\t\t\n\t\t\tToast.makeText(con, \"rate button is clicked\", 1000).show(); \n\n\t\t\treturn true;\n\t\t\t\n\t\tcase R.id.action_best:\n\n\t\t\t\n\t\t\tToast.makeText(con, \"Best button is clicked\", 1000).show(); \n\n\t\t\treturn true;\n\t\t\t\n\t\t\t\n\t\tcase R.id.action_liked:\n\n\t\t\t\n\t\t\tToast.makeText(con, \"liked button is clicked\", 1000).show(); \n\n\t\t\treturn true;\n\t\t\t\n\t\t\t\n\t\tcase R.id.action_language:\n\t\t{\n\t\t\tToast.makeText(con, \"Language button is clicked\", 1000).show(); \n\t\t\t\n\t\t\t\n\t\t\tString lCode=\"en\";\n\t\t\t\n\t\t\tif(PersistData.getStringData(con, \"LNG\").equalsIgnoreCase(\"en\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t *english is there already, need bangla\n\t\t\t\t */\n\t\t\t\tlCode=\"bn\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if(PersistData.getStringData(con, \"LNG\").equalsIgnoreCase(\"bn\"))\n\t\t\t\n\t\t\t{\n\t\t\t\tlCode=\"en\";\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\tchangeLocateAndRestart(lCode);\n\n\t\t\treturn true;\n\t\t}\n\t\t\t\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n //HouseKeeper handles menu item click event\n mHouseKeeper.onOptionsItemSelected(item);\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings)\n return true;\n\n switch (id) {\n case R.id.action_sendShift:\n sendEvent();\n return true;\n\n\n case R.id.action_delete:\n deleteOrShowMethod();\n return true;\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n //get item id to handle item clicks\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.action_done:\n\t\t\tquitPlay();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_quit:\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.home:\n home_pres();\n break;\n case R.id.back:\n back_press();\n break;\n case R.id.previous:\n previous_press();\n break;\n case R.id.next:\n next_press();\n break;\n default:\n assert false;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (myDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle action buttons\n switch(item.getItemId()) {\n case R.string.action_websearch:\n // create intent to perform web search for this planet\n Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);\n intent.putExtra(SearchManager.QUERY, getSupportActionBar().getTitle());\n // catch event that there's no activity to handle intent\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n } else {\n Toast.makeText(this, R.string.app_not_available, Toast.LENGTH_LONG).show();\n }\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\r\n\t\tinflater.inflate(R.menu.main_activity_actions, menu);\r\n\r\n\r\n\t\tif(tv==null) {\r\n\t\t\tRelativeLayout badgeLayout = (RelativeLayout) menu.findItem(R.id.action_notification).getActionView();\r\n\t\t\ttv = (TextView) badgeLayout.findViewById(R.id.hotlist_hot);\r\n\t\t\ttv.setText(\"12\");\r\n\t\t}\r\n\r\n\t\t/*menu.findItem(R.id.action_notification).getActionView().setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\r\n\t\t\t\t\tSystem.out.println(\"clicked\");\r\n\t\t\t\t\ttv.setEnabled(false);\r\n\t\t\t\t\ttv.setBackground(null);\r\n\t\t\t\t\ttv.setBackgroundDrawable(null);\r\n\t\t\t\t\ttv.setText(null);\r\n\t\t\t\t\tintent = new Intent(getApplicationContext(), Notification.class);\r\n\t\t\t\t\tstartActivity(intent);\r\n\r\n\t\t\t}\r\n\t\t});*/\r\n\t\t//getActionBar().setCustomView(R.layout.menu_example);\r\n\t\t//getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_HOME_AS_UP);\r\n\t\t//getActionBar().setIcon(android.R.color.transparent);\r\n\t\treturn true;\r\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle action buttons\n switch (item.getItemId()) {\n case R.id.action_websearch:\n // create intent to perform web search for this planet\n Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);\n intent.putExtra(SearchManager.QUERY, getActionBar().getTitle());\n // catch event that there's no activity to handle intent\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n } else {\n Toast.makeText(this, R.string.app_not_available, Toast.LENGTH_LONG).show();\n }\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.action_settings :\n return true;\n\n case R.id.historic:\n vibe.vibrate(60); // 60 is time in ms\n Intent historicIntent = new Intent(MainActivity.this,HistoricActivity.class);\n historicIntent.setAction(BaseUtils.HISTORIC_INTENT);\n startActivityForResult(historicIntent, 1);\n\n break;\n case R.id.action_left:\n\n if(wV.canGoBack()){\n vibe.vibrate(60); // 60 is time in ms\n wV.goBack();\n }else{\n Toast.makeText(this,\"Nothing to load\",Toast.LENGTH_SHORT).show();\n }\n break;\n case R.id.action_right:\n if(wV.canGoForward()){\n vibe.vibrate(60); // 60 is time in ms\n wV.goForward();\n }else{\n Toast.makeText(this,\"Nothing to load\",Toast.LENGTH_SHORT).show();\n }\n break;\n case R.id.bookmarks:\n vibe.vibrate(60); // 60 is time in ms\n //Insert into bookmarks the active URL\n dao.insertBookmark(this,wV.getUrl());\n break;\n case R.id.seeBookmarks:\n Intent bookmarkIntent = new Intent(MainActivity.this,HistoricActivity.class);\n bookmarkIntent.setAction(BaseUtils.BOOKMARKS_INTENT);\n startActivityForResult(bookmarkIntent,1);\n break;\n\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.action_settings) {\n\t\t\treturn true;\n\t\t}\n\t\t// Handle presses on the action bar items\n\t switch (item.getItemId()) {\n\t case R.id.action_settings:\n\t //openSearch();\n\t return true;\n\t case R.id.action_talkback:\n\t startActivity(new Intent(this, AboutMeActivity.class));\n\t return true;\n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\t\tswitch (item.getItemId()) {\t\t\t\t\t\n\t\t\t\tcase R.id.back:\n\t\t\t\t\tback();\n\t\t\t\t\treturn true;\n\t\t\t\t\t\n\t\t\t\tcase R.id.edit:\n\t\t\t\t\tedit();\n\t\t\t\t\treturn true;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n \r\n \tint id = item.getItemId();\r\n switch (id) {\r\n case R.id.action_settings:\r\n \topenSettings();\r\n return true;\r\n case R.id.action_about:\r\n \topenAbout();\r\n \treturn true;\r\n case R.id.action_exit:\r\n \tExit();\r\n \treturn true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case R.id.action_settings:\n return true;\n case android.R.id.home:\n onActionHomePressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case R.id.action_exit:\n System.exit(0);\n break;\n case R.id.action_2players:\n Intent mainActivity = new Intent(this, TwoPlayersActivity.class);\n startActivity(mainActivity);\n break;\n case R.id.action_about:\n showPopUpWindow();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle action buttons\n switch (item.getItemId()) {\n case R.id.action_websearch:\n Toast.makeText(this, \"Search Web for planet \" + mTitle, Toast.LENGTH_SHORT).show();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch(id)\n {\n case R.id.action_home:\n Intent intent1 = new Intent(NoteListActivity.this.getApplicationContext(), MainActivity.class);\n startActivity(intent1);\n finish();\n break;\n case R.id.action_links:\n Intent intent2 = new Intent(NoteListActivity.this.getApplicationContext(), LinkListActivity.class);\n startActivity(intent2);\n finish();\n break;\n case R.id.action_tips:\n Intent intent3 = new Intent(NoteListActivity.this.getApplicationContext(), TipActivity.class);\n startActivity(intent3);\n break;\n default:\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n Intent i;\n switch (id) {\n case R.id.action_search:\n break;\n case R.id.overflow1:\n i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(\"http://advanced.shifoo.in/site/appterms-and-conditions\"));\n startActivity(i);\n break;\n case R.id.overflow2:\n i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(\"http://www.shifoo.in/site/privacy-policy\"));\n startActivity(i);\n break;\n default:\n return super.onOptionsItemSelected(item);\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n int id = item.getItemId();\n // 주석처리함..\n // if (id == R.id.action_settings) {\n // return true;\n // }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t \n\t case R.id.action_settings:\n\t \t Intent prefsIntentS = new Intent(this, PreferencesActivity.class);\n\t startActivity(prefsIntentS);\n\t return true;\n\t case R.id.action_about:\n\t \t Intent aboutIntent = new Intent(this, AboutActivity.class);\n\t \t startActivity(aboutIntent);\n\t \t overridePendingTransition(R.anim.fadein,R.anim.fader);\n\t return true;\n\t case R.id.action_help:\n\t \t Intent helpIntent = new Intent(this, HelpActivity.class);\n\t \t startActivity(helpIntent);\n\t \t overridePendingTransition(R.anim.fadein,R.anim.fader);\n\t return true;\n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n //Implement action listener on the menu buttons\n int itemId = item.getItemId();\n\n //Choose the appropriate action menu based on the button selected\n switch (itemId) {\n case R.id.action_open_save_list:\n openSaveList();\n break;\n case R.id.action_settings:\n openAppSettings();\n }\n return super.onOptionsItemSelected(item);\n }"
] | [
"0.7173379",
"0.69227743",
"0.69227743",
"0.69227743",
"0.69227743",
"0.6911944",
"0.6884609",
"0.6881586",
"0.68243235",
"0.68193024",
"0.68051094",
"0.6801348",
"0.678705",
"0.678705",
"0.67608094",
"0.67543995",
"0.6754033",
"0.674645",
"0.67355984",
"0.6727317",
"0.67257065",
"0.67257065",
"0.67257065",
"0.67257065",
"0.67257065",
"0.67257065",
"0.6723229",
"0.67047226",
"0.670323",
"0.6695576",
"0.6695576",
"0.6695576",
"0.6673202",
"0.66641897",
"0.66641897",
"0.66641897",
"0.66641897",
"0.66641897",
"0.66641897",
"0.66641897",
"0.66641897",
"0.6651234",
"0.66501373",
"0.66408205",
"0.6640387",
"0.6596357",
"0.6595274",
"0.6593547",
"0.65873045",
"0.6578023",
"0.65763044",
"0.6571006",
"0.6561838",
"0.65557647",
"0.65519553",
"0.65340966",
"0.65310395",
"0.6512335",
"0.6510273",
"0.6502483",
"0.6497952",
"0.64960766",
"0.6488292",
"0.64863867",
"0.64830875",
"0.6482162",
"0.6477473",
"0.6476086",
"0.6474335",
"0.6471746",
"0.64694387",
"0.64618725",
"0.6460911",
"0.6459166",
"0.64538074",
"0.6453495",
"0.6448078",
"0.644757",
"0.6446672",
"0.6446672",
"0.6446672",
"0.6446672",
"0.6446672",
"0.6446672",
"0.64438176",
"0.6437946",
"0.6434402",
"0.6428054",
"0.6421541",
"0.64196163",
"0.64186686",
"0.6415855",
"0.6414209",
"0.64138687",
"0.64123267",
"0.64088166",
"0.6406903",
"0.64038754",
"0.6401255",
"0.6400071",
"0.63982415"
] | 0.0 | -1 |
This goes to the TestDetails activity. | public void GoToTestDetails() {
Intent intent = new Intent(this, TestDetails.class);
intent.putExtra("Test value", testList);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void goTestActivity()\n\t {\n\t }",
"@Test\n public void openTaskDetails_startsActivity() {\n String taskId = \"id\";\n\n // When opening the task details\n mTasksNavigator.openTaskDetails(taskId);\n\n // The AddEditTaskActivity is opened with the correct request code\n verify(mNavigationProvider).startActivityForResultWithExtra(eq(TaskDetailActivity.class),\n eq(-1), eq(TaskDetailActivity.EXTRA_TASK_ID), eq(taskId));\n }",
"@Test\n public void detailsTest() {\n // TODO: test details\n }",
"@Test\n public void detailsTest() {\n // TODO: test details\n }",
"public void createTest() {\n\t \t Intent intent = new Intent(this, Settings.class);\n\t \t intent.putExtra(\"Test value\", testList);\n\t \t startActivity(intent);\n\t }",
"public void GoToMain() {\n\t \t Intent intent = new Intent(this, MainActivity.class);\n\t \t intent.putExtra(\"Test value\", testList);\n\t \t startActivity(intent);\n\t }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageUserViewdetails() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Check whether the user can edit details by clicking View details of Active accounts\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.viewDetailsTableViewStduser(userProfile)\n\t\t.ClickEditdetails()\n\t\t.ChangeStandardUserview(userProfile); \t \t \t \t\t\n\t}",
"@Test\n public void openLoginActivity() {\n }",
"@Test\n public void clickOnTask_ShowsDetailUi() {\n Song requestedSong = new Song(\"Details Requested\", \"For this task\", SOURCE);\n Playlist playlist = new Playlist(requestedSong);\n\n // When open task details is requested\n mPlaylistPresenter.openSongPlayer(playlist);\n\n // Then task detail UI is shown\n verify(mTasksView).showSongPlayerUI(any(Playlist.class));\n }",
"private void getTestDetails() {\n Task<String> testNameTask = new Task<String>() {\n @Override\n protected String call() throws Exception {\n String sql = \"select TestName from LabTests where TestId = \" + testId;\n ResultSet resultSet = DBUtil.executeQuery(sql);\n try {\n if (resultSet != null && resultSet.next()) {\n return resultSet.getString(\"TestName\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }\n };\n testNameTask.setOnSucceeded(event -> {\n test.setText(testNameTask.getValue());\n });\n new Thread(testNameTask).start();\n }",
"public void viewTaskDetails(){\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"StatisticsTab\"), \"StatisticsTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"TasksTab\"), \"TasksTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnTaskDetails\"), \"Task Details Button\");\n\n\t}",
"@Override\n public void run() {\n Intent i = new Intent(ActivityTestStart.this, ActivityTestList.class);\n startActivity(i);\n finish();\n }",
"@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }",
"@Test\n public void myMeetingDetailsActivity_isLaunchedWhenWeClickOnAnItem() {\n // When perform a click on an item\n onView(withId(R.id.recyclerview)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n // Then : MeetingDetailsActivity is launched\n onView(withId(R.id.activity_meeting_details));\n }",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyElectricityYourdetailsPageNavigationLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Electricity Page Navigation Links\");\n\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\t\t\n\t\t.verifyElectricNavigationLinks();\n\t\t\n}",
"@Test\n public void openMainActivity() {\n }",
"@Test\n public void intent() {\n // setup needed data for test\n Collection collection = new Collection();\n collection.setId(206);\n collection.setTitle(\"Test\");\n collection.setDescription(\"Test\");\n collection.getUser().setId(\"eUO1o53muso\");\n collection.getUser().setName(\"James Example\");\n collection.getUser().getProfileImage().setMedium(\"https://images.unsplash.com/profile-1441298102341-b7ba36fdc35c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&fit=crop&h=64&w=64\");\n\n Intent intent = new Intent();\n intent.putExtra(Collection.class.getSimpleName(), collection);\n\n activityRule.launchActivity(intent);\n\n SystemClock.sleep(1000);\n }",
"public void testRun() {\n\t\tsolo.waitForActivity(\"First_Activity\", 2000);\n //Take screenshot\n solo.takeScreenshot();\n //Sleep for 8158 milliseconds\n\t\tsolo.sleep(8158);\n //Click on click for second page\n\t\tsolo.clickOnView(solo.getView(\"button\"));\n //Wait for activity: 'sai.myfirstapp.com.sai.Second_Activity'\n\t\tassertTrue(\"Second_Activity is not found!\", solo.waitForActivity(\"Second_Activity\"));\n //Sleep for 1030 milliseconds\n\t\tsolo.sleep(1030);\n //Click on go back\n\t\tsolo.clickOnView(solo.getView(\"button2\"));\n //Sleep for 2902 milliseconds\n\t\tsolo.sleep(2902);\n //Click on click for second page\n\t\tsolo.clickOnView(solo.getView(\"button\"));\n //Take screenshot\n solo.takeScreenshot();\n //Wait for activity: 'sai.myfirstapp.com.sai.Second_Activity'\n\t\tassertTrue(\"Second_Activity is not found!\", solo.waitForActivity(\"Second_Activity\"));\n //Sleep for 2551 milliseconds\n\t\tsolo.sleep(2551);\n //Click on go back\n\t\tsolo.clickOnView(solo.getView(\"button2\"));\n //Sleep for 1157 milliseconds\n\t\tsolo.sleep(1157);\n //Click on click for second page\n\t\tsolo.clickOnView(solo.getView(\"button\"));\n //Wait for activity: 'sai.myfirstapp.com.sai.Second_Activity'\n\t\tassertTrue(\"Second_Activity is not found!\", solo.waitForActivity(\"Second_Activity\"));\n //Sleep for 1114 milliseconds\n\t\tsolo.sleep(1114);\n //Click on go back\n\t\tsolo.clickOnView(solo.getView(\"button2\"));\n //Sleep for 870 milliseconds\n\t\tsolo.sleep(870);\n //Click on click for second page\n\t\tsolo.clickOnView(solo.getView(\"button\"));\n //Wait for activity: 'sai.myfirstapp.com.sai.Second_Activity'\n\t\tassertTrue(\"Second_Activity is not found!\", solo.waitForActivity(\"Second_Activity\"));\n //Take screenshot\n solo.takeScreenshot();\n //Click on go back\n\t\tsolo.clickOnView(solo.getView(\"button2\"));\n\t}",
"@Override\n public void run() {\n Intent i = new Intent(ActivityTestStart.this, ActivityTestList.class);\n startActivity(i);\n finish();\n }",
"public void GoToScenario2 (View view) {\n Intent GoToScenario2Intent = new Intent(getApplicationContext(), Scenario2_01.class);\n startActivity(GoToScenario2Intent);\n }",
"public void GoToScenario1 (View view) {\n Intent GoToScenario1Intent = new Intent(getApplicationContext(), Scenario1_01.class);\n startActivity(GoToScenario1Intent);\n }",
"@Test\n public void activityLaunch() {\n onView(withId(R.id.button_main)).perform(click());\n onView(withId(R.id.text_header)).check(matches(isDisplayed()));\n\n onView(withId(R.id.button_second)).perform(click());\n onView(withId(R.id.text_header_reply)).check(matches(isDisplayed()));\n }",
"public void testFirstLoginToListActivityAndBack() {\n testFirstStartApp.testCorrectLogin();\n }",
"public void recordSteps(View v) {\n\t \t Intent intent = new Intent(this, RecordingActivity.class);\n\t \t int position = (Integer) v.getTag();\n\t\t intent.putExtra(\"Test value\", testList);\n\t\t intent.putExtra(\"int value\", position);\n\t\t startActivity(intent);\n\t }",
"@Override\n public void onClick(View view) {\n Intent intent = MeasurementResultActivity.newIntent(getActivity(), null);\n startActivity(intent);\n }",
"@Test\n public void openSubjectsActivity() {\n }",
"@Override\n public void onItemClick(int position) {\n\n /* Intent detailIntent = new Intent(this,details.class);\n ExampleItem clickItem = mExampleList.get(position);\n detailIntent.putExtra(EXTRA_FIESTA, clickItem.getTest_name());\n detailIntent.putExtra(EXTRA_PROVINCE, clickItem.getProvince());\n detailIntent.putExtra(EXTRA_URL,clickItem.getImage());\n detailIntent.putExtra(EXTRA_MUNICIPAL,clickItem.getMunicipal());\n detailIntent.putExtra(EXTRA_HISTORY,clickItem.getHistory());\n startActivity(detailIntent);*/\n }",
"@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(getApplicationContext(), DetailActivity.class);\n intent.putExtra(Constant.INTENT_WEB_URL, webHotUrl);\n startActivity(intent);\n }",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGasYourdetailsPageNavigationLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\t\t\n\t\t.verifyGasNavigationLinks();\n}",
"@Test\n public void testAddNewLane_success() throws Exception {\n Context targetContext = InstrumentationRegistry.getInstrumentation()\n .getTargetContext();\n\n\n Intent intent = new Intent(targetContext, CustomerActivity.class);\n intent.putExtra(LoginActivity.EXTRA_USER_ID, db.getCustomerByEmail(\"a\").getCustomerID());\n mActivityRule.launchActivity(intent);\n\n onView(withId(R.id.buttonRequestLane)).perform(click());\n\n onView(withId(R.id.playersNumBox)).perform(typeText(\"1\"));\n onView(withId(R.id.playersNumBox)).perform(closeSoftKeyboard());\n onView(withId(R.id.player_submit_button)).perform(click());\n\n\n\n onView(withId(R.id.qr_scanner_button)).perform(click());\n\n onView(withId(R.id.customer_lanes_text_view)).check(matches(withText(containsString(\"1\"))));\n\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tString cmd = \"am instrument --user 0 -w com.tencent.qqlive.test/android.test.InstrumentationTestRunner //\";\n\n\t\t\ttry {\n\t\t\t\tProcess p_start_test_service = Runtime.getRuntime().exec(cmd);\n\t\t\t\tAndroidUtilFunc.PL(\"process run over\");\n\t\t\t\tAndroidUtilFunc.PL(\"is process = null \"\n\t\t\t\t\t\t+ (p_start_test_service == null) + \"\\n process hash = \"\n\t\t\t\t\t\t+ p_start_test_service.hashCode());\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tp_start_test_service.getInputStream()));\n\t\t\t\tBufferedReader err = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tp_start_test_service.getErrorStream()));\n\t\t\t\tString line = \"\";\n\n\t\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\t\tAndroidUtilFunc.PL(line);\n\t\t\t\t}\n\t\t\t\tin.close();\n\n\t\t\t\twhile ((line = err.readLine()) != null) {\n\t\t\t\t\tAndroidUtilFunc.PL(line);\n\t\t\t\t}\n\t\t\t\terr.close();\n\t\t\t\tAndroidUtilFunc.PL(\"line read over\");\n\t\t\t\tp_start_test_service.destroy();\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}",
"public void onClick(View view) {\n Intent nextScreen = new Intent(view.getContext(), Mockup1.class);\n startActivityForResult(nextScreen, 0);\n }",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyCancelButtonOnElecYourDetails()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Elec meter read Your details Back button\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\n\t\t.yourdetailsCancelButton();\n\t\t\n}",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyYourdetailsElectricityOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Electricity Page Overlay Links\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\t\t\n\t\t.verifyElectricWhyWeNeedThisLink()\n\t\t.verifyElectricAcctnoWhereCanIfindthisLink()\n\t\t.verifyElectricMeterPointWhereCanIfindthisLink()\n\t\t.verifyElectricMeterIDWhereCanIfindthisLink();\n}",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyMeterReadingElectricityOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"verify the Electricity reading meter Overlay in Reading Page\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\n\t\t.verifyElectricitysitenoWhereCanIfindthisLink(smrProfile);\t\t\n\t\t\n}",
"public void testRun() {\n\t\tsolo.waitForActivity(\"StartActivity\", 2000);\n //Wait for activity: 'com.bitdubai.android_core.app.DesktopActivity'\n\t\tassertTrue(\"DesktopActivity is not found!\", solo.waitForActivity(\"DesktopActivity\"));\n //Set default small timeout to 66809 milliseconds\n\t\tTimeout.setSmallTimeout(66809);\n //Click on Next\n\t\tsolo.clickOnView(solo.getView(\"btn_got_it\"));\n //Click on Next\n\t\tsolo.clickOnView(solo.getView(\"btn_got_it\"));\n //Click on Next\n\t\tsolo.clickOnView(solo.getView(\"btn_got_it\"));\n //Click on Next\n\t\tsolo.clickOnView(solo.getView(\"btn_got_it\"));\n //Click on Got it\n\t\tsolo.clickOnView(solo.getView(\"btn_got_it\"));\n //Wait for activity: 'com.bitdubai.android_core.app.DesktopActivity'\n\t\tassertTrue(\"DesktopActivity is not found!\", solo.waitForActivity(\"DesktopActivity\"));\n //Click on ImageView\n\t\tsolo.clickOnView(solo.getView(\"image_view\", 26));\n //Wait for activity: 'com.bitdubai.android_core.app.DesktopActivity'\n\t\tassertTrue(\"DesktopActivity is not found!\", solo.waitForActivity(\"DesktopActivity\"));\n //Click on LinearLayout\n\t\tsolo.clickInRecyclerView(3, 0);\n //Wait for activity: 'com.bitdubai.android_core.app.AppActivity'\n\t\tassertTrue(\"AppActivity is not found!\", solo.waitForActivity(\"AppActivity\"));\n //Wait for dialog\n //Click on Be John Doe\n\t\ttry {\n\t\t\t//assertTrue(\"DesktopActivity is not found!\", solo.waitForDialogToOpen(5000));\n\t\t\tsolo.clickOnView(solo.getView(\"btn_left\"));\n\t\t}catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tsolo.wait(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Click on ImageView\n\t\tsolo.clickOnView(solo.getView(android.widget.ImageButton.class, 0));\n\t}",
"public void test030301() {\n\t\tActivityMonitor activityMonitor = getInstrumentation().addMonitor(MainActivity.class.getName(), null, false);\n\t\t//User click \"Change User\"\n\t\tactivity.runOnUiThread(new Runnable(){\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tassertTrue(UserButton.performClick());\t\n\n\t\t\t\t// opening a dialog\n\t\t \t// access the alert dialog using the getDialog() method created in the activity\n\t\t\t\tAlertDialog d = (AlertDialog) activity.getDialog();\t\t\t\t\n\t\t\t}\t\n\t\t});\n\t\t\n\t\t// get current activity\t\t\t\n\t\tMainActivity myActivity = getActivity();\n\t\t// click \"Claimant\" button and start next activity\n\t\tmyActivity.runOnUiThread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tActivityMonitor activityMonitor00 = getInstrumentation().addMonitor(ClaimantClaimListActivity.class.getName(), null, false);\n\t\t\t\t// click button and open next activity.\n\t\t\t\tClaimantButton.performClick();\n\t\t\t\tClaimantClaimListActivity nextActivity = (ClaimantClaimListActivity) getInstrumentation().waitForMonitorWithTimeout(activityMonitor00, 10000);\n\t\t\t\t// next activity is opened and captured.\n\t\t\t\tassertNotNull(nextActivity);\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Test for US03.03.01 Basic Flow 1\n\t\t\t\t */\n\t\t\t\t// view which is expected to be present on the screen\t\t\t\n\t\t\t\tfinal View decorView1 = nextActivity.getWindow().getDecorView();\n\t\t\t\t// layout of claim list\n\t\t\t\tlistView = (ListView) nextActivity.findViewById(ca.ualberta.CMPUT301W15T06.R.id.claimListView);\n\t\t\t\t// check if it is on screen\n\t\t\t\tViewAsserts.assertOnScreen(decorView1, listView);\n\t\t\t\t// check whether the Button object's width and height attributes match the expected values\n\t\t\t\tfinal ViewGroup.LayoutParams layoutParams11 = listView.getLayoutParams();\n\t\t\t\tassertEquals(layoutParams11.width, WindowManager.LayoutParams.MATCH_PARENT);\n\t\t\t\tassertEquals(layoutParams11.height, WindowManager.LayoutParams.WRAP_CONTENT);\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Test for US03.03.01 Basic Flow 2,3\n\t\t\t\t */\n\t\t\t\t// Click the menu option\n\t\t\t\tint count_be = u.getClaimList().size();\n\t\t\t\tActivityMonitor am = getInstrumentation().addMonitor(ClaimantClaimListActivity.class.getName(), null, false);\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Test for US03.03.01 Basic Flow 4\n\t\t\t\t */\n\t\t\t\tgetInstrumentation().invokeMenuActionSync(nextActivity,ca.ualberta.CMPUT301W15T06.R.id.filter, 1);\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Test for US03.03.01 Basic Flow 5\n\t\t\t\t */\t\t\n\t\t\t\t// test alert dialog (contains saved tags)\n\t\t\t\tAlertDialog d = (AlertDialog) nextActivity.getDialog();\n\t\t\t\tassertNotNull(d);\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Test for US03.03.01 Basic Flow 6a\n\t\t\t\t */\n\t\t\t\t//\"Filter Model\" button\n\t\t\t\tButton positiveButton = d.getButton(DialogInterface.BUTTON_POSITIVE);\n\t\t\t\tassertNotNull(positiveButton);\n\t\t\t\tpositiveButton.performClick();\n\n\t\t\t\t/*\n\t\t\t\t * Test for US03.03.01 Basic Flow 6b\n\t\t\t\t */\n\t\t\t\t//\"show all model\" button\n\t\t\t\tButton negativeButton = d.getButton(DialogInterface.BUTTON_NEGATIVE);\n\t\t\t\tassertNotNull(negativeButton);\n\t\t\t\tnegativeButton.performClick();\n\t\t\t\t// all claims are shown\n\t\t\t\tint count_all = u.getClaimList().size();\n\t\t\t\tassertEquals(count_be, count_all);\n\n\t\t\t\t//finish activity\n\t\t\t\tnextActivity.finish();\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tactivity.finish();\n\t}",
"@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(getActivity(), DetailActivity.class);\n intent.putExtra(\"NAME\", (String) mNameTextView.getText());\n intent.putExtra(\"REALNAME\", (String) mRealNameTextView.getText());\n intent.putExtra(\"URL\", (String) mHero.getUrl());\n startActivity(intent);\n }",
"public void Case36(){\n System.out.println(\"Testing Case 36\");\n MobileElement summaryBtn = (MobileElement) driver.findElementByAccessibilityId(\"Show action\");\n summaryBtn.click();\n MobileElement logisticBtn = (MobileElement) driver.findElementById(\"com.engagia.android:id/txt_logistics_btn\");\n logisticBtn.click();\n MobileElement cancelBtn = (MobileElement) driver.findElementById(\"android:id/button2\");\n cancelBtn.click();\n logisticTransaction();\n System.out.println(\"Case 36 done\");\n }",
"@Override\n public void onClick(View v) {\n MainActivity.getMainActivity().loadDetailScreen(station);\n\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(context, DetailsSessionActivity.class);\n intent.putExtra(\"exercise\", holder.title.getText().toString());\n context.startActivity(intent);\n }",
"@Test\n public void myNeighboursList_selectAction_shouldShowDetailsActivity(){\n onView(ViewMatchers.withId(R.id.list_neighbours)).check(withItemCount(ITEMS_COUNT));\n //When : perform a click on RecyclerView item position 0\n onView(allOf(isDisplayed(), withId(R.id.list_neighbours)))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n //Then : TextView for neighbour name in Details Activity is displayed\n onView(ViewMatchers.withId(R.id.user_details_name)).check(matches(isDisplayed()));\n }",
"@Override\n public void onActivityTestResponse(ActivityTestResponse arg0) {\n\n }",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrMangaeAccountlinkSubmitMeterNavigationLink(){\n Report.createTestLogHeader(\"SubmitMeterRead\", \"Verify whether the Submit meter read landing page is getting displayed with meter details for less than 3 meters\");\n SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n new SubmitMeterReadAction()\n .BgbnavigateToLogin()\n .BgbloginDetails(smrProfile)\n .clickManageAccountLinkWithAccNo(smrProfile)\n .submitMeterReadLink(smrProfile)\n .smrUpto3meters() \n .enterMultiDialReads(smrProfile) \n .smrAuditDetailsEntry(smrProfile);\n}",
"public void testRun() {\n\t\tsolo.waitForActivity(\"LandingActivity_\", 2000);\n //Wait for activity: 'com.fitbit.home.ui.HomeActivity_'\n\t\tassertTrue(\"HomeActivity_ is not found!\", solo.waitForActivity(\"HomeActivity_\"));\n //Sleep for 5779 milliseconds\n\t\tsolo.sleep(5779);\n //Scroll to 1,617 calories left Start a Food plan GET STARTED\n\t\tandroid.widget.ListView listView0 = (android.widget.ListView) solo.getView(android.widget.ListView.class, 0);\n\t\tsolo.scrollListToLine(listView0, 4);\n //Click on 1,617 calories left Start a Food plan GET STARTED\n\t\tsolo.clickOnView(solo.getView(\"tile_content\", 6));\n //Wait for activity: 'com.fitbit.food.ui.landing.FoodLoggingLandingActivity_'\n\t\tassertTrue(\"FoodLoggingLandingActivity_ is not found!\", solo.waitForActivity(\"FoodLoggingLandingActivity_\"));\n //Sleep for 18351 milliseconds\n\t\tsolo.sleep(18351);\n //Click on UNDER BUDGET 0 cals. in 1,305 cals. out 1,617 calories left in your budget\n\t\tsolo.clickOnText(java.util.regex.Pattern.quote(\"UNDER BUDGET\"));\n //Sleep for 5401 milliseconds\n\t\tsolo.sleep(5401);\n //Click on UNDER BUDGET 0 cals. in 1,305 cals. out 1,617 calories left in your budget\n\t\tsolo.clickOnText(java.util.regex.Pattern.quote(\"UNDER BUDGET\"));\n //Sleep for 947 milliseconds\n\t\tsolo.sleep(947);\n //Click on UNDER BUDGET 0 cals. in 1,305 cals. out 1,617 calories left in your budget\n\t\tsolo.clickOnText(java.util.regex.Pattern.quote(\"UNDER BUDGET\"));\n //Sleep for 4192 milliseconds\n\t\tsolo.sleep(4192);\n //Click on Today, Aug. 27\n\t\tsolo.clickOnText(java.util.regex.Pattern.quote(\"Today, Aug. 27\"));\n //Sleep for 5989 milliseconds\n\t\tsolo.sleep(5989);\n //Click on In Zone\n\t\tsolo.clickOnView(solo.getView(\"title\"));\n //Sleep for 2474 milliseconds\n\t\tsolo.sleep(2474);\n //Click on Under\n\t\tsolo.clickOnView(solo.getView(\"title\", 1));\n\t}",
"@Test //Associated with Associate a photo with a contact (Scenario 3)\n public void associatePhotoWithContactTest() throws Exception {\n onView(withId(R.id.contact_new)).perform(click());\n\n //types in the name \"Tal\" into the name field for the Contact\n onView(withId(R.id.info_name)).perform(typeText(\"Tal\"), closeSoftKeyboard());\n\n //performs a click operation on the \"Submit Changes\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n //performs a scroll action within the activity to take you to the necessary spot where\n //the newly created contact will be located\n onView(withId(R.id.contacts_list)).perform(RecyclerViewActions.scrollToPosition(0));\n\n //performs a click operation on the newly created Contact that is within the field\n //of view for the RecyclerView\n onView(withText(\"Tal\")).perform(click());\n\n //performs a click operation on the \"Edit Contact Info\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n onView(withId(R.id.info_pic)).perform(click());\n\n onView(withText(\"Add Photo!\")).check(matches(isDisplayed()));\n\n Instrumentation instrum = InstrumentationRegistry.getInstrumentation();\n final ListView homeLv = main.getActivity().findViewById(R.id.home_list);\n\n //performs the click operation on the Contacts button in the HomeActivity screen\n instrum.runOnMainSync(new Runnable() {\n @Override\n public void run() {\n int index = 1;\n homeLv.performItemClick(homeLv.getChildAt(index), index, homeLv.getAdapter().getItemId(index));\n }\n });\n\n //allows us to monitor the progress of app opening and loading the home activity\n Instrumentation.ActivityMonitor progress = instrum.addMonitor(HomeActivity.class.getName(), null, false);\n\n //serves the purpose of returning the next activity and waiting 3 seconds until the next activity is launched\n //to avoid possible timing errors\n Activity contactActivity = instrum.waitForMonitorWithTimeout(progress, 3000);\n\n onView(withText(\"Tal\")).perform(click());\n\n onView(withId(R.id.info_delete_button)).perform(click());\n }",
"@Override\r\n\tpublic void onTestSuccess(ITestResult result) {\n\t\tSystem.out.println(\"TC on Test sucess\"+\" \"+result.getName());\t\r\n\t}",
"@Test\n public void RecentBookClick() {\n }",
"@Test\n public void openMessagesActivity() {\n }",
"public void onClick(View v) {\n\n Intent visitSite_intent = new Intent(MainActivity.this, DetailActivity.class);\n visitSite_intent.putExtra(\"url\",\"http://aanm-vvrsrpolytechnic.ac.in/\");\n startActivity(visitSite_intent);\n }",
"@Override\n protected void onListItemClick(ListView listView, View view, int position, long id) {\n Intent intent = new Intent(MedicalTestListActivity.this, mSamples[position].getActivityClass());\n intent.putExtra(\"medical_test\", mSamples[position].getTitle());\n intent.putExtra(\"patient_name\", patient.getName());\n startActivity(intent);\n }",
"@Test\n public void addNewTask_startsActivity() {\n mTasksNavigator.addNewTask();\n\n // The AddEditTaskActivity is opened with the correct request code\n verify(mNavigationProvider).startActivityForResult(eq(AddEditTaskActivity.class),\n eq(AddEditTaskActivity.REQUEST_ADD_TASK));\n }",
"@Test\n public void intentTest(){\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //Recyclerview scroll to position\n onView(ViewMatchers.withId(R.id.recycler_recipe)).perform(RecyclerViewActions.scrollToPosition(4));\n\n //Perform Recyclerview click on item at position\n onView(withId(R.id.recycler_recipe)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n //Check if intent (RecipeActivity to StepDetailActivity) has RECIPE_INTENT_EXTRA\n intended(hasExtraWithKey(Constatns.STEPS_LIST));\n\n }",
"@Test\n public void clickContactLink() {\n aboutPage.clickContactLink();\n }",
"public void onTestStart(ITestResult result) {\n\t\tSystem.out.println(\"The test case is started :\"+result.getName());\n\t}",
"@Test\n public void testClickingOnStepLoadsCorrectStepDetails() {\n onView(ViewMatchers.withId(R.id.recipeRecyclerView))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0,\n click()));\n\n //Click on a Step tab on Tab Layout\n onView(withText(\"Steps\")).perform(click());\n\n //Click on each of the item of steps recycle view and verify the detailed step description\n //this logic works for both phone and tablet\n for(int i=0;i<stepsOfNutellaPie.length;i++){\n\n onView(withId(R.id.stepRecyclerView)).perform(\n RecyclerViewActions.actionOnItemAtPosition(i,click()));\n\n //do below only for phone - landscape\n if(!phone_landscape){\n onView(withId(R.id.description))\n .check(matches(withStepDetailedDescription(detailedStepsOfNutellaPie[i])));\n }\n\n //do below only for phones and not tablet\n if(phone_landscape || phone_portrait){\n //go back to previous screen\n Espresso.pressBack();\n }\n }\n\n\n }",
"private void gotoInfo() {\n Intent launchInfo = new Intent(this, Info.class);\n startActivity(launchInfo);\n }",
"public void autoDetails() {\n\t\t\r\n\t}",
"protected void setTestInfo(final String testInfo) {\n assertActivityNotNull();\n try {\n runTestOnUiThread(new Runnable() {\n @Override\n public void run() {\n mActivity.setTestInfo(testInfo);\n }\n });\n } catch (Throwable throwable) {\n throwable.printStackTrace();\n }\n }",
"@Override\n public void onClick(View view) {\n Intent detail = new Intent(getBaseContext(), DetailArticle.class);\n detail.putExtra(\"webURL\", webHotURL);\n startActivity(detail);\n }",
"@Test\n public void triggerIntent_hasExtras() {\n onView(withId(getResourceId(\"switchActivity\"))).check(matches(notNullValue() ));\n onView(withId(getResourceId(\"switchActivity\"))).check(matches(withText(\"Change Page\")));\n onView(withId(getResourceId(\"switchActivity\"))).perform(click());\n intended(hasExtra(\"Developer\", \"Oguzhan Orhan\"));\n }",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyCancelButtonOnGasYourDetails()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Gas meter read Your details Back button\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\n\t\t.yourdetailsCancelButtons();\n}",
"@Test\n public void clickRecyclerViewItem_OpensDetailsActivity() throws InterruptedException {\n onView(allOf(isDisplayed(), withId(R.id.recycler_view)))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n// onData(withId(R.id.recycler_view))\n// .perform(RecyclerViewActions.actionOnItemAtPosition(0, doubleClick()));\n\n onView(withId(R.id.title_tv)).check(ViewAssertions.matches(withText(RECIPE_NAME)));\n }",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyMeterReadingGasOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Overlay Links\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\n\t\t.verifyGassitenoWhereCanIfindthisLink(smrProfile);\n\t\t\n}",
"@Override\r\n\tpublic void onTestSuccess(ITestResult Result) {\n\t\tSystem.out.println(\"onTestSuccess :\"+ Result.getName());\r\n\t}",
"@Override\r\n\tpublic void onTestStart(ITestResult result) {\n\t\tSystem.out.println(\"onTestStart -> Test Name: \"+result.getName());\r\n\t}",
"public void onTestSuccess(ITestResult result) {\n \tSystem.out.println(\"The test case is passed :\"+result.getName());\n }",
"@Override\n public void onClick(View arg0) {\n ((CreateDocketActivityPart2) activity).openMachineDetails(position);\n }",
"public void onClickDiscovery(View view) {\n Intent i = new Intent(this, TestActivity.class);\n i.putExtra(\"providerType\", ProviderType.DISCOVERY);\n startActivity(i);\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, ProdDescActivity.class);\n context.startActivity(intent);\n }",
"@SmallTest\n public void testForActivity() {\n solo.assertCurrentActivity(\"Wrong activity\", WelcomeActivity.class);\n }",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyYourdetailsGasOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"verify the Gas OverLay Link's In Your details\");\n\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\t\t\n\t\t.verifyGasWhyWeNeedThisLink()\n\t\t.verifyGasAcctnoWhereCanIfindthisLink()\n\t\t.verifyGasMeterPointWhereCanIfindthisLink()\n\t\t.verifyGasMeterIDWhereCanIfindthisLink();\n}",
"@OnClick(R.id.btnDetailsLKP)\n public void onClickDetailsLKP() {\n Intent i = new Intent(getActivity(), ActivityDetailsLKPSummary.class);\n\n// i.putExtra(ActivityDetailsLKPSummary.PARAM_IS_LKP_INQUIRY, isLKPInquiry);\n// i.putExtra(ActivityDetailsLKPSummary.PARAM_LKP_DATE, this.lkpDate.getTime());\n i.putExtra(ActivityDetailsLKPSummary.PARAM_COLLECTOR_ID, this.collectorCode);\n\n startActivity(i);\n }",
"@Test\n public void addManualPlaceAndCheckDetails() {\n // check the name and address of a place\n onView(withId(R.id.action_add_manual))\n .perform(click());\n\n // now in ManualPlaceDetailActivity\n onView(withId(R.id.et_manual_name)).perform(typeText(PLACE_NAME));\n onView(withId(R.id.et_manual_address)).perform(typeText(PLACE_ADDRESS));\n // close the keyboard so all Views are visible again\n Espresso.closeSoftKeyboard();\n\n // add a visit and update the date and time\n addAndUpdateManualVisit();\n\n // type some notes\n typeNotes();\n\n // add the manual place\n clickAddManualPlaceButton();\n\n // click manual place in list and check details are correct\n clickPlaceItem_OpensManualDetailActivity();\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(mContext, ItemDetailsActivity.class);\n\n intent.putExtra(\"name\", modellist.get(postition).getTitle());\n intent.putExtra(\"picture\", modellist.get(postition).getType() + postition);\n intent.putExtra(\"cost\", modellist.get(postition).getCost());\n intent.putExtra(\"id\", modellist.get(postition).getId());\n intent.putExtra(\"description\", modellist.get(postition).getDescription());\n intent.putExtra(\"extra\", modellist.get(postition).getExtra());\n\n mContext.startActivity(intent);\n// Toast.makeText(mContext, \"Make the user see the details of the item\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), DetailActivity.class)\n .putExtra(\"title\", model.getMovieName())\n .putExtra(\"vote_average\", model.getVotes() + \"\")\n .putExtra(\"overview\", model.getMovieOverview())\n .putExtra(\"popularity\", model.getMoviePopularity() + \"\")\n .putExtra(\"release_date\", model.getMovieReleaseDate())\n .putExtra(\"vote_count\", model.getMovieVoteCount())\n .putExtra(\"Picture\", model.getMoviePoster());\n\n startActivity(intent);\n\n }",
"public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }",
"public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }",
"public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }",
"public void onTestStart(ITestResult result) {\n\t\tlogger.info(\"Test Case Started\" + result.getName());\n\t}",
"@Override\r\n\tpublic void onTestStart(ITestResult Result) {\n\t\t\r\n\t}",
"@Test(enabled=false)\n\tpublic void loanDetails(){\n\t\n\t\ttry{\n\t\tHomePage homePage=new HomePage(driver);\n\t\thomePage.clickOnSignIn();\n\t\t\n\t\tLoginActions loginAction=new LoginActions();\n\t\tloginAction.login(driver, \"username\", \"password\");\n\t\t\n\t\tAccountSummaryPage accountsummary= new AccountSummaryPage(driver);\n\t\taccountsummary.isAccountSummary();\n\t\t\n\t\tAccountActivityPage accountActivity=new AccountActivityPage(driver);\n\t\taccountActivity.clickOnAccountActivity();\n\t\t\n\t\taccountActivity.selectLoanAccount();\n\t\t\n\t\taccountActivity.getRowdata();\n\t\t\n\t\tAssert.assertEquals(accountActivity.getRowdata(), \"RENT\");\t\n\t\t\n\t\tSystem.out.println(accountActivity.getRowdata());\n\t\t\n\t\t// Test case no - AccActShow_04 -no results for credit card are verified under this test only\n\t\n\t\taccountActivity.getCreditCard();\n\t\t\n\t\tAssert.assertEquals(accountActivity.getCreditCard(), \"No Results\");\n\t\t}\n\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.getMessage();\n\t\t}\n\t}",
"@Override\r\n\tpublic void onTestStart(ITestResult result) {\n\t\tSystem.out.println(\"TC on Test start\"+\" \"+result.getName());\r\n\t}",
"@Override\n public void performAction(View view) {\n startActivity(new Intent(MainActivity.this, MyInfoActivity.class));\n }",
"@Test\n public void testTIM(){\n loginToVisit();\n }",
"@Override\n public void performAction(View view) {\n startActivity(new Intent(MainActivity.this, MyInfoActivity.class));\n// QPManager.startRecordActivity(MainActivity.this);\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(DetailProgramActivity.this, StopWatchActivity.class);\r\n\t\t\t\ti.putExtra(\"workout_id\", WorkoutID);\r\n\t\t\t\ti.putExtra(\"name\", Name);\r\n\t\t\t\ti.putExtra(\"time\", Time);\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t}",
"@Test\n public void newScreenTest() {\n onView(withId(R.id.search_view)).perform(click());\n onView(withId(android.support.design.R.id.search_src_text)).perform(typeText(\"A\"));\n onView(withId(android.support.design.R.id.search_src_text)).check(matches(withText(\"A\")));\n closeSoftKeyboard();\n\n onView(isRoot()).perform(waitId(R.id.recycler_view, 500));\n\n onView(withId(R.id.recycler_view)).check(matches(isDisplayed()));\n onView(withId(R.id.recycler_view)).perform(actionOnItemAtPosition(0, click()));\n\n onView(isRoot()).perform(waitId(R.id.mapfragment, 500));\n\n intended(hasComponent(DetailActivity.class.getName()));\n }",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyAnonymousElectricCustomer()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the anonymous SMR page for Electric customer\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRElectricityUserforsingleMeter\");\n\nnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.verifyElectricityServiceDeskCustomer(smrProfile)\n\t.verifyLeadTable(smrProfile); \t\n}",
"public void gotoDetailSalesOrder() {\n\t}",
"public void btn_personal_details_On_click(View v) {\n Intent i = new Intent(MainActivity.this, PersonalDetails.class);\n startActivity(i);\n }",
"@Override\n public void onClick(View v) {\n Intent detail=new Intent(getBaseContext(),DetailArticle.class);\n detail.putExtra(\"webURL\",webHotURL);\n startActivity(detail);\n }",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRCollective(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates whether Submit meter read is successful for customers submitting within MR window for logged in customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}",
"public abstract String showDetails();",
"@Override\n public void onClick(String[] movieInformation) {\n Context context = this;\n Class destinationClass = DetailActivity.class;\n Intent intentToStartDetailActivity = new Intent(context, destinationClass);\n intentToStartDetailActivity.putExtra (\"movieInfo\", movieInformation);\n startActivity(intentToStartDetailActivity);\n }",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySubmitMeterReadingLandingPageLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the link navigations of Submit meter read landing page\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage1()\n\t\t.verifySubmitMeterreadLandingPageNavigationLinks();\n}",
"@Test(enabled = true, retryAnalyzer = Retry.class, testName = \"Sanity Tests\", description = \"Test TOUR for New accounts and for upgrade accounts\",\n\t\t\tgroups = { \"Sanity Android\" })\n\tpublic void tour() throws Exception, Throwable {\n\t\t \n\t\tgenMeth.killAppAndroid(driver);\n\t\tdriver = genMeth.setCapabilitiesAndroid(genMeth);\n\t\tgenMeth.clickId( genMeth, droidData.BTNalreadyHaveAnAccount_id);\n\t\tgenMeth.sendId( genMeth, droidData.TEXTFIELDemail_id, droidData.userLimited_name);\n\t\tgenMeth.sendId( genMeth, droidData.TEXTFIELDpassword_id, droidData.password);\n\t\tgenMeth.tapId( genMeth, droidData.BTNlogin_id);\n\t\tThread.sleep(3000);\n\t\t\n\t\t// check Never loose a photo\n\t\tgenMeth.isElementVisible( By.name(droidData.NeverLoseAPhoto));\n\t\tgenMeth.takeScreenShotPositive( genMeth, droidData.NeverLoseAPhoto );\n\t\tdriver.swipe(600, 800, 50, 800, 600);\n\t\t\n\t\t//Check Transfer phones simply\n\t\tgenMeth.isElementVisible( By.name(droidData.TransferPhonesSimply_name));\n\t\tgenMeth.takeScreenShotPositive( genMeth, droidData.TransferPhonesSimply_name );\n\t\tdriver.swipe(600, 800, 50, 800, 600);\n\t\t// Check Unlimited protection\n\t\tgenMeth.isElementVisible( By.name(droidData.UnlimitedProtection_Name));\n\t\tgenMeth.takeScreenShotPositive( genMeth, droidData.UnlimitedProtection_Name );\n\t\t\n\t\t// SKIP \n\t\tgenMeth.clickId( genMeth, droidData.BTNskip_ID);\n\t\t\n\t\t// Check Backup\n\t\tgenMeth.isElementVisible( By.name(droidData.Backup_Name));\n\t\tgenMeth.takeScreenShotPositive( genMeth, droidData.Backup_Name );\n\t\t\n\t\t// press the Continue button \n\t\tgenMeth.clickId( genMeth, droidData.BTNfinishTour_id);\t\n\t\tgenMeth.isTextPresentAndroid(driver, By.name(droidData.CATEGORIES), droidData.CATEGORIES);\n\t\tThread.sleep(1000);\n\t\t\n\t\t//Verify that LOGOUT & RELOGIN will not prompt the tour\n//\t\tgenMeth.clickXpth(genMeth, \"//android.widget.RelativeLayout[1]/android.view.View[2]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.ListView[1]/android.widget.LinearLayout[7]\");\n\t\tgenMeth.tapXpth( genMeth, \"//android.widget.RelativeLayout[1]/android.view.View[2]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.ListView[1]/android.widget.LinearLayout[7]\");\n\t\tdriver.scrollToExact(droidData.OPTIONsignOut_Name);\n\t\tgenMeth.clickName( genMeth, droidData.OPTIONsignOut_Name);\n\t\tgenMeth.clickName( genMeth, droidData.BTNok_Name);\n\t\tgenMeth.clickId( genMeth, droidData.BTNalreadyHaveAnAccount_id);\n\t\tgenMeth.sendId( genMeth, droidData.TEXTFIELDemail_id, droidData.userLimited_name);\n\t\tgenMeth.sendId( genMeth, droidData.TEXTFIELDpassword_id, droidData.password);\n\t\tgenMeth.tapId( genMeth, droidData.BTNlogin_id);\n\t\tgenMeth.isTextPresentAndroid(driver, By.name(droidData.CATEGORIES), droidData.CATEGORIES);\n\t\t\n\t\t \n\t\t// same test only with Upgrade now at pogoplug.com\n\t\tgenMeth.killAppAndroid(driver);\n\t\tdriver = genMeth.setCapabilitiesAndroid(genMeth);\n\t\tgenMeth.clickId( genMeth, droidData.BTNalreadyHaveAnAccount_id);\n\t\tgenMeth.sendId( genMeth, droidData.TEXTFIELDemail_id,droidData.userLimited_name);\n\t\tgenMeth.sendId( genMeth, droidData.TEXTFIELDpassword_id,droidData.password);\n\t\tgenMeth.tapId( genMeth, droidData.BTNlogin_id);\n\n\t\t// check Never loose a photo\n\t\tgenMeth.isElementVisible( By.name(droidData.NeverLoseAPhoto));\n\t\tdriver.swipe(600, 800, 50, 800, 600);\n\n\t\t// Check Transfer phones simply\n\t\tgenMeth.isElementVisible(By.name(droidData.TransferPhonesSimply_name));\n\t\tdriver.swipe(600, 800, 50, 800, 600);\n\t\t// Check Unlimited protection\n\t\tgenMeth.isElementVisible(By.name(droidData.UnlimitedProtection_Name));\n\t\tgenMeth.takeScreenShotPositive( genMeth, droidData.UnlimitedProtection_Name + \"_Tour\");\n\n\t\t// UPGRADE now at pogoplug.com\n\t\tgenMeth.clickId( genMeth, droidData.BTNtourUpgradeNow_ID);\n\t\tgenMeth.isElementVisible( By.name(droidData.BillingUrl_Name));\n\t\tgenMeth.takeScreenShotPositive( genMeth, \"_Tour_Billing_Page\");\n\t\t\n\t\t\n\t\t\n\t// =====================================================\n\t// Tour for Unlimited Account\n\t// =====================================================\n\t\t \n\t\t\n\t\tgenMeth.killAppAndroid(driver);\n\t\tdriver = genMeth.setCapabilitiesAndroid(genMeth);\n\t\tgenMeth.clickId( genMeth, droidData.BTNalreadyHaveAnAccount_id);\n\t\tgenMeth.sendId( genMeth, droidData.TEXTFIELDemail_id, droidData.userUnlimited_name);\n\t\tgenMeth.sendId( genMeth, droidData.TEXTFIELDpassword_id, droidData.password);\n\t\tgenMeth.tapId( genMeth, droidData.BTNlogin_id);\n\t\t\n\t\t// check Never loose a photo\n\t\tgenMeth.isElementVisible( By.name(droidData.NeverLoseAPhoto));\n\t\tdriver.swipe(600, 800, 50, 800, 600);\n\t\t\n\t\t//Check Transfer phones simply\n\t\tgenMeth.isElementVisible( By.name(droidData.TransferPhonesSimply_name));\n\t\tgenMeth.takeScreenShotPositive( genMeth, droidData.TransferPhonesSimply_name + \"_Tour_Finish\");\n\t\tgenMeth.clickId( genMeth, \"com.pogoplug.android:id/tour_indicator_placehoder\");\n\t\t\n\t\t// Check Backup\n\t\tgenMeth.isElementVisible( By.name(droidData.Backup_Name));\n\t\t\n\t\t// press the Continue button \n\t\tgenMeth.clickId( genMeth, droidData.BTNfinishTour_id);\t\n\t\tgenMeth.isTextPresentAndroid(driver, By.name(droidData.CATEGORIES), droidData.CATEGORIES);\n\t\tThread.sleep(1000);\n\t\t// logout & relogin will not prompt the tour\n\t\tgenMeth.tapXpth( genMeth, \"//android.widget.RelativeLayout[1]/android.view.View[2]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.ListView[1]/android.widget.LinearLayout[7]\");\n\t\tdriver.scrollToExact(droidData.OPTIONsignOut_Name);\n\t\tgenMeth.clickName( genMeth, droidData.OPTIONsignOut_Name);\n\t\tgenMeth.clickName( genMeth, droidData.BTNok_Name);\n\t\tgenMeth.clickId( genMeth, droidData.BTNalreadyHaveAnAccount_id);\n\t\tgenMeth.sendId( genMeth, droidData.TEXTFIELDemail_id, droidData.userUnlimited_name);\n\t\tgenMeth.sendId( genMeth, droidData.TEXTFIELDpassword_id, droidData.password);\n\t\tgenMeth.tapId( genMeth, droidData.BTNlogin_id);\n\t\tgenMeth.isTextPresentAndroid(driver, By.name(droidData.CATEGORIES), droidData.CATEGORIES);\n\t\t\n\t}",
"@Override\r\n\tpublic void onTestSuccess(ITestResult result) {\n\t\tSystem.out.println(\"onTestSuccess -> Test Name: \"+result.getName());\r\n\t}",
"@When(\"Hotels Details page has finished loading\")\n public void detailspage_i_am_on_details_page() {\n detailsPage = new HotelsDetailsPage(driver);\n detailsPage.check_page_title();\n }",
"@Override\n \tpublic void setUp() throws Exception{\n \t\tLog.i(\"got to top of setup\", \"yay\");\n \t\t\n \t\tLog.i(\"solo\", \"created solo\");\n \t\t\n \t\tLog.i(\"user name\", \"set user name\");\n \t\tIntent i = new Intent();\n \t\ti.putExtra(\"groupname\", \"GroupForTestingOnly\");\n \t\ti.putExtra(\"gm\", \"UseForTestingOnly\");\n \t\tsetActivityIntent(i);\n \t\tsolo = new Solo(getInstrumentation(), getActivity());\n \t\tSaveSharedPreference.setPersistentUserName(getActivity(), VALID_USERNAME);\n \t\tLog.i(\"set the intent\", \"what?\");\n \t}"
] | [
"0.7293577",
"0.7178242",
"0.67626023",
"0.67626023",
"0.6581676",
"0.6520456",
"0.651035",
"0.64544445",
"0.6401497",
"0.6371073",
"0.6326098",
"0.6312389",
"0.6300154",
"0.6294609",
"0.6278158",
"0.6267996",
"0.62468475",
"0.6246014",
"0.62197244",
"0.6176565",
"0.6149429",
"0.61101234",
"0.6098524",
"0.60984385",
"0.606053",
"0.6037888",
"0.60351324",
"0.6027587",
"0.6018295",
"0.60155314",
"0.6000295",
"0.5998816",
"0.59939355",
"0.59934384",
"0.5978744",
"0.5974096",
"0.597233",
"0.5954957",
"0.594518",
"0.59420204",
"0.59260094",
"0.59254026",
"0.59135926",
"0.59049296",
"0.59034485",
"0.59022796",
"0.589638",
"0.58946955",
"0.5891248",
"0.5890005",
"0.5888015",
"0.58631533",
"0.5842078",
"0.5839388",
"0.583222",
"0.5831216",
"0.5828631",
"0.5825446",
"0.58171743",
"0.58155924",
"0.5810239",
"0.5804478",
"0.5796097",
"0.57939625",
"0.57665986",
"0.5760618",
"0.57495743",
"0.5749541",
"0.5748281",
"0.5745656",
"0.5739021",
"0.57318807",
"0.57305837",
"0.5728698",
"0.5727691",
"0.57211286",
"0.5720003",
"0.5720003",
"0.5720003",
"0.5712757",
"0.57113636",
"0.57112473",
"0.57077134",
"0.5707024",
"0.57068634",
"0.57042575",
"0.56971526",
"0.56964666",
"0.5684627",
"0.5683278",
"0.56828314",
"0.5681866",
"0.56784576",
"0.5677041",
"0.56671804",
"0.5659886",
"0.56542176",
"0.56540245",
"0.564284",
"0.563665"
] | 0.82838815 | 0 |
This navigates back to the Main menu. | public void GoToMain() {
Intent intent = new Intent(this, MainActivity.class);
intent.putExtra("Test value", testList);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void backToMenu()\n\t{\n\t\t//switch to menu screen\n\t\tgame.setScreen(new MenuScreen(game));\n\t}",
"default public void clickBack() {\n\t\tclickMenu();\n\t}",
"private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }",
"private void backToMain() {\n // https://stackoverflow.com/questions/5446565\n // Checks to see if they are still on this activity\n if (getWindow().getDecorView().getRootView().isShown()) {\n onBackPressed();\n }\n }",
"public void back(){\n\t\tswitch(state){\n\t\tcase LOGINID:\n\t\t\tbreak; //do nothing, already at top menu\n\t\tcase LOGINPIN:\n\t\t\tloginMenu();\n\t\t\tbreak;\n\t\tcase TRANSACTION:\n\t\t\tbreak; //do nothing, user must enter the choice to log out\n\t\tcase DEPOSIT:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase DEPOSITNOTIFICATION:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAW:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase BALANCE:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAWALNOTIFICATION:\n\t\t\tbreak; //do onthing, user must press ok\n\t\t}\n\t\t\n\t\tcurrentInput = \"\";\n\t}",
"public void goBack(){\n startActivity(new Intent(this, MainMenu.class));\n }",
"public void back()\r\n\t{\r\n\t\tparentPanel.setState(GameState.Menu);\r\n parentPanel.initScene(GameState.Menu);\r\n\t\t\t\r\n\t}",
"public void back() {\n Views.goBack();\n }",
"public void returnToMenu()\n\t{\n\t\tchangePanels(menu);\n\t}",
"public void navigateToBack() {\n WebDriverManager.getDriver().navigate().back();\n }",
"public void backMenu() {\n openWindowGeneral(\"/gui/administrator/fxml/FXMLMenuAdministrator.fxml\", btnCancel);\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tif (isMenuShowing) {\r\n\t\t\thideMenu();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tsuper.onBackPressed();\r\n\t}",
"public void back()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"BackButton\")).click();\n\t}",
"private void navBack() {\n Intent intent = new Intent(this, standard_home.class);\n startActivity(intent);\n }",
"@Override\n\tpublic void goToMainMenu() {\n\t\tfinish();\n\t}",
"public void returnToMenu(){\n client.moveToState(ClientState.WELCOME_SCREEN);\n }",
"public void goBackToMainMenu() {\n new MainMenu();\n dispose();\n }",
"public void backToMenu() {\n\t\tcurrentGameGraphics.setVisible(false);\n\t\tcurrentGameGraphics = null;\n\t\tgameScreen.setVisible(true);\n\t}",
"private void backToMenu()\n {\n Intent i = new Intent(this, HomeScreen.class);\n startActivity(i);\n }",
"public void GoBack(ActionEvent actionEvent) throws IOException\n {\n Main.backToMain();\n }",
"public void back() {\n\t\tstate.back();\n\t}",
"protected void goBack() {\r\n\t\tfinish();\r\n\t}",
"private void goToMainPage() {\n mAppModel.getErrorBus().removePropertyChangeListener(this);\n mAppModel.removePropertyChangeListener(this);\n mNavigationHandler.goToMainPage();\n }",
"public void goBack() throws IOException { DashboardController.dbc.loadHomeScene(); }",
"@Override\n\tpublic void goToBack() {\n\t\tif(uiHomePrestamo!=null){\n\t\tuiHomePrestamo.getHeader().getLblTitulo().setText(constants.prestamos());\n\t\tuiHomePrestamo.getHeader().setVisibleBtnMenu(true);\n\t\tuiHomePrestamo.getContainer().showWidget(1);\n\t\t}else if(uiHomeCobrador!=null){\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tuiHomeCobrador.getContainer().showWidget(2);\n\t\t\tuiHomeCobrador.getUiClienteImpl().cargarClientesAsignados();\n\t\t\tuiHomeCobrador.getUiClienteImpl().reloadTitleCobrador();\n\t\t}\n\t}",
"@Override\r\n\tpublic void onBackKeyPressed()\r\n\t{\n\t\tSceneManager.getInstance().loadMenuScene(activity.getEngine());\r\n\t}",
"public void ReturnToMenu() throws Exception {\n menu.ReturnToMenu(btnMenu, menu.getGuiType());\n }",
"public void backToMainMenu()\n {\n primaryStage.close();\n }",
"private void backButtonAction() {\n CurrentUI.changeScene(SceneNames.LOGIN);\n }",
"public static void goBack() {\n\t\tif (touchGUI.getTouchModel().getGuiModel().isDialogShown()) {\n\t\t\ttouchGUI.getTouchModel().getGuiModel().closeActiveDialog();\n\t\t} else {\n\t\t\t// else go to last view in history\n\t\t\tif (!appWidget.goBack()) {\n\t\t\t\t// if history is empty -> close app\n\t\t\t\tphoneGap.exitApp();\n\t\t\t}\n\t\t}\n\n\t\tlaf.updateUndoSaveButtons();\n\t\ttouchGUI.updateViewSizes();\n\t}",
"public void navigateToHome() {\n Intent intent = new Intent(this, MainMenu.class);\n startActivity(intent);\n finish();\n }",
"public static void navigateBack() {\n\t\tLOG.info(\"Navigate to back page from current page.\");\n\t\tConstants.driver.navigate().back();\n\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tIntent intent = new Intent(GameModeActivity.this, MenuActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n public void onBackPressed() {\n exitReveal();\n\n super.onBackPressed();\n }",
"public static void back() {\n driver.navigate().back();\n }",
"private void backActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backActionPerformed\n // TODO add your handling code here:\n MainMenu m = new MainMenu();\n this.setVisible(false);\n m.setVisible(true);\n m.setLocationRelativeTo(null);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\texitApplication().onClick(null);\n\t\tsuper.onBackPressed();\n\t}",
"private void onBack() {\n\t\tIntent startMain = new Intent(Intent.ACTION_MAIN);\r\n\t\tstartMain.addCategory(Intent.CATEGORY_HOME);\r\n\t\tstartMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // //FLAG_ACTIVITY_NEW_TASK\r\n\t\tstartActivity(startMain);\r\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\treturn;\n\t}",
"public void backToMain(View view)\n {\n Intent back = new Intent(this,MainActivity.class);\n startActivity(back);\n finish();\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}",
"public void goBack() {\n setEditor(currentEditor.getParentEditor());\n }",
"@Override\n\tpublic void onBackPressed() {\n\n\t\tnavigatetoAppointmentsListingScreen(\"false\");\n\t}",
"public void naviagteBackToPage() {\n\t\tgetDriver().close();\n\t}",
"private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }",
"public void back() {\n driver.navigate().back();\n }",
"@Override\n\tpublic void onBackPressed() {\n\treturn;\n\t}",
"public void navigate_back() throws CheetahException {\n\t\ttry {\n\t\t\tCheetahEngine.getDriverInstance().navigate().back();\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}",
"public void exitToMenu()\n {\n exitToMenuFlag = true;\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\tIntent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n finish();\n System.exit(0);\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tif(menu_Drawder.isOpened()){\n\t\t\tmenu_Drawder.close();\n\t\t}\n\t}",
"@Override\n public void onBackPressed() {\n backToHome();\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}",
"public void back() {\n //noinspection ResultOfMethodCallIgnored\n previous();\n }",
"@Override\n public void onBackPressed() {\n mediaPlayer.pause();\n Intent intent = new Intent(this, MainMenuActivity.class);\n startActivity(intent);\n finish();\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tIntent i = new Intent(this, MainActivity.class);\r\n\t\tstartActivity(i);\r\n\t}",
"private void backToMenu(ActionEvent actionEvent) {\n try {\n ((UserController) changeScene(\"/gui/guiuser/UserUI-ATM.fxml\")).initData(userManager);\n } catch (IOException e) {\n e.printStackTrace();\n }\n displayScene(actionEvent);\n }",
"public void goBack() {\n goBackBtn();\n }",
"public void returnToMainMenu(View view){\n Intent main_menu_intent = new Intent(this, MainActivity.class);\r\n startActivity(main_menu_intent);\r\n }",
"@FXML\n void goBack(ActionEvent event) throws IOException{\n loadMain(event, session);\n }",
"@Override\n public void goBack() {\n\n }",
"private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}",
"@Override\n public void onBackPressed() {\n\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.addCategory( Intent.CATEGORY_HOME );\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n }",
"@FXML\r\n void returnToMainMenu(ActionEvent event) throws Exception {\r\n \tGeneralMethods.ChangeScene(\"MainMenu\", \"MainMenu\");\r\n }",
"@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}",
"public void goBackToPreviousScene() {\n\n scenesSeen.pop();\n currentScene = scenesSeen.peek();\n\n this.window.setScene(currentScene.createAndReturnScene());\n }",
"private void backActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backActionPerformed\n this.setVisible(false);\n MainMenu.adminMainMenu.setVisible(true);\n}",
"@FXML\r\n\t\tpublic void back(ActionEvent event) {\r\n\t\t\tGuiBasedApp.launchHomeScreenScene();\r\n\t\t}",
"@Override\n public void onBackPressed() {\n confirmExit();\n }",
"@Override\n public void onBackPressed() {\n return;\n }",
"@Override\n public void onBackPressed() {\n return;\n }",
"@Override\n public void onBackPressed() {\n return;\n }",
"@Override\n public void onBackPressed() {\n return;\n }",
"public boolean onBackButtonPressed(MenuItem item){\n Intent goBack = new Intent(getApplicationContext(), MainActivity.class);\n startActivityForResult(goBack, 0);\n return true;\n }",
"@Override\n public void onBackPressed() {\n \t\n \tif(this.backIndex==0)\n \t{\n \t\tif(this.presentFeatureCode.equals(\"MAINMENU\"))\n \t\t{\n \t\t\tAlertDialog.Builder adb_4=new AlertDialog.Builder(Home.this);\n \t Log.v(\"Track21\", \"Clicked1\");\n \t adb_4.setTitle(\"Exit\");\n \t Log.v(\"Track31\", \"Clicked2\");\n \t adb_4.setMessage(\"Log Out?\");\n \t adb_4.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n \t {\n \t public void onClick(DialogInterface paramDialogInterface, int paramInt)\n \t {\n \t \t Intent myIntent = new Intent(Home.this, SignIn.class);\n \t startActivity(myIntent);\n \t finish();\n \t }\n \t });\n \t adb_4.setNegativeButton(\"No\", new DialogInterface.OnClickListener()\n \t {\n \t public void onClick(DialogInterface paramDialogInterface, int paramInt)\n \t {\n \t \t /*Intent myIntent = new Intent(SetUp.this, SetUp.class);\n \t SetUp.this.startActivity(myIntent);\n \t finish();*/\n \t paramDialogInterface.dismiss();\n \t Log.v(\"backIndex in Home cancelled Going Back =\", \"\" + backIndex);\n \t }\n \t });\n \t \n \t adb_4.show();\n \t\t}\n \t\telse\n \t\t{\n\t \t\tIntent intent_=new Intent(Home.this, Home.class);\n\t \t intent_.putExtra(\"keyy\", Home.this.keyy);\n\t\t startActivity(intent_);\n\t\t finish();\n \t\t}\n \t}\n \telse\n \t{\n \t\tIntent intent_=new Intent(Home.this, Home.class);\n \t intent_.putExtra(\"keyy\", Home.this.keyy);\n \t\t\n\t startActivity(intent_);\n\t finish();\n \t}\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tgame.getController().undoLastMove();\r\n\t}",
"public void backToMainMenu() throws IOException {\n logLoadGame.log(Level.INFO, \"Switching Scene to Main Menu\");\n Parent mainMenu = FXMLLoader.load(getClass().getResource(\"/Gui_View/fxmlFiles/MainMenu.fxml\"));\n Main.primaryStage.setScene(new Scene(mainMenu));\n Main.primaryStage.show();\n }",
"public void returnToMainMenu() {\n AppStateManager stateManager = getStateManager();\n setEnabled(false);\n\n EnginePowerGraphState enginePowerGraphState\n = getState(EnginePowerGraphState.class);\n stateManager.detach(enginePowerGraphState);\n\n TireDataState tireDataState = getState(TireDataState.class);\n stateManager.detach(tireDataState);\n\n VehicleEditorState vehicleEditorState\n = getState(VehicleEditorState.class);\n stateManager.detach(vehicleEditorState);\n\n DebugTabState debugTabState = getState(DebugTabState.class);\n stateManager.detach(debugTabState);\n\n getState(DriverHud.class).setEnabled(false);\n\n Vehicle vehicle = MavDemo1.getVehicle();\n Vehicle newVehicle;\n try {\n Class<? extends Vehicle> clazz = vehicle.getClass();\n newVehicle = clazz.getDeclaredConstructor().newInstance();\n } catch (ReflectiveOperationException exception) {\n throw new RuntimeException(exception);\n }\n MavDemo1 main = MavDemo1.getApplication();\n AssetManager assetManager = main.getAssetManager();\n newVehicle.load(assetManager);\n MavDemo1.setVehicle(newVehicle);\n\n stateManager.attach(new MainMenu());\n getState(CameraInputMode.class).orbit();\n }",
"public static void pressBack() {\n onView(isRoot()).perform(ViewActions.pressBack());\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\treturn;\n\t}",
"@Override\n public void onBackPressed() {\n return;\n }",
"protected void navigateBack() {\n getActivity().finish();\n ActivityTransition transition = ActivityTransition.BACK;\n getActivity().overridePendingTransition(transition.getEnter(), transition.getExit());\n }",
"private static boolean backToMenu() {\n boolean exit = false;\n System.out.println(\"Return to Main Menu? Type Yes / No\");\n Scanner sc2 = new Scanner(System.in);\n if (sc2.next().equalsIgnoreCase(\"no\"))\n exit = true;\n return exit;\n }",
"@FXML\r\n private void handleBackButton() {\r\n\r\n CommonFunctions.showAdminMenu(backButton);\r\n\r\n }",
"public void backToMain(ActionEvent event) throws IOException{\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"../view/main.fxml\"));\n root = loader.load();\n MainController controller = loader.getController();\n controller.selectTab(1);\n stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n scene = new Scene(root);\n stage.setScene(scene);\n stage.show();\n } catch (IOException e) {\n showError(true, \"Can not load the protected page.\");\n }\n }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n finish();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }",
"public void backToHome(){\n logger.debug(\"click on Back to Home button\");\n driver.findElement(oBackToHome).click();\n }",
"public void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tIntent openMainActivity = new Intent(getApplicationContext(),gridMenu.class);\r\n\t\t\r\n\t\topenMainActivity.putExtra(\"section\",\"Test\");\r\n\t\tstartActivity(openMainActivity);\r\n\t\t//this.finish();\r\n\t}",
"@Override\n public void onBackPressed() {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }",
"@Override\n public void onBackPressed() {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }",
"@Override\n public void onBackPressed() {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tIntent in=new Intent(AgentSectionActivity.this,MainActivity.class);\n\t\tstartActivity(in);\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n public void onBackPressed() {\n Intent i = new Intent(StockAdjustmentList.this, ActivityHomeScreen.class);\n startActivity(i);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n finish();\n }",
"void actionBack();",
"private void backPage()\n {\n page--;\n open();\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"public void Exit() {\r\n \tsuper.onBackPressed();\r\n }"
] | [
"0.8205697",
"0.7976754",
"0.7959465",
"0.78792375",
"0.7860691",
"0.78032166",
"0.7753926",
"0.7739716",
"0.76505363",
"0.7590818",
"0.7571074",
"0.75514764",
"0.75463074",
"0.7535688",
"0.7523993",
"0.7517856",
"0.743077",
"0.74253565",
"0.74184096",
"0.7367284",
"0.7355563",
"0.7280303",
"0.72441834",
"0.7227046",
"0.72264946",
"0.7216173",
"0.7213772",
"0.7198271",
"0.71907806",
"0.717562",
"0.7170009",
"0.7134523",
"0.71174073",
"0.70923316",
"0.70885956",
"0.70809954",
"0.7080252",
"0.7079899",
"0.706556",
"0.7062496",
"0.7052727",
"0.7038005",
"0.70247656",
"0.7013202",
"0.70096433",
"0.70086974",
"0.699641",
"0.69934016",
"0.6982223",
"0.6961409",
"0.6959197",
"0.6946979",
"0.69284475",
"0.69223267",
"0.69223267",
"0.6914344",
"0.69088495",
"0.69053227",
"0.6902208",
"0.68951124",
"0.6886209",
"0.68798906",
"0.68700653",
"0.68630016",
"0.6842838",
"0.68357295",
"0.68355",
"0.6820355",
"0.68149054",
"0.6813105",
"0.68117684",
"0.67983073",
"0.67983073",
"0.67983073",
"0.67983073",
"0.6796456",
"0.67945915",
"0.67819697",
"0.677635",
"0.6770531",
"0.6759516",
"0.6759381",
"0.6755783",
"0.6754731",
"0.6754538",
"0.6745512",
"0.6743049",
"0.67364275",
"0.67274904",
"0.6725055",
"0.67205775",
"0.67205775",
"0.67205775",
"0.6720087",
"0.67169875",
"0.67169875",
"0.6713942",
"0.6712976",
"0.6711209",
"0.67100406",
"0.6707538"
] | 0.0 | -1 |
This goes to the Create Test Activity to create a new test. | public void createTest() {
Intent intent = new Intent(this, Settings.class);
intent.putExtra("Test value", testList);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createTestCase(String testName) {\r\n\t\tif (!active) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (testName == null || testName.isEmpty()) {\r\n\t\t\tthrow new ConfigurationException(\"testName must not be null or empty\");\r\n\t\t}\r\n\t\t\r\n\t\tif (applicationId == null) {\r\n\t\t\tcreateApplication();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tJSONObject testJson = getJSonResponse(Unirest.post(url + TESTCASE_API_URL)\r\n\t\t\t\t\t.field(\"name\", testName)\r\n\t\t\t\t\t.field(\"application\", applicationId));\r\n\t\t\ttestCaseId = testJson.getInt(\"id\");\r\n\t\t} catch (UnirestException | JSONException e) {\r\n\t\t\tthrow new SeleniumRobotServerException(\"cannot create test case\", e);\r\n\t\t}\r\n\t}",
"@Test(groups=\"smokesuits\",retryAnalyzer =com.crm.autodesk.GenericUtility.RetryAnalyzer.class )\n\tpublic void CreateLeadTest() throws Throwable {\n\t\tHomePage homepage = new HomePage(driver);\n\t\thomepage.clickOnLead();\n\t\t// navigate to create lead\n\t\tLeadPage leadp = new LeadPage(driver);\n\t\t// click on create lead\n\t\tleadp.clickCreateLeadImg();\n\t\tleadp.clickCancel();\n\t\t\n\t}",
"@Test\n public void onCreate() {\n }",
"@Test\n public void onCreate() {\n }",
"public NewTestWizardPage() {\n\t\tsuper(true, \"New Groovy Test Settings\");\n\n\t\tsetTitle(\"Groovy Test Class\");\n\t\tsetDescription(\"Create a new Groovy unit test class\");\n\t}",
"@Test\n public void autocreateLesson() throws Exception{\n\n }",
"@Test //Associated with Create a new contact (Scenario 1)\n public void createNewContactTest() throws Exception {\n onView(withId(R.id.contact_new)).perform(click());\n\n //confirms that the button on the Edit Contact screen associated with the id info_delete_button\n //has a string associated with it that reads \"Delete Contact\". This string and id is unique in the\n //app and only exists in this singular activity.\n onView(withId(R.id.info_delete_button)).check(matches(withText(R.string.info_delete)));\n\n //types in the name \"Shane\" into the name field for the Contact\n onView(withId(R.id.info_name)).perform(typeText(\"Shane\"), closeSoftKeyboard());\n\n //performs a click operation on the \"Submit Changes\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n //confirms that you are taken back to the ContactActivity page confirming that a\n //new Contact was in fact created\n onView(withId(R.id.contact_new)).check(matches(withText(\"New Contact\")));\n\n //performs a scroll action within the activity to take you to the necessary spot where\n //the newly created contact will be located\n onView(withId(R.id.contacts_list)).perform(RecyclerViewActions.scrollToPosition(0));\n\n //performs a click operation on the newly created Contact that is within the field\n //of view for the RecyclerView\n onView(withText(\"Shane\")).perform(click());\n\n //clicks the Delete Contact button\n onView(withId(R.id.info_delete_button)).perform(click());\n }",
"@Test\n public void saveActivity() {\n }",
"@Test\n public void addNewTask_startsActivity() {\n mTasksNavigator.addNewTask();\n\n // The AddEditTaskActivity is opened with the correct request code\n verify(mNavigationProvider).startActivityForResult(eq(AddEditTaskActivity.class),\n eq(AddEditTaskActivity.REQUEST_ADD_TASK));\n }",
"@Test // (groups={\"All\"}) //(groups={\"smoke\"})\r\n\tpublic void createLead() {\n\t\tSystem.out.println(\"create\");\r\n\t}",
"@Test\n public void testAddNewLane_success() throws Exception {\n Context targetContext = InstrumentationRegistry.getInstrumentation()\n .getTargetContext();\n\n\n Intent intent = new Intent(targetContext, CustomerActivity.class);\n intent.putExtra(LoginActivity.EXTRA_USER_ID, db.getCustomerByEmail(\"a\").getCustomerID());\n mActivityRule.launchActivity(intent);\n\n onView(withId(R.id.buttonRequestLane)).perform(click());\n\n onView(withId(R.id.playersNumBox)).perform(typeText(\"1\"));\n onView(withId(R.id.playersNumBox)).perform(closeSoftKeyboard());\n onView(withId(R.id.player_submit_button)).perform(click());\n\n\n\n onView(withId(R.id.qr_scanner_button)).perform(click());\n\n onView(withId(R.id.customer_lanes_text_view)).check(matches(withText(containsString(\"1\"))));\n\n }",
"@PostMapping(\"/type-tests\")\n @Timed\n public ResponseEntity<TypeTest> createTypeTest(@Valid @RequestBody TypeTest typeTest) throws URISyntaxException {\n log.debug(\"REST request to save TypeTest : {}\", typeTest);\n if (typeTest.getId() != null) {\n throw new BadRequestAlertException(\"A new typeTest cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n TypeTest result = typeTestService.save(typeTest);\n return ResponseEntity.created(new URI(\"/api/type-tests/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@Test(groups = \"Transactions Tests\", description = \"Create new transaction\")\n\tpublic void createNewTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"300\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.typeTransactionNote(\"Extra income from this month\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"Sub-account created successfully and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"'Double Entry' account also have the transaction and the value is correct\");\n\n\t}",
"public void clickCreate() {\n\t\tbtnCreate.click();\n\t}",
"@Test\n void addTask() {\n }",
"@BeforeMethod\n\tpublic void NavigateToCreateUserTest() {\n\t\ttry {\n\t\t\tassertTrue(CreateUserCukes.clickCreateUserTab(wd));\n\t\t\tassertTrue(CreateUserCukes.loadedCreateUserTab(wd));\n\n\t\t} catch (Throwable e) {\n\t\t\tfail(\"Error: Failed to navigate to Create User tab\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n public void testCreate() {\n\n }",
"public void publishTest(TestCreateDTO testCreateDTO) {\n\t\tTest test = new Test();\n\t\tPaper paper = paperMapper.selectByPrimaryKey(testCreateDTO.getPaperId());\n\t\tif(paper ==null ) {\n\t\t\tthrow new CustomizeException(CustomizeErrorCode.PAPER_NOT_FOUND);\n\t\t}\n\t\tpaper.setStatus(true);\n\t\tpaperMapper.updateByPrimaryKey(paper);\n\t\ttest.setDuration(testCreateDTO.getDuration().getTime());\n\t\ttest.setStartTime(testCreateDTO.getStartTime().getTime());\n\t\ttest.setEndTime(test.getStartTime()+test.getDuration());\n\t\ttest.setCreateTime(System.currentTimeMillis());\n\t\ttest.setModifyTime(test.getCreateTime());\n\t\ttest.setPaperId(testCreateDTO.getPaperId());\n\t\ttest.setId(testCreateDTO.getId());\n\t\ttest.setName(testCreateDTO.getName());\n\t\ttest.setId(IdAutoGeneratorUtil.generatorId(GeneratorIdEnum.TEST));\n\t\ttest.setStatus(false);\n\t\ttestMapper.insert(test);\n\t\tdelayQueueManage.put(new DelayTask(test));\n\t\tnotifyService.createNotify(test,ReceiverEnum.ALL_USER, MessageTypeEnum.PUBLISH_NEW_TEST);\n\t}",
"Testcase createTestcase();",
"public void goTestActivity()\n\t {\n\t }",
"@Test\n public void test_create_scenario() {\n try {\n TestData X = new TestData(\"project2.opt\");\n String new_name = \"new_scenario\";\n X.project.create_scenario(new_name);\n assertNotNull(X.project.get_scenario_with_name(new_name));\n } catch (Exception e) {\n fail(e.getMessage());\n }\n }",
"@Test\n\tpublic static void create_Task() {\n\t\tString testName = \"Valid Scenario- When all the data are valid\";\n\t\tlog.info(\"Valid Scenario: Create Task\");\n\t\t// report generation start\n\t\textentTest = extent.startTest(\"Task Controller- Create Task\");\n\n\t\tResponse response = HttpOperation\n\t\t\t\t.createAuthToken(PayLoads.createAuthToken_Payload(extentTest, auth_sheetName, auth_valid_testName));\n\t\tString authToken = ReusableMethods.Auth(extentTest, response);\n\n\t\t// response for login the user\n\t\tresponse = HttpOperation.loginUser(authToken, PayLoads.create_user_Payload(user_sheet, testName));\n\t\tlog.info(\"Response received for login\");\n\t\textentTest.log(LogStatus.INFO, \"Response received for login:- \" + response.asString());\n\n\t\t// get the User Token\n\t\tJsonPath jp = ReusableMethods.rawToJson(response);\n\t\tuserToken = jp.get(\"jwt\");\n\t\tlog.info(\"Received User Token:- \" + userToken);\n\t\textentTest.log(LogStatus.INFO, \"User Token:- \" + userToken);\n\n\t\t// Creating the Task response\n\t\tresponse = HttpOperation.create_Task(userToken, PayLoads.create_task_Payload(sheetName, testName));\n\n\t\tlog.info(\"Response received to create the task\");\n\t\textentTest.log(LogStatus.INFO, \"Response received to create the task:- \" + response.asString());\n\n\t\t// Assertion\n\n\t\tAssert.assertEquals(response.getStatusCode(), 201);\n\t\tlog.info(\"Assertion Passed!!\");\n\t\textentTest.log(LogStatus.INFO, \"HTTP Status Code:- \" + response.getStatusCode());\n\n\t}",
"@Override\n\tpublic void onTestStart(ITestResult result) {\n\t\ttest=extent.createTest(result.getMethod().getMethodName());\n\t}",
"@Test\n public void testFindByCreate() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add item\n\n String name = \"task1\";\n String desc = \"desc1\";\n String create = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name, desc, create, yes});\n new StartUI(input1).init(tracker);\n\n // find item\n\n String action2 = \"5\";\n\n Input input2 = new StubInput(new String[]{action2, create, yes});\n new StartUI(input2).init(tracker);\n\n }",
"@When(\"I click on the Create new Project\")\n public void i_click_on_the_create_new_project(){\n\n i_click_on_create_a_new_project();\n }",
"@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}",
"@Test\r\n public void testCreate() {\r\n ActivityRecord record = setActivityRecord();\r\n recordDao.create(record);\r\n assertNotNull(record.getId());\r\n }",
"@Override\n\tpublic void signup(String testinfo) {\n\t\tString[] test_info = testinfo.split(\"\\t\");\n\t\tTest test = new Test();\n\t\t\n\t\tint userID = Integer.valueOf(test_info[0]);\n\t\tint paperID = Integer.valueOf(test_info[1]);\n\t\tint score = Integer.valueOf(-1);\n\t\t\n\t\ttest.setUserID(userID);\n\t\ttest.setPaperID(paperID);\n\t\ttest.setScore(score);\n\t\ttest.setJudged(-1);\n\t\tmanager.persist(test);\n\t}",
"public void testZRecordingCreation() {\n\t\tsolo.pressSpinnerItem(3, 1);\n\t\tsolo.clickOnText(\"Begin Rehearsing\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.typeText(0, \"testName\");\n\t\tsolo.clickOnText(\"Save\");\n\t\t// If file exists already then overwrite it\n\t\tif (solo.searchButton(\"Yes\")) {\n\t\t\tsolo.clickOnButton(\"Yes\");\n\t\t}\n\t\tsolo.pressMenuItem(4);\n\t\tassertTrue(solo.searchText(\"testName\"));\n\t}",
"private int createNewTest(String testName) {\r\n\t\tint newTestId = -1;\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\tPreparedStatement pStat = dbConnection.prepareStatement(\"insert into tests (name) VALUES (?)\", Statement.RETURN_GENERATED_KEYS);\r\n\t\t\tpStat.setString(1, testName);\r\n\t\t\tpStat.execute();\r\n\r\n\t\t\tResultSet rs = pStat.getGeneratedKeys();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tnewTestId = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tpStat.close();\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn newTestId;\r\n\t}",
"@Test\r\n \t public void testAddnewCourse() {\r\n \t \tLoginpg loginPage = new Loginpg();\r\n \t \tloginPage.setUsernameValue(\"admin\");\r\n \t \tloginPage.setpassWordValue(\"myvirtualx\");\r\n \t \tloginPage.clickSignin();\r\n \t \t\r\n \t \tCoursepg coursePage= new Coursepg();\r\n \t \tcoursePage.clickCourse().clickNewCourse().typeNewCourseName(\"selenium\").clickSubmit();\r\n \t\r\n \t }",
"@Test\n void addItem() {\n\n }",
"@Test (groups = {\"Functional\"})\n public void testAddProject() {\n //When\n CreateProject createProject = dashboard.clickCreateProjectButton();\n String projectName = \"TestProject\";\n String testAccount = \"Account1\";\n createProject.setProjectName(projectName);\n createProject.clickPublicProjectPrivacy();\n createProject.setAccountDropDown(testAccount);\n project = createProject.clickCreateProject();\n\n //Then\n assertEquals(PROJECT_NAME, project.getTitle());\n }",
"@Test (priority = 1)\n\tpublic void TC1_CheckCreateNewuser_Exists ()\n\n\t{\n\t\tCreateUserPage UserObj = new CreateUserPage (driver);\n\n\t\t// This is to Validate If Create user button exists to Create a new User\n\t\tUserObj.Validate_CreateUserButton_Exsist();\n\n\t}",
"@Test\n public void insertUserTest(){\n }",
"public WizardsTest(String testName) {\n super(testName);\n }",
"public void onTestStart(ITestResult result) {\n\t test = extentReport.createTest(result.getName());\n\t }",
"public void clickcreateuser(){\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:- Create new user link should be clicked\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"lnkcreateuser\"));\r\n\t\t\tclick(locator_split(\"lnkcreateuser\"));\r\n\t\t\twaitForPageToLoad(400);\r\n\t\t\tSystem.out.println(\"Create new user link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-Create new user link is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Create new user link is not clicked\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"@Test(groups ={Slingshot,Regression})\n\tpublic void allAcctsStdUserCreation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether the user can successfully enter details in Add new user page and registers it\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation();\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUser(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile)\n\t\t.AdduserConfirmationPage()\n\t\t.confirmationPageVerificationLinks();\n\t}",
"@Test\n\tpublic void testCreatePostLive() throws Exception\n\t{\n\t}",
"@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testSaveAddressWithActionCreateNewAddress() throws Exception {\n final AddressDto currentAddress = new AddressDto();\n currentAddress.setAddress1(\"test1\");\n currentAddress.setAddress2(\"test1\");\n currentAddress.setMtCountry(this.countryRepository.getMtCountryByMtCountryId(1));\n currentAddress.setZipCode(\"12345\");\n currentAddress.setProvince(\"test1\");\n currentAddress.setCity(\"Ha Noi\");\n final ServiceResult<Address> result = this.addressService.saveAddress(currentAddress);\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }",
"@BeforeMethod\r\n\tpublic void startTestCase() {\n\t\ttest = extent.createTest(testCaseName, testCaseDescription);\r\n\t\ttest.assignAuthor(author);\r\n\t\ttest.assignCategory(category);\r\n\t}",
"@Override\n\t\tpublic void onStart(ITestContext context) {\n\t\t\tSystem.out.println(\"Extent Reports Version 3 Test Suite started!\");\n\t ParentextentTest = extent.createTest(context.getName());\n\n\t\t\t\n\t\t}",
"@Test\n void addItem() {\n }",
"public void testNewLead_1() throws Throwable {\n\t\tif (abortTest()) return;\n\t\ttry {\n\t\t\tthis.initAction(\"/do/salesforce/leads\", \"save\");\n\t\t\tthis.addAttribute(\"LastName\", LASTNAME);\n\t\t\tthis.addAttribute(\"FirstName\", LASTNAME);\n\t\t\tthis.addAttribute(\"Company\", COMPANY);\n\t\t\tString result = this.executeAction();\n\t\t\tassertEquals(\"input\", result);\t\n//\t\t\tLeadAction action = (LeadAction) this.getAction();\n//\t\t\tSystem.out.println(\">>> \" + action.getRedirectionUrl());\n//\t\t\tSystem.out.println(\"Messages: \" + action.getActionMessages().toString());\n//\t\t\tSystem.out.println(\"Action: \" + action.getActionErrors().toString());\n//\t\t\tSystem.out.println(\"Fields: \" + action.getFieldErrors().toString());\n\t\t} catch (Throwable t) {\n\t\t\tthrow t;\n\t\t}\n\t}",
"@Test\n void createParkingLot() {\n }",
"@Override\n\tpublic MedicalTest addTest(MedicalTest test) {\n\tString testId=generateTestId();\n\ttest.setTestId(testId);\n\tMedicalTestUtil.checkPresenceOfTest(test);\n\t\n\t\treturn testDao.save(test);\n\n\t}",
"@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }",
"public void createnewusersubmitbutton( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Create new user button clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"createnewuserbutton\"));\r\n\t\t\tclick(locator_split(\"createnewuserbutton\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- create new user button clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- create new user button is not clicked \"+elementProperties.getProperty(\"createnewuserbutton\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"createnewuserbutton\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"@Test\n void editTask() {\n }",
"public void shouldCreate() {\n }",
"@Test\n public void createNewComputerBuildSuccess() {\n ComputerBuild computerBuild = createComputerBuild(SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_BUDGET_COMPUTER_BUILD_DESCRIPTION);\n LoginRequest loginRequest = new LoginRequest(ANOTHER_USER_NAME_TO_CREATE_NEW_USER, USER_PASSWORD);\n\n loginAndCreateBuild(computerBuild, loginRequest, SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_BUDGET_COMPUTER_BUILD_DESCRIPTION);\n }",
"@Test\n public void testNewEntity() throws Exception {\n\n }",
"@Test\n\tpublic void saveTest(){\n\t\t\n\t}",
"@Test(alwaysRun = true, priority = 5)\n public void test006createUserWithExistingNameTest() {\n close();\n login();\n// create user\n createUser(EXISTING_USER_NAME, new HashMap<String, String>());\n checkOperationStatusOk(\"Save (GUI)\");\n //try to create user with the same name\n createUser(EXISTING_USER_NAME, new HashMap<String, String>());\n //check if error message appears\n getFeedbackPanel().find(byText(\"Error processing focus\"));\n }",
"@Test\r\n\tpublic void testCreateNewTestManager() {\r\n\t\tTestManager theTestManager = new TestManager();\r\n\t\tString report = theTestManager.toString();\r\n\t\tassertEquals(\"There are no current test scores\", report);\r\n\t}",
"@Test\n public void testDemotivatorCreateSuccess() throws IOException{\n \tFixtures.deleteAllModels();\n \tFixtures.loadModels(\"data/user.yml\");\n \t\n \tauthenticate();\n \t\n \tMap<String, String> createDemoParams = new HashMap<String, String>();\n \tcreateDemoParams.put(\"title\", THIRTY_CHARS_TITLE);\n \tcreateDemoParams.put(\"text\", EIGHTY_CHARS_TEXT);\n \tcreateDemoParams.put(\"mode\", \"create\");\n \tMap<String, File> fileParams = new HashMap<String, File>();\n \tFile file = new File(\"test/data/image.jpg\");\n \tfileParams.put(\"image\", file);\n\n \tResponse response = POST(\"/create\", createDemoParams, fileParams);\n\n \tassertStatus(200, response);\n \tassertContentType(\"application/json; charset=utf-8\", response);\n \t\n \tList<Demotivator> demos = Demotivator.findAll();\n \tassertEquals(1, demos.size());\n \tassertEquals(THIRTY_CHARS_TITLE, demos.get(0).getTitle());\n \tassertEquals(EIGHTY_CHARS_TEXT, demos.get(0).getText());\n \tassertEquals(\"localhost\", demos.get(0).getDomain().getName());\n \tlong id = demos.get(0).getId().longValue();\n \t\n \tassertContentEquals(\"{\\\"fileName\\\":\\\"/image/thumb.test.file.name\\\",\\\"id\\\":\\\"\" + id + \"\\\",\\\"status\\\":\\\"success\\\"}\", response);\n }",
"public TestIdentityActionTest(String name) {\n\t\tsuper(name);\n\t}",
"public void GoToTestDetails() {\n\t \t Intent intent = new Intent(this, TestDetails.class);\n\t \t intent.putExtra(\"Test value\", testList);\n\t \t startActivity(intent);\n\t }",
"public CreationScenario(IEmergencyDispatchApi api, Logger logger) {\n\t\tsuper(\"Creation Test\", api, logger);\n\t}",
"@Test\n public void testCrear() {\n System.out.println(\"crear\");\n usuarioController.crear(usuario1);\n usuarioController.crear(usuario2);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Test\n public void openSubjectsActivity() {\n }",
"public Tests(){\n \n }",
"@Override\n\tpublic void create(IWizardEntity entity, WizardRunner runner) {\n\t\t\n\t}",
"public ActivitiTestCase() {\n }",
"@Test(expected = NotAbleToCreateTestException.class)\n public void createNewTestF02_TC01() throws NotAbleToCreateTestException {\n appService.createNewTest();\n }",
"public void onTestSuccess(ITestResult tr) {\n\t\ttest= extent.createTest(tr.getName());//create new entry in the report\n\t\ttest.log(Status.PASS, MarkupHelper.createLabel(tr.getName(), ExtentColor.GREEN));//send the passed info to the report with green color highlighted\n\t}",
"@Test\n public void createProduct() {\n }",
"@Test\n public void openLoginActivity() {\n }",
"@Override\n\tpublic Test addTest(Test onlineTest) throws UserException {\n\t\treturn null;\n\t}",
"@Test(priority = 1)\r\n\tpublic void validUserTest() {\t\t\t\r\n\r\n\t\tAdminDashboardPage adminPage=new AdminDashboardPage(driver);\r\n\t\tadminPage.clickUsersTab();\t\r\n\t\t\r\n\t\tUsersListViewPage ulPage=new UsersListViewPage(driver);\r\n\t\tulPage.clickNewUser();\r\n\t\t\r\n\t\tCreateNewUserPage crUserPage=new CreateNewUserPage(driver);\r\n\t\tcrUserPage.enterUserDetails(\"Kathy\",\"pass\",\"[email protected]\");\r\n\t\tcrUserPage.clickCreateUser();\t\t\r\n\t\t\r\n\t\tadminPage.clickUsersTab();\r\n\t\tString actUserCreated=ulPage.verifyCreatedUser();\r\n\t\tAssert.assertEquals(actUserCreated,\"Kathy\");\r\n\t\t\r\n\t}",
"@Test\n public void addContacts() {\n }",
"public Test addTest(Test testEntity) {\n\t\tTest testEntity2=testRepository.save(testEntity);\n\t\treturn testEntity2;\n\t}",
"@Test\n public void RecentBookClick() {\n }",
"@Test(alwaysRun=true)\n public void addProject() {\n driver.findElement(By.xpath(\"//ul[contains(@class, 'nav-tabs')]//li[3]\")).click();\n assertThat(driver.getTitle(), equalTo(\"Manage Projects - MantisBT\"));\n //Click \"Create New Projects\" button\n driver.findElement(By.xpath(\"//form//button[contains(@class, 'btn-primary')]\")).click();\n //Check fields on the \"Add Project\" view\t\"Project Name Status Inherit Global Categories View Status Description\"\n List<String> expCategory = Arrays.asList(new String[]{\"* Project Name\", \"Status\", \"Inherit Global Categories\",\n \"View Status\", \"Description\"});\n List<WebElement> category = driver.findElements(By.className(\"category\"));\n List<String> actCategory = new ArrayList<>();\n for (WebElement categories : category) {\n actCategory.add(categories.getText());\n }\n assertThat(actCategory, equalTo(expCategory));\n //Fill Project inforamtion\n driver.findElement(By.id(\"project-name\")).sendKeys(\"SB\");\n driver.findElement(By.id(\"project-description\")).sendKeys(\"new one\");\n //Add project\n driver.findElement(By.xpath(\"//input[@value='Add Project']\")).click();\n //delete Created class\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n driver.findElement(By.xpath(\"//tr//a[contains(text(),'SB')]\")).click();\n driver.findElement(By.xpath(\"//input[@value ='Delete Project']\")).click();\n driver.findElement(By.xpath(\"//input[@value ='Delete Project']\")).click();\n }",
"@Test\n public void testProductOfferingCreate() {\n // TODO: test ProductOfferingCreate\n }",
"public void testContentCreationTest() {\n\t\tQuestion question = new Question(\"Q title test\", \"Q body test\", \"Q author id test\");\n\t\tAnswer answer = new Answer(\"A body test\", \"A author id test\");\n\t\tReply reply = new Reply(\"R body test\", \"R author id test\");\n\t\tUser user = new User();\n\t\t//adds the question of the topic to an array of saved questions\n\t\tquestion.addAnswer(answer);\n\t\tquestion.addReply(reply);\n\t\t//question.setFavourite(user);\n\t\t//answer.setFavourite(user);\n\t\tanswer.addReply(reply);\n\t\t//tests if answer added to question is correct\n\t\tassertTrue(question.getAnswerCount() == 1);\n\t\t//smoke test code reply and answers.\n\t\tassertTrue(question.getReplies().get(0).getId().equals(reply.getId()));\n\t\tassertTrue(question.getAnswers().get(0).equals(answer));\n\t}",
"TestTarget createTestTarget();",
"public void testWizards() {\n // open new file wizard\n NewFileWizardOperator nfwo = NewFileWizardOperator.invoke();\n nfwo.selectProject(\"SampleProject\");\n nfwo.selectCategory(\"Java\");\n nfwo.selectFileType(\"Java Class\");\n // go to next page\n nfwo.next();\n // create operator for the next page\n NewJavaFileNameLocationStepOperator nfnlso = new NewJavaFileNameLocationStepOperator();\n nfnlso.txtObjectName().typeText(\"MyNewClass\");\n // finish wizard\n //nfnlso.finish();\n // cancel wizard\n nfnlso.cancel();\n }",
"public AppTest(String testName) {\r\n\t\tsuper(testName);\r\n\t}",
"@Test\n\tpublic void testSave() {\n\t}",
"@Test\r\n public void testCreateMethod() {\r\n DailyBudget budget = new DailyBudget();\r\n\r\n budget.setName(\"Test budget\");\r\n RequestBuilder requestBuilder = MockMvcRequestBuilders\r\n .post(\"/api/budget\")\r\n .characterEncoding(\"utf-8\")\r\n .accept(MediaType.APPLICATION_JSON)\r\n .contentType(MediaType.APPLICATION_JSON)\r\n .header(\"authorization\", authUtils.generateToken(testUser.getEmail()))\r\n .content(String.format(\"{%s: %s}\",\r\n getEnclosedString(\"id\"),\r\n getEnclosedString(testUser.getId().toString())));\r\n\r\n try {\r\n MvcResult result = mockMvc.perform(requestBuilder).andReturn();\r\n MockHttpServletResponse response = result.getResponse();\r\n BudgetRole createdRole;\r\n\r\n assertEquals(HttpStatus.CREATED.value(), response.getStatus());\r\n assertEquals(1, testRoles.size()); // make sure only one instance was created\r\n\r\n createdRole = testRoles.get(0);\r\n assertEquals(testUser, createdRole.getUser());\r\n assertEquals(BudgetRoleType.CREATOR.rank, createdRole.getRoleType().rank);\r\n }\r\n catch (Exception ex) {\r\n log.error(ex.getMessage());\r\n }\r\n }",
"@Test\n public void detailsTest() {\n // TODO: test details\n }",
"@Test\n public void detailsTest() {\n // TODO: test details\n }",
"TrainingTest createTrainingTest();",
"public void clickOnCreateButton() {\n\t\twaitForElement(createButton);\n\t\tclickOn(createButton);\n\t}",
"public void clickCreateButton() {\n this.action.click(this.createButton);\n }",
"@Test\n public void UserCreation() throws Exception {\n openDemoSite(driver);\n driver.findElement(By.xpath(\"//li/a[@title=\\\"Admin area\\\"]\")).click();\n driver.findElement(By.xpath(\"//input[@name='login']\")).sendKeys(\"Email\");\n driver.findElement(By.xpath(\"//input[@name='password']\")).sendKeys(\"Password\");\n driver.findElement(By.xpath(\"//button[@type='submit']\")).click();\n Assert.assertTrue(\"Admin should be logged in\", false);\n driver.findElement(By.xpath(\"//a[@title=\\\"Users list\\\"]\")).click();\n driver.findElement(By.xpath(\"//button[@class='btn regular-button']\")).click();\n driver.findElement(By.xpath(\"//input[@id='login']\")).sendKeys(\"Email\");\n driver.findElement(By.xpath(\"//input[@id='password']\")).sendKeys(\"Password\");\n driver.findElement(By.xpath(\"//input[@id='password-conf']\")).sendKeys(\"Confirm password\");\n driver.findElement(By.xpath(\"//div/button[@type='submit']/span[text()='Create account']\")).click();\n\n }",
"@Test\n public void testHistory(){\n\n userService.insertHistory(\"kaaksd\",\"------sdas\");\n }",
"@Test\n public void openMainActivity() {\n }",
"@Test\n public void testInsertData() throws Exception {\n//TODO: Test goes here... \n }",
"public HockeyTeamTest()\n {\n }",
"@Test(enabled = false, priority = 5)\n\tpublic void newUserRegistrationTest03() {\n\t\tdriver.findElement(By.partialLinkText(\"New User R\")).click();\n\n\t}",
"private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}",
"@Test\r\n void testCreate() {\r\n assertNotNull(model);\r\n }",
"@Test\n public void shouldCreateCase() {\n assertThat(DatabaseHelper.getCaseDao().queryForAll().size(), is(0));\n\n TestEntityCreator.createCase();\n\n // Assure that the case has been successfully created\n assertThat(DatabaseHelper.getCaseDao().queryForAll().size(), is(1));\n }",
"public AppTest(String testName) {\n\t\tsuper(testName);\n\t}",
"public AppTest(String testName) {\n\t\tsuper(testName);\n\t}",
"public AppTest(String testName) {\n\t\tsuper(testName);\n\t}",
"public AppTest(String testName) {\n\t\tsuper(testName);\n\t}",
"public AppTest(String testName) {\n\t\tsuper(testName);\n\t}"
] | [
"0.6880964",
"0.6669358",
"0.6460912",
"0.6460912",
"0.64581674",
"0.64460427",
"0.63986343",
"0.63835645",
"0.634486",
"0.62875044",
"0.6274958",
"0.6260409",
"0.62501556",
"0.62412834",
"0.6239959",
"0.61911565",
"0.61611456",
"0.61533546",
"0.6138206",
"0.612402",
"0.60846925",
"0.60603935",
"0.6054741",
"0.60107595",
"0.5984023",
"0.5982741",
"0.5967771",
"0.59649086",
"0.5956587",
"0.59509593",
"0.59495777",
"0.5937452",
"0.59369785",
"0.59356445",
"0.59340477",
"0.59290004",
"0.5920039",
"0.59107697",
"0.5900814",
"0.5894808",
"0.5879501",
"0.5854545",
"0.58541733",
"0.5852272",
"0.5848415",
"0.5847444",
"0.5845501",
"0.58410984",
"0.5839862",
"0.5834574",
"0.5833364",
"0.58321637",
"0.58250916",
"0.582303",
"0.58194625",
"0.5814435",
"0.58070457",
"0.5805153",
"0.58039266",
"0.57948494",
"0.57844126",
"0.57837313",
"0.57798356",
"0.57731897",
"0.5766006",
"0.57621664",
"0.57419586",
"0.57411253",
"0.5732891",
"0.5727089",
"0.572491",
"0.57172364",
"0.57137823",
"0.5711863",
"0.57099444",
"0.57009506",
"0.5700374",
"0.57003635",
"0.5698585",
"0.5692917",
"0.5692152",
"0.56893694",
"0.56827885",
"0.56827885",
"0.568075",
"0.5677178",
"0.56756455",
"0.5673795",
"0.56737876",
"0.5667864",
"0.56647235",
"0.5664643",
"0.56642556",
"0.5664252",
"0.5654328",
"0.56461096",
"0.56417024",
"0.56417024",
"0.56417024",
"0.56417024",
"0.56417024"
] | 0.0 | -1 |
Receives the recorded sampler from the proxy server for placing in the test tree. param serverResponse to be added to allow saving of the server's response while recording. A future consideration. | @Override
public void deliverSampler(HTTPSamplerBase sampler, TestElement[] subConfigs, SampleResult result) {
deliverer.deliverSampler(sampler, subConfigs, result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void passSetupResponseToClient( RtspResponse response )\n\t{\n\t\t// If there isn't yet an rtspSession, create a new one\n\t\tRtspSession rtspSession = RtspSession.get( response.getHeader( \"Session\" ) );\n\t\tif ( rtspSession == null ) {\n\t\t\trtspSession = (RtspSession) clientSession.getAttribute( \"rtspSession\" );\n\t\t\tif ( rtspSession == null ) {\n\t\t\t\trtspSession = RtspSession.create();\n\t\t\t}\n\t\t}\n\t\tsendResponse( clientSession, response );\n\t}",
"public void setResponse(final String response) {\n\t\thandler.response = response;\n\t}",
"void reply(Server server);",
"public sparqles.avro.discovery.DGETInfo.Builder setResponseServer(java.lang.CharSequence value) {\n validate(fields()[6], value);\n this.ResponseServer = value;\n fieldSetFlags()[6] = true;\n return this; \n }",
"@Override\n\tpublic void processResponse(Response response)\n\t{\n\t\t\n\t}",
"void onResponse(String response, int requestId);",
"public void setProxyServer(String proxyServer) {\n this.proxyServer = proxyServer;\n }",
"private void parseResponse(String serverResponse){\n\n if(serverResponse.equals(\"PLAY\")){ //Client turn\n player.play();\n }\n if(serverResponse.equals(\"SUCCESS\")){ //Action was valid\n player.success();\n }\n if(serverResponse.equals(\"FAILURE\")){ //Action was invalid\n player.failure();\n }\n if(serverResponse.equals(\"FINISHED\")){ //Other Player leaves\n player.finished();\n running = false;\n }\n if(serverResponse.equals(\"WIN\")){ //You win\n player.win();\n running = false;\n }\n if(serverResponse.equals(\"LOSE\")){ //You lose\n player.lose();\n running = false;\n }\n if(serverResponse.equals(\"TIE\")) { //You tie\n player.tie();\n running = false;\n }\n else\n System.out.println(serverResponse);\n }",
"private static void readResponse(ClientResponse response)\r\n\t{\r\n\t// Response\r\n\tSystem.out.println();\r\n\tSystem.out.println(\"Response: \" + response.toString());\r\n\r\n\t}",
"@Override\n protected void deliverResponse(T response) {\n listener.onSuccessResponse(response);\n }",
"private void reportMetrics(HttpServerRequest request, HttpServerResponse response) {\n response.setChunked(true)\n .setStatusCode(200)\n .headers()\n .add(HttpHeaders.CONTENT_TYPE, HTTP_CONTENT_TYPE_VALUE)\n .add(HttpHeaders.CACHE_CONTROL, HTTP_CACHE_CONTROL_VALUE)\n .add(HTTP_HEADER_PRAGMA, HTTP_HEADER_PRAGMA_VALUE);\n\n long delay = DEFAULT_DELAY;\n\n final String requestDelay = request.getParam(\"delay\");\n try {\n if (requestDelay != null && !requestDelay.isEmpty()) {\n delay = Math.max(Long.parseLong(requestDelay), 1);\n }\n } catch (Exception e) {\n log.warn(\"[Vertx-EventMetricsStream] Error parsing the delay parameter [{}]\", requestDelay);\n }\n\n final Subscription metricsSubscription = Observable.interval(delay, TimeUnit.MILLISECONDS, scheduler)\n .map(i -> new DashboardData(HystrixCommandMetrics.getInstances(),\n HystrixThreadPoolMetrics.getInstances(),\n HystrixCollapserMetrics.getInstances()))\n .concatMap(dashboardData -> Observable.from(SerialHystrixDashboardData.toMultipleJsonStrings(dashboardData)))\n .onTerminateDetach()\n .subscribe(metric -> writeMetric(metric, response),\n ex -> log.error(\"Error sending metrics\", ex));\n\n response.closeHandler(ignored -> {\n log.debug(\"[Vertx-EventMetricsStream] - Client closed connection, stopping sending metrics\");\n metricsSubscription.unsubscribe();\n handleClosedConnection();\n });\n\n request.exceptionHandler(ig -> {\n log.error(\"[Vertx-EventMetricsStream] - Sending metrics, stopping sending metrics\", ig);\n metricsSubscription.unsubscribe();\n handleClosedConnection();\n });\n }",
"public void setResponse(String response) {\n this.response = response;\n }",
"public void setResponse(String response) {\n this.response = response;\n }",
"@Override\n public void saveToResponseAdditional(ActionResponse response) {\n }",
"private void saveAiResponse(RequestType requestType, String name, Object capturedResponse)\n throws IOException, CTPException {\n ClassLoader classLoader = getClass().getClassLoader();\n URL targetDataUrl = classLoader.getResource(\"data\");\n File targetDataDir = new File(targetDataUrl.getFile());\n\n // Output json data to file in the compiled target file hierarchy (for immediate use)\n File targetCaptureDir = new File(targetDataDir, requestType.getPath());\n String outputFileName = CaptureCache.normaliseFileName(name) + \".json\";\n writeJsonFile(targetCaptureDir, outputFileName, capturedResponse, false);\n\n // Output json data to file in the source tree (for long term storage)\n File mockAiDir = targetDataDir.getParentFile().getParentFile().getParentFile();\n File srcDataDir = new File(mockAiDir, \"src/main/resources/data\");\n File srcCaptureDir = new File(srcDataDir, requestType.getPath());\n writeJsonFile(srcCaptureDir, outputFileName, capturedResponse, true);\n }",
"@Override\n public void onResponse(String response) {\n if(null != listener){\n listener.onComplete(mRespHandler.parse(response));\n }\n }",
"@Override\n public void onResponse(String response) {\n System.out.println(\"Recieved Response: \" + response);\n }",
"void receiveResponse(String invocationId, HttpResponse response);",
"@Override\n public void onResponse(Call call, Response response) throws IOException {\n emitter.onNext(response.body().string());\n }",
"public ResponseForwarder(ResponseListener<F> listener){\n\t\t\tthis.listener = listener;\n\t\t}",
"@Override\n public void onResponse(String response) {\n loadSentMessages();\n }",
"@Override public void deliverResponse(T response) {\n if (listener != null) {\n listener.onResponse(response);\n }\n }",
"public void setResponseServer(java.lang.CharSequence value) {\n this.ResponseServer = value;\n }",
"public void onRequestResponse(Response response) { }",
"public void setResponse(T response) {\n this.response = response;\n }",
"@Override\n public void onResponse(String response) {\n finalData(response);\n }",
"@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\n\t\t\t\t\t}",
"@Test\n public void getCapturedResponses_discardsDuplicates() throws Exception {\n\n // Fire two instances of the same response document\n SsmlDocument response1 = ssmlDocument().withFilename(\"ssmlTextResponse_helloWorld.xml\").build();\n SsmlDocument response2 = ssmlDocument().withFilename(\"ssmlTextResponse_helloWorld.xml\").build();\n listener.outputSsml(null, response1);\n listener.outputSsml(null, response2);\n List<SsmlDocument> responses = listener.getCapturedResponses();\n assertThat(responses, hasSize(1));\n }",
"protected void handleSuccessMessage(Response response) {\n\t\tonRequestResponse(response);\n\t}",
"private void \n\tanalyseTrackerResponse(\n\t\t\tTRTrackerAnnouncerResponse\ttracker_response )\n\t{\n\t\t// tracker_response.print();\n\t\tfinal TRTrackerAnnouncerResponsePeer[]\tpeers = tracker_response.getPeers();\n\n\t\tif ( peers != null ){\n\t\t\taddPeersFromTracker( tracker_response.getPeers()); \n\t\t}\n\n\t\tfinal Map extensions = tracker_response.getExtensions();\n\n\t\tif (extensions != null ){\n\t\t\taddExtendedPeersFromTracker( extensions );\n\t\t}\n\t}",
"public void setServer(Server server) {\n this.server = server;\n }",
"public void setResponse(HttpResponseWrapper response) {\n this.response = response;\n }",
"protected void fakeResponse(\n StatusLine statusline, \n HeaderGroup responseheaders,\n InputStream responseStream\n ) {\n // set used so that the response can be read\n this.used = true;\n this.statusLine = statusline;\n this.responseHeaders = responseheaders;\n this.responseBody = null;\n this.responseStream = responseStream;\n }",
"@Override\n public void onResponse(Response response) throws IOException {\n }",
"@Override\n protected ServerBuilder<?> getServerBuilder() {\n try {\n ServerCredentials serverCreds = TlsServerCredentials.create(\n TlsTesting.loadCert(\"server1.pem\"), TlsTesting.loadCert(\"server1.key\"));\n NettyServerBuilder builder = NettyServerBuilder.forPort(0, serverCreds)\n .flowControlWindow(AbstractInteropTest.TEST_FLOW_CONTROL_WINDOW)\n .maxInboundMessageSize(AbstractInteropTest.MAX_MESSAGE_SIZE);\n // Disable the default census stats tracer, use testing tracer instead.\n InternalNettyServerBuilder.setStatsEnabled(builder, false);\n return builder.addStreamTracerFactory(createCustomCensusTracerFactory());\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n }",
"@Override\n protected void deliverResponse(JSONObject response) {\n listener.onResponse(response);\n System.out.println(\"response \"+response);\n }",
"protected void postResponse(final AlarmResponse<E> response) {\n\t\tif (callBack == null) return;\n\t\tnew Thread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tcallBack.alarmResponse(response);\n\t\t\t}\n\t\t}).start();\n\t}",
"public void setServer(Server server) {\n\t\t\r\n\t}",
"@Override\n public void onResponse(String response) {\n System.out.println(response.toString());\n }",
"@Override\n protected void serverEvent_ProcessedChunk(int numOfLinesInChunk, File processedChunkFile, long chunk_TimeStamp) throws Exception {\n System.out.println(\"***PERSIST_TEST_SERVER Event Handler** Processed Chunk File with name: \" + processedChunkFile + \", with \" + numOfLinesInChunk + \" lines.\" );\n System.out.flush();\n \n processedChunkCount++;\n assertTrue(processedChunkFile.exists());\n boolean amProcessing_Second_TestMatrix = processedChunkCount == 3 || processedChunkCount == 4;\n Matrix curr_PersistedTestMatrix = getCurr_TestMatrix(amProcessing_Second_TestMatrix);\n \n SymbolControl symbolControl = getCurr_SymbolControl();\n ExecutionInfo executeInfo = getCurr_ExecutionInfo();\n \n // Get the FORM.REQUIRED descriptor. In both the first and second chunk, values are set on it.\n List<String> firstName_LabelParts = Arrays.asList(\"First Name\");\n Label firstName_Label = symbolControl.multiPartSymbol_Factory.createNew_Label(firstName_LabelParts, 1, false);\n Descriptor firstName_Item = curr_PersistedTestMatrix.get_ChildDescriptor(executeInfo, firstName_Label);\n\n DescriptorTagName formReq_DescTag = symbolControl.multiPartSymbol_Factory.createNew_DescTagName(\"FORM.REQUIRED\", 1, false, null, null);\n Descriptor formReq_Desc = firstName_Item.get_ChildDescriptor(executeInfo, formReq_DescTag);\n\n if (processedChunkCount == 1 || processedChunkCount == 3) {\n // Test that a descriptor was added: FORM.SELECTOR `my`.`formSelector`\n List<String> formSelector_LabelParts = Arrays.asList(\"my\", \"formSelector\");\n Label formSelector_Label = symbolControl.multiPartSymbol_Factory.createNew_Label(formSelector_LabelParts, 1, false);\n Descriptor formSelector_Desc = curr_PersistedTestMatrix.get_ChildDescriptor(executeInfo, formSelector_Label);\n\n multiThreaded_AssertEquals(formSelector_Desc.label, formSelector_Label);\n multiThreaded_AssertEquals(\"*** TEST PATH 1t ***\", formReq_Desc.get_FieldSet().getField(executeInfo, 1));\n\n System.out.println(\" * The chunk #\" + processedChunkCount + \" passed the 'Add New Descriptor ( w/a Set field)' tests.\");\n\n } else if (processedChunkCount == 2 || processedChunkCount == 4) {\n // Test for new values set on the FORM.REQUIRED descriptor:\n multiThreaded_AssertEquals(PersistTestResultsConstants_forClientServerTests.FORMREQUIRED_NEW_FIELDVALUE__IMAGE_HEIGHT, formReq_Desc.get_FieldSet().getField(executeInfo, 2));\n multiThreaded_AssertEquals(PersistTestResultsConstants_forClientServerTests.FORMREQUIRED_NEW_FIELDVALUE__IMAGE_WIDTH, formReq_Desc.get_FieldSet().getField(executeInfo, 3));\n\n System.out.println(\" * The chunk #\" + processedChunkCount + \" passed the 'Set field' tests.\");\n } else {\n throw new Exception(\"There should only be 4 chunks processed, but there was a 5th one!!!\");\n }\n\n if (processedChunkCount == 4) {\n // Stop the server\n persistManager_Server.shutdown();\n }\n \n }",
"public void\n\tprocessTrackerResponse(\n\t\t\tTRTrackerAnnouncerResponse\tresponse )\n\t{\n\t\tif ( is_running ){\n\t\t\tanalyseTrackerResponse( response );\n\t\t}\n\t}",
"private void handleResponse(MoviePosterResponse moviePosterResponse) {\n moviePosterList.addAll(moviePosterResponse.getPosters());\n init();\n }",
"public void handleNetworkOutput(Response response) {\n if (playerConnections.containsKey(response.getPlayerID())) playerConnections.get(response.getPlayerID()).sendResponse(response);\n }",
"protected ServerResponse<T> toResponse(HttpResponse response)\n {\n return new ServerResponse<>(response, isExpectedResponseCode(response.getHttpStatusCode()), responseEntityType,\n isResponseParseable(), getRequiredResponseHeaders());\n }",
"@Override\n public void OnServerRespondedCallback(InternalRequest response) {\n switch (response.Status){\n case InternalRequest.STATUS_OK:\n Log.i(MY_TAG, \"got server callback registration ok\");\n CommonUtil.PutCommonPreferenceIsRegisteredDevice(this, true);\n// intent.putExtra(ServicesBroadcastReceiver.BROADCAST_REC_EXTRA_ACTION_KEY,\n// ServicesBroadcastReceiver.ACTION_CODE_REGISTRATION_SUCCESS);\n break;\n case InternalRequest.STATUS_FAIL:\n Log.i(MY_TAG, \"got server callback registration fail\");\n CommonUtil.PutCommonPreferenceIsRegisteredDevice(this, false);\n// intent.putExtra(ServicesBroadcastReceiver.BROADCAST_REC_EXTRA_ACTION_KEY,\n// ServicesBroadcastReceiver.ACTION_CODE_REGISTRATION_FAIL);\n break;\n default:\n Log.i(MY_TAG, \"unexpected callback status from server!\");\n return;\n }\n// sendBroadcast(intent);\n }",
"public void setServer(Server server) {\n\t\tthis.server = server;\n\t}",
"public void setServerStub(RMIServerInvokerInf server)\n {\n this.server = server;\n log.trace(this.server);\n }",
"public void setResponse(edu.itq.soa.ResponseDocument.Response response)\n {\n generatedSetterHelperImpl(response, RESPONSE$0, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }",
"public void addStudentResponse(Student response){\n\t\tIterator<Student> iterator = students.iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tStudent student = iterator.next();\n\t\t\tif(student.getID().equals(response.getID())){\n\t\t\t\tdiscardedResponses.add(student);\n\t\t\t\titerator.remove();\n\t\t\t}\n\t\t}\n\t\tstudents.add(response);\n\t}",
"public void onResponse(Response response) throws Exception;",
"public void answerPoll(Poll poll, Response response){\n poll.getResponses().add(response);\n }",
"public static void postResponseEvent(NginxRequest req, NginxResponse resp) {\n\t\tif (Thread.currentThread() == NGINX_MAIN_THREAD) {\n\t\t\thandleResponse(req.nativeRequest(), resp);\n\t\t}else {\n\t\t\tlong r = req.nativeRequest();\n\t\t\tWorkerResponseContext ctx = new WorkerResponseContext(r, resp, resp.buildOutputChain(r));\n\t\t\tsavePostEventData(r, ctx);\n\t\t\tngx_http_clojure_mem_post_event(r);\n\t\t}\n\t}",
"public String viewResponse(Response response) {\r\n this.currentResponse = response;\r\n return \"viewResponse\";\r\n }",
"@Override\n public void sendResponse(final Response response) {\n\n }",
"@Test\n\tpublic void testServerTrace() {\n\t\tServerTrace serverTrace = new ServerTrace(\"name\", \"formatted\", \"/url/\");\n\t\tserverTrace.push(\"label0\", StepType.METHOD, \"className0\",\n\t\t\t\t\"methodName0\", 0);\n\t\tserverTrace.pop();\n\t\tserverTrace.push(\"label1\", StepType.METHOD, \"className1\",\n\t\t\t\t\"methodName1\", 1);\n\t\tserverTrace.push(\"label2\", StepType.METHOD, \"className2\",\n\t\t\t\t\"methodName2\", 2);\n\t\tserverTrace.pop();\n\t\tserverTrace.pop();\n\n\t\t// Convert to json\n\t\tGson gson = new Gson();\n\t\tString json = gson.toJson(serverTrace);\n\n\t\t// Very basic validation\n\t\tAssert.assertTrue(json.startsWith(\"{\\\"trace\\\":{\\\"id\\\":\\\"\"\n\t\t\t\t+ serverTrace.getId() + \"\\\"\"));\n\t\tAssert.assertTrue(json.endsWith(\",\\\"children\\\":[]}]}}}\"));\n\t\tAssert.assertTrue(json.contains(\"\\\"url\\\":\\\"/url/\" + serverTrace.getId()\n\t\t\t\t+ \"\\\"\"));\n\t}",
"public boolean hasResponseServer() {\n return fieldSetFlags()[6];\n }",
"@Override\n public Boolean onCompleted(Response response) throws Exception {\n Type type = new TypeToken<Map<String, String>>() {\n }.getType();\n Map<String, String> jsonMap = jsonSeralizer.fromJson(response.getResponseBody(), type);\n //System.out.println(\"Results of Permssions set: \"+jsonMap);\n if (!jsonMap.get(\"success\").equals(1)) {\n System.out.println(\"File save was successful.\");\n return true;\n } else {\n System.out.println(jsonMap.get(\"error_message\"));\n return false;\n\n }\n }",
"public void setResponse(int response) {\r\n this.response = response;\r\n }",
"public void addServerToServerArray(Server server){\n serverArray[cntServer] = server;\n cntServer++;\n }",
"public SapOpenHubLinkedService withServer(Object server) {\n this.server = server;\n return this;\n }",
"@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}",
"private void forwardResponse(XmppServletResponse response, IQRequest originalRequest) {\n\t\t\n\t\tJID from = originalRequest.getTo();\n\t\tJID to = originalRequest.getFrom();\t\t\n\t\ttry {\n\t\t\tIQRequest request = null;\n\t\t\tList<Element> elements = response.getElements();\n\t\t\tif (elements != null && elements.size() > 0) {\n\t\t\t\trequest = getXmppFactory().createIQ(from,to,response.getType(), elements.toArray(new Element[]{}));\n\t\t\t} else {\n\t\t\t\trequest = getXmppFactory().createIQ(from, to, response.getType());\n\t\t\t}\n\t\t\trequest.setID(originalRequest.getId());\n\t\t\trequest.send();\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// In the event of an error, continue dispatching to all remaining JIDs\n\t\t\tlog.error(e.getMessage(),e);\n\t\t}\n\t}",
"@Override\n public Boolean onCompleted(Response response) throws Exception {\n System.out.println(response.getResponseBody());\n Type type = new TypeToken<Map<String, String>>() {\n }.getType();\n Map<String, String> jsonMap = jsonSeralizer.fromJson(response.getResponseBody(), type);\n //System.out.println(\"Results of Permssions set: \"+jsonMap);\n if (!jsonMap.get(\"success\").equals(1)) {\n System.out.println(\"File has been made available.\");\n return true;\n } else {\n System.out.println(jsonMap.get(\"error_message\"));\n return false;\n\n }\n }",
"void stubNextResponse(HttpExecuteResponse nextResponse, Duration delay);",
"public void Response(BerString response) throws AccessControl {\n\t DataDir rspdir = new DataDir(response);\n\t Response(rspdir);\n\t}",
"@Override\n\tpublic void processResponse(ResponseEvent responseEvent) {\n\t\tResponse response = responseEvent.getResponse();\n\t\ttry {\n\t\t\t// Display the response message in the text area.\n\t\t\t//printMessage(\"\\nReceived response: \" + response.toString());\n\n\t\t\tClientTransaction tid = responseEvent.getClientTransaction();\n\t\t\tCSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);\n\t\t\tif (response.getStatusCode() == Response.OK) {\n\t\t\t\tif (cseq.getMethod().equals(Request.REGISTER)) {\n\t\t\t\t\tSystem.out.println(\"regist ACK OK\");\n\t\t\t\t\t//onInvite();\n\t\t\t\t} else if (cseq.getMethod().equals(Request.INVITE)) {\n\t\t\t\t\tDialog dialog = inviteTid.getDialog();\n\t\t\t\t\tRequest ackRequest = dialog.createAck(cseq.getSeqNumber());\n\t\t\t\t\tdialog.sendAck(ackRequest);\n\t\t\t\t\tSystem.out.println(\"Sending ACK\");\n\t\t\t\t} else if (cseq.getMethod().equals(Request.MESSAGE)) {\n\t\t\t\t\tSystem.out.println(\"Send OK !\");\n\t\t\t\t} else if (cseq.getMethod().equals(Request.CANCEL)) {\n\t\t\t\t\tSystem.out.println(\"Sending BYE -- cancel went in too late !!\");\n\t\t\t\t}\n\t\t\t} else if (response.getStatusCode() == Response.PROXY_AUTHENTICATION_REQUIRED\n\t\t\t\t\t|| response.getStatusCode() == Response.UNAUTHORIZED) {\n\t\t\t\tauthenticationHelper = ((SipStackExt) sipStack)\n\t\t\t\t\t\t.getAuthenticationHelper(new AccountManagerImpl(),\n\t\t\t\t\t\t\t\theaderFactory);\n\t\t\t\tinviteTid = authenticationHelper.handleChallenge(response, tid,\n\t\t\t\t\t\tsipProvider, 5);\n\t\t\t\tinviteTid.getRequest().addHeader(\n\t\t\t\t\t\theaderFactory.createExpiresHeader(3600));\n\t\t\t\tinviteTid.getRequest().setMethod(Request.REGISTER);\n\t\t\t\tinviteTid.sendRequest();\n\t\t\t\tinvco++;\n\t\t\t\tprintMessage(\"[processResponse] Request sent:\\n\" + inviteTid.getRequest().toString() + \"\\n\\n\");\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"@Override\n\t\tprotected void prepareResponse(HttpServletResponse response)\n\t\t\t\tthrows IOException {\n\n\t\t}",
"public HttpResponseTarget(HttpServletResponse targetResponse) throws IOException {\n \n response = targetResponse;\n }",
"private void sendTelemetry(HttpRecordable recordable) {\n }",
"@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}",
"void stubNextResponse(HttpExecuteResponse nextResponse);",
"protected void beforeAppendToResponse(\n WOResponse response, WOContext context)\n {\n rowNumber = 0;\n\n if (submission != null)\n {\n originalPartners = submission.allPartners();\n partnersForEditing = originalPartners.mutableClone();\n }\n\n super.beforeAppendToResponse(response, context);\n }",
"public Response onResponse(Response response) {\n\t\tlog.info(\"chatbot shouting\");\n\n\t\t// String r = resizeImage(response.msg);\n\t\tString r = response.msg;\n\n\t\tconns.addConnection(\"mr.turing\", \"mr.turing\");\n\n\t\tShout shout = createShout(TYPE_USER, r);\n\t\tshout.from = \"mr.turing\";\n\t\tMessage out = createMessage(\"shoutclient\", \"onShout\", Encoder.toJson(shout));\n\t\tonShout(\"mr.turing\", out);\n\t\treturn response;\n\t}",
"public TrackResponse() {\n\t\tsuper();\n\t}",
"void responseReceived(byte[] response);",
"@Override\n public void onResponse(String response) {\n }",
"public void sendResponse(ResponseNetObject response){\r\n\r\n sendObject(response);\r\n\r\n }",
"protected abstract void transfer(UUID[] players, String server, IntConsumer response);",
"public void setServer(int server) {\n this.server = server;\n }",
"@Override\n public void onResponse(String response) {\n }",
"public MockJspWriter(HttpServletResponse response, Writer targetWriter) {\n\t\tsuper(DEFAULT_BUFFER, true);\n\t\tthis.response = (response != null ? response : new MockHttpServletResponse());\n\t\tif (targetWriter instanceof PrintWriter) {\n\t\t\tthis.targetWriter = (PrintWriter) targetWriter;\n\t\t}\n\t\telse if (targetWriter != null) {\n\t\t\tthis.targetWriter = new PrintWriter(targetWriter);\n\t\t}\n\t}",
"@Test\n\tpublic void storeLogDataTest() {\n\n\t\tStatisticsRequest request = new StatisticsRequest(\"testingid\", \"testing\", 200, 3);\n\t\twebTestClient.post().uri(\"/logginResponseTime\").contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON).body(Mono.just(request), StatisticsRequest.class).exchange()\n\t\t\t\t.expectStatus().isOk().expectBody(String.class).consumeWith(res -> {\n\t\t\t\t\tassertTrue(res.getResponseBody().equalsIgnoreCase(\"saved\"));\n\t\t\t\t});\n\n\t}",
"@Override\n public void onResponse(String response) {\n }",
"public void setResponse( Double response )\n\t{\n\t\tthis.response = response;\n\t}",
"@Override\n public void onResponse(String response)\n {\n\n }",
"@Test\n public void serverWritesTrailersWithData() throws Exception {\n peer.setClient(true);\n // Write the mocking script.\n peer.sendFrame().settings(new Settings());\n peer.sendFrame().headers(true, 3, TestUtil.headerEntries(\"client\", \"abc\"));\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// HEADERS STREAM 3\n\n peer.acceptFrame();// DATA STREAM 3 \"abcde\"\n\n peer.acceptFrame();// HEADERS STREAM 3\n\n peer.play();\n // Play it back.\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"a\", \"android\"), true);\n stream.enqueueTrailers(Headers.of(\"foo\", \"bar\"));\n BufferedSink sink = Okio.buffer(stream.getSink());\n sink.writeUtf8(\"abcdefghi\");\n sink.close();\n // Verify the peer received what was expected.\n MockHttp2Peer.InFrame headers1 = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, headers1.type);\n MockHttp2Peer.InFrame data1 = peer.takeFrame();\n Assert.assertEquals(TYPE_DATA, data1.type);\n Assert.assertEquals(3, data1.streamId);\n Assert.assertArrayEquals(\"abcdefghi\".getBytes(StandardCharsets.UTF_8), data1.data);\n Assert.assertFalse(data1.inFinished);\n MockHttp2Peer.InFrame headers2 = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, headers2.type);\n Assert.assertTrue(headers2.inFinished);\n }",
"public void setResponse(ServletResponse response) {\n if (response == null) {\n throw new IllegalArgumentException(\"Response cannot be null\");\n }\n this.response = response;\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }",
"public static void printResponse(String response)\n\t{\n\t\n\t}",
"public void addAnalysisServerListener(AnalysisServerListener listener);",
"private static ArrayList<Sample> getSamples(HttpResponse<String> response){\n\t\tArrayList<Sample> samples;\n\t\ttry {\n\t\t\tsamples = new ObjectMapper().readValue(response.body(), new TypeReference<ArrayList<Sample>>(){});\n\t\t\treturn samples;\n\t\t} catch (JsonMappingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n \tpublic Response createResponse(ServerTransaction origServerTransaction, Response receivedResponse) throws SipException {\n \n \t\tfinal SleeSipProviderImpl provider = ra.getProviderWrapper();\n \t\t\n \t\tResponse forgedResponse = null;\n \t\t\n \t\ttry {\n \t\t\tforgedResponse = provider.getMessageFactory().createResponse(receivedResponse.getStatusCode(), origServerTransaction.getRequest());\n \t\t} catch (ParseException e) {\n \t\t\tthrow new SipException(\"Failed to forge message\", e);\n \t\t}\n \t\t\n \t\tfinal DialogState dialogState = getState();\n \t\tfinal String localTag = getLocalTag();\n \t\tif ((dialogState == null || dialogState == DialogState.EARLY) && localTag != null && isServer()) {\n \t\t\t// no tag set in the response, since the dialog creating transaction didn't had it\n \t\t\ttry {\n \t\t\t\t((ToHeader)forgedResponse.getHeader(ToHeader.NAME)).setTag(localTag);\n \t\t\t} catch (ParseException e) {\n \t\t\t\tthrow new SipException(\"Failed to set local tag\", e);\n \t\t\t}\n \t\t}\n \t\t\n \t\t// copy headers \n \t\tListIterator<String> lit = receivedResponse.getHeaderNames();\n \t\tString headerName = null;\n \t\tListIterator<Header> headersIterator = null;\n \t\twhile (lit.hasNext()) {\n \t\t\theaderName = lit.next();\n \t\t\tif (Utils.getHeadersToOmmitOnResponseCopy().contains(headerName)) {\n \t\t\t\tcontinue;\n \t\t\t} else {\n \t\t\t\tforgedResponse.removeHeader(headerName);\n \t\t\t\theadersIterator = receivedResponse.getHeaders(headerName);\n \t\t\t\twhile (headersIterator.hasNext()) {\n \t\t\t\t\tforgedResponse.addLast((Header)headersIterator.next().clone());\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t// Copy content\n \t\tfinal byte[] rawOriginal = receivedResponse.getRawContent();\n \t\tif (rawOriginal != null && rawOriginal.length != 0) {\n \t\t\tfinal byte[] copy = new byte[rawOriginal.length];\n \t\t\tSystem.arraycopy(rawOriginal, 0, copy, 0, copy.length);\n \t\t\ttry {\n \t\t\t\tforgedResponse.setContent(copy, (ContentTypeHeader) forgedResponse\n \t\t\t\t\t\t.getHeader(ContentTypeHeader.NAME));\n \t\t\t} catch (ParseException e) {\n \t\t\t\ttracer.severe(\"Failed to set content on forged response. To copy value [\" + new String(copy) + \"] Type [\"\n \t\t\t\t\t\t+ receivedResponse.getHeader(ContentTypeHeader.NAME) + \"]\\n\", e);\n \t\t\t}\n \t\t}\n \t\t\n \t\t// set contact if the received response had it\n \t\tif (receivedResponse.getHeader(ContactHeader.NAME) != null) {\n \t\t\tfinal String transport = ((ViaHeader) forgedResponse.getHeader(ViaHeader.NAME)).getTransport();\n \t\t\tforgedResponse.setHeader(((ListeningPointImpl)provider.getListeningPoint(transport)).createContactHeader());\n \t\t}\n \t\t\n \t\treturn forgedResponse;\n \t\t\n \t}",
"@Test public void propagates_sampledFalse() throws Exception {\n tracing = GrpcTracing.create(tracingBuilder(Sampler.NEVER_SAMPLE).build());\n closeClient(client);\n client = newClient();\n\n GreeterGrpc.newBlockingStub(client).sayHello(HELLO_REQUEST);\n\n TraceContextOrSamplingFlags extracted = server.takeRequest();\n assertThat(extracted.sampled()).isFalse();\n\n // @After will check that nothing is reported\n }",
"public void postRequestResponse(Request<?> request, Response<?> response);",
"@Override\n public void onResponse(String response, int id) {\n processData(response);\n\n }",
"public sparqles.avro.discovery.DGETInfo.Builder clearResponseServer() {\n ResponseServer = null;\n fieldSetFlags()[6] = false;\n return this;\n }"
] | [
"0.55406463",
"0.5385709",
"0.53235465",
"0.5321029",
"0.5304282",
"0.51871455",
"0.51815563",
"0.5114342",
"0.5092172",
"0.5078635",
"0.506904",
"0.50376785",
"0.50376785",
"0.50109494",
"0.49999243",
"0.49967235",
"0.49801737",
"0.4975506",
"0.49620578",
"0.4954736",
"0.49457622",
"0.49286342",
"0.49177083",
"0.491203",
"0.48929334",
"0.4884931",
"0.4883413",
"0.48829743",
"0.4882199",
"0.48797017",
"0.48768046",
"0.48514497",
"0.48477712",
"0.48413533",
"0.48387802",
"0.48342147",
"0.48278445",
"0.48066992",
"0.48059762",
"0.48034126",
"0.48000857",
"0.47996682",
"0.47930247",
"0.47916308",
"0.47861218",
"0.47741687",
"0.4759615",
"0.4747684",
"0.47459483",
"0.47450057",
"0.47439975",
"0.47375882",
"0.47302604",
"0.47272155",
"0.47179723",
"0.4702287",
"0.47015694",
"0.4700503",
"0.4700415",
"0.46976918",
"0.46945688",
"0.46915263",
"0.46906924",
"0.4687978",
"0.46826422",
"0.4675054",
"0.46733066",
"0.46721578",
"0.46659824",
"0.46565047",
"0.46513042",
"0.46459022",
"0.4637945",
"0.46237665",
"0.46226433",
"0.46207243",
"0.46183437",
"0.46099427",
"0.46098298",
"0.46083266",
"0.46071142",
"0.4605174",
"0.4600605",
"0.45994172",
"0.45990676",
"0.45942134",
"0.4590945",
"0.4583698",
"0.4583698",
"0.4583698",
"0.45817935",
"0.45794135",
"0.457938",
"0.45781276",
"0.45778084",
"0.4576318",
"0.45640776",
"0.45598304",
"0.4547286",
"0.454576"
] | 0.48727322 | 31 |
TODO Autogenerated method stub | public static void main(String[] args) {
CountDownTask task1=new CountDownTask();
CountDownTask task2=new CountDownTask();
Thread t1=new Thread(task1);
Thread t2=new Thread(task2);
t1.start();
t2.start();
ThreadUtils.println("Program Ends");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
int[]a=new int[10];
for(int i=0;i<a.length;++i){
a[i]=i;
}
print(a,0);
System.out.println();
System.out.println(sum(a,0));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
Store user info in Session. | public static void storeLoginedUser(HttpSession session, UserAccount loginedUser) {
// On the JSP can access via ${loginedUser}
session.setAttribute("loginedUser", loginedUser);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void store() {\n session=(HttpSession)getPageContext().getSession();\n session.setAttribute(\"remoteUser\", getRemoteUser());\n session.setAttribute(\"authCode\", getAuthCode());\n }",
"public void storeSession(@NonNull User user){\n //calls storeUser method with mUser as argument\n storeUser(user);\n // validate input data\n checkSessionState();\n }",
"void markAsUserSession();",
"private void setSessionAttribs(HttpServletRequest req, BlogUser user) {\n\t\treq.getSession().setAttribute(\"current.user.id\", user.getId());\n\t\treq.getSession().setAttribute(\"current.user.fn\", user.getFirstName());\n\t\treq.getSession().setAttribute(\"current.user.ln\", user.getLastName());\n\t\treq.getSession().setAttribute(\"current.user.nick\", user.getNick());\n\t}",
"private void storeLoggedInUser(LoginResponse response){\n preferenceManager = SharedPreferenceManager.getInstance(this);\n preferenceManager.StoreAccountDetails(response.getAccount());\n\n if(response.getCamera() != null){\n preferenceManager.StoreDeviceDetails(response.getCamera());\n }\n registerDeviceToken();\n }",
"String registerUserWithGetCurrentSession(User user);",
"private void storeUser(User user){\n // instantiate SharedPreferences\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n // stores each attribute in a variable, if attribute is null the editor will clear the corresponding value.\n editor.putString(KEY_USER, user.toJSONString());\n // commit changes\n editor.apply();\n }",
"public static void storeSessionData(String sessionId, Connection conn) {\n\t\tMemberSession ms = MemberSessionFacade.getMemberSession(sessionId);\n\t\tif (ms != null) {\n\t\t\ttry {\n\t\t\t\tif (ms.getMemberId().intValue() != SystemGlobals.getIntValue(ConfigKeys.ANONYMOUS_USER_ID)) {\n\t\t\t\t\tDataAccessDriver.getInstance().newMemberSessionManager().update(ms, conn);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warn(\"Error storing member session data: \" + e, e);\n\t\t\t}\n\t\t}\n\t}",
"void storeSession() {\n retrieveSessionIfNeeded(false);\n\n if (session != null) {\n try {\n session.commit();\n } catch (Exception e) { // NOSONAR - some error occured, log it\n logger.warn(\"cannot store session: {}\", session, e);\n throw e;\n }\n } else {\n logger.debug(\"session was null, nothing to commit\");\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tprotected void saveUserProfile2Session(User vapUser) {\r\n\t\tif (vapUser != null) {\r\n\t\t\t// set last login date if user is same\r\n\t\t\tif (userProfile.get(AuthenticationConsts.KEY_LAST_LOGIN_DATE) == null) {\r\n\t\t\t\tDate lastLoginDate = (Date)vapUser.getProperty(AuthenticationConsts.PROPERTY_LAST_LOGIN_DATE_ID);\r\n\t\t\t\tuserProfile.put(AuthenticationConsts.KEY_LAST_LOGIN_DATE,\r\n\t\t\t\t\t\t\t\tlastLoginDate);\r\n\t\t\t}\r\n\r\n\t\t\t// set user groups\r\n\t\t\tuserProfile.put(AuthenticationConsts.KEY_USER_GROUPS,\r\n\t\t\t\t\t\t\tCollections.list(Collections.enumeration(AuthenticatorHelper.getUserGroupTitleSet(AuthenticatorHelper.getUserGroupSet(vapUser)))));\r\n\t\t}\r\n\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\tLOG.debug(\"Saving user profile map in session: %s\" + userProfile);\r\n\t\t}\r\n\t\trequest.getSession()\r\n\t\t\t .setAttribute(AuthenticationConsts.USER_PROFILE_KEY, userProfile);\r\n\t}",
"void saveUserData(User user);",
"public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE); //This means the info is private and hence secured\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n editor.putString(\"password\", passwordInput.getText().toString());\n editor.apply();\n\n Toast.makeText(this, \"Saved!\", Toast.LENGTH_LONG).show();\n }",
"protected void proccesValues() {\n Users user = new Users();\n user.setName(bean.getName());\n user.setSurname(bean.getSurname());\n user.setUsername(bean.getUsername());\n StrongPasswordEncryptor passwordEncryptor = new StrongPasswordEncryptor();\n String encryptedPassword = passwordEncryptor.encryptPassword(bean.getPassword());\n user.setPassword(encryptedPassword);\n \n usersService.persist(user);\n Notification.show(msgs.getMessage(INFO_REGISTERED), Notification.Type.ERROR_MESSAGE);\n resetValues();\n UI.getCurrent().getNavigator().navigateTo(ViewLogin.NAME);\n }",
"@Override\n public boolean setLoggedUser(User user) \n {\n try\n {\n File file = new File(System.getProperty(\"user.home\")+\"\\\\user.ser\");\n \n File file_remember_me = new File(System.getProperty(\"user.home\")+\"\\\\remember.ser\");\n if(!file_remember_me.exists()) file.deleteOnExit();\n \n FileOutputStream fout = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fout); \n oos.writeObject(user);\n oos.close();\n\t}\n catch(Exception ex){ ex.printStackTrace();return false;}\n \n return true;\n }",
"private void updateUserLogin() {\n\t\tSessionManager sessionManager = new SessionManager(\n\t\t\t\tMyApps.getAppContext());\n\n\t\tRequestParams params = new RequestParams();\n\t\tparams.add(\"user_id\", sessionManager.getUserDetail().getUserID());\n\n\t\tLog.d(\"EL\", \"userID: \" + sessionManager.getUserDetail().getUserID());\n\n\t\tKraveRestClient.post(WebServiceConstants.AV_UPDATE_USER_PROFILE_DATA_1,\n\t\t\t\tparams, new JsonHttpResponseHandler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tJSONObject response) {\n\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tLog.d(\"EL\", \"response: \" + response.toString(2));\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\n\t\t\t\t\t\tsuper.onFailure(statusCode, headers, throwable,\n\t\t\t\t\t\t\t\terrorResponse);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"@Override\n\tpublic void setUser(String sessionId, UserInfo userInfo) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"setUser\");\n//\t\tif (!isCloudChannelLive()) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_USER_OFFLINE,\n//\t\t\t\t\t\"User is not online\");\n//\t\t}\n\t\t\n\t\tUserPayload payload = new UserPayload();\n\t\t\n//\t\tUserInfo payload = new UserInfo();\n\t\tpayload.setCellPhone(userInfo.getCellPhone());\n\t\tpayload.setDisplayName(userInfo.getDisplayName());\n\t\tpayload.setEmail(userInfo.getEmail());\n\t\tpayload.setIdNumber(userInfo.getIdNumber());\n\t\t\n\t\t//user name cannot modified in cloud service\n//\t\tpayload.setUserName(userInfo.getUserName());\n\t\t\n\t\tUserSetRequest request = new UserSetRequest();\n\t\trequest.setSessionId(sessionId);\n\t\trequest.setPayload(payload);\n\t\ttry {\n\t\t\tcloudSecurityManager.setUser(request);\n\t\t\t\n\t\t\tUserInfo savedUserInfo = userInfoDao.getUserInfoByToken(sessionId);\n\t\t\tif (savedUserInfo != null) {\n\t\t\t\tsavedUserInfo.setCellPhone(userInfo.getCellPhone());\n\t\t\t\tsavedUserInfo.setDisplayName(userInfo.getDisplayName());\n\t\t\t\tsavedUserInfo.setEmail(userInfo.getEmail());\n\t\t\t\tsavedUserInfo.setIdNumber(userInfo.getIdNumber());\n\t\t\t\tuserInfoDao.saveUserInfo(savedUserInfo);\n\t\t\t}\n\t\t} catch (CloudException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new HFModuleException(e.getErrorCode(), e.getMessage());\n\t\t}\n\t\t\n//\t\tJSONObject req = new JSONObject();\n//\t\tJSONObject pl = new JSONObject();\n//\t\ttry {\n//\n//\t\t\tif (info.getDisplayName() != null)\n//\t\t\t\tpl.put(\"displayName\", info.getDisplayName());\n//\t\t\tif (info.getUserName() != null)\n//\t\t\t\tpl.put(\"userName\", info.getUserName());\n//\t\t\tif (info.getPassword() != null)\n//\t\t\t\tpl.put(\"password\", info.getPassword());\n//\t\t\tif (info.getCellPhone() != null)\n//\t\t\t\tpl.put(\"cellPhone\", info.getCellPhone());\n//\t\t\tif (info.getEmail() != null)\n//\t\t\t\tpl.put(\"email\", info.getEmail());\n//\t\t\tif (info.getIdNumber() != null)\n//\t\t\t\tpl.put(\"idNumber\", info.getIdNumber());\n//\n//\t\t\treq.put(\"CID\", 10221);\n//\t\t\treq.put(\"SID\", getsid());\n//\t\t\treq.put(\"PL\", pl);\n//\t\t\tString rsp = HttpProxy.reqByHttpPost(req.toString());\n//\n//\t\t\tJSONObject jo = new JSONObject(rsp);\n//\t\t\tif (jo.isNull(\"RC\")) {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\t\"can not set user\");\n//\t\t\t}\n//\t\t\tif (jo.getInt(\"RC\") != 1) {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\t\"can not set user\");\n//\t\t\t}\n//\n//\t\t} catch (JSONException e) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\"can not set user\");\n//\t\t}\n\t}",
"public static void userData(Context context)\r\n\t{\r\n\t\ttry {\r\n\t\t\tcontext.json(((Account)context.sessionAttribute(\"currentUser\")));\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tLogging.error(e);\r\n\t\t\tcontext.redirect(\"/index.html\");\r\n\t\t}\r\n\t}",
"public void persistLoginState(String email) {\n SharedPreferences sp = getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n editor.putString(SP_USERNAME, email);\n editor.apply();\n }",
"private void setAuthenticatedUser(HttpServletRequest req, HttpSession httpSess, String userName) {\n\t\t// Set the authentication\n\t\tauthComponent.setCurrentUser(userName);\n\n\t\t// Set up the user information\n\t\tUserTransaction tx = transactionService.getUserTransaction();\n\t\tNodeRef homeSpaceRef = null;\n\t\tUser user;\n\t\ttry {\n\t\t\ttx.begin();\n\t\t\tuser = new User(userName, authService.getCurrentTicket(), personService.getPerson(userName));\n\t\t\thomeSpaceRef = (NodeRef) nodeService.getProperty(personService.getPerson(userName), ContentModel.PROP_HOMEFOLDER);\n\t\t\tif(homeSpaceRef == null) {\n\t\t\t\tlogger.warn(\"Home Folder is null for user '\"+userName+\"', using company_home.\");\n\t\t\t\thomeSpaceRef = (NodeRef) nodeService.getRootNode(Repository.getStoreRef());\n\t\t\t}\n\t\t\tuser.setHomeSpaceId(homeSpaceRef.getId());\n\t\t\ttx.commit();\n\t\t} catch (Throwable ex) {\n\t\t\tlogger.error(ex);\n\n\t\t\ttry {\n\t\t\t\ttx.rollback();\n\t\t\t} catch (Exception ex2) {\n\t\t\t\tlogger.error(\"Failed to rollback transaction\", ex2);\n\t\t\t}\n\n\t\t\tif (ex instanceof RuntimeException) {\n\t\t\t\tthrow (RuntimeException) ex;\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"Failed to set authenticated user\", ex);\n\t\t\t}\n\t\t}\n\n\t\t// Store the user\n\t\thttpSess.setAttribute(AuthenticationHelper.AUTHENTICATION_USER, user);\n\t\thttpSess.setAttribute(LoginBean.LOGIN_EXTERNAL_AUTH, Boolean.TRUE);\n\n\t\t// Set the current locale from the Accept-Lanaguage header if available\n\t\tLocale userLocale = parseAcceptLanguageHeader(req, m_languages);\n\n\t\tif (userLocale != null) {\n\t\t\thttpSess.setAttribute(LOCALE, userLocale);\n\t\t\thttpSess.removeAttribute(MESSAGE_BUNDLE);\n\t\t}\n\n\t\t// Set the locale using the session\n\t\tI18NUtil.setLocale(Application.getLanguage(httpSess));\n\n\t}",
"private void updateUserSession(int state) {\n // Update the current session.\n request.updateSession(state, offerTime.getTime());\n }",
"public void setSession(Session value);",
"private static void pushInfoToSession(HttpServletRequest request, AddressBean address) {\r\n\t\t\r\n\t\tHttpSession session = request.getSession(true);\r\n\t\t\r\n\t\tsession.setAttribute(ADDRESS, address.getStreet());\r\n\t\tsession.setAttribute(CITY, address.getCity());\r\n\t\tsession.setAttribute(COUNTRY, address.getCountry());\r\n\t\tsession.setAttribute(PROV, address.getProvince());\r\n\t\tsession.setAttribute(POSTAL, address.getZip());\r\n\t\tsession.setAttribute(PHONE, address.getPhone());\r\n\t}",
"private void getValues() {\n session = new UserSession(getApplicationContext());\n\n //validating session\n session.isLoggedIn();\n\n //get User details if logged in\n HashMap<String, String> user = session.getUserDetails();\n\n shopname = user.get(UserSession.KEY_NAME);\n shopemail = user.get(UserSession.KEY_EMAIL);\n shopmobile = user.get(UserSession.KEY_MOBiLE);\n System.out.println(\"nameemailmobile \" + shopname + shopemail + shopmobile);\n }",
"private void pushToHibernate(){\n DATA_API.saveUser(USER);\n }",
"public void setSession(Session session) { this.session = session; }",
"public void saveInfo(View view) {\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n editor.putString(\"password\", passwordInput.getText().toString());\n editor.apply();\n\n usernameInput.setText(\"\");\n passwordInput.setText(\"\");\n\n Toast.makeText(this, \"Saved!\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\tpublic void setSession(Map<String, Object> s) {\n\t\tsession = s;\n\t}",
"private void setupSession() {\n // TODO Retreived the cached Evernote AuthenticationResult if it exists\n// if (hasCachedEvernoteCredentials) {\n// AuthenticationResult result = new AuthenticationResult(authToken, noteStoreUrl, webApiUrlPrefix, userId);\n// session = new EvernoteSession(info, result, getTempDir());\n// }\n ConnectionUtils.connectFirstTime();\n updateUiForLoginState();\n }",
"public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userinfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n\n editor.apply();\n Toast.makeText(this,\"Saved!\",Toast.LENGTH_LONG).show();\n }",
"private void loggedInUser() {\n\t\t\n\t}",
"public Session(User user) {\n sessionId = UUID.randomUUID().toString();\n loggedInUser = user;\n }",
"public void setUser(User user) { this.user = user; }",
"private void initSession(HttpServletRequest request, HttpServletResponse response) throws IOException {\n // create new seassion for user\n HttpSession session = request.getSession();\n if (session != null) {\n _sessionId = session.getId();\n }\n\n response.getWriter().write(_sessionId);\n }",
"private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }",
"public void sessionCreated(HttpSessionEvent httpSessionEvent) {\r\n System.out.println(\"sessionCreated method has been called in \"\r\n + this.getClass().getName());\r\n\r\n totalUserCount++;\r\n currentUserCount++;\r\n\r\n ctx = httpSessionEvent.getSession().getServletContext();\r\n\r\n ctx.setAttribute(\"totalusers\", totalUserCount);\r\n ctx.setAttribute(\"currentusers\", currentUserCount);\r\n\r\n }",
"public void initUser(ActiveSession user) {\n this.user = user;\n }",
"public void setUserName(String userName) {\n sessionData.setUserName(userName);\n }",
"private void getUser(){\n user = new User();\n SharedPreferences preferences = getSharedPreferences(\"account\", MODE_PRIVATE);\n user.setId(preferences.getInt(\"id\", 0));\n user.setPhone(preferences.getString(\"phone\", \"\"));\n user.setType(preferences.getInt(\"type\",0));\n }",
"public UserSession(User user) {\n\n }",
"private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }",
"public static void saveCurrentUser(User user) {\n if (user == null)\n return;\n\n // memory cache\n cacheUser = user;\n cacheAccessToken = user.secret;\n\n String json = (new Gson()).toJson(user);\n if (StringUtils.isNull(json))\n return;\n\n getSharedPreferences().edit().putString(PREF_KEY_USER_INFO, json).commit();\n }",
"@RequestMapping(value = \"get_user_info.do\",method = RequestMethod.POST)\r\n @ResponseBody\r\n public ServerResponse<User> getInfo(HttpSession session){\r\n User currentUser = (User)session.getAttribute(Constant.CURRENT_USER);\r\n if(currentUser == null){\r\n return ServerResponse.createByErrorCodeAndMsg(ResponseCode.NEED_LOGIN.getCode(),\"User has not logged in.\");\r\n }\r\n return iUserService.getUserInfoById(currentUser.getId());\r\n }",
"@Override\n @SessionRequired\n public UserSession newSession(final User user, final boolean isDeviceTrusted) {\n final String seriesId = crypto.nextSessionId();\n final UserSession session = user.getEntityFactory().newByKey(UserSession.class, user, seriesHash(seriesId));\n session.setTrusted(isDeviceTrusted);\n final Date expiryTime = calcExpiryTime(isDeviceTrusted);\n session.setExpiryTime(expiryTime);\n session.setLastAccess(constants.now().toDate());\n\n // authenticator needs to be computed and assigned after the session has been persisted\n // assign authenticator in way not to disturb the entity meta-state\n final UserSession saved = save(session);\n saved.beginInitialising();\n saved.setAuthenticator(mkAuthenticator(saved.getUser(), seriesId /* un-hashed */, saved.getExpiryTime()));\n saved.endInitialising();\n\n // need to cache the established session in associated with the generated authenticator\n cache.put(saved.getAuthenticator().get().toString(), saved);\n\n return saved;\n }",
"public static boolean storeSessionId(User dto){\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tEntity sessionId = new Entity(\"sessionId\");\n\t\t/*\n\t\tSet the sessionId and the first / last name tied to it.\n\t\tWhile we may not use the first and last name right now,\n\t\twe might in the future, so for now, store em.\n\t\t */\n\t\t\n\t\tsessionId.setProperty(\"sessionId\", dto.getSessionId());\n\t\tsessionId.setProperty(\"firstName\", dto.getFirstName());\n\t\tsessionId.setProperty(\"lastName\", dto.getLastName());\n\n\t\t//Date for a time reference\n\t\tDate date = new Date();\n\t\tlong currentDateMilliseconds = date.getTime();\n\t\t//Putting the date time reference in as a long in Epoch Time\n\t\tsessionId.setProperty(\"dateCreated\", currentDateMilliseconds);\n\t\t\n\t\t//Insert it into the datastore\n\t\ttry{\n\t\t\tdatastore.put(sessionId);\n\t\t\treturn true;\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"public void saveCurrentUserState(){\n\t\tCurrentUserState currState = new CurrentUserState();\n\t\tcurrState.setBatchOutput(batchState.getBatchOutput());\n\t\tcurrState.setCurrFields(batchState.getFields());\n\t\tcurrState.setCurrProject(batchState.getProject());\n\t\tcurrState.setCurrScale(display.getScale());\n\t\tcurrState.setCurrSelectedCell(batchState.getSelectedCell());\n\t\tcurrState.setErrorCells(batchState.getErrors());\n\t\t\n\t\tcurrState.setHighlight(display.isToggleOn());\n\t\tcurrState.setInverted(display.isInverted());\n\t\t\n\t\tcurrState.setCurrWindowPos(getLocationOnScreen());\n\t\tcurrState.setCurrWindowSize(getSize());\n\t\t\n\t\tcurrState.setHorizontalDiv(bottomPanel.getDividerLocation());\n\t\tcurrState.setVertivalDiv(centerPanel.getDividerLocation());\n\t\t\n\t\tcurrState.setOriginX(display.getW_originX());\n\t\tcurrState.setOriginY(display.getW_originY());\n\t\t\n\t\tcurrState.setValues(batchState.getValues());\n\t\t\n\t\t//put to xstream\n\t\tXStream xstream = new XStream(new DomDriver());\n\t\ttry {\n\t\t\n\t\t\txstream.toXML(currState, new FileOutputStream(new File(info.getUsername() + \".xml\")));\n\t\t\tSystem.out.println(\"current state is saved!\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"file not found/ couldn't go to xml\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic UtenteBase getSessionUser() {\n\t\tUtenteBase user = (UtenteBase) getThreadLocalRequest().getSession().getAttribute(\"user\");\n\t\treturn user;\n\t}",
"public void storeUser(User user) {\n Entity userEntity = new Entity(\"User\", user.getEmail());\n userEntity.setProperty(\"email\", user.getEmail());\n userEntity.setProperty(\"aboutMe\", user.getAboutMe());\n datastore.put(userEntity);\n }",
"public void setUser(UserData data) {\n user = data;\n }",
"@Override\n public void valueBound(HttpSessionBindingEvent arg0) {\n System.out.println(\"在session中保存LoginUser对象(name = \"+ this.getName() +\"), sessionid = \" + arg0.getSession().getId());\n }",
"public void setupSession(UserMstEx userMstEx) {\n\n setUserSeq(userMstEx.getUserSeq());\n setUserAccount(userMstEx.getUserAccount());\n setUserName(userMstEx.getUserName());\n setUserLocale(userMstEx.getUserLocale());\n setUserTimezone(userMstEx.getUserTimezone());\n setUserCurrency(userMstEx.getUserCurrency());\n setUserSubMenuRole(userMstEx.getUserSubMenuRole());\n\n }",
"public synchronized void addUser(String user, HttpSession session) {\n\t\tif (!userSessions.containsKey(user))\n\t\t\tuserSessions.put(user, session);\n\t}",
"User addUser(IDAOSession session, String fullName, String userName,\n\t\t\tString password);",
"void setUser(OSecurityUser user);",
"private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}",
"private void saveAsCurrentSession(Context context) {\n \t// Save the context\n \tthis.context = context;\n }",
"protected static void storeParametersToSession(ViewLearningToolRequestParams parameters, HttpSession session,\n String applicationKey, String sharedSecret)\n {\n if (parameters.getApiSessionId() == null)\n {\n throw new RuntimeException(\"ApiSessionId is not specified in the querystring.\");\n }\n if (parameters.getLearningObjectId() == null)\n {\n throw new RuntimeException(\"LearningObjectId is not specified in the querystring.\");\n }\n if (parameters.getLearningObjectInstanceId() == null)\n {\n throw new RuntimeException(\"LearningObjectInstanceId is not specified in the querystring.\");\n }\n if (parameters.getVersion() == null)\n {\n throw new RuntimeException(\"Version is not specified in the querystring.\");\n }\n if (parameters.getPermissions() == null)\n {\n throw new RuntimeException(\"Permissions is not specified in the querystring.\");\n }\n\n UserInfo userInfo = new UserInfo();\n userInfo.setAccessibility(parameters.getAccessibility() != null ? parameters.getAccessibility() : false);\n userInfo.setFirstName(parameters.getFirstName());\n userInfo.setLastName(parameters.getLastName());\n userInfo.setEmail(parameters.getEmail());\n userInfo.setSyncKey(parameters.getSyncKey());\n userInfo.setMobile(parameters.getMobile());\n userInfo.setLanguage(parameters.getLanguage());\n userInfo.setLocale(parameters.getLocale());\n userInfo.setWindowsTimeZoneId(parameters.getWindowsTimeZoneId());\n userInfo.setOlsonTimeZoneId(parameters.getOlsonTimeZoneId());\n userInfo.setUser12HTimeFormat(parameters.getUse12HTimeFormat() != null ? parameters.getUse12HTimeFormat() : false);\n userInfo.setEncoding(parameters.getEncoding());\n userInfo.setCustom1Id(parameters.getCustom1Id());\n userInfo.setCustom2Id(parameters.getCustom2Id());\n userInfo.setCustom3Id(parameters.getCustom3Id());\n userInfo.setCustom4Id(parameters.getCustom4Id());\n userInfo.setCustom5Id(parameters.getCustom5Id());\n userInfo.setCustom1(parameters.getCustom1());\n userInfo.setCustom2(parameters.getCustom2());\n userInfo.setCustom3(parameters.getCustom3());\n userInfo.setCustom4(parameters.getCustom4());\n userInfo.setCustom5(parameters.getCustom5()); \n userInfo.setUserId(parameters.getUserId());\n if ( parameters.getCustomerId() != null )\n userInfo.setCustomerId(parameters.getCustomerId());\n\n // Default to guest if userRole is not sent (for backwardscompatibility)\n UserRole userRole = UserRole.Guest;\n if(parameters.getRole()!=null)\n {\n // Set the userRole that we get from it's learning parsed to enum\n userRole = UserRole.valueOf(parameters.getRole());\n }\n \n userInfo.setUserRole(userRole);\n\n try\n {\n userInfo.setSchools(buildSchoolInfoList(parameters.getSchoolId()));\n }\n\n catch(ParseException pe)\n {\n // Invalid format on the request parameter value 'SchoolId'.\n throw new RuntimeException(\"Invalid format on the request parameter value 'SchoolId': \"+parameters.getSchoolId(), pe);\n }\n\t\n\n ApiSession apiSession = constructApiSession(parameters.getApiSessionId(), applicationKey, sharedSecret);\n\n // Put data into session\n // API session and permissions vary for different documents within the same ASP.NET application session\n session.setAttribute(getSessionKey(parameters, Constants.SessionKeys.ApiSessionId), parameters.getApiSessionId());\n session.setAttribute(getSessionKey(parameters, Constants.SessionKeys.ApiSession), apiSession);\n session.setAttribute(getSessionKey(parameters, Constants.SessionKeys.Permissions), parameters.getPermissions());\n\n // UserInfo info is the same for all documents within the same ASP.NET application session\n session.setAttribute(Constants.SessionKeys.UserInfo, userInfo);\n\n }",
"private void saveUserInPreferences(String userName, String password, User user) {\n mUserManager.setUsername(userName);\n mUserManager.setPassword(password);\n mUserManager.saveUser(user);\n }",
"@Override\r\n\tpublic void setSession(Map<String, Object> session) \r\n\t{\n\t\tthis.session = session;\r\n\t}",
"private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }",
"UserSettings store(HawkularUser user, String key, String value);",
"public void login() {\n\t\tUser user = new User(\"admin\", \"12345678\", Role.ADMIN);\n\t\tuser.setEmail(\"[email protected]\");\n\t\t\n\t\tif(user != null) {\n\t\t\tuserBean.setLoggedInUser(user);\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tHttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();\n\t\t\treq.getSession().setAttribute(ATTR_USER, user);\n\t\t}else{\n\t\t\tkeepDialogOpen();\n\t\t\tdisplayErrorMessageToUser(\"Wrong Username/Password. Try again\");\n\t\t}\n\t\t\n\t}",
"private void setConsumerSession(HttpServletRequest request, String consumerSession) {\n HttpSession session = request.getSession(true);\n session.setAttribute(USER_ATTR, consumerSession);\n }",
"public void updateCurrentTrempitUser() {\n\n // create the trempituser object\n TrempitUser currentUser = new TrempitUser();\n currentUser.setFullName(Profile.getCurrentProfile().getName());\n currentUser.setId(Long.valueOf(Profile.getCurrentProfile().getId()));\n\n // update the global variable so all activities can access the user\n globalState.setCurrentUser(currentUser);\n\n // insert the user to the server\n insertTrempitUserToServer(currentUser);\n\n Toast.makeText(this, \"logged in to facebook:\" + globalState.getCurrentUser().getFullName(), Toast.LENGTH_LONG).show();\n }",
"protected User getUser(HttpSession session) {\r\n\t\t// get the user form from the session\r\n\t\treturn (User) session.getAttribute(Constants.USER_KEY);\r\n\t}",
"@Override\n public Single<SessionEntity> createUserSession() {\n return this.userRepository.getUser().firstOrError().flatMap(userEntity -> {\n if (!userEntity.isGuestUser()) {\n if (userEntity.getSessionId().isEmpty()) {\n return newSession(userEntity);\n }\n else if (userEntity.isHasOpenSession()) {\n return Single.just(new SessionEntity(userEntity.isHasOpenSession(), userEntity.getSessionId()));\n }\n }\n return Single.just(new SessionEntity(false, \"\"));\n });\n }",
"public void setSession(Session session) {\n\tthis.session = session; \r\n}",
"@Override\n\tpublic void onExpiration(Session session) {\n\t\tlogger.info(\"onExpiration session created:id= {}, begin at {}\", session.getId(), session.getStartTimestamp());\n\t\tlogger.info(\"currentUser={}\",session.getAttribute(Constants.CURRENT_USER));\n\t}",
"public void setUser(String user)\n {\n _user = user;\n }",
"public void createLoginSession(String name, String email, String phone){\n editor.putBoolean(IS_LOGIN, true);\n\n // Storing data in pref\n editor.putString(KEY_NAME, name);\n editor.putString(KEY_EMAIL, email);\n editor.putString(KEY_PHONE, phone);\n\n // commit changes\n editor.commit();\n }",
"@Override\r\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session=session;\r\n\t}",
"@Override\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session=session;\n\t}",
"public static void getSession (HttpServletRequest request, HttpServletResponse response) throws IOException {\n PrintWriter out = response.getWriter();\n ObjectMapper objM = new ObjectMapper();\n HttpSession session = request.getSession();\n Response<LoginData> res = new Response<>();\n LoginData loginData = new LoginData();\n String r;\n\n if (session.isNew()){\n System.out.println(\"Session not started!\");\n res.setMessage(\"Session not started!\");\n loginData.setAdmin(true);\n res.setStatus(403);\n loginData.setName(\"\");\n res.setData(loginData);\n session.invalidate();\n\n } else {\n System.out.println(\"Session started\");\n res.setMessage(\"Session started\");\n res.setStatus(200);\n loginData.setAdmin(true);\n loginData.setName((String) session.getAttribute(\"name\"));\n res.setData(loginData);\n }\n\n r = objM.writeValueAsString(res);\n System.out.println(r);\n out.print(r);\n }",
"@Override\r\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session = session;\r\n\t}",
"@Override\r\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session = session;\r\n\t}",
"public void setUserAccount(String userAccount) {\n sessionData.setUserAccount(userAccount);\n }",
"@Override\n\tpublic void setSession(Map<String, Object> session)\n\t{\n\t\tthis.session = session;\n\n\t}",
"public void setAuthentication(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.putString(\"userid\", mUserId);\n preferencesEditor.putString(\"areaid\", mAreaId);\n preferencesEditor.commit();\n }",
"@Override\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session = session;\n\t}",
"protected void saveUser(Context context, String text){\n\n mSharedPreferences = context.getSharedPreferences(USER_DETAILS_PREFS_NAME, Context.MODE_PRIVATE);\n editor = mSharedPreferences.edit();\n\n editor.putString(USER_DETAILS_PREFS_KEY, text);\n\n editor.commit();\n }",
"@Override\n\tpublic void setSession(Map<String,Object> mySession) {\n\t\tthis.mySession = mySession;\n\t}",
"public void saveUserSettings() {\n\t}",
"public void createLoginSession(String name, String username, String email, String password, String gender, String dateOfBirth, String mobile) {\n editor.putBoolean(IS_LOGGED_IN, true);\n\n editor.putString(KEY_NAME, name);\n editor.putString(KEY_USERNAME, username);\n editor.putString(KEY_EMAIL, email);\n editor.putString(KEY_PASSWORD, password);\n editor.putString(KEY_GENDER, gender);\n editor.putString(KEY_DATEOFBIRTH, dateOfBirth);\n editor.putString(KEY_MOBILE, mobile);\n\n editor.commit();\n }",
"public PSUserSession getSession();",
"public User getSession(){\n\t\treturn this.session;\n\t}",
"public void setSession(Session session) {\r\n this.session = session;\r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tServletOutputStream out=resp.getOutputStream();\n\t\tHttpSession session=req.getSession();\n\t\tUserInfo info=(UserInfo) session.getAttribute(Constants.SESSION_USER_KEY);\n\t\tif(info==null) {\n\t\t\tresp.sendRedirect(this.getServletContext().getContextPath()+\"/login\");\n\t\t\t\n\t\t}\n\t\tout.println(\"<html>\");\n out.println(\"<head><title>Session example</title></head>\");\n \n out.println(\"<body>\");\n \n out.println(\"<h3>User Info:</h3>\");\n \n out.println(\"<p>User Name:\" + info.getUserName() + \"</p>\");\n out.println(\"<p>Country:\" + info.getCountry() + \"</p>\");\n out.println(\"<p>Post:\" + info.getPost() + \"</p>\");\n \n out.println(\"</body>\");\n out.println(\"<html>\");\n\t}",
"private UserID getCurrentUser()\n\t{\n\t return (UserID)request.getSession().getAttribute(\"userID\");\n\t}",
"public static void setConnectedUser( HttpServletRequest request, User user )\r\n\t{\r\n\t\trequest.getSession().setAttribute( \"connectedUser\", user );\r\n\t}",
"public void setSession(Map<String, Object> session)\r\n\t{\n\t\tthis.session = session;\r\n\t}",
"public void createSession(int uid);",
"public final void saveUserInfo(final String userName, final String password)\n throws NoSuchAlgorithmException, UnsupportedEncodingException {\n addContact(userName, password);\n }",
"public interface User\n extends HttpSessionBindingListener, TurbineUserDelegate, TurbineUser\n{\n /** The 'perm storage' key name for the create_date field. */\n String CREATE_DATE = \"CREATE_DATE\";\n\n /** The 'perm storage' key name for the last_login field. */\n String LAST_LOGIN = \"LAST_LOGIN\";\n\n /** The 'perm storage' key for the confirm_value field. */\n String CONFIRM_VALUE = \"CONFIRM_VALUE\";\n\n /** This is the value that is stored in the database for confirmed users */\n String CONFIRM_DATA = \"CONFIRMED\";\n\n /** The 'perm storage' key name for the access counter. */\n String ACCESS_COUNTER = \"_access_counter\";\n\n /** The 'temp storage' key name for the session access counter */\n String SESSION_ACCESS_COUNTER = \"_session_access_counter\";\n\n /** The 'temp storage' key name for the 'has logged in' flag */\n String HAS_LOGGED_IN = \"_has_logged_in\";\n\n /** The session key for the User object. */\n String SESSION_KEY = \"turbine.user\";\n\n /**\n * Gets the access counter for a user from perm storage.\n *\n * @return The access counter for the user.\n */\n int getAccessCounter();\n\n /**\n * Gets the access counter for a user during a session.\n *\n * @return The access counter for the user for the session.\n */\n int getAccessCounterForSession();\n\n /**\n * Gets the last access date for this User. This is the last time\n * that the user object was referenced.\n *\n * @return A Java Date with the last access date for the user.\n */\n Date getLastAccessDate();\n\n /**\n * Gets the create date for this User. This is the time at which\n * the user object was created.\n *\n * @return A Java Date with the date of creation for the user.\n */\n Date getCreateDate();\n\n /**\n * Returns the user's last login date.\n *\n * @return A Java Date with the last login date for the user.\n */\n Date getLastLogin();\n\n /**\n * Get an object from permanent storage.\n *\n * @param name The object's name.\n * @return An Object with the given name.\n */\n Object getPerm(String name);\n\n /**\n * Get an object from permanent storage; return default if value\n * is null.\n *\n * @param name The object's name.\n * @param def A default value to return.\n * @return An Object with the given name.\n */\n Object getPerm(String name, Object def);\n\n /**\n * This should only be used in the case where we want to save the\n * data to the database.\n *\n * @return A Map.\n */\n Map<String, Object> getPermStorage();\n\n /**\n * This should only be used in the case where we want to save the\n * data to the database.\n *\n * @return A Map.\n */\n Map<String, Object> getTempStorage();\n\n /**\n * Get an object from temporary storage.\n *\n * @param name The object's name.\n * @return An Object with the given name.\n */\n Object getTemp(String name);\n\n /**\n * Get an object from temporary storage; return default if value\n * is null.\n *\n * @param name The object's name.\n * @param def A default value to return.\n * @return An Object with the given name.\n */\n Object getTemp(String name, Object def);\n\n /**\n * This sets whether or not someone has logged in. hasLoggedIn()\n * returns this value.\n *\n * @param value Whether someone has logged in or not.\n */\n void setHasLoggedIn(Boolean value);\n\n /**\n * The user is considered logged in if they have not timed out.\n *\n * @return True if the user has logged in.\n */\n boolean hasLoggedIn();\n\n /**\n * Increments the permanent hit counter for the user.\n */\n void incrementAccessCounter();\n\n /**\n * Increments the session hit counter for the user.\n */\n void incrementAccessCounterForSession();\n\n /**\n * Remove an object from temporary storage and return the object.\n *\n * @param name The name of the object to remove.\n * @return An Object.\n */\n Object removeTemp(String name);\n\n /**\n * Sets the access counter for a user, saved in perm storage.\n *\n * @param cnt The new count.\n */\n void setAccessCounter(int cnt);\n\n /**\n * Sets the session access counter for a user, saved in temp\n * storage.\n *\n * @param cnt The new count.\n */\n void setAccessCounterForSession(int cnt);\n\n /**\n * Sets the last access date for this User. This is the last time\n * that the user object was referenced.\n */\n void setLastAccessDate();\n\n /**\n * Set last login date/time.\n *\n * @param lastLogin The last login date.\n */\n void setLastLogin(Date lastLogin);\n\n /**\n * Put an object into permanent storage.\n *\n * @param name The object's name.\n * @param value The object.\n */\n void setPerm(String name,\n Object value);\n\n /**\n * This should only be used in the case where we want to save the\n * data to the database.\n *\n * @param storage A Map.\n */\n void setPermStorage(Map<String, Object> storage);\n\n /**\n * This should only be used in the case where we want to save the\n * data to the database.\n *\n * @param storage A Map.\n */\n void setTempStorage(Map<String, Object> storage);\n\n /**\n * Put an object into temporary storage.\n *\n * @param name The object's name.\n * @param value The object.\n */\n void setTemp(String name, Object value);\n\n /**\n * Sets the creation date for this user.\n *\n * @param date Creation date\n */\n void setCreateDate(Date date);\n\n /**\n * This method reports whether or not the user has been confirmed\n * in the system by checking the TurbineUserPeer.CONFIRM_VALUE\n * column to see if it is equal to CONFIRM_DATA.\n *\n * @return True if the user has been confirmed.\n */\n boolean isConfirmed();\n\n /**\n * Sets the confirmation value.\n *\n * @param value The confirmation key value.\n */\n void setConfirmed(String value);\n\n /**\n * Gets the confirmation value.\n *\n * @return The confirmed value\n */\n String getConfirmed();\n\n /**\n * Updates the last login date in the database.\n *\n * @throws Exception A generic exception.\n */\n\n void updateLastLogin()\n throws Exception;\n}",
"public TedHttpSession userObject(Object userObject) {\n this.req.userObject(userObject);\n return this;\n }",
"public static void save() throws IOException {\n String output = Main.currentUser.toString();\n output += DatabaseTranslator.getUserLocations(currentUser.getName());\n DatabaseTranslator.storeUserData(currentUser.getName(), output);\n }",
"private void userInformation()\n {\n name = eName.getText().toString();\n userName = eUserName.getText().toString();\n email = eEmail.getText().toString();\n password = ePassword.getText().toString();\n password = encryptionAlgo.encryptPass(password);//initialize new encrypt password\n address = eAddress.getText().toString();\n favouriteWord = eFavourite.getText().toString();\n }",
"@PostConstruct\r\n public void init() {\n HttpSession session = SessionUtil.getSession();\r\n String email = (String) session.getAttribute(\"email\");\r\n user = userFacade.users(email);\r\n }",
"public void writeUserInro(String name,String key){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"uName\" ,name);\n mydata.putString(\"uKey\",key);\n mydata.commit();\n }",
"public void setSession(Map<String, Object> session) {\n\t\t\n\t}",
"public void saveAuthentication(String username) {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(AUTH, true);\n editor.putString(USERNAME, username);\n editor.apply();\n }",
"private void writeAccount() {\n SharedPreferences pref = getSharedPreferences(\"ACCOUNT\", Context.MODE_PRIVATE);\n SharedPreferences.Editor edt = pref.edit();\n\n edt.putString(\"email\", Me.getInstance().getEmail());\n edt.putString(\"password\", txtPassword.getText().toString().trim());\n\n edt.commit();\n }"
] | [
"0.7506059",
"0.72475994",
"0.6936395",
"0.68270093",
"0.68102485",
"0.6620509",
"0.6582185",
"0.64104074",
"0.6400165",
"0.638996",
"0.63318896",
"0.6319351",
"0.6308271",
"0.6267458",
"0.62609047",
"0.624775",
"0.62227774",
"0.61799353",
"0.6174431",
"0.6174366",
"0.61629057",
"0.61439353",
"0.6085473",
"0.6075917",
"0.6070191",
"0.6065855",
"0.6063047",
"0.6056136",
"0.60466206",
"0.6042066",
"0.603123",
"0.6012283",
"0.59952813",
"0.5993843",
"0.59828293",
"0.5969173",
"0.5968226",
"0.59639025",
"0.59522754",
"0.594332",
"0.59332323",
"0.5920673",
"0.5915815",
"0.59022355",
"0.59010047",
"0.5897612",
"0.5895229",
"0.58920074",
"0.5888446",
"0.5887045",
"0.58852863",
"0.58819073",
"0.58782554",
"0.5875123",
"0.5853724",
"0.58470666",
"0.584045",
"0.5830041",
"0.5829525",
"0.5828791",
"0.5828373",
"0.58218604",
"0.5816381",
"0.58102995",
"0.5788613",
"0.57790196",
"0.57788813",
"0.5778669",
"0.5778561",
"0.5764553",
"0.57614136",
"0.57595897",
"0.57400024",
"0.57400024",
"0.57389605",
"0.5730199",
"0.5727135",
"0.5726853",
"0.57263786",
"0.5720477",
"0.57173914",
"0.5711377",
"0.570851",
"0.5708497",
"0.5700588",
"0.5693121",
"0.5687051",
"0.5681662",
"0.56811553",
"0.568033",
"0.56699014",
"0.56689",
"0.56683815",
"0.5664469",
"0.566088",
"0.56604725",
"0.56524205",
"0.5647724",
"0.5633063",
"0.56295294"
] | 0.6824034 | 4 |
Get the user information stored in the session. | public static UserAccount getLoginedUser(HttpSession session) {
UserAccount loginedUser = (UserAccount) session.getAttribute("loginedUser");
return loginedUser;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected User getUser(HttpSession session) {\r\n\t\t// get the user form from the session\r\n\t\treturn (User) session.getAttribute(Constants.USER_KEY);\r\n\t}",
"@RequestMapping(value = \"get_user_info.do\",method = RequestMethod.POST)\r\n @ResponseBody\r\n public ServerResponse<User> getInfo(HttpSession session){\r\n User currentUser = (User)session.getAttribute(Constant.CURRENT_USER);\r\n if(currentUser == null){\r\n return ServerResponse.createByErrorCodeAndMsg(ResponseCode.NEED_LOGIN.getCode(),\"User has not logged in.\");\r\n }\r\n return iUserService.getUserInfoById(currentUser.getId());\r\n }",
"private void getValues() {\n session = new UserSession(getApplicationContext());\n\n //validating session\n session.isLoggedIn();\n\n //get User details if logged in\n HashMap<String, String> user = session.getUserDetails();\n\n shopname = user.get(UserSession.KEY_NAME);\n shopemail = user.get(UserSession.KEY_EMAIL);\n shopmobile = user.get(UserSession.KEY_MOBiLE);\n System.out.println(\"nameemailmobile \" + shopname + shopemail + shopmobile);\n }",
"public UserInfo getUserInfo() {\n return userInfo;\n }",
"@Override\n\tpublic UserInfo getUserInfo() {\n\t\tHttpSession session = RpcContext.getHttpSession();\n String auth = (String)session.getAttribute(\"auth\");\n UserInfo ui = null;\n if (auth != null) {\n\t switch(AuthType.valueOf(auth)) {\n\t\t case Database: {\n\t\t String username = (String)session.getAttribute(\"username\");\n\t\t \t\tui = _uim.select(username);\n\t\t \t\tbreak;\n\t\t }\n\t\t case OAuth: {\n\t\t \t\tString googleid = (String)session.getAttribute(\"googleid\");\n\t\t \t\tui = _uim.selectByGoogleId(googleid);\n\t\t \t\tbreak;\n\t\t }\n\t }\n }\n\t\treturn ui;\n\t}",
"public UserInfo getUserInfo() {\r\n return userInfo;\r\n }",
"public User getSession(){\n\t\treturn this.session;\n\t}",
"public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<>();\n // user name\n user.put(KEY_NAME, sharedPreferences.getString(KEY_NAME, null));\n // user rol\n user.put(KEY_ROL, sharedPreferences.getString(KEY_ROL, null));\n // user user\n user.put(KEY_USER, sharedPreferences.getString(KEY_USER, null));\n // user email id\n user.put(KEY_EMAIL, sharedPreferences.getString(KEY_EMAIL, null));\n // user avatar\n user.put(KEY_PHOTO, sharedPreferences.getString(KEY_PHOTO, null));\n // return user\n return user;\n }",
"public UserInfo getUserInfo() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is currently logged in.\");\n }\n return (UserInfo) authentication.getPrincipal();\n }",
"@Override\n\tpublic UtenteBase getSessionUser() {\n\t\tUtenteBase user = (UtenteBase) getThreadLocalRequest().getSession().getAttribute(\"user\");\n\t\treturn user;\n\t}",
"public static String getUser() {\r\n return user;\r\n }",
"public static String getUser() {\n return user;\n }",
"public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}",
"public static KmUserMstr getUserDetails(HttpServletRequest request)\r\n\t{\r\n\t\tKmUserMstr userBean = new KmUserMstr();\r\n\t\tif(request.getSession().getAttribute(\"USER_INFO\")!=null)\r\n\t\t{\r\n\t\t\tuserBean = (KmUserMstr)request.getSession().getAttribute(\"USER_INFO\");\r\n\t\t}\r\n\t\treturn userBean;\r\n\t}",
"public String getUserName() {\n return sessionData.getUserName();\n }",
"public String getUser() {\r\n return user;\r\n }",
"public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}",
"public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }",
"public String getUserAccount() {\n return sessionData.getUserAccount();\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"synchronized public String getUser()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getUserID();\n\t\t\t\n\t\treturn null;\n\t}",
"private EndUser getCurrentLoggedUserDetails() {\n\n\t\tEndUser endUser = endUserDAOImpl.findByUsername(getCurrentLoggedUserName()).getSingleResult();\n\n\t\treturn endUser;\n\n\t}",
"public User getLoggedUser();",
"User getUserInformation(Long user_id);",
"private String getUserData() { \n\t\t \n\t\tString userName;\n\t\tObject principial = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\t\n\t\tif(principial instanceof UserDetails) {\n\t\t\tuserName = ((UserDetails) principial).getUsername();\n\t\t} else {\n\t\t\tuserName = principial.toString(); \n\t\t}\n\t\treturn userName; \n\t}",
"public PSUserSession getSession();",
"public String getUser(){\n \treturn user;\n }",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public String getUser()\n {\n return _user;\n }",
"public java.lang.String getUser() {\n return user;\n }",
"public User getUser() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n String userJson = sharedPreferences.getString(KEY_USER, null);\n User user = new Gson().fromJson(userJson, new TypeToken<User>(){}.getType());\n return user;\n }",
"public String getUser() {\n return this.user;\n }",
"public String getUser() {\n\t\treturn user;\n\t}",
"public String getUser()\n {\n return this.user;\n }",
"public String getUser()\n {\n return this.user;\n }",
"public String getUser()\n {\n return this.user;\n }",
"public String getUserinfo() {\n return m_userinfo;\n }",
"public UserData getUser() {\n return user;\n }",
"private User getUser() {\r\n\t\tUserService userService = UserServiceFactory.getUserService();\r\n\t\treturn userService.getCurrentUser();\r\n\t}",
"public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }",
"User getCurrentLoggedInUser();",
"@Override\n public User getLoggedUser() {\n User tmp = null;\n try\n {\n\t\tFileInputStream fin = new FileInputStream(System.getProperty(\"user.home\")+\"\\\\user.ser\");\n\t\tObjectInputStream oos = new ObjectInputStream(fin); \n\t\ttmp = (User) oos.readObject();\n\t\toos.close();\t \n\t}\n catch(Exception ex){ ex.printStackTrace();return null;}\n \n return tmp;\n }",
"public String getUser() {\r\n\t\treturn _userName;\r\n\t}",
"java.lang.String getUser();",
"private String getLoggedInUser() {\r\n\t\tOptional<Authentication> authentication = Optional\r\n\t\t\t\t.ofNullable(SecurityContextHolder.getContext().getAuthentication());\r\n\t\treturn authentication.map(Authentication::getPrincipal).map(obj -> (UserDetails) obj)\r\n\t\t\t\t.map(UserDetails::getUsername).orElse(null);\r\n\t}",
"public static User get() {\n User currentUser = (User) getCurrentRequest().getWrappedSession()\n .getAttribute(CURRENT_USER_DETAILS_ATTRIBUTE_KEY);\n if (currentUser == null) {\n return null;\n } else {\n return currentUser;\n }\n }",
"LoggedUser getLoggedUser();",
"@Override\n\tpublic UserInfo getUser(String sessionId) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"getUser\");\n//\t\tif (!isCloudChannelLive()) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_USER_OFFLINE,\n//\t\t\t\t\t\"User is not online\");\n//\t\t}\n\t\t\n\t\tUserGetRequest request = new UserGetRequest();\n\t\trequest.setSessionId(sessionId);\n\t\ttry {\n\t\t\tUserResponse response = cloudSecurityManager.getUser(request);\n\t\t\tUserPayload payload = response.getPayload();\n\t\t\t\n//\t\t\tUserInfo userInfo = new UserInfo();\n//\t\t\tuserInfo.setAccessKey(HFConfigration.accessKey);\n//\t\t\tuserInfo.setCellPhone(payload.getCellPhone());\n//\t\t\tuserInfo.setCreateTime(payload.getCreateTime());\n//\t\t\tuserInfo.setDisplayName(payload.getDisplayName());\n//\t\t\tuserInfo.setEmail(payload.getEmail());\n//\t\t\tuserInfo.setIdNumber(payload.getIdNumber());\n//\t\t\tuserInfo.setUserName(payload.getUserName());\n\t\t\t\n\t\t\tUserInfo userInfo = userInfoDao.getUserInfoByToken(sessionId);\n\t\t\tif (userInfo == null) {\n\t\t\t\tuserInfo = new UserInfo();\n\t\t\t}\n\t\t\tuserInfo.setAccessKey(HFConfigration.accessKey);\n\t\t\tuserInfo.setCellPhone(payload.getCellPhone());\n\t\t\tuserInfo.setCreateTime(payload.getCreateTime());\n\t\t\tuserInfo.setDisplayName(payload.getDisplayName());\n\t\t\tuserInfo.setEmail(payload.getEmail());\n\t\t\tuserInfo.setIdNumber(payload.getIdNumber());\n\t\t\tuserInfo.setUserName(payload.getUserName());\n\t\t\t\n\t\t\tuserInfoDao.saveUserInfo(userInfo);\n\t\t\t\n\t\t\treturn userInfo;\n\t\t} catch (CloudException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t\tthrow new HFModuleException(e1.getErrorCode(), e1.getMessage());\n\t\t}\n\t\t\n//\t\tString req = \"{'CID':10231,'SID':'#SID#'} \";\n//\t\treq = req.replaceAll(\"#SID#\", getsid());\n//\t\tString rsp = HttpProxy.reqByHttpPost(req);\n//\t\tJSONObject json;\n//\t\ttry {\n//\t\t\tjson = new JSONObject(rsp);\n//\t\t\tif (json.getInt(\"RC\") == 1) {\n//\n//\t\t\t\tJSONObject joRsp = json.getJSONObject(\"PL\");\n//\t\t\t\tUserInfo result = new UserInfo();\n//\n//\t\t\t\tif (!joRsp.isNull(\"id\"))\n//\t\t\t\t\tresult.setId(joRsp.getString(\"id\"));\n//\t\t\t\tif (!joRsp.isNull(\"displayName\")) {\n//\t\t\t\t\tresult.setDisplayName(joRsp.getString(\"displayName\"));\n//\t\t\t\t\tHFLocalSaveHelper.getInstence().getMainUserInfoHelper()\n//\t\t\t\t\t\t\t.setUserNickName(result.getDisplayName());\n//\t\t\t\t\tHFConfigration.cloudUserNickName = result.getDisplayName();\n//\t\t\t\t}\n//\t\t\t\tif (!joRsp.isNull(\"userName\")) {\n//\t\t\t\t\tresult.setUserName(joRsp.getString(\"userName\"));\n//\t\t\t\t\tHFLocalSaveHelper.getInstence().getMainUserInfoHelper()\n//\t\t\t\t\t\t\t.setUserName(result.getUserName());\n//\t\t\t\t\tHFConfigration.cloudUserName = result.getUserName();\n//\t\t\t\t}\n//\t\t\t\tif (!joRsp.isNull(\"cellPhone\")) {\n//\t\t\t\t\tresult.setCellPhone(joRsp.getString(\"cellPhone\"));\n//\t\t\t\t\tHFLocalSaveHelper.getInstence().getMainUserInfoHelper()\n//\t\t\t\t\t\t\t.setPhone(result.getCellPhone());\n//\t\t\t\t\tHFConfigration.cloudUserPhone = result.getCellPhone();\n//\t\t\t\t}\n//\t\t\t\tif (!joRsp.isNull(\"email\")) {\n//\t\t\t\t\tresult.setEmail(joRsp.getString(\"email\"));\n//\t\t\t\t\tHFLocalSaveHelper.getInstence().getMainUserInfoHelper()\n//\t\t\t\t\t\t\t.setEmail(result.getEmail());\n//\t\t\t\t\tHFConfigration.cloudUserEmail = result.getEmail();\n//\t\t\t\t}\n//\t\t\t\tif (!joRsp.isNull(\"idNumber\")) {\n//\t\t\t\t\tresult.setIdNumber(joRsp.getString(\"idNumber\"));\n//\t\t\t\t}\n//\t\t\t\tif (!joRsp.isNull(\"createTime\")) {\n//\t\t\t\t\tresult.setCreateTime(joRsp.getString(\"createTime\"));\n//\t\t\t\t}\n//\t\t\t\treturn result;\n//\t\t\t} else {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_GET_USER,\n//\t\t\t\t\t\t\"can not get user\");\n//\t\t\t}\n//\t\t} catch (JSONException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_GET_USER,\n//\t\t\t\t\t\"can not get user\");\n//\t\t}\n\n\t}",
"public HashMap<String, String> getUserDetails()\n {\n HashMap<String, String> user = new HashMap<>();\n\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_PHONE, pref.getString(KEY_PHONE, null));\n\n return user;\n }",
"public String getUser() {\n\t\t\treturn user;\n\t\t}",
"public static UserData getLogin(HttpSession session) {\n return (UserData) getObject(session, LOGIN);\n }",
"Map<String, Object> getUserProfile();",
"public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }",
"public String getCurrentLoggedUserinfo() {\n\n\t\tClient client = Client.create();\n\n\t\tWebResource webResource = client.resource(\"http://localhost:8083/UserAccounts/UserAccountService/User_logins\");\n\n\t\tClientResponse response = webResource.accept(\"application/json\").get(ClientResponse.class);\n\n\t\tString output = response.getEntity(String.class);\n\n\t\tSystem.out.println(output);\n\n\t\treturn output;\n\n\t}",
"ApplicationUser getUser();",
"@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }",
"@RequestMapping(value=\"get_current_user.do\",method= RequestMethod.POST)\r\n @ResponseBody\r\n public ServerResponse<User> getCurrentUser(HttpSession session){\r\n User user = (User) session.getAttribute(Constant.CURRENT_USER);\r\n if(user != null){\r\n return ServerResponse.createBySuccessData(user);\r\n }\r\n return ServerResponse.createByErrorMsg(\"User has not logged in.\");\r\n }",
"private void getUserInfo() {\n httpClient.get(API.LOGIN_GET_USER_INFO, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n super.onSuccess(statusCode, headers, response);\n callback.onLoginSuccess(response.optJSONObject(Constant.OAUTH_RESPONSE_USER_INFO));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n super.onFailure(statusCode, headers, responseString, throwable);\n callback.onLoginFailed(throwable.getMessage(), ErrorCode.ERROR_CODE_SERVER_EXCEPTION);\n }\n });\n }",
"public HashMap<String, String> getUserDetails(){\n HashMap<String, String> user = new HashMap<String, String>();\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n return user;\n }",
"public String getUser() {\n\treturn strUser;\n }",
"public final User getUser() {\t\r\n\t\treturn this.user;\r\n\t}",
"User getBySession(String session);",
"public static UserSession getUserSession(HttpServletRequest request) {\n return (UserSession) request.getSession().getAttribute(Constants.USER_SESSION_KEY);\n }",
"public UserDetails getUserDetails() {\r\n\t\treturn userDetails;\r\n\t}",
"public User getUser() {\n\treturn user;\n }",
"public frame.game.proto.User.UserInfo getUser() {\n return user_ == null ? frame.game.proto.User.UserInfo.getDefaultInstance() : user_;\n }",
"public frame.game.proto.User.UserInfo getUser() {\n return user_ == null ? frame.game.proto.User.UserInfo.getDefaultInstance() : user_;\n }",
"String getUser();",
"String getUser();",
"public User getUser(){\r\n\t\treturn this.user;\r\n\t}",
"public static User getLoggedUser(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"loggedUserPrefs\", 0);\n User user = (new Gson()).fromJson(prefs.getString(\"user\", null), User.class);\n return user;\n }",
"private UserID getCurrentUser()\n\t{\n\t return (UserID)request.getSession().getAttribute(\"userID\");\n\t}",
"public UserCredentials getProfileDetails() {\n return profile.getProfileDetails(currentUser);\n }",
"public User getUserData();",
"public User getUser(){\n\t\treturn this.user;\n\t}",
"public User getUser() {\r\n\t\treturn user;\r\n\t}",
"public User getUser() {\r\n\t\treturn user;\r\n\t}",
"public User getUser() {\r\n\t\treturn user;\r\n\t}",
"public Think.XmlWebServices.User_login_data getUser_login_data() {\n return user_login_data;\n }",
"@Override\r\n\tpublic User getCurrentUser() {\r\n\t\tString currentUserName = this.getCurrentUserName();\r\n\t\tUser userdetails = this.getByUsername(currentUserName);\r\n\t\treturn userdetails;\r\n\t}",
"@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}",
"public SimpleUser getUser() {\n return user;\n }",
"UserInfo getUserInfo();",
"public User getUser() {\r\n return user;\r\n }",
"public String getUser() {\n if(user == null)\n return \"\"; \n return user;\n }",
"private User retrievePersonalProfileData() {\n if (checkIfProfileExists()) {\n return SharedPrefsUtils.convertSharedPrefsToUserModel(context);\n } else {\n return null;\n }\n }",
"UserDetails getCurrentUser();",
"public User getUser(){\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"User getUser();",
"User getUser();",
"public User getUser() {\n\t\treturn this.user;\n\t}"
] | [
"0.7691387",
"0.7570685",
"0.75530046",
"0.74176943",
"0.7414509",
"0.7414385",
"0.73238516",
"0.7182342",
"0.71476024",
"0.7125628",
"0.7112697",
"0.706653",
"0.7046915",
"0.70138",
"0.70011735",
"0.70007026",
"0.69955504",
"0.69807166",
"0.69574803",
"0.69533813",
"0.69533813",
"0.69533813",
"0.69099045",
"0.6906228",
"0.6889127",
"0.68875575",
"0.6885452",
"0.6869242",
"0.68645465",
"0.6851785",
"0.6851785",
"0.6850364",
"0.68422484",
"0.6836386",
"0.6829769",
"0.682845",
"0.6827455",
"0.6827455",
"0.6827455",
"0.68178177",
"0.6805623",
"0.68032736",
"0.67990184",
"0.6787125",
"0.6780685",
"0.67748946",
"0.6761568",
"0.6760505",
"0.6760411",
"0.6758694",
"0.67580396",
"0.67489576",
"0.6742026",
"0.67380553",
"0.6737858",
"0.6723394",
"0.67217475",
"0.67202604",
"0.6714046",
"0.67071193",
"0.6698486",
"0.66967887",
"0.6688749",
"0.66722685",
"0.6672072",
"0.66699255",
"0.66657096",
"0.6649699",
"0.66467786",
"0.66467786",
"0.6636592",
"0.6636592",
"0.6634672",
"0.66335225",
"0.66311806",
"0.6621252",
"0.6619457",
"0.66106844",
"0.6607905",
"0.6607905",
"0.6607905",
"0.65971404",
"0.6593784",
"0.6578813",
"0.6577159",
"0.6574893",
"0.65720934",
"0.65674365",
"0.6566931",
"0.6565221",
"0.65545624",
"0.65435946",
"0.65435946",
"0.65435946",
"0.65435946",
"0.65435946",
"0.65435946",
"0.65426606",
"0.65426606",
"0.6542426"
] | 0.656526 | 89 |
Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: mx.babel.bansefi.banksystem.personas.webservices.relacioncliente.bajagrupo | public ObjectFactory() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Foco createFoco();",
"protected ContaCapitalCadastroDaoFactory() {\n\t\t\n\t}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public static MovimentiCcService creaOggettoServiceImpl() {\n\t\tMovimentiCcServiceImpl serviceImpl = new MovimentiCcServiceImpl();\r\n\t\t// crea un oggetto FactoryImpl\r\n\t\tMovimentoCcFactoryImpl movimentoCcFactoryImpl = new MovimentoCcFactoryImpl();\r\n\t\t// risolve la dipendenza \r\n\t\tserviceImpl.setMovimentoCcFactory(movimentoCcFactoryImpl);\r\n\t\treturn serviceImpl;\r\n\t}",
"private ObjectFactory createObjectFactory(String objectFactoryNamespace)\r\n throws CockpitConfigurationException {\r\n try {\r\n return new ObjectFactory(new ConfigManagerSpecificationFactory(objectFactoryNamespace));\r\n } catch (IllegalReferenceException e) {\r\n throw new CockpitConfigurationException(\r\n \"IllegalReferenceException occurs while creating ObjectFactory instance using namespace \"\r\n + objectFactoryNamespace, e);\r\n } catch (SpecificationConfigurationException e) {\r\n throw new CockpitConfigurationException(\r\n \"SpecificationConfigurationException occurs while creating ObjectFactory instance using namespace \"\r\n + objectFactoryNamespace, e);\r\n }\r\n }",
"public ObjectFactory() {\n\t}",
"private DTOFactory() {\r\n \t}",
"public ObjectFactory() {\r\n\t}",
"public static borFactory init() {\n\t\ttry {\n\t\t\tborFactory theborFactory = (borFactory)EPackage.Registry.INSTANCE.getEFactory(borPackage.eNS_URI);\n\t\t\tif (theborFactory != null) {\n\t\t\t\treturn theborFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new borFactoryImpl();\n\t}",
"JDefinedClass objectFactory();",
"public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}"
] | [
"0.6260951",
"0.6053005",
"0.60503733",
"0.60503733",
"0.60503733",
"0.60455287",
"0.6020114",
"0.5924696",
"0.5920455",
"0.5915721",
"0.5896229",
"0.5886271",
"0.58739597"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int getRewardsLength() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int getRewardPrice(int i) {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void makePayment(Payment p, int amount) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Payments getPayments() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public String getTitle() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public String getShortDescr() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public String shortProjectDescr() {
return null;
} | {
"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 |
gets credentials of user | private void doQuery(Query query) {
ValueEventListener valueEventListener = new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
if (dataSnapshot.exists()) {
for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
user = snapshot.getValue(User.class);
}
}
String name = user.getFirstName() + " " + user.getLastName();
full_name.setText(name);
phone_number.setText(user.getPhoneNum());
email.setText(user.getEmail());
Uri myUri = Uri.parse(user.getURI());
Toast.makeText(getApplicationContext(), myUri.toString(), Toast.LENGTH_LONG).show();
//Picasso.get().load(myUri).placeholder(R.drawable.default_profile_pic_olive).into(profilepic);
Picasso.get().load(myUri).into(profilepic);
String genreList = user.getPrefList();
String[] gList = genreList.split(" ");
int j = 0;
for (int i = 0; i < gList.length; i++) {
if (gList[i].equals("1")) {
genres[j] = strGenres[i];
j++;
}
}
if (genres.length == 1) {
genre1.setText(genres[0]);
}
else if (genres.length == 2) {
genre1.setText(genres[0]);
genre2.setText(genres[1]);
}
else if (genres.length == 3) {
genre1.setText(genres[0]);
genre2.setText(genres[1]);
genre3.setText(genres[2]);
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
};
query.addListenerForSingleValueEvent(valueEventListener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCredentials();",
"private String[] getCredentials() {\n String[] cred = new String[2];\n System.out.print(\"Username: \");\n cred[0] = sc.nextLine();\n System.out.print(\"Password: \");\n cred[1] = sc.nextLine();\n return cred;\n }",
"java.lang.String getCred();",
"public Object credentials() {\n return cred;\n }",
"private void getGredentialsFromMemoryAndSetUser()\n\t{\n\t SharedPreferences settings = getSharedPreferences(LOGIN_CREDENTIALS, 0);\n\t String username = settings.getString(\"username\", null);\n\t String password = settings.getString(\"password\", null);\n\t \n\t //Set credentials to CouponsManager.\n\t CouponsManager.getInstance().setUser(new User(username, password));\n\t \n\t}",
"void retrievePassWord(User user);",
"public User getUser(String userName, String password);",
"@Override\n\tpublic Object getCredentials() {\n\t\treturn credentials;\n\t}",
"java.lang.String getUser();",
"String getUser();",
"String getUser();",
"private String getCredentials() {\n String credentials = \"\";\n AccountManager accountManager = AccountManager.get(getContext());\n\n final Account availableAccounts[] = accountManager.getAccountsByType(AccountGeneral.ACCOUNT_TYPE);\n\n //there should be only one ERT account\n if(availableAccounts.length > 0) {\n Account account = availableAccounts[0];\n AccountManagerFuture<Bundle> future = accountManager.getAuthToken(account, AccountGeneral.AUTHTOKEN_TYPE_FULL_ACCESS, null, null, null, null);\n try {\n Bundle bundle = future.getResult();\n String accountName = bundle.getString(AccountManager.KEY_ACCOUNT_NAME);\n String token = bundle.getString(AccountManager.KEY_AUTHTOKEN);\n credentials = accountName + \":\" + token;\n } catch (OperationCanceledException | IOException | AuthenticatorException e) {\n Log.e(LOG_TAG, e.getMessage());\n }\n }\n return credentials;\n }",
"String getUserPassword();",
"protected String getPassword(final String username) {\n return credentials.get(username);\n }",
"public List<Credential> getCredentials(Integer userId){\n\n List<Credential> allCredentials = credentialMapper.getAllCredentials(userId);\n\n// for(Credential credential : allCredentials){\n// credential.setPassword(encryptionService.decryptValue(credential.getPassword(),salt));\n// }\n\n return allCredentials;\n }",
"@Override\n\tpublic User getUserWithCredentials(String username, String password) {\n\t\tUser loginUser=mobileDao.getLoginUser(username);\n\t\t//System.out.println(\"password is -\"+loginBean.getPassword());\n\t\tif(loginUser!=null)\n\t\t{\t\n\t\t\tif(password.equals(loginUser.getPassword()))\n\t\t\t\treturn loginUser;\n\t\t}\n\t\treturn null;\n\t}",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public Object getCredential()\n {\n return this.credential;\n }",
"public Object getCredential()\n {\n return this.credential;\n }",
"public Object getCredential()\n {\n return this.credential;\n }",
"public static String getUser() {\r\n return user;\r\n }",
"public String[] getUsers(){\n try {\n names = credentials.keys();\n }catch (java.util.prefs.BackingStoreException e1){\n System.out.println(e1);\n }\n return names;\n }",
"String getUserPassword(String user) {\r\n return userInfo.get(user);\r\n }",
"public static String getUser() {\n return user;\n }",
"public LoginCredentials getGlobalCredentials() {\n return super.getCredentials();\n }",
"public void propagateCredentials( User user, String password );",
"public String getCredentials() {\n return serverGroup.getCredentials();\n }",
"private void getUser(){\n mainUser = DatabaseAccess.getUser();\n }",
"public static String[] readCredentials(boolean isAdmin) {\n String[] credentials = new String[4];\n\n System.out.println(\"CREDENTIALS must be at lest three characters long and may contain \" +\n \"only letters, digits, a dot sign or an underscore sign\");\n in.nextLine();\n\n System.out.println(\"Username (at least 3 characters): \");\n credentials[0] = in.nextLine();\n System.out.println(\"Password (at least 3 characters): \");\n credentials[1] = in.nextLine();\n System.out.println(\"Email: \");\n credentials[2] = in.nextLine();\n if (isAdmin) {\n System.out.println(\"Agency: \");\n credentials[3] = in.nextLine();\n } else {\n credentials[3] = \"CUSTOMER\";\n }\n return credentials;\n }",
"@Override\n public LoginCredentials getCredentials() {\n return (localSshCredentials != null) ? localSshCredentials : getGlobalCredentials();\n }",
"public Person authenticateAndGetUser(String numCc, String password) throws RemoteException;",
"private void getUserNamePwd() {\n\n try {\n // get Application Connection ID\n LogonCoreContext lgCtx = LogonCore.getInstance().getLogonContext();\n userName = lgCtx.getBackendUser();\n pwd = lgCtx.getBackendPassword();\n appConnID = LogonCore.getInstance().getLogonContext()\n .getConnId();\n } catch (LogonCoreException e) {\n LogManager.writeLogError(Constants.device_reg_failed_txt, e);\n }\n }",
"public List<UserCredential> getAllCredentials() {\n\t\t List<UserCredential> userCredentials = new ArrayList<>();\n\t\t \n\t\t credentialRepo.findAll().forEach(userCredential -> userCredentials.add(userCredential));\n\t\t \n\t\treturn userCredentials;\n\t}",
"@Override\r\n\tpublic User getUseByUsernameAndPassword(User user) {\n\t\tString sql = \"select id,username,password,email from user where username=? and password=?\";\r\n\t\t\r\n\t\treturn this.queryOne(sql,user.getUsername(),user.getPassword());\r\n\t}",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}",
"public String getUser(){\n \treturn user;\n }",
"ApplicationUser getUser();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"static String retrievePassword(String username) {\r\n User lostUser = accounts.get(username);\r\n return lostUser.getPassword();\r\n }",
"public Credentials getCredentials() {\n return mCredentials;\n }",
"@Override\n\tpublic UserInfo getUserInfo() {\n\t\tHttpSession session = RpcContext.getHttpSession();\n String auth = (String)session.getAttribute(\"auth\");\n UserInfo ui = null;\n if (auth != null) {\n\t switch(AuthType.valueOf(auth)) {\n\t\t case Database: {\n\t\t String username = (String)session.getAttribute(\"username\");\n\t\t \t\tui = _uim.select(username);\n\t\t \t\tbreak;\n\t\t }\n\t\t case OAuth: {\n\t\t \t\tString googleid = (String)session.getAttribute(\"googleid\");\n\t\t \t\tui = _uim.selectByGoogleId(googleid);\n\t\t \t\tbreak;\n\t\t }\n\t }\n }\n\t\treturn ui;\n\t}",
"public String getUserPassword() {\n return sp.getString(USER_PASSWORD, null);\n }",
"private AuthenticatedUser getUser(AuthenticationContext context) {\n StepConfig stepConfig = context.getSequenceConfig().getStepMap().get(context.getCurrentStep() - 1);\n return stepConfig.getAuthenticatedUser();\n }",
"@Override\n public Object getCredentials() {\n return token;\n }",
"protected static Credentials getProxyCredentials() {\n if (!proxyUsernameSet) {\n return null;\n }\n String[] parts = getProxyUsername().split(\"\\\\\\\\\");\n if (parts.length > 1) {\n String domain = parts[0];\n String workstation = null;\n String user = parts[1];\n if (parts.length > 2) {\n workstation = user;\n user = parts[2];\n }\n return new Credentials(user, getProxyPassphrase(), domain, workstation);\n }\n return new Credentials(parts[0], getProxyPassphrase());\n }",
"private String getUserData() { \n\t\t \n\t\tString userName;\n\t\tObject principial = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\t\n\t\tif(principial instanceof UserDetails) {\n\t\t\tuserName = ((UserDetails) principial).getUsername();\n\t\t} else {\n\t\t\tuserName = principial.toString(); \n\t\t}\n\t\treturn userName; \n\t}",
"public static synchronized Credentials authenticate(String userName, String password){\n\t\t\tConnection connection;\n\t\t \tCredentials credentials=null;\n\t\t \t\n\t\t \tPreparedStatement statement=null;\n\t\t\tString preparedSQL = \"SELECT * FROM Credential WHERE Email = ? and Pass = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection=DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, userName);\n\t\t \tstatement.setString(2, password);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\tif(rs.next()){\n\t\t\t\t\tcredentials = new Credentials();\n\t\t\t\t\tcredentials.setCredID(rs.getInt(1));\n\t\t\t\t\tcredentials.setUserID(rs.getInt(2));\n\t\t\t\t\tcredentials.setEmail(rs.getString(3));\n\t\t\t\t\tcredentials.setPass(rs.getString(4));\n\t\t\t\t\tcredentials.setRole(rs.getString(5));\n\t\t\t\t\tcredentials.setValid(rs.getInt(6));\n\t\t\t\t\tcredentials.setRegKey(rs.getString(7));\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}catch (SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\t\tcredentials = null;\n\t\t\t\t}\t\n\t\t\treturn credentials;\n\t}",
"public Credential getCredential() {\n return this.credential;\n }",
"public Credentials getCredentials(AuthScope authscope)\n {\n return credentials;\n }",
"public String getUser() {\r\n return user;\r\n }",
"public String getUser() {\n\treturn strUser;\n }",
"private User getUser() {\r\n\t\tUserService userService = UserServiceFactory.getUserService();\r\n\t\treturn userService.getCurrentUser();\r\n\t}",
"public void getCredentials(){\n System.out.println(\"Enter Your Credit Card Number\");\n setCreditCardNumber(Integer.parseInt(Menu.getScanner().nextLine()));\n System.out.println(\"Enter your billing address\");\n setBillingAddress(Menu.getScanner().nextLine());\n System.out.println(\"Enter your CVC\");\n setCvc(Integer.parseInt(Menu.getScanner().nextLine()));\n }",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"@Override\n public Optional<BasicCredentials> getCredentialsFor(String query) {\n for (CredentialsSupplier s : ss) {\n Optional<BasicCredentials> b = s.getCredentialsFor(query);\n if (b.isPresent())\n return b;\n }\n return empty();\n }",
"@Override\n\tpublic User getUserByCredentials(String userName, String password) {\n\t\tList<User> userList = new ArrayList<User>();\n\t\tString query = \"SELECT u FROM User u\";\n\t\tuserList = em.createQuery(query, User.class).getResultList();\n\t\tUser returnUser = null;\n\t\tfor (User user : userList) {\n\t\t\tif (user.getUserName().equals(userName) && user.getPassword().equals(password)) {\n\t\t\t\tSystem.out.println(user);\n\t\t\t\treturnUser = user;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not found\");\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn returnUser;\n\t}",
"@Override\n\tpublic String getPassword() {\n\t\treturn user.getPassword();\n\t}",
"public UserCredentials getProfileDetails() {\n return profile.getProfileDetails(currentUser);\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"UserSettings getByUser();",
"@Override\n\tpublic String getPassword() {\n\t\treturn user.getUserPwd();\n\t}",
"public String getUser()\n {\n return _user;\n }",
"@DataProvider(name = \"Authentication\")\n\t public static Object[][] credentials() {\n\t return new Object[][] { { \"testuser_1\", \"Test@123\" }, { \"testuser_2\", \"Test@1234\" }}; \n\t }",
"@Override\n\t\tpublic Object getCredentials() {\n\t\t\treturn null;\n\t\t}",
"private String getPasswordFromUser() {\n JPasswordField passField = new JPasswordField(10);\n int action = JOptionPane.showConfirmDialog(null, passField, \"Please enter your password:\", JOptionPane.OK_CANCEL_OPTION);\n\n if (action < 0) {\n System.exit(0);\n }\n\n __logger.info(\"Got password from user\");\n\n return new String(passField.getPassword());\n }",
"java.lang.String getPasswd();",
"public String[] getUser(){\n Set<String> userSet = preferences.getStringSet(userRef, new HashSet<>());\n if(userSet.size() == 0) return new String[0];\n String user = \"\";\n String pass = \"\";\n String test = userSet.toArray()[0].toString();\n Pattern pattern = Pattern.compile(\"^.+@.+\\\\..+$\");\n Matcher matcher = pattern.matcher(test);\n if(matcher.matches()) {\n user = test;\n pass = userSet.toArray()[1].toString();\n }else {\n pass = test;\n user = userSet.toArray()[1].toString();\n }\n return new String[] {user, pass};\n }",
"public String getUserPassword() {\r\n return userPassword;\r\n }",
"List<String> authenticateUser(String userName, String password);",
"List<ExposedOAuthCredentialModel> readExposedOAuthCredentials();",
"UserModel retrieveUserModel(String username, String password);",
"User getPassedUser();",
"static String getAuth(String key) {\r\n try {\r\n Properties properties = new Properties();\r\n properties.load(new FileInputStream(new File(Run.CREDENTIALS_FILE_NAME)));\r\n\r\n return properties.getProperty(key);\r\n }\r\n catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n return null;\r\n }",
"public String getUserName();",
"String getUserUsername();",
"User getUser();",
"User getUser();",
"private void getValues() {\n session = new UserSession(getApplicationContext());\n\n //validating session\n session.isLoggedIn();\n\n //get User details if logged in\n HashMap<String, String> user = session.getUserDetails();\n\n shopname = user.get(UserSession.KEY_NAME);\n shopemail = user.get(UserSession.KEY_EMAIL);\n shopmobile = user.get(UserSession.KEY_MOBiLE);\n System.out.println(\"nameemailmobile \" + shopname + shopemail + shopmobile);\n }",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();"
] | [
"0.7494527",
"0.7480439",
"0.7306489",
"0.7113342",
"0.69670075",
"0.67799366",
"0.67279017",
"0.66969043",
"0.669132",
"0.6682786",
"0.6682786",
"0.66080475",
"0.65968055",
"0.655276",
"0.6543035",
"0.64590186",
"0.64489806",
"0.64489806",
"0.64489806",
"0.64174837",
"0.64174837",
"0.64174837",
"0.6416761",
"0.640716",
"0.6406433",
"0.63626826",
"0.63402957",
"0.6334831",
"0.63111764",
"0.6294877",
"0.6293084",
"0.6278823",
"0.6262035",
"0.62555796",
"0.62509656",
"0.62480634",
"0.6247726",
"0.6247726",
"0.6247726",
"0.62312394",
"0.6215657",
"0.621216",
"0.62099946",
"0.62099946",
"0.62099946",
"0.62098986",
"0.62071025",
"0.6196035",
"0.6195858",
"0.61908484",
"0.6188713",
"0.6185764",
"0.6177412",
"0.6172956",
"0.61693823",
"0.61633676",
"0.6160661",
"0.6158775",
"0.6145555",
"0.6142314",
"0.614219",
"0.614219",
"0.614219",
"0.614219",
"0.614219",
"0.614219",
"0.614219",
"0.614219",
"0.614219",
"0.6140396",
"0.6140074",
"0.6133822",
"0.61215425",
"0.61139464",
"0.61139464",
"0.61139464",
"0.6110886",
"0.6098996",
"0.6098493",
"0.6087542",
"0.60767937",
"0.60644025",
"0.6057725",
"0.60561305",
"0.6055062",
"0.6052206",
"0.6050659",
"0.6048762",
"0.60261136",
"0.6025582",
"0.6023508",
"0.6014009",
"0.60101676",
"0.60101676",
"0.6007085",
"0.600667",
"0.600667",
"0.600667",
"0.600667",
"0.600667",
"0.600667"
] | 0.0 | -1 |
String url = " | @Test
public void checkfileExist() {
checkBlobExist("pause-amd64","sha256:cf92024299791de93ad205151ab24e535c218bbea6465fd8f79c2611db913a50");
// try{
// String info = httpUtils.head(url, new HashMap<>(), null);
// logger.info("info:{}", info);
// } catch (Exception e) {
// e.printStackTrace();
// }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String url();",
"String getUrl();",
"String getUrl();",
"String getUrl();",
"String getUrl();",
"String getUrl();",
"public String getUrl(){\n \treturn url;\n }",
"public void setURL(String _url) { url = _url; }",
"public static String requestURL(String url) {\n return \"\";\n }",
"public String getURL();",
"URL getUrl();",
"public String getURL() { return url; }",
"public String getUrl() { return url; }",
"java.lang.String getUrl();",
"java.lang.String getUrl();",
"java.lang.String getUrl();",
"java.lang.String getUrl();",
"java.lang.String getUrl();",
"java.lang.String getUrl();",
"public void setUrl(String url);",
"public void setUrl(String url);",
"public void setUrl(String url){\n\t\t_url=url;\n\t}",
"public void setURL(String url);",
"public String getUrl();",
"public String getUrl();",
"public String getUrl();",
"public String getUrl();",
"public void setUrl(String url){\n this.URL3 = url;\n }",
"private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }",
"String getRequestURL();",
"public void setUrl( String url )\n {\n this.url = url;\n }",
"public void setUrl( String url )\n {\n this.url = url;\n }",
"public abstract String getURL();",
"public String getUrl()\n {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"@Override\n\tpublic String getUrl()\n\t{\n\t\treturn url;\n\t}",
"public void setUrl(String url) {\n this.url = url;\n }",
"@Override\r\n public String getURL() {\n return url;\r\n }",
"private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}",
"public abstract String getUrl();",
"public String getURL() {\r\n return url;\r\n }",
"public void setUrl(String url) {\r\n this.url = url;\r\n }",
"public void setUrl(String url) {\r\n this.url = url;\r\n }",
"public void setUrl(String url) {\r\n this.url = url;\r\n }",
"public java.lang.String getUrl () {\r\n\t\treturn url;\r\n\t}",
"@Override\npublic void get(String url) {\n\t\n}",
"public String getURL()\n {\n return getURL(\"http\");\n }",
"public void setUrl(URL url)\n {\n this.url = url;\n }",
"public String getURL() {\n return url;\n }",
"public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}",
"public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}",
"public void setUrl(String url) {\n this.url = url;\n }",
"public void setUrl(String url) {\n this.url = url;\n }",
"public void setUrl(String url) {\n this.url = url;\n }",
"public void setUrl(String url) {\n this.url = url;\n }",
"public void setUrl(String url) {\n this.url = url;\n }",
"public void setUrl(String url) {\n this.url = url;\n }",
"public void setUrl(String url) {\n this.url = url;\n }",
"public void setUrl(String url) {\n this.url = url;\n }",
"public String getUrl() {\r\n return url;\r\n }",
"public String getUrl() {\r\n return url;\r\n }",
"public String getUrl() {\r\n return url;\r\n }",
"public String getUrl() {\r\n return url;\r\n }",
"public String getUrl() {\r\n return url;\r\n }",
"public String getUrl() {\r\n return url;\r\n }",
"public String getUrl() {\r\n return url;\r\n }",
"public String getURL(String url) {\n\t\tString resultado =\"\";\n\t\tHttpClient c = new DefaultHttpClient();\n\t\tHttpGet get = new HttpGet(url);\n\t\tHttpResponse response = null;\n\t\ttry {\n\t\t\tresponse = c.execute(get);\n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tresultado = EntityUtils.toString(response.getEntity());\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}",
"public String getUrl(){\n return urlsText;\n }",
"public void setURL(String url) {\n\t\tthis.url = url;\n\t}",
"public String url() {\n return this.url;\n }",
"private URL createURL() {\n try {\n Log.d(\"URL\", \"create\");\n String urlString = \"http://cs262.cs.calvin.edu:8084/cs262dCleaningCrew/task/cjp27\";\n return new URL(urlString);\n } catch (Exception e) {\n Toast.makeText(this, getString(R.string.connection_error), Toast.LENGTH_SHORT).show();\n }\n\n return null;\n }",
"Uri getUrl();",
"public void setUrl(String url) {\n\t\tthis.url = url;\n\t}",
"public void setUrl(String url) {\n\t\tthis.url = url;\n\t}",
"public void setUrl(String url) {\n\t\tthis.url = url;\n\t}",
"public void setUrl(String url) {\n\t\tthis.url = url;\n\t}",
"java.net.URL getUrl();",
"public HttpUrl url() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }",
"public String getUrl() {\n return url;\n }"
] | [
"0.7679998",
"0.74702317",
"0.74702317",
"0.74702317",
"0.74702317",
"0.74702317",
"0.74346274",
"0.7410564",
"0.7227975",
"0.72076124",
"0.72063863",
"0.72018105",
"0.7200814",
"0.70676297",
"0.70676297",
"0.70676297",
"0.70676297",
"0.70676297",
"0.70676297",
"0.6969047",
"0.6969047",
"0.6967472",
"0.69430083",
"0.69234717",
"0.69234717",
"0.69234717",
"0.69234717",
"0.69095415",
"0.69092405",
"0.6906097",
"0.6881222",
"0.6881222",
"0.68548757",
"0.68352157",
"0.6830064",
"0.6830064",
"0.6801493",
"0.6782555",
"0.67778957",
"0.6755376",
"0.6752232",
"0.6749742",
"0.6747565",
"0.6747565",
"0.6747565",
"0.6741389",
"0.6716207",
"0.67133486",
"0.6693587",
"0.66857404",
"0.6679136",
"0.6679136",
"0.667673",
"0.667673",
"0.667673",
"0.667673",
"0.667673",
"0.667673",
"0.667673",
"0.667673",
"0.6676551",
"0.6676551",
"0.6676551",
"0.6676551",
"0.6676551",
"0.6676551",
"0.6676551",
"0.66677475",
"0.6654244",
"0.66511697",
"0.6650821",
"0.664685",
"0.6644553",
"0.6644133",
"0.6644133",
"0.6644133",
"0.6644133",
"0.66316694",
"0.6619904",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606",
"0.66181606"
] | 0.0 | -1 |
Here we can do whatever updates we want, then return the content we want rendered. | Object onRefreshTimeZone() {
return request.isXHR() ? timeZone.getBody() : null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void update(){\n\t\tresponse = buildHtml(new ArrayList<HtmlElement>(elements));\n\t}",
"boolean updateContent();",
"public void updateContent() {\n\t\t\n\t\tupdateResidencias();\n\t\tupdateUniversidades();\n\t\t\n\t}",
"public void updateContent(){\r\n\t\tthis.initRecords();\r\n\t\tlist.show(records);\r\n\t}",
"void doRefreshContent();",
"public void refresh() {\n\t\tgetData();\n\t\trender();\n\t}",
"public String doUpdate(HttpServletRequest request,\n HttpServletResponse response) {\n return null;\n }",
"@Override\r\n\tpublic String update() {\n\t\tSystem.out.println(\"updateView.\");\r\n\t\t\r\n\t\t//javax.servlet.http.HttpSession session=request.getSession();\r\n\t\t//javax.servlet.ServletContext application=request.getServletContext();\r\n\t\t\r\n\t\t//String vId=request.getParameter(\"id\");\r\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine bean=headLineService.load(iId);\r\n\t\t\t\r\n\t\t\tif(bean!=null) {\r\n\t\t\t\t\r\n\t\t\t\trequest.put(\"Id\", bean.getId());\r\n\t\t\t\trequest.put(\"lineName\", bean.getLineName());\r\n\t\t\t\trequest.put(\"lineLink\", bean.getLineLink());\r\n\t\t\t\t//request.put(\"lineImg\", bean.getLineImg());\r\n\t\t\t\treturn \"update\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn \"go_preload\";\r\n\t}",
"public abstract String getNewContent();",
"public void update() {\n\n\t\tdisplay();\n\t}",
"String renderHTML();",
"public String update()\r\n {\r\n this.conversation.end();\r\n\r\n try\r\n {\r\n \t \r\n \t createUpdateImage(this.item);\r\n createUpdateSound(this.item);\r\n \t \r\n \t \r\n if (this.id == null)\r\n {\r\n this.entityManager.persist(this.item);\r\n return \"search?faces-redirect=true\";\r\n }\r\n else\r\n {\r\n this.entityManager.merge(this.item);\r\n return \"view?faces-redirect=true&id=\" + this.item.getId();\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\r\n return null;\r\n }\r\n }",
"protected abstract void update(View view, Render render, int pass);",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"protected abstract void update();",
"protected abstract void update();",
"@Override\r\n\tpublic String update() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String update() {\n\t\treturn null;\r\n\t}",
"public CompletionStage<Result> index() {\n\t\treturn calculateResponse().thenApplyAsync(answer -> {\n\t\t\t// uses Http.Context\n\t\t\tctx().flash().put(\"info\", \"Response updated!\");\n\t\t\treturn ok(\"answer was \" + answer);\n\t\t}, httpExecutionContext.current());\n\t}",
"public void update(){\n\t\tsetChanged();\n\t\trender();\n\t\tprintTimer();\n\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\tpublic void update() {}",
"@Override\n\tpublic void update() {}",
"@Override\n\tpublic void update() { }",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"public void update() {}",
"private String renderStatusHtml() {\n\t\tString ret = \"\";\n\t\tif (model.getLastErrorTs()!= null) {\n\t\t\tret += String.format(template1, \n\t\t\t\t\tmodel.getLastErrorTs(), model.getLastErrorMessage());\n\t\t}\n\t\tif (model.getLastCheckTs()!= null) {\n\t\t\tret += String.format(template2,\n\t\t\t\t\tmodel.getLastCheckTs(), model.getLastCheckMessage());\n\t\t}\n\t\tif (model.getLastDownloadTs()!= null) {\n\t\t\tret += String.format(template3,\n\t\t\t\t\tmodel.getLastDownloadTs(), model.getLastDownloadMessage());\n\t\t}\n\t\tif (ret.length() == 0) {\n\t\t\tret = \"<br/><em>There are no updates to report yet</em><br>\";\n\t\t}\n\t\treturn ret;\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\r\n\t}",
"void updateView();",
"void updateView();",
"@Override\r\n\tpublic void update() {\n\t}",
"@Override\r\n\tpublic void update() {\n\t}",
"private void updateContent() {\n imageLoading.setVisibility(View.VISIBLE);\n content.setText(ContentFactory.pages.get(currentPage).getContent());\n title.setText(ContentFactory.pages.get(currentPage).getTitle());\n\n Picasso picasso = new Picasso.Builder(getApplicationContext()).listener(new Picasso.Listener() {\n\n @Override\n public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {\n if (exception instanceof IOException)\n picasso.load(R.drawable.missingimage).fit().centerCrop().into(image);\n }\n\n }).build();\n\n picasso.load(ContentFactory.pages.get(currentPage).getImageURL()).fit().centerCrop().into(image, new Callback() {\n @Override\n public void onSuccess() {\n imageLoading.setVisibility(View.INVISIBLE);\n }\n\n @Override\n public void onError() {\n imageLoading.setVisibility(View.INVISIBLE);\n }\n });\n\n }",
"protected void rerender() {\n\t\tthis.layout.render(inventory);\n\t}",
"public String update() throws Exception {\r\n\t\t\r\n\t\t//content spot entity\r\n\t\tSpotBean spotBean = new SpotBean();\r\n\t\tspotBean.setId(this.getContentSpot().getId());\r\n\t\tspotBean = contentSpotService.load(spotBean);\r\n\t\t\r\n\t\tContentSpot contentSpot = spotBean.getContentSpot();\r\n\t\t\r\n\t\t//configure product list attribute\r\n\t\tcontentSpot.setProducts(this.extractProducts());\r\n\t\tcontentSpot.setContentName(this.getContentSpot().getContentName());\r\n\t\tcontentSpot.setContentDescription(this.getContentSpot().getContentDescription());\r\n\t\tcontentSpot.setTextContent(this.getContentSpot().getTextContent());\r\n\t\tcontentSpot.setIsContentText(this.getContentSpot().getIsContentText());\r\n\t\t\r\n\t\treturn update(spotBean);\r\n\t}",
"@Override\r\n\tpublic void update() {\r\n\r\n\t}",
"public String dataResult() {\r\n\r\n final String theRows = this.getParam(\"rows\");\r\n final String thePage = this.getParam(\"page\");\r\n final String theSortBy = this.getParam(\"sidx\");\r\n final String theSortType = this.getParam(\"sord\");\r\n\r\n this.extractItems();\r\n\r\n // Remove all items update and add the update version.\r\n if (this.addAdded()) {\r\n Set < String > keySet = this.updatedGroups.keySet();\r\n List < Sortable > sortables = this.storedData.getListOfSortable();\r\n for (String key : keySet) {\r\n Iterator < Sortable > itSortable = sortables.iterator();\r\n boolean findItem = false;\r\n while (itSortable.hasNext() && !findItem) {\r\n Subject aSubject = (Subject) itSortable.next();\r\n if (aSubject.getId().equals(key)) {\r\n this.storedData.delRowDataResult(aSubject);\r\n this.storedData.addRowDataResult(this.updatedGroups.get(key));\r\n findItem = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.storedData.setIsExistingAddedItem(this.getIsExistAddedItems());\r\n this.storedData.setNbResultDisplay(theRows);\r\n this.storedData.setCurrentPage(thePage);\r\n\r\n TableData tableData = TableDataFactory.populate(this.storedData, this.sortableRowDataWrapper, theSortBy,\r\n theSortType);\r\n\r\n return this.xmlProducerWrapper.wrap(TableDataFactory.getProducer(tableData));\r\n }",
"@Override\n\tpublic void update() {\n\t}",
"@Override\n\tpublic void update() {\n\t}",
"@Override\n\tpublic void update() {\n\t}",
"@Override\n public void update() {\n }",
"@Override\n public void update() {\n \n }",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\tfireContentsChanged(this, 0, getSize());\n }",
"public void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"String getUpdated();",
"protected void render(){}",
"public void update() {\n\t\tthis.editorView.update();\n\t}",
"@Override\r\n\tpublic void update() {\n\r\n\t}",
"@Override\r\n\tpublic void update() {\n\r\n\t}",
"protected abstract void update();",
"@Override\n\tpublic void updateGraphicalContent(Engine en) {\n\t\t\n\t}",
"public void refresh() { \r\n FacesContext context = FacesContext.getCurrentInstance(); \r\n Application application = context.getApplication(); \r\n ViewHandler viewHandler = application.getViewHandler(); \r\n UIViewRoot viewRoot = viewHandler.createView(context, context.getViewRoot().getViewId()); \r\n context.setViewRoot(viewRoot); \r\n context.renderResponse(); \r\n }",
"public void update() {\n }",
"public void update() {\r\n\t\t\r\n\t}",
"public abstract void refreshing();",
"private void update(VelocityContext context, String templateName)\n {\n long start = System.currentTimeMillis();\n long merged = 0;\n \n StringWriter sw = new StringWriter();\n try\n {\n final Template template = velocity.getTemplate(templateName, \"UTF-8\");\n template.merge(context, sw);\n merged = System.currentTimeMillis() - start;\n }\n catch (Exception e)\n {\n Utils.logError(\"Error while loading template\", e, true);\n return;\n }\n \n browser.setText(sw.toString());\n long displayed = System.currentTimeMillis() - start - merged;\n \n LoggerFactory.getLogger(DocumentList.class).debug(\n String.format(Locale.ENGLISH, \n \"Velocity [rendering: %.2f, display: %.2f]\",\n merged / 1000.0,\n displayed / 1000.0));\n }",
"@Override\n public void update() {\n }",
"@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}",
"@Override\n\tpublic String getResponse() {\n\n\t\tString[] css = { Resource.CSS_COMMON, Resource.CSS_HEADER, Resource.CSS_CARD, Resource.CSS_TITLE_BANNER,\n\t\t\t\tResource.CSS_MODAL_IMAGE, Resource.CSS_BUTTON, Resource.CSS_FORMS};\n\t\tString[] js = { Resource.JS_HEADER, Resource.JS_FORMS };\n\n\t\tm.addHead(css, js, \"View Window\");\n\n\t\tm.ln(\"<body>\");\n\t\tm.addNavbar(NavbarItem.Sandpit, requestInfo);\n\n\t\tm.ln(\"<script>\");\n\t\tm.ln(\"function updateClientWidth() {\");\n\t\tm.ln(\"\tvar element = document.getElementById('client-width');\");\n\t\tm.ln(\"\telement.innerHTML = document.documentElement.clientWidth;\");\n\t\tm.ln(\"}\");\n\n\t\tm.ln(\"function updateInnerWidth() {\");\n\t\tm.ln(\"\tvar element = document.getElementById('inner-width');\");\n\t\tm.ln(\"\telement.innerHTML = window.innerWidth;\");\n\t\tm.ln(\"}\");\n\n\t\tm.ln(\"function updateClientHeight() {\");\n\t\tm.ln(\"\tvar element = document.getElementById('client-height');\");\n\t\tm.ln(\"\telement.innerHTML = document.documentElement.clientHeight;\");\n\t\tm.ln(\"}\");\n\n\t\tm.ln(\"function updateInnerHeight() {\");\n\t\tm.ln(\"\tvar element = document.getElementById('inner-height');\");\n\t\tm.ln(\"\telement.innerHTML = window.innerHeight;\");\n\t\tm.ln(\"}\");\n\n\t\tm.ln(\"function updateAll() {\");\n\t\tm.ln(\"\tupdateClientWidth();\");\n\t\tm.ln(\"\tupdateInnerWidth();\");\n\t\tm.ln(\"\tupdateClientHeight();\");\n\t\tm.ln(\"\tupdateInnerHeight();\");\n\t\tm.ln(\"}\");\n\t\tm.ln(\"</script>\");\n\n\n\t\tm.ln(\"<style>\");\n\t\tm.ln(\"#hold {\");\n\t\tm.ln(\"position: fixed;\");\n\t\tm.ln(\"background-color: powderblue;\");\n\t\tm.ln(\"left: 0;\");\n\t\tm.ln(\"}\");\n\n\t\tm.ln(\".green { background-color: lightgreen; }\");\n\t\tm.ln(\"</style>\");\n\n\t\tm.ln(\"<div class=\\\"common-content\\\">\");\n\t\tm.ln(\"<div class=\\\"card\\\">\");\n\n\t\tm.ln(\"<br><br><br>\");\n\t\tm.ln(\"<p><i>On Chrome for Android: you cannot interact with the bottom of the page when page is displayed through iframe. \"\n\t\t\t\t+ \"When you scroll down the innerHeight becomes bigger than clientHeight as the URL bar is hidden.</i></p><br>\");\n\n\t\tm.ln(\"<div id='hold'>\");\n\t\tm.ln(\"<p>document.documentElement.clientWidth = <b id='client-width'></b>\");\n\t\tm.ln(\"<button onclick='updateClientWidth()'>update</button></p>\");\n\n\t\tm.ln(\"<p>window.innerWidth = <b id='inner-width'></b>\");\n\t\tm.ln(\"<button onclick='updateInnerWidth()'>update</button></p>\");\n\n\t\tm.ln(\"<p>document.documentElement.clientHeight = <b id='client-height'></b>\");\n\t\tm.ln(\"<button onclick='updateClientHeight()'>update</button></p>\");\n\n\t\tm.ln(\"<p>window.innerHeight = <b id='inner-height'></b>\");\n\t\tm.ln(\"<button onclick='updateInnerHeight()'>update</button></p>\");\n\n\t\tm.ln(\"<p>Update all: \");\n\t\tm.ln(\"<button onclick='updateAll()'>update all</button></p>\");\n\t\tm.ln(\"</div>\"); // hold\n\n\t\tfor (int i = 0; i < 64; i ++) {\n\t\t\tm.ln(\"<br>line \" + i);\n\t\t}\n\n\t\tm.ln(\"</div>\"); // card\n\t\tm.ln(\"</div>\"); //common-content\n\n\t\tm.ln(\"<button onclick='this.classList.toggle(\\\"green\\\");'>----- Can press? -----</button><b style='float:right'>----- Can select? -----</b>\");\n\t\tm.ln(\"</body>\");\n\t\tm.ln(\"</html>\");\n\n\t\treturn m.p.toString();\n\t}",
"public cn.bran.japid.template.RenderResult render() {\n\t\ttry {super.layout();} catch (RuntimeException __e) { super.handleException(__e);} // line 0, japidviews/Application/photo/Story.html\n\t\treturn getRenderResult();\n\t}",
"public ResponseContent(boolean useWrapper, MailServerConnection c) {\n\t\tthis.useHtmlWrapper = useWrapper;\n\t\tthis.mainConnection = c;\n\t\ttry {\n\t\t\tBufferedReader r = new BufferedReader(new FileReader(\"layout/templateHeader.html\"));\n\t\t\tString l;\n\t\t\twhile((l = r.readLine()) != null) htmlHeader += l;\n\t\t\tr.close();\n\t\t\tr = new BufferedReader(new FileReader(\"layout/templateFooter.html\"));\n\t\t\twhile((l = r.readLine()) != null) htmlFooter += l;\n\t\t\tr.close();\n\t\t} \n\t\tcatch (IOException e) {}\n\t\t\n\t}",
"public void update();",
"public void update();",
"public void update();",
"public void update();",
"public void update();",
"public void update();",
"public void update();",
"private void updateViews() {\n titleTextView.setText(currentVolume.getTitle());\n descTextView.setText(Html.fromHtml(currentVolume.getDesc(), Html.FROM_HTML_MODE_COMPACT));\n authorsTextView.setText(currentVolume.getAuthors());\n\n retrieveImage();\n }",
"private void updateContent() {\n if (product != null) {\n etProductName.setText(product.getName());\n etPrice.setText(product.getPrice().toString());\n }\n }",
"private String renderBody() {\n return \"\";\n }",
"private void render() {\n\n StateManager.getState().render();\n }",
"public void updateData() {}"
] | [
"0.6733522",
"0.6660898",
"0.6000053",
"0.59437567",
"0.58118665",
"0.57538635",
"0.5749228",
"0.5715857",
"0.5711775",
"0.5695889",
"0.56688035",
"0.56341946",
"0.5619112",
"0.5616273",
"0.5614703",
"0.5614703",
"0.5606521",
"0.5606521",
"0.55918163",
"0.557186",
"0.55527204",
"0.55527204",
"0.55527204",
"0.5519947",
"0.5519947",
"0.5517073",
"0.55018497",
"0.55018497",
"0.5499809",
"0.54807246",
"0.54673845",
"0.54673845",
"0.54673845",
"0.54673845",
"0.54673845",
"0.54614836",
"0.54577863",
"0.54577863",
"0.5434506",
"0.5434506",
"0.5421279",
"0.542087",
"0.540964",
"0.5404265",
"0.5391341",
"0.5382849",
"0.5382849",
"0.5382849",
"0.5358926",
"0.5355292",
"0.53541774",
"0.53541774",
"0.53541774",
"0.53541774",
"0.53541774",
"0.53541774",
"0.53460014",
"0.53460014",
"0.53460014",
"0.53460014",
"0.5310875",
"0.5308627",
"0.5308307",
"0.5308307",
"0.5308307",
"0.5308307",
"0.5308307",
"0.5308307",
"0.5308307",
"0.5308307",
"0.5308307",
"0.5308307",
"0.5305187",
"0.53048694",
"0.53042525",
"0.5298426",
"0.5298426",
"0.5297571",
"0.52926886",
"0.52894735",
"0.5273202",
"0.5270817",
"0.5266975",
"0.52577066",
"0.5254677",
"0.5248421",
"0.524688",
"0.52467936",
"0.52357084",
"0.5228293",
"0.5228293",
"0.5228293",
"0.5228293",
"0.5228293",
"0.5228293",
"0.5228293",
"0.52260226",
"0.51929855",
"0.51806873",
"0.5172617",
"0.516804"
] | 0.0 | -1 |
close ChromeDriver and browser | @After
public void end(){
driver.close();
driver.quit();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void close() {\n seleniumDriver.close();\n }",
"public void closeBrowser(){\n\t driver.close();\n\t \t }",
"public void close() {\r\n driver.quit();\r\n }",
"public static void browserClose() {\r\n\t// Make sure we shut everything down to avoid memory leaks\r\n\tdriver.close();\r\n\tdriver.quit();\r\n\tdriver = null;\r\n}",
"public void closeBrowser(){\n driver.quit();\n }",
"@AfterTest\n\tpublic void closeBrowser() {\n\t\tdriver.close();\n\t}",
"public void closeDriver() {\n driver.quit();\n }",
"private void close() throws Exception {\n browser.getDriver().close();\n }",
"public void closeAllBrowsers() {\n\n driver.quit();\n\n\n }",
"public void close()\n {\n driver.close();\n }",
"public void closeAllBrowser(){\r\n\tdriver.quit();\t\r\n\t}",
"public void close() {\n if (driver.get() != null) {\n driver.get().quit();\n driver.set(null);\n }\n }",
"public void closeBrowserSession() {\n\t\tdriver.quit();\n\t}",
"public void closeDriver() {\r\n\t\tdriver.close();\r\n\t\tdriver.quit();\r\n\t\tlogger.info(\"Closing Selenium initiallised browser.\");\r\n\t}",
"public static void closeDriver() {\n driver.remove();\n }",
"public void closeDriver(){\n\t\tdriver.quit();\n\t\tlogger.info(\"End of Execution\");\n\t}",
"public static void closeBrowser(WebDriver driver)\r\n\t{\r\n\t\tdriver.close();\r\n\t}",
"public void quitDriver() {\n webDriver.quit();\n webDriver = null;\n }",
"@Test (priority = 5)\n\t@Then(\"^Close browser$\")\n\tpublic void close_browser() throws Throwable {\n\t\t\n\t\tobjDriver.close();\n\t\tobjDriver.quit();\n\t\t\n\t}",
"public static void main(String[] args) throws Exception{\n\n WebDriverManager.chromedriver().setup();\n\n WebDriver driver = new ChromeDriver();\n\n driver.get(\"http://practice.cybertekschool.com/open_new_tab\");\n\n Thread.sleep(4000);\n\n //driver.close(); //expected to close the original one\n driver.quit(); //all window will be closed\n\n\n\n\n }",
"public static void closeBrowser(){\n if(CHOSEN_BROWSER.equals(FIREFOX)) {\n if(driver != null) {\n driver.quit();\n return;\n }\n return;\n }\n if (driver != null){\n driver.close();\n driver.quit();\n }\n }",
"@AfterClass\n\tpublic void closeBrowser(){\n\t\tdriver.quit();\n\t}",
"@AfterClass\n public void closeBrowser() throws IOException {\n driver.quit();\n }",
"public static void stopDriver() {\n\t\t//Stoping instace of webdriver\n\t\tappDriver.close();\n\t\t}",
"public void closeAllBrowsers() {\r\n\t\ttry {\r\n\t\t\tif (driver != null) {\r\n\t\t\t\tdriver.quit();\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}",
"@After\n public void tearDown () {\n // driver.quit(); // for chromedriver\n driver.close();\n }",
"@AfterTest\n\tpublic void CloseWindow() {\n\t\t//driver.close();\n\t}",
"public static void CloseBrowser() {\n\t\tBrowser.Driver.quit();\n\t}",
"@AfterSuite (alwaysRun = true)\n public static void closeBrowser() {\n report.endTest(test);\n //line below will flush the report\n report.flush();\n\n\n //line below will open the report\n driver.get(\"C:\\\\Users\\\\zakir\\\\Documents\\\\MyMavenProject\\\\\" + reportPath);\n\n //line below will close the report\n //report.close();\n\n\n // driver.quit();\n }",
"public void quitBrowser(){\n\t\t driver.quit();\n\t }",
"public static void closeBrowser() {\n\t\tLOG.info(\"Closing current browser window.\");\n\t\tConstants.driver.close();\n\t\tLOG.info(\"Closed current browser window.\");\n\n\t}",
"public void closeWindow() throws Exception {\n\t\t\tthis.driver.close();\r\n\t\t}",
"public static void quitDriver() {\t\n\t\t//Quitting all instace of webdriver\n\t\tappDriver.quit();\n\t\t}",
"public void shutdown() {\n drivers.stream().filter(ClosingAwareWebDriver::isAlive)\n .forEach(ClosingAwareWebDriver::forceShutdown);\n }",
"@AfterSuite\n\tpublic void closeBrowser(){\n\t\t\n\t\ttry{\n\t\t\tdriver.close();\n\t\t\tThread.sleep(5000);\n\t\t\t//MailService_API.zip(System.getProperty(\"user.dir\")+\"\\\\test-output\\\\Hybrid Security Telepath Test Suite\");\n\t\t\t//MailService_API.Email(config.getProperty(\"sendTo\"), config.getProperty(\"sendCC\"), config.getProperty(\"sendBCC\"), config.getProperty(\"sendMailFrom\"), config.getProperty(\"sendMailPassword\"));\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"@When(\"^user should close the browsers$\")\n\tpublic void user_should_close_the_browsers() throws Throwable {\n\t\tdriver.quit();\n\t}",
"@After\n public void closeBrowser(){\n\n browserManager.setcloseBrowser();// calling browser method to close the browser\n }",
"public void BrowserQuit() {\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:- The Browser should be closed\");\r\n\t\ttry{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\r\n\t\t\tdriver.quit();\r\n\t\t\tSystem.out.println(\"Browser Closed\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-The Browser is closed\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- No Browser is opened currently\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public void closeKiosk() {\n\t\tdriver.close();\n\t}",
"@AfterMethod\n\tpublic void quitBrowser(){\n\t\tbrowser.closeBrowser(driver);\n\t}",
"public static void quitBrowser() {\r\n\t\ttry {\r\n\t\t\t// Thread.sleep(3000);\r\n\t\t\tdriver.quit();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Driver instance does not exist \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void closeWindow() {\n\t\tdriver.close();\n\t\tdriver.switchTo().window(winHandleBefore);\n\t}",
"@AfterMethod\r\n\tpublic void closeapp()\r\n\t{\n\t\tdriver.quit();\r\n\t}",
"public void quitBrowsers() {\n\n\t\tgetDriver().quit();\n\t}",
"@AfterClass(alwaysRun = true)\n public static void cleanup() {\n try {\n driver.close();\n driver.quit();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void closeDriver(){\n if(driverPool.get()!=null){//to be able to creat our good flow,when we use driver quit session will killed if driver is not there\n driverPool.get().quit();\n driverPool.remove();\n }\n }",
"@AfterAll\n\tpublic static void destroy() {\n\t\tif (isSingleTest) {\n\t\t\tlogger.debug(\"Closing ChromeDriver for single test class.\");\n\t\t\tIntegrationUITestListener.stopWebDriver();\n\t\t}\n\t}",
"public static void closeBrowser()\n\t{\n\t\t\tdriver.quit();\n\t\t\tBaseUI.logger.log(Status.INFO,ReadPropertiesFile.getBrowser()+\" is closed Successfully \");\n\t\t\treport.flush();\n\t\t\tlog.info(\"Closing Browser \\n\");\n\t}",
"void closeDriver()\n\t{\t\t\n\t\tif(getDriver()!=null)\n\t\t{ \t\n\t\t\tgetDriver().quit();\n\t\t\tsetDriver(null);\n\t\t}\n\t}",
"@AfterClass\n public static void destroyDriver() {\n driver.quit();\n driver = null;\n }",
"private static void closeBrowser() {\n System.out.println(\"Browser closed\");}",
"public void quitDriver(){\n instanceOfDriverFactory=null;\n appiumDriver.quit();\n }",
"@AfterStories\r\n\tpublic final void afterStories() {\r\n\t\tchromeDriver.quit();\r\n\t\tfirefoxDriver.close();\r\n\t\tinternetExplorerDriver.quit();\r\n\t}",
"@After\n public void tearDown() {\n\n // close window\n driver.quit();\n }",
"public static void quitDriver() {\n driverThreadLocal.get().quit();\n }",
"@Test(priority = 1)\n public void teardawn()\n {\n driver.close();\n }",
"public static void close_browser(WebDriver driver) throws CheetahException {\n\t\ttry {\n\t\t\tCheetahEngine.getDriverInstance().close();\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}",
"public static void closeAllBrowser() {\n\t\tLOG.info(\"Closing all browser window.\");\n\t\tConstants.driver.quit();\n\t\tLOG.info(\"Closed all browser window.\");\n\t}",
"@Test\n public void test1(){\n\n WebDriverManager.chromedriver().setup();\n WebDriver driver2 = new ChromeDriver();\n\n\n\n driver2.get(url);\n bekle(2000);\n driver2.quit();\n\n\n\n }",
"@After\n public void tearDown() throws Exception {\n driver.close();\n }",
"@After\n public void endingTests() throws Exception {\n driver.quit();\n }",
"@AfterMethod(description = \"close driver after test\")\n public void tearDown()\n {\n driver.close();\n }",
"public static void CloseWindow(WebDriver driver){\n\t\tdriver.get(\"http://www.popuptest.com/popuptest1.html\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tThread.sleep(5000);\r\n\t\t\r\n\t\t\r\n\t\t\t// Close\r\n\t\t\tdriver.close();\r\n\t\t\r\n\t\t\t\r\n\t\t\tThread.sleep(10000);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// Get all open windows from driver\r\n\t\t\tSet<String> windows = driver.getWindowHandles();\r\n\t\t\tString windowChild;\r\n\t\t\t\r\n\t\t\t// for each window, perform a switch\r\n\t\t\tfor(String window : windows){\r\n\t\t\t\twindowChild = window;\r\n\t\t\t\tdriver.switchTo().window(windowChild);\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tThread.sleep(5000);\r\n\t\t\t\r\n\t\t\tdriver.close();\r\n\t\t\t\r\n\t\t\t// quit will close all browsers from driver\r\n\t\t\tdriver.quit();\r\n\t\t\r\n\t\t\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@AfterMethod(alwaysRun = true)\n public static void tearDown() {\n try {\n if (driver != null) {\n try {\n driver.quit();\n } catch (Exception x) {\n Log.error(\"Did not manage to quit driver object cleanly: \" + x.getMessage());\n }\n }\n } catch (Exception x) {\n Log.error(\"Error Quitting Browser: \" + x.getMessage());\n Log.error(\"Killing Selenium!\");\n Runtime.getRuntime().halt(1);\n }\n }",
"@AfterAll\n static void afterAll() {\n Selenide.close();\n }",
"@AfterClass(description = \"After class: closing browser\")\n public void quitBrowser()\n {\n HTMLReport htmlReport = new HTMLReport();\n htmlReport.log(\"STARTING AfterClass\");\n htmlReport.logINFO(\"The browser is quit\");\n driver.quit();\n htmlReport.logINFO(\"The end of test reporting\");\n reports.endTest(test);\n htmlReport.logINFO(\"Saving all logs to file\");\n reports.flush();\n }",
"@AfterMethod(alwaysRun = true)\n public static void quitWebDriver() {\n try {\n logger.trace(\"Quit WebDriver\");\n driverThread.get().quitDriver();\n } catch (Exception ex) {\n logger.error(\"Unable to quit WebDriver\", ex);\n }\n }",
"@AfterMethod\n\tpublic void tearDown()\n\t{\n\t\tdriver.close();\n\t\tdriver.quit();\n\t}",
"public static void teardown() {\n\t\tdriver.quit();\n\t}",
"public void closeWindow() {\n\t\tgetDriver().close();\n\n\t}",
"@AfterSuite\n\n public void quitDriver() {\n driver.quit();\n\n }",
"@AfterTest\n public void tearDown() {\n Log.endLog(\"Test is ending!\");\n driver.close();\n }",
"public static void stop(WebDriver driver)\n\t{\n\t\tif (driver != null)\n\t\t{\n\t\t\tdriver.quit();\n\t\t\t\n\t\t\tdriver = null;\n\t\t}\n\t}",
"public static void quit() throws Exception\r\n\t{\r\n\t\t//Close IronWasp Connection\r\n\t\tString browser = FilesAndFolders.getPropValue(\"driverName\");\r\n\t\tif (browser.contentEquals(\"firefoxIronWasp\"))\r\n\t\t{\r\n\t\t\tIronWasp.workflowEnd();\t\t\t\r\n\t\t}\r\n\r\n\t\t// Closing Browser instance\r\n\t\tdriver.quit(); \r\n\t}",
"@After\n\tpublic void teardown() {\n\t\tthis.driver.quit();\n\t}",
"@Then(\"^Application should get closed$\")\n\tpublic void application_should_get_closed() throws Throwable {\n\t driver.quit();\n\t}",
"@After\n public void tearDown() {\n driver.quit();\n }",
"@AfterMethod\r\n\t\tpublic void tearDown(){\r\n\t\t\t\r\n\t\t \r\n\t\t\tdriver.close();\r\n\t\t\tdriver.quit();\r\n\t\t\t\t\r\n\t\t\t}",
"@AfterMethod\n public void closeBrowser() throws IOException, WriteException {\n\n writableFile.write();\n writableFile.close();\n readableFile.close();\n driver.quit();\n }",
"@AfterClass\n\tpublic void teardown()\n\t{\n\t\tdriver.close();\n\t}",
"@AfterMethod\n public void tearDown(ITestResult result) throws Exception {\n driver.quit();\n }",
"public void removeDriver(WebDriver driver) {\r\n\t\tdriver.quit();\r\n\t}",
"@AfterClass\r\n\tpublic void windUp()\r\n\t{\r\n\t\t\r\n\t\tdriver.close();\r\n\t}",
"@AfterMethod\n public void teardown(){\n driver.quit();\n }",
"public void teardown() {\n LOGGER.info(\"Shutting down driver\");\n driver.quit();\n }",
"@Then(\"^user should able to login to system$\")\npublic void user_should_able_to_login() throws Throwable {\n driver.close();\n}",
"@AfterClass\n\tpublic static void tearDown() {\n\t\tdriver.quit();\n\t}",
"@AfterTest\n\tpublic void teardown()\n\t{\n\t\t\n\t\tdriver.close();\n\t}",
"@AfterMethod(alwaysRun = true)\n\tprotected void afterMethod() throws Exception {\n\t\t// Close any secondary windows\n\t\ttry {\n\t\t\tcloseAllSecondaryWindows();\n\t\t} catch (Exception e1) {\n\t\t\t// do nothing\n\t\t}\n\t\tReporter.setCurrentTestResult(null);\n\t\tdismissAlert(); // Dismiss any alert that may be open\n\t\t// Close Browser\n\t\ttry {\n\t\t\tgetDriver().close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Quit Driver\n\t\ttry {\n\t\t\tgetDriver().quit();\n\t\t} catch (Exception e) {\n\t\t\t// do nothing\n\t\t}\n\t\t// ** Docker container would close here\n\t\t// stopDocker();\n\t}",
"@After\n\t\tpublic void af() {\n\t\t\tdriver.quit();\n\t\t}",
"public static void main(String[] args) {\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.get(\"https://www.naukri.com/\");\t\r\n\t\t//\tdriver.close(); // close only parent\r\n\t\tSet<String> allWHS=driver.getWindowHandles();\r\n\t\t// To Close all child except parent\r\n\t\t/*for(String wh:allWHS)\r\n\t\t{\r\n\t\t\tSystem.out.println(driver.getTitle());\r\n\t\t\tdriver.switchTo().window(wh);\r\n\t\t\tif((driver.getTitle()).equals(\"Jobs - Recruitment - Job Search - Employment - Job Vacancies - Naukri.com\"))\r\n\t\t\t{ }\r\n\t\t\telse\r\n\t\t\t\tdriver.close();\r\n\t\t} */ \r\n\t\r\n\t/*\t\r\n\t\tfor(String wh:allWHS)\r\n\t\t{\r\n\t\t\tdriver.switchTo().window(wh); \r\n\t\t\tSystem.out.println(driver.getTitle());\r\n\t\t\tdriver.close(); // one by one close all\r\n\t\t} */\r\n\t}",
"@After\n\tpublic void tearDown() {\n\t\t//quits the browser after everything is done\n\t\tdriver.quit();\n\t}",
"public void close() throws FileSystemException {\n\t\tlogger.info(\"Closing \" + this.getClass().getSimpleName());\n\t\tWebDriver wd = Connection.getDriver();\n\t\twd.close();\n\t\tif (callersWindowHandle != null) {\n\t\t\twd.switchTo().window(callersWindowHandle);\n\t\t}\n\t}",
"@AfterMethod\npublic void tearDown() {\n\tdriver.quit();\n\t\n}",
"@AfterMethod (alwaysRun = true)\r\n\tpublic void quitDriver() throws Exception{\r\n\r\n\t\ttry {\r\n\r\n\t\t\tif (driver != null)//Checks if driver is not equals to null\r\n\t\t\t\tdriver.quit();//Quits the driver\r\n\r\n\t\t\tLog.endTestCase();//Ends the test case\r\n\r\n\t\t}//End try\r\n\r\n\t\tcatch(Exception e){\r\n\t\t\tthrow e;\r\n\t\t}//End Catch\r\n\t}",
"@AfterMethod (alwaysRun = true)\r\n\tpublic void quitDriver() throws Exception{\r\n\r\n\t\ttry {\r\n\r\n\t\t\tif (driver != null)//Checks if driver is not equals to null\r\n\t\t\t\tdriver.quit();//Quits the driver\r\n\r\n\t\t\tLog.endTestCase();//Ends the test case\r\n\r\n\t\t}//End try\r\n\r\n\t\tcatch(Exception e){\r\n\t\t\tthrow e;\r\n\t\t}//End Catch\r\n\t}",
"public static void chromeTest() throws Exception{\n driver = BrowserFactory.getDriver(\"chrome\");\n Thread.sleep(2000);\n\n driver.get(\"http://google.com\");\n Thread.sleep(3000);\n String title = driver.getTitle();\n driver.navigate().to(\"https://etsy.com\");\n Thread.sleep(2000);\n String title2 = driver.getTitle();\n driver.navigate().back();\n title = driver.getTitle();\n Thread.sleep(2000);\n driver.navigate().to(\"https://etsy.com\");\n title2 = driver.getTitle();\n driver.quit();\n }",
"public static void tearDown() {\n\t\tif (driver != null) {\n\t\t\tdriver.quit();\n\t\t}\n\t}",
"@AfterMethod //Test cases to be independenent with each other \n\tpublic void tearDown() {\n\t\tdriver.quit(); //after each test case---- close the browser\n\t}",
"public void terminateDriver() {\n }"
] | [
"0.81929517",
"0.8134462",
"0.79234535",
"0.7890478",
"0.7880224",
"0.78547156",
"0.7854042",
"0.7816409",
"0.7743856",
"0.77346927",
"0.7703222",
"0.76994085",
"0.75907016",
"0.7517066",
"0.75109327",
"0.74209315",
"0.7397938",
"0.738393",
"0.7342862",
"0.733806",
"0.73021233",
"0.72816944",
"0.72415835",
"0.72371477",
"0.7209833",
"0.71501005",
"0.7132991",
"0.7115409",
"0.70467913",
"0.7038614",
"0.7036852",
"0.7033518",
"0.70307523",
"0.70151955",
"0.69945085",
"0.69848055",
"0.6979897",
"0.69384587",
"0.69136655",
"0.69096464",
"0.68774915",
"0.68737406",
"0.6830213",
"0.6820611",
"0.6793376",
"0.6770912",
"0.67628413",
"0.6761341",
"0.6688827",
"0.66799134",
"0.6673284",
"0.6666601",
"0.6663959",
"0.665187",
"0.664265",
"0.6621065",
"0.65970236",
"0.6559343",
"0.6549184",
"0.6547167",
"0.65308565",
"0.65299934",
"0.6521121",
"0.6469818",
"0.6457869",
"0.6432677",
"0.64300984",
"0.6410114",
"0.6351222",
"0.630967",
"0.6299514",
"0.6278992",
"0.6268219",
"0.6262003",
"0.624592",
"0.62267125",
"0.6224478",
"0.6224037",
"0.62183917",
"0.61980194",
"0.6127799",
"0.6119863",
"0.610767",
"0.60948837",
"0.6094773",
"0.6078395",
"0.6075335",
"0.60719717",
"0.6067827",
"0.605118",
"0.6043844",
"0.60411304",
"0.60323185",
"0.60313135",
"0.6030049",
"0.6030049",
"0.60122454",
"0.60071546",
"0.6006093",
"0.59897196"
] | 0.72715336 | 22 |
open Viewed Goods in Personal Area | @When("^Очистить список просмотренных товаров$")
public void clearGoodsInViewedGoods() {
PersonalPage personalPage = new PersonalPage(driver);
personalPage.searchAndOpenByProfileList("Просмотренные товары");
//check Viewed Products
//push button DeleteAll in Viewed Goods
if (personalPage.confirmationOpenProfile("recent-goods-header")) {
personalPage.clearAll();
personalPage.confirmationOpenProfile("recent-goods-header");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void viewPageClicked() {\n //--\n //-- WRITE YOUR CODE HERE!\n //--\n try{\n Desktop d = Desktop.getDesktop();\n d.browse(new URI(itemView.getItem().getURL()));\n }catch(Exception e){\n e.printStackTrace();\n }\n\n showMessage(\"View clicked!\");\n }",
"public void Open() {\r\n\t click();\r\n\t }",
"void openGadget(GadgetMetadata gadgetMetadata, ContainerView view);",
"public void openProfile(){\n\t\t\n\t\tclickElement(profile_L, driver);\n\t}",
"private void launchEditVolPage(View view, Volunteer thisGuy){\n final Intent launchEdit = new Intent(manageVolunteers.this,ManagerEditVolunteer.class);\n\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"thisGuy\", thisGuy);\n launchEdit.putExtra(\"bundle\", bundle);\n startActivity(launchEdit);\n }",
"void gotoEditProfile();",
"public void viewInfo(View view){\n if(currentBook.ISBN13 != null){//If the data for ISBN has been retrieved\n //Open browser with information\n String bookLink = GOOGLE_BASE_LINK + currentBook.ISBN13;\n Intent browserIntent = new Intent(Intent.ACTION_VIEW);\n browserIntent.setData(Uri.parse(bookLink));\n startActivity(browserIntent);\n }else{\n Toast.makeText(this, \"Book is still loading...\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void openUsagePoints() {\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.findElement(By.id(\"button-1049\")).click();\n }",
"public static void openGiftsIdeasSection() {\n click(GIFTS_TAB_UPPER_MENU);\n }",
"private void toViewBudget(){\n // intent for view budget screen\n Intent viewBudgetScreen = new Intent(this, ViewBudget.class);\n startActivity(viewBudgetScreen);\n }",
"public void openNSE() {\n\t\t\t this.open.getText();\r\n\t\t}",
"boolean openPageInEditMode();",
"@Given(\"^Open Book My Show Website$\")\r\n\tpublic void open_Book_My_Show_Website() {\n\t\twait=new WebDriverWait(driver, 20);\r\n\t\t driver.get(\"https://in.bookmyshow.com\");\r\n\t\t uimap = new UIMap(\"src//test//resources//locators.properties\");\r\n\t}",
"@Override\n public void onClick(View v)\n {\n Intent viewIntent =\n new Intent(\"android.intent.action.VIEW\",\n Uri.parse(\"https://datadiscovery.nlm.nih.gov/Drugs-and-Supplements/Pillbox/crzr-uvwg\"));\n startActivity(viewIntent);\n }",
"@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/privacy\"));\n startActivity(browserIntent);\n }",
"public static void openPlayStoreEntry()\n\t{\n\t\tApp.getInstance().startActivity(new Intent(Intent.ACTION_VIEW)\n\t\t\t\t.setData(Uri.parse(\"market://details?id=\" + General.PKG_MESSENGERAPI+\"&referrer=utm_source%3D\"+App.getInstance().getPackageName()+\"%26utm_medium%3DAPIMethod%26utm_campaign%3DAPICampaign\"))\n\t\t\t\t.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n\t}",
"@Override\n \t\t\t\tpublic void doOpen() {\n \n \t\t\t\t}",
"private void viewPageClicked(ActionEvent event) {\n\n Item tempItem = new Item();\n String itemURL = tempItem.itemURL;\n Desktop dk = Desktop.getDesktop();\n try{\n dk.browse(new java.net.URI(itemURL));\n }catch(IOException | URISyntaxException e){\n System.out.println(\"The URL on file is invalid.\");\n }\n\n showMessage(\"Visiting Item Web Page\");\n\n }",
"public void openPortal(String id){\n\n\n\n\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, ProdDescActivity.class);\n context.startActivity(intent);\n }",
"@Override\n public void onClick(View view) {\n Intent httpIntent = new Intent(Intent.ACTION_VIEW);\n httpIntent.setData(Uri.parse(\"http://bvmengineering.ac.in\"));\n\n startActivity(httpIntent);\n\n }",
"public static void openBooksSection() {\n click(BOOKS_TAB_UPPER_MENU);\n }",
"private void openPermissions(){\n WebDriverHelper.clickElement(seePermissionLvlButton);\n }",
"@Override\n public void onClick(View arg0) {\n ((CreateDocketActivityPart2) activity).openMachineDetails(position);\n }",
"@Override\n public void onClick(View v) {\n Intent rpIntent = new Intent(Intent.ACTION_VIEW);\n // Set the URL to be used.\n rpIntent.setData(Uri.parse(\"http://www.rp.edu.sg\"));\n startActivity(rpIntent);\n }",
"public void openPharmacyPanel(){\n\t\tpanel.setVisible(true);\n\t}",
"public void GoToSurvey(View view) {\n String url = \"https://globalobesity.com.au\";\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));\n }",
"@OnClick(R.id.tvTermsOfUse)\n void termsOfUse()\n {\n UtilsMethods.openBrowser(this, Keys.TERM_OF_USE_URL);\n }",
"private void openDocument(DocumentInfo doc, Model model) {\n Intent intent = new QuickViewIntentBuilder(\n getPackageManager(), getResources(), doc, model).build();\n\n if (intent != null) {\n // TODO: un-work around issue b/24963914. Should be fixed soon.\n try {\n startActivity(intent);\n return;\n } catch (SecurityException e) {\n // Carry on to regular view mode.\n Log.e(TAG, \"Caught security error: \" + e.getLocalizedMessage());\n }\n }\n\n // Fall back to traditional VIEW action...\n intent = new Intent(Intent.ACTION_VIEW);\n intent.setDataAndType(doc.derivedUri, doc.mimeType);\n\n // Downloads has traditionally added the WRITE permission\n // in the TrampolineActivity. Since this behavior is long\n // established, we set the same permission for non-managed files\n // This ensures consistent behavior between the Downloads root\n // and other roots.\n int flags = Intent.FLAG_GRANT_READ_URI_PERMISSION;\n if (doc.isWriteSupported()) {\n flags |= Intent.FLAG_GRANT_WRITE_URI_PERMISSION;\n }\n intent.setFlags(flags);\n\n if (DEBUG && intent.getClipData() != null) {\n Log.d(TAG, \"Starting intent w/ clip data: \" + intent.getClipData());\n }\n\n try {\n startActivity(intent);\n } catch (ActivityNotFoundException e) {\n Snackbars.makeSnackbar(\n this, R.string.toast_no_application, Snackbar.LENGTH_SHORT).show();\n }\n }",
"public void open();",
"public void open();",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent action) {\n\t\t\t\t\tDishDetails.OpenWindow(null);\n\t\t\t\t}",
"public void buyNow(View view) {\n String itemURL = null;\n try {\n itemURL = basic.getString(\"viewItemURL\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n Intent viewIntent = new Intent(\"android.intent.action.VIEW\", Uri.parse(itemURL));\n startActivity(viewIntent);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n\n Intent marketIntent = new Intent(Intent.ACTION_VIEW);\n marketIntent.setData(Uri.parse(\"market://details?id=com.adobe.reader\"));\n// marketIntent.setData(Uri.parse(\"market://details?id=com.infraware.office.link\"));\n startActivity(marketIntent);\n\n }",
"@Override\n public void grindClicked() {\n Uri webpage = Uri.parse(\"http://www.grind-design.com\");\n Intent webIntent = new Intent(Intent.ACTION_VIEW, webpage);\n startActivity(webIntent);\n }",
"private void openURL() {\n webview.loadUrl(\"http://192.168.0.116/webvitool/view/webvitool.php\");\n webview.requestFocus();\n }",
"public void openReserveSeat(){\n Intent intent = new Intent(this, ReserveSeatActivity.class);\n startActivity(intent);\n }",
"@Given(\"^the user Opens the opencart webpage$\")\r\n\tpublic void the_user_Opens_the_opencart_webpage() throws Throwable {\n\t r.web();\r\n\t}",
"@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/services\"));\n startActivity(browserIntent);\n }",
"public void open() {\r\n\t}",
"public InventoryView openEnchanting ( Location location , boolean force ) {\n\t\treturn extract ( handle -> handle.openEnchanting ( location , force ) );\n\t}",
"@Override\n public void onClick(View v) {\n Intent r1page = new Intent(v.getContext(), the_oxford_kitchen.class);\n startActivity(r1page);\n }",
"public void showShelter(View view) throws IOException{\n Intent goShelter = new Intent(this,ShelterInfoActivity.class);\n goShelter.putExtra(\"shelterId\",shelterId);\n startActivity(goShelter);\n }",
"public void requestOpenPose()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToOpen = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE WITH A CANCEL\r\n continueToOpen = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO OPEN A POSE\r\n if (continueToOpen)\r\n {\r\n // GO AHEAD AND PROCEED MAKING A NEW POSE\r\n promptToOpen();\r\n }\r\n }",
"public void clickPolice(View view){\n Intent i = new Intent(this,Police.class);\n startActivity(i);\n }",
"void gotoEditProfile(String fbId);",
"@Override\n public void onClick(View arg0) {\n ((CreateDocketActivityPart2) activity).openPopUpForSpareParts(position);\n }",
"public void onClick(View arg0) {\n\n\t\t\t\tIntent i=new Intent(getApplicationContext(),Community_Vitality.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t case R.id.developer:\n\t openMyApps();\n\t return true;\t \n\t \n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}",
"@FXML\n public void openFolder()\n {\n try\n {\n Desktop.getDesktop().open(nng.getStorePopulation().getParentFile());\n }\n catch (IOException e)\n {\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent ManageApp= new Intent(getBaseContext(),Manage_Appliance.class);\n\t\t\t\tManageApp.putExtras(bundle);\n\t\t\t\tstartActivity(ManageApp);\n\t\t\t}",
"@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL + \"support\");\r\n }",
"public void open()\n {\n }",
"public void open() {\n\t}",
"@Test(priority=3)\n\t\tpublic void HouseAccount_Method_OpenPage() throws Exception\n\t\t{\n\t\t\tdriver.get(Utility.getProperty(\"baseURL\")+Utility.getProperty(\"store_Id\")+\"houseAccount\");\n\t\t\tThread.sleep(5000);\n\t\t\t//Check House Account page opened or not\n\t\t\tif(driver.findElement(By.xpath(\"//a[.='HouseAccount']\")).getText().equalsIgnoreCase(\"HouseAccount\"))\n\t\t\t{\n\t\t\t\ttest.log(LogStatus.PASS,\"House Account page loaded Successfully\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttest.log(LogStatus.FAIL,\"House Account page loaded Failed\");\n\t\t\t}\n\t\t\t\n\t\t}",
"private void openUpdate() {\n\t\tString url = MySoup.getUpdateLink(SITE);\n\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\ti.setData(Uri.parse(url));\n\t\tstartActivity(i);\n\t\tfinish();\n\t}",
"private void open() {\n\t\tdelegate.questionTabOpened(assesmentProxy.getId(),question.getId(),this);\n\t\t\n\t\tif(answersLoaded==false){\n\t\t\tdelegate.twistieOpenQuestionClicked(this);\n\t\t\tanswersLoaded=true;\n\t\t}\n\t\ttwistieOpen.setVisible(false);\n\t\tanswers.setVisible(true);\n\t\ttwistieClose.setVisible(true);\n\t\tanswersVisible=true;\n\t\tdetailsTablePanel.setVisible(true);\n\t\tquestionTable.setClassName(\"questionTable-open\");\n\t}",
"public void clickSP(View view) {\n Intent i = new Intent(this,SP.class);\n startActivity(i);\n }",
"private void showProposalDevelopment(){\r\n try{\r\n \r\n ProposalBaseWindow propFrame = null;\r\n if ( (propFrame = (ProposalBaseWindow)mdiForm.getFrame(\r\n CoeusGuiConstants.PROPOSAL_BASE_FRAME_TITLE))!= null ) {\r\n if( propFrame.isIcon() ){\r\n propFrame.setIcon(false);\r\n }\r\n propFrame.setSelected(true);\r\n return;\r\n }\r\n propFrame = new ProposalBaseWindow(mdiForm );\r\n propFrame.setVisible( true );\r\n }catch(Exception exception){\r\n CoeusOptionPane.showInfoDialog(exception.getMessage());\r\n }\r\n }",
"public int open() {\n\t\tint value = super.open();\n\t\tif (popupCloser == null) {\n\t\t\tpopupCloser = new PopupCloserListener();\n\t\t}\n\t\tpopupCloser.installListeners();\n\t\tProposal p = getSelectedProposal();\n\t\tif (p != null) {\n\t\t\tshowProposalDescription();\n\t\t}\n\t\treturn value;\n\t}",
"public void clickSupermarket(View view){\n Intent i = new Intent(this,Supermarket.class);\n startActivity(i);\n }",
"public InventoryView openWorkbench ( Location location , boolean force ) {\n\t\treturn extract ( handle -> handle.openWorkbench ( location , force ) );\n\t}",
"private void jMenuItem_ShowProspectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ShowProspectActionPerformed\n File fProspect = new File(\"Propsect_Relance.csv\");\n try {\n Desktop.getDesktop().open(fProspect);\n } catch (IOException ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdoOpen();\n\t\t\t}",
"@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }",
"@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }",
"public void openDialogCovidlanding(){\n DialogforCovidImageonlandingpage dialogfortotalIrish = new DialogforCovidImageonlandingpage();\n dialogfortotalIrish.show(getSupportFragmentManager(), \"Covid Info\");\n }",
"@Override\n public void onClick(View view) {\n String url = \"https://ownshopz.com/mobile-360-degree/\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n }",
"private void openView(String viewToOpen)\n throws IOException, InterruptedException, URISyntaxException {\n Parent root = null;\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(viewToOpen + \"/\" + viewToOpen + \".fxml\"));\n root = loader.load();\n\n if (\"view0\".equals(viewToOpen)) {\n view0Controller = loader.getController();\n view0Controller.init(getVmFactory());\n }\n\n Scene s;\n s = new Scene(root);\n primaryStage.setScene(s);\n primaryStage.initStyle(StageStyle.UNDECORATED);\n primaryStage.initStyle(StageStyle.TRANSPARENT);\n primaryStage.show();\n\n // getcounter/iteratorvalue\n\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (yelpObjs != null) {\n\t\t\t\t\tYelpObject obj = yelpObjs.get(mPager.getCurrentItem());\n\t\t\t\t\tstartActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"yelp4:///biz/\" + obj.getBusinessId())));\n\t\t\t\t}\n\t\t\t}",
"public void openSite(View view) {\n Intent toView = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://www.google.com\"));\n startActivity(toView);\n }",
"public void open() {\n\n\t\tresize();\n\t\tgenerateLinks();\n\t\tshowing = true;\n\n\t}",
"@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/\"));\n startActivity(browserIntent);\n }",
"public void openLevels(View view) {\n setViewBackgroundWithoutResettingPadding(view, R.drawable.bkg_button_on);\n\n // Starts the new activity\n Intent intent = new Intent(this, LevelsActivity.class);\n startActivity(intent);\n }",
"public void rate(View view) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(\"market://details?id=com.iven.lfflfeedreader\"));\n startActivity(intent);\n }",
"public void openCapstoneApp(View view) {\n showToast(getString(R.string.capstone));\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\topenInterestDialog();\n\t\t\t}",
"private void openPressed(){\n\t\tJFileChooser fileChooser = new JFileChooser(System.getProperty(\"user.dir\"));\n\t\tFileNameExtensionFilter extentions = new FileNameExtensionFilter(\"SuperCalcSave\", \"scalcsave\");\n\t\tfileChooser.setFileFilter(extentions);\n\t\tint retunedVal = fileChooser.showOpenDialog(this);\n\t\tFile file = null;\n\t\tif(retunedVal == JFileChooser.APPROVE_OPTION){\n\t\t\tfile = fileChooser.getSelectedFile();\n\t\t}\n\t\t//only continue if a file is selected\n\t\tif(file != null){\n\t\t\tSaveFile saveFile = null;\n\t\t\ttry {\n\t\t\t\t//read in file\n\t\t\t\tObjectInputStream input = new ObjectInputStream(new FileInputStream(file));\n\t\t\t\tsaveFile = (SaveFile) input.readObject();\n\t\t\t\tinput.close();\n\t\t\t\tVariable.setList(saveFile.getVariables());\n\t\t\t\tUserFunction.setFunctions(saveFile.getFunctions());\n\t\t\t\tmenuBar.updateFunctions();\n\t\t\t\tSystem.out.println(\"Open Success\");\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"@Override\r\n\t\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\t\t\tWindow.open(result.get(\"description\"), \"description\", result.get(\"description\"));\r\n\r\n\t\t\t\t\t\t}",
"private void open() {\n\t\tint state = fileChooser.showOpenDialog(this);\n\t\tswitch (state) {\n\t\tcase JFileChooser.CANCEL_OPTION:\n\t\t\tbreak;\n\t\tcase JFileChooser.APPROVE_OPTION:\r\n\t\t\tFile file = fileChooser.getSelectedFile();\r\n\t\t\t//System.out.println(\"Getting file...\");\r\n\t\t\ttry {\r\n\t\t\t\tfis = new FileInputStream(file);\r\n\t\t\t\tbyte[] b = new byte[fis.available()];\r\n\t\t\t\tif (fis.read(b) == b.length) {\r\n\t\t\t\t\t//System.out.println(\"File read: \" + file.getName());\r\n\t\t\t\t}\r\n\t\t\t\tdistributable = new Distributable(file.getName(), b);\r\n\t\t\t\tdiscoveryRelay.setDistributable(distributable);\r\n\t\t\t} \r\n\t\t\tcatch (FileNotFoundException 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\tcatch (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}\n\t\t\tbreak;\n\t\tcase JFileChooser.ERROR_OPTION:\n\t\t}\n\t}",
"private void gotoCheckInListView() {\n }",
"@Override\n\tprotected void openPage(PageLocator arg0, Object... arg1) {\n\t\t\n\t}",
"public void openURL(String url)\n {\n getLdtp().generateKeyEvent(\"<command><shift>o\");\n logger.debug(\"Open Office document from URL: \" + url);\n getLdtp().enterString(url);\n getLdtp().generateKeyEvent(\"<enter>\");\n }",
"public void open(){\n }",
"public void funcionAppian(View v){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(\"https://ustglobalspaindemo.appiancloud.com/suite/tempo/news\"));\n if(intent.resolveActivity(getPackageManager())!= null){\n startActivity(intent);\n }\n }",
"public void gotoCoachLogin(){ application.gotoCoachLogin(); }",
"@Given(\"open dev login page\")\n public void openDevLoginPage() {\n open(variables.URL_Login);\n }",
"public void openStockApp(View view) {\n showToast(getString(R.string.stock_hawk));\n }",
"public void open() {\n isOpen = true;\n }",
"public void clickscool(View view) {\n Intent i = new Intent(this, school.class);\n startActivity(i);\n }",
"public void openFlag() {\n \tIntent intent = new Intent(this, DisplayFlagActivity.class);\n \tstartActivity(intent);\n }",
"public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}",
"public void view() {\n\t\t\t\n\t\t\tSystem.out.println(\"Poping up window to show each order of customer @ AdminSaleController\");\n\t\t\tCustomerOrderMain vo = new CustomerOrderMain();\n\t\t vo.start(ps);\n\t\t\t\n\t\t}",
"@Override\n public void onClick(View v) {\n Intent r2page = new Intent(v.getContext(), Cherwell_Boathouse.class);\n startActivity(r2page);\n }",
"public static void goToEditSongWindow()\n {\n EditSongWindow editSongWindow = new EditSongWindow();\n editSongWindow.setVisible(true);\n editSongWindow.setFatherWindow(actualWindow, false);\n }",
"public void open( ) {\n System.out.println(\"Door is unlocked. \\n\" +\n \"Welcome to Park Extravaganza\\n\");\n }",
"public void openTheListOfGadgets(){\r\n\t\tdriver.findElement(By.xpath(\"\"+TODAY_WIN_XPATH+\"//button[contains(text(),'Add more..')]\")).click();\r\n\t\tReporter.log(\"List Of Gadgets Buttons is clicked\",true);\r\n\t}",
"@Override\n public void onClick(View v) {\n\n String url = \"https://club-omnisports-des-ulis.assoconnect.com/billetterie/offre/146926-a-adhesion-karate-2020-2021\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n\n }",
"protected void opened() throws COpenFailedException {\n\n\t\ttry {\n\t\t\t\n\t\t\tprops = (CPropertyService) CServiceProvider.getService(ServiceNames.PROPERTIES);\n\t\t\tArrayList groups = (ArrayList) CServiceProvider.getService(ServiceNames.MEMBER_LIST);\n\n\t\t\tres =(ResourceBundle) CServiceProvider.getService(ServiceNames.RESOURCES);\n\n\t\t\tCDialogTools.createButtonListener(this, \"jbOK\", \"handleOKButton\");\n\t\t\tCDialogTools.createButtonListener(this, \"jbCancel\", \"handleCancelButton\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\t\t\t\t\n\t\t\t\tif (!groups.contains(\"administrator\")) {\n\t\t\t\t\tJButton jb = (JButton) getGuiComposite().getWidget(\"jbOK\");\n\t\t\t\t\tjb.setEnabled(false);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\t\t\t\t\n\t\t\t}\t\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new COpenFailedException(ex);\n\t\t}\n\t}",
"@Override\n public void onClick(View view)\n {\n Intent intent = new Intent(BoilerRoom.this, Inspection.class);\n startActivity(intent);\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tPersonalBests s=new PersonalBests();\n\t\t\t\tdispose();\n\t\t\t\ts.setVisible(true);\n\t\t\t\t\n\t\t\t}"
] | [
"0.6381671",
"0.63727987",
"0.6171887",
"0.6155464",
"0.6138006",
"0.60856223",
"0.606984",
"0.6038869",
"0.6016903",
"0.59830546",
"0.59824026",
"0.59542096",
"0.5941122",
"0.591848",
"0.591349",
"0.5898862",
"0.5898204",
"0.5897327",
"0.58736014",
"0.580904",
"0.58080655",
"0.5807762",
"0.58039063",
"0.58011967",
"0.5800149",
"0.5789768",
"0.57848877",
"0.5775319",
"0.5767254",
"0.57531863",
"0.57531863",
"0.5743382",
"0.5733277",
"0.5727989",
"0.57234704",
"0.57162076",
"0.57030576",
"0.5699853",
"0.5695127",
"0.56900793",
"0.56821704",
"0.5681684",
"0.56697106",
"0.56586397",
"0.5648408",
"0.56438524",
"0.56426704",
"0.564018",
"0.56309843",
"0.5624956",
"0.56205297",
"0.5620482",
"0.5619822",
"0.5617428",
"0.56167436",
"0.5614136",
"0.56075406",
"0.5607451",
"0.56072587",
"0.5598029",
"0.55968004",
"0.559379",
"0.5592214",
"0.55910325",
"0.5583584",
"0.5583584",
"0.5569511",
"0.5569289",
"0.55667293",
"0.55665815",
"0.5560981",
"0.5558376",
"0.5547415",
"0.5543099",
"0.55355793",
"0.5534762",
"0.5530633",
"0.55304813",
"0.5527469",
"0.55177486",
"0.55169874",
"0.5513195",
"0.55114824",
"0.55070436",
"0.55047613",
"0.55014807",
"0.5493366",
"0.54931533",
"0.5489612",
"0.54759955",
"0.54745907",
"0.5473467",
"0.54702646",
"0.5466907",
"0.54614085",
"0.5460013",
"0.5453089",
"0.54482526",
"0.54470515",
"0.544445",
"0.5443372"
] | 0.0 | -1 |
open pege 'url' in browser | @And("^Считать детали товара \"([^\"]*)\"$")
public void setNameAndPriceByUrl(String url) {
driver.get(url);
waitForConditions.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//*[@class='detail-title']")));
//get name goods on page
String nameElement = driver.findElement(By.xpath("//*[@class='detail-title']")).getText();
//get price goods on page
String priceElement = driver.findElement(By.xpath("//*[@id='price_label']")).getText();
goods.add(nameElement + "/ " + priceElement);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }",
"private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }",
"public void openUrlInBrowser(String URL) {}",
"void openUrl (String url);",
"public String openPHPTravels() {\r\n\t\tString URL = CommonProperty.getProperty(\"url\" + PropertyManager.getProperty(\"zone\").toUpperCase());\r\n\t\tLog.info(\"\");\r\n\t\tLog.info(\"Opening URL : \" + URL);\r\n\t\tdriver.navigate().to(URL);\r\n\t\tString title = driver.getTitle();\r\n\t\tLog.info(title);\r\n\t\treturn URL;\r\n\t}",
"public void openUrl(String url) {\n driver.get(url);\n }",
"public void openURL(String url) {\r\n\t\t\r\n\t\tfinal String errMsg = \"Error attempting to launch web browser\";\r\n\t\tString osName = System.getProperty(\"os.name\");\r\n\t\ttry {\r\n\t\t\tif (osName.startsWith(\"Mac OS\")) {\r\n\t\t\t\tClass fileMgr = Class.forName(\"com.apple.eio.FileManager\");\r\n\t\t\t\tMethod openURL = fileMgr.getDeclaredMethod(\"openURL\",\r\n\t\t\t\t\t\tnew Class[] {String.class});\r\n\t\t\t\topenURL.invoke(null, new Object[] {url});\r\n\t\t\t}\r\n\t\t\telse if (osName.startsWith(\"Windows\"))\r\n\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \" + url);\r\n\t\t\telse { //assume Unix or Linux\r\n\t\t\t\tString[] browsers = {\r\n\t\t\t\t\t\t\"firefox\", \"opera\", \"konqueror\", \"epiphany\", \"mozilla\", \"netscape\" };\r\n\t\t\t\tString browser = null;\r\n\t\t\t\tfor (int count = 0; count < browsers.length && browser == null; count++)\r\n\t\t\t\t\tif (Runtime.getRuntime().exec(\r\n\t\t\t\t\t\t\tnew String[] {\"which\", browsers[count]}).waitFor() == 0)\r\n\t\t\t\t\t\tbrowser = browsers[count];\r\n\t\t\t\tif (browser == null)\r\n\t\t\t\t\tthrow new Exception(\"Could not find web browser\");\r\n\t\t\t\telse\r\n\t\t\t\t\tRuntime.getRuntime().exec(new String[] {browser, url});\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n//\t\t\tJOptionPane.showMessageDialog(null, errMsg + \":\\n\" + e.getLocalizedMessage());\r\n\t\t\tAboutDialog dlgSupport = new AboutDialog(actController.getUIInstance(), \"Support\", \t\"<html> Couldn't find web browser!\"+ \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> Please start your browser and type in the following URL:\"+\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> www.battleship.bymaxe.de</html>\");\r\n\t\t}\r\n\t}",
"private void openUri() {\n try {\n Desktop.getDesktop().browse(new URI(\"http://localhost:\" + Constants.DEFAULT_PORT));\n } catch (URISyntaxException | IOException e) {\n logger.error(\"MainService error [openUri]: \" + e);\n }\n }",
"public static void displayURL(String url) {\n\t\tboolean windows = isWindowsPlatform();\n\t\tString cmd = null;\n\t\ttry {\n\t\t\tif (windows) {\n\t\t\t\t// cmd = 'rundll32 url.dll,FileProtocolHandler http://...'\n\t\t\t\tcmd = WIN_PATH + \" \" + WIN_FLAG + \" \" + url;\n\t\t\t\tRuntime.getRuntime().exec(cmd);\n\t\t\t} else {\n\t\t\t\t// Under Unix, Netscape has to be running for the \"-remote\"\n\t\t\t\t// command to work. So, we try sending the command and\n\t\t\t\t// check for an exit value. If the exit command is 0,\n\t\t\t\t// it worked, otherwise we need to start the browser.\n\t\t\t\t// cmd = 'netscape -remote openURL(http://www.javaworld.com)'\n\t\t\t/*\tcmd = UNIX_PATH + \" \" + UNIX_FLAG + \"(\" + url + \")\";\n\t\t\t\tProcess p = Runtime.getRuntime().exec(cmd);\n\t\t\t\ttry {\n\t\t\t\t\t// wait for exit code -- if it's 0, command worked,\n\t\t\t\t\t// otherwise we need to start the browser up.\n\t\t\t\t\tint exitCode = p.waitFor();\n\t\t\t\t\tif (exitCode != 0) {\n\t\t\t\t\t\t// Command failed, start up the browser\n\t\t\t\t\t\t// cmd = 'netscape http://www.javaworld.com'\n\t\t\t\t\t\tcmd = UNIX_PATH + \" \" + url;\n\t\t\t\t\t\tp = Runtime.getRuntime().exec(cmd);\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException x) {\n\t\t\t\t\tSystem.err.println(\n\t\t\t\t\t\t\"Error bringing up browser, cmd='\" + cmd + \"'\");\n\t\t\t\t\tSystem.err.println(\"Caught: \" + x);\n\t\t\t\t} */\n\t\t\t}\n\t\t} catch (IOException ex) {\n\t\t\t// couldn't exec browser\n\t\t\tlogObj.debug(\"Could not invoke browser, command=\" + cmd, ex);\n\t\t}\n\t}",
"public void showLink(String url)\n {\n try\n {\n jalview.util.BrowserLauncher.openURL(url);\n } catch (Exception ex)\n {\n JOptionPane\n .showInternalMessageDialog(\n Desktop.desktop,\n \"Unixers: Couldn't find default web browser.\"\n + \"\\nAdd the full path to your browser in Preferences.\",\n \"Web browser not found\", JOptionPane.WARNING_MESSAGE);\n\n ex.printStackTrace();\n }\n }",
"void openLinkInSystemBrowser(String url, int errorMsg);",
"private void openURL() {\n webview.loadUrl(\"http://192.168.0.116/webvitool/view/webvitool.php\");\n webview.requestFocus();\n }",
"private void launchBrowser(URI uri) throws IOException\r\n {\r\n getDesktop().browse(uri);\r\n }",
"private void toUrl(String url){\n Uri uriUrl = Uri.parse(url);\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\n }",
"private void openPage(String address)\n {\n String os = System.getProperty(\"os.name\").toLowerCase();\n \n if(os.contains(\"win\"))\n {\n if(Desktop.isDesktopSupported())\n {\n Desktop desktop = Desktop.getDesktop();\n if(desktop.isSupported(Desktop.Action.BROWSE))\n {\n try { desktop.browse(new URI(address)); }\n\n catch(IOException | URISyntaxException e)\n {\n JOptionPane.showMessageDialog(null, \"Could not open page\");\n }\n }\n }\n }\n \n else \n JOptionPane.showMessageDialog(null, \"Cannot open page, system is not supported\");\n }",
"@Override\r\n protected URLConnection openConnection(URL url) throws IOException {\n Runtime.getRuntime().exec(\"cmd.exe /c start \" + url.toExternalForm());\r\n //Once the command has called we don't need to diasplay anything so we load a blank page.\r\n return new URL(\"about:blank\").openConnection();\r\n }",
"private void openUrlInBrowser(String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n url = \"http://\" + url;\n }\n // Open the browser and point it to the given url\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n startActivity(intent);\n }",
"private void openWebPage(String url) {\n Uri webpage = Uri.parse(\"http://\" + url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }",
"public static void openURL(String url) throws Exception\r\n\t{\r\n\t\t//deleteCookies();\r\n\r\n\t\t//IronWasp Connection logic for Security Testing\r\n\t\tString browser = FilesAndFolders.getPropValue(\"driverName\");\r\n\t\tif (browser.contentEquals(\"firefoxIronWasp\"))\r\n\t\t{\r\n\t\t\tIronWasp.workflowStart();\t\r\n\t\t\t//\t\t\ttry\r\n\t\t\t//\t\t\t{\r\n\t\t\t//\t\t\t\tIronWasp.workflowStart();\t\r\n\t\t\t//\t\t\t}\r\n\t\t\t//\t\t\tcatch(ConnectException e)\r\n\t\t\t//\t\t\t{\r\n\t\t\t//\t\t\t\tReporter.log(\"IronWasp Server has not been started...Ignore this error if you don't wish to track your test flow traffic & requests for IronWasp...\",true);\r\n\t\t\t//\t\t\t}\t\t\t\r\n\t\t}\r\n\r\n\r\n\t\tSystem.out.println(\"url: \" + url);\r\n\t\tdriver.get(url);\r\n\t\tSystem.out.println(\"URL loaded successfully:\" + url);\r\n\r\n\t\t//handling ssl certification\r\n\t\ttry{\r\n\t\t\tdriver.navigate().to(\"javascript:document.getElementById('overridelink').click()\");\r\n\t\t}\r\n\t\tcatch(Exception e){}\r\n\r\n\t\twindowMax();\r\n\t\tWebCommonMethods.implicitSleep();\r\n\t}",
"@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}",
"public static void openBrowser()\n\t{\n\t\tdriver = DriverSetup.getWebDriver(ReadPropertiesFile.getBrowser());\n\t\tdriver.get(ReadPropertiesFile.getURL());\n\t\tlog.info(\"Opening Browser\");\n\t\tlog.info(\"Practo website is launched \");\n\t}",
"public static void openURL(String url) {\n try { //attempt to use Desktop library from JDK 1.6+\n Class<?> d = Class.forName(\"java.awt.Desktop\");\n d.getDeclaredMethod(\"browse\", new Class[] {java.net.URI.class}).invoke(\n d.getDeclaredMethod(\"getDesktop\").invoke(null),\n new Object[] {java.net.URI.create(url)});\n //above code mimicks: java.awt.Desktop.getDesktop().browse()\n }\n catch (Exception ignore) { //library not available or failed\n String osName = System.getProperty(\"os.name\");\n try {\n if (osName.startsWith(\"Mac OS\")) {\n Class.forName(\"com.apple.eio.FileManager\").getDeclaredMethod(\n \"openURL\", new Class[] {String.class}).invoke(null,\n new Object[] {url});\n }\n else if (osName.startsWith(\"Windows\"))\n Runtime.getRuntime().exec(\n \"rundll32 url.dll,FileProtocolHandler \" + url);\n else { //assume Unix or Linux\n String browser = null;\n for (String b : browsers)\n if (browser == null && Runtime.getRuntime().exec(new String[]\n {\"which\", b}).getInputStream().read() != -1)\n Runtime.getRuntime().exec(new String[] {browser = b, url});\n if (browser == null)\n throw new Exception(Arrays.toString(browsers));\n }\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(null, errMsg + \"\\n\" + e.toString());\n }\n }\n }",
"public void openURL(String url)\n {\n getLdtp().generateKeyEvent(\"<command><shift>o\");\n logger.debug(\"Open Office document from URL: \" + url);\n getLdtp().enterString(url);\n getLdtp().generateKeyEvent(\"<enter>\");\n }",
"public void openBrowser(String url) {\n System.setProperty(\"webdriver.chrome.driver\", \"c:\\\\webdriver\\\\chromedriver.exe\");\n driver = new ChromeDriver();\n driver.manage().window().maximize();\n// int timeout = Integer.parseInt(ApplicationConfig.readConfigProperties(\"config-week17project.properties\", \"timeout\"));\n int timeout = Integer.parseInt(testData.timeout);\n driver.manage().timeouts().pageLoadTimeout(timeout, TimeUnit.SECONDS);\n driver.get(url);\n }",
"public void openWebPage(String url) {\n Intent intent= new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n startActivity(intent);\n }",
"public static final void openWebpage(URI uri) {\n Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n if ((desktop != null) && (desktop.isSupported(Desktop.Action.BROWSE))) {\r\n try {\r\n desktop.browse(uri);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"private void openWebPage(String url) {\n Uri webpage = Uri.parse(url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(intent);\n }\n }",
"@Step(\"<url> sayfasına git\")\n public void geturl(String url) {\n Driver.webDriver.get(url + \"/\");\n }",
"private void openBrowser() {\r\n //http://必须有\r\n String url = urlText.getText().toString();\r\n if (!\"http\".equals(url.substring(0, 4))) {\r\n url = \"http://\" + url;\r\n }\r\n Uri uri = Uri.parse(url);//获取网址,并转换成URI\r\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);//打开浏览器\r\n startActivity(intent);\r\n }",
"@Given(\"^launch the browser \\\"([^\\\"]*)\\\"$\")\n\tpublic void launch_the_browser(String url) throws Throwable {\n\t\tdriver = getDriver();\n\t\tdriver.get(url);\n\n\t}",
"@Given(\"^user should launch the browser$\")\n\tpublic void user_should_launch_the_browser() throws Throwable {\n\t\tgetUrl(\"https://adactin.com/HotelAppBuild2/\");\n\t \n\t}",
"public ICurrentPage openNewWindow(String url);",
"void openInAppBrowser(String url, String title, String subtitle, int errorMsg);",
"public void LaunchUrl(String URL)\n\t{\n\t\tmyDriver.get(URL);\n\t\t\n\t}",
"public void openURL() throws Exception{\r\n\r\n\t try{\r\n\t driverUtil.trigger();\r\n\t reporter.reportTestStep(\"App Launch\", \"ok\", \"ok\", \"PASS\", false);\r\n\t }\r\n\t\t\r\n\tcatch(Exception e){\r\n\t\te.printStackTrace();\r\n\t}\r\n}",
"protected void openInNewBrowser(SelectEvent event, String url)\n {\n try\n {\n BrowserOpener.browse(new URL(url));\n event.consume();\n }\n catch (Exception e)\n {\n String message = Logging.getMessage(\"generic.ExceptionAttemptingToInvokeWebBrower\", url);\n Logging.logger().warning(message);\n }\n }",
"public static void main(String[] args) throws MalformedURLException {\n\t\t\r\n\t\tChromeOptions chromeoptions=new ChromeOptions();\r\n\t\tWebDriver driver=new RemoteWebDriver(new URL(\"http://192.168.225.206:6878/wd/hub\"),chromeoptions);\r\n\t\t\r\n\t\tdriver.get(\"http://opensource.demo.orangehrmlive.com\");\r\n\t\tSystem.out.println(\"URL opened\");\r\n\r\n\t}",
"@Test\n\tpublic void start() {\n\t\t\n\t\tSeleniumUtil.startDriverFirefox(\"DEV_ROBO\");\n\t\t\n\t\tSeleniumUtil.openURL(\"https://www.cadesp.fazenda.sp.gov.br/(S(aljupn5501cd5jefroucepm3))/Pages/Cadastro/Consultas/ConsultaPublica/ConsultaPublica.aspx\");\n\n\t}",
"public void openApp(String Url) {\n\t\tfd = new FirefoxDriver();\r\n\t\tfd.get(Url);\r\n\t\tfd.manage().window().maximize();\r\n\t}",
"@Override\n\tpublic boolean openURL(final String url) {\n\t\ttry {\n\t\t\tURI uri = new URI(url);\n\t\t\tif(Desktop.isDesktopSupported()) {\n\t\t\t\tfinal Desktop desktop = Desktop.getDesktop();\n\t\t\t\tdesktop.browse(uri);\n\t\t\t}\n\t\t\telse { //fallback if desktop API not supported\n\t\t\t\tfor (final String browser : BROWSERS) {\n\t\t\t\t\tString cmd = browser + \" \" + url;\n\t\t\t\t\tfinal Process p = Runtime.getRuntime().exec(cmd);\n\t\t\t\t\tif(p.waitFor() == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tJOptionPane.showInputDialog(null, \"There was an error while attempting to open the system browser. \"\n\t\t\t\t\t+ \"\\nPlease copy and paste the following URL into your browser:\", url);\n\t\t\tlogger.info(\"Error opening system browser; displaying copyable link instead\");\n\t\t} catch (URISyntaxException e) {\n\t\t\tlogger.warn(\"This URI is invalid: \" + url, e);\n\t\t\treturn false;\n\t\t} catch (InterruptedException e) {\n\t\t\tlogger.warn(\"Browser process thread interrupted\");\n\t\t}\n\t\treturn true;\n\t}",
"public void openBrowser() {\n ResourceBundle config = ResourceBundle.getBundle(\"config\");\n\n config.getString(\"browser\").equalsIgnoreCase(\"Chrome\");\n System.setProperty(\"webdriver.chrome.driver\", \"src/Drivers/chromedriver_76.0.exe\");\n driver = new ChromeDriver();\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n// driver.get(config.getString(\"URL\"));\n driver.manage().window().maximize();\n }",
"public void openURL(Activity ctx, String url)\n {\n if (isConnected(ctx)) {\n try {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n ctx.startActivity(browserIntent);\n } catch (Exception e) {\n\n }\n } else {\n Dialogs.getInstance().simpleNoInternet(ctx);\n }\n }",
"private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }",
"public void openBrowser(View view){\n String url = (String)view.getTag();\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n\n //pass the url to intent data\n intent.setData(Uri.parse(url));\n\n startActivity(intent);\n }",
"public void openURL(WebDriver driver, String url) {\r\n\t\tdriver.get(url);\r\n\t}",
"public static void openURL(String url) throws IOException, InterruptedException\t{\n\t\tloadConfigurationFile();\n\t\tif(prop.getProperty(\"BROWSER\").equals(\"firefox\")) {\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", prop.getProperty(\"WEBDRIVER_DIR\") + \"\\\\geckodriver.exe\");\n\t\t\tdriver=new FirefoxDriver();\n\n\t\t}\n\t\telse if (prop.getProperty(\"BROWSER\").equals(\"chrome\")) {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", prop.getProperty(\"WEBDRIVER_DIR\") + \"\\\\chromedriver.exe\");\n\t\t\tSystem.setProperty(\"webdriver.chrome.logfile\", prop.getProperty(\"LOGFILE_DIR\") + \"\\\\test.log\");\n\t\t\tLogger.getLogger(\"org.openqa.selenium\").setLevel(Level.OFF);\n\t\t\tSystem.setProperty(\"webdriver.chrome.silentOutput\", \"true\");\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\toptions.setPageLoadStrategy(PageLoadStrategy.NORMAL);\n\t\t\toptions.setExperimentalOption(\"useAutomationExtension\", false);\n\t\t\toptions.setExperimentalOption(\"excludeSwitches\",Collections.singletonList(\"enable-automation\"));\n\t\t\t// options.addArguments(\"--start-maximized\");\n\t\t\t//options.addArguments(\"force-device-scale-factor=0.50\");\n\t\t\t//options.addArguments(\"high-dpi-support=0.50\");\n\t\t\tdriver=new ChromeDriver(options);\n\t\t}\n\t\telse {\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", prop.getProperty(\"WEBDRIVER_DIR\") + \"\\\\msedgedriver.exe\");\n\t\t\tdriver=new EdgeDriver();\n\t\t}\n\t\tint waitingTime = Integer.parseInt(prop.getProperty(\"WAITTIME\"));\n\t\tdriver.manage().timeouts().implicitlyWait(waitingTime, TimeUnit.SECONDS);\n\t\tdriver.get(url);\n\n\t\tBrowser.maximizeWindow();\n\t}",
"@Test\n public void testRegularOpen() {\n openUrl();\n }",
"public void openMuseumWebsite(String url){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n startActivity(intent);\n }",
"@Test\r\n\t\tpublic static void LaunchUrl()\r\n\t\t{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\t\tdriver.manage().window().maximize();\t\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\r\n\t\t\r\n\t\t}",
"private void goToUrl (String url) {\n Intent launchWebview = new Intent(this, ManualWebviewActivity.class);\n launchWebview.putExtra(\"url\", url);\n startActivity(launchWebview);\n }",
"public void LauncUrl(String url) {\ndriver.get(url);\n\t}",
"public void openBrowser(Context context, String url) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n context.startActivity(i);\n }",
"public static void openURL(final String url) {\n Intent intent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse(url));\n _instance.startActivity(Intent.createChooser(intent, \"\"));\n }",
"public void displayGraph(String url){\n\t\ttry {\n\t\t\tSystem.out.println(url);\n\t\t\tDesktop.getDesktop().browse(new java.net.URI(url));\n\t\t} catch (URISyntaxException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Given(\"^Launch the page$\")\r\n\tpublic void launch_the_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedrivernew.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://realestate.upskills.in\");\r\n\t \t}",
"public void open(){\n driver.get(\"https://demoqa.com/slider\");\n }",
"@Given(\"^the url of the application under test$\")\r\n\tpublic void getUrl() throws Exception {\n\t\tdriver.get(url);\r\n\t}",
"@Given(\"^I go to \\\"([^\\\"]*)\\\" on \\\"([^\\\"]*)\\\"$\") \n\tpublic void openWebPage(String url, String browser){\n\t\tString result = selenium.openBrowser(browser);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t\tString result2 = selenium.navigate(url);\n\t\tAssert.assertEquals(selenium.result_pass, result2);\n\t}",
"public void triggerURL(String url) {\r\n\t\tif (driver != null) {\r\n\t\t\ttry {\r\n\t\t\t\tdriver.get(url);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"public void openURLByFile(String url)\n {\n getAppleMenu().activate();\n getAppleMenu().select(Menu.FILE);\n getAppleMenu().open(Menu.OPEN_URL);\n logger.debug(\"Open Office document from URL: \" + url);\n getLdtp().enterString(url);\n getLdtp().generateKeyEvent(\"<enter>\");\n }",
"public static void main(String[] args) {\n String url = ConfigurationReader.getProperty(\"url\");\n\n Driver.get().get(url);\n\n BrowserUtils.wait(2);\n Driver.close();\n\n }",
"public static void open(String url,WebDriver driver)\n\t{\n\t\tdriver.navigate().to(url);\n\t}",
"public void openIe(){\n\n }",
"public static void main(String[] args) {\n\t\tinvokeFirefoxBrowser();\n\t\t\n\t\t//Enter the URL\n\t\tenterURL(\"https://demoqa.com/buttons\");\n\t\t\n\t}",
"public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n\n // create object for using selenium driver;\n WebDriver driver=new ChromeDriver();\n\n //open browser\n driver.get(\"http://amazon.com\");// bumu exlaydu\n //driver.get(\"http://google.com\");\n // open website\n System.out.println(driver.getTitle());\n\n\n\n\n }",
"@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL);\r\n }",
"public static void main(String[] args) {\n\n BrowserService browser = null;\n switch (args[0].toLowerCase()) {\n case \"chrome\":\n browser = new Chrome();\n break;\n case \"safari\":\n browser = new Safari();\n break;\n default:\n System.err.println(\"Unsupported browser\");\n System.exit(1);\n }\n\n System.out.println(\"Opened \" + args[0]);\n //polymorphism is an ability to take different shapes\n //in Java interface data types can be initialized with Objects that implement the interface.\n //and this a runtime process. Dynamic binding.\n browser.navigate(args[1]);\n System.out.println(args[0] + \" navigated to \" + args[1]);\n getUrl(browser);\n }",
"@Test(priority=1)\r\n\tpublic void OpenURLA() {\r\n\t WebDriverManager.chromedriver().setup();\r\n\t\t\r\n\t driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n \r\n\t\t driver = new ChromeDriver();\r\n\t\t driver.get(\"https://www.amazon.in/\"); // Open the url in chrome browser page\r\n\t }",
"@Given(\"I open a browser and launch the application\")\n public void open_a_browser_and_launch_the_application() throws MalformedURLException\n {\n try {\n if(System.getProperty(\"exemode\").equals(\"remote\")) {\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n DesiredCapabilities dc = DesiredCapabilities.firefox();\n dc.setBrowserName(\"firefox\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n DesiredCapabilities dc = DesiredCapabilities.chrome();\n dc.setBrowserName(\"chrome\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n }\n else{\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n driver = new FirefoxDriver();\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n driver = new ChromeDriver();\n }\n }\n\n if(driver!=null){\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n //driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);\n driver.get(ENDPOINT_PHPTRAVELS);\n }\n }\n catch(Exception e){\n e.printStackTrace();\n// System.exit(1);\n }\n }",
"public void openWebBrowser(String stringURL) {\r\n\t\tWebBrowser.openBrowser(stringURL);\r\n\t}",
"private void openBrowser(String Url) {\n \tif (Url != null && Url.trim().length()>0) {\n \t\tUri uri = Uri.parse(Url);\n \tIntent i = new Intent(Intent.ACTION_VIEW, uri);\n \tstartActivity(i);\n \t} \t\n }",
"@Test\n @When(\"I open URL\")\n public void s02_UrlOpen() {\n driver.get(urlHP);\n System.out.println(\"Step02 PASSED\");\n }",
"public static void openBrowser(Context context, String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\"))\n url = \"http://\" + url;\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n context.startActivity(intent);\n }",
"public static boolean openBrowser(final String url) {\n URI uri = null;\n \n try {\n uri = new URI(url);\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(\"URL has an incorrect format: \" + url);\n }\n\n return openBrowser(uri);\n\t}",
"@Given(\"url {string}\")\r\n\tpublic void url(String string) {\n\t\tString chromepath=\"C:\\\\Users\\\\a07208trng_b4a.04.26\\\\Desktop\\\\selenium\\\\jar\\\\chromedriver_win32\\\\chromedriver.exe\";\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromepath);\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.get(string);\r\n\t\tdriver.manage().window().maximize();\r\n\t}",
"public static void main(String[] args) {\n System.setProperty(\"webdriver.chrome.driver\", \"/Users/bulut/Selenium/chromedriver\");\n WebDriver driver = new ChromeDriver();\n driver.get(\"https://testpages.herokuapp.com/styled/index.html\");\n\n driver.findElement(By.id(\"alerttest\")).click();\n\n String URL = driver.getCurrentUrl();\n System.out.println(URL);\n\n\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString url = \"Aide.html\";\r\n\t\t\t\tFile htmlFile = new File(url);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tDesktop.getDesktop().browse(htmlFile.toURI());\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void open (URL url)\n\t{\n\t\tthis.file = new File (url.getPath());\n editor.open (url);\n\t\teditor.grabFocus();\n\t\tmodel = null;\n\t\tupdate();\n\t}",
"public static void openTrivia() { \n\t\tdriver.manage().window().setPosition(new Point(400,0));\n\t\tdriver.get(url);\n\t}",
"@Given(\"^open new browser and go to \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void open_new_browser_and_go_to_url(String url) {\r\n\t\tSelenium_Functions.openNewBrowserAndgotoNewUrl(driver,\r\n\t\t\t\tEnvironmentConfig.baseUrlTescoItp);\r\n\t\tlog.info(\"The user is on Tesco ITP Login page\"\r\n\t\t\t\t+ EnvironmentConfig.baseUrlTescoItp);\r\n\t\tSystem.out.println(\"The user is on Tesco ITP Login page\");\r\n\r\n\t}",
"public void open() {\n setWebDriver();\n }",
"@Given(\"^the user Opens the opencart webpage$\")\r\n\tpublic void the_user_Opens_the_opencart_webpage() throws Throwable {\n\t r.web();\r\n\t}",
"private boolean openBrowser(IProgressMonitor monitor) {\n\n monitor.subTask(\"Open index page\");\n // FIXME: port should come from the config files\n Display.getDefault().syncExec(new Runnable() {\n public void run() {\n URL url;\n try {\n url = new URL(\"http://localhost:8888\");\n IWorkbenchBrowserSupport browserSupport = WebBrowserUIPlugin\n .getInstance().getWorkbench().getBrowserSupport();\n IWebBrowser browser = browserSupport.createBrowser(\n IWorkbenchBrowserSupport.LOCATION_BAR\n | IWorkbenchBrowserSupport.NAVIGATION_BAR,\n null, null, null);\n browser.openURL(url);\n } catch (Exception e) {\n Trace.trace(Trace.SEVERE, \"Error opening browser\", e);\n }\n }\n });\n\n monitor.worked(3);\n return true;\n }",
"public static void openWebPage(Context context, String url) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n context.startActivity(intent);\n }",
"public void open(String url) {\n try {\n s = new Socket(url, 21);\n\n reader = new BufferedReader(new InputStreamReader(s.getInputStream()));\n writer = new PrintWriter(s.getOutputStream());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void showWebSite() throws Exception {\n\t\twebServer.start();\n\t\tSystem.out.println(getUrl());\n\t\twebServer.join();\n\t}",
"public void openWebsiteGvG(View v) {\n\t\tplayer.start();\n\t\t// Play the clicking sound\n\t\tIntent intent = new Intent(\n\t\t\t\tIntent.ACTION_VIEW,\n\t\t\t\tUri.parse(\"http://www.nieuwwest.amsterdam.nl/wonen_en/de-9-wijken-van/geuzenveld\"));\n\t\t// Create a new intent to be displayed and give it the web adress\n\t\tstartActivity(intent);\n\t\t// Start the just created intent, which opens the website in a new\n\t\t// window\n\t}",
"@Given(\"^Open Book My Show Website$\")\r\n\tpublic void open_Book_My_Show_Website() {\n\t\twait=new WebDriverWait(driver, 20);\r\n\t\t driver.get(\"https://in.bookmyshow.com\");\r\n\t\t uimap = new UIMap(\"src//test//resources//locators.properties\");\r\n\t}",
"private void openUpdate() {\n\t\tString url = MySoup.getUpdateLink(SITE);\n\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\ti.setData(Uri.parse(url));\n\t\tstartActivity(i);\n\t\tfinish();\n\t}",
"public void openUrl (String url) {\n File file = new File (url); // open in sync mode => return when data are ready or error occured\n if (file != null && file.getState() == Loadable.READY){ // we have data\n m_newData = createFromString (file.readAll()); // create the DOM\n file.close (Loadable.CLOSED); // cleanup connection\n }\n }",
"public static void main(String[] args) throws IOException {\n\t\t\n\t\tStart st = new Start();\n\t\t\n\t\tWebDriver drv = st.driverInit();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tString url = st.prop.getProperty(\"url\") ;\n\t\t\n\t\tdrv.get(url);\n\t\tSystem.out.println(dr.getTitle());\n\t\t\n\t\t\n\t\t\n \n\n\t}",
"public static void openURL() {\n\t\tURL newURL;\n\t\ttry {\n\t\t\tnewURL = new URL(newLink);\n\t\t\tinput = new Scanner(new InputStreamReader(newURL.openStream()));\n\t\t}\n\t\tcatch (MalformedURLException ex) {\n\t\t\tSystem.out.println(\"Invalid URL\");\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(\"I/O Errors: no such file\");\t\t\t\n\t\t}\n\t}",
"private void openUri()\r\n {\r\n JOptionPane optionPane = new JOptionPane(new JLabel(\"URI:\"), \r\n JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION);\r\n optionPane.setWantsInput(true);\r\n JDialog dialog = optionPane.createDialog(frame, \"Enter URI\");\r\n dialog.setResizable(true);\r\n dialog.setVisible(true);\r\n Object value = optionPane.getValue();\r\n if (value == null)\r\n {\r\n return;\r\n }\r\n if (!value.equals(JOptionPane.OK_OPTION))\r\n {\r\n return;\r\n }\r\n String uriString = (String)optionPane.getInputValue();\r\n if (uriString == null || uriString.trim().isEmpty())\r\n {\r\n return;\r\n }\r\n URI uri = null;\r\n try\r\n {\r\n uri = new URI(uriString);\r\n } \r\n catch (URISyntaxException e)\r\n {\r\n JOptionPane.showMessageDialog(\r\n frame, \"Invalid URI: \"+e.getMessage(), \r\n \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n openUriInBackground(uri);\r\n }",
"private void viewPageClicked(ActionEvent event) {\n\n Item tempItem = new Item();\n String itemURL = tempItem.itemURL;\n Desktop dk = Desktop.getDesktop();\n try{\n dk.browse(new java.net.URI(itemURL));\n }catch(IOException | URISyntaxException e){\n System.out.println(\"The URL on file is invalid.\");\n }\n\n showMessage(\"Visiting Item Web Page\");\n\n }",
"public void connect(String url){\n seleniumDriver.get(url);\n }",
"public static void main(String[] args) throws URISyntaxException, IOException {\n Desktop desktop = Desktop.getDesktop();\n URI uri = new URI(\"http://www.baidu.com\");\n// for (int i = 0; i < 10; i++) {\n// desktop.browse(uri);\n// }\n File file = new File(\"D:/BugReport.txt\");\n desktop.edit(file);\n\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif(desktop == null) return ;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdesktop.browse(uri);\n\t\t\t\t\t} catch (IOException 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}",
"@Override\n public void execute () {\n if (Desktop.isDesktopSupported()) {\n try {\n Desktop.getDesktop().browse(new URI(HELP_URL));\n }\n catch (Exception e) {\n\n }\n }\n }",
"public static void openImageInBrowser(Context context, String url){\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n context.startActivity(browserIntent);\n }",
"public void openmrsdemo() {\n\t\tutil.geturl(prop.getValue(\"locators.url\"));\n\t\tlogreport.info(\"Url loaded\");\n\t\tutil.maximize();\n\t}",
"public FirefoxDriver openBrowser(String site){\n System.setProperty(\"webdriver.gecko.driver\", \"c:\\\\Utils\\\\geckodriver.exe\");\n FirefoxDriver browser = new FirefoxDriver();\n browser.get(site);\n return browser;\n }"
] | [
"0.7932766",
"0.7817678",
"0.7592065",
"0.726192",
"0.7038234",
"0.70294154",
"0.70061976",
"0.68611366",
"0.68328404",
"0.6829238",
"0.68210673",
"0.68202376",
"0.67875296",
"0.67055094",
"0.66398144",
"0.6615631",
"0.6607335",
"0.66037935",
"0.6593593",
"0.6546661",
"0.65423113",
"0.65279186",
"0.6508108",
"0.6495092",
"0.6487006",
"0.64858925",
"0.6469464",
"0.643641",
"0.641952",
"0.641889",
"0.6414645",
"0.63713413",
"0.6361509",
"0.6291889",
"0.62698424",
"0.62503105",
"0.6240291",
"0.62161946",
"0.62123483",
"0.62112296",
"0.6170672",
"0.6166782",
"0.61552685",
"0.6154592",
"0.613876",
"0.61183167",
"0.61142284",
"0.6095649",
"0.60940397",
"0.60936236",
"0.6091153",
"0.6080337",
"0.6064911",
"0.6047298",
"0.6033131",
"0.5976906",
"0.5970765",
"0.595767",
"0.5948569",
"0.5947386",
"0.5944514",
"0.5942391",
"0.5939715",
"0.5929147",
"0.59257203",
"0.5916831",
"0.5913937",
"0.59120697",
"0.5892557",
"0.58881986",
"0.5887356",
"0.5876883",
"0.5874552",
"0.58728933",
"0.5870597",
"0.58591336",
"0.58585423",
"0.585731",
"0.5851985",
"0.5850034",
"0.5846145",
"0.5838929",
"0.5823628",
"0.5813478",
"0.5803667",
"0.57932645",
"0.57918435",
"0.5780104",
"0.576477",
"0.575932",
"0.5753795",
"0.5747821",
"0.57287735",
"0.5727098",
"0.57196885",
"0.5706584",
"0.57055515",
"0.56980723",
"0.5691031",
"0.5690623",
"0.56846344"
] | 0.0 | -1 |
All readFile variants should throw an exception, to signal to callers if File I/O fails | protected abstract E readFile() throws Exception; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void readFile() throws Exception, FileNotFoundException, NumberFormatException, MalformedParameterizedTypeException {\n // my user or my file might be kind of crazy! -> will check for these exceptions!\n }",
"protected abstract void readFile();",
"private void testReadFile() {\n System.out.println(\"------ TESTING : readFile(String filename) ------\");\n try{\n if(iTestFileList.readFile(sFile)){\n //throw exception if the values are not copied correctly\n if(iTestFileList.get(0) != 42175){\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n if(iTestFileList.get(5) != 45545){\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n if(iTestFileList.get(10) != 86908) {\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n }\n else{\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n }catch(RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }",
"public abstract void readFromFile( ) throws Exception;",
"protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;",
"public void fileRead(String filename) throws IOException;",
"public void readFile();",
"@Test\n\tpublic void testBadRead(){\n\t\ttry{\n\t\t\tXMLReader reader = new XMLReader(\"nonExistent\");\n\t\t\treader.close();\n\t\t\tfail(\"XMLReader should not have been able to read nonexistent file\");\n\t\t} catch (FileNotFoundException e){\n\t\t}\n\t}",
"public static void readMyFile() throws IOException {\n\n List<String> allLines = Files.readAllLines(Paths.get(\"src/ErfansInputFile\"));\n System.out.println(\"allLines = \" + allLines);\n System.out.println(\"Reading the file in my computer. \");\n\n throw new FileNotFoundException(\"Kaboom, file is not found!!!\");\n }",
"@SuppressWarnings(\"ResultOfMethodCallIgnored\")\r\n public static void readFromFile() throws IOException {\r\n File file = new File(filePath);\r\n if (file.exists()) {\r\n readFromFile(file.getPath());\r\n } else {\r\n file.createNewFile();\r\n }\r\n }",
"public void myMethod() throws FileNotFoundException {\n\t\ttry {\n\t\tsoccer = new FileInputStream(\"soccer.txt\");\n\t\t} catch (FileNotFoundException f) {//checked exception handled here\n//\t\t\tf.printStackTrace();\n\t\tSystem.out.println(\"file not found\");//throw fnfe; //this needs to be handled or declared\n\t\t}\n\t\t}",
"@Test\n public void readFile() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.readFile();\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"FileName is missing.\") || e.getMessage().equals(\"FileLocation is missing.\") || e.getMessage().equals(\"Config file not found.\") || e.getMessage().equals(\"JSON file not well formatted.\"));\n }\n\n }",
"private void checkFile() {\n \ttry {\n \t\tdata = new BufferedReader(\n \t\t\t\t new FileReader(textFile));\n \t\t\n \t}\n \tcatch(FileNotFoundException e)\n \t{\n \t\tSystem.out.println(\"The mentioned File is not found.\");\n System.out.println(\"\");\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"The following error occured while reading the file.\");\n\t\t\tex.printStackTrace();\n\t\t\tSystem.exit(2);\n\t\t}\n }",
"@Override\r\n\tpublic InputStream getFile(String filepath) throws FileSystemUtilException {\r\n\t\t\r\n\t\tthrow new FileSystemUtilException(\"000000\",null,Level.ERROR,null);\t\r\n\r\n\t}",
"@Override\n public InputStream readFileInternal(String _fileName) throws IOException\n { // Reads a file from the devices internal storage. Takes a filename as a parameter and throws an IOException if failed.\n return context.openFileInput(_fileName);\n }",
"@Test\n public void readEmptyFile() throws Exception {\n populateInputFile(0, 0, 0);\n mReadHandlerNoException.onNext(buildReadRequest(0, 0));\n checkErrorCode(mResponseObserver, INVALID_ARGUMENT);\n }",
"@Override\r\n public void handleIOException(\r\n File file,\r\n java.io.IOException cause\r\n )\r\n {\n }",
"void method21()\n throws IOException\n {\n }",
"public ReadFile (String file) throws java.io.FileNotFoundException\n {\n reader = new java.io.FileReader(file);\t\t//Construct the file reader\n br = new java.io.BufferedReader(reader);\t//Wrap it with a BufferedReader\n assert this.isValid(); \t\t\t//Make sure all is well and we can read the file\n }",
"private String[] readFile(InputStream stream) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new InputStreamReader(stream)));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \");\r\n }\r\n }",
"InputStream getInputStream() throws FileSystemException;",
"@Test\n public void getFileLocation() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.getFileLocation();\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"Try to access config file before reading it.\") );\n }\n try {\n conf.readFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assertNotNull(conf.getFileLocation());\n }",
"void method22()\n throws IOException\n {\n }",
"protected abstract Reader read() throws IOException;",
"private String[] readFile(String path) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new FileReader(new File(path))));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \" + path + \":\" + exception.getMessage());\r\n }\r\n }",
"public static void reading(String fileName)\n {\n\n }",
"public DataAccessException() {\n super(\"File cannot be opened or read. Please check!\");\n }",
"List readFile(String pathToFile);",
"public InputStream readFile( String fileName, FileType type );",
"@Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n LOG.warn(\"An IOException occurred while reading a file on path {} with message: {}\", file, exc.getMessage());\n LOG.debug(\"An IOException occurred while reading a file on path {} with message: {}\", file,\n LOG.isDebugEnabled() ? exc : null);\n return FileVisitResult.CONTINUE;\n }",
"public void readFromFile() {\n\n\t}",
"void method18()\n throws IOException\n {\n throw new IOException(\"to make compiler happy\");\n }",
"private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}",
"@Test\r\n\tvoid testImportRecordsShouldThrowExceptionOnInvalidFile() {\r\n\t\tRecordParser parser = new RecordParser();\r\n\t\tassertThrows(FileNotFoundException.class, () -> {\r\n\t\t\tparser.importRecords(new File(\"unknown.txt\"));\r\n\t\t});\r\n\t}",
"private void openAndReadFile() throws IOException {\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textreader = new BufferedReader(fr);\n\t\tString line;\n\t\tString[] parsedLine;\n\t\twhile ((line = textreader.readLine()) != null) {\n\t\t\tparsedLine = pattern.split(line);\n\t\t\tif (parsedLine.length == 2) {\n\t\t\t\tfileData.put(parsedLine[0], parsedLine[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Couldn't read line \" + line + \" in \" + path);\n\t\t\t}\n\t\t}\n\t\ttextreader.close();\n\t\tfr.close();\n\t}",
"void readFaultyRecipientsTest() {\n Assertions.assertThrows(RuntimeException.class,\n () -> Reader.readRecipients(Paths.get(\"src/test/resources/faulty_recipients.txt\")));\n }",
"public interface FileLoader {\n String getLine() throws Exception;\n}",
"public String readFile(String filename)\n {\n StringBuilder texts = new StringBuilder();\n \n try \n {\n FileReader inputFile = new FileReader(filename);\n Scanner parser = new Scanner(inputFile);\n \n while (parser.hasNextLine())\n {\n String line = parser.nextLine();\n texts.append(line + \";\");\n }\n \n inputFile.close();\n parser.close();\n return texts.toString();\n \n }\n \n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n return error;\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n return error;\n } \n }",
"void open() throws IOException;",
"@Test\n void testBrokenCSV() throws IOException {\n try {\n createInstance().read(null, null);\n fail(\"IOException not thrown on null csv\");\n } catch (NullPointerException ex) {\n assertThat(ex.getMessage()).isNull();\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.UNKNOWN_ERROR);\n }\n File file = getFile(\"csv/ingest/BrokenCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n createInstance().read(Tuple.of(stream, file), null);\n fail(\"IOException was not thrown when collumns do not align.\");\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.CSV_RECORD_MISMATCH);\n }\n }",
"@Override\n public void readDataFromTxtFile()\n throws NumberFormatException, DepartmentCreationException, EmployeeCreationException {\n\n }",
"public abstract T readDataFile(String fileLine);",
"private void fileRead(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// create file\n\t\t\tFile file = new File(path);\n\t\t\tFileInputStream fileStream = new FileInputStream(file);\n\t\t\t\n\t\t\t// data read\n\t\t\tthis.dataContent = new byte[(int)file.length()];\n\t\t\tint ret = fileStream.read(this.dataContent, 0, (int)file.length());\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File Not Found : \" + e.getMessage());\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed File Read : \" + e.getMessage());\n\t\t}\n\t\t\n\t}",
"private void read(){\n try {\n if (c != -1) c = r.read();\n } catch (IOException e){\n throw new IOError(e);\n }\n }",
"public void readEntries() throws FileAccessException;",
"public static java.lang.String readFile(java.lang.String r5) {\n /*\n r0 = 0\n r1 = 0\n java.io.InputStreamReader r2 = new java.io.InputStreamReader // Catch:{ Exception -> 0x003b }\n java.io.FileInputStream r3 = new java.io.FileInputStream // Catch:{ Exception -> 0x003b }\n r3.<init>(r5) // Catch:{ Exception -> 0x003b }\n r2.<init>(r3) // Catch:{ Exception -> 0x003b }\n r5 = 100\n char[] r5 = new char[r5] // Catch:{ Exception -> 0x0036, all -> 0x0033 }\n java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch:{ Exception -> 0x0036, all -> 0x0033 }\n java.lang.String r3 = \"\"\n r1.<init>(r3) // Catch:{ Exception -> 0x0036, all -> 0x0033 }\n L_0x0017:\n int r3 = r2.read(r5) // Catch:{ Exception -> 0x0036, all -> 0x0033 }\n r4 = -1\n if (r3 == r4) goto L_0x0022\n r1.append(r5, r0, r3) // Catch:{ Exception -> 0x0036, all -> 0x0033 }\n goto L_0x0017\n L_0x0022:\n java.lang.String r5 = r1.toString() // Catch:{ Exception -> 0x0036, all -> 0x0033 }\n r2.close() // Catch:{ Exception -> 0x002a }\n goto L_0x0032\n L_0x002a:\n r1 = move-exception\n java.lang.String r2 = \"\"\n java.lang.Object[] r0 = new java.lang.Object[r0]\n com.ta.audid.utils.UtdidLogger.se(r2, r1, r0)\n L_0x0032:\n return r5\n L_0x0033:\n r5 = move-exception\n r1 = r2\n goto L_0x0054\n L_0x0036:\n r5 = move-exception\n r1 = r2\n goto L_0x003c\n L_0x0039:\n r5 = move-exception\n goto L_0x0054\n L_0x003b:\n r5 = move-exception\n L_0x003c:\n java.lang.String r2 = \"\"\n java.lang.Object[] r3 = new java.lang.Object[r0] // Catch:{ all -> 0x0039 }\n com.ta.audid.utils.UtdidLogger.se(r2, r5, r3) // Catch:{ all -> 0x0039 }\n if (r1 == 0) goto L_0x0051\n r1.close() // Catch:{ Exception -> 0x0049 }\n goto L_0x0051\n L_0x0049:\n r5 = move-exception\n java.lang.String r1 = \"\"\n java.lang.Object[] r0 = new java.lang.Object[r0]\n com.ta.audid.utils.UtdidLogger.se(r1, r5, r0)\n L_0x0051:\n java.lang.String r5 = \"\"\n return r5\n L_0x0054:\n if (r1 == 0) goto L_0x0062\n r1.close() // Catch:{ Exception -> 0x005a }\n goto L_0x0062\n L_0x005a:\n r1 = move-exception\n java.lang.Object[] r0 = new java.lang.Object[r0]\n java.lang.String r2 = \"\"\n com.ta.audid.utils.UtdidLogger.se(r2, r1, r0)\n L_0x0062:\n throw r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ta.audid.utils.FileUtils.readFile(java.lang.String):java.lang.String\");\n }",
"public String readFileIntoString(String filepath) throws IOException;",
"private void checkFileContents(String name) throws IOException {\n byte[] buff = \"some bytes\".getBytes();\n assertTrue(Arrays.equals(buff, readFile(name, buff.length)));\n }",
"public void load (File file) throws Exception;",
"private static java.lang.String readStringFromFile(java.io.File r9) {\n /*\n r5 = 0\n r3 = 0\n java.io.FileReader r4 = new java.io.FileReader // Catch:{ FileNotFoundException -> 0x0059, IOException -> 0x0038 }\n r4.<init>(r9) // Catch:{ FileNotFoundException -> 0x0059, IOException -> 0x0038 }\n r7 = 128(0x80, float:1.794E-43)\n char[] r0 = new char[r7] // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n r6.<init>() // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n L_0x0010:\n int r1 = r4.read(r0) // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n if (r1 <= 0) goto L_0x002a\n r7 = 0\n r6.append(r0, r7, r1) // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n goto L_0x0010\n L_0x001b:\n r2 = move-exception\n r3 = r4\n L_0x001d:\n java.lang.String r7 = \"PluginNativeHelper\"\n java.lang.String r8 = \"cannot find file to read\"\n com.tencent.component.utils.log.LogUtil.d(r7, r8, r2) // Catch:{ all -> 0x0048 }\n if (r3 == 0) goto L_0x0029\n r3.close() // Catch:{ IOException -> 0x004f }\n L_0x0029:\n return r5\n L_0x002a:\n java.lang.String r5 = r6.toString() // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n if (r4 == 0) goto L_0x005b\n r4.close() // Catch:{ IOException -> 0x0035 }\n r3 = r4\n goto L_0x0029\n L_0x0035:\n r7 = move-exception\n r3 = r4\n goto L_0x0029\n L_0x0038:\n r2 = move-exception\n L_0x0039:\n java.lang.String r7 = \"PluginNativeHelper\"\n java.lang.String r8 = \"error occurs while reading file\"\n com.tencent.component.utils.log.LogUtil.d(r7, r8, r2) // Catch:{ all -> 0x0048 }\n if (r3 == 0) goto L_0x0029\n r3.close() // Catch:{ IOException -> 0x0046 }\n goto L_0x0029\n L_0x0046:\n r7 = move-exception\n goto L_0x0029\n L_0x0048:\n r7 = move-exception\n L_0x0049:\n if (r3 == 0) goto L_0x004e\n r3.close() // Catch:{ IOException -> 0x0051 }\n L_0x004e:\n throw r7\n L_0x004f:\n r7 = move-exception\n goto L_0x0029\n L_0x0051:\n r8 = move-exception\n goto L_0x004e\n L_0x0053:\n r7 = move-exception\n r3 = r4\n goto L_0x0049\n L_0x0056:\n r2 = move-exception\n r3 = r4\n goto L_0x0039\n L_0x0059:\n r2 = move-exception\n goto L_0x001d\n L_0x005b:\n r3 = r4\n goto L_0x0029\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.component.plugin.PluginNativeHelper.readStringFromFile(java.io.File):java.lang.String\");\n }",
"public static void main(String[] args) throws IOException, InterruptedException {\n\n\n //static method can directly been called in static method\n\n //calling a method that declare to throws checked exception\n\n try {\n readMyFile();\n }catch (FileNotFoundException e){\n System.out.println(\"Handling here , Just moving on\");\n }\n\n //Thread class is coming from java.lang package\n Thread.sleep(3000);\n System.out.println(\"The End\");\n\n }",
"void method24() throws IOException\n {\n }",
"public interface IReadFile {\n public String readFile();\n}",
"@RequestMapping(value=\"/read\", method = RequestMethod.GET)\n @ResponseBody\n public String readFile(@RequestParam String f) throws IOException,InvalidValueException,FilePathAccessDeniedException {\n\n String username = CSQLUserContext.getCurrentUser().getUsername();\n\n if(validator.isValidAndUserHasAccess(username,f)){\n return fileSystemService.readFile(f);\n }\n\n return null;\n }",
"protected abstract InputStream getFile(final String path);",
"private void ensureReadNonBuffered() throws IOException, BadDescriptorException {\n if (reading) {\n if (buffer.hasRemaining()) {\n Ruby localRuntime = getRuntime();\n if (localRuntime != null) {\n throw localRuntime.newIOError(\"sysread for buffered IO\");\n } else {\n throw new IOException(\"sysread for buffered IO\");\n }\n }\n } else {\n // libc flushes writes on any read from the actual file, so we flush here\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }\n }",
"@Override\n\tpublic void demoCheckedException() throws IOException {\n\n\t}",
"private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }",
"private BufferedReader readFile( String geneFile ) throws IOException {\n File f = new File( geneFile );\n if ( !f.canRead() ) {\n throw new IOException( \"Cannot read from \" + geneFile );\n }\n BufferedReader b = new BufferedReader( new FileReader( geneFile ) );\n log.info( \"File \" + geneFile + \" read successfully\" );\n return b;\n\n }",
"void method15()\n throws java.io.IOException\n {\n }",
"private static String readFile(String path) throws IOException {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(path)))) {\n\t\t\tStringBuilder input = new StringBuilder();\n\t\t\tString tmp; while ((tmp = br.readLine()) != null) input.append(tmp+\"\\n\");\n\t\t\treturn input.toString();\n\t\t}\n\t}",
"@Test\n public void givenStateCensusAnalyserFile_WhenImproperFile_ReturnsException() {\n String CSV_FILE_PATH = \"src/test/resources/stateCensus.csv\";\n try {\n indianCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.INDIA, CSV_FILE_PATH);\n } catch (CSVBuilderException e) {\n Assert.assertEquals(CSVBuilderException.TypeOfException.NO_FILE_FOUND, e.typeOfException);\n }\n }",
"void mo23487a() throws IOException;",
"public abstract byte[] read() throws IOException, IllegalArgumentException , IllegalStateException;",
"@Test\n public void loadFromFileWithWrongConnects() throws Exception{\n fileInOut.setFilePath(\"src/wrongConnects\");\n fileInOut.loadFromFile();\n }",
"@Test\n\tpublic void testReadFileIntoStringNull() throws IOException {\n\t\tsfr = ss.createFileReader(\"non-existing-type\");\n\t\tString actualString = sfr.readFileIntoString(TEST_CLASS_LOCAL);\n\t\tassertNull(actualString);\n\t}",
"@SuppressWarnings(\"unused\")\n private String readFile(File f) throws IOException {\n BufferedReader reader = new BufferedReader(new FileReader(f));\n String line = reader.readLine();\n StringBuilder builder = new StringBuilder();\n while (line != null) {\n builder.append(line).append('\\n');\n line = reader.readLine();\n }\n reader.close();\n return builder.toString();\n }",
"public void testFileWithDosEol()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_dos_eol.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 2);\n assertEquals(t.getMostExpensiveSaleId(), \"10\");\n assertEquals(t.getWorstSalesman(), \"Renato\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }",
"@Test\n\tpublic void testReadTxtFile() throws FileNotFoundException {\n\t\tFileParser fp = new FileParser();\n\t\tArrayList<String> parsedLines = fp.readTxtFile(\"test.txt\");\n\t\tassertEquals(\"This is a test file\", parsedLines.get(0));\n\t\tassertEquals(\"University of Virginia\", parsedLines.get(1));\n\n\t\tArrayList<String> parsedWords = fp.readTxtFile(\"test1.txt\");\n\t\tassertEquals(\"test\", parsedWords.get(0));\n\t\tassertEquals(\"file\", parsedWords.get(1));\n\t}",
"public static void checkFileReadable(final String filepath) throws FileNotFoundException {\n File f = new File(filepath);\n if (!f.exists()) {\n throw new FileNotFoundException(filepath + \" could not be found\");\n }\n if (!f.isFile()) {\n throw new FileNotFoundException(filepath + \" is not a file\");\n }\n if (!f.canRead()) {\n throw new AccessControlException(filepath + \" could not be read\");\n }\n }",
"public boolean readDataFile();",
"@Test\n public void throwsIOExceptionWhenCannotHash() throws IOException {\n File nonExistent = new File(\"nonExistent.gb\");\n\n thrown.expect(IOException.class);\n // Can not use message due to FileNotFoundException containing localized text on some OS:es\n\n // Throws\n new GameFile(nonExistent);\n }",
"void readExcel(File existedFile) throws Exception;",
"public String readFile(){\n\t\tString res = \"\";\n\t\t\n\t\tFile log = new File(filePath);\n\t\tBufferedReader bf = null;\n\t\t\n\t\ttry{\n\t\t\tbf = new BufferedReader(new FileReader(log));\n\t\t\tString line = bf.readLine();\n\t\t\n\t\t\n\t\t\twhile (line != null){\n\t\t\t\tres += line+\"\\n\";\n\t\t\t\tline = bf.readLine();\n\t\t\t}\n\t\t\n\t\t\treturn res;\n\t\t}\n\t\tcatch(Exception oops){\n\t\t\tSystem.err.println(\"There was an error reading the file \"+oops.getStackTrace());\n\t\t\treturn \"\";\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"There was an error closing the read Buffer \"+e.getStackTrace());\n\t\t\t}\n\t\t}\n\t}",
"public interface AbstractC17167a {\n void onErrorIOFailure(Exception exc, File file, String str);\n }",
"public void loadFile(File p_file) throws IOException;",
"@Test\n public void testBasicRead() throws IOException {\n String output = singleLineFileInit(file, Charsets.UTF_8);\n\n PositionTracker tracker = new DurablePositionTracker(meta, file.getPath());\n ResettableInputStream in = new ResettableFileInputStream(file, tracker);\n\n String result = readLine(in, output.length());\n assertEquals(output, result);\n\n String afterEOF = readLine(in, output.length());\n assertNull(afterEOF);\n\n in.close();\n }",
"public List<String> readFileContents(String filePath) throws APIException;",
"public boolean process(File file) throws IOException;",
"public void readFile(File f) {\r\n if(f.getName().endsWith(\".txt\")) {\r\n if(f.getName().equals(\"USQRecorders.txt\")) {\r\n readAndTxt(f); \r\n lab_android.setText(\"Android read in\");\r\n }else if(f.getName().equals(\"mdl_log.txt\")) {\r\n readModLog(f);\r\n lab_moodle.setText(\"Moodle read in\");\r\n }else if(f.getName().equals(\"mdl_chat_messages.txt\") || f.getName().equals(\"mdl_forum_posts.txt\") || f.getName().equals(\"mdl_quiz_attempts.txt\")) {\r\n \treadtabs(f);\r\n }else{\r\n //illegal file name\r\n //JOptionPane.showMessageDialog(null, \"only accept .txt file named 'USQRecorders.txt','mdl_log.txt','mdl_chat_messages.txt','mdl_forum_posts.txt' and 'mdl_quiz_attempts.txt'\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if(fromzip == false) {\r\n copyOldtxt(f);\r\n }\r\n } else if(f.getName().endsWith(\".zip\")) {\r\n if(f.getName().endsWith(\".zip\"))fromzip=true;\r\n readZip(f);\r\n copyOldtxt(f);\r\n //delete original\r\n File del = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File dels[] = del.listFiles();\r\n for(int i=0 ; i<dels.length ; i++){\r\n dels[i].delete();\r\n }\r\n File tmp = new File(workplace + \"/temp/USQ_IMAGE/\");\r\n tmp.delete();\r\n tmp = new File(workplace + \"/temp\");\r\n tmp.delete();\r\n lab_android.setText(\"Android read in\");\r\n } else if(f.getName().endsWith(\".png\")) {\r\n readImage(f);\r\n }\r\n }",
"public String readFile(){\r\n StringBuffer str = new StringBuffer(); //StringBuffer is a mutable string\r\n Charset charset = Charset.forName(\"UTF-8\"); //UTF-8 character encoding\r\n Path file = Paths.get(filename + \".txt\");\r\n try (BufferedReader reader = Files.newBufferedReader(file, charset)) { // Buffer: a memory area that buffered streams read\r\n String line = null;\r\n while ((line = reader.readLine()) != null) { //Readers and writers are on top of streams and converts bytes to characters and back, using a character encoding\r\n str.append(line + \"\\n\");\r\n }\r\n }\r\n catch (IOException x) {\r\n System.err.format(\"IOException: %s%n\", x);\r\n }\r\n return str.toString();\r\n }",
"private static String readFile(String fileName) throws IOException {\n\t\tReader reader = new FileReader(fileName);\n\n\t\ttry {\n\t\t\t// Create a StringBuilder instance\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\t// Buffer for reading\n\t\t\tchar[] buffer = new char[1024];\n\n\t\t\t// Number of read chars\n\t\t\tint k = 0;\n\n\t\t\t// Read characters and append to string builder\n\t\t\twhile ((k = reader.read(buffer)) != -1) {\n\t\t\t\tsb.append(buffer, 0, k);\n\t\t\t}\n\n\t\t\t// Return read content\n\t\t\treturn sb.toString();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch (IOException ioe) {\n\t\t\t\t// Ignore\n\t\t\t}\n\t\t}\n\t}",
"String readFile( String filename ) {\n try {\n FileReader fileReader = new FileReader( filename );\n BufferedReader bufferedReader = new BufferedReader( fileReader );\n StringBuilder stringBuilder = new StringBuilder();\n String line = bufferedReader.readLine();\n while( line != null ) {\n stringBuilder.append( line );\n stringBuilder.append( \"\\n\" );\n line = bufferedReader.readLine();\n }\n bufferedReader.close();\n fileReader.close();\n return stringBuilder.toString();\n } catch( Exception e ) {\n playerObjects.getLogFile().WriteLine( Formatting.exceptionToStackTrace( e ) );\n return null;\n }\n }",
"public static File readFile(String inputName) throws IOException\r\n {\r\n String fileName = inputName; \r\n File file = new File(fileName);\r\n if (!file.canRead())\r\n {\r\n System.err.println(file.getCanonicalPath() + \": cannot be read\"); \r\n }\r\n return file; \r\n }",
"public static String readFileAsString(String filePath) {\n\t\tbyte[] buffer = new byte[(int) new File(filePath).length()];\n\t\tBufferedInputStream f = null;\n\t\ttry {\n\t\t\tFile file = new File(filePath);\n\t\t\tfor (int attempt = 0; attempt < 3; attempt++) {\n\t\t\t\tif (file.exists()) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tThread.sleep(2);\n\t\t\t}\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tSystem.err.println(\"\\nfile not found: \" + filePath);\n\t\t\t\tthrow new FileNotFoundException(\"Could not find file: \" + filePath);\n\t\t\t}\n\n\t\t\tf = new BufferedInputStream(new FileInputStream(filePath));\n\t\t\tf.read(buffer);\n\t\t} catch (IOException e) {\n\t\t\tthrow new UncheckedExecutionException(e);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (f != null)\n\t\t\t\ttry {\n\t\t\t\t\tf.close();\n\t\t\t\t} catch (IOException ignored) {\n\t\t\t\t}\n\t\t}\n\t\treturn new String(buffer);\n\t}",
"public interface FileReader {\n\n String read(String fileName);\n}",
"public abstract void readFromFile(String key, String value);",
"public String[] getFile() throws IOException {\n\t\n\t\n\ttry {\n\tFileReader reader = new FileReader(path);\n\tBufferedReader textReader = new BufferedReader(reader); // creates buffered file reader again\n\t\n\tint numberOfLines = getLines(); // calls the method above to know how many lines there are\n\tString[ ] textData = new String[numberOfLines]; //creates an array the size of the amount of lines the file has\n\t\n\tfor (int i=0; i < numberOfLines; i++) {\n\t\ttextData[ i ] = textReader.readLine(); // go through file and read each line into its own array space\n\t\t}\n\t\n\ttextReader.close( ); //reader is done\n\treturn textData; // return array\n\t} catch (IOException e) {\n\t\tString[] exceptionString = new String[1];\n\t\texceptionString[0] = \"nothing\";\n\t\treturn exceptionString;\n\t}\n}",
"@Test\n public void getFileName() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.getFileName();\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"Try to access config file before reading it.\") );\n }\n try {\n conf.readFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assertNotNull(conf.getFileName());\n assertTrue(conf.getFileName().size() == 1);\n }",
"public String readFileContents(String filename) {\n return null;\n\n }",
"public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not exist.\" );\r\n } // end catch\r\n }",
"public abstract void load() throws IOException;",
"byte[] getFile(String filename) throws NoSuchFileException;",
"protected abstract Reader getReader() throws IOException;",
"@Test\n public void testCorrupt0LengthHFile() throws IOException {\n Path f = new Path(TestHFile.ROOT_DIR, testName.getMethodName());\n FSDataOutputStream fsos = TestHFile.fs.create(f);\n fsos.close();\n try {\n Reader r = HFile.createReader(TestHFile.fs, f, TestHFile.cacheConf, true, TestHFile.conf);\n } catch (CorruptHFileException che) {\n // Expected failure\n return;\n }\n Assert.fail(\"Should have thrown exception\");\n }",
"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 void readFile(String file)\n\t{\t\n\t\tfindPieces(file);\n\t}",
"public String readStringFromFileSafe(String filename) {\r\n\t\tString result = null;\r\n\t\ttry {\r\n\t\t\tresult = readStringFromFile(filename);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\thandleFileNotFoundException(e, filename);\r\n\t\t} catch (IOException e) {\r\n\t\t\thandleIOException(e, filename);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public String readFile(String filePath)\n {\n String result = \"\";\n try {\n\n FileReader reader = new FileReader(filePath);\n Scanner scanner = new Scanner(reader);\n\n while(scanner.hasNextLine())\n {\n result += scanner.nextLine();\n }\n reader.close();\n }\n catch(FileNotFoundException ex)\n {\n System.out.println(\"File not found. Please contact the administrator.\");\n }\n catch (Exception ex)\n {\n System.out.println(\"Some error occurred. Please contact the administrator.\");\n }\n return result;\n }",
"private static ByteBuffer internalReadFileAsByteArray(String path) throws IOException {\n ByteBuffer byteBuffer = null;\n Path filePath = FileSystems.getDefault().getPath(path);\n try (\n FileChannel fileChannel = FileChannel.open(filePath, StandardOpenOption.READ);) {\n Long size = fileChannel.size();\n if (size > Integer.MAX_VALUE) {\n throw new IOException(MessageFormat.format(\n \"File {0} is too large. Its size is {1,number,integer} bytes which is larger \" +\n \"then this method could handle ( {2,number,integer})\", path, size, Integer.MAX_VALUE));\n }\n byteBuffer = ByteBuffer.allocate(size.intValue());\n int readBytes = 0;\n int totalReadBytes = 0;\n int failureCounter = 0;\n while ((readBytes = fileChannel.read(byteBuffer)) >= 0 && totalReadBytes < size.intValue()) {\n if (readBytes > 0) {\n totalReadBytes += readBytes;\n if (failureCounter > 0) {\n failureCounter = 0;\n }\n } else {\n if (++failureCounter >= MAX_READ_FAILURES) {\n throw new IOException(MessageFormat.format(\"File {0} could not be read for unknown reason\", path));\n }\n }\n }\n }\n return (ByteBuffer) byteBuffer.flip();\n }"
] | [
"0.7467525",
"0.73300135",
"0.72815573",
"0.7093208",
"0.7020135",
"0.6964287",
"0.6658212",
"0.6591799",
"0.62934506",
"0.6276086",
"0.625849",
"0.62415504",
"0.62409616",
"0.6149764",
"0.61093676",
"0.608777",
"0.6085479",
"0.598075",
"0.596186",
"0.5950458",
"0.5938871",
"0.5927242",
"0.59107465",
"0.5891061",
"0.5883505",
"0.584783",
"0.58290493",
"0.58283347",
"0.57929873",
"0.5781276",
"0.5774221",
"0.57711035",
"0.57633424",
"0.5711677",
"0.5711381",
"0.57087314",
"0.5703016",
"0.5697919",
"0.5690331",
"0.56882566",
"0.5684005",
"0.56583196",
"0.5656489",
"0.56483513",
"0.56337255",
"0.5632392",
"0.5629231",
"0.5614644",
"0.5608553",
"0.5607175",
"0.5605664",
"0.56050605",
"0.5597197",
"0.55959135",
"0.55932367",
"0.5588589",
"0.5580989",
"0.55675304",
"0.55674785",
"0.55494475",
"0.55459553",
"0.55369234",
"0.5535952",
"0.553135",
"0.5530813",
"0.55267215",
"0.55197984",
"0.5514813",
"0.5513773",
"0.55011535",
"0.5493978",
"0.5489248",
"0.54854625",
"0.5481038",
"0.5480344",
"0.54757077",
"0.5475151",
"0.54625195",
"0.54585135",
"0.5454953",
"0.5454358",
"0.5451117",
"0.5450157",
"0.54450977",
"0.54434913",
"0.54409176",
"0.5440108",
"0.5437758",
"0.54356307",
"0.542531",
"0.54228103",
"0.5421439",
"0.5408946",
"0.54066694",
"0.5392436",
"0.53920496",
"0.537642",
"0.5374727",
"0.5366697",
"0.5363723"
] | 0.760375 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int[] arr = new int[10];
for(int i=0; i<arr.length; i++) {
arr[i] = scan.nextInt();
}
int[] mod = new int[10];
for(int i=0; i<arr.length; i++) {
mod[i] = arr[i]%42;
}
Arrays.sort(mod);
int count = 1;
for(int i=0; i<mod.length-1; i++) {
if(mod[i] != mod[i+1])
count++;
}
System.out.println(count);
} | {
"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 |
Method used to run the program. | public static void main(String[] args) {
StudentDatabase database = null;
try {
List<String> lines = Files.readAllLines(
Paths.get("./database.txt"),
StandardCharsets.UTF_8
);
database = new StudentDatabase(lines);
} catch (IOException exc) {
System.out.println("Error while reading the database. Terminating...");
System.exit(-1);
}
try (Scanner sc = new Scanner(System.in)) {
while (true) {
System.out.print("> ");
if (sc.hasNext()) {
String input = sc.nextLine().trim();
if (input.equalsIgnoreCase("exit")) {
System.out.println("Goodbye!");
break;
}
if (input.startsWith("query ")) {
String query = input.substring(6);
try {
List<StudentRecord> printList = query(query, database);
List<String> output = RecordFormatter.format(printList);
output.forEach(System.out::println);
System.out.printf("%n");
} catch (QueryException exc) {
System.out.println("Invalid query.\n");
}
} else {
System.out.println("Invalid command.\n");
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void runProgram()\n\t{\n\t\tintro();\n\t\tfindLength();\n\t\tguessLetter();\n\t\tguessName();\n\t}",
"public void runProgram() {\n\n\t\tSystem.out.println(\"\\n Time to start the machine... \\n\");\n\n\t\tpress.pressOlive(myOlives);\n\n\t\tSystem.out.println(\"Total amount of oil \" + press.getTotalOil());\n\t}",
"public static void main(String[] args) throws IOException{\n\t\trunProgram();\n\t}",
"public void _run() {\n String[] args = (String[])tEnv.getObjRelation(\"ARGS\");\n\n log.println(\"Running with arguments:\");\n for (int i=0; i< args.length; i++)\n log.println(\"#\" + i + \": \" + args[i]);\n\n oObj.run(args);\n\n tRes.tested(\"run()\", true);\n }",
"public static void main(String[] args) {\n //launch it\n launch();\n }",
"public static void main(String... args) {\n doMain().run();\n }",
"public void run() {\n // The run method should be overridden by the subordinate class. Please\n // see the example applications provided for more details.\n }",
"public abstract String run(String args);",
"public static void main(String[] args) {\n Run();\n }",
"public void run() {\n\t\trun(null, CommunicationDefaults.CONSOLE_PORT);\n\t}",
"public static void main(String[] args) {\n launch(args);\r\n \r\n }",
"public static void main(String[] args) {\r\n\r\n run();\r\n }",
"public static void main(String[] args) {\n\t\tlaunch(args);\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tlaunch(args);\r\n\r\n\t}",
"public void runProgram() {\n\t\tJTextPane code = ((MinLFile) tabbedPane.getSelectedComponent()).CodeArea;\n\t\tminc.consolearea.setText(\"\");\n\t\tinterpretorMainMethod(code.getText(), 0);\n\t\tdouble_variables.clear();\n\t\tstring_variables.clear();\n\t\tfunctions.clear();\n\t}",
"public void run() {\n\t\t\tconsole.run();\n\t\t}",
"void launch();",
"void launch();",
"void launch();",
"public static void main(){\n\t}",
"public void runProgram() {\n if (isSyntaxChecked()) {\n // panelDebugArea1.getTextArea().setText(\"\");\n this.setPause(false);\n try {\n // Precisa adicionar o Swingworker em uma nova thread para que ele execute!!\n // Vai entender.\n // Duas instâncias de Swingworker diferentes não estavam rodando ao mesmo mesmo. O código abaixo solucionou o problema.\n new Thread(this.getWorker()).start();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, this.errorWhileRunningText + \"\\n\" + ex);\n }\n }\n }",
"public void run(){\n\t\tinputStreamReader = new InputStreamReader(System.in);\r\n\t\tin = new BufferedReader( inputStreamReader );\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\" + Application.APPLICATION_VENDOR + \" \" + Application.APPLICATION_NAME + \" \" + Application.VERSION_MAJOR + \".\" + Application.VERSION_MINOR + \".\" + Application.VERSION_REVISION + \" (http://ThreatFactor.com)\");\r\n\t\t//System.out.println(\"We are here to help, just go to http://ThreatFactor.com/\");\r\n\t\t\r\n\t\tif( application.getNetworkManager().sslEnabled() )\r\n\t\t{\r\n\t\t\tif( application.getNetworkManager().getServerPort() != 443 )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Web server running on: https://127.0.0.1:\" + application.getNetworkManager().getServerPort());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Web server running on: https://127.0.0.1\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif( application.getNetworkManager().getServerPort() != 80 )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Web server running on: http://127.0.0.1:\" + application.getNetworkManager().getServerPort());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Web server running on: http://127.0.0.1\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Interactive console, type help for list of commands\");\r\n\t\t\r\n\t\tcontinueExecuting = true;\r\n\t\twhile( continueExecuting ){\r\n\r\n\t\t\tSystem.out.print(\"> \");\r\n\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\tString text = in.readLine();\r\n\t\t\t\t\r\n\t\t\t\tif( continueExecuting && text != null ){\r\n\t\t\t\t\tcontinueExecuting = runCommand( text.trim() );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(AsynchronousCloseException e){\r\n\t\t\t\t//Do nothing, this was likely thrown because the read-line command was interrupted during the shutdown operation\r\n\t\t\t\tcontinueExecuting = false;\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\t//Catch the exception and move on, the console listener must not be allowed to exit\r\n\t\t\t\tSystem.err.println(\"Operation Failed: \" + e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t\t\t//Stop listening. Otherwise, an exception loop may occur. \r\n\t\t\t\tcontinueExecuting = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t launch(args);\n\t }",
"public static void main(String[] args) {\n\t launch(args);\n\t }",
"public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}",
"public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}",
"public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}",
"public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}",
"public void run() {\n TasksCounter tc = new TasksCounter(tasks);\n new Window(tc);\n Ui.welcome();\n boolean isExit = false;\n Scanner in = new Scanner(System.in);\n while (!isExit) {\n try {\n String fullCommand = Ui.readLine(in);\n Command c = Parser.commandLine(fullCommand);\n c.execute(tasks, members, storage);\n isExit = c.isExit();\n } catch (DukeException e) {\n Ui.print(e.getMessage());\n }\n }\n }",
"public static void main (String[] args) {\n launch(args);\n }",
"public static void main() {\n \n }",
"public static void main(String[] args) {\n\t\tlaunch(args);\r\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\r\n\t}",
"public void run() {\r\n // Execute the program\r\n int index = 0;\r\n\r\n while (index < operations.size()) {\r\n Operation o = operations.get(index);\r\n index = o.execute(index, stack, symbolTable);\r\n }\r\n }",
"public void run() {\n if (!script.compile()) {\n Program.stop(\"ERROR: There was an error while compiling your script.\"\n + \"\\nPlease check your syntax!\", false);\n return;\n }\n commandCounter = script.input.split(\";\").length - 1;\n if (!writeMemory()) {\n Program.stop(\"ERROR: There was a fatal error while \"\n + \"writing the script into the memory!\", false);\n return;\n }\n try {\n startProcessor();\n } catch (NumberFormatException n) {\n Program.stop(\"ERROR: There was a runtime error while executing the script!\", false);\n }\n Program.stop(\"\", true);\n }",
"public static void main()\n\t{\n\t}",
"public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tlaunch(args);\r\n\t\t\r\n\t}",
"public static void main(String [] args){\n SmartPhone sm = new SmartPhone();\n sm.run();\n // System.out.println(sm.run());\n }",
"public static void main(String[] args) {\n new Main().run();\n }",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void run(String[] args) {\n launch(args);\n }",
"public void run()\n\t{\n\t\t\n\t\t\n\t\tString[] args = new String[] { };\n\t\ttry \n\t\t{\n\t\t\tToolRunner.run(this, args);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tlogger.error(\"Hadoop job execution failed\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args)\r\n\t{\n\t\tlaunch(args);\r\n\r\n\t}",
"public void run(){\n\t\t\ttry{\n\t\t\t\twhile(true){\n\t\t\t\t\tScanner keyboard = new Scanner(System.in);\n\t\t\t\t\tString line = keyboard.nextLine();\n\t\t\t\t\tString[] command = line.split(\" \");\n\t\t\t\t\tSystem.out.println(execute(line));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}catch(Exception ex){\n\t\t\t\tSystem.err.println(\"Incorrect command \\\"help\\\" for info\");\n\t\t\t\tex.printStackTrace();\n\t\t\t\trun();\n\t\t\t}\n\t\t\t\n\t\t}",
"public static void main(String[] args) {\n launch(args);\r\n }",
"public static void main(String[] args) {\n launch(args);\r\n }",
"public static void main(String[] args) {\n launch(args);\r\n }",
"public static void main(String[] args) {\n\t\tlaunch();\n\t}",
"public void run() {\n\n /**\n * let the user the know what is going to happen\n */\n showExecutionStart();\n\n /**\n * create an archetype for the new application\n */\n executeArchetypeCommand();\n\n /**\n * Provide some delay to allow thread to create the archetype\n */\n splash = new SplashScreen();\n\n for (int i = 0; i < 7; i++) {\n updateStatus(i);\n try {\n Thread.sleep(500);\n } catch (InterruptedException ie) {\n ie.printStackTrace();\n }\n }\n\n hideSplashScreen();\n splash = null;\n\n /**\n * let the user the know what is going to happen\n */\n showExecutionEnd();\n }",
"public static void main(String[] args)\n\t{\n\t\tlaunch(args);\t\t\n\t}",
"public static void main(String[] args) {\r\n\t launch(args); \r\n \r\n}",
"public void run() {\n\t\tprepareVariables(true);\n\t\t\n\t\t// Prepares Map Tables for Song and Key Info.\n\t\tprepareTables();\n\t\t\n\t\t// Selects a Random Song.\n\t\tchooseSong(rgen.nextInt(0, songlist.size()-1));\n\t\t\n\t\t// Generates layout.\n\t\tgenerateLabels();\n\t\tgenerateLines();\n\t\t\n\t\t// Listeners\n\t\taddMouseListeners();\n\t\taddKeyListeners();\n\t\t\n\t\t// Game Starts\n\t\tplayGame();\n\t}",
"public static void main(String[] args) {\r\n\t launch(args);\r\n\t}",
"public static void run() {\n }",
"public static void main(String[] args) {\r\n launch(args);\r\n }",
"public static void main(String[] args) {\r\n launch(args);\r\n }",
"public static void main(String[] args) {\r\n launch(args);\r\n }",
"public static void main(String[] args) {\r\n launch(args);\r\n }",
"public static void main(String[] args) {\r\n launch(args);\r\n }",
"public static void main(String[] args) {\r\n launch(args);\r\n }",
"public static void main(String[] args) {\r\n launch(args);\r\n }",
"public void run() {\n try {\n System.out.println(\"Calling Process\");\n processRequest();\n\n } catch (Exception e) {\n System.out.println(\"Run Exception\" + e);\n }\n\n }",
"public static void main(String[] args) {\r\n launch(args);\r\n }",
"public static void main(String[] args) {\n launch(args);\n\n }",
"public static void main(String[] args) {\n\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n launch(args);\n }"
] | [
"0.78042734",
"0.7577656",
"0.73412097",
"0.73181224",
"0.7115583",
"0.7057943",
"0.70578104",
"0.69856435",
"0.6977799",
"0.6910973",
"0.69069284",
"0.68866456",
"0.6873962",
"0.6865909",
"0.6864084",
"0.68554366",
"0.6851235",
"0.6851235",
"0.6851235",
"0.6832345",
"0.68192035",
"0.68150663",
"0.6813296",
"0.6813296",
"0.6801969",
"0.6801969",
"0.6801969",
"0.6801969",
"0.6790692",
"0.6790337",
"0.67885065",
"0.67826486",
"0.67826486",
"0.67716074",
"0.6759153",
"0.67488617",
"0.67380834",
"0.6735421",
"0.67237574",
"0.6723246",
"0.6723246",
"0.6723246",
"0.6723246",
"0.6723246",
"0.6723246",
"0.6723246",
"0.6723246",
"0.6723246",
"0.6723246",
"0.6723246",
"0.6723246",
"0.6723246",
"0.671384",
"0.6712111",
"0.6707456",
"0.6704994",
"0.67024326",
"0.67024326",
"0.67024326",
"0.6699719",
"0.6698364",
"0.668027",
"0.667777",
"0.66683185",
"0.66632926",
"0.66570497",
"0.6655532",
"0.6655532",
"0.6655532",
"0.6655532",
"0.6655532",
"0.6655532",
"0.6655532",
"0.66486883",
"0.66478777",
"0.6645603",
"0.6636347",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656",
"0.66354656"
] | 0.0 | -1 |
DecimalFormat df = new DecimalFormat("0.0"); | @Override
public void handle(ActionEvent event) {
double mealCost;
double tax;
double tip;
double totalCost;
double totalBill;
mealCost = Double.parseDouble(numm1.getText());
bill.setMealCost(mealCost);
tax=bill.tax();
numm2.setText(Double.toString(tax)+"$");
tip=bill.tip();
numm3.setText(Double.toString(tip)+"$");
totalBill=bill.totalBill();
numm4.setText(Double.toString(totalBill)+"$");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int getDecimalDigits() { return 0; }",
"public static int decimals() {\n return 0;\n }",
"public RealNumberFormat()\r\n\t{\r\n\t\tdf\t= new DecimalFormat( \"#,##0.000\" );\r\n\t}",
"private String doubleToDecimalString(double toFormat){\r\n\r\n String d = \"\";\r\n DecimalFormat df = new DecimalFormat(\"0.00\");\r\n d = df.format(toFormat);\r\n\r\n return d;\r\n }",
"private static String removeZeroDecimal(String s) {\r\n // Make sure to add check for existance of decimal sign to\r\n // prevent StringIndexOutOfBoundsException\r\n if (s.indexOf(\".\") != -1 && s.substring(s.indexOf(\".\"), s.length()).equals(\".0\"))\r\n s = s.replace(\".0\", \"\");\r\n return s;\r\n }",
"@Override\r\n\t\t\t\tpublic String textFormatter(String value) {\n\t\t\t\t\tDouble tmp = Double.parseDouble(value);\r\n\t\t\t\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\r\n\t\t\t\t\tString label = df.format(tmp).toString();\r\n\t\t\t\t\treturn (label);\r\n\t\t\t\t}",
"private void setUpFormat() {\n form = (DecimalFormat)NumberFormat.getNumberInstance();\n form.setMaximumFractionDigits(precision);\n }",
"public static void main( String[] args ) {\n System.out.println(NumUtil.format4DecimalPoint(1));\n System.out.println(NumUtil.format4DecimalPoint(1.1));\n System.out.println(NumUtil.format4DecimalPoint(1.12));\n System.out.println(NumUtil.format4DecimalPoint(1.123));\n System.out.println(NumUtil.format4DecimalPoint(1.1234));\n System.out.println(NumUtil.format4DecimalPoint(1.12345));\n System.out.println(NumUtil.format4DecimalPoint(1.123456));\n System.out.println(NumUtil.format4DecimalPoint(12.123456));\n \n double a = 0.09d;\n double b = 0.01d;\n double c = 0.1d;\n \n System.out.println( ( a + b ) );\n System.out.println( c - ( a + b ) == 0 );\n \n //Currency Testing\n Locale canadianEnglish = new Locale( \"en\",\"CA\" );\n NumberFormat currencyFormat = NumberFormat.getCurrencyInstance( Locale.CANADA_FRENCH );\n currencyFormat.setCurrency( Currency.getInstance( Locale.CANADA ) );\n currencyFormat.setMinimumFractionDigits( 2 );\n currencyFormat.setMaximumFractionDigits( 4 );\n double amt = -1.21234;\n System.out.println(amt + \" formats as \" + currencyFormat.format( amt ));\n System.out.println( formatPercent( 2.34d ));\n System.out.println( formatPercent( 0.54d ));\n System.out.println( formatPercent( 99.99999d ));\n System.out.println( formatPercent( 99d ));\n System.out.println( formatPercent( 100d ));\n System.out.println( formatPercent( 150d ));\n System.out.println( formatPercent( 150.1d ));\n System.out.println(\"\\n\\n\\n\\n\\n\\n\\n\\n\");\n \n System.out.println(\"formatNoDecimalPoint\");\n \n System.out.println(\"0.000 -> \"+NumUtil.formatNoDecimalPoint(0.000));\n System.out.println(\"0.0005 -> \"+NumUtil.formatNoDecimalPoint(0.0005));\n\tSystem.out.println(\"0.05 -> \"+NumUtil.formatNoDecimalPoint(0.05));\n\tSystem.out.println(\"0.5 -> \"+NumUtil.formatNoDecimalPoint(0.5));\n\tSystem.out.println(\"1 -> \"+NumUtil.formatNoDecimalPoint(1));\n\tSystem.out.println(\"1.1 -> \"+NumUtil.formatNoDecimalPoint(1.1));\n\tSystem.out.println(\"1.12 -> \"+NumUtil.formatNoDecimalPoint(1.12));\n\tSystem.out.println(\"1.123 -> \"+NumUtil.formatNoDecimalPoint(1.123));\n\tSystem.out.println(\"1.1234 -> \"+NumUtil.formatNoDecimalPoint(1.1234));\n\tSystem.out.println(\"1.12345 -> \"+NumUtil.formatNoDecimalPoint(1.12345));\n\tSystem.out.println(\"1.123456 -> \"+NumUtil.formatNoDecimalPoint(1.123456));\n\tSystem.out.println(\"12.12345699999999999999999999999999999999 -> \"+NumUtil.formatNoDecimalPoint(12.12345699999999999999999999999999999999));\n\tSystem.out.println(\"566762.42 -> \"+formatNoDecimalPoint(566762.42));\n\tSystem.out.println(\"56676242.00 -> \"+formatNoDecimalPoint(56676242.00));\n\tSystem.out.println(\"2342342342.00 -> \"+formatNoDecimalPoint(2342342342.00));\n\tSystem.out.println(\"12345678901234.12345678901234567890 -> \"+formatNoDecimalPoint(12345678901234.12345678901234567890));\n \n\t\n\tSystem.out.println(\"NumUtil.format2DecimalPoint\");\n \n\tSystem.out.println(\"0.0005 -> \"+NumUtil.format2DecimalPoint(0.0005));\n\tSystem.out.println(\"0.05 -> \"+NumUtil.format2DecimalPoint(0.05));\n\tSystem.out.println(\"0.5 -> \"+NumUtil.format2DecimalPoint(0.5));\n\tSystem.out.println(\"1 -> \"+NumUtil.format2DecimalPoint(1));\n\tSystem.out.println(\"1.1 -> \"+NumUtil.format2DecimalPoint(1.1));\n\tSystem.out.println(\"1.12 -> \"+NumUtil.format2DecimalPoint(1.12));\n\tSystem.out.println(\"1.123 -> \"+NumUtil.format2DecimalPoint(1.123));\n\tSystem.out.println(\"1.1234 -> \"+NumUtil.format2DecimalPoint(1.1234));\n\tSystem.out.println(\"1.12345 -> \"+NumUtil.format2DecimalPoint(1.12345));\n\tSystem.out.println(\"1.123456 -> \"+NumUtil.format2DecimalPoint(1.123456));\n\tSystem.out.println(\"12.12345699999999999999999999999999999999 -> \"+NumUtil.format2DecimalPoint(12.12345699999999999999999999999999999999));\n\tSystem.out.println(\"566762.42 -> \"+format2DecimalPoint(566762.42));\n\tSystem.out.println(\"56676242.00 -> \"+format2DecimalPoint(56676242.00));\n\tSystem.out.println(\"2342342342.00 -> \"+format2DecimalPoint(2342342342.00));\n\tSystem.out.println(\"12345678901234.12345678901234567890 -> \"+format2DecimalPoint(12345678901234.12345678901234567890));\n\t\n\t\n \n////////////\n\t\nSystem.out.println(\"formatNoDecimalPoint\");\n \n System.out.println(\"0.000 -> \"+NumUtil.formatNoDecimalPoint(0.00));\n System.out.println(\"-0.0005 -> \"+NumUtil.formatNoDecimalPoint(-0.0005));\n\tSystem.out.println(\"-0.05 -> \"+NumUtil.formatNoDecimalPoint(-0.05));\n\tSystem.out.println(\"-0.5 -> \"+NumUtil.formatNoDecimalPoint(-0.5));\n\tSystem.out.println(\"-1 -> \"+NumUtil.formatNoDecimalPoint(-1));\n\tSystem.out.println(\"-1.1 -> \"+NumUtil.formatNoDecimalPoint(-1.1));\n\tSystem.out.println(\"-1.12 -> \"+NumUtil.formatNoDecimalPoint(-1.12));\n\tSystem.out.println(\"-1.123 -> \"+NumUtil.formatNoDecimalPoint(-1.123));\n\tSystem.out.println(\"-1.1234 -> \"+NumUtil.formatNoDecimalPoint(-1.1234));\n\tSystem.out.println(\"-1.12345 -> \"+NumUtil.formatNoDecimalPoint(-1.12345));\n\tSystem.out.println(\"-1.123456 -> \"+NumUtil.formatNoDecimalPoint(-1.123456));\n\tSystem.out.println(\"-12.12345699999999999999999999999999999999 -> \"+NumUtil.formatNoDecimalPoint(-12.12345699999999999999999999999999999999));\n\tSystem.out.println(\"-566762.42 -> \"+formatNoDecimalPoint(-566762.42));\n\tSystem.out.println(\"-56676242.00 -> \"+formatNoDecimalPoint(-56676242.00));\n\tSystem.out.println(\"-2342342342.00 -> \"+formatNoDecimalPoint(-2342342342.00));\n\tSystem.out.println(\"-12345678901234.12345678901234567890 -> \"+formatNoDecimalPoint(-12345678901234.12345678901234567890));\n \n\t\n\tSystem.out.println(\"NumUtil.format2DecimalPoint\");\n \n\tSystem.out.println(\"0.000 -> \"+NumUtil.format2DecimalPoint(0.00));\n\tSystem.out.println(\"-0.0005 -> \"+NumUtil.format2DecimalPoint(-0.0005));\n\tSystem.out.println(\"-0.05 -> \"+NumUtil.format2DecimalPoint(-0.05));\n\tSystem.out.println(\"-0.5 -> \"+NumUtil.format2DecimalPoint(-0.5));\n\tSystem.out.println(\"-1 -> \"+NumUtil.format2DecimalPoint(-1));\n\tSystem.out.println(\"-1.1 -> \"+NumUtil.format2DecimalPoint(-1.1));\n\tSystem.out.println(\"-1.12 -> \"+NumUtil.format2DecimalPoint(-1.12));\n\tSystem.out.println(\"-1.123 -> \"+NumUtil.format2DecimalPoint(-1.123));\n\tSystem.out.println(\"-1.1234 -> \"+NumUtil.format2DecimalPoint(-1.1234));\n\tSystem.out.println(\"-1.12345 -> \"+NumUtil.format2DecimalPoint(-1.12345));\n\tSystem.out.println(\"-1.123456 -> \"+NumUtil.format2DecimalPoint(-1.123456));\n\tSystem.out.println(\"-12.12345699999999999999999999999999999999 -> \"+NumUtil.format2DecimalPoint(-12.12345699999999999999999999999999999999));\n\tSystem.out.println(\"-566762.42 -> \"+format2DecimalPoint(-566762.42));\n\tSystem.out.println(\"-56676242.00 -> \"+format2DecimalPoint(-56676242.00));\n\tSystem.out.println(\"-2342342342.00 -> \"+format2DecimalPoint(-2342342342.00));\n\tSystem.out.println(\"-12345678901234.12345678901234567890 -> \"+format2DecimalPoint(-12345678901234.12345678901234567890));\n\t\n\t\n\t\n\tSystem.out.println(\"8865450.54 -> \"+NumUtil.format2DecimalPoint(8865450.54));\n\t\n\t\n\t\n\tSystem.out.println( ratio( 7, 14 ) );\n\t\n System.out.println( ratio( 10293, 1234 ) );\n\t\n System.out.println( ratio( 50 * 23, 20 * 23 ) );\n }",
"@Override\n public void onClickAtOKButton(int position) {\n DecimalFormat df = new DecimalFormat(\"####0.00\");\n\n\n\n }",
"private String formatDec(double number) {\n String returnString = \"\";\n DecimalFormat df = new DecimalFormat(\"#.##\");\n df.setRoundingMode(RoundingMode.HALF_UP);\n returnString = df.format(number);\n int dotPosition = returnString.lastIndexOf(\".\");\n if (dotPosition == -1) {\n returnString += \".00\";\n } else {\n if (returnString.substring(dotPosition, returnString.length() - 1).length() == 1) {\n returnString += \"0\";\n }\n }\n return returnString;\n }",
"public static double formatDouble(double value){\r\n\t\ttry{\r\n\t\tDecimalFormat df = new DecimalFormat(\"####0.00\");\r\n\t\tvalue = Double.valueOf(df.format(value));\r\n\t\t}catch(Exception e){System.out.println(\"Error in formatDouble for value : \" + value + \" error : \" + e.getMessage());}\r\n\t\treturn value;\r\n\t}",
"public static String getNoDecimal(float temp) {\n\n BigDecimal bigDecimal = new BigDecimal(String.valueOf(temp));\n bigDecimal = bigDecimal.setScale(0, BigDecimal.ROUND_HALF_UP);\n DecimalFormat decimalFormat = new DecimalFormat();\n decimalFormat.applyPattern(\"#,##0\");\n\n return decimalFormat.format(bigDecimal);\n }",
"public DpFormatter(int dp) {\r\n mNf = new DecimalFormat(\"0.\" + TextUtils.repeat(\"0\", dp));\r\n }",
"private static String format2(double d) {\n return new DecimalFormat(\"#.00\").format(d);\n }",
"private static DecimalFormat determineLabelFormat(float val) {\n float absval = Math.abs(val);\n\n DecimalFormat rval = null;\n if (absval == 0) {\n rval = new DecimalFormat(\"0.#\");\n } else if (absval < 0.001 || absval > 1e7) {\n rval = new DecimalFormat(\"0.###E0\");\n } else if (absval < 0.01) {\n rval = new DecimalFormat(\"0.###\");\n } else if (absval < 0.1) {\n rval = new DecimalFormat(\"0.##\");\n } else {\n rval = new DecimalFormat(\"0.#\");\n }\n\n return rval;\n }",
"private ARXDecimal(String format){\r\n if (format == null || format.equals(\"Default\")){\r\n this.format = null;\r\n this.string = null;\r\n this.locale = null;\r\n } else {\r\n this.format = new DecimalFormat(format);\r\n this.string = format;\r\n this.locale = null;\r\n }\r\n }",
"public DoubleFormatter(int decimals) {\n this(decimals, 0.0);\n }",
"public int getDecimalDigits() { return 1; }",
"public int getDecimalDigits() { return 1; }",
"public DecimalFormat decimalFormat() {\n return decimalFormat;\n }",
"public DoubleFormatter() {\n this(2, 0.0);\n }",
"@Test\n public void roundOffDecimalPoints() throws IOException {\n BigDecimal actual = Utils.roundOffDecimalPoints(new BigDecimal(1), 2, 2);\n Assert.assertEquals(\"100.00\", actual.toString());\n }",
"public static String currencyMask(BigDecimal cyDec) throws BaseException\n {\n String theFormat = \"#,##0\";\n if(NumberUtil.nullToZero(cyDec).intValue() > 0)\n {\n theFormat = theFormat.concat(\".\");\n String nbDecimalZeros = fill(\"0\", cyDec);\n theFormat = theFormat.concat(nbDecimalZeros);\n }\n return theFormat;\n }",
"@Test\n public void testZeroPrice() {\n double expectedValue = new BigDecimal(0.0, new MathContext(5)).doubleValue();\n double actualValue = MarkupCalculator.determinePrice(new BigDecimal(0.0),\n BigInteger.valueOf(5),\n ProductType.FOOD)\n .round(new MathContext(5)).doubleValue();\n \n Assert.assertEquals(\"failure - zero price test produced the wrong result\",\n expectedValue, \n actualValue, 0.001);\n }",
"@Override\r\n\tpublic double alapterulet() {\n\t\treturn 0;\r\n\t}",
"public DecimalFormat() {\n // Always applyPattern after the symbols are set\n this.symbols = new DecimalFormatSymbols();\n applyPattern(mPattern, false);\n }",
"@Override\n public void onChanged(Double aDouble) {\n if (aDouble*1000 < 1) {\n etOutputValue.setText(\"0.0\");\n } else {\n DecimalFormat decimalFormat = new DecimalFormat(\"#,##0.###\");\n etOutputValue.setText(decimalFormat.format(aDouble));\n }\n }",
"public DecimalFormatObjectDescription() {\n this(DecimalFormat.class);\n }",
"private double convert(double d){\n\t\tDecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance();\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\",symbols); \n\t\treturn Double.valueOf(df.format(d));\n\t}",
"private String getDecimalPattern(String str) {\n int decimalCount = str.length() - str.indexOf(\".\") - 1;\n StringBuilder decimalPattern = new StringBuilder();\n for (int i = 0; i < decimalCount && i < MAX_DECIMAL; i++) {\n decimalPattern.append(\"0\");\n }\n return decimalPattern.toString();\n }",
"public ValidatorFactory setDecimalFormat(String pattern) {\n this.decimalPattern = pattern == null ? null : new DecimalFormat(pattern).toPattern();\n return this;\n }",
"private ARXDecimal(String format, Locale locale) {\r\n if (format == null || format.equals(\"Default\")){\r\n this.format = null;\r\n this.string = null;\r\n this.locale = locale;\r\n } else {\r\n this.format = new DecimalFormat(format, new DecimalFormatSymbols(locale));\r\n this.string = format;\r\n this.locale = locale;\r\n }\r\n }",
"public static TextFormatter soloDecimales() {\r\n DecimalFormatSymbols simbolo = new DecimalFormatSymbols();\r\n simbolo.setDecimalSeparator('.');\r\n DecimalFormat format = new DecimalFormat(\"#.00\", simbolo);\r\n return new TextFormatter<>(c -> {\r\n if (c.getControlNewText().isEmpty()) {\r\n return c;\r\n }\r\n ParsePosition parsePosition = new ParsePosition(0);\r\n Object object = format.parse(c.getControlNewText(), parsePosition);\r\n if (object == null || parsePosition.getIndex() < c.getControlNewText().length()) {\r\n return null;\r\n } else {\r\n return c;\r\n }\r\n });\r\n }",
"public DecimalConstant( BigDecimal value, String format)\n {\n super( Type.NUMBER, value);\n setFormat( format);\n }",
"public LocaleDpFormatter(int dp) {\r\n // mNf.setMinimumFractionDigits(dp);\r\n mNf.setMaximumFractionDigits(dp);\r\n }",
"static double formatNumber(double d) {\n\tDecimalFormat df= new DecimalFormat(COMMA_SEPERATED);\n\tSystem.out.println(\"number \"+df.format(d));\n\treturn d;\n\t\n\t\n\t}",
"public String CurrencyFormatter(double val) {\n\n\n NumberFormat nf = NumberFormat.getCurrencyInstance();\n DecimalFormatSymbols decimalFormatSymbols = ((DecimalFormat) nf).getDecimalFormatSymbols();\n decimalFormatSymbols.setCurrencySymbol(\"\");\n ((DecimalFormat) nf).setDecimalFormatSymbols(decimalFormatSymbols);\n String ft=nf.format(val).trim();\n return ft;\n\n }",
"static String double2String (Double a){\n String s = \"\"+a;\n String[] arr = s.split(\"\\\\.\");\n if (arr[1].length()==1) s+=\"0\";\n return s;\n }",
"@Override\n public double getValue() {\n return 0;\n }",
"@Test\n public void testLog() throws IOException {\n System.out.println(Double.parseDouble(\"3.123124354657668698\"));\n }",
"public SmartFormater() {\n\t\t\tsimpleFormats[0] = new DecimalFormat(\"###0\");\n\t\t\tsimpleFormats[1] = new DecimalFormat(\"###0.#\");\n\t\t\tsimpleFormats[2] = new DecimalFormat(\"###0.##\");\n\t\t\tsimpleFormats[3] = new DecimalFormat(\"###0.###\");\n\t\t\tsimpleFormats[4] = new DecimalFormat(\"###0.####\");\n\n\t\t\tscientificFormats[0] = new DecimalFormat(\"#.E0\");\n\t\t\tscientificFormats[1] = new DecimalFormat(\"#.#E0\");\n\t\t\tscientificFormats[2] = new DecimalFormat(\"#.##E0\");\n\t\t\tscientificFormats[3] = new DecimalFormat(\"#.###E0\");\n\t\t\tscientificFormats[4] = new DecimalFormat(\"#.####E0\");\n\t\t}",
"private String getFormattedPrice(double unformattedPrice) {\n String formattedData = String.format(\"%.02f\", unformattedPrice);\n return formattedData;\n }",
"@Override\n\tpublic double calcularPrecio() {\n\t\treturn 0;\n\t}",
"public DecimalFormat(String pattern) {\n // Always applyPattern after the symbols are set\n this.symbols = new DecimalFormatSymbols();\n applyPattern(pattern, false);\n }",
"@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }",
"@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }",
"@Test(expected = NullPointerException.class)\n public void formatDecimalNullInputTest() {\n Double number = null;\n Format.formatDecimal(number);\n }",
"public DoubleValue() {\n this.value = 0;\n }",
"double roundTwoDecimals(double d) { \n DecimalFormat twoDForm = new DecimalFormat(\"#.##\"); \n return Double.valueOf(twoDForm.format(d));\n }",
"@Override\n public void setUp() {\n\n LocaleConvertUtils.deregister();\n\n final NumberFormat nf = NumberFormat.getNumberInstance();\n final String result = nf.format(1.1);\n\n // could be commas instead of stops in Europe.\n decimalSeparator = result.charAt(1);\n\n }",
"private boolean isDecimalEqualToZero(String doubleValue) {\n\t\tif (doubleValue.contains(\"%\")) {\n\t\t\treturn false;\n\t\t}\n\t\tString[] n = doubleValue.split(\"\\\\.\");\n\t\tif(n.length > 1) {\n\t\t\t// get the value to right of decimal point\n\t\t\tint d = Integer.parseInt(n[1]);\n\t\t\treturn d == 0;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}",
"void beginZeroDec(String stringzero)throws DecaRecognitionException{\n \t\tboolean debutmantisse = false;\n \t\tint exposant = -1;\n \t\tString mantisse = \"\";\n \t\tfor (int i = 2; i < stringzero.length(); i++){\n \t\t\tswitch(stringzero.charAt(i)) {\n \t\t\t// fin du float\n \t\t\tcase 'f':\n \t\t\t\tbreak;\n \t\t\tcase 'F':\n \t\t\t\tbreak;\n \t\t\tcase 'e':\n \t\t\t\texposantFlottantDec(mantisse, exposant, stringzero.substring(i+1, stringzero.length()));\n \t\t\t\treturn;\n \t\t\tcase 'E':\n \t\t\t\texposantFlottantDec(mantisse, exposant, stringzero.substring(i+1, stringzero.length()));\n \t\t\t\treturn;\n \t\t\tcase '0':\n \t\t\t\tif(!debutmantisse) {\n \t\t\t\t\texposant -= 1;\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tmantisse += '0';\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tmantisse += stringzero.charAt(i);\n \t\t\t\tdebutmantisse = true;\n \t\t\t}\n \t\t}\n \t\t// cas 0.000...\n \t\tif (mantisse == \"\") {\n \t\t\treturn;\n \t\t}\n \t\t// deux premier cas le de la fonction a traiter en exemple\n \t\tcompareExposantDec(exposant, mantisse);\n\n \t}",
"public void setP0z(double parseDouble) {\n\t\t\n\t}",
"@Test\n public void testGetDefaultFormatter() {\n System.out.println(\"getDefaultFormatter\");\n Temperature t = new Temperature(10.0);\n NumberFormat formatter = Temperature.getDefaultFormatter();\n String s = formatter.format(t.get());\n assertEquals(\"10.0\", s);\n\n s = Temperature.Unit.CELSIUS.getFormatterWithUnit().format(t.get());\n assertEquals(\"10.0 C\", s);\n\n s = Temperature.Unit.CELSIUS.toString();\n assertEquals(\"\\260C\", s);\n }",
"@Test\n\tpublic void testDFnumber(){\n\t\tdouble d1 = 0.05;\n\t\tdouble d2 = 0.01;\n\t\tSystem.out.println(d1+d2);\n System.out.println(1.0-0.42);\n System.out.println(4.015*100);\n System.out.println(123.3/100);\n\t}",
"public static String getDisplayCurrencyFormatOneDecimal(double val) {\n\n\t\tjava.text.NumberFormat format = new java.text.DecimalFormat(\n\t\t\t\t\"###,###.#\");\n\t\tformat.setMaximumFractionDigits(1);\n\n\t\treturn format.format(val);\n\n\t}",
"public static double nullToZero(Double d)\n {\n if(d == null)\n {\n return 0;\n }\n else\n {\n return d.doubleValue();\n }\n }",
"private void _testLeadingZeroesFloat(String valueStr, double value) throws Exception\n {\n JsonFactory f = new JsonFactory();\n String JSON = valueStr;\n AsyncReaderWrapper p = createParser(f, JSON);\n try {\n p.nextToken();\n p.currentText();\n fail(\"Should have thrown an exception for doc <\"+JSON+\">\");\n } catch (JsonParseException e) {\n verifyException(e, \"invalid numeric value\");\n } finally {\n p.close();\n }\n\n // and then verify it's ok when enabled\n f = JsonFactory.builder()\n .enable(JsonReadFeature.ALLOW_LEADING_ZEROS_FOR_NUMBERS)\n .build();\n p = createParser(f, JSON);\n assertToken(JsonToken.VALUE_NUMBER_FLOAT, p.nextToken());\n assertEquals(String.valueOf(value), p.currentText());\n assertEquals(value, p.getDoubleValue());\n p.close();\n }",
"@Test\n public void test_ScientificNotation_0130() {\n ScientificNotation x = new ScientificNotation(BigDecimal.ZERO);\n assertEquals(0, x.significand().doubleValue(), 0);\n assertEquals(0, x.exponent());\n }",
"public static void main(String[] args) {\n\t\tdouble d = 1234567.437;\n\n\t\tDecimalFormat one = new DecimalFormat(\"###,###,###.###\");\n\t\tSystem.out.println(one.format(d)); // 1,234,567.437\n\n\t\tDecimalFormat two = new DecimalFormat(\"000,000,000.00000\");\n\t\tSystem.out.println(two.format(d)); // 001,234,567.43700\n\n\t\tDecimalFormat three = new DecimalFormat(\"$#,###,###.##\");\n\t\tSystem.out.println(three.format(d)); // $1,234,567.44\n\t}",
"@Override\n public void init(final ByteBuffer buf, final int position)\n {\n buf.putDouble(position, 0.0d);\n }",
"@Override\n\tpublic int getTotalDots() {\n\t\treturn 0;\n\t}",
"public RealNumberFormat( int iPrecision )\r\n\t{\r\n\t\tStringBuffer\tszBuffer\t= new StringBuffer( iPrecision + 1 );\r\n\r\n\t\tif( iPrecision == 0 )\r\n\t\t\tdf\t= new DecimalFormat( \"#,##0\" );\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor( ; iPrecision > 0; iPrecision-- )\r\n\t\t\t\tszBuffer.append( '0' );\r\n\t\t\tdf\t= new DecimalFormat( \"#,##0.\" + szBuffer );\r\n\t\t}\r\n\t}",
"@Override\r\n public String toString() {\r\n return (this.child == null) ? String.format(\"%.2f\", 0.0) : \r\n this.child.toString();\r\n }",
"@Test\n public void testBigDecimalConstructorDefaultCurrency() {\n new Money(new BigDecimal(\"1.231\"));\n }",
"public DecimalStyle getDecimalStyle() {\n return decimalStyle;\n }",
"String format(double balance);",
"public final void setZero() {\n \t\n\t\tthis.m00 = 0.0F;\n\t\tthis.m01 = 0.0F;\n\t\tthis.m02 = 0.0F;\n\t\tthis.m10 = 0.0F;\n\t\tthis.m11 = 0.0F;\n\t\tthis.m12 = 0.0F;\n\t\tthis.m20 = 0.0F;\n\t\tthis.m21 = 0.0F;\n\t\tthis.m22 = 0.0F;\n }",
"@Test\n public void test_ToTableFormat() {\n System.out.println(\"Testing MeasuredRatioModel's toTableFormat()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n String expResult = \"0 : 0\";\n String result = instance.toTableFormat();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),false,true);\n result = instance.toTableFormat();\n expResult=\"213 : 0.4324\";\n assertEquals(expResult, result);\n }",
"@Override\n public float getPrecision() {\n return 0.09F;\n }",
"private static String leftPadZeroes(String s, int nZeroes){\r\n if (s.indexOf(\".\") == -1) {\r\n s = String.format(\"%\" + String.valueOf(nZeroes) +\"s\", s);\r\n } else {\r\n s = String.format(\"%\" + String.valueOf(s.length() - s.indexOf(\".\") + nZeroes) +\"s\", s);\r\n }\r\n s = s.replace(\" \", \"0\");\r\n\r\n return s;\r\n }",
"public NumberColumnStringConverter() {\n super();\n DecimalFormatSymbols symbols = df.getDecimalFormatSymbols();\n patternBase = \"0\" + symbols.getDecimalSeparator() + \"0\";\n df.applyPattern(patternBase);\n }",
"public MyDouble() {\n this.setValue(0);\n }",
"public String payFormat(double pay){\n String pattern = \"###,###,##0.00\";\n DecimalFormat maxTwoDecimals = new DecimalFormat(pattern);\n return maxTwoDecimals.format(pay);\n }",
"public Balance() {\r\n value = BigDecimal.ZERO;\r\n }",
"public static BigDecimal nullToZero(BigDecimal b)\n {\n if(isEmptyDecimal(b))\n {\n return BigDecimal.ZERO;\n }\n else\n {\n return b;\n }\n }",
"void insertDecimalPoint();",
"public static String formatDouble(double value, int precision){\n\t\tString result;\n\t\tif(((int)value) > 9999 || ((int)value) < -9999){\n\t\t\tresult = new DecimalFormat(\"0.######E0\").format(value);\n\t\t}\n\t\telse\n\t\t\tresult = String.valueOf(roundDouble(value, precision));\n\t\treturn result == null ? \"-\" : result;\n\t}",
"public static String getDisplayCurrencyFormatTwoDecimalFixedAccounting(double val) {\n\n\t\tjava.text.NumberFormat format = new java.text.DecimalFormat(\n\t\t\t\t\"###,###.#\");\n\t\tformat.setMaximumFractionDigits(2);\n\t\tformat.setMinimumFractionDigits(2);\n\t\t\n\t\tif (val < 0){\n\t\t\treturn \"(\"+ format.format(val * -1) + \")\";\t\n\t\t}else{\n\t\t\treturn format.format(val);\t\n\t\t}\n\n\t}",
"public static String getDisplayCurrencyFormatSimple(double val) {\n\n\t\tjava.text.NumberFormat format = new java.text.DecimalFormat(\"#.##\");\n\t\tformat.setMaximumFractionDigits(2);\n\n\t\treturn format.format(val);\n\n\t}",
"private String nanoFormat(String amount) {\n BigDecimal amountBigDecimal;\n try {\n amountBigDecimal = new BigDecimal(sanitizeNoCommas(amount));\n } catch(NumberFormatException e) {\n return amount;\n }\n\n if (amountBigDecimal.compareTo(new BigDecimal(0)) == 0) {\n return amount;\n } else {\n String decimal;\n String whole;\n String[] split = amount.split(\"\\\\.\");\n if (split.length > 1) {\n // keep decimal length at 10 total\n whole = split[0];\n decimal = split[1];\n decimal = decimal.substring(0, Math.min(decimal.length(), MAX_NANO_DISPLAY_LENGTH));\n\n // add commas to the whole amount\n if (whole.length() > 0) {\n DecimalFormat df = new DecimalFormat(\"#,###\");\n whole = df.format(new BigDecimal(sanitizeNoCommas(whole)));\n }\n\n amount = whole + \".\" + decimal;\n } else if (split.length == 1) {\n // no decimals yet, so just add commas\n DecimalFormat df = new DecimalFormat(\"#,###\");\n amount = df.format(new BigDecimal(sanitizeNoCommas(amount)));\n }\n return amount;\n }\n }",
"public boolean isDecimal() {\n return false;\n }",
"public String format(double number);",
"public void setFormat(String format) {\n\t\tString contents = getText().trim();\n\t\tdouble value = 0;\n\t\tif (contents.length() != 0) {\n\t\t\ttry {\n\t\t\t\tvalue = parser.parse(contents).doubleValue();\n\t\t\t} catch (ParseException ex) {\n\t\t\t\tthrow new ErrorException(ex);\n\t\t\t}\n\t\t}\n\t\tformatString = format;\n\t\tif (format == null) {\n\t\t\tformatter = null;\n\t\t\tparser = NumberFormat.getNumberInstance(Locale.US);\n\t\t} else {\n\t\t\tformatter = (format.length() == 0) ? new DecimalFormat() : new DecimalFormat(format);\n\t\t\tparser = formatter;\n\t\t}\n\t\tif (contents.length() != 0) {\n\t\t\tsetValue(value);\n\t\t}\n\t}",
"public void setP0x(double parseDouble) {\n\t\t\n\t}",
"public String getDollarString()\n\t{\n\t\treturn String.format(\"%01.2f\", (float)CurrentValue/100.0f);\n\t}",
"public boolean isZero() {return false;}",
"@Override\n public String toString(Number value) {\n return String.format(\"%.1f\", -value.doubleValue());\n }",
"public void setNumDecimals(int numDecimals) {\n this.numDecimals = numDecimals;\n }",
"private String formato(String cadena){\n cadena = cadena.replaceAll(\" \",\"0\");\n return cadena;\n }",
"public static String canonicalDecimalStr(BigDecimal decimal) {\n if ( decimal.signum() == 0 )\n return \"0.0\";\n if ( decimal.scale() <= 0 )\n // No decimal part.\n return decimal.toPlainString()+\".0\";\n String str = decimal.stripTrailingZeros().toPlainString();\n // Maybe the decimal part was only zero.\n int dotIdx = str.indexOf('.') ;\n if ( dotIdx < 0 )\n // No DOT.\n str = str + \".0\";\n return str;\n }",
"public static String formatDouble(double a)\n {\n DecimalFormat f = new DecimalFormat(\"0.00\");\n\n return f.format(a, new StringBuffer(\"\"), new FieldPosition(0)).toString();\n }",
"public double inhoud() {\n return 0.0;\n }",
"public void prueba(){\r\n //Float f = Float.parseFloat(jtfValor.getText());\r\n String s = \"100.000,5\";\r\n \r\n String d = s.replace(\".\",\"\");\r\n // s.replaceAll(\",\", \".\");\r\n // s.trim();\r\n System.out.println(d);\r\n \r\n }",
"@Test\n public void setTotalIs0() throws NegativeValueException {\n cartItem.setTotal(0);\n double expected = 0;\n double actual = cartItem.getTotal();\n assertEquals(expected, actual, 0.0);\n }",
"private double formatDoubleWithTwoDeci(double value) {\r\n \treturn Math.floor(value*1e2)/1e2;\r\n }",
"public static double formatDecimalValue(double value) {\n return formatDecimalValue(value, 2);\n }",
"public static void main(String[] args) {\n\t\t double value=12.19823;\r\n\t System.out.printf(\"%.2f\", value);\r\n\r\n\t}",
"public NumberFormat getDefaultNumberFormat()\n {\n return valueRenderer.defaultNumberFormat;\n }",
"@Test\n public void setProductPriceIs0() throws NegativeValueException {\n cartItem.setProductPrice(0);\n double expected = 0;\n double actual = cartItem.getProductPrice();\n assertEquals(expected, actual, 0.0);\n }",
"@Override\r\n\tpublic float getFloat(String string) {\n\t\treturn 0;\r\n\t}"
] | [
"0.6881446",
"0.66036016",
"0.6573969",
"0.65028244",
"0.6373345",
"0.6330554",
"0.6295984",
"0.6260995",
"0.6229252",
"0.61470985",
"0.60365176",
"0.60176533",
"0.60099983",
"0.59723455",
"0.5957993",
"0.5956033",
"0.58630836",
"0.57575417",
"0.57575417",
"0.5726015",
"0.5716428",
"0.57075274",
"0.5706751",
"0.5703326",
"0.5686671",
"0.56753534",
"0.56745034",
"0.5658112",
"0.5646925",
"0.5630573",
"0.5630057",
"0.5620703",
"0.56198376",
"0.5609984",
"0.56038076",
"0.56026995",
"0.5592668",
"0.55747616",
"0.5534972",
"0.5507473",
"0.55064803",
"0.5495545",
"0.5484206",
"0.54764",
"0.5476365",
"0.5476365",
"0.5475566",
"0.5458632",
"0.54575354",
"0.544818",
"0.544764",
"0.5439204",
"0.5431123",
"0.54188764",
"0.54075664",
"0.5407063",
"0.53801346",
"0.5378447",
"0.5377628",
"0.53763217",
"0.53757167",
"0.5360923",
"0.53585523",
"0.53454995",
"0.53431433",
"0.53369534",
"0.5314306",
"0.53064",
"0.5297287",
"0.5293469",
"0.5283355",
"0.5282009",
"0.52775955",
"0.5274662",
"0.526894",
"0.52688074",
"0.5259909",
"0.52575856",
"0.5254626",
"0.52500594",
"0.5243041",
"0.52388406",
"0.5237185",
"0.52333194",
"0.52254444",
"0.5219704",
"0.52145743",
"0.521294",
"0.520012",
"0.52001077",
"0.5197464",
"0.51951575",
"0.51876324",
"0.5186246",
"0.51779014",
"0.5176935",
"0.51657134",
"0.5157957",
"0.51549953",
"0.5153732",
"0.5149527"
] | 0.0 | -1 |
Needs optimizing. TODO ALLES!!!! | public ArrayList parseQueryToGPUObject(GraphDatabaseService db, ArrayList components){
ArrayList componentsArray = new ArrayList();
for(int i = 0; i<components.size();i++){
GPU gpu = new GPU();
Transaction tx = db.beginTx();
try{
NodeProxy node = (NodeProxy) components.get(i);
//Hardware
gpu.setEan(node.getProperty("EAN").toString());
gpu.setSku(node.getProperty("SKU").toString());
gpu.setTweakersid(node.getProperty("Tweakers ID").toString());
gpu.setAantalaanbieders(node.getProperty("Aantal aanbieders").toString());
gpu.setEersteprijsvermelding(node.getProperty("Eerste prijsvermelding").toString());
gpu.setMerk(node.getProperty("Merk").toString());
gpu.setUitvoering(node.getProperty("Uitvoering").toString());
gpu.setUrl(node.getProperty("url").toString());
gpu.setIsEmpty(false);
gpu.setIsMatched(true);
//Gpu specific
gpu.setGeheugengrootte(node.getProperty("Geheugengrootte").toString());
gpu.setVideochipfabrikant(node.getProperty("Videochipfabrikant").toString());
gpu.setGeheugenbusbreedte(node.getProperty("Geheugen Busbreedte").toString());
gpu.setChipsetgeneratie(node.getProperty("Chipset generatie").toString());
gpu.setOpenglversie(node.getProperty("OpenGL versie").toString());
gpu.setTypekoeling(node.getProperty("Type koeling").toString());
gpu.setAantalslots(node.getProperty("Aantal slots").toString());
gpu.setCardinterfacevideo(node.getProperty("Card Interface (Video)").toString());
gpu.setGeheugentypevideokaarten(node.getProperty("Geheugen Type (videokaarten)").toString());
gpu.setVerkoopstatus(node.getProperty("Verkoopstatus").toString());
gpu.setAantalpinsvideokaarten(node.getProperty("Aantal pins (videokaarten)").toString());
gpu.setLinkinterface(node.getProperty("Link Interface").toString());
gpu.setNominalesnelheidvideochip(node.getProperty("Nominale snelheid videochip").toString());
gpu.setVideouit(node.getProperty("Video uit").toString());
gpu.setLengte(node.getProperty("Lengte").toString());
gpu.setMaximaleturbofrequentie(node.getProperty("Maximale turbo frequentie").toString());
gpu.setGeheugensnelheid(node.getProperty("Geheugen Snelheid").toString());
gpu.setShadermodel(node.getProperty("Shader model").toString());
gpu.setDirectxversie(node.getProperty("DirectX versie").toString());
gpu.setVideochip(node.getProperty("Videochip").toString());
gpu.setAantal6pins(node.getProperty("Aantal 6 pins").toString());
gpu.setProduct(node.getProperty("Product").toString());
tx.success();
}catch(Exception e){
gpu.setIsEmpty(true);
gpu.setIsMatched(false);
} finally {
componentsArray.add(gpu);
tx.close();
}
}
return componentsArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void cajas() {\n\t\t\n\t}",
"private void optimiseEVProfile()\n\t{\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public void method_4270() {}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void m50366E() {\n }",
"private void poetries() {\n\n\t}",
"private void kk12() {\n\n\t}",
"public void skystonePos4() {\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private static void sortingMemo() {\n\t\t\n\t}",
"private void c() {\n /*\n r14 = this;\n r12 = android.os.SystemClock.elapsedRealtime();\n r8 = r14.d();\n r0 = r14.t;\n if (r0 == 0) goto L_0x007a;\n L_0x000c:\n r0 = 1;\n r7 = r0;\n L_0x000e:\n r0 = r14.r;\n r0 = r0.a();\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n if (r7 == 0) goto L_0x007d;\n L_0x0018:\n r0 = 1;\n r10 = r0;\n L_0x001a:\n if (r10 != 0) goto L_0x0095;\n L_0x001c:\n r0 = r14.d;\n r0 = r0.b;\n if (r0 != 0) goto L_0x0028;\n L_0x0022:\n r0 = -1;\n r0 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1));\n if (r0 != 0) goto L_0x0032;\n L_0x0028:\n r0 = r14.p;\n r0 = r12 - r0;\n r2 = 2000; // 0x7d0 float:2.803E-42 double:9.88E-321;\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 <= 0) goto L_0x0095;\n L_0x0032:\n r14.p = r12;\n r0 = r14.d;\n r1 = r14.f;\n r1 = r1.size();\n r0.a = r1;\n r0 = r14.c;\n r1 = r14.f;\n r2 = r14.o;\n r4 = r14.m;\n r6 = r14.d;\n r0.getChunkOperation(r1, r2, r4, r6);\n r0 = r14.d;\n r0 = r0.a;\n r0 = r14.a(r0);\n r1 = r14.d;\n r1 = r1.b;\n if (r1 != 0) goto L_0x0080;\n L_0x0059:\n r4 = -1;\n L_0x005b:\n r0 = r14.b;\n r2 = r14.m;\n r1 = r14;\n r6 = r10;\n r0 = r0.update(r1, r2, r4, r6);\n if (r7 == 0) goto L_0x0087;\n L_0x0067:\n r0 = r14.v;\n r0 = r12 - r0;\n r2 = r14.u;\n r2 = (long) r2;\n r2 = r14.c(r2);\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 < 0) goto L_0x0079;\n L_0x0076:\n r14.e();\n L_0x0079:\n return;\n L_0x007a:\n r0 = 0;\n r7 = r0;\n goto L_0x000e;\n L_0x007d:\n r0 = 0;\n r10 = r0;\n goto L_0x001a;\n L_0x0080:\n if (r0 == 0) goto L_0x0095;\n L_0x0082:\n r4 = r14.d();\n goto L_0x005b;\n L_0x0087:\n r1 = r14.r;\n r1 = r1.a();\n if (r1 != 0) goto L_0x0079;\n L_0x008f:\n if (r0 == 0) goto L_0x0079;\n L_0x0091:\n r14.f();\n goto L_0x0079;\n L_0x0095:\n r4 = r8;\n goto L_0x005b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer.chunk.ChunkSampleSource.c():void\");\n }",
"protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public void a()\r\n/* 49: */ {\r\n/* 50: 64 */ HashSet<BlockPosition> localHashSet = Sets.newHashSet();\r\n/* 51: */ \r\n/* 52: 66 */ int m = 16;\r\n/* 53: 67 */ for (int n = 0; n < 16; n++) {\r\n/* 54: 68 */ for (int i1 = 0; i1 < 16; i1++) {\r\n/* 55: 69 */ for (int i2 = 0; i2 < 16; i2++) {\r\n/* 56: 70 */ if ((n == 0) || (n == 15) || (i1 == 0) || (i1 == 15) || (i2 == 0) || (i2 == 15))\r\n/* 57: */ {\r\n/* 58: 74 */ double d1 = n / 15.0F * 2.0F - 1.0F;\r\n/* 59: 75 */ double d2 = i1 / 15.0F * 2.0F - 1.0F;\r\n/* 60: 76 */ double d3 = i2 / 15.0F * 2.0F - 1.0F;\r\n/* 61: 77 */ double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);\r\n/* 62: */ \r\n/* 63: 79 */ d1 /= d4;\r\n/* 64: 80 */ d2 /= d4;\r\n/* 65: 81 */ d3 /= d4;\r\n/* 66: */ \r\n/* 67: 83 */ float f2 = this.i * (0.7F + this.d.rng.nextFloat() * 0.6F);\r\n/* 68: 84 */ double d6 = this.e;\r\n/* 69: 85 */ double d8 = this.f;\r\n/* 70: 86 */ double d10 = this.g;\r\n/* 71: */ \r\n/* 72: 88 */ float f3 = 0.3F;\r\n/* 73: 89 */ while (f2 > 0.0F)\r\n/* 74: */ {\r\n/* 75: 90 */ BlockPosition localdt = new BlockPosition(d6, d8, d10);\r\n/* 76: 91 */ Block localbec = this.d.getBlock(localdt);\r\n/* 77: 93 */ if (localbec.getType().getMaterial() != Material.air)\r\n/* 78: */ {\r\n/* 79: 94 */ float f4 = this.h != null ? this.h.a(this, this.d, localdt, localbec) : localbec.getType().a((Entity)null);\r\n/* 80: 95 */ f2 -= (f4 + 0.3F) * 0.3F;\r\n/* 81: */ }\r\n/* 82: 98 */ if ((f2 > 0.0F) && ((this.h == null) || (this.h.a(this, this.d, localdt, localbec, f2)))) {\r\n/* 83: 99 */ localHashSet.add(localdt);\r\n/* 84: */ }\r\n/* 85:102 */ d6 += d1 * 0.300000011920929D;\r\n/* 86:103 */ d8 += d2 * 0.300000011920929D;\r\n/* 87:104 */ d10 += d3 * 0.300000011920929D;\r\n/* 88:105 */ f2 -= 0.225F;\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94:111 */ this.j.addAll(localHashSet);\r\n/* 95: */ \r\n/* 96:113 */ float f1 = this.i * 2.0F;\r\n/* 97: */ \r\n/* 98:115 */ int i1 = MathUtils.floor(this.e - f1 - 1.0D);\r\n/* 99:116 */ int i2 = MathUtils.floor(this.e + f1 + 1.0D);\r\n/* 100:117 */ int i3 = MathUtils.floor(this.f - f1 - 1.0D);\r\n/* 101:118 */ int i4 = MathUtils.floor(this.f + f1 + 1.0D);\r\n/* 102:119 */ int i5 = MathUtils.floor(this.g - f1 - 1.0D);\r\n/* 103:120 */ int i6 = MathUtils.floor(this.g + f1 + 1.0D);\r\n/* 104:121 */ List<Entity> localList = this.d.b(this.h, new AABB(i1, i3, i5, i2, i4, i6));\r\n/* 105:122 */ Vec3 localbrw = new Vec3(this.e, this.f, this.g);\r\n/* 106:124 */ for (int i7 = 0; i7 < localList.size(); i7++)\r\n/* 107: */ {\r\n/* 108:125 */ Entity localwv = (Entity)localList.get(i7);\r\n/* 109:126 */ if (!localwv.aV())\r\n/* 110: */ {\r\n/* 111:129 */ double d5 = localwv.f(this.e, this.f, this.g) / f1;\r\n/* 112:131 */ if (d5 <= 1.0D)\r\n/* 113: */ {\r\n/* 114:132 */ double d7 = localwv.xPos - this.e;\r\n/* 115:133 */ double d9 = localwv.yPos + localwv.getEyeHeight() - this.f;\r\n/* 116:134 */ double d11 = localwv.zPos - this.g;\r\n/* 117: */ \r\n/* 118:136 */ double d12 = MathUtils.sqrt(d7 * d7 + d9 * d9 + d11 * d11);\r\n/* 119:137 */ if (d12 != 0.0D)\r\n/* 120: */ {\r\n/* 121:141 */ d7 /= d12;\r\n/* 122:142 */ d9 /= d12;\r\n/* 123:143 */ d11 /= d12;\r\n/* 124: */ \r\n/* 125:145 */ double d13 = this.d.a(localbrw, localwv.getAABB());\r\n/* 126:146 */ double d14 = (1.0D - d5) * d13;\r\n/* 127:147 */ localwv.receiveDamage(DamageSource.a(this), (int)((d14 * d14 + d14) / 2.0D * 8.0D * f1 + 1.0D));\r\n/* 128: */ \r\n/* 129:149 */ double d15 = EnchantmentProtection.a(localwv, d14);\r\n/* 130:150 */ localwv.xVelocity += d7 * d15;\r\n/* 131:151 */ localwv.yVelocity += d9 * d15;\r\n/* 132:152 */ localwv.zVelocity += d11 * d15;\r\n/* 133:154 */ if ((localwv instanceof EntityPlayer)) {\r\n/* 134:155 */ this.k.put((EntityPlayer)localwv, new Vec3(d7 * d14, d9 * d14, d11 * d14));\r\n/* 135: */ }\r\n/* 136: */ }\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139: */ }\r\n/* 140: */ }",
"public void skystonePos6() {\n }",
"public void gored() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"private void m50367F() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo12628c() {\n }",
"private final void m11968d() {\n synchronized (this.f10173g) {\n for (zzsk a : this.f10174h) {\n a.m11971a();\n }\n }\n }",
"StackManipulation cached();",
"private void strin() {\n\n\t}",
"private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n OutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n for (i = 0; i < 32; i++) {\n byteArrayOutputStream.write(0);\n }\n int[] iArr = new int[(width - 2)];\n bitmap.getPixels(iArr, 0, width, 1, 0, width - 2, 1);\n Object obj = iArr[0] == -16777216 ? 1 : null;\n Object obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n int length = iArr.length;\n width = 0;\n int i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n int i5 = i4;\n int i6 = i5 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i3 = i - 1;\n } else {\n i3 = i;\n }\n iArr = new int[(height - 2)];\n bitmap.getPixels(iArr, 0, 1, 0, 1, 1, height - 2);\n obj = iArr[0] == -16777216 ? 1 : null;\n obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n length = iArr.length;\n width = 0;\n i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n i6 = i4 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i--;\n }\n for (i6 = 0; i6 < i3 * i; i6++) {\n C5225r.m17788a(byteArrayOutputStream, 1);\n }\n byte[] toByteArray = byteArrayOutputStream.toByteArray();\n toByteArray[0] = (byte) 1;\n toByteArray[1] = (byte) i5;\n toByteArray[2] = (byte) i4;\n toByteArray[3] = (byte) (i * i3);\n C5225r.m17787a(bitmap, toByteArray);\n return toByteArray;\n }",
"public void k()\r\n/* 238: */ {\r\n/* 239:258 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 240:259 */ if (this.a[i] != null) {\r\n/* 241:260 */ this.a[i].a(this.d.o, this.d, i, this.c == i);\r\n/* 242: */ }\r\n/* 243: */ }\r\n/* 244: */ }",
"@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}",
"private void method_4318() {\r\n String[] var1;\r\n int var11;\r\n label68: {\r\n var1 = class_752.method_4253();\r\n class_758 var10000 = this;\r\n if(var1 != null) {\r\n if(this.field_3417 != null) {\r\n label71: {\r\n var11 = this.field_3417.field_3012;\r\n if(var1 != null) {\r\n if(this.field_3417.field_3012) {\r\n var10000 = this;\r\n if(var1 != null) {\r\n if(!this.field_2990.field_1832) {\r\n this.method_409(this.field_3404, class_1691.method_9334((class_1036)null), 10.0F);\r\n }\r\n\r\n var10000 = this;\r\n }\r\n\r\n var10000.field_3417 = null;\r\n if(var1 != null) {\r\n break label71;\r\n }\r\n }\r\n\r\n var11 = this.field_3029 % 10;\r\n }\r\n\r\n if(var1 == null) {\r\n break label68;\r\n }\r\n\r\n if(var11 == 0) {\r\n float var13;\r\n var11 = (var13 = this.method_406() - this.method_405()) == 0.0F?0:(var13 < 0.0F?-1:1);\r\n if(var1 == null) {\r\n break label68;\r\n }\r\n\r\n if(var11 < 0) {\r\n this.method_4188(this.method_406() + 1.0F);\r\n }\r\n }\r\n }\r\n }\r\n\r\n var10000 = this;\r\n }\r\n\r\n var11 = var10000.field_3028.nextInt(10);\r\n }\r\n\r\n if(var11 == 0) {\r\n float var2 = 32.0F;\r\n List var3 = this.field_2990.method_2157(class_705.class, this.field_3004.method_7097((double)var2, (double)var2, (double)var2));\r\n class_705 var4 = null;\r\n double var5 = Double.MAX_VALUE;\r\n Iterator var7 = var3.iterator();\r\n\r\n while(true) {\r\n if(var7.hasNext()) {\r\n class_705 var8 = (class_705)var7.next();\r\n double var9 = var8.method_3891(this);\r\n if(var1 == null) {\r\n break;\r\n }\r\n\r\n label43: {\r\n double var12 = var9;\r\n if(var1 != null) {\r\n if(var9 >= var5) {\r\n break label43;\r\n }\r\n\r\n var12 = var9;\r\n }\r\n\r\n var5 = var12;\r\n var4 = var8;\r\n }\r\n\r\n if(var1 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.field_3417 = var4;\r\n break;\r\n }\r\n }\r\n\r\n }",
"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: */ }",
"private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }",
"@Override\n public void perish() {\n \n }",
"private static void m148172a(EditPreviewInfo editPreviewInfo, String[] strArr, long[] jArr, long[] jArr2, float[] fArr, long[] jArr3) {\n for (int i = 0; i < editPreviewInfo.getVideoList().size(); i++) {\n EditVideoSegment editVideoSegment = (EditVideoSegment) editPreviewInfo.getVideoList().get(i);\n strArr[i] = editVideoSegment.getVideoPath();\n if (editVideoSegment.getVideoCutInfo() != null) {\n VideoCutInfo videoCutInfo = editVideoSegment.getVideoCutInfo();\n jArr[i] = videoCutInfo.getStart();\n jArr2[i] = videoCutInfo.getEnd();\n fArr[i] = videoCutInfo.getSpeed();\n } else {\n jArr[i] = -1;\n jArr2[i] = -1;\n fArr[i] = 1.0f;\n }\n }\n if (editPreviewInfo.getSceneIn() > 0 || editPreviewInfo.getSceneOut() > 0) {\n jArr3[0] = editPreviewInfo.getSceneIn();\n jArr3[1] = editPreviewInfo.getSceneOut();\n return;\n }\n jArr3[0] = -1;\n jArr3[1] = -1;\n }",
"@Override\r\n\tprotected void processCost() {\n\r\n\t}",
"private static void iterator() {\n\t\t\r\n\t}",
"protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }",
"public void m17237a(java.util.List<java.lang.Integer> r6) {\n /*\n r5 = this;\n r0 = 0;\n if (r6 == 0) goto L_0x0009;\n L_0x0003:\n r1 = r6.size();\n if (r1 != 0) goto L_0x000a;\n L_0x0009:\n return;\n L_0x000a:\n r1 = r5.f20994d;\n r1.lock();\n r2 = r5.m17234d();\n r1 = \"\";\n L_0x0016:\n r3 = r6.size();\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n if (r0 >= r3) goto L_0x003b;\n L_0x001c:\n r3 = new java.lang.StringBuilder;\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r3.<init>();\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r1 = r3.append(r1);\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r3 = r6.get(r0);\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r1 = r1.append(r3);\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r3 = \",\";\n r1 = r1.append(r3);\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r1 = r1.toString();\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r0 = r0 + 1;\n goto L_0x0016;\n L_0x003b:\n r0 = r1.length();\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n if (r0 <= 0) goto L_0x006e;\n L_0x0041:\n r0 = 0;\n r3 = r1.length();\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r3 = r3 + -1;\n r0 = r1.substring(r0, r3);\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r1 = \"result\";\n r3 = new java.lang.StringBuilder;\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r3.<init>();\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r4 = \"_id in (\";\n r3 = r3.append(r4);\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r0 = r3.append(r0);\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r3 = \")\";\n r0 = r0.append(r3);\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r0 = r0.toString();\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n r3 = 0;\n r2.delete(r1, r0, r3);\t Catch:{ SQLiteException -> 0x0077, IllegalStateException -> 0x00a0, Exception -> 0x00c9 }\n L_0x006e:\n r2.close();\n r0 = r5.f20994d;\n r0.unlock();\n goto L_0x0009;\n L_0x0077:\n r0 = move-exception;\n r1 = \"SynthesizeResultDb\";\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<init>();\t Catch:{ all -> 0x00f2 }\n r4 = \"exception:\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r0 = r0.toString();\t Catch:{ all -> 0x00f2 }\n r0 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r0 = r0.toString();\t Catch:{ all -> 0x00f2 }\n com.baidu.tts.chainofresponsibility.logger.LoggerProxy.m17001d(r1, r0);\t Catch:{ all -> 0x00f2 }\n r2.close();\n r0 = r5.f20994d;\n r0.unlock();\n goto L_0x0009;\n L_0x00a0:\n r0 = move-exception;\n r1 = \"SynthesizeResultDb\";\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<init>();\t Catch:{ all -> 0x00f2 }\n r4 = \"exception:\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r0 = r0.toString();\t Catch:{ all -> 0x00f2 }\n r0 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r0 = r0.toString();\t Catch:{ all -> 0x00f2 }\n com.baidu.tts.chainofresponsibility.logger.LoggerProxy.m17001d(r1, r0);\t Catch:{ all -> 0x00f2 }\n r2.close();\n r0 = r5.f20994d;\n r0.unlock();\n goto L_0x0009;\n L_0x00c9:\n r0 = move-exception;\n r1 = \"SynthesizeResultDb\";\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<init>();\t Catch:{ all -> 0x00f2 }\n r4 = \"exception:\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r0 = r0.toString();\t Catch:{ all -> 0x00f2 }\n r0 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r0 = r0.toString();\t Catch:{ all -> 0x00f2 }\n com.baidu.tts.chainofresponsibility.logger.LoggerProxy.m17001d(r1, r0);\t Catch:{ all -> 0x00f2 }\n r2.close();\n r0 = r5.f20994d;\n r0.unlock();\n goto L_0x0009;\n L_0x00f2:\n r0 = move-exception;\n r2.close();\n r1 = r5.f20994d;\n r1.unlock();\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.baidu.tts.e.c.a(java.util.List):void\");\n }",
"protected void mo6255a() {\n }",
"public void skystonePos3() {\n }",
"public void mo21877s() {\n }",
"public com.yandex.metrica.impl.bc.c H() {\n /*\n r9 = this;\n r0 = 0\n android.database.Cursor r1 = r9.I() // Catch:{ Exception -> 0x0048, all -> 0x003f }\n if (r1 == 0) goto L_0x0013\n boolean r2 = r1.moveToFirst() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n if (r2 == 0) goto L_0x0013\n int r2 = r1.getCount() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n if (r2 != 0) goto L_0x0049\n L_0x0013:\n com.yandex.metrica.impl.ob.fo r2 = r9.m // Catch:{ Exception -> 0x0049, all -> 0x003d }\n long r3 = r9.D() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n com.yandex.metrica.impl.ob.en r5 = com.yandex.metrica.impl.ob.en.BACKGROUND // Catch:{ Exception -> 0x0049, all -> 0x003d }\n android.database.Cursor r0 = r2.a((long) r3, (com.yandex.metrica.impl.ob.en) r5) // Catch:{ Exception -> 0x0049, all -> 0x003d }\n if (r0 == 0) goto L_0x0049\n boolean r2 = r0.moveToFirst() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n if (r2 == 0) goto L_0x0049\n int r2 = r0.getCount() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n if (r2 <= 0) goto L_0x0049\n com.yandex.metrica.impl.ob.fo r3 = r9.m // Catch:{ Exception -> 0x0049, all -> 0x003d }\n long r4 = r9.D() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n com.yandex.metrica.impl.ob.en r6 = com.yandex.metrica.impl.ob.en.BACKGROUND // Catch:{ Exception -> 0x0049, all -> 0x003d }\n long r7 = java.lang.System.currentTimeMillis() // Catch:{ Exception -> 0x0049, all -> 0x003d }\n r3.a((long) r4, (com.yandex.metrica.impl.ob.en) r6, (long) r7) // Catch:{ Exception -> 0x0049, all -> 0x003d }\n goto L_0x0049\n L_0x003d:\n r2 = move-exception\n goto L_0x0041\n L_0x003f:\n r2 = move-exception\n r1 = r0\n L_0x0041:\n com.yandex.metrica.impl.bv.a((android.database.Cursor) r1)\n com.yandex.metrica.impl.bv.a((android.database.Cursor) r0)\n throw r2\n L_0x0048:\n r1 = r0\n L_0x0049:\n com.yandex.metrica.impl.bv.a((android.database.Cursor) r1)\n com.yandex.metrica.impl.bv.a((android.database.Cursor) r0)\n com.yandex.metrica.impl.bc$c r0 = super.H()\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.yandex.metrica.impl.bd.H():com.yandex.metrica.impl.bc$c\");\n }",
"public void skystonePos2() {\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public int zzz() {\n int i;\n int i2 = 0;\n int zzz = super.zzz();\n if (this.zzbuR != 0) {\n zzz += zzsn.zzd(1, this.zzbuR);\n }\n if (!this.tag.equals(\"\")) {\n zzz += zzsn.zzo(2, this.tag);\n }\n if (this.zzbuW != null && this.zzbuW.length > 0) {\n i = zzz;\n for (zzsu zzsu : this.zzbuW) {\n if (zzsu != null) {\n i += zzsn.zzc(3, zzsu);\n }\n }\n zzz = i;\n }\n if (!Arrays.equals(this.zzbuY, zzsx.zzbuD)) {\n zzz += zzsn.zzb(6, this.zzbuY);\n }\n if (this.zzbvb != null) {\n zzz += zzsn.zzc(7, this.zzbvb);\n }\n if (!Arrays.equals(this.zzbuZ, zzsx.zzbuD)) {\n zzz += zzsn.zzb(8, this.zzbuZ);\n }\n if (this.zzbuX != null) {\n zzz += zzsn.zzc(9, this.zzbuX);\n }\n if (this.zzbuV) {\n zzz += zzsn.zzf(10, this.zzbuV);\n }\n if (this.zzbuU != 0) {\n zzz += zzsn.zzC(11, this.zzbuU);\n }\n if (this.zzob != 0) {\n zzz += zzsn.zzC(12, this.zzob);\n }\n if (!Arrays.equals(this.zzbva, zzsx.zzbuD)) {\n zzz += zzsn.zzb(13, this.zzbva);\n }\n if (!this.zzbvc.equals(\"\")) {\n zzz += zzsn.zzo(14, this.zzbvc);\n }\n if (this.zzbvd != 180000) {\n zzz += zzsn.zze(15, this.zzbvd);\n }\n if (this.zzbve != null) {\n zzz += zzsn.zzc(16, this.zzbve);\n }\n if (this.zzbuS != 0) {\n zzz += zzsn.zzd(17, this.zzbuS);\n }\n if (!Arrays.equals(this.zzbvf, zzsx.zzbuD)) {\n zzz += zzsn.zzb(18, this.zzbvf);\n }\n if (this.zzbvg != 0) {\n zzz += zzsn.zzC(19, this.zzbvg);\n }\n if (this.zzbvh != null && this.zzbvh.length > 0) {\n i = 0;\n while (i2 < this.zzbvh.length) {\n i += zzsn.zzmx(this.zzbvh[i2]);\n i2++;\n }\n zzz = (zzz + i) + (this.zzbvh.length * 2);\n }\n if (this.zzbuT != 0) {\n zzz += zzsn.zzd(21, this.zzbuT);\n }\n return this.zzbvi != 0 ? zzz + zzsn.zzd(22, this.zzbvi) : zzz;\n }",
"public void mo4359a() {\n }",
"public void skystonePos5() {\n }",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"protected abstract Set method_1559();",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private void m1do() {\n for (int i = 0; i < 2; i++) {\n this.my[i] = null;\n }\n for (int i2 = 0; i2 < 2; i2++) {\n this.mz[i2] = 0;\n }\n this.mC = 0.0d;\n this.lf = 0;\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private void method_2242() {\r\n this.field_1824.method_6863(0);\r\n this.field_1824.method_6861(false);\r\n this.field_1824.method_6859(0);\r\n this.field_1824.method_6857(false);\r\n }",
"public abstract long mo9229aD();",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private void iterativeDataPropertyMetrics() {\n\t}",
"private c a(c blk, int i) {\n/* 450 */ int w = blk.g;\n/* 451 */ int h = blk.h;\n/* */ \n/* */ \n/* */ \n/* 455 */ if (i >= 0 && i <= 2) {\n/* */ int j;\n/* 457 */ if (blk.a() != 3) {\n/* 458 */ if (this.j == null || this.j.a() != 3) {\n/* 459 */ this.j = (c)new e();\n/* */ }\n/* 461 */ this.j.g = w;\n/* 462 */ this.j.h = h;\n/* 463 */ this.j.e = blk.e;\n/* 464 */ this.j.f = blk.f;\n/* 465 */ blk = this.j;\n/* */ } \n/* */ \n/* */ \n/* 469 */ int[] outdata = (int[])blk.b();\n/* */ \n/* */ \n/* 472 */ if (outdata == null || outdata.length < h * w) {\n/* 473 */ outdata = new int[h * w];\n/* 474 */ blk.a(outdata);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 480 */ if (this.m == null)\n/* 481 */ this.m = new e(); \n/* 482 */ if (this.n == null)\n/* 483 */ this.n = new e(); \n/* 484 */ if (this.o == null)\n/* 485 */ this.o = new e(); \n/* 486 */ this.o.g = blk.g;\n/* 487 */ this.o.h = blk.h;\n/* 488 */ this.o.e = blk.e;\n/* 489 */ this.o.f = blk.f;\n/* */ \n/* */ \n/* */ \n/* 493 */ this.m = (e)this.e.getInternCompData((c)this.m, 0);\n/* 494 */ int[] data0 = (int[])this.m.b();\n/* 495 */ this.n = (e)this.e.getInternCompData((c)this.n, 1);\n/* 496 */ int[] data1 = (int[])this.n.b();\n/* 497 */ this.o = (e)this.e.getInternCompData((c)this.o, 2);\n/* 498 */ int[] bdata = (int[])this.o.b();\n/* */ \n/* */ \n/* 501 */ blk.k = (this.m.k || this.n.k || this.o.k);\n/* */ \n/* 503 */ blk.i = 0;\n/* 504 */ blk.j = w;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 509 */ int k = w * h - 1;\n/* 510 */ int k0 = this.m.i + (h - 1) * this.m.j + w - 1;\n/* 511 */ int k1 = this.n.i + (h - 1) * this.n.j + w - 1;\n/* 512 */ int k2 = this.o.i + (h - 1) * this.o.j + w - 1;\n/* */ \n/* 514 */ switch (i) {\n/* */ case 0:\n/* 516 */ for (j = h - 1; j >= 0; j--) {\n/* 517 */ for (int mink = k - w; k > mink; k--, k0--, k1--, k2--)\n/* */ {\n/* */ \n/* 520 */ outdata[k] = data0[k] + 2 * data1[k] + bdata[k] >> 2;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 525 */ k0 -= this.m.j - w;\n/* 526 */ k1 -= this.n.j - w;\n/* 527 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ \n/* */ case 1:\n/* 532 */ for (j = h - 1; j >= 0; j--) {\n/* 533 */ for (int mink = k - w; k > mink; k--, k1--, k2--)\n/* */ {\n/* */ \n/* 536 */ outdata[k] = bdata[k2] - data1[k1];\n/* */ }\n/* */ \n/* 539 */ k1 -= this.n.j - w;\n/* 540 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ \n/* */ case 2:\n/* 545 */ for (j = h - 1; j >= 0; j--) {\n/* 546 */ for (int mink = k - w; k > mink; k--, k0--, k1--)\n/* */ {\n/* */ \n/* 549 */ outdata[k] = data0[k0] - data1[k1];\n/* */ }\n/* */ \n/* 552 */ k0 -= this.m.j - w;\n/* 553 */ k1 -= this.n.j - w;\n/* */ } \n/* */ break;\n/* */ } \n/* */ \n/* */ } else {\n/* 559 */ if (i >= 3)\n/* */ {\n/* */ \n/* 562 */ return this.e.getInternCompData(blk, i);\n/* */ }\n/* */ \n/* */ \n/* 566 */ throw new IllegalArgumentException();\n/* */ } \n/* 568 */ return blk;\n/* */ }",
"private c b(c blk, int i) {\n/* 585 */ int w = blk.g;\n/* 586 */ int h = blk.h;\n/* */ \n/* */ \n/* 589 */ if (blk.a() != 4) {\n/* 590 */ if (this.j == null || this.j.a() != 4) {\n/* 591 */ this.j = (c)new d();\n/* */ }\n/* 593 */ this.j.g = w;\n/* 594 */ this.j.h = h;\n/* 595 */ this.j.e = blk.e;\n/* 596 */ this.j.f = blk.f;\n/* 597 */ blk = this.j;\n/* */ } \n/* */ \n/* */ \n/* 601 */ float[] outdata = (float[])blk.b();\n/* */ \n/* */ \n/* 604 */ if (outdata == null || outdata.length < w * h) {\n/* 605 */ outdata = new float[h * w];\n/* 606 */ blk.a(outdata);\n/* */ } \n/* */ \n/* */ \n/* 610 */ if (i >= 0 && i <= 2) {\n/* */ int j;\n/* */ \n/* */ \n/* 614 */ if (this.m == null)\n/* 615 */ this.m = new e(); \n/* 616 */ if (this.n == null)\n/* 617 */ this.n = new e(); \n/* 618 */ if (this.o == null)\n/* 619 */ this.o = new e(); \n/* 620 */ this.o.g = blk.g;\n/* 621 */ this.o.h = blk.h;\n/* 622 */ this.o.e = blk.e;\n/* 623 */ this.o.f = blk.f;\n/* */ \n/* */ \n/* 626 */ this.m = (e)this.e.getInternCompData((c)this.m, 0);\n/* 627 */ int[] data0 = (int[])this.m.b();\n/* 628 */ this.n = (e)this.e.getInternCompData((c)this.n, 1);\n/* 629 */ int[] data1 = (int[])this.n.b();\n/* 630 */ this.o = (e)this.e.getInternCompData((c)this.o, 2);\n/* 631 */ int[] data2 = (int[])this.o.b();\n/* */ \n/* */ \n/* 634 */ blk.k = (this.m.k || this.n.k || this.o.k);\n/* */ \n/* 636 */ blk.i = 0;\n/* 637 */ blk.j = w;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 642 */ int k = w * h - 1;\n/* 643 */ int k0 = this.m.i + (h - 1) * this.m.j + w - 1;\n/* 644 */ int k1 = this.n.i + (h - 1) * this.n.j + w - 1;\n/* 645 */ int k2 = this.o.i + (h - 1) * this.o.j + w - 1;\n/* */ \n/* 647 */ switch (i) {\n/* */ \n/* */ case 0:\n/* 650 */ for (j = h - 1; j >= 0; j--) {\n/* 651 */ for (int mink = k - w; k > mink; k--, k0--, k1--, k2--) {\n/* 652 */ outdata[k] = 0.299F * data0[k0] + 0.587F * data1[k1] + 0.114F * data2[k2];\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 658 */ k0 -= this.m.j - w;\n/* 659 */ k1 -= this.n.j - w;\n/* 660 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ \n/* */ \n/* */ case 1:\n/* 666 */ for (j = h - 1; j >= 0; j--) {\n/* 667 */ for (int mink = k - w; k > mink; k--, k0--, k1--, k2--) {\n/* 668 */ outdata[k] = -0.16875F * data0[k0] - 0.33126F * data1[k1] + 0.5F * data2[k2];\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 674 */ k0 -= this.m.j - w;\n/* 675 */ k1 -= this.n.j - w;\n/* 676 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ \n/* */ \n/* */ case 2:\n/* 682 */ for (j = h - 1; j >= 0; j--) {\n/* 683 */ for (int mink = k - w; k > mink; k--, k0--, k1--, k2--) {\n/* 684 */ outdata[k] = 0.5F * data0[k0] - 0.41869F * data1[k1] - 0.08131F * data2[k2];\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 690 */ k0 -= this.m.j - w;\n/* 691 */ k1 -= this.n.j - w;\n/* 692 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ } \n/* */ } else {\n/* 697 */ if (i >= 3) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 702 */ e indb = new e(blk.e, blk.f, w, h);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 707 */ this.e.getInternCompData((c)indb, i);\n/* 708 */ int[] indata = (int[])indb.b();\n/* */ \n/* */ \n/* 711 */ int k = w * h - 1;\n/* 712 */ int k0 = indb.i + (h - 1) * indb.j + w - 1;\n/* 713 */ for (int j = h - 1; j >= 0; j--) {\n/* 714 */ for (int mink = k - w; k > mink; k--, k0--) {\n/* 715 */ outdata[k] = indata[k0];\n/* */ }\n/* */ \n/* 718 */ k0 += indb.g - w;\n/* */ } \n/* */ \n/* */ \n/* 722 */ blk.k = indb.k;\n/* 723 */ blk.i = 0;\n/* 724 */ blk.j = w;\n/* 725 */ return blk;\n/* */ } \n/* */ \n/* */ \n/* 729 */ throw new IllegalArgumentException();\n/* */ } \n/* 731 */ return blk;\n/* */ }",
"public abstract void mo70713b();",
"void m63701b() {\n for (C17455a a : this.f53839c) {\n a.m63704a();\n }\n }",
"public void mo21794S() {\n }",
"private SBomCombiner()\n\t{}",
"@SuppressWarnings(\"serial\")\r\n\tprivate void fcbuild() {\n\t\tfor (int i = 0; i < keys.size(); i++) {\r\n\t\t\tString s = keys.get(i);\r\n\t\t\tfc.add(new ArrayList<String>() {\r\n\t\t\t\t{\r\n\t\t\t\t\tadd(sharedV.get(s).get(0));\r\n\t\t\t\t\tadd(s);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < sharedV.size(); i++) {\r\n\t\t\tfor (int j = i + 1; j < sharedV.size(); j++) {\r\n\t\t\t\tif (sharedV.get(keys.get(i)).containsAll(sharedV.get(keys.get(j)))\r\n\t\t\t\t\t\t&& sharedV.get(keys.get(j)).containsAll(sharedV.get(keys.get(i)))) {\r\n\r\n\t\t\t\t\tString s = sharedV.get(keys.get(i)).get(0); // c1\r\n\t\t\t\t\tint ii = i;\r\n\t\t\t\t\tint jj = j;\r\n\t\t\t\t\tfc.add(new ArrayList<String>() {\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tadd(s);\r\n\t\t\t\t\t\t\tadd(keys.get(ii));\r\n\t\t\t\t\t\t\tadd(keys.get(jj));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\toptimizefc();\r\n\r\n\t}",
"private final boolean e() {\n /*\n r15 = this;\n r2 = 0\n r1 = 0\n dtd r0 = r15.m // Catch:{ all -> 0x008e }\n if (r0 != 0) goto L_0x000d\n dtd r0 = new dtd // Catch:{ all -> 0x008e }\n r0.<init>() // Catch:{ all -> 0x008e }\n r15.m = r0 // Catch:{ all -> 0x008e }\n L_0x000d:\n int r0 = r15.k // Catch:{ all -> 0x008e }\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x039e\n dvk r3 = r15.g // Catch:{ all -> 0x008e }\n if (r3 == 0) goto L_0x0356\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 == 0) goto L_0x0025\n int r3 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != r4) goto L_0x0032\n L_0x0025:\n r3 = 2097152(0x200000, float:2.938736E-39)\n int r3 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = new byte[r3] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r15.h = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r15.i = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0032:\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r4\n int r6 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r7 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r8 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r9 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n boolean r0 = r7.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x00ac\n r0 = 1\n L_0x0047:\n java.lang.String r3 = \"GzipInflatingBuffer is closed\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r0 = 1\n r5 = r3\n L_0x004f:\n if (r0 == 0) goto L_0x02ef\n int r3 = r6 - r5\n if (r3 <= 0) goto L_0x02ef\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.ordinal() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n switch(r0) {\n case 0: goto L_0x00ae;\n case 1: goto L_0x0148;\n case 2: goto L_0x0171;\n case 3: goto L_0x01d7;\n case 4: goto L_0x01fc;\n case 5: goto L_0x0221;\n case 6: goto L_0x0256;\n case 7: goto L_0x0289;\n case 8: goto L_0x02a2;\n case 9: goto L_0x02e9;\n default: goto L_0x005e;\n } // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x005e:\n java.lang.AssertionError r0 = new java.lang.AssertionError // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4 + 15\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5.<init>(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = \"Invalid state: \"\n java.lang.StringBuilder r4 = r5.append(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.StringBuilder r3 = r4.append(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = r3.toString() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0087:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x008e:\n r0 = move-exception\n if (r2 <= 0) goto L_0x00ab\n dxe r3 = r15.a\n r3.a(r2)\n dxh r3 = r15.j\n dxh r4 = defpackage.dxh.BODY\n if (r3 != r4) goto L_0x00ab\n dvk r3 = r15.g\n if (r3 == 0) goto L_0x03c9\n dzo r2 = r15.d\n long r4 = (long) r1\n r2.d(r4)\n int r2 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n L_0x00ab:\n throw r0\n L_0x00ac:\n r0 = 0\n goto L_0x0047\n L_0x00ae:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x00ba\n r0 = 0\n goto L_0x004f\n L_0x00ba:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 35615(0x8b1f, float:4.9907E-41)\n if (r0 == r3) goto L_0x00d4\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Not in GZIP format\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00cd:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x00d4:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 8\n if (r0 == r3) goto L_0x00e6\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Unsupported compression method\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00e6:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.j = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvl r4 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 6\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r10.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r10\n if (r3 <= 0) goto L_0x03d9\n r0 = 6\n int r0 = java.lang.Math.min(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r10 = r10.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r11 = r11.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r10, r11, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = 6 - r0\n r3 = r0\n L_0x0118:\n if (r3 <= 0) goto L_0x013b\n r0 = 512(0x200, float:7.175E-43)\n byte[] r10 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x011f:\n if (r0 >= r3) goto L_0x013b\n int r11 = r3 - r0\n r12 = 512(0x200, float:7.175E-43)\n int r11 = java.lang.Math.min(r11, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r12 = r12.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.a(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r12 = r12.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.update(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r11\n goto L_0x011f\n L_0x013b:\n dvk r0 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 6\n defpackage.dvk.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA_LEN // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0148:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 4\n r3 = 4\n if (r0 == r3) goto L_0x0156\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0156:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0162\n r0 = 0\n goto L_0x004f\n L_0x0162:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.k = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0171:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 >= r3) goto L_0x017e\n r0 = 0\n goto L_0x004f\n L_0x017e:\n dvl r10 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x03d6\n int r0 = java.lang.Math.min(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r11 = r11.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r12 = r12.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r11, r12, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r4 - r0\n r3 = r0\n L_0x01a8:\n if (r3 <= 0) goto L_0x01cb\n r0 = 512(0x200, float:7.175E-43)\n byte[] r11 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x01af:\n if (r0 >= r3) goto L_0x01cb\n int r12 = r3 - r0\n r13 = 512(0x200, float:7.175E-43)\n int r12 = java.lang.Math.min(r12, r13) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r13 = r13.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.a(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r13 = r13.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.update(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r12\n goto L_0x01af\n L_0x01cb:\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.b(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01d7:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 8\n r3 = 8\n if (r0 != r3) goto L_0x01f5\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x01e1:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x01f3\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x01e1\n r0 = 1\n L_0x01ee:\n if (r0 != 0) goto L_0x01f5\n r0 = 0\n goto L_0x004f\n L_0x01f3:\n r0 = 0\n goto L_0x01ee\n L_0x01f5:\n dvm r0 = defpackage.dvm.HEADER_COMMENT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01fc:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 16\n r3 = 16\n if (r0 != r3) goto L_0x021a\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0206:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x0218\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x0206\n r0 = 1\n L_0x0213:\n if (r0 != 0) goto L_0x021a\n r0 = 0\n goto L_0x004f\n L_0x0218:\n r0 = 0\n goto L_0x0213\n L_0x021a:\n dvm r0 = defpackage.dvm.HEADER_CRC // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0221:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 2\n r3 = 2\n if (r0 != r3) goto L_0x024f\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0234\n r0 = 0\n goto L_0x004f\n L_0x0234:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n long r10 = r0.getValue() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = (int) r10 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 65535(0xffff, float:9.1834E-41)\n r0 = r0 & r3\n dvl r3 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == r3) goto L_0x024f\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Corrupt GZIP header\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x024f:\n dvm r0 = defpackage.dvm.INITIALIZE_INFLATER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0256:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x027e\n java.util.zip.Inflater r0 = new java.util.zip.Inflater // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 1\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.g = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0262:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x0284\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x027b:\n r0 = 1\n goto L_0x004f\n L_0x027e:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x0262\n L_0x0284:\n dvm r0 = defpackage.dvm.INFLATER_NEEDS_INPUT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x027b\n L_0x0289:\n int r0 = r9 + r5\n int r0 = r7.a(r8, r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r5 + r0\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r4 = defpackage.dvm.TRAILER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r4) goto L_0x029e\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5 = r3\n goto L_0x004f\n L_0x029e:\n r0 = 1\n r5 = r3\n goto L_0x004f\n L_0x02a2:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == 0) goto L_0x02c7\n r0 = 1\n L_0x02a7:\n java.lang.String r3 = \"inflater is null\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x02c9\n r0 = 1\n L_0x02b3:\n java.lang.String r3 = \"inflaterInput has unconsumed bytes\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r0 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 512(0x200, float:7.175E-43)\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x02cb\n r0 = 0\n goto L_0x004f\n L_0x02c7:\n r0 = 0\n goto L_0x02a7\n L_0x02c9:\n r0 = 0\n goto L_0x02b3\n L_0x02cb:\n r3 = 0\n r7.e = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.f = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r3 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.a(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x02e9:\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x004f\n L_0x02ef:\n if (r0 == 0) goto L_0x0301\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = defpackage.dvm.HEADER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x0334\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x0334\n L_0x0301:\n r0 = 1\n L_0x0302:\n r7.n = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.l // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.l = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r2 = r2 + r3\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.m = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r1 = r1 + r3\n if (r5 != 0) goto L_0x0342\n if (r2 <= 0) goto L_0x0332\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0332\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x0336\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0332:\n r0 = 0\n L_0x0333:\n return r0\n L_0x0334:\n r0 = 0\n goto L_0x0302\n L_0x0336:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0332\n L_0x0342:\n dtd r0 = r15.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dxv r3 = defpackage.dxw.a(r3, r4, r5) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.a(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r5\n r15.i = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x000d\n L_0x0356:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n if (r3 != 0) goto L_0x0386\n if (r2 <= 0) goto L_0x0378\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0378\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x037a\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0378:\n r0 = 0\n goto L_0x0333\n L_0x037a:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0378\n L_0x0386:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ all -> 0x008e }\n int r2 = r2 + r0\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n dtd r4 = r15.n // Catch:{ all -> 0x008e }\n dxv r0 = r4.a(r0) // Catch:{ all -> 0x008e }\n dtd r0 = (defpackage.dtd) r0 // Catch:{ all -> 0x008e }\n r3.a(r0) // Catch:{ all -> 0x008e }\n goto L_0x000d\n L_0x039e:\n if (r2 <= 0) goto L_0x03ba\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x03ba\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x03bd\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x03ba:\n r0 = 1\n goto L_0x0333\n L_0x03bd:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x03ba\n L_0x03c9:\n dzo r1 = r15.d\n long r4 = (long) r2\n r1.d(r4)\n int r1 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n goto L_0x00ab\n L_0x03d6:\n r3 = r4\n goto L_0x01a8\n L_0x03d9:\n r3 = r0\n goto L_0x0118\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxd.e():boolean\");\n }",
"public abstract void mo27385c();",
"private java.util.LinkedList<com.tencent.mm.plugin.game.model.d> aRy() {\n /*\n r8 = this;\n r3 = new java.util.LinkedList;\n r3.<init>();\n r0 = r8.njD;\n r0 = r0.nop;\n if (r0 != 0) goto L_0x000d;\n L_0x000b:\n r0 = r3;\n L_0x000c:\n return r0;\n L_0x000d:\n r0 = r8.nja;\n r1 = r0 + 1;\n r0 = r8.nja;\n r0 = r0 / 15;\n r0 = r0 + 901;\n r2 = r8.njD;\n r2 = r2.nop;\n r5 = r2.iterator();\n r2 = r1;\n r1 = r0;\n L_0x0021:\n r0 = r5.hasNext();\n if (r0 == 0) goto L_0x007a;\n L_0x0027:\n r0 = r5.next();\n r0 = (com.tencent.mm.plugin.game.c.c) r0;\n r4 = 0;\n r6 = r0.kzz;\n switch(r6) {\n case 1: goto L_0x0046;\n case 2: goto L_0x0056;\n default: goto L_0x0033;\n };\n L_0x0033:\n r0 = r1;\n r1 = r2;\n r2 = r4;\n L_0x0036:\n if (r2 == 0) goto L_0x007c;\n L_0x0038:\n r4 = 11;\n r2.scene = r4;\n r4 = 1111; // 0x457 float:1.557E-42 double:5.49E-321;\n r2.fGe = r4;\n r3.add(r2);\n r2 = r1;\n r1 = r0;\n goto L_0x0021;\n L_0x0046:\n r0 = r0.nkO;\n r0 = com.tencent.mm.plugin.game.model.ad.a(r0);\n if (r0 == 0) goto L_0x0083;\n L_0x004e:\n r4 = r2 + 1;\n r0.position = r2;\n r2 = r0;\n r0 = r1;\n r1 = r4;\n goto L_0x0036;\n L_0x0056:\n r6 = r0.nkR;\n if (r6 == 0) goto L_0x0033;\n L_0x005a:\n r4 = r0.nkR;\n r4 = r4.nkO;\n r4 = com.tencent.mm.plugin.game.model.ad.a(r4);\n if (r4 == 0) goto L_0x007f;\n L_0x0064:\n r6 = 1;\n r4.type = r6;\n r6 = r0.nkR;\n r6 = r6.nkQ;\n r4.ngB = r6;\n r0 = r0.nkR;\n r0 = r0.nkP;\n r4.ngC = r0;\n r0 = r1 + 1;\n r4.position = r1;\n r1 = r2;\n r2 = r4;\n goto L_0x0036;\n L_0x007a:\n r0 = r3;\n goto L_0x000c;\n L_0x007c:\n r2 = r1;\n r1 = r0;\n goto L_0x0021;\n L_0x007f:\n r0 = r1;\n r1 = r2;\n r2 = r4;\n goto L_0x0036;\n L_0x0083:\n r7 = r0;\n r0 = r1;\n r1 = r2;\n r2 = r7;\n goto L_0x0036;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.game.model.al.aRy():java.util.LinkedList<com.tencent.mm.plugin.game.model.d>\");\n }",
"static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x001d\n byte[] r2 = r4.createByteArray()\n java.nio.ByteBuffer r2 = java.nio.ByteBuffer.wrap(r2)\n r0.f18501c = r2\n L_0x001d:\n int r2 = r4.readInt()\n r0.f18500b = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x0061\n byte[] r4 = r4.createByteArray()\n int r3 = r0.f18500b\n if (r3 <= 0) goto L_0x005c\n int r1 = r0.f18500b\n if (r1 != r2) goto L_0x0049\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4)\n r0.f18502d = r4\n java.nio.ByteBuffer r4 = r0.f18502d\n r4.position(r2)\n goto L_0x0068\n L_0x0049:\n int r1 = r0.f18500b\n java.nio.ByteBuffer r1 = java.nio.ByteBuffer.allocate(r1)\n r0.f18502d = r1\n java.nio.ByteBuffer r1 = r0.f18502d\n r1.put(r4)\n goto L_0x0068\n L_0x005c:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4, r1, r2)\n goto L_0x0065\n L_0x0061:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.allocate(r1)\n L_0x0065:\n r0.f18502d = r4\n L_0x0068:\n boolean r4 = m23372b(r0)\n if (r4 == 0) goto L_0x006f\n return r0\n L_0x006f:\n int r4 = r0.f18500b\n if (r4 <= 0) goto L_0x007d\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n r4.put(r1, r0)\n goto L_0x00a2\n L_0x007d:\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n java.lang.Object r4 = r4.get(r1)\n com.qiyukf.nimlib.f.a.a r4 = (com.qiyukf.nimlib.p470f.p471a.C5826a) r4\n if (r4 == 0) goto L_0x00a2\n java.nio.ByteBuffer r1 = r4.f18502d\n java.nio.ByteBuffer r0 = r0.f18502d\n r1.put(r0)\n boolean r0 = m23372b(r4)\n if (r0 == 0) goto L_0x00a2\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r0 = f18504a\n int r1 = r4.f18499a\n r0.remove(r1)\n return r4\n L_0x00a2:\n r4 = 0\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.qiyukf.nimlib.p470f.p471a.C5826a.C5829b.m23369a(android.os.Parcel):com.qiyukf.nimlib.f.a.a\");\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"public void mo21787L() {\n }",
"public void mo21779D() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public void mo21793R() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void Exterior() {\n\t\t\r\n\t}",
"public int m()\r\n/* 485: */ {\r\n/* 486:497 */ int i = 0;\r\n/* 487:498 */ for (int j = 0; j < this.b.length; j++) {\r\n/* 488:499 */ if ((this.b[j] != null) && ((this.b[j].b() instanceof ajn)))\r\n/* 489: */ {\r\n/* 490:500 */ int k = ((ajn)this.b[j].b()).c;\r\n/* 491:501 */ i += k;\r\n/* 492: */ }\r\n/* 493: */ }\r\n/* 494:504 */ return i;\r\n/* 495: */ }",
"protected void dataTablePlan2(int i) {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void onReduceMp()\r\n\t{\n\t}",
"public void method_191() {}",
"@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}",
"public void baocun() {\n\t\t\n\t}",
"public abstract long mo13681c();",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public abstract void mo6549b();",
"private void method_2252() {\r\n String[] var1 = class_752.method_4253();\r\n\r\n do {\r\n boolean var10000 = this.field_1861[this.field_1862].isEmpty();\r\n\r\n int var2;\r\n label45:\r\n while(true) {\r\n if(var10000) {\r\n return;\r\n }\r\n\r\n var2 = this.field_1862;\r\n this.field_1862 ^= 1;\r\n Iterator var3 = this.field_1861[var2].iterator();\r\n\r\n while(true) {\r\n if(!var3.hasNext()) {\r\n break label45;\r\n }\r\n\r\n class_1033 var4 = (class_1033)var3.next();\r\n\r\n label40: {\r\n class_354 var6;\r\n label55: {\r\n try {\r\n var6 = this;\r\n if(var1 == null) {\r\n break label55;\r\n }\r\n\r\n var10000 = this.method_2253(var4);\r\n if(var1 == null) {\r\n break;\r\n }\r\n } catch (IllegalStateException var5) {\r\n throw method_2260(var5);\r\n }\r\n\r\n if(!var10000) {\r\n break label40;\r\n }\r\n\r\n var6 = this;\r\n }\r\n\r\n class_1627 var7 = var6.field_1850.method_2383();\r\n double var10001 = (double)var4.method_5847();\r\n double var10002 = (double)var4.method_5848();\r\n double var10003 = (double)var4.method_5849();\r\n int var10005 = this.field_1820.field_5738;\r\n class_297 var10006 = new class_297;\r\n var10006.method_1699(var4.method_5847(), var4.method_5848(), var4.method_5849(), var4.method_5852(), var4.method_5850(), var4.method_5851());\r\n var7.method_8903(var10001, var10002, var10003, 64.0D, var10005, var10006);\r\n }\r\n\r\n if(var1 == null) {\r\n break label45;\r\n }\r\n }\r\n }\r\n\r\n this.field_1861[var2].clear();\r\n } while(var1 != null);\r\n\r\n }",
"public void mo21785J() {\n }",
"public void mo21782G() {\n }",
"public void verliesLeven() {\r\n\t\t\r\n\t}",
"public at(com.tencent.mm.bj.g r15) {\n /*\n r14 = this;\n r12 = 5000; // 0x1388 float:7.006E-42 double:2.4703E-320;\n r11 = 2;\n r1 = 1;\n r4 = 0;\n r6 = 0;\n r14.<init>();\n r14.gUz = r15;\n r7 = \"MediaDuplication\";\n r0 = r14.gUz;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r3 = \"PRAGMA table_info( \";\n r2.<init>(r3);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = r2.append(r7);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r3 = \" )\";\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r3 = 0;\n r5 = 2;\n r2 = r0.a(r2, r3, r5);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r0 = \"name\";\n r8 = r2.getColumnIndex(r0);\t Catch:{ Exception -> 0x0195 }\n r0 = r6;\n r3 = r6;\n r5 = r6;\n L_0x0037:\n r9 = r2.moveToNext();\t Catch:{ Exception -> 0x0195 }\n if (r9 == 0) goto L_0x0064;\n L_0x003d:\n if (r8 < 0) goto L_0x0037;\n L_0x003f:\n r9 = r2.getString(r8);\t Catch:{ Exception -> 0x0195 }\n r10 = \"remuxing\";\n r10 = r10.equalsIgnoreCase(r9);\t Catch:{ Exception -> 0x0195 }\n if (r10 == 0) goto L_0x004e;\n L_0x004c:\n r5 = r1;\n goto L_0x0037;\n L_0x004e:\n r10 = \"duration\";\n r10 = r10.equalsIgnoreCase(r9);\t Catch:{ Exception -> 0x0195 }\n if (r10 == 0) goto L_0x0059;\n L_0x0057:\n r3 = r1;\n goto L_0x0037;\n L_0x0059:\n r10 = \"status\";\n r9 = r10.equalsIgnoreCase(r9);\t Catch:{ Exception -> 0x0195 }\n if (r9 == 0) goto L_0x0037;\n L_0x0062:\n r0 = r1;\n goto L_0x0037;\n L_0x0064:\n r2.close();\t Catch:{ Exception -> 0x0195 }\n r2 = com.tencent.mm.kernel.h.vI();\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = r2.gYg;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r8 = java.lang.Thread.currentThread();\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r8 = r8.getId();\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r8 = r2.cs(r8);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n if (r5 != 0) goto L_0x008c;\n L_0x007b:\n r2 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r5 = \"it had no [remuxing] column, alter table now\";\n com.tencent.mm.sdk.platformtools.w.i(r2, r5);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = \"alter table MediaDuplication add remuxing text \";\n r5 = r14.gUz;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r5.eE(r7, r2);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n L_0x008c:\n if (r3 != 0) goto L_0x009f;\n L_0x008e:\n r2 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r3 = \"it had no [duration] column, alter table now\";\n com.tencent.mm.sdk.platformtools.w.i(r2, r3);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = \"alter table MediaDuplication add duration int \";\n r3 = r14.gUz;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r3.eE(r7, r2);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n L_0x009f:\n if (r0 != 0) goto L_0x00b2;\n L_0x00a1:\n r0 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r2 = \"it had no [status] column, alter table now\";\n com.tencent.mm.sdk.platformtools.w.i(r0, r2);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r0 = \"alter table MediaDuplication add status int \";\n r2 = r14.gUz;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2.eE(r7, r0);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n L_0x00b2:\n r2 = 0;\n r0 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));\n if (r0 <= 0) goto L_0x00c1;\n L_0x00b8:\n r0 = com.tencent.mm.kernel.h.vI();\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r0 = r0.gYg;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r0.aD(r8);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n L_0x00c1:\n r7 = \"MediaDuplication\";\n r2 = 0;\n r0 = r14.gUz;\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r8 = \"SELECT count(*) from \";\n r5.<init>(r8);\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r5 = r5.append(r7);\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r5 = r5.toString();\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r8 = 0;\n r9 = 2;\n r5 = r0.a(r5, r8, r9);\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r0 = r5.moveToFirst();\t Catch:{ Exception -> 0x0187 }\n if (r0 == 0) goto L_0x0197;\n L_0x00e4:\n r0 = 0;\n r0 = r5.getInt(r0);\t Catch:{ Exception -> 0x0187 }\n L_0x00e9:\n r5.close();\t Catch:{ Exception -> 0x018b }\n if (r0 < r12) goto L_0x00f7;\n L_0x00ee:\n r5 = r14.gUz;\t Catch:{ Exception -> 0x018d, all -> 0x017d }\n r8 = 0;\n r9 = 0;\n r2 = r5.delete(r7, r8, r9);\t Catch:{ Exception -> 0x018d, all -> 0x017d }\n r2 = (long) r2;\n L_0x00f7:\n r4 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r5 = \"MediaDuplication record[%d], max record[%d], deleteRecord[%d]\";\n r7 = 3;\n r7 = new java.lang.Object[r7];\n r0 = java.lang.Integer.valueOf(r0);\n r7[r6] = r0;\n r0 = java.lang.Integer.valueOf(r12);\n r7[r1] = r0;\n r0 = java.lang.Long.valueOf(r2);\n r7[r11] = r0;\n com.tencent.mm.sdk.platformtools.w.i(r4, r5, r7);\n return;\n L_0x0116:\n r0 = move-exception;\n r2 = r4;\n L_0x0118:\n r3 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r5 = \"\";\n r7 = 0;\n r7 = new java.lang.Object[r7];\t Catch:{ all -> 0x0192 }\n com.tencent.mm.sdk.platformtools.w.printErrStackTrace(r3, r0, r5, r7);\t Catch:{ all -> 0x0192 }\n r3 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0192 }\n r7 = \"tryAddDBCol error: \";\n r5.<init>(r7);\t Catch:{ all -> 0x0192 }\n r0 = r0.toString();\t Catch:{ all -> 0x0192 }\n r0 = r5.append(r0);\t Catch:{ all -> 0x0192 }\n r0 = r0.toString();\t Catch:{ all -> 0x0192 }\n com.tencent.mm.sdk.platformtools.w.e(r3, r0);\t Catch:{ all -> 0x0192 }\n if (r2 == 0) goto L_0x00c1;\n L_0x0140:\n r2.close();\n goto L_0x00c1;\n L_0x0145:\n r0 = move-exception;\n L_0x0146:\n if (r4 == 0) goto L_0x014b;\n L_0x0148:\n r4.close();\n L_0x014b:\n throw r0;\n L_0x014c:\n r0 = move-exception;\n r5 = r4;\n r4 = r0;\n r0 = r6;\n L_0x0150:\n r7 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r8 = \"\";\n r9 = 0;\n r9 = new java.lang.Object[r9];\t Catch:{ all -> 0x0185 }\n com.tencent.mm.sdk.platformtools.w.printErrStackTrace(r7, r4, r8, r9);\t Catch:{ all -> 0x0185 }\n r7 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r8 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0185 }\n r9 = \"check to delete MediaDuplication. error : \";\n r8.<init>(r9);\t Catch:{ all -> 0x0185 }\n r4 = r4.toString();\t Catch:{ all -> 0x0185 }\n r4 = r8.append(r4);\t Catch:{ all -> 0x0185 }\n r4 = r4.toString();\t Catch:{ all -> 0x0185 }\n com.tencent.mm.sdk.platformtools.w.e(r7, r4);\t Catch:{ all -> 0x0185 }\n if (r5 == 0) goto L_0x00f7;\n L_0x0178:\n r5.close();\n goto L_0x00f7;\n L_0x017d:\n r0 = move-exception;\n r5 = r4;\n L_0x017f:\n if (r5 == 0) goto L_0x0184;\n L_0x0181:\n r5.close();\n L_0x0184:\n throw r0;\n L_0x0185:\n r0 = move-exception;\n goto L_0x017f;\n L_0x0187:\n r0 = move-exception;\n r4 = r0;\n r0 = r6;\n goto L_0x0150;\n L_0x018b:\n r4 = move-exception;\n goto L_0x0150;\n L_0x018d:\n r5 = move-exception;\n r13 = r5;\n r5 = r4;\n r4 = r13;\n goto L_0x0150;\n L_0x0192:\n r0 = move-exception;\n r4 = r2;\n goto L_0x0146;\n L_0x0195:\n r0 = move-exception;\n goto L_0x0118;\n L_0x0197:\n r0 = r6;\n goto L_0x00e9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.storage.at.<init>(com.tencent.mm.bj.g):void\");\n }",
"public void p() {\n try {\n if (this.f80656a.a().size() > 0) {\n this.f80657b.a((f) new f() {\n public void a(Object obj, boolean z) {\n }\n }, this.f80656a.a());\n }\n if (this.f80658c.a().size() > 0) {\n this.f80657b.b(new f() {\n public void a(Object obj, boolean z) {\n if (obj instanceof String) {\n m.this.f80658c.b();\n }\n }\n }, this.f80658c.a());\n }\n if (this.l.size() > 0) {\n this.f80657b.a(new f(), this.l);\n }\n } catch (Throwable th) {\n by.b(\"convertMemoryToCacheTable happen error: \" + th.toString());\n }\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n protected void getExras() {\n }"
] | [
"0.56865704",
"0.56366783",
"0.5600656",
"0.55760765",
"0.55241054",
"0.54742473",
"0.544999",
"0.54474926",
"0.54431677",
"0.5419282",
"0.5363797",
"0.53628826",
"0.535194",
"0.5345949",
"0.53409004",
"0.53226554",
"0.5318937",
"0.53153676",
"0.53113395",
"0.5282099",
"0.52649236",
"0.5259019",
"0.52487636",
"0.52487636",
"0.5237376",
"0.5226501",
"0.5226382",
"0.5213644",
"0.52133006",
"0.51913357",
"0.5190785",
"0.51797086",
"0.516296",
"0.51620364",
"0.51527727",
"0.5149671",
"0.5148273",
"0.51461774",
"0.5136182",
"0.5130046",
"0.5124583",
"0.5122137",
"0.5116522",
"0.5112297",
"0.5107462",
"0.510611",
"0.5098971",
"0.5096729",
"0.50926",
"0.50794464",
"0.50776833",
"0.5074033",
"0.5069611",
"0.50603694",
"0.5059821",
"0.50527024",
"0.50467175",
"0.5043651",
"0.5039927",
"0.5039044",
"0.5038981",
"0.5038129",
"0.50338876",
"0.5025973",
"0.5025288",
"0.5020323",
"0.50198364",
"0.50153637",
"0.5012714",
"0.5011749",
"0.5011002",
"0.50083905",
"0.50048727",
"0.5001133",
"0.5000613",
"0.5000581",
"0.49957764",
"0.49950528",
"0.49945304",
"0.49859613",
"0.49837518",
"0.4983281",
"0.4981311",
"0.49795514",
"0.49745426",
"0.49713752",
"0.49668357",
"0.4961894",
"0.49613428",
"0.49610913",
"0.4960058",
"0.49578905",
"0.49563015",
"0.49561244",
"0.49541196",
"0.4953755",
"0.49510095",
"0.49485946",
"0.49471554",
"0.4936933",
"0.49360487"
] | 0.0 | -1 |
Ketika berpindah screen maka sprite yang ditampilkan pada layer manager harus dihilangkan terlebih dahulu. Untuk itu setiap sprite yang telah dibuat harus dimasukkan pada prosedur ini | public void removeSprites(){
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void ini_Sprites()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_Sprites\");\r\n\t\tResourceCache.LoadSprites(false);\r\n\t}",
"@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }",
"private void loadSpritesheet() {\n\t\tobjects = new SpriteSheet(\"res\\\\pong.png\");\n\t\tobjects_hires = new SpriteSheet(\"res\\\\ponghires.png\",\n\t\t\t\tSpriteSheet.LINEAR);\n\t}",
"public void onUpReleased(){\n// player.getSprite().setFitHeight(50);\n shipSoundPlayer.stop();\n if(GameEngine.isPlaying)\n player.setSprite(\"Sprites\\\\spaceship_new.png\");\n }",
"private static void loadSprites(){\n \t\tshipSprites.put(\"SCOUT_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/scout.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"HUNTER_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/hunter.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"DESTROYER_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/destroyer.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"COLONIZER_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/colonizer.png\"), 0.5f, 0.5f));\n \t\t\n \t\t/*\n \t\t * Ships Red Player\n \t\t */\n \t\tshipSprites.put(\"SCOUT_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/scout.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"HUNTER_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/hunter.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"DESTROYER_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/destroyer.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"COLONIZER_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/colonizer.png\"), 0.5f, 0.5f));\n \n \t\t/*\n \t\t * Path Arrows\n \t\t */\n\t\tpathTextures.put(\"HEAD\", Toolkit.getDefaultToolkit().getImage(\"res/path/head.png\"));\n\t\tpathTextures.put(\"START\", Toolkit.getDefaultToolkit().getImage(\"res/path/start.png\"));\n\t\tpathTextures.put(\"STRAIGHT\", Toolkit.getDefaultToolkit().getImage(\"res/path/straight.png\"));\n\t\tpathTextures.put(\"TURN\", Toolkit.getDefaultToolkit().getImage(\"res/path/turn.png\"));\n \t\t\n \t\t/*\n \t\t * Planets\n \t\t */\n \t\tmetalplanets.put(0, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_0.png\"), 0.5f, 0));\n \t\tmetalplanets.put(1, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_1.png\"), 0.5f, 0));\n \t\tmetalplanets.put(2, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_2.png\"), 0.5f, 0));\n \t\tmetalplanets.put(3, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_3.png\"), 0.5f, 0));\n \t\tgasplanets.put(0, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/gasplanet_0.png\"), 0.5f, 0));\n \t\tgasplanets.put(1, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/gasplanet_1.png\"), 0.5f, 0));\n \t\tgasplanets.put(2, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/gasplanet_2.png\"), 0.5f, 0));\n \t\t\n \t\t/*\n \t\t * Colony Sprite\n \t\t */\n \t\tloadColonySprites(Color.RED, \"RED\");\n \t\tloadColonySprites(Color.BLUE, \"BLUE\");\n \t}",
"public OverworldScreen(Game game) {\n super(\"OverworldScreen\", game);\n\n mScreenViewport = new ScreenViewport(0, 0, mGame.getScreenWidth(),\n mGame.getScreenHeight());\n if (mScreenViewport.width > mScreenViewport.height)\n mLayerViewport = new LayerViewport(240.0f, 240.0f\n * mScreenViewport.height / mScreenViewport.width, 240,\n 240.0f * mScreenViewport.height / mScreenViewport.width);\n else\n mLayerViewport = new LayerViewport(240.0f * mScreenViewport.height\n / mScreenViewport.width, 240.0f, 240.0f\n * mScreenViewport.height / mScreenViewport.width, 240);\n\n // Load in the bitmaps used on the main menu screen\n AssetStore assetManager = mGame.getAssetManager();\n\n\n assetManager.loadAndAddBitmap(\"LocationArrow\", \"img/LocationArrow.png\");\n assetManager.loadAndAddBitmap(\"OverworldMap\", \"img/OverworldMap.png\");\n\n // Define the spacing that will be used to position the buttons\n int spacingX = game.getScreenWidth() / 5;\n int spacingY = game.getScreenHeight() / 3;\n\n mOverworldMap = new GameObject(LEVEL_WIDTH / 2.0f,\n LEVEL_HEIGHT / 2.0f, LEVEL_WIDTH, LEVEL_HEIGHT, getGame()\n .getAssetManager().getBitmap(\"OverworldMap\"), this);\n\n // Create the trigger buttons\n mLocationButton = new PushButton(\n spacingX * 1.0f, spacingY * 1.5f, spacingX*.16f, spacingY*0.1f, \"LocationArrow\", this);\n mLocationButton1 = new PushButton(\n spacingX * 2.0f, spacingY * 1.5f, spacingX*.16f, spacingY*0.1f, \"LocationArrow\", this);\n mLocationButton2 = new PushButton(\n spacingX * 3.0f, spacingY * 1.5f, spacingX*.16f, spacingY*0.1f, \"LocationArrow\", this);\n mLocationButton3 = new PushButton(\n spacingX * 4.0f, spacingY * 1.5f, spacingX*.16f, spacingY*0.1f, \"LocationArrow\", this);\n mLocationButton4 = new PushButton(\n spacingX * 5.0f, spacingY * 1.5f, spacingX*.16f, spacingY*0.1f, \"LocationArrow\", this);\n\n\n }",
"@Override\n\tpublic void render(float delta) {\n\t\tGdx.gl.glClearColor(0, 0, 0.2f, 1);\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\t\tGdx.gl.glEnable(GL20.GL_TEXTURE_2D);\n\n\t\tcamera.update();\n\t\tgame.batch.setProjectionMatrix(camera.combined);\n\n\t\tgame.batch.begin();\n\t\tgame.batch.draw(Assets.menuBackground, 0, 0);\n\t\tgame.batch.draw(Assets.exitRegion, 80, 34, 150, 150);\n\t\tgame.batch.draw(Assets.settingsRegion, 80, 194, 150, 150);\n\t\tgame.batch.draw(Assets.storeRegion, 80, 344, 150, 150);\n\t\tgame.batch.draw(Assets.playRegion, 80, 494, 150, 150);\n\t\tgame.batch.end();\n\n\n\t\tif (Gdx.input.isKeyJustPressed(Input.Keys.BACK)) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tif(Gdx.input.justTouched()) {\n\t\t\tcamera.unproject(touchPoint.set(Gdx.input.getX(), Gdx.input.getY(),\n\t\t\t\t\t0));\n\t\t\tif(OverlapTester.pointInRectangle(playBounds, touchPoint.x,touchPoint.y))\n\t\t\t\ttry {\n\t\t\t\t\tgame.setScreen(new GameScreen(game));\n\t\t\t\t} catch (OutOfBoundingException 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\tthis.dispose();\n\t\t\t\n\t\t\tif(OverlapTester.pointInRectangle(exitBounds, touchPoint.x, touchPoint.y)){\n\t\t\t\tSystem.exit(0);\n\t\t\t\tthis.dispose();\n\t\t\t\t}\t\n\t\t\t\n\t\t\tif(OverlapTester.pointInRectangle(storeBounds, touchPoint.x, touchPoint.y)){\n\t\t\t\t//game.setScreen(new StoreScreen(game, camera, player)); //Because it doesn't work how it must!\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t}\n\n\t}",
"public StartScreen()\n { \n // Create a new world with 1111x602 cells with a cell size of 1x1 pixels.\n super(1111, 602, 1); \n prepare();\n background.playLoop();\n }",
"@Override\n public void show() {\n\n skin = new Skin(Gdx.files.internal(\"menu/menu.json\"),new TextureAtlas(\"menu/menu.pack\"));\n\n Image background = new Image(skin, \"menuscreen\");\n background.setPosition(0,0);\n stage.addActor(background);\n\n Image gameOver = new Image(skin,\"gameOver\");\n gameOver.setPosition( ( 800 - 484)/2 , (480 - 345)/2 ) ;\n stage.addActor(gameOver);\n\n Button gameOverSim = new Button(skin,\"gameOverSim\");\n gameOverSim.setPosition(265,100);\n stage.addActor(gameOverSim);\n\n Button gameOverNao = new Button(skin,\"gameOverNao\");\n gameOverNao.setPosition(425,100);\n stage.addActor(gameOverNao);\n\n gameOverSim.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n // TO DO passar o level como parametro no construtor\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new PlayScreen(game, level));\n dispose();\n }\n });\n\n gameOverNao.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new MenuScreen(game));\n dispose();\n }\n });\n\n }",
"@Override\n\tpublic void show() {\n\t backgroundImage = new Texture(Gdx.files.internal(\"resources/images/menu.png\"));\n\t soccerImage = new Texture(Gdx.files.internal(\"resources/images/ball.gif\"));\n\t boomerangImage = new Texture(Gdx.files.internal(\"resources/images/boomerang.gif\"));\n\t wolfImage = new Texture(Gdx.files.internal(\"resources/images/wolf.gif\"));\n\t boyImage = new Texture(Gdx.files.internal(\"resources/images/bueno2.png\"));\n\t boyImageInv = new Texture(Gdx.files.internal(\"resources/images/bueno2Inv.png\"));\n\t grassImage = new Texture(Gdx.files.internal(\"resources/images/piso.png\"));\n\t \n\n\t // load the drop sound effect and the rain background \"music\"\n\t dropSound = Gdx.audio.newSound(Gdx.files.internal(\"resources/drop.wav\"));\n\t rainMusic = Gdx.audio.newMusic(Gdx.files.internal(\"resources/rain.mp3\"));\n\n\t // start the playback of the background music immediately\n\t rainMusic.setLooping(true);\n\t //rainMusic.play();\n\n\t // create the camera and the SpriteBatch\n\t camera = new OrthographicCamera();\n\t camera.setToOrtho(false, 800, 480);\n\t batch = new SpriteBatch();\n\n\t // create a Rectangle to logically represent the boy\n\t boy = new Rectangle();\n\t boy.x = 130; //800 / 2 - 50 / 2; // center the boy horizontally\n\t boy.y = 235; // just above the ground\n\t boy.width = 50;\n\t boy.height = 74;\n\t \n\t //boy2\n\t boy2 = new Rectangle();\n\t boy2.x = 130;\n\t boy2.y = 160; \n\t boy2.width = 50;\n\t boy2.height = 74;\n\t \n\t //create a grass Rectangle to represent the grass\n\t grass = new Rectangle();\n\t grass.x = 0;\n\t grass.y = camera.viewportHeight/2-30;\n\t \n\t grass2 = new Rectangle();\n\t grass2.x = camera.viewportWidth;\n\t grass2.y = camera.viewportHeight/2-30;\n\t \n\t velocidad = 8;\n\t counterGravity = 0.0;\n\t \n\t countObjs = 1;\n\t //stateTime = 0;\n\n\t // create the soccerballs array and spawn the first soccer ball\n\t soccerballs = new Array<Rectangle>();\n\n\t //create the boomerans array and spawn the first boomerang\n\t boomerangs = new Array<Rectangle>();\n\t \n\n\t spawnBoomerangs();\n\t spawnSoccerBall();\n\t\t\n\t}",
"public static void load(){\r\n\t \ttry {\r\n\t \t\t// load and set all sprites\r\n\t\t\t\tsetBlueGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/blueGarbage.png\")));\r\n\t\t\t\tsetRank(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/rank.png\")));\r\n\t\t\t\tsetRedGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/redGarbage.png\")));\r\n\t\t\t\tsetYellowGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/yellowGarbage.png\")));\r\n\t\t\t\tsetGreenGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/greenGarbage.png\")));\r\n\t\t\t\tsetBlueSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/blueSnakeBodyPart.png\")));\r\n\t\t\t\tsetRedSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/redSnakeBodyPart.png\")));\r\n\t\t\t\tsetYellowSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/yellowSnakeBodyPart.png\")));\r\n\t\t\t\tsetGreenSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/greenSnakeBodyPart.png\")));\r\n\t\t\t\tsetHeart(ImageIO.read(classPath.getResourceAsStream(\"/images/heart.png\")));\r\n\t\t\t\tsetGameScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameScreenBackground.png\")));\r\n\t\t\t\tsetGameScreenHeader(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameScreenHeader.png\")));\r\n\t\t\t\tsetGameOver(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameOver.png\")));\r\n\t\t\t\tsetHitsOwnBody(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/hitsOwnBody.png\")));\r\n\t\t\t\tsetHitsWall(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/hitsWall.png\")));\r\n\t\t\t\tsetWrongColor(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/wrongColor.png\")));\r\n\t\t\t\tsetHelpScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/helpScreenBackground.png\")));\r\n\t\t\t \tsetWarningScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/warningScreenBackground.png\")));\r\n\t\t\t \tsetOkButton(ImageIO.read(classPath.getClass().getResource(\"/images/okButton.png\")));\r\n\t\t\t \tsetMenuScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/menuScreenBackground.png\")));\r\n\t\t\t\tsetStartButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/startButton.png\")));\r\n\t\t\t\tsetExitButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/exitButton.png\")));\r\n\t\t\t\tsetHelpButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/helpButton.png\")));\r\n\t\t\t\t\r\n\t \t} \r\n\t \tcatch (Exception e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getStackTrace(), \"Erro ao carregar imagens\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t\r\n\t\t\t}\t\r\n \t\r\n \t}",
"synchronized public void initGfx()\n {\n // Points for initial sprite placement\n Point p1, p2, p3;\n\n p1 = getMainPoint();\n p2 = getRandomMiniPoint();\n p3 = getRandomMiniPoint();\n\n // Reset score\n score = 0;\n\n // Reset text for score\n ((TextView)findViewById(R.id.the_score_label)).setText(\"SCORE: 0\");\n\n // Set main sprite\n ((GameBoard)findViewById(R.id.the_canvas)).setMainSprite(p1.x, p1.y);\n\n // Set mini sprites\n ((GameBoard)findViewById(R.id.the_canvas)).setMiniSprite(p2.x, p2.y);\n ((GameBoard)findViewById(R.id.the_canvas)).setMiniSprite2(p3.x, p3.y);\n\n // Set game over sprite to outside screen\n ((GameBoard) findViewById(R.id.the_canvas)).setOverSprite(-2000, -2000);\n\n // Enable reset button\n ((Button)findViewById(R.id.reset_button)).setEnabled(true);\n\n frame.removeCallbacks(frameUpdate);\n ((GameBoard)findViewById(R.id.the_canvas)).invalidate();\n frame.postDelayed(frameUpdate, FRAME_RATE);\n }",
"private void updateSprite(){\n //facing front\n getImage().clear();\n getImage().drawImage(SHEET,-(frame%SHEET_W)*SPRITE_W,0);\n if(!goLeft) getImage().mirrorHorizontally();\n if (iframes>0&&iframes%10<5) setImage(SpriteHelper.makeWhite( getImage()));\n else frame = frame + 1 % (SHEET_H* SHEET_W);\n }",
"private void initUI() {\n Texture wallTileTexture = new Texture(Gdx.files.internal(\"mappa_text_low_res/background_tile.png\"));\r\n wallTileTexture.setWrap(Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat);\r\n TextureRegion wallTileRegion = new TextureRegion(wallTileTexture);\r\n wallTileRegion.setRegion(0, 0, wallTileTexture.getWidth() * 8, wallTileTexture.getHeight() * 6);\r\n Image backgroundImage = new Image(wallTileRegion);\r\n backgroundImage.setSize(stage.getWidth(), stage.getHeight());\r\n stage.addActor(backgroundImage);\r\n //////////////////////////////////////////////////\r\n\r\n Label.LabelStyle lblStyle = new Label.LabelStyle();\r\n lblStyle.font = GdxGame.game.buttonFont;\r\n\r\n label1 = new Label(\"SETTINGS\", lblStyle);\r\n label1.setSize(stage.getWidth(), 30);\r\n label1.setAlignment(Align.center);\r\n label1.setPosition(0, stage.getWidth() / 2 - 15 + 250);\r\n stage.addActor(label1);\r\n\r\n colWidth = stage.getWidth() / 5f;\r\n rowHeight = stage.getWidth() / 15f;\r\n TextButton backButton = new TextButton(\"Back\", GdxGame.game.txtBtnStyle);\r\n backButton.setSize(colWidth, rowHeight);\r\n backButton.setPosition(padding, padding);\r\n backButton.addListener(new InputListener() {\r\n @Override\r\n public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\r\n // SettingsScreen.this.dispose();\r\n SettingsScreen.this.dispose();\r\n game.setScreen(previousScreen);\r\n return true;\r\n }\r\n });\r\n stage.addActor(backButton);\r\n\r\n audio = new Label(\"AUDIO\", lblStyle);\r\n audio.setSize(stage.getWidth(), 30);\r\n audio.setAlignment(Align.center);\r\n audio.setPosition(stage.getWidth() / 2 - 15 - 675, stage.getWidth() / 2 + 150);\r\n stage.addActor(audio);\r\n\r\n Skin skin = new Skin(Gdx.files.internal(\"skin/uiskin.json\"));\r\n final Slider volumeSlider = new Slider(0.0f, 1.0f, 0.1f, false, skin);\r\n\r\n volumeSlider.setValue(game.settings.getVolume());\r\n volumeSlider.setPosition(stage.getWidth() / 2 - 140, stage.getWidth() / 2 + 155);\r\n\r\n stage.addActor(volumeSlider);\r\n\r\n volumeSlider.addListener(new ChangeListener() {\r\n public void changed(ChangeEvent event, Actor actor) {\r\n game.settings.setVolume(volumeSlider.getValue());\r\n game.getMusic().setVolume(game.settings.getVolume());\r\n\r\n //volumeSlider.setValue(volumeSlider.getValue());\r\n System.out.println(\"il volume è VolumeSetValue: \" + volumeSlider.getValue());\r\n }\r\n });\r\n\r\n TextButton defaultButton = new TextButton(\"Default Settings\", GdxGame.game.txtBtnStyle);\r\n defaultButton.setSize(defaultButton.getLabel().getWidth() + padding, rowHeight);\r\n defaultButton.setPosition(stage.getWidth() - defaultButton.getWidth() - padding, padding);\r\n\r\n stage.addActor(defaultButton);\r\n\r\n defaultButton.addListener(new InputListener() {\r\n @Override\r\n public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\r\n game.settings.setDefault();\r\n game.getMusic().setVolume(game.settings.getVolume());\r\n volumeSlider.setValue(game.settings.getVolume());\r\n\r\n return true;\r\n }\r\n });\r\n }",
"abstract public void loadSprite();",
"@Override\n\tpublic void create() {\n\t\tthis.batch = new SpriteBatch();\n\t\t\n//\t\tgame.batch.begin();\n// player.draw(game.batch);\n// \n// game.batch.end();\n\t\t\n\t\tmanager = new AssetManager();\n\t\tmanager.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));\n\t\tmanager.load(\"data/level1.tmx\", TiledMap.class);\n\t\tmanager.load(\"data/background.png\", Texture.class);\n//\t\tmanager.load(\"level1.tsx\", TiledMapTileSet.class);\n\t\tmanager.finishLoading();\n\t\tscreen = new GameScreen(this);\n\t\tsetScreen(screen);\n\t\t\n\t}",
"private void graphicsLoader() {\n\t\tff2Logo = new Texture(Gdx.files.internal(uiName + \"/ff2logo.png\"));\n\t\tff2LogoHit = new Texture(Gdx.files.internal(uiName + \"/ff2logohit.png\"));\n\t\tplayerword = new Texture(Gdx.files.internal(uiName + \"/playerword.png\"));\n\t\tplayerwordHit = new Texture(Gdx.files.internal(uiName + \"/playerwordhit.png\"));\n\t\tturretword = new Texture(Gdx.files.internal(uiName + \"/turretword.png\"));\n\t\tturretwordHit = new Texture(Gdx.files.internal(uiName + \"/turretwordhit.png\"));\n\t\tfenceword = new Texture(Gdx.files.internal(uiName + \"/fenceword.png\"));\n\t\tfencewordHit = new Texture(Gdx.files.internal(uiName + \"/fencewordhit.png\"));\n\t\tbarrierword = new Texture(Gdx.files.internal(uiName + \"/barrierword.png\"));\n\t\tbarrierwordHit = new Texture(Gdx.files.internal(uiName + \"/barrierwordhit.png\"));\n\t\tgatewayword = new Texture(Gdx.files.internal(uiName + \"/gatewayword.png\"));\n\t\tgatewaywordHit = new Texture(Gdx.files.internal(uiName + \"/gatewaywordhit.png\"));\n\t\tpowerupword = new Texture(Gdx.files.internal(uiName + \"/powerupword.png\"));\n\t\tpowerupwordHit = new Texture(Gdx.files.internal(uiName + \"/powerupwordhit.png\"));\n\t\tswitchword = new Texture(Gdx.files.internal(uiName + \"/switchword.png\"));\n\t\tswitchwordHit = new Texture(Gdx.files.internal(uiName + \"/switchwordhit.png\"));\n\t\tenemyfighterword = new Texture(Gdx.files.internal(uiName + \"/enemyfighterword.png\"));\n\t\tenemyfighterwordHit = new Texture(Gdx.files.internal(uiName + \"/enemyfighterwordhit.png\"));\n\t\tmineword = new Texture(Gdx.files.internal(uiName + \"/mineword.png\"));\n\t\tminewordHit = new Texture(Gdx.files.internal(uiName + \"/minewordhit.png\"));\n\t\tpushblockword = new Texture(Gdx.files.internal(uiName + \"/pushblockword.png\"));\n\t\tpushblockwordHit = new Texture(Gdx.files.internal(uiName + \"/pushblockwordhit.png\"));\n\t\tbombupword = new Texture(Gdx.files.internal(uiName + \"/bombupword.png\"));\n\t\tbombupwordHit = new Texture(Gdx.files.internal(uiName + \"/bombupwordhit.png\"));\n\t\t\n\t\t// ui\n\t\tsoundonbutton = new Texture(Gdx.files.internal(uiName + \"/soundon.png\"));\n\t\tsoundoffbutton = new Texture(Gdx.files.internal(uiName + \"/soundoff.png\"));\n\t\tcreatebutton = new Texture(Gdx.files.internal(uiName + \"/createbutton.png\"));\n\t\tnocreatebutton = new Texture(Gdx.files.internal(uiName + \"/nocreatebutton.png\"));\n\t\tloaderTexture = new Texture(Gdx.files.internal(uiName + \"/ff2loader.png\"));\n\t\tgameOverTexture = new Texture(Gdx.files.internal(uiName + \"/gameover.png\"));\n\t\tnextFieldTexture = new Texture(Gdx.files.internal(uiName + \"/nextfield.png\"));\n\t\t\n\t\tmenubutton = new Texture(Gdx.files.internal(uiName + \"/menubutton.png\"));\n\t\tnomenubutton = new Texture(Gdx.files.internal(uiName + \"/nomenubutton.png\"));\n\t\tdiffEasyButton = new Texture(Gdx.files.internal(uiName + \"/diffeasybutton.png\"));\n\t\tdiffNormButton = new Texture(Gdx.files.internal(uiName + \"/diffnormbutton.png\"));\n\t\tdiffHardButton = new Texture(Gdx.files.internal(uiName + \"/diffhardbutton.png\"));\n\t\tosdButton = new Texture(Gdx.files.internal(uiName + \"/osdbutton.png\"));\n\t\t\n\t\texoFFfont = new BitmapFont(Gdx.files.internal(uiName + \"/font/exo-ff.fnt\"), true);\n\t\t\n\t\t// creator\n\t\texitbutton = new Texture(Gdx.files.internal(creatorName + \"/exitbutton.png\"));\n\t\tfilebutton = new Texture(Gdx.files.internal(creatorName + \"/filebutton.png\"));\n\t\ttoolsbutton = new Texture(Gdx.files.internal(creatorName + \"/toolsbutton.png\"));\n\t\tnextbutton = new Texture(Gdx.files.internal(creatorName + \"/nextbutton.png\"));\n\t\tprevbutton = new Texture(Gdx.files.internal(creatorName + \"/prevbutton.png\"));\n\t\tdeletebutton = new Texture(Gdx.files.internal(creatorName + \"/deletebutton.png\"));\n\t\tyesbutton = new Texture(Gdx.files.internal(creatorName + \"/yesbutton.png\"));\n\t\tnobutton = new Texture(Gdx.files.internal(creatorName + \"/nobutton.png\"));\n\t\tbuildbutton = new Texture(Gdx.files.internal(creatorName + \"/buildbutton.png\"));\n\t\tprocbutton = new Texture(Gdx.files.internal(creatorName + \"/procbutton.png\"));\n\t\trandbutton = new Texture(Gdx.files.internal(creatorName + \"/randbutton.png\"));\n\t\tgroupsbutton = new Texture(Gdx.files.internal(creatorName + \"/groupsbutton.png\"));\n\t\tarenabutton = new Texture(Gdx.files.internal(creatorName + \"/arenabutton.png\"));\n\t\tfileExitButton = new Texture(Gdx.files.internal(creatorName + \"/fileexitbutton.png\"));\n\t\tfileLoadButton = new Texture(Gdx.files.internal(creatorName + \"/loadbutton.png\"));\n\t\tfileSaveButton = new Texture(Gdx.files.internal(creatorName + \"/savebutton.png\"));\n\t\tfilePlayButton = new Texture(Gdx.files.internal(creatorName + \"/playbutton.png\"));\n\t\tfileNoPlayButton = new Texture(Gdx.files.internal(creatorName + \"/noplaybutton.png\"));\n\t\tfileSendButton = new Texture(Gdx.files.internal(creatorName + \"/sendbutton.png\"));\n\t\ttoasterBack = new Texture(Gdx.files.internal(creatorName + \"/toasterback.png\"));\n\t\twindowBack = new Texture(Gdx.files.internal(creatorName + \"/windowback.png\"));\n\t\temptyCellTexture = new Texture(Gdx.files.internal(creatorName + \"/emptycell.png\"));\n\t\tcreateSplashTexture = new Texture(Gdx.files.internal(creatorName + \"/createsplash.png\"));\n\t\t\n\t\tplayerDef = new Texture(Gdx.files.internal(creatorName + \"/player_def.png\"));\n\t\tgatewayDef = new Texture(Gdx.files.internal(creatorName + \"/gateway_def.png\"));\n\t\tpowerupDef = new Texture(Gdx.files.internal(creatorName + \"/powerup_def.png\"));\n\t\tbombupDef = new Texture(Gdx.files.internal(creatorName + \"/bombup_def.png\"));\n\t\tswitchDef = new Texture(Gdx.files.internal(creatorName + \"/switch_def.png\"));\n\t\tscaffoldDef = new Texture(Gdx.files.internal(creatorName + \"/scaffold_def.png\"));\n\t\tbarrierDef = new Texture(Gdx.files.internal(creatorName + \"/barrier_def.png\"));\n\t\tfenceDef = new Texture(Gdx.files.internal(creatorName + \"/fence_def.png\"));\n\t\tturretDef = new Texture(Gdx.files.internal(creatorName + \"/turret_def.png\"));\n\t\tenemyDef = new Texture(Gdx.files.internal(creatorName + \"/enemy_def.png\"));\n\t\tmineDef = new Texture(Gdx.files.internal(creatorName + \"/mine_def.png\"));\n\t\tpushblockDef = new Texture(Gdx.files.internal(creatorName + \"/pushblock_def.png\"));\n\t\thangerDef = new Texture(Gdx.files.internal(creatorName + \"/hanger_def.png\"));\n\t\t\n\t\tdeleteDef = new Texture(Gdx.files.internal(creatorName + \"/delete_def.png\"));\n\t\tdeleteSel = new Texture(Gdx.files.internal(creatorName + \"/delete_sel.png\"));\n\t\tlockUnlock = new Texture(Gdx.files.internal(creatorName + \"/lock_unlock.png\"));\n\t\tlockLock = new Texture(Gdx.files.internal(creatorName + \"/lock_lock.png\"));\n\t\ttoolSelect = new Texture(Gdx.files.internal(creatorName + \"/toolselect.png\"));\n\t\t\n\t\t// game stuff\n\t\tplayerShipTexture = new Texture(Gdx.files.internal(gameName + \"/player2ship.png\"));\n\t\tplayerShipPowerupTexture = new Texture(Gdx.files.internal(gameName + \"/player2shippowerup.png\"));\n\t\tplayerShipBombupTexture = new Texture(Gdx.files.internal(gameName + \"/player2shipbombup.png\"));\n\t\tenemyShipTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2ship.png\"));\n\t\tenemyShipPowerupTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2shippowerup.png\"));\n\t\tenemyShipBombupTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2shipbombup.png\"));\n\t\tenemyShipOrderedTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2shipordered.png\"));\n\t\tplayerBulletTexture = new Texture(Gdx.files.internal(gameName + \"/playerlaser.png\"));\n\t\tplayerCableTexture = new Texture(Gdx.files.internal(gameName + \"/playercable.png\"));\n\t\tenemyBulletTexture = new Texture(Gdx.files.internal(gameName + \"/enemylaser.png\"));\n\t\tenemyCableTexture = new Texture(Gdx.files.internal(gameName + \"/enemycable.png\"));\n\t\tbombCableTexture = new Texture(Gdx.files.internal(gameName + \"/bombcable.png\"));\n\t\tturretTexture = new Texture(Gdx.files.internal(gameName + \"/turret.png\"));\n\t\tturrethitTexture = new Texture(Gdx.files.internal(gameName + \"/turrethit.png\"));\t\n\t\tfenceTexture = new Texture(Gdx.files.internal(gameName + \"/fence.png\"));\n\t\tfencehitTexture = new Texture(Gdx.files.internal(gameName + \"/fencehit.png\"));\n\t\tbarrierTexture = new Texture(Gdx.files.internal(gameName + \"/barrier.png\"));\n\t\tbarrierhitTexture = new Texture(Gdx.files.internal(gameName + \"/barrierhit.png\"));\n\t\tgatewayonTexture = new Texture(Gdx.files.internal(gameName + \"/gatewayon.png\"));\n\t\tgatewayoffTexture = new Texture(Gdx.files.internal(gameName + \"/gatewayoff.png\"));\n\t\tpowerupTexture = new Texture(Gdx.files.internal(gameName + \"/powerup.png\"));\n\t\tbombupTexture = new Texture(Gdx.files.internal(gameName + \"/bombup.png\"));\n\t\tbombupCharge = new Texture(Gdx.files.internal(gameName + \"/bombupcharge.png\"));\n\t\texplosion = new Texture(Gdx.files.internal(gameName + \"/explosion.png\"));\n\t\tdeath = new Texture(Gdx.files.internal(gameName + \"/death.png\"));\n\t\tpowerupCharge = new Texture(Gdx.files.internal(gameName + \"/powerupcharge.png\"));\n\t\tswitchonTexture = new Texture(Gdx.files.internal(gameName + \"/switchon.png\"));\n\t\tswitchoffTexture = new Texture(Gdx.files.internal(gameName + \"/switchoff.png\"));\n\t\tscaffoldTexture = new Texture(Gdx.files.internal(gameName + \"/scaffold.png\"));\n\t\tmineTexture = new Texture(Gdx.files.internal(gameName + \"/mine.png\"));\n\t\tminehitTexture = new Texture(Gdx.files.internal(gameName + \"/minehit.png\"));\n\t\tmineDebrisTexture = new Texture(Gdx.files.internal(gameName + \"/minedebris.png\"));\n\t\tpushblockTexture = new Texture(Gdx.files.internal(gameName + \"/pushblock.png\"));\n\t\thangerTexture = new Texture(Gdx.files.internal(gameName + \"/hanger.png\"));\n\t\thangerhitTexture = new Texture(Gdx.files.internal(gameName + \"/hangerhit.png\"));\n\t\t// have a catch here for the loaded=true?\n\t\tloaded = true;\n\t}",
"public void resetSprites() {\n\t\tSPRITE_LIST.clear();\n\t}",
"public DebugOverlay(SpriteBatch sb) {\n\n\n viewport = new FitViewport(PixClient.V_WIDTH, PixClient.V_HEIGHT, new OrthographicCamera());\n\n labels = new Label[labelCount];\n\n stage = new Stage(viewport, sb);\n\n Table table = new Table();\n table.bottom().right();\n table.setHeight(300);\n table.setWidth(200);\n table.setPosition(Gdx.graphics.getWidth() - table.getWidth(), 0);\n\n\n\n for(int i = 0; i < labelCount; i++) {\n\n labels[i] = new Label(\"\", new Label.LabelStyle(new BitmapFont(), Color.WHITE));\n table.add(labels[i]).right();\n table.row();\n\n }\n\n Pixmap pixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);\n pixmap.setColor(0, 0, 0, 0.75f);\n pixmap.fill();\n\n table.setBackground(new TextureRegionDrawable(new TextureRegion(new Texture(pixmap) ) ) );\n stage.addActor(table);\n }",
"private void drawSprite(int x, int y, int u, int v)\n {\n GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.getTextureManager().bindTexture(STAT_ICONS);\n float f = 0.0078125F;\n float f1 = 0.0078125F;\n int i = 18;\n int j = 18;\n Tessellator tessellator = Tessellator.getInstance();\n BufferBuilder bufferbuilder = tessellator.getBuffer();\n bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);\n bufferbuilder.pos((double)(x + 0), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 0), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n tessellator.draw();\n }",
"public void displayGameMode (Graphics g1)\n {\n if (state == 1)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/1/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 2)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/2/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 3)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/3/plain.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 4)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/4/plain.png\").getImage(), 0, 0, null);\n }\n \n bird1.displayDisplayCharacter (g1);\n bird2.displayDisplayCharacter (g1);\n bird3.displayDisplayCharacter (g1);\n }",
"@Override\n public void Run() {\n\n DrawSprite(\"pic\", 10, \"sprite/ch1\", new Rect(0, 100, 200, 300)).Show();\n DrawSprite(\"pic\", 11, \"sprite/ch2\", new Rect(100, 100, 300, 300)).Show();\n\n //자식이 부모보다 위에 있을수도 있고 밑에있을 수도 있어야됨.\n\n\n\n\n //Level로 설정하자\n //Level(0)Root\n //Level(1)그아래오브젝트...\n //같은레벨끼리 경쟁\n /*\n\n Level(0)기준\n -(아래로)\n\n */\n }",
"public void setScreenForGame(){\r\n screen.removeAll();\r\n screen.repaint();\r\n }",
"public GalaxyScreen(ProjectSurvival game){\n super();\n this.game = game;\n backGroundTexture = new Texture(Gdx.files.internal(\"images/GalaxyScreenBackground.jpg\"));\n backgroundSprite = new Sprite(backGroundTexture);\n dragonCurve1 = DragonCurveGenerator.generateDragonCurve(Const.WORLD_WIDTH, Const.WORLD_HEIGHT, RECURSIONS, new Vector2(5, 0));\n dragonCurve2 = DragonCurveGenerator.generateDragonCurve(Const.WORLD_WIDTH, Const.WORLD_HEIGHT, RECURSIONS, new Vector2(-5, 0));\n dragonCurve3 = DragonCurveGenerator.generateDragonCurve(Const.WORLD_WIDTH, Const.WORLD_HEIGHT, RECURSIONS, new Vector2(0, 5));\n dragonCurve4 = DragonCurveGenerator.generateDragonCurve(Const.WORLD_WIDTH, Const.WORLD_HEIGHT, RECURSIONS, new Vector2(0, -5));\n myCamera = new MyCamera(game);\n ab = new ActionButton(game, batch, renderer, new Vector2(1400, 30), new Vector2(300, 15), \"Return to Observatory\");\n origins = new ArrayList<Vector2>();\n destinations = new ArrayList<Vector2>();\n layout = new GlyphLayout();\n generator = new FreeTypeFontGenerator(Gdx.files.internal(\"fonts/goodTimes.ttf\"));\n parameter = new FreeTypeFontGenerator.FreeTypeFontParameter();\n parameter.size = 15;\n font = generator.generateFont(parameter);\n font.setColor(Color.WHITE);\n\n int nb = Integer.parseInt(GameScreen.database.getOneData(\"SELECT Count(*) FROM Systems WHERE Description = 'May_welcome_life' \"));\n for(int i = 0; i<nb; i++){\n favouriteX.add(Float.parseFloat(GameScreen.database.getOneData(\"SELECT SystemX FROM Systems WHERE Description = 'May welcome life' ;\")));\n favouriteY.add(Float.parseFloat(GameScreen.database.getOneData(\"SELECT SystemY FROM Systems WHERE Description = 'May welcome life' ;\")));\n }\n }",
"@Override\r\n public void init() {\n Image bgImage = assets().getImage(\"images/bg.png\");\r\n ImageLayer bgLayer = graphics().createImageLayer(bgImage);\r\n graphics().rootLayer().add(bgLayer);\r\n\r\n // Create tiles\r\n tiles = new int[BOARD_MAX_WIDTH][BOARD_MAX_HEIGHT];\r\n printTiles();\r\n\r\n // Place mines at random positions\r\n int placedMines = 0;\r\n Random r = new Random();\r\n while (placedMines < MINES) {\r\n int row = r.nextInt(BOARD_MAX_WIDTH);\r\n int col = r.nextInt(BOARD_MAX_HEIGHT);\r\n if (tiles[row][col] == TILE_EMPTY) {\r\n tiles[row][col] = TILE_MINE;\r\n placedMines++;\r\n }\r\n }\r\n printTiles();\r\n\r\n // Count number of mines around blank tiles\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n // Check surrounding tiles if mine\r\n if (tiles[row][col] == TILE_MINE) {\r\n for (int rowCheck = -1; rowCheck <= 1; rowCheck++) {\r\n for (int colCheck = -1; colCheck <= 1; colCheck++) {\r\n if (tileExistAndNotMine(row+rowCheck, col+colCheck)) {\r\n tiles[row+rowCheck][col+colCheck]++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n printTiles();\r\n\r\n // Create tile map\r\n Map<Integer, TileType> tileMap = new HashMap<Integer, TileType>();\r\n tileMap.put(0, TileType.EMPTY);\r\n tileMap.put(1, TileType.ONE);\r\n tileMap.put(2, TileType.TWO);\r\n tileMap.put(3, TileType.THREE);\r\n tileMap.put(4, TileType.FOUR);\r\n tileMap.put(5, TileType.FIVE);\r\n tileMap.put(6, TileType.SIX);\r\n tileMap.put(7, TileType.SEVEN);\r\n tileMap.put(8, TileType.EIGHT);\r\n tileMap.put(9, TileType.MINE);\r\n\r\n // Create a GroupLayer to hold the sprites\r\n GroupLayer groupLayer = graphics().createGroupLayer();\r\n graphics().rootLayer().add(groupLayer);\r\n\r\n // Create graphic tiles\r\n tileList = new ArrayList<Tile>();\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n Tile tile = new Tile(groupLayer, col*Tile.SIZE, row*Tile.SIZE, tileMap.get(tiles[row][col]), row, col);\r\n tileList.add(tile);\r\n }\r\n }\r\n\r\n // Timer text\r\n CanvasImage canvasImage = graphics().createImage(160, 70);\r\n timerLabel = canvasImage.canvas();\r\n ImageLayer countDownLayer = graphics().createImageLayer(canvasImage);\r\n countDownLayer.setTranslation(180, 10);\r\n graphics().rootLayer().add(countDownLayer);\r\n\r\n // Cleared tiles text\r\n CanvasImage clearedTilesImage = graphics().createImage(160, 70);\r\n clearedTilesLabel = clearedTilesImage.canvas();\r\n ImageLayer clearedTilesLayer = graphics().createImageLayer(clearedTilesImage);\r\n clearedTilesLayer.setTranslation(180, 30);\r\n graphics().rootLayer().add(clearedTilesLayer);\r\n updateClearedTiles();\r\n }",
"public void run (){\n\t\t\t\t\t\t\t\t\tgame.setScreen(game.ui);\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\n\t\t\t\t\t\t\t\t}",
"SettingsScreenClass(){\r\n cursorRow=0;\r\n counter=0;\r\n endPart=false;\r\n initSprites();\r\n setImage(512,500);\r\n fadeAmount=12;\r\n for(int i=0;i<12;i++){\r\n fadeColors[i]=new Color(0,0,0,(i)*20);\r\n }\r\n }",
"@Override\n public void draw(Batch batch, float parentAlpha) {\n\n if(vidas == 0){\n sprite.setBounds(body.getPosition().x-7,body.getPosition().y-12,16,16);\n sprite.draw(batch);\n\n }else{\n sprite.setBounds(body.getPosition().x-7,body.getPosition().y-7,16,16);\n sprite.setPosition(body.getPosition().x - 9f, body.getPosition().y - 9);\n sprite.draw(batch);\n patrullar();\n }\n\n\n }",
"public static void classInit(){\n //set up font\n //font = WurfelEngine.getInstance().manager.get(\"com/BombingGames/WurfelEngine/EngineCore/arial.fnt\"); //load font\n font = new BitmapFont(false);\n //font.scale(2);\n\n\n font.setColor(Color.GREEN);\n //font.scale(-0.5f);\n \n //load sprites\n Block.loadSheet();\n addInputProcessor(staticStage);\n skin = new Skin(Gdx.files.internal(\"com/BombingGames/WurfelEngine/Core/skin/uiskin.json\"));\n GameplayScreen.msgSystem().viewInit(skin,Gdx.graphics.getWidth()/2, Gdx.graphics.getHeight()/4);\n }",
"@Override\r\n\tpublic void render(SpriteBatch sb) {\n\t\tsb.draw(this.getSpritesheet(), this.getPos().getX(), this.getPos().getY());\r\n\t}",
"public static void loadBg() {\n bg = new Texture (Gdx.files.internal(\"data/bbb.png\"));\n textureBg =new TextureRegion(bg);\n player = new Texture (Gdx.files.internal(\"data/nave2.png\"));\n texturePlayer =new TextureRegion(player);\n gameOver = new Texture (Gdx.files.internal(\"data/gameOver.png\"));\n textureGameOver =new TextureRegion(gameOver);\n textureGameOver.flip(false, true);\n laser= new Texture (Gdx.files.internal(\"data/disparo_sprite.png\"));\n textureLaser = new TextureRegion(laser);\n obstacle= new Texture (Gdx.files.internal(\"data/square.gif\"));\n textureObstacle = new TextureRegion(obstacle);\n title= new Texture (Gdx.files.internal(\"data/invadpt2.png\"));\n textureTitle = new TextureRegion(title);\n win = new Texture (Gdx.files.internal(\"data/win.png\"));\n textureWin =new TextureRegion(win);\n textureWin.flip(false, true);\n ranking = new Texture (Gdx.files.internal(\"data/ranking.png\"));\n textureRanking =new TextureRegion(ranking);\n textureRanking.flip(false, true);\n ranking1 = new Texture (Gdx.files.internal(\"data/ranking1.png\"));\n textureRanking1 =new TextureRegion(ranking1);\n textureRanking1.flip(false, true);\n ranking2 = new Texture (Gdx.files.internal(\"data/ranking2.png\"));\n textureRanking2 =new TextureRegion(ranking2);\n textureRanking2.flip(false, true);\n superEnemy= new Texture (Gdx.files.internal(\"data/superEnemy.png\"));\n textureSuperEnemy = new TextureRegion(superEnemy);\n textureSuperEnemy.flip(false, true);\n\n text1=new Texture(Gdx.files.internal(\"data/bg.jpg\"));\n text2 = new TextureRegion(text1);\n text= new TextureAtlas();\n text.addRegion(\"text\",text2);\n text.addRegion(\"text\",text1,0,0,20,30);\n loadColorInvaders();\n\n\n }",
"public void cargarGameScreenTiled() {\n\n musicaTiled = get(rutaMusica, Music.class);\n musicaTiled.setLooping(true);\n platMusicInGame();\n\n TextureAtlas atlas = get(atlasTiledStuff, TextureAtlas.class);\n tiledMap = get(rutaTiled, TiledMap.class);\n\n SkeletonJson json = new SkeletonJson(atlas);\n json.setScale(.01f);\n ponySkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/personajes.json\"));\n // ponySkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/characters.json\"));\n json.setScale(.004f);\n skeletonBombData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bombs.json\"));\n bombAnim = skeletonBombData.findAnimation(\"b1\");\n bombExAnim = skeletonBombData.findAnimation(\"b2x\");\n\n json.setScale(.005f);\n skeletonMonedaData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/coin.json\"));\n monedaAnim = skeletonMonedaData.findAnimation(\"normal\");\n monedaTomadaAnim = skeletonMonedaData.findAnimation(\"plus1\");\n\n json.setScale(.009f);\n chileSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/chile.json\"));\n chileAnim = chileSkeletonData.findAnimation(\"normal\");\n chileTomadaAnim = chileSkeletonData.findAnimation(\"toospicy\");\n\n json.setScale(.009f);\n globoSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/ballons.json\"));\n globoAnim = globoSkeletonData.findAnimation(\"normal\");\n globoTomadaAnim = globoSkeletonData.findAnimation(\"plus5\");\n\n json.setScale(.009f);\n dulceSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/chocolate.json\"));\n dulceAnim = dulceSkeletonData.findAnimation(\"normal\");\n dulceTomadaAnim = dulceSkeletonData.findAnimation(\"speedup\");\n\n medallaPrimerLugar = atlas.findRegion(\"imagenes/podio/1stplacetrophy\");\n medallaSegundoLugar = atlas.findRegion(\"imagenes/podio/2ndplace\");\n medallaTercerLugar = atlas.findRegion(\"imagenes/podio/3rdplace\");\n congratulations = atlas.findRegion(\"imagenes/podio/congratulations\");\n youLose = atlas.findRegion(\"imagenes/podio/youlose\");\n timeUp = atlas.findRegion(\"imagenes/podio/timeup\");\n\n // json.setScale(.003f);\n // SkeletonData fuegoSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bombs.json\"));\n // fuegoAnim = fuegoSkeletonData.findAnimation(\"firedancing\");\n // fuegoSkeleton = new Skeleton(fuegoSkeletonData);\n\n json.setScale(.01f);\n SkeletonData fondoSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/background.json\"));\n fondoAnim = fondoSkeletonData.findAnimation(\"animation\");\n fondoSkeleton = new Skeleton(fondoSkeletonData);\n\n //\n // json.setScale(.011f);\n // SkeletonData fogataSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/fogata.json\"));\n // fogataAnim = fogataSkeletonData.findAnimation(\"fogata\");\n // fogataSkeleton = new Skeleton(fogataSkeletonData);\n //\n // json.setScale(.005f);\n // SkeletonData plumaSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/feather.json\"));\n // plumaAnim = plumaSkeletonData.findAnimation(\"pluma\");\n // plumaSkeleton = new Skeleton(plumaSkeletonData);\n //\n // json.setScale(.011f);\n // SkeletonData bloodStoneSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bloodstone.json\"));\n // bloodStoneAnim = bloodStoneSkeletonData.findAnimation(\"animation\");\n // bloodStoneSkeleton = new Skeleton(bloodStoneSkeletonData);\n //\n // SkeletonData bloodStone2SkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bloodstones.json\"));\n // bloodStone2Anim = bloodStone2SkeletonData.findAnimation(\"glow1\");\n // bloodStone2Skeleton = new Skeleton(bloodStone2SkeletonData);\n\n fondo = atlas.findRegion(\"imagenes/fondo\");\n\n padIzq = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/pad_izq\")));\n padDer = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/pad_derecha\")));\n btBombaDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/bombasalpresionar\")));\n btBombaUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/bombasinpresionar\")));\n\n btJumpDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/saltoalpresionar\")));\n btJumpUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/saltosinpresionar\")));\n // btTroncoUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/botontroncosinpresionar\")));\n // btTroncoDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/botontroncopresionado\")));\n\n btTroncoUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/btPlatanoTachuelas\")));\n btTroncoDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/btPlatanoTachuelasPresionado\")));\n\n btPauseUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/pause\")));\n\n indicador = atlas.findRegion(\"Interfaz/indicador\");\n indicadorCloud = atlas.findRegion(\"Interfaz/icono000\");\n indicadorCientifico = atlas.findRegion(\"Interfaz/icono001\");\n indicadorMinion = atlas.findRegion(\"Interfaz/icono002\");\n indicadorNatylol = atlas.findRegion(\"Interfaz/icono003\");\n indicadorLighthingAlba = atlas.findRegion(\"Interfaz/icono004\");\n indicadorIgnis = atlas.findRegion(\"Interfaz/icono005\");\n\n perfilRegionCloud = atlas.findRegion(\"perfiles/cloud\");\n perfilRegionNatylol = atlas.findRegion(\"perfiles/natylol\");\n perfilRegionIgnis = atlas.findRegion(\"perfiles/ignis\");\n perfilRegionCientifico = atlas.findRegion(\"perfiles/scientist\");\n perfilRegionLAlba = atlas.findRegion(\"perfiles/lightingalba\");\n perfilRegionEnemigo = atlas.findRegion(\"perfiles/enemy\");\n\n lugaresMarco = atlas.findRegion(\"Interfaz/lugares\");\n\n moneda = atlas.findRegion(\"moneda\");\n\n tronco = atlas.findRegion(\"tachuelas\");\n tachuelas = atlas.findRegion(\"tachuelas\");\n platano = atlas.findRegion(\"platano\");\n\n pickCoin = get(\"data/musica/coin.mp3\");\n jump = get(\"data/musica/salto.mp3\");\n }",
"private void setSpritesPosition()\r\n\t{\r\n\t\tfloat w = Gdx.graphics.getWidth();\r\n\t\tfloat h = Gdx.graphics.getHeight();\r\n\t\t\r\n\t\tsetX(camera.position.x-camera.viewportWidth/2 + 0.1f * camera.viewportWidth/2);\r\n\t\tsetY(camera.position.y + camera.viewportHeight/2 - 0.15f*w/h* camera.viewportHeight/2);\r\n\t\theroHealth.setX(getX());\r\n\t\theroHealth.setY(getY());\r\n\t\t\r\n\t\tcover.setX(getX() + 10f/270f * heroHealth.getWidth());\r\n\t\tcover.setY(getY());\r\n\t\t\r\n\t}",
"public void sprite() {\n\t\tspr.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = spr;\n\t}",
"public void act() \n {\n String worldname = getWorld().getClass().getName();\n if (worldname == \"Level0\")\n setImage(new GreenfootImage(\"vibranium.png\"));\n else if (worldname == \"Level1\")\n setImage(rocket.getCurrentImage());\n setLocation(getX()-8, getY()); \n if (getX() == 0) \n {\n getWorld().removeObject(this);\n }\n \n }",
"protected abstract void chooseSprite();",
"void updateScreen() {\n\t\tZone possibleNewZone = currentZone.getSpace(playerY, playerX).getNextZone();\n\t\tif (possibleNewZone != null) {\n\t\t\tString oldBGMusic = currentZone.getBackgroundMusic();\n\t\t\tcurrentZone = possibleNewZone;\n\t\t\tcurrentZone.enableZoneWarpSpaces();\n\t\t\tplayerX = currentZone.getPlayerStartX();\n\t\t\tplayerY = currentZone.getPlayerStartY();\n\t\t\t\n\n\t\t\tif (!oldBGMusic.equals(currentZone.getBackgroundMusic())) {\n\t\t\t\tmusicPlayer.stop();\n\t\t\t\tmusicPlayer.play(currentZone.getBackgroundMusic(), 100);\n\t\t\t}\n\t\t}\n\n\t\t// Update Panel Colors\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int a = 0; a < 10; a++) {\n\t\t\t\tpanels[i][a].setBackground(currentZone.getSpace(i, a).getColor());\n\t\t\t}\n\t\t}\n\n\t\t// Update Labels\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int a = 0; a < 10; a++) {\n\n\t\t\t\tlabels[i][a].setIcon(currentZone.getSpace(i, a).getPic());\n\t\t\t}\n\t\t}\n\t\t// Shows player in the new space\n\t\tlabels[playerY][playerX].setIcon(playerPic);\n\n\t\t// Shows enemy in the new space\n\t\t// labels[enemyY][enemyX].setIcon(enemyPic);\n\t}",
"public void Define() {\n manager = new Manager(); // Initialize other classes\n save = new Save();\n store = new Store();\n menu = new Menu();\n postgame = new PostGame();\n\n map = new ImageIcon(\"res/map.png\").getImage(); // Load background image\n \t\n \n // Load the track image\n track = new ImageIcon(\"res/TrackCorner.png\").getImage(); // Initialize the track image file\n \n // Load images for the towers\n tileset_towers[0] = new ImageIcon(\"res/redlasertower.png\").getImage();\n tileset_towers[1] = new ImageIcon(\"res/blueLaserTower.png\").getImage();\n tileset_towers[2] = new ImageIcon(\"res/goldLaserTower.png\").getImage();\n \n // Load images for the indicators\n tileset_indicators[0] = new ImageIcon(\"res/button.png\").getImage();\n tileset_indicators[1] = new ImageIcon(\"res/money.png\").getImage();\n tileset_indicators[2] = new ImageIcon(\"res/heart.png\").getImage();\n \n // Load images for the buttons\n tileset_buttons[0] = new ImageIcon(\"res/redLaserTower.png\").getImage();\n tileset_buttons[1] = new ImageIcon(\"res/blueLaserTower.png\").getImage();\n tileset_buttons[2] = new ImageIcon(\"res/goldLaserTower.png\").getImage();\n tileset_buttons[3] = new ImageIcon(\"res/trash.png\").getImage();\n \n // Load images for the solider\n tileset_soldier[0] = new ImageIcon(\"res/enemyD1.png\").getImage();\n tileset_soldier[1] = new ImageIcon(\"res/enemyD2.png\").getImage();\n \n tileset_soldier[2] = new ImageIcon(\"res/enemyR1.png\").getImage();\n tileset_soldier[3] = new ImageIcon(\"res/enemyR2.png\").getImage();\n \n tileset_soldier[4] = new ImageIcon(\"res/enemyL1.png\").getImage();\n tileset_soldier[5] = new ImageIcon(\"res/enemyL2.png\").getImage();\n \n tileset_soldier[6] = new ImageIcon(\"res/enemyU1.png\").getImage();\n tileset_soldier[7] = new ImageIcon(\"res/enemyU2.png\").getImage();\n \n // Save the configuration of the track\n save.loadSave(new File(\"save/mission.txt\"));\n save.loadHighScore();\n \n // Initialize enemy objects\n for(int i = 0; i < enemies.length; i++) {\n \tenemies[i] = new Enemy();\n }\n \n }",
"private void drawScreen(Sprite spr) {\n\t\tTexture tex = spr.getTexture();\n\t\t\n\t\ttex.bind();\n\t\t\n\t\tglBegin(GL_QUADS);\n\t\t{\n\t\t\tglTexCoord2f(0, tex.getHeight());\n\t\t\tglVertex2f(0, spr.getHeight());\n\t\t\tglTexCoord2f(tex.getWidth(), tex.getHeight());\n\t\t\tglVertex2f(spr.getWidth(), spr.getHeight());\n\t\t\tglTexCoord2f(tex.getWidth(), 0);\n\t\t\tglVertex2f(spr.getWidth(), 0);\n\t\t\tglTexCoord2f(0, 0);\n\t\t\tglVertex2f(0, 0);\n\t\t}\n\t\tglEnd();\n\t}",
"public void updateGameMode (MouseEvent e)\n { \n if ((e.getX() >= 512 && e.getX() <= 836) && (e.getY() >= 161 && e.getY() <=520))\n sprite = 2;\n else if ((e.getX() >= 62 && e.getX() <= 386) && (e.getY() >= 161 && e.getY() <=520))\n sprite = 1;\n else \n sprite = 0;\n }",
"public zombie_bg()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1010,900, 1); \n setPaintOrder(ScoreBoard.class, player.class, zomb_gen.class, options.class);\n populate();\n \n }",
"public void paint(){\n\t\tif(this.x+GameScreen.backCam<900 && this.x+GameScreen.backCam>-60){\n\t\t\tGraphicsHandler.drawImage(texture,this.x+GameScreen.backCam,this.y+GameScreen.yCam,size,size);\n\t\t}\n\t}",
"public void atBattleStartPreDraw() {\n\n this.flash();\n ArrayList<Integer> orbs = new ArrayList();\n orbs.add(1);\n orbs.add(2);\n orbs.add(3);\n orbs.add(4);\n\n for (int i = 0; i < 2; i++) {\n\n Integer o = orbs.get(AbstractDungeon.cardRng.random(orbs.size() - 1));\n\n switch (o) {\n case 1:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new AttackSlime(), false, true));\n break;\n case 2:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new ShieldSlime(), false, true));\n break;\n case 3:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new SlimingSlime(), false, true));\n break;\n case 4:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new PoisonSlime(), false, true));\n break;\n }\n }\n\n com.megacrit.cardcrawl.dungeons.AbstractDungeon.actionManager.addToBottom(new com.megacrit.cardcrawl.actions.defect.IncreaseMaxOrbAction(1));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new PotencyPower(AbstractDungeon.player, AbstractDungeon.player, 1), 1));\n\n\n }",
"public void settings() {\r\n\t\tthis.size(PlayGame.WIDTH,PlayGame.HEIGHT);\r\n\t}",
"public void initialize2() {\n\t\txHero1 = 10;\n\t\tinsecondmode=true;\n\t\tImageIcon bg = new ImageIcon(\"bg for one player.png\");\n\t\tBackground = (bg.getImage().getScaledInstance(bg.getIconWidth(), bg.getIconHeight(), Image.SCALE_DEFAULT));\n\t\tImageIcon[] in1 = new ImageIcon[12];\n\t\tin1[0] = new ImageIcon(\"\");\n\t\tin1[1] = new ImageIcon(\"\");\n\t\tin1[2] = new ImageIcon(\"\");\n\t\tin1[3] = new ImageIcon(\"\");\n\t\tin1[4] = new ImageIcon(\"\");\n\t\tin1[5] = new ImageIcon(\"\");\n\t\tin1[6] = new ImageIcon(\"\");\n\t\tin1[7] = new ImageIcon(\"\");\n\t\tin1[8] = new ImageIcon(\"\");\n\t\tin1[9] = new ImageIcon(\"\");\n\t\tin1[10] = new ImageIcon(\"\");\n\t\tin1[11] = new ImageIcon(\"\");\n\t\tImageIcon[] in2 = new ImageIcon[12];\n\t\tin2[0] = new ImageIcon(\"Hero02.png\");\n\t\tin2[1] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[2] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[3] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[4] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[5] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[6] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[7] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[8] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[9] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[10] = new ImageIcon(\"Hero02 Attack01.png\");\n\t\tin2[11] = new ImageIcon(\"Hero02 Die.png\");\n\t\tImageIcon[] inBullet1 = new ImageIcon[3];\n\t\tinBullet1[0] = new ImageIcon(\"\");\n\t\tinBullet1[1] = new ImageIcon(\"\");\n\t\tinBullet1[2] = new ImageIcon(\"\");\n\t\tImageIcon[] inBullet2 = new ImageIcon[5];\n\t\tinBullet2[0] = new ImageIcon(\"20.png\");\n\t\tinBullet2[1]= new ImageIcon(\"50.png\");\n\t\tinBullet2[2]= new ImageIcon(\"100.png\");\n\t\tinBullet2[3]= new ImageIcon(\"200.png\");\n\t\tinBullet2[4]= new ImageIcon(\"500.png\");\n\t\tcannotdefend(1);\n\t\tHero1.settemplate(in2);\n\t\tHero2.settemplate(in1);\n\t\tBullet1.settemplate(inBullet2);\n\t\tBullet2.settemplate(inBullet1);\n\t\tHero1.setstatus(0);\n\t\tHero2.setstatus(0);\n\t}",
"@Override\n protected void initGame() {\n\n// entityBuilder()\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(getAppWidth() - 64, getAppHeight() - 64)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(0, getAppHeight() / 2 - 32)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .with(new ProjectileComponent(new Point2D(1, 0), 150))\n// .buildAndAttach();\n }",
"public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\n \n }",
"private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }",
"private void settingsScreenRender() {\n overlay.draw(batch, 0.5f);\n uiFont.draw(batch, scoreTxt, 0, HEIGHT - (scoreLayout.height));\n uiFont.draw(batch, healthTxt, WIDTH / 2, HEIGHT - (healthLayout.height));\n musicOn.draw(batch, 1);\n musicOff.draw(batch, 1);\n resume.draw(batch, 1);\n settingStage.draw();\n }",
"public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }",
"private void SetPlayerAndEnemy(int stage) {\n // screen size\n Point screen = GameView.GetScreenSize();\n int countMax[] = new int[2];\n // to diverge the initialization from selected stage.\n switch(stage) {\n case Play.STAGE_OFF_ROAD:\n // Player\n // loading the file\n this.mPlayer.LoadCharaImage(this.mContext,\"offroadplayer\");\n this.mPlayer.mSize.x = OffroadPlayer.PLAYER_SIZE.x;\n this.mPlayer.mSize.y = OffroadPlayer.PLAYER_SIZE.y;\n this.mPlayer.mPos.x = (screen.x-this.mPlayer.mSize.x)>>1;\n this.mPlayer.mPos.y = screen.y+100;\n this.mPlayer.mMoveX = 0.0f;\n this.mPlayer.mMoveY = PLAYER_DEFAULT_SPEED*-1;\n this.mPlayer.mExistFlag = true;\n countMax[0] = 2;\n // Enemy that is jump point\n this.mEnemy.LoadCharaImage(this.mContext,\"offroadjump\");\n this.mEnemy.mSize.x = OffroadObstacles.OBSTACLE_JUMP_POINT_SIZE.x;\n this.mEnemy.mSize.y = OffroadObstacles.OBSTACLE_JUMP_POINT_SIZE.y;\n this.mEnemy.mPos.x = screen.x+100;\n this.mEnemy.mPos.y = 600;\n this.mEnemy.mMoveX = ENEMY_DEFAULT_SPEED*-1;\n this.mEnemy.mMoveY = 0.0f;\n this.mEnemy.mType = Play.STAGE_OFF_ROAD;\n this.mEnemy.mExistFlag = true;\n countMax[1] = 0;\n break;\n case Play.STAGE_ROAD:\n // loading the file\n this.mPlayer.LoadCharaImage(this.mContext,\"roadplayer\");\n this.mPlayer.mSize.x = RoadPlayer.RUNNER_SIZE.x;\n this.mPlayer.mSize.y = RoadPlayer.RUNNER_SIZE.y;\n this.mPlayer.mPos.x = (screen.x-this.mPlayer.mSize.x)>>1;\n this.mPlayer.mPos.y = screen.y+100;\n this.mPlayer.mMoveX = 0.0f;\n this.mPlayer.mMoveY = PLAYER_DEFAULT_SPEED*-1;\n this.mPlayer.mExistFlag = true;\n countMax[0] = 4;\n // Enemy that is hurdle\n this.mEnemy.LoadCharaImage(this.mContext,\"roadhurdle\");\n this.mEnemy.mSize.x = RoadObstacles.HURDLE_SIZE.x;\n this.mEnemy.mSize.y = RoadObstacles.HURDLE_SIZE.y;\n this.mEnemy.mPos.x = screen.x+100;\n this.mEnemy.mPos.y = 600;\n this.mEnemy.mMoveX = ENEMY_DEFAULT_SPEED*-1;\n this.mEnemy.mMoveY = 0.0f;\n this.mEnemy.mType = Play.STAGE_ROAD;\n this.mEnemy.mExistFlag = true;\n countMax[1] = 0;\n break;\n case Play.STAGE_SEA:\n // loading the file\n this.mPlayer.LoadCharaImage(this.mContext,\"swimmer\");\n this.mPlayer.mSize.x = SeaPlayer.SWIMMER_SIZE.x;\n this.mPlayer.mSize.y = SeaPlayer.SWIMMER_SIZE.y;\n this.mPlayer.mPos.x = -100;\n this.mPlayer.mPos.y = PLAYER_ARRIVE_POSITION_Y;\n this.mPlayer.mMoveX = PLAYER_DEFAULT_SPEED;\n this.mPlayer.mMoveY = 0.0f;\n this.mPlayer.mExistFlag = true;\n countMax[0] = 3;\n // Enemy that is sunfish\n this.mEnemy.LoadCharaImage(this.mContext,\"sunfish\");\n this.mEnemy.mSize.x = SeaEnemyManager.SUNFISH_SIZE.x;\n this.mEnemy.mSize.y = SeaEnemyManager.SUNFISH_SIZE.y;\n this.mEnemy.mPos.x = screen.x+100;\n this.mEnemy.mPos.y = 600;\n this.mEnemy.mMoveX = ENEMY_DEFAULT_SPEED*-1;\n this.mEnemy.mMoveY = 0.0f;\n this.mEnemy.mType = Play.STAGE_SEA;\n this.mEnemy.mExistFlag = true;\n countMax[1] = SeaEnemyManager.ANIMATION_COMMON_COUNT_MAX;\n break;\n }\n // animation setting\n // player\n this.mPlayerAni.SetAnimation(\n 0,0,\n this.mPlayer.mSize.x,\n this.mPlayer.mSize.y,\n countMax[0],10,0\n );\n // except for off-road and road, enemy\n if (stage == Play.STAGE_SEA) {\n this.mEnAni.SetAnimation(\n 0, 0,\n this.mEnemy.mSize.x, this.mEnemy.mSize.y,\n countMax[1], 10, 0\n );\n }\n }",
"public void act() \n {\n setImage(\"1up.png\");\n setImage(\"acrate.png\");\n setImage(\"Betacactus.png\");\n setImage(\"bullet1.png\");\n setImage(\"bullet2.png\");\n setImage(\"burst.png\");\n setImage(\"cowboy.png\");\n setImage(\"fOxen1.png\");\n setImage(\"fOxen2.png\");\n setImage(\"fOxen3.png\");\n setImage(\"fOxen4.png\");\n setImage(\"fOxenH.png\");\n setImage(\"fWagon1.png\");\n setImage(\"fWagon2.png\");\n setImage(\"fWagon3.png\");\n setImage(\"fWagon4.png\");\n setImage(\"fWagonH.png\");\n setImage(\"health.png\");\n setImage(\"indian.png\");\n setImage(\"normal.png\");\n setImage(\"oxen.png\");\n setImage(\"oxen2.png\");\n setImage(\"oxen3.png\");\n setImage(\"oxen4.png\");\n setImage(\"oxen-hit.png\");\n setImage(\"plasma.png\");\n setImage(\"rapid.png\");\n setImage(\"snake1.png\");\n setImage(\"snake2.png\");\n setImage(\"snake3.png\");\n setImage(\"snake4.png\");\n setImage(\"spread.png\");\n setImage(\"theif.png\");\n setImage(\"train1.png\");\n setImage(\"train-hit.png\");\n setImage(\"wagon.png\");\n setImage(\"wagonhit.png\");\n setImage(\"wave.png\");\n getWorld().removeObject(this);\n }",
"@Override\n\tpublic void render(SpriteBatch batch) {\n\t}",
"public static void init()\n {\n \tSpriteSheet sheet = new SpriteSheet(ImageLoader.loadImage(\"/sprites/spritesheet.png\"));\n BufferedImage img;\n /*for(int y = 0;y<4;y++)\n \t{\n \t\t\n \timg = sheet.crop(width*y,0,width,height);\n \t\t\n \t\tplayer.add(img);\n \t}*/\n hero = sheet.crop(0,0,width,height);\n heroUp = sheet.crop(width,0,width,height);\n heroLeft = sheet.crop(width*2,0,width,height);\n heroRight = sheet.crop(width*3,0,width,height);\n \n heroDown1 = sheet.crop(0,height+32,width+1,height);\n heroDown2 = sheet.crop(width+1,height+32,width+1,height);\n heroUp1 = sheet.crop(width*2+2,height+32,width,height);\n heroUp2 = sheet.crop(width*3+2,height+32,width,height);\n heroLeft1 = sheet.crop(width*4+2,height+32,width,height);\n heroLeft2 = sheet.crop(width*5+2,height+32,width,height);\n heroRight1 = sheet.crop(width*6+2,height+32,width,height);\n heroRight2 = sheet.crop(width*7+2,height+32,width,height);\n \n /*for(int i = 0;i<4;i++)\n {\n \tfor(int y = 0;y<4;y++)\n \t{\n \t\tif(y==1)\n \t\t{\n \t\t\timg = sheet.crop(width*y,height*i,width,height);\n \t\t}\n \t\telse\n \t\t{\n \t\t\timg = sheet.crop(width*y+1,height*i+1,width,height);\n \t\t}\n \t\tplayer.add(img);\n \t}\n }*/\n sheet = new SpriteSheet(ImageLoader.loadImage(\"/sprites/PokemonTileSet.png\"));\n for(int i = 0;i<50;i++)\n {\n \tfor(int y = 0;y<8;y++)\n \t{\n \t\timg = sheet.crop(tileW*y,tileH*i,tileW,tileH);\n \t\tassets.add(img);\n \t}\n }\n \n /*\n hero = sheet.crop(0,0,width,height);\n heroUp = sheet.crop(width,0,width,height);\n heroLeft = sheet.crop(width*2,0,width,height);\n heroRight = sheet.crop(width*3,0,width,height);\n \n treeTopLeft = sheet.crop(0,firstRow,tWidth,tHeight);\n treeTopRight = sheet.crop(tWidth,firstRow,tWidth,tHeight);\n treeMidLeft = sheet.crop(tWidth*2,firstRow,tWidth,tHeight);\n treeMidRight = sheet.crop(tWidth*3,firstRow,tWidth,tHeight);\n treeBotLeft = sheet.crop(tWidth*4,firstRow,tWidth,tHeight);\n treeBotRight = sheet.crop(tWidth*5,firstRow,tWidth,tHeight);\n treeTopLeftGrass = sheet.crop(tWidth*6,firstRow,tWidth,tHeight);\n treeTopRightGrass = sheet.crop(tWidth*7,firstRow,tWidth,tHeight);\n treeTopLeftMushroom = sheet.crop(tWidth*8,firstRow,tWidth,tHeight);\n grass = sheet.crop(tWidth*9,firstRow,tWidth,tHeight);\n \n wildGrass = sheet.crop(0,secondRow,tWidth,tHeight);\n mushroom = sheet.crop(tWidth,secondRow,tWidth,tHeight);\n logLeft = sheet.crop(tWidth*2,secondRow,tWidth,tHeight);\n logRight = sheet.crop(tWidth*3,secondRow,tWidth,tHeight);\n ledgeLeft = sheet.crop(tWidth*4,secondRow,tWidth,tHeight);\n ledgeMid = sheet.crop(tWidth*5,secondRow,tWidth,tHeight);\n ledgeRight = sheet.crop(tWidth*6,secondRow,tWidth,tHeight);\n treeLeftOverlap = sheet.crop(tWidth*7,secondRow,tWidth,tHeight);\n treeRightOverlap = sheet.crop(tWidth*8,secondRow,tWidth,tHeight);\n \n heroWalkingDown1 = sheet.crop(0,thirdRow,width+1,height);\n heroWalkingDown2 = sheet.crop(width+1,thirdRow,width+1,height);\n heroWalkingUp1 = sheet.crop(width*2+1,thirdRow,width,height);\n heroWalkingUp2 = sheet.crop(width*3+1,thirdRow,width,height);\n heroWalkingLeft1 = sheet.crop(width*4+1,thirdRow,width,height);\n heroWalkingLeft2 = sheet.crop(width*5+1,thirdRow,width,height);\n heroWalkingRight1 = sheet.crop(width*6+1,thirdRow,width,height);\n heroWalkingRight2 = sheet.crop(width*7+1,thirdRow,width,height);\n */\n }",
"@Override\r\n\tpublic void gameInit() \r\n\t{\r\n\t\tfont = new Font(\"Courier\", Font.BOLD, 14);\r\n\t\tfontInfo = this.getFontMetrics(font);\r\n\t\tkeys = new KeyValues();\r\n\t\t\r\n\t\tbackground.loadImage(\"/images/sky.png\");\r\n\t\ttileset = new TileSet(10,10,32,32);\r\n\t\ttileset.loadTiles(\"/images/test_tiles.png\");\r\n\t\tmap = new Map(tileset, 20, 50);\r\n\t\tmap.readMap(\"res/maps/testmap2.txt\");\r\n\t\t\r\n\t\tcamera.setDimensions(getScreenWidth(), getScreenHeight());\r\n\t\tcamera.setXRange(0, map.getWidth() - getScreenWidth());\r\n\t\tcamera.setYRange(0, map.getHeight() - getScreenHeight());\r\n\t}",
"private void initialGame() {\n Display display = this.getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n GameUtils.mWidth = size.x;\n GameUtils.mHeight = size.y;\n GameUtils.frameWidth = (int)(GameUtils.mWidth / 2.5);\n GameUtils.frameHeight = GameUtils.frameWidth;\n GameUtils.dx = GameUtils.mWidth / 120;\n GameUtils.maxVelX = GameUtils.mHeight / 15;\n GameUtils.maxVelY = GameUtils.mHeight / 8;\n\n // Bitmap\n GameUtils.bitmapPika = BitmapFactory.decodeResource(getResources(),\n R.drawable.pika_sprite_8_384);\n GameUtils.bitmapPika = Bitmap.createScaledBitmap(GameUtils.bitmapPika,\n GameUtils.frameWidth * GameUtils.frameCount, GameUtils.frameHeight, false);\n GameUtils.apple = BitmapFactory.decodeResource(getResources(), R.drawable.apple);\n GameUtils.banana = BitmapFactory.decodeResource(getResources(), R.drawable.banana);\n GameUtils.coke = BitmapFactory.decodeResource(getResources(), R.drawable.coke);\n\n GameUtils.bitmapRestart = BitmapFactory.decodeResource(getResources(), R.drawable.restart);\n GameUtils.bitmapRestart = Bitmap.createScaledBitmap(GameUtils.bitmapRestart,\n GameUtils.mWidth / 12, GameUtils.mWidth / 12, false);\n GameUtils.bitmapPause = BitmapFactory.decodeResource(getResources(), R.drawable.pause);\n GameUtils.bitmapPause = Bitmap.createScaledBitmap(GameUtils.bitmapPause,\n GameUtils.mWidth / 15, GameUtils.mWidth / 15, false);\n\n // Game Data\n GameUtils.WIN = true;\n GameUtils.score = 0;\n GameUtils.apples = 0;\n GameUtils.bananas = 0;\n GameUtils.cokes = 0;\n GameUtils.jumps = 0;\n GameUtils.totalSec = GameUtils.totalTime;\n GameUtils.visibleFruit = 0;\n }",
"private void init()\n {\n batch = new SpriteBatch();\n \n camera = new OrthographicCamera(Constants.VIEWPORT_WIDTH, Constants.VIEWPORT_HEIGHT);\n camera.position.set(0, 0, 0);\n camera.update();\n \n cameraGui = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraGui.position.set(0, 0, 0);\n cameraGui.setToOrtho(true); // flip y-axis\n cameraGui.update();\n \n cameraBg = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraBg.position.set(0, 0, 0);\n //cameraBg.setToOrtho(true);\n cameraBg.update();\n \n b2Debug = new Box2DDebugRenderer();\n }",
"public MainMenuScreen() {\r\n stage = new Stage(new ScreenViewport());\r\n Gdx.input.setInputProcessor(stage);\r\n Table table = new Table();\r\n stage.addActor(table);\r\n Texture background = new Texture(Gdx.files.internal(\"main-menu/main_menu_full.png\"));\r\n //background.setWrap(Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat);\r\n TextureRegion region = new TextureRegion(background);\r\n table.setBackground(new TextureRegionDrawable(region));\r\n table.setFillParent(true);\r\n table.setDebug(false);\r\n Texture startUp = new Texture(Gdx.files.internal(\"main-menu/Start_Up.png\"));\r\n TextureRegion startUpRegion = new TextureRegion(startUp);\r\n Texture startDown = new Texture(Gdx.files.internal(\"main-menu/Start_Down.png\"));\r\n TextureRegion startDownRegion = new TextureRegion(startDown);\r\n Button startButton = new Button(new TextureRegionDrawable(startUpRegion),\r\n new TextureRegionDrawable(startDownRegion));\r\n table.row();\r\n table.add(startButton).center().bottom().expand();\r\n\r\n Texture quitUp = new Texture(Gdx.files.internal(\"main-menu/Quit_Up.png\"));\r\n TextureRegion quitUpRegion = new TextureRegion(quitUp);\r\n Texture quitDown = new Texture(Gdx.files.internal(\"main-menu/Quit_Down.png\"));\r\n TextureRegion quitDownRegion = new TextureRegion(quitDown);\r\n Button quitButton = new Button(new TextureRegionDrawable(quitUpRegion),\r\n new TextureRegionDrawable(quitDownRegion));\r\n table.row().pad(20.0f);\r\n table.add(quitButton).center().top().expand();\r\n\r\n quitButton.addListener(new ChangeListener() {\r\n @Override\r\n public void changed(ChangeEvent event, Actor actor) {\r\n Gdx.app.exit();\r\n }\r\n });\r\n\r\n startButton.addListener(new ChangeListener() {\r\n @Override\r\n public void changed(ChangeEvent event, Actor actor) {\r\n GeometryAdventuresGame.currentScreen = GeometryAdventuresGame.ChosenScreen.SCREEN_LEVEL_SELECT;\r\n }\r\n });\r\n }",
"public LevelButton(int y, String number, int stars){\n this.stars = stars;\n this.name = number;\n this.number = new Sprite(new Texture(Gdx.files.internal(\"huds/numbers/\"+number+\".png\")));\n\n slot = new Sprite(new Texture(Gdx.files.internal(\"huds/menu/level slot.png\")));\n star1 = new Sprite(new Texture(Gdx.files.internal(\"huds/menu/star.png\")));\n star2 = new Sprite(star1.getTexture());\n star3 = new Sprite(star1.getTexture());\n slot.setSize(slot.getWidth()*2,slot.getHeight()*2);\n slot.setPosition(Initial.HEIGHT/5, Initial.WIDTH*0.69f - (slot.getHeight()+ 10)*y);\n this.number.setPosition(slot.getX()+slot.getWidth()*0.35f,slot.getY()+slot.getHeight()*0.3f);\n this.number.setSize(this.number.getWidth()*3,this.number.getHeight()*3);\n if(stars == 2){\n star3.setColor(Color.BLACK);\n }\n if(stars == 1){\n star2.setColor(Color.BLACK);\n star3.setColor(Color.BLACK);\n }\n if(stars == 0){\n star1.setColor(Color.BLACK);\n star2.setColor(Color.BLACK);\n star3.setColor(Color.BLACK);\n }\n star1.setPosition(slot.getX() + 5 + slot.getWidth(),slot.getY()+slot.getHeight()/6);\n star2.setPosition(slot.getX() + slot.getWidth()*2 -5,slot.getY()+slot.getHeight()/6);\n star3.setPosition(slot.getX() + slot.getWidth()*3 -10,slot.getY()+slot.getHeight()/6);\n star1.setSize(slot.getWidth()*0.7f,slot.getHeight()*0.7f);\n star2.setSize(slot.getWidth()*0.7f,slot.getHeight()*0.7f);\n star3.setSize(slot.getWidth()*0.7f,slot.getHeight()*0.7f);\n\n rect = new Rectangle(slot.getX(),slot.getY(), Initial.WIDTH/2.7f,slot.getHeight());\n }",
"public void render(){\n spriteBatch.begin();\n drawEnemies();\n drawPlayer();\n drawBullets();\n spriteBatch.end();\n if(debug){\n drawDebug();\n }\n }",
"@Override\n public void updateStates() {\n mySprite.update();\n }",
"public static void create(){\n\t\tstage = new Stage(new StretchViewport(1680, 1050)); \n\t\tCamera camera = stage.getCamera();\n\t\tcamera.update();\n\n\t\t//Instantiate the Managers\n\t\tGdx.input.setInputProcessor(getStage());\t\n\t\tstage.getActors().clear();\n\t\t\n\t\tmapManager = new Game_Map_Manager();\n\t\tmapManager.create(getStage());\n\t\t\n\t\tGame_CardHand cardHand = new Game_CardHand();\n\t\tcardHand.create(getStage());\n\n\t\tGameScreenUI actorManager = new GameScreenUI();\n\t\tactorManager.create(getStage());\n\n\t\tTrainDepotUI trainDepot = new TrainDepotUI();\n\t\ttrainDepot.create(getStage());\n\n\t\tGoalMenu goalScreenManager = new GoalMenu();\n\t\tgoalScreenManager.create(getStage());\n\t\t\n\t\tPlayerGoals ticketManager = new PlayerGoals();\n\t\tticketManager.create(getStage());\t\n\t\t\n\t\tGame_StartingSequence startgameManager = new Game_StartingSequence(replayMode);\n\t\tstartgameManager.create(getStage());\n\t\t\n\t\tGame_Shop shop = new Game_Shop();\n\t\tshop.create(getStage());\n\t\t\n\t\tGame_PauseMenu pauseMenu= new Game_PauseMenu();\n\t\tpauseMenu.create(getStage());\n\t\t\n\t\tWarningMessage warningMessage = new WarningMessage();\n\t\twarningMessage.create(getStage());\n\t\t\n\t\tif (replayMode){\n\t\t\tReplayModeUI replayUI = new ReplayModeUI();\n\t\t\treplayUI.create(getStage());\n\t\t\t\n\t\t\tif (Game_StartingSequence.inProgress){\n\t\t\t\tWorldMap replayMap = WorldMap.getInstance();\n\t\t\t\tGame_StartingSequence.player1 = false;\n\t\t\t\t\n\t\t\t\tStation p1station = replayMap.stationsList.get(0);\n\t\t\t\tfor (Station station : replayMap.stationsList){\n\t\t\t\t\tif (station.getName().equals(LocomotionCommotion.getReplayTurn().getJSONObject(\"player1\").getJSONArray(\"stations\").getJSONObject(0).getString(\"stationName\"))){\n\t\t\t\t\t\tp1station = station;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tStation p2station = replayMap.stationsList.get(1);\n\t\t\t\tfor (Station station : replayMap.stationsList){\n\t\t\t\t\tif (station.getName().equals(LocomotionCommotion.getReplayTurn().getJSONObject(\"player2\").getJSONArray(\"stations\").getJSONObject(0).getString(\"stationName\"))){\n\t\t\t\t\t\tp2station = station;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcreateCoreGame(p1station, p2station);\n\t\t\t\tGame_StartingSequence.startGame();\n\t\t\t\tGameScreenUI.refreshResources();\n\t\t\t\tGame_StartingSequence.inProgress = false;\n\t\t\t}\n\t\t}\n\t}",
"public void render(Screen screen) {\n\t\tscreen.renderInterface(x, y, width, height, button, clicked); //renders all 4 pieces of the 32x32 sprite. Modifying the x or y will change where the screen is centered.\n\t}",
"private void muerte(){\r\n\t\t for(Icon i:sprites.elementAt(4))\r\n\t \t {\r\n\t \t\t grafico.setIcon(i);\r\n\t \t\t try {\r\n\t\t\t\tThread.sleep(300);\r\n\t\t\t} catch (InterruptedException 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 \t grafico.setIcon(null);\r\n\t}",
"private void setUpBackGround() {\n try {\n setBackGround(new Image(new FileInputStream(\"images/backgrounds/[email protected]\")));\n } catch (FileNotFoundException ignored) {\n }\n\n\n try {\n ImageView middleGround = new ImageView(new Image(new FileInputStream(\"images/gameIcons/middleGround/battlemap0_middleground.png\")));\n middleGround.setFitHeight(windowHeight);\n middleGround.setFitWidth(windowWidth);\n addComponent(new NodeWrapper(middleGround));\n } catch (FileNotFoundException ignored) {\n }\n\n try {\n ImageView foreGround = new ImageView(new Image(new FileInputStream(\"images/foregrounds/[email protected]\")));\n foreGround.setPreserveRatio(true);\n foreGround.setFitWidth(windowHeight / 3);\n foreGround.relocate(windowWidth - foreGround.getFitWidth(), windowHeight - foreGround.getFitWidth() * foreGround.getImage().getHeight() / foreGround.getImage().getWidth());\n addComponent(new NodeWrapper(foreGround));\n } catch (FileNotFoundException ignored) {\n }\n }",
"private void render() {\n bs = display.getCanvas().getBufferStrategy();\n /* if it is null, we define one with 3 buffers to display images of\n the game, if not null, then we display every image of the game but\n after clearing the Rectanlge, getting the graphic object from the \n buffer strategy element. \n show the graphic and dispose it to the trash system\n */\n if (bs == null) {\n display.getCanvas().createBufferStrategy(3);\n } else {\n g = bs.getDrawGraphics();\n g.drawImage(Assets.background, 0, 0, width, height, null);\n g.setColor(Color.white);\n g.drawLine(0, 500, 595, 500);\n player.render(g);\n for (int i = 0; i < aliens.size(); i++) {\n Alien al = aliens.get(i);\n al.render(g);\n }\n if (shotVisible) {\n shot.render(g);\n }\n\n if(gameOver==false)\n {\n gameOver();\n }\n for(Alien alien: aliens){\n Bomb b = alien.getBomb();\n b.render(g);\n }\n g.setColor(Color.red);\n Font small = new Font(\"Helvetica\", Font.BOLD, 20);\n g.setFont(small);\n g.drawString(\"G - Guardar\", 10, 50);\n g.drawString(\"C - Cargar\", 10, 70);\n g.drawString(\"P - Pausa\", 10, 90);\n\n if(keyManager.pause)\n {\n g.drawString(\"PAUSA\", 250, 300);\n }\n \n bs.show();\n g.dispose();\n }\n\n }",
"@Override\r\n\tpublic void create() {\n\t\tbatch = new SpriteBatch();\r\n\t\tcamera = new OrthographicCamera();\r\n\t\tassets = new AssetManager();\r\n\t\t\r\n\t\tcamera.setToOrtho(false,WIDTH,HEIGHT);\r\n\t\t\r\n\t\tTexture.setAssetManager(assets);\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tsetScreen(new SplashScreen(this));\r\n\t}",
"private void renderSprite(RenderEntity ent) {\n float radius = ent.radius;\n boolean useAxis = (ent.flags & RenderEntity.FLAG_SPRITE_AXIS) == RenderEntity.FLAG_SPRITE_AXIS;\n if(useAxis) {\n left.set(ent.axis[0]);\n up.set(ent.axis[1]);\n } else {\n left.set(view.ViewAxis[1]);\n up.set(view.ViewAxis[2]);\n }\n left.scale(radius);\n up.scale(-radius);\n\n float s1 = 0, t1 = 0, s2 = 1, t2 = 1;\n \n if(ent.mat != null && ent.mat.getTexture() != null) {\n Vector2f texSize = ent.mat.getTextureSize();\n Vector2f texOffset = ent.mat.getTextureOffset(ent.frame);\n s1 = texOffset.x;\n t1 = texOffset.y;\n s2 = s1 + texSize.x;\n t2 = t1 + texSize.y;\n } \n \n boolean rendernow = !r_batchsprites.isTrue() || currentRenderFlags != RF_POSTDEFERRED;\n if(rendernow) {\n // Setup render state\n if(ent.mat != null && ent.mat.getTexture() != null) {\n // Grab texture offsets from material\n ent.mat.getTexture().Bind();\n if(ent.mat.blendmode == CubeMaterial.BlendMode.ONE) {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);\n } else {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);\n }\n } else {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);\n Ref.ResMan.getWhiteTexture().Bind();\n }\n\n GL11.glDisable(GL11.GL_CULL_FACE);\n GL11.glDepthMask(false); // dont write to depth\n\n AddQuadStampExt(ent.origin, left, up, ent.outcolor,s1,t1,s2,t2);\n\n // clear renderstate\n GL11.glEnable(GL11.GL_CULL_FACE);\n GL11.glDepthMask(true);\n } else {\n // add to polygon batch and render later\n polyBatcher.addSpriteCall(ent);\n ByteBuffer dst = polyBatcher.getMappedBuffer();\n writeQuadStamp(dst, ent.origin, left, up, ent.outcolor,s1,t1,s2,t2);\n }\n }",
"public void death(){\n setCoordinate(super.getGameImage().getCoordInit());\n diminueVies();\n super.initAnimation();\n\n }",
"public void move(){\n\t\tswitch(state){\r\n\t\t\tcase ATField.SPRITE_STAND:\r\n\t\t\t\tspriteX = 0;\r\n\t\t\t\tcoords = standbySprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\r\n\t\t\tcase ATField.SPRITE_WALK:\r\n\t\t\t\tif(spriteX >walkSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcoords = walkSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_RUN:\r\n\t\t\t\t\r\n\t\t\t\tif(spriteX >runSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = runSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_JUMP:\r\n\t\t\t\tif(spriteX >5){\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = jumpSprite.get(0);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}",
"SettingsScreenClass(Dimension dim){\r\n cursorRow=0;\r\n counter=0;\r\n endPart=false;\r\n initSprites();\r\n setImage(dim.width,dim.height);\r\n fadeAmount=12;\r\n for(int i=0;i<12;i++){\r\n fadeColors[i]=new Color(0,0,0,(i)*20);\r\n }\r\n }",
"public static void load() {\n\t\tspritesheet = new Spritesheet(\"src/de/kaffeeliebhaber/assets/pyxel/voland_spritesheet_new.png\", 32, 32);\n\t\tspritesheet.load();\n\t\t\n\t\t// load player\n\t\tAssetsLoader.loadPlayerAssets();\n\t\t\n\t\t// load crate\n\t\tAssetsLoader.loadCrates();\n\t\t\n\t\t// load item spritesheet \n\t\tspritesheetInventory = new Spritesheet(Config.ITEM_SPRITESHEET, Config.ITEM_SIZE, Config.ITEM_SIZE);\n\t\tspritesheetInventory.load();\n\t\t\n\t\t// load font \n\t\tloadFonts();\n\t\t\n\t\t// ui\n\t\timageUI = ImageLoader.loadImage(\"src/de/kaffeeliebhaber/assets/ui/ui.png\");\n\t\t\n\t\tAssetsLoader.loadInfoPaneAssets();\n\t\t\n\t\t// npc\n\t\tspritesheetNPC = new Spritesheet(\"src/de/kaffeeliebhaber/assets/AH_SpriteSheet_People1.png\", 16, 16);\n\t\tspritesheetNPC.load();\n\t\t\n\t\t// fox\n\t\tspritesheetNPCFox = new Spritesheet(\"src/de/kaffeeliebhaber/assets/imgs/72c68863962b7a6b5a9f5f5bcc5afb16.png\", 32, 32);\n\t\tspritesheetNPCFox.load();\n\n\t\t// *** LOAD NPCs\n\t\tAssetsLoader.loadFoxAssets();\n\t\t\n\t\tAssetsLoader.loadNPCs();\n\t\t\n\t\tspritesheetFemale = new Spritesheet(\"src/de/kaffeeliebhaber/assets/imgs/Female 01-1.png\", 32, 32);\n\t\tspritesheetFemale.load();\n\t}",
"void defaultsetup(int phi) \n {// The Images should be loded here... Also add labels here\n System.out.println(\"IN DEFAULT SETUP..\");\n if( phi == 0) \n whiteToPlay = true;\n else if (phi == 1) \n whiteToPlay = false;\n // White Chess Pieces\n whiteHorse1.position = 1; whiteHorse1.color = 0;\n whiteHorse2.position = 6; whiteHorse2.color = 0;\n whiteQueen.position = 3; whiteQueen.color = 0;\n whiteKing.position =4 ; whiteKing.color = 0;\n whiteCastle1.position = 0; whiteCastle1.color = 0;\n whiteCastle2.position = 7; whiteCastle2.color = 0;\n whiteBishop1.position = 2; whiteBishop1.color = 0;\n whiteBishop2.position = 5; whiteBishop2.color = 0;\n int y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n whitePawn[x] = new pawn();\n whitePawn[x].position = 8+x;\n whitePawn[x].color = 0;\n }\n //Black Chess Pieces\n blackHorse1.position = 57; blackHorse1.color = 1;\n blackHorse2.position = 62; blackHorse2.color = 1;\n blackQueen.position = 59; blackQueen.color = 1;\n blackKing.position = 60; blackKing.color = 1;\n blackCastle1.position = 56;blackCastle1.color = 1;\n blackCastle2.position = 63;blackCastle2.color = 1;\n blackBishop1.position = 58;blackBishop1.color = 1;\n blackBishop2.position = 61;blackBishop2.color = 1;\n y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n blackPawn[x] = new pawn();\n blackPawn[x].position = 48+x;\n blackPawn[x].color = 1;\n }\n \n this.updatePositions();\n }",
"public void init() {\n\t\tbg = new MyImg(\"gamepage/endgame/bg.png\");\n\t\tbut0 = new MyImg(\"paygame/qdbut.png\");\n\t\tbut1 = new MyImg(\"paygame/qxbut.png\");\n\t}",
"@Override\n public void paintComponent(Graphics g){\n super.paintComponent(g);\n if(ingame){\n\n int screenWidth = this.getWidth();\n int screenHeight = this.getHeight();\n\n\n for(int i = 0; i < end_positions.size(); i++){\n End_position item = end_positions.get(i);\n g.setColor(Color.green);\n g.fillRect(item.getDestinationX()*screenWidth/LEVEL_WIDTH,item.getDestinationY()*screenHeight/LEVEL_HEIGHT,item.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,item.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n }\n\n g.setColor(Color.white);\n g.fillRect(player.getCurrentX()*screenWidth/LEVEL_WIDTH,player.getCurrentY()*screenHeight/LEVEL_HEIGHT,player.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,player.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n\n\n for(int i = 0; i < boxes.size(); i++){\n Box item = boxes.get(i);\n g.setColor(Color.yellow);\n g.fillRect(item.getCurrentX()*screenWidth/LEVEL_WIDTH,item.getCurrentY()*screenHeight/LEVEL_HEIGHT,item.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,item.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n }\n for(int i = 0; i < walls.size(); i++){\n Wall item = walls.get(i);\n\n g.setColor(Color.red);\n g.fillRect(item.getDestinationX()*screenWidth/LEVEL_WIDTH,item.getDestinationY()*screenHeight/LEVEL_HEIGHT,item.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,item.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n\n }\n\n }\n\n }",
"public void func_180435_a(TextureAtlasSprite p_180435_1_) {\n/* 215 */ int var2 = getFXLayer();\n/* */ \n/* 217 */ if (var2 == 1) {\n/* */ \n/* 219 */ this.particleIcon = p_180435_1_;\n/* */ }\n/* */ else {\n/* */ \n/* 223 */ throw new RuntimeException(\"Invalid call to Particle.setTex, use coordinate methods\");\n/* */ } \n/* */ }",
"@Override\r\n\tpublic void init(GameContainer gc, StateBasedGame sbg) throws SlickException {\r\n this.game = sbg;\r\n background = new Image(\"GameOverScreen.png\");\r\n \r\n menuImage = new Image(\"main.png\");\r\n menu = new startButton(menuImage, 300, 150);\r\n menu.setXY(320 - (menu.w/2), 480 - menu.h);\r\n \r\n againImage = new Image(\"again.png\");\r\n again = new startButton(againImage, 300, 150);\r\n again.setXY(320 - (again.w/2), 480 - (2*again.h)); \r\n \r\n\t}",
"public void preGameMode(){\n\n ImageIcon icon = new ImageIcon(getClass().getResource(\"/title.jpg\"));\n Image image=icon.getImage();\n background = new PBackground(image);\n this.repaint();\n background.setLayout(null);\n this.add(background);\n\n\n // Prepare the body container\n container = new PanelContainer();\n container.setBounds(230,170, 700, 400);\n background.add(container);\n\n this.setVisible(true);\n }",
"public void updateSprites() {\n this.model.getSprites().values().forEach(x -> x.setPosition(this.x, this.y));\n }",
"private void render() {\n bs = display.getCanvas().getBufferStrategy();\n /* if it is null, we define one with 3 buffers to display images of\n the game, if not null, then we display every image of the game but\n after clearing the Rectanlge, getting the graphic object from the \n buffer strategy element. \n show the graphic and dispose it to the trash system\n */\n if (bs == null) {\n display.getCanvas().createBufferStrategy(3);\n }else{\n g = bs.getDrawGraphics();\n g.drawImage(Assets.background, 0, 0, width, height, null);\n \n \n if(!gameover){\n player.render(g);\n borrego.render(g);\n rayo.render(g);\n \n for (Enemy brick : enemies) {\n brick.render(g);\n //bomba.render(g);\n }\n \n for (Fortaleza fortaleza : fortalezas) {\n fortaleza.render(g);\n }\n \n for (Bomba bomba: bombas){\n bomba.render(g);\n }\n \n drawScore(g);\n drawLives(g,vidas);\n }else if(gameover){\n drawGameOver(g);\n }\n \n\n if (lost && !gameover){\n drawLost(g);\n }\n if (pause && !lost && !gameover){\n drawPause(g);\n }\n if(win && !lost && !pause && !lost &&!gameover){\n \n drawWin(g);\n }\n \n bs.show();\n g.dispose();\n }\n }",
"public void evaluateSprite(){\n if(this.orientation == Orientation.FACING_NORTH) {\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingNorth.png\"));\n }\n if(this.orientation == Orientation.FACING_WEST){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingWest.png\"));\n }\n if(this.orientation == Orientation.FACING_SOUTH){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingSouth.png\"));\n }\n if(this.orientation == Orientation.FACING_EAST){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingEast.png\"));\n }\n\n this.sprite = new Sprite(texture);\n }",
"public void initSpriteSheet() {\n\t\tString url = \"https://amiealbrecht.files.wordpress.com/2016/08/set-cards.jpg?w=1250\";\n\n\t\tcimg = loadImage(url, \"png\");\n\t}",
"public void initGameboardPanel(){\n Image image = Toolkit.getDefaultToolkit().createImage(getClass().getResource(\"/board/Masters of Renaissance_PlayerBoard (11_2020)-1.png\"));\n this.backgroundImage = image.getScaledInstance(gameboardWidth,gameboardHeight,0);\n\n this.setSize(gameboardWidth,gameboardHeight);\n this.setBounds(0,0,gameboardWidth,gameboardHeight);\n this.setLayout(null);\n //this.addMouseListener(this);\n this.setVisible(true);\n }",
"public void modoEscudo(int modo) {\n\n this.modo = modo;\n switch (modo) {\n case 1:\n sprite.setBounds((Gdx.graphics.getWidth() / 2) - (sprite.getWidth()),\n (Gdx.graphics.getHeight() / 2),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n\n setBounds((Gdx.graphics.getWidth() / 2) - (sprite.getWidth()),\n (Gdx.graphics.getHeight() / 2),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n\n setName(\"escudo1\");\n\n break;\n case 2:\n\n sprite.setBounds((Gdx.graphics.getWidth() / 2),\n (Gdx.graphics.getHeight() / 2),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n sprite.flip(true, false);\n\n setBounds((Gdx.graphics.getWidth() / 2),\n (Gdx.graphics.getHeight() / 2),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n\n\n setName(\"escudo2\");\n break;\n case 3:\n\n sprite.setBounds((Gdx.graphics.getWidth() / 2),\n (Gdx.graphics.getHeight() / 2) - (sprite.getHeight()),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n sprite.flip(true, true);\n\n setBounds((Gdx.graphics.getWidth() / 2),\n (Gdx.graphics.getHeight() / 2) - (sprite.getHeight()),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n\n\n setName(\"escudo3\");\n\n break;\n case 4:\n\n sprite.setBounds((Gdx.graphics.getWidth() / 2) - (sprite.getWidth()),\n ((Gdx.graphics.getHeight() / 2) - (sprite.getHeight())),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n sprite.flip(false, true);\n\n setBounds((Gdx.graphics.getWidth() / 2) - (sprite.getWidth()),\n ((Gdx.graphics.getHeight() / 2) - (sprite.getHeight())),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n setName(\"escudo4\");\n\n break;\n }\n spriteDebugger = new ShapeRenderer();\n }",
"public void buildInitialScene() {\n\t\t\n\t\t//Creation image background\n\t\tfinal String BACKGROUND_PATH = \"src/assets/img/temp_background.png\";\n\t\tthis.background = new GameImage(BACKGROUND_PATH);\n\n\t\t//Creation image Game Over\n\t\tfinal String GAME_OVER_PATH = \"src/assets/img/erro.png\";\n\t\tthis.errorScene = new Sprite(GAME_OVER_PATH);\n\n\t\t//Game over sprite center position\n\t\tthis.errorScene.x = spos.calculatePosition(WindowConstants.WIDTH, 2, this.errorScene, 2);\n\t\tthis.errorScene.y = spos.calculatePosition(WindowConstants.HEIGHT, 2, this.errorScene, 2);\n\t}",
"public SimCardsMenu(Game game) {\n super(\"SimCardsMenu\", game);\n\n mDefaultLayerViewport.set(getScreenWidth() / 2, getScreenHeight() / 2, getScreenWidth() / 2, getScreenHeight() / 2);\n mDefaultScreenViewport.set(0, 0, (int) mDefaultLayerViewport.halfWidth * 2, (int) mDefaultLayerViewport.halfHeight * 2);\n\n // Load in the bitmaps used on the main menu screen\n AssetManager assetManager = mGame.getAssetManager();\n assetManager.loadAndAddBitmap(\"PlayGameButton\", \"img/PlayGame.png\");\n assetManager.loadAndAddBitmap(\"ViewDeckButton\", \"img/ViewDeck.png\");\n assetManager.loadAndAddBitmap(\"QuitGameButton\", \"img/QuitGame.png\");\n\n assetManager.loadAndAddBitmap(\"PlayGameButtonPushed\", \"img/PlayGamePushed.png\");\n assetManager.loadAndAddBitmap(\"ViewDeckButtonPushed\", \"img/ViewDeckPushed.png\");\n assetManager.loadAndAddBitmap(\"QuitGameButtonPushed\", \"img/QuitGamePushed.png\");\n\n assetManager.loadAndAddBitmap(\"GameLogo\", \"img/GameLogo.png\");\n assetManager.loadAndAddBitmap(\"SimCardsMenuBackground2\", \"img/SimCardsMenuBackground2.png\");\n\n // Define the spacing that will be used to position the buttons\n float offS = (mDefaultScreenViewport.bottom / 8) + 20.0f;\n\n //Define buttons\n\n mPlayButton = new PushButton(mDefaultScreenViewport.right / 2, mDefaultScreenViewport.bottom / 2 - 100.0f,\n mDefaultScreenViewport.right / 3.5F, mDefaultScreenViewport.bottom / 8, \"PlayGameButton\", \"PlayGameButtonPushed\",this);\n mPlayButton.setPlaySounds(true, true);\n\n mDeckButton = new PushButton(mDefaultScreenViewport.right / 2, mDefaultScreenViewport.bottom / 2 - 100.0f - offS,\n mDefaultScreenViewport.right / 3.5F, mDefaultScreenViewport.bottom / 8, \"ViewDeckButton\", \"ViewDeckButtonPushed\", this);\n mDeckButton.setPlaySounds(true, true);\n\n mQuitButton = new PushButton(mDefaultScreenViewport.right / 2, mDefaultScreenViewport.bottom / 2 - 100.0f - (2 * offS),\n mDefaultScreenViewport.right / 3.5F, mDefaultScreenViewport.bottom / 8, \"QuitGameButton\", \"QuitGameButtonPushed\", this);\n mQuitButton.setPlaySounds(true, true);\n\n //Define logo\n mLogo = new GameObject(mDefaultScreenViewport.width / 2, mDefaultScreenViewport.bottom - 270.0f,\n mDefaultScreenViewport.right / 2.5f, mDefaultScreenViewport.bottom / 2.5f,\n getGame().getAssetManager().getBitmap(\"GameLogo\"), this);\n\n //Define Background\n mBackground = new GameObject(mDefaultLayerViewport.halfWidth,\n mDefaultLayerViewport.halfHeight, mDefaultLayerViewport.halfWidth * 2, mDefaultLayerViewport.halfHeight * 2, getGame()\n .getAssetManager().getBitmap(\"SimCardsMenuBackground2\"), this);\n }",
"@Override\n public void show() {\n batch = new SpriteBatch();\n stage = createStage();\n\n // create overlays\n hud = new GigagalHUD();\n victoryOverlay = new VictoryOverlay();\n gameoverOverlay = new GameOverOverlay();\n\n // determine input processor\n useOnScreenControl = (Gdx.app.getType() == Application.ApplicationType.Android // on mobile\n || Configs.instance.isDebugOnScreenControlEnabled() // or debugging\n );\n\n if (useOnScreenControl) {\n onscreenControl = new OnscreenControl();\n gameInputProcessor = new TouchProcessor(onscreenControl);\n } else {\n gameInputProcessor = new KeyPressProcessor();\n }\n\n Gdx.input.setInputProcessor(gameInputProcessor);\n\n // load new level\n startNewLevel();\n }",
"public PauseScreen() {\r\n\t\tcurItemOverLst = new ArrayList<String>();\r\n\t\ttext = null;\r\n\t\tallyCover = null;\r\n\t\titemText = null;\r\n\t\t\r\n\t\ttry {\r\n\t text = ImageIO.read(new File(\"res/textbox.png\"));\r\n\t itemText = ImageIO.read(new File(\"res/itemText.png\"));\r\n\t allyCover = ImageIO.read(new File(\"res/allyCover.png\"));\r\n\t } catch (IOException e) {\r\n\t \te.printStackTrace();\r\n\t }\r\n\t\tSpriteSheet ss = new SpriteSheet(Game.sprite_sheet);\r\n\t\titemCover = ss.grabImage(1, 1, 320, 78, \"itemCover\");\r\n\t\t\r\n\t\tpauseMenu = new ArrayList<BufferedImage>();\r\n\t\tpauseMenu.add(ss.grabImage(1, 1, 1280, 960, \"pauseMenu\"));\r\n\t\tpauseMenu.add(ss.grabImage(1, 2, 1280, 960, \"pauseMenu\"));\r\n\t\tpauseMenu.add(ss.grabImage(2, 1, 1280, 960, \"pauseMenu\"));\r\n\t\tpauseMenu.add(ss.grabImage(2, 2, 1280, 960, \"pauseMenu\"));\r\n\t\tpauseMenu.add(ss.grabImage(3, 1, 1280, 960, \"pauseMenu\"));\r\n\t\tpauseMenu.add(ss.grabImage(3, 2, 1280, 960, \"pauseMenu\"));\r\n\t\t\r\n\t\tgameOverMenu = new ArrayList<BufferedImage>();\r\n\t\tgameOverMenu.add(ss.grabImage(1, 1, 1280, 960, \"gameOverMenu\"));\r\n\t\tgameOverMenu.add(ss.grabImage(1, 2, 1280, 960, \"gameOverMenu\"));\r\n\t\tgameOverMenu.add(ss.grabImage(1, 3, 1280, 960, \"gameOverMenu\"));\r\n\t\tgameOverMenu.add(ss.grabImage(2, 1, 1280, 960, \"gameOverMenu\"));\r\n\t\tgameOverMenu.add(ss.grabImage(2, 2, 1280, 960, \"gameOverMenu\"));\r\n\t\t\r\n\t\t\r\n\t\titemMenu = new ArrayList<BufferedImage>();\r\n\t\titemMenu.add(ss.grabImage(1, 1, 1280, 960, \"itemMenu\"));\r\n\t\titemMenu.add(ss.grabImage(1, 2, 1280, 960, \"itemMenu\"));\r\n\t\t\r\n\t\tuseItem = new ArrayList<BufferedImage>();\r\n\t\tuseItem.add(ss.grabImage(1, 1, 1280, 960, \"itemOption\"));\r\n\t\tuseItem.add(ss.grabImage(1, 2, 1280, 960, \"itemOption\"));\r\n\t\tuseItem.add(ss.grabImage(1, 3, 1280, 960, \"itemOption\"));\r\n\t\t\r\n\t\texpMenuBattle = new ArrayList<BufferedImage>();\r\n\t\texpMenuPause = new ArrayList<BufferedImage>();\r\n\t\t\r\n\t\texpMenuBattle.add(ss.grabImage(1, 1, 1280, 960, \"progressMenu\"));\r\n\t\texpMenuBattle.add(ss.grabImage(2, 1, 1280, 960, \"progressMenu\"));\r\n\t\texpMenuBattle.add(ss.grabImage(1, 3, 1280, 960, \"progressMenu\"));\r\n\t\t\r\n\t\texpMenuPause.add(ss.grabImage(1, 2, 1280, 960, \"progressMenu\"));\r\n\t\texpMenuPause.add(ss.grabImage(2, 2, 1280, 960, \"progressMenu\"));\r\n\t\t\r\n\t\tallyMenu = new ArrayList<BufferedImage>();\r\n\t\tallyMenu.add(ss.grabImage(1, 1, 1280, 960, \"allyMenu\"));\r\n\t\tallyMenu.add(ss.grabImage(1, 2, 1280, 960, \"allyMenu\"));\r\n\t\t\r\n\t\tattireMenu = new ArrayList<BufferedImage>();\r\n\t\tattireMenu.add(ss.grabImage(1, 1, 1280, 960, \"attireMenu\"));\r\n\t\tattireMenu.add(ss.grabImage(1, 2, 1280, 960, \"attireMenu\"));\r\n\t\t\r\n\t\thealthIcon = new ArrayList<BufferedImage>();\r\n\t\tallyIcon = new ArrayList<BufferedImage>();\r\n\t\tpummelIcon = new ArrayList<BufferedImage>();\r\n\t\tlaserIcon = new ArrayList<BufferedImage>();\r\n\t\t\r\n\t\thealthIcon.add(ss.grabImage(1, 1,96, 67, \"healthIcon\"));\r\n\t\thealthIcon.add(ss.grabImage(1, 2, 96, 67, \"healthIcon\"));\r\n\t\t\r\n\t\tallyIcon.add(ss.grabImage(1, 1, 96, 67, \"allyIcon\"));\r\n\t\tallyIcon.add(ss.grabImage(1, 2, 96, 67, \"allyIcon\"));\r\n\t\t\r\n\t\tpummelIcon.add(ss.grabImage(1, 1, 96, 67, \"pummelIcon\"));\r\n\t\tpummelIcon.add(ss.grabImage(1, 2, 96, 67, \"pummelIcon\"));\r\n\t\t\r\n\t\tlaserIcon.add(ss.grabImage(1, 1, 96, 67, \"laserIcon\"));\r\n\t\tlaserIcon.add(ss.grabImage(1, 2, 96, 67, \"laserIcon\"));\r\n\t}",
"@Override\n public void create() {\n\n batch = new SpriteBatch();\n manager = new AssetManager();\n\n manager.load(\"audio/main_theme.mp3\", Music.class);\n // manager.load(\"String sonido\", Sound.class);\n manager.load(\"sprites/dragon.pack\", TextureAtlas.class);\n manager.load(\"sprites/vanyr.pack\", TextureAtlas.class);\n manager.finishLoading();\n\n setScreen(new PlayScreen(this));\n\n }",
"public void setMazeSprite(Sprite mazeSprite)\n {\n this.mazeSprite = mazeSprite;\n\n //mazeFrameWidth = frameWidth;\n //mazeFrameHeight = frameHeight;\n }",
"public void init(){\n\t\n\t\t//background init\n\t\tthis.background = new Sprite(this.scene, \"space-backdrop.png\", 1280 * 5, 800 * 5);\n\t\tthis.background.setBoundAction(\"background\");\n\t\tthis.background.setSpeedScale(0.2);\n\t\tthis.background.setSpeed(0);\n\t\tthis.sprites.add(this.background);\n\t\t\n\t\t//compass init\n\t\tthis.compass = new Sprite(this.scene, \"compass.png\", 100, 100);\n\t\tthis.compass.setSpeed(0);\n\t\tthis.compass.setPosition(this.compass.getWidth() / 2, this.scene.getHeight() - this.compass.getHeight() / 2);\n\t\t\n\t\t//earth init\n\t\tthis.earth = new Planet(this.scene, \"earth.png\", 4800, 4800);\n\t\tthis.earth.setSpeed(0);\n\t\tthis.earth.setPosition(0, 7000);\n\t\tthis.earth.setBoundAction(\"continue\");\n\t\tthis.sprites.add(this.earth);\n\t\t\n\t\t//ship init\n\t\tthis.mainSprite = new Ship(this.scene, \"cannon.png\", 50, 50, this.k);\n\t\tthis.mainSprite.keyListen = true;\n\t\tthis.mainSprite.setSpeed(0);\n\t\tthis.mainSprite.setPosition(this.scene.getWidth() / 2, this.scene.getHeight() / 2);\n\t\t\n\t\t//asteroids init\n\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", 250, 250, this));\n\t\tthis.asteroids.get(0).setBoundAction(\"continue\");\n\t\tthis.asteroids.get(0).setSpeed(0);\n\t\tthis.asteroids.get(0).setPosition(0, 0);\n\t\tthis.sprites.add(this.asteroids.get(0));\n\t\t\n\t\tfor(int i = 1; i < 200; i++){\n\t\t\t\n\t\t\tint size = (int) Math.round(Math.random() * 400 + 50);\n\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\n\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t}\n\t\t\t\n\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t}\n\t\t\t\n\t\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", size, size, this));\n\t\t\tthis.asteroids.get(i).setBoundAction(\"continue\");\n\t\t\tthis.asteroids.get(i).setSpeed(0);\n\t\t\tthis.asteroids.get(i).setPosition(x, y);\n\t\t\t\n\t\t\tthis.sprites.add(this.asteroids.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t//chest init\n\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\tthis.chests.get(0).setBoundAction(\"continue\");\n\t\tthis.chests.get(0).setSpeed(0);\n\t\tthis.chests.get(0).setPosition(500, 500);\n\t\tthis.sprites.add(this.chests.get(0));\n\t\t\n\t\tfor(int i = 1; i < this.numChests; i++){\n\t\t\t\n\t\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\t\tthis.chests.get(i).setBoundAction(\"continue\");\n\t\t\tthis.chests.get(i).setSpeed(0);\n\t\t\t\n\t\t\tboolean keepGoing = true;\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t\n\t\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.chests.get(i).setPosition(x, y);\n\t\t\t\t\n\t\t\t\t//check for collisions with asteroids\n\t\t\t\tboolean colliding = false;\n\t\t\t\tfor(int j = 0; j < this.asteroids.size() && colliding == false; j++){\n\t\t\t\t\tif(this.asteroids.get(j).collidesWith(this.chests.get(i))){\n\t\t\t\t\t\tcolliding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tkeepGoing = colliding;\n\t\t\t\t\n\t\t\t}while(keepGoing);\n\t\t\t\n\t\t\tthis.sprites.add(this.chests.get(i));\n\t\t\t\n\t\t}//end for\n\t\n\t\tthis.scene.start();\n\t\t\n\t\tSystem.out.println(\"==== Welcome to Space Smuggler! ====\");\n\t\tSystem.out.println(\"(WASD to move)\");\n\t\tSystem.out.println(\"Follow your compass in the bottom left corner to find treasure.\");\n\t\tSystem.out.println(\"Collect all of the treasure, then follow your compass to Earth!\");\n\t\tSystem.out.println(\"Watch out for the asteroids though, their gravitational pull is strong!\");\n\t\tSystem.out.println(\"Crashing into one will certainly kill you! D:\");\n\t\tSystem.out.println(\"Good Luck!\");\n\t\t\n\t}",
"private void buildSprites() {\n\t\tSpriteRotatable sprite = new SpriteRotatable(new Vec2f(0, 0), 1);\n\t\tsprite.setCentered(true);\n\t\tspriteManager.addSprite(sprite, \"avenger.png\");\n\t\tsprite.setVisible(true);\n\t\ttarget = new SpriteRotatable(new Vec2f(2, 2), 1);\n\t\ttarget.setCentered(true);\n\t\tspriteManager.addSprite(target, \"fighter.png\");\n\t\ttarget.setVisible(true);\n\n\t}",
"@Override\n\tpublic void loadUnits() {\n\t\tsprites.put(\"axeman\", RES.getSprite(\"axeman\"));\n\t\tsprites.put(\"warg\", RES.getSprite(\"warg_right\"));\n\t}",
"VIDEO_START( bottom9 )\n\t{\n\t\tlayer_colorbase[0] = 0;\t/* not used */\n\t\tlayer_colorbase[1] = 0;\n\t\tlayer_colorbase[2] = 16;\n\t\tsprite_colorbase = 32;\n\t\tzoom_colorbase = 48;\n\t\tif (K052109_vh_start(REGION_GFX1,NORMAL_PLANE_ORDER,tile_callback))\n\t\t\treturn 1;\n\t\n\t\tif (K051960_vh_start(REGION_GFX2,NORMAL_PLANE_ORDER,sprite_callback))\n\t\t\treturn 1;\n\t\n\t\tif (K051316_vh_start_0(REGION_GFX3,4,TILEMAP_TRANSPARENT,0,zoom_callback))\n\t\t\treturn 1;\n\t\n\t\treturn 0;\n\t}",
"public void Boom()\r\n {\r\n image1 = new GreenfootImage(\"Explosion1.png\");\r\n image2 = new GreenfootImage(\"Explosion2.png\");\r\n image3 = new GreenfootImage(\"Explosion3.png\");\r\n image4 = new GreenfootImage(\"Explosion4.png\");\r\n image5 = new GreenfootImage(\"Explosion5.png\");\r\n image6 = new GreenfootImage(\"Explosion6.png\");\r\n setImage(image1);\r\n\r\n }",
"public void drawLevelBg( SpriteBatch batch, JARCamera camera )\n {\n //draw bg image\n if ( JARSettings.scrollBgImageParallax )\n {\n int imgWidth = (int)JARImage.GAME_BG_HILL.getWidth();\n int imgHeight = (int)JARImage.GAME_BG_HILL.getHeight();\n LibDrawing.drawImage\n (\n batch,\n JARImage.GAME_BG_HILL.getTextureRegion(),\n 0 - ( imgWidth - JARScreen.width() ) * camera.x / ( iLevelBoundX - JARScreen.width() ),\n 0 - ( imgHeight - JARScreen.height() ) * camera.y / ( iLevelBoundY - JARScreen.height() ),\n LibAnchor.LEFT_TOP\n );\n }\n else\n {\n //draw image static on center bottom of the canvas\n LibDrawing.drawImage( batch, JARImage.GAME_BG_HILL.getTextureRegion(), JARScreen.width() / 2, JARScreen.height(), LibAnchor.CENTER_BOTTOM );\n }\n\n //blend the image to make the fg more visible\n //Drawing.fillCanvas( \"rgba( 255, 255, 255, \" + Settings.BG_BLENDING + \" )\" );\n\n //draw middle layer\n if ( JARSettings.scrollBgImageParallax )\n {\n float imgWidth = JARImage.GAME_BG_TREES.getWidth();\n float imgHeight = JARImage.GAME_BG_TREES.getHeight();\n\n float MAGIC_OFF_Y = 100;\n\n LibDrawing.drawImage\n (\n batch,\n JARImage.GAME_BG_TREES.getTextureRegion(),\n 0 - ( imgWidth - JARScreen.width() ) * camera.x / ( iLevelBoundX - JARScreen.width() ),\n 0 - 4 * ( imgHeight - JARScreen.height() ) * camera.y / ( iLevelBoundY - JARScreen.height() ) + MAGIC_OFF_Y,\n LibAnchor.LEFT_TOP\n );\n/*\n float offsetX = 0;\n float offsetY = 3 * imgHeight;\n\n float targetWidth = imgWidth;\n float targetHeight = 4 * imgHeight;\n\n LibDrawing.drawImage\n (\n batch,\n JARImage.GAME_BG_TREES,\n 0 - ( targetWidth - Canvas.WIDTH ) * camera.x / ( iLevelBoundX - Canvas.WIDTH ) + offsetX,\n 0 - ( targetHeight - Canvas.HEIGHT ) * camera.y / ( iLevelBoundY - Canvas.HEIGHT ) + offsetY,\n Anchor.LEFT_TOP\n );\n*/\n }\n else\n {\n //draw image static on center bottom of the canvas\n LibDrawing.drawImage( batch, JARImage.GAME_BG_TREES.getTextureRegion(), JARScreen.width() / 2, JARScreen.height(), LibAnchor.CENTER_BOTTOM );\n }\n }",
"@Override\n public void start(Stage primaryStage) {\n// if (screenWidth >= 414) {\n// screenWidth = 414;\n// }\n// if (screenHeight >= 736) {\n// screenHeight = 736;\n// }//preset stage/scene size\n\n //System.out.println(Integer.toString(screenWidth) + Integer.toString(screenHeight));\n System.out.print(\"Default:\");\n gameController = new GameController(1, 4);//default player and map size\n// gameController.newMapPane();//preload a Map Pane\n\n ScreenController mainContainer = new ScreenController();\n mainContainer.loadScreen(GroupGame.homeScreenID, GroupGame.homeScreenFile);\n mainContainer.loadScreen(GroupGame.newOptionID, GroupGame.newOptionFile);\n mainContainer.loadScreen(GroupGame.createPlayerID, GroupGame.createPlayerFile);\n mainContainer.loadScreen(GroupGame.MapScreenID, GroupGame.MapScreenFile);\n mainContainer.setScreen(GroupGame.homeScreenID);\n\n Group root = new Group();\n root.getChildren().addAll(mainContainer);\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.show();\n }",
"public void setScreen(Scene scene) {\n\t\tCanvas canvas = (Canvas) scene.lookup(\"#firstCanvas\");\n\t\t//Button testbutt = (Button) scene.lookup(\"#StartButt\");\n\t\t//testbutt.getText();\n\t\tGraphicsContext gc = canvas.getGraphicsContext2D();\n\t\tbackgroundMovingX += backgroundMovingSpeed;\n\t\t//System.out.println(backgroundMovingX);\n\t\tif(backgroundMovingX >= maximumBackgroudPos || backgroundMovingX <= minimumBackgroudPos) {\n\t\t\tbackgroundMovingSpeed=-backgroundMovingSpeed;\n\t\t}\n\t\tWritableImage croppedImage = new WritableImage(BackgroundImageHolder.fisrtSceneBackgroundImage.getPixelReader(),\n\t\t\t\tstartCropX, startCropY, GameConfig.screenWidth, GameConfig.screenHeight);\n\t\tgc.drawImage(croppedImage, backgroundMovingX, startPoint);\n\t}",
"private void updateSprites() {\n\t\tpaddle1.setX(paddle1X);\r\n\t\tpaddle1.setY(paddle1Y);\r\n\r\n\t\tpaddle2.setX(paddle2X);\r\n\t\tpaddle2.setY(paddle2Y);\r\n\r\n\t\tball.setX(ballX);\r\n\t\tball.setY(ballY);\r\n\r\n\t\tscore.setVisible(paused);\r\n\t}",
"public void paintComponent(Graphics g){\n super.paintComponent(g);\n g.setColor(Color.BLACK);\n g.fillRect(0,0,width*scale,height*scale);\n if(game.getWindowNum() == 2){\n for(int x = 0; x < world.length*scale; x+=scale){\n for(int y = 0; y < world[0].length*scale; y+= scale){\n if(game.getDiscoverdWorld()[x/scale][y/scale] == 1){\n if(world[x/scale][y/scale] == 0){\n g.setColor(Color.CYAN);\n }\n else if(world[x/scale][y/scale] == 1){\n g.setColor(Color.GREEN);\n }\n else if(world[x/scale][y/scale] == 2){\n g.setColor(new Color(102,66,0));\n }\n else if(world[x/scale][y/scale] == 3){\n g.setColor(new Color(105,105,105));\n }\n g.fillRect(x,y,scale,scale);\n }\n }\n }\n g.setColor(Color.RED);\n g.fillRect((int)(game.getPlayerCords()[0]*(double)scale),(int)(game.getPlayerCords()[1]*(double)scale),scale*game.getPlayerDimentions()[0],scale*game.getPlayerDimentions()[1]);\n g.setColor(Color.BLACK);\n g.drawRect((int)(game.getViewBoxCords()[0]*scale),(int)(game.getViewBoxCords()[1]*scale),(int)(game.getPlayerView().length*scale),(int)(game.getPlayerView()[0].length*scale));\n g.drawString(\"X: \"+game.getPlayerCords()[0]+\" Y: \"+game.getPlayerCords()[1],20,20);\n g.drawString(\"Seed: \"+game.getSeed(),20,40);\n g.drawString(\"Grounded: \"+game.getPlayer().getGrounded(),20,60);\n g.drawString(\"Vertical Velocity: \"+game.getPlayer().getVertVelocity(),20,80);\n }\n else if(game.getWindowNum() == 1){\n int[][] viewPlane = game.getPlayerView();\n double playerViewScale = game.getPlayerViewScale();\n double[] viewBoxCords = game.getViewBoxCords();\n g.setColor(Color.CYAN);\n for(int x = 0; x < viewPlane.length;x++){\n for(int y = 0; y < viewPlane[0].length;y++){\n if(viewPlane[x][y] != 0 && game.getDiscoverdWorld()[x+(int)viewBoxCords[0]][y+(int)viewBoxCords[1]] == 1){\n g.drawImage(textures.get(viewPlane[x][y]-1),(int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),this);\n /*\n if(viewPlane[x][y] == 1){\n g.setColor(Color.GREEN);\n }\n else if(viewPlane[x][y] == 2){\n g.setColor(new Color(102,66,0));\n }\n else if(viewPlane[x][y] == 3){\n g.setColor(new Color(105,105,105));\n }\n g.fillRect((int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),(int)(playerViewScale+0.5),(int)(playerViewScale+0.5));\n */\n }\n else if(viewPlane[x][y] == 0 && game.getDiscoverdWorld()[x+(int)viewBoxCords[0]][y+(int)viewBoxCords[1]] == 1){\n g.fillRect((int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),(int)(playerViewScale+1),(int)(playerViewScale+1));\n }\n }\n }\n if(recentlyHit != null){\n g.setColor(new Color(50,50,50,(int)(255*(1-recentlyHit.getHealthPercent()))));\n g.fillRect((int)(recentlyHit.getX()*playerViewScale)-(int)(viewBoxCords[0]%1*playerViewScale)+1,(int)(recentlyHit.getY()*playerViewScale)-(int)(viewBoxCords[1]%1*playerViewScale)+1,(int)playerViewScale,(int)playerViewScale);\n }\n //g.setColor(Color.RED);\n //g.fillRect((int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),(int)playerViewScale*game.getPlayerDimentions()[0],(int)playerViewScale*game.getPlayerDimentions()[1]);\n if(game.isFacingRight()){\n g.drawImage(textures.get(3),(int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),this);\n }\n else{\n g.drawImage(textures.get(4),(int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),this);\n }\n g.setColor(Color.BLACK);\n g.setFont(font2);\n g.drawString(\"X: \"+game.getPlayerCords()[0]+\" Y: \"+game.getPlayerCords()[1],20,20);\n g.drawString(\"Seed: \"+game.getSeed(),20,40);\n g.drawString(\"Grounded: \"+game.getPlayer().getGrounded(),20,60);\n g.drawString(\"Vertical Velocity: \"+game.getPlayer().getVertVelocity(),20,80);\n g.drawString(\"View Box Cords: X:\"+viewBoxCords[0]+\" Y: \"+viewBoxCords[1],20,100);\n int a = 0;\n for(Item i: game.getPlayerInventory()){\n if(i != null){\n g.drawString(i.getName()+\" Count: \"+i.getCount(),20,120+a*20);\n a++;\n }\n } \n g.setColor(new Color(100,100,100,95));\n g.fillRect((int)(0.09*viewPlane.length*playerViewScale),(int)(0.8*viewPlane[0].length*playerViewScale),(int)(0.82*viewPlane.length*playerViewScale),(int)(0.12*viewPlane[0].length*playerViewScale));\n g.setColor(Color.WHITE);\n for(int i = 0; i < game.getPlayerHotbar().length;i++){\n if(i == game.getPlayer().getHotbarItemSelected()){\n g.setColor(Color.BLACK);\n g.fillRect((int)(0.11*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.81*viewPlane[0].length*playerViewScale),(int)(0.06*playerViewScale*viewPlane.length),(int)(0.1*viewPlane[0].length*playerViewScale));\n g.setColor(Color.WHITE);\n }\n else{\n g.fillRect((int)(0.11*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.81*viewPlane[0].length*playerViewScale),(int)(0.06*playerViewScale*viewPlane.length),(int)(0.1*viewPlane[0].length*playerViewScale));\n }\n if(game.getPlayer().getHotbar()[i] != null){\n g.drawImage(textures.get(game.getPlayer().getHotbar()[i].getTextureNum()),(int)(0.125*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.83*viewPlane[0].length*playerViewScale),this);\n }\n }\n if(game.isInvenVisible()){\n int rowLength = 10;\n g.setColor(new Color(100,100,100,180));\n g.fillRect((int)(0.05*screenWidth),(int)(0.06*screenHeight),(int)(0.9*screenWidth),(int)(0.7*screenHeight));\n g.setColor(Color.WHITE);\n int count = 0; \n for(Item i: game.getPlayerInventory()){\n if(i!=null){\n g.drawImage(textures.get(i.getTextureNum()),(int)(0.08*screenWidth)+(int)((count%rowLength)*0.085*screenWidth),(int)(0.085*screenHeight)+(int)((int)(count/rowLength)*0.085*screenHeight),this);\n g.drawString(\"x\"+i.getCount(),(int)(0.11*screenWidth)+(int)((count%rowLength)*0.085*screenWidth),(int)(0.096*screenHeight)+(int)((int)(count/rowLength)*0.085*screenHeight));\n count++;\n }\n }\n }\n else if(game.isCraftingVisible()){\n g.setColor(new Color(100,100,100,180));\n g.fillRect((int)(0.05*viewPlane.length*playerViewScale),(int)(0.05*viewPlane[0].length*playerViewScale),(int)(0.9*viewPlane.length*playerViewScale),(int)(0.7*viewPlane[0].length*playerViewScale));\n }\n g.setColor(Color.BLACK);\n g.drawRect((int)(screenWidth*0.8),(int)(screenHeight*.03),(int)(screenWidth*.18),(int)(screenHeight*0.04));\n g.setColor(new Color((int)(255*(1-game.getPlayerHealthPercent())),(int)(255*game.getPlayerHealthPercent()),0));\n g.fillRect((int)(screenWidth*0.8)+1,(int)(screenHeight*.03)+1,(int)(screenWidth*.18*game.getPlayerHealthPercent())-1,(int)(screenHeight*0.04)-1);\n g.setColor(new Color(50,50,50,200));\n g.setFont(font1);\n g.drawString(game.getPlayerHealthPercent()*100+\"%\",(int)(screenWidth*.88),(int)(screenHeight*0.06));\n }\n }"
] | [
"0.7018853",
"0.66925615",
"0.65575624",
"0.65319395",
"0.6515284",
"0.6396764",
"0.6380817",
"0.6375709",
"0.63219166",
"0.6306622",
"0.62883466",
"0.62667364",
"0.62616587",
"0.62453294",
"0.62377924",
"0.622941",
"0.6228716",
"0.62202233",
"0.62163633",
"0.62138784",
"0.61917716",
"0.61830086",
"0.617236",
"0.6170773",
"0.6162573",
"0.6155193",
"0.6141565",
"0.6113194",
"0.61091846",
"0.60868764",
"0.608559",
"0.6085073",
"0.60818356",
"0.60701865",
"0.60683054",
"0.606108",
"0.60504663",
"0.60388976",
"0.6038436",
"0.60372317",
"0.6029735",
"0.6028757",
"0.6028341",
"0.60269594",
"0.6022813",
"0.60202503",
"0.60177696",
"0.6017183",
"0.6010826",
"0.6004259",
"0.5998803",
"0.5995395",
"0.59932786",
"0.59836864",
"0.5979383",
"0.5972151",
"0.5961734",
"0.5957092",
"0.5943861",
"0.59267396",
"0.5926523",
"0.5925939",
"0.5923981",
"0.59229904",
"0.59218603",
"0.591163",
"0.59110695",
"0.5910394",
"0.5905718",
"0.59048045",
"0.59046763",
"0.59043616",
"0.5903104",
"0.5896101",
"0.589607",
"0.5895348",
"0.5885295",
"0.5885049",
"0.5882548",
"0.58804816",
"0.58774817",
"0.5876916",
"0.58670485",
"0.5863671",
"0.5860776",
"0.5860377",
"0.58529884",
"0.58439684",
"0.5837996",
"0.5836342",
"0.5833286",
"0.58307683",
"0.5820487",
"0.5819081",
"0.58161026",
"0.5815316",
"0.5808244",
"0.5802489",
"0.5802165",
"0.5800299"
] | 0.6532232 | 3 |
Prosedur ini membuat dan load semua images yang dipakai | public void createImages(){
try {
img_bg = Image.createImage(GAME_BG);
img_backBtn = Image.createImage(BACK_BTN);
img_muteBtn = Image.createImage(MUTE_BTN);
img_resetBtn = Image.createImage(RESET_BTN);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadImages() {\n\t\ttry {\n\t\t\tall_images = new Bitmap[img_files.length];\n\t\t\tfor (int i = 0; i < all_images.length; i++) {\n\t\t\t\tall_images[i] = loadImage(img_files[i] + \".jpg\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tToast.makeText(this, \"Unable to load images\", Toast.LENGTH_LONG)\n\t\t\t\t\t.show();\n\t\t\tfinish();\n\t\t}\n\t}",
"public void picLoader() {\n if (num==0){\n image.setImageResource(R.drawable.mario);\n }\n if(num==1){\n image.setImageResource(R.drawable.luigi);\n }\n if(num==2){\n image.setImageResource(R.drawable.peach);\n }\n if(num==3){\n image.setImageResource(R.drawable.rosalina);\n }\n }",
"public void cargarImagenes() {\n try {\n\n variedad = sp.getString(\"variedad\", \"\");\n gDia = sp.getFloat(\"gDia\", 0);\n dia = sp.getInt(\"dia\", 0);\n idVariedad = sp.getLong(\"IdVariedad\", 0);\n idFinca = sp.getLong(\"IdFinca\",0);\n\n\n\n imageAdmin iA = new imageAdmin();\n List<fenologiaTab> fi = forGradoloc(dia, gDia, idVariedad);\n\n path = getExternalFilesDir(null) + File.separator;\n String path2 = \"/storage/emulated/0/Pictures/fenologias/\"+idFinca+\"/\";\n\n iA.getImage(path2,jpgView1, idVariedad, fi.get(0).getImagen());\n datos(txt1, fi.get(0).getDiametro_boton(), fi.get(0).getLargo_boton(), fi.get(0).getGrados_dia(), fi.get(0).getImagen());\n\n iA.getImage(path2,jpgView2, idVariedad, fi.get(1).getImagen());\n datos(txt2, fi.get(1).getDiametro_boton(), fi.get(1).getLargo_boton(), fi.get(1).getGrados_dia(), fi.get(1).getImagen());\n\n iA.getImage(path2,jpgView3, idVariedad, fi.get(2).getImagen());\n datos(txt3, fi.get(2).getDiametro_boton(), fi.get(2).getLargo_boton(), fi.get(2).getGrados_dia(), fi.get(2).getImagen());\n\n iA.getImage(path2,jpgView4, idVariedad, fi.get(3).getImagen());\n datos(txt4, fi.get(3).getDiametro_boton(), fi.get(3).getLargo_boton(), fi.get(3).getGrados_dia(), fi.get(3).getImagen());\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Error \\n\" + e, Toast.LENGTH_LONG).show();\n }\n }",
"private void loadImages(){\n try{\n System.out.println(System.getProperty(\"user.dir\"));\n\n t1img = read(new File(\"resources/tank1.png\"));\n t2img = read(new File(\"resources/tank1.png\"));\n backgroundImg = read(new File(\"resources/background.jpg\"));\n wall1 = read(new File(\"resources/Wall1.gif\"));\n wall2 = read(new File(\"resources/Wall2.gif\"));\n heart = resize(read(new File(\"resources/Hearts/basic/heart.png\")), 35,35);\n heart2 = resize(read( new File(\"resources/Hearts/basic/heart.png\")), 25,25);\n bullet1 = read(new File(\"resources/bullet1.png\"));\n bullet2 = read(new File(\"resources/bullet2.png\"));\n\n }\n catch(IOException e){\n System.out.println(e.getMessage());\n }\n }",
"private void loadImages() {\n\t\ttry {\n\t\t\timage = ImageIO.read(Pillar.class.getResource(\"/Items/Pillar.png\"));\n\t\t\tscaledImage = image;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Failed to read Pillar image file: \" + e.getMessage());\n\t\t}\n\t}",
"public static void loadImages() {\n PonySprite.loadImages(imgKey, \"graphics/ponies/GrannySmith.png\");\n }",
"public void prepareImagenes(){\n\t\tpreparePersonajes();\n\t\tprepareSorpresas();\n\t\tprepareObjetivos();\n\t\tprepareBloque();\n\t\t\n\t}",
"private void initData() {\n\t\tmImageLoader = VolleyUtil.getInstance(this).getImageLoader();\n\t\tmNetworkImageView.setImageUrl(Pictures.pictures[3], mImageLoader);\n\t\tmNetworkImageView.setErrorImageResId(R.drawable.ic_pic_error);\n\t\tmNetworkImageView.setDefaultImageResId(R.drawable.ic_pic_default);\n\t}",
"private void loadTextures() {\r\n int[] imgData;\r\n int width;\r\n int height;\r\n\r\n BitmapFactory.Options options = new BitmapFactory.Options();\r\n //圖片質量,數字越大越差\r\n options.inSampleSize = 1;\r\n Bitmap bitmap = BitmapFactory.decodeByteArray(path, 0, path.length, options);\r\n width = bitmap.getWidth();\r\n height = bitmap.getHeight();\r\n imgData = new int[width * height * 4];\r\n bitmap.getPixels(imgData, 0, width, 0, 0, width, height);\r\n bitmap.recycle();\r\n System.gc();\r\n\r\n mTextures.add(Texture.loadTextureFromIntBuffer(imgData, width, height));\r\n }",
"public void findImages() {\n URL imgURL = ImageLoader.class.getResource(\"/BackgroundMenu.jpg\");\n this.backgroundImages.put(MenuP.TITLE, loadImage(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/backgroundGame.png\");\n this.backgroundImages.put(ArenaView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/gameOver.jpg\");\n this.backgroundImages.put(GameOverView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Player.png\");\n this.entityImages.put(ID.PLAYER, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Enemy1.png\");\n this.entityImages.put(ID.BASIC_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/boss.png\");\n this.entityImages.put(ID.BOSS_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/meteorBrown_big1.png\");\n this.entityImages.put(ID.METEOR, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/BlueBullet.png\");\n this.bulletImages.put(new Pair<>(ID.PLAYER_BULLET, ID.PLAYER), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/redBullet.png\");\n this.entityImages.put(ID.ENEMY_BULLET, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_FireBoost.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Freeze.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL)); \n \n imgURL = ImageLoader.class.getResource(\"/powerup_Health.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.HEALTH), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Shield.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.SHIELD), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/bulletSpeedUp.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadEffect(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Explosion.png\");\n this.AnimationsEffect.put(new Pair<>(ID.EFFECT, SpecialEffectT.EXPLOSION), loadEffect(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/freeze.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL));\n }",
"@Override\n\tpublic void loadStateImages() {\n\t\tif (imageFilename[0][0] != null)\n\t\t\tthis.addStateImage(imageFilename[0][0], 0, 0);\n\t\tif (imageFilename[0][1] != null)\n\t\t\tthis.addStateImage(imageFilename[0][1], 1, 0);\n\t\tif (imageFilename[1][0] != null)\n\t\t\tthis.addStateImage(imageFilename[1][0], 0, 1);\n\t\tif (imageFilename[1][1] != null)\n\t\t\tthis.addStateImage(imageFilename[1][1], 1, 1);\n\t}",
"public void initImage() {\n if (isInited())\n return;\n //获取大图的游标\n Cursor cursor = context.getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI, // 大图URI\n STORE_IMAGES, // 字段\n null, // No where clause\n null, // No where clause\n MediaStore.Images.Media.DATE_TAKEN + \" DESC\"); //根据时间升序\n Log.e(\"eeeeeeeeeeeeeeeeeee\", \"------cursor:\" + cursor);\n if (cursor == null)\n return;\n while (cursor.moveToNext()) {\n int id = cursor.getInt(0);//大图ID\n String path = cursor.getString(1);//大图路径\n LogTool.setLog(\"大图路径1\", path);\n File file = new File(path);\n //判断大图是否存在\n if (file.exists()) {\n //小图URI\n String thumbUri = getThumbnail(id, path);\n //获取大图URI\n String uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI.buildUpon().\n appendPath(Integer.toString(id)).build().toString();\n LogTool.setLog(\"大图路径2\", uri);\n if (Tools.isEmpty(uri))\n continue;\n if (Tools.isEmpty(thumbUri))\n thumbUri = uri;\n //获取目录名\n String folder = file.getParentFile().getName();\n String appFile = context.getResources().getString(R.string.app_name);\n if (!folder.equals(appFile)) {\n LocalFile localFile = new LocalFile();\n localFile.setPath(path);\n localFile.setOriginalUri(uri);\n localFile.setThumbnailUri(thumbUri);\n int degree = cursor.getInt(2);\n if (degree != 0) {\n degree = degree + 180;\n }\n localFile.setOrientation(360 - degree);\n\n\n paths.add(localFile);\n\n\n //判断文件夹是否已经存在\n if (folders.containsKey(folder)) {\n folders.get(folder).add(localFile);\n } else {\n List<LocalFile> files = new ArrayList<>();\n files.add(localFile);\n folders.put(folder, files);\n }\n }\n }\n }\n folders.put(\"所有图片\", paths);\n cursor.close();\n isRunning = false;\n }",
"protected void setPic() {\n }",
"protected abstract Image loadImage();",
"public void initImages(ArrayList<Produit> l) {\r\n\r\n if (l.size() > 0) {\r\n loadImage1(l.get(0).getImg_url());\r\n \r\n }\r\n\r\n if (l.size() > 1) {\r\n loadImage2(l.get(1).getImg_url());\r\n }\r\n\r\n if (l.size() > 2) {\r\n loadImage3(l.get(2).getImg_url());\r\n \r\n }\r\n\r\n if (l.size() > 3) {\r\n loadImage4(l.get(3).getImg_url());\r\n \r\n }\r\n\r\n if (l.size() > 4) {\r\n loadImage5(l.get(4).getImg_url());\r\n \r\n }\r\n\r\n if (l.size() > 5) {\r\n loadImage6(l.get(5).getImg_url());\r\n \r\n }\r\n\r\n }",
"public static void load(){\n\t\trobot=new BufferedImage[5];\n\t\ttry {\n\t\t\tfor(int i=0;i<5;i++)\n\t\t\t\trobot[i]=ImageIO.read(new File(\"robot\" + i +\".png\"));\n\t\t\t\n\t\t\tminiRobot=ImageIO.read(new File(\"miniRobot.png\"));\n\t\t\toil=ImageIO.read(new File(\"oil.png\"));\n\t\t\tslime=ImageIO.read(new File(\"slime.png\"));\n\t\t\tmap=ImageIO.read(new File(\"map.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e + \"Failed to load images\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"private void loadImages() {\n Glide\n .with(Activity_Game.this)\n .load(R.drawable.game_alien_img)\n .into(game_IMAGE_p1);\n\n Glide\n .with(Activity_Game.this)\n .load(R.drawable.game_predator_img)\n .into(game_IMAGE_p2);\n }",
"public void getPictures(){\n\t\t\ttry{\n\t\t\t\timg = ImageIO.read(new File(\"background.jpg\"));\n\t\t\t\ttank = ImageIO.read(new File(\"Tank.png\"));\n\t\t\t\tbackground2 = ImageIO.read(new File(\"background2.png\"));\n\t\t\t\t\n\t\t\t\trtank = ImageIO.read(new File(\"RTank.png\"));\n\t\t\t\tboom = ImageIO.read(new File(\"Boom.png\"));\n\t\t\t\tboom2 = ImageIO.read(new File(\"Boom2.png\"));\n\t\t\t\tinstructions = ImageIO.read(new File(\"Instructions.png\"));\n\t\t\t\tshotman = ImageIO.read(new File(\"ShotMan.png\"));\n\t\t\t\tlshotman = ImageIO.read(newFile(\"LShotMan.png\"));\n\t\t\t\tboomshotman = ImageIO.read(new File(\"AfterShotMan\"));\n\t\t\t\tlboomshotman = ImageIO.read(new File(\"LAfterShotMan\"));\n\t\t\t\t\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.err.println(\"d\");\n\t\t\t}\n\t\t}",
"public void loadImages() {\n\t\tcowLeft1 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowLeft2 = new ImageIcon(\"images/animal/cow2left.png\");\n\t\tcowLeft3 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowRight1 = new ImageIcon(\"images/animal/cow1right.png\");\n\t\tcowRight2 = new ImageIcon(\"images/animal/cow2right.png\");\n\t\tcowRight3 = new ImageIcon(\"images/animal/cow1right.png\");\n\t}",
"@Override\n\tpublic void readImages() {\n\t\t\n\t}",
"@Override\n\tpublic void loadImages() {\n\t\tsuper.setImage((new ImageIcon(\"pacpix/QuestionCandy.png\")).getImage());\t\n\t}",
"public void loadImages() {\n\t\tpigsty = new ImageIcon(\"images/property/pigsty.png\");\n\t}",
"private void loadResource() {\n\t\ttry {\n\t\t\ttarmacTexture = scaleResourceImagePaint(\"/textures/tarmac2.jpg\", 300, 300);\n\t\t\tgrassTexture = scaleResourceImagePaint(\"/textures/grass.jpg\", 300, 300);\n\t\t\tstopwayTexture = scaleResourceImagePaint(\"/textures/stopway.jpg\", 300, 300);\n\t\t} catch (IOException e) {\n\t\t\tsetUsingTextures(false);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void setImages() {\n\n imgBlock.removeAll();\n imgBlock.revalidate();\n imgBlock.repaint();\n labels = new JLabel[imgs.length];\n for (int i = 0; i < imgs.length; i++) {\n\n labels[i] = new JLabel(new ImageIcon(Toolkit.getDefaultToolkit().createImage(imgs[i].getSource())));\n imgBlock.add(labels[i]);\n\n }\n\n SwingUtilities.updateComponentTreeUI(jf); // refresh\n initialized = true;\n\n }",
"public void loadImage() {\r\n // creates a new image icon with the characters array and the count as a file path\r\n ImageIcon ii = new ImageIcon(game.characters[count]);\r\n // load the image\r\n image = ii.getImage(); \r\n \r\n // sets width\r\n w = image.getWidth(null);\r\n // sets height\r\n h = image.getHeight(null);\r\n }",
"@Override\n protected void loadData() {\n setUpLoadingViewVisibility(true);\n callImageList = RetrofitGenerator.createService(ApiService.class)\n .getAllPubImage();\n callImageList.enqueue(callbackImageList);\n }",
"private void loadMedia() {\n\t\tmt = new MediaTracker(this);\n\t\timage_topbar = getToolkit().getImage(str_topbar);\n\t\timage_return = getToolkit().getImage(str_return);\n\t\timage_select = getToolkit().getImage(str_select);\n\t\timage_free = getToolkit().getImage(str_free);\n\t\timage_message = getToolkit().getImage(str_message);\n\t\timage_tradition = getToolkit().getImage(str_tradition);\n\t\timage_laizi = getToolkit().getImage(str_laizi);\n\t\timage_head = getToolkit().getImage(str_head);\n\t\timage_headframe = getToolkit().getImage(str_headframe);\n\t\timage_headmessage = getToolkit().getImage(str_headmessage);\n\t\timage_help = getToolkit().getImage(str_help);\n\t\timage_honor = getToolkit().getImage(str_honor);\n\t\timage_beans = getToolkit().getImage(str_beans);\n\t\t\n\t\t\n\t\tmt.addImage(image_free, 0);\n\t\tmt.addImage(image_head, 0);\n\t\tmt.addImage(image_headframe, 0);\n\t\tmt.addImage(image_headmessage, 0);\n\t\tmt.addImage(image_help, 0);\n\t\tmt.addImage(image_honor, 0);\n\t\tmt.addImage(image_laizi, 0);\n\t\tmt.addImage(image_message, 0);\n\t\tmt.addImage(image_return, 0);\n\t\tmt.addImage(image_select, 0);\n\t\tmt.addImage(image_topbar, 0);\n\t\tmt.addImage(image_tradition, 0);\n\t\tmt.addImage(image_beans, 0);\n\t\t\n\t\t\n\t\ttry {\n\t\t\tmt.waitForAll();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private BufferedImage loadPic(String name) {\n\t\tBufferedImage pic=null;\n\t\ttry {\n\t\t\tpic = ImageIO.read(new File(\"store/\"+name));\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t\treturn pic;\n\t}",
"private void initImages() throws SlickException {\n\t\t// laser images\n\t\tlaserbeamimageN = new Image(\"resources/images_Gameplay/laserBeam_Norm.png\");\n\t\tlaserbeamimageA = new Image(\"resources/images_Gameplay/laserBeam_Add.png\");\n\t\tlasertipimageN = new Image(\"resources/images_Gameplay/laserTip_Norm.png\");\n\t\tlasertipimageA = new Image(\"resources/images_Gameplay/laserTip_Add.png\");\n\t}",
"private void addImgList() {\n\t\tdogImg.add(\"./data/img/labrador.jpg\");\t\t\t\t\n\t\tdogImg.add(\"./data/img/germanshepherd.jpg\");\t\n\t\tdogImg.add(\"./data/img/bulldog.jpg\");\t\t\t\t\t\t\t\t\n\t\tdogImg.add(\"./data/img/rottweiler.jpg\");\n\t\tdogImg.add(\"./data/img/husky.jpg\");\n\n\t}",
"private void ini_Sprites()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_Sprites\");\r\n\t\tResourceCache.LoadSprites(false);\r\n\t}",
"private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}",
"private void createImageCache(){\n ImageCacheManager.getInstance().init(this,\n this.getPackageCodePath()\n , DISK_IMAGECACHE_SIZE\n , DISK_IMAGECACHE_COMPRESS_FORMAT\n , DISK_IMAGECACHE_QUALITY\n , ImageCacheManager.CacheType.MEMORY);\n }",
"private void prepararImagenYStorage() {\n mImageBitmap = null;\n\n //this.capturarFotoButton = (Button) findViewById(R.id.capturarFotoButton);\n// setBtnListenerOrDisable(\n// this.capturarFotoButton,\n// mTakePicSOnClickListener,\n// MediaStore.ACTION_IMAGE_CAPTURE\n// );\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {\n mAlbumStorageDirFactory = new FroyoAlbumDirFactory();\n } else {\n mAlbumStorageDirFactory = new BaseAlbumDirFactory();\n }\n }",
"@Override\n \n \n public void initialize(URL url, ResourceBundle rb) {\n retornararImg();\n\n }",
"protected void onReloadImage() {\n String url = DataProvider.SCREEN + DataProvider.SCREEN_INDEX + mScreenId + \"&time=\" + System.currentTimeMillis();\n image.setUrl(url); //just to avoid caching\n loadTree();\n }",
"public void run() {\nif(i[0] ==le.size()){\n i[0]=0;}\n File file = new File(\"/var/www/html/PawsAndClaws/web/bundles/uploads/brochures/\" + le.get( i[0]).getBrochure());\n\n Image it = new Image(file.toURI().toString(), 500, 310, false, false);\n eventspicture.setImage(it);\n i[0]++;\n }",
"public static void loadImages(){\n\t\tsetPath(main.getShop().inventory.getEquipID());\n\t\ttry {\n\t\t\tbackground = ImageIO.read(new File(\"res/world/bg.png\"));\n\t\t\tterrain = ImageIO.read(new File(\"res/world/solids.png\"));\n\t\t\t// Character and Armour\n\t\t\tcharacters = ImageIO.read(new File(\"res/world/char3.png\"));\n\t\t\tcharactersHead =ImageIO.read(new File(\"res/world/charhead\"+path[0]+\".png\"));\n\t\t\tcharactersTop = ImageIO.read(new File(\"res/world/chartop\"+path[2]+\".png\"));\n\t\t\tcharactersShoulder = ImageIO.read(new File(\"res/world/charshoulders\"+path[3]+\".png\"));\n\t\t\tcharactersHand = ImageIO.read(new File(\"res/world/charhands\"+path[5]+\".png\"));\n\t\t\tcharactersBottom = ImageIO.read(new File(\"res/world/charbottom\"+path[8]+\".png\"));\n\t\t\tcharactersShoes = ImageIO.read(new File(\"res/world/charshoes\"+path[9]+\".png\"));\n\t\t\tcharactersBelt = ImageIO.read(new File(\"res/world/charBelt\"+path[4]+\".png\"));\n\n\t\t\tweaponBow = ImageIO.read(new File(\"res/world/bow.png\"));\n\t\t\tweaponArrow = ImageIO.read(new File(\"res/world/arrow.png\"));\n\t\t\tweaponSword = ImageIO.read(new File(\"res/world/sword.png\"));\n\t\t\titems = ImageIO.read(new File(\"res/world/items.png\"));\n\t\t\tnpc = ImageIO.read(new File(\"res/world/npc.png\"));\n\t\t\thealth = ImageIO.read(new File(\"res/world/health.png\"));\n\t\t\tenemies = ImageIO.read(new File(\"res/world/enemies.png\"));\n\t\t\tcoin = ImageIO.read(new File(\"res/world/coin.png\"));\n\t\t\tmana = ImageIO.read(new File(\"res/world/mana.gif\"));\n\t\t\tarrowP = ImageIO.read(new File(\"res/world/arrowP.png\"));\n\t\t\tbutton = ImageIO.read(new File(\"res/world/button.png\"));\n\t\t\tblood = ImageIO.read(new File(\"res/world/blood.png\"));\n\t\t\tarrowDisp = ImageIO.read(new File(\"res/world/arrowDisp.png\"));\n\t\t\tboss1 = ImageIO.read(new File(\"res/world/boss1.png\"));\n\t\t\tmagic = ImageIO.read(new File(\"res/world/magic.png\"));\n\t\t\tmainMenu = ImageIO.read(new File(\"res/world/MainMenu.png\"));\n\t\t\tinstructions = ImageIO.read(new File(\"res/world/instructions.png\"));\n\t\t\trespawn = ImageIO.read(new File(\"res/world/respawn.png\"));\n\t\t\tinventory = ImageIO.read(new File(\"res/world/inventory.png\"));\n shop = ImageIO.read(new File(\"res/world/shop.png\"));\n dizzy = ImageIO.read(new File(\"res/world/dizzy.png\"));\n pet = ImageIO.read(new File(\"res/world/pet.png\"));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error Loading Images\");\n\t\t}\n\t}",
"public static void load(){\r\n\t \ttry {\r\n\t \t\t// load and set all sprites\r\n\t\t\t\tsetBlueGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/blueGarbage.png\")));\r\n\t\t\t\tsetRank(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/rank.png\")));\r\n\t\t\t\tsetRedGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/redGarbage.png\")));\r\n\t\t\t\tsetYellowGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/yellowGarbage.png\")));\r\n\t\t\t\tsetGreenGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/greenGarbage.png\")));\r\n\t\t\t\tsetBlueSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/blueSnakeBodyPart.png\")));\r\n\t\t\t\tsetRedSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/redSnakeBodyPart.png\")));\r\n\t\t\t\tsetYellowSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/yellowSnakeBodyPart.png\")));\r\n\t\t\t\tsetGreenSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/greenSnakeBodyPart.png\")));\r\n\t\t\t\tsetHeart(ImageIO.read(classPath.getResourceAsStream(\"/images/heart.png\")));\r\n\t\t\t\tsetGameScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameScreenBackground.png\")));\r\n\t\t\t\tsetGameScreenHeader(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameScreenHeader.png\")));\r\n\t\t\t\tsetGameOver(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameOver.png\")));\r\n\t\t\t\tsetHitsOwnBody(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/hitsOwnBody.png\")));\r\n\t\t\t\tsetHitsWall(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/hitsWall.png\")));\r\n\t\t\t\tsetWrongColor(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/wrongColor.png\")));\r\n\t\t\t\tsetHelpScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/helpScreenBackground.png\")));\r\n\t\t\t \tsetWarningScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/warningScreenBackground.png\")));\r\n\t\t\t \tsetOkButton(ImageIO.read(classPath.getClass().getResource(\"/images/okButton.png\")));\r\n\t\t\t \tsetMenuScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/menuScreenBackground.png\")));\r\n\t\t\t\tsetStartButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/startButton.png\")));\r\n\t\t\t\tsetExitButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/exitButton.png\")));\r\n\t\t\t\tsetHelpButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/helpButton.png\")));\r\n\t\t\t\t\r\n\t \t} \r\n\t \tcatch (Exception e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getStackTrace(), \"Erro ao carregar imagens\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t\r\n\t\t\t}\t\r\n \t\r\n \t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n\n // TOP1\n idrecette1.setText(String.valueOf(RS.findById(VS.TOP1()).getId()));\n usernameR1.setText(RS.findById(VS.TOP1()).getIduser().getUsername());\n nomR1.setText(RS.findById(VS.TOP1()).getNom());\n //image1.setImage(new Image(RS.findById(VS.TOP1()).getNom_image()));\n ScoreR1.setText(String.valueOf(VS.getScoreVote(RS.findById(VS.TOP1()).getId())));\n try{ \n String imageFile = (RS.findById(VS.TOP1()).getNom_image());\n System.out.println(imageFile);\n Image imageA = new Image(imageFile);\n image1.setImage(imageA);\n }\n catch(Exception e){\n Image imageB = new Image(\"file:/C:/wamp64/www/java_DOC/mscupcake2.jpg\");\n image1.setImage(imageB);\n }\n //TOP2\n idrecette2.setText(String.valueOf(RS.findById(VS.TOP2()).getId()));\n usernameR2.setText(RS.findById(VS.TOP2()).getIduser().getUsername());\n nomR2.setText(RS.findById(VS.TOP2()).getNom());\n ScoreR2.setText(String.valueOf(VS.getScoreVote(RS.findById(VS.TOP2()).getId())));\n try{ \n String imageFile = (RS.findById(VS.TOP2()).getNom_image());\n System.out.println(imageFile);\n Image imageA = new Image(imageFile);\n image2.setImage(imageA);\n }\n catch(Exception e){\n Image imageB = new Image(\"file:/C:/wamp64/www/java_DOC/mscupcake2.jpg\");\n image2.setImage(imageB);\n }\n //TOP3\n idrecette3.setText(String.valueOf(RS.findById(VS.TOP3()).getId()));\n usernameR3.setText(RS.findById(VS.TOP3()).getIduser().getUsername());\n nomR3.setText(RS.findById(VS.TOP3()).getNom());\n ScoreR3.setText(String.valueOf(VS.getScoreVote(RS.findById(VS.TOP3()).getId())));\n try{ \n String imageFile = (RS.findById(VS.TOP3()).getNom_image());\n System.out.println(imageFile);\n Image imageA = new Image(imageFile);\n image3.setImage(imageA);\n }\n catch(Exception e){\n Image imageB = new Image(\"file:/C:/wamp64/www/java_DOC/mscupcake2.jpg\");\n image3.setImage(imageB);\n }\n //TOP4\n idrecette4.setText(String.valueOf(RS.findById(VS.TOP4()).getId()));\n usernameR4.setText(RS.findById(VS.TOP4()).getIduser().getUsername());\n nomR4.setText(RS.findById(VS.TOP4()).getNom());\n ScoreR4.setText(String.valueOf(VS.getScoreVote(RS.findById(VS.TOP4()).getId())));\n try{ \n String imageFile = (RS.findById(VS.TOP4()).getNom_image());\n System.out.println(imageFile);\n Image imageA = new Image(imageFile);\n image4.setImage(imageA);\n }\n catch(Exception e){\n Image imageB = new Image(\"file:/C:/wamp64/www/java_DOC/mscupcake2.jpg\");\n image4.setImage(imageB);\n }\n //TOP5\n idrecette5.setText(String.valueOf(RS.findById(VS.TOP5()).getId()));\n usernameR5.setText(RS.findById(VS.TOP5()).getIduser().getUsername());\n nomR5.setText(RS.findById(VS.TOP5()).getNom());\n ScoreR5.setText(String.valueOf(VS.getScoreVote(RS.findById(VS.TOP5()).getId())));\n try{ \n String imageFile = (RS.findById(VS.TOP5()).getNom_image());\n System.out.println(imageFile);\n Image imageA = new Image(imageFile);\n image5.setImage(imageA);\n }\n catch(Exception e){\n Image imageB = new Image(\"file:/C:/wamp64/www/java_DOC/mscupcake2.jpg\");\n image5.setImage(imageB);\n } \n }",
"public void setStartingImages() {\n\t\t\n\t}",
"private void cacheUserImages() {\n User user = User.getLoggedInUser(this);\n if (user != null) {\n ImageView view = new ImageView(this);\n Picasso.with(this).load(user.getBannerImageUrl()).into(view);\n\n ImageView view2 = new ImageView(this);\n Picasso.with(this).load(user.getProfileImageUrl()).into(view2);\n }\n }",
"@Override\r\n\tpublic void init() {\n\t\timg = new ImageClass();\r\n\t\timg.Init(imgPath);\r\n\t}",
"public void initialize()\r\n {\r\n ceresImage = new Image(\"Ceres.png\");\r\n erisImage = new Image(\"Eris.png\");\r\n haumeaImage = new Image(\"Haumea.png\");\r\n makemakeImage = new Image(\"MakeMake.png\");\r\n plutoImage = new Image(\"Pluto.png\");\r\n }",
"public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.jpg\"));\n }\n if(oportunidades==2){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado5.jpg\"));\n }\n if(oportunidades==3){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado4.jpg\"));\n }\n if(oportunidades==4){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado3.jpg\"));\n }\n if(oportunidades==5){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado2.jpg\"));\n }\n if(oportunidades==6){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado1.jpg\"));\n }\n if(oportunidades==7){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado0.jpg\"));\n }\n this.imgAhorcado=respuesta; \n }",
"private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}",
"private void initImages() {\n mImageView1WA = findViewById(R.id.comment_OWA);\n mImageView6DA = findViewById(R.id.comment_btn_6DA);\n mImageView5DA = findViewById(R.id.comment_btn_5DA);\n mImageView4DA = findViewById(R.id.comment_btn_4DA);\n mImageView3DA = findViewById(R.id.comment_btn_3DA);\n mImageView2DA = findViewById(R.id.comment_btn_2DA);\n mImageViewY = findViewById(R.id.comment_btn_1DA);\n\n imageList.add(mImageViewY);\n imageList.add(mImageView2DA);\n imageList.add(mImageView3DA);\n imageList.add(mImageView4DA);\n imageList.add(mImageView5DA);\n imageList.add(mImageView6DA);\n imageList.add(mImageView1WA);\n\n }",
"private void initAreaImageFilm() {\n\n }",
"public static void initImageLoader() {\n }",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);",
"public static void loadImages()\n \t{\n \t\tSystem.out.print(\"Loading images... \");\n \t\t\n \t\tallImages = new TreeMap<ImageEnum, ImageIcon>();\n \t\t\n \t\ttry {\n \t\taddImage(ImageEnum.RAISIN, \"images/parts/raisin.png\");\n \t\taddImage(ImageEnum.NUT, \"images/parts/nut.png\");\n \t\taddImage(ImageEnum.PUFF_CHOCOLATE, \"images/parts/puff_chocolate.png\");\n \t\taddImage(ImageEnum.PUFF_CORN, \"images/parts/puff_corn.png\");\n \t\taddImage(ImageEnum.BANANA, \"images/parts/banana.png\");\n \t\taddImage(ImageEnum.CHEERIO, \"images/parts/cheerio.png\");\n \t\taddImage(ImageEnum.CINNATOAST, \"images/parts/cinnatoast.png\");\n\t\taddImage(ImageEnum.CORNFLAKE, \"images/parts/flake_corn.png\");\n \t\taddImage(ImageEnum.FLAKE_BRAN, \"images/parts/flake_bran.png\");\n \t\taddImage(ImageEnum.GOLDGRAHAM, \"images/parts/goldgraham.png\");\n \t\taddImage(ImageEnum.STRAWBERRY, \"images/parts/strawberry.png\");\n \t\t\n \t\taddImage(ImageEnum.PART_ROBOT_HAND, \"images/robots/part_robot_hand.png\");\n \t\taddImage(ImageEnum.KIT_ROBOT_HAND, \"images/robots/kit_robot_hand.png\");\n \t\taddImage(ImageEnum.ROBOT_ARM_1, \"images/robots/robot_arm_1.png\");\n \t\taddImage(ImageEnum.ROBOT_BASE, \"images/robots/robot_base.png\");\n \t\taddImage(ImageEnum.ROBOT_RAIL, \"images/robots/robot_rail.png\");\n \t\t\n \t\taddImage(ImageEnum.KIT, \"images/kit/empty_kit.png\");\n \t\taddImage(ImageEnum.KIT_TABLE, \"images/kit/kit_table.png\");\n \t\taddImage(ImageEnum.KITPORT, \"images/kit/kitport.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_IN, \"images/kit/kitport_hood_in.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_OUT, \"images/kit/kitport_hood_out.png\");\n \t\taddImage(ImageEnum.PALLET, \"images/kit/pallet.png\");\n \t\t\n \t\taddImage(ImageEnum.FEEDER, \"images/lane/feeder.png\");\n \t\taddImage(ImageEnum.LANE, \"images/lane/lane.png\");\n \t\taddImage(ImageEnum.NEST, \"images/lane/nest.png\");\n \t\taddImage(ImageEnum.DIVERTER, \"images/lane/diverter.png\");\n \t\taddImage(ImageEnum.DIVERTER_ARM, \"images/lane/diverter_arm.png\");\n \t\taddImage(ImageEnum.PARTS_BOX, \"images/lane/partsbox.png\");\n \t\t\n \t\taddImage(ImageEnum.CAMERA_FLASH, \"images/misc/camera_flash.png\");\n \t\taddImage(ImageEnum.SHADOW1, \"images/misc/shadow1.png\");\n \t\taddImage(ImageEnum.SHADOW2, \"images/misc/shadow2.png\");\n \t\t\n \t\taddImage(ImageEnum.GANTRY_BASE, \"images/gantry/gantry_base.png\");\n \t\taddImage(ImageEnum.GANTRY_CRANE, \"images/gantry/gantry_crane.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_H, \"images/gantry/gantry_truss_h.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_V, \"images/gantry/gantry_truss_v.png\");\n \t\taddImage(ImageEnum.GANTRY_WHEEL, \"images/gantry/gantry_wheel.png\");\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t\tSystem.exit(1);\n \t\t}\n \t\tSystem.out.println(\"Done\");\n \t}",
"public static void loadFruitPic() {\n //images are from the public domain website: https://www.clipartmax.com/\n Toolkit toolkit = Toolkit.getDefaultToolkit();\n Banana.fruitPic = toolkit.getImage(\"Images/banana.png\");\n Banana.fruitSlice = toolkit.getImage(\"Images/bananaSlice.png\");\n }",
"public CoreImageHandler() {\n loaded = new ConcurrentHashMap<URL, CoreImage>();\n }",
"private ImageLoader() {}",
"private void loadBitmap() {\n\n BitmapDrawable bitmapDrawable = (BitmapDrawable) this.getDrawable();\n\n if (bitmapDrawable != null)\n image = bitmapDrawable.getBitmap();\n }",
"private void loadImages() {\n\t\t\n\t\tImageView playerImage1;\n\t\tImageView playerImage2;\n Bitmap selectedPicture;\n \n\t\tplayerImage1 = (ImageView)findViewById(R.id.player_image_1);\n\t\tplayerImage2 = (ImageView)findViewById(R.id.player_image_2);\n\t\t\n\t\tif (playerUri1 != null) {\n\t \n\t try {\n\t selectedPicture = MediaStore.Images.Media.getBitmap(\n\tthis.getContentResolver(),playerUri1);\n\t playerImage1.setImageBitmap(selectedPicture);\n\t } catch (Exception e) {\n\t \tLog.e(DISPLAY_SERVICE, \"Pic not displaying\");\n\t \tfinish();\n\t }\n\t\t} else {\n\t\t\tplayerImage1.setImageResource(R.drawable.red);\n\t\t}\n \n\t\tif (playerUri2 != null) {\t \n\t try {\n\t selectedPicture = MediaStore.Images.Media.getBitmap(\n\tthis.getContentResolver(),playerUri2);\n\t playerImage2.setImageBitmap(selectedPicture);\n\t } catch (Exception e) {\n\t \tLog.e(DISPLAY_SERVICE, \"Pic not displaying\");\n\t \tfinish(); \n\t }\n\t\t} else {\n\t\t\tplayerImage2.setImageResource(R.drawable.green);\n\t\t}\n\t}",
"private void drawImages() {\n\t\t\r\n\t}",
"private Images() {}",
"private void initializeImageModels() {\n for(ImageModel model : GalleryFragment.listImageModel){\n imgList.add(model.getImagePath());\n }\n }",
"private void initImageLoader() {\n ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(this);\n config.threadPriority(Thread.NORM_PRIORITY - 2);\n config.denyCacheImageMultipleSizesInMemory();\n config.diskCacheFileNameGenerator(new Md5FileNameGenerator());\n config.diskCacheSize(50 * 1024 * 1024); // 50 MiB\n config.tasksProcessingOrder(QueueProcessingType.LIFO);\n // Initialize ImageLoader with configuration.\n ImageLoader.getInstance().init(config.build());\n }",
"private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 1;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n\t\t/* Associate the Bitmap to the ImageView */\n mImageView.setImageBitmap(bitmap);\n mTextView.setText(mCurrentPhotoPath);\n\n // SendImage(mCurrentPhotoPath);\n\n // AsyncCallWS task = new AsyncCallWS();\n // Call execute\n // task.execute();\n }",
"private void setPic() {\n int targetW =200;\n int targetH = 300;\n\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 1;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n bitmap1 = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n Log.e(\"bitmap\", \"\" + bitmap1);\n mAdapter = new MyAdapter(Goonlineactivity2.this,TITLES,ICONS,NAME,EMAIL,PROFILE); // Creating the Adapter of MyAdapter class(which we are going to see in a bit)\n // And passing the titles,icons,header view name, header view email,\n // and header view profile picture\n\n mRecyclerView.setAdapter(mAdapter);\n //profile11.setImageBitmap(bitmap1);\n\n \t\t/* Associate the Bitmap to the ImageView */\n\n }",
"public static int[][][] loadImage() {\n Image img = (Image)null; // create a null Image\n\n \n try{\n while (img == null) {\n // Ask for the name of a file that contains an image.\n System.out.print(\"What image file do you want to open? (gif, jpeg or bmp) \");\n String openName = null;\n openName = imageMain.console.readLine();\n \n // Check that the file name has a legal extension\n if (openName.endsWith(\".gif\") || openName.endsWith(\".jpg\")\n || openName.endsWith(\".jpeg\")) {\n img = Toolkit.getDefaultToolkit().getImage(openName);\n }\n else if (openName.endsWith(\".bmp\")) {\n img = utils.loadbitmap(\"./\", openName);\n }\n else {\n img=(Image)null; // we can't read the file\n }\n\n\n if (img != null) {\n // Make sure the entire image is loaded before continuing \n Button b = new Button(); // Create a button to use as a paraemter\n // to the constructor for MediaTracker.\n MediaTracker tracker = new MediaTracker(b);\n tracker.addImage(img,0);\n tracker.waitForID(0);\n\n // Create \"observer\", an object that allows us to\n // use getWidth and getHeight.\n iObserver observer = new iObserver();\n int width = img.getWidth(observer);\n int height = img.getHeight(observer);\n \n if(width==-1 || height==-1){\n // the image has not loaded.\n img = (Image)null;\n }\n } // if img != null\n\n // If the image did not load, print an explanatory\n // message to the user and ask him/her to try again.\n if (img == null) {\n System.out.println(\"Could not read an image from file \"\n +openName);\n System.out.println(\"Make sure that you supply the name of an image file, \\nand that you include the bmp, gif, jpg or jpeg extension.\");\n } // if (img==null)\n } // while img==null\n } // end of \"try\"\n\n // Catch InterruptedException for tracker.waitfor(), and catch\n // IOException for the console operations.\n catch(InterruptedException e) {\n System.out.println(e);\n System.exit(1);\n }\n catch(IOException e){ \n System.out.println(e);\n System.exit(1);\n }\n\n // Translate from Image img to a 3D array \"imagePixels\".\n // Using this 3D array, imagePixels[r][c][w] gives the value\n // of row r, column c, colour w.\n int[][][] imagePixels = getImagePixels(img);\n return imagePixels;\n }",
"public void InitParam(Bitmap[] bm, int vitesse, int intru, int laserColor) {\n screenSizeX = getResources().getDisplayMetrics().widthPixels;\n screenSizeY = getResources().getDisplayMetrics().heightPixels;\n\n //On recupere toutes nos images\n this.bm = bm;\n\n //On recupere la couleur du laser\n this.laserColor = laserColor;\n\n //Et celui qui est l'intru\n this.intru = intru;\n\n //On creer nos tableau avec comme longueur notre nombre d'images\n pathMeasure = new PathMeasure[this.bm.length];\n pathLength = new float[this.bm.length];\n pos = new float[this.bm.length][2]; // ici 2 positions, x et y\n animPath = new Path[this.bm.length];\n distance = new float[this.bm.length];\n resultBitmap = new Bitmap[this.bm.length];\n\n //On boucle pour instancier chaque objets de nos tableaux\n for(int j=0;j<this.bm.length;j++){\n\n animPath[j]= getRandomPath();\n pathMeasure[j] = new PathMeasure(animPath[j],false);\n pathLength[j] = pathMeasure[j].getLength();\n\n resultBitmap[j] = Bitmap.createBitmap(bm[j], 0, 0,\n bm[j].getWidth() - 1, bm[j].getHeight() - 1);\n }\n\n //On definit le pas\n step = vitesse;\n\n // On creer la matrice\n matrix = new Matrix();\n\n //Parametre dans le cas ou l'ecran est touché / pour les laser\n fired=false;\n touchedPosition = new float[2];\n distGaucheRest = new float[2];\n distGaucheRest[0]=0;\n distGaucheRest[1]=screenSizeY;\n fireGauchePas = new float[2];\n fireGauchePas[0]=0;\n fireGauchePas[1]=0;\n\n distDroitRest = new float[2];\n distDroitRest[0]=screenSizeX;\n distDroitRest[1]=screenSizeY;\n fireDroitPas = new float[2];\n fireDroitPas[0]=0;\n fireDroitPas[1]=0;\n\n //Au cas ou le vaiseau explose\n xplosed=false;\n countBeforeXplose=0;\n\n }",
"private void loadCache(Context ctx, ImageLoader img) {\r\n RequestOptions options = getCommonOptions(img);\r\n options.diskCacheStrategy(DiskCacheStrategy.ALL);\r\n\r\n Glide.with(ctx).load(img.getUrl()).apply(options).into(img.getImgView());\r\n }",
"protected abstract void setupImages(Context context);",
"public void loadImage() {\n\t\tif (images.containsKey(name)) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tString fullPath = BASE_PATH + this.sprite_sheet;\n\t\t\tFile imageFile = new File(fullPath);\n\t\t\tImage initialImage = ImageIO.read(imageFile);\n\t\t\tImage scaledImage = initialImage.getScaledInstance(\n\t\t\t\t\tMainPanel.TILE_SIZE, MainPanel.TILE_SIZE, 0);\n\n\t\t\tBufferedImage image = new BufferedImage(scaledImage.getWidth(null),\n\t\t\t\t\tscaledImage.getHeight(null), BufferedImage.TYPE_INT_ARGB);\n\t\t\tGraphics2D imageGraphicsContext = image.createGraphics();\n\t\t\timageGraphicsContext.drawImage(scaledImage, 0, 0, null);\n\t\t\timageGraphicsContext.dispose();\n\t\t\timages.put(name, image);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Could not load image for\" + this.name);\n\t\t}\n\t}",
"private void galleryAddPic() {\n\t}",
"public void loadImage(final String path, final ImageView imageView){\r\n imageView.setTag(path);\r\n if (mUIHandler==null){\r\n mUIHandler=new Handler(){\r\n @Override\r\n public void handleMessage(Message msg) {\r\n //Get the image and set its imageView.\r\n ImgBeanHolder holder= (ImgBeanHolder) msg.obj;\r\n Bitmap bitmap = holder.bitmap;\r\n ImageView imageview= holder.imageView;\r\n String path = holder.path;\r\n if (imageview.getTag().toString().equals( path)){\r\n imageview.setImageBitmap(bitmap);\r\n }\r\n }\r\n };\r\n }\r\n //Get the bitmap through the path in the cache.\r\n Bitmap bm=getBitmapFromLruCache(path);\r\n if (bm!=null){\r\n refreshBitmap(bm, path, imageView);\r\n }else{\r\n addTask(() -> {\r\n //Get the size of the image which wants to be displayed.\r\n ImageSize imageSize= getImageViewSize(imageView);\r\n //Compress the image.\r\n Bitmap bm1 =decodeSampledBitmapFromPath(imageSize.width,imageSize.height,path);\r\n //Put the image into the cache.\r\n addBitmapToLruCache(path, bm1);\r\n //Refresh the display of the image.\r\n refreshBitmap(bm1, path, imageView);\r\n mSemaphoreThreadPool.release();\r\n });\r\n }\r\n\r\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n \n c = (int) (Math.random() * (300000 - 2 + 1)) + 2;\n pDir = new File(\"src/img/Profile\" + c + \".jpg\");\n lien = \"Profile\" + c + \".jpg\";\n \n\n }",
"private void imageInitiation() {\n ImageIcon doggyImage = new ImageIcon(\"./data/dog1.jpg\");\n JLabel dogImage = new JLabel(doggyImage);\n dogImage.setSize(700,500);\n this.add(dogImage);\n }",
"public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }",
"public void cargarHashMap() throws IOException {\r\n\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.BUTTERFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/butterfly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.AMOEBA,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/amoeba.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGDIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.WALL,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/wall.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIRT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/dirt.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EMPTY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/empty.jpg\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.PLAYER,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/rockford.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.ROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FIREFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/firefly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.TITANIUM,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/steel.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EXIT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/exit.gif\")));\r\n\t\t//imagenes.put(\r\n\t\t\t//\tBDTile.EXPLOSION,\r\n\t\t\t\t//toolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t//\t.getResource(\"resources/explosion.gif\")));\r\n\r\n\t}",
"public synchronized static void initialiseImages() \n {\n if (images == null) {\n GreenfootImage baseImage = new GreenfootImage(\"explosion-big.png\");\n int maxSize = baseImage.getWidth()/3;\n int delta = maxSize / IMAGE_COUNT;\n int size = 0;\n images = new GreenfootImage[IMAGE_COUNT];\n for (int i=0; i < IMAGE_COUNT; i++) {\n size = size + delta;\n images[i] = new GreenfootImage(baseImage);\n images[i].scale(size, size);\n }\n }\n }",
"public synchronized void setPictureFromCache() {\n Runnable run = new Runnable() {\n @Override\n public void run() {\n File file = new File(context.getExternalFilesDir(null), pictureName);\n if (file != null) {\n Bitmap myBitmap = BitmapFactory.decodeFile(file.getAbsolutePath());\n if (imageView != null) {\n //imageView.setImageDrawable(new BitmapDrawable(null, myBitmap));\n new ResizeImage(imageView, file.getAbsolutePath()).setImageView();\n }\n }\n }\n };\n new Handler(context.getMainLooper()).post(run);\n }",
"protected void carregaImagens() {\n Handler carregaImagensHandler = new Handler();\n\n // Envia a Runnable ao Handler simulando um carregamento assincrono depois de 1 segundo\n carregaImagensHandler.postDelayed(new Runnable() {\n public void run() {\n // Carregando primeira imagem\n ImageView altaIV = findViewById(R.id.iv_alta);\n altaIV.setImageResource(R.drawable.android_verde);\n\n // Carregando primeira imagem\n ImageView baixaIV = findViewById(R.id.iv_baixa);\n baixaIV.setImageResource(R.drawable.android_preto);\n }\n }, 1000);\n }",
"private void initResources()\n {\n try\n {\n searchBackgroundImage = ImageIO.read(new File(IMAGES_DIR + \"logo.jpg\"));\n searchIcon = ImageIO.read(new File(IMAGES_DIR + \"search_icon.png\"));\n miniMenuAddImage = ImageIO.read(new File(IMAGES_DIR + \"addSmallIcon.png\"));\n miniMenuRemoveImage = ImageIO.read(new File(IMAGES_DIR + \"removeSmallIcon.png\"));\n updateMiniImage = ImageIO.read(new File(IMAGES_DIR + \"up.png\"));\n playButtonImage = ImageIO.read(new File(IMAGES_DIR + \"play_arrow.png\"));\n stopButtonImage = ImageIO.read(new File(IMAGES_DIR + \"stop_square.png\"));\n openFileImage = ImageIO.read(new File(IMAGES_DIR + \"open_icon.png\"));\n newFileImage = ImageIO.read(new File(IMAGES_DIR + \"new_file.png\"));\n settingsImage = ImageIO.read(new File(IMAGES_DIR + \"settings.png\"));\n spiderImage = ImageIO.read(new File(IMAGES_DIR + \"spider_icon.png\"));\n searchIconDark = ImageIO.read(new File(IMAGES_DIR + \"search_icon_dark.png\"));\n webIconImage = ImageIO.read(new File(IMAGES_DIR + \"web_icon.png\"));\n clipboardImage = ImageIO.read(new File(IMAGES_DIR + \"clipboard.png\"));\n colorIconImage = ImageIO.read(new File(IMAGES_DIR + \"color_icon.png\"));\n transitionSpinnerImage = IMAGES_DIR + \"loading.gif\";\n processingImage = IMAGES_DIR + \"processing.gif\";\n processingMiniImage = IMAGES_DIR + \"spinner.gif\";\n }\n \n catch(IOException e)\n {\n JOptionPane.showMessageDialog(null, \"[Error] Failed to load resource(s)\");\n }\n }",
"private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }",
"@Override\n protected Bitmap doInBackground(String... params) {\n imageUrl = params[0];\n ImageView thumbnail = imageViewReference.get();\n try {\n InputStream is = (InputStream) new URL(imageUrl).getContent();\n Bitmap bitmap = ImageCommons.decodeSampledBitmapFromInputStream(is, thumbnail.getWidth(), thumbnail.getHeight());\n addBitmapToMemoryCache(imageUrl, bitmap);\n return bitmap;\n } catch (IOException e) {\n e.printStackTrace();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n Log.d(\"myLog\", getClass().getSimpleName() + \" Erro ao fazer download de imagem\");\n return ImageCommons.decodeSampledBitmapFromResource(context.getResources(), R.drawable.ic_launcher, 70, 70);\n }",
"public void setImages(Bitmap[] images){\n this.images=images;\n currentFrame=0;\n startTime=System.nanoTime();\n }",
"public CopyOfPlayer(){ //Loads and scales the images\n for (int i = 0; i < robotImages.length; i++){\n for (int j = 0; j < black.length; j++){\n robotImages[i][j].scale(300, 300);\n }\n }\n costume = PrefLoader.getCostume(); //Sets costume according to file\n setImage(robotImages[costume][2]);\n }",
"private void setPic()\n {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n int scaleFactor = Math.min(photoW/384, photoH/512);\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n imageCapture.setImageBitmap(bitmap);\n }",
"private void setPic() {\n int targetW = mainImageView.getWidth();\n int targetH = mainImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n// bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mainImageView.setImageBitmap(bitmap);\n\n// bmOptions.inBitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n// mainImageView.setImageBitmap(bmOptions.inBitmap);\n }",
"public void loadImage() {\n\t\ttry {\n\t\t\tcurrImage = ImageIO.read(new File(INPUT_DIR,fileNames.get(fileCounter)));\n\t\t\tcurrImageOrigDim = new Dimension(currImage.getWidth(), currImage.getHeight());\n\t\t\tlabel4.setText(\"Processing: \" + fileNames.get(fileCounter));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Resize to Frame\n\t\tdouble imgHt = currImage.getHeight();\n\t\tdouble imgWt = currImage.getWidth();\n\t\tdouble wRatio = FRAME_SIZE/imgWt;\n\t\tdouble hRatio = FRAME_SIZE/imgHt;\n\t\taspectR = Math.min(wRatio,hRatio);\n\t\tcurrImage = getScaledInstance(currImage, (int)(aspectR*imgWt), (int)(aspectR*imgHt));\n\t\tcurrImageBounds = new Rectangle(0, 0, currImage.getWidth(), currImage.getHeight());\n\t\trepaint();\n\t}",
"private void init() {\n\t\trunning = true;\n\t\timage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);\n\t\tg = (Graphics2D) image.getGraphics();\n\t\ttheMap.loadTiles(\"resizedTiles2.png\");\n\t}",
"private void loadImage(){\n Log.d(getString(R.string.app_name), \"photoURL: \" + photoURL);\n String hash = photoURL.substring(0, photoURL.lastIndexOf(\".\"));\n try {\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(hash.getBytes());\n hash = bytesToHex(md.digest());\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n// File cachedFile = new File(getCacheDir(), photoURL.substring(0, photoURL.lastIndexOf(\".\")));\n File cachedFile = new File(getCacheDir(), hash);\n if(cachedFile.exists()) {\n //load image from cache\n Glide.with(getApplicationContext())\n .load(cachedFile)\n .diskCacheStrategy(DiskCacheStrategy.NONE)\n// .crossFade()\n .into(picture);\n// TileBitmapDrawable.attachTileBitmapDrawable(picture, getCacheDir() + \"/\" + photoURL.split(\"\\\\.\")[0], null, null);\n setupPictureClickListener();\n\n postImageLoaded();\n } else {\n //download image\n setupReloadButtonListener();\n initImageLoader();\n }\n }",
"private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }",
"public void loadMedia() {\n MediaDBMapper mapper = new MediaDBMapper(ctx);\n\n String[] fileNames = {\n \"medved.jpg\",\n \"medved 2.jpg\",\n \"medved hnedy.jpg\",\n \"grizzly.jpg\",\n \"buk.jpg\",\n \"jedle.jpg\",\n \"jedle 2.jpg\"\n };\n\n File file = null;\n\n try {\n boolean autoCommit = getConnection().getAutoCommit();\n getConnection().setAutoCommit(false);\n\n try {\n\n for (String fileName : fileNames) {\n try {\n file = new File(\"resources\\\\\" + fileName);\n\n System.out.println(\"Opening: \" + file.getPath() + \".\");\n\n MediaEntity e = mapper.create();\n e.setName(file.getName().substring(0, file.getName().lastIndexOf('.')));\n\n mapper.loadImageFromFile(e, file.getPath());\n\n mapper.save(e);\n } catch (NullPointerException ex) {\n ex.printStackTrace();\n }\n\n// getConnection().commit();\n }\n\n } finally {\n getConnection().setAutoCommit(autoCommit);\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n// throw new RuntimeException(ex);\n }\n }",
"public String setImageLoader(ArrayList<String> link, int rando) {\n\t\tArrayList<String> newLink = link;\n\t\timgs = newLink.get(rando);\n\t\timg = new Image(imgs);\n\t\timgView.setImage(img);\n\t\treturn imgs;\n\t\t//imgView.setPreserveRatio(true);\n\t\t//imgView.setFitHeight(100);\n\t\t//imgView.setFitWidth(100);\n\t\t//this.getChildren().addAll(picBox,imgView);\t\n\t}",
"public void imageLoader(File file)\n{\n float ratio;\n if (file == null)\n {\n return;\n } else\n {\n try\n {\n PImage img = loadImage(file.getAbsolutePath());\n //if(img.width < 300)\n //{\n // img.resize(300,img.height);\n // if(img.height/((float)img.width)>3)\n // img.resize(300, 900);\n // if(img.width/((float)img.height)<0.3)\n // img.resize(900, 300);\n //}\n //if(img.height < 300)\n //{\n // img.resize(img.width, 300);\n // if(img.width/((float)img.width)>3)\n // img.resize(300, 900);\n // if(img.width/((float)img.height)<0.3)\n // img.resize(900, 300);\n //}\n if(img.height/((float)img.width)>3)\n {\n ratio = 1.0f;\n if(img.width < 400)\n {\n ratio = 400/((float)img.width);\n }\n img.resize((int)(ratio*img.width),(int)(ratio*img.width*2.5f));\n }\n if(img.height/((float)img.width)<0.25f)\n {\n ratio = 1.0f;\n if(img.height < 400)\n {\n ratio = 400/((float)img.height);\n }\n img.resize((int)(ratio*img.height*2.5f),(int)(ratio*img.height));\n }\n if(img.width < 400 || img.height < 400)\n {\n ratio = 1.0f;\n if(img.width < 400)\n {\n ratio = 400/((float)img.width);\n }\n if(img.height < 400 && img.height < img.width)\n {\n ratio = 400/((float)img.height);\n }\n img.resize((int)(ratio*img.width),(int)(ratio*img.height));\n }\n m.getInputImageManager().setImage(img);\n m.getInputImageManager().setResizedImage(m.getInputImageManager().resizeToFit(img, width-150, height-20));\n if(m.getOutputImageManager().getMosaic()!= null)\n {\n m.getOutputImageManager().createMosaic(m.getInputImageManager().getImage(),m.getOutputImageManager().getMosaic().getLastSeenImage(), m.getOutputImageManager().getMosaic().getTiles());\n }\n else\n {\n m.getOutputImageManager().createMosaic(m.getInputImageManager().getImage(),m.getInputImageManager().getImage(), m.getTileManager().getTiles());\n }\n m.getOutputImageManager().getMosaic().setMiniatures();\n }\n catch(NullPointerException e)\n {\n println(e);\n }\n }\n}",
"private void init() {\n File file1 = new File(FileUtil.getInstance().getCacheDirPath(), \"jianyichuli.jpg\");\n if (file1.exists()) file1.delete();\n PrintView<JianyiChuliTongzhidanListBean.DataListBean> printView1 = new PrintView<>(this,entity);\n String path1 = FileUtil.getInstance().save2Local(printView1.getcacheBitmap(), file1.getAbsolutePath());\n if (((User) SPUtils.getInstance().getObjectData(Constance.USER_OBJECT)).getZt() == 1) {\n saveAndStartPrintShare(FileUtil.getInstance().getCacheDirPath(), \"jianyichuli.jpg\");\n return;\n }\n phandler.sendEmptyMessage(104);\n while (true){\n BorisPrint bPrint = new BorisPrint(MyApplication.getContext(), null,phandler);\n int code = bPrint.print(path1, 2);\n if (code==0){\n break;\n }\n }\n }",
"public void initMapImageFragment () {\n // Thay doi tieu de\n tabTourMapImageBinding.actionBar.actionBarTitle.setText(R.string.tour_map_image);\n Tour tour = OnlineManager.getInstance().mTourList.get(tourOrder);\n // Gan tour image\n if (!tour.getmMapImageUrl().equals(null) && !tour.getmMapImageUrl().equals(\"\")) {\n Picasso.get()\n .load(tour.getmMapImageUrl())\n .into(tabTourMapImageBinding.tourMapImage);\n// Picasso.with(this).load(tour.getmMapImageUrl()).into(tabTourMapImageBinding.tourMapImage);\n }\n // Tat map image progress\n mapImageProgressOff();\n }",
"private void cargarBitmaps(TipoMunicion tipo) {\n switch (tipo){\n case RIFLE:\n bala = utils.getBitmapFromAssets(\"balas/bullet1.png\");\n break;\n case PISTOLA:\n bala = utils.getBitmapFromAssets(\"balas/bullet3.png\");\n break;\n case BIGPISTOLA:\n bala = utils.getBitmapFromAssets(\"balas/bullet2.png\");\n break;\n }\n\n Matrix matrix = new Matrix();\n switch (direccion) {\n case NORTE:\n matrix.postRotate(-90);\n break;\n case SUR:\n matrix.postRotate(90);\n break;\n case ESTE:\n matrix.postRotate(0);\n break;\n case OESTE:\n matrix.postRotate(180);\n break;\n }\n bala = Bitmap.createBitmap(bala, 0, 0, bala.getWidth(), bala.getHeight(), matrix, true);\n bala = Bitmap.createScaledBitmap(bala, altoPantalla * 1/80, altoPantalla * 1/80, false);\n }",
"private void loadData() {\r\n titleProperty.set(TITLE);\r\n imageView.setImage(null);\r\n scrollPane.setContent(null);\r\n final Task<Void> finisher = new Task<Void>() {\r\n @Override\r\n protected Void call() throws Exception {\r\n Platform.runLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n buffer = replay.politicalBuffer;\r\n output = new WritableImage(replay.bufferWidth, replay.bufferHeight);\r\n output.getPixelWriter().setPixels(0, 0, replay.bufferWidth, replay.bufferHeight, PixelFormat.getIntArgbPreInstance(), buffer, 0, replay.bufferWidth);\r\n progressBar.progressProperty().unbind();\r\n progressBar.setProgress(0);\r\n statusLabel.textProperty().unbind();\r\n statusLabel.setText(l10n(\"replay.map.loaded\"));\r\n scrollPane.setContent(null);\r\n imageView.setImage(output);\r\n scrollPane.setContent(imageView);\r\n int fitWidth = Integer.parseInt(settings.getProperty(\"map.fit.width\", \"0\"));\r\n int fitHeight = Integer.parseInt(settings.getProperty(\"map.fit.height\", \"0\"));\r\n imageView.setFitHeight(fitHeight);\r\n imageView.setFitWidth(fitWidth);\r\n lock.release();\r\n }\r\n });\r\n return null;\r\n }\r\n };\r\n progressBar.progressProperty().bind(finisher.progressProperty());\r\n statusLabel.textProperty().bind(finisher.titleProperty());\r\n replay.loadData(finisher);\r\n }",
"private Images() {\n \n imgView = new ImageIcon(this,\"images/View\");\n\n imgUndo = new ImageIcon(this,\"images/Undo\");\n imgRedo = new ImageIcon(this,\"images/Redo\");\n \n imgCut = new ImageIcon(this,\"images/Cut\");\n imgCopy = new ImageIcon(this,\"images/Copy\");\n imgPaste = new ImageIcon(this,\"images/Paste\");\n \n imgAdd = new ImageIcon(this,\"images/Add\");\n \n imgNew = new ImageIcon(this,\"images/New\");\n imgDel = new ImageIcon(this,\"images/Delete\");\n \n imgShare = new ImageIcon(this,\"images/Share\");\n }",
"private void setPic() {\n int targetW =20;// mImageView.getWidth();\n int targetH =20;// mImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;//设置仅加载位图边界信息(相当于位图的信息,但没有加载位图)\n\n //返回为NULL,即不会返回bitmap,但可以返回bitmap的横像素和纵像素还有图片类型\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mImageView.setImageBitmap(bitmap);\n }",
"public void loadFromSavedBitmap() {\n if (bitmap != null) {\n // genera un nuovo puntatore ad una texture\n GLES20.glGenTextures(1, texture, 0);\n // lega questo puntatore ad una variabile disponibile all'app\n GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texture[0]);\n\n // setta alcuni parametri che diranno a OpenGL come trattare la texture\n GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);\n // caricamento della texture\n GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0);\n // libera memoria\n bitmap.recycle();\n }\n resourcesLoaded++;\n\n MyGLRenderer.checkGlError(\"loadFromSavedBitmap\");\n }",
"private void loadImages(FollowersResponse response) throws IOException {\n for(User user : response.getFollowers()) {\n byte [] bytes = ByteArrayUtils.bytesFromUrl(user.getImageUrl());\n user.setImageBytes(bytes);\n }\n }",
"public void loadTo(String url, ImageView imageView) {\n relationsMap.put(imageView, url);\n\n // If image already cached just show it\n Bitmap bitmap = memoryCache.getData(url);\n if (bitmap != null) {\n Log.d(\"HIHO\", \"bitmap from memory\");\n imageView.setImageBitmap(bitmap);\n } else {\n loadAndDisplay(url, imageView);\n }\n }"
] | [
"0.69279534",
"0.69050044",
"0.68875825",
"0.6757142",
"0.6744846",
"0.67181873",
"0.67144126",
"0.67025",
"0.669753",
"0.66748613",
"0.6663257",
"0.65902257",
"0.658292",
"0.65599835",
"0.65586746",
"0.6499064",
"0.648409",
"0.6477385",
"0.6467991",
"0.64651835",
"0.64474964",
"0.6441011",
"0.64360607",
"0.643098",
"0.64244026",
"0.6423613",
"0.64161956",
"0.64153194",
"0.63952076",
"0.63881874",
"0.6385464",
"0.63840425",
"0.6371721",
"0.6361907",
"0.6352925",
"0.6343152",
"0.63405627",
"0.632556",
"0.6317887",
"0.63166946",
"0.63148534",
"0.63141227",
"0.6309676",
"0.63086426",
"0.630601",
"0.62950075",
"0.6284716",
"0.6278047",
"0.6273823",
"0.62434566",
"0.6212751",
"0.6208458",
"0.62016296",
"0.61978924",
"0.61960685",
"0.6189875",
"0.61891884",
"0.6177061",
"0.6167715",
"0.6150676",
"0.61477476",
"0.61462355",
"0.61462045",
"0.61398685",
"0.6134683",
"0.61322385",
"0.6120665",
"0.61200356",
"0.61133766",
"0.6111794",
"0.609743",
"0.60952014",
"0.60946894",
"0.6094638",
"0.6093956",
"0.60876745",
"0.60842514",
"0.60824966",
"0.6078381",
"0.60746634",
"0.6071054",
"0.6062675",
"0.6058733",
"0.6044152",
"0.6043891",
"0.6043397",
"0.6038469",
"0.6036836",
"0.60335183",
"0.6022558",
"0.6021973",
"0.60212463",
"0.602113",
"0.6014252",
"0.60119694",
"0.60107034",
"0.60057515",
"0.6002849",
"0.60002404",
"0.59962344"
] | 0.6314466 | 41 |
TODO Autogenerated method stub | public void run() {
} | {
"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 |
jika memencet tombol back | public void pointerReleased(int x, int y) {
if (x >= spr_btnBack.getX() && x <= spr_btnBack.getX() + spr_btnBack.getWidth()
&& y >= spr_btnBack.getY()
&& y <= spr_btnBack.getY() + spr_btnBack.getHeight()) {
//removeSprites();
// tuju ke elemen yang kita inginkan
// element at 0 untuk vector screen adalah menunya
host.setCurrentScreen((Screen) host.getScreenVector().elementAt(0));
//jika memencet tombol mute
}else if (x >= spr_btnMute.getX() && x <= spr_btnMute.getX() + spr_btnMute.getWidth()
&& y >= spr_btnMute.getY()
&& y <= spr_btnMute.getY() + spr_btnMute.getHeight()){
if (host.getGameSettings().isMusicOn()) {
host.getGameSettings().setMusicOn(false);
spr_btnMute.setFrame(1);
host.getGameSound().stopBGM();
}else{
host.getGameSettings().setMusicOn(true);
spr_btnMute.setFrame(0);
host.getGameSound().playBGM();
}
//memencet tombol reset
}else if (x >= spr_btnReset.getX() && x <= spr_btnReset.getX() + spr_btnReset.getWidth()
&& y >= spr_btnReset.getY()
&& y <= spr_btnReset.getY() + spr_btnReset.getHeight()){
RMS record = ((GameMidlet)getMidlet()).getRMS();
//reset skor tertinggi menjadi 0
record.saveScore(0);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void propagate(XQueue in, XQueue[] out) throws JMSException {\n Message inMessage = null;\n String msgStr = null, ruleName = null;\n StringBuffer strBuf = null;\n Object o;\n Map rule;\n Browser browser;\n MessageFilter[] filters = null;\n Template template = null;\n AssetList taskList = null;\n String[] propertyName = null, propertyValue = null;\n long[] outInfo = null, ruleInfo = null, taskInfo;\n int[] ruleMap;\n long currentTime, sessionTime;\n long count = 0;\n int mask, ii, hbeat, retry;\n int i = 0, id, hid, tid, m, n;\n int cid = -1; // the cell id of the message in input queue\n int rid = 0; // the id of the ruleset\n int oid = 0; // the id of the output queue\n boolean dspBody = false, inDetail = ((debug & DEBUG_REPT) > 0);\n boolean ckBody = false;\n byte[] buffer = new byte[bufferSize];\n\n i = in.getCapacity();\n if (capacity != i) { // assume it only occurs at startup\n new Event(Event.WARNING, name + \": \" + in.getName() +\n \" has the different capacity of \" + i + \" from \" +\n capacity).send();\n capacity = i;\n msgList.clear();\n msgList = new AssetList(name, capacity);\n cells.clear();\n cells = new CollectibleCells(name, capacity);\n }\n\n // initialize patterns\n n = ruleList.size();\n filters = new MessageFilter[n];\n browser = ruleList.browser();\n ruleMap = new int[n];\n i = 0;\n while ((rid = browser.next()) >= 0) {\n rule = (Map) ruleList.get(rid);\n filters[i] = (MessageFilter) rule.get(\"Filter\");\n if (filters[i] != null) {\n if ((!ckBody) && filters[i].checkBody())\n ckBody = true;\n }\n ruleMap[i++] = rid;\n }\n\n // update assetList\n n = out.length;\n for (i=0; i<n; i++) {\n Object[] asset = (Object[]) assetList.get(i);\n asset[ASSET_XQ] = out[i];\n outInfo = assetList.getMetaData(i);\n if (outInfo[OUT_CAPACITY] != out[i].getCapacity())\n outInfo[OUT_CAPACITY] = out[i].getCapacity();\n }\n pool = out[outLinkMap[POOL_OUT]];\n poolInfo = assetList.getMetaData(outLinkMap[POOL_OUT]);\n if (pool.getCapacity() != reqList.getCapacity()) { // rereate reqList\n reqList.clear();\n reqList = new AssetList(name, pool.getCapacity());\n }\n\n n = ruleMap.length;\n strBuf = new StringBuffer();\n // set all groups active at startup but the first\n hid = heartbeat.length - 1;\n hbeat = heartbeat[hid];\n currentTime = System.currentTimeMillis();\n sessionTime = currentTime;\n ii = 0;\n while (((mask = in.getGlobalMask()) & XQueue.KEEP_RUNNING) > 0) {\n if ((mask & XQueue.STANDBY) > 0) // standby temporarily\n break;\n if ((cid = in.getNextCell(waitTime)) >= 0) { // got a new msg\n currentTime = System.currentTimeMillis();\n\n if ((inMessage = (Message) in.browse(cid)) == null) {\n in.remove(cid);\n new Event(Event.WARNING, name + \": \" + Event.traceStack(\n new JMSException(\"null msg from \"+in.getName()))).send();\n continue;\n }\n\n msgStr = null;\n rid = 0;\n i = 0;\n try {\n if (ckBody)\n msgStr = MessageUtils.processBody(inMessage, buffer);\n for (i=1; i<n; i++) {\n if (filters[i].evaluate(inMessage, msgStr)) {\n rid = ruleMap[i];\n break;\n }\n }\n }\n catch (Exception e) {\n String str = name;\n Exception ex = null;\n if (e instanceof JMSException)\n ex = ((JMSException) e).getLinkedException();\n if (ex != null)\n str += \" Linked exception: \" + ex.toString() + \"\\n\";\n new Event(Event.ERR, str + \" failed to apply the filter \"+i+\n \": \" + Event.traceStack(e)).send();\n i = -1;\n }\n\n ruleName = ruleList.getKey(rid);\n ruleInfo = ruleList.getMetaData(rid);\n\n if (i < 0) // failed on filter\n oid = outLinkMap[FAILURE_OUT];\n else if (TYPE_ACTION != (int) ruleInfo[RULE_PID]) // bypass\n oid = (int) ruleInfo[RULE_OID];\n else try { // to init the monitor and to add it to taskList\n rule = (Map) ruleList.get(rid);\n propertyName = (String[]) rule.get(\"PropertyName\");\n template = (Template) rule.get(\"Template\");\n Map<String,Object> task=initTask(template,buffer,inMessage);\n if (task != null && task.size() > 0) {\n String key = (String) task.get(\"Name\");\n TimeWindows tw = (TimeWindows) task.get(\"TimeWindow\");\n if (ruleInfo[RULE_TTL] > 0)\n tw.setStopTime(currentTime + ruleInfo[RULE_TTL]);\n if (propertyName != null) // copy properties over\n copyProperties(propertyName, task, inMessage);\n taskList = (AssetList) rule.get(\"TaskList\");\n id = taskList.add(key, new long[TASK_TIME+1], task);\n if ((debug & DEBUG_UPDT) > 0)\n new Event(Event.DEBUG, name + \" \" + ruleName +\n \" added a new task of \" + key + \" from \" + cid +\n \" to \" + id + \" with \" + taskList.size() + \" \" +\n ruleInfo[RULE_PEND]).send();\n if (id >= 0) {\n taskInfo = taskList.getMetaData(id);\n for (i=0; i<=TASK_TIME; i++)\n taskInfo[i] = 0;\n taskInfo[TASK_ID] = -1;\n taskInfo[TASK_GID] = -1;\n taskInfo[TASK_STATUS] = NODE_READY;\n taskInfo[TASK_TIME] = currentTime;\n ruleInfo[RULE_PEND] ++;\n ruleInfo[RULE_TIME] = currentTime;\n if (ruleInfo[RULE_OPTION] > 0) { // on wait\n // hold the message until it is done \n taskInfo[TASK_GID] = cid;\n continue;\n }\n oid = outLinkMap[BYPASS_OUT];\n }\n else { // failed to add to the list\n MonitorReport report;\n report = (MonitorReport) task.get(\"Report\");\n if (report != null)\n report.destroy();\n task.clear();\n if (taskList.getID(key) < 0) {\n new Event(Event.ERR, name + \": \" + ruleName +\n \" failed to add new task of \" + key +\n \" \" + taskList.size() + \"/\" +\n ruleInfo[RULE_EXTRA]).send();\n oid = outLinkMap[FAILURE_OUT];\n }\n else {\n new Event(Event.WARNING, name +\": \"+ruleName+\n \" has an active task for \" + key).send();\n oid = outLinkMap[BYPASS_OUT];\n }\n }\n }\n else { // failed to init occurrence\n oid = outLinkMap[FAILURE_OUT];\n new Event(Event.ERR, name + \": \" + ruleName +\n \" failed to init a new task\").send();\n }\n }\n catch (Exception e) {\n oid = outLinkMap[FAILURE_OUT];\n new Event(Event.ERR, name + \": \" + ruleName +\n \" failed to create a new task: \" +\n Event.traceStack(e)).send();\n }\n\n if ((debug & DEBUG_PROP) > 0)\n new Event(Event.DEBUG, name+\" propagate: cid=\" + cid +\n \" rid=\" + rid + \" oid=\" + oid).send();\n\n if (displayMask > 0) try {// display message\n if (dspBody)\n msgStr = MessageUtils.processBody(inMessage, buffer);\n new Event(Event.INFO, name+\": \"+ruleName+\" processed msg \"+\n (count + 1)+\":\"+MessageUtils.display(inMessage, msgStr,\n displayMask, displayPropertyName)).send();\n }\n catch (Exception e) {\n new Event(Event.WARNING, name + \": \" + ruleName +\n \" failed to display msg: \" + e.toString()).send();\n }\n\n count += passthru(currentTime, inMessage, in, rid, oid, cid, 0);\n feedback(in, -1L);\n }\n\n currentTime = System.currentTimeMillis();\n if (currentTime < sessionTime) { // session not due yet\n if (pool.collectible() > 0)\n collect(in, outLinkMap[RESULT_OUT]);\n if (msgList.size() > 0)\n feedback(in, -1L);\n continue;\n }\n\n inDetail = ((debug & DEBUG_REPT) > 0);\n m = 0;\n browser.reset();\n while ((rid = browser.next()) >= 0) { // update active rulesets\n ruleInfo = ruleList.getMetaData(rid);\n if (ruleInfo[RULE_PID] != TYPE_ACTION)\n continue;\n if ((hbeat % (int) ruleInfo[RULE_MODE]) != 0) // not active\n continue;\n if (ruleInfo[RULE_PEND] <= 0) // empty rule\n continue;\n\n ruleName = ruleList.getKey(rid);\n rule = (Map) ruleList.get(rid);\n taskList = null;\n if (rule == null || rule.size() <= 0) {\n new Event(Event.WARNING, name + \": \" + ruleName +\n \" is empty\").send();\n continue;\n }\n taskList = (AssetList) rule.get(\"TaskList\");\n if (taskList == null) {\n new Event(Event.WARNING, name + \": \" + ruleName +\n \" has no taskList\").send();\n continue;\n }\n if (inDetail)\n new Event(Event.DEBUG, name + \": \" + ruleName +\n \" is active with \" + taskList.size() + \" tasks\").send();\n if (taskList.size() <= 0)\n continue;\n retry = (int) ruleInfo[RULE_GID];\n Browser b = taskList.browser();\n while ((tid = b.next()) >= 0) { // dispatch tasks\n taskInfo = taskList.getMetaData(tid);\n id = (int) taskInfo[TASK_ID];\n if (id < 0) { // ready for next run\n ObjectEvent msg = new ObjectEvent();\n msg.setPriority(Event.INFO);\n msg.setAttribute(\"name\", taskList.getKey(tid));\n msg.setBody(taskList.get(tid));\n id = pool.reserve(waitTime);\n if (id >= 0) { // reserved\n if (reqList.existsID(id)) { // preoccupied?\n collect(currentTime, id, in,\n outLinkMap[RESULT_OUT]);\n }\n pool.add(msg, id);\n taskInfo[TASK_ID] = id;\n taskInfo[TASK_STATUS] = NODE_RUNNING;\n taskInfo[TASK_TIME] = currentTime;\n taskInfo[TASK_RETRY] = 0;\n reqList.add(String.valueOf(id),\n new long[]{rid, tid}, msg, id);\n poolInfo[OUT_SIZE] ++;\n poolInfo[OUT_TIME] = currentTime;\n poolInfo[OUT_QTIME] = currentTime;\n m ++;\n if (inDetail)\n strBuf.append(\"\\n\\t\" + ruleName + \"/\" +\n taskList.getKey(tid) + \": \" + tid + \" \" +\n id + \" \" + taskInfo[TASK_RC] + \" \" +\n taskInfo[TASK_COUNT]);\n }\n else { // failed to reserve\n new Event(Event.ERR, name + \" \"+ ruleName + \":\" +\n taskList.getKey(tid) + \" failed to reserve \"+\n \"from \" + pool.getName() + \" \" + pool.depth()+\n \":\" + pool.size() + \"/\" + id).send();\n }\n }\n else if (ruleInfo[RULE_GID] > 0 &&\n taskInfo[TASK_RETRY] >= ruleInfo[RULE_GID]) { // stuck\n taskInfo[TASK_RETRY] ++;\n if (taskInfo[RULE_STATUS] == NODE_RUNNING ||\n taskInfo[RULE_STATUS] == NODE_READY)\n taskInfo[RULE_STATUS] = NODE_RETRYING;\n new Event(Event.ERR, name + \" \"+ ruleName + \":\" +\n taskList.getKey(tid) + \" timed out and stuck \"+\n taskInfo[TASK_RETRY] + \" times at \" + id).send();\n }\n else {\n taskInfo[TASK_RETRY] ++;\n new Event(Event.WARNING, name + \" \"+ ruleName + \":\" +\n taskList.getKey(tid) + \" timed out and stuck \"+\n taskInfo[TASK_RETRY] + \" times at \" + id).send();\n }\n }\n }\n\n if (pool.collectible() > 0)\n collect(in, outLinkMap[RESULT_OUT]);\n if (msgList.size() > 0)\n feedback(in, -1L);\n\n if (inDetail && strBuf.length() > 0) {\n new Event(Event.DEBUG, name + \" RULE/KEY: TID ID RC COUNT - \" +\n m + \" \" + hid + \" \" + hbeat + \" \" + pool.size() + \":\" +\n pool.depth() + \" \" + reqList.size() +\n strBuf.toString()).send();\n strBuf = new StringBuffer();\n }\n\n hid ++;\n if (hid >= heartbeat.length) { // reset session\n hid = 0;\n sessionTime += heartbeat[hid];\n }\n else {\n sessionTime += heartbeat[hid] - hbeat;\n }\n hbeat = heartbeat[hid];\n currentTime = System.currentTimeMillis();\n if (currentTime > sessionTime) // reset sessionTime\n sessionTime = currentTime;\n }\n }",
"void genPromote(Collection ret, int from, int to, int bits) {\n\tfor (char i = KNIGHT; i <= QUEEN; ++i) {\n\tBouger g = new Bouger(from, to, i, (bits | 32), 'P');\n\tg.setScore(1000000 + (i * 10));\n\tret.add(g);\n\t}\n\t}",
"public void decodeMelody(){\n //this.adder=new Adder(/*this.getTonicNote(),new int[]{0,1,2,3}*/);\n\n melodyNotes= adder.getKeyNotes(); //todo debug\n ArrayList<Integer[]> framenotes=adder.getFrameNotes();\n ArrayList<Integer[]> chordnotes=adder.getKeyChords();\n firstChord=chordnotes.get(0);\n secondChord=chordnotes.get(1);\n thirdChord=chordnotes.get(2);\n fourthChord=chordnotes.get(3);\n MiddleNote=framenotes.get(0);\n LastNote=framenotes.get(1);\n this.tokenizeAndParse();\n //01000101000000011100100100100110011101101110101110001010010101100101100101110\n //todo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n this.mainDecoder(8,firstChord);\n //todo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n this.copiedMeasureDecoder(firstChordNote,firstChord,secondChord);\n //todo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n this.mainDecoder(14,secondChord);\n //todo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n this.frameNoteDecoder(MiddleNote);\n //todo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n this.mainDecoder(24,thirdChord);\n //todo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n this.copiedMeasureDecoder(secondChordNote ,thirdChord,fourthChord);\n //todo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n this.mainDecoder(30,fourthChord);\n //todo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n this.frameNoteDecoder(LastNote);\n }",
"@Override\n public long apply$mcJJ$sp (long arg0)\n {\n return 0;\n }",
"Aweme mo62993e();",
"public void copiedMeasureDecoder(Integer chordNote,Integer[]previousChord, Integer[] playedChord){\n /* int c=0;\n int a=0;\n int b=0;\n int x0=0;\n int x1=0;*/\n int d1=0;\n int d2=0;\n\n\n\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==chordNote)\n d1=i;\n }\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==melody.get(melodyCounter))\n d2=i;\n /* if(melodyNotes[i]==playedChord[1])\n a=i;\n if(melodyNotes[i]==previousChord[1])\n b=i;*/\n }\n /*if(a<b){\n x0=a-b;\n x1=7+x1;\n }else{\n x0=a-b;\n x1=x0-7;\n }*/\n if(d1>d2) {\n binaryOutput += \"0\";\n }else {\n binaryOutput += \"1\";\n }\n for(int i = 0;i<4;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n }\n\n\n}",
"private static LinkedList<MongoPsm> convertFromMzTabPsmsToPrideArchivePsms(Collection<PSM> mzTabPsms, Metadata metadata, String projectAccession, String assayAccession) {\n LinkedList<MongoPsm> res = new LinkedList<MongoPsm>();\n for (PSM mzTabPsm : mzTabPsms) {\n String cleanPepSequence = MongoPsmSequenceCleaner.cleanPeptideSequence(mzTabPsm.getSequence());\n MongoPsm newPsm = new MongoPsm();\n newPsm.setId(getId(projectAccession, assayAccession, mzTabPsm.getPSM_ID(), mzTabPsm.getAccession(), cleanPepSequence));\n newPsm.setReportedId(mzTabPsm.getPSM_ID());\n newPsm.setSpectrumId(createSpectrumId(mzTabPsm, projectAccession));\n newPsm.setPeptideSequence(cleanPepSequence);\n newPsm.setProjectAccession(projectAccession);\n newPsm.setAssayAccession(assayAccession);\n // To be compatible with the project index we don't clean the protein accession\n // String correctedAccession = getCorrectedAccession(mzTabPsm.getAccession(), mzTabPsm.getDatabase());\n // newPsm.setProteinAccession(correctedAccession);\n newPsm.setProteinAccession(mzTabPsm.getAccession());\n newPsm.setDatabase(mzTabPsm.getDatabase());\n newPsm.setDatabaseVersion(mzTabPsm.getDatabaseVersion());\n newPsm.setModifications(new LinkedList<>());\n if (mzTabPsm.getModifications() != null) {\n //Using the writer for the library\n for (Modification mod : mzTabPsm.getModifications()) {\n newPsm.addModification(convertToModificationProvider(mod));\n }\n }\n MZBoolean unique = mzTabPsm.getUnique();\n if (unique != null) {\n newPsm.setUnique(MZBoolean.True.equals(unique));\n } else {\n newPsm.setUnique(null);\n }\n newPsm.setSearchEngines(new LinkedList<>());\n //If the mzTab search engine can not be converted SplitList can be null\n if (mzTabPsm.getSearchEngine() != null && !mzTabPsm.getSearchEngine().isEmpty()) {\n for (Param searchEngine : mzTabPsm.getSearchEngine()) {\n newPsm.addSearchEngine(convertToCvParamProvider(searchEngine));\n }\n }\n newPsm.setSearchEngineScores(new LinkedList<>());\n //If the mzTab search engine can not be converted SplitList can be null\n if (metadata.getPsmSearchEngineScoreMap() != null && !metadata.getPsmSearchEngineScoreMap().isEmpty()) {\n for (PSMSearchEngineScore psmSearchEngineScore : metadata.getPsmSearchEngineScoreMap().values()) {\n if (mzTabPsm.getSearchEngineScore(psmSearchEngineScore.getId()) != null) {\n // We create a Param as the composition between the searchEngineScore stored in the metadata and\n // the search engine score value stored in the psm\n Param param = psmSearchEngineScore.getParam();\n String value = mzTabPsm.getSearchEngineScore(psmSearchEngineScore.getId()).toString();\n newPsm.addSearchEngineScore(convertToCvParamProvider(param.getCvLabel(), param.getAccession(), param.getName(), value));\n\n }\n }\n }\n SplitList<Double> retentionTimes = mzTabPsm.getRetentionTime();\n if (retentionTimes != null && !retentionTimes.isEmpty()) {\n newPsm.setRetentionTime(retentionTimes.get(0));\n }\n newPsm.setCharge(mzTabPsm.getCharge());\n newPsm.setExpMassToCharge(mzTabPsm.getExpMassToCharge());\n newPsm.setCalculatedMassToCharge(mzTabPsm.getCalcMassToCharge());\n newPsm.setPreAminoAcid(mzTabPsm.getPre());\n newPsm.setPostAminoAcid(mzTabPsm.getPost());\n if (mzTabPsm.getStart() != null) {\n newPsm.setStartPosition(mzTabPsm.getStart());\n }\n if (mzTabPsm.getEnd() != null) {\n newPsm.setEndPosition(mzTabPsm.getEnd());\n }\n res.add(newPsm);\n }\n\n return res;\n }",
"public String deciphe(List<Integer> message) {\n\n\t String result = \"\", candidateKey= \"\", encodedKey = \"\", mapKey = \"\";\n\t boolean foundKeyPrefix = false, foundKey = false, consume = false;\n\t int subListStart = 0, subListEnd = 1; \t//Define the start and end of the candidate key, start with the smallest size (1)\n\t int lastKeyEnd = 0; \t\t\t\t\t\t//Defines the end of the last candidate key that has been recognized as a map key \n\t Iterator<String> iterator;\n\t \n\t while (subListEnd < message.size()+1) {\n\n\t \tcandidateKey = messageToKey(message.subList(subListStart, subListEnd));\n\t \tconsume = true;\n\t \t\n\t \titerator = keySet.iterator();\n\t \twhile (iterator.hasNext()) {\n\t \t\t\n\t \t\tmapKey = iterator.next();\n\t \t\tfoundKey = mapKey.equals(candidateKey);\n\t \t\tfoundKeyPrefix = mapKey.startsWith(candidateKey);\n\t \t\t\n\t \t\tif (foundKey){ \t\t\t\t\t\t\t\t\t/* CASE 1: If subList is a valid key, annotate the input position so that we can return to this point in case of not finding a larger key */\n \t\t\t\tlastKeyEnd = subListEnd;\n \t\t\t\tencodedKey = mapKey; \t\t\n\t \t\t}\n \t\t\telse if (foundKeyPrefix){ \t\t\t\t\t\t/* The current substring is a key prefix, stop searching over the map key set because larger keys have precedence */\n \t\t\t\tconsume = (subListEnd == message.size());\n \t\t\t\tbreak; \t\t\t\t\t\n\t \t\t}\n\t \t}\n \t\t\n\t\tif (consume) {\n\t\t\t\n\t\t\tif (!foundKey) {\n\n\t\t\t\tif (lastKeyEnd != 0) { \t\t\t\t\t\t/* CASE 2 */\n\t\t\t\t\t\n\t\t\t\t\tsubListEnd = lastKeyEnd;\n\t\t\t\t\tlastKeyEnd = 0;\n\t \t\t\t \tcandidateKey = messageToKey(message.subList(subListStart, subListEnd));\n\t \t\t\t\tencodedKey = this.map.get(Integer.parseInt(candidateKey)).toString();\t\t\n\t\t\t\t}\n\t \t\t\telse { \t\t\t\t\t\t\t\t\t\t/* CASE 3 */\n\t \t\t\t\t\n\t \t\t\t\tif (subListEnd > subListStart+1) subListEnd--;\t \t\t\t\n\t \t\t\t \tcandidateKey = messageToKey(message.subList(subListStart, subListEnd));\n\t \t\t\t encodedKey = candidateKey;\n\t \t\t\t}\n\t\t\t}\n\n \t\t\t/*\n \t\t\t * Update the output message and move to the next candidate key\n \t\t\t */\n\t\t\t\n\t\t\tresult = result.concat(encodedKey);\n \t\t\tsubListStart = subListEnd;\n \t\t\tsubListEnd = subListStart+1;\n\t\t}\n\t\telse {\n\t\t\tsubListEnd++;\n\t\t}\n\n\t }\n\t\n\t logger.info(\"Result: \"+result);\n\t return result;\n }",
"private final synchronized void zzem() {\n /*\n r5 = this;\n monitor-enter(r5);\n r0 = r5.zzvw;\t Catch:{ all -> 0x005b }\n r1 = \"save_data\";\n r2 = 0;\n r0 = r0.getString(r1, r2);\t Catch:{ all -> 0x005b }\n if (r0 != 0) goto L_0x000e;\n L_0x000c:\n monitor-exit(r5);\n return;\n L_0x000e:\n r1 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x0047 }\n r1.<init>(r0);\t Catch:{ JSONException -> 0x0047 }\n r0 = \"castSessionId\";\n r0 = r1.getString(r0);\t Catch:{ JSONException -> 0x0047 }\n r2 = r5.zzvx;\t Catch:{ JSONException -> 0x0047 }\n r0 = r2.equals(r0);\t Catch:{ JSONException -> 0x0047 }\n if (r0 == 0) goto L_0x0045;\n L_0x0021:\n r0 = \"playerTokenMap\";\n r0 = r1.getJSONObject(r0);\t Catch:{ JSONException -> 0x0047 }\n r1 = r0.keys();\t Catch:{ JSONException -> 0x0047 }\n L_0x002b:\n r2 = r1.hasNext();\t Catch:{ JSONException -> 0x0047 }\n if (r2 == 0) goto L_0x0041;\n L_0x0031:\n r2 = r1.next();\t Catch:{ JSONException -> 0x0047 }\n r2 = (java.lang.String) r2;\t Catch:{ JSONException -> 0x0047 }\n r3 = r5.zzvv;\t Catch:{ JSONException -> 0x0047 }\n r4 = r0.getString(r2);\t Catch:{ JSONException -> 0x0047 }\n r3.put(r2, r4);\t Catch:{ JSONException -> 0x0047 }\n goto L_0x002b;\n L_0x0041:\n r0 = 0;\n r5.zzwe = r0;\t Catch:{ JSONException -> 0x0047 }\n L_0x0045:\n monitor-exit(r5);\n return;\n L_0x0047:\n r0 = move-exception;\n r1 = zzbf;\t Catch:{ all -> 0x005b }\n r2 = \"Error while loading data: %s\";\n r3 = 1;\n r3 = new java.lang.Object[r3];\t Catch:{ all -> 0x005b }\n r4 = 0;\n r0 = r0.getMessage();\t Catch:{ all -> 0x005b }\n r3[r4] = r0;\t Catch:{ all -> 0x005b }\n r1.w(r2, r3);\t Catch:{ all -> 0x005b }\n monitor-exit(r5);\n return;\n L_0x005b:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.cast.zzcb.zzem():void\");\n }",
"public void translate() {\n\t\tif(!init)\r\n\t\t\treturn; \r\n\t\ttermPhraseTranslation.clear();\r\n\t\t// document threshold: number of terms / / 8\r\n//\t\tdocThreshold = (int) (wordKeyList.size() / computeAvgTermNum(documentTermRelation) / 8.0);\r\n\t\t//\t\tuseDocFrequency = true;\r\n\t\tint minFrequency=1;\r\n\t\temBkgCoefficient=0.5;\r\n\t\tprobThreshold=0.001;//\r\n\t\titerationNum = 20;\r\n\t\tArrayList<Token> tokenList;\r\n\t\tToken curToken;\r\n\t\tint j,k;\r\n\t\t//p(w|C)\r\n\r\n\t\tint[] termValues = termIndexList.values;\r\n\t\tboolean[] termActive = termIndexList.allocated;\r\n\t\ttotalCollectionCount = 0;\r\n\t\tfor(k=0;k<termActive.length;k++){\r\n\t\t\tif(!termActive[k])\r\n\t\t\t\tcontinue;\r\n\t\t\ttotalCollectionCount +=termValues[k];\r\n\t\t}\r\n\t\t\r\n\t\t// for each phrase\r\n\t\tint[] phraseFreqKeys = phraseFrequencyIndex.keys;\r\n\t\tint[] phraseFreqValues = phraseFrequencyIndex.values;\r\n\t\tboolean[] states = phraseFrequencyIndex.allocated;\r\n\t\tfor (int phraseEntry = 0;phraseEntry<states.length;phraseEntry++){\r\n\t\t\tif(!states[phraseEntry]){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (phraseFreqValues[phraseEntry] < minFrequency)\r\n\t\t\t\tcontinue;\r\n\t\t\ttokenList=genSignatureTranslation(phraseFreqKeys[phraseEntry]); // i is phrase number\r\n\t\t\tfor (j = 0; j <tokenList.size(); j++) {\r\n\t\t\t\tcurToken=(Token)tokenList.get(j);\r\n\t\t\t\tif(termPhraseTranslation.containsKey(curToken.getIndex())){\r\n\t\t\t\t\tIntFloatOpenHashMap old = termPhraseTranslation.get(curToken.getIndex());\r\n\t\t\t\t\tif(old.containsKey(phraseFreqKeys[phraseEntry])){\r\n\t\t\t\t\t\tSystem.out.println(\"aha need correction\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\told.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight()); //phrase, weight\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tIntFloatOpenHashMap newPhrase = new IntFloatOpenHashMap();\r\n\t\t\t\t\tnewPhrase.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight());\r\n\t\t\t\t\ttermPhraseTranslation.put(curToken.getIndex(), newPhrase);\r\n\t\t\t\t}\r\n\t\t\t\t//\t\t\t\toutputTransMatrix.add(i,curToken.getIndex(),curToken.getWeight());\r\n\t\t\t\t//\t\t\t\toutputTransTMatrix.add(curToken.getIndex(), i, curToken.getWeight());\r\n\t\t\t\t//TODO termPhrase exists, create PhraseTerm\r\n\t\t\t}\r\n\t\t\ttokenList.clear();\r\n\t\t}\r\n\r\n\t}",
"@Override\n public void decode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception {\n int len = in.limit(); \n \tbyte [] dst=new byte [len]; \n \tin.get(dst); \n ByteArrayInputStream is = new ByteArrayInputStream(dst);\n HessianInput hi = new HessianInput(is);\n Object entity= hi.readObject();\n out.write(entity);\n }",
"void mo80453a(Message message);",
"public void map( Chunk bv ) { }",
"public Object am() {\n Object[] objArr = this.aq;\n int i = this.ar - 2081709061;\n this.ar = i;\n return objArr[i * 1523192013];\n }",
"protected abstract ByteBuffer toMedia(Object object) throws BeanConversionException;",
"static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x001d\n byte[] r2 = r4.createByteArray()\n java.nio.ByteBuffer r2 = java.nio.ByteBuffer.wrap(r2)\n r0.f18501c = r2\n L_0x001d:\n int r2 = r4.readInt()\n r0.f18500b = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x0061\n byte[] r4 = r4.createByteArray()\n int r3 = r0.f18500b\n if (r3 <= 0) goto L_0x005c\n int r1 = r0.f18500b\n if (r1 != r2) goto L_0x0049\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4)\n r0.f18502d = r4\n java.nio.ByteBuffer r4 = r0.f18502d\n r4.position(r2)\n goto L_0x0068\n L_0x0049:\n int r1 = r0.f18500b\n java.nio.ByteBuffer r1 = java.nio.ByteBuffer.allocate(r1)\n r0.f18502d = r1\n java.nio.ByteBuffer r1 = r0.f18502d\n r1.put(r4)\n goto L_0x0068\n L_0x005c:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4, r1, r2)\n goto L_0x0065\n L_0x0061:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.allocate(r1)\n L_0x0065:\n r0.f18502d = r4\n L_0x0068:\n boolean r4 = m23372b(r0)\n if (r4 == 0) goto L_0x006f\n return r0\n L_0x006f:\n int r4 = r0.f18500b\n if (r4 <= 0) goto L_0x007d\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n r4.put(r1, r0)\n goto L_0x00a2\n L_0x007d:\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n java.lang.Object r4 = r4.get(r1)\n com.qiyukf.nimlib.f.a.a r4 = (com.qiyukf.nimlib.p470f.p471a.C5826a) r4\n if (r4 == 0) goto L_0x00a2\n java.nio.ByteBuffer r1 = r4.f18502d\n java.nio.ByteBuffer r0 = r0.f18502d\n r1.put(r0)\n boolean r0 = m23372b(r4)\n if (r0 == 0) goto L_0x00a2\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r0 = f18504a\n int r1 = r4.f18499a\n r0.remove(r1)\n return r4\n L_0x00a2:\n r4 = 0\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.qiyukf.nimlib.p470f.p471a.C5826a.C5829b.m23369a(android.os.Parcel):com.qiyukf.nimlib.f.a.a\");\n }",
"private Pair<PostingList, Integer> gapDecode(int size, ByteBuffer list, int termId) {\n\t\tList<Integer> docList = vBDecode(list, size);\n\t\tIterator<Integer> p = docList.iterator();\n\t\tInteger docId = popNextOrNull(p);\n List<Integer> docIds = new ArrayList<Integer>();\n\t\tif (docId != null) {\n\t\t\tdocIds.add(docId);\n\t\t\tInteger gap = null;\n\t\t\twhile ( (gap = popNextOrNull(p)) != null) {\n\t\t\t\tdocId = docId + gap;\n\t\t\t\tdocIds.add(docId);\n\t\t\t}\n\t\t}\n PostingList result = new PostingList(termId, docIds);\n\t\tPair<PostingList, Integer> results = new Pair(result, list.position());\n /*System.out.println(\"......inside......\");\n\t\tfor (int n : docIds) {\n\t\t System.out.println(n);\n }*/\n\n\t\t//System.out.println(\"gap : \" + list.position());\n // test bytebuffer position of gapDecode equals vbdecode? wish true. yes\n\t\treturn results;\n\t}",
"public void frameNoteDecoder(Integer[] frameNotes){\n //for(int i = 0;i<1;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n //}\n\n if(beatCounter==15) {\n for (int i = 0; i < frameNotes.length; i++) {\n if (melody.get(melodyCounter) == frameNotes[i]) {\n if (i < 2) {\n binaryOutput += \"0\";\n binaryOutput += Integer.toBinaryString(i);\n } else {\n binaryOutput += Integer.toBinaryString(i);\n }\n }\n }\n }\n if(beatCounter==31) {\n for (int i = 0; i < frameNotes.length; i++) {\n if (melody.get(melodyCounter) == frameNotes[i]) {\n binaryOutput += Integer.toBinaryString(i);\n }\n }\n }\n beatCounter++;\n melodyCounter++;\n\n\n}",
"private void invertedToDatabase(){\r\n cleFreq = new HashMap<>();\r\n System.out.println(\"Strat collecting\");\r\n Map<String,List<Invertedindex>> collects = collecting();\r\n System.out.println(\"Ending collecting\");\r\n Database.getInstance().invertedIndex(collects);\r\n Database.getInstance().addPoids(cleFreq);\r\n }",
"void mo46242a(bmc bmc);",
"C7562b<C10403b, C10328a> mo25041a();",
"@Override\n public final /* synthetic */ zzfjs zza(zzfjj zzfjj2) throws IOException {\n block19: do {\n int n;\n int n2;\n Object[] arrobject;\n int n3 = zzfjj2.zzcvt();\n switch (n3) {\n default: {\n if (super.zza(zzfjj2, n3)) continue block19;\n }\n case 0: {\n return this;\n }\n case 10: {\n this.zzlmn = zzfjj2.readBytes();\n continue block19;\n }\n case 18: {\n this.zzlmo = zzfjj2.readString();\n continue block19;\n }\n case 25: {\n this.zzlmp = Double.longBitsToDouble(zzfjj2.zzcwp());\n continue block19;\n }\n case 37: {\n this.zzlmq = Float.intBitsToFloat(zzfjj2.zzcwo());\n continue block19;\n }\n case 40: {\n this.zzlmr = zzfjj2.zzcwn();\n continue block19;\n }\n case 48: {\n this.zzlms = zzfjj2.zzcwi();\n continue block19;\n }\n case 56: {\n n3 = zzfjj2.zzcwi();\n this.zzlmt = -(n3 & 1) ^ n3 >>> 1;\n continue block19;\n }\n case 64: {\n this.zzlmu = zzfjj2.zzcvz();\n continue block19;\n }\n case 74: {\n n = zzfjv.zzb(zzfjj2, 74);\n n3 = this.zzlmv == null ? 0 : this.zzlmv.length;\n arrobject = new zzdmc[n + n3];\n n = n3;\n if (n3 != 0) {\n System.arraycopy(this.zzlmv, 0, arrobject, 0, n3);\n n = n3;\n }\n while (n < arrobject.length - 1) {\n arrobject[n] = new zzdmc();\n zzfjj2.zza((zzfjs)arrobject[n]);\n zzfjj2.zzcvt();\n ++n;\n }\n arrobject[n] = new zzdmc();\n zzfjj2.zza((zzfjs)arrobject[n]);\n this.zzlmv = arrobject;\n continue block19;\n }\n case 82: {\n n = zzfjv.zzb(zzfjj2, 82);\n n3 = this.zzlmw == null ? 0 : this.zzlmw.length;\n arrobject = new zzdmd[n + n3];\n n = n3;\n if (n3 != 0) {\n System.arraycopy(this.zzlmw, 0, arrobject, 0, n3);\n n = n3;\n }\n while (n < arrobject.length - 1) {\n arrobject[n] = new zzdmd();\n zzfjj2.zza((zzfjs)arrobject[n]);\n zzfjj2.zzcvt();\n ++n;\n }\n arrobject[n] = new zzdmd();\n zzfjj2.zza((zzfjs)arrobject[n]);\n this.zzlmw = arrobject;\n continue block19;\n }\n case 90: {\n n = zzfjv.zzb(zzfjj2, 90);\n n3 = this.zzlmx == null ? 0 : this.zzlmx.length;\n arrobject = new String[n + n3];\n n = n3;\n if (n3 != 0) {\n System.arraycopy(this.zzlmx, 0, arrobject, 0, n3);\n n = n3;\n }\n while (n < arrobject.length - 1) {\n arrobject[n] = zzfjj2.readString();\n zzfjj2.zzcvt();\n ++n;\n }\n arrobject[n] = zzfjj2.readString();\n this.zzlmx = arrobject;\n continue block19;\n }\n case 96: {\n n = zzfjv.zzb(zzfjj2, 96);\n n3 = this.zzlmy == null ? 0 : this.zzlmy.length;\n arrobject = new long[n + n3];\n n = n3;\n if (n3 != 0) {\n System.arraycopy(this.zzlmy, 0, arrobject, 0, n3);\n n = n3;\n }\n while (n < arrobject.length - 1) {\n arrobject[n] = zzfjj2.zzcwn();\n zzfjj2.zzcvt();\n ++n;\n }\n arrobject[n] = zzfjj2.zzcwn();\n this.zzlmy = arrobject;\n continue block19;\n }\n case 98: {\n n2 = zzfjj2.zzks(zzfjj2.zzcwi());\n n3 = zzfjj2.getPosition();\n n = 0;\n while (zzfjj2.zzcwk() > 0) {\n zzfjj2.zzcwn();\n ++n;\n }\n zzfjj2.zzmg(n3);\n n3 = this.zzlmy == null ? 0 : this.zzlmy.length;\n arrobject = new long[n + n3];\n n = n3;\n if (n3 != 0) {\n System.arraycopy(this.zzlmy, 0, arrobject, 0, n3);\n n = n3;\n }\n while (n < arrobject.length) {\n arrobject[n] = zzfjj2.zzcwn();\n ++n;\n }\n this.zzlmy = arrobject;\n zzfjj2.zzkt(n2);\n continue block19;\n }\n case 104: {\n this.zzlna = zzfjj2.zzcwn();\n continue block19;\n }\n case 117: {\n n = zzfjv.zzb(zzfjj2, 117);\n n3 = this.zzlmz == null ? 0 : this.zzlmz.length;\n arrobject = new float[n + n3];\n n = n3;\n if (n3 != 0) {\n System.arraycopy(this.zzlmz, 0, arrobject, 0, n3);\n n = n3;\n }\n while (n < arrobject.length - 1) {\n arrobject[n] = Float.intBitsToFloat(zzfjj2.zzcwo());\n zzfjj2.zzcvt();\n ++n;\n }\n arrobject[n] = Float.intBitsToFloat(zzfjj2.zzcwo());\n this.zzlmz = arrobject;\n continue block19;\n }\n case 114: \n }\n n3 = zzfjj2.zzcwi();\n n2 = zzfjj2.zzks(n3);\n n = n3 / 4;\n n3 = this.zzlmz == null ? 0 : this.zzlmz.length;\n arrobject = new float[n + n3];\n n = n3;\n if (n3 != 0) {\n System.arraycopy(this.zzlmz, 0, arrobject, 0, n3);\n n = n3;\n }\n while (n < arrobject.length) {\n arrobject[n] = Float.intBitsToFloat(zzfjj2.zzcwo());\n ++n;\n }\n this.zzlmz = arrobject;\n zzfjj2.zzkt(n2);\n } while (true);\n }",
"private void m13725b(long j) {\n while (!this.f11098q.isEmpty()) {\n C2084a c2084a = (C2084a) this.f11098q.removeFirst();\n this.f11106y -= c2084a.f5788b;\n for (TrackOutput sampleMetadata : this.f11083I) {\n sampleMetadata.sampleMetadata(j + c2084a.f5787a, 1, c2084a.f5788b, this.f11106y, null);\n }\n }\n }",
"public void deserialize(JoyBuffer in) {\n\t\t\n\t}",
"int getsObj(TclObject tobj) {\n GetsState gs;\n ChannelBuffer buf;\n boolean oldEncodingStart, oldEncodingEnd;\n int oldRemoved, skip, inEofChar;\n int copiedTotal, oldLength;\n boolean in_binary_encoding = false;\n int dst, dstEnd, eol, eof;\n final boolean debug = false;\n\n buf = inQueueHead;\n\n // Preserved so we can restore the channel's state in case we don't\n // find a newline in the available input.\n\n oldLength = 0;\n oldEncodingStart = encodingStart;\n oldEncodingEnd = encodingEnd;\n oldRemoved = buf.BUFFER_PADDING;\n if (buf != null) {\n oldRemoved = buf.nextRemoved;\n }\n\n // If there is no encoding, use \"iso8859-1\" -- readLine() doesn't\n // produce ByteArray objects.\n\n if (encoding == null) {\n in_binary_encoding = true;\n encoding = EncodingCmd.getJavaName(\"iso8859-1\");\n }\n\n if (debug) {\n System.out.println(\"getsObj() : encoding is \" + encoding);\n }\n\n // Object used by filterBytes to keep track of how much data has\n // been consumed from the channel buffers.\n\n gs = new GetsState();\n gs.obj = tobj;\n gs.charToBytes = new ArrayList(128);\n //gs.dst = &dst;\n gs.encoding = encoding;\n gs.buf = buf;\n gs.rawRead.i = 0;\n //gs.bytesWrote.i = 0;\n gs.charsWrote.i = 0;\n gs.totalChars = 0;\n\n // Ensure that tobj is an empty TclString object.\n // Cheat a bit and grab the StringBuffer out of\n // the TclString so we can query the data that\n // was just added to the buffer.\n TclString.empty(tobj);\n StringBuffer obj_sbuf = ((TclString) tobj.getInternalRep()).sbuf;\n\n dst = 0;\n dstEnd = dst;\n\n skip = 0;\n eof = -1;\n inEofChar = eofChar;\n\n // Used to implement goto like functionality for restore\n // and goteol loop terminaltion blocks.\n\n boolean restore = false;\n boolean goteol = false;\n\n // This is just here so that eol and copiedTotal are\n // definitely assigned before the try block.\n eol = -1;\n copiedTotal = -1;\n\n restore_or_goteol: {\n while (true) {\n if (dst >= dstEnd) {\n if (filterBytes(gs) != 0) {\n restore = true;\n break restore_or_goteol; //goto restore\n }\n if (debug) {\n System.out.println(\"advancing dstEnd by \" +\n gs.charsWrote.i);\n }\n dstEnd += gs.charsWrote.i;\n }\n\n // Remember if EOF char is seen, then look for EOL anyhow, because\n // the EOL might be before the EOF char.\n\n if (inEofChar != '\\0') {\n for (eol = dst; eol < dstEnd; eol++) {\n if (obj_sbuf.charAt(eol) == inEofChar) {\n if (debug) {\n System.out.println(\"found EOF char at \" + eol);\n }\n\n dstEnd = eol;\n eof = eol;\n break;\n }\n }\n }\n\n // On EOL, leave current file position pointing after the EOL, but\n // don't store the EOL in the output string.\n\n switch (translation) {\n case TclIO.TRANS_LF: {\n for (eol = dst; eol < dstEnd; eol++) {\n if (obj_sbuf.charAt(eol) == '\\n') {\n if (debug) {\n System.out.println(\"TRANS_LF: found EOL char at \" + eol);\n }\n\n skip = 1;\n goteol = true;\n break restore_or_goteol; //goto goteol\n }\n }\n break;\n }\n case TclIO.TRANS_CR: {\n for (eol = dst; eol < dstEnd; eol++) {\n if (obj_sbuf.charAt(eol) == '\\r') {\n if (debug) {\n System.out.println(\"TRANS_CR: found EOL char at \" + eol);\n }\n\n skip = 1;\n goteol = true;\n break restore_or_goteol; //goto goteol\n }\n }\n break;\n }\n case TclIO.TRANS_CRLF: {\n for (eol = dst; eol < dstEnd; eol++) {\n if (obj_sbuf.charAt(eol) == '\\r') {\n if (debug) {\n System.out.println(\"TRANS_CRLF: found EOL char at \" + eol);\n }\n\n eol++;\n\n // If a CR is at the end of the buffer,\n // then check for a LF at the begining\n // of the next buffer, unless EOF char\n // was found already.\n\n if (eol >= dstEnd) {\n if (eol != eof) {\n if (debug) {\n System.out.println(\"TRANS_CRLF: filterBytes for \\\\n\");\n }\n\n dst = dstEnd;\n if (filterBytes(gs) != 0) {\n restore = true;\n break restore_or_goteol; //goto restore\n }\n dstEnd += gs.charsWrote.i;\n }\n if (eol >= dstEnd) {\n skip = 0;\n goteol = true;\n break restore_or_goteol; //goto goteol\n }\n }\n if (obj_sbuf.charAt(eol) == '\\n') {\n eol--;\n skip = 2;\n goteol = true;\n break restore_or_goteol; //goto goteol\n }\n }\n }\n break;\n }\n case TclIO.TRANS_AUTO: {\n eol = dst;\n skip = 1;\n if (sawCR) {\n sawCR = false;\n if ((eol < dstEnd) && (obj_sbuf.charAt(eol) == '\\n')) {\n // Skip the raw bytes that make up the '\\n'.\n\n if (debug) {\n System.out.println(\"TRANS_AUTO: found \\\\n at \" + eol);\n }\n\n IntPtr rawRead = new IntPtr();\n\n buf = gs.buf;\n rawRead.i = decodedNumBytes(gs.charToBytes, eol, eol + 1);\n buf.nextRemoved += rawRead.i;\n gs.rawRead.i -= rawRead.i;\n //gs.bytesWrote.i--;\n gs.charsWrote.i--;\n obj_sbuf.deleteCharAt(eol);\n dstEnd--;\n }\n }\n for (eol = dst; eol < dstEnd; eol++) {\n if (obj_sbuf.charAt(eol) == '\\r') {\n if (debug) {\n System.out.println(\"TRANS_AUTO: found \\\\r at \" + eol);\n }\n\n eol++;\n if (eol == dstEnd) {\n // If buffer ended on \\r, peek ahead to see if a\n // \\n is available, unless EOF char was found already.\n\n if (eol != eof) {\n if (debug) {\n System.out.println(\"TRANS_AUTO: peeking for \\\\n\");\n }\n\n dst = dstEnd;\n peekAhead(gs);\n dstEnd += gs.charsWrote.i;\n }\n if (eol >= dstEnd) {\n eol--;\n sawCR = true;\n goteol = true; \n break restore_or_goteol; //goto goteol\n }\n }\n if (obj_sbuf.charAt(eol) == '\\n') {\n skip++;\n }\n eol--;\n goteol = true; //goto goteol\n break restore_or_goteol;\n } else if (obj_sbuf.charAt(eol) == '\\n') {\n if (debug) {\n System.out.println(\"TRANS_AUTO: found \\\\n at \" + eol);\n }\n\n goteol = true;\n break restore_or_goteol; //goto goteol\n }\n }\n }\n }\n if (eof != -1) {\n // EOF character was seen. On EOF, leave current file position\n // pointing at the EOF character, but don't store the EOF\n // character in the output string.\n\n dstEnd = eof;\n eofCond = true;\n stickyEofCond = true;\n encodingEnd = true;\n }\n if (eofCond) {\n skip = 0;\n eol = dstEnd;\n if (eol == oldLength) {\n // If we didn't append any bytes before encountering EOF,\n // caller needs to see -1.\n\n obj_sbuf.setLength(oldLength);\n commonGetsCleanup();\n copiedTotal = -1;\n break restore_or_goteol; //goto done\n }\n goteol = true;\n break restore_or_goteol; //goto goteol\n }\n dst = dstEnd;\n }\n\t} // end restore_or_goteol: block\n\n if (goteol) {\n // Found EOL or EOF, we need to find out how many raw bytes\n // correspond to the decoded characters (including EOL)\n // so that the channel buffer index can be updated.\n //\n // At this point, dst is the index of the character in\n // obj_sbuf that corresponds to the first byte in buf.\n\n int linelen = eol - dst + skip;\n\n if (debug) {\n System.out.println(\"goteol: linelen is \" + linelen);\n System.out.println(\"eol is \" + eol);\n System.out.println(\"dst is \" + dst);\n System.out.println(\"skip is \" + skip);\n\n System.out.println(gs.buf);\n }\n\n buf = gs.buf;\n\n // Determine the number of bytes that the given char\n // range was decoded from. Also reset gs.charsWrote.i\n // since it is used to calculate copiedTotal below.\n\n int numBytes = decodedNumBytes(gs.charToBytes, dst, dst + linelen);\n buf.nextRemoved += numBytes;\n gs.charsWrote.i = (dst + linelen) - dst;\n\n if (debug) {\n System.out.println(\"advanced buf.nextRemoved by \" + numBytes);\n System.out.println(buf);\n System.out.println(\"gs.charsWrote.i set to \" + gs.charsWrote.i);\n }\n\n // Recycle all the emptied buffers.\n\n obj_sbuf.setLength(eol);\n\n if (debug) {\n System.out.println(\"obj_sbuf.setLength(\" + eol + \")\");\n System.out.println(\"srep \\\"\" + obj_sbuf.toString() + \"\\\"\");\n }\n\n commonGetsCleanup();\n blocked = false;\n copiedTotal = gs.totalChars + gs.charsWrote.i - skip;\n\n if (debug) {\n System.out.println(\"copiedTotal = \" + copiedTotal);\n }\n }\n if (restore) {\n // Couldn't get a complete line. This only happens if we get a error\n // reading from the channel or we are non-blocking and there wasn't\n // an EOL or EOF in the data available.\n\n buf = inQueueHead;\n buf.nextRemoved = oldRemoved;\n\n for (buf = buf.next; buf != null; buf = buf.next) {\n buf.nextRemoved = buf.BUFFER_PADDING;\n }\n commonGetsCleanup();\n\n encodingStart = oldEncodingStart;\n encodingEnd = oldEncodingEnd;\n obj_sbuf.setLength(oldLength);\n\n // We didn't get a complete line so we need to indicate to UpdateInterest\n // that the gets blocked. It will wait for more data instead of firing\n // a timer, avoiding a busy wait. This is where we are assuming that the\n // next operation is a gets. No more file events will be delivered on \n // this channel until new data arrives or some operation is performed\n // on the channel (e.g. gets, read, fconfigure) that changes the blocking\n // state. Note that this means a file event will not be delivered even\n // though a read would be able to consume the buffered data.\n\n needMoreData = true;\n copiedTotal = -1;\n }\n\n // Update the notifier state so we don't block while there is still\n // data in the buffers.\n\n //done:\n // Reset original encoding in case it was set to binary\n if (in_binary_encoding) {\n encoding = null;\n }\n\n updateInterest();\n\n // Make sure tobj makes use of the string rep defined\n // by obj_sbuf. It is possible that TclObject.toString()\n // got called at some point during this method.\n\n tobj.invalidateStringRep();\n String srep = tobj.toString();\n\n if (copiedTotal > 0) {\n int len = srep.length();\n if (len != copiedTotal) {\n throw new TclRuntimeError(\"copiedTotal \" + copiedTotal +\n \" != \" + len);\n }\n } else {\n if (! srep.equals(\"\")) {\n throw new TclRuntimeError(\"expected empty TclObject result\" +\n \" since copiedTotal is \" + copiedTotal);\n }\n }\n\n return copiedTotal;\n }",
"void mo3194r();",
"private synchronized void parsebm() throws MessagingException {\n/* 777 */ if (this.parsed) {\n/* */ return;\n/* */ }\n/* 780 */ InputStream in = null;\n/* 781 */ SharedInputStream sin = null;\n/* 782 */ long start = 0L, end = 0L;\n/* */ \n/* */ try {\n/* 785 */ in = this.ds.getInputStream();\n/* 786 */ if (!(in instanceof java.io.ByteArrayInputStream) && !(in instanceof BufferedInputStream) && !(in instanceof SharedInputStream))\n/* */ {\n/* */ \n/* 789 */ in = new BufferedInputStream(in); } \n/* 790 */ } catch (Exception ex) {\n/* 791 */ throw new MessagingException(\"No inputstream from datasource\", ex);\n/* */ } \n/* 793 */ if (in instanceof SharedInputStream) {\n/* 794 */ sin = (SharedInputStream)in;\n/* */ }\n/* 796 */ ContentType cType = new ContentType(this.contentType);\n/* 797 */ String boundary = null;\n/* 798 */ if (!this.ignoreExistingBoundaryParameter) {\n/* 799 */ String bp = cType.getParameter(\"boundary\");\n/* 800 */ if (bp != null)\n/* 801 */ boundary = \"--\" + bp; \n/* */ } \n/* 803 */ if (boundary == null && !this.ignoreMissingBoundaryParameter && !this.ignoreExistingBoundaryParameter)\n/* */ {\n/* 805 */ throw new MessagingException(\"Missing boundary parameter\");\n/* */ }\n/* */ \n/* */ try {\n/* 809 */ LineInputStream lin = new LineInputStream(in);\n/* 810 */ StringBuffer preamblesb = null;\n/* */ \n/* 812 */ String lineSeparator = null; String line;\n/* 813 */ while ((line = lin.readLine()) != null) {\n/* */ int k;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 821 */ for (k = line.length() - 1; k >= 0; k--) {\n/* 822 */ char c = line.charAt(k);\n/* 823 */ if (c != ' ' && c != '\\t')\n/* */ break; \n/* */ } \n/* 826 */ line = line.substring(0, k + 1);\n/* 827 */ if (boundary != null) {\n/* 828 */ if (line.equals(boundary))\n/* */ break; \n/* 830 */ if (line.length() == boundary.length() + 2 && line.startsWith(boundary) && line.endsWith(\"--\")) {\n/* */ \n/* 832 */ line = null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* 841 */ } else if (line.length() > 2 && line.startsWith(\"--\") && (\n/* 842 */ line.length() <= 4 || !allDashes(line))) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 850 */ boundary = line;\n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* */ \n/* 857 */ if (line.length() > 0) {\n/* */ \n/* */ \n/* 860 */ if (lineSeparator == null) {\n/* */ try {\n/* 862 */ lineSeparator = System.getProperty(\"line.separator\", \"\\n\");\n/* */ }\n/* 864 */ catch (SecurityException ex) {\n/* 865 */ lineSeparator = \"\\n\";\n/* */ } \n/* */ }\n/* */ \n/* 869 */ if (preamblesb == null)\n/* 870 */ preamblesb = new StringBuffer(line.length() + 2); \n/* 871 */ preamblesb.append(line).append(lineSeparator);\n/* */ } \n/* */ } \n/* */ \n/* 875 */ if (preamblesb != null) {\n/* 876 */ this.preamble = preamblesb.toString();\n/* */ }\n/* 878 */ if (line == null) {\n/* 879 */ if (this.allowEmpty) {\n/* */ return;\n/* */ }\n/* 882 */ throw new MessagingException(\"Missing start boundary\");\n/* */ } \n/* */ \n/* */ \n/* 886 */ byte[] bndbytes = ASCIIUtility.getBytes(boundary);\n/* 887 */ int bl = bndbytes.length;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 894 */ int[] bcs = new int[256];\n/* 895 */ for (int i = 0; i < bl; i++) {\n/* 896 */ bcs[bndbytes[i] & 0xFF] = i + 1;\n/* */ }\n/* */ \n/* 899 */ int[] gss = new int[bl];\n/* */ \n/* 901 */ for (int j = bl; j > 0; j--) {\n/* */ \n/* 903 */ int k = bl - 1; while (true) { if (k >= j) {\n/* */ \n/* 905 */ if (bndbytes[k] == bndbytes[k - j]) {\n/* */ \n/* 907 */ gss[k - 1] = j;\n/* */ \n/* */ k--;\n/* */ } \n/* */ \n/* */ break;\n/* */ } \n/* 914 */ while (k > 0)\n/* 915 */ gss[--k] = j; break; }\n/* */ \n/* 917 */ } gss[bl - 1] = 1;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 923 */ boolean done = false;\n/* */ \n/* 925 */ while (!done) {\n/* 926 */ int eolLen; MimeBodyPart part; InternetHeaders headers = null;\n/* 927 */ if (sin != null) {\n/* 928 */ start = sin.getPosition();\n/* */ \n/* 930 */ while ((line = lin.readLine()) != null && line.length() > 0);\n/* */ \n/* 932 */ if (line == null) {\n/* 933 */ if (!this.ignoreMissingEndBoundary) {\n/* 934 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* */ \n/* 937 */ this.complete = false;\n/* */ \n/* */ break;\n/* */ } \n/* */ } else {\n/* 942 */ headers = createInternetHeaders(in);\n/* */ } \n/* */ \n/* 945 */ if (!in.markSupported()) {\n/* 946 */ throw new MessagingException(\"Stream doesn't support mark\");\n/* */ }\n/* 948 */ ByteArrayOutputStream buf = null;\n/* */ \n/* 950 */ if (sin == null) {\n/* 951 */ buf = new ByteArrayOutputStream();\n/* */ } else {\n/* 953 */ end = sin.getPosition();\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 965 */ byte[] inbuf = new byte[bl];\n/* 966 */ byte[] previnbuf = new byte[bl];\n/* 967 */ int inSize = 0;\n/* 968 */ int prevSize = 0;\n/* */ \n/* 970 */ boolean first = true;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ while (true) {\n/* 976 */ in.mark(bl + 4 + 1000);\n/* 977 */ eolLen = 0;\n/* 978 */ inSize = readFully(in, inbuf, 0, bl);\n/* 979 */ if (inSize < bl) {\n/* */ \n/* 981 */ if (!this.ignoreMissingEndBoundary) {\n/* 982 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* 984 */ if (sin != null)\n/* 985 */ end = sin.getPosition(); \n/* 986 */ this.complete = false;\n/* 987 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ int k;\n/* 992 */ for (k = bl - 1; k >= 0 && \n/* 993 */ inbuf[k] == bndbytes[k]; k--);\n/* */ \n/* */ \n/* 996 */ if (k < 0) {\n/* 997 */ eolLen = 0;\n/* 998 */ if (!first) {\n/* */ \n/* */ \n/* 1001 */ int b = previnbuf[prevSize - 1];\n/* 1002 */ if (b == 13 || b == 10) {\n/* 1003 */ eolLen = 1;\n/* 1004 */ if (b == 10 && prevSize >= 2) {\n/* 1005 */ b = previnbuf[prevSize - 2];\n/* 1006 */ if (b == 13)\n/* 1007 */ eolLen = 2; \n/* */ } \n/* */ } \n/* */ } \n/* 1011 */ if (first || eolLen > 0) {\n/* 1012 */ if (sin != null)\n/* */ {\n/* */ \n/* 1015 */ end = sin.getPosition() - bl - eolLen;\n/* */ }\n/* */ \n/* 1018 */ int b2 = in.read();\n/* 1019 */ if (b2 == 45 && \n/* 1020 */ in.read() == 45) {\n/* 1021 */ this.complete = true;\n/* 1022 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 1027 */ while (b2 == 32 || b2 == 9) {\n/* 1028 */ b2 = in.read();\n/* */ }\n/* 1030 */ if (b2 == 10)\n/* */ break; \n/* 1032 */ if (b2 == 13) {\n/* 1033 */ in.mark(1);\n/* 1034 */ if (in.read() != 10)\n/* 1035 */ in.reset(); \n/* */ break;\n/* */ } \n/* */ } \n/* 1039 */ k = 0;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1049 */ int skip = Math.max(k + 1 - bcs[inbuf[k] & Byte.MAX_VALUE], gss[k]);\n/* */ \n/* 1051 */ if (skip < 2) {\n/* */ \n/* */ \n/* */ \n/* 1055 */ if (sin == null && prevSize > 1)\n/* 1056 */ buf.write(previnbuf, 0, prevSize - 1); \n/* 1057 */ in.reset();\n/* 1058 */ skipFully(in, 1L);\n/* 1059 */ if (prevSize >= 1) {\n/* */ \n/* 1061 */ previnbuf[0] = previnbuf[prevSize - 1];\n/* 1062 */ previnbuf[1] = inbuf[0];\n/* 1063 */ prevSize = 2;\n/* */ } else {\n/* */ \n/* 1066 */ previnbuf[0] = inbuf[0];\n/* 1067 */ prevSize = 1;\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 1072 */ if (prevSize > 0 && sin == null) {\n/* 1073 */ buf.write(previnbuf, 0, prevSize);\n/* */ }\n/* 1075 */ prevSize = skip;\n/* 1076 */ in.reset();\n/* 1077 */ skipFully(in, prevSize);\n/* */ \n/* 1079 */ byte[] tmp = inbuf;\n/* 1080 */ inbuf = previnbuf;\n/* 1081 */ previnbuf = tmp;\n/* */ } \n/* 1083 */ first = false;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1090 */ if (sin != null) {\n/* 1091 */ part = createMimeBodyPartIs(sin.newStream(start, end));\n/* */ } else {\n/* */ \n/* 1094 */ if (prevSize - eolLen > 0) {\n/* 1095 */ buf.write(previnbuf, 0, prevSize - eolLen);\n/* */ }\n/* */ \n/* 1098 */ if (!this.complete && inSize > 0)\n/* 1099 */ buf.write(inbuf, 0, inSize); \n/* 1100 */ part = createMimeBodyPart(headers, buf.toByteArray());\n/* */ } \n/* 1102 */ super.addBodyPart(part);\n/* */ } \n/* 1104 */ } catch (IOException ioex) {\n/* 1105 */ throw new MessagingException(\"IO Error\", ioex);\n/* */ } finally {\n/* */ try {\n/* 1108 */ in.close();\n/* 1109 */ } catch (IOException cex) {}\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1114 */ this.parsed = true;\n/* */ }",
"private Proof faxm2Convert(Proof p, Proof q) {\n Expression a = ((Implication) p.lastExpr()).statement;\n Expression b = ((Implication) p.lastExpr()).consequence;\n Expression c = ((Implication) ((Implication) q.lastExpr()).consequence).consequence;\n return mpTwice(axm2(a, b, c), p, q);\n }",
"public static void Pubmed() throws IOException \n\t{\n\t\t\n\t\tMap<String,Map<String,List<String>>> trainset = null ; \n\t\t//Map<String, List<String>> titles = ReadXMLFile.ReadCDR_TestSet_BioC() ;\n\t File fFile = new File(\"F:\\\\TempDB\\\\PMCxxxx\\\\articals.txt\");\n\t List<String> sents = readfiles.readLinesbylines(fFile.toURL()); \n\t\t\n\t\tSentinfo sentInfo = new Sentinfo() ; \n\t\t\n\t\ttrainset = ReadXMLFile.DeserializeT(\"F:\\\\eclipse64\\\\eclipse\\\\TrainsetTest\") ;\n\t\tLinkedHashMap<String, Integer> TripleDict = new LinkedHashMap<String, Integer>();\n\t\tMap<String,List<Integer>> Labeling= new HashMap<String,List<Integer>>() ;\n\t\t\n\t\tMetaMapApi api = new MetaMapApiImpl();\n\t\tList<String> theOptions = new ArrayList<String>();\n\t theOptions.add(\"-y\"); // turn on Word Sense Disambiguation\n\t theOptions.add(\"-u\"); // unique abrevation \n\t theOptions.add(\"--negex\"); \n\t theOptions.add(\"-v\");\n\t theOptions.add(\"-c\"); // use relaxed model that containing internal syntactic structure, such as conjunction.\n\t if (theOptions.size() > 0) {\n\t api.setOptions(theOptions);\n\t }\n\t \n\t\t\n\t\tif (trainset == null )\n\t\t{\n\t\t\ttrainset = new HashMap<String, Map<String,List<String>>>();\n\t\t}\n\t\t\n\t\t\n\t\t/************************************************************************************************/\n\t\t//Map<String, Integer> bagofwords = semantic.getbagofwords(titles) ; \n\t\t//trainxmllabeling(trainset,bagofwords); \n\t\t/************************************************************************************************/\n\t\t\n\t\t\n\t\tint count = 0 ;\n\t\tint count1 = 0 ;\n\t\tModel candidategraph = ModelFactory.createDefaultModel(); \n\t\tMap<String,List<String>> TripleCandidates = new HashMap<String, List<String>>();\n\t\tfor(String title : sents)\n\t\t{\n\t\t\t\n\t\t\tModel Sentgraph = sentInfo.graph;\n\t\t\tif (trainset.containsKey(title))\n\t\t\t\tcontinue ; \n\t\t\t//8538\n\t\t\tcount++ ; \n\n\t\t\tMap<String, List<String>> triples = null ;\n\t\t\t// get the goldstandard concepts for current title \n\t\t\tList<String> GoldSndconcepts = new ArrayList<String> () ;\n\t\t\tMap<String, Integer> allconcepts = null ; \n\t\t\t\n\t\t\t// this is optional and not needed here , it used to measure the concepts recall \n\t\t\tMap<String, List<String>> temptitles = new HashMap<String, List<String>>(); \n\t\t\ttemptitles.put(title,GoldSndconcepts) ;\n\t\t\t\t\t\t\n\t\t\t// get the concepts \n\t\t\tallconcepts = ConceptsDiscovery.getconcepts(temptitles,api);\n\t\t\t\n\t\t\tArrayList<String> RelInstances1 = SyntaticPattern.getSyntaticPattern(title,allconcepts,FILE_NAME_Patterns) ;\n\t\t\t//Methylated-CpG island recovery assay: a new technique for the rapid detection of methylated-CpG islands in cancer\n\t\t\tif (RelInstances1 != null && RelInstances1.size() > 0 )\n\t\t\t{\n\t\t\t\tcount1++ ;\n\t\t\t\tTripleCandidates.put(title, RelInstances1) ;\n\t\t\t\t\n\t\t\t\tif (count1 == 30)\n\t\t\t\t{\n\t\t\t\t\tReadXMLFile.Serialized(TripleCandidates,\"F:\\\\eclipse64\\\\eclipse\\\\Relationdisc1\") ;\n\t\t\t\t\tcount1 = 0 ;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t\t\n\t\tint i = 0 ;\n\t\ti++ ; \n\t}",
"public final long mo28817a(zzjq zzjq) throws IOException {\n zzjq zzjq2;\n Long l;\n zzjq zzjq3 = zzjq;\n String str = \"ms\";\n String str2 = \"Cache connection took \";\n if (!this.f25218b) {\n this.f25218b = true;\n zzvv a = zzvv.m31316a(zzjq3.f28690a);\n if (!((Boolean) zzyt.m31536e().mo29599a(zzacu.f24194wd)).booleanValue()) {\n zzvs zzvs = null;\n if (a != null) {\n a.f29558h = zzjq3.f28692c;\n zzvs = zzk.zzlm().mo32314a(a);\n }\n if (zzvs != null && zzvs.mo32317a()) {\n this.f25217a = zzvs.mo32318c();\n return -1;\n }\n } else if (a != null) {\n a.f29558h = zzjq3.f28692c;\n if (a.f29557g) {\n l = (Long) zzyt.m31536e().mo29599a(zzacu.f24206yd);\n } else {\n l = (Long) zzyt.m31536e().mo29599a(zzacu.f24200xd);\n }\n long longValue = l.longValue();\n long a2 = zzk.zzln().mo27934a();\n zzk.zzma();\n Future a3 = zzwi.m31330a(this.f25219c, a);\n try {\n this.f25217a = (InputStream) a3.get(longValue, TimeUnit.MILLISECONDS);\n long a4 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei = (zzbei) this.f25221e.get();\n if (zzbei != null) {\n zzbei.mo28180a(true, a4);\n }\n StringBuilder sb = new StringBuilder(44);\n sb.append(str2);\n sb.append(a4);\n sb.append(str);\n zzawz.m26003f(sb.toString());\n return -1;\n } catch (ExecutionException | TimeoutException e) {\n a3.cancel(true);\n long a5 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei2 = (zzbei) this.f25221e.get();\n if (zzbei2 != null) {\n zzbei2.mo28180a(false, a5);\n }\n StringBuilder sb2 = new StringBuilder(44);\n sb2.append(str2);\n sb2.append(a5);\n sb2.append(str);\n zzawz.m26003f(sb2.toString());\n } catch (InterruptedException e2) {\n a3.cancel(true);\n Thread.currentThread().interrupt();\n long a6 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei3 = (zzbei) this.f25221e.get();\n if (zzbei3 != null) {\n zzbei3.mo28180a(false, a6);\n }\n StringBuilder sb3 = new StringBuilder(44);\n sb3.append(str2);\n sb3.append(a6);\n sb3.append(str);\n zzawz.m26003f(sb3.toString());\n } catch (Throwable th) {\n long a7 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei4 = (zzbei) this.f25221e.get();\n if (zzbei4 != null) {\n zzbei4.mo28180a(false, a7);\n }\n StringBuilder sb4 = new StringBuilder(44);\n sb4.append(str2);\n sb4.append(a7);\n sb4.append(str);\n zzawz.m26003f(sb4.toString());\n throw th;\n }\n }\n if (a != null) {\n zzjq2 = new zzjq(Uri.parse(a.f29551a), zzjq3.f28691b, zzjq3.f28692c, zzjq3.f28693d, zzjq3.f28694e, zzjq3.f28695f);\n } else {\n zzjq2 = zzjq3;\n }\n return this.f25220d.mo28817a(zzjq2);\n }\n throw new IOException(\"Attempt to open an already open CacheDataSource.\");\n }",
"void mo80456b(Message message);",
"public static void transform() {\n String st = BinaryStdIn.readString();\n CircularSuffixArray csa = new CircularSuffixArray(st);\n int length = csa.length();\n int[] index = new int[length];\n for (int i = 0; i < length; i++) {\n index[i] = csa.index(i);\n if (index[i] == 0) {\n BinaryStdOut.write(i);\n }\n }\n\n for (int i = 0; i < length; i++) {\n if (index[i] != 0) BinaryStdOut.write(st.charAt(index[i] - 1));\n else BinaryStdOut.write(st.charAt(length - 1));\n }\n BinaryStdOut.close();\n }",
"public static void transform() {\n String s = BinaryStdIn.readString();\n\n CircularSuffixArray csa = new CircularSuffixArray(s);\n\n for (int i = 0; i < csa.length(); i++) {\n \n if (csa.index(i) == 0) {\n BinaryStdOut.write(i);\n }\n }\n\n for (int i = 0; i < csa.length(); i++) {\n if (csa.index(i) == 0) {\n BinaryStdOut.write(s.charAt(csa.length() + csa.index(i) - 1));\n }\n else {\n BinaryStdOut.write(s.charAt(csa.index(i) - 1));\n }\n }\n BinaryStdOut.flush();\n }",
"protected long m8222b(long j) {\n return (((long) this.f7048i) * j) / 1000000;\n }",
"@Override\n\tpublic void Decompress() {\n\t\t\n\t}",
"private void m10265b(long j) throws cf {\r\n int i = 0;\r\n while ((-128 & j) != 0) {\r\n int i2 = i + 1;\r\n this.f6476b[i] = (byte) ((int) ((127 & j) | 128));\r\n j >>>= 7;\r\n i = i2;\r\n }\r\n int i3 = i + 1;\r\n this.f6476b[i] = (byte) ((int) j);\r\n this.g.mo1990b(this.f6476b, 0, i3);\r\n }",
"@Test\n public void mergeWithTimeCodeBackwards() throws IOException, MkvElementVisitException {\n final byte [] inputBytes = TestResourceUtil.getTestInputByteArray(\"output_get_media.mkv\");\n final InputStream in = getInputStreamForDoubleBytes(inputBytes);\n\n //Stream to receive the merged output.\n final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n //Do the actual merge.\n final OutputSegmentMerger merger =\n OutputSegmentMerger.createDefault(outputStream);\n\n final StreamingMkvReader mkvStreamReader =\n StreamingMkvReader.createDefault(new InputStreamParserByteSource(in));\n while(mkvStreamReader.mightHaveNext()) {\n final Optional<MkvElement> mkvElement = mkvStreamReader.nextIfAvailable();\n if (mkvElement.isPresent()) {\n mkvElement.get().accept(merger);\n }\n }\n\n final byte[] outputBytes = outputStream.toByteArray();\n Assert.assertFalse(Arrays.equals(inputBytes, outputBytes));\n\n //Count different types of elements present in the merged stream.\n final CountVisitor countVisitor = getCountVisitorResult(outputBytes);\n\n //Validate that there are two EBML headers and segment and tracks\n //but there are 64 clusters and tracks as expected.\n Assert.assertEquals(2, countVisitor.getCount(MkvTypeInfos.EBML));\n Assert.assertEquals(2, countVisitor.getCount(MkvTypeInfos.EBMLVERSION));\n Assert.assertEquals(2, countVisitor.getCount(MkvTypeInfos.SEGMENT));\n Assert.assertEquals(10, countVisitor.getCount(MkvTypeInfos.CLUSTER));\n Assert.assertEquals(10, countVisitor.getCount(MkvTypeInfos.TIMECODE));\n Assert.assertEquals(2, countVisitor.getCount(MkvTypeInfos.TRACKS));\n Assert.assertEquals(2, countVisitor.getCount(MkvTypeInfos.TRACKNUMBER));\n Assert.assertEquals(600, countVisitor.getCount(MkvTypeInfos.SIMPLEBLOCK));\n Assert.assertEquals(120, countVisitor.getCount(MkvTypeInfos.TAGNAME));\n }",
"public static void transform() {\n String input = BinaryStdIn.readString();\n CircularSuffixArray csa = new CircularSuffixArray(input);\n int first = 0;\n for (int i = 0; i < csa.length(); i++) {\n if (csa.index(i) == 0) {\n first = i;\n break;\n }\n }\n BinaryStdOut.write(first);\n\n for (int i = 0; i < csa.length(); i++) {\n if (csa.index(i) == 0) {\n BinaryStdOut.write(input.charAt(csa.length() - 1));\n }\n else BinaryStdOut.write(input.charAt(csa.index(i) - 1));\n }\n BinaryStdOut.close();\n }",
"private void m298c() {\n C0031aa b;\n int a;\n try {\n this.f260d.mo123a();\n try {\n String encodeToString = Base64.encodeToString(new C0175cn().mo544a(this.f260d.mo126b()), 0);\n if (!TextUtils.isEmpty(encodeToString)) {\n JSONObject jSONObject = this.f265j.getJSONObject(C0015a.f10A);\n jSONObject.put(C0281x.f889O, encodeToString);\n this.f265j.put(C0015a.f10A, jSONObject);\n }\n } catch (Exception e) {\n }\n byte[] bytes = String.valueOf(this.f265j).getBytes();\n if (bytes != null && !C0133br.m754a(f259g, bytes)) {\n if (!this.f266k) {\n b = C0031aa.m111a(f259g, AnalyticsConfig.getAppkey(f259g), bytes);\n } else {\n b = C0031aa.m114b(f259g, AnalyticsConfig.getAppkey(f259g), bytes);\n }\n byte[] c = b.mo120c();\n C0155ca.m887a(f259g).mo510g();\n byte[] a2 = this.f264i.mo201a(c);\n if (a2 == null) {\n a = 1;\n } else {\n a = m293a(a2);\n }\n switch (a) {\n case 1:\n if (!this.f267l) {\n C0155ca.m887a(f259g).mo501a(c);\n return;\n }\n return;\n case 2:\n this.f260d.mo128d();\n this.f263h.mo225k();\n return;\n case 3:\n this.f263h.mo225k();\n return;\n default:\n return;\n }\n }\n } catch (Throwable th) {\n }\n }",
"public void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\tSystem.out.println(\"&&&&&&&&&&&&&&&\");\n\t\tSystem.out.println(message.getClass());\n\t\t/*\n\t\t obj.put(\"start\",startDate);\n obj.put(\"end\",endDate);\n obj.put(\"topicName\",topicName_New);\n obj.put(\"bf\",bf);\n\t\t */\n\t\tSystem.out.println(\"topic on which data has been received is :\"+topic);\n\t\tSystem.out.println(\"the data packet from the broker has been received in JSON\");\n\t\t\n\t\t\n\t\tByteArrayInputStream baos = new ByteArrayInputStream(message.getPayload());\n\t\tSystem.out.println(\"after message payload\");\n\t\tObjectInputStream outputStream = new ObjectInputStream(baos);\n\t\t\n\t\tJSONObject datapacket=null;\n\t\ttry{\n\t\t\t datapacket=(JSONObject)outputStream.readObject();\n\t\t}catch(Exception ex){\n\t\t\tSystem.out.println(\"koi to gadbad hai\");\n\t\t\tex.printStackTrace();\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"parsing the data from the json packets.....started\");\n\t\tBloomFilter bfilter=new BloomFilter(0.01,1000);\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tbyte[] buffer=(byte[]) datapacket.get(\"bf\");\n\t\t\tByteBuffer bb=ByteBuffer.wrap(buffer);\n\t\t\t\n\t\t\tbfilter.deSerialize(bb);\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tSystem.out.println(\"error in getting the bloom filter\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"bloom filter obtained\");\n\t\tString TOPIC_TOSUBSCRIBE=(String) datapacket.get(\"topicName\");\n\t\t\n\t\tString SD=(String) datapacket.get(\"start\");\n\t\tString ED=(String) datapacket.get(\"end\");\n\t\t\n\t\tSystem.out.println(\"printing the bloom filter object parametersss....\");\n\t\tSystem.out.println(bfilter.getBitVectorSize());\n\t\tSystem.out.println(bfilter.getNumberOfEntries());\n\t\t\n\t\t\n\t\tSystem.out.println(\"deserialization object checking=== \"+bfilter.contains(\"random string10000\"));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tFile file = new File(\"/Users/gaurav/Desktop/BrokerMessages.txt\");\n\t\tif (!file.exists()) {\n\t\t\tfile.createNewFile();\n\t\t}\n\tSystem.out.println(\"control in callback subscriber\");\n//\t\t\n//\t\tSystem.out.println(\"file absolute path :\" + file.getAbsoluteFile());\n\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile(), true);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tString h = message.toString();\n\t\tbw.write(h);\n\t\tbw.write(\"\\n\");\n\t\tbw.close();\n\n\t\tSystem.out.println(\"Done\");\n\n\t\tif (\"testing/LWT\".equals(topic)) {\n\t\t\tSystem.err.println(\"Sensor gone!\");\n\t\t}\n\t}",
"public final void mo4383c(long j) {\n try {\n byte[] bArr = this.f20653b;\n int i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) j);\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 8));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 16));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 24));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 32));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 40));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 48));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 56));\n } catch (long j2) {\n throw new zzc(String.format(\"Pos: %d, limit: %d, len: %d\", new Object[]{Integer.valueOf(this.f20656e), Integer.valueOf(this.f20655d), Integer.valueOf(1)}), j2);\n }\n }",
"public final String[] mo24226W(C7620bi c7620bi) {\n int i = 1;\n AppMethodBeat.m2504i(113302);\n String[] strArr = new String[2];\n String str = c7620bi.field_content;\n if (C5046bo.isNullOrNil(str)) {\n strArr[0] = \"\";\n strArr[1] = \"\";\n AppMethodBeat.m2505o(113302);\n return strArr;\n }\n int i2;\n String str2;\n if (c7620bi.field_isSend == 0) {\n i2 = 1;\n } else {\n i2 = 0;\n }\n if (C1855t.m3896kH(c7620bi.field_talker) && i2 != 0) {\n i2 = C1829bf.m3761ox(str);\n if (i2 != -1) {\n str = str.substring(i2 + 1).trim();\n }\n }\n C5136b Ro = ((C6982j) C1720g.m3528K(C6982j.class)).bOr().mo15261Ro(str);\n if (Ro.dua()) {\n str = Ro.label;\n str2 = Ro.eUu;\n strArr[0] = str;\n strArr[1] = str2;\n } else {\n strArr[0] = Ro.label;\n strArr[1] = \"\";\n }\n if (C5046bo.isNullOrNil(strArr[0]) && C5046bo.isNullOrNil(strArr[1])) {\n C4990ab.m7416i(\"MicroMsg.LocationServer\", \"pull from sever\");\n long j = c7620bi.field_msgId;\n if (!(this.nJC == null || this.nJC.contains(Long.valueOf(j)))) {\n str2 = c7620bi.field_content;\n if (c7620bi.field_isSend != 0) {\n i = 0;\n }\n if (C1855t.m3896kH(c7620bi.field_talker) && i != 0) {\n i = C1829bf.m3761ox(str2);\n if (i != -1) {\n str2 = str2.substring(i + 1).trim();\n }\n }\n Ro = C5136b.apD(str2);\n this.nJC.add(Long.valueOf(j));\n C18657c.agw().mo33924a(Ro.nJu, Ro.nJv, this.nJD, Long.valueOf(c7620bi.field_msgId));\n }\n }\n AppMethodBeat.m2505o(113302);\n return strArr;\n }",
"O transform(R result);",
"@Override\n public void process(JCas aJCas) throws AnalysisEngineProcessException {\n // TODO Auto-generated method stub\n String text = aJCas.getSofaDataString();\n // get top 1 chunking \n ScoredObject<Chunking> chunkres = chunker.nBest(text.toCharArray(), 0, text.length(), 1).next();\n double conf = chunkres.score();\n for(Chunk chunk : chunkres.getObject().chunkSet())\n {\n // adapt indices to non whitespace\n int begin = text.substring(0, chunk.start()).replaceAll(\"\\\\s\", \"\").length(); \n int end = -1+text.substring(0, chunk.end()).replaceAll(\"\\\\s\", \"\").length(); \n // add mention to CAS\n GeneEntitybyLingpipe mention = new GeneEntitybyLingpipe(aJCas, begin, end);\n mention.setEntityText(text.substring(chunk.start(), chunk.end()));\n mention.setCasProcessorId(this.getClass().getName());\n mention.setConfidence(conf);\n mention.addToIndexes();\n }\n }",
"byte[] mo38566a();",
"static void mvi_to_mem(String passed){\n\t\tint memory_address = memory_address_hl();\n\t\tmemory.put(memory_address, passed.substring(6));\n\t}",
"String convert(String msg) {\n for (int i = 0; i < msg.length(); i++) {\n if (msg.charAt(i) < 65 || msg.charAt(i) > 90) {\n throw new EnigmaException(\"Illegal input\");\n }\n }\n int index = 0;\n String result = \"\";\n while (index < msg.length()) {\n int num = msg.charAt(index) - 65;\n if (manyRotors[4].atNotch() && !manyRotors[3].atNotch()) {\n manyRotors[4].advance();\n manyRotors[3].advance();\n } else if (manyRotors[3].atNotch()) {\n manyRotors[4].advance();\n manyRotors[3].advance();\n manyRotors[2].advance();\n } else manyRotors[4].advance();\n for (int i = manyRotors.length - 1; i > 0; i--) {\n num = manyRotors[i].convertForward(num);\n }\n for (int i = 0; i < manyRotors.length; i++) {\n num = manyRotors[i].convertBackward(num);\n }\n result += String.valueOf((char) (num + 65));\n index++;\n }\n return result;\n //return null;\n // FIXME\n }",
"private static Pair<Long, C3608a> m13705a(C2302k c2302k, long j) throws ParserException {\n long m;\n long m2;\n C2302k c2302k2 = c2302k;\n c2302k2.m8388c(8);\n int a = C2087a.m7470a(c2302k.m8403o());\n c2302k2.m8390d(4);\n long m3 = c2302k.m8401m();\n if (a == 0) {\n m = c2302k.m8401m();\n m2 = j + c2302k.m8401m();\n } else {\n m = c2302k.m8411w();\n m2 = j + c2302k.m8411w();\n }\n long j2 = m;\n long j3 = m2;\n m2 = C2314v.m8492d(j2, 1000000, m3);\n c2302k2.m8390d(2);\n a = c2302k.m8396h();\n int[] iArr = new int[a];\n long[] jArr = new long[a];\n long[] jArr2 = new long[a];\n long[] jArr3 = new long[a];\n long j4 = j2;\n long j5 = m2;\n int i = 0;\n while (i < a) {\n int o = c2302k.m8403o();\n if ((Integer.MIN_VALUE & o) != 0) {\n throw new ParserException(\"Unhandled indirect reference\");\n }\n long m4 = c2302k.m8401m();\n iArr[i] = o & ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED;\n jArr[i] = j3;\n jArr3[i] = j5;\n j5 = j4 + m4;\n long[] jArr4 = jArr3;\n long[] jArr5 = jArr;\n long[] jArr6 = jArr2;\n long j6 = m2;\n m = C2314v.m8492d(j5, 1000000, m3);\n jArr6[i] = m - jArr4[i];\n c2302k2.m8390d(4);\n j4 = j3 + ((long) iArr[i]);\n i++;\n jArr2 = jArr6;\n j3 = j4;\n jArr = jArr5;\n m2 = j6;\n j4 = j5;\n j5 = m;\n jArr3 = jArr4;\n }\n return Pair.create(Long.valueOf(m2), new C3608a(iArr, jArr, jArr2, jArr3));\n }",
"private String fetch_and_decode(int i) {\n String mem = this.mem.getDataAt(i);\n if(mem == null) {//temp fix\n return \"0F00\";\n }\n return mem;\n }",
"private static String m33072s(long j, String str) {\n AppMethodBeat.m2504i(135625);\n C4990ab.m7417i(\"MicroMsg.AppMsgLogic\", \"summerbig initDownloadAttach msgLocalId[%d], msgXml[%s], downloadPath[%s]\", Long.valueOf(j), str, null);\n C8910b me = C8910b.m16064me(str);\n if (me == null) {\n AppMethodBeat.m2505o(135625);\n return null;\n }\n String X = C21595a.m33066X(C6457e.euQ, me.title, me.fgp);\n if (C5046bo.isNullOrNil(me.csD) && !C5046bo.isNullOrNil(me.fgD)) {\n me.csD = me.fgD.hashCode();\n }\n String a = C21595a.m33067a(X, j, me.sdkVer, me.appId, me.csD, me.fgo, me.type, me.fgs);\n AppMethodBeat.m2505o(135625);\n return a;\n }",
"@Test(timeout = 4000)\n public void test14() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray0 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Cytosine, nucleotide1);\n \n defaultNucleotideCodec1.getNumberOfGapsUntil(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.getUngappedLength(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getUngappedOffsetFor(byteArray0, (-1209));\n assertEquals((-1209), int0);\n \n int int1 = defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (-1209));\n assertEquals(2, int1);\n \n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec7 = DefaultNucleotideCodec.INSTANCE;\n int int2 = defaultNucleotideCodec7.getGappedOffsetFor(byteArray0, 0);\n int int3 = defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray0, 5);\n assertTrue(int3 == int2);\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)2, (byte) (-34)}, byteArray0);\n assertEquals(0, int3);\n }",
"private void process(Msg msg) {\n\tUTILS.Constants.MESSAGE_TYPE mt = msg.get_msg_type();\n\tif (mt == Constants.MESSAGE_TYPE.READ_MEM) {\n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Processing READ_MEM\");\t \n\t }\n\t Address ret_add = msg.get_return_address();\n\t ChunkName n = msg.get_chunk_name();\n\t String data = this.read_from_mem(n);\n\t \n\t Msg reply = new Msg();\n\t reply.set_msg_type(Constants.MESSAGE_TYPE.READ_MEM_REPLY);\n\t reply.set_return_address(my_address);\n\t reply.set_data(data);\n\t try {\n\t\tthis.write_to_NN(reply);\n\t } catch (IOException e) {\n\t\te.printStackTrace();\n\t }\n\t catch (ClassNotFoundException e) {\n\t\te.printStackTrace();\n\t }\n\t} else if (mt == Constants.MESSAGE_TYPE.WRITE_MEM) {\n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Processing WRITE_MEM\");\t \n\t }\n\t Address ret_add = msg.get_return_address();\n\t ChunkName n = msg.get_chunk_name();\n\t String data = msg.get_data();\n\t this.write_to_mem(n, data);\n\n\t Msg reply = new Msg();\n\t reply.set_msg_type(Constants.MESSAGE_TYPE.WRITE_MEM_REPLY);\n\t reply.set_return_address(my_address);\n\t try {\n\t\tthis.write_to_NN(reply);\n\t } catch (IOException e) {\n\t\te.printStackTrace();\n\t }\n\t catch (ClassNotFoundException e) {\n\t\te.printStackTrace();\n\t }\n\t}\n }",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.valueOf(\"INSTANCE\");\n byte[] byteArray0 = new byte[7];\n byteArray0[0] = (byte) (-50);\n byteArray0[1] = (byte) (-38);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec2.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.NotGuanine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Gap, nucleotide1);\n \n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray0, 1717986918);\n long long0 = defaultNucleotideCodec1.getUngappedLength(byteArray0);\n assertEquals((-824573952L), long0);\n \n defaultNucleotideCodec1.getUngappedOffsetFor(byteArray1, (-651));\n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (byte) (-38));\n defaultNucleotideCodec0.getGappedOffsetFor(byteArray0, (byte) (-50));\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.decodedLengthOf(byteArray1);\n defaultNucleotideCodec3.decodedLengthOf(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getGappedOffsetFor(byteArray1, (byte) (-38));\n assertEquals(3, int0);\n \n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n int int1 = defaultNucleotideCodec5.getNumberOfGapsUntil(byteArray1, (byte) (-38));\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)3, (byte)29, (byte) (-32)}, byteArray1);\n assertEquals(0, int1);\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 }",
"protected long m8217a(long j) {\n return (j * 1000000) / ((long) this.f7048i);\n }",
"public void mo2476b() {\n Collections.reverse(mo2625k());\n }",
"long getEmbeddingTokenHigh();",
"long getEmbeddingTokenHigh();",
"public Object getContent() {\n/* 112 */ return this.buf;\n/* */ }",
"public void findPlugs(String messageToDecode) throws Exception {\n\n myEnigma.clearPlugboard();\n char fPlugEnd1 ='D';\n char sPlugEnd1 = 'S';\n\n for(int i=0;i<26;i++)\n {\n char fPlugEnd2 = (char)(i+ 65);\n for(int j=0;j<26;j++)\n {\n char sPlugEnd2 = (char) (j + 65);\n if(myEnigma.addPlug(fPlugEnd1,fPlugEnd2))\n {\n if(myEnigma.addPlug(sPlugEnd1,sPlugEnd2))\n {\n BasicRotor firstRotor = new BasicRotor(\"typeIV\");\n firstRotor.setPosition(8);\n myEnigma.addRotor(firstRotor,0);\n\n BasicRotor secondRotor = new BasicRotor(\"typeIII\");\n secondRotor.setPosition(4);\n myEnigma.addRotor(secondRotor,1);\n\n BasicRotor thirdRotor = new BasicRotor(\"typeII\");\n thirdRotor.setPosition(21);\n myEnigma.addRotor(thirdRotor,2);\n\n Reflector myReflector = new Reflector(\"ReflectorI\");\n myEnigma.addReflector(myReflector);\n\n String outputEnigma = myEnigma.start(messageToDecode);\n\n if(outputEnigma.contains(\"GIVEMEYOURANSWERDO\"))\n {\n System.out.println(fPlugEnd1 + \" - \" + fPlugEnd2);\n System.out.println(sPlugEnd1 + \" - \" + sPlugEnd2);\n System.out.println(\"Message: \" + outputEnigma);\n }\n\n myEnigma.clearPlugboard();\n }\n\n }\n\n myEnigma.clearPlugboard();\n\n\n }\n }\n\n }",
"public final void mo75263ad() {\n String str;\n super.mo75263ad();\n if (C25352e.m83313X(this.f77546j)) {\n if (C6399b.m19944t()) {\n if (!C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j)) && C25371n.m83443a(mo75261ab())) {\n C25371n.m83471b(mo75261ab(), C25352e.m83305P(this.f77546j));\n }\n } else if (!DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n C19535g a = DownloaderManagerHolder.m75524a();\n String x = C25352e.m83241x(this.f77546j);\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n Long adId = awemeRawAd.getAdId();\n C7573i.m23582a((Object) adId, \"mAweme.awemeRawAd!!.adId\");\n long longValue = adId.longValue();\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n C19386b a2 = C22943b.m75512a(\"result_ad\", aweme2.getAwemeRawAd(), false);\n Aweme aweme3 = this.f77546j;\n C7573i.m23582a((Object) aweme3, \"mAweme\");\n AwemeRawAd awemeRawAd2 = aweme3.getAwemeRawAd();\n if (awemeRawAd2 == null) {\n C7573i.m23580a();\n }\n a.mo51670a(x, longValue, 2, a2, C22942a.m75508a(awemeRawAd2));\n }\n }\n m110463ax();\n if (!C25352e.m83313X(this.f77546j) || C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j)) || DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"click\");\n if (C25352e.m83313X(this.f77546j)) {\n str = \"download_button\";\n } else {\n str = \"more_button\";\n }\n b.mo65283e(str).mo65270a(mo75261ab());\n }\n }",
"public Mass getTransFatContent() throws ClassCastException;",
"public final void mo75312aj() {\n super.mo75312aj();\n if (this.f77593aS != null && this.f77546j != null && C25352e.m83221d(this.f77546j)) {\n C24961b e = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play_break\").mo65283e(\"video\");\n C43222g gVar = this.f77593aS;\n C7573i.m23582a((Object) gVar, \"mPlayer\");\n C24961b a = e.mo65255a(gVar.mo104915n());\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n Video video = aweme.getVideo();\n C7573i.m23582a((Object) video, \"mAweme.video\");\n a.mo65271b((long) video.getVideoLength()).mo65270a(mo75261ab());\n }\n }",
"C3579d mo19719m(long j) throws IOException;",
"void transform() {\n\t\tint oldline, newline;\n\t\tint oldmax = oldinfo.maxLine + 2; /* Count pseudolines at */\n\t\tint newmax = newinfo.maxLine + 2; /* ..front and rear of file */\n\n\t\tfor (oldline = 0; oldline < oldmax; oldline++)\n\t\t\toldinfo.other[oldline] = -1;\n\t\tfor (newline = 0; newline < newmax; newline++)\n\t\t\tnewinfo.other[newline] = -1;\n\n\t\tscanunique(); /* scan for lines used once in both files */\n\t\tscanafter(); /* scan past sure-matches for non-unique blocks */\n\t\tscanbefore(); /* scan backwards from sure-matches */\n\t\tscanblocks(); /* find the fronts and lengths of blocks */\n\t}",
"private void RecoverMessages()\n {\n String messages = new String();\n int nodeIndex = getNodeIndex(localport);\n int i;\n String msgToSend;\n for(i=nodeIndex+1;i<=nodeIndex+2;i++)\n {\n msgToSend = localport;\n String temp = (sendMsg(nodes[i % 5], \"RECOVER##\" + msgToSend));\n if(temp !=null && !temp.equals(\"null\"))\n messages+=temp;\n }\n\n Log.i(\"current node\",Integer.toString(nodeIndex));\n for(i=nodeIndex+4;i>=nodeIndex+3;i--)\n {\n Log.i(\"replicate from\",nodes[i % 5]);\n msgToSend = nodes[i % 5];\n String temp = (sendMsg(nodes[i % 5], \"RECOVER##\" + msgToSend));\n if(temp !=null && !temp.equals(\"null\"))\n messages+=temp;\n }\n Log.i(\"messages recovered\", messages);\n if(!messages.equals(\"null\") && messages.length()>0)\n {\n Log.i(\"sasa\",Integer.toString(messages.length()));\n String msgs = messages.substring(0,messages.length()-1);\n String[] Allmessages = msgs.split(\" \");\n Log.i(\"recover\",msgs);\n for(String msg: Allmessages)\n {\n String key = msg.split(\"&&\")[0];\n String value = msg.split(\"&&\")[1];\n if(myKeys.containsKey(key))\n continue;\n myKeys.put(key,value);\n }\n\n }\n }",
"public interface IndexMessage {\n// void setUse();\n boolean isUsed();\n byte[] getMessage();\n// long getBornTime();\n// boolean isRegistered();\n// void setRegistered();\n// String getMsgId();\n void up();\n void down();\n void downOnce(AtomicBoolean once);\n void endUp();\n// String getPutQueueName();\n int getIndex();\n}",
"private void m35352a(boolean z) throws IOException {\n C13365q b;\n int i;\n C13342c buffer = this.f34621e.buffer();\n while (true) {\n b = buffer.mo38490b(1);\n if (z) {\n Deflater deflater = this.f34622f;\n byte[] bArr = b.f34663a;\n int i2 = b.f34665c;\n i = deflater.deflate(bArr, i2, 8192 - i2, 2);\n } else {\n Deflater deflater2 = this.f34622f;\n byte[] bArr2 = b.f34663a;\n int i3 = b.f34665c;\n i = deflater2.deflate(bArr2, i3, 8192 - i3);\n }\n if (i > 0) {\n b.f34665c += i;\n buffer.f34606f += (long) i;\n this.f34621e.emitCompleteSegments();\n } else if (this.f34622f.needsInput()) {\n break;\n }\n }\n if (b.f34664b == b.f34665c) {\n buffer.f34605e = b.mo38574b();\n C13366r.m35401a(b);\n }\n }",
"void commonGetsCleanup() {\n ChannelBuffer buf, next;\n\n buf = inQueueHead;\n for ( ; buf != null; buf = next) {\n next = buf.next;\n if (buf.nextRemoved < buf.nextAdded) {\n break;\n }\n recycleBuffer(buf, false);\n }\n inQueueHead = buf;\n if (buf == null) {\n inQueueTail = null;\n } else {\n // If any multi-byte characters were split across channel buffer\n // boundaries, the split-up bytes were moved to the next channel\n // buffer by filterBytes(). Move the bytes back to their\n // original buffer because the caller could change the channel's\n // encoding which could change the interpretation of whether those\n // bytes really made up multi-byte characters after all.\n\n next = buf.next;\n for ( ; next != null; next = buf.next) {\n int extra;\n\n extra = buf.bufLength - buf.nextAdded;\n if (extra > 0) {\n System.arraycopy(next.buf, buf.BUFFER_PADDING - extra,\n buf.buf, buf.nextAdded, extra);\n buf.nextAdded += extra;\n next.nextRemoved = buf.BUFFER_PADDING;\n }\n buf = next;\n }\n }\n if (encoding != null) {\n //Tcl_FreeEncoding(encoding);\n }\n }",
"public static void transform() {\r\n \tString str = BinaryStdIn.readString();;\r\n \tCircularSuffixArray suffixArr = new CircularSuffixArray(str);\r\n \tfor (int i = 0; i < suffixArr.length(); i++) {\r\n \t\tif (suffixArr.index(i) == 0) {\r\n \t\t\tBinaryStdOut.write(i);\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \tfor (int i = 0; i < suffixArr.length(); i++) {\r\n \t\tint pos = suffixArr.index(i);\r\n \t\tif (pos == 0) {\r\n \t\t\tpos = suffixArr.length();\r\n \t\t}\r\n \t\tBinaryStdOut.write(str.charAt(pos - 1), 8);\r\n \t}\r\n \tBinaryStdOut.close();\r\n }",
"private SBomCombiner()\n\t{}",
"T decode1(DataBuffer buffer);",
"public void mo9258g() {\n this.f1301l = EncodingUtils.m1912b(this.f1301l, 0);\n }",
"public void mo35665a() {\n int i = 0;\n int i2 = 0;\n while (true) {\n byte[] bArr = this.f31120b;\n if (i2 >= bArr.length) {\n break;\n }\n bArr[i2] = -1;\n i2++;\n }\n while (true) {\n byte[] bArr2 = this.f31119a;\n if (i < bArr2.length) {\n this.f31120b[bArr2[i]] = (byte) i;\n i++;\n } else {\n byte[] bArr3 = this.f31120b;\n bArr3[65] = bArr3[97];\n bArr3[66] = bArr3[98];\n bArr3[67] = bArr3[99];\n bArr3[68] = bArr3[100];\n bArr3[69] = bArr3[101];\n bArr3[70] = bArr3[102];\n return;\n }\n }\n }",
"protected abstract Object read ();",
"MapType map(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);",
"@Override\n\tprotected ElderMood transformOne(ElderFrequency in) {\n\t\treturn null;\n\t}",
"private void m102134a(MediaModel mediaModel) {\n C7573i.m23587b(mediaModel, \"it\");\n this.f82200c.mo81985a(this.f82199b, this.f82198a.mo81946a(this.f82199b), this.f82198a.f82196d);\n }",
"public LinearAcceptingNestedWordAutomaton transform(NondeterministicNestedWordAutomaton nnwa) {\n LinearAcceptingNestedWordAutomaton dnwa = new LinearAcceptingNestedWordAutomaton();\n\n ArrayList<HierarchyState> nnwaHierarchyStates = nnwa.getP();\n ArrayList<HierarchyState> nnwaHierarchyAcceptingStates = nnwa.getPf();\n ArrayList<LinearState> nnwalinearStates = nnwa.getQ();\n ArrayList<LinearState> nnwaLinearAcceptingStates = nnwa.getQf();\n\n /* ArrayList<PowerSetHierarchyState> dnwaPowerSetHierarchyStates = new ArrayList<PowerSetHierarchyState>();\n ArrayList<PowerSetHierarchyState> dnwaPowerSetHierarchyAcceptingStates = new ArrayList<PowerSetHierarchyState>();\n ArrayList<PowerSetLinearState> dnwaPowerSetLinearStates = new ArrayList<PowerSetLinearState>();\n ArrayList<PowerSetLinearState> dnwaPowerSetLinearAcceptingStates = new ArrayList<PowerSetLinearState>();\n*/\n for (HierarchyState hState : nnwaHierarchyStates) {\n\n }\n\n\n return dnwa;\n }",
"private void icombo(Tlv tlv, int b, String a){ \n //uint16 value\n uint16(tlv, b);\n //then sstring (keywords)\n sstring(tlv, a); \n }",
"public Object ak() {\n Object[] objArr = this.aq;\n int i = this.ar + 715964991;\n this.ar = i;\n return objArr[i * 1523192013];\n }",
"@Override\n\tprotected ErrorCode mapMyMessage(Message msg) {\n\t\t\t\t\t\n\t\tint newECRs = 0;\n\t\tint totalRepPatientResult;\n\t\tif (getMyParser().getMyVersion().equalsIgnoreCase(\"2.3.1\"))\n\t\t\ttotalRepPatientResult = ((ca.uhn.hl7v2.model.v231.message.ORU_R01)msg).getPIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTIReps();\n\t\telse\n\t\t\ttotalRepPatientResult = ((ca.uhn.hl7v2.model.v251.message.ORU_R01)msg).getPATIENT_RESULTReps();\n\t\t\t\n\t\tfor (int i=0; i<totalRepPatientResult; i++) {\n\t\t\t// Create a new empty ECR JSON.\n\t\t\tJSONObject ecr_json = new JSONObject();\n\t\t\t\n\t\t\t// Set sending application.\n\t\t\tint res = getMyParser().map_provider_from_appfac ((Object) msg, ecr_json);\n\t\t\tif (res != 0) {\n\t\t\t\treturn ErrorCode.MSH;\n\t\t\t}\n\n\t\t\t// Patient specific information\n\t\t\tObject patient;\n\t\t\tif (getMyParser().getMyVersion().equalsIgnoreCase(\"2.3.1\")) {\n\t\t\t\tORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI patient_result = ((ca.uhn.hl7v2.model.v231.message.ORU_R01)msg).getPIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI(i);\n\t\t\t\tpatient = patient_result.getPIDPD1NK1NTEPV1PV2();\n\t\t\t} else {\n\t\t\t\tORU_R01_PATIENT_RESULT patient_result = ((ca.uhn.hl7v2.model.v251.message.ORU_R01)msg).getPATIENT_RESULT(i);\n\t\t\t\tpatient = patient_result.getPATIENT();\n\t\t\t}\n\t\t\t\n\t\t\tint result = getMyParser().map_patient (patient, ecr_json);\n\t\t\tif (result == 0) {\n\t\t\t\tnewECRs++;\n\t\t\t} else {\n\t\t\t\t// return ErrorCode.PID;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// We should have the patient populated.\n\t\t\tJSONObject patient_json;\n\t\t\tif (ecr_json.isNull(\"Patient\")) {\n\t\t\t\t// This means the HL7v2 message has no patient demographic information.\n\t\t\t\t// This shouldn't happen. But, anything can happen in the real world. So,\n\t\t\t\t// we don't stop here. We are moving on.\n\t\t\t\tpatient_json = new JSONObject();\n\t\t\t\tecr_json.put(\"Patient\", patient_json);\n\t\t\t} else {\n\t\t\t\tpatient_json = ecr_json.getJSONObject(\"Patient\");\n\t\t\t}\n\n\t\t\t// ORC/OBR Parsing\n\t\t\tJSONArray laborders_json = new JSONArray();\n\t\t\t\n\t\t\t// This is a new JSON Array object. Put it in the patient section.\n\t\t\tpatient_json.put(\"Lab_Order_Code\", laborders_json);\n\n\t\t\tint totalOrderObs;\n\t\t\tif (getMyParser().getMyVersion().equalsIgnoreCase(\"2.3.1\")) {\n\t\t\t\tORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI patient_result = ((ca.uhn.hl7v2.model.v231.message.ORU_R01)msg).getPIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI(i);\n\t\t\t\ttotalOrderObs = patient_result.getORCOBRNTEOBXNTECTIReps();\n\t\t\t} else {\n\t\t\t\tORU_R01_PATIENT_RESULT patient_result = ((ca.uhn.hl7v2.model.v251.message.ORU_R01)msg).getPATIENT_RESULT(i);\n\t\t\t\ttotalOrderObs = patient_result.getORDER_OBSERVATIONReps();\n\t\t\t}\n\t\t\tfor (int j=0; j<totalOrderObs; j++) {\n\t\t\t\tObject orderObs;\n\t\t\t\tif (getMyParser().getMyVersion().equalsIgnoreCase(\"2.3.1\")) {\n\t\t\t\t\tORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI patient_result = ((ca.uhn.hl7v2.model.v231.message.ORU_R01)msg).getPIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI(i);\n\t\t\t\t\torderObs = patient_result.getORCOBRNTEOBXNTECTI(j);\n\t\t\t\t} else {\n\t\t\t\t\tORU_R01_PATIENT_RESULT patient_result = ((ca.uhn.hl7v2.model.v251.message.ORU_R01)msg).getPATIENT_RESULT(i);\n\t\t\t\t\torderObs = patient_result.getORDER_OBSERVATION(j);\n\t\t\t\t}\n\n\t\t\t\tJSONObject laborder_json = getMyParser().map_order_observation (orderObs);\n\t\t\t\tif (laborder_json == null) {\n\t\t\t\t\treturn ErrorCode.ORDER_OBSERVATION;\n\t\t\t\t}\n\t\t\t\tlaborders_json.put(laborder_json);\n\t\t\t\t\n\t\t\t\t// We add lab results to lab order.\n\t\t\t\tJSONArray labresults_json = new JSONArray();\n\t\t\t\tlaborder_json.put(\"Laboratory_Results\", labresults_json);\n\t\t\t\t\n\t\t\t\tint totalObservations;\n\t\t\t\tif (getMyParser().getMyVersion().equalsIgnoreCase(\"2.3.1\")) {\n\t\t\t\t\ttotalObservations = ((ORU_R01_ORCOBRNTEOBXNTECTI)orderObs).getOBXNTEReps();\n\t\t\t\t} else {\n\t\t\t\t\ttotalObservations = ((ORU_R01_ORDER_OBSERVATION)orderObs).getOBSERVATIONReps();\n\t\t\t\t}\n\t\t\t\tfor (int k=0; k<totalObservations; k++) {\n\t\t\t\t\tObject obsResult;\n\t\t\t\t\tif (getMyParser().getMyVersion().equalsIgnoreCase(\"2.3.1\")) {\n\t\t\t\t\t\tobsResult = ((ORU_R01_ORCOBRNTEOBXNTECTI)orderObs).getOBXNTE(k).getOBX();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tobsResult = ((ORU_R01_ORDER_OBSERVATION)orderObs).getOBSERVATION(k).getOBX();\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tJSONObject labresult_json = getMyParser().map_lab_result (obsResult);\n\t\t\t\t\tif (labresult_json == null) {\n\t\t\t\t\t\treturn ErrorCode.LAB_RESULTS;\n\t\t\t\t\t}\n\t\t\t\t\tlabresults_json.put(labresult_json);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// For each order, we have provider, facility, order date and reason information.\n\t\t\t\t// We put this information in the high level.\n\t\t\t\t//\n\t\t\t\t// Provider and Facility at Top ECR level.\n\t\t\t\t// Order Date and Reason at Patient level.\n\t\t\t\t//\n\t\t\t\t// Provider and Facility: \n\t\t\t\t// We are in the Order Loop. So, we will come back. However, \n\t\t\t\t// ECR allows only one provider and facility. So, this can be overwritten\n\t\t\t\t// by next order if provider info exists.\n\t\t\t\tif (!laborder_json.isNull(\"Provider\")) {\n\t\t\t\t\tJSONObject provider_json = laborder_json.getJSONObject(\"Provider\");\n\t\t\t\t\tif (provider_json != null) \n\t\t\t\t\t\tgetMyParser().add_provider (provider_json, ecr_json);\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (!laborder_json.isNull(\"Facility\")) {\n\t\t\t\t\tJSONObject facility_json = laborder_json.getJSONObject(\"Facility\");\n\t\t\t\t\tif (facility_json != null) ecr_json.put(\"Facility\", facility_json);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Order Date and Reason. \n\t\t\t\t// We have Visit DateTime in ECR. We will put order date as a visit date\n\t\t\t\t// as the order usually made when a patient visits a clinic.\n\t\t\t\tif (!laborder_json.isNull(\"DateTime\")) {\n\t\t\t\t\tString orderDate_json = laborder_json.getString(\"DateTime\");\n\t\t\t\t\tif (orderDate_json != null) patient_json.put(\"Visit_DateTime\", orderDate_json);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// We have reasons in lab order. We put this in the trigger code.\n\t\t\t\tif (!laborder_json.isNull(\"Reasons\")) {\n\t\t\t\t\tJSONArray reasons_json = laborder_json.getJSONArray(\"Reasons\");\n\t\t\t\t\tJSONArray triggercode_json;\n\t\t\t\t\tif (patient_json.isNull(\"Tigger_Code\")) {\n\t\t\t\t\t\ttriggercode_json = new JSONArray();\n\t\t\t\t\t\tpatient_json.put(\"Trigger_Code\", triggercode_json);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttriggercode_json = patient_json.getJSONArray(\"Trigger_Code\");\n\t\t\t\t\t}\n\t\t\t\t\tif (reasons_json != null) {\n\t\t\t\t\t\tfor (int c=0; c<reasons_json.length(); c++) {\n\t\t\t\t\t\t\ttriggercode_json.put(reasons_json.get(c));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsendEcr (ecr_json);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn ErrorCode.INTERNAL;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif (newECRs == 0) {\n\t\t\treturn ErrorCode.PID;\n\t\t}\n\t\t\n\t\treturn ErrorCode.NOERROR;\n\t}",
"private void handle(BytesMessage<?> message) {\n\t\tByteArrayOutputStream stream = new ByteArrayOutputStream();\n\t\tfor(byte[] i: this.messages) {\n\t\t\ttry {\n\t\t\t\tstream.write(i);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tbyte[] buffer = stream.toByteArray();\n\t\ttry {\n\t\t\tstream.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t//deserialize message\n\t\tKryo kryo = new Kryo();\n\t\tFieldSerializer fieldSerializer = new FieldSerializer(kryo, LargeMessage.class);\n\t\t//deserialize message, receiver attribute is not serialized\n\t\tfieldSerializer.removeField(\"receiver\");\n\t\tkryo.register(LargeMessage.class, fieldSerializer);\n\n\t\tInput input = new Input(new ByteArrayInputStream(buffer));\n\t\tLargeMessage deserializedMessage = kryo.readObject(input, LargeMessage.class);\n\t\tinput.close();\n\n\t\tmessage.getReceiver().tell(deserializedMessage.getMessage(), message.getSender());\n\t}",
"public void mainDecoder(int b, Integer[] playedChord){\n\n while(beatCounter<b){\n for(int i =0; i < rhytm.get(beatCounter).length;i++)\n {\n if(rhytm.get(beatCounter)[i]!=null) {\n if ((!rhytm.get(beatCounter)[i].equals(\"Ri\")) && (!rhytm.get(beatCounter)[i].equals(\"Rs\"))) {\n\n //TODO DECODE HARMONIC NOTE AT EVERY FIRST AND THIRD BEAT AT FIRST NOTE PLAYED\n if (beatCounter % 2 == 0 && i == 0) {\n for (int j = 0; j < playedChord.length; j++) {\n if (playedChord[j] == melody.get(melodyCounter)) {\n if(j<2){\n binaryOutput+=\"0\";\n binaryOutput+=Integer.toBinaryString(j);\n }else{\n binaryOutput+=Integer.toBinaryString(j);\n }\n //todo SAVE FOR LATER COMPARISON\n if(beatCounter==0)\n firstChordNote=melody.get(melodyCounter);\n if(beatCounter==16)\n secondChordNote=melody.get(melodyCounter);\n\n previousNote = melody.get(melodyCounter);\n melodyCounter++;\n break;\n }\n }\n //TODO DECODE EVERY OTHER NOTE, ENCODED WITH AUTOMATON\n } else {\n //// TODO WAS MELODY ASCENDING OR DESCENDING\n if (previousNote >= 55 && previousNote <= 79)\n if (previousNote < melody.get(melodyCounter))\n binaryOutput+=\"1\";\n else\n binaryOutput+=\"0\";\n\n //todo WAS IT STEP OR LEAP\n for (int j = 0; j < melodyNotes.length; j++) {\n if (melodyNotes[j].equals(previousNote)) {\n previousNotePosition = j;\n break;\n }\n }\n for (int j = 0; j < melodyNotes.length; j++) {\n if (melodyNotes[j].equals(melody.get(melodyCounter))) {\n previousNote=melodyNotes[j];\n int difference = abs(j - previousNotePosition);\n if (difference > 1) {\n binaryOutput+=\"1\";\n binaryOutput+=new Integer(difference - 2).toString();\n } else\n binaryOutput+=\"0\";\n break;\n }\n }\n melodyCounter++;\n }\n }\n }\n }\n beatCounter++;\n }\n\n }",
"private static long m26007a(String str, long j) {\n if (str == null || str.isEmpty()) {\n return C10442z4.m26659a(ByteBuffer.allocate(8).putLong(j).array());\n }\n byte[] bytes = str.getBytes(f26939b);\n ByteBuffer allocate = ByteBuffer.allocate(bytes.length + 8);\n allocate.put(bytes);\n allocate.putLong(j);\n return C10442z4.m26659a(allocate.array());\n }",
"long getEmbeddingTokenLow();",
"long getEmbeddingTokenLow();",
"public pam_message(Pointer src) {\n useMemory(src);\n read();\n }",
"public final C5687a mo28207a(ByteBuffer byteBuffer) {\n C5884d dVar = this.f18623g;\n if (dVar == null) {\n return null;\n }\n byte[] a = dVar.mo28215a(byteBuffer);\n if (a == null) {\n return null;\n }\n C5898f fVar = new C5898f(a);\n C5888a aVar = new C5888a();\n fVar.mo28261a((C5891a) aVar);\n StringBuilder sb = new StringBuilder(\"received \");\n sb.append(aVar);\n String str = \"core\";\n C5264a.m21617a(str, sb.toString());\n if (aVar.mo28228c()) {\n C5898f fVar2 = new C5898f(C5897e.m23619a(fVar));\n aVar.mo28231f();\n fVar = fVar2;\n }\n C5687a aVar2 = new C5687a();\n aVar2.f18231a = aVar;\n aVar2.f18232b = fVar;\n if (aVar2.f18231a.mo28232g() == 1 && aVar2.f18231a.mo28233h() == 1) {\n C5857a aVar3 = new C5857a();\n aVar3.mo27892a(aVar2.f18231a);\n short e = aVar3.mo27896e();\n if (e == 201) {\n try {\n aVar3.mo27845a(aVar2.f18232b);\n C5864a.m23488a(aVar3.mo28168f(), aVar3.mo28169g(), aVar3.mo28170h());\n m23547c();\n StringBuilder sb2 = new StringBuilder(\"public key updated to: \");\n sb2.append(aVar3.mo28168f());\n C5264a.m21617a(str, sb2.toString());\n if (this.f18618b != null) {\n this.f18618b.mo28195a(this.f18620d, true);\n }\n } catch (Exception e2) {\n e2.printStackTrace();\n }\n } else if (e != 200) {\n StringBuilder sb3 = new StringBuilder(\"Handshake fail[code=\");\n sb3.append(aVar3.mo27891a().mo28235j());\n sb3.append(\"]\");\n C5264a.m21617a(str, sb3.toString());\n C5864a.m23487a();\n if (this.f18618b != null) {\n this.f18618b.mo28194a();\n }\n } else if (this.f18618b != null) {\n this.f18618b.mo28195a(this.f18620d, false);\n }\n this.f18620d = null;\n return null;\n } else if (aVar2.f18231a.mo28234i() >= 0 && aVar2.f18231a.mo28236k() >= 0) {\n return aVar2;\n } else {\n throw new C5899g(\"invalid headers, connection may be corrupted\");\n }\n }",
"public void mo63047b(String str) {\n String str2;\n String str3;\n String str4;\n String str5;\n super.mo63047b(str);\n if (C25352e.m83221d(this.f77546j)) {\n this.f89203a.mo65916c();\n C24961b e = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play_over\").mo65283e(\"video\");\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n Video video = aweme.getVideo();\n C7573i.m23582a((Object) video, \"mAweme.video\");\n e.mo65271b((long) video.getVideoLength()).mo65270a(mo75261ab());\n this.f89214bh++;\n C28418f a = C28418f.m93413a();\n C7573i.m23582a((Object) a, \"FeedSharePlayInfoHelper.inst()\");\n a.f74936f = this.f89214bh;\n if (this.f89214bh >= this.f89215bi) {\n C28418f a2 = C28418f.m93413a();\n C7573i.m23582a((Object) a2, \"FeedSharePlayInfoHelper.inst()\");\n if (!a2.f74934d) {\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme2.getAwemeRawAd();\n if (awemeRawAd != null) {\n str3 = awemeRawAd.getWebUrl();\n } else {\n str3 = null;\n }\n if (TextUtils.isEmpty(str3)) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str4 = \"\";\n } else {\n str4 = \"video\";\n }\n b.mo65283e(str4).mo65270a(mo75261ab());\n return;\n } else if (mo75314al()) {\n mo75311ai();\n return;\n } else {\n this.f89215bi++;\n C24961b b2 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str5 = \"\";\n } else {\n str5 = \"video\";\n }\n b2.mo65283e(str5).mo65270a(mo75261ab());\n return;\n }\n }\n }\n C24961b b3 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str2 = \"\";\n } else {\n str2 = \"video\";\n }\n b3.mo65283e(str2).mo65270a(mo75261ab());\n }\n }",
"public void p() {\n try {\n if (this.f80656a.a().size() > 0) {\n this.f80657b.a((f) new f() {\n public void a(Object obj, boolean z) {\n }\n }, this.f80656a.a());\n }\n if (this.f80658c.a().size() > 0) {\n this.f80657b.b(new f() {\n public void a(Object obj, boolean z) {\n if (obj instanceof String) {\n m.this.f80658c.b();\n }\n }\n }, this.f80658c.a());\n }\n if (this.l.size() > 0) {\n this.f80657b.a(new f(), this.l);\n }\n } catch (Throwable th) {\n by.b(\"convertMemoryToCacheTable happen error: \" + th.toString());\n }\n }",
"private static XdmValue decodeResponse(ReadablePipe port)\n throws SaxonApiException\n , ServlexException\n {\n List<XdmItem> result = new ArrayList<XdmItem>();\n port.canReadSequence(true);\n // if there are more than 1 docs, the first one must be web:response,\n // and the following ones are the bodies\n int count = port.documentCount();\n if ( count == 0 ) {\n LOG.debug(\"The pipeline returned no document on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n // TODO: If there is no document on the port, we return an empty\n // sequence. We should probably throw an error instead...\n return XdmEmptySequence.getInstance();\n }\n else if ( count > 1 ) {\n LOG.debug(\"The pipeline returned \" + count + \" documents on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n while ( port.moreDocuments() ) {\n XdmNode doc = port.read();\n addToList(result, doc);\n }\n }\n else {\n LOG.debug(\"The pipeline returned 1 document on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n XdmNode response = port.read();\n if ( LOG.debug()) {\n LOG.debug(\"Content of the outpot port '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"': \" + response);\n }\n if ( response == null ) {\n // TODO: If there is no web:response, we return an empty sequence.\n // We should probably throw an error instead...\n return XdmEmptySequence.getInstance();\n }\n XdmNode wrapper_elem = getWrapperElem(response);\n // not a web:wrapper, so only one doc, so must be web:response\n if ( wrapper_elem == null ) {\n addToList(result, response);\n }\n // a web:wrapper, so unwrap the sequence\n else {\n XdmSequenceIterator it = wrapper_elem.axisIterator(Axis.CHILD);\n while ( it.hasNext() ) {\n // TODO: FIXME: For now, due to some strange behaviour in\n // Calabash, we ignore everything but elements (because it\n // exposes the indentation as text nodes, which is wrong...)\n XdmItem child = it.next();\n if ( child instanceof XdmNode && ((XdmNode) child).getNodeKind() == XdmNodeKind.ELEMENT ) {\n addToList(result, (XdmNode) child);\n }\n }\n }\n }\n return new XdmValue(result);\n }",
"public void convertVoiceToMaori() {\n\t\tString command = \"HVite -H HTK/MaoriNumbers/HMMs/hmm15/macros -H HTK/MaoriNumbers/HMMs/hmm15/hmmdefs -C HTK/MaoriNumbers/user/configLR -w HTK/MaoriNumbers/user/wordNetworkNum -o SWT -l '*' -i recout.mlf -p 0.0 -s 5.0 HTK/MaoriNumbers/user/dictionaryD HTK/MaoriNumbers/user/tiedList foo.wav\";\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(\"bash\" , \"-c\" , command );\n\t\ttry {\n\t\t\t\n\t\t\tProcess convertProcess = pb.start();\n\t\t\t\n\t\t\tconvertProcess.waitFor();\n\t\t\t\n\t\t\tconvertProcess.destroy();\n\t\t\t\n\t\n\t\t\t\n\t\t}catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}catch (InterruptedException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\n\t\n\t\n\t}",
"public long mo1597a(long j) {\n return 0;\n }",
"protected final void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out)\r\n/* 21: */ throws Exception\r\n/* 22: */ {\r\n/* 23:58 */ Object decoded = decode(ctx, in);\r\n/* 24:59 */ if (decoded != null) {\r\n/* 25:60 */ out.add(decoded);\r\n/* 26: */ }\r\n/* 27: */ }",
"void procedure()\n {\n try\n {\n fkey=new FileInputStream(file2);\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n keybuf= new byte[16];\n try\n {\n fkey.read(keybuf);\n z= new int[52];\n j1=0;\n i1=0;\n for(i=0;i<52;i++)\n z[i]=0;\n while( i1<8)\n {\n if((j1+1)%2==0)\n {\n z[i1]|=keybuf[j1]; // dividing 64 bit cypher block into four 16 bit registers\n\t i1++;\n }\n else\n \t {\n\t z[i1]=keybuf[j1];\n\t z[i1]<<=8;\n }\n\t j1++;\n }\n i=0;\n\t for(j1=1;j1<=5;j1++)\n\t {\n\t i++;\n\t z[i+7]=((z[i]<<9)&0xfe00)|((z[i+1]>>7)&0x1ff);\n\t z[i+8]=((z[i+1]<<9)&0xfe00)|((z[i+2]>>7)&0x1ff);\n\t z[i+9]=((z[i+2]<<9)&0xfe00)|((z[i+3]>>7)&0x1ff);\n\t z[i+10]=((z[i+3]<<9)&0xfe00)|((z[i+4]>>7)&0x1ff);\n\t z[i+11]=((z[i+4]<<9)&0xfe00)|((z[i+5]>>7)&0x1ff);\n\t z[i+12]=((z[i+5]<<9)&0xfe00)|((z[i+6]>>7)&0x1ff);\n z[i+13]=((z[i+6]<<9)&0xfe00)|((z[i-1]>>7)&0x1ff);\n\t z[i+14]=((z[i-1]<<9)&0xfe00)|((z[i]>>7)&0x1ff);\n\t i=i+7;\n\t }\n i1=41;\n\t z[48]=((z[i1]<<9)&0xfe00)|((z[i1+1]>>7)&0x1ff);\n\t z[49]=((z[i1+1]<<9)&0xfe00)|((z[i1+2]>>7)&0x1ff);\n\t z[50]=((z[i1+2]<<9)&0xfe00)|((z[i1+3]>>7)&0x1ff);\n\t z[51]=((z[i1+3]<<9)&0xfe00)|((z[i1+4]>>7)&0x1ff);\n}\ncatch(Exception e)\n{\nSystem.out.println(e);\n}\n}",
"private List<Aweme> m106812b(boolean z) {\n ArrayList arrayList = new ArrayList();\n for (int i = 0; i < this.f86088h.mo103182b(); i++) {\n String a = this.f86088h.mo103178a(i);\n Story story = this.f86088h.mo103177a(a).f109095a;\n if (story.isFollowing() && (z || !story.isRead())) {\n arrayList.addAll(this.f86088h.mo103177a(a).f109096b.getAwemeList());\n }\n }\n return arrayList;\n }",
"private byte[] processPayload(byte[] message) {\n\t\treturn ComMethods.processPayload(currentUser.getBytes(), message, counter-1, currentSessionKey, simMode);\n\t}",
"public static void Stemmingmethod()throws Exception\n{\n char[] w = new char[501];\n Stemmer s = new Stemmer();\n String prcessedtxt=\"\";\n ArrayList<String> finalsen= new ArrayList();\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"fullyprocessed.txt\"));\n\n String u=null;\n \n {\n FileInputStream in = new FileInputStream(\"stopwordsremoved.txt\");\n\n while(true)\n\n { int ch = in.read();\n if (Character.isLetter((char) ch))\n {\n int j = 0;\n while(true)\n { ch = Character.toLowerCase((char) ch);\n w[j] = (char) ch;\n if (j < 500) j++;\n ch = in.read();\n if (!Character.isLetter((char) ch))\n {\n \n s.add(w, j); \n\n s.stem();\n { \n\n u = s.toString();\n finalsen.add(u);\n /* to test getResultBuffer(), getResultLength() : */\n /* u = new String(s.getResultBuffer(), 0, s.getResultLength()); */\n\n System.out.print(u);\n }\n break;\n }\n }\n }\n if (ch < 0) break;\n System.out.print((char)ch);\n finalsen.add(\"\"+(char)ch);\n\n\n }\n }\n \n \n \n for(String word:finalsen){\n prcessedtxt=prcessedtxt+\"\"+ word;\n }\n writer.write(prcessedtxt+\"\\n\"); \n prcessedtxt=\"\";\n finalsen.clear();\n writer.close();\n\n\n \n}",
"public Jumble(Jumble j) {\n Set<Character> letters = j.distincts();\n for (char ch : letters) {\n //this.jumble.put(ch, j.jumble.get(ch));\n this.putBatch(ch, j.count(ch));\n }\n //this.total = j.total;\n }",
"public void processData() {\n\t\t SamReader sfr = SamReaderFactory.makeDefault().validationStringency(ValidationStringency.LENIENT).open(this.inputFile);\n\t\t \n\t\t\t\n\t\t\t//Set up file writer\n\t\t SAMFileWriterFactory sfwf = new SAMFileWriterFactory();\n\t\t sfwf.setCreateIndex(true);\n\t\t SAMFileWriter sfw = sfwf.makeSAMOrBAMWriter(sfr.getFileHeader(), false, this.outputFile);\n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t\t//counters\n\t\t\tint totalReads = 0;\n\t\t\tint trimmedReads = 0;\n\t\t\tint droppedReads = 0;\n\t\t\tint dropTrimReads = 0;\n\t\t\tint dropMmReads = 0;\n\t\t\t\n\t\t\t//Containers\n\t\t\tHashSet<String> notFound = new HashSet<String>();\n\t\t\tHashMap<String, SAMRecord> mateList = new HashMap<String,SAMRecord>();\n\t\t\tHashSet<String> removedList = new HashSet<String>();\n\t\t\tHashMap<String,SAMRecord> editedList = new HashMap<String,SAMRecord>();\n\t\t\t\n\t\t\tfor (SAMRecord sr: sfr) {\n\t\t\t\t//Messaging\n\t\t\t\tif (totalReads % 1000000 == 0 && totalReads != 0) {\n\t\t\t\t\tSystem.out.println(String.format(\"Finished processing %d reads. %d were trimmed, %d were set as unmapped. Currently storing mates for %d reads.\",totalReads,trimmedReads,droppedReads,mateList.size()));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ttotalReads += 1;\n\t\t\t\t\n\t\t\t\tString keyToCheck = sr.getReadName() + \":\" + String.valueOf(sr.getIntegerAttribute(\"HI\"));\n\t\t\t\n\t\t\t\t//Make sure chromsome is available\n\t\t\t\tString chrom = sr.getReferenceName();\n\t\t\t\tif (!this.refHash.containsKey(chrom)) {\n\t\t\t\t\tif (!notFound.contains(chrom)) {\n\t\t\t\t\t\tnotFound.add(chrom);\n\t\t\t\t\t\tMisc.printErrAndExit(String.format(\"Chromosome %s not found in reference file, skipping trimming step\", chrom));\n\t\t\t\t\t}\n\t\t\t\t} else if (!sr.getReadUnmappedFlag()) {\n\t\t\t\t\tString refSeq = null;\n\t\t\t\t\tString obsSeq = null;\n\t\t\t\t\tList<CigarElement> cigar = null;\n\t\t\t\t\t\n\t\t\t\t\t//Get necessary sequence information depending on orientation\n\t\t\t\t\tif (sr.getReadNegativeStrandFlag()) {\n\t\t\t\t\t\trefSeq = this.revComp(this.refHash.get(chrom).substring(sr.getAlignmentStart()-1,sr.getAlignmentEnd()));\n\t\t\t\t\t\tobsSeq = this.revComp(sr.getReadString());\n\t\t\t\t\t\tcigar = this.reverseCigar(sr.getCigar().getCigarElements());\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\trefSeq = this.refHash.get(chrom).substring(sr.getAlignmentStart()-1,sr.getAlignmentEnd());\n\t\t\t\t\t\tobsSeq = sr.getReadString();\n\t\t\t\t\t\tcigar = sr.getCigar().getCigarElements();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Get alignments\n\t\t\t\t\tString[] alns = this.createAlignmentStrings(cigar, refSeq, obsSeq, totalReads);\n\t\t\t\t\t\n\t\t\t\t\t//Identify Trim Point\n\t\t\t\t\tint idx = this.identifyTrimPoint(alns,sr.getReadNegativeStrandFlag());\n\t\t\t\t\t\n\t\t\t\t\t//Check error rate\n\t\t\t\t\tboolean mmPassed = false;\n\t\t\t\t\tif (mmMode) {\n\t\t\t\t\t\tmmPassed = this.isPoorQuality(alns, sr.getReadNegativeStrandFlag(), idx);\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\t//Create new cigar string\n\t\t\t\t\tif (idx < minLength || mmPassed) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsr.setAlignmentStart(0);\n\t\t\t\t\t\tsr.setReadUnmappedFlag(true);\n\t\t\t\t\t\tsr.setProperPairFlag(false);\n\t\t\t\t\t\tsr.setReferenceIndex(-1);\n\t\t\t\t\t\tsr.setMappingQuality(0);\n\t\t\t\t\t\tsr.setNotPrimaryAlignmentFlag(false);\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\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\t\tmateList.put(keyToCheck, this.changeMateUnmapped(mateList.get(keyToCheck)));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tremovedList.add(keyToCheck);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} \n\t\t\t\t\t\tdroppedReads += 1;\n\t\t\t\t\t\tif (idx < minLength) {\n\t\t\t\t\t\t\tdropTrimReads += 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdropMmReads += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (idx+1 != alns[0].length()) {\n\t\t\t\t\t\ttrimmedReads++;\n\t\t\t\t\t\tCigar oldCig = sr.getCigar();\n\t\t\t\t\t\tCigar newCig = this.createNewCigar(alns, cigar, idx, sr.getReadNegativeStrandFlag());\n\t\t\t\t\t\tsr.setCigar(newCig);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadNegativeStrandFlag()) {\n\t\t\t\t\t\t\tint newStart = this.determineStart(oldCig, newCig, sr.getAlignmentStart());\n\t\t\t\t\t\t\tsr.setAlignmentStart(newStart);\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\tif (this.verbose) {\n\t\t\t\t\t\t\tthis.printAlignments(sr, oldCig, alns, idx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\t\tmateList.put(keyToCheck, this.changeMatePos(mateList.get(keyToCheck),sr.getAlignmentStart()));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\teditedList.put(keyToCheck,sr);\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\n\t\t\t\t//System.out.println(sr.getReadName());\n\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t//String rn = sr.getReadName();\n\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\tif (editedList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\tsr = this.changeMatePos(sr,editedList.get(keyToCheck).getAlignmentStart());\n\t\t\t\t\t\t\teditedList.remove(keyToCheck);\n\t\t\t\t\t\t} else if (removedList.contains(keyToCheck)) {\n\t\t\t\t\t\t\tsr = this.changeMateUnmapped(sr);\n\t\t\t\t\t\t\tremovedList.remove(keyToCheck);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsfw.addAlignment(sr);\n\t\t\t\t\t\tsfw.addAlignment(mateList.get(keyToCheck));\n\t\t\t\t\t\tmateList.remove(keyToCheck);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmateList.put(keyToCheck, sr);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsfw.addAlignment(sr);\n\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\tmateList.remove(keyToCheck);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.format(\"Finished processing %d reads. %d were trimmed, %d were set as unmapped. Of the unmapped, %d were too short and %d had too many mismatches. Currently storing mates for %d reads.\",\n\t\t\t\t\ttotalReads,trimmedReads,droppedReads,dropTrimReads, dropMmReads, mateList.size()));\n\t\t\tSystem.out.println(String.format(\"Reads left in hash: %d. Writing to disk.\",mateList.size()));\n\t\t\tfor (SAMRecord sr2: mateList.values()) {\n\t\t\t\tsfw.addAlignment(sr2);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsfw.close();\n\t\t\ttry {\n\t\t\t\tsfr.close();\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}\t\t\n\t}"
] | [
"0.5220883",
"0.51437545",
"0.50862974",
"0.4936382",
"0.49323392",
"0.49049014",
"0.48267126",
"0.47712293",
"0.47436816",
"0.4736879",
"0.47130644",
"0.47015125",
"0.46813968",
"0.4681342",
"0.467847",
"0.4663263",
"0.46618405",
"0.46405473",
"0.46365988",
"0.4635346",
"0.4622553",
"0.4617396",
"0.461701",
"0.46058208",
"0.45971167",
"0.4593257",
"0.45912308",
"0.4588384",
"0.458277",
"0.45730665",
"0.4564804",
"0.4561141",
"0.45602316",
"0.45562512",
"0.45413375",
"0.45397925",
"0.4520336",
"0.45145735",
"0.4514178",
"0.45111647",
"0.45044637",
"0.4497021",
"0.44894248",
"0.4473103",
"0.44726148",
"0.4466701",
"0.44608533",
"0.44549552",
"0.4453728",
"0.44526887",
"0.44489536",
"0.44480982",
"0.4446424",
"0.44453466",
"0.44363973",
"0.44351226",
"0.44331726",
"0.44331726",
"0.44319186",
"0.44282216",
"0.44236457",
"0.44219342",
"0.4421066",
"0.44180867",
"0.44173473",
"0.44116738",
"0.44097283",
"0.44092882",
"0.44080454",
"0.44046104",
"0.44028392",
"0.44018903",
"0.44002733",
"0.43986425",
"0.43982068",
"0.43960404",
"0.43847144",
"0.4384673",
"0.43804142",
"0.43799984",
"0.43793815",
"0.4373532",
"0.4373113",
"0.43722042",
"0.43690208",
"0.4367629",
"0.4367629",
"0.43662834",
"0.43636855",
"0.43620932",
"0.4355787",
"0.43553436",
"0.43553227",
"0.43545666",
"0.435238",
"0.4347471",
"0.434712",
"0.4344953",
"0.4344536",
"0.43433574",
"0.43428487"
] | 0.0 | -1 |
menentukan gambar tombol mute | public void start(){
if (host.getGameSettings().isMusicOn()) {
spr_btnMute.setFrame(0);
}else{
spr_btnMute.setFrame(1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mute() {\n execute(\"player.muted = true\");\n }",
"public void onLocalAudioMuteClicked(View view) {\n // Change the value of muted\n mMuted = !mMuted;\n // Update the agora engine with the mute\n mRtcEngine.muteLocalAudioStream(mMuted);\n // Get the correct mute button\n int res = mMuted ? R.drawable.btn_mute : R.drawable.btn_unmute;\n // Apply the correct img\n mMuteBtn.setImageResource(res);\n }",
"private void mute(String[] command) {\n\t\ttry {\n\t\t\tnew ProcessBuilder(Constants.CH_PATH_NIRCMD, \"mutesysvolume\", \"1\")\n\t\t\t\t\t.start();\n\t\t\tSystem.out.println(\"Muting sound.\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void mute() {\n\t\tif (isMute) {\n\t\t\tplaybin.setVolume(0);\n\t\t\tisMute = false;\n\t\t} else {\n\t\t\tplaybin.setVolume(volume);\n\t\t\tisMute = true;\n\t\t}\n\t}",
"public void mute() {\n\t\tstate.mute();\n\t}",
"@Test\n\tpublic void muteTest() throws IllegalArgumentException, IllegalAccessException {\n\n\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime &&\n\t\t\t\tConfiguration.mute) {\n\t\t\tstart();\n\t\t\tdemo.menuItemWithPath(\"Datei\", \"Datei \\u00F6ffnen\").click();\n\t\t\tdemo.fileChooser().setCurrentDirectory(new File(\"media/\"));\n\t\t\tFile file = new File(\"note.mp3\");\n\t\t\tdemo.fileChooser().selectFile(file);\n\t\t\tdemo.fileChooser().approveButton().click();\n\t\t\tdemo.button(\"play\").click();\n\t\t\tassertFalse(gui.muted);\n\t\t\tdemo.button(\"mute\").click();\n\t\t\tassertTrue(gui.muted);\n\t\t\tint oldVolume= (int) MemberModifier.field(Application.class, \"oldVolume\").get(gui);\n\t\t\tassertEquals(oldVolume, 100);\n\t\t\t//assertEquals(gui.getVolume(),0);\n\t\t\tJSlider slider= (JSlider) MemberModifier.field(Application.class, \"slider\").get(gui);\n\t\t\tassertFalse(slider.isEnabled());\n\t\t\n\t\t\tJButton btnmute= (JButton) MemberModifier.field(Application.class, \"btnmute\").get(gui);\n\t\t\tassertTrue(btnmute.getIcon().toString().contains(\"mute.png\"));\n\t\t\tdemo.button(\"mute\").click();\n\t\t\tassertFalse(gui.muted);\n\t\t\tassertTrue(slider.isEnabled()); \n\t\t\tassertEquals(gui.getVolume(),100);\n\t\t\tbtnmute= (JButton) MemberModifier.field(Application.class, \"btnmute\").get(gui);\n\t\t\tassertTrue(btnmute.getIcon().toString().contains(\"unmute.png\"));\n\t\t\tdemo.slider(\"slider\").slideToMinimum();\n\t\t\tassertEquals(gui.getVolume(),0);\n\t\t\tdemo.slider(\"slider\").slideToMaximum();\n\t\t\tassertEquals(gui.getVolume(),100);\n\t\t\tdemo.slider(\"slider\").slideTo(50);\n\t\t\tassertEquals(gui.getVolume(),50);\n\t\t\t\n\t\t}\n\t}",
"public void updateMute() {\n if (game.isMuted()) {\n mute.setIcon(muted);\n } else {\n mute.setIcon(unmuted);\n }\n }",
"public void specialSong()\n {\n if(!mute)\n {\n try {\n \n bclip.stop();\n \n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"Glitzville.wav\"); \n //if(lastpowerUp.equals(\"RAINBOW\"))\n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Starman.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n sclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n sclip.open(audioIn); \n \n sclip.start();\n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } \n }\n }",
"void unmute() {\n execute(\"player.muted = false\");\n }",
"public void setMute(boolean mute);",
"public static void toggleMute()\n\t{\n\t\tmute = !mute;\n\t\tif (mute)\n\t\t{\n\t\t\t// Stop all sounds\n\t\t\tmusic.stop();\n\t\t\tlaserContinuous.stop();\n\t\t\tlaser.stop();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Start sounds\n\t\t\tstartMusic();\n\t\t\tif (laserRunning)\n\t\t\t{\n\t\t\t\tlaserContinuous.loop();\n\t\t\t}\n\t\t}\n\t}",
"public void onLocalAudioMuteClicked(View view) {\n // Toggle audio mute.\n setAudioState(!mMuted);\n }",
"public boolean getMute();",
"public static void triggerHushMute(Context context) {\n // We can't call AudioService#silenceRingerModeInternal from here, so this is a partial copy of it\n int silenceRingerSetting = Settings.Secure.getIntForUser(context.getContentResolver(),\n Settings.Secure.VOLUME_HUSH_GESTURE, Settings.Secure.VOLUME_HUSH_OFF,\n UserHandle.USER_CURRENT);\n\n int ringerMode;\n int toastText;\n if (silenceRingerSetting == Settings.Secure.VOLUME_HUSH_VIBRATE) {\n ringerMode = AudioManager.RINGER_MODE_VIBRATE;\n toastText = com.android.internal.R.string.volume_dialog_ringer_guidance_vibrate;\n } else {\n // VOLUME_HUSH_MUTE and VOLUME_HUSH_OFF\n ringerMode = AudioManager.RINGER_MODE_SILENT;\n toastText = com.android.internal.R.string.volume_dialog_ringer_guidance_silent;\n }\n AudioManager audioMan = (AudioManager)\n context.getSystemService(Context.AUDIO_SERVICE);\n audioMan.setRingerModeInternal(ringerMode);\n Toast.makeText(context, toastText, Toast.LENGTH_SHORT).show();\n }",
"public void mute() {\n this.tv.setVolume(0);\r\n }",
"private void matikanAlarm() {\n\t\t\n\t\tif (mediaplayer.isPlaying() == true) {\n\t\t\t//matikan media player\n\t\t\tmediaplayer.pause();\n\t\t}\n\t\telse {\n\t\t\t//tidak melakukan apa apa\n\t\t}\t\t\t\t\n\t}",
"public void muteTimer(){\n\t\t//TODO: impl.\n\t\t/*\n\t\tThread worker;\n\t\t//do it in its own thread\n\t\tworker = new Thread() {\n \tpublic void run() {\n \t\t//mute and wait a bit (2s)\n \t\tmute();\n \t\ttry { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); }\n \t\t//then start checking for ILA actions\n \t\tint counter=100;\t\t//max wait 20s\n \t\twhile( (ILA_interface.avatar.isILAspeaking() || ILA_interface.avatar.is_recording==1) & counter>1 ){\n \t\t\tcounter--;\n \t\t\tILA_debug.println(\"ADDON-KODI - mute timer is waiting...\",2);\t\t\t//debug\n \t\t\ttry { Thread.sleep(200); } catch (InterruptedException e) { e.printStackTrace(); }\n \t\t}\n \t\t//timers are over: unmute\n \t\tunmute();\n \t}\n };\n worker.start();\n */\n\t}",
"public void setMute(boolean mute) {\n \t\tthis.mute = mute;\n \t}",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"private void setAudioState(boolean muted) {\n mMuted = muted;\n mRtcEngine.muteLocalAudioStream(mMuted);\n if (mMuted) {\n mMuteBtn.setImageResource(R.drawable.btn_mic_muted);\n } else {\n mMuteBtn.setImageResource(R.drawable.btn_mic_unmuted);\n }\n }",
"@Override\n public void onClick(View v) {\n Log.d(TAG, \"Set LCD mute ON. (display OFF)\");\n mDisplayControl.setMute(true);\n try{\n Thread.sleep(3000); //3000É~ÉäïbSleepÇ∑ÇÈ\n }catch(InterruptedException e){}\n\n Log.d(TAG, \"Set LCD mute OFF. (display ON)\");\n mDisplayControl.setMute(false);\n }",
"protected void muteSounds()\n {\n if(confused.isPlaying())\n confused.stop();\n }",
"public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }",
"@Override\n public void onSetMute(int result) {\n Log.d(\"DLNA\", \"onSetMute result:\" + result);\n }",
"protected void enableActionSetMute()\n {\n Action action = new Action(\"SetMute\");\n action.addInputParameter(new ParameterRelated(\"Value\", iPropertyMute));\n iDelegateSetMute = new DoSetMute();\n enableAction(action, iDelegateSetMute);\n }",
"public void play() \n{\n s = !s; \n if (s == false)\n {\n //pausets = millis()/4;\n controlP5.getController(\"play\").setLabel(\"Play\");\n } else if (s == true)\n {\n //origint = origint + millis()/4 - pausets;\n controlP5.getController(\"play\").setLabel(\"Pause\");\n }\n}",
"public void menu(){\n menuMusic.loop(pitch, volume);\n }",
"protected void enableActionMute()\n {\n Action action = new Action(\"Mute\");\n action.addOutputParameter(new ParameterRelated(\"Value\", iPropertyMute));\n iDelegateMute = new DoMute();\n enableAction(action, iDelegateMute);\n }",
"public void m12820g() {\n this.f10117d.mo1750d(this.f10114a, m12803a(C1478b.UNMUTE));\n }",
"public void play() {\n if (!isHungry()) {\n hunger += 2;\n mood += 2;\n fatigue += 3;\n\n if (!muted) {\n System.out.println(\"play\\t|\\tPlaying is fun!\");\n }\n }\n }",
"@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\n if(arg1){\n Log.d(TAG,\"Set audio mute ON.\");\n mAudioControl.setMute(true);\n }\n else{\n Log.d(TAG,\"set audio mute OFF.\");\n mAudioControl.setMute(false);\n }\n }",
"public void monsterSound(){\n System.out.println(\"\\n\\nYou hear gutteral moans and the shambling of a creature nearby.\\n\\n\");\n }",
"public void setMuted(boolean b)\n\t{\n\t\tm_isMuted = b;\n\t}",
"public void ChangeMusic(int musicnum, boolean looping);",
"public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"public void AudioMuerte() {\r\n\t\ttry {\r\n\t\t\tdeath.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\golpe.wav\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error: \" + e);\r\n\t\t}\r\n\t}",
"public void setSoundAmbience(final boolean sAmbience) { soundAmbience = sAmbience; }",
"public void updateVolume(){\r\n if(currentLoop0) backgroundMusicLoop0.gainControl.setValue(Window.musicVolume);\r\n else backgroundMusicLoop1.gainControl.setValue(Window.musicVolume);\r\n }",
"public void playGoombaSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, GOOMBA);\n\t}",
"public static void enableSound() {\n\t\tvelocity = 127;\n\t}",
"private void musicClicked() {\n MatchScreen.setMusicVolume(MatchScreen.getMusicVolume() == 0 ? 0.5f : 0);\n setSoundButtonColor(MatchScreen.getMusicVolume() == 0, music);\n }",
"static int bukkitToneAmount() { return 25; }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n sound_handler = menu.findItem(R.id.action_mute);\n if (!HelperClass.Sounds.app_sounds){\n sound_handler.setIcon(getResources().getDrawable(R.drawable.ic_action_volume_muted));\n } else{\n sound_handler.setIcon(getResources().getDrawable(R.drawable.ic_action_volume_on));\n }\n return true;\n }",
"public void onClick(View v) {\n if(DataHolder.theSoundSetting == 1){\n DataHolder.theSoundSetting = 2;\n modeButton.setText(\"Vibrate Only Mode\");\n }\n else if(DataHolder.theSoundSetting == 2){\n DataHolder.theSoundSetting = 3;\n modeButton.setText(\"Normal Mode\");\n }\n else if(DataHolder.theSoundSetting == 3){\n DataHolder.theSoundSetting = 4;\n modeButton.setText(\"Silent Mode\");\n }\n else if(DataHolder.theSoundSetting == 4){\n DataHolder.theSoundSetting = 1;\n modeButton.setText(\"Sound Only Mode\");\n }\n\n }",
"private void checkClicked()\n {\n if (Greenfoot.mouseClicked(this))\n {\n if (musicPlaying == true)\n {\n setImage(\"volumeOn.png\");\n GreenfootImage volumeOn = getImage();\n volumeOn.scale(70,70);\n setImage(volumeOn); \n soundtrack.playLoop();\n musicPlaying = false;\n }\n else if (musicPlaying == false)\n {\n setImage(\"volumeOff.png\");\n GreenfootImage volumeOff = getImage();\n volumeOff.scale(70,70);\n soundtrack.stop();\n musicPlaying = true;\n }\n }\n }",
"@Override\n\tpublic void run() {\n\t\t\n\t\t\n\t\ttry {\n\t\t\tMusiikki.rajahdysaani = new Sound(\"res/shell1.ogg\");\n\t\t\tMusiikki.tykkiaani = new Sound(\"res/gun.ogg\");\n\t\t\tMusiikki.musiikki = new Music(\"res/sendme.ogg\");\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tMusiikki.musiikki.setVolume(1/2);\n\t\tMusiikki.musiikki.loop();\n\t\t\n\t}",
"public boolean setPropertyMute(boolean aValue);",
"public void ReproduceAudio() { \r\n\t\ttry {\r\n\t\t\t//en caso de que como nombre pongas \"undertale\" la musica sera diferente.\r\n\t\t\tif (Menu.jugador.equals(\"undertale\") || Menu.jugador.equals(\"Undertale\")) {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\undertale.wav\");\r\n\t\t\t\t//emppieza la musica\r\n\t\t\t\trepro.Play();\r\n\t\t\t//musica por defecto\r\n\t\t\t} else {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\tetris.mp3\");\r\n\t\t\t\trepro.Play();\r\n\t\t\t}\t\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Error: \" + ex.getMessage());\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void OnAttackCommand() {\n\t\tsuper.OnAttackCommand();\n\t\tSoundManage.playSound(atkSound1);\n\t}",
"void togglePlay();",
"@Override\n public void handleNodeMuted() {\n setLocalFlowUnit(SymptomFlowUnit.generic());\n }",
"public void toggleMusic() {\n this.musicEnabled = !this.musicEnabled;\n }",
"public void togglePlay() { }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tString aString = TestUtils.getStreamVoice(\"ToneTest\");\n\t\t\t\tint i = Integer.valueOf(aString).intValue();\n\t\t\t\tDswLog.e(TAG, \"i = \" + i);\n\t\t\t\tif (null != mAudioManager) {\n\t\t\t\t\tint maxVol = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);\n\t\t\t\t\tDswLog.e(TAG, \" set stream = music \");\n\t\t\t\t\tmAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, maxVol - i, 0);\n\t\t\t\t\tDswLog.e(TAG, \"maxVol = \" + maxVol + \" setStreamVolume = \" + (maxVol - i));\n\t\t\t\t}\n\t\t\t\t//Gionee <GN_BSP_AutoMMI> <chengq> <20170505> modify for ID 129027 end\n\t\t\t\tgenTone();\n\t\t\t\tplaySound();\n\t\t\t}",
"@Override\r\n\tpublic void sound() {\r\n\t\tsuper.sound();\r\n\t\tSystem.out.println(\"SportsCar sound: Vutututututu\");\r\n\t}",
"@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_m);\n TampilGambar.startAnimation(animScale);\n suaraM.start();\n }",
"public void setVolume(int level);",
"public void toggle() {\n if (volume == 1f) {\n volume = 0f;\n }\n else if (volume == 0f) {\n volume = 1f;\n }\n\n }",
"public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}",
"public boolean toggleMute() {\n SoundPlayer.toggleMusicMute();\n SoundPlayer.toggleSoundFxMute();\n muted = !muted;\n return muted;\n }",
"public void playLoseSounds(){\r\n try {\r\n File mFile = new File(Filepath4);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput5 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip5 = AudioSystem.getClip();\r\n clip5.open(audioInput5);\r\n FloatControl gainControl5 = (FloatControl) clip5.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl5.setValue(-8.0f); //reduces the volume by 8 decibels\r\n clip5.start();\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public void enablePropertyMute()\n {\n iPropertyMute = new PropertyBool(new ParameterBool(\"Mute\"));\n addProperty(iPropertyMute);\n }",
"public void gameOver(){\n gameOverMusic.loop(pitch, volume);\n }",
"public boolean sendMute(char ch) {\n\t\tCmdRet ret = busyboxCmd(\"echo \\\"m\" + ch + \"\\\" > \" + PATH);\n\t\treturn ret.retCode == 0;\n\t}",
"boolean getShutterSoundPref();",
"public void mp3(View view) {\n mp1 = MediaPlayer.create(this, R.raw.heyjude);\n mp1.setLooping(false);\n mp1.setVolume(100, 100);\n mp1.start();\n }",
"@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_w);\n TampilGambar.startAnimation(animScale);\n suaraW.start();\n }",
"@Override\n public void onClick(View v) {\n if (v == audio) {\n playTheSound(imgPos);\n stop.setVisibility(View.VISIBLE);\n audio.setVisibility(View.INVISIBLE);\n\n //Pareil que pour le bouton audio en inversant les rôles\n }\n\n if (v == stop) {\n playTheSound(imgPos);\n stopTheSound();\n stop.setVisibility(View.INVISIBLE);\n audio.setVisibility(View.VISIBLE);\n }\n }",
"void volume(double volume) {\n execute(\"player.volume = \" + volume);\n }",
"void setSound(boolean b){\r\n\t\tgc.setSound(b);\r\n\t}",
"private void volumeIconChanger() {\n\t\tif (volume == 0.0) {\n\t\t\tmuteIcon.setVisible(true);\n\t\t\tvolumeLowIcon.setVisible(false);\n\t\t\tvolumeMidIcon.setVisible(false);\n\t\t\tvolumeHighIcon.setVisible(false);\n\t\t} else if (volume > 0 && volume <= 0.3) {\n\t\t\tmuteIcon.setVisible(false);\n\t\t\tvolumeLowIcon.setVisible(true);\n\t\t\tvolumeMidIcon.setVisible(false);\n\t\t\tvolumeHighIcon.setVisible(false);\n\t\t} else if (volume > 0.3 && volume <= 0.7) {\n\t\t\tmuteIcon.setVisible(false);\n\t\t\tvolumeLowIcon.setVisible(false);\n\t\t\tvolumeMidIcon.setVisible(true);\n\t\t\tvolumeHighIcon.setVisible(false);\n\t\t} else if (volume > 0.7 && volume <= 1) {\n\t\t\tmuteIcon.setVisible(false);\n\t\t\tvolumeLowIcon.setVisible(false);\n\t\t\tvolumeMidIcon.setVisible(false);\n\t\t\tvolumeHighIcon.setVisible(true);\n\t\t}\n\t}",
"@Override\r\n\t\tpublic void dmr_setMute(boolean mute) throws RemoteException {\n\t\t\tmAmanager.setStreamMute(AudioManager.STREAM_MUSIC, mute);\r\n\t\t\tUtils.printLog(TAG, \"mAmanager.setStreamMute()\" + mute);\r\n\t\t}",
"public void updateAmmo(){\n if(shots >= 9999)\n shots = 9999;\n ammo.setText(\"x\" + String.format(\"%04d\", shots));\n }",
"private void soundClicked() {\n Sounds.setVolume(Sounds.getVolume() == 0 ? 1 : 0);\n setSoundButtonColor(Sounds.getVolume() == 0, sound);\n }",
"public abstract SoundPlayer setVolume(int volume);",
"public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }",
"public boolean getPropertyMute();",
"private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }",
"@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_u);\n TampilGambar.startAnimation(animScale);\n suaraU.start();\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tif (mTakeCallback != null) {\n\t\t\t\tmTakeCallback.takeEnd();\n\t\t\t}\n\t\t\tif (MainActivity.volume == MainActivity.VOLUME_MUTE) {\n\t\t\t\tCamera.Parameters params = mCamera.getParameters();\n\t\t\t\tparams.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);\n\t\t\t\tmCamera.setParameters(params);\n\t\t\t}\n\t\t\t\n\t\t}",
"public void endSound()\n {\n if(!mute)\n {\n try {\n if(lastpowerUp.equals(\"RAINBOW\"))\n {\n sclip.stop();\n bclip.start();\n bclip.loop(Clip.LOOP_CONTINUOUSLY);\n }\n // Open an audio input stream.\n URL url = this.getClass().getClassLoader().getResource(\"Silence.wav\"); \n \n if(lastpowerUp.equals(\"BLUE\"))\n url = this.getClass().getClassLoader().getResource(\"Out Of Bounds Stop.wav\");\n else if(lastpowerUp.equals(\"YELLOW\")||lastpowerUp.equals(\"DOUBLE\") || lastpowerUp.equals(\"WHITE\") || (lastpowerUp.equals(\"TROLL\") && modeT))\n url = this.getClass().getClassLoader().getResource(\"Mushroom Down.wav\") ;\n else if(lastpowerUp.equals(\"BLACK\") || lastpowerUp.equals(\"TROLL\"))\n url = this.getClass().getClassLoader().getResource(\"Invisible Off.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn); \n \n clip.start();\n \n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n \n } \n }\n }",
"void setValueMixerSound(int value);",
"Boolean isMuted() {\n return execute(\"player.muted\");\n }",
"public void explode() {\n MediaPlayer explode = MediaPlayer.create(context, R.raw.explode);\n explode.setVolume(volume, volume);\n if (volume == 1f) {\n explode.setVolume(0.7f, 0.7f);\n }\n explode.start();\n explode.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n mediaPlayer.reset();\n mediaPlayer.release();\n }\n });\n }",
"public static void musicMainMenu(){\n\t\ttry {\r\n\t\t\tbgmusic = new Music(\"res/otherSounds/Menu.wav\");\r\n\t\t\tbgmusic.loop(1f, 0.2f);\r\n\t\t\t//System.out.println(bgmusic.getVolume()); \t\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void setAudioProfilModem() {\n int ringerMode = mAudioManager.getRingerModeInternal();\n ContentResolver mResolver = mContext.getContentResolver();\n Vibrator vibrator = (Vibrator) mContext\n .getSystemService(Context.VIBRATOR_SERVICE);\n boolean hasVibrator = vibrator == null ? false : vibrator.hasVibrator();\n if (AudioManager.RINGER_MODE_SILENT == ringerMode) {\n if (hasVibrator) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE);\n /* @} */\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_ON);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_ON);\n } else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n /* @} */\n }\n } else if (AudioManager.RINGER_MODE_VIBRATE == ringerMode) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_OUTDOOR);\n /* @} */\n }else if (AudioManager.RINGER_MODE_OUTDOOR == ringerMode) {//add by wanglei for outdoor mode\n Settings.System.putInt(mResolver,Settings.System.SOUND_EFFECTS_ENABLED, 1);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n }else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_SILENT);\n /* @} */\n if (hasVibrator) {\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_OFF);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_OFF);\n }\n }\n }",
"@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_t);\n TampilGambar.startAnimation(animScale);\n suaraT.start();\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tMainMusic.setVolume(0,0);\n\t\t\n\t}",
"@Test\n\tpublic void addButtons__wrappee__MuteTest() throws Exception {\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.ogg &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.volumecontrol &&\n\t\t\t\tConfiguration.shufflerepeat &&\n\t\t\t\tConfiguration.playlist &&\n\t\t\t\tConfiguration.mute\n\t\t) {\t\n\t\t\tstart();\n\n\t\t\t\n\t\t\tWhitebox.invokeMethod(gui, \"addButtons__wrappee__Mute\");\n\t\t\tJButton btnmute = (JButton) MemberModifier.field(Application.class, \"btnmute\").get(gui);\n\t\t\tassertTrue(btnmute.getIcon().toString().contains(\"unmute.png\"));\n\t\t}\n\t}",
"protected void stopTheSound(){\n mp.stop();\n }",
"@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_l);\n TampilGambar.startAnimation(animScale);\n suaraL.start();\n }",
"@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_abu);\n TampilGambar.startAnimation(animScale);\n suara0.start();\n }",
"private void playSilence(){\n frameIterator = SilentMediaReader.getInstance();\n updateCurrentMedia(null);\n status = Status.PLAYING_SILENCE;\n for (StreamListener listener : streamListeners) {\n listener.mediaChanged();\n }\n }",
"@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_s);\n TampilGambar.startAnimation(animScale);\n suaraS.start();\n }",
"public void playThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, THEME);\n\t}",
"@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_p);\n TampilGambar.startAnimation(animScale);\n suaraP.start();\n }",
"public void pauseHumans()\n\t{\n\t\tpause(IS_HUMAN);\n\t}",
"@Override\n\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\t\tAtcSettings.Audio.SetMicMute(arg1);\n\t\tif (arg1) {\n\t\t\tm_micmute_cb.setChecked(true);\n\t\t}else{\n\t\t\tm_micmute_cb.setChecked(false);\n\t\t}\n\t}",
"public void playTopHat() {\n\t\tSystem.out.println(\"ding ding da-ding\");\n\t\t\n\t}",
"public void sleep() {\n hunger += 1;\n fatigue = 0;\n\n if (isHungry()) {\n mood -= 1;\n } else {\n mood += 1;\n }\n\n if (!muted) {\n System.out.println(\"sleep\\t|\\tzzzZZZ *sheep*\");\n }\n }"
] | [
"0.73016477",
"0.69066566",
"0.69045126",
"0.69034714",
"0.6709238",
"0.6605204",
"0.65602434",
"0.6536738",
"0.65235287",
"0.6521961",
"0.63842124",
"0.637334",
"0.6334711",
"0.6267413",
"0.6227481",
"0.61964375",
"0.6162083",
"0.6135646",
"0.61284536",
"0.6070203",
"0.60519123",
"0.6039936",
"0.60261816",
"0.60231805",
"0.59993505",
"0.59937966",
"0.59896594",
"0.5971166",
"0.5957108",
"0.59391546",
"0.592033",
"0.5904694",
"0.59043854",
"0.58976585",
"0.5871919",
"0.5867278",
"0.5856644",
"0.5849195",
"0.58489907",
"0.5845509",
"0.5838885",
"0.5804616",
"0.5799942",
"0.5797266",
"0.5796436",
"0.57776976",
"0.5772349",
"0.57345927",
"0.5730547",
"0.57262635",
"0.57140267",
"0.5709954",
"0.570926",
"0.57081455",
"0.5703924",
"0.57013774",
"0.5697533",
"0.56936616",
"0.56857556",
"0.56815934",
"0.5680385",
"0.5676352",
"0.56635857",
"0.56534505",
"0.5646373",
"0.56444716",
"0.5637743",
"0.5633313",
"0.562977",
"0.5628099",
"0.56279844",
"0.5625887",
"0.56250215",
"0.562241",
"0.5621606",
"0.5620338",
"0.5608549",
"0.5604867",
"0.5603564",
"0.5602904",
"0.56028914",
"0.5600879",
"0.5592617",
"0.5592353",
"0.55852634",
"0.5582602",
"0.5580456",
"0.5577387",
"0.5572581",
"0.5570358",
"0.5565345",
"0.55591786",
"0.55434054",
"0.55407727",
"0.55403465",
"0.55377424",
"0.5535676",
"0.5535391",
"0.5532389",
"0.55170524"
] | 0.6389625 | 10 |
Directly sends a message to a hub. | private boolean directlyToHub(DirectSocketAddress hub, ClientMessage cm) {
HubConnection c = connections.getHub(hub);
if (c != null) {
return c.forwardClientMessage(cm);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void send(Message msg);",
"public void sendMessage(Message msg) {\n network.sendAsync(msg);\n }",
"void send(IMessage message, IChannel channel);",
"public void send(Message message) {\r\n channel.writeAndFlush(message);\r\n }",
"public void sendMessage ( String message ) {\n\t\texecute ( handle -> handle.sendMessage ( message ) );\n\t}",
"@Override\r\n\tpublic void sendMessage(String message) {\n\t\tmediator.send(message, this);\r\n\t}",
"void send(String message);",
"public void sendMessage(String message) {}",
"public void sendPublicMessage(SensorMessage message) {\n \tpublicSender.send(message);\n }",
"public void sendMessage(NetMessage message) {\n ClientDirector.getDataManager().sendMessage(message);\n }",
"@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}",
"public void sendMessage(String message);",
"public void sendRawMessage ( String message ) {\n\t\texecute ( handle -> handle.sendRawMessage ( message ) );\n\t}",
"public void sendMessage ( UUID sender , String message ) {\n\t\texecute ( handle -> handle.sendMessage ( sender , message ) );\n\t}",
"public final void send(MidiMessage msg) {\n device.send(msg);\n }",
"public void sendRawMessage ( UUID sender , String message ) {\n\t\texecute ( handle -> handle.sendRawMessage ( sender , message ) );\n\t}",
"public void sendChannelMessage(String msg) throws RemoteException {\n if(mService.isConnected()) {\n try {\n IJumbleService binder = mService.getBinder();\n\n int channelId = mService.getBinder().getSessionChannel().getId();\n binder.sendChannelTextMessage(channelId, msg, false);\n }\n catch(NullPointerException e) {\n Log.d(TAG, \"Unable to send command '\" + msg + \"': \" + e);\n }\n }\n }",
"public static void sendMessage(String message) throws IOException {\n controllerChannel.basicPublish(\n \"\",\n CONTROLLER_QUEUE_NAME,\n null,\n message.getBytes());\n }",
"@Override\n\tpublic void send(String msg) {\n\t}",
"@Override\n\tpublic void Send(String message) {\n\t\tgetReceiveArea().append(\"我:\"+message + \"\\n\");\n\t\tgetMediator().sendMessage(getName(), message);\n\t}",
"public static void sendMessage(String message) {\r\n\t\tbtService.write(message.getBytes());\r\n\t}",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"public void sendMessage(String message) {\n\n setChanged();\n notifyObservers(message);\n }",
"@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }",
"private void send(byte[] message)\n\t\t\tthrows IOException\n\t{\n\t\tchannel.basicPublish(BUNGEECORD_QUEUE, \"\", null, message);\n\t}",
"public static void sendMessage(String message) {\n getBwapi().sendText(message);\n }",
"void send(String message, String uri);",
"public void send(final ControlMessage.ClientToDriverMessage message) {\n // This needs active 'link' between the driver and client.\n // For the link to be alive, the driver should connect to DriverRPCServer.\n // Thus, the server must be running to send a message to the driver.\n ensureServerState(true);\n if (link == null) {\n throw new RuntimeException(\"The RPC server has not discovered NemoDriver yet\");\n }\n link.write(message.toByteArray());\n }",
"void sendMessage(String msg);",
"@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}",
"public void sendMessage(String message) {\r\n sendMessageAsByte(message.getBytes());\r\n }",
"public void sendMessage(String message) {\n\t\tif (!connectionActive()) {\n\t\t\tthrow new IllegalOperationException(\"Cannot send a message if you are not connected to a server!\\n\");\n\t\t}\n\t\tMessage bctMessage = Message.makeBroadcastMessage(userName, message);\n\t\tsocketConnection.print(bctMessage);\n\t}",
"@SuppressWarnings(\"WeakerAccess\")\n\tpublic void sendMessage(@NonNull BroadcastMessage message) {\n\t\tmDelegate.sendMessage(message);\n\t}",
"public void send(Address from, String message);",
"public void send(String msg) {\n CompletableFuture.runAsync(() -> serverCon.send(msg));\n }",
"<T> Promise<Message<T>> send(String address, Short message);",
"@Override\n\tpublic void sendMsg(String msg) {\n\n\t}",
"protected abstract void send(final IMessageWrapper message, final ISender sender);",
"public void sendSignal (String signal, String message ){\r\n if (btSocket != null)\r\n {\r\n try{\r\n btSocket.getOutputStream().write(signal.getBytes());\r\n msg(message,0);\r\n } catch (IOException e) {\r\n msg(\"Error\", 0);\r\n }\r\n }\r\n\r\n }",
"@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }",
"public abstract void send(String message) throws IOException;",
"public static void Send(Message message)\n\t{\n\t\ttry\n\t\t{\n\t\t\t_sendBuf = toByteArray(message);\n\n\t\t\t//dc message\n\t\t\tif (message.getRecipient().equalsIgnoreCase(\"\") &&\n\t\t\t\tmessage.getMessage().equalsIgnoreCase(\"%BYE%\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent BYE\");\n\t\t\t\t_socket.getOutputStream().write(Message.BYE);\n\t\t\t}\n\t\t\t//lobby message\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent LOBBY\");\n\t\t\t\t_socket.getOutputStream().write(Message.LOBBY);\n\t\t\t}\n\t\t\t//search request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"all\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent SEARCH\");\n\t\t\t\t_socket.getOutputStream().write(Message.SEARCH);\n\t\t\t}\n\t\t\t//answer request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"server\") &&\n\t\t\t\t\t message.getOrigin().equalsIgnoreCase(\"none\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent CHOICE\");\n\t\t\t\t_socket.getOutputStream().write(Message.CHOICE);\n\t\t\t}\n\t\t\t//whisper message\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent WHISPER\");\n\t\t\t\t_socket.getOutputStream().write(Message.WHISPER);\n\t\t\t}\n\t\t\t_socket.getOutputStream().write(_sendBuf);\n\t\t\t_socket.getOutputStream().flush();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public abstract void message(String channel, String message);",
"public void sendMessage(String message) {\n\t\tsocketTextOut.println(message);\n\t\tsocketTextOut.flush();\n\t}",
"public void sendMessageToClient(Object message, String username) {\n\n }",
"public void send() {\n\t}",
"public void sendCommand(Command cmd);",
"@Override\n\tpublic void messageSent(IoSession arg0, Object arg1) throws Exception {\n\n\t}",
"@Override\n\tpublic void messageSent(IoSession arg0, Object arg1) throws Exception {\n\n\t}",
"@Override\n\tpublic void SendMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tprintWriters.get(clients.get(0)).println(message);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}",
"@Override\n public void sendMessage(Message<JsonPayload> message) throws IOException {\n System.out.println(\"Trying to send a message...\");\n outputMessageStream.write(message.getContent().getJson());\n outputMessageStream.newLine();\n outputMessageStream.flush();\n socket.shutdownOutput();\n }",
"@Override\n public void send(String message) {\n\n out.println(message);\n out.flush();\n\n }",
"public void sendMessage(final String message) {\n\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n\n if (null != sendBuffer) {\n Log.d(TAG, \"Sending: \" + message);\n sendBuffer.println(message);\n sendBuffer.flush();\n }\n }\n };\n\n Thread thread = new Thread(runnable);\n thread.start();\n }",
"public void broadcast(Object msg);",
"void send();",
"protected void sendMessage(final String message) {\n\n logger.debug(LOG_TAG + \".sendMessage()\");\n\n // send message to client\n printWriter.println(message);\n\n }",
"public void sendMessage(Message message) {\r\n\t\tObjectOutputStream out;\r\n\t\ttry {\r\n\t\t\tout = new ObjectOutputStream(client.getSocket().getOutputStream());\r\n\t\t\tout.writeObject(message);\r\n\t\t\tout.flush();\r\n\t\t} catch (IOException e) {\r\n\t\t\texceptionLogger.writeException(Level.SEVERE,\r\n\t\t\t\t\tMessages.getString(\"Controller.IOExceptionNachricht\")); //$NON-NLS-1$\r\n\t\t}\r\n\t}",
"private void sendBroadcast(final String message) {\n Log.d(\"BLE\", \"sendBroadcast: \" + message);\n\n Intent intent = new Intent(message);\n\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }",
"@Override\n\tpublic void send(DuDuMessage message, Object sessionToken) {\n\t\t\n\t}",
"private <T extends QMessage> void sendTestMsg(T msg) {\n\n\t\ttry {\n\t\t\tString token = KeycloakUtils.getAccessToken(\"http://keycloak.genny.life\", \"genny\", \"genny\",\n\t\t\t\t\t\"056b73c1-7078-411d-80ec-87d41c55c3b4\", \"user1\", \"password1\");\n\t\t\tmsg.setToken(token);\n\n\t\t\t/* get the bridge url to publish the message to webcmd channel */\n\t\t\tString bridgetUrl = ENV_GENNY_BRIDGE_URL + \"/api/service?channel=webdata\";\n\n\t\t\tQwandaUtils.apiPostEntity(bridgetUrl, JsonUtils.toJson(msg), token);\n\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}",
"public abstract void sendMessage(String message);",
"public void sendMessage(Message message)\r\n {\r\n message.setGroup(this);\r\n for(int i = 0; i < getEndpoints().size(); i++)\r\n {\r\n getEndpoints().get(i).sendMessage(message);\r\n }\r\n }",
"public void sendMessage(String msg) {\n\t\tplayer.sendMessage(msg);\n\t}",
"public void sendChat(String message) {\r\n connection.chat(message);\r\n }",
"public synchronized void send(String message) {\n writer.println(message);\n writer.flush();\n }",
"private void sendMessageToClient(String message) {\n try {\n outputStream.writeObject(message);\n outputStream.flush();\n } catch (IOException e) {\n System.out.println(\"Erreur lors de l'envoi du message au client\");\n }\n }",
"private void sendMessage(String message) {\n if (mApiClient != null && mQuizCastChannel != null) {\n try {\n Cast.CastApi.sendMessage(mApiClient,\n mQuizCastChannel.getNamespace(), message)\n .setResultCallback(new ResultCallback<Status>() {\n @Override\n public void onResult(Status result) {\n if (!result.isSuccess()) {\n Log.e(context.getString(R.string.LOGTAG), \"Sending message failed\");\n }\n }\n });\n } catch (Exception e) {\n Log.e(context.getString(R.string.LOGTAG), \"Exception while sending message\", e);\n }\n } else {\n Log.d(context.getString(R.string.LOGTAG), \"Sent message successfully\");\n Log.d(context.getString(R.string.LOGTAG), message);\n }\n }",
"private void sendMessage(ProtocolMessage msg, SocketChannel channel) throws IOException {\n\t\tchannel.write(ProtocolMessage.toBytes(msg));\n\t}",
"public void send(ECPacket message)\n\t{\n\t\tif (FMLCommonHandler.instance().getEffectiveSide().isClient())\n\t\t{\n\t\t\tthis.sendToServer(message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.sendToAll(message);\n\t\t}\n\t}",
"void sendMessage() {\n\n\t}",
"public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}",
"public void sendMessage(String message){\n pw.print(message);\n pw.flush();\n }",
"public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }",
"public void send(String message) {\n byte[] data = message.getBytes(Charset.forName(\"UTF-8\"));\n final Payload payload = new Payload(OPCODE_TEXT, data);\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n webSocketConnection.sendInternal(payload);\n }\n\n }).start();\n }",
"public void sendMessage(String message){\n\t if (mOut != null && !mOut.checkError()) {\n\t mOut.println(message+\"\\n\");\n\t mOut.flush();\n\t }\n\t }",
"public void send(String msg) throws CcException\n {\n commWriter.send(msg);\n }",
"public void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Exception writing to server: \" + e);\n\t\t}\n\t}",
"public static void hub(String hubName, Player target, CommandSender sender) {\n World w = Bukkit.getServer().getWorld(FileManager.getHubYml().getString(\"HUBS.\" + hubName + \".world\"));\n double x = FileManager.getHubYml().getDouble(\"HUBS.\" + hubName + \".x\");\n double y = FileManager.getHubYml().getDouble(\"HUBS.\" + hubName + \".y\");\n double z = FileManager.getHubYml().getDouble(\"HUBS.\" + hubName + \".z\");\n int ya = FileManager.getHubYml().getInt(\"HUBS.\" + hubName + \".yaw\");\n int pi = FileManager.getHubYml().getInt(\"HUBS.\" + hubName + \".pitch\");\n target.teleport(new Location(w, x, y, z, ya, pi));\n String name = target.getDisplayName();\n String or = (ChatColor.translateAlternateColorCodes('&', MessageManager.getMessageYml().getString(\"Hub.Target\")));\n String replace = or.replaceAll(\"%target%\", name).replaceAll(\"%hub%\", hubName);\n sender.sendMessage(target + replace);\n if (Main.plugin.getConfig().getString(\"NOTIFICATIONS.Hub\").equalsIgnoreCase(\"True\")) {\n String original = (MessageManager.getMessageYml().getString(\"Hub.Hub\"));\n String replaced = original.replaceAll(\"%hub%\", hubName);\n target.sendMessage(MessageManager.getPrefix() + ChatColor.translateAlternateColorCodes('&', replaced));\n }\n }",
"@Override\n\tpublic void sendMsg(MsgVO mvo) {\n\t\tsession.insert(namespace + \".sendMsg\", mvo);\n\t}",
"<T> Promise<Message<T>> send(String address, Integer message);",
"void send(WebhookMessage msg);",
"<T> Promise<Message<T>> send(String address, Byte message);",
"<T> Promise<Message<T>> send(String address, Float message);",
"private void sendConnectorMessage(final EcologyMessage message) {\n getConnectorHandler().post(new Runnable() {\n @Override\n public void run() {\n connector.sendMessage(message);\n }\n });\n }",
"public void sendMessage(String message) {\n try {\n bos.write(message);\n bos.newLine();\n bos.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void send(Opcode opcode);",
"public void sendMessage(final SendenDevice device, MessageWrapper message) {\n // Set the actual device to the message\n message.setSendenDevice(wiFiP2PInstance.getThisDevice());\n\n new AsyncTask<MessageWrapper, Void, Void>() {\n @Override\n protected Void doInBackground(MessageWrapper... params) {\n if (device != null && device.getDeviceServerSocketIP() != null) {\n try {\n Socket socket = new Socket();\n socket.bind(null);\n\n InetSocketAddress hostAddres = new InetSocketAddress(device.getDeviceServerSocketIP(), device.getDeviceServerSocketPort());\n socket.connect(hostAddres, 2000);\n\n Gson gson = new Gson();\n String messageJson = gson.toJson(params[0]);\n\n OutputStream outputStream = socket.getOutputStream();\n outputStream.write(messageJson.getBytes(), 0, messageJson.getBytes().length);\n\n Log.d(TAG, \"Sending data: \" + params[0]);\n\n socket.close();\n outputStream.close();\n } catch (IOException e) {\n Log.e(TAG, \"Error creating client socket: \" + e.getMessage());\n }\n }\n\n return null;\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, message);\n }",
"void sendMessage(VoidMessage message, String id);",
"public void sendMessage(String message) {\r\n\r\n synchronized (this) {\r\n //count++;\r\n if (mBufferOut != null && !mBufferOut.checkError()) {\r\n Log.i(TAG, \"message: \" + message);\r\n mBufferOut.print(message);\r\n mBufferOut.flush();\r\n }\r\n }\r\n }",
"public void send(String message) throws IOException {\r\n OutputStream stream = socket.getOutputStream();\r\n PrintWriter writer = new PrintWriter(stream);\r\n writer.println(message);\r\n writer.flush();\r\n }",
"public void sendMessage(byte[] message) {\n\t\ttry {\n\t\t\ttoBeSent.put(message);\n\t\t} catch (InterruptedException e) { }\n\t}",
"public static void hub(String hubName, Player player) {\n World w = Bukkit.getServer().getWorld(FileManager.getHubYml().getString(\"HUBS.\" + hubName + \".world\"));\n double x = FileManager.getHubYml().getDouble(\"HUBS.\" + hubName + \".x\");\n double y = FileManager.getHubYml().getDouble(\"HUBS.\" + hubName + \".y\");\n double z = FileManager.getHubYml().getDouble(\"HUBS.\" + hubName + \".z\");\n int ya = FileManager.getHubYml().getInt(\"HUBS.\" + hubName + \".yaw\");\n int pi = FileManager.getHubYml().getInt(\"HUBS.\" + hubName + \".pitch\");\n player.teleport(new Location(w, x, y, z, ya, pi));\n String original = (MessageManager.getMessageYml().getString(\"Hub.Hub\"));\n String replaced = original.replaceAll(\"%hub%\", hubName);\n player.sendMessage(MessageManager.getPrefix() + ChatColor.translateAlternateColorCodes('&', replaced));\n }",
"void send() throws ImsException;",
"public void sendMessage(String message) {\n\t\ttry {\n\t\t\tout.writeUTF(message);\n\t\t\tserver.CommunicationLog.info(\"Sent:\" + message + \" to \" + clientSocket.getInetAddress().toString());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void send(Object o) {\n bus.onNext(o);\n }",
"public void sendMessage(Message message) {\n if (accepted || !ended || message.type.equals(\"register\") || message.type.equals(\"lobby\")) {\n message.packetNum = packetNum;\n ByteBuffer buffer = ByteBuffer.wrap(SerializationUtils.serialize(message));\n SocketAddress addr = null;\n try {\n addr = client.getLocalAddress();\n log(\"sending [\" + message + \"] to \" + addr);\n client.write(buffer);\n reconciliation.add(message);\n packetNum++;\n } catch (IOException e) {\n error(\"Failed to send message to:\" + addr);\n e.printStackTrace();\n }\n }\n }",
"public static void opBroadcast(String message){\n JawaChat.opsOnline.values().forEach((target) -> {\n target.sendMessage(message);\n });\n logMessage(message, \"op channel\");\n }",
"<T> Promise<Message<T>> send(String address, Double message);",
"protected void sendMessage(Message message) {\n\t\tif(mHandler != null) {\n\t\t\tmHandler.sendMessage(message);\n\t\t} else {\n\t\t\thandleMessage(message);\n\t\t}\n\t}",
"@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}"
] | [
"0.711589",
"0.7058892",
"0.7039943",
"0.69335914",
"0.69072014",
"0.68308294",
"0.67185926",
"0.67069966",
"0.6688802",
"0.66699857",
"0.66698253",
"0.66650945",
"0.6577698",
"0.65696007",
"0.65267813",
"0.64691883",
"0.64326525",
"0.6415971",
"0.64041686",
"0.64037997",
"0.6388545",
"0.63738245",
"0.6366934",
"0.63668346",
"0.6366245",
"0.63624465",
"0.6340526",
"0.6338538",
"0.6337846",
"0.6325871",
"0.6318587",
"0.63084066",
"0.6248434",
"0.61739385",
"0.616469",
"0.6162761",
"0.61552185",
"0.6140934",
"0.61358374",
"0.6130351",
"0.6128425",
"0.61248934",
"0.6122866",
"0.61135787",
"0.6089725",
"0.6088164",
"0.60764974",
"0.6067526",
"0.6067526",
"0.60620964",
"0.6060882",
"0.6060015",
"0.6055131",
"0.60532564",
"0.604235",
"0.6036862",
"0.6035684",
"0.6034762",
"0.60280967",
"0.6025913",
"0.60258454",
"0.60184824",
"0.60072",
"0.5995388",
"0.59890425",
"0.5988366",
"0.5986136",
"0.5979981",
"0.5974832",
"0.5972076",
"0.59675634",
"0.5951422",
"0.5950755",
"0.5945126",
"0.5944373",
"0.5934694",
"0.59287107",
"0.592505",
"0.59139407",
"0.5898205",
"0.58906037",
"0.58863264",
"0.5876064",
"0.58734304",
"0.5868178",
"0.58651197",
"0.5853651",
"0.585294",
"0.58510274",
"0.5848685",
"0.5847614",
"0.58405614",
"0.58386695",
"0.5837478",
"0.5824743",
"0.5816675",
"0.58115476",
"0.58114994",
"0.58087456",
"0.58062"
] | 0.61254835 | 41 |
Tries to forward a message to a given proxy, directly or indirectly. | private void forwardMessageToHub(HubDescription p, ClientMessage cm) {
if (meslogger.isDebugEnabled()) {
meslogger.debug("Attempting to forward message to hub "
+ p.hubAddress);
}
if (directlyToHub(p.hubAddress, cm)) {
if (meslogger.isDebugEnabled()) {
meslogger.debug("Succesfully forwarded message to hub "
+ p.hubAddressAsString + " using direct link");
}
stats.infoMessagesForwarded++;
return;
}
if (cm.hopsLeft == 0) {
if (meslogger.isInfoEnabled()) {
meslogger
.info("Failed to forward message to hub "
+ p.hubAddressAsString
+ " and we are not allowed to use"
+ " an indirection!");
}
stats.infoMessagesDropped++;
return;
}
if (meslogger.isDebugEnabled()) {
meslogger.debug("Failed to forward message to hub "
+ p.hubAddressAsString + " using direct link, "
+ "trying indirection");
}
// We don't have a direct connection, but we should be able to reach the
// proxy indirectly
HubDescription p2 = p.getIndirection();
if (p2 == null) {
// Oh dear, we don't have an indirection!
meslogger.warn("Cannot forward message. No route to hub: " + p.hubAddressAsString
+ " (indirection address is null!)");
stats.infoMessagesDropped++;
return;
}
if (directlyToHub(p2.hubAddress, cm)) {
if (meslogger.isDebugEnabled()) {
meslogger.debug("Succesfully forwarded message to hub "
+ p2.hubAddressAsString + " using direct link");
}
stats.infoMessagesForwarded++;
return;
}
if (meslogger.isInfoEnabled()) {
meslogger.info("Failed to forward message to hub "
+ p.hubAddressAsString + " or it's indirection "
+ p2.hubAddressAsString);
}
stats.infoMessagesDropped++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void forward(IMessage message, IChannel sender);",
"@Override\n public void sendToProxy(String message) {\n }",
"public final Message forwardMessage(ForwardMessageToSend fts)\n\t{\n\t\tif(fts == null)\n\t\t\treturn null;\n\t\treturn rm.forwardMessage(fts);\n\t}",
"public void forward() {\n callFunction(\"forward\");\n }",
"public SuperPeer forward(String command, Message message) {\n IPv4 neighbor;\n Socket nSock;\n DataOutputStream toNeighbor;\n\n message.decrementTTL().setSender(this.getAddress());\n for (String n : this.neighbors) {\n try {\n this.log(String.format(\"-> Forwarding '%s %s' to (%s)\", command, message, n));\n neighbor = new IPv4(n);\n // forward the message to each, with the TTL decremented\n nSock = new Socket(neighbor.getAddress(), neighbor.getPort());\n toNeighbor = new DataOutputStream(nSock.getOutputStream());\n\n toNeighbor.writeUTF(this.toString()); // initial handshake\n toNeighbor.writeUTF(String.format(\"%s %s\", command, message));\n nSock.close();\n } catch (Exception e) {\n this.log(String.format(\"-> Could not connect to (%s). Is it live?\", n));\n }\n }\n return this;\n }",
"void sendForward(HttpServletRequest request, HttpServletResponse response, String location) throws AccessControlException, ServletException, IOException;",
"boolean isForwarding();",
"public void readForward() {\n\t\tiStream = new ByteArrayInputStream(marshalledBytes);\t\n\t\tdin = new DataInputStream(new BufferedInputStream(iStream));\n\t\ttry {\n\t\t\tint nRouteStops = din.readInt();\n\t\t\tint routeByteLength = din.readInt();\n\t\t\tbyte[] routeBytes = new byte[routeByteLength];\n\t\t\tdin.readFully(routeBytes);\n\t\t\tlong payload = din.readLong();\n\n\t\t\tArrayList<String> route = new ArrayList<String>();\n\t\t\tByteArrayInputStream bis = new ByteArrayInputStream(routeBytes);\n\t\t\tDataInputStream dis = new DataInputStream(bis);\n\t\t\tint nameLength; byte[] ipNameBytes; String ip;\n\t\t\tfor (int i=0; i< nRouteStops; i++ ) {\n\t\t\t\tnameLength = dis.readInt();\n\t\t\t\tipNameBytes = new byte[nameLength];\n\t\t\t\tdis.readFully(ipNameBytes);\n\t\t\t\tip = new String(ipNameBytes);\n\t\t\t\troute.add(ip);\n\t\t\t}\n\n\t\t\tif(nRouteStops == 0) {\n\t\t\t\tnode.addToReceiveSum(payload);\n\t\t\t\tnode.incrementReceiveTracker();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSocket senderSocket=null; Message message=null;\n\t\t\t\tnode.incrementRelayTracker();\n\t\t\t\tfor(int i =0; i<route.size();i++) {\n\t\t\t\t\tif (node.getConnections().getSocketWithName(route.get(i))!=null) {\n\t\t\t\t\t\tString nextStop = route.remove(i);\n\t\t\t\t\t\t message = new ForwardMessage(route,payload);\n\t\t\t\t\t\tsenderSocket = node.getConnections().getSocketWithName(nextStop);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnew TCPSender(senderSocket, message);\n\t\t\t}\n\t\t} catch (IOException e) { System.out.println(\"Failed to read message. \"); }\n\t}",
"private boolean deliverLocally(ClientMessage cm) {\n ClientConnection c = connections.getClient(cm.getTarget());\n\n if (c == null) {\n if (meslogger.isDebugEnabled()) {\n meslogger.debug(\"Cannot find client address locally: \"\n + cm.getTarget());\n }\n return false;\n }\n\n if (meslogger.isDebugEnabled()) {\n\n if (cm.returnToSender) {\n meslogger\n .debug(\"Attempting to directly return message to sender \"\n + cm.sourceAsString());\n } else {\n meslogger\n .debug(\"Attempting to directly forward message to client \"\n + cm.targetAsString());\n }\n }\n\n // We found the target, so lets forward the message\n boolean result = c.forwardClientMessage(cm);\n\n if (result) {\n stats.infoMessagesDelivered++;\n } else {\n stats.infoMessagesFailed++;\n }\n\n if (meslogger.isDebugEnabled()) {\n if (cm.returnToSender) {\n meslogger.debug(\"Directly return message to sender \"\n + cm.sourceAsString()\n + (result ? \" succeeded!\" : \"failed!\"));\n } else {\n meslogger.debug(\"Directly forwarding message to client \"\n + cm.targetAsString()\n + (result ? \" succeeded!\" : \"failed!\"));\n }\n }\n\n return result;\n }",
"public void relay(Message msg) {\n if (roles.containsKey(msg.dst)) {\n roles.get(msg.dst).deliver(msg);\n //System.out.println(msg.print());\n } else {\n if (debug) {\n System.out.print(\"\\nServer: \" + index + \": Dst not found: \" + msg.print());\n }\n }\n }",
"@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}",
"Proxy getProxy();",
"public void fastForward() {\n try {\n mSessionBinder.fastForward(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling fastForward.\", e);\n }\n }",
"Object routeMessage(Message message) throws IOException;",
"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 static void forward()\n {\n throw new UnsupportedOperationException();\n }",
"@Override\n\tpublic Object forward(Object input) {\n\t\treturn null;\n\t}",
"private void forwardRoomMessage(EcologyMessage message) {\n String targetRoomName = null;\n try {\n targetRoomName = (String) message.fetchArgument();\n } catch (ClassCastException | IndexOutOfBoundsException e) {\n //throw new IllegalArgumentException(\"Unrecognized message format.\");\n Log.e(TAG, \"Exception \" + e.getMessage());\n }\n\n Room room = rooms.get(targetRoomName);\n if (room != null) {\n room.onMessage(message);\n }\n }",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tSystem.out.println(\"do some work before proxy\");\n\t\tObject invokeObj = method.invoke(delegator, args);\n\t\tSystem.out.println(\"do some work after proxy\");\n\t\treturn invokeObj;\n\t}",
"public boolean popAndRedirectMessage(String processorName, String storeName) throws AxisFault {\n SynapseConfiguration configuration = getSynapseConfiguration();\n MessageConsumer messageConsumer = getMessageConsumer(configuration, processorName);\n MessageProducer messageProducer = configuration.getMessageStore(storeName).getProducer();\n try {\n return popAndRedirectMessageToStore(messageProducer, messageConsumer);\n } catch (AxisFault e) {\n throw createAxisFaultException(log, \"Failed to redirect message to \" + storeName, e);\n } finally {\n messageConsumer.cleanup();\n }\n }",
"private void sendToOtherServers(ProxyEvent proxyEvent) throws AppiaEventException {\n //\t\tSystem.out.println(\"Sending to other servers: \"+ proxyEvent);\n \t\tproxyEvent.storeMessage();\n \t\tproxyEvent.setDir(Direction.DOWN);\n \t\tproxyEvent.setChannel(vsChannel);\n \t\tproxyEvent.setSourceSession(this);\n \t\tproxyEvent.init();\n \t\tproxyEvent.go();\n \n \t}",
"private void forwardData(byte[] data) throws UnknownHostException,\n MalformedAddressException {\n }",
"public void forward()\n\t{ \n\t\tupdateState( MotorPort.FORWARD);\n\t}",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.528 -0500\", hash_original_method = \"9F609FC4DF465EEA0A9F2C3A79A2C6B4\", hash_generated_method = \"B9D65B71D31F113C9D169E78F4EAE96E\")\n \npublic void replyToMessage(Message srcMsg, Message dstMsg) {\n try {\n dstMsg.replyTo = mSrcMessenger;\n srcMsg.replyTo.send(dstMsg);\n } catch (RemoteException e) {\n log(\"TODO: handle replyToMessage RemoteException\" + e);\n e.printStackTrace();\n }\n }",
"void forwardToAll(String text, NodeInfo senderInfo)\n {\n for (CommunicationLink node : allNodes.values())\n {\n NodeInfo nodeInfo = node.getInfo();\n if (nodeInfo.hashCode() != senderInfo.hashCode())\n {\n node.sendMessage(new Message(text, nodeInfo, senderInfo, CHAT));\n try\n {\n node.readMessage();\n } catch (IOException e)\n {\n handleNodeDeath(nodeInfo);\n logger.error(\"Node \" + myInfo + \"\\n - Failed to forward message to: \" +\n nodeInfo.getName() + \", they disconnected unexpectedly.\");\n }\n }\n }\n }",
"public void onMessage(Message message, URI replyTo) throws MMPMessageException;",
"private final void forwardVirtualMessage(long index, byte[] data, int size) {\n try {\n synchronized (out) {\n out.write(MessageForwarderProtocol.MESSAGE_VIRTUAL);\n out.writeLong(index);\n out.writeInt(size);\n out.write(data, 0, size);\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n }",
"@Override\n public ForwardStatus forward(IPersistable data)\n throws StoreForwardException\n {\n // Received data from callback.\n if ( data.getData() == null ) return null;\n\n StringBuilder sb = new StringBuilder(2048); // Define a size if you have an idea of it.\n char[] read = new char[128]; // Your buffer size.\n\n try (InputStreamReader ir = new InputStreamReader(data.getData(), StandardCharsets.UTF_8))\n {\n for (int i; -1 != (i = ir.read(read)); sb.append(read, 0, i))\n {\n // do nothing\n }\n }\n catch (Throwable t) // NOSONAR\n {\n // ignore\n }\n\n _logger.info(\"Received to forward data with data: \" + sb.toString()); //$NON-NLS-1$\n\n // When signal recieved, send the ForwardStatus\n return ForwardStatus.SUCCESSFUL;\n // return ForwardStatus.FAILED;\n\n }",
"ForwardAction createForwardAction();",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws UnknownHostException, IOException, ClassNotFoundException {\n\t\tSocket sock = new Socket(IP_adr, Port);\n\t\tCommunicationModule cm = new CommunicationModule();\n\n\t\tTranSegment seg = new TranSegment(Obj_Key, method.getName(), args);\n\n\t\tboolean s = cm.SendObj(sock, seg);\n\t\tif (s) {\n\t\t\t//Get the invoking result returned from server end\n\t\t\tObject result = cm.RecObj(sock);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}",
"public void forwardPacket(NetworkPacket p_) {\n receiver.forwardPackets((Packet)(p_.getData()), p_);\n }",
"public boolean isForward() {\n return true;\n }",
"protected void abcdefg(String host, byte[] buf) throws Exception {\n String clientId = hostmap.get(host);\n if (clientId == null) {\n NgrokAgent.httpResp(_out, 404, \"Tunnel \" + host + \" not found\");\n return;\n }\n NgrokServerClient client = clients.get(clientId);\n if (client == null) {\n NgrokAgent.httpResp(_out, 404, \"Tunnel \" + host + \" is Closed\");\n return;\n }\n ProxySocket proxySocket;\n try {\n proxySocket = client.getProxy(host);\n }\n catch (Exception e) {\n log.debug(\"Get ProxySocket FAIL host=\" + host, e);\n NgrokAgent.httpResp(_out,\n 500,\n \"Tunnel \" + host + \" did't has any proxy conntion yet!!\");\n return;\n }\n //sw.tag(\"After Get ProxySocket\");\n PipedStreamThread srv2loc = null;\n PipedStreamThread loc2srv = null;\n //NgrokAgent.writeMsg(proxySocket.socket.getOutputStream(), NgrokMsg.startProxy(\"http://\" + host, \"\"));\n //sw.tag(\"After Send Start Proxy\");\n proxySocket.socket.getOutputStream().write(buf);\n // 服务器-->本地\n srv2loc = new PipedStreamThread(\"http2proxy\",\n _ins,\n NgrokAgent.gzip_out(client.gzip_proxy,\n proxySocket.socket.getOutputStream()),\n bufSize);\n // 本地-->服务器\n loc2srv = new PipedStreamThread(\"proxy2http\",\n NgrokAgent.gzip_in(client.gzip_proxy,\n proxySocket.socket.getInputStream()),\n _out,\n bufSize);\n //sw.tag(\"After PipedStream Make\");\n //sw.stop();\n //log.debug(\"ProxyConn Timeline = \" + sw.toString());\n // 等待其中任意一个管道的关闭\n String exitFirst = executorService.invokeAny(Arrays.asList(srv2loc, loc2srv));\n if (log.isDebugEnabled())\n log.debug(\"proxy conn exit first at \" + exitFirst);\n }",
"public ProxyActor(ActorRef otherActor) {\n\t\tthis(otherActor, null, null);\n\t}",
"boolean isResolveByProxy();",
"public void setMessageBusProxySupported(java.lang.Boolean messageBusProxySupported) {\r\n this.messageBusProxySupported = messageBusProxySupported;\r\n }",
"public void setProxyUser(String proxyUser) {\n this.proxyUser = proxyUser;\n }",
"public interface ProxyInterface {\n public String execute();\n\n public String execute0();\n}",
"@Override\r\n public PhoenixDriver forward()\r\n {\n return null;\r\n }",
"public void setAgentForwarding(boolean enable){ \n agent_forwarding=enable;\n }",
"@Override\n public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException {\n if (response.getStatus() == HttpServletResponse.SC_NOT_FOUND) {\n forward(redirectRoute, baseRequest, response);\n } else {\n super.handle(target, baseRequest, request, response);\n }\n }",
"private boolean sendMessage(Message m){\r\n\t\tAllocation alloc = client.getAllocation();\r\n\t\tEndPoint main = getBattlefieldFor(alloc.getMain());\r\n\t\ttry {\r\n\t\t\tIMessageReceivedHandler remoteReceiver = (IMessageReceivedHandler) main.connect();\r\n\t\t\tremoteReceiver.onMessageReceived(m);\r\n\t\t} catch (MalformedURLException | RemoteException | NotBoundException e) {\r\n\t\t\tEndPoint backup = getBattlefieldFor(alloc.getBackup());\r\n\t\t\tIMessageReceivedHandler remoteReceiver;\r\n\t\t\ttry {\r\n\t\t\t\tremoteReceiver = (IMessageReceivedHandler) backup.connect();\r\n\t\t\t\tremoteReceiver.onMessageReceived(m);\r\n\t\t\t} catch (MalformedURLException | RemoteException\r\n\t\t\t\t\t| NotBoundException e1) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public void sendTo(P2PUser dest, Object msg) throws IOException;",
"public void forwardResponse(int dest, String file) throws UnknownHostException, SocketException, IOException {\n InetAddress IPAddress = InetAddress.getByName(\"127.0.0.1\");\n\n // Canal de comunicação não orientado à conexão\n //DatagramSocket serverSocket = new DatagramSocket();\n\n // Montando a mensagem a ser enviada\n String msg = file + \"#\" + this.getClient() + \"#\" + this.getTtl();\n\n // Preenche o buffer de envio\n final byte[] sendData = msg.getBytes();\n\n // Montando o pacote com o offset do tamanho do nome do arquivo.\n DatagramPacket sendPacket \n = new DatagramPacket(sendData, sendData.length,\n IPAddress, dest);\n\n this.getServerSocket().send(sendPacket);\n\n // Reseta o ttl para o Peer em questao\n //this.setTtl(Peer.TTLREFERENCE);\n }",
"public void relay(Message msg) throws IOException {\n if (Destination.BROADCAST.name().equals(msg.getDestination())) {\n bradcast(msg);\n return;\n }\n usersConnected.get(msg.getDestination()).sendMessage(msg);\n }",
"@Deprecated\n boolean isProxied(Object object);",
"@Override\r\n\tpublic void goForward() {\n\t\t\r\n\t}",
"protected static void sendRequest(final Channel channel, final ForwardRequest request) throws IOException {\n\t\tfinal ByteArrayOutputStream baos = new ByteArrayOutputStream(MAX_MESSAGE_SIZE);\n\t\tfinal DataOutputStream tmp = new DataOutputStream(baos);\n\n\t\t// request type\n\t\ttmp.writeByte(PREFIX_FORWARD_REQUEST);\n\n\t\t// payload\n\t\ttmp.writeByte(request.getMethod().getCode());\n\t\twriteString(request.getProtocol(), tmp);\n\t\twriteString(request.getRequestUri(), tmp);\n\t\twriteString(request.getRemoteAddress(), tmp);\n\t\twriteString(request.getRemoteHost(), tmp);\n\t\twriteString(request.getServerName(), tmp);\n\t\ttmp.writeShort(request.getServerPort());\n\t\ttmp.writeBoolean(request.isSsl());\n\t\ttmp.writeShort(request.getHeaders().size());\n\n\t\t// headers\n\t\tfor (final Header header : request.getHeaders()) {\n\t\t\tfinal Integer code = RequestHeader.getKeyCode(header.getKey());\n\t\t\tif (code == null) {\n\t\t\t\twriteString(header.getKey(), tmp);\n\t\t\t} else {\n\t\t\t\ttmp.writeShort(code);\n\t\t\t}\n\t\t\twriteString(header.getValue(), tmp);\n\t\t}\n\n\t\t// attributes\n\t\tfor (final Attribute attr : request.getAttributes()) {\n\t\t\ttmp.writeByte(attr.getType().getCode());\n\t\t\tfor(String value: attr.getValue()) {\n\t\t\t\twriteString(value, tmp);\n\t\t\t}\n\t\t}\n\n\t\t// request terminator\n\t\ttmp.write(REQUEST_TERMINATOR);\n\t\ttmp.flush();\n\n\t\t// now prepare the whole message\n\t\tfinal byte[] data = baos.toByteArray();\n\n\t\tif (data.length + 4 > MAX_MESSAGE_SIZE) {\n\t\t\tthrow new IllegalArgumentException(\"Message size is larger than \" + MAX_MESSAGE_SIZE + \" bytes.\");\n\t\t}\n\n\t\tfinal ByteBuf buf = Buffers.makeBuffer(4 + data.length);\n\t\tbuf.writeBytes(CLIENT_MAGIC);\n\t\tbuf.writeShort(data.length);\n\t\tbuf.writeBytes(data);\n\n\t\tchannel.writeAndFlush(buf);\n\t\tgetLog().debug(\"Sent : FORWARDREQUEST (\" + PREFIX_FORWARD_REQUEST + \"), payload size = \" + data.length + \" bytes\");\n\n\t\tfinal InputStream requestBody = request.getRequestBody();\n\t\tif (requestBody != null) {\n\t\t\tsendChunk(true, requestBody, MAX_SEND_CHUNK_SIZE, channel);\n\t\t}\n\t}",
"public void handleMessageInternal(final Message<?> message) throws MessageRejectedException,\n\t\t\tMessageHandlingException, MessageDeliveryException {\n\t\tif (this.serverConnectionFactory != null) {\n\t\t\t// We don't own the connection, we are asynchronously replying\n\t\t\tObject connectionId = message.getHeaders().get(IpHeaders.CONNECTION_ID);\n\t\t\tTcpConnection connection = connections.get(connectionId);\n\t\t\tif (connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.send(message);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogger.error(\"Error sending message\", e);\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlogger.error(\"Unable to find incoming socket for \" + message);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// we own the connection\n\t\ttry {\n\t\t\tdoWrite(message);\n\t\t} catch (MessageMappingException e) {\n\t\t\t// retry - socket may have closed\n\t\t\tif (e.getCause() instanceof IOException) {\n\t\t\t\tlogger.debug(\"Fail on first write attempt\", e);\n\t\t\t\tdoWrite(message);\n\t\t\t} else {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t}",
"public void forward() {\n forward(DEFAULT_SPEED);\n }",
"@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder getForwardOrBuilder() {\n if ((stepInfoCase_ == 13) && (forwardBuilder_ != null)) {\n return forwardBuilder_.getMessageOrBuilder();\n } else {\n if (stepInfoCase_ == 13) {\n return (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance();\n }\n }",
"public void process(PlainMessage msg) throws IOException {\n relay(msg);\n }",
"void handleMessage(EndpointPort from, EndpointPort to, Object message);",
"public static ChannelFuture send407ProxyAuthenticationRequired(ChannelHandlerContext ctx, Map<String, String> headersMap, byte[] data, boolean useDefaultListener) {\n return checkBeforeSend(ctx, PROXY_AUTHENTICATION_REQUIRED, headersMap, data, useDefaultListener, \"PROXY AUTHENTICATION REQUIRED\");\n }",
"public lnrpc.Rpc.ForwardingHistoryResponse forwardingHistory(lnrpc.Rpc.ForwardingHistoryRequest request) {\n return blockingUnaryCall(\n getChannel(), getForwardingHistoryMethod(), getCallOptions(), request);\n }",
"private DoForward(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }",
"private NodeMgrService.Proxy getProxy(int node) { \n Object obj = ServiceManager.proxyFor(node);\n if (! (obj instanceof NodeMgrService.Proxy)) {\n if (node == ServiceManager.LOCAL_NODE) {\n throw new InternalException(\"cannot fetch NodeManager Proxy\" +\n \" for local node\");\n } else {\n logger.warning(\"cannot retrieve proxy for node \" + node);\n }\n }\n return (NodeMgrService.Proxy) obj;\n }",
"@Override\r\n\tpublic void forward(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}",
"protected void handleInboundMessage(Object msg) {\n/* 748 */ inboundMessages().add(msg);\n/* */ }",
"public com.google.protobuf.Empty simulateUplink(org.thethingsnetwork.management.proto.HandlerOuterClass.SimulatedUplinkMessage request);",
"@Test\n public void testProxy() throws Exception {\n addHandler(new MyProxyHandler());\n URL proxyURL = new URL(url);\n\n runner.setProperty(InvokeHTTP.PROP_URL, \"http://nifi.apache.org/\"); // just a dummy URL no connection goes out\n runner.setProperty(InvokeHTTP.PROP_PROXY_HOST, proxyURL.getHost());\n\n try{\n runner.run();\n Assert.fail();\n } catch (AssertionError e){\n // Expect assertion error when proxy port isn't set but host is.\n }\n runner.setProperty(InvokeHTTP.PROP_PROXY_PORT, String.valueOf(proxyURL.getPort()));\n\n runner.setProperty(InvokeHTTP.PROP_PROXY_USER, \"username\");\n\n try{\n runner.run();\n Assert.fail();\n } catch (AssertionError e){\n // Expect assertion error when proxy password isn't set but host is.\n }\n runner.setProperty(InvokeHTTP.PROP_PROXY_PASSWORD, \"password\");\n\n createFlowFiles(runner);\n\n runner.run();\n\n runner.assertTransferCount(InvokeHTTP.REL_SUCCESS_REQ, 1);\n runner.assertTransferCount(InvokeHTTP.REL_RESPONSE, 1);\n runner.assertTransferCount(InvokeHTTP.REL_RETRY, 0);\n runner.assertTransferCount(InvokeHTTP.REL_NO_RETRY, 0);\n runner.assertTransferCount(InvokeHTTP.REL_FAILURE, 0);\n runner.assertPenalizeCount(0);\n\n //expected in request status.code and status.message\n //original flow file (+attributes)\n final MockFlowFile bundle = runner.getFlowFilesForRelationship(InvokeHTTP.REL_SUCCESS_REQ).get(0);\n bundle.assertContentEquals(\"Hello\".getBytes(\"UTF-8\"));\n bundle.assertAttributeEquals(InvokeHTTP.STATUS_CODE, \"200\");\n bundle.assertAttributeEquals(InvokeHTTP.STATUS_MESSAGE, \"OK\");\n bundle.assertAttributeEquals(\"Foo\", \"Bar\");\n\n //expected in response\n //status code, status message, all headers from server response --> ff attributes\n //server response message body into payload of ff\n final MockFlowFile bundle1 = runner.getFlowFilesForRelationship(InvokeHTTP.REL_RESPONSE).get(0);\n bundle1.assertContentEquals(\"http://nifi.apache.org/\".getBytes(\"UTF-8\"));\n bundle1.assertAttributeEquals(InvokeHTTP.STATUS_CODE, \"200\");\n bundle1.assertAttributeEquals(InvokeHTTP.STATUS_MESSAGE, \"OK\");\n bundle1.assertAttributeEquals(\"Foo\", \"Bar\");\n bundle1.assertAttributeEquals(\"Content-Type\", \"text/plain;charset=iso-8859-1\");\n }",
"public void setProxy(Proxy proxy) {\n\t\tthis.proxy = proxy;\n\t}",
"private final void forwardVirtualConnect(DirectSocketAddress source,\n DirectSocketAddress sourceHub, DirectSocketAddress target,\n DirectSocketAddress targetHub, long index, int timeout, int port,\n int fragment, int buffer) {\n try {\n synchronized (out) {\n out.write(MessageForwarderProtocol.CREATE_VIRTUAL);\n\n DirectSocketAddress.write(source, out);\n DirectSocketAddress.write(sourceHub, out);\n\n DirectSocketAddress.write(target, out);\n DirectSocketAddress.write(targetHub, out);\n\n out.writeLong(index);\n\n out.writeInt(timeout);\n out.writeInt(port);\n out.writeInt(fragment);\n out.writeInt(buffer);\n\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n }",
"@Override\n public void sendRedirect(String arg0) throws IOException {\n\n }",
"private void forwardResponse(XmppServletResponse response, IQRequest originalRequest) {\n\t\t\n\t\tJID from = originalRequest.getTo();\n\t\tJID to = originalRequest.getFrom();\t\t\n\t\ttry {\n\t\t\tIQRequest request = null;\n\t\t\tList<Element> elements = response.getElements();\n\t\t\tif (elements != null && elements.size() > 0) {\n\t\t\t\trequest = getXmppFactory().createIQ(from,to,response.getType(), elements.toArray(new Element[]{}));\n\t\t\t} else {\n\t\t\t\trequest = getXmppFactory().createIQ(from, to, response.getType());\n\t\t\t}\n\t\t\trequest.setID(originalRequest.getId());\n\t\t\trequest.send();\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// In the event of an error, continue dispatching to all remaining JIDs\n\t\t\tlog.error(e.getMessage(),e);\n\t\t}\n\t}",
"protected void sendToNetwork(Message msg, RendezVousPropagateMessage propHdr) throws IOException {\r\n\r\n if (LOG.isEnabledFor(Priority.DEBUG)) {\r\n LOG.debug(\"Endpoint propagating \" + msg + \" (\" + propHdr.getMsgId() + \")\");\r\n }\r\n endpoint.propagate((Message) msg.clone(), PropSName, PropPName);\r\n }",
"@Override\n public void handleMessage(Message msg) {\n String turnDirection = (String) msg.obj;\n\n int distance = 0;\n\n // if there are two or more waypoints to go\n if(navigationPath.size()>=2)\n distance = (int) GeoCalulation.getDistance(navigationPath.get(0), navigationPath.get(1));\n\n navigationInstructionDisplay(turnDirection, distance);\n\n }",
"speech.multilang.Params.ForwardingControllerParamsOrBuilder getForwardingParamsOrBuilder();",
"public void grant(Object proxy) {\n storedProxy = proxy;\n if (grantTrap != null) {\n throw grantTrap;\n }\n\tsuper.grant(proxy);\n }",
"java.lang.String getDelegatorAddress();",
"java.lang.String getDelegatorAddress();",
"public void handleMessage(Message message, Socket socket) throws IOException, HandlingException;",
"@WebMethod\n URI proxify(URI wsdlURI);",
"@Override\n public void forwardPacket(DatagramPacket packet, IpPacket requestPacket)throws VpnNetworkException {\n Log.d(\"DEBUG\",\"metodo forwardPacket LocalVpnService\");\n DatagramSocket dnsSocket = null;\n try {\n // Packets to be sent to the real DNS server\n dnsSocket = new DatagramSocket();\n vpnService.protect(dnsSocket);\n dnsSocket.send(packet);\n if (requestPacket != null)\n dnsIn.add(new WaitingOnSocketPacket(dnsSocket, requestPacket)); //Viene creato l'oggetto WaitingSocket, avente il socket\n //e il pacchetto, e sarà inserito\n // nella lista di socket in attesa di rispota\n //Il socket utilizzato per inviare il pacchetto\n //sarà utilizzato per effettuare la risposta\n else\n FileHelper.closeOrWarn(dnsSocket, TAG, \"handleDnsRequest: Cannot close socket in error\");\n } catch (IOException e) {\n FileHelper.closeOrWarn(dnsSocket, TAG, \"handleDnsRequest: Cannot close socket in error\");\n if (e.getCause() instanceof ErrnoException) {\n ErrnoException errnoExc = (ErrnoException) e.getCause();\n if ((errnoExc.errno == OsConstants.ENETUNREACH) || (errnoExc.errno == OsConstants.EPERM)) {\n throw new VpnNetworkException(\"Cannot send message:\", e);\n }\n }\n Log.w(TAG, \"handleDnsRequest: Could not send packet to upstream\", e);\n return;\n }\n }",
"protected Proxy(InvocationHandler h) { }",
"public static boolean processProxyServer(String[] args) {\n\t\tInetAddress serverIPAddress;\n\t\tint serverPort, proxyServerPortTCP, proxyServerPortUDP, tcpPortArg, udpPortArg;\n\t\tString serverCommunicationProtocol, tcpPort = null, udpPort = null;\n\t\ttry {\n\t\t\tserverIPAddress = InetAddress.getByName(args[1]);\n\t\t\tproxyServerPortTCP = Integer.parseInt(args[args.length - 1]);\n\t\t\tproxyServerPortUDP = Integer.parseInt(args[args.length - 2]);\n\t\t\tSystem.out.println(\"Starting as Proxy Server.\");\n\t\t\tSystem.out.println(\"--------------------------------------------------------\");\n\t\t\tif (checkArgument(\"--proxy-tcp\", args) != -1) {\n\t\t\t\ttcpPortArg = checkArgument(\"--proxy-tcp\", args);\n\t\t\t\ttcpPort = args[tcpPortArg + 1];\n\t\t\t}\n\t\t\tif (checkArgument(\"--proxy-udp\", args) != -1) {\n\t\t\t\tudpPortArg = checkArgument(\"--proxy-udp\", args);\n\t\t\t\tudpPort = args[udpPortArg + 1];\n\t\t\t}\n\t\t\tif (checkArgument(\"-t\", args) != -1) {\n\t\t\t\tserverCommunicationProtocol = \"TCP\";\n\t\t\t\tif (checkArgument(\"--proxy-tcp\", args) == -1) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else if (checkArgument(\"-u\", args) != -1) {\n\t\t\t\tserverCommunicationProtocol = \"UDP\";\n\t\t\t\tif (checkArgument(\"--proxy-udp\", args) == -1) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tserverCommunicationProtocol = null;\n\t\t\t}\n\t\t\tif (tcpPort == null) {\n\t\t\t\ttcpPort = udpPort;\n\t\t\t}\n\t\t\tif (udpPort == null) {\n\t\t\t\tudpPort = tcpPort;\n\t\t\t}\n\t\t\tThread TCPThread = new Thread(\n\t\t\t\t\tnew TCPProxyServer(serverIPAddress, serverCommunicationProtocol, tcpPort, proxyServerPortTCP));\n\t\t\tTCPThread.start();\n\t\t\tThread UDPThread = new Thread(\n\t\t\t\t\tnew UDPProxyServer(serverIPAddress, serverCommunicationProtocol, udpPort, proxyServerPortUDP));\n\t\t\tUDPThread.start();\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"protected void forward(IAnnounceEvent event){\r\n \t\ttry {\r\n \t\t\t_wrappedOut.write(event.getSerial());\r\n \t\t\t_output.writeASE(event.toSExp());\r\n \t\t} catch (IOException e) {\r\n \t\t\tSystem.err.println(\"Failed forwarding the message:\\n\"+event.toSExp()+\"\\nbecause: \"+e.getMessage());\r\n \t\t}\r\n \t}",
"public void handleMessage(Message message, DatagramSocket socket) throws HandlingException, IOException, ClassNotFoundException;",
"public Proxy getProxy(Proxy p){\n if(p != null){\n doInit(p);\n }\n mode = COMMAND_MODE;\n pack();\n show();\n return proxy;\n }",
"public com.p035e.p036a.C2298v followUpRequest() throws java.io.IOException {\n /*\n r4 = this;\n r1 = 0;\n r0 = r4.f5694n;\n if (r0 != 0) goto L_0x000b;\n L_0x0005:\n r0 = new java.lang.IllegalStateException;\n r0.<init>();\n throw r0;\n L_0x000b:\n r0 = r4.getRoute();\n if (r0 == 0) goto L_0x0024;\n L_0x0011:\n r0 = r4.getRoute();\n r0 = r0.getProxy();\n L_0x0019:\n r2 = r4.f5694n;\n r2 = r2.code();\n switch(r2) {\n case 300: goto L_0x0066;\n case 301: goto L_0x0066;\n case 302: goto L_0x0066;\n case 303: goto L_0x0066;\n case 307: goto L_0x0048;\n case 308: goto L_0x0048;\n case 401: goto L_0x003b;\n case 407: goto L_0x002b;\n default: goto L_0x0022;\n };\n L_0x0022:\n r0 = r1;\n L_0x0023:\n return r0;\n L_0x0024:\n r0 = r4.f5682a;\n r0 = r0.getProxy();\n goto L_0x0019;\n L_0x002b:\n r1 = r0.type();\n r2 = java.net.Proxy.Type.HTTP;\n if (r1 == r2) goto L_0x003b;\n L_0x0033:\n r0 = new java.net.ProtocolException;\n r1 = \"Received HTTP_PROXY_AUTH (407) code while not using proxy\";\n r0.<init>(r1);\n throw r0;\n L_0x003b:\n r1 = r4.f5682a;\n r1 = r1.getAuthenticator();\n r2 = r4.f5694n;\n r0 = com.p035e.p036a.p054a.p055a.C2182j.processAuthHeader(r1, r2, r0);\n goto L_0x0023;\n L_0x0048:\n r0 = r4.f5691k;\n r0 = r0.method();\n r2 = \"GET\";\n r0 = r0.equals(r2);\n if (r0 != 0) goto L_0x0066;\n L_0x0056:\n r0 = r4.f5691k;\n r0 = r0.method();\n r2 = \"HEAD\";\n r0 = r0.equals(r2);\n if (r0 != 0) goto L_0x0066;\n L_0x0064:\n r0 = r1;\n goto L_0x0023;\n L_0x0066:\n r0 = r4.f5682a;\n r0 = r0.getFollowRedirects();\n if (r0 != 0) goto L_0x0070;\n L_0x006e:\n r0 = r1;\n goto L_0x0023;\n L_0x0070:\n r0 = r4.f5694n;\n r2 = \"Location\";\n r0 = r0.header(r2);\n if (r0 != 0) goto L_0x007c;\n L_0x007a:\n r0 = r1;\n goto L_0x0023;\n L_0x007c:\n r2 = new java.net.URL;\n r3 = r4.f5691k;\n r3 = r3.url();\n r2.<init>(r3, r0);\n r0 = r2.getProtocol();\n r3 = \"https\";\n r0 = r0.equals(r3);\n if (r0 != 0) goto L_0x00a1;\n L_0x0093:\n r0 = r2.getProtocol();\n r3 = \"http\";\n r0 = r0.equals(r3);\n if (r0 != 0) goto L_0x00a1;\n L_0x009f:\n r0 = r1;\n goto L_0x0023;\n L_0x00a1:\n r0 = r2.getProtocol();\n r3 = r4.f5691k;\n r3 = r3.url();\n r3 = r3.getProtocol();\n r0 = r0.equals(r3);\n if (r0 != 0) goto L_0x00c0;\n L_0x00b5:\n r0 = r4.f5682a;\n r0 = r0.getFollowSslRedirects();\n if (r0 != 0) goto L_0x00c0;\n L_0x00bd:\n r0 = r1;\n goto L_0x0023;\n L_0x00c0:\n r0 = r4.f5691k;\n r0 = r0.newBuilder();\n r3 = r4.f5691k;\n r3 = r3.method();\n r3 = com.p035e.p036a.p054a.p055a.C2178h.permitsRequestBody(r3);\n if (r3 == 0) goto L_0x00e6;\n L_0x00d2:\n r3 = \"GET\";\n r0.method(r3, r1);\n r1 = \"Transfer-Encoding\";\n r0.removeHeader(r1);\n r1 = \"Content-Length\";\n r0.removeHeader(r1);\n r1 = \"Content-Type\";\n r0.removeHeader(r1);\n L_0x00e6:\n r1 = r4.sameConnection(r2);\n if (r1 != 0) goto L_0x00f1;\n L_0x00ec:\n r1 = \"Authorization\";\n r0.removeHeader(r1);\n L_0x00f1:\n r0 = r0.url(r2);\n r0 = r0.build();\n goto L_0x0023;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.e.a.a.a.g.followUpRequest():com.e.a.v\");\n }",
"public void process(SymmetricMessage msg) throws IOException {\n relay(msg);\n }",
"@Override\n public void sendMessage(String message) {\n if(\"YOURMOVE\".equals(message)) {\n makeMove();\n }\n }",
"@Test\n public void testSendMessageWithReplyBacktrack(TestContext context) {\n NetClient client = vertx.createNetClient();\n final Async async = context.async();\n\n client.connect(7000, \"localhost\").onComplete(context.asyncAssertSuccess(socket -> {\n\n final FrameParser parser = new FrameParser(parse -> {\n context.assertTrue(parse.succeeded());\n JsonObject frame = parse.result();\n context.assertNotEquals(\"err\", frame.getString(\"type\"));\n context.assertEquals(true, frame.getBoolean(\"send\"));\n context.assertEquals(\"Hello vert.x\", frame.getJsonObject(\"body\").getString(\"value\"));\n client.close();\n async.complete();\n });\n\n socket.handler(parser);\n\n FrameHelper.sendFrame(\"send\", \"hello\", \"#backtrack\", new JsonObject().put(\"value\", \"vert.x\"), socket);\n }));\n }",
"@Override\n public void deliver(Object o) {\n \tif ( o instanceof Message ) {\n \t\tdeliver((Message)o);\n \t}\n }",
"public void doInstallDProxy(ClassLoader webapploader, final String appid) {\n dpInstall.setTargetClassLoader(webapploader);\n\n /**\n * install proxy to rocketmqClient\n */\n DynamicProxyProcessor processor = new DynamicProxyProcessor() {\n\n @Override\n public void process(DPMethod m) throws Exception {\n\n if ((m.getExceptionTypes().length != 0 || \"shutdown\".equals(m.getName())\n || \"unsubscribe\".equals(m.getName()) || \"registerMessageListener\".equals(m.getName()))\n && /*\n * this method could be blocked for a long time, the statics is meaningless, so we ignore it.\n */\n !(\"pullBlockIfNotFound\").equals(m.getName())) {\n if (\"registerMessageListener\".equals(m.getName())) {\n if (\"MessageListenerConcurrently\".equals(m.getParameterTypes()[0].getSimpleName())) {\n\n m.insertBefore(\"{$1=(MessageListenerConcurrently)RocketmqIT.start(\\\"\" + appid + \"\\\",this,\\\"\"\n + m.getName() + \"\\\",$args);}\");\n }\n else if (\"MessageListenerOrderly\".equals(m.getParameterTypes()[0].getSimpleName())) {\n\n m.insertBefore(\"{$1=(MessageListenerOrderly)RocketmqIT.start(\\\"\" + appid + \"\\\",this,\\\"\"\n + m.getName() + \"\\\",$args);}\");\n }\n m.insertAfter(\"{RocketmqIT.end(-1,\\\"\" + m.getName() + \"\\\");}\");\n\n }\n else if (m.getName().equals(\"pull\") && !m.getReturnType().getSimpleName().equals(\"PullResult\")) {\n m.insertBefore(\"{$5=(PullCallback)RocketmqIT.start(\\\"\" + appid + \"\\\",this,\\\"\" + m.getName()\n + \"\\\",$args);}\");\n m.insertAfter(\"{RocketmqIT.end(-1,\\\"\" + m.getName() + \"\\\");}\");\n\n }\n else {\n m.insertBefore(\"{RocketmqIT.start(\\\"\" + appid + \"\\\",this,\\\"\" + m.getName() + \"\\\",$args);}\");\n m.insertAfter(\"{RocketmqIT.end(1,\\\"\" + m.getName() + \"\\\");}\");\n }\n dpInstall.addCatch(m, \"RocketmqIT.end(0,\\\"\" + m.getName() + \"\\\");\");\n }\n\n }\n };\n\n dpInstall.installProxy(\"com.alibaba.rocketmq.client.producer.DefaultMQProducer\", new String[] {\n \"com.creditease.uav.hook.rocketmq.interceptors\", \"com.alibaba.rocketmq.client.consumer.listener\" },\n processor, false);\n\n dpInstall.installProxy(\"com.alibaba.rocketmq.client.consumer.DefaultMQPushConsumer\",\n new String[] { \"com.creditease.uav.hook.rocketmq.interceptors\" }, processor, false);\n\n dpInstall.installProxy(\n \"com.alibaba.rocketmq.client.consumer.DefaultMQPullConsumer\", new String[] {\n \"com.creditease.uav.hook.rocketmq.interceptors\", \"com.alibaba.rocketmq.client.consumer\" },\n processor, false);\n\n dpInstall.releaseTargetClassLoader();\n }",
"public Object getProxy() {\n\t\t\r\n\t\treturn getProxy(this.advised.getTargetClass().getClassLoader());\r\n\t}",
"public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.ForwardingHistoryResponse> forwardingHistory(\n lnrpc.Rpc.ForwardingHistoryRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getForwardingHistoryMethod(), getCallOptions()), request);\n }",
"private boolean directlyToHub(DirectSocketAddress hub, ClientMessage cm) {\n\n HubConnection c = connections.getHub(hub);\n\n if (c != null) {\n return c.forwardClientMessage(cm);\n }\n\n return false;\n }",
"public boolean forward(Packet packet) throws JimmException {\n boolean result = processPaket(packet);\n\n if (result && (0 != errorCode)) {\n if ((ACTION_MOVE != action) && (ACTION_RENAME != action)) {\n transactionCommit();\n }\n active();\n }\n\n return result;\n }",
"public void setProxyUser(String proxyUser) {\n\t proxyHandler.setProxyUser(proxyUser);\n\t}",
"public Proxy getProxy(){\n mode = COMMAND_MODE;\n pack();\n show();\n return proxy;\n }",
"@Override\n\tpublic void sendMessage(Message message) {\n\t\tterminal.println(\"Sending Message to: \" + message.getUserTo());\n\t\tDatagramPacket packet = null;\n\t\tString routerDestination = table.getRouterToSendTo(message.getUserTo());\n\t\tRouter routerToSendTo = null;\n\t\tfor(Router routerToSend: listOfRouters) {\n\t\t\tif(routerToSend.getName().equals(routerDestination)) {\n\t\t\t\trouterToSendTo = routerToSend;\n\t\t\t}\n\t\t}\n\n\t\tif(routerToSendTo == null) {\n\t\t\tterminal.println(\"User not found on network.\");\n\t\t}\telse {\n\t\t\t/*\n\t\t\t * need to change the message to include the router that needs to receive the message as well!!!!!!!!!!!!!!\n\t\t\t */\n\t\t\tInetSocketAddress dstAddress = new InetSocketAddress(DEFAULT_DST_NODE, routerToSendTo.getPort());\n\t\t\tpacket = message.toDatagramPacket();\n\t\t\tpacket.setSocketAddress(dstAddress);\n\t\t\ttry {\n\t\t\t\tsocket.send(packet);\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}",
"@Test\n public void testReplyToRequestFromUs() {\n Ip4Address ourIp = Ip4Address.valueOf(\"10.0.1.1\");\n MacAddress ourMac = MacAddress.valueOf(1L);\n Ip4Address theirIp = Ip4Address.valueOf(\"10.0.1.100\");\n\n expect(hostService.getHostsByIp(theirIp)).andReturn(Collections.emptySet());\n expect(interfaceService.getInterfacesByIp(ourIp))\n .andReturn(Collections.singleton(new Interface(getLocation(1),\n Collections.singleton(new InterfaceIpAddress(ourIp, IpPrefix.valueOf(\"10.0.1.1/24\"))),\n ourMac, VLAN1)));\n expect(hostService.getHost(HostId.hostId(ourMac, VLAN1))).andReturn(null);\n replay(hostService);\n replay(interfaceService);\n\n // This is a request from something inside our network (like a BGP\n // daemon) to an external host.\n Ethernet arpRequest = buildArp(ARP.OP_REQUEST, VLAN1, ourMac, null, ourIp, theirIp);\n //Ensure the packet is allowed through (it is not to an internal port)\n\n proxyArp.reply(arpRequest, getLocation(5));\n assertEquals(1, packetService.packets.size());\n verifyPacketOut(arpRequest, getLocation(1), packetService.packets.get(0));\n\n // The same request from a random external port should fail\n packetService.packets.clear();\n proxyArp.reply(arpRequest, getLocation(2));\n assertEquals(0, packetService.packets.size());\n }",
"ProxyFluent(T o) {\n proxy = (InterceptableProxy) InterceptableProxyFactory.createANewObjectProxyIfNeeded(o);\n }",
"@Override\n protected void initChannel(SocketChannel ch) throws Exception {\n ChannelPipeline pipeline = ch.pipeline();\n\n // add handler\n InetSocketAddress remoteSocketAddress = new InetSocketAddress(directRemoteHost, directRemotePort);\n pipeline.addLast(new DirectProxyUpstreamHandler(remoteSocketAddress, false, 1048576, new RequestInterceptor(remoteSocketAddress), \" -->\"));\n }",
"public interface ProxyConnector {\n\n /**\n * Comprueba que se cumplan los requisitos para la conexión con el servicio proxy.\n * @throws IOException Cuando ocurre algún error en la comprobación.\n */\n void init() throws IOException;\n\n /**\n * Comprueba si el servicio configurado pertenece a un proxy compatible.\n * @return {@code true} si el proxy configurado es compatible, {@code false} en caso contrario.\n * @throws IOException Cuando se produce un error al conectarse al proxy.\n */\n boolean isCompatibleService() throws IOException;\n\n /**\n * Indica si el servicio de Portafirmas correspondiente a este conector requiere un proceso\n * de login previo.\n * @return {@code true} si el servicio requiere login, {@code false} en caso contrario.\n */\n boolean needLogin();\n\n /**\n * Solicita el acceso para el usuario.\n * @return Respuesta a la petición con el token de acceso.\n * @throws Exception Cuando ocurre un error en la comunicación.\n */\n RequestResult loginRequest() throws Exception;\n\n /**\n * Envia el token de acceso firmado al servidor para validar el acceso del usuario.\n * @param pkcs1 Firma PKCS#1 del token de acceso.\n * @param cert Certificado usado para firmar.\n * @return @code true} si el acceso se completo correctamente, {@code false} en caso contrario.\n * @throws Exception Cuando ocurre un error en la comunicación.\n */\n boolean tokenValidation(byte[] pkcs1, String cert) throws Exception;\n\n /**\n * Enváa una solicitud de cierre de sesión.\n * @throws Exception Cuando se produce un error en la comunicación.\n */\n void logoutRequest() throws Exception;\n\n /**\n * Obtiene la peticiones de firma. Las peticiones devueltas deben cumplir\n * las siguientes condiciones:\n * <ul>\n * <li>Estar en el estado señalado (unresolved, signed o rejected).</li>\n * <li>Que todos los documentos que contiene se tengan que firmar con los\n * formatos de firma indicados (sólo si se indica alguno)</li>\n * <li>Que las solicitudes cumplan con los filtros establecidos. Estos\n * filtros tendran la forma: key=value</li>\n * </ul>\n * @param signRequestState Estado de las peticiones que se desean obtener.\n * @param filters\n * Listado de filtros que deben cumplir las peticiones\n * recuperadas. Los filtros soportados son:\n * <ul>\n * <li><b>orderAscDesc:</b> con valor \"asc\" para que sea orden\n * ascendente en la consulta, en cualquier otro caso será\n * descendente</li>\n * <li><b>initDateFilter:</b> fecha de inicio de las peticiones</li>\n * <li><b>endDateFilter:</b> fecha de fin de las peticiones</li>\n * <li><b>orderAttribute:</b> parámetro para ordenar por\n * una columna de la petición</li>\n * <li><b>searchFilter:</b> busca la cadena introducida en\n * cualquier texto de la petición (asunto, referencia,\n * etc)</li>\n * <li><b>labelFilter:</b> texto con el nombre de una etiqueta.\n * Filtra las peticiones en base a esa etiqueta, ej: \"IMPORTANTE\"\n * </li>\n * <li><b>applicationFilter:</b> texto con el identificador de\n * una aplicación. Filtra las peticiones en base a la\n * aplicación, ej: \"SANCIONES\"</li>\n * </ul>\n * @param numPage Número de página del listado.\n * @param pageSize Número de peticiones por página.\n * @return Lista de peticiones de firma\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n PartialSignRequestsList getSignRequests(\n String signRequestState, String[] filters, int numPage, int pageSize)\n throws SAXException, IOException;\n\n /** Inicia la pre-firma remota de las peticiones.\n * @param request Petición de firma.\n * @return Prefirmas de las peticiones enviadas.\n * @throws IOException Si ocurre algun error durante el tratamiento de datos.\n * @throws CertificateEncodingException Si no se puede obtener la codificación del certificado.\n * @throws SAXException Si ocurren errores analizando el XML de respuesta. */\n TriphaseRequest[] preSignRequests(SignRequest request) throws IOException,\n CertificateException,\n SAXException;\n\n /**\n * Inicia la post-firma remota de las peticiones.\n *\n * @param requests\n * Peticiones a post-firmar\n * @return Listado con el resultado de la operación de firma de cada\n * petición.\n * @throws IOException\n * Si ocurre algun error durante el proceso\n * @throws CertificateEncodingException\n * Cuando el certificado está mal codificado.\n * @throws SAXException\n * Si ocurren errores analizando el XML de respuesta\n */\n RequestResult postSignRequests(TriphaseRequest[] requests) throws IOException,\n CertificateEncodingException, SAXException;\n\n /**\n * Obtiene los datos de un documento.\n *\n * @param requestId\n * Identificador de la petición.\n * @return Datos del documento.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestDetail getRequestDetail(String requestId) throws SAXException, IOException;\n\n /**\n * Obtiene el listado de aplicaciones para las que hay peticiones de firma.\n * @return Configuracion de aplicación.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n AppConfiguration getApplicationList()\n throws SAXException, IOException;\n\n /**\n * Rechaza las peticiones de firma indicadas.\n *\n * @param requestIds\n * Identificadores de las peticiones de firma que se quieren\n * rechazar.\n * @return Resultado de la operacion para cada una de las peticiones de\n * firma.\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n RequestResult[] rejectRequests(String[] requestIds,\n String reason) throws SAXException, IOException;\n\n /** Obtiene la previsualización de un documento.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewDocument(String documentId,\n String filename,\n String mimetype) throws IOException;\n\n /** Obtiene la previsualización de una firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @return Datos del documento.\n * @throws IOException Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewSign(String documentId,\n String filename) throws IOException;\n\n /** Obtiene la previsualización de un informe de firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewReport(String documentId,\n String filename, String mimetype) throws IOException;\n\n /**\n * Aprueba peticiones de firma (les da el visto bueno).\n *\n * @param requestIds\n * Identificador de las peticiones.\n * @return Resultado de la operación.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestResult[] approveRequests(String[] requestIds) throws SAXException, IOException;\n\n /**\n * Indica si el conector soporta las funciones de notificación.\n * @return {@code true} si se soportan las notificaciones, {@code false} en caso contrario.\n */\n boolean isNotificationsSupported();\n\n /**\n * Da de alta en el sistema de notificaciones.\n * @param token\n * \t\t\tToken de registro en GCM.\n * @param device\n * \t\t\tIdentificador de dispositivo.\n * @param certB64\n * \t\t\tCertificado en base 64 del usuario.\n * @return Resultado del proceso de alta en el sistema de notificaciones.\n * \t\t\tIndica\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n NotificationState signOnNotificationService(\n String token, String device, String certB64)\n throws SAXException, IOException;\n\n\n}",
"void shouldUseSocksProxyInSecondPage() {\n }",
"public boolean teleport(Entity destination) {\n/* 571 */ return teleport(destination.getLocation());\n/* */ }",
"public void setProxyHost(String proxyHost) {\n\t proxyHandler.setProxyHost(proxyHost);\n \n if ((proxyHost != null) && (proxyHost.length() > 1)) {\n isProxyActivated.set(true);\n } \n resetChain();\n\t}",
"public boolean canForward() {\n\t\treturn ttl > 0;\n\t}"
] | [
"0.68617326",
"0.66315943",
"0.592724",
"0.56845385",
"0.56765264",
"0.55084884",
"0.53965545",
"0.5351926",
"0.5344312",
"0.5327617",
"0.524377",
"0.52412903",
"0.5172875",
"0.51598746",
"0.51577026",
"0.51434964",
"0.5137193",
"0.5127972",
"0.5103231",
"0.49659365",
"0.495138",
"0.4928448",
"0.48756194",
"0.486763",
"0.48513868",
"0.48296028",
"0.4824328",
"0.48031303",
"0.4788579",
"0.4779605",
"0.47669548",
"0.4765352",
"0.4763158",
"0.47589844",
"0.47435316",
"0.47423783",
"0.47236043",
"0.47139114",
"0.4706218",
"0.4704617",
"0.47020048",
"0.4688257",
"0.46773812",
"0.4666096",
"0.46455806",
"0.46454296",
"0.46428645",
"0.4626012",
"0.46203727",
"0.46179795",
"0.46118054",
"0.46065873",
"0.45934916",
"0.45809034",
"0.4579093",
"0.45769402",
"0.4575637",
"0.4568838",
"0.45531723",
"0.45321983",
"0.4526241",
"0.45215407",
"0.45202774",
"0.45200378",
"0.45193994",
"0.45063403",
"0.45061922",
"0.45059782",
"0.4505277",
"0.450048",
"0.450048",
"0.44954714",
"0.44844618",
"0.44820008",
"0.44704488",
"0.44613495",
"0.4459386",
"0.44578537",
"0.4456861",
"0.44513735",
"0.4451143",
"0.44486034",
"0.44466126",
"0.44453737",
"0.44404107",
"0.44315124",
"0.44304523",
"0.4429009",
"0.44278586",
"0.44274208",
"0.4424889",
"0.442378",
"0.44236013",
"0.4419003",
"0.44150025",
"0.44114527",
"0.4408874",
"0.44013208",
"0.4400376",
"0.4398033"
] | 0.6511018 | 2 |
First check if we can find the target locally | private boolean deliverLocally(ClientMessage cm) {
ClientConnection c = connections.getClient(cm.getTarget());
if (c == null) {
if (meslogger.isDebugEnabled()) {
meslogger.debug("Cannot find client address locally: "
+ cm.getTarget());
}
return false;
}
if (meslogger.isDebugEnabled()) {
if (cm.returnToSender) {
meslogger
.debug("Attempting to directly return message to sender "
+ cm.sourceAsString());
} else {
meslogger
.debug("Attempting to directly forward message to client "
+ cm.targetAsString());
}
}
// We found the target, so lets forward the message
boolean result = c.forwardClientMessage(cm);
if (result) {
stats.infoMessagesDelivered++;
} else {
stats.infoMessagesFailed++;
}
if (meslogger.isDebugEnabled()) {
if (cm.returnToSender) {
meslogger.debug("Directly return message to sender "
+ cm.sourceAsString()
+ (result ? " succeeded!" : "failed!"));
} else {
meslogger.debug("Directly forwarding message to client "
+ cm.targetAsString()
+ (result ? " succeeded!" : "failed!"));
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object getTargetexists();",
"private boolean isLocalRepository() {\n\r\n File file = new File(m_Path.toString() + \"/.magit/Remote\");\r\n return file.exists();\r\n }",
"public boolean hasTarget() {\n return target != null;\n }",
"private boolean targetExists(File fileToCheck) {\n\t\tif (!fileToCheck.exists()) {\n\t\t\tSystem.out.println(\"Target file \"+fileToCheck.getName()+ \" DOESN'T exist.\");\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public boolean hasLocation()\n {\n return targetLocation != null;\n }",
"public void testResolveTargetLocation() throws Exception {\n System.out.println(\"resolveTargetLocation\");\n \n instance.resolveTargetLocation();\n \n }",
"@Override\n public boolean localMirrorExists( Corpus corp, Ice.Current __current )\n {\n CorpusI cs = checkValidityAndLookup( corp );\n // don't query if no local mirror required in the first place;\n // this protects directory-based corpora from being queried\n if (null==cs || !cs.isImmutableMirror) return false;\n return cs.localMirrorExists();\n }",
"private boolean checkLocalFile() throws IOException {\n\t\tPath localfile = Paths.get(userdir, filename);\n\t\tif (Files.exists(localfile, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\tthis.downloadStatus = DownloadEnum.ERROR;\n\t\t\tthis.message = \"same name file on download directory, download has stopped\";\n\t\t\treturn false;\n\t\t} else {\n\t\t\tlocalfiletmp = Paths.get(localfile.toAbsolutePath().toString() + \".tmp\");\n\t\t\tif (Files.exists(localfiletmp, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tlocalFileSize = localfiletmp.toFile().length();\n\t\t\t} else {\n\t\t\t\tFiles.createFile(localfiletmp);\n\t\t\t}\n\t\t\tcfgpath = Paths.get(localfile.toAbsolutePath().toString() + \".pcd.dl.cfg\");// local cache of download file\n\t\t\tif (!Files.exists(cfgpath, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tFiles.createFile(cfgpath);\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(cfgpath.toFile());\n\t\t\tfw.write(url);\n\t\t\tfw.flush();\n\t\t\tfw.close();\n\t\t\treturn true;\n\t\t}\n\t}",
"protected boolean findTarget(){\n\t\t// shoot units\n\t\tfloat tmpDist = -1;\n\t\tUnit tmpUnit = null;\n\t\tfor(Unit u:Game.map.get(tileId).unitMap){ // loop through units on\n\t\t\t\t\t\t\t\t\t\t\t\t\t// maptile\n\t\t\tif(this.id == u.id)\n\t\t\t\tcontinue;\n\t\t\tif(this.ownerId == u.ownerId)\n\t\t\t\tcontinue;\n\t\t\tif(u.dead)\n\t\t\t\tcontinue;\n\t\t\tVector3f tmp = Vector3f.sub(this.modelPos, u.modelPos, null);\n\t\t\tif(tmpDist == -1 || tmp.length() < tmpDist){\n\t\t\t\ttmpUnit = u;\n\t\t\t\ttmpDist = tmp.length();\n\t\t\t}else\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(tmpDist != -1 && tmpDist <= range && tmpUnit != null){\n\t\t\tthis.hostile = tmpUnit;\n\t\t\tthis.target = this.hostile.modelPos;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasTarget(){\n\t\treturn this.targetComponent != null;\n\t}",
"static boolean sourceCoveredByProjectViewTargets(LocationContext context) {\n Collection<TargetKey> targetsBuildingSource =\n SourceToTargetMap.getInstance(context.project)\n .getRulesForSourceFile(new File(context.file.getPath()));\n return !targetsBuildingSource.isEmpty()\n && sourceInProjectTargets(context, targetsBuildingSource);\n }",
"boolean checkShouldSkipTarget(String target) {\n return Boolean.TRUE.equals(SKIP_TARGETS.retrieve(target));\n }",
"private boolean isTarget() {\n\t\t// Get a stack trace by constructing an exception here\n\t\tException exc = new Exception();\n\n\t\tfor (PyObject obj : targets.getList()) {\n\t\t\t// Only process proper tuple entries\n\t\t\tif (obj instanceof PyTuple && ((PyTuple) obj).__len__() >= 2) {\n\n\t\t\t\t// Compile the target specification\n\t\t\t\tPyTuple target = (PyTuple) obj;\n\t\t\t\tPattern clazz = getPattern(target.__finditem__(0));\n\t\t\t\tPattern method = getPattern(target.__finditem__(1));\n\n\t\t\t\t// Now scan the stack using this pair of patterns\n\t\t\t\tfor (StackTraceElement ste : exc.getStackTrace()) {\n\t\t\t\t\tif (clazz == null || clazz.matcher(ste.getClassName()).matches()) {\n\t\t\t\t\t\t// Either we don't care about the class it matches, and ...\n\t\t\t\t\t\tif ((method == null || method.matcher(ste.getMethodName()).matches())) {\n\t\t\t\t\t\t\t// Either we don't care about the method name or it matches\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Nothing matched\n\t\treturn false;\n\t}",
"private boolean isPrivate( Target target ) {\n if ( target == null )\n return true;\n String target_name = target.getName();\n if ( target_name.indexOf( '.' ) > 0 ) {\n return true;\n }\n if ( target_name.startsWith( \"-\" ) ) {\n return true;\n }\n String description = target.getDescription();\n if ( description == null || description.equals( \"\" ) ) {\n return true;\n }\n return false;\n }",
"boolean checkShouldDownloadFile(String target, String name) {\n return Boolean.TRUE.equals(DOWNLOAD_FILES.retrieve(target, name));\n }",
"protected boolean resourceExists() {\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\n\t\tif (workspace == null)\n\t\t\treturn false;\n\t\treturn RodinDB.getTarget(workspace.getRoot(), this.getPath()\n\t\t\t\t.makeRelative(), true) != null;\n\t}",
"public static boolean hasTarget() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"tv\").getDouble(0) == 0 ? false : true;\n }",
"public abstract boolean isTarget();",
"public Boolean shouldUseAlternateTargetLocation() {\n return this.shouldUseAlternateTargetLocation;\n }",
"public boolean hasTarget() { \n if (isReal) {\n return get(\"tv\") == 1; // cleaned return statement up\n } else {\n return hasTargetSim.getBoolean(false);\n }\n }",
"boolean hasTargetPos();",
"public boolean targetsDiscovered() {\n return false;\r\n }",
"boolean hasSource();",
"boolean isReachable(byte[] target, byte[] source);",
"private Target findTargetByName(String targetName, String environment) {\n if (targetName == null || targetName.isEmpty()) {\n return NO_TARGET;\n }\n\n Target target = environmentRepository.getAndValidateServer(targetName, environment);\n\n Optional<NetworkDescription> networkDescription = currentNetworkDescription.findCurrent();\n if (networkDescription.isPresent() && networkDescription.get().localAgent().isPresent()) {\n final Agent localAgent = networkDescription.get().localAgent().get();\n List<Agent> agents = localAgent.findFellowAgentForReaching(target.id);\n return Target.builder()\n .copyOf(target)\n .withAgents(agents.stream().map(a -> a.agentInfo).collect(Collectors.toList()))\n .build();\n }\n return target;\n }",
"boolean hasSrcPath();",
"boolean hasTargetPlayerName();",
"private boolean sourceExists(File fileToCheck) {\n\t\tif (fileToCheck.exists()) {\n\t\t\tSystem.out.println(\"Source file \"+fileToCheck.getName()+ \" exists.\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"Source file \"+fileToCheck.getName()+ \" DOESN'T exist.\");\n\t\t\treturn false;\n\t\t}\n\t}",
"private void checkTargetsReachable(){\n\t\tPathfinder pathfinder = new Pathfinder(collisionMatrix);\n\t\tLinkedList<Node> removeList = new LinkedList<Node>();\n\t\tboolean pathWasFound = false;\n\t\tLinkedList<Node> currentPath;\n\t\tLinkedList<Node> reversePath;\n\t\t\n\t\t//Go through all starting positions\n\t\tfor(LinkedList<Node> startList : targets){\n\t\t\tprogress += 8;\n\t\t\tsetProgress(progress);\n\t\t\tfor(Node startNode : startList){\n\t\t\t\t\n\t\t\t\tboolean outsideMap = (startNode.getCollisionXPos(scaleCollision) < 0 || startNode.getCollisionXPos(scaleCollision) >= (collisionMatrix.length-1) || startNode.getCollisionYPos(scaleCollision) < 0 || startNode.getCollisionYPos(scaleCollision) >= (collisionMatrix.length-1));\n\t\t\t\t\n\t\t\t\tpathWasFound = false;\n\t\t\t\t//Make sure that target is inside of map\n\t\t\t\tif(!outsideMap){\n\t\t\t\t\t//Check against all target positions\n\t\t\t\t\tfor(LinkedList<Node> targetList : targets){\n\t\t\t\t\t\tfor(Node targetNode : targetList){\n\t\t\t\t\t\t\t//Only check against targets that have not already been marked as unreachable\n\t\t\t\t\t\t\tboolean selfCheck = (targetNode.getXPos() != startNode.getXPos() || targetNode.getYPos() != startNode.getYPos());\n\t\t\t\t\t\t\tif(!removeList.contains(targetNode) && selfCheck){\n\t\t\t\t\t\t\t\t//Check if this path has already been checked\n\t\t\t\t\t\t\t\tif(!preCalculatedPaths.containsKey(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision))){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurrentPath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t//Check if a path can be found for this start and target node\n\t\t\t\t\t\t\t\t\tif(pathfinder.findPath(startNode.getCollisionXPos(scaleCollision), startNode.getCollisionYPos(scaleCollision), targetNode.getCollisionXPos(scaleCollision), targetNode.getCollisionYPos(scaleCollision), currentPath)){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(Frame.USE_PRECALCULATED_PATHS)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision), currentPath);\n\t\t\t\t\t\t\t\t\t\t\treversePath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t\t\treversePath.addAll(currentPath);\n\t\t\t\t\t\t\t\t\t\t\tCollections.reverse(reversePath);\n\t\t\t\t\t\t\t\t\t\t\treversePath.removeFirst();\n\t\t\t\t\t\t\t\t\t\t\treversePath.add(startNode);\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(targetNode.toStringCollision(scaleCollision) + \"-\" + startNode.toStringCollision(scaleCollision) ,reversePath);\n\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\tpathWasFound = true;\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\telse{\n\t\t\t\t\t\t\t\t\tpathWasFound = true;\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//Remove nodes which we cannot find a path from\n\t\t\t\tif(!pathWasFound){\n\t\t\t\t\tremoveList.add(startNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Go through the remove list and remove unreachable nodes\n\t\tfor(Node node : removeList){\n\t\t\tfor(LinkedList<Node> startList : targets){\n\t\t\t\tstartList.remove(node);\n\t\t\t}\n\t\t}\n\t}",
"public boolean getIsTargetFound() {\n NetworkTableEntry tv = m_table.getEntry(\"tv\");\n double v = tv.getDouble(0);\n if (v == 0.0f){\n return false;\n }else {\n return true;\n }\n }",
"boolean hasFileLoc();",
"boolean hasDestination();",
"boolean hasDestination();",
"private static boolean assetHasLocalReference(MD5Key id) {\n \n \t\treturn getLocalReference(id) != null;\n \t}",
"private static boolean sourceInProjectTargets(\n LocationContext context, Collection<TargetKey> targetsBuildingSource) {\n if (targetsBuildingSource.stream().anyMatch(context.syncData.getTargetMap()::contains)) {\n return true;\n }\n ImportRoots roots = context.getImportRoots();\n return targetsBuildingSource.stream().anyMatch(t -> roots.targetInProject(t.getLabel()));\n }",
"@Override\n public boolean doCheck() {\n logger.debug(\" check if destination file exists: \" + strDestFile);\n if (strDestFile != null) {\n if (new File(strDestFile).exists()) {\n return true;\n }\n }\n return false;\n }",
"boolean hasFileLocation();",
"boolean hasGeoTargets();",
"boolean isSetTarget();",
"public boolean isRemoteFile() {\n\t\tif (this.serverFileInfo == null)\n\t\t\tthis.fetchInfo();\n\t\treturn this.serverFileInfo != null && this.serverFileInfo.exists();\n\t}",
"private ProcessProfile findTargetNode(Set<String> localAddrs, List<ProcessProfile> nodeAddrs) {\n for (String localAddr : localAddrs) {\n for (ProcessProfile node : nodeAddrs) {\n // If this addresses bound to the nics on this host are contained on the current node\n // send back the data object containing the required info.\n if (node.boundAddresses.contains(localAddr)) {\n return node;\n }\n }\n }\n\n // If we got this far and came up empty, signal our displeasure\n logger.error( \"Comparison did not result in an IP or Host match. {} {}\", localAddrs, nodeAddrs);\n throw new RuntimeException(\"Could not find the target node.\");\n }",
"private boolean reachX(Position target) {\n return position.x == target.x;\n }",
"boolean hasSrc();",
"static boolean localMove(File source, File target) {\n\t\tif (target.exists())\n\t\t\tif (!target.delete()) {\n\t\t\t\tlogConsole(0, target.getPath() + \" delete failed\", null);\n\t\t\t\treturn false;\n\t\t\t}\n\t\tif (source != null)\n\t\t\tif (!source.renameTo(target)) {\n\t\t\t\tlogConsole(0, target.getPath() + \" rename failed\", null);\n\t\t\t\treturn false;\n\t\t\t}\n\t\treturn true;\n\t}",
"public synchronized boolean isOnTarget()\n {\n final String funcName = \"isOnTarget\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n boolean onTarget = false;\n\n if (noOscillation)\n {\n //\n // Don't allow oscillation, so if we are within tolerance or we pass target, just quit.\n // If setPointSign is positive, it means the target is \"forward\". So if currError <= tolerance,\n // it means we are either within tolerance or have passed the target.\n // If setPointSign is negative, it means the target is \"backward\". So if -currError <= tolerance,\n // it means we are either within tolerance or have passed the target.\n //\n if (currError * setPointSign <= tolerance)\n {\n onTarget = true;\n }\n }\n else if (Math.abs(currError) > tolerance)\n {\n settlingStartTime = TrcUtil.getCurrentTime();\n }\n else if (TrcUtil.getCurrentTime() >= settlingStartTime + settlingTime)\n {\n onTarget = true;\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%s\", Boolean.toString(onTarget));\n }\n\n return onTarget;\n }",
"boolean hasTargetPlayerId();",
"private boolean checkTargetMatch(GameElement target){\r\n\t\treturn (target.getAttributeManager().getAttribute(AttributeConstantsEnum.AFFILIATION.getStatusCode()).getValue()\r\n\t\t\t\t== myTargetAffiliationID.getValue());\r\n\t}",
"public boolean IsLocal() {\r\n\t\treturn BrickFinder.getDefault().isLocal();\r\n\t}",
"private boolean searchBoardForTarget(BoardSquareInfo start, BoardSquareInfo target, int state, boolean backwards, ArrayList<BoardSquareInfo> path) {\n\t\tLog.d(LOG_TAG, \"Search board for target\");\n\t\tLog.d(LOG_TAG, String.format(\"*****start: %s\",start));\n\t\tLog.d(LOG_TAG, String.format(\"*****target: %s\",target));\n\t\tLog.d(LOG_TAG, String.format(\"*****state: %s\",state));\n\t\tLog.d(LOG_TAG, String.format(\"*****backwards: %s\",backwards));\n\t\t\n\t\t// NOTE: Revisit code to ensure logic correct, especially if \n\t\t// I continue to add checks for cases not handled\n\t\t\n\t\t// See note at class level\n\t\tint row = (state == PLAYER1_STATE) ? -1 : +1;\n\t\tint col = (backwards)? -1: +1;\n\t\t\n\t\t// Check side\n\t\tBoardSquareInfo square = getData(start.row + row, start.column + col);\n\t\tif (square == null) {\n\t\t\tLog.d(LOG_TAG, \"*****square evaluate to null\");\n\t\t\treturn false;\n\t\t}\n\n\t\tLog.d(LOG_TAG, String.format(\"*****square evaluated: %s\", square));\n\t\t\n\t\t// Found it\n\t\tif (target.equals(square)) {\n\t\t\tLog.d(LOG_TAG, \"*****target found\");\n\t\t\treturn true;\n\t\t} // end if\n\n\t\t// STOP, square states are the same\n\t\tif(square.state == activeState)\n\t\t\treturn false;\n\t\t\n\t\t// Peek at next square. \n\t\tBoardSquareInfo peek = getData(square.row + row, square.column + col);\n\t\tif(peek == null) {\n\t\t\tLog.d(LOG_TAG, \"*****peek is null\");\n\t\t\t\t\t\t\n\t\t\treturn false;\n\t\t} // end if\n\t\t\n\t\t// We know now that we can't jump move to peek\n\t\t// STOP, we can never find target on this path\n\t\tif(peek.state == activeState) {\n\t\t\tLog.d(LOG_TAG, \"*****stop, we can never move pass a square with same state\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// King allow to move over two consecutive empty squares\n \t\tif(activeSquare.isKing \n\t\t\t\t&& peek.state == EMPTY_STATE \n\t\t\t\t&& peek.state == square.state \n\t\t\t\t&& moveActiveSquare(square,target,state,path)) {\n \t\t\tLog.d(LOG_TAG, \"*****king moved over two or more consecutive emtpy squares complete\");\n \t\t\tpath.add(square);\n\t\t\treturn true;\n \t\t}\n\t\t\n\t\t// We know peek isn't an empty square\n\t\t// STOP, never jump over two square with same state \n\t\tif(peek.state == square.state) {\n\t\t\tLog.d(LOG_TAG, \"*****stop, never jump over two squares with same state\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Remove opponent\n\t\tif (square.state != EMPTY_STATE && moveActiveSquare(square, target, state,path)) {\n\t\t\tLog.d(LOG_TAG, String.format(\"*****removing opponent square: %s\", square));\n\t\t\tpath.add(square);\n\t\t\treturn true;\n\t\t}\n\n\t\t// Continue moving\n\t\tif(square.state == EMPTY_STATE && moveActiveSquare(square,target,state,path)) {\n\t\t\tLog.d(LOG_TAG, \"*****continue moving done\");\n\t\t\tpath.add(square);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tLog.d(LOG_TAG, \"*****target not found on this path\");\n\t\treturn false;\n\t}",
"boolean existsPath(String requestedUrl);",
"boolean hasHost();",
"boolean hasHost();",
"public boolean isLocalFile(String path) {\n System.out.println(path);\n if (path.contains(\"http://\") || path.contains(\"https://\")) {\n System.out.println(\"no es local\");\n return false;\n }\n System.out.println(\"es local\");\n return true;\n }",
"private static boolean isUnknownSource(String url) {\n return false;\n }",
"boolean hasVmUrl();",
"@Override\n public void stageForCache_destination_exists() throws Exception {\n assumeTrue( !isWindows() );\n super.stageForCache_destination_exists();\n }",
"private void initializeTargetDirectory()\n {\n if ( isFtpEnabled() )\n initializeRemoteTargetDirectory();\n else\n initializeLocalTargetDirectory(); \n }",
"public static boolean uriFileExists(Context targetCtx, String uri ){\n if (uri.isEmpty()){ return false; }\n ContentResolver resolver = targetCtx.getContentResolver();\n try {\n BitmapFactory.decodeStream(resolver.openInputStream(Uri.parse(uri)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }",
"@Override\n public boolean hasTarget() {\n if (targets.size < Rules.Player.SideKicks.HeatTurret.MAX_TARGETS) {\n return false;\n }\n for (int i = 0; i < targets.size; i++) {\n Enemy currentTarget = targets.get(i);\n if (currentTarget.isDead()) {\n targets.removeIndex(i);\n return true;\n }\n }\n return false;\n }",
"public boolean containsTarget(final L2Character player)\n\t{\n\t\treturn getAggroListRP().containsKey(player);\n\t}",
"public boolean hasTargetObjectUri() {\n return fieldSetFlags()[5];\n }",
"boolean hasRemoteHost();",
"private boolean tryFindPath() {\n\t\t\tfor (Node neighbour : neighbours) {\n\t\t\t\tif (neighbour.x == n || neighbour.y == 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!neighbour.isReachable()) {\n\t\t\t\t\tneighbour.setReachable();\n\t\t\t\t\tif (neighbour.tryFindPath()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"private static boolean testNotFound() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\tlogger.finest(\"sending request\");\r\n\t\tURL url = urlList.get(0);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tURL notFoundURL = new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile() + \"random\");\r\n\t\t\tHttpClient client = new HttpClient(notFoundURL);\r\n\t\t\texecutor.execute(client);\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tlogger.severe(\"problem formatting URL\");\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.finest(\"waiting for request to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.finest(\"not found request completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"static private boolean existingURL( final URL baseURL, final String urlSpec ) throws Exception {\n\t\tfinal URL url = new URL( baseURL, urlSpec );\n\t\treturn new File( url.toURI() ).exists();\n\t}",
"public boolean isLocalFile() {\n\t\ttry {\n\t\t\tFile localFile = getLocalFile();\n\t\t\treturn localFile != null && localFile.exists();\n\t\t} catch (CoreException e) {\n\t\t\tlogger.debug(\"Unable to determine if file is local\", e);\n\t\t}\n\t\treturn false;\n\t}",
"boolean isSource();",
"private static boolean checkURL(String file) {\n\t\tFile myFile = new File(file);\n\t\treturn myFile.exists() && !myFile.isDirectory();\n\t}",
"public boolean setupOwnAddress() {\n\t\tboolean success = false;\n\t\ttry {\n\t\t\tthis.ownAddress = NetworkLayer.getOwnAddress(); // TODO replace by discover?\n\t\t\tthis.showNamedMessage(\"Client listing on: \" + this.ownAddress);\n\t\t\tthis.showNamedMessage(\"NOTE: depending on detection method,\"\n\t\t\t\t\t+ \" this may NOT be the actual interface used\");\n\t\t\tthis.showNamedMessage(\"Discovered preferred local address: \" \n\t\t\t\t\t+ NetworkLayer.discoverLocalAddress());\n\t\t\tsuccess = true;\n\t\t} catch (UnknownHostException e) {\n\t\t\tthis.showNamedMessage(\"Could not determine own address: \" + e.getLocalizedMessage());\n\t\t} \n\t\treturn success;\n\t}",
"@SuppressWarnings(\"unused\")\n private static boolean isURLExists(String urlName) throws Exception {\n // SSLContext sslcontext = SSLContext.getInstance(\"TLSv1\");\n //\n // sslcontext.init(null,\n // null,\n // null);\n // SSLSocketFactory noSSLv3Factory = new NoSSLv3Factory(sslcontext.getSocketFactory());\n //\n // HttpsURLConnection.setDefaultSSLSocketFactory(noSSLv3Factory);\n //\n // HttpsURLConnection con = (HttpsURLConnection) new URL(urlName).openConnection();\n //\n // HttpsURLConnection.setFollowRedirects(false);\n // con.setConnectTimeout(1000);\n // con.setReadTimeout(1000);\n // con.setRequestMethod(\"HEAD\");\n //\n // return con.getResponseCode() == HttpsURLConnection.HTTP_OK;\n\n // Runtime runtime = Runtime.getRuntime();\n // Process proc = runtime.exec(\"ping \" + urlName); //<- Try ping -c 1 www.serverURL.com\n // int mPingResult = proc.waitFor();\n // if (mPingResult == 0) {\n // Log.e(\"thanh.dao\", \"isURLExists: \" + true);\n // return true;\n // } else {\n // Log.e(\"thanh.dao\", \"isURLExists: \" + false);\n // return false;\n // }\n\n Jsoup.connect(urlName).timeout(CONNECT_TIMEOUT).get();\n return true;\n }",
"@Test\n\tpublic void selectTargetLocation() {\n\t\tboard.findAllTargets(playerComputer.getCurrentLocation(), 6);\n\t\tSet<BoardCell> targets = board.getTargets();\n\t\t\n\t\t//Tests to make sure the computers chosen cell is in targets\n\t\tBoardCell cell = ((computerPlayer) playerComputer).pickLocation(targets);\n\t\tassertTrue(targets.contains(cell));\n\t\t\n\t\t//This test ensures that if there is a room that hasn't been visited the computer picks that cell\n\t\tIterator<BoardCell> iterator = targets.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\t\tBoardCell cell2 = iterator.next();\n\t\t\tif(cell2.isRoom()) {\n\t\t\t\tif(cell2.getInitial() != ((computerPlayer) playerComputer).getLastVisited()) {\n\t\t\t\t\tassertEquals(cell2.getInitial(), cell.getInitial());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected boolean isFinished() {\n \tTargetTransform tt = Robot.vision_.getLatestGearLiftTargetTransform();\n \t\n \tif ( !isTimedOut() )\n \t{\n \t\treturn false;\n \t}\n \t\n \tif ( tt == null )\n \t{\n \t\treturn false;\n \t}\n \t\n \tif ( !tt.targetFound() )\n \t{\n \t\treturn false;\n \t}\n \t\n \tif ( previousTargetTransform == null )\n \t{\n \t\tRobot.vision_.takeTargetSnapshot( tt );\n\t\t\treturn true;\n \t}\n \t\n \tif ( !tt.equals(previousTargetTransform) )\n \t{\n\t\t\tRobot.vision_.takeTargetSnapshot( tt );\n\t\t\treturn true;\n \t}\n \t\n \treturn false;\n }",
"public void testGetTargetFileName() throws Exception {\n System.out.println(\"getTargetFileName\");\n // server can be configured such that \n // the target directory name is not an empty value\n //String expResult = \"\";\n String result = instance.getTargetFileName();\n assertNotNull(result);\n \n }",
"public boolean getExists() {\n try {\n return getExecutable(new Launcher.LocalLauncher(new StreamTaskListener(new NullStream()))) != null;\n } catch(IOException ex) {\n return false;\n } catch(InterruptedException e) {\n return false;\n }\n }",
"public static boolean hasNoTarget(PathConnectionType element, String elementName)\n\t{\n\t\tStringBuilder error = new StringBuilder(); \n\t\tboolean hasError = false;\n\t\t\n\t\tif (element.getTarget() != null && element.getTarget().size() > 0)\n\t\t{\n\t\t\terror.append(elementName + \" (\"+ element.getId() + \") is not allowed to have a target attribute\").append(\"\\n\"); \n\t\t\thasError = true; \n\t\t}\n\t\t\n\t\tif (hasError){\n\t\t\tSystem.out.println(error.toString()); \n\t\t\treturn false;\n\t\t}\n\t\treturn true; \n\t}",
"private boolean doesWarpExist(IPlayer owner, String name)\r\n\t{\r\n\t\t// Check if the warp is already stored in the cache.\r\n\t\tif (cache.Cache(cacheKey(owner, name)) != null)\r\n\t\t\treturn true;\r\n\r\n\t\tfinal boolean publicWarp = (owner == null);\r\n\t\tString privateWarp = \"\";\r\n\t\tif (!publicWarp)\r\n\t\t\tprivateWarp = \" AND `creator`='\" + owner.getUniqueId().toString() + \"'\";\r\n\r\n\t\treturn database.queryString(\r\n\t\t\t\"SELECT y FROM `warpdrive_locations` WHERE `name`=? AND `public`=?\" + privateWarp,\r\n\t\t\tname, publicWarp ? 1 : 0\r\n\t\t) != null;\r\n\t}",
"@Test\n public void targetLocationTest() {\n // TODO: test targetLocation\n }",
"public boolean isSuccessful() {\r\n return isTargetTemplateSetPresent() && missing.isEmpty();\r\n }",
"@Test\n public void testChooseLocalNodeWithLocalNodeLoaded() {\n DatanodeDescriptor localNode = dataNodes[1];\n int numLocalChosen = 0;\n for (int i = 0; i < CHOOSE_TIMES; i++) {\n DatanodeStorageInfo[] targets =\n namenode.getNamesystem().getBlockManager().getBlockPlacementPolicy()\n .chooseTarget(FILE, 1, localNode,\n new ArrayList<DatanodeStorageInfo>(), false, null, BLOCK_SIZE,\n TestBlockStoragePolicy.DEFAULT_STORAGE_POLICY, null);\n\n Assert.assertEquals(1, targets.length);\n if (localNode == targets[0].getDatanodeDescriptor()) {\n numLocalChosen++;\n }\n }\n Assert.assertTrue(numLocalChosen < (CHOOSE_TIMES - numLocalChosen));\n }",
"boolean getWorkfileExists();",
"private static Path getTargetPath() {\r\n return Paths.get(getBaseDir(), \"target\");\r\n }",
"public Boolean lookupAWord(String target) {\n ArrayList<Word> fullDictionary = dictionaryManagement.getDictionary().getWords();\n int result = dictionaryManagement.lookupWord(target);\n if (result == -1) {\n System.out.println(\"This word is dose not exsit!\");\n return false;\n } else {\n System.out.println(\"Result: \");\n System.out.println(\"\\tTarget: \" + target);\n System.out.println(\"\\tExplain: \" + fullDictionary.get(result).getWordExplain());\n return true;\n }\n }",
"private static Image getTarget()\n\t{\n\t\ttry {\n\t\t\treturn ImageIO.read(new File(tileDirectory + target));\n\t\t} catch (IOException ioe) {\n\t\t}\n\t\treturn null;\n\t}",
"public boolean sourceExists(String name) {\n \treturn mTemplates.containsKey(name);\n }",
"boolean hasTargetJobName();",
"public boolean sourceExists(String name) {\n return mTemplateMap.containsKey(name);\n }",
"@SuppressWarnings(\"all\")\n private Record findTarget() {\n final ConcurrentMap<String, Record> address = ORIGIN.getRegistryData();\n final String target = this.getValue(\"to\");\n final String name = this.getValue(\"name\");\n // 1. Find service names\n final List<Record> records = this.findRecords();\n final Record record = records.stream().filter(item ->\n target.equals(item.getMetadata().getString(\"path\")))\n .findAny().orElse(null);\n // Service Name\n Fn.outWeb(null == record, this.logger,\n _501RpcImplementException.class, this.getClass(),\n name, target, this.event);\n // Address Wrong\n Fn.outWeb(null == record.getMetadata() ||\n !target.equals(record.getMetadata().getString(\"path\")), this.logger,\n _501RpcAddressWrongException.class, this.getClass(),\n target, name);\n this.logger.info(Info.RECORD_FOUND, record.toJson());\n return record;\n }",
"@Override\n public boolean isRemoteProject() {\n return true;\n }",
"public boolean isSetTargetKey() {\n return this.targetKey != null;\n }",
"@Test\r\n\tpublic void testTargets33_1() {\r\n\t\tBoardCell cell = board.getCell(3, 3);\r\n\t\tboard.calcTargets(cell, 1);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(2, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 2)));\r\n\r\n\t}",
"private boolean isMine(Long targetNid) {\n return targetNid.equals(ArbitrateConfigUtils.getCurrentNid());\n }",
"private void checkReferences(DataStage dataStage, boolean useSourceType, Object result) {\n final List<TargetInternalReference> references = new ArrayList<>();\n Helpers.collectAllTargetInternalReferences(result, references);\n Map<String, Boolean> cachedReferences = new HashMap<>();\n references.forEach(t -> {\n boolean reset = false;\n if (t.getReference() != null) {\n final Boolean fromCache = cachedReferences.get(t.getReference());\n if(fromCache !=null){\n if(fromCache){\n reset = true;\n }\n }\n else {\n TargetInstance reference = null;\n try {\n final List<String> typesOfReference = kgV3.getTypesOfInstance(t.getReference(), DataStage.IN_PROGRESS, false);\n if (typesOfReference != null) {\n final TranslatorModel<?, ?> referenceTranslatorModel = TranslatorModel.MODELS.stream().filter(m -> m.getV3translator() != null && m.getV3translator().semanticTypes().stream().anyMatch(typesOfReference::contains)).findFirst().orElse(null);\n if (referenceTranslatorModel != null) {\n final String referenceQueryId = typesOfReference.stream().map(type -> referenceTranslatorModel.getV3translator().getQueryIdByType(type)).findFirst().orElse(null);\n reference = translateTargetInstance(dataStage, useSourceType, t, reference, referenceTranslatorModel, referenceQueryId);\n }\n }\n reset = reference == null;\n cachedReferences.put(t.getReference(), reset);\n } catch (WebClientResponseException ignored) {\n logger.error(\"A web client exception occurred - ignoring\");\n }\n }\n }\n if (reset) {\n t.setReference(null);\n }\n });\n }",
"@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"private void checkSourcesAndDestinationsExistence(final LinkDTO dto) throws FunctionalException {\n\t\tif (dto.getSources() == null) {\n\t\t\tthrow new FunctionalException(FunctionalException.Code.NULL_ARGUMENT, null, \"(source component)\");\n\t\t}\n\t\tif (dto.getDestinations() == null) {\n\t\t\tthrow new FunctionalException(FunctionalException.Code.NULL_ARGUMENT, null, \"(destination component)\");\n\t\t}\n\t\t// check existence of sources and destination Components\n\t\tfor (HasNameAndIdDTO compDTO : dto.getSources()) {\n\t\t\tif (explorer.getComponentByID(compDTO.getId()) == null) {\n\t\t\t\tthrow new FunctionalException(FunctionalException.Code.TARGET_NOT_FOUND, null, \"(source component)\");\n\t\t\t}\n\t\t}\n\t\tfor (HasNameAndIdDTO compDTO : dto.getDestinations()) {\n\t\t\tif (explorer.getComponentByID(compDTO.getId()) == null) {\n\t\t\t\tthrow new FunctionalException(FunctionalException.Code.TARGET_NOT_FOUND, null, \"(destination component)\"\n\t\t\t\t\t\t+ compDTO.getId());\n\t\t\t}\n\t\t}\n\t}",
"private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}",
"public void findDestination() {\n\t\t\n\t}",
"public boolean hasPath() {\n return carrier.findPath(getCarrierTarget()) != null;\n }",
"@Override\n public MethodOutcome destinationFileExistsSrcIsFileOutcome() {\n return new MethodOutcome(MethodOutcome.Type.RETURNS_FALSE);\n }",
"private boolean allSourcePathsExist(List<String> sourcePath) {\n\t\tfor (Iterator<String> ii = sourcePath.iterator(); ii.hasNext();) {\n\t\t\tString dirName = ii.next();\n\t\t\tFile dir = new File(getDirectory().getAbsolutePath() + \"/\"\n\t\t\t\t\t+ dirName);\n\t\t\tif (!dir.exists())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean checkInception(Item it1, String target){\n\t\tif (it1 == openContainer && target.startsWith(\"ContPos\")){\n\t\t\tdisplayMessage(\"INCEPTION FAILED. NICE TRY\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private CFGNode findTarget(String target, ArrayList<CFGNode> nodes) {\n for (CFGNode n: nodes) {\n if (n.block.label != null && n.block.label.trim().equals(target.trim())) {\n return n;\n }\n }\n\n return null;\n }"
] | [
"0.6662962",
"0.6491774",
"0.63805866",
"0.6349",
"0.62799263",
"0.62776035",
"0.61618084",
"0.6091373",
"0.6047825",
"0.598329",
"0.5956322",
"0.59524494",
"0.59303683",
"0.58876115",
"0.5883937",
"0.5877376",
"0.58729863",
"0.584559",
"0.57966185",
"0.5764198",
"0.57491",
"0.57343835",
"0.5711909",
"0.5706926",
"0.5697191",
"0.5695284",
"0.56648076",
"0.56351894",
"0.56293654",
"0.5623907",
"0.5623874",
"0.5523008",
"0.5523008",
"0.551042",
"0.5507546",
"0.55055285",
"0.5504035",
"0.55010855",
"0.55010086",
"0.54772884",
"0.54613894",
"0.54530793",
"0.54376906",
"0.5433999",
"0.5423741",
"0.540745",
"0.540241",
"0.5401093",
"0.5380973",
"0.5368171",
"0.536413",
"0.536413",
"0.5356702",
"0.5351757",
"0.53434825",
"0.53335255",
"0.5325624",
"0.5302286",
"0.5294443",
"0.5287701",
"0.5284604",
"0.52776307",
"0.52631634",
"0.5254099",
"0.5253057",
"0.5240834",
"0.5232632",
"0.5230525",
"0.5210834",
"0.52069366",
"0.5197942",
"0.51933306",
"0.5188604",
"0.518793",
"0.5185253",
"0.51832485",
"0.51830065",
"0.5179628",
"0.517468",
"0.5171698",
"0.5163887",
"0.51631296",
"0.5161757",
"0.5160425",
"0.51546496",
"0.5149682",
"0.5147795",
"0.51370704",
"0.5125632",
"0.5125131",
"0.5120541",
"0.5118697",
"0.51103073",
"0.51038486",
"0.5098273",
"0.5093355",
"0.50886256",
"0.50797194",
"0.50796264",
"0.5076569",
"0.5074285"
] | 0.0 | -1 |
System.out.println(" Returning to sender...."); | private void returnToSender(ClientMessage m) {
if (m.returnToSender) {
// should never happen!
// System.out.println("**** Returning to sender says EEK");
return;
}
// System.out.println("**** Returning to sender says her I go!");
m.returnToSender = true;
forward(m, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void displayEndingMessage() {\n\t\tSystem.out.println(\"Thank you for using my program!\");\n\t}",
"public void exit() {\n System.out.println(\"Thank you for playing Nim\");\n }",
"void sendMessage() {\n\n\t}",
"@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}",
"void sendFinishMessage();",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tSystem.out.println(\"Sent\");\n\t\t\t\t\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tString info=5+\" \"+name;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t//send exit info to server\r\n\t\t\t\t\t\ttoServer.writeUTF(info);\r\n\t\t\t\t\t\ttoServer.flush();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//get return tips from server\r\n\t\t\t\t\t\tinfo=fromServer.readUTF();\r\n\t\t\t\t\t\thandle.setVisible(false);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (IOException ex) {\r\n\t\t\t\t\t\tSystem.err.println(ex);\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"public void endMessage()\n\t{\n\t}",
"private void viewMessage()\n {\n System.out.println( inbox );\n inbox = \"\";\n }",
"public void goodbyeMsg();",
"public void print()\n {\n chatarea.append(\"Sender:(\"+port.getText()+\")\"+System.lineSeparator()+msgarea.getText()+System.lineSeparator());\n }",
"public void giveUp(){\r\n System.out.println(\"You are such a loser. Glad that you give up!\");\r\n System.exit(0);\r\n }",
"public void send() {\n\t}",
"public void print(CommandSender sender) {\n\n\t\tif (sender == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (message != null) {\n\t\t\tsend(sender, message);\n\t\t}\n\t}",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"private void printGoodbye() {\n System.out.println();\n System.out.println(\"Thank you for playing. Good bye.\");\n }",
"private void printExitMenu() {\n System.out.println(\"Goodbye! Thanks for using the app!\");\n }",
"@Override\n\tpublic void run(String... args) throws Exception {\n\t\tsender.send();\n\t\tsender.send(123);\n\t}",
"public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}",
"@Override\r\n public void cancelMsg() {\n System.out.println(\"Transaction has been cancelled for gas pump #1..\");\r\n }",
"void messageSent();",
"private String waitPrint(){return \"waiting for other players...\";}",
"@Override\n\tpublic void msgAtFrige() {\n\t\t\n\t}",
"public void recMsgPassed(String msgLabel, String sender) {\n\t\t\n\t}",
"private void printGoodbye()\n {\n System.out.println(\"Nice talking to you. Bye...\");\n }",
"private void b_sendActionPerformed(java.awt.event.ActionEvent evt) { \r\n\t\tString nothing = \"\";\r\n\t\tif ((b_sendText.getText()).equals(nothing)) {\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttry {\r\n\t\t\t\ttellEveryone(\"Server\" + \":\" + b_sendText.getText() + \":\" + \"Chat\");\r\n\t\t\t\tPrint_Writer.flush(); // flushes the buffer\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t}\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\r\n\t\tb_sendText.setText(\"\");\r\n\t\tb_sendText.requestFocus();\r\n\r\n\t}",
"private void showFinishMsg() {}",
"@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }",
"@Override\n\tpublic void SendMessage() {\n\t\tSystem.out.println( phoneName+\"'s SendMessage.\" );\n\t}",
"public static void printExitMessage() {\n printLine();\n System.out.println(\" Bye Bye for now! See you soon!\");\n printLine();\n }",
"void send();",
"String getSender();",
"@Override\n\tpublic void print() {\n\t\tSystem.out.print(\"MsgOwner\");\n\t}",
"void printMsg(){\n\tdisplay();\n }",
"public void quitGame() {\r\n System.out.println(\"Thanks for playing!\");\r\n }",
"public void printMessage() {\n\t\tSystem.out.println(this.greeting + \" \" + this.message);\n\t}",
"@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 void ShowMessage() {\n\t\tthis.ShowMessage(null);\n\t\t\n\t\t/* Exit function. */\n\t\treturn;\n\t}",
"@Override\n\tpublic void onMessage(String arg0, String arg1) {\n\t\tSystem.out.print(arg0+arg1);\n\t}",
"private void sendReceiveRes(){\n\t}",
"void jmiExit_actionPerformed(ActionEvent e) {\n System.out.println(\"Exiting Carrier Agent \");\n unregisterWithMasterServer(); //unregister when exited\n logWriter.writeLog(\"Terminating agent.\");\n System.exit(0);\n }",
"static void goodbye() {\n printGoodbyeMessage();\n System.exit(0);\n }",
"public void returningToTheBar(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(2, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }",
"public void MessageInvitCommand(String msg)\n {\n System.out.println(\"> \"+msg);\n }",
"public static void printGoodbye() {\n botSpeak(Message.GOODBYE);\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 }",
"public boolean SendingMessage() {\n \t\t\treturn false;\n \t\t}",
"public static void displayMsg() {\n\t}",
"@Override\n\tpublic void say() {\n\t\tSystem.out.println(\"¸Û¸Û\");\n\n\t}",
"public void show(){\n System.out.println(\"Sender:\"+_sender);\n System.out.println(\"Receivers:\");\n for(String receiver: _receivers){\n System.out.println(\" - \" + receiver);\n }\n }",
"@Override\n protected void interrupted() {\n System.out.println(\"SendToSmartDashBoard was interrupted.\");\n }",
"@Override\n\tpublic void msgExitHome() {\n\t\t\n\t}",
"private void goodbye() {\n System.out.print(\"\\nThanks for using the linked list program!\\n\");\n }",
"public void stopSending ();",
"@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\tvoid showMsg() {\n\t\tSystem.out.println(\"Sample\");\n\t}",
"public void exitApp() {\n\t\tSystem.out.println(\"Exiting PhoneBook\");\n\n\t}",
"@Override\r\n\tpublic void pick() {\r\n\t\tSystem.out.println(\"Stay away from Jessica ya dweeb.\");\r\n\t\r\n\t}",
"@Override\n public void exit()\n {\n\t ((ControllerHost)getHost()).showPopupNotification(\"Chord Buddy Exited\");\n }",
"protected void echo(String msg){\n\tSystem.out.println(\"*ECHO*: \" + msg);\n }",
"public Reply sender(String senderText) throws ThingsException, InterruptedException;",
"public abstract void displayEndMsg ();",
"@Override\n public void actionPerformed(ActionEvent e) {\n System.exit(1);\n }",
"@Override\n public void run() {\n Message message = new Message();\n message.what = 4;\n handler.sendMessage(message);\n }",
"@Override\r\n public void keyReleased(KeyEvent e) {\n if(e.getKeyCode()==10){ //enter key code is 10\r\n // System.out.println(\"you have pressed enter button\");\r\n String contentToSend=messageInput.getText(); //type kia hua msg nikalna\r\n messageArea.append(\"Me :\"+contentToSend+\"\\n\");\r\n out.println(contentToSend); //msg ko send krna\r\n out.flush();\r\n messageInput.setText(\"\"); //clear hoker isme text ho jayga\r\n messageInput.requestFocus();\r\n }\r\n \r\n }",
"java.lang.String getSender();",
"java.lang.String getSender();",
"java.lang.String getSender();",
"java.lang.String getSender();",
"java.lang.String getSender();",
"java.lang.String getSender();",
"public static void farewell(){\n System.out.print(\"Thank you for using the Human Resources Mangement System.\\nGoodbye!\");\n System.exit(0);\n }",
"private void exitAction() {\n\t}",
"public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }",
"@Override\n\tvoid email() {\n\t\tSystem.out.println(\"[email protected]\");\n\t\t\n\t}",
"@Override\r\n\tpublic void mesage() {\n\t\tSystem.out.println(\"通过语音发短信\");\r\n\t}",
"private void remindGoal()\n {\n System.out.println(\"you have to Pick up all three items and get back outside!\");\n }",
"private void proceed() {\n finish();\n Intent onReturnView = new Intent(ChatMessage.this, MainActivity.class);\n startActivity(onReturnView);\n }",
"public void sendStop(){\n if (isNetworkGame()){\n sender.println(\"stop\");\n sender.flush();\n }\n }",
"public static void printExitMsg() {\r\n CmdUx.printHBars(EXIT_MSG);\r\n }",
"public void send(String result) {\n streamOut.println(result);\n //streamOut.flush();\n\n }",
"public boolean message( Who sender, Message msg ) throws Exception;",
"private void quit()\n\t{\n\t\tapplicationView.showChatbotMessage(quitMessage);\n\t\tSystem.exit(0);\n\t\t\n\t}",
"@Override\n\tpublic void msgAtKitchen() {\n\t\t\n\t}",
"@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}",
"private void exitRegards()\n {\n System.out.println(\"\\t\\tSystem exit...\");\n System.out.println(\"\\t\\t================Thankyou, have a wonderful day! ===============\");\n System.exit(0);\n }",
"public void talk() {\n\t try{\t\n\t \twhile(exit) {\n\t\t \t\t//Definizione stream per la comunicazione\n\t\t \t\ttastiera = new BufferedReader(new InputStreamReader(System.in));\n\t\t \t\tout = new DataOutputStream(connection.getOutputStream());\n\t\t\t\t in = new DataInputStream(connection.getInputStream());\n\t\t\t\t \n\t\t \t\t//Invio messaggio\n\t\t\t\t System.out.println(\"Inserisci il messaggio da mandare al server: \\n\");\n\t\t\t\t mess = tastiera.readLine();\n\t\t\t\t\tout.writeUTF(mess + \"\\n\");\n\t\t\t\t\t\n\t\t\t\t\t//Ricezione risposta server\n\t\t\t\t\tservermess = in.readUTF();\n\t\t\t System.out.println(\"Risposta dal server: \"+servermess);\n\t\t\t if(mess.equals(\"FINE\")) {\n\t\t\t \texit = false;\n\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t }\n\t \tfinally {\n\t\t\t try {\n\t\t\t\t if (connection!=null)\n\t\t\t\t {\n\t\t\t\t connection.close();\n\t\t\t\t System.out.println(\"Connessione chiusa!\");\n\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t catch(IOException e){\n\t\t\t System.err.println(\"Errore nella chiusura della connessione!\");\n\t\t\t }\n\t \t}\t\n \t}",
"public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}",
"@Override\n\tpublic String printMes() throws RemoteException{\n\t\tString mes=\"welcome you!\";\n\t\treturn mes;\n\t}",
"public void print()\r\n {\r\n System.out.println(\"From: \" + from);\r\n System.out.println(\"To: \" + to);\r\n System.out.println(\"Subject: \" + subject);\r\n System.out.println(\"Message: \" + message);\r\n }",
"@Override\n\tpublic void onSendChatDone(byte arg0) {\n\t\t\n\t}",
"public void exitGame() {\n System.out.println(\"Thank you and good bye!\");\n System.exit(0);\n }",
"@Override\n public void run() {\n System.out.println(\"Sent coins onwards! Transaction hash is \" + sendResult.tx.getTxId());\n }",
"public void comer(){\r\n\t\tSystem.out.println(\"He comido\");\r\n\t}",
"public static void ender()\n{\n\tSystem.exit(0); \n}",
"void stopHelloSender();",
"public void msg1()\r\n\t{\n\t\t\r\n\t}",
"private void sendMessage(String message){\n\t\ttry{\n\t\t\toutput.writeObject(\"Punk Ass Server: \" + message);\n\t\t\toutput.flush();\n\t\t\tshowMessage(\"\\nPunk Ass Server: \" + message); \n\t\t}catch(IOException ioe){\n\t\t\tchatWindow.append(\"\\n Message not sent, try again or typing something else\");\n\t\t\t\n\t\t}\n\t\t\n\t}",
"void sendMessage(String msg);",
"public void printMsg() {\n System.out.println(\"This is an example RMI program\");\n }"
] | [
"0.6731586",
"0.67057526",
"0.66517234",
"0.66390246",
"0.65682644",
"0.6489571",
"0.64378446",
"0.63836026",
"0.63757926",
"0.6316772",
"0.63144994",
"0.62921995",
"0.6237159",
"0.619981",
"0.6177756",
"0.61618227",
"0.61586004",
"0.6130784",
"0.61186546",
"0.61137015",
"0.6098429",
"0.60826415",
"0.6074745",
"0.6068142",
"0.6067315",
"0.60650635",
"0.60595363",
"0.6056304",
"0.6050434",
"0.6041378",
"0.6026294",
"0.6006332",
"0.5996993",
"0.59840226",
"0.59560955",
"0.5929002",
"0.5928286",
"0.5921732",
"0.59215575",
"0.5914359",
"0.5881116",
"0.58736014",
"0.5867258",
"0.58547246",
"0.5846206",
"0.5837326",
"0.58364934",
"0.5819877",
"0.58177185",
"0.58032703",
"0.58014256",
"0.57989067",
"0.57984394",
"0.57929385",
"0.5781502",
"0.57766175",
"0.57722044",
"0.575476",
"0.57498866",
"0.5734961",
"0.57249177",
"0.5722763",
"0.5718913",
"0.57132083",
"0.5711309",
"0.5710271",
"0.5710271",
"0.5710271",
"0.5710271",
"0.5710271",
"0.5710271",
"0.5709776",
"0.5706414",
"0.57031333",
"0.5696135",
"0.5695736",
"0.56957346",
"0.56870043",
"0.5682093",
"0.5679717",
"0.5675444",
"0.5674541",
"0.5668348",
"0.5665738",
"0.56640315",
"0.56626934",
"0.565861",
"0.56541866",
"0.56528074",
"0.56513214",
"0.5651277",
"0.56509423",
"0.5650492",
"0.56501704",
"0.56488186",
"0.5642555",
"0.5633305",
"0.56310755",
"0.5620421",
"0.56185895"
] | 0.7002063 | 0 |
DirectSocketAddress hub = DirectSocketAddress.fromBytes(data, 4); System.err.println("Hub is " + hub); / int off = 4 + (hub == null ? 4 : 4 + hub.getAddress().length); //System.err.println("Off is " + off); DirectSocketAddress node = DirectSocketAddress.fromBytes(data, off); //System.err.println("Node is " + node); off += node.getAddress().length; | private void forwardData(byte[] data) throws UnknownHostException,
MalformedAddressException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DSSource({DSSourceKind.NETWORK})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:36:07.243 -0500\", hash_original_method = \"E608923787A6482FF0ABAB03074C01F6\", hash_generated_method = \"7955BA736BD8AD783B98FFDED7E574D5\")\n \npublic LocalSocketAddress getLocalSocketAddress()\n {\n return localAddress;\n }",
"InetSocketAddress peerAddress();",
"SocketAddress socketAddress();",
"public InetSocketAddress getSocketAddress() {\n return addr;\n }",
"@Override\npublic int sendToAddress(InetSocketAddress isa, byte[] msg) throws IOException {\n\treturn 0;\n}",
"@Test\n public void testAddress() throws UnknownHostException {\n InetAddress address = InetAddress.getByAddress(\"www.baidu.com\", new byte[]{(byte) 192, (byte) 168, 0, 1});\n System.out.println(address.getHostName());\n InetSocketAddress socketAddress = new InetSocketAddress(address, 8009);\n System.out.println(socketAddress.getHostString());\n }",
"public abstract UPnPDeviceNode GetDeviceNode(String name);",
"public static int offset_receiverNodeID() {\n return (16 / 8);\n }",
"public InetSocketAddress getDataAddress()\n {\n return rtpTarget;\n }",
"public ChannelFuture method_4115(SocketAddress var1) {\n return null;\n }",
"public static int offset_senderNodeID() {\n return (8 / 8);\n }",
"SocketAddress getLocalAddress();",
"public ChannelFuture method_4116(SocketAddress var1) {\n return null;\n }",
"@Override\n \tpublic void setOutboundInterface(InetSocketAddress arg0) {\n \t\t\n \t}",
"public static InetSocketAddress readSocketAddress(ChannelBuffer buffer)\n\t{\n\t\tString remoteHost = NettyUtils.readString(buffer);\n\t\tint remotePort = 0;\n\t\tif (buffer.readableBytes() >= 4)\n\t\t{\n\t\t\tremotePort = buffer.readInt();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tInetSocketAddress remoteAddress = null;\n\t\tif (null != remoteHost)\n\t\t{\n\t\t\tremoteAddress = new InetSocketAddress(remoteHost, remotePort);\n\t\t}\n\t\treturn remoteAddress;\n\t}",
"public static int offsetBits_receiverNodeID() {\n return 16;\n }",
"long getAddress(ByteBuffer buffer);",
"private static HeaderData readHeader(byte[] data) throws UnknownHostException {\n\t\tInetAddress ip = InetAddress.getByAddress(Arrays.copyOfRange(data, 4, 8));\n\t\t\n\t\tString label = new String(Arrays.copyOfRange(data, 0, 4), Charset.forName(\"UTF-8\"));\n\n\t\tint port = 0;\n\t\tport += data[8] << 24 & 0xFF000000;\n\t\tport += data[9] << 16 & 0xFF0000;\n\t\tport += data[10] << 8 & 0xFF00;\n\t\tport += data[11] & 0xFF;\n\t\t\n\t\treturn new HeaderData(label, ip, port);\n\t}",
"public IEndPointData getLocalEndPoint();",
"@Test\n public void testGetDefaultSocketAddress() throws Exception {\n \tInetAddress adr = InetAddress.getByName(\"252.10.0.200\");\n \t// RFC 2131 compliance\n \t// sorry we ignore the broadcast bit\n \t// fully broadcast by client\n \tgetDefaultSocketAddressTester(INADDR_ANY, INADDR_ANY, DHCPOFFER, INADDR_BROADCAST, 68);\n \tgetDefaultSocketAddressTester(INADDR_ANY, INADDR_ANY, DHCPACK, INADDR_BROADCAST, 68);\n \tgetDefaultSocketAddressTester(INADDR_ANY, INADDR_ANY, DHCPNAK, INADDR_BROADCAST, 68);\n \t// unicast from client\n \tgetDefaultSocketAddressTester(adr, INADDR_ANY, DHCPOFFER, adr, 68);\n \tgetDefaultSocketAddressTester(adr, INADDR_ANY, DHCPACK, adr, 68);\n \tgetDefaultSocketAddressTester(adr, INADDR_ANY, DHCPNAK, INADDR_BROADCAST, 68);\n \t// when though a relay\n \tgetDefaultSocketAddressTester(INADDR_ANY, adr, DHCPOFFER, adr, 67);\n \tgetDefaultSocketAddressTester(INADDR_ANY, adr, DHCPACK, adr, 67);\n \tgetDefaultSocketAddressTester(INADDR_ANY, adr, DHCPNAK, adr, 67);\n }",
"public UdpEndpoint( UdpKernel kernel, long id, SocketAddress address, DatagramSocket socket )\n {\n this.id = id;\n this.address = address;\n this.socket = socket;\n this.kernel = kernel;\n }",
"public static int offsetBits_senderNodeID() {\n return 8;\n }",
"public interface Node\n{\n /**\n * Method to be signaled with a received message\n *\n * @param receiverThread <code>TCPReceiverThread</code> of the receiver associated with the message. Contains\n * a socket connection to the message sender.\n * @param data <code>Event</code> of the incoming message.\n */\n public void onEvent(TCPReceiverThread receiverThread, Event event) throws IOException;\n\n// public void onEvent(TCPReceiverThread receiverThread, byte[] data) throws IOException;\n\n\n /**\n * Method to register a connection between the current node and another. To register a\n * connection, we must create a new Link and add it to our list of connected nodes.\n *\n * @param receiverThread <code>TCPReceiverThread</code> of the receiver thread associated with the node that\n * is being registered.\n * @param sourceID <code>String</code> identifier of the Node creating the Link.\n * @param targetID <code>String</code> identifier of the Node the created Link is to.\n */\n public void registerConnection(TCPReceiverThread receiverThread, String sourceID, String targetID);\n\n /**\n * Method to deregister a node from the current node (ie., sever the link)\n *\n * @param ID <<code>String</code> of the ID to be associated with the link to be deregistered.\n */\n public void deregisterConnection(String ID);\n\n /**\n * Method to return the current Node's ID\n *\n * @return <code>String</code> of the current Node's identifier.\n */\n public String getID();\n\n}",
"entities.Torrent.NodeId getNode();",
"entities.Torrent.NodeId getNode();",
"public void connectTo(NAddress address) throws IOException;",
"@Override\n public int getClientBroadcastPort() {\n return 10082;\n }",
"public interface CommunicationDevice {\n String getAddress();\n\n CommunicationSocket createCommunicationSocket(UUID uuid) throws IOException;\n}",
"private final void forwardVirtualConnect(DirectSocketAddress source,\n DirectSocketAddress sourceHub, DirectSocketAddress target,\n DirectSocketAddress targetHub, long index, int timeout, int port,\n int fragment, int buffer) {\n try {\n synchronized (out) {\n out.write(MessageForwarderProtocol.CREATE_VIRTUAL);\n\n DirectSocketAddress.write(source, out);\n DirectSocketAddress.write(sourceHub, out);\n\n DirectSocketAddress.write(target, out);\n DirectSocketAddress.write(targetHub, out);\n\n out.writeLong(index);\n\n out.writeInt(timeout);\n out.writeInt(port);\n out.writeInt(fragment);\n out.writeInt(buffer);\n\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n }",
"private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }",
"public static void tcp_peeraddr_print( Socket com )\n{\n InetSocketAddress isa = \n (InetSocketAddress)com.getRemoteSocketAddress();\n InetAddress ia = isa.getAddress();\n String peerhostaddr = ia.getHostAddress();\n int peerportno = isa.getPort();\n stdout.printf(\"connection (hash== %s) from %s:%d\\n\", \n com.hashCode(), peerhostaddr, peerportno );\n}",
"public InetSocketAddress discoverIp() throws IOException {\n byte[] buffer = new byte[74];\n ByteBuffer.wrap(buffer)\n .putShort((short) 1)\n .putShort((short) 70)\n .putInt(ssrc);\n\n // send the byte array which contains the ssrc\n socket.send(new DatagramPacket(buffer, buffer.length, address));\n // create a new buffer which is used to receive data from discord\n buffer = new byte[74];\n socket.receive(new DatagramPacket(buffer, buffer.length));\n // gets the ip of the packet\n final String ip = new String(buffer, 8, buffer.length - 10).trim();\n // gets the port (last two bytes) which is a little endian unsigned short\n final int port =\n ByteBuffer.wrap(new byte[] {buffer[buffer.length - 1], buffer[buffer.length - 2]}).getShort() & 0xffff;\n\n return new InetSocketAddress(ip, port);\n }",
"int getAddr();",
"short getDP1( byte[] buffer, short offset );",
"public static int size_senderNodeID() {\n return (8 / 8);\n }",
"org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily getSocketFamily();",
"public String getAudioMulticastAddr();",
"public SocketRemoteIdentifier(InetSocketAddress addr) {\n this.addr = addr;\n }",
"public DeviceData() {\r\n this.rtAddress = 0;\r\n this.subAddress = 0;\r\n this.txRx = 0;\r\n this.data = new short[32];\r\n }",
"private InetSocketAddress receiveFrom(DatagramSocket socket, byte[] buf)\n {\n // Create datagram packet\n DatagramPacket dp = new DatagramPacket(buf, buf.length);\n\n // Receive packet\n try {\n socket.receive(dp);\n } catch (IOException e) {\n e.printStackTrace();\n }\n // Get client address and port from the packet\n\n return new InetSocketAddress(dp.getAddress(), dp.getPort());\n }",
"public SocketAddress method_4128() {\n return null;\n }",
"public static int size_receiverNodeID() {\n return (8 / 8);\n }",
"public DatadogBuilder address(InetSocketAddress address) {\n this.address = address;\n return this;\n }",
"public NioDatagramChannel() {\n/* 116 */ this(newSocket(DEFAULT_SELECTOR_PROVIDER));\n/* */ }",
"private void print_addr() {\n try(final DatagramSocket socket = new DatagramSocket()){\n socket.connect(InetAddress.getByName(\"8.8.8.8\"), 10002);\n System.out.println(socket.getLocalAddress().getHostAddress()+\":\"+port);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public String getNatAddress();",
"public int getPort(){\r\n return localPort;\r\n }",
"public int getPort(){\r\n return localPort;\r\n }",
"public SocketAddress method_4118() {\n return null;\n }",
"public SocketAddress getSocketAddress() {\n\t\treturn socketAddress;\r\n\t}",
"@Override\n\tprotected void onNetworkConnected(NetType type) {\n\n\t}",
"private void initializeSocket() {\n\n //creating a socket to connect to the node js server using socket.io.client\n try {\n //check for internet connection\n if(!isOnline()) {\n throw new Exception();\n }\n\n //generating a random number for join id in the server\n Random rand = new Random();\n int id = rand.nextInt(50) + 1;\n\n //using sharedPreferences to read the link to the server: heroku or local\n SharedPreferences sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE);\n String url = sharedPref.getString(getString(R.string.link), \"http://192.168.1.119:3001\");\n Log.i(\"INFO\",url);\n\n socket = IO.socket(url); //specifying the url\n socket.connect(); //connecting to the server\n //socket.emit(\"joinAndroid\",Integer.toString(id)); //specifying the join group to the server\n\n //callback functions for socket connected, message received and socket disconnected\n socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() {\n\n @Override\n public void call(Object... args) {\n }\n\n }).on(\"pointData\", new Emitter.Listener() {\n\n @Override\n public void call(Object... args) {\n\n Log.i(\"INFO\", args[0].toString());\n //Toast.makeText(getContext(), args[0].toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n }).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() {\n\n @Override\n public void call(Object... args) {\n }\n\n });\n } catch(URISyntaxException e) {\n Log.i(\"INFO\",\"Uri syntax exception\");\n } catch(Exception e) {\n Log.i(\"INFO\", \"No internet connection\");\n Toast.makeText(getContext(), \"No Internet\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public int getServerBroadcastPort() {\n return 10081;\n }",
"godot.wire.Wire.Value getData();",
"private InetSocketAddress receiveFrom(DatagramSocket socket, byte[] buf) throws IOException {\n // Create datagram packet\n DatagramPacket receivePacket = new DatagramPacket(buf, buf.length);\n\n // Receive packet\n socket.receive(receivePacket);\n\n // Get client address and port from the packet\n InetSocketAddress socketAddress = new InetSocketAddress(receivePacket.getAddress(),receivePacket.getPort());\n\n return socketAddress;\n }",
"private static byte[] createPacket(byte[] data, int destinationPort) {\n\n byte[] send = new byte[28];\n\n send[0] = (byte) ((4 << 4) + 5); // Version 4 and 5 words\n send[1] = 0; // TOS (Don't implement)\n send[2] = 0; // Total length\n send[3] = 22; // Total length\n send[4] = 0; // Identification (Don't implement)\n send[5] = 0; // Identification (Don't implement)\n send[6] = (byte) 0b01000000; // Flags and first part of Fragment offset\n send[7] = (byte) 0b00000000; // Fragment offset\n send[8] = 50; // TTL = 50\n send[9] = 0x11; // Protocol (UDP = 17)\n send[10] = 0; // CHECKSUM\n send[11] = 0; // CHECKSUM\n send[12] = (byte) 127; // 127.0.0.1 (source address)\n send[13] = (byte) 0; // 127.0.0.1 (source address)\n send[14] = (byte) 0; // 127.0.0.1 (source address)\n send[15] = (byte) 1; // 127.0.0.1 (source address)\n send[16] = (byte) 0x2d; // (destination address)\n send[17] = (byte) 0x32; // (destination address)\n send[18] = (byte) 0x5; // (destination address)\n send[19] = (byte) 0xee; // (destination address)\n\n short length = (short) (28 + data.length); // Quackulate the total length\n byte right = (byte) (length & 0xff);\n byte left = (byte) ((length >> 8) & 0xff);\n send[2] = left;\n send[3] = right;\n\n short checksum = calculateChecksum(send); // Quackulate the checksum\n\n byte second = (byte) (checksum & 0xff);\n byte first = (byte) ((checksum >> 8) & 0xff);\n send[10] = first;\n send[11] = second;\n\n /*\n * UDP Header\n * */\n short udpLen = (short) (8 + data.length);\n byte rightLen = (byte) (udpLen & 0xff);\n byte leftLen = (byte) ((udpLen >> 8) & 0xff);\n\n send[20] = (byte) 12; // Source Port\n send[21] = (byte) 34; // Source Port\n send[22] = (byte) ((destinationPort >> 8) & 0xff); // Destination Port\n send[23] = (byte) (destinationPort & 0xff); // Destination Port\n send[24] = leftLen; // Length\n send[25] = rightLen; // Length\n send[26] = 0; // Checksum\n send[27] = 0; // Checksum\n\n /*\n * pseudoheader + actual header + data to calculate checksum\n * */\n byte[] checksumArray = new byte[12 + 8]; // 12 = pseudoheader, 8 = UDP Header\n checksumArray[0] = send[12]; // Source ip address\n checksumArray[1] = send[13]; // Source ip address\n checksumArray[2] = send[14]; // Source ip address\n checksumArray[3] = send[15]; // Source ip address\n checksumArray[4] = send[16]; // Destination ip address\n checksumArray[5] = send[17]; // Destination ip address\n checksumArray[6] = send[18]; // Destination ip address\n checksumArray[7] = send[19]; // Destination ip address\n checksumArray[8] = 0; // Zeros for days\n checksumArray[9] = send[9]; // Protocol\n checksumArray[10] = send[24]; // Udp length\n checksumArray[11] = send[25]; // Udp length\n // end pseudoheader\n checksumArray[12] = send[20]; // Source Port\n checksumArray[13] = send[21]; // Source Port\n checksumArray[14] = send[22]; // Destination Port\n checksumArray[15] = send[23]; // Destination Port\n checksumArray[16] = send[24]; // Length\n checksumArray[17] = send[25]; // Length\n checksumArray[18] = send[26]; // Checksum\n checksumArray[19] = send[27]; // Checksum\n // end actual header\n checksumArray = concatenateByteArrays(checksumArray, data); // Append data\n\n short udpChecksum = calculateChecksum(checksumArray);\n byte rightCheck = (byte) (udpChecksum & 0xff);\n byte leftCheck = (byte) ((udpChecksum >> 8) & 0xff);\n\n send[26] = leftCheck; // Save checksum\n send[27] = rightCheck; // Save checksum\n\n send = concatenateByteArrays(send, data);\n\n return send;\n }",
"@Test\n public void socketToProto_ipv6() throws Exception {\n InetAddress address = InetAddress.getByName(\"2001:db8:0:0:0:0:2:1\");\n int port = 12345;\n InetSocketAddress socketAddress = new InetSocketAddress(address, port);\n assertThat(LogHelper.socketAddressToProto(socketAddress))\n .isEqualTo(Address\n .newBuilder()\n .setType(Address.Type.IPV6)\n .setAddress(\"2001:db8::2:1\") // RFC 5952 section 4: ipv6 canonical form required\n .setIpPort(12345)\n .build());\n }",
"static void test4 () throws Exception {\n server = new ServerSocket (0);\n int port = server.getLocalPort();\n\n /* create an IPv4 mapped address corresponding to local host */\n\n byte[] b = {0,0,0,0,0,0,0,0,0,0,(byte)0xff,(byte)0xff,0,0,0,0};\n byte[] ia4 = ia4addr.getAddress();\n b[12] = ia4[0];\n b[13] = ia4[1];\n b[14] = ia4[2];\n b[15] = ia4[3];\n\n InetAddress dest = InetAddress.getByAddress (b);\n c1 = new Socket (dest, port);\n s1 = server.accept ();\n simpleDataExchange (c1,s1);\n c1.close ();\n s1.close ();\n server.close ();\n System.out.println (\"Test4: OK\");\n }",
"public LocalSocketAddress getSockAddress() throws IOException {\n // This method has never been implemented.\n return null;\n }",
"@Test\n public void testAddress()\n {\n System.out.println(\"address\");\n int addr = 16893;\n System.out.println(N2TCode.address(addr));\n System.out.println(Integer.toBinaryString(addr));\n }",
"int getSnPort();",
"int getSnPort();",
"public void changeOwnIP(InetAddress newOwnIP){\n boolean bound = false;\n\n this.ownIP = newOwnIP;\n\n this.packetLock.lock();\n\n this.ds.close();\n\n\n while (!bound) {\n try {\n this.ds = new DatagramSocket(null);\n InetSocketAddress isa = new InetSocketAddress(this.ownIP, this.ownPort);\n this.ds.bind(isa);\n bound = true;\n this.ds.setSendBufferSize(3000000);\n //System.out.println(\"(FASTUNICASTSENDER) BOUND TO \" + this.ownIP + \":\" + this.ownPort);\n //changeHasConnection(true);\n this.packetLock.unlock();\n\n } catch (SocketException e) {\n //System.out.println(\"(FASTUNICASTSENDER) ERROR BINDING TO \" + this.ownIP + \":\" + this.ownPort);\n e.printStackTrace();\n }\n\n if(!bound){\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"default public int getCodeToDevicePort()\t\t\t\t{ return 2225; }",
"@Override\n public int getDeviceId() {\n return 0;\n }",
"SocketAddress getRemoteAddress();",
"public DHT() throws UnknownHostException, SocketException {\n socket = new DatagramSocket(sendPort);\n recSocket = new DatagramSocket(recPort);\n systemMap = new HashMap<>();\n systemMap.put(0,InetAddress.getByName(\"129.21.22.196\")); //glados\n systemMap.put(1,InetAddress.getByName(\"129.21.30.37\")); //queeg\n systemMap.put(2,InetAddress.getByName(\"129.21.34.80\")); // comet\n systemMap.put(3,InetAddress.getByName(\"129.21.37.49\")); // rhea\n systemMap.put(4,InetAddress.getByName(\"129.21.37.42\")); // domino\n systemMap.put(5,InetAddress.getByName(\"129.21.37.55\")); // gorgon\n systemMap.put(6,InetAddress.getByName(\"129.21.37.30\")); // kinks\n\n\n }",
"public Device(Hub h) {\n uuid = UUID.randomUUID();\n status = Status.NORMAL;\n hub = h;\n }",
"public void bonjuor() throws IOException {\n\t\tint port = 4445;\n\t\t\n\tDatagramSocket socket = new DatagramSocket(port);\n\t\t\n\n // Create a buffer to read datagrams into. If a\n // packe is larger than this buffer, the\n // excess will simply be discarded!\n byte[] buffer = new byte[10];\n String address = InetAddress.getLocalHost().getHostName();\n byte[] out_buffer = address.getBytes();\n \n \n // Create a packet to receive data into the buffer\n DatagramPacket packet = new DatagramPacket(buffer, buffer.length);\n // Now loop forever, waiting to receive packets and printing them.\n while (true) {\n // Wait to receive a datagram\n \t socket.receive(packet);\n \t InetAddress connected_ip = packet.getAddress();\n \t String in_data = new String(packet.getData(),StandardCharsets.UTF_8);\n \t \n \t System.out.println(\"IP: \" + connected_ip + \" said \"+ in_data);\n \t \n \t if(in_data.equals(\"IP request\")){\n \t DatagramPacket send_packet = new DatagramPacket(out_buffer,out_buffer.length,connected_ip,4446);\n \t\t socket.send(send_packet);\n \t\t break;\n \t } \t \n }\n socket.close();\n\t}",
"entities.Torrent.NodeIdOrBuilder getNodeOrBuilder();",
"entities.Torrent.NodeIdOrBuilder getNodeOrBuilder();",
"default public int getControlToDevicePort()\t\t\t\t{ return 2226; }",
"public Data getDataAfter(Address addr);",
"public ChannelFuture method_4091(SocketAddress var1, SocketAddress var2) {\n return null;\n }",
"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 }",
"public PingWebSocketFrame(ByteBuf binaryData) {\n/* 40 */ super(binaryData);\n/* */ }",
"DeviceId deviceId();",
"DeviceId deviceId();",
"public SocketAddress getLocalSocketAddress() {\n if (state >= BOUND)\n return new InetSocketAddress (localAddr, localPort);\n else\n return null;\n }",
"public NioDatagramChannel(DatagramChannel socket) {\n/* 148 */ super(null, socket, 1);\n/* 149 */ this.config = (DatagramChannelConfig)new NioDatagramChannelConfig(this, socket);\n/* */ }",
"public InetAddress getBroadcastAddress() {\r\n InetAddress ip=null;\r\n try{\r\n WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\r\n DhcpInfo dhcp = wifi.getDhcpInfo();\r\n int broadcast = (dhcp.ipAddress & dhcp.netmask) | ~dhcp.netmask;\r\n byte[] quads = new byte[4];\r\n for (int k = 0; k < 4; k++)\r\n quads[k] = (byte) (broadcast >> (k * 8));\r\n ip= InetAddress.getByAddress(quads);\r\n }catch(IOException e)\r\n {\r\n\r\n }\r\n\r\n return ip;\r\n }",
"@Override\r\n public void onDeviceConnecting(GenericDevice mDeviceHolder,\r\n PDeviceHolder innerDevice) {\n\r\n }",
"void connected(InetAddress address, boolean isMine);",
"private void run() throws IOException, InterruptedException {\n \t\t// InetSocketAddress endpoint = SocketAddresses.fromIp(\"10.95.162.221\",\r\n \t\t// 1234);\r\n \t\tInetSocketAddress endpoint = SocketAddresses.fromIp(\"127.0.0.1\", 1234);\r\n \r\n \t\tbyte[] buf = new byte[8 * 1024];\r\n \t\tnew Random().nextBytes(buf);\r\n \t\tByteBuffer seedBuffer = ByteBuffer.wrap(buf);\r\n \t\tNetContext context = new SimpleNetContext();\r\n \t\tEchoSession session = new EchoSession();\r\n \t\tconnection = TcpNetFactory.INSTANCE.openClient(context, endpoint, session);\r\n \r\n \t\tRuntime.getRuntime().addShutdownHook(new Thread() {\r\n \t\t\t@Override\r\n \t\t\tpublic void run() {\r\n \t\t\t\ttry {\r\n \t\t\t\t\tconnection.close();\r\n \t\t\t\t} catch (IOException e) {\r\n \t\t\t\t\t// TODO Auto-generated catch block\r\n \t\t\t\t\te.printStackTrace();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t});\r\n \r\n \t\tfinal int loopTimeSec = 10;\r\n \t\tlong lastT = System.currentTimeMillis();\r\n \t\tconnection.sendBlocking(seedBuffer);\r\n \t\tlong seeded = seedBuffer.capacity();\r\n \t\tint loop = 1;\r\n \t\tlong lastRx = 0, lastTx = 0;\r\n \t\tfinal long start = System.currentTimeMillis();\r\n \r\n \t\twhile (connection.isConnected()) {\r\n \t\t\tlong sleepUntil = start + (loop * loopTimeSec * 1000L);\r\n \t\t\tThreadUtil.sleepUntilMs(sleepUntil);\r\n \r\n \t\t\tlong rx = session.getRx();\r\n \t\t\tlong tx = session.getTx();\r\n \t\t\tlong rxDiff = rx - lastRx;\r\n \t\t\tlong txDiff = tx - lastTx;\r\n \t\t\tlong diff = rxDiff + txDiff;\r\n \t\t\tlong now = System.currentTimeMillis();\r\n \t\t\tlong tDiff = now - lastT;\r\n\t\t\tdouble mbit = (diff * 8) / 10e6 / (tDiff / 1000f);\r\n\t\t\tdouble rxMb = (rxDiff / (2e20));\r\n\t\t\tdouble txMb = (txDiff / (2e20));\r\n \t\t\tSystem.out.printf(\"seed=%d, last %dsec rx=%.3fM, tx=%.3fM bytes => %.5f mbit/sec%n\", //\r\n \t\t\t\t\tseeded, loopTimeSec, rxMb, txMb, mbit);\r\n \t\t\tif (seeded < 512 * 1024) {\r\n \t\t\t\tSystem.out.println(\"seeding an additional \" + seedBuffer.capacity() + \" bytes into the echo chain\");\r\n \t\t\t\tseedBuffer.rewind();\r\n \t\t\t\tconnection.sendBlocking(seedBuffer);\r\n \t\t\t\tseeded += seedBuffer.capacity();\r\n \t\t\t}\r\n \t\t\t// if (rxDiff == 0 || txDiff == 0) {\r\n \t\t\t// session.forceWrite();\r\n \t\t\t// }\r\n \t\t\tloop++;\r\n \t\t\tlastRx = rx;\r\n \t\t\tlastTx = tx;\r\n \t\t\tlastT = now;\r\n \t\t}\r\n \t\t// TODO: save shutdown of clients\r\n \t\tSystem.exit(0);\r\n \t}",
"private static String convertIpAddress(int rawAddress)\n {\n if (ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN)) {\n rawAddress = Integer.reverseBytes(rawAddress);\n }\n\n byte[] ipByteArray = BigInteger.valueOf(rawAddress).toByteArray();\n\n String ipAddressString;\n try {\n ipAddressString = InetAddress.getByAddress(ipByteArray).getHostAddress();\n } catch (UnknownHostException ex) {\n Log.e(\"WIFIIP\", \"Unable to get host address.\");\n ipAddressString = null;\n }\n return ipAddressString;\n }",
"private InetAddress getBroadcastIP()\n\t{\n\t\treturn null;\n\t}",
"public native int getNetworkIO();",
"public static InetAddress getJustBroadcastNativeAddress()\n {\n if (broadcastNativeAddress == null)\n broadcastNativeAddress = DatabaseDescriptor.getBroadcastRpcAddress() == null\n ? DatabaseDescriptor.getRpcAddress()\n : DatabaseDescriptor.getBroadcastRpcAddress();\n return broadcastNativeAddress;\n }",
"@Option int getLocalPortForUdpLinkLayer();",
"public DataNodeId getDataNodeId(String hostname, int port);",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-25 10:38:11.979 -0500\", hash_original_method = \"C03B7BA0DE1B470242B235172550195E\", hash_generated_method = \"7D506C9D568D8CEEB8F867DEA192AADC\")\n \npublic void send(InetAddress host) throws IOException\n {\n send(host, DEFAULT_PORT);\n }",
"public static String getDeviceIpAddress() {\n try {\n for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {\n NetworkInterface intf = en.nextElement();\n for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {\n InetAddress inetAddress = enumIpAddr.nextElement();\n\n log.debug(\"inetAddress: \" + inetAddress);\n\n if (!inetAddress.isLoopbackAddress()) {\n String ip = Formatter.formatIpAddress(inetAddress.hashCode());\n return ip;\n }\n }\n }\n } catch (SocketException ex) {\n log.error(ex.getMessage(), ex);\n }\n\n return null;\n }",
"private static void ipv6() throws IOException {\n\t\t InetAddress src = InetAddress.getByName(\"127.0.0.1\");\n\t\t byte[] ipv4Src = src.getAddress();\n\t\t InetAddress dest = InetAddress.getByName(\"18.221.102.182\");\n\t\t byte[] ipv4Dest = dest.getAddress();\n\t\t \n\t\tbyte[] srcAddr = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (byte)255, (byte)255, ipv4Src[0], ipv4Src[1], ipv4Src[2], ipv4Src[3]};\n\t\tbyte[] destAddr = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (byte)255, (byte)255,ipv4Dest[0],ipv4Dest[1],ipv4Dest[2],ipv4Dest[3]};\n\n\t\tbyte[] packet;\n\t\tint payload = 2;\n\t\tint version = 6;\n\t\t\n\t\t// Send packet 12 times (12 packets)\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tint tLen = (40+payload);\t\t\t// Total_Length's default is 40; will increase each time.\n\t\t\tpacket = new byte[tLen];\n\t\t\t\n\t\t\tpacket[0] = (byte) (version << 4 & 0xFF);\n\t\t\tpacket[1] = 0; // Traffic_Class\n\t\t\tpacket[2] = 0; // Flow_Label;20bits\n\t\t\tpacket[3] = 0; // Flow_Label\n\t\t\tpacket[4] = (byte) (payload >>> 8); // Payload_Length;16bits\n\t\t\tpacket[5] = (byte)payload;\n\t\t\tpacket[6] = (byte)17; // Next_Header\n\t\t\tpacket[7] = (byte)20; // Hopt_Limit\n\n\t\t\t// Source_Address;128bits=16bytes\n\t\t\tfor (int s = 0; s < srcAddr.length; s++) \n\t\t\t\tpacket[s+8] = srcAddr[s];\t// Starts from packet[8]\n\t\t\t\n\t\t\t// Destination_Address;128bits=16bytes\n\t\t\tfor (int d = 0; d < destAddr.length; d++) \n\t\t\t\tpacket[d+24] = destAddr[d];\t// Starts from packet[24]\n\t\t\t\n\t\t\tfor(int k = 40;k<packet.length;k++)\n\t\t\t\tpacket[k] = 0;\n\t\t\t\n\t\t\t// Write to server, listen the 4byte response\n\t\t\tSystem.out.println(\"data length: \"+ payload);\n\t\t\tdos.write(packet);\n\t\t\tdos.flush();\n\t\t\t\n\t\t\tSystem.out.print(\"Response: \");\n\t\t\tfor(int r=0;r<4;r++)\n\t\t\t\tSystem.out.print(Integer.toHexString(dis.readByte()).replace(\"ff\", \"\").toUpperCase());\n\t\t\t\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\tpayload *=2;\n\t\t}\n\t}",
"public void driverBaseDataReceivedProxy(PeripheralHardwareDataEvent oEvent);",
"@Override\n public InetSocketAddress getICERemoteRelayedAddress(String streamName)\n {\n return null;\n }",
"public void set_receiverNodeID(short value) {\n setUIntBEElement(offsetBits_receiverNodeID(), 8, value);\n }",
"@Test\n public void iPAddressIsTorNodeTest() throws Exception {\n String value = null;\n TorNodeResponse response = api.iPAddressIsTorNode(value);\n\n // TODO: test validations\n }",
"public NioDatagramChannel(InternetProtocolFamily ipFamily) {\n/* 132 */ this(newSocket(DEFAULT_SELECTOR_PROVIDER, ipFamily));\n/* */ }",
"void Send (int boardID, short addr, ByteBuffer databuf, long datacnt, int eotMode);",
"public void setDestination (InetSocketAddress o) {\n\t\torigin = o;\n\t}"
] | [
"0.61500955",
"0.5793496",
"0.5754132",
"0.5711434",
"0.562849",
"0.5582324",
"0.55419105",
"0.5535242",
"0.54930675",
"0.5381668",
"0.53797424",
"0.5377796",
"0.53684664",
"0.53600603",
"0.53580457",
"0.53269917",
"0.5310204",
"0.5264269",
"0.5261531",
"0.52340126",
"0.52301365",
"0.5230072",
"0.5217473",
"0.5175018",
"0.5175018",
"0.517167",
"0.5167856",
"0.51441467",
"0.5125099",
"0.51174295",
"0.5110252",
"0.5101469",
"0.50960094",
"0.50861627",
"0.50666654",
"0.50645083",
"0.5051882",
"0.5049315",
"0.50486594",
"0.5039458",
"0.5031919",
"0.5003251",
"0.5002814",
"0.49988034",
"0.49964568",
"0.49889755",
"0.49856958",
"0.49856958",
"0.49788845",
"0.49757576",
"0.4970687",
"0.49679777",
"0.49676114",
"0.49672803",
"0.49574748",
"0.4950574",
"0.4947707",
"0.4945614",
"0.49418315",
"0.49395964",
"0.49382597",
"0.49382597",
"0.49340582",
"0.49162427",
"0.49146876",
"0.49111655",
"0.4909135",
"0.49033293",
"0.49007493",
"0.4885009",
"0.4885009",
"0.48745453",
"0.48708752",
"0.48666692",
"0.48654947",
"0.4862981",
"0.48599097",
"0.48599097",
"0.48580122",
"0.48537117",
"0.48534477",
"0.48521274",
"0.48512703",
"0.4850891",
"0.48368984",
"0.4829114",
"0.48278597",
"0.48227003",
"0.48203614",
"0.4818756",
"0.4813368",
"0.48043004",
"0.4798862",
"0.47970745",
"0.47962716",
"0.4796048",
"0.47952238",
"0.47942",
"0.4788795",
"0.4788528"
] | 0.49898645 | 45 |
TODO: Should be asynchronous ??? Send the connect request to the hub | private final void forwardVirtualConnect(DirectSocketAddress source,
DirectSocketAddress sourceHub, DirectSocketAddress target,
DirectSocketAddress targetHub, long index, int timeout, int port,
int fragment, int buffer) {
try {
synchronized (out) {
out.write(MessageForwarderProtocol.CREATE_VIRTUAL);
DirectSocketAddress.write(source, out);
DirectSocketAddress.write(sourceHub, out);
DirectSocketAddress.write(target, out);
DirectSocketAddress.write(targetHub, out);
out.writeLong(index);
out.writeInt(timeout);
out.writeInt(port);
out.writeInt(fragment);
out.writeInt(buffer);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void connect() {}",
"public void doConnect() {\n Debug.logInfo(\"Connecting to \" + client.getServerURI() + \" with device name[\" + client.getClientId() + \"]\", MODULE);\n\n IMqttActionListener conListener = new IMqttActionListener() {\n\n public void onSuccess(IMqttToken asyncActionToken) {\n Debug.logInfo(\"Connected.\", MODULE);\n state = CONNECTED;\n carryOn();\n }\n\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n ex = exception;\n state = ERROR;\n Debug.logError(\"connect failed\" + exception.getMessage(), MODULE);\n carryOn();\n }\n\n public void carryOn() {\n synchronized (caller) {\n donext = true;\n caller.notifyAll();\n }\n }\n };\n\n try {\n // Connect using a non-blocking connect\n client.connect(conOpt, \"Connect sample context\", conListener);\n } catch (MqttException e) {\n // If though it is a non-blocking connect an exception can be\n // thrown if validation of parms fails or other checks such\n // as already connected fail.\n state = ERROR;\n donext = true;\n ex = e;\n }\n }",
"public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}",
"public void connecting() {\n\n }",
"@Override\n public void doConnect() throws IOException {\n if (!sc.finishConnect()) {\n return; // the selector gave a bad hint\n }\n\n // Sending login private\n var bb = ByteBuffer.allocate(1 + Long.BYTES);\n bb.put((byte) 9).putLong(connectId);\n queueMessage(bb.flip());\n\n updateInterestOps();\n }",
"public void connect();",
"public void connect();",
"public void connect();",
"@Override\n public void onConnect() {\n connected.complete(null);\n }",
"protected abstract void onConnect();",
"protected Channel connect() {\n\t\t\tif (channel == null) {\n\t\t\t\tinit();\n\t\t\t}\n\t\t\tSystem.out.println(\"channel === \"+channel);\n\t\t\tif (channel.isDone() && channel.isSuccess())\n\t\t\t\treturn channel.channel();\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Not able to establish connection to server\");\n\t\t}",
"protected void onConnect() {}",
"@RequestMapping(\"/ibmiot/deviceclient/connect\")\r\n\tpublic String connectDeviceclient() {\r\n\t\tThread t1 = new Thread(commandCallbackSubscriber);\r\n\t\tt1.start();\r\n\t\tmyClient.setCommandCallback(commandCallbackSubscriber);\r\n\t\t\r\n\t\t// Connect to the IBM Watson IoT Platform\r\n\t\ttry {\r\n\t\t\tmyClient.connect();\r\n\t\t} catch (MqttException e) {\r\n\t\t\treturn \"Failed to connected with IBM IoT deviced Client\";\r\n\t\t}\r\n\t\treturn \"Connected to IBM IoT deviced Client\";\r\n\t}",
"public void OnConnectSuccess();",
"@Override\n\tpublic void connect() {\n\t\t\n\t}",
"@Override\n\tpublic void connect() {\n\t\t\n\t}",
"public Status connect()\n {\n return connect(5.0);\n }",
"public abstract void onConnect();",
"@Override\n public abstract void connect();",
"@Override\r\n public Object connect() {\n if(status()){\r\n //creates thread that checks messages in the network\r\n System.out.println(\"notifying network that connection is good\");\r\n notifyObservers(this);\r\n }\r\n return socket;\r\n }",
"public void doConnect() throws IOException {\n if (!sc.finishConnect()) {\n return; // the selector gave a bad hint\n }\n\n // Sending pseudo\n var newConnexio = new ConnexionFrame(pseudo);\n queueMessage(newConnexio.asByteBuffer().flip());\n\n updateInterestOps();\n }",
"public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }",
"private synchronized void doConnect() {\n try {\n String host = agent.getHost();\n int port = agent.getPort();\n log.fine(\"Connecting to server \" + host + ':' + port);\n socket = new Socket(host, port);\n input = socket.getInputStream();\n output = new OutputStreamWriter(socket.getOutputStream());\n disconnected = false;\n new Thread(this).start();\n\n // Automatically login! -> give an auth to the agent...\n TACMessage msg = new TACMessage(\"auth\");\n msg.setParameter(\"userName\", agent.getUser());\n msg.setParameter(\"userPW\", agent.getPassword());\n msg.setMessageReceiver(agent);\n sendMessage(msg);\n\n } catch (Exception e) {\n disconnected = true;\n log.log(Level.SEVERE, \"connection to server failed:\", e);\n socket = null;\n }\n }",
"protected void connect() {\n\t\treadProperties();\n\t\tif (validateProperties())\n\t\t\tjuraMqttClient = createClient();\n\t}",
"public void connect() {\n try {\n socket = connectToBackEnd();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }",
"public void connect() {\n BotConnector newBot = new BotConnector();\n newBot.setEmail(this.email);\n newBot.setAuthenticationKey(key);\n newBot.setBotName(name);\n newBot.setRoom(room);\n //Start Listener Thread\n this.serverListener = new Thread(newBot, \"serverListener\");\n this.serverListener.start();\n }",
"abstract void onConnect();",
"public void connect() throws OOBException {\n \t\tlog.debug(\"enter to connect \");\n \t\tJSch jsch = new JSch();\n \t\ttry {\n\t\t\tjsch.addIdentity(PRIVATE_KEY, PASSPHRASE);\n \t\t\tjsch.setKnownHosts(KNOWN_HOSTS);\n \t\t\tlog.debug(\"user \" + user + \"host : \" + host);\n \t\t\tsession = jsch.getSession(user, host, 22);\n \t\t\tsession.connect();\n \t\t} catch (JSchException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}",
"ClientConnection connection();",
"@Override\r\n\t\tpublic void onConnect(Connection connection) {\n\r\n\t\t}",
"protected void connectionEstablished() {}",
"@Override\r\n public void connectSuccess() {\n super.connectSuccess();\r\n }",
"public void establishConnection() {\n httpNetworkService = new HTTPNetworkService(handler);\n }",
"public void connectToAudio() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.CONNECT));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.CONNECT) {\n isConnecting = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n };\n }",
"@OnOpen\n public void onOpen(final Session session)\n {\n System.out.println(session.getId() + \" has open a connection\");\n // since all connection use the same process create a private context\n final YAPIContext yctx = new YAPIContext();\n try {\n yctx.PreregisterHubWebSocketCallback(session);\n } catch (YAPI_Exception e) {\n e.printStackTrace();\n return;\n }\n\n Thread thread = new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n\n\n try {\n // register the YoctoHub/VirtualHub that start the connection\n yctx.UpdateDeviceList();\n\n // list all devices connected on this hub (only for debug propose)\n System.out.println(\"Device list:\");\n YModule module = YModule.FirstModuleInContext(yctx);\n while (module != null) {\n System.out.println(\" \" + module.get_serialNumber() + \" (\" + module.get_productName() + \")\");\n module = module.nextModule();\n }\n\n // play a bit with relay output :-)\n try {\n YRelay relay = YRelay.FirstRelayInContext(yctx);\n if (relay != null) {\n relay.set_state(YRelay.STATE_A);\n Thread.sleep(500);\n relay.set_state(YRelay.STATE_B);\n Thread.sleep(250);\n relay.set_state(YRelay.STATE_A);\n Thread.sleep(250);\n relay.set_state(YRelay.STATE_B);\n Thread.sleep(500);\n relay.set_state(YRelay.STATE_A);\n Thread.sleep(1000);\n relay.set_state(YRelay.STATE_B);\n Thread.sleep(500);\n relay.set_state(YRelay.STATE_A);\n Thread.sleep(1000);\n relay.set_state(YRelay.STATE_B);\n } else {\n System.out.println(\"No Relay connected\");\n }\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n } catch (YAPI_Exception ex) {\n System.out.println(\" error (\" + ex.getLocalizedMessage() + \")\");\n ex.printStackTrace();\n }\n // no not forget to FreeAPI to ensure that all pending operation\n // are finished and freed\n yctx.FreeAPI();\n }\n });\n thread.start();\n }",
"public void connect() {\n synchronized (globalLock) {\n if (isRunning) {\n throw new IllegalStateException(\"WebSocketClient is not reusable\");\n }\n\n this.isRunning = true;\n createAndStartConnectionThread();\n }\n }",
"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 }",
"public void initiateConnection() {\n\t\tif (Settings.getRemoteHostname() != null) {\n\t\t\ttry {\n\t\t\t\toutgoingConnection(new Socket(Settings.getRemoteHostname(), Settings.getRemotePort()));\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"failed to make connection to \" + Settings.getRemoteHostname() + \":\"\n\t\t\t\t\t\t+ Settings.getRemotePort() + \" :\" + e);\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t}",
"public void connect() throws IOException;",
"@Override\n\tpublic void connect() throws IOException {\n\n\t}",
"public void connect() {\n\t\tint index = shell.getConnectionsCombo().getSelectionIndex();\n\t\tif (profiles.length == 0 || index < 0 || index >= profiles.length) {\n\t\t\tupdateSelection();\n\t\t\treturn;\n\t\t}\n\t\tIConnectionProfile profile = profiles[index];\n\t\tshell.setEnabled(false);\n\t\tnetworkManager.connect(profile, (s, r) -> {\n\t\t\tif (s) {\n\t\t\t\tcompleted = true;\n\t\t\t\tclose();\n\t\t\t} else {\n\t\t\t\tplugin.sync(() -> {\n\t\t\t\t\tMessageBox messageBox = new MessageBox(shell.isDisposed() ? null : shell, SWT.ICON_ERROR);\n\t\t\t\t\tmessageBox.setMessage(\"Failed to connect!\\n\" + r);\n\t\t\t\t\tmessageBox.open();\n\t\t\t\t\tshell.setEnabled(true);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}",
"@Override\r\n protected void onConnected() {\n \r\n }",
"public Channel connect() {\n\t\tChannelFuture channel = bootstrap.connect(new InetSocketAddress(host, port));\n\n\t\t// wait for the connection to establish\n\t\tchannel.awaitUninterruptibly();\n\n\t\tif (channel.isDone() && channel.isSuccess()) {\n\t\t\treturn channel.getChannel();\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Not able to establish connection to server\");\n\t\t}\n\t}",
"@Override\n\tprotected void onConnect() {\n\t\tLogUtil.debug(\"server connect\");\n\n\t}",
"private void sendUpdateConnectionInfo() {\n\n }",
"@Override\n\tpublic void connect() throws IOException {\n\t}",
"public void connect() {\n if (isShutdown)\n return;\n\n setNewConnection(reconnectInternal());\n }",
"protected void connect(onConnetCallBack callBack)\n {\n if (isLooping)\n {\n return;\n }\n if (callBack != null)\n {\n this.connectCallBack = callBack;\n }\n executor.execute(new Runnable()\n {\n @Override\n public void run()\n {\n isLooping = true;\n DuduSDK.this.run();\n }\n });\n }",
"@Override\n\tpublic void connectionReady() {\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tgotoConnectActivity();\n\t\t\t}",
"@Override\n public void Connected() {\n if (strClientSerial != null) {\n LoginInfo_Req();\n }\n }",
"public abstract void handleConnected() throws Exception;",
"private void doConnect(Stage stage) {\n try {\n if (validateInput() && isConnectionValid()) {\n Connection con = new Connection(connectionsCB.getEditor().getText(), rpcPort.getText(), asyncPort.getText(), nameTF.getText(), fullControlRB.isSelected());\n // remove it if connection already exists\n if (connectionMap.get(connectionsCB.getEditor().getText()) != null) {\n connectionMap.remove(connectionsCB.getEditor().getText());\n }\n con.setLastUsed(true);\n connectionMap.put(connectionsCB.getEditor().getText(), con);\n updateConnectionsList();\n ConnectionManager.getInstance().setConnected(true);\n\n stage.hide();\n }\n } catch (Exception ex) {\n LOG.error(\"Error durring connection to TRex server\", ex);\n }\n }",
"public void connectBot() throws Exception\n\t{\n\t\tsetVerbose(true);\n\t\tconnect(this.server);\n\t\tjoinChannel(this.channel);\n\t}",
"public void getConnection() throws Exception {\n\t\ttry {\n\t\t\tSystem.out.println(\"Waiting for new client!\");\n\n\n\n\t\t\tclient = serverSocket.accept();\n\t\t\tis = client.getInputStream();\n\t\t\tisr = new InputStreamReader(is);\n\t\t\tbr = new BufferedReader(isr);\n\t\t\tos = client.getOutputStream();\n\t\t\tosw = new OutputStreamWriter(os);\n\t\t\tpw = new PrintWriter(osw, true);\n\t\t\tsleep(500);\n\t\t\t//clientkey = getClientKey();\n\t\t\tSystem.out.println(\"Client has connected!\");\n\t\t\t\n\t\t\tGetTimestamp(\"Client Publickey is being stored: \" ) ;\n\t\t\t\n\t\t\tpublicKey = getClientPublicKey();\n\t\t\t\n\t\t\tGetTimestamp(\"Client Publickey is stored: \" ) ;\n\t\t\t\n\t\t\tString tosend = encrypt1(getSharedKey(), getClientPublicKey());\n\t\t\t\n\t\t\tGetTimestamp(\"Client sharedkey is being encrypted: \") ;\n\t\t\t\n\t\t\tGetTimestamp(\"Waiting for Authorization Request from Client: \");\n\t\t\t\n\t\t\t//getclientpublickey();\n\t\t\tgetAUTH_REQUEST();\n\t\t\t//getMessage();\n\n\t\t} catch (IOException | InterruptedException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t}",
"private void openConnection () {\n String[] labels = {\"Host :\", \"Port :\"};\n String[] initialValues = {\"localhost\", \"1111\"};\n StandardDialogClient openHandler = new StandardDialogClient () {\n\t@Override\n\tpublic void dialogDismissed (StandardDialog d, int code) {\n\t try {\n\t InputDialog inputD = (InputDialog)d;\n\t if (inputD.wasCancelled ()) return;\n\t String[] results = inputD.getResults ();\n\t String host = results[0];\n\t String port = results[1];\n\t TwGateway connection =\n\t (TwGateway)TwGateway.openConnection (host, port);\n\t // The following call will fail if the G2 is secure.\n\t connection.login();\n\t setConnection (connection);\n\t } catch (Exception e) {\n\t new WarningDialog (null, \"Error During Connect\", true, e.toString (), null).setVisible (true);\n\t }\n\t}\n };\t \n\n new ConnectionInputDialog (getCurrentFrame (), \"Open Connection\",\n\t\t\t\t true, labels, initialValues,\n\t\t\t\t (StandardDialogClient) openHandler).setVisible (true);\n }",
"@Override\n public void run() {\n new ConnectBT().execute();\n }",
"void handleConnectionOpened();",
"public void connect() throws ConnectionFailedException\n {\n isConnected = true;\n }",
"private void connectUsingToken() {\n\t\tString protocol = null;\n\t\tint port = getPortNumber();\n\t\tif (isWebSocket()) {\n\t\t\tprotocol = \"wss://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = WSS_PORT;\n\t\t\t}\n\t\t} else {\n\t\t\tprotocol = \"ssl://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = MQTTS_PORT;\n\t\t\t}\n\t\t} \n\n\t\tString mqttServer = getMQTTServer();\n\t\tif(mqttServer != null){\n\t\t\tserverURI = protocol + mqttServer + \":\" + port;\n\t\t} else {\n\t\t\tserverURI = protocol + getOrgId() + \".\" + MESSAGING + \".\" + this.getDomain() + \":\" + port;\n\t\t}\n\t\ttry {\n\t\t\tmqttAsyncClient = new MqttAsyncClient(serverURI, clientId, DATA_STORE);\n\t\t\tmqttAsyncClient.setCallback(mqttCallback);\n\t\t\tmqttClientOptions = new MqttConnectOptions();\n\t\t\tif (clientUsername != null) {\n\t\t\t\tmqttClientOptions.setUserName(clientUsername);\n\t\t\t}\n\t\t\tif (clientPassword != null) {\n\t\t\t\tmqttClientOptions.setPassword(clientPassword.toCharArray());\n\t\t\t}\n\t\t\tmqttClientOptions.setCleanSession(this.isCleanSession());\n\t\t\tif(this.keepAliveInterval != -1) {\n\t\t\t\tmqttClientOptions.setKeepAliveInterval(this.keepAliveInterval);\n\t\t\t}\n\t\t\tmqttClientOptions.setMaxInflight(getMaxInflight());\n\t\t\tmqttClientOptions.setAutomaticReconnect(isAutomaticReconnect());\n\t\t\t\n\t\t\tSSLContext sslContext = SSLContext.getInstance(\"TLSv1.2\");\n\n\t\t\tsslContext.init(null, null, null);\n\t\t\t\n\t\t\tmqttClientOptions.setSocketFactory(sslContext.getSocketFactory());\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void establishConnectionWithYourTower() {\n }",
"private void requestConnection() {\n getGoogleApiClient().connect();\n }",
"@Override\n public void connect(String name) throws Exception {\n }",
"@Override\n protected String doInBackground(Void... params) {\n Connector con = new Connector();\n return con.send(urlAddress, data);\n }",
"public abstract void connect() throws UnknownHostException, IOException;",
"private void connectToWebSocket(TextView text) {\n\n networkProfileRepo = new NetworkProfileRepo(context.get());\n NetworkProfile networkProfile = networkProfileRepo.getNetworkProfile(1) ;\n\n URI uri = URI.create(networkProfile.getConnectionData().getOcppCsmsUrl());\n\n ChargingStationRepo chargingStationRepo = new ChargingStationRepo(context.get());\n\n ClientManager client = ClientManager.createClient();\n\n client.getProperties().put(ClientProperties.CREDENTIALS, new Credentials(\"ws_user\", \"password\")); // Basic Authentication for Charging Station\n client.getProperties().put(ClientProperties.LOG_HTTP_UPGRADE, true);\n\n try {\n client.connectToServer(this,uri) ;\n } catch (DeploymentException e) {\n e.printStackTrace();\n text.append(\"\\nDeployment Exception\"+ R.string.conncsmsnot + \"\\n\");\n } catch (IOException e) {\n e.printStackTrace();\n text.append(\"\\nIO Exception\" + R.string.conncsmsnot + \"\\n\");\n }\n\n\n if(session != null){\n text.append(\"Connection with CSMS Established\");\n text.append(\"\\nConnected to Session :\"+ session.getId() + \"\\n\" );\n text.append(\"\\nBoot Reason: \"+ BootNotificationRequest.getReason()+\"\\n\");\n\n ChargingStation chargingStation = chargingStationRepo.getChargingStationType() ;\n\n ChargingStationType.setSerialNumber(chargingStation.getSerialNumber());\n ChargingStationType.setModel(chargingStation.getModel());\n ChargingStationType.setVendorName(chargingStation.getVendorName());\n ChargingStationType.setFirmwareVersion(chargingStation.getFirmwareVersion());\n ModemType.setIccid(chargingStation.getModem().iccid);\n ModemType.setImsi(chargingStation.getModem().imsi);\n\n text.append(\"\\nCharging Station\\n\");\n text.append(\"\\nserialNumber: \"+ChargingStationType.serialNumber+\"\\n\");\n text.append(\"\\nmodel: \"+ChargingStationType.model+\"\\n\");\n text.append(\"\\nvendorName: \"+ChargingStationType.vendorName+\"\\n\");\n text.append(\"\\nfirmwareVersion: \"+ChargingStationType.firmwareVersion+\"\\n\");\n text.append(\"\\nmodem iccid:\"+ ModemType.iccid+\"\\n\");\n text.append(\"\\nmodem imsi:\"+ ModemType.imsi+\"\\n\");\n text.append(\"\\nSending BootNotificationRequest to CSMS\\n\");\n try {\n toCSMS.sendBootNotificationRequest();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n text.append(\"\\nBoot status: \"+ bootNotificationResponse.getBootStatus() + \"\\n\");\n }\n }",
"@Override\n\t\t\tpublic void onConnectRemoteNode(String url) {\t \t\t\t\n\t\t\t}",
"void connected();",
"void onConnect();",
"@Override\n public void onSuccess() {\n System.out.println(\"pca connect: Successfully connected\");\n }",
"public void connected() {\n\t\tthis.model.setClient(this);\n\t\tfor (Option o : options) {\n\t\t\to.initiate(this);\n\t\t}\n\t}",
"void onConnectDeviceComplete();",
"void connect(String channelConfig) throws IOException;",
"private boolean connect() {\n\t\tif (this.logging) {\n\t\t\tlogger.debug(\"trying to connect to \" + this.remoteName);\n\t\t}\n\n\t\tboolean connected = this.btc.connectTo(this.remoteName, null,\n\t\t\t\tNXTCommFactory.BLUETOOTH, NXTComm.PACKET);\n\t\tif (!connected) {\n\t\t\tif (this.logging) {\n\t\t\t\tlogger.info(\"not connected to \" + this.remoteName);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.dis = new ExtendedDataInputStream(this.btc.getDataIn());\n\t\t\tthis.dos = this.btc.getDataOut();\n\t\t\tif (this.logging) {\n\t\t\t\tlogger.info(\"connected to \" + this.remoteName);\n\t\t\t}\n\t\t}\n\n\t\treturn connected;\n\t}",
"private void connectCompleted(AsyncResult<MqttConnAckMessage> result) {\n\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"Connect completed - result: %s, cause: %s\", result.result(), result.cause()));\n }\n\n if (result.failed() || result.result() == null) {\n // this will include CONACKs with error codes\n setState(SessionState.DISCONNECTED, result.cause());\n return;\n }\n\n MqttConnAckMessage ack = result.result();\n\n setState(SessionState.CONNECTED, null);\n\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"Subscriptions: %s, cleanSession: %s, sessionPresent: %s\", !this.subscriptions.isEmpty(),\n options.isCleanSession(), ack.isSessionPresent()));\n }\n\n if (options.isCleanSession() || !ack.isSessionPresent()) {\n // re-subscribe if we have requested subscriptions and (either cleanSession=true or no session found on the server)\n requestSubscribe(new LinkedHashMap<>(this.subscriptions));\n } else {\n // If the session is present on broker, I mark all subscription to SUBSC\n log.debug(\"Session present on broker, subscriptions request not sent. \"\n + \"Be sure that the subscriptions on the broker side are the same that this client needs.\");\n this.subscriptions.forEach((t, q) -> notifySubscriptionState(t, SubscriptionState.SUBSCRIBED, q.toInteger()));\n }\n\n }",
"public synchronized void connectEvent(TCConnectionEvent event) {\n }",
"void onConnect( );",
"protected void connect(){\n MediaBrowserCompat mediaBrowser = mediaBrowserProvider.getMediaBrowser();\n if (mediaBrowser.isConnected()) {\n onConnected();\n }\n }",
"public void connect()\r\n\t{\r\n\t\tkonekcija = ConnectionClass.getConnection(adresa, port, imeBaze, korisnickoIme, sifra);\r\n\t\tSystem.out.println(\"Konekcija otvorena: \"+ konekcija.toString());\r\n\t}",
"void connect() throws Exception;",
"private WebSocket connect() throws Exception\n {\n return new WebSocketFactory()\n .setConnectionTimeout(TIMEOUT)\n .createSocket(SERVER)\n .addListener(new WebSocketAdapter() {\n // A text message arrived from the server.\n public void onTextMessage(WebSocket websocket, String message) {\n if(message.contains(\"ticker\")) {\n List<Object> decodeMessage = GSON.fromJson(message, new TypeToken<List<Object>>() {}.getType());\n if (decodeMessage.size() == 4) {\n val ticker = decodeMessage.get(2);\n if (ticker instanceof String && ((String) ticker).equalsIgnoreCase(\"ticker\")) {\n Map<String, List<Object>> ticks = (Map<String, List<Object>>) decodeMessage.get(1);\n val ask = Double.parseDouble((String) ticks.get(\"a\").get(0));\n val bid = Double.parseDouble((String) ticks.get(\"b\").get(0));\n val krakenCurrencyPair = (String)decodeMessage.get(3);\n val currencyPair = CurrencyPair.of(krakenCurrencyPair.substring(0,3), krakenCurrencyPair.substring(4,7));\n outBoundBus.post(PriceUpdateEvent.of(BidAsk.of(bid,ask),currencyPair, Exchange.KRAKEN));\n }\n }\n\n }\n }\n })\n .addExtension(WebSocketExtension.PERMESSAGE_DEFLATE)\n .connect();\n }",
"interface Connect extends RconConnectionEvent, Cancellable {}",
"private void connectUsingCertificate() {\n\t\tfinal String METHOD = \"connectUsingCertificate\";\n\t\tString protocol = null;\n\t\tint port = getPortNumber();\n\t\tif (isWebSocket()) {\n\t\t\tprotocol = \"wss://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = WSS_PORT;\n\t\t\t}\n\t\t} else {\n\t\t\tprotocol = \"ssl://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = MQTTS_PORT;\n\t\t\t}\n\t\t} \n\n\t\tString mqttServer = getMQTTServer();\n\t\t\n\t\tif(mqttServer != null){\n\t\t\tserverURI = protocol + mqttServer + \":\" + port;\n\t\t} else {\n\t\t\tserverURI = protocol + getOrgId() + \".\" + MESSAGING + \".\" + this.getDomain() + \":\" + port;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tmqttAsyncClient = new MqttAsyncClient(serverURI, clientId, DATA_STORE);\n\t\t\tmqttAsyncClient.setCallback(mqttCallback);\n\t\t\tmqttClientOptions = new MqttConnectOptions();\n\t\t\tif (clientUsername != null) {\n\t\t\t\tmqttClientOptions.setUserName(clientUsername);\n\t\t\t}\n\t\t\tif (clientPassword != null) {\n\t\t\t\tmqttClientOptions.setPassword(clientPassword.toCharArray());\n\t\t\t}\n\t\t\tmqttClientOptions.setCleanSession(this.isCleanSession());\n\t\t\tif(this.keepAliveInterval != -1) {\n\t\t\t\tmqttClientOptions.setKeepAliveInterval(this.keepAliveInterval);\n\t\t\t}\n\t\t\t\n\t\t\tmqttClientOptions.setMaxInflight(getMaxInflight());\n\t\t\tmqttClientOptions.setAutomaticReconnect(isAutomaticReconnect());\n\t\t\t\n\t\t\t/* This isn't needed as the production messaging.internetofthings.ibmcloud.com \n\t\t\t * certificate should already be in trust chain.\n\t\t\t * \n\t\t\t * See: \n\t\t\t * http://stackoverflow.com/questions/859111/how-do-i-accept-a-self-signed-certificate-with-a-java-httpsurlconnection\n\t\t\t * https://gerrydevstory.com/2014/05/01/trusting-x509-base64-pem-ssl-certificate-in-java/\n\t\t\t * http://stackoverflow.com/questions/12501117/programmatically-obtain-keystore-from-pem\n\t\t\t * https://gist.github.com/sharonbn/4104301\n\t\t\t * \n\t\t\t * CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n\t\t\t * InputStream certFile = AbstractClient.class.getResourceAsStream(\"messaging.pem\");\n\t\t\t * Certificate ca = cf.generateCertificate(certFile);\n\t\t\t *\n\t\t\t * KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t\t * keyStore.load(null, null);\n\t\t\t * keyStore.setCertificateEntry(\"ca\", ca);\n\t\t\t * TrustManager trustManager = TrustManagerUtils.getDefaultTrustManager(keyStore);\n\t\t\t * SSLContext sslContext = SSLContextUtils.createSSLContext(\"TLSv1.2\", null, trustManager);\n\t\t\t * \n\t\t\t */\n\n\t\t\tSSLContext sslContext = SSLContext.getInstance(\"TLSv1.2\");\n\t\t\tsslContext.init(null, null, null);\n\t\t\t\n\t\t\t//Validate the availability of Server Certificate\n\t\t\t\n\t\t\tif (trimedValue(options.getProperty(\"Server-Certificate\")) != null){\n\t\t\t\tif (trimedValue(options.getProperty(\"Server-Certificate\")).contains(\".pem\")||trimedValue(options.getProperty(\"Server-Certificate\")).contains(\".der\")||trimedValue(options.getProperty(\"Server-Certificate\")).contains(\".cer\")){\n\t\t\t\t\tserverCert = trimedValue(options.getProperty(\"Server-Certificate\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Only PEM, DER & CER certificate formats are supported at this point of time\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Server Certificate is missing\");\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\n\t\t\t//Validate the availability of Client Certificate\n\t\t\tif (trimedValue(options.getProperty(\"Client-Certificate\")) != null){\n\t\t\t\tif (trimedValue(options.getProperty(\"Client-Certificate\")).contains(\".pem\")||trimedValue(options.getProperty(\"Client-Certificate\")).contains(\".der\")||trimedValue(options.getProperty(\"Client-Certificate\")).contains(\".cer\")){\n\t\t\t\t\tclientCert = trimedValue(options.getProperty(\"Client-Certificate\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Only PEM, DER & CER certificate formats are supported at this point of time\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Client Certificate is missing\");\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t//Validate the availability of Client Certificate Key\n\t\t\tif (trimedValue(options.getProperty(\"Client-Key\")) != null){\n\t\t\t\tif (trimedValue(options.getProperty(\"Client-Key\")).contains(\".key\")){\n\t\t\t\t\tclientCertKey = trimedValue(options.getProperty(\"Client-Key\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Only Certificate key in .key format is supported at this point of time\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Client Key is missing\");\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\n\t\t\t//Validate the availability of Certificate Password\n\t\t\ttry{\n\t\t\tif (trimedValue(options.getProperty(\"Certificate-Password\")) != null){\n\t\t\t\tcertPassword = trimedValue(options.getProperty(\"Certificate-Password\"));\n\t\t\t\t} else {\n\t\t\t\t\tcertPassword = \"\";\n\t\t\t\t}\n\t\t\t} catch (Exception e){\n\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Certificate Password is missing\", e);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t\n\t\t\tmqttClientOptions.setSocketFactory(getSocketFactory(serverCert, clientCert, clientCertKey, certPassword));\n\n\t\t} catch (Exception e) {\n\t\t\tLoggerUtility.warn(CLASS_NAME, METHOD, \"Unable to configure TLSv1.2 connection: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void connect() {\n super.connect();\n if (remoteMediaPlayer != null) {\n connected = true;\n reportConnected(connected);\n }\n }",
"public void connect() throws IOException {\n\t\tsocket = new Socket(host, port);\n\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\tout = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));\n\t\tconnected = true;\n\t\texecutor = Executors.newScheduledThreadPool(5);\n\t}",
"public Reply connect(String connectAddress, int connectPort) throws ThingsException, InterruptedException;",
"public int connect() {\n if (this.mIsConnected) {\n HiLog.info(LOG_LABEL, \"Already connected, ignoring request.\", new Object[0]);\n return 1;\n }\n CallAppAbilityInfo callAppAbilityInfo = this.mInfo;\n if (callAppAbilityInfo == null || callAppAbilityInfo.getComponentName() == null) {\n HiLog.error(LOG_LABEL, \"no component to connect.\", new Object[0]);\n return 2;\n }\n HiLog.info(LOG_LABEL, \"Attempting to connect %{public}s.\", new Object[]{this.mInfo});\n this.mIsConnected = true;\n if (connectCallAppAbility(this.mInfo.getComponentName())) {\n return 1;\n }\n HiLog.error(LOG_LABEL, \"Failed to connect.\", new Object[0]);\n this.mIsConnected = false;\n return 2;\n }",
"protected void startConnect() {\n if (tcp) {\n connection = new TCPConnection(this);\n } else {\n connection = new UDPConnection(this, udpSize);\n }\n connection.connect(remoteAddr, localAddr);\n }",
"void toConnect() throws Exception {\n\t\tnameField.setVisible(false);\n\t\tf.setTitle(nameField.getText());\n\t\tsocketToServer = new Socket(\"127.0.0.1\", 5050);\n\t\tmyOutputStream = new ObjectOutputStream(socketToServer.getOutputStream());\n\t\tmyInputStream = new ObjectInputStream(socketToServer.getInputStream()); \n\t\tconnected();\n\t\tstart();\n\t}",
"private void bluetoothConnect() {\n\n btDevice = btAdapter.getRemoteDevice(EDISON_ADDRESS);\n if (btDevice == null) {\n Log.d(TAG,\"get remote device fail!\");\n finish();\n }\n\n try {\n btSocket = btDevice.createRfcommSocketToServiceRecord(SSP_UUID);\n } catch (IOException e) {\n Log.d(TAG,\"bluetooth socket create fail.\");\n }\n //save resource by cancel discovery\n btAdapter.cancelDiscovery();\n\n //connect\n try {\n btSocket.connect();\n Log.d(TAG,\"Connection established.\");\n } catch ( IOException e) {\n try {\n btSocket.close();\n }catch (IOException e2) {\n Log.d(TAG,\"unable to close socket after connect fail.\");\n }\n }\n\n //prepare outStream to send message\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n Log.d(TAG,\"output stream init fail!\");\n }\n\n }",
"void onConnect(IServerConnection<_ATTACHMENT> connection);",
"@Override\n\tpublic void connectComplete(boolean reconnect, String serverURI) {\n\t\t\n\t}",
"public void autoConnect() {\n Log.i(TAG, \"HERE AUTOCONNECT\");\n connect(staticIp, staticPort);\n }",
"private void connect() {\n ftp.connect();\n if (ftp.goodReply()) sendResponse(\"Connected\");\n else sendResponse(\"Could not connect to server\");\n }",
"public void connect() throws Exception\n {\n if(connected)\n return;\n connectionSocket = new Socket(address, CommonRegister.DEFAULT_PORT);\n localPeerID = ++localPeerIDCount;\n initListener();\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n writer = new PrintWriter(connectionSocket.getOutputStream(),true);\n connected = true;\n }",
"@Override\n public boolean isConnectable() {\n return true;\n }",
"public static void connect() {\n \t\tconnPool.start();\n \t}",
"protected void doOpenConnection() throws Exception {\n connection.open\n (conn_route, request_spec.context, request_spec.params);\n }",
"void connectionCreated();",
"public void run() {\n if (!connectFuture.isDone()) {\n connectFuture.cancel(true);\n return;\n }\n try {\n // send a message to the server\n ByteBuffer message = ByteBuffer.wrap(\"ping\".getBytes());\n // wait for the response\n System.out.println(\"Sending message to the server...\");\n int numberBytes = client.write(message).get();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n }",
"private void setupAndConnect() {\n URL url = getUrl(this.endpointUrl);\n connection = null;\n try {\n connection = (HttpURLConnection) url.openConnection();\n HttpURLConnection.setFollowRedirects(true);\n } catch (IOException e) {\n LOG.severe(\"Error connecting to Url : \" + url);\n LOG.severe(e.toString());\n }\n }"
] | [
"0.7067459",
"0.7035674",
"0.70130277",
"0.69526696",
"0.68926334",
"0.6830025",
"0.6830025",
"0.6830025",
"0.6740587",
"0.67267454",
"0.6716568",
"0.6666095",
"0.6650977",
"0.6640266",
"0.66219",
"0.66219",
"0.66150373",
"0.6596286",
"0.6585368",
"0.6559376",
"0.6519563",
"0.65113795",
"0.6482857",
"0.6456812",
"0.6453384",
"0.644739",
"0.63967705",
"0.63967246",
"0.6381795",
"0.6350778",
"0.6343771",
"0.634365",
"0.63334036",
"0.6318597",
"0.6315311",
"0.6302221",
"0.6293063",
"0.6248137",
"0.62421703",
"0.62330973",
"0.6232068",
"0.6230656",
"0.6224284",
"0.62065333",
"0.6191789",
"0.6186153",
"0.6168692",
"0.61567456",
"0.6150523",
"0.6143277",
"0.61112577",
"0.61066157",
"0.60811144",
"0.6058734",
"0.6051057",
"0.60479444",
"0.6046036",
"0.60293734",
"0.602483",
"0.6018828",
"0.60177314",
"0.6007179",
"0.6006367",
"0.6006217",
"0.6000561",
"0.5963477",
"0.5962402",
"0.5961981",
"0.59595525",
"0.59578836",
"0.59414643",
"0.5937316",
"0.59333384",
"0.5928403",
"0.5928007",
"0.5924441",
"0.5922305",
"0.5919903",
"0.5919667",
"0.59144086",
"0.5912104",
"0.59070927",
"0.58975595",
"0.5889389",
"0.58892995",
"0.5884289",
"0.5878779",
"0.58631384",
"0.58628416",
"0.5860156",
"0.58575886",
"0.5843575",
"0.5831884",
"0.5829465",
"0.5828682",
"0.582458",
"0.5824411",
"0.58199686",
"0.5816454",
"0.5807693",
"0.5804088"
] | 0.0 | -1 |
TODO: Should be asynchronous ??? forward the ACK | private final void forwardVirtualConnectACK(long index, int fragment,
int buffer) {
try {
synchronized (out) {
out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_ACK);
out.writeLong(index);
out.writeInt(fragment);
out.writeInt(buffer);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ack() {\n }",
"@Override\n protected boolean shouldAck() {\n return true;\n }",
"boolean needsAck() { return true; }",
"public void ack() {\n //disable current awaiting handler\n testFuture.cancel(false);\n //reset number of tryies;\n tryCount = 0;\n //shcedule next ping\n testFuture = mtpTimer.schedule(this, Mtp3.TIMEOUT_T2_SLTM, TimeUnit.SECONDS);\n if (logger.isDebugEnabled()) {\n \tlogger.debug(String.format(\"(%s) Test message acknowledged, Link test passed\", link.name));\n }\n }",
"boolean getAck();",
"private final void forwardVirtualConnectACKACK(long index, boolean succes) {\n try {\n synchronized (out) {\n out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_ACK_ACK);\n out.writeLong(index);\n out.writeBoolean(succes);\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n\n // System.err.println(\"****** ACK ACK OUT DONE \" + index + \" \" +\n // succes);\n }",
"private final void forwardVirtualMessageAck(long index, int data) {\n try {\n synchronized (out) {\n out.write(MessageForwarderProtocol.MESSAGE_VIRTUAL_ACK);\n out.writeLong(index);\n out.writeInt(data);\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n }",
"protected void reply_ok() throws java.io.IOException {\n byte[] ok = PushCacheProtocol.instance().okPacket();\n _socket.getOutputStream().write(ok, 0, ok.length);\n }",
"@Override\r\n\tpublic int ack(int x, int y) {\n\t\treturn 0;\r\n\t}",
"public void handleAck() {\n\t\tlong start = System.currentTimeMillis();\n\t\tlong end = start;\t\n\t\tint userCnt = users.size();\n\t\tSystem.out.println(\"handling ack in Server\");\n\t\twhile(CommitDecision.size() != 0){\n\t\t\tif(end - start >= 3000) {\n\t\t\t\tfor(String user: CommitDecision.keySet()) {\n\t\t\t\t\tSystem.out.println(\"resend ack to \"+ user+ \" for task \"+ filename);\n\t\t\t\t\tPL.sendMessage(CommitDecision.get(user));\n\t\t\t\t}\n\t\t\t\tstart = end;\n\t\t\t}else {\n\t\t\t\tMsg tmp = notYetAck.poll();\n\t\t\t\tif(tmp != null && CommitDecision.containsKey(tmp.user)) {\n\t\t\t\t\tCommitDecision.remove(tmp.user);\n\t\t\t\t\tSystem.out.println(tmp.user+\" 's ack has been received\");\n\t\t\t\t}\n\t\t\t\tend = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\n\t}",
"private void sendReceiveRes(){\n\t}",
"private void sendAck(DOPEPacket packet) throws IOException {\n\t\tDOPEPacket ack = new DOPEPacket(Control.ACK_OP_CODE, packet.getSequenceNumber());\n\t\tsend(ack);\n\t\tSystem.out.println(\"Sent ack:\\n\" + ack);\n\t}",
"public boolean ack() {\n return ack;\n }",
"boolean hasAck();",
"private void sendAcknoledmentOfReceipt() {\n\t\ttry {\n\t\t\tthis.receiver.sendLetter(new AcknowledgmentOfReceipt(this.receiver, this.sender, this.getDescription()));\n\t\t} catch (NoSuchMoneyException e) {}\n\t}",
"private void sendACK(int SeqNr) {\r\n\t\ttry {\r\n\t\t\tif(SeqNr == 0) receivingSocket.send(new DatagramPacket(ACK0,ACK0.length,rcvpkt.getAddress(),rcvpkt.getPort()));\r\n\t\t\tif(SeqNr == 1) receivingSocket.send(new DatagramPacket(ACK1,ACK1.length,rcvpkt.getAddress(),rcvpkt.getPort()));\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void ackit(String queryId){\n ResponseSender sender = responseSenderQueueForQuery.get(queryId).remove();\n sender.send(new Response(RpcType.ACK, Acks.OK));\n }",
"private void sendACKPacket()\n{\n \n //the values are unpacked into bytes and stored in outBufScratch\n //outBufScrIndex is used to load the array, start at position 0\n \n outBufScrIndex = 0;\n \n outBufScratch[outBufScrIndex++] = Notcher.ACK_CMD;\n \n //the byte is placed right here in this method\n outBufScratch[outBufScrIndex++] = lastPacketTypeHandled;\n \n //send header, the data, and checksum\n sendByteArray(outBufScrIndex, outBufScratch);\n \n}",
"messages.Ackinterface.AckInterface getAck();",
"public static Packet waitForACK() throws Exception {\r\n System.out.println(\"Waiting for ACK\");\r\n byte[] receiveData = new byte[Packet.maxPacketSize];\r\n DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\r\n serverSocket.receive(receivePacket);\r\n receiveData = receivePacket.getData();\r\n \r\n Packet ACKvector = new Packet(receiveData);\r\n \r\n return ACKvector;\r\n }",
"boolean getLockstepAck();",
"private short acked(ActualSegment segment) {\n\t\tif(segment == rttSeg) {\n\t\t\tint newRtt = (int) (System.nanoTime()/1000 - rttSegTime);\n\t\t\t// rfc6298\n\t\t\trttvar = (rttvar * 3 + Math.abs(rtt - newRtt) + 3) >>> 2;\n\t\t\tsrtt = (srtt * 7 + newRtt + 7) >>> 3;\n\t\t\trtt = newRtt;\n\t\t\trttSeg = null;\n\t\t}\n\t\tcancel(segment);\n\t\t\n\t\tshort synFin = (short) (segment.controlBits() & (TcpPkt.SYN | TcpPkt.FIN));\n\t\t\n\t\tflags |= ((synFin & TcpPkt.FIN) != 0) ? FIN_ACKED : 0;\n\t\treturn synFin;\n\t}",
"void onAckReceived(int source);",
"private short receive_ACK(DatagramSocket socket) throws IOException, InterruptedException {\n\n byte[] ACKbuf = new byte[4]; //ACK packet is 4 bytes long (RFC1350)\n DatagramPacket receivePacket = new DatagramPacket(ACKbuf, ACKbuf.length);\n try {\n\n // Set timeout limit so we don't wait until forever.\n socket.setSoTimeout(WAITING_LIMIT);\n socket.receive(receivePacket);\n\n byte[] ACK = receivePacket.getData();\n ByteBuffer wrap= ByteBuffer.wrap(ACK);\n\n short opcode = wrap.getShort(), //parse opcode\n blockNumber = wrap.getShort(); //parse block number\n\n if(opcode == OP_ACK) {\n return blockNumber;\n }\n else if (opcode == OP_ERR)\n {\n throw new InterruptedException(\"ERROR-MESSAGE RECEIVED FROM CLIENT, CLOSING CONNECTION.\");\n }\n else\n {\n throw new InvalidDataException(\"RECEIVED PACKET NOT OF TYPE ACK\");\n }\n\n }\n catch (SocketTimeoutException e) {\n throw new SocketTimeoutException(\"NO ACK RECEIVED WITHIN REASONABLE TIME\");\n }\n catch (IOException e) {\n throw new IOException(\"CONNECTION PROBLEM\");\n }\n\n }",
"private void ackWrite() throws SIMException\n\t\t{\n\t\t\tfor (;;)\n\t\t\t{\n\t\t\t\t// Read a byte from device\n\t\t\t\tif ((mode & MODE_TRANSFER_MASK) == MODE_TRANSFER_WRITE)\n\t\t\t\t{\n\t\t\t\t\tint v =requestWrite.getDmaValue();\n\t\t\t\t\ttransferToMemory(this,base.getValue(),v);\n\t\t\t\t}\n\n\t\t\t\t// Increment / decrement address if requested\n\t\t\t\tif (hold == false)\n\t\t\t\t{\n\t\t\t\t\tif ((mode & MODE_DECREMENT) != 0)\n\t\t\t\t\t\tbase.decrement();\n\t\t\t\t\telse\n\t\t\t\t\t\tbase.increment();\n\n\t\t\t\t}\n\n\t\t\t\tif (isTerminate(requestWrite))\n\t\t\t\t{\n\t\t\t\t\tterminateDma();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// In single transfer wait another dreq\n\t\t\t\tif ((mode & MODE_DMA_MASK) == MODE_DMA_SINGLE)\n\t\t\t\t{\n\t\t\t\t\tif (requestRead.getDmaDREQ() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\trequest = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}",
"@Override\n\t\tboolean needsAck() {\n\t\t\treturn byteChunks.length > 0; // don't retry empty ack\n\t\t}",
"private Packet handleAckRequestedAction(Packet request) {\n boolean noStateUpdate = (rc.configuration.getInternalRmFeature() != null);\n\n AcknowledgementData ackData = rc.protocolHandler.getAcknowledgementData(request.getMessage());\n rc.destinationMessageHandler.processAcknowledgements(ackData, noStateUpdate);\n\n return rc.protocolHandler.createEmptyAcknowledgementResponse(rc.destinationMessageHandler.getAcknowledgementData(ackData.getAckReqestedSequenceId(), true, noStateUpdate), request);\n }",
"private void receiveNack(Evt e) {\n\t\tif (!nackReceived && e.getMessage()!= currentlyOptimisticallyTransmitted) {\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t//\tthrow new IllegalStateException(\"A nack corresponding to a message that isn't the one in the buffer has been received. This means that something is wrong (at time \" + e.getTimeNS() + \")\");\r\n\t\t}\r\n\t\t\r\n\t\tif (currentlyOptimisticallyTransmitted == null)\r\n\t\t\treturn;\r\n\r\n\t\tif (nackReceived == false) {\r\n\t\t\tif (lwSimExperiment.isWithTimeLine())\r\n\t\t\t\ttimeline.addJobPhase(lastPacketStart, e.getTimeNS(), currentlyOptimisticallyTransmitted.origin + \"->\" + currentlyOptimisticallyTransmitted.dest + \"\\n\" + currentlyOptimisticallyTransmitted.index + \":NACK\", Color.RED);\t\t\r\n\t\t\t// immediately resend\t\t\t\r\n\t\t\tnackReceived = true;\r\n\t\t\t// correct transmission time in the case of NACK Mode\r\n\t\t\tif (!this.ACKMode)\r\n\t\t\t\tlwSimExperiment.reportTransTime(index, e.getTimeNS() - lastPacketStart - packetDuration, currentlyOptimisticallyTransmitted);\r\n\t\t\t\r\n\t\t\tSpinetMessage dupl = currentlyOptimisticallyTransmitted.getCopy();\r\n\t\t\tgetQueue(dupl.dest).remove(currentlyOptimisticallyTransmitted);\r\n\t\t\tgetQueue(dupl.dest).addFirst(dupl);\r\n\t\t\tmainQueue.addFirst(dupl);\r\n\t\t\tdefineSpinetMessage(dupl);\r\n\t\t\tlwSimExperiment.packetRetransmitted(dupl);\r\n\t\t\tcurrentlyOptimisticallyTransmitted = null;\r\n\t\t}\t\t\r\n\t}",
"private void handleDataPacket(TcpPacket packet) {\n\n // Invariants\n\n // For the sender, if the ACK message did not arrive, it will receive\n // another ACK+SYN message, which it will then again confirm.\n if (!this.isReceiver()) {\n assert(packet.isSYN() && packet.isACK());\n sendWithoutResend(\n ((FullExtTcpPacket) createPacket(\n 0, // Data size (byte)\n sendNextNumber, // Sequence number\n (packet.getSequenceNumber() + packet.getDataSizeByte() + (packet.isSYN() ? 1 : 0)), // Ack number\n true, // ACK\n false, // SYN\n packet.getECN() // ECE\n ).setEchoFlowletId(packet.getFlowletId()))\n .setEchoDepartureTime(packet.getDepartureTime())\n );\n return;\n }\n\n // The receiver is always at FIRST_SEQ_NUMBER+1, having sent only the ACK+SYN message\n assert(this.sendUnackNumber == FIRST_SEQ_NUMBER + 1);\n\n // Locally store sequence numbers\n long seqNumber = packet.getSequenceNumber();\n long ackNumber = (packet.getSequenceNumber() + packet.getDataSizeByte() + (packet.isSYN() ? 1 : 0));\n\n // Only advance if it is the packet on the left side of the receiver window\n if (receiveNextNumber == seqNumber) {\n receiveNextNumber = selectiveAckSet.determineReceiveNextNumber(ackNumber);\n\n // If it is not on the left side, we selectively acknowledge it\n } else if (seqNumber > receiveNextNumber) {\n selectiveAckSet.add(seqNumber, ackNumber);\n }\n\n // Send out the acknowledgment\n sendWithoutResend(\n ((FullExtTcpPacket) ((FullExtTcpPacket) (createPacket(\n 0, // Data size (byte)\n sendNextNumber, // Sequence number\n receiveNextNumber, // Ack number\n true, // ACK\n false, // SYN\n packet.getECN() // ECE\n ).setEchoFlowletId(packet.getFlowletId())))\n .setSelectiveAck(selectiveAckSet.createSelectiveAckData()))\n .setEchoDepartureTime(packet.getDepartureTime())\n );\n\n }",
"@Override\n\tpublic void run() {\n\t\t\n\t\ttry{\n\t\tServerEncoderDecoder encodeco = new ServerEncoderDecoder();\n\t\t\n\t\t\tbyte[] datatoWrite = new byte[2000];\n\t\t\t\tdatatoWrite = encodeco.encodeData(packet);\n\t\t\tserverConnection.getOutput().println(new String(datatoWrite));\n\t\t\tString ack = serverConnection.getInput().readLine();\n\t\t\tif(ack.equals(\"ACK\")){\n\t\t\t\t//System.out.println(\"ACK for request obtained\");\n\t\t\t\tCoordinator.incrementCounter();\n\t\t\t}\n\t\t\n\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"boolean ack( long revision );",
"protected int handleAck(Msg msg)\n {\n System.out.println(\"Received AckMsg for stream \" + msg.streamId());\n MsgKey key = msg.msgKey();\n\n //print out item name from key if it has it\n if (key != null && key.checkHasName())\n {\n System.out.println(key.name() + \"\\nDOMAIN: \" +\n DomainTypes.toString(msg.domainType()));\n }\n\n AckMsg ackMsg = (AckMsg)msg;\n System.out.println(\"\\tackId=\" + ackMsg.ackId() + (ackMsg.checkHasSeqNum() ? \"\\tseqNum=\" + ackMsg.seqNum() : \"\") +\n (ackMsg.checkHasNakCode() ? \"\\tnakCode=\" + ackMsg.nakCode() : \"\") +\n (ackMsg.checkHasText() ? \"\\ttext=\" + ackMsg.text().toString() : \"\"));\n return CodecReturnCodes.SUCCESS;\n }",
"private void handleAcknowledgment(FullExtTcpPacket packet) {\n\n // Invariant: receiver can *only* receive a duplicate third handshake acknowledgment\n long ack = packet.getAcknowledgementNumber();\n if (this.isReceiver()) {\n assert(ack == sendNextNumber && sendNextNumber == sendUnackNumber && packet.getDataSizeByte() == 0 && !packet.isSYN());\n return;\n }\n\n // Flowlet recording\n if (packet.getEchoFlowletId() < currentFlowlet) {\n SimulationLogger.increaseStatisticCounter(\"TCP_FLOWLET_OUT_OF_ORDER\");\n } else {\n currentFlowlet = packet.getEchoFlowletId();\n tcpLogger.logMaxFlowlet(currentFlowlet);\n }\n\n // If all flow is confirmed, we do not handle any more acknowledgments as sender\n if (isAllFlowConfirmed()) {\n return;\n }\n\n // Log current congestion window\n tcpLogger.logCongestionWindow(this.congestionWindow);\n\n // Round-trip time estimation; follows RFC 6298\n double RAcc = (Simulator.getCurrentTime() - packet.getEchoDepartureTime());\n if (firstRttMeasurement) {\n smoothRoundTripTime = RAcc;\n roundTripTimeVariation = smoothRoundTripTime / 2;\n firstRttMeasurement = false;\n } else {\n roundTripTimeVariation = 0.75 * roundTripTimeVariation + 0.25 * Math.abs(smoothRoundTripTime - RAcc);\n smoothRoundTripTime = 0.875 * smoothRoundTripTime + 0.125 * RAcc;\n }\n roundTripTimeout = (long) Math.max(MINIMUM_ROUND_TRIP_TIMEOUT, (2 * smoothRoundTripTime + 4 * roundTripTimeVariation));\n\n int newPacketsAcked = 0;\n\n // FLOW ACKNOWLEDGMENT: SELECTIVE ACKNOWLEDGMENT RANGES\n Set<Long> outstandingSegmentSeqs = new HashSet<>(sentOutUnacknowledgedSegStartSeqNumbers);\n for (Long segSeq : outstandingSegmentSeqs) {\n long size = getFlowSizeByte(segSeq);\n long segAck = segSeq + size;\n\n // Check if an outstanding segment falls within the selective acknowledgment ranges\n for (AckRange r : packet.getSelectiveAck()) {\n if (r.isWithin(segSeq, segAck)) {\n confirmSegment(segSeq);\n newPacketsAcked++;\n }\n }\n\n }\n\n // FLOW ACKNOWLEDGMENT: CUMULATIVE ACKNOWLEDGMENT\n outstandingSegmentSeqs = new HashSet<>(sentOutUnacknowledgedSegStartSeqNumbers); // Set<Long>\n for (Long segSeq : outstandingSegmentSeqs) {\n long size = getFlowSizeByte(segSeq);\n long segAck = segSeq + size;\n if (segAck <= ack) {\n confirmSegment(segSeq);\n newPacketsAcked++;\n }\n }\n\n // MOVE WINDOW AS FAR AS POSSIBLE\n // Continue on with the other packets that have also have been\n // received already\n long acknowledgedBytes = 0;\n while (acknowledgedSegStartSeqNumbers.contains(sendUnackNumber)) {\n acknowledgedSegStartSeqNumbers.remove(sendUnackNumber);\n\n // Retrieve size of the already out-of-order (selectively) acknowledged packet\n long size = getFlowSizeByte(sendUnackNumber);\n\n // A packet's data is thus acknowledged\n this.confirmFlow(size);\n\n // Consume the window further\n sendUnackNumber += size;\n acknowledgedBytes += size;\n\n }\n\n // The window that we want to send can't start at already acknowledged numbers\n sendNextNumber = Math.max(sendNextNumber, sendUnackNumber);\n\n // Handle the action if it is marked with ECE\n if (packet.isECE()) {\n handleECEMarkedPacket();\n }\n\n // Increment window for every packet acknowledged by this acknowledgement\n for (int i = 0; i < newPacketsAcked; i++) {\n phaseIncrementCongestionWindow();\n }\n\n // Update alpha\n updateAlpha(packet, acknowledgedBytes);\n\n // Send out as much as possible\n sendPendingData();\n\n // Log current congestion window\n tcpLogger.logCongestionWindow(this.congestionWindow);\n\n // Flow is finished if nothing is sent and everything\n // has been acknowledged\n if (sendUnackNumber == sendNextNumber) {\n assert(isAllFlowConfirmed());\n assert(sentOutUnacknowledgedSegStartSeqNumbers == null || sentOutUnacknowledgedSegStartSeqNumbers.isEmpty());\n assert(acknowledgedSegStartSeqNumbers == null || acknowledgedSegStartSeqNumbers.isEmpty());\n assert(seqNumbToResendEventMap == null || seqNumbToResendEventMap.isEmpty());\n this.sentOutUnacknowledgedSegStartSeqNumbers = null;\n this.acknowledgedSegStartSeqNumbers = null;\n this.seqNumbToResendEventMap = null;\n this.selectiveAckSet = null;\n }\n\n }",
"public interface Ack {\n\t/**\n\t * Determines whether the response is success\n\t * @return\n\t */\n\tpublic boolean isSuccess();\n\t\n\t/**\n\t * Get the message response\n\t * @return\n\t */\n\tpublic String getMessage();\n\t\n\t/**\n\t * Get player's uuid response\n\t * @return\n\t */\n\tpublic UUID getUuid();\n\t\n\t/**\n\t * Set whether response is success or not\n\t * @param success\n\t */\n\tpublic void setSuccess(boolean success);\n\t\n\t/**\n\t * Set message response\n\t * @param message\n\t */\n\tpublic void setMessage(String message);\n\t\n\t/**\n\t * Set player's uuid response\n\t * @param uuid\n\t */\n\tpublic void setUuid(UUID uuid);\n}",
"private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }",
"protected void pktsAcked(int n, long rtt) {}",
"public void run() {\n\t\t\tBundle b = null;\n\t\t\tint i = 0, j;\n\t\t\ttry {\n\t\t\t\tfor (i = 0; i < t.length; i++) {\n\t\t\t\t\tString timestamp = \"\";\n\t\t\t\t\twhile (t[i].noOfBundles == 0)\n\t\t\t\t\t\t;\n\t\t\t\t\tfor (j = seq; j < t[i].noOfBundles; j++) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t// System.out.println(\"SEQ ACK : \" +\n\t\t\t\t\t\t\t// t[i].noOfBundles);\n\t\t\t\t\t\t\tbyte[] buffer = (byte[]) ois.readObject();\n\t\t\t\t\t\t\tb = new Bundle();\n\t\t\t\t\t\t\tb.parse(buffer);\n\t\t\t\t\t\t\tif (b.bundleNumber == b.noOfBundles - 1)\n\t\t\t\t\t\t\t\ttimestamp = new String(b.data);\n\t\t\t\t\t\t\t// System.out.println(\"ACK WAITING : \" + j);\n\t\t\t\t\t\t\t// System.out.println(\"ACK RECEIVED : \"\n\t\t\t\t\t\t\t// + b.bundleNumber);\n\t\t\t\t\t\t\t// System.out.println(t[i].transactionId + \" \"\n\t\t\t\t\t\t\t// + t[i].noOfBundles + \" \" + j);\n\t\t\t\t\t\t} while (!b.isAcknowledgement(t[i].transactionId,\n\t\t\t\t\t\t\t\tt[i].noOfBundles, j));\n\t\t\t\t\t}\n\t\t\t\t\t// System.out.println(\"TIMESTAMP RECEIVED IS :\" +\n\t\t\t\t\t// timestamp);\n\t\t\t\t\tlong ts = Long.parseLong(timestamp);\n\t\t\t\t\tdh.setSynced(ts, t[i].records);\n\t\t\t\t\tseq = 0;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tObjectOutputStream fout;\n\t\t\t\ttry {\n\t\t\t\t\tfout = new ObjectOutputStream(new FileOutputStream(\n\t\t\t\t\t\t\tnew File(storagePath + \"/push\")));\n\t\t\t\t\tfout.writeObject(t);\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\t// System.out.println(\"Written broken transaction!!!\");\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\tfout.close();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(\"ACK ENDED\");\n\t\t}",
"private void sendAcknowledgePacket(KarelPacket ackKarelPacket) throws IOException {\n if (ackKarelPacket != null) {\n DatagramPacket packet;// Else, if we should send ack packet, send it\n packet = ackKarelPacket.createDatagramPacket(address, port);\n socket.send(packet);\n if (Robot.verbose) {\n System.out.println(\"SEND(ack): \" + ackKarelPacket.toString());\n }\n }\n }",
"public void sendAck(DatagramPacket p, long timeStamp,int flag, boolean lastPacket) throws IOException{\r\n\t\tnumPackets++;\r\n\t\tclientIp = p.getAddress();\r\n\t\tclientPort = p.getPort();\r\n\r\n\t\t//Create a message buffer of MTU size\r\n\t\tbyte[] data = new byte[20];\r\n\t\tByteBuffer bb = ByteBuffer.wrap(data);\r\n\r\n\t\tbb.putInt(0); //Sequence number\r\n\t\tif(lastPacket){\r\n\t\t\tbb.putInt(lastByteRead + 1); //this is the ACK number\r\n\t\t}\r\n\t\telse{\r\n\t\t\tbb.putInt(lastByteRead); //this is the ACK number\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\tbb.putLong(timeStamp); //put in the time stamp, to calculate RTT\r\n\r\n\t\t// send a SYN + ACK segment\r\n\t\tString mask = null;\r\n\r\n\t\t// ACK\r\n\t\tif(flag == 2){\r\n\t\t\tmask = \"0000000000000000000000000000010\";\r\n\t\t}\r\n\t\t// SYN + ACK\r\n\t\telse if(flag == 3 ) {\r\n\t\t\tmask = \"0000000000000000000000000001010\";\r\n\t\t}\r\n\t\t// Fin\r\n\t\telse if(flag == 5) {\r\n\t\t\tmask = \"00000000000000000000000000000100\";\r\n\t\t}\r\n\r\n\t\tint maskValue = new BigInteger(mask, 2).intValue();\r\n\t\tbb.putInt(maskValue);\r\n\r\n\t\tDatagramPacket synAckPacket = new DatagramPacket(data, data.length, clientIp, clientPort);\r\n\t\tin_channel.send(synAckPacket);\r\n\t\t\r\n\r\n\t}",
"@Override\n public void start() {\n long originalSendNextNumber = sendNextNumber;\n sendNextNumber += 1L;\n\n // Send the first part of the handshake\n currentState = SYN_SENT;\n sendWithResend(createPacket(\n 0, // Data size (byte)\n originalSendNextNumber, // Seq number\n 0, // Ack number\n false, // ACK\n true, // SYN\n false // ECE\n ));\n\n // System.out.println(\"3-WAY HANDSHAKE: 0. Sender sent SYN.\");\n\n // Preserve space as this field will never be used\n this.selectiveAckSet = null;\n\n }",
"protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }",
"void responseSent( C conn ) ;",
"protected abstract boolean sendNextRequests();",
"private Packet handleSequenceAcknowledgementAction(Packet request) {\n AcknowledgementData ackData = rc.protocolHandler.getAcknowledgementData(request.getMessage());\n rc.destinationMessageHandler.processAcknowledgements(ackData);\n\n request.transportBackChannel.close();\n return rc.communicator.createNullResponsePacket(request);\n }",
"private void sendPendingData() {\n assert(sendNextNumber >= sendUnackNumber);\n\n // Calculate congestion window difference\n long lastUnackNumber = sendUnackNumber + (long) Math.min(congestionWindow, MAX_WINDOW_SIZE);\n long difference = lastUnackNumber - sendNextNumber; // Available window\n\n // Send packets until either the congestion window is full\n // or there is no longer any flow to send\n long amountToSendByte = getFlowSizeByte(sendNextNumber);\n while (difference >= amountToSendByte && amountToSendByte > 0) {\n\n // If it has not yet been confirmed,actually send out the packet\n if (!acknowledgedSegStartSeqNumbers.contains(sendNextNumber)) {\n sendOutDataPacket(sendNextNumber, amountToSendByte);\n\n // If it has already been confirmed by selective acknowledgments, just move along\n } else {\n sendNextNumber += amountToSendByte;\n }\n\n // Determine next amount to send\n difference -= amountToSendByte;\n amountToSendByte = getFlowSizeByte(sendNextNumber);\n\n }\n\n }",
"private void sendDataReceptionCompleteMessage(SelectionKey key, byte[] data) throws IOException {\n\t\tSocketChannel channel = (SocketChannel)key.channel();\n\t\tbyte[] ackData = new byte[4];\n\t\tackData[0]=00;\n\t\tackData[1]=00;\n\t\tackData[2]=00;\n\t\tackData[3]=data[9]; //bPacketRec[0];\n\n\t\tByteBuffer bSend = ByteBuffer.allocate(ackData.length);\n\t\tbSend.clear();\n\t\tbSend.put(ackData);\n\t\tbSend.flip();\n\t\twhile (bSend.hasRemaining()) {\n\t\t\ttry {\n\t\t\t\tchannel.write(bSend);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new IOException(\"Could not send Data Reception Acknowledgement\");\n\t\t\t}\n\t\t}\n\t}",
"private void establishedHandle(FullExtTcpPacket packet) {\n if (packet.isSYN()) {\n // Re-receive the ACK+SYN, means that the receiver has not received the final ACK\n // So we re-send the ACK of the three-way handshake\n handleDataPacket(packet);\n } else if (packet.isACK()) {\n handleAcknowledgment(packet);\n } else {\n handleDataPacket(packet);\n }\n }",
"@Override\n public void run() {\n transmit_set();\n }",
"public FutureResult sendToServer(String onTheWireFormat) throws IOException;",
"void receiveAcknowledgement() {\n byte[] receiveBuffer = new byte[2048];\n DatagramPacket receivePacket = new DatagramPacket(receiveBuffer, receiveBuffer.length);\n try {\n recSocket.receive(receivePacket);\n String dataReceived = new String(receivePacket.getData()).trim();\n System.out.println(\"\\n\" + dataReceived);\n\n } catch (IOException e) {\n System.out.println(\"\\nAcknowledgement not received!\");\n }\n }",
"public boolean finAcked() { return (flags & FIN_ACKED) != 0; }",
"@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }",
"private void flushOutbound0() {\n/* 454 */ runPendingTasks();\n/* */ \n/* 456 */ flush();\n/* */ }",
"void responseSequenceNumber() {\r\n\t\t\r\n\t}",
"private void sendStatusAcknowledgment(FederationModel registration) throws Exception {\n\t\tif (!registration.sendStatus) {\n\t\t\t// skip status acknowledgment\n\t\t\treturn;\n\t\t}\n\t\tInetAddress addr = InetAddress.getLocalHost();\n\t\tString federationName = gitblit.getSettings().getString(Keys.federation.name, null);\n\t\tif (StringUtils.isEmpty(federationName)) {\n\t\t\tfederationName = addr.getHostName();\n\t\t}\n\t\tFederationUtils.acknowledgeStatus(addr.getHostAddress(), registration);\n\t\tlogger.info(MessageFormat.format(\"Pull status sent to {0}\", registration.url));\n\t}",
"private boolean receive_DATA_send_ACK(DatagramSocket socket, String requestedFile){\n\n byte[] fileBuf = new byte[512], //temporary storage for the file bytes\n file, //full file bytes\n packet, //packet array\n temp, //temporary array, used for increasing the size of fileBuf\n ACK = new byte[4]; //ACKnowledgement array\n short currentBN = 0, //block number of the last received packet\n incomingBN; //block number of the incoming packet\n int totalBytes = 0; //total amount of bytes read\n\n //send an acknowledgement to establish connection\n\n //set opcode\n ACK[0] = 0;\n ACK[1] = OP_ACK;\n\n //set block number\n ACK[2] = (byte)((currentBN >> 8) & 0xff);\n ACK[3] = (byte)(currentBN & 0xff);\n\n DatagramPacket receivePacket = null,\n ackPacket = new DatagramPacket(ACK, ACK.length, socket.getInetAddress(), socket.getPort());\n\n try {\n\n Path testFilePath = Paths.get(requestedFile).normalize();\n\n // First make user user has provided only a filename without directory structure\n if (Files.exists(testFilePath))\n {\n throw new FileAlreadyExistsException(\"File already exists!\");\n }\n else\n {\n // Try to create a file to see that it's possible to write to path.\n // Will throw Exception if failing, which we catch later\n Files.createFile(testFilePath);\n\n // If we could create the file we should delete it before moving on\n Files.delete(testFilePath);\n\n }\n\n boolean transmissionComplete = false;\n boolean done = false;\n\n // Keep receiving and sending ACKs until we are done or until connection problems\n while (!done && !transmissionComplete)\n {\n try {\n\n boolean correctDataBlock = false;\n int reTransmitCounter = 0;\n\n // Keep going until correct datablock has been received or we run out of retransmission retries\n while (!correctDataBlock && reTransmitCounter <= MAXIMUM_RETRIES)\n {\n try\n {\n socket.send(ackPacket); //send ACK packet\n\n //receive packet\n packet = new byte[516]; //reset the packet array\n receivePacket = new DatagramPacket(packet, packet.length);\n socket.setSoTimeout(WAITING_LIMIT); //set timeout\n socket.receive(receivePacket);\n\n //process received packet\n packet = receivePacket.getData();\n ByteBuffer wrap= ByteBuffer.wrap(packet);\n short opCode = wrap.getShort();\n incomingBN = wrap.getShort();\n\n if (opCode == OP_DAT && incomingBN == currentBN + 1) { //check if the bn is ok and that the packet is not empty\n currentBN = incomingBN;\n\n //copy the contents of the packet into fileBuf\n for (int i = 4; i < receivePacket.getLength(); i++) {\n fileBuf[totalBytes] = packet[i];\n totalBytes++;\n }\n\n //increase the size of filBuf by 512, so next packet data will fit\n temp = new byte[fileBuf.length];\n System.arraycopy(fileBuf, 0, temp, 0, fileBuf.length);\n fileBuf = new byte[totalBytes + 512];\n System.arraycopy(temp, 0, fileBuf, 0, totalBytes);\n\n //set opcode\n ACK[0] = 0;\n ACK[1] = OP_ACK;\n\n //set block number\n ACK[2] = (byte) ((currentBN >> 8) & 0xff);\n ACK[3] = (byte) (currentBN & 0xff);\n\n // Create ACK-packet\n ackPacket = new DatagramPacket(ACK, ACK.length, socket.getInetAddress(), socket.getPort());\n\n correctDataBlock = true;\n }\n else\n {\n // If the packet is an error-message, we stop executing. Other packet-types are simply discarded\n if (opCode == OP_ERR)\n {\n //System.err.println(\"ERROR IN THE MIDDLE OF THE TRANSFER\");\n throw new InterruptedException(\"Client sent an error-packet in the middle of transmission, closing connection.\");\n }\n reTransmitCounter++;\n System.out.println(\"Incorrect Data-block (or wrong packet type) received, resending ACK.\");\n }\n }\n catch (SocketTimeoutException e)\n {\n reTransmitCounter++;\n if(reTransmitCounter <= MAXIMUM_RETRIES)\n {\n System.out.println(\"No new DATA-packet received, resending ACK.\");\n }\n }\n\n }\n\n // If we never got the correct data block, it means we ran out of retries.\n if (!correctDataBlock)\n {\n done = true;\n }\n // Check if received packet was the last one.\n else if (receivePacket.getLength() < 516)\n {\n // No dallying atm\n // Make sure we have enough space left in write-folder before sending final ACK.\n if (!hasEnoughSpace(totalBytes))\n {\n throw new SizeLimitExceededException(\"Not enough disk space for storing file!\");\n }\n\n socket.send(ackPacket); //send ACK packet\n transmissionComplete = true;\n }\n\n }\n catch (IOException e) {\n System.out.println(\"Connection problems, aborting.\");\n return false;\n }\n }\n\n // If we never received all the data from the client, we stop executing.\n if (!transmissionComplete)\n {\n throw new DataFormatException(\"Maximum number of retransmission reached. Aborting.\");\n }\n\n //save file\n FileOutputStream fos;\n\n //get bytes from fileBuf into file array\n file = new byte[totalBytes];\n System.arraycopy(fileBuf,0, file, 0, totalBytes);\n\n fos = new FileOutputStream(requestedFile);\n fos.write(file);\n fos.close();\n\n }\n catch (InterruptedException e)\n {\n // Debug\n System.out.println(e.getMessage());\n return false;\n }\n catch (DataFormatException e)\n {\n // Debug\n System.out.println(e.getMessage());\n send_ERR(socket, ERR_NOT_DEFINED, \"Retransmission limit exceeded, closing connection.\");\n return false;\n }\n catch (SizeLimitExceededException e)\n {\n // Debug\n System.out.println(e.getMessage());\n\n send_ERR(socket, ERR_DISK_FULL);\n return false;\n }\n catch (FileAlreadyExistsException e)\n {\n // Debug\n System.out.println(e.getMessage());\n\n send_ERR(socket, ERR_FILE_ALREADY_EXISTS);\n return false;\n }\n catch (NoSuchFileException e)\n {\n // Debug\n System.out.println(\"User specified an invalid path along with the filename. sending error message\");\n\n send_ERR(socket, ERR_ACCESS_VIOLATION);\n return false;\n }\n catch (IOException e) {\n\n e.printStackTrace();\n\n // Sending \"No such user\"-error, as described in Assignment questions.\n // https://mymoodle.lnu.se/mod/forum/discuss.php?d=917218\n send_ERR(socket, ERR_NO_SUCH_USER);\n return false;\n }\n\n return true;\n }",
"private void processSession()\n\t\tthrows ProtocolException, AtmException\n\t{\n\t\tboolean fDone = false;\n\t\ttry\n\t\t{\n\t\t\twhile(!fDone)\n\t\t\t{\n\t\t\t\t// listen for client to send data\n\t\t\t\tString dataIn = m_reader.readLine();\n\t\t\t\ttrace(\"handling client command \" + dataIn);\n\t\t\t\tif(dataIn.trim().equals(START_XFR))\n\t\t\t\t{\n\t\t\t\t\ttrace(\"starting a file transfer request\");\n\t\t\t\t\tsendOK();\n\t\t\t\t\t//m_writer.println(OK); // send the ack\n\t\t\t\t\t\n\t\t\t\t\t// get the file name\n\t\t\t\t\tdataIn = m_reader.readLine();\n\t\t\t\t\t\n\t\t\t\t\t// create the AtmObject\n//\t\t\t\t\tDocument inDom = XmlUtility.xmlDocumentFromXmlString(dataIn.trim());\n//\t\t\t\t\tAtmObject obj = XmlUtility.xmlToObject(inDom);\n//\t\t\t\t\t\n//\t\t\t\t\tAtmObject response = AtmApplication.getInstance().processAtmObject(obj);\n//\t\t\t\t\t\n//\t\t\t\t\tDocument xmlResponse = XmlUtility.objectToXml(response);\n//\t\t\t\t\tString xmlResponseString = XmlUtility.xmlDocumentToString(xmlResponse);\n//\t\t\t\t\tsendData(xmlResponseString);\n\t\t\t\t\t// process the object\n//\t\t\t\t\tif(dataIn.trim().startsWith(FILE_NAME))\n//\t\t\t\t\t{\n//\t\t\t\t\t\t// get the file name\n//\t\t\t\t\t\tString data = dataIn.trim();\n//\t\t\t\t\t\t//String fileName = data.trim();\t\n////\t\t\t\t\t\tString path = m_destDirectory.getAbsolutePath()\n////\t\t\t\t\t\t\t\t+ \"\\\\\" + fileName;\n////\t\t\t\t\t\ttrace(\"Preparing to copy file: \" + fileName + \n////\t\t\t\t\t\t\t\t\" to \" + path);\n//\t\t\t\t\t\t\n////\t\t\t\t\t\tdestFile = new File(path);\n////\t\t\t\t\t\tFileWriter writer = new FileWriter(destFile);\n////\t\t\t\t\t\tdestWriter = new BufferedWriter(writer);\n////\t\t\t\t\t\t\n//\t\t\t\t\t\ttrace(\"created destination file\");\n//\t\t\t\t\t\tm_writer.println(OK); // send the ack\n//\t\t\t\t\t}\n\t\t\t\t}\n//\t\t\t\telse if(messageIn.trim().startsWith(DATA))\n//\t\t\t\t{\n//\t\t\t\t\ttrace(\"writing data to destination file\");\n//\t\t\t\t\t// don't trim now. We want whitespace if it's there.\n//\t\t\t\t\tString data = messageIn.substring(DATA.length());\n//\t\t\t\t\tdestWriter.write(data);\n//\t\t\t\t\tdestWriter.newLine();\n//\t\t\t\t}\n//\t\t\t\telse if(messageIn.trim().equals(END_FILE))\n//\t\t\t\t{\n//\t\t\t\t\tdestWriter.flush();\n//\t\t\t\t\tdestWriter.close();\n//\t\t\t\t\tm_writer.println(OK); // send the ack\n//\t\t\t\t}\n//\t\t\t\telse if(messageIn.trim().equals(END_SESSION))\n//\t\t\t\t{\n//\t\t\t\t\ttrace(\" - Ending session\");\n//\t\t\t\t\tm_reader.close();\n//\t\t\t\t\tm_writer.println(OK); // send the ack\n//\t\t\t\t\tbreak;\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\ttrace(\"Error copying file\" + ex.getMessage());\n\t\t\tthrow new ProtocolException(\"Error copying file\", ex);\t\t\t\n\t\t}\n\t}",
"public void ack(Object arg0) {\n\t\tSystem.out.println(\"WordReader.ack(Object arg0):\"+arg0);\n\t}",
"private void sendAck(char seqNum, byte advertisedWindow) throws IOException {\n\t\tDOPEPacket ack = new DOPEPacket(Control.ACK_OP_CODE, seqNum, advertisedWindow);\n\t\tsend(ack);\n\t\tSystem.out.println(\"Sent ack:\\n\" + ack);\n\t}",
"void ackResult(boolean resultMatch);",
"private void DownloadCompleted(ByteBuffer packet) throws RuntimeException, IOException{\n\t\t// (for download completion ack c->s) [header | file_id (4)]\n\t\t// no HEADER\n\t\t\n\t\t// parse the req\n\t\tif (packet.capacity() < 4)\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"file not correctly specified\");\n\t\tint file_id = packet.getInt(0);\n\t\tfor (ServerFile f : totalFiles().keySet()){\n\t\t\tif (f.id() == file_id){\n\t\t\t\tclient.addUpload(f);\n\t\t\t\t// construct response\n\t\t\t\tString send_name = f.name() + '\\0';\n\t\t\t\tbuf = Utility.addHeader(Constants.DOWNLOAD_ACK, send_name.length(), client.getId());\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < send_name.length(); i++){\n\t\t\t\t\tbuf.put(Constants.HEADER_LEN + i, send_name.getBytes()[i]);\n\t\t\t\t}\n\t\t\t\tout.write(buf.array());\n\t\t\t\tout.flush();\n\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\": Correctly processed download ack for \" + file_id);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthrow new RuntimeException(\"file id does not exist\");\n\t}",
"@Test\n public void testRegisterAck() throws Exception {\n System.out.println(\"registerAck\");\n\n Sendable s = sendAMessage();\n\n String a = s.getMessageId();\n String comment = \"comment\";\n String ack = \"ack\";\n instance.setEbXmlEventListener(ebXmlEventListener);\n\n // removes the message that's just been added but doesn't delete the file because there isn't one yet\n instance.registerAck(a, comment, ack);\n }",
"public void sendRemainData();",
"Message sendAndWait();",
"private void processNextMessage(ByteBuf buf) throws IgniteClientException {\n var unpacker = new ClientMessageUnpacker(buf);\n\n if (protocolCtx == null) {\n // Process handshake.\n pendingReqs.remove(-1L).complete(unpacker);\n return;\n }\n\n var type = unpacker.unpackInt();\n\n if (type != ServerMessageType.RESPONSE)\n throw new IgniteClientException(\"Unexpected message type: \" + type);\n\n Long resId = unpacker.unpackLong();\n\n int status = unpacker.unpackInt();\n\n ClientRequestFuture pendingReq = pendingReqs.remove(resId);\n\n if (pendingReq == null)\n throw new IgniteClientException(String.format(\"Unexpected response ID [%s]\", resId));\n\n if (status == 0) {\n pendingReq.complete(unpacker);\n } else {\n var errMsg = unpacker.unpackString();\n var err = new IgniteClientException(errMsg, status);\n pendingReq.completeExceptionally(err);\n }\n }",
"private void ackRead() throws SIMException\n\t\t{\n\t\t\tfor (;;)\n\t\t\t{\n\t\t\t\t// Read a byte from memory\n\t\t\t\tif ((mode & MODE_TRANSFER_MASK) == MODE_TRANSFER_READ)\n\t\t\t\t{\n\t\t\t\t\tint v = transferFromMemory(this,base.getValue());\n\t\t\t\t\trequestRead.setDmaValue(v);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Increment / decrement address if requested\n\t\t\t\tif (hold == false)\n\t\t\t\t{\n\t\t\t\t\tif ((mode & MODE_DECREMENT) != 0)\n\t\t\t\t\t\tbase.decrement();\n\t\t\t\t\telse\n\t\t\t\t\t\tbase.increment();\n\n\t\t\t\t}\n\n\t\t\t\tif (isTerminate(requestRead))\n\t\t\t\t{\n\t\t\t\t\tterminateDma();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// In single transfer wait another dreq\n\t\t\t\tif ((mode & MODE_DMA_MASK) == MODE_DMA_SINGLE)\n\t\t\t\t{\n\t\t\t\t\tif (requestRead.getDmaDREQ() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\trequest = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}",
"ServiceProblemAckResponse ackServiceProblem(ServiceProblemAckRequest serviceProblemAckRequest);",
"public void handleAcknowledge( Acknowledge ack )\n {\n TTL_CIL_Message msg = null;\n //\tTTL_CIL_Message msg = translator.translate( ack );\n\n try\n {\n cil.sendMessage( msg );\n }\n catch( IOException ioe )\n {\n\n }\n return;\n }",
"void acked(boolean timedOutMessage);",
"@Override\n\tpublic void sendResponse() {\n\t\t\n\t}",
"private void m10420a(AppEntitySignal appEntitySignal) {\n int signalType = appEntitySignal.getSignalType();\n if (signalType != 666) {\n switch (signalType) {\n case 662:\n p140me.bridgefy.entities.Message b = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b != null) {\n b.setStatus(4);\n this.f9294c.mo28337a(b);\n m10417a(b);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n case 663:\n p140me.bridgefy.entities.Message b2 = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b2 != null) {\n b2.setStatus(3);\n this.f9294c.mo28337a(b2);\n m10417a(b2);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n default:\n return;\n }\n } else {\n Iterator it = ((ArrayList) this.f9294c.mo28332a(appEntitySignal.getMessageId().split(\",\"))).iterator();\n while (it.hasNext()) {\n MessageDTO messageDTO = (MessageDTO) it.next();\n messageDTO.setStatus(5);\n this.f9294c.mo28338a(messageDTO);\n m10417a(new p140me.bridgefy.entities.Message(messageDTO));\n }\n }\n }",
"private native int cmdXfer0(byte[] request, byte[] response);",
"private void sendWithoutResend(Packet packet) {\n SimulationLogger.increaseStatisticCounter(\"TCP_ACK_PACKETS_SENT\");\n transportLayer.send(packet);\n }",
"public boolean getAck() {\n return ack_;\n }",
"public void doPack() {\n this._sendData = new byte[2];\n this._sendData[0] = 1;\n this._sendData[1] = (byte) (this.iOIndex & 15);\n }",
"protected void sendACKArray(final int[] ackarray) {\n final ACKMessage ackMessage = new ACKMessage(ackarray, receivedSeq);\n try {\n action.sendPacket(ackMessage.toBytes());\n } catch (IOException | InterruptedException ignored) {\n }\n }",
"private Datagram makeACK(Datagram datagram) {\n Datagram dataToSend = new Datagram();\n dataToSend.setSrcaddr(datagram.getDstaddr());\n dataToSend.setSrcport(datagram.getDstport());\n dataToSend.setDstaddr(datagram.getSrcaddr());\n dataToSend.setDstport(datagram.getSrcport());\n PayLoad data = new PayLoad();\n data.setACK(true);\n dataToSend.setData(data);\n\n // Calculate checksum for the data to send to client.\n short checkSum = CheckSumService.generateCheckSum(dataToSend);\n dataToSend.setChecksum(checkSum);\n\n return dataToSend;\n }",
"public void doPack() {\n this._sendData = new byte[1];\n this._sendData[0] = 1;\n }",
"@Override\n public void completed(Integer result, AsynchronousSocketChannel channel ) {\n\n //ipaddress\n String ipAdr = \"\";\n try{\n\n //Print IPAdress\n ipAdr = channel.getRemoteAddress().toString();\n System.out.println(ipAdr);\n }catch(IOException e) {\n e.printStackTrace();\n }\n\n //if client is close ,return\n buf.flip();\n if (buf.limit() == 0) return;\n\n //Print Message\n String msg = getString(buf);\n\n //time\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss.SSS\");\n sdf.setTimeZone(TimeZone.getTimeZone(\"Asia/Taipei\"));\n System.out.println(sdf.format(new Date()) + \" \" + buf.limit() + \" client: \"+ ipAdr + \" \" + msg);\n\n //\n order ord = null;\n try{\n ord = ParseOrder(sdf.format(new Date()), msg, ipAdr);\n }catch(Exception ex){\n startRead( channel );\n return;\n }\n //2021/05/23 15:55:14.763,TXF,B,10000.0,1,127.0.0.1\n //2021/05/23 15:55:14.763,TXF,S,10000.0,1,127.0.0.1\n\n if (ord.BS.equals(\"B\")) {\n limit(ord, bid);\n }\n if (ord.BS.equals(\"S\")) {\n limit(ord, ask);\n }\n if (trade(bid, ask, match) == true){\n startWrite(clientChannel, \"Mat:\" + match.get(match.size()-1).sysTime + \",\" + match.get(match.size()-1).stockNo+\",\"+\n match.get(match.size()-1).BS+\",\"+match.get(match.size()-1).qty+\",\"+match.get(match.size()-1).price+\"\\n\");\n }\n\n //send to all \n startWrite(clientChannel, \"Ord:\" + getAllOrder(bid, ask)+\"\\n\");\n \n //bid size and ask size\n System.out.println(\"Blist:\" + bid.size() + \" Alist:\" + ask.size());\n\n // echo the message\n//------------------> //startWrite( channel, buf );\n \n //start to read next message again\n startRead( channel );\n }",
"CompletableFuture<Void> sendPushAck(HttpPushAck pushAck, int streamId);",
"@Override\r\n\tpublic void quack() {\n\t\tsuper.gobble();\r\n\t}",
"private boolean waitForAcknowledgement(InputStream input) throws IOException {\r\n byte[] ack = new byte[1];\r\n int result = input.read(ack);\r\n return result == 1;\r\n }",
"public void receivedOkayMessage();",
"public boolean getAck() {\n return ack_;\n }",
"private void maybeOnSucceededOnExecutor() {\n synchronized (mNativeStreamLock) {\n if (isDoneLocked()) {\n return;\n }\n if (!(mWriteState == State.WRITING_DONE && mReadState == State.READING_DONE)) {\n return;\n }\n mReadState = mWriteState = State.SUCCESS;\n // Destroy native stream first, so UrlRequestContext could be shut\n // down from the listener.\n destroyNativeStreamLocked(false);\n }\n try {\n mCallback.onSucceeded(CronetBidirectionalStream.this, mResponseInfo);\n } catch (Exception e) {\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception in onSucceeded method\", e);\n }\n mInflightDoneCallbackCount.decrement();\n }",
"@Override\n\tpublic void sendResponse() {\n\n\t}",
"void send();",
"protected SendSuccessOrFailure() { \n addSender(SUCCESS, new SendSuccess());\n addSender(FAILURE, new SendFailure());\n \n buildFSM();\n }",
"@Override\n public void onCompleted() {\n System.out.println(\"Server has completed sending us response\");\n // on completed will be called right after onNext\n // Whenever server is done sending data latch is going down by 1\n latch.countDown();\n }",
"public int AckReceivedFor(){//For a group call, should take an input ID, should be UPDATED\n return this.packet_ack;\n }",
"@Override\n \t\t\t\tpublic void operationComplete(ChannelFuture future) throws Exception {\n \t\t\t\t\tif (future.isSuccess()) {\n \t\t\t\t\t\tdetermineNextChannelAction(channel, currentSequenceNumber + 1, follow);\n \t\t\t\t\t}\n \t\t\t\t}",
"public synchronized void sendOk() {\r\n\t\tbeginMessage();\r\n\t\tsend(ServerConst.ANS + ServerConst.ANS_YES);\r\n\t\tendMessage();\r\n\t}",
"public void sendDone()\n\t{\n\t\tmSendBusy = false;\n\t\tStatistics.numPacketsSent++;\n\t\tmWriteHandler.call(mHandlerArg);\n\t}",
"public SendAck(int id_message){\r\n\t\tsuper();\r\n\t\tthis.id_message = id_message ;\r\n\t}",
"private String requesttosend() throws IOException {\n\t\tsender.sendMsg(Constants.REQSEND);\r\n\t\t//等待接收的返回状态\r\n\t\treturn sender.getMsg();\r\n\t}",
"public boolean sendAcknowledgement(XMPPBean bean) {\n//\t\tSystem.out.println(\"Player.sendAcknowledgment() \" + bean.getNamespace());\n\t\tbean.setFrom(fromJID);\n\t\tbean.setTo(jid);\n\t\tbean.setType(XMPPBean.TYPE_RESULT);\n\t\tconnection.sendPacket(new BeanIQAdapter(bean));\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic void asyncSendSuccess(long id) throws ConnectorException {\n\t\t\t\n\t\t}",
"public boolean push() {\n\t\tTransaction[] transactions = null;\n\t\tACKThread ack = null;\n\t\ttry {\n\t\t\tbyte[] buffer = \"PUSH\".getBytes();\n\t\t\toos.writeObject(buffer);\n\t\t\t// System.out.println(\"PUSH packet sent!!!\");\n\t\t\tbuffer = (byte[]) ois.readObject();\n\t\t\tBundle b = new Bundle();\n\t\t\tb.parse(buffer);\n\t\t\tif (b.bundleType == b.RETRANS) {\n\t\t\t\tFile f = new File(storagePath + \"/push\");\n\t\t\t\tif (!f.exists()) {\n\t\t\t\t\tb = new Bundle();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = -1;\n\t\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = -1;\n\t\t\t\t\tb.bundleSize = 0;\n\t\t\t\t\tb.data = null;\n\t\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\t\toos.flush();\n\t\t\t\t} else {\n\t\t\t\t\tString[] info = (new String(b.data)).split(\"\\n\");\n\t\t\t\t\tint tid = Integer.parseInt(info[0]);\n\t\t\t\t\tint bno = Integer.parseInt(info[1]);\n\t\t\t\t\tObjectInputStream fin = new ObjectInputStream(\n\t\t\t\t\t\t\tnew FileInputStream(f));\n\t\t\t\t\tTransaction[] tt = (Transaction[]) fin.readObject();\n\t\t\t\t\tfin.close();\n\t\t\t\t\tfor (int i = 0; i < (info.length - 2); i++) {\n\t\t\t\t\t\tdh.setSynced(Long.parseLong(info[i + 2]), tt[i].records);\n\t\t\t\t\t}\n\t\t\t\t\tTransaction[] t = new Transaction[1];\n\t\t\t\t\tt[0] = tt[tid];\n\t\t\t\t\tif (t[0].bundles == null)\n\t\t\t\t\t\tt[0].organizeBundles();\n\t\t\t\t\tboolean result = f.delete();\n\t\t\t\t\t// System.out.println(\"Delete event : \" + result);\n\t\t\t\t\tif (!(t[0].noOfBundles == bno)) {\n\t\t\t\t\t\tack = new ACKThread(dh, t, ois, bno);\n\t\t\t\t\t\tack.start();\n\t\t\t\t\t\tfor (int bi = bno; bi < t[0].noOfBundles; bi++) {\n\t\t\t\t\t\t\tbyte[] bundle = t[0].bundles[bi].getBytes();\n\t\t\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\t\t\toos.flush();\n\t\t\t\t\t\t\t// System.out\n\t\t\t\t\t\t\t// .println(\"Sent bundle -> Transaction id : \"\n\t\t\t\t\t\t\t// + tid + \" Bundle No. : \" + bi);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tack.join();\n\t\t\t\t\t}\n\t\t\t\t\tb = new Bundle();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = -1;\n\t\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = -1;\n\t\t\t\t\tb.bundleSize = 0;\n\t\t\t\t\tb.data = null;\n\t\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\t}\n\t\t\t\treturn push();\n\t\t\t}\n\t\t\tif (b.bundleType == b.START) {\n\t\t\t\tList<String[]> list = dh.selectNewRecords();\n\t\t\t\tif (list != null) {\n\t\t\t\t\tint l = list.size();\n\t\t\t\t\tRecord[] records = new Record[l];\n\t\t\t\t\tint n = 0;\n\t\t\t\t\tString gid = \"\";\n\t\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\t\trecords[i] = new Record();\n\t\t\t\t\t\trecords[i].groupid = list.get(i)[0];\n\t\t\t\t\t\trecords[i].key = list.get(i)[1];\n\t\t\t\t\t\trecords[i].value = list.get(i)[2];\n\t\t\t\t\t\trecords[i].user = list.get(i)[3];\n\t\t\t\t\t\trecords[i].datatype = list.get(i)[4];\n\t\t\t\t\t\trecords[i].timestamp = Long.parseLong(list.get(i)[5]);\n\t\t\t\t\t\trecords[i].synced = \"N\";\n\t\t\t\t\t\tif (!(gid.equals(records[i].groupid))) {\n\t\t\t\t\t\t\tn++;\n\t\t\t\t\t\t\tgid = records[i].groupid;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// System.out.println(\"NO OF TRANSACTIONS:\" + n);\n\t\t\t\t\ttransactions = new Transaction[n];\n\t\t\t\t\tint t = 0, r = 0;\n\t\t\t\t\ttransactions[t] = new Transaction();\n\t\t\t\t\ttransactions[t].transactionId = t;\n\t\t\t\t\ttransactions[t].addRecord(records[r]);\n\t\t\t\t\tr++;\n\t\t\t\t\twhile (r < records.length) {\n\t\t\t\t\t\twhile (r < records.length\n\t\t\t\t\t\t\t\t&& records[r].groupid\n\t\t\t\t\t\t\t\t\t\t.equals(records[r - 1].groupid)) {\n\t\t\t\t\t\t\ttransactions[t].addRecord(records[r]);\n\t\t\t\t\t\t\t// System.out.println(records[r].key);\n\t\t\t\t\t\t\tr++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// System.out.println(\"NO OF RECORDS :\" +\n\t\t\t\t\t\t// records.length);\n\t\t\t\t\t\t// System.out.println(\"R VALUE :\" + r);\n\t\t\t\t\t\tif (r < records.length) {\n\t\t\t\t\t\t\tt++;\n\t\t\t\t\t\t\ttransactions[t] = new Transaction();\n\t\t\t\t\t\t\ttransactions[t].transactionId = t;\n\t\t\t\t\t\t\ttransactions[t].addRecord(records[r]);\n\t\t\t\t\t\t\tr++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tack = new ACKThread(dh, transactions, ois, 0);\n\t\t\t\t\tack.start();\n\t\t\t\t\tfor (t = 0; t < transactions.length; t++) {\n\t\t\t\t\t\ttransactions[t].organizeBundles();\n\t\t\t\t\t\tfor (int bi = 0; bi < transactions[t].noOfBundles; bi++) {\n\t\t\t\t\t\t\tbyte[] bundle = transactions[t].bundles[bi]\n\t\t\t\t\t\t\t\t\t.getBytes();\n\t\t\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\t\t\toos.flush();\n\t\t\t\t\t\t\t// System.out\n\t\t\t\t\t\t\t// .println(\"Sent bundle -> Transaction id : \"\n\t\t\t\t\t\t\t// + t + \" Bundle No. : \" + bi);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tack.join();\n\t\t\t\t}\n\t\t\t\tb = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\ttransactions = null;\n\t\t\t\tack = null;\n\t\t\t\tsleep(100);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t// System.out.println(\"Caught Outside\");\n\t\t\tif (ack != null) {\n\t\t\t\ttry {\n\t\t\t\t\tack.join();\n\t\t\t\t\tsleep(100);\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private void ackPacket(String _sender, long _sn)\n\t{\n\t\t// ACK packet\n\t\tsynchronized(acks)\n\t\t{\n\t\t\tif(!acks.containsKey(_sender))\n\t\t\t{\n\t\t\t\tacks.put(_sender, new LinkedList<Long>());\n\t\t\t}\n\t\t\tacks.get(_sender).add(_sn);\n\t\t}\n\t}",
"public void send() {\n\t}"
] | [
"0.7387263",
"0.708148",
"0.6994162",
"0.6577781",
"0.65777206",
"0.65656704",
"0.64918125",
"0.6456997",
"0.6450677",
"0.6425541",
"0.6372222",
"0.6358077",
"0.6330004",
"0.62608284",
"0.62575036",
"0.6210646",
"0.6209774",
"0.6205465",
"0.6166017",
"0.60889536",
"0.60814637",
"0.60458714",
"0.6039365",
"0.6035069",
"0.60311717",
"0.60227674",
"0.60100615",
"0.60050124",
"0.5996902",
"0.5979314",
"0.59742296",
"0.5945752",
"0.5926379",
"0.5924271",
"0.5922006",
"0.5870035",
"0.5866978",
"0.5864544",
"0.5842701",
"0.5839963",
"0.5824224",
"0.5819156",
"0.5813989",
"0.5813866",
"0.5807103",
"0.57709736",
"0.5755363",
"0.5745231",
"0.5740608",
"0.5727052",
"0.5721071",
"0.5717087",
"0.5715206",
"0.57150817",
"0.571493",
"0.5713161",
"0.5699107",
"0.568272",
"0.56796616",
"0.5679548",
"0.566824",
"0.56679577",
"0.56411153",
"0.5638537",
"0.56360054",
"0.5633827",
"0.56299275",
"0.5625644",
"0.5623288",
"0.5611911",
"0.5600453",
"0.5590924",
"0.5589261",
"0.55891824",
"0.55823976",
"0.55803174",
"0.55788404",
"0.5571756",
"0.554365",
"0.554133",
"0.55339265",
"0.5526431",
"0.5515264",
"0.5515152",
"0.5512094",
"0.55111444",
"0.55096287",
"0.54982084",
"0.5496057",
"0.5491571",
"0.54877305",
"0.5483538",
"0.5483379",
"0.5476846",
"0.5474654",
"0.5470421",
"0.54659",
"0.5462988",
"0.54578274",
"0.54536045"
] | 0.5936633 | 32 |
TODO: Should be asynchronous ??? System.err.println(" ACK ACK OUT " + index + " " + succes); forward the ACK | private final void forwardVirtualConnectACKACK(long index, boolean succes) {
try {
synchronized (out) {
out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_ACK_ACK);
out.writeLong(index);
out.writeBoolean(succes);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
// System.err.println("****** ACK ACK OUT DONE " + index + " " +
// succes);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private final void forwardVirtualMessageAck(long index, int data) {\n try {\n synchronized (out) {\n out.write(MessageForwarderProtocol.MESSAGE_VIRTUAL_ACK);\n out.writeLong(index);\n out.writeInt(data);\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n }",
"public void ack() {\n }",
"public void ack() {\n //disable current awaiting handler\n testFuture.cancel(false);\n //reset number of tryies;\n tryCount = 0;\n //shcedule next ping\n testFuture = mtpTimer.schedule(this, Mtp3.TIMEOUT_T2_SLTM, TimeUnit.SECONDS);\n if (logger.isDebugEnabled()) {\n \tlogger.debug(String.format(\"(%s) Test message acknowledged, Link test passed\", link.name));\n }\n }",
"public void handleAck() {\n\t\tlong start = System.currentTimeMillis();\n\t\tlong end = start;\t\n\t\tint userCnt = users.size();\n\t\tSystem.out.println(\"handling ack in Server\");\n\t\twhile(CommitDecision.size() != 0){\n\t\t\tif(end - start >= 3000) {\n\t\t\t\tfor(String user: CommitDecision.keySet()) {\n\t\t\t\t\tSystem.out.println(\"resend ack to \"+ user+ \" for task \"+ filename);\n\t\t\t\t\tPL.sendMessage(CommitDecision.get(user));\n\t\t\t\t}\n\t\t\t\tstart = end;\n\t\t\t}else {\n\t\t\t\tMsg tmp = notYetAck.poll();\n\t\t\t\tif(tmp != null && CommitDecision.containsKey(tmp.user)) {\n\t\t\t\t\tCommitDecision.remove(tmp.user);\n\t\t\t\t\tSystem.out.println(tmp.user+\" 's ack has been received\");\n\t\t\t\t}\n\t\t\t\tend = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\n\t}",
"public static Packet waitForACK() throws Exception {\r\n System.out.println(\"Waiting for ACK\");\r\n byte[] receiveData = new byte[Packet.maxPacketSize];\r\n DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\r\n serverSocket.receive(receivePacket);\r\n receiveData = receivePacket.getData();\r\n \r\n Packet ACKvector = new Packet(receiveData);\r\n \r\n return ACKvector;\r\n }",
"boolean needsAck() { return true; }",
"@Override\n protected boolean shouldAck() {\n return true;\n }",
"private void sendAck(DOPEPacket packet) throws IOException {\n\t\tDOPEPacket ack = new DOPEPacket(Control.ACK_OP_CODE, packet.getSequenceNumber());\n\t\tsend(ack);\n\t\tSystem.out.println(\"Sent ack:\\n\" + ack);\n\t}",
"private void sendACK(int SeqNr) {\r\n\t\ttry {\r\n\t\t\tif(SeqNr == 0) receivingSocket.send(new DatagramPacket(ACK0,ACK0.length,rcvpkt.getAddress(),rcvpkt.getPort()));\r\n\t\t\tif(SeqNr == 1) receivingSocket.send(new DatagramPacket(ACK1,ACK1.length,rcvpkt.getAddress(),rcvpkt.getPort()));\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"boolean getAck();",
"private final void forwardVirtualConnectACK(long index, int fragment,\n int buffer) {\n try {\n synchronized (out) {\n out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_ACK);\n out.writeLong(index);\n out.writeInt(fragment);\n out.writeInt(buffer);\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n }",
"@Override\r\n\tpublic int ack(int x, int y) {\n\t\treturn 0;\r\n\t}",
"private int reTransmit( int index ) throws IOException{\n\t\tif ( index < 0 || index>=window.size() ){\n\t\t\tSystem.out.println(\"SRSender \"+senderID+\" > \"+\"error(retrnamit): invalid index: \" + index);\n\t\t\treturn 0;\n\t\t}\n\t\telse if ( window.get(index).acked ){\n\t\t\tSystem.out.println(\"SRSender \"+senderID+\" > \"+\"error(retrnamit): invalid index: \" + index+\"already ACKed\");\n\t\t\treturn 0;\n\t\t}\t\n\t\t\n\t\t//retransmit\n\t\tboolean flag = false;\n\t\tflag = transmitPacket( window.get(index).indexS, window.get(index).indexE, window.get(index).seq );\n\t\t//reset counter\n\t\twindow.get(index).counter = 0;\n\t\twindow.get(index).acked = false;\n\t\t\n\t\tif (flag){\n\t\t\treturn 1;\n\t\t}\n\t\tSystem.out.println(\"SRSender \"+senderID+\" > \"+\"error(retrnamit): fail to retransmit packet at:\" + index);\n\t\treturn 0;\n\t}",
"private void sendACKPacket()\n{\n \n //the values are unpacked into bytes and stored in outBufScratch\n //outBufScrIndex is used to load the array, start at position 0\n \n outBufScrIndex = 0;\n \n outBufScratch[outBufScrIndex++] = Notcher.ACK_CMD;\n \n //the byte is placed right here in this method\n outBufScratch[outBufScrIndex++] = lastPacketTypeHandled;\n \n //send header, the data, and checksum\n sendByteArray(outBufScrIndex, outBufScratch);\n \n}",
"private void ackWrite() throws SIMException\n\t\t{\n\t\t\tfor (;;)\n\t\t\t{\n\t\t\t\t// Read a byte from device\n\t\t\t\tif ((mode & MODE_TRANSFER_MASK) == MODE_TRANSFER_WRITE)\n\t\t\t\t{\n\t\t\t\t\tint v =requestWrite.getDmaValue();\n\t\t\t\t\ttransferToMemory(this,base.getValue(),v);\n\t\t\t\t}\n\n\t\t\t\t// Increment / decrement address if requested\n\t\t\t\tif (hold == false)\n\t\t\t\t{\n\t\t\t\t\tif ((mode & MODE_DECREMENT) != 0)\n\t\t\t\t\t\tbase.decrement();\n\t\t\t\t\telse\n\t\t\t\t\t\tbase.increment();\n\n\t\t\t\t}\n\n\t\t\t\tif (isTerminate(requestWrite))\n\t\t\t\t{\n\t\t\t\t\tterminateDma();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// In single transfer wait another dreq\n\t\t\t\tif ((mode & MODE_DMA_MASK) == MODE_DMA_SINGLE)\n\t\t\t\t{\n\t\t\t\t\tif (requestRead.getDmaDREQ() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\trequest = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}",
"protected void reply_ok() throws java.io.IOException {\n byte[] ok = PushCacheProtocol.instance().okPacket();\n _socket.getOutputStream().write(ok, 0, ok.length);\n }",
"boolean hasAck();",
"private short receive_ACK(DatagramSocket socket) throws IOException, InterruptedException {\n\n byte[] ACKbuf = new byte[4]; //ACK packet is 4 bytes long (RFC1350)\n DatagramPacket receivePacket = new DatagramPacket(ACKbuf, ACKbuf.length);\n try {\n\n // Set timeout limit so we don't wait until forever.\n socket.setSoTimeout(WAITING_LIMIT);\n socket.receive(receivePacket);\n\n byte[] ACK = receivePacket.getData();\n ByteBuffer wrap= ByteBuffer.wrap(ACK);\n\n short opcode = wrap.getShort(), //parse opcode\n blockNumber = wrap.getShort(); //parse block number\n\n if(opcode == OP_ACK) {\n return blockNumber;\n }\n else if (opcode == OP_ERR)\n {\n throw new InterruptedException(\"ERROR-MESSAGE RECEIVED FROM CLIENT, CLOSING CONNECTION.\");\n }\n else\n {\n throw new InvalidDataException(\"RECEIVED PACKET NOT OF TYPE ACK\");\n }\n\n }\n catch (SocketTimeoutException e) {\n throw new SocketTimeoutException(\"NO ACK RECEIVED WITHIN REASONABLE TIME\");\n }\n catch (IOException e) {\n throw new IOException(\"CONNECTION PROBLEM\");\n }\n\n }",
"private void handleAcknowledgment(FullExtTcpPacket packet) {\n\n // Invariant: receiver can *only* receive a duplicate third handshake acknowledgment\n long ack = packet.getAcknowledgementNumber();\n if (this.isReceiver()) {\n assert(ack == sendNextNumber && sendNextNumber == sendUnackNumber && packet.getDataSizeByte() == 0 && !packet.isSYN());\n return;\n }\n\n // Flowlet recording\n if (packet.getEchoFlowletId() < currentFlowlet) {\n SimulationLogger.increaseStatisticCounter(\"TCP_FLOWLET_OUT_OF_ORDER\");\n } else {\n currentFlowlet = packet.getEchoFlowletId();\n tcpLogger.logMaxFlowlet(currentFlowlet);\n }\n\n // If all flow is confirmed, we do not handle any more acknowledgments as sender\n if (isAllFlowConfirmed()) {\n return;\n }\n\n // Log current congestion window\n tcpLogger.logCongestionWindow(this.congestionWindow);\n\n // Round-trip time estimation; follows RFC 6298\n double RAcc = (Simulator.getCurrentTime() - packet.getEchoDepartureTime());\n if (firstRttMeasurement) {\n smoothRoundTripTime = RAcc;\n roundTripTimeVariation = smoothRoundTripTime / 2;\n firstRttMeasurement = false;\n } else {\n roundTripTimeVariation = 0.75 * roundTripTimeVariation + 0.25 * Math.abs(smoothRoundTripTime - RAcc);\n smoothRoundTripTime = 0.875 * smoothRoundTripTime + 0.125 * RAcc;\n }\n roundTripTimeout = (long) Math.max(MINIMUM_ROUND_TRIP_TIMEOUT, (2 * smoothRoundTripTime + 4 * roundTripTimeVariation));\n\n int newPacketsAcked = 0;\n\n // FLOW ACKNOWLEDGMENT: SELECTIVE ACKNOWLEDGMENT RANGES\n Set<Long> outstandingSegmentSeqs = new HashSet<>(sentOutUnacknowledgedSegStartSeqNumbers);\n for (Long segSeq : outstandingSegmentSeqs) {\n long size = getFlowSizeByte(segSeq);\n long segAck = segSeq + size;\n\n // Check if an outstanding segment falls within the selective acknowledgment ranges\n for (AckRange r : packet.getSelectiveAck()) {\n if (r.isWithin(segSeq, segAck)) {\n confirmSegment(segSeq);\n newPacketsAcked++;\n }\n }\n\n }\n\n // FLOW ACKNOWLEDGMENT: CUMULATIVE ACKNOWLEDGMENT\n outstandingSegmentSeqs = new HashSet<>(sentOutUnacknowledgedSegStartSeqNumbers); // Set<Long>\n for (Long segSeq : outstandingSegmentSeqs) {\n long size = getFlowSizeByte(segSeq);\n long segAck = segSeq + size;\n if (segAck <= ack) {\n confirmSegment(segSeq);\n newPacketsAcked++;\n }\n }\n\n // MOVE WINDOW AS FAR AS POSSIBLE\n // Continue on with the other packets that have also have been\n // received already\n long acknowledgedBytes = 0;\n while (acknowledgedSegStartSeqNumbers.contains(sendUnackNumber)) {\n acknowledgedSegStartSeqNumbers.remove(sendUnackNumber);\n\n // Retrieve size of the already out-of-order (selectively) acknowledged packet\n long size = getFlowSizeByte(sendUnackNumber);\n\n // A packet's data is thus acknowledged\n this.confirmFlow(size);\n\n // Consume the window further\n sendUnackNumber += size;\n acknowledgedBytes += size;\n\n }\n\n // The window that we want to send can't start at already acknowledged numbers\n sendNextNumber = Math.max(sendNextNumber, sendUnackNumber);\n\n // Handle the action if it is marked with ECE\n if (packet.isECE()) {\n handleECEMarkedPacket();\n }\n\n // Increment window for every packet acknowledged by this acknowledgement\n for (int i = 0; i < newPacketsAcked; i++) {\n phaseIncrementCongestionWindow();\n }\n\n // Update alpha\n updateAlpha(packet, acknowledgedBytes);\n\n // Send out as much as possible\n sendPendingData();\n\n // Log current congestion window\n tcpLogger.logCongestionWindow(this.congestionWindow);\n\n // Flow is finished if nothing is sent and everything\n // has been acknowledged\n if (sendUnackNumber == sendNextNumber) {\n assert(isAllFlowConfirmed());\n assert(sentOutUnacknowledgedSegStartSeqNumbers == null || sentOutUnacknowledgedSegStartSeqNumbers.isEmpty());\n assert(acknowledgedSegStartSeqNumbers == null || acknowledgedSegStartSeqNumbers.isEmpty());\n assert(seqNumbToResendEventMap == null || seqNumbToResendEventMap.isEmpty());\n this.sentOutUnacknowledgedSegStartSeqNumbers = null;\n this.acknowledgedSegStartSeqNumbers = null;\n this.seqNumbToResendEventMap = null;\n this.selectiveAckSet = null;\n }\n\n }",
"private void sendAcknoledmentOfReceipt() {\n\t\ttry {\n\t\t\tthis.receiver.sendLetter(new AcknowledgmentOfReceipt(this.receiver, this.sender, this.getDescription()));\n\t\t} catch (NoSuchMoneyException e) {}\n\t}",
"private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }",
"public boolean ack() {\n return ack;\n }",
"private void sendAck(char seqNum, byte advertisedWindow) throws IOException {\n\t\tDOPEPacket ack = new DOPEPacket(Control.ACK_OP_CODE, seqNum, advertisedWindow);\n\t\tsend(ack);\n\t\tSystem.out.println(\"Sent ack:\\n\" + ack);\n\t}",
"private void sendPendingData() {\n assert(sendNextNumber >= sendUnackNumber);\n\n // Calculate congestion window difference\n long lastUnackNumber = sendUnackNumber + (long) Math.min(congestionWindow, MAX_WINDOW_SIZE);\n long difference = lastUnackNumber - sendNextNumber; // Available window\n\n // Send packets until either the congestion window is full\n // or there is no longer any flow to send\n long amountToSendByte = getFlowSizeByte(sendNextNumber);\n while (difference >= amountToSendByte && amountToSendByte > 0) {\n\n // If it has not yet been confirmed,actually send out the packet\n if (!acknowledgedSegStartSeqNumbers.contains(sendNextNumber)) {\n sendOutDataPacket(sendNextNumber, amountToSendByte);\n\n // If it has already been confirmed by selective acknowledgments, just move along\n } else {\n sendNextNumber += amountToSendByte;\n }\n\n // Determine next amount to send\n difference -= amountToSendByte;\n amountToSendByte = getFlowSizeByte(sendNextNumber);\n\n }\n\n }",
"private void receiveNack(Evt e) {\n\t\tif (!nackReceived && e.getMessage()!= currentlyOptimisticallyTransmitted) {\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t//\tthrow new IllegalStateException(\"A nack corresponding to a message that isn't the one in the buffer has been received. This means that something is wrong (at time \" + e.getTimeNS() + \")\");\r\n\t\t}\r\n\t\t\r\n\t\tif (currentlyOptimisticallyTransmitted == null)\r\n\t\t\treturn;\r\n\r\n\t\tif (nackReceived == false) {\r\n\t\t\tif (lwSimExperiment.isWithTimeLine())\r\n\t\t\t\ttimeline.addJobPhase(lastPacketStart, e.getTimeNS(), currentlyOptimisticallyTransmitted.origin + \"->\" + currentlyOptimisticallyTransmitted.dest + \"\\n\" + currentlyOptimisticallyTransmitted.index + \":NACK\", Color.RED);\t\t\r\n\t\t\t// immediately resend\t\t\t\r\n\t\t\tnackReceived = true;\r\n\t\t\t// correct transmission time in the case of NACK Mode\r\n\t\t\tif (!this.ACKMode)\r\n\t\t\t\tlwSimExperiment.reportTransTime(index, e.getTimeNS() - lastPacketStart - packetDuration, currentlyOptimisticallyTransmitted);\r\n\t\t\t\r\n\t\t\tSpinetMessage dupl = currentlyOptimisticallyTransmitted.getCopy();\r\n\t\t\tgetQueue(dupl.dest).remove(currentlyOptimisticallyTransmitted);\r\n\t\t\tgetQueue(dupl.dest).addFirst(dupl);\r\n\t\t\tmainQueue.addFirst(dupl);\r\n\t\t\tdefineSpinetMessage(dupl);\r\n\t\t\tlwSimExperiment.packetRetransmitted(dupl);\r\n\t\t\tcurrentlyOptimisticallyTransmitted = null;\r\n\t\t}\t\t\r\n\t}",
"private void sendAcknowledgePacket(KarelPacket ackKarelPacket) throws IOException {\n if (ackKarelPacket != null) {\n DatagramPacket packet;// Else, if we should send ack packet, send it\n packet = ackKarelPacket.createDatagramPacket(address, port);\n socket.send(packet);\n if (Robot.verbose) {\n System.out.println(\"SEND(ack): \" + ackKarelPacket.toString());\n }\n }\n }",
"protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }",
"boolean getLockstepAck();",
"protected int handleAck(Msg msg)\n {\n System.out.println(\"Received AckMsg for stream \" + msg.streamId());\n MsgKey key = msg.msgKey();\n\n //print out item name from key if it has it\n if (key != null && key.checkHasName())\n {\n System.out.println(key.name() + \"\\nDOMAIN: \" +\n DomainTypes.toString(msg.domainType()));\n }\n\n AckMsg ackMsg = (AckMsg)msg;\n System.out.println(\"\\tackId=\" + ackMsg.ackId() + (ackMsg.checkHasSeqNum() ? \"\\tseqNum=\" + ackMsg.seqNum() : \"\") +\n (ackMsg.checkHasNakCode() ? \"\\tnakCode=\" + ackMsg.nakCode() : \"\") +\n (ackMsg.checkHasText() ? \"\\ttext=\" + ackMsg.text().toString() : \"\"));\n return CodecReturnCodes.SUCCESS;\n }",
"void onAckReceived(int source);",
"public void sendAck(DatagramPacket p, long timeStamp,int flag, boolean lastPacket) throws IOException{\r\n\t\tnumPackets++;\r\n\t\tclientIp = p.getAddress();\r\n\t\tclientPort = p.getPort();\r\n\r\n\t\t//Create a message buffer of MTU size\r\n\t\tbyte[] data = new byte[20];\r\n\t\tByteBuffer bb = ByteBuffer.wrap(data);\r\n\r\n\t\tbb.putInt(0); //Sequence number\r\n\t\tif(lastPacket){\r\n\t\t\tbb.putInt(lastByteRead + 1); //this is the ACK number\r\n\t\t}\r\n\t\telse{\r\n\t\t\tbb.putInt(lastByteRead); //this is the ACK number\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\tbb.putLong(timeStamp); //put in the time stamp, to calculate RTT\r\n\r\n\t\t// send a SYN + ACK segment\r\n\t\tString mask = null;\r\n\r\n\t\t// ACK\r\n\t\tif(flag == 2){\r\n\t\t\tmask = \"0000000000000000000000000000010\";\r\n\t\t}\r\n\t\t// SYN + ACK\r\n\t\telse if(flag == 3 ) {\r\n\t\t\tmask = \"0000000000000000000000000001010\";\r\n\t\t}\r\n\t\t// Fin\r\n\t\telse if(flag == 5) {\r\n\t\t\tmask = \"00000000000000000000000000000100\";\r\n\t\t}\r\n\r\n\t\tint maskValue = new BigInteger(mask, 2).intValue();\r\n\t\tbb.putInt(maskValue);\r\n\r\n\t\tDatagramPacket synAckPacket = new DatagramPacket(data, data.length, clientIp, clientPort);\r\n\t\tin_channel.send(synAckPacket);\r\n\t\t\r\n\r\n\t}",
"messages.Ackinterface.AckInterface getAck();",
"boolean ack( long revision );",
"protected void sendACKArray(final int[] ackarray) {\n final ACKMessage ackMessage = new ACKMessage(ackarray, receivedSeq);\n try {\n action.sendPacket(ackMessage.toBytes());\n } catch (IOException | InterruptedException ignored) {\n }\n }",
"private void sendStatusAcknowledgment(FederationModel registration) throws Exception {\n\t\tif (!registration.sendStatus) {\n\t\t\t// skip status acknowledgment\n\t\t\treturn;\n\t\t}\n\t\tInetAddress addr = InetAddress.getLocalHost();\n\t\tString federationName = gitblit.getSettings().getString(Keys.federation.name, null);\n\t\tif (StringUtils.isEmpty(federationName)) {\n\t\t\tfederationName = addr.getHostName();\n\t\t}\n\t\tFederationUtils.acknowledgeStatus(addr.getHostAddress(), registration);\n\t\tlogger.info(MessageFormat.format(\"Pull status sent to {0}\", registration.url));\n\t}",
"@Override\n\tprotected void sendSuccess(int seq) throws IOException {\n\t\tSR.updateBufferSlotTimerSender(seq, BufferSlotTimer.SENT);\n\t\tSR.output.append(\"(S) - Packet \" + seq + \" SENT \\n\");\n\t\tSR.updateNextSequenceSnd();\n\t\tSR.getFlyingPart(seq).setY(0);\n\t\tSR.getFlyingPart(seq).setAck(false);\n\t\tSR.getFlyingPart(seq).setVisible(true);\n\t\tSR.getBufferSlotTimerSender(seq).startTimerAnimation(new TimerTask() {\n\n\t\t\tint times = 0;\n\t\t\tprivate final int timesMax = (BufferSlotTimer.SEC_DELIVERY * 1000) / BufferSlotTimer.MSEC_ANIM;\n\t\t\tprivate final double distStep = SR.DISTANCE_BETWEEN_BUFFERS / timesMax;\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\n\t\t\t\t++times;\n\t\t\t\tif (times > timesMax) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbyte[] serializedMessage = serialization(new Packet(false, seq));\n\t\t\t\t\t\tmSocket.send(new DatagramPacket(serializedMessage, serializedMessage.length, mAddrReciever,\n\t\t\t\t\t\t\t\tPORT_RECEIVER));\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tSR.getFlyingPart(seq).setVisible(false);\n\t\t\t\t\tSR.repaint();\n\t\t\t\t\tSR.getBufferSlotTimerSender(seq).stopTimerAnimation();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tSR.getFlyingPart(seq).setY((int) (distStep * times));\n\t\t\t\tSR.repaint();\n\t\t\t}\n\t\t});\n\t\tSR.getBufferSlotTimerSender(seq).startTimerTimeout(new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\n\t\t\t\ttry {\n\t\t\t\t\tSR.retransmit();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"Run process failed at packet sender: \" +e);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t\ttry{\n\t\tServerEncoderDecoder encodeco = new ServerEncoderDecoder();\n\t\t\n\t\t\tbyte[] datatoWrite = new byte[2000];\n\t\t\t\tdatatoWrite = encodeco.encodeData(packet);\n\t\t\tserverConnection.getOutput().println(new String(datatoWrite));\n\t\t\tString ack = serverConnection.getInput().readLine();\n\t\t\tif(ack.equals(\"ACK\")){\n\t\t\t\t//System.out.println(\"ACK for request obtained\");\n\t\t\t\tCoordinator.incrementCounter();\n\t\t\t}\n\t\t\n\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"@Override\n public void completed(Integer result, AsynchronousSocketChannel channel ) {\n\n //ipaddress\n String ipAdr = \"\";\n try{\n\n //Print IPAdress\n ipAdr = channel.getRemoteAddress().toString();\n System.out.println(ipAdr);\n }catch(IOException e) {\n e.printStackTrace();\n }\n\n //if client is close ,return\n buf.flip();\n if (buf.limit() == 0) return;\n\n //Print Message\n String msg = getString(buf);\n\n //time\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss.SSS\");\n sdf.setTimeZone(TimeZone.getTimeZone(\"Asia/Taipei\"));\n System.out.println(sdf.format(new Date()) + \" \" + buf.limit() + \" client: \"+ ipAdr + \" \" + msg);\n\n //\n order ord = null;\n try{\n ord = ParseOrder(sdf.format(new Date()), msg, ipAdr);\n }catch(Exception ex){\n startRead( channel );\n return;\n }\n //2021/05/23 15:55:14.763,TXF,B,10000.0,1,127.0.0.1\n //2021/05/23 15:55:14.763,TXF,S,10000.0,1,127.0.0.1\n\n if (ord.BS.equals(\"B\")) {\n limit(ord, bid);\n }\n if (ord.BS.equals(\"S\")) {\n limit(ord, ask);\n }\n if (trade(bid, ask, match) == true){\n startWrite(clientChannel, \"Mat:\" + match.get(match.size()-1).sysTime + \",\" + match.get(match.size()-1).stockNo+\",\"+\n match.get(match.size()-1).BS+\",\"+match.get(match.size()-1).qty+\",\"+match.get(match.size()-1).price+\"\\n\");\n }\n\n //send to all \n startWrite(clientChannel, \"Ord:\" + getAllOrder(bid, ask)+\"\\n\");\n \n //bid size and ask size\n System.out.println(\"Blist:\" + bid.size() + \" Alist:\" + ask.size());\n\n // echo the message\n//------------------> //startWrite( channel, buf );\n \n //start to read next message again\n startRead( channel );\n }",
"protected void pktsAcked(int n, long rtt) {}",
"private void ackit(String queryId){\n ResponseSender sender = responseSenderQueueForQuery.get(queryId).remove();\n sender.send(new Response(RpcType.ACK, Acks.OK));\n }",
"private void DownloadCompleted(ByteBuffer packet) throws RuntimeException, IOException{\n\t\t// (for download completion ack c->s) [header | file_id (4)]\n\t\t// no HEADER\n\t\t\n\t\t// parse the req\n\t\tif (packet.capacity() < 4)\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"file not correctly specified\");\n\t\tint file_id = packet.getInt(0);\n\t\tfor (ServerFile f : totalFiles().keySet()){\n\t\t\tif (f.id() == file_id){\n\t\t\t\tclient.addUpload(f);\n\t\t\t\t// construct response\n\t\t\t\tString send_name = f.name() + '\\0';\n\t\t\t\tbuf = Utility.addHeader(Constants.DOWNLOAD_ACK, send_name.length(), client.getId());\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < send_name.length(); i++){\n\t\t\t\t\tbuf.put(Constants.HEADER_LEN + i, send_name.getBytes()[i]);\n\t\t\t\t}\n\t\t\t\tout.write(buf.array());\n\t\t\t\tout.flush();\n\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\": Correctly processed download ack for \" + file_id);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthrow new RuntimeException(\"file id does not exist\");\n\t}",
"private void sendReceiveRes(){\n\t}",
"public void run() {\n\t\t\tBundle b = null;\n\t\t\tint i = 0, j;\n\t\t\ttry {\n\t\t\t\tfor (i = 0; i < t.length; i++) {\n\t\t\t\t\tString timestamp = \"\";\n\t\t\t\t\twhile (t[i].noOfBundles == 0)\n\t\t\t\t\t\t;\n\t\t\t\t\tfor (j = seq; j < t[i].noOfBundles; j++) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t// System.out.println(\"SEQ ACK : \" +\n\t\t\t\t\t\t\t// t[i].noOfBundles);\n\t\t\t\t\t\t\tbyte[] buffer = (byte[]) ois.readObject();\n\t\t\t\t\t\t\tb = new Bundle();\n\t\t\t\t\t\t\tb.parse(buffer);\n\t\t\t\t\t\t\tif (b.bundleNumber == b.noOfBundles - 1)\n\t\t\t\t\t\t\t\ttimestamp = new String(b.data);\n\t\t\t\t\t\t\t// System.out.println(\"ACK WAITING : \" + j);\n\t\t\t\t\t\t\t// System.out.println(\"ACK RECEIVED : \"\n\t\t\t\t\t\t\t// + b.bundleNumber);\n\t\t\t\t\t\t\t// System.out.println(t[i].transactionId + \" \"\n\t\t\t\t\t\t\t// + t[i].noOfBundles + \" \" + j);\n\t\t\t\t\t\t} while (!b.isAcknowledgement(t[i].transactionId,\n\t\t\t\t\t\t\t\tt[i].noOfBundles, j));\n\t\t\t\t\t}\n\t\t\t\t\t// System.out.println(\"TIMESTAMP RECEIVED IS :\" +\n\t\t\t\t\t// timestamp);\n\t\t\t\t\tlong ts = Long.parseLong(timestamp);\n\t\t\t\t\tdh.setSynced(ts, t[i].records);\n\t\t\t\t\tseq = 0;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tObjectOutputStream fout;\n\t\t\t\ttry {\n\t\t\t\t\tfout = new ObjectOutputStream(new FileOutputStream(\n\t\t\t\t\t\t\tnew File(storagePath + \"/push\")));\n\t\t\t\t\tfout.writeObject(t);\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\t// System.out.println(\"Written broken transaction!!!\");\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\tfout.close();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(\"ACK ENDED\");\n\t\t}",
"public interface Ack {\n\t/**\n\t * Determines whether the response is success\n\t * @return\n\t */\n\tpublic boolean isSuccess();\n\t\n\t/**\n\t * Get the message response\n\t * @return\n\t */\n\tpublic String getMessage();\n\t\n\t/**\n\t * Get player's uuid response\n\t * @return\n\t */\n\tpublic UUID getUuid();\n\t\n\t/**\n\t * Set whether response is success or not\n\t * @param success\n\t */\n\tpublic void setSuccess(boolean success);\n\t\n\t/**\n\t * Set message response\n\t * @param message\n\t */\n\tpublic void setMessage(String message);\n\t\n\t/**\n\t * Set player's uuid response\n\t * @param uuid\n\t */\n\tpublic void setUuid(UUID uuid);\n}",
"protected abstract boolean sendNextRequests();",
"void responseSequenceNumber() {\r\n\t\t\r\n\t}",
"@Override\n\t\tboolean needsAck() {\n\t\t\treturn byteChunks.length > 0; // don't retry empty ack\n\t\t}",
"@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }",
"private void handleDataPacket(TcpPacket packet) {\n\n // Invariants\n\n // For the sender, if the ACK message did not arrive, it will receive\n // another ACK+SYN message, which it will then again confirm.\n if (!this.isReceiver()) {\n assert(packet.isSYN() && packet.isACK());\n sendWithoutResend(\n ((FullExtTcpPacket) createPacket(\n 0, // Data size (byte)\n sendNextNumber, // Sequence number\n (packet.getSequenceNumber() + packet.getDataSizeByte() + (packet.isSYN() ? 1 : 0)), // Ack number\n true, // ACK\n false, // SYN\n packet.getECN() // ECE\n ).setEchoFlowletId(packet.getFlowletId()))\n .setEchoDepartureTime(packet.getDepartureTime())\n );\n return;\n }\n\n // The receiver is always at FIRST_SEQ_NUMBER+1, having sent only the ACK+SYN message\n assert(this.sendUnackNumber == FIRST_SEQ_NUMBER + 1);\n\n // Locally store sequence numbers\n long seqNumber = packet.getSequenceNumber();\n long ackNumber = (packet.getSequenceNumber() + packet.getDataSizeByte() + (packet.isSYN() ? 1 : 0));\n\n // Only advance if it is the packet on the left side of the receiver window\n if (receiveNextNumber == seqNumber) {\n receiveNextNumber = selectiveAckSet.determineReceiveNextNumber(ackNumber);\n\n // If it is not on the left side, we selectively acknowledge it\n } else if (seqNumber > receiveNextNumber) {\n selectiveAckSet.add(seqNumber, ackNumber);\n }\n\n // Send out the acknowledgment\n sendWithoutResend(\n ((FullExtTcpPacket) ((FullExtTcpPacket) (createPacket(\n 0, // Data size (byte)\n sendNextNumber, // Sequence number\n receiveNextNumber, // Ack number\n true, // ACK\n false, // SYN\n packet.getECN() // ECE\n ).setEchoFlowletId(packet.getFlowletId())))\n .setSelectiveAck(selectiveAckSet.createSelectiveAckData()))\n .setEchoDepartureTime(packet.getDepartureTime())\n );\n\n }",
"public void sendCommand(List<ApduCommand> commands, int index, AsyncResultCallback<byte[]> resultCallback, Handler handler) {\n ApduCommand command = commands.get(index);\n TransmitApduLogicalChannelInvocation transmitApduLogicalChannelInvocation = this.mTransmitApdu;\n final ApduCommand apduCommand = command;\n final AsyncResultCallback<byte[]> asyncResultCallback = resultCallback;\n final Handler handler2 = handler;\n final int i = index;\n final List<ApduCommand> list = commands;\n AnonymousClass2 r1 = new AsyncResultCallback<IccIoResult>() {\n public void onResult(IccIoResult response) {\n ApduSender.this.getCompleteResponse(apduCommand.channel, response, null, new AsyncResultCallback<IccIoResult>() {\n public void onResult(IccIoResult fullResponse) {\n ApduSender.logv(\"Full APDU response: \" + fullResponse);\n int status = (fullResponse.sw1 << 8) | fullResponse.sw2;\n if (status != ApduSender.STATUS_NO_ERROR) {\n ApduSender.this.closeAndReturn(apduCommand.channel, null, new ApduException(status), asyncResultCallback, handler2);\n } else if (i == list.size() - 1) {\n ApduSender.this.closeAndReturn(apduCommand.channel, fullResponse.payload, null, asyncResultCallback, handler2);\n } else {\n ApduSender.this.sendCommand(list, i + 1, asyncResultCallback, handler2);\n }\n }\n }, handler2);\n }\n };\n transmitApduLogicalChannelInvocation.invoke(command, r1, handler);\n }",
"private void clientResponse(String msg) {\n JSONObject j = new JSONObject();\n j.put(\"statuscode\", 200);\n j.put(\"sequence\", ++sequence);\n j.put(\"response\", new JSONArray().add(msg));\n output.println(j);\n output.flush();\n }",
"@Override\n\t\t\t\t\t\tpublic void onSuccess(int arg0, Header[] arg1,\n\t\t\t\t\t\t\t\tbyte[] arg2) {\n\t\t\t\t\t\t\tif (arg0 == 200) {\n\t\t\t\t\t\t\t\tString str = new String(arg2);\n\t\t\t\t\t\t\t\tSystem.out.println(\"坐标提交接口返回 ---> \" + str);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public synchronized void sendOk() {\r\n\t\tbeginMessage();\r\n\t\tsend(ServerConst.ANS + ServerConst.ANS_YES);\r\n\t\tendMessage();\r\n\t}",
"private void sendDataReceptionCompleteMessage(SelectionKey key, byte[] data) throws IOException {\n\t\tSocketChannel channel = (SocketChannel)key.channel();\n\t\tbyte[] ackData = new byte[4];\n\t\tackData[0]=00;\n\t\tackData[1]=00;\n\t\tackData[2]=00;\n\t\tackData[3]=data[9]; //bPacketRec[0];\n\n\t\tByteBuffer bSend = ByteBuffer.allocate(ackData.length);\n\t\tbSend.clear();\n\t\tbSend.put(ackData);\n\t\tbSend.flip();\n\t\twhile (bSend.hasRemaining()) {\n\t\t\ttry {\n\t\t\t\tchannel.write(bSend);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new IOException(\"Could not send Data Reception Acknowledgement\");\n\t\t\t}\n\t\t}\n\t}",
"void responseSent( C conn ) ;",
"private short acked(ActualSegment segment) {\n\t\tif(segment == rttSeg) {\n\t\t\tint newRtt = (int) (System.nanoTime()/1000 - rttSegTime);\n\t\t\t// rfc6298\n\t\t\trttvar = (rttvar * 3 + Math.abs(rtt - newRtt) + 3) >>> 2;\n\t\t\tsrtt = (srtt * 7 + newRtt + 7) >>> 3;\n\t\t\trtt = newRtt;\n\t\t\trttSeg = null;\n\t\t}\n\t\tcancel(segment);\n\t\t\n\t\tshort synFin = (short) (segment.controlBits() & (TcpPkt.SYN | TcpPkt.FIN));\n\t\t\n\t\tflags |= ((synFin & TcpPkt.FIN) != 0) ? FIN_ACKED : 0;\n\t\treturn synFin;\n\t}",
"protected void aOutput(Message message)\r\n {\r\n \t//rdt_send(data)\r\n \tcount_original_packets_transmitted_by_A++;\r\n \tSystem.out.println(\"|aOutput| : message received from above.\");\r\n \tmessageCongestionBuffer.add(message);\r\n \tSystem.out.println(\"|aOutput| : messageCongestionBuffer add new message, buffer size now is: \"+Integer.toString(messageCongestionBuffer.size()));\r\n \tif(next_seq_num<window_base+WindowSize)\r\n \t{\r\n \t\t/*\r\n \t\tif(messageCongestionBuffer.size()>0) //something has already been in the buffer\r\n \t\t{\r\n \t\t\tSystem.out.println(\"something has already been in the buffer\");\r\n \t\t\tmessageCongestionBuffer.add(message);\r\n \t\t\tmessage = messageCongestionBuffer.get(0);\r\n \t\t\tmessageCongestionBuffer.remove(0);\r\n \t\t}\r\n \t\t*/\r\n \t\tString data = messageCongestionBuffer.get(0).getData();\r\n \t\tmessageCongestionBuffer.remove(0);\r\n \t\t\r\n \t\t//public Packet(int seq, int ack, int check, String newPayload)\r\n \t\t\r\n \t\tint seq = next_seq_num % LimitSeqNo;\r\n \t\tint ack = ACK_NOT_USED;\r\n \t\tint check = makeCheckSum(seq,ack,data);\r\n \t\tpacketBufferAry[next_seq_num % LimitSeqNo] = new Packet(seq,ack,check,data);\r\n \t\tSystem.out.println(\"|aOutput| : packet with seq number:\"+Integer.toString(next_seq_num)+\" is made\");\r\n \t\ttoLayer3(0,packetBufferAry[next_seq_num % LimitSeqNo]); //udt_send\r\n \t\tSystem.out.println(\"|aOutput| : packet with seq number:\"+Integer.toString(next_seq_num)+\" is sent\");\r\n \t\t\r\n \t\tif(next_seq_num==window_base) \r\n \t\t{\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"|aOutput| : timer is started\");\r\n \t\t}\r\n \t\t\r\n \t\t\r\n \t\tnext_seq_num = (next_seq_num+1) % LimitSeqNo;\t\r\n \t\tSystem.out.println(\"|aOutput| : next_seq_num now becomes: \"+next_seq_num+\".\");\r\n \t\t\r\n \t}\r\n \telse\r\n \t{\r\n \t\tSystem.out.println(\"|aOutput| : windows is full, it is saved in a buffer.\");\r\n \t\tSystem.out.println(\"|aOutput| : messageCongestionBuffer size now is: \"+Integer.toString(messageCongestionBuffer.size()));\r\n\r\n \t}\r\n \t\r\n //\tpublic Packet(int seq, int ack, int check,int[] sackAry)\r\n \t/*\r\n \t\tif(state_sender == STATE_WAIT_FOR_CALL_0_FROM_ABOVE)\r\n \t\t{\r\n \t\t\t\r\n \t\t\tint seq = 0; //seq = 0\r\n \t\t\tint ack = ACK_NOT_USED; //0 for not using\r\n \t\t\tString dataStr = message.getData();\r\n \t\t\tint check;\r\n \t\t\tcheck = makeCheckSum(seq,ack,dataStr); //checksum\r\n \t\t\tPacket p = new Packet(seq,ack,check,message.getData()); //make_pkt\r\n \t\t\t\r\n \t\t\tpacketBuffer = p; //save packets for resend\r\n \t\t\t\r\n \t\t\ttoLayer3(0,p); //udt_send\r\n \t\t\tstate_sender = STATE_WAIT_FOR_ACK_OR_NAK_0;\r\n \t\t\tSystem.out.println(\"aOutput: packet0 successfully send.\");\r\n \t\t\t\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"aOutput: start timer\");\r\n \t\t\t\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t\telse if (state_sender == STATE_WAIT_FOR_CALL_1_FROM_ABOVE)\r\n \t\t{\r\n \t\t\tint seq = 1; //seq = 0\r\n \t\t\tint ack = ACK_NOT_USED; //0 for not using\r\n \t\t\tString dataStr = message.getData();\r\n \t\t\tint check;\r\n \t\t\tcheck = makeCheckSum(seq,ack,dataStr); //checksum\r\n \t\t\tPacket p = new Packet(seq,ack,check,message.getData()); //make_pkt\r\n \t\t\t\r\n \t\t\tpacketBuffer = p; //save packets for resend\r\n \t\t\t\r\n \t\t\ttoLayer3(0,p); //udt_send\r\n \t\t\tstate_sender = STATE_WAIT_FOR_ACK_OR_NAK_1;\r\n \t\t\tSystem.out.println(\"aOutput: packet1 successfully send.\");\t\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"aOutput: start sender timer\");\r\n \t\t}\r\n \t\t*/\r\n }",
"private void processSession()\n\t\tthrows ProtocolException, AtmException\n\t{\n\t\tboolean fDone = false;\n\t\ttry\n\t\t{\n\t\t\twhile(!fDone)\n\t\t\t{\n\t\t\t\t// listen for client to send data\n\t\t\t\tString dataIn = m_reader.readLine();\n\t\t\t\ttrace(\"handling client command \" + dataIn);\n\t\t\t\tif(dataIn.trim().equals(START_XFR))\n\t\t\t\t{\n\t\t\t\t\ttrace(\"starting a file transfer request\");\n\t\t\t\t\tsendOK();\n\t\t\t\t\t//m_writer.println(OK); // send the ack\n\t\t\t\t\t\n\t\t\t\t\t// get the file name\n\t\t\t\t\tdataIn = m_reader.readLine();\n\t\t\t\t\t\n\t\t\t\t\t// create the AtmObject\n//\t\t\t\t\tDocument inDom = XmlUtility.xmlDocumentFromXmlString(dataIn.trim());\n//\t\t\t\t\tAtmObject obj = XmlUtility.xmlToObject(inDom);\n//\t\t\t\t\t\n//\t\t\t\t\tAtmObject response = AtmApplication.getInstance().processAtmObject(obj);\n//\t\t\t\t\t\n//\t\t\t\t\tDocument xmlResponse = XmlUtility.objectToXml(response);\n//\t\t\t\t\tString xmlResponseString = XmlUtility.xmlDocumentToString(xmlResponse);\n//\t\t\t\t\tsendData(xmlResponseString);\n\t\t\t\t\t// process the object\n//\t\t\t\t\tif(dataIn.trim().startsWith(FILE_NAME))\n//\t\t\t\t\t{\n//\t\t\t\t\t\t// get the file name\n//\t\t\t\t\t\tString data = dataIn.trim();\n//\t\t\t\t\t\t//String fileName = data.trim();\t\n////\t\t\t\t\t\tString path = m_destDirectory.getAbsolutePath()\n////\t\t\t\t\t\t\t\t+ \"\\\\\" + fileName;\n////\t\t\t\t\t\ttrace(\"Preparing to copy file: \" + fileName + \n////\t\t\t\t\t\t\t\t\" to \" + path);\n//\t\t\t\t\t\t\n////\t\t\t\t\t\tdestFile = new File(path);\n////\t\t\t\t\t\tFileWriter writer = new FileWriter(destFile);\n////\t\t\t\t\t\tdestWriter = new BufferedWriter(writer);\n////\t\t\t\t\t\t\n//\t\t\t\t\t\ttrace(\"created destination file\");\n//\t\t\t\t\t\tm_writer.println(OK); // send the ack\n//\t\t\t\t\t}\n\t\t\t\t}\n//\t\t\t\telse if(messageIn.trim().startsWith(DATA))\n//\t\t\t\t{\n//\t\t\t\t\ttrace(\"writing data to destination file\");\n//\t\t\t\t\t// don't trim now. We want whitespace if it's there.\n//\t\t\t\t\tString data = messageIn.substring(DATA.length());\n//\t\t\t\t\tdestWriter.write(data);\n//\t\t\t\t\tdestWriter.newLine();\n//\t\t\t\t}\n//\t\t\t\telse if(messageIn.trim().equals(END_FILE))\n//\t\t\t\t{\n//\t\t\t\t\tdestWriter.flush();\n//\t\t\t\t\tdestWriter.close();\n//\t\t\t\t\tm_writer.println(OK); // send the ack\n//\t\t\t\t}\n//\t\t\t\telse if(messageIn.trim().equals(END_SESSION))\n//\t\t\t\t{\n//\t\t\t\t\ttrace(\" - Ending session\");\n//\t\t\t\t\tm_reader.close();\n//\t\t\t\t\tm_writer.println(OK); // send the ack\n//\t\t\t\t\tbreak;\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\ttrace(\"Error copying file\" + ex.getMessage());\n\t\t\tthrow new ProtocolException(\"Error copying file\", ex);\t\t\t\n\t\t}\n\t}",
"@Override\n public void onSuccess(Response response) {\n if (Responses.isServerErrorRange(response)\n || (Responses.isQosStatus(response) && !Responses.isTooManyRequests(response))) {\n OptionalInt next = incrementHostIfNecessary(pin);\n instrumentation.receivedErrorStatus(pin, channel, response, next);\n } else {\n instrumentation.successfulResponse(channel.stableIndex());\n }\n }",
"private void informCoordinator(int coord, int procNo, int elector){\r\nSystem.out.println(\"found\" + elector);\r\nif(procNo>6) {\r\n\tprocNo = procNo - 6;\r\n}\r\n\r\nString token = \"COORDINATOR\" + coord;\r\ntry {\r\n socket = new Socket(\"127.0.0.1\", 8080+procNo);\r\n out = new PrintWriter(socket.getOutputStream());\r\n out.println(token);\r\n out.flush();\r\n out.close();\r\n socket.close();\r\n if(elector!=procNo){\r\n \tinformCoordinator(coord, procNo+1, elector); \r\n } \r\n \r\n}catch(Exception ex) {\r\n\tinformCoordinator(coord, procNo+1, elector); // inform to next next if the next one was unavailable\r\n} \r\n}",
"public void sendAck(int id, int serverId){\n StringBuilder ackMessage = new StringBuilder();\n // \"SERVER_CONNECTION;\"\n ackMessage.append(Symbols.serverMessageHeader);\n ackMessage.append(Symbols.messageDelimiter);\n // \"ACK;\"\n ackMessage.append(Symbols.ackMessageTag);\n ackMessage.append(Symbols.messageDelimiter);\n // \"<Server_Id>;\"\n ackMessage.append(Integer.toString(myServer.myId));\n ackMessage.append(Symbols.messageDelimiter);\n // \"<Time_Stamp>;\"\n ackMessage.append(Integer.toString(myServer.clock.sendAction()));\n ackMessage.append(Symbols.messageDelimiter);\n // \"<ACKed_Process_Id>\"\n ackMessage.append(Integer.toString(id));\n try {\n Socket s = getSocket(myServer.getServerList().get(serverId));\n PrintWriter pOut = new PrintWriter(s.getOutputStream());\n pOut.print(ackMessage.toString());\n pOut.flush();\n s.close();\n } catch (IOException ex) {\n Logger.getLogger(ServerRequestProcessor.class.getName()).log(Level.SEVERE, null, ex);\n }\n send(ackMessage.toString());\n }",
"void ackResult(boolean resultMatch);",
"public void ack(Object arg0) {\n\t\tSystem.out.println(\"WordReader.ack(Object arg0):\"+arg0);\n\t}",
"void receiveAcknowledgement() {\n byte[] receiveBuffer = new byte[2048];\n DatagramPacket receivePacket = new DatagramPacket(receiveBuffer, receiveBuffer.length);\n try {\n recSocket.receive(receivePacket);\n String dataReceived = new String(receivePacket.getData()).trim();\n System.out.println(\"\\n\" + dataReceived);\n\n } catch (IOException e) {\n System.out.println(\"\\nAcknowledgement not received!\");\n }\n }",
"private Packet handleSequenceAcknowledgementAction(Packet request) {\n AcknowledgementData ackData = rc.protocolHandler.getAcknowledgementData(request.getMessage());\n rc.destinationMessageHandler.processAcknowledgements(ackData);\n\n request.transportBackChannel.close();\n return rc.communicator.createNullResponsePacket(request);\n }",
"@Override\n public void onCompleted() {\n System.out.println(\"Server has completed sending us response\");\n // on completed will be called right after onNext\n // Whenever server is done sending data latch is going down by 1\n latch.countDown();\n }",
"private final void forwardVirtualConnectNACK(long index, byte reason) {\n try {\n synchronized (out) {\n out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_NACK);\n out.writeLong(index);\n out.writeByte(reason);\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n }",
"void acked(boolean timedOutMessage);",
"private void sendOutDataPacket(long seq, long amountToSendByte) {\n assert(seq <= sendNextNumber && !acknowledgedSegStartSeqNumbers.contains(seq));\n\n // Log that it is now sent out (could happen again)\n sentOutUnacknowledgedSegStartSeqNumbers.add(seq);\n\n // Update send next number if applicable\n if (seq == sendNextNumber) {\n sendNextNumber += amountToSendByte;\n }\n\n // Update the highest sent out number (used to determine flight size)\n highestSentOutNumber = Math.max(highestSentOutNumber, sendNextNumber);\n\n // Send with wanting a confirmation\n sendWithResend(createPacket(\n amountToSendByte, // Data size (byte)\n seq, // Sequence number\n 0, // Ack number\n false, // ACK\n false, // SYN\n false // ECE\n ));\n\n }",
"private Packet handleAckRequestedAction(Packet request) {\n boolean noStateUpdate = (rc.configuration.getInternalRmFeature() != null);\n\n AcknowledgementData ackData = rc.protocolHandler.getAcknowledgementData(request.getMessage());\n rc.destinationMessageHandler.processAcknowledgements(ackData, noStateUpdate);\n\n return rc.protocolHandler.createEmptyAcknowledgementResponse(rc.destinationMessageHandler.getAcknowledgementData(ackData.getAckReqestedSequenceId(), true, noStateUpdate), request);\n }",
"private void checkResult() {\n if (parent != -1 && (numOfAck == (outgoingLinks.size() - 1))) {\n if (setOfAck.add(this.maxId)) {\n Message message = new Message(this.uid, this.maxId, \"ack\");\n sendTo(message, this.parent);\n }\n if (!termination) {\n marker.addNumOfTerminatedProc();\n termination = true;\n }\n } else if (parent == -1 && (numOfAck == outgoingLinks.size())) {\n System.out.println(this.uid + \" is the leader.\");\n marker.addNumOfTerminatedProc();\n }\n }",
"private boolean receive_DATA_send_ACK(DatagramSocket socket, String requestedFile){\n\n byte[] fileBuf = new byte[512], //temporary storage for the file bytes\n file, //full file bytes\n packet, //packet array\n temp, //temporary array, used for increasing the size of fileBuf\n ACK = new byte[4]; //ACKnowledgement array\n short currentBN = 0, //block number of the last received packet\n incomingBN; //block number of the incoming packet\n int totalBytes = 0; //total amount of bytes read\n\n //send an acknowledgement to establish connection\n\n //set opcode\n ACK[0] = 0;\n ACK[1] = OP_ACK;\n\n //set block number\n ACK[2] = (byte)((currentBN >> 8) & 0xff);\n ACK[3] = (byte)(currentBN & 0xff);\n\n DatagramPacket receivePacket = null,\n ackPacket = new DatagramPacket(ACK, ACK.length, socket.getInetAddress(), socket.getPort());\n\n try {\n\n Path testFilePath = Paths.get(requestedFile).normalize();\n\n // First make user user has provided only a filename without directory structure\n if (Files.exists(testFilePath))\n {\n throw new FileAlreadyExistsException(\"File already exists!\");\n }\n else\n {\n // Try to create a file to see that it's possible to write to path.\n // Will throw Exception if failing, which we catch later\n Files.createFile(testFilePath);\n\n // If we could create the file we should delete it before moving on\n Files.delete(testFilePath);\n\n }\n\n boolean transmissionComplete = false;\n boolean done = false;\n\n // Keep receiving and sending ACKs until we are done or until connection problems\n while (!done && !transmissionComplete)\n {\n try {\n\n boolean correctDataBlock = false;\n int reTransmitCounter = 0;\n\n // Keep going until correct datablock has been received or we run out of retransmission retries\n while (!correctDataBlock && reTransmitCounter <= MAXIMUM_RETRIES)\n {\n try\n {\n socket.send(ackPacket); //send ACK packet\n\n //receive packet\n packet = new byte[516]; //reset the packet array\n receivePacket = new DatagramPacket(packet, packet.length);\n socket.setSoTimeout(WAITING_LIMIT); //set timeout\n socket.receive(receivePacket);\n\n //process received packet\n packet = receivePacket.getData();\n ByteBuffer wrap= ByteBuffer.wrap(packet);\n short opCode = wrap.getShort();\n incomingBN = wrap.getShort();\n\n if (opCode == OP_DAT && incomingBN == currentBN + 1) { //check if the bn is ok and that the packet is not empty\n currentBN = incomingBN;\n\n //copy the contents of the packet into fileBuf\n for (int i = 4; i < receivePacket.getLength(); i++) {\n fileBuf[totalBytes] = packet[i];\n totalBytes++;\n }\n\n //increase the size of filBuf by 512, so next packet data will fit\n temp = new byte[fileBuf.length];\n System.arraycopy(fileBuf, 0, temp, 0, fileBuf.length);\n fileBuf = new byte[totalBytes + 512];\n System.arraycopy(temp, 0, fileBuf, 0, totalBytes);\n\n //set opcode\n ACK[0] = 0;\n ACK[1] = OP_ACK;\n\n //set block number\n ACK[2] = (byte) ((currentBN >> 8) & 0xff);\n ACK[3] = (byte) (currentBN & 0xff);\n\n // Create ACK-packet\n ackPacket = new DatagramPacket(ACK, ACK.length, socket.getInetAddress(), socket.getPort());\n\n correctDataBlock = true;\n }\n else\n {\n // If the packet is an error-message, we stop executing. Other packet-types are simply discarded\n if (opCode == OP_ERR)\n {\n //System.err.println(\"ERROR IN THE MIDDLE OF THE TRANSFER\");\n throw new InterruptedException(\"Client sent an error-packet in the middle of transmission, closing connection.\");\n }\n reTransmitCounter++;\n System.out.println(\"Incorrect Data-block (or wrong packet type) received, resending ACK.\");\n }\n }\n catch (SocketTimeoutException e)\n {\n reTransmitCounter++;\n if(reTransmitCounter <= MAXIMUM_RETRIES)\n {\n System.out.println(\"No new DATA-packet received, resending ACK.\");\n }\n }\n\n }\n\n // If we never got the correct data block, it means we ran out of retries.\n if (!correctDataBlock)\n {\n done = true;\n }\n // Check if received packet was the last one.\n else if (receivePacket.getLength() < 516)\n {\n // No dallying atm\n // Make sure we have enough space left in write-folder before sending final ACK.\n if (!hasEnoughSpace(totalBytes))\n {\n throw new SizeLimitExceededException(\"Not enough disk space for storing file!\");\n }\n\n socket.send(ackPacket); //send ACK packet\n transmissionComplete = true;\n }\n\n }\n catch (IOException e) {\n System.out.println(\"Connection problems, aborting.\");\n return false;\n }\n }\n\n // If we never received all the data from the client, we stop executing.\n if (!transmissionComplete)\n {\n throw new DataFormatException(\"Maximum number of retransmission reached. Aborting.\");\n }\n\n //save file\n FileOutputStream fos;\n\n //get bytes from fileBuf into file array\n file = new byte[totalBytes];\n System.arraycopy(fileBuf,0, file, 0, totalBytes);\n\n fos = new FileOutputStream(requestedFile);\n fos.write(file);\n fos.close();\n\n }\n catch (InterruptedException e)\n {\n // Debug\n System.out.println(e.getMessage());\n return false;\n }\n catch (DataFormatException e)\n {\n // Debug\n System.out.println(e.getMessage());\n send_ERR(socket, ERR_NOT_DEFINED, \"Retransmission limit exceeded, closing connection.\");\n return false;\n }\n catch (SizeLimitExceededException e)\n {\n // Debug\n System.out.println(e.getMessage());\n\n send_ERR(socket, ERR_DISK_FULL);\n return false;\n }\n catch (FileAlreadyExistsException e)\n {\n // Debug\n System.out.println(e.getMessage());\n\n send_ERR(socket, ERR_FILE_ALREADY_EXISTS);\n return false;\n }\n catch (NoSuchFileException e)\n {\n // Debug\n System.out.println(\"User specified an invalid path along with the filename. sending error message\");\n\n send_ERR(socket, ERR_ACCESS_VIOLATION);\n return false;\n }\n catch (IOException e) {\n\n e.printStackTrace();\n\n // Sending \"No such user\"-error, as described in Assignment questions.\n // https://mymoodle.lnu.se/mod/forum/discuss.php?d=917218\n send_ERR(socket, ERR_NO_SUCH_USER);\n return false;\n }\n\n return true;\n }",
"private int handleElectrodeSupplyOnOffCmdPacket()\n{\n \n int dataSize = 1; //one byte\n \n //read remainder of packet from socket and verify against the checksum\n int lStatus = readBlockAndVerify(dataSize, \n Notcher.ELECTRODE_SUPPLY_ON_OFF_CMD);\n\n //on error reading and verifying, return the error code\n if (lStatus == -1){ return(status); }\n \n //only store the values if there was no error -- errors cause return above\n\n outBufScrIndex = 0; //start with byte 0 in array\n \n electrodeSupplyOnOffByte = inBuffer[outBufScrIndex];\n \n sendACKPacket();\n \n return(lStatus);\n \n}",
"private void flushOutbound0() {\n/* 454 */ runPendingTasks();\n/* */ \n/* 456 */ flush();\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 void m10420a(AppEntitySignal appEntitySignal) {\n int signalType = appEntitySignal.getSignalType();\n if (signalType != 666) {\n switch (signalType) {\n case 662:\n p140me.bridgefy.entities.Message b = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b != null) {\n b.setStatus(4);\n this.f9294c.mo28337a(b);\n m10417a(b);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n case 663:\n p140me.bridgefy.entities.Message b2 = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b2 != null) {\n b2.setStatus(3);\n this.f9294c.mo28337a(b2);\n m10417a(b2);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n default:\n return;\n }\n } else {\n Iterator it = ((ArrayList) this.f9294c.mo28332a(appEntitySignal.getMessageId().split(\",\"))).iterator();\n while (it.hasNext()) {\n MessageDTO messageDTO = (MessageDTO) it.next();\n messageDTO.setStatus(5);\n this.f9294c.mo28338a(messageDTO);\n m10417a(new p140me.bridgefy.entities.Message(messageDTO));\n }\n }\n }",
"@Override\n\tpublic void callbackAck(boolean isSuccess, Method method, Object[] objs) {\n\t\tif(isSuccess){\n\t\t\ttry{\n\t\t\t\tTask task = (Task)objs[0];\n\t\t\t\tList<ExternalOrderDetail> externalOrderDetailList = (List<ExternalOrderDetail>) task.getParam(\"externalOrderDetails\");\n\t\t\t\tlog.info(String.format(\"提交自动下单订单号[%s],分配账号:%s:,发送机器IP:%s\", externalOrderDetailList.get(0).getSaleOrderCode(), externalOrderDetailList.get(0).getAccountId(), task.getGroup()));\n\t\t\t\t\n\t\t\t}catch(Exception e){\n\t\t\t\tlog.error(e);\n\t\t\t}\n\t\t}else{\n\t\t\ttry{\n\t\t\t\tTask task = (Task)objs[0];\n\t\t\t\tList<ExternalOrderDetail> externalOrderDetailList = (List<ExternalOrderDetail>) task.getParam(\"externalOrderDetails\");\n\t\t\t\tfor (ExternalOrderDetail r : externalOrderDetailList) {\n\t\t\t\t\texternalOrderDetailDAO.updateStatus(500,r.getId());\n\t }\n\t\t\t\tlog.info(String.format(\"提交自动出错下单订单号[%s],分配账号:%s:,发送机器IP:%s\", externalOrderDetailList.get(0).getSaleOrderCode(), externalOrderDetailList.get(0).getAccountId(), task.getGroup()));\n\t\t\t}catch(Exception e){\n\t\t\t\tlog.error(e);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void start() {\n long originalSendNextNumber = sendNextNumber;\n sendNextNumber += 1L;\n\n // Send the first part of the handshake\n currentState = SYN_SENT;\n sendWithResend(createPacket(\n 0, // Data size (byte)\n originalSendNextNumber, // Seq number\n 0, // Ack number\n false, // ACK\n true, // SYN\n false // ECE\n ));\n\n // System.out.println(\"3-WAY HANDSHAKE: 0. Sender sent SYN.\");\n\n // Preserve space as this field will never be used\n this.selectiveAckSet = null;\n\n }",
"public void doPack() {\n this._sendData = new byte[2];\n this._sendData[0] = 1;\n this._sendData[1] = (byte) (this.iOIndex & 15);\n }",
"void onRequest(int index, int begin, int length)\n {\n if (DEBUG) System.out.println(\"[stdpc] onRequest:\" + index + \",\" + begin + \",\" + length);\n\n// sendQueue.forEach(pm -> System.out.println(\"[stdpc] onRequest -b>\" + System.identityHashCode(pm) +\n// \" \" +pm.type + \" ,\" + pm.index +\",\" + pm.begin + \",\" + pm.length) );\n\n // validate common block parameters\n boolean correct = torrent.validateBlock(index, begin, length);\n if (!correct) {\n // just ignore such requests\n statistics.blocksRequestedIncorrect++;\n return;\n }\n\n // this could be moved to send(), but doesn't really matter\n statistics.blocksSent++;\n\n // track active requests\n StdPeerMessage pm = pmCache.request(index, begin, length);\n peerBlockRequests.add(pm);\n\n // notify torrent to read and enqueue block\n torrent.onRequest(this, index, begin, length);\n\n// sendQueue.forEach(x -> System.out.println(\"[stdpc] onRequest -a<\" + System.identityHashCode(x) +\n// \" \" +x.type + \" ,\" + x.index +\",\" + x.begin + \",\" + x.length) );\n\n }",
"public void addReceived() {\n this.indexExpected++;\n }",
"public boolean sendAcknowledgement(XMPPBean bean) {\n//\t\tSystem.out.println(\"Player.sendAcknowledgment() \" + bean.getNamespace());\n\t\tbean.setFrom(fromJID);\n\t\tbean.setTo(jid);\n\t\tbean.setType(XMPPBean.TYPE_RESULT);\n\t\tconnection.sendPacket(new BeanIQAdapter(bean));\n\t\treturn true;\n\t}",
"@Test\n public void testRegisterAck() throws Exception {\n System.out.println(\"registerAck\");\n\n Sendable s = sendAMessage();\n\n String a = s.getMessageId();\n String comment = \"comment\";\n String ack = \"ack\";\n instance.setEbXmlEventListener(ebXmlEventListener);\n\n // removes the message that's just been added but doesn't delete the file because there isn't one yet\n instance.registerAck(a, comment, ack);\n }",
"public synchronized void acknowledge(int ackNum){\n\t\tIterator<Segment> iter = this.window.iterator();\r\n\t\tSegment s = null;\r\n\t\twhile (iter.hasNext()) {\r\n\t\t s = iter.next();\r\n\r\n\t\t if (s.getSeqNumber() < ackNum){\r\n\t\t iter.remove();\r\n\t\t\t\t//System.out.println(\"Ack \"+ ackNum + \" - Remove \" + s.getSeqNumber() + \" AckNum in window \" + this.windowContainsSegment(ackNum));\r\n\t\t } else {\r\n\t\t \tbreak;\r\n\t\t }\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tthis.tw.updateWatchedSegment(s, Integer.toString(ackNum));\r\n\t\t\tif (s == null){\r\n\t\t\t\tthis.tw.stopRunningThread();\r\n\t\t\t}\r\n\t\t} catch (IndexOutOfBoundsException ex){\r\n\t\t\t//System.out.println(\"Tried updating but error occurred\");\r\n\t\t\t//System.out.println(ex.getMessage());\r\n\t\t}\r\n\t}",
"public int AckReceivedFor(){//For a group call, should take an input ID, should be UPDATED\n return this.packet_ack;\n }",
"@Override\r\n\tpublic void newLineRecieved() {\n\t\tString response = grblPort.readNextLine();\r\n\t\tresponse.trim();\r\n\t\tSystem.out.println(\"Recieve: \" + response);\r\n\t\t//System.out.println(\"HAHAHAH\");\r\n\t\tif (response.contains(\"ok\") && grblPort.ok == false){\t\t\t\r\n\t\t\tgrblPort.ok = true;\t\t\r\n\t\t\tSystem.out.println(\"Got ACK\");\r\n\t\t\tif (!sendLines.isEmpty()){//If there is more stuff in the buffer, keep on sending it.\r\n\t\t\t\tsendLines.remove(0);\r\n\t\t\t\tgrblPort.sendDataLine(sendLines.get(0)); \t\t\r\n\t \t}\r\n\t\t}\r\n\t\tif (response.contains(\"error\")){\r\n\t\t\tSystem.out.println(\"ERROR...ERROR...ERROR...ERROR...ERROR...ERROR...ERROR...ERROR...ERROR\");\r\n\t\t\tgrblPort.sendDataLine(sendLines.get(0)); \r\n\t\t}\r\n\t\tif (response.contains(\"<\")&&response.contains(\">\")){\r\n\t\t\tif (!sendLines.isEmpty()){//If there is more stuff in the buffer, keep on sending it.\r\n\t\t\t//\tgrblPort.sendDataLine(sendLines.remove(0)); \t\t\r\n\t \t}\r\n\t\t\tresponse = response.replaceAll(\"<\", \"\");\r\n\t\t\tresponse = response.replaceAll(\">\", \"\");\r\n\t\t\tString data[] = response.split(\",\");\r\n\t\t\tfor (String string : data) {\r\n\t\t\t\tstring = string.toUpperCase();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"************************************* \"+data[0]);\r\n\t\t\tswitch (data[0].toUpperCase()) {\r\n\t\t\tcase \"IDLE\":\r\n\t\t\t\tmachineState = MachineState.IDLE;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"RUN\":\r\n\t\t\t\tmachineState = MachineState.RUNNING;\r\n\t\t\t\treturn;\r\n\t\t\t\t//break;\r\n\t\t\tcase \"QUEUE\":\r\n\t\t\t\tmachineState = MachineState.QUEUE;\r\n\t\t\t\treturn;\r\n\t\t\tdefault:\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"public void sendDone()\n\t{\n\t\tmSendBusy = false;\n\t\tStatistics.numPacketsSent++;\n\t\tmWriteHandler.call(mHandlerArg);\n\t}",
"protected void forward(IAnnounceEvent event){\r\n \t\ttry {\r\n \t\t\t_wrappedOut.write(event.getSerial());\r\n \t\t\t_output.writeASE(event.toSExp());\r\n \t\t} catch (IOException e) {\r\n \t\t\tSystem.err.println(\"Failed forwarding the message:\\n\"+event.toSExp()+\"\\nbecause: \"+e.getMessage());\r\n \t\t}\r\n \t}",
"public FutureResult sendToServer(String onTheWireFormat) throws IOException;",
"protected void sendAckMessage(WebSocketConnection conn, JSONObject message)\n\t\t\tthrows JSONException {\n\t\tconn.send(new JSONStringer().object()\n\t\t\t.key(\"id\").value(message.getInt(\"id\"))\n\t\t\t.key(\"result\").object().endObject().endObject().toString());\n\t}",
"protected void sendNotificationAcknowledgment(String serialNumber, HttpServletResponse response,\n Notification notification, HttpServletRequest request) throws Exception {\n NotificationAcknowledgment ack = new NotificationAcknowledgment();\n ack.setSerialNumber(serialNumber);\n\n Utils.toXML(ack.toJAXB(), response.getOutputStream());\n\n logger.log(Level.INFO,\n \"Sent response ack:\\n\" + Utils.SEND_AND_RECEIVE_DEBUGGING_STRING,\n new Object[]{200, request.getRemoteAddr(), notification, ack});\n }",
"@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\tk++;\n\t\t\t\t\t\n\t\t\t\t\tif(k>=10) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\teeipClient.ForwardClose();\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\ttimerflag1=false;\n\t\t\t\t\t\tstatus_write=true;\n\t\t\t\t\t\tstate=3;\n\t\t\t\t\t\tk=0;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"@Test\n public void testHL7MessageFlood() throws Exception {\n Socket socket = new Socket(\"localhost\", HL7TestSupport.getPort());\n BufferedOutputStream outputStream = new BufferedOutputStream(new DataOutputStream(socket.getOutputStream()));\n final BufferedInputStream inputStream = new BufferedInputStream(new DataInputStream(socket.getInputStream()));\n int messageCount = 100;\n CountDownLatch latch = new CountDownLatch(messageCount);\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n int response;\n StringBuilder s = new StringBuilder();\n try {\n int i = 0;\n boolean cont = true;\n while (cont && ((response = inputStream.read()) >= 0)) {\n if (response == 28) {\n response = inputStream.read();// read second end byte\n\n if (response == 13) {\n // Responses must arrive in same order\n cont = s.toString().contains(String.format(\"X%dX\", (i++)));\n s.setLength(0);\n latch.countDown();\n }\n } else {\n s.append(((char) (response)));\n }\n } \n } catch (IOException ignored) {\n }\n }\n });\n t.start();\n String in = \"MSH|^~\\\\&|MYSENDER|MYRECEIVER|MYAPPLICATION||200612211200||QRY^A19|X%dX|P|2.4\\r\" + \"QRD|200612211200|R|I|GetPatient|||1^RD|0101701234|DEM||\";\n for (int i = 0; i < messageCount; i++) {\n String msg = String.format(in, i);\n outputStream.write(11);\n outputStream.flush();\n // Some systems send end bytes in a separate frame\n // Thread.sleep(10);\n outputStream.write(msg.getBytes());\n outputStream.flush();\n // Some systems send end bytes in a separate frame\n // Thread.sleep(10);\n outputStream.write(28);\n outputStream.write(13);\n outputStream.flush();\n // Potentially wait after message\n // Thread.sleep(10);\n }\n boolean success = latch.await(20, TimeUnit.SECONDS);\n outputStream.close();\n inputStream.close();\n socket.close();\n assertTrue(success);\n }",
"@Override\n public void run() {\n\n CongestionWindow cw;\n\n // checking if we have the destination in our outgping connections list\n if (tcp.getOutGoingConnections().containsKey(ack.source.getAddress())){\n\n // Get the congestion window details for the given connection\n cw = tcp.getOutGoingConnections().get(ack.getSource().getAddress());\n\n // make sure you are the only one editing the congestion window\n // There can be many ACK handlers working at the same time\n synchronized (cw){\n\n // check no of dupAckCounts\n if(ack.getDupAckCount() == 0){\n\n // if no of dupAck counts are 0 then we may be in slow start mode or just came out of fast recovery mode\n if(cw.getFlowControlStatus().matches(\"fastrecovery\")){\n\n // drop the ssthresh to CWND/2\n cw.setSsthresh(Math.max(2,(int)cw.getCwndSize()/2));\n\n // drop the cwnd to CWND/2\n cw.setCwndSize(cw.getCwndSize()/2);\n\n // update the status to slow start again\n // will change it to congestionAvoidance after wards\n cw.setFlowControlStatus(\"slowstart\");\n\n // get the first packet which has not yet received the ACK\n Packet topPakcet = (Packet)cw.getCwndInPackets().get(0);\n\n // move the window depending on the current ACK id and Top Packet sequence number difference\n cw.moveWindow(ack.getAckID() - topPakcet.getSequenceNumber());\n\n }\n\n // increase cwnd depending on number of ACKS received\n cw.increaseCWNDsize();\n\n // decide what the status should be depending on cwnd size\n // I think this part can be removed :)\n if(cw.getCwndSize() >= cw.getSsthresh() &&\n !cw.getFlowControlStatus().matches(\"fastrecovery\")){\n cw.setFlowControlStatus(\"congestionAvoidance\");\n }else{\n cw.setFlowControlStatus(\"slowstart\");\n }\n\n }else{\n // If dupAck counts are less than 3 and greater than 0 then do nothing\n if(ack.getDupAckCount() < 3){\n // do nothing\n\n }else if(ack.getDupAckCount() == 3){\n // enter fast recovery\n cw.setFlowControlStatus(\"fastrecovery\");\n\n // ssthresh = cwnd / 2\n cw.setSsthresh((int)cw.getCwndSize()/2);\n\n // CWND = CWND+3\n cw.setCwndSize(cw.getCwndSize()/2 + 3);\n\n // retransmit the packet\n cw.retransmitPacket(ack.getAckID());\n\n }else{\n\n // we are already in fast recovery mode and just increase the window size for each dupACK > 3\n cw.increaseCWNDsize();\n }\n }\n\n // Update the ACK status of the Packet with \"sequence ID = ACK ID - 1\"\n cw.updateAckStatus(ack.getAckID() - 1, true);\n\n // slide the window -> remove ACKed packets and add new packets in the available space\n cw.slideWindow();\n\n // update cwnd contents\n cw.updateCongestionWindow();\n\n }\n\n }else{\n // We have recieved ACK from a connection which is not currently in our outgoing connection list\n }\n\n }",
"private boolean waitForAcknowledgement(InputStream input) throws IOException {\r\n byte[] ack = new byte[1];\r\n int result = input.read(ack);\r\n return result == 1;\r\n }",
"private void sendRecognition() throws IOException {\n dataWriter.writeInt(1);\n dataWriter.flush();\n }",
"public void handleAcknowledge( Acknowledge ack )\n {\n TTL_CIL_Message msg = null;\n //\tTTL_CIL_Message msg = translator.translate( ack );\n\n try\n {\n cil.sendMessage( msg );\n }\n catch( IOException ioe )\n {\n\n }\n return;\n }",
"protected void pktDupeAcked(int seqNum) {}",
"private void ackRead() throws SIMException\n\t\t{\n\t\t\tfor (;;)\n\t\t\t{\n\t\t\t\t// Read a byte from memory\n\t\t\t\tif ((mode & MODE_TRANSFER_MASK) == MODE_TRANSFER_READ)\n\t\t\t\t{\n\t\t\t\t\tint v = transferFromMemory(this,base.getValue());\n\t\t\t\t\trequestRead.setDmaValue(v);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Increment / decrement address if requested\n\t\t\t\tif (hold == false)\n\t\t\t\t{\n\t\t\t\t\tif ((mode & MODE_DECREMENT) != 0)\n\t\t\t\t\t\tbase.decrement();\n\t\t\t\t\telse\n\t\t\t\t\t\tbase.increment();\n\n\t\t\t\t}\n\n\t\t\t\tif (isTerminate(requestRead))\n\t\t\t\t{\n\t\t\t\t\tterminateDma();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// In single transfer wait another dreq\n\t\t\t\tif ((mode & MODE_DMA_MASK) == MODE_DMA_SINGLE)\n\t\t\t\t{\n\t\t\t\t\tif (requestRead.getDmaDREQ() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\trequest = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}",
"public boolean getAck() {\n return ack_;\n }"
] | [
"0.6974845",
"0.68124616",
"0.6449212",
"0.64377797",
"0.6356532",
"0.6330882",
"0.63192743",
"0.6271526",
"0.6267275",
"0.62515604",
"0.6126373",
"0.61129004",
"0.6055594",
"0.60553086",
"0.59720725",
"0.596295",
"0.59613115",
"0.59604394",
"0.5839387",
"0.58384174",
"0.58347535",
"0.5822572",
"0.5811657",
"0.5808902",
"0.58079934",
"0.57667273",
"0.57562083",
"0.5728626",
"0.5728222",
"0.5723429",
"0.57164574",
"0.5703451",
"0.5692766",
"0.5682453",
"0.56730515",
"0.5649599",
"0.5648942",
"0.5637666",
"0.56236196",
"0.5623115",
"0.5602904",
"0.559373",
"0.5592278",
"0.559037",
"0.5585226",
"0.55815524",
"0.5575023",
"0.55550796",
"0.5550444",
"0.5537609",
"0.553686",
"0.5529106",
"0.5523279",
"0.5509617",
"0.54965633",
"0.5485121",
"0.5474121",
"0.54728913",
"0.54706866",
"0.54484314",
"0.54366225",
"0.5425148",
"0.5424502",
"0.5415874",
"0.54028904",
"0.5400567",
"0.53719133",
"0.53632253",
"0.535582",
"0.5348691",
"0.53467304",
"0.534155",
"0.5331817",
"0.53292906",
"0.5329001",
"0.5328792",
"0.5326369",
"0.53251255",
"0.53225476",
"0.53096044",
"0.5308035",
"0.5304836",
"0.5302809",
"0.52891386",
"0.5284614",
"0.52833045",
"0.52664036",
"0.5259678",
"0.5256507",
"0.5245248",
"0.5240529",
"0.5240386",
"0.52379185",
"0.5230933",
"0.5202134",
"0.5199549",
"0.5194239",
"0.5185073",
"0.5165373",
"0.5164463"
] | 0.7405807 | 0 |
TODO: Should be asynchronous ??? forward the NACK | private final void forwardVirtualConnectNACK(long index, byte reason) {
try {
synchronized (out) {
out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_NACK);
out.writeLong(index);
out.writeByte(reason);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendReceiveRes(){\n\t}",
"private void receiveNack(Evt e) {\n\t\tif (!nackReceived && e.getMessage()!= currentlyOptimisticallyTransmitted) {\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t//\tthrow new IllegalStateException(\"A nack corresponding to a message that isn't the one in the buffer has been received. This means that something is wrong (at time \" + e.getTimeNS() + \")\");\r\n\t\t}\r\n\t\t\r\n\t\tif (currentlyOptimisticallyTransmitted == null)\r\n\t\t\treturn;\r\n\r\n\t\tif (nackReceived == false) {\r\n\t\t\tif (lwSimExperiment.isWithTimeLine())\r\n\t\t\t\ttimeline.addJobPhase(lastPacketStart, e.getTimeNS(), currentlyOptimisticallyTransmitted.origin + \"->\" + currentlyOptimisticallyTransmitted.dest + \"\\n\" + currentlyOptimisticallyTransmitted.index + \":NACK\", Color.RED);\t\t\r\n\t\t\t// immediately resend\t\t\t\r\n\t\t\tnackReceived = true;\r\n\t\t\t// correct transmission time in the case of NACK Mode\r\n\t\t\tif (!this.ACKMode)\r\n\t\t\t\tlwSimExperiment.reportTransTime(index, e.getTimeNS() - lastPacketStart - packetDuration, currentlyOptimisticallyTransmitted);\r\n\t\t\t\r\n\t\t\tSpinetMessage dupl = currentlyOptimisticallyTransmitted.getCopy();\r\n\t\t\tgetQueue(dupl.dest).remove(currentlyOptimisticallyTransmitted);\r\n\t\t\tgetQueue(dupl.dest).addFirst(dupl);\r\n\t\t\tmainQueue.addFirst(dupl);\r\n\t\t\tdefineSpinetMessage(dupl);\r\n\t\t\tlwSimExperiment.packetRetransmitted(dupl);\r\n\t\t\tcurrentlyOptimisticallyTransmitted = null;\r\n\t\t}\t\t\r\n\t}",
"public void ack() {\n }",
"private void sendACKPacket()\n{\n \n //the values are unpacked into bytes and stored in outBufScratch\n //outBufScrIndex is used to load the array, start at position 0\n \n outBufScrIndex = 0;\n \n outBufScratch[outBufScrIndex++] = Notcher.ACK_CMD;\n \n //the byte is placed right here in this method\n outBufScratch[outBufScrIndex++] = lastPacketTypeHandled;\n \n //send header, the data, and checksum\n sendByteArray(outBufScrIndex, outBufScratch);\n \n}",
"private final void forwardVirtualConnectACKACK(long index, boolean succes) {\n try {\n synchronized (out) {\n out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_ACK_ACK);\n out.writeLong(index);\n out.writeBoolean(succes);\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n\n // System.err.println(\"****** ACK ACK OUT DONE \" + index + \" \" +\n // succes);\n }",
"boolean needsAck() { return true; }",
"@Override\n\tpublic void run() {\n\t\t\n\t\ttry{\n\t\tServerEncoderDecoder encodeco = new ServerEncoderDecoder();\n\t\t\n\t\t\tbyte[] datatoWrite = new byte[2000];\n\t\t\t\tdatatoWrite = encodeco.encodeData(packet);\n\t\t\tserverConnection.getOutput().println(new String(datatoWrite));\n\t\t\tString ack = serverConnection.getInput().readLine();\n\t\t\tif(ack.equals(\"ACK\")){\n\t\t\t\t//System.out.println(\"ACK for request obtained\");\n\t\t\t\tCoordinator.incrementCounter();\n\t\t\t}\n\t\t\n\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"private final void forwardVirtualMessageAck(long index, int data) {\n try {\n synchronized (out) {\n out.write(MessageForwarderProtocol.MESSAGE_VIRTUAL_ACK);\n out.writeLong(index);\n out.writeInt(data);\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n }",
"void requestReceived( C conn ) ;",
"void responseSequenceNumber() {\r\n\t\t\r\n\t}",
"ManagedEndpoint next();",
"void responseSent( C conn ) ;",
"public void upcall(ReadMessage m) {\n \tObject mesg;\r\n \t\r\n try {\r\n mesg = m.readObject();\r\n } catch (ClassNotFoundException e) {\r\n mesg = null;\r\n } catch (IOException e) {\r\n mesg = null;\r\n e.printStackTrace();\r\n } catch (Throwable th) {\r\n mesg = null;\r\n th.printStackTrace();\r\n }\r\n\r\n IbisIdentifier ii = m.origin().ibisIdentifier();\r\n\r\n if (mesg != null) {\r\n ProcessIdentifier pi = new ProcessIdentifier(ii);\r\n if (mesg instanceof RepMILTMMessage) {\r\n\r\n // DEBUG\r\n /* System.err.println(\"Got RepMI upcall of type \"\r\n + ((RepMILTMMessage) mesg).arg.getType() + \" from \"\r\n + m.origin().name());\r\n*/\r\n if (((RepMILTMMessage) mesg).arg.getType() == Operation.LW)\r\n ((RepMILTMMessage) mesg).arg.setType(Operation.RW);\r\n\r\n /* i might not do communication, so i delay the call to m.finish */\r\n proto.processRemoteOperation(((RepMILTMMessage) mesg).arg,\r\n ((RepMILTMMessage) mesg).localLTM, pi, m);\r\n return;\r\n\r\n } else if (mesg instanceof RepMIJoinMessage) {\r\n\r\n// DEBUG\r\n /* System.err.println(\"Got RepMI upcall for joining from \"\r\n + m.origin().name());\r\n */\r\n /*\r\n * needs to be called to release the thread before entering the\r\n * processJoin call which will broadcast the join request to all\r\n * other processes in the system\r\n */\r\n ReceivePortIdentifier joinAckPort = ((RepMIJoinMessage) mesg).recvPortId;\r\n ReceivePortIdentifier joiningIbisPort = ((RepMIJoinMessage) mesg).ibisRPI;\r\n ReceivePortIdentifier joinAckNormalNode = ((RepMIJoinMessage) mesg).joinAckNormalNode;\r\n\r\n try {\r\n m.finish();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n proto.processJoin(pi, joinAckPort, joiningIbisPort,\r\n joinAckNormalNode);\r\n\r\n return;\r\n\r\n } else if (mesg instanceof RepMISOSMessage) {\r\n try {\r\n m.finish();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n proto.processSOS(ii, ((RepMISOSMessage) mesg).TS,\r\n ((RepMISOSMessage) mesg).recoveryRound);\r\n return;\r\n\r\n } else if (mesg instanceof RepMISOSReplyMessage) {\r\n proto.processSOSReply(ii,\r\n ((RepMISOSReplyMessage) mesg).whomIHelp,\r\n ((RepMISOSReplyMessage) mesg).TS,\r\n ((RepMISOSReplyMessage) mesg).myOps);\r\n return;\r\n }\r\n }\r\n }",
"public void run() {\n\t\t\tBundle b = null;\n\t\t\tint i = 0, j;\n\t\t\ttry {\n\t\t\t\tfor (i = 0; i < t.length; i++) {\n\t\t\t\t\tString timestamp = \"\";\n\t\t\t\t\twhile (t[i].noOfBundles == 0)\n\t\t\t\t\t\t;\n\t\t\t\t\tfor (j = seq; j < t[i].noOfBundles; j++) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t// System.out.println(\"SEQ ACK : \" +\n\t\t\t\t\t\t\t// t[i].noOfBundles);\n\t\t\t\t\t\t\tbyte[] buffer = (byte[]) ois.readObject();\n\t\t\t\t\t\t\tb = new Bundle();\n\t\t\t\t\t\t\tb.parse(buffer);\n\t\t\t\t\t\t\tif (b.bundleNumber == b.noOfBundles - 1)\n\t\t\t\t\t\t\t\ttimestamp = new String(b.data);\n\t\t\t\t\t\t\t// System.out.println(\"ACK WAITING : \" + j);\n\t\t\t\t\t\t\t// System.out.println(\"ACK RECEIVED : \"\n\t\t\t\t\t\t\t// + b.bundleNumber);\n\t\t\t\t\t\t\t// System.out.println(t[i].transactionId + \" \"\n\t\t\t\t\t\t\t// + t[i].noOfBundles + \" \" + j);\n\t\t\t\t\t\t} while (!b.isAcknowledgement(t[i].transactionId,\n\t\t\t\t\t\t\t\tt[i].noOfBundles, j));\n\t\t\t\t\t}\n\t\t\t\t\t// System.out.println(\"TIMESTAMP RECEIVED IS :\" +\n\t\t\t\t\t// timestamp);\n\t\t\t\t\tlong ts = Long.parseLong(timestamp);\n\t\t\t\t\tdh.setSynced(ts, t[i].records);\n\t\t\t\t\tseq = 0;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tObjectOutputStream fout;\n\t\t\t\ttry {\n\t\t\t\t\tfout = new ObjectOutputStream(new FileOutputStream(\n\t\t\t\t\t\t\tnew File(storagePath + \"/push\")));\n\t\t\t\t\tfout.writeObject(t);\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\t// System.out.println(\"Written broken transaction!!!\");\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\tfout.close();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(\"ACK ENDED\");\n\t\t}",
"private void sendACK(int SeqNr) {\r\n\t\ttry {\r\n\t\t\tif(SeqNr == 0) receivingSocket.send(new DatagramPacket(ACK0,ACK0.length,rcvpkt.getAddress(),rcvpkt.getPort()));\r\n\t\t\tif(SeqNr == 1) receivingSocket.send(new DatagramPacket(ACK1,ACK1.length,rcvpkt.getAddress(),rcvpkt.getPort()));\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n protected boolean shouldAck() {\n return true;\n }",
"public abstract void onNext();",
"protected void reply_ok() throws java.io.IOException {\n byte[] ok = PushCacheProtocol.instance().okPacket();\n _socket.getOutputStream().write(ok, 0, ok.length);\n }",
"private void next() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>pc\" + pc.toString());\n\t\t\tSystem.out.println(\"DEBUG>>>pc_replay\" + pc_reply.toString());\n\t\t\tib.transact(2, pc, pc_reply, 0);\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private native int cmdXfer0(byte[] request, byte[] response);",
"protected void pktsAcked(int n, long rtt) {}",
"void receiveSequenceNumber() {\r\n\t\t\r\n\t}",
"@Override\n\tpublic void receivedNegotiation(int arg0, int arg1) {\n\t\t\n\t}",
"@Override\n\tpublic void receive() {\n\t}",
"int callback(int num_msg, Pointer msg, Pointer resp, Pointer _ptr);",
"void processCallback (ZyniMsg msg);",
"@Override\n\tvoid receiveCall() {\n\n\t}",
"public void afterReceive() {\n\t}",
"private int handleElectrodeSupplyOnOffCmdPacket()\n{\n \n int dataSize = 1; //one byte\n \n //read remainder of packet from socket and verify against the checksum\n int lStatus = readBlockAndVerify(dataSize, \n Notcher.ELECTRODE_SUPPLY_ON_OFF_CMD);\n\n //on error reading and verifying, return the error code\n if (lStatus == -1){ return(status); }\n \n //only store the values if there was no error -- errors cause return above\n\n outBufScrIndex = 0; //start with byte 0 in array\n \n electrodeSupplyOnOffByte = inBuffer[outBufScrIndex];\n \n sendACKPacket();\n \n return(lStatus);\n \n}",
"@Override\n public void completed(Integer result, AsynchronousSocketChannel channel ) {\n\n //ipaddress\n String ipAdr = \"\";\n try{\n\n //Print IPAdress\n ipAdr = channel.getRemoteAddress().toString();\n System.out.println(ipAdr);\n }catch(IOException e) {\n e.printStackTrace();\n }\n\n //if client is close ,return\n buf.flip();\n if (buf.limit() == 0) return;\n\n //Print Message\n String msg = getString(buf);\n\n //time\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss.SSS\");\n sdf.setTimeZone(TimeZone.getTimeZone(\"Asia/Taipei\"));\n System.out.println(sdf.format(new Date()) + \" \" + buf.limit() + \" client: \"+ ipAdr + \" \" + msg);\n\n //\n order ord = null;\n try{\n ord = ParseOrder(sdf.format(new Date()), msg, ipAdr);\n }catch(Exception ex){\n startRead( channel );\n return;\n }\n //2021/05/23 15:55:14.763,TXF,B,10000.0,1,127.0.0.1\n //2021/05/23 15:55:14.763,TXF,S,10000.0,1,127.0.0.1\n\n if (ord.BS.equals(\"B\")) {\n limit(ord, bid);\n }\n if (ord.BS.equals(\"S\")) {\n limit(ord, ask);\n }\n if (trade(bid, ask, match) == true){\n startWrite(clientChannel, \"Mat:\" + match.get(match.size()-1).sysTime + \",\" + match.get(match.size()-1).stockNo+\",\"+\n match.get(match.size()-1).BS+\",\"+match.get(match.size()-1).qty+\",\"+match.get(match.size()-1).price+\"\\n\");\n }\n\n //send to all \n startWrite(clientChannel, \"Ord:\" + getAllOrder(bid, ask)+\"\\n\");\n \n //bid size and ask size\n System.out.println(\"Blist:\" + bid.size() + \" Alist:\" + ask.size());\n\n // echo the message\n//------------------> //startWrite( channel, buf );\n \n //start to read next message again\n startRead( channel );\n }",
"public void sendRemainData();",
"private void processSession()\n\t\tthrows ProtocolException, AtmException\n\t{\n\t\tboolean fDone = false;\n\t\ttry\n\t\t{\n\t\t\twhile(!fDone)\n\t\t\t{\n\t\t\t\t// listen for client to send data\n\t\t\t\tString dataIn = m_reader.readLine();\n\t\t\t\ttrace(\"handling client command \" + dataIn);\n\t\t\t\tif(dataIn.trim().equals(START_XFR))\n\t\t\t\t{\n\t\t\t\t\ttrace(\"starting a file transfer request\");\n\t\t\t\t\tsendOK();\n\t\t\t\t\t//m_writer.println(OK); // send the ack\n\t\t\t\t\t\n\t\t\t\t\t// get the file name\n\t\t\t\t\tdataIn = m_reader.readLine();\n\t\t\t\t\t\n\t\t\t\t\t// create the AtmObject\n//\t\t\t\t\tDocument inDom = XmlUtility.xmlDocumentFromXmlString(dataIn.trim());\n//\t\t\t\t\tAtmObject obj = XmlUtility.xmlToObject(inDom);\n//\t\t\t\t\t\n//\t\t\t\t\tAtmObject response = AtmApplication.getInstance().processAtmObject(obj);\n//\t\t\t\t\t\n//\t\t\t\t\tDocument xmlResponse = XmlUtility.objectToXml(response);\n//\t\t\t\t\tString xmlResponseString = XmlUtility.xmlDocumentToString(xmlResponse);\n//\t\t\t\t\tsendData(xmlResponseString);\n\t\t\t\t\t// process the object\n//\t\t\t\t\tif(dataIn.trim().startsWith(FILE_NAME))\n//\t\t\t\t\t{\n//\t\t\t\t\t\t// get the file name\n//\t\t\t\t\t\tString data = dataIn.trim();\n//\t\t\t\t\t\t//String fileName = data.trim();\t\n////\t\t\t\t\t\tString path = m_destDirectory.getAbsolutePath()\n////\t\t\t\t\t\t\t\t+ \"\\\\\" + fileName;\n////\t\t\t\t\t\ttrace(\"Preparing to copy file: \" + fileName + \n////\t\t\t\t\t\t\t\t\" to \" + path);\n//\t\t\t\t\t\t\n////\t\t\t\t\t\tdestFile = new File(path);\n////\t\t\t\t\t\tFileWriter writer = new FileWriter(destFile);\n////\t\t\t\t\t\tdestWriter = new BufferedWriter(writer);\n////\t\t\t\t\t\t\n//\t\t\t\t\t\ttrace(\"created destination file\");\n//\t\t\t\t\t\tm_writer.println(OK); // send the ack\n//\t\t\t\t\t}\n\t\t\t\t}\n//\t\t\t\telse if(messageIn.trim().startsWith(DATA))\n//\t\t\t\t{\n//\t\t\t\t\ttrace(\"writing data to destination file\");\n//\t\t\t\t\t// don't trim now. We want whitespace if it's there.\n//\t\t\t\t\tString data = messageIn.substring(DATA.length());\n//\t\t\t\t\tdestWriter.write(data);\n//\t\t\t\t\tdestWriter.newLine();\n//\t\t\t\t}\n//\t\t\t\telse if(messageIn.trim().equals(END_FILE))\n//\t\t\t\t{\n//\t\t\t\t\tdestWriter.flush();\n//\t\t\t\t\tdestWriter.close();\n//\t\t\t\t\tm_writer.println(OK); // send the ack\n//\t\t\t\t}\n//\t\t\t\telse if(messageIn.trim().equals(END_SESSION))\n//\t\t\t\t{\n//\t\t\t\t\ttrace(\" - Ending session\");\n//\t\t\t\t\tm_reader.close();\n//\t\t\t\t\tm_writer.println(OK); // send the ack\n//\t\t\t\t\tbreak;\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\ttrace(\"Error copying file\" + ex.getMessage());\n\t\t\tthrow new ProtocolException(\"Error copying file\", ex);\t\t\t\n\t\t}\n\t}",
"void send();",
"protected abstract boolean sendNextRequests();",
"@Override\n public void run() {\n transmit_set();\n }",
"private final void forwardVirtualConnectACK(long index, int fragment,\n int buffer) {\n try {\n synchronized (out) {\n out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_ACK);\n out.writeLong(index);\n out.writeInt(fragment);\n out.writeInt(buffer);\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n }",
"public void accept()\n { ua.accept();\n changeStatus(UA_ONCALL);\n if (ua_profile.hangup_time>0) automaticHangup(ua_profile.hangup_time); \n printOut(\"press 'enter' to hangup\"); \n }",
"@Override\n public void upcall(ReadMessage message) throws IOException, ClassNotFoundException {\n\t MessageObject readMessage = (MessageObject) message\n .readObject();\n message.finish();\n \tReceivePortIdentifier requestor = readMessage.requestor;\n MessageObject response = new MessageObject();\n if(requestor == null)\n\t \treturn;\n synchronized (masterJobsList){\n if(readMessage.messageType == MessageObject.message_id.JOB_STEALING){\n // Provide slave with one another job\n synchronized (jobListBusy){\n if(masterJobsList.size() > 0){\n response.messageType = MessageObject.message_id.JOB_BOARD;\n response.data = masterJobsList.get(0);\n masterJobsList.remove(0);\n response.maximumBound = solutionsStep;\n }\n }\n\n SendPort replyPort = myIbis.createSendPort(replyPortType);\n replyPort.connect(requestor);\n WriteMessage reply = replyPort.newMessage();\n reply.writeObject((response));\n reply.finish();\n replyPort.close();\n\n\n } else if (readMessage.messageType == MessageObject.message_id.SOLUTIONS_NUM){\n --jobCounter;\n Pair<Integer, Integer> res = (Pair<Integer, Integer>)readMessage.data;\n System.out.println(\"GOT RESULT (\" + res.getKey() + \" ; \" + res.getValue() + \")\");\n synchronized(jobListBusy){\n if(res.getValue() < solutionsStep){\n solutionsNum = res.getKey();\n solutionsStep = res.getValue();\n endTime = System.currentTimeMillis();\n } else if (res.getValue() == solutionsStep){\n solutionsNum += res.getKey();\n endTime = System.currentTimeMillis();\n } else {\n // do nothing\n }\n if(jobCounter == 0)\n jobListBusy.notify();\n }\n\n }\n\n }\n }",
"@Override\n\tpublic void receiveRequest() {\n\n\t}",
"public void handleAck() {\n\t\tlong start = System.currentTimeMillis();\n\t\tlong end = start;\t\n\t\tint userCnt = users.size();\n\t\tSystem.out.println(\"handling ack in Server\");\n\t\twhile(CommitDecision.size() != 0){\n\t\t\tif(end - start >= 3000) {\n\t\t\t\tfor(String user: CommitDecision.keySet()) {\n\t\t\t\t\tSystem.out.println(\"resend ack to \"+ user+ \" for task \"+ filename);\n\t\t\t\t\tPL.sendMessage(CommitDecision.get(user));\n\t\t\t\t}\n\t\t\t\tstart = end;\n\t\t\t}else {\n\t\t\t\tMsg tmp = notYetAck.poll();\n\t\t\t\tif(tmp != null && CommitDecision.containsKey(tmp.user)) {\n\t\t\t\t\tCommitDecision.remove(tmp.user);\n\t\t\t\t\tSystem.out.println(tmp.user+\" 's ack has been received\");\n\t\t\t\t}\n\t\t\t\tend = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\n\t}",
"private void __getReply() throws IOException\n {\n __getReply(true); // tagged response\n }",
"@Override\r\n\tpublic int ack(int x, int y) {\n\t\treturn 0;\r\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\tk++;\n\t\t\t\t\t\n\t\t\t\t\tif(k>=10) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\teeipClient.ForwardClose();\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\ttimerflag1=false;\n\t\t\t\t\t\tstatus_write=true;\n\t\t\t\t\t\tstate=3;\n\t\t\t\t\t\tk=0;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"void asyncEventPing();",
"public void run() {\n req.response().end(\"0\"); // Default response = 0\n }",
"public void sendResponse(){\n\n //DropItPacket dropPkt = new DropItPacket(Constants.PONG.toString());\n // Send out a dropit Packet\n Channel channel = e.getChannel();\n ChannelFuture channelFuture = Channels.future(e.getChannel());\n ChannelEvent responseEvent = new DownstreamMessageEvent(channel, channelFuture, packet, channel.getRemoteAddress());\n// System.out.println(\"===== sending to\" + channel.getRemoteAddress().toString());\n try{\n ctx.sendDownstream(responseEvent);\n }catch (Exception ex){\n System.out.println(\"Node: \" + fileServer.getNode().getPort() + \" sending to\"+\n channel.getRemoteAddress().toString() +\"failed! \" + ex.toString());\n }\n }",
"@Override\r\n\tpublic void askPressionAsync() throws Exception\r\n\t\t{\n\r\n\t\tbyte[] tabByte = TrameEncoder.coder(ASK_MSG_PRESSION);\r\n\t\toutputStream.write(tabByte);\r\n\t\t}",
"@Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }",
"private void handleDataPacket(TcpPacket packet) {\n\n // Invariants\n\n // For the sender, if the ACK message did not arrive, it will receive\n // another ACK+SYN message, which it will then again confirm.\n if (!this.isReceiver()) {\n assert(packet.isSYN() && packet.isACK());\n sendWithoutResend(\n ((FullExtTcpPacket) createPacket(\n 0, // Data size (byte)\n sendNextNumber, // Sequence number\n (packet.getSequenceNumber() + packet.getDataSizeByte() + (packet.isSYN() ? 1 : 0)), // Ack number\n true, // ACK\n false, // SYN\n packet.getECN() // ECE\n ).setEchoFlowletId(packet.getFlowletId()))\n .setEchoDepartureTime(packet.getDepartureTime())\n );\n return;\n }\n\n // The receiver is always at FIRST_SEQ_NUMBER+1, having sent only the ACK+SYN message\n assert(this.sendUnackNumber == FIRST_SEQ_NUMBER + 1);\n\n // Locally store sequence numbers\n long seqNumber = packet.getSequenceNumber();\n long ackNumber = (packet.getSequenceNumber() + packet.getDataSizeByte() + (packet.isSYN() ? 1 : 0));\n\n // Only advance if it is the packet on the left side of the receiver window\n if (receiveNextNumber == seqNumber) {\n receiveNextNumber = selectiveAckSet.determineReceiveNextNumber(ackNumber);\n\n // If it is not on the left side, we selectively acknowledge it\n } else if (seqNumber > receiveNextNumber) {\n selectiveAckSet.add(seqNumber, ackNumber);\n }\n\n // Send out the acknowledgment\n sendWithoutResend(\n ((FullExtTcpPacket) ((FullExtTcpPacket) (createPacket(\n 0, // Data size (byte)\n sendNextNumber, // Sequence number\n receiveNextNumber, // Ack number\n true, // ACK\n false, // SYN\n packet.getECN() // ECE\n ).setEchoFlowletId(packet.getFlowletId())))\n .setSelectiveAck(selectiveAckSet.createSelectiveAckData()))\n .setEchoDepartureTime(packet.getDepartureTime())\n );\n\n }",
"protected synchronized void receiveHighLevel() throws Exception{\n\t\treceivedMsg = conn.receiveALine( ); \n//\t\tprintln(\"received \" + receivedMsg);\n\t\twhile( receivedMsg == null ){ //this means that the connection works in raw mode\n\t\t\t//System.out.println(\"ConnInputReceiver waiting ... \" + conn );\n\t\t\tmemo();\n \t\t\twait();\n \t\t\t//System.out.println(\"ConnInputReceiver resuming ... \" + conn );\n\t\t\treceivedMsg = conn.receiveALine( ); \n\t\t}\t\n\t\tunmemo();\t\n\t}",
"private AdesaNetworkCall(){ }",
"public boolean push() {\n\t\tTransaction[] transactions = null;\n\t\tACKThread ack = null;\n\t\ttry {\n\t\t\tbyte[] buffer = \"PUSH\".getBytes();\n\t\t\toos.writeObject(buffer);\n\t\t\t// System.out.println(\"PUSH packet sent!!!\");\n\t\t\tbuffer = (byte[]) ois.readObject();\n\t\t\tBundle b = new Bundle();\n\t\t\tb.parse(buffer);\n\t\t\tif (b.bundleType == b.RETRANS) {\n\t\t\t\tFile f = new File(storagePath + \"/push\");\n\t\t\t\tif (!f.exists()) {\n\t\t\t\t\tb = new Bundle();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = -1;\n\t\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = -1;\n\t\t\t\t\tb.bundleSize = 0;\n\t\t\t\t\tb.data = null;\n\t\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\t\toos.flush();\n\t\t\t\t} else {\n\t\t\t\t\tString[] info = (new String(b.data)).split(\"\\n\");\n\t\t\t\t\tint tid = Integer.parseInt(info[0]);\n\t\t\t\t\tint bno = Integer.parseInt(info[1]);\n\t\t\t\t\tObjectInputStream fin = new ObjectInputStream(\n\t\t\t\t\t\t\tnew FileInputStream(f));\n\t\t\t\t\tTransaction[] tt = (Transaction[]) fin.readObject();\n\t\t\t\t\tfin.close();\n\t\t\t\t\tfor (int i = 0; i < (info.length - 2); i++) {\n\t\t\t\t\t\tdh.setSynced(Long.parseLong(info[i + 2]), tt[i].records);\n\t\t\t\t\t}\n\t\t\t\t\tTransaction[] t = new Transaction[1];\n\t\t\t\t\tt[0] = tt[tid];\n\t\t\t\t\tif (t[0].bundles == null)\n\t\t\t\t\t\tt[0].organizeBundles();\n\t\t\t\t\tboolean result = f.delete();\n\t\t\t\t\t// System.out.println(\"Delete event : \" + result);\n\t\t\t\t\tif (!(t[0].noOfBundles == bno)) {\n\t\t\t\t\t\tack = new ACKThread(dh, t, ois, bno);\n\t\t\t\t\t\tack.start();\n\t\t\t\t\t\tfor (int bi = bno; bi < t[0].noOfBundles; bi++) {\n\t\t\t\t\t\t\tbyte[] bundle = t[0].bundles[bi].getBytes();\n\t\t\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\t\t\toos.flush();\n\t\t\t\t\t\t\t// System.out\n\t\t\t\t\t\t\t// .println(\"Sent bundle -> Transaction id : \"\n\t\t\t\t\t\t\t// + tid + \" Bundle No. : \" + bi);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tack.join();\n\t\t\t\t\t}\n\t\t\t\t\tb = new Bundle();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = -1;\n\t\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = -1;\n\t\t\t\t\tb.bundleSize = 0;\n\t\t\t\t\tb.data = null;\n\t\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\t}\n\t\t\t\treturn push();\n\t\t\t}\n\t\t\tif (b.bundleType == b.START) {\n\t\t\t\tList<String[]> list = dh.selectNewRecords();\n\t\t\t\tif (list != null) {\n\t\t\t\t\tint l = list.size();\n\t\t\t\t\tRecord[] records = new Record[l];\n\t\t\t\t\tint n = 0;\n\t\t\t\t\tString gid = \"\";\n\t\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\t\trecords[i] = new Record();\n\t\t\t\t\t\trecords[i].groupid = list.get(i)[0];\n\t\t\t\t\t\trecords[i].key = list.get(i)[1];\n\t\t\t\t\t\trecords[i].value = list.get(i)[2];\n\t\t\t\t\t\trecords[i].user = list.get(i)[3];\n\t\t\t\t\t\trecords[i].datatype = list.get(i)[4];\n\t\t\t\t\t\trecords[i].timestamp = Long.parseLong(list.get(i)[5]);\n\t\t\t\t\t\trecords[i].synced = \"N\";\n\t\t\t\t\t\tif (!(gid.equals(records[i].groupid))) {\n\t\t\t\t\t\t\tn++;\n\t\t\t\t\t\t\tgid = records[i].groupid;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// System.out.println(\"NO OF TRANSACTIONS:\" + n);\n\t\t\t\t\ttransactions = new Transaction[n];\n\t\t\t\t\tint t = 0, r = 0;\n\t\t\t\t\ttransactions[t] = new Transaction();\n\t\t\t\t\ttransactions[t].transactionId = t;\n\t\t\t\t\ttransactions[t].addRecord(records[r]);\n\t\t\t\t\tr++;\n\t\t\t\t\twhile (r < records.length) {\n\t\t\t\t\t\twhile (r < records.length\n\t\t\t\t\t\t\t\t&& records[r].groupid\n\t\t\t\t\t\t\t\t\t\t.equals(records[r - 1].groupid)) {\n\t\t\t\t\t\t\ttransactions[t].addRecord(records[r]);\n\t\t\t\t\t\t\t// System.out.println(records[r].key);\n\t\t\t\t\t\t\tr++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// System.out.println(\"NO OF RECORDS :\" +\n\t\t\t\t\t\t// records.length);\n\t\t\t\t\t\t// System.out.println(\"R VALUE :\" + r);\n\t\t\t\t\t\tif (r < records.length) {\n\t\t\t\t\t\t\tt++;\n\t\t\t\t\t\t\ttransactions[t] = new Transaction();\n\t\t\t\t\t\t\ttransactions[t].transactionId = t;\n\t\t\t\t\t\t\ttransactions[t].addRecord(records[r]);\n\t\t\t\t\t\t\tr++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tack = new ACKThread(dh, transactions, ois, 0);\n\t\t\t\t\tack.start();\n\t\t\t\t\tfor (t = 0; t < transactions.length; t++) {\n\t\t\t\t\t\ttransactions[t].organizeBundles();\n\t\t\t\t\t\tfor (int bi = 0; bi < transactions[t].noOfBundles; bi++) {\n\t\t\t\t\t\t\tbyte[] bundle = transactions[t].bundles[bi]\n\t\t\t\t\t\t\t\t\t.getBytes();\n\t\t\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\t\t\toos.flush();\n\t\t\t\t\t\t\t// System.out\n\t\t\t\t\t\t\t// .println(\"Sent bundle -> Transaction id : \"\n\t\t\t\t\t\t\t// + t + \" Bundle No. : \" + bi);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tack.join();\n\t\t\t\t}\n\t\t\t\tb = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\ttransactions = null;\n\t\t\t\tack = null;\n\t\t\t\tsleep(100);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t// System.out.println(\"Caught Outside\");\n\t\t\tif (ack != null) {\n\t\t\t\ttry {\n\t\t\t\t\tack.join();\n\t\t\t\t\tsleep(100);\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n\tpublic void conferenceroom() {\n\t\t\n\t}",
"boolean getAck();",
"public void send() {\n\t}",
"public void receivedOkayMessage();",
"public int sendDataPacket()\n{\n \n return(0);\n\n}",
"protected void reply_no() throws java.io.IOException {\n byte[] no = PushCacheProtocol.instance().noPacket();\n _socket.getOutputStream().write(no, 0, no.length);\n }",
"@Override\n\tpublic void replyOperationCompleted() { ; }",
"public synchronized void m29984l() {\n if (XGPushConfig.enableDebug) {\n C6864a.m29298c(\"TpnsChannel\", \"Action -> send heartbeatSlave \");\n }\n f23274i++;\n mo33398h();\n if (C6973b.m29763a().mo33291f(C6973b.m29776f())) {\n if (!C7048a.m30142d(C6973b.m29776f())) {\n C6864a.m29308i(Constants.ServiceLogTag, \"network is unreachable ,give up and go on slave service\");\n } else if (C6973b.m29776f() != null) {\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n boolean isForeiginPush = XGPushConfig.isForeiginPush(C6973b.m29776f());\n String str = Constants.ACTION_SLVAE_2_MAIN;\n String str2 = Constants.ServiceLogTag;\n if (isForeiginPush) {\n C6864a.m29308i(str2, \"isForeiginPush network is ok , switch to main service\");\n C6973b.m29767a(C6973b.m29776f(), str, 0);\n } else if (C6979b.m29795a(C6973b.m29776f()).mo33300b()) {\n C6864a.m29308i(str2, \"network is ok , switch to main service\");\n C6973b.m29767a(C6973b.m29776f(), str, 0);\n } else {\n C6864a.m29308i(str2, \"network is error , go on slave service\");\n }\n }\n });\n } else {\n C6864a.m29308i(Constants.ServiceLogTag, \"PushServiceManager.getInstance().getContext() is null\");\n }\n }\n }",
"void receiveAcknowledgement() {\n byte[] receiveBuffer = new byte[2048];\n DatagramPacket receivePacket = new DatagramPacket(receiveBuffer, receiveBuffer.length);\n try {\n recSocket.receive(receivePacket);\n String dataReceived = new String(receivePacket.getData()).trim();\n System.out.println(\"\\n\" + dataReceived);\n\n } catch (IOException e) {\n System.out.println(\"\\nAcknowledgement not received!\");\n }\n }",
"private void sendPendingData() {\n assert(sendNextNumber >= sendUnackNumber);\n\n // Calculate congestion window difference\n long lastUnackNumber = sendUnackNumber + (long) Math.min(congestionWindow, MAX_WINDOW_SIZE);\n long difference = lastUnackNumber - sendNextNumber; // Available window\n\n // Send packets until either the congestion window is full\n // or there is no longer any flow to send\n long amountToSendByte = getFlowSizeByte(sendNextNumber);\n while (difference >= amountToSendByte && amountToSendByte > 0) {\n\n // If it has not yet been confirmed,actually send out the packet\n if (!acknowledgedSegStartSeqNumbers.contains(sendNextNumber)) {\n sendOutDataPacket(sendNextNumber, amountToSendByte);\n\n // If it has already been confirmed by selective acknowledgments, just move along\n } else {\n sendNextNumber += amountToSendByte;\n }\n\n // Determine next amount to send\n difference -= amountToSendByte;\n amountToSendByte = getFlowSizeByte(sendNextNumber);\n\n }\n\n }",
"public void fastForward() {\n try {\n mSessionBinder.fastForward(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling fastForward.\", e);\n }\n }",
"public void run() {\n int done = 0;\n int len = 0;\n int off = 0;\n int rv = 0;\n _running = true;\n try {\n edu.hkust.clap.monitor.Monitor.loopBegin(143);\nwhile (_running) { \nedu.hkust.clap.monitor.Monitor.loopInc(143);\n{\n rv = _stream.read(_buffer);\n if (!PushCacheProtocol.instance().isValidProtocolTag(_buffer)) {\n throw new Exception(\"Bad protocol tag\");\n }\n _dataStream = new DataInputStream(new ByteArrayInputStream(_buffer));\n _dataStream.skipBytes(PushCacheProtocol.TAG_LEN);\n short maj = _dataStream.readShort();\n short min = _dataStream.readShort();\n if (maj != PushCacheProtocol.MAJ_PROTO_VERSION || min > PushCacheProtocol.MIN_PROTO_VERSION) {\n throw new Exception(\"Bad protocol version\");\n }\n String command = new String(_buffer, PushCacheProtocol.HEADER_LEN, PushCacheProtocol.COMMAND_LEN);\n int com = PushCacheProtocol.instance().parseCommand(command);\n readPayload();\n switch(com) {\n case PushCacheProtocol.ADD:\n add();\n break;\n case PushCacheProtocol.BYE:\n stopRunning();\n break;\n case PushCacheProtocol.DEL:\n del();\n break;\n case PushCacheProtocol.CLN:\n clean();\n break;\n case PushCacheProtocol.PRS:\n present();\n break;\n case PushCacheProtocol.NOP:\n nop();\n break;\n default:\n throw new Exception(\"Unrecognised command \\\"\" + command + \"\\\"\");\n }\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(143);\n\n } catch (Exception e) {\n e.printStackTrace();\n _running = false;\n reply_error(e.getMessage());\n }\n cleanup();\n }",
"void state_REQState(){\r\n eccState = INDEX_REQState;\r\n alg_REQAlg();\r\n CNF.serviceEvent(this);\r\n state_START();\r\n}",
"abstract protected void onReceivedSequence(String sequence);",
"private void sendAck(DOPEPacket packet) throws IOException {\n\t\tDOPEPacket ack = new DOPEPacket(Control.ACK_OP_CODE, packet.getSequenceNumber());\n\t\tsend(ack);\n\t\tSystem.out.println(\"Sent ack:\\n\" + ack);\n\t}",
"public void startInbound();",
"@Override\n public void onNext(Void aVoid) {\n }",
"@Override\r\n\tpublic void pushDataToEcc() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onReceive(Object arg0) throws Exception {\n\t\t\r\n\t}",
"private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }",
"public void readyToReceive()\n { ua.printLog(\"WAITING FOR INCOMING CALL\");\n if (!ua.ua_profile.audio && !ua.ua_profile.video) ua.printLog(\"ONLY SIGNALING, NO MEDIA\"); \n //ua.listen();\n changeStatus(UA_IDLE);\n printOut(\"digit the callee's URL to make a call or press 'enter' to exit\");\n }",
"public void tellJoke(){\n new EndpointAsyncTask().execute(this);\n }",
"protected void fastReTx() {\n\t\tActualSegment unackCur = unackHead;\n\n\t\twhile(unackCur != null) {\n\t\t\teventQueue.remove(unackCur);\n\t\t\tpipe.write(unackCur);\n\t\t\tunackCur = unackCur.next;\n\t\t}\n\t}",
"private void sendAcknoledmentOfReceipt() {\n\t\ttry {\n\t\t\tthis.receiver.sendLetter(new AcknowledgmentOfReceipt(this.receiver, this.sender, this.getDescription()));\n\t\t} catch (NoSuchMoneyException e) {}\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\t\n\t\t\t\t\tk++;\n\t\t\t\t\t\n\t\t\t\t\tif(k>=3) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\teeipClient.ForwardClose();\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttimerflag1=false;\n\t\t\t\t\t\tMessagerec[0]=1;\n\t\t\t\t\t\tstate2=3;\n\t\t\t\t\t\tk=0;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t}",
"public void beforeReceive() {\n\t}",
"private void processIn() {\n if (state != State.ESTABLISHED) {\n bbin.flip();\n if (bbin.get() != 10) {\n silentlyClose();\n return;\n } else {\n state = State.ESTABLISHED;\n }\n bbin.compact();\n } else {\n switch (intReader.process(bbin)) {\n case ERROR:\n return;\n case REFILL:\n return;\n case DONE:\n var size = intReader.get();\n bbin.flip();\n var bb = ByteBuffer.allocate(size);\n for (var i = 0; i < size; i++) {\n bb.put(bbin.get());\n }\n System.out.println(UTF.decode(bb.flip()).toString());\n bbin.compact();\n intReader.reset();\n break;\n }\n }\n }",
"public String receiveResponse()\n\t{\n\t\t\n\t}",
"@Override\n\tpublic void msgAtCook() {\n\t\t\n\t}",
"@Override\n public void transferred(long num) {\n }",
"@Override\n public void transferred(long num) {\n }",
"@Override\n public void onResponse(String response) {\n System.out.print(\"respuesta Server\"+response);\n responseRequest(sync_id);\n /*if (sync_id != 0) {\n responseRequest(sync_id);\n } else {\n background_response = \"ID Sync null\";\n restartRequest(background_response);\n }*/\n }",
"private void establishedHandle(FullExtTcpPacket packet) {\n if (packet.isSYN()) {\n // Re-receive the ACK+SYN, means that the receiver has not received the final ACK\n // So we re-send the ACK of the three-way handshake\n handleDataPacket(packet);\n } else if (packet.isACK()) {\n handleAcknowledgment(packet);\n } else {\n handleDataPacket(packet);\n }\n }",
"@Override\r\n\tpublic void quack() {\n\t\tsuper.gobble();\r\n\t}",
"@Override\n\t\t\tpublic void callbackCall() {\n\t\t\t}",
"void onAckReceived(int source);",
"@Override\n\tpublic void call() {\n\t\t\n\t}",
"public void doPack() {\n this._sendData = new byte[2];\n this._sendData[0] = 1;\n this._sendData[1] = (byte) (this.iOIndex & 15);\n }",
"private short receive_ACK(DatagramSocket socket) throws IOException, InterruptedException {\n\n byte[] ACKbuf = new byte[4]; //ACK packet is 4 bytes long (RFC1350)\n DatagramPacket receivePacket = new DatagramPacket(ACKbuf, ACKbuf.length);\n try {\n\n // Set timeout limit so we don't wait until forever.\n socket.setSoTimeout(WAITING_LIMIT);\n socket.receive(receivePacket);\n\n byte[] ACK = receivePacket.getData();\n ByteBuffer wrap= ByteBuffer.wrap(ACK);\n\n short opcode = wrap.getShort(), //parse opcode\n blockNumber = wrap.getShort(); //parse block number\n\n if(opcode == OP_ACK) {\n return blockNumber;\n }\n else if (opcode == OP_ERR)\n {\n throw new InterruptedException(\"ERROR-MESSAGE RECEIVED FROM CLIENT, CLOSING CONNECTION.\");\n }\n else\n {\n throw new InvalidDataException(\"RECEIVED PACKET NOT OF TYPE ACK\");\n }\n\n }\n catch (SocketTimeoutException e) {\n throw new SocketTimeoutException(\"NO ACK RECEIVED WITHIN REASONABLE TIME\");\n }\n catch (IOException e) {\n throw new IOException(\"CONNECTION PROBLEM\");\n }\n\n }",
"Message sendAndWait();",
"private int reTransmit( int index ) throws IOException{\n\t\tif ( index < 0 || index>=window.size() ){\n\t\t\tSystem.out.println(\"SRSender \"+senderID+\" > \"+\"error(retrnamit): invalid index: \" + index);\n\t\t\treturn 0;\n\t\t}\n\t\telse if ( window.get(index).acked ){\n\t\t\tSystem.out.println(\"SRSender \"+senderID+\" > \"+\"error(retrnamit): invalid index: \" + index+\"already ACKed\");\n\t\t\treturn 0;\n\t\t}\t\n\t\t\n\t\t//retransmit\n\t\tboolean flag = false;\n\t\tflag = transmitPacket( window.get(index).indexS, window.get(index).indexE, window.get(index).seq );\n\t\t//reset counter\n\t\twindow.get(index).counter = 0;\n\t\twindow.get(index).acked = false;\n\t\t\n\t\tif (flag){\n\t\t\treturn 1;\n\t\t}\n\t\tSystem.out.println(\"SRSender \"+senderID+\" > \"+\"error(retrnamit): fail to retransmit packet at:\" + index);\n\t\treturn 0;\n\t}",
"@Override\n\tprotected void runProtocol() throws AtmException\n\t{\n\t\ttrace(\"runProtocol()\");\n\t\twhileConnected();\n\t}",
"protected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException\r\n\t{\r\n\t\t/**\r\n\t\t * Note: the \"resp\" is the only destination for an incoming requests\r\n\t\t */\r\n\t\tfinal long clientChannelID = Long.valueOf(req.getHeader(\"channelID\"));\r\n\t\t//final String clientID = req.getProtocol() + req.getRemoteAddr() + clientChannelID;\r\n\t\t\r\n\t\tSmartObjectInputStream input = new SmartObjectInputStream(req.getInputStream());\r\n\r\n\t\tLong xid = 0L;\r\n\t\tfinal WaitingCallback blocking = new WaitingCallback();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tchannelEndpoint.updateDeserializingThread(Thread.currentThread(),\r\n\t\t\t\t\ttrue);\r\n\t\t\tfinal CommMessage msg = CommMessage.parse(input);\r\n\t\t\txid = msg.getXID();\r\n\r\n\t\t\tsynchronized (callbacks)\r\n\t\t\t{\r\n\t\t\t\tcallbacks.put(xid + clientChannelID, blocking);\r\n\t\t\t}\r\n\t\t\tmsg.setXID(xid + clientChannelID); //update ID for preventing naming conflict\r\n\t\t\t\r\n\t\t\tchannelEndpoint.getChannelFacade().receivedMessage(this, msg);\r\n\t\t}\r\n\t\tcatch (final IOException ioe)\r\n\t\t{\r\n\t\t\tchannelEndpoint.getChannelFacade().receivedMessage(this, null);\r\n\t\t}\r\n\t\tcatch (final Throwable t)\r\n\t\t{\r\n\t\t\tt.printStackTrace();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tchannelEndpoint.updateDeserializingThread(Thread.currentThread(),\r\n\t\t\t\t\tfalse);\r\n\t\t}\r\n\r\n\t\tCommMessage responseMsg = null;\r\n\r\n\t\t// wait for the reply\r\n\t\tsynchronized (blocking)\r\n\t\t{\r\n\t\t\tfinal long timeout = System.currentTimeMillis()\r\n\t\t\t\t\t+ CommConstants.TIMEOUT;\r\n\t\t\tresponseMsg = blocking.getResult();\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\twhile (responseMsg == null && System.currentTimeMillis() < timeout)\r\n\t\t\t\t{\r\n\t\t\t\t\tblocking.wait(CommConstants.TIMEOUT);\r\n\t\t\t\t\tresponseMsg = blocking.getResult();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (InterruptedException ie)\r\n\t\t\t{\r\n\t\t\t\tthrow new RemoteCommException(\r\n\t\t\t\t\t\t\"Interrupted while waiting for callback\", ie);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (responseMsg != null)\r\n\t\t{\r\n\t\t\tresponseMsg.setXID(responseMsg.getXID() - clientChannelID);//reset ID\r\n\t\t\tresp.setContentType(\"multipart/x-dpartner\");\r\n\t\t\tSmartObjectOutputStream output = new SmartObjectOutputStream(resp.getOutputStream());\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tchannelEndpoint.updateSerializing(Thread.currentThread(), true);\r\n\t\t\t\tresponseMsg.send(output);\r\n\t\t\t\tresp.flushBuffer();\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\tthrow e;\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tchannelEndpoint.updateSerializing(Thread.currentThread(), false);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new RemoteCommException(\r\n\t\t\t\t\t\"Method Invocation failed, timeout exceeded.\");\r\n\t\t}\r\n\t}",
"private void sendDataReceptionCompleteMessage(SelectionKey key, byte[] data) throws IOException {\n\t\tSocketChannel channel = (SocketChannel)key.channel();\n\t\tbyte[] ackData = new byte[4];\n\t\tackData[0]=00;\n\t\tackData[1]=00;\n\t\tackData[2]=00;\n\t\tackData[3]=data[9]; //bPacketRec[0];\n\n\t\tByteBuffer bSend = ByteBuffer.allocate(ackData.length);\n\t\tbSend.clear();\n\t\tbSend.put(ackData);\n\t\tbSend.flip();\n\t\twhile (bSend.hasRemaining()) {\n\t\t\ttry {\n\t\t\t\tchannel.write(bSend);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new IOException(\"Could not send Data Reception Acknowledgement\");\n\t\t\t}\n\t\t}\n\t}",
"public void ringProceed(int nextProc, int coord) {\r\n\tSystem.out.println(\"inside proceed\" + nextProc);\r\n\tSystem.out.println(\"inside proceed coord\" + coord);\r\n\tif(nextProc>6) {\r\n\t\tnextProc = nextProc - 6;\r\n }\r\n\tString token = \"NEXT_ALIVE\" + coord + nextProc;\r\n\tSystem.out.println(\"inside proceed\" + nextProc);\r\n try {\r\n Socket socket = new Socket(\"127.0.0.1\", 8080+nextProc);\r\n PrintWriter out = new PrintWriter(socket.getOutputStream());\r\n out.println(token);\r\n out.flush();\r\n out.close();\r\n socket.close();\r\n } catch(Exception ex) {\r\n \t// forward to next next if the next one was unavailable\r\n \tif(nextProc+1 == coordinator) {\r\n \t\tringProceed(nextProc+2, coord);\r\n \t} else {\r\n \t\tringProceed(nextProc+1, coord);\r\n \t}\r\n }\r\n}",
"@Override\n public void completed(Integer result, AsynchronousSocketChannel channel ) {\n }",
"void requestProcessed( C conn, int numResponseExpected ) ;",
"protected abstract void nextRequest ();",
"pb4server.DealHeartAskReq getDealHeartAskReq();"
] | [
"0.63356286",
"0.61331695",
"0.61201626",
"0.5976122",
"0.5966829",
"0.5942974",
"0.5927727",
"0.57853186",
"0.57555944",
"0.5732579",
"0.57244813",
"0.5693335",
"0.5671979",
"0.5650397",
"0.56489784",
"0.563493",
"0.5614452",
"0.55858624",
"0.5576952",
"0.5558789",
"0.5552167",
"0.5547892",
"0.5547664",
"0.5543741",
"0.5535437",
"0.5530772",
"0.55298436",
"0.55277276",
"0.552316",
"0.5513058",
"0.549462",
"0.5478502",
"0.5470264",
"0.5465537",
"0.54642123",
"0.54486734",
"0.5445693",
"0.5429195",
"0.5406856",
"0.5403153",
"0.5397556",
"0.5375714",
"0.53738195",
"0.53617525",
"0.53536373",
"0.53395677",
"0.5324721",
"0.5321926",
"0.53180313",
"0.53104997",
"0.53098404",
"0.53075016",
"0.5305631",
"0.5294607",
"0.5294061",
"0.5291651",
"0.52899265",
"0.52884394",
"0.528608",
"0.5285195",
"0.52842844",
"0.5277414",
"0.5269137",
"0.52628684",
"0.52619237",
"0.5259829",
"0.5259581",
"0.5257163",
"0.5253956",
"0.52532095",
"0.5249731",
"0.52491105",
"0.5241709",
"0.52391994",
"0.52303696",
"0.52290165",
"0.52270204",
"0.5220771",
"0.5212212",
"0.52113014",
"0.52101964",
"0.5207175",
"0.5207175",
"0.5203336",
"0.5202338",
"0.5200901",
"0.520065",
"0.51941",
"0.5193423",
"0.5193404",
"0.5193313",
"0.5191769",
"0.51895815",
"0.5188898",
"0.51872295",
"0.5186492",
"0.51847893",
"0.51828974",
"0.5181828",
"0.5167938",
"0.5167311"
] | 0.0 | -1 |
TODO: Should be asynchronous ??? | private final void forwardVirtualClose(long index) {
if (vclogger.isInfoEnabled()) {
vclogger.info("Sending closing connection: " + index);
}
// forward the close
try {
synchronized (out) {
out.write(MessageForwarderProtocol.CLOSE_VIRTUAL);
out.writeLong(index);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void callSync() {\n\n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void callbackCall() {\n\t\t\t}",
"@Override\r\n\tprotected void execute() {\r\n\t}",
"@Override\r\n\tpublic void done() {\n\t\t\r\n\t}",
"@Override\n\t\t\t\t\tpublic void onComplete() {\n\t\t\t\t\t}",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n\t\tpublic void run() {\n\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"@Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }",
"@Override\n public void done() {\n }",
"@Override\n public void done() {\n }",
"@Override\n protected void execute() {\n \n }",
"@Override\r\n\tprotected void processExecute() {\n\r\n\t}",
"@Override\r\n\t\t\tpublic void onCompleted() {\n\r\n\t\t\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"void whenComplete();",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n\t\tpublic void onCompleted() {\n\t\t}",
"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}",
"@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\t\tpublic void done() {\n\n\t\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\n\tpublic void execute() {\n\t\t\n\t}",
"public void run() {\n\t\t\t\t\t\t}",
"@Override\n protected void execute() {\n \n }",
"@Override\n\t\t\t\t\t\t\tpublic void onOnlineDiveDataProgress(Object result) {\n\n\t\t\t\t\t\t\t}",
"@Override\n public void sync(){\n }",
"@Override\n public void onFinished() {\n }",
"@Override\n public void onFinished() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n\tpublic void call() {\n\t\t\n\t}",
"@Override\n public void onCompleted() {\n }",
"@Override\n public void onCompleted() {\n }",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\n public void execute() {\n \n \n }",
"@Override\n protected void execute() {\n\n }",
"@Override\n public void run() {\n load_remote_data();\n }",
"boolean completed();"
] | [
"0.5958939",
"0.58460706",
"0.5815312",
"0.5815312",
"0.5811255",
"0.57935303",
"0.57935303",
"0.5734125",
"0.5624567",
"0.55985254",
"0.55847436",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.5556556",
"0.55261236",
"0.55261236",
"0.55186725",
"0.55186725",
"0.55186725",
"0.5508306",
"0.5471241",
"0.5471241",
"0.5469643",
"0.5438473",
"0.54201496",
"0.5415032",
"0.5415032",
"0.5414713",
"0.54133326",
"0.54133326",
"0.54133326",
"0.5412862",
"0.5411884",
"0.5411884",
"0.5411884",
"0.5408569",
"0.5408569",
"0.5402231",
"0.5402231",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.54004645",
"0.5397992",
"0.5390725",
"0.5390725",
"0.5390725",
"0.5390725",
"0.5390725",
"0.5390725",
"0.5390725",
"0.5390194",
"0.5390194",
"0.5390194",
"0.5390194",
"0.5390194",
"0.5390194",
"0.5390194",
"0.5390194",
"0.5390194",
"0.53862685",
"0.5382209",
"0.53718436",
"0.53717655",
"0.53577906",
"0.53489673",
"0.53489673",
"0.5342622",
"0.5342622",
"0.5341455",
"0.5337405",
"0.5337405",
"0.5333974",
"0.5333974",
"0.5333974",
"0.5317022",
"0.531679",
"0.5316758",
"0.53159165"
] | 0.0 | -1 |
TODO: Should be asynchronous ??? forward the message | private final void forwardVirtualMessage(long index, byte[] data, int size) {
try {
synchronized (out) {
out.write(MessageForwarderProtocol.MESSAGE_VIRTUAL);
out.writeLong(index);
out.writeInt(size);
out.write(data, 0, size);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void forward(IMessage message, IChannel sender);",
"Object routeMessage(Message message) throws IOException;",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\t}",
"void messageSent();",
"@Override\n public void handleMessage(Message message) {}",
"public void process(PlainMessage msg) throws IOException {\n relay(msg);\n }",
"Message sendAndWait();",
"protected void handleMessage(Message msg) {}",
"public Message process(Message m) throws ActionProcessingException {\n\t\t\r\n\t\t\r\n\t\t String responseMsg = (String) m.getBody().get(Body.DEFAULT_LOCATION);\r\n\t\t m.getBody().add(\"MsgToClient\",responseMsg);\r\n\t\t \r\n\t\t return m;\r\n\r\n\t}",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"private void sendReceiveRes(){\n\t}",
"private void returnToSender(ClientMessage m) {\n\n if (m.returnToSender) {\n // should never happen!\n // System.out.println(\"**** Returning to sender says EEK\");\n return;\n }\n\n // System.out.println(\"**** Returning to sender says her I go!\");\n m.returnToSender = true;\n forward(m, true);\n }",
"public void process(Key msg) throws IOException {\n relay(msg);\n }",
"@Override\n public void run() {\n Message message = mHandler.obtainMessage(1);\n mHandler.sendMessage(message);\n }",
"public abstract void sendToChain(String mesg);",
"@Override\n public void sendToProxy(String message) {\n }",
"void sendMessage() {\n\n\t}",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.591 -0500\", hash_original_method = \"73417FF22870072B41D9E8892C6ACEAF\", hash_generated_method = \"98D30C9AEE1B66AD2FCFA7D7A2E2B430\")\n \nprivate static Message sendMessageSynchronously(Messenger dstMessenger, Message msg) {\n SyncMessenger sm = SyncMessenger.obtain();\n try {\n if (dstMessenger != null && msg != null) {\n msg.replyTo = sm.mMessenger;\n synchronized (sm.mHandler.mLockObject) {\n dstMessenger.send(msg);\n sm.mHandler.mLockObject.wait();\n }\n } else {\n sm.mHandler.mResultMsg = null;\n }\n } catch (InterruptedException e) {\n sm.mHandler.mResultMsg = null;\n } catch (RemoteException e) {\n sm.mHandler.mResultMsg = null;\n }\n Message resultMsg = sm.mHandler.mResultMsg;\n sm.recycle();\n return resultMsg;\n }",
"@Override\n public ForwardStatus forward(IPersistable data)\n throws StoreForwardException\n {\n // Received data from callback.\n if ( data.getData() == null ) return null;\n\n StringBuilder sb = new StringBuilder(2048); // Define a size if you have an idea of it.\n char[] read = new char[128]; // Your buffer size.\n\n try (InputStreamReader ir = new InputStreamReader(data.getData(), StandardCharsets.UTF_8))\n {\n for (int i; -1 != (i = ir.read(read)); sb.append(read, 0, i))\n {\n // do nothing\n }\n }\n catch (Throwable t) // NOSONAR\n {\n // ignore\n }\n\n _logger.info(\"Received to forward data with data: \" + sb.toString()); //$NON-NLS-1$\n\n // When signal recieved, send the ForwardStatus\n return ForwardStatus.SUCCESSFUL;\n // return ForwardStatus.FAILED;\n\n }",
"void process(ToSend m) {\n ByteBuffer requestBuffer = buildMsg(m.state.ordinal(), m.leader, m.zxid, m.electionEpoch, m.peerEpoch, m.configData);\n\n manager.toSend(m.sid, requestBuffer);\n\n }",
"public void handleMessage(Message message);",
"public void send() {\n\t}",
"@Override\r\n\t public void run() {\n\t\tsuper.run();\r\n\t\ttry {\r\n\t\t // String newParams=URLEncoder.encode(params, \"utf-8\");\r\n\t\t String newurl = url + \"?\" + params;\r\n\r\n\t\t URL uri = new URL(newurl);\r\n\t\t try {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) uri\r\n\t\t\t\t.openConnection();\r\n\t\t\tconn.connect();\r\n\t\t\t// 获取返回结果\r\n\t\t\tif (conn.getResponseCode() == 200) {\r\n\t\t\t InputStream is = conn.getInputStream();\r\n\t\t\t String result = convertInputStreamToString(is);\r\n\t\t\t // 通过handle发送消息\r\n\t\t\t Message msg = new Message();\r\n\t\t\t msg.what = 2;\r\n\t\t\t msg.obj = result;\r\n\t\t\t handle.sendMessage(msg);\r\n\t\t\t}\r\n\t\t } catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t }\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t // TODO Auto-generated catch block\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t }",
"public void sendFinished(LinkLayerMessage message) {\n\t\t\n\t}",
"public void readForward() {\n\t\tiStream = new ByteArrayInputStream(marshalledBytes);\t\n\t\tdin = new DataInputStream(new BufferedInputStream(iStream));\n\t\ttry {\n\t\t\tint nRouteStops = din.readInt();\n\t\t\tint routeByteLength = din.readInt();\n\t\t\tbyte[] routeBytes = new byte[routeByteLength];\n\t\t\tdin.readFully(routeBytes);\n\t\t\tlong payload = din.readLong();\n\n\t\t\tArrayList<String> route = new ArrayList<String>();\n\t\t\tByteArrayInputStream bis = new ByteArrayInputStream(routeBytes);\n\t\t\tDataInputStream dis = new DataInputStream(bis);\n\t\t\tint nameLength; byte[] ipNameBytes; String ip;\n\t\t\tfor (int i=0; i< nRouteStops; i++ ) {\n\t\t\t\tnameLength = dis.readInt();\n\t\t\t\tipNameBytes = new byte[nameLength];\n\t\t\t\tdis.readFully(ipNameBytes);\n\t\t\t\tip = new String(ipNameBytes);\n\t\t\t\troute.add(ip);\n\t\t\t}\n\n\t\t\tif(nRouteStops == 0) {\n\t\t\t\tnode.addToReceiveSum(payload);\n\t\t\t\tnode.incrementReceiveTracker();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSocket senderSocket=null; Message message=null;\n\t\t\t\tnode.incrementRelayTracker();\n\t\t\t\tfor(int i =0; i<route.size();i++) {\n\t\t\t\t\tif (node.getConnections().getSocketWithName(route.get(i))!=null) {\n\t\t\t\t\t\tString nextStop = route.remove(i);\n\t\t\t\t\t\t message = new ForwardMessage(route,payload);\n\t\t\t\t\t\tsenderSocket = node.getConnections().getSocketWithName(nextStop);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnew TCPSender(senderSocket, message);\n\t\t\t}\n\t\t} catch (IOException e) { System.out.println(\"Failed to read message. \"); }\n\t}",
"@Override\n public void run() {\n Message message = new Message();\n message.what=1;\n handler.sendMessage(message);\n }",
"@Override\n\tpublic void process(MessageStream<ServerMessage> message)\n\t{\n\t\t\n\t}",
"public void process(SymmetricMessage msg) throws IOException {\n relay(msg);\n }",
"private void forwardRoomMessage(EcologyMessage message) {\n String targetRoomName = null;\n try {\n targetRoomName = (String) message.fetchArgument();\n } catch (ClassCastException | IndexOutOfBoundsException e) {\n //throw new IllegalArgumentException(\"Unrecognized message format.\");\n Log.e(TAG, \"Exception \" + e.getMessage());\n }\n\n Room room = rooms.get(targetRoomName);\n if (room != null) {\n room.onMessage(message);\n }\n }",
"@Override\n\tpublic void onMessage(Object arg0) {\n\t\t\n\t}",
"@Override\n public void run() {\n Message message = new Message();\n message.what = 4;\n handler.sendMessage(message);\n }",
"void sendFinishMessage();",
"void onSendMessageComplete(String message);",
"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 }",
"@Override\n\t\tpublic void onDirectMessage(DirectMessage arg0) {\n\t\t\t\n\t\t}",
"public final Message forwardMessage(ForwardMessageToSend fts)\n\t{\n\t\tif(fts == null)\n\t\t\treturn null;\n\t\treturn rm.forwardMessage(fts);\n\t}",
"public Object call() throws Exception {\n\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\tif ( reference.asNativeRemoteFarReference().getTransmitting()){\n\t\t\t\t\t\t\t// if there is a thread transmitting a message for this reference:\n\t\t\t\t\t\t\t// resolve the future with a BlockingFuture to wait for the result of the transmission.\n\t\t\t\t\t\t\tBlockingFuture future = setRetractingFuture(reference);\n\t\t\t\t\t\t\treturn future.get();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// if there is no thread transmitting a message for this reference:\n\t\t\t\t\t\t\t// resolve the future immediately with the content of its oubox.\n\t\t\t\t\t\t\treturn reference.asNativeRemoteFarReference().impl_retractOutgoingLetters();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n protected void channelRead0(ChannelHandlerContext ctx, Message msg)\n {\n mDispatcher.dispatch(mPeer, msg);\n }",
"public int processMessage(OSACallbackMessage response) throws Exception\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString correlationId = \"osa.callback.\" + response.getSessionId();\r\n\r\n\t\t\tObject waitingRequest = QueueFactory.callbackListerner.get(correlationId);\r\n\r\n\t\t\tif (waitingRequest != null)\r\n\t\t\t{\r\n\t\t\t\tif (waitingRequest instanceof CommandMessage)\r\n\t\t\t\t{\r\n\t\t\t\t\tresponse.setIsdn(((CommandMessage)waitingRequest).getIsdn());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsynchronized (waitingRequest)\r\n\t\t\t\t{\r\n\t\t\t\t\tQueueFactory.callbackOrder.put(correlationId, response);\r\n\r\n\t\t\t\t\twaitingRequest.notifyAll();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (dispatcher.queueDispatcherEnable)\r\n\t\t\t{\r\n\t\t\t\tMessage message = QueueFactory.createObjectMessage(session, response);\r\n\t\t\t\tmessage.setJMSCorrelationID(response.getSessionId());\r\n\r\n\t\t\t\tproducer.send(message);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlogMonitor(\"request listener not found: \" + response.getCause() + \" - \" + response.getSessionId());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ((response != null) && dispatcher.displayDebug)\r\n\t\t\t{\r\n\t\t\t\tStringBuilder sbLog = new StringBuilder();\r\n\t\t\t\t\r\n\t\t\t\tsbLog.append(\"local attached: \");\r\n\t\t\t\tsbLog.append(response.getSessionId());\r\n\t\t\t\tsbLog.append(\", \");\r\n\t\t\t\tsbLog.append(response.getCause());\r\n\t\t\t\t\r\n\t\t\t\tif (!response.getIsdn().equals(\"\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tsbLog.append(\", \");\r\n\t\t\t\t\tsbLog.append(response.getIsdn());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdebugMonitor(sbLog.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tQueueFactory.attachLocal(dispatcher.queueLocalName, response);\r\n\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\t\r\n\t\treturn Constants.BIND_ACTION_SUCCESS;\r\n\t}",
"protected void forward(IAnnounceEvent event){\r\n \t\ttry {\r\n \t\t\t_wrappedOut.write(event.getSerial());\r\n \t\t\t_output.writeASE(event.toSExp());\r\n \t\t} catch (IOException e) {\r\n \t\t\tSystem.err.println(\"Failed forwarding the message:\\n\"+event.toSExp()+\"\\nbecause: \"+e.getMessage());\r\n \t\t}\r\n \t}",
"public void forward() {\n callFunction(\"forward\");\n }",
"@Override\n public void onChatMessageFragmentInteraction(MessageEnum message, Object result) {\n ((MyMessage)result).setSenderId(this.user.getUserId());\n ((MyMessage)result).setReceiverId(this.receiverId);\n ((MyMessage)result).setBookId(this.selectedBook.getBookId());\n //send message to message list\n databaseHandler.sendMessageToDatabase((MyMessage)result);\n //message should come back with reference change?\n }",
"public void fastForward() {\n try {\n mSessionBinder.fastForward(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling fastForward.\", e);\n }\n }",
"public void handleMessageFromClient(Object msg) {\n\n }",
"public void sendToManager(){\n String receiveMessage;\n while((receiveMessage=receiveFrom(messageReader)) != null){\n manager.manage(receiveMessage);\n }\n }",
"@Override\n\tprotected void doReceiveMessage(Message msg) {\n\t\tdeliverMessage(msg);\n\t}",
"void send();",
"void tell(String message, Result<Actor<InputOutput>> sender);",
"@Override\n\tpublic void requestHandle(IPlayer player, IMessage message) {\n\t\t\n\t}",
"@Override\n public void run() {\n send();\n }",
"@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}",
"public void sendRemainData();",
"private void forwardMessageToHub(HubDescription p, ClientMessage cm) {\n\n if (meslogger.isDebugEnabled()) {\n meslogger.debug(\"Attempting to forward message to hub \"\n + p.hubAddress);\n }\n\n if (directlyToHub(p.hubAddress, cm)) {\n\n if (meslogger.isDebugEnabled()) {\n meslogger.debug(\"Succesfully forwarded message to hub \"\n + p.hubAddressAsString + \" using direct link\");\n }\n\n stats.infoMessagesForwarded++;\n return;\n }\n\n if (cm.hopsLeft == 0) {\n if (meslogger.isInfoEnabled()) {\n meslogger\n .info(\"Failed to forward message to hub \"\n + p.hubAddressAsString\n + \" and we are not allowed to use\"\n + \" an indirection!\");\n }\n\n stats.infoMessagesDropped++;\n return;\n }\n\n if (meslogger.isDebugEnabled()) {\n meslogger.debug(\"Failed to forward message to hub \"\n + p.hubAddressAsString + \" using direct link, \"\n + \"trying indirection\");\n }\n\n // We don't have a direct connection, but we should be able to reach the\n // proxy indirectly\n HubDescription p2 = p.getIndirection();\n\n if (p2 == null) {\n // Oh dear, we don't have an indirection!\n meslogger.warn(\"Cannot forward message. No route to hub: \" + p.hubAddressAsString\n + \" (indirection address is null!)\");\n\n stats.infoMessagesDropped++;\n return;\n }\n\n if (directlyToHub(p2.hubAddress, cm)) {\n if (meslogger.isDebugEnabled()) {\n meslogger.debug(\"Succesfully forwarded message to hub \"\n + p2.hubAddressAsString + \" using direct link\");\n }\n\n stats.infoMessagesForwarded++;\n return;\n }\n\n if (meslogger.isInfoEnabled()) {\n meslogger.info(\"Failed to forward message to hub \"\n + p.hubAddressAsString + \" or it's indirection \"\n + p2.hubAddressAsString);\n }\n\n stats.infoMessagesDropped++;\n }",
"Future<Message> send();",
"@Override\n\tprotected void doAsyncExecute(VoiceMessage requestMessage) {\n\n\t}",
"private String requesttosend() throws IOException {\n\t\tsender.sendMsg(Constants.REQSEND);\r\n\t\t//等待接收的返回状态\r\n\t\treturn sender.getMsg();\r\n\t}",
"public ChannelFuture writeOneInbound(Object msg) {\n/* 339 */ return writeOneInbound(msg, newPromise());\n/* */ }",
"@Override\n protected void decode(ChannelHandlerContext ctx, Message msg, List<Object> out) throws Exception \n {\n GameAppContext context = ctx.channel().attr(GameAppContextKey.KEY).get();\n \n // and let the context decide what to do with the message\n context.handleMessage(msg);\n \n // we dont break the cycle here - maybe other handlers sit behind this one\n out.add(msg);\n }",
"private void next() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>pc\" + pc.toString());\n\t\t\tSystem.out.println(\"DEBUG>>>pc_replay\" + pc_reply.toString());\n\t\t\tib.transact(2, pc, pc_reply, 0);\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void handleMessage(Message msg) {\n\t\t\tLog.e(\"DownloaderManager \", \"newFrameHandler\");\n\t\t\tMessage msgg = new Message();\n\t\t\tmsgg.what=2;\n\t\t\tmsgg.obj = msg.obj;\n\t\t\t\n\t\t\t_replyTo.sendMessage(msgg);\n\t\t\t\n\t\t\t\n\t\t}",
"@DSSafe(DSCat.IPC_CALLBACK)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.580 -0500\", hash_original_method = \"2469457C965E8FC7C139A1D414384428\", hash_generated_method = \"42C86E9B0B120923F19E3F5FDF13C046\")\n \n@Override\n public void handleMessage(Message msg) {\n mResultMsg = Message.obtain();\n mResultMsg.copyFrom(msg);\n synchronized(mLockObject) {\n mLockObject.notify();\n }\n }",
"public void send(Message msg);",
"abstract public Object handleMessage(Object message) throws Exception;",
"@Override\n\tpublic void run() {\n\t\ttarget.call(msg);\n\t}",
"void onMessageReceived(Message message);",
"public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}",
"public void onMessage(Session session);",
"@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }",
"@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }",
"@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }",
"@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }",
"@Override\n\tpublic void receive() {\n\t}",
"protected void handleInboundMessage(Object msg) {\n/* 748 */ inboundMessages().add(msg);\n/* */ }",
"@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}",
"@Override\n\tpublic void msgAtFrige() {\n\t\t\n\t}",
"Message getNextMessage();",
"@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}",
"@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, WsClientMessage msg) throws Exception {\n\t}",
"@Override\n\tprotected void doAction(Object message) {\n\t\tlogger.info(\"File Scanner Fetch message Name -->:\"+message.toString());\n\t\ttry {\n\t\t\tFileParser.queue.put(message);\n\t\t} catch (InterruptedException e) {\n\t\t\tlogger.error(\"Error on add message to Parser\");\n\t\t}\n\t}",
"private void forwardRequest(String recordId, String body) {\n\t\tSystem.out.println(\"recordId : \"+recordId + \" body : \"+body);\n\n\t}",
"void mo80456b(Message message);",
"void finish(Channel channel, Object msg);",
"public abstract void message();",
"public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n Logger.getLogger(ResponseMessage.class.getName()).log(Level.SEVERE, null, ex);\n }\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 }",
"public abstract void processHistoryRequest(Message message);",
"@Override\n\tpublic void visit(Message message) {\n\t}",
"@Override\n public void run() {\n reprocessPendingMessage();\n }",
"@Override\n\tpublic void dispatchHandler(Message msg) {\n\t\t\n\t}",
"public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }",
"@Override\n\tpublic void processMessage(byte[] message) {\n\t}",
"@Override\n\tpublic void completed(Void arg0, Void arg1) {\n\t\tif(this.count < max){\n\t\t\tthis.count += 1;\n\t\t\tString msg = \"[\"+client.name+\"] hello this my \"+count+\"rd mssage-\"+System.currentTimeMillis();\n\t\t\tclient.writeProtocolMessage(msg,this);\n\t\t}\n\t}",
"public void OnMessageReceived(String msg);",
"abstract void onMessage(byte[] message);",
"public ChannelFuture writeOneOutbound(Object msg) {\n/* 422 */ return writeOneOutbound(msg, newPromise());\n/* */ }",
"private void sendCurrentState() {\n\ttry {\n\t channel.sendObject(getState());\n\t} catch (IOException e) {\n\t Log.e(\"423-client\", e.toString());\n\t}\n }",
"void mo80453a(Message message);",
"protected void handleOutboundMessage(Object msg) {\n/* 741 */ outboundMessages().add(msg);\n/* */ }"
] | [
"0.69605255",
"0.65324163",
"0.6414518",
"0.640938",
"0.63006413",
"0.62744045",
"0.62621546",
"0.623662",
"0.62354004",
"0.62072515",
"0.61957777",
"0.61896145",
"0.6177905",
"0.6177206",
"0.6142793",
"0.613106",
"0.6121708",
"0.6121259",
"0.6120394",
"0.6102849",
"0.60891217",
"0.6070483",
"0.6070458",
"0.60649693",
"0.6061009",
"0.60519886",
"0.60512674",
"0.6048395",
"0.60425705",
"0.6042354",
"0.6038564",
"0.6025417",
"0.6021911",
"0.60218054",
"0.60190994",
"0.6009186",
"0.60083544",
"0.6004304",
"0.59865236",
"0.59744674",
"0.5966021",
"0.5964873",
"0.5960923",
"0.59519047",
"0.5941057",
"0.59219015",
"0.5910122",
"0.59091985",
"0.5904412",
"0.59009737",
"0.5899187",
"0.5895194",
"0.5892289",
"0.5857718",
"0.5849675",
"0.5849228",
"0.58488894",
"0.58418924",
"0.5835155",
"0.583139",
"0.5830885",
"0.58289826",
"0.5827738",
"0.57987505",
"0.57976234",
"0.5789791",
"0.5785648",
"0.5784907",
"0.57747334",
"0.5770154",
"0.5770154",
"0.5770154",
"0.5770154",
"0.576809",
"0.5763838",
"0.5762691",
"0.5760434",
"0.5759651",
"0.5755887",
"0.5751612",
"0.57483304",
"0.57449263",
"0.57409084",
"0.5740265",
"0.5736784",
"0.5731664",
"0.5729507",
"0.57289165",
"0.5722102",
"0.57155615",
"0.5713649",
"0.5713328",
"0.5709036",
"0.57031846",
"0.56981015",
"0.56923664",
"0.56897837",
"0.56895965",
"0.5675149",
"0.5674565"
] | 0.5733932 | 85 |
TODO: Should be asynchronous ??? forward the message ack | private final void forwardVirtualMessageAck(long index, int data) {
try {
synchronized (out) {
out.write(MessageForwarderProtocol.MESSAGE_VIRTUAL_ACK);
out.writeLong(index);
out.writeInt(data);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ack() {\n }",
"@Override\n protected boolean shouldAck() {\n return true;\n }",
"boolean needsAck() { return true; }",
"public boolean ack() {\n return ack;\n }",
"@Override\r\n\tpublic int ack(int x, int y) {\n\t\treturn 0;\r\n\t}",
"public void ack() {\n //disable current awaiting handler\n testFuture.cancel(false);\n //reset number of tryies;\n tryCount = 0;\n //shcedule next ping\n testFuture = mtpTimer.schedule(this, Mtp3.TIMEOUT_T2_SLTM, TimeUnit.SECONDS);\n if (logger.isDebugEnabled()) {\n \tlogger.debug(String.format(\"(%s) Test message acknowledged, Link test passed\", link.name));\n }\n }",
"public void handleAck() {\n\t\tlong start = System.currentTimeMillis();\n\t\tlong end = start;\t\n\t\tint userCnt = users.size();\n\t\tSystem.out.println(\"handling ack in Server\");\n\t\twhile(CommitDecision.size() != 0){\n\t\t\tif(end - start >= 3000) {\n\t\t\t\tfor(String user: CommitDecision.keySet()) {\n\t\t\t\t\tSystem.out.println(\"resend ack to \"+ user+ \" for task \"+ filename);\n\t\t\t\t\tPL.sendMessage(CommitDecision.get(user));\n\t\t\t\t}\n\t\t\t\tstart = end;\n\t\t\t}else {\n\t\t\t\tMsg tmp = notYetAck.poll();\n\t\t\t\tif(tmp != null && CommitDecision.containsKey(tmp.user)) {\n\t\t\t\t\tCommitDecision.remove(tmp.user);\n\t\t\t\t\tSystem.out.println(tmp.user+\" 's ack has been received\");\n\t\t\t\t}\n\t\t\t\tend = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\n\t}",
"private void sendAcknoledmentOfReceipt() {\n\t\ttry {\n\t\t\tthis.receiver.sendLetter(new AcknowledgmentOfReceipt(this.receiver, this.sender, this.getDescription()));\n\t\t} catch (NoSuchMoneyException e) {}\n\t}",
"messages.Ackinterface.AckInterface getAck();",
"void acked(boolean timedOutMessage);",
"public void handleAcknowledge( Acknowledge ack )\n {\n TTL_CIL_Message msg = null;\n //\tTTL_CIL_Message msg = translator.translate( ack );\n\n try\n {\n cil.sendMessage( msg );\n }\n catch( IOException ioe )\n {\n\n }\n return;\n }",
"boolean getAck();",
"void onAckReceived(int source);",
"protected int handleAck(Msg msg)\n {\n System.out.println(\"Received AckMsg for stream \" + msg.streamId());\n MsgKey key = msg.msgKey();\n\n //print out item name from key if it has it\n if (key != null && key.checkHasName())\n {\n System.out.println(key.name() + \"\\nDOMAIN: \" +\n DomainTypes.toString(msg.domainType()));\n }\n\n AckMsg ackMsg = (AckMsg)msg;\n System.out.println(\"\\tackId=\" + ackMsg.ackId() + (ackMsg.checkHasSeqNum() ? \"\\tseqNum=\" + ackMsg.seqNum() : \"\") +\n (ackMsg.checkHasNakCode() ? \"\\tnakCode=\" + ackMsg.nakCode() : \"\") +\n (ackMsg.checkHasText() ? \"\\ttext=\" + ackMsg.text().toString() : \"\"));\n return CodecReturnCodes.SUCCESS;\n }",
"public void ack(Object arg0) {\n\t\tSystem.out.println(\"WordReader.ack(Object arg0):\"+arg0);\n\t}",
"private void ackit(String queryId){\n ResponseSender sender = responseSenderQueueForQuery.get(queryId).remove();\n sender.send(new Response(RpcType.ACK, Acks.OK));\n }",
"boolean hasAck();",
"boolean ack( long revision );",
"public void ack(Object msgId) {\n Message msg = this.pendingMessages.remove(msgId);\n JmsMessageId oldest = this.toCommit.first();\n if (msgId.equals(oldest)) {\n if (msg != null) {\n try {\n log.debug(\"Committing...\");\n msg.acknowledge();\n log.debug(\"JMS Message acked: \" + msgId);\n this.toCommit.remove(msgId);\n } catch (JMSException e) {\n log.warn(\"Error acknowldging JMS message: \" + msgId, e);\n }\n } else {\n log.warn(\"Couldn't acknowledge unknown JMS message ID: \" + msgId);\n }\n } else {\n this.toCommit.remove(msgId);\n }\n\n }",
"void beforeAckMessage(Message message, MutationBatch mb);",
"public void ack(Object msgId) {\n\t\tthis.pendingMessages.remove(msgId);\n\t}",
"public interface Ack {\n\t/**\n\t * Determines whether the response is success\n\t * @return\n\t */\n\tpublic boolean isSuccess();\n\t\n\t/**\n\t * Get the message response\n\t * @return\n\t */\n\tpublic String getMessage();\n\t\n\t/**\n\t * Get player's uuid response\n\t * @return\n\t */\n\tpublic UUID getUuid();\n\t\n\t/**\n\t * Set whether response is success or not\n\t * @param success\n\t */\n\tpublic void setSuccess(boolean success);\n\t\n\t/**\n\t * Set message response\n\t * @param message\n\t */\n\tpublic void setMessage(String message);\n\t\n\t/**\n\t * Set player's uuid response\n\t * @param uuid\n\t */\n\tpublic void setUuid(UUID uuid);\n}",
"private void messageAck(long messageID, UUID subChannelID) throws MQTTException {\n try {\n connector.messageAck(messageID, subChannelID);\n } catch (AndesException ex) {\n final String message = \"Error occurred while cleaning up the acked message\";\n log.error(message, ex);\n throw new MQTTException(message, ex);\n }\n }",
"private void sendAck(DOPEPacket packet) throws IOException {\n\t\tDOPEPacket ack = new DOPEPacket(Control.ACK_OP_CODE, packet.getSequenceNumber());\n\t\tsend(ack);\n\t\tSystem.out.println(\"Sent ack:\\n\" + ack);\n\t}",
"@Test\n public void testRegisterAck() throws Exception {\n System.out.println(\"registerAck\");\n\n Sendable s = sendAMessage();\n\n String a = s.getMessageId();\n String comment = \"comment\";\n String ack = \"ack\";\n instance.setEbXmlEventListener(ebXmlEventListener);\n\n // removes the message that's just been added but doesn't delete the file because there isn't one yet\n instance.registerAck(a, comment, ack);\n }",
"public boolean getAck() {\n return ack_;\n }",
"public messages.Ackinterface.AckInterface getAck() {\n return ack_;\n }",
"@Override\n\t\tboolean needsAck() {\n\t\t\treturn byteChunks.length > 0; // don't retry empty ack\n\t\t}",
"private Packet handleAckRequestedAction(Packet request) {\n boolean noStateUpdate = (rc.configuration.getInternalRmFeature() != null);\n\n AcknowledgementData ackData = rc.protocolHandler.getAcknowledgementData(request.getMessage());\n rc.destinationMessageHandler.processAcknowledgements(ackData, noStateUpdate);\n\n return rc.protocolHandler.createEmptyAcknowledgementResponse(rc.destinationMessageHandler.getAcknowledgementData(ackData.getAckReqestedSequenceId(), true, noStateUpdate), request);\n }",
"public boolean getAck() {\n return ack_;\n }",
"boolean getLockstepAck();",
"private void receiveNack(Evt e) {\n\t\tif (!nackReceived && e.getMessage()!= currentlyOptimisticallyTransmitted) {\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t//\tthrow new IllegalStateException(\"A nack corresponding to a message that isn't the one in the buffer has been received. This means that something is wrong (at time \" + e.getTimeNS() + \")\");\r\n\t\t}\r\n\t\t\r\n\t\tif (currentlyOptimisticallyTransmitted == null)\r\n\t\t\treturn;\r\n\r\n\t\tif (nackReceived == false) {\r\n\t\t\tif (lwSimExperiment.isWithTimeLine())\r\n\t\t\t\ttimeline.addJobPhase(lastPacketStart, e.getTimeNS(), currentlyOptimisticallyTransmitted.origin + \"->\" + currentlyOptimisticallyTransmitted.dest + \"\\n\" + currentlyOptimisticallyTransmitted.index + \":NACK\", Color.RED);\t\t\r\n\t\t\t// immediately resend\t\t\t\r\n\t\t\tnackReceived = true;\r\n\t\t\t// correct transmission time in the case of NACK Mode\r\n\t\t\tif (!this.ACKMode)\r\n\t\t\t\tlwSimExperiment.reportTransTime(index, e.getTimeNS() - lastPacketStart - packetDuration, currentlyOptimisticallyTransmitted);\r\n\t\t\t\r\n\t\t\tSpinetMessage dupl = currentlyOptimisticallyTransmitted.getCopy();\r\n\t\t\tgetQueue(dupl.dest).remove(currentlyOptimisticallyTransmitted);\r\n\t\t\tgetQueue(dupl.dest).addFirst(dupl);\r\n\t\t\tmainQueue.addFirst(dupl);\r\n\t\t\tdefineSpinetMessage(dupl);\r\n\t\t\tlwSimExperiment.packetRetransmitted(dupl);\r\n\t\t\tcurrentlyOptimisticallyTransmitted = null;\r\n\t\t}\t\t\r\n\t}",
"private void sendAcknowledgePacket(KarelPacket ackKarelPacket) throws IOException {\n if (ackKarelPacket != null) {\n DatagramPacket packet;// Else, if we should send ack packet, send it\n packet = ackKarelPacket.createDatagramPacket(address, port);\n socket.send(packet);\n if (Robot.verbose) {\n System.out.println(\"SEND(ack): \" + ackKarelPacket.toString());\n }\n }\n }",
"public SendAck(int id_message){\r\n\t\tsuper();\r\n\t\tthis.id_message = id_message ;\r\n\t}",
"messages.Ackinterface.AckInterfaceOrBuilder getAckOrBuilder();",
"public boolean getAck() {\n\t\t\t\treturn ack_;\n\t\t\t}",
"void receiveAcknowledgement() {\n byte[] receiveBuffer = new byte[2048];\n DatagramPacket receivePacket = new DatagramPacket(receiveBuffer, receiveBuffer.length);\n try {\n recSocket.receive(receivePacket);\n String dataReceived = new String(receivePacket.getData()).trim();\n System.out.println(\"\\n\" + dataReceived);\n\n } catch (IOException e) {\n System.out.println(\"\\nAcknowledgement not received!\");\n }\n }",
"public boolean getAck() {\n\t\t\treturn ack_;\n\t\t}",
"public boolean sendAcknowledgement(XMPPBean bean) {\n//\t\tSystem.out.println(\"Player.sendAcknowledgment() \" + bean.getNamespace());\n\t\tbean.setFrom(fromJID);\n\t\tbean.setTo(jid);\n\t\tbean.setType(XMPPBean.TYPE_RESULT);\n\t\tconnection.sendPacket(new BeanIQAdapter(bean));\n\t\treturn true;\n\t}",
"public boolean cleaningAck(Msg ack) {\n\t\tnotYetAck.offer(ack);\n\t\tString lastUser = ack.user;\n\t\tif(CommitDecision.size() == 1 && CommitDecision.containsKey(lastUser)) {\n\t\t\tSystem.out.println(\"last ack received\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private Packet handleSequenceAcknowledgementAction(Packet request) {\n AcknowledgementData ackData = rc.protocolHandler.getAcknowledgementData(request.getMessage());\n rc.destinationMessageHandler.processAcknowledgements(ackData);\n\n request.transportBackChannel.close();\n return rc.communicator.createNullResponsePacket(request);\n }",
"private void sendMessAckMessage(int messageNumber, User user) {\n Logger.log(\"Sending ack to ( \" + messageNumber + \") to \" + user.getName());\n MessAckMessage messAckMessage = new MessAckMessage(messageNumber);\n logMessage(messAckMessage, user, true);\n ni.performSendMessAckMessage(messAckMessage, user);\n }",
"private void handleAcknowledgment(FullExtTcpPacket packet) {\n\n // Invariant: receiver can *only* receive a duplicate third handshake acknowledgment\n long ack = packet.getAcknowledgementNumber();\n if (this.isReceiver()) {\n assert(ack == sendNextNumber && sendNextNumber == sendUnackNumber && packet.getDataSizeByte() == 0 && !packet.isSYN());\n return;\n }\n\n // Flowlet recording\n if (packet.getEchoFlowletId() < currentFlowlet) {\n SimulationLogger.increaseStatisticCounter(\"TCP_FLOWLET_OUT_OF_ORDER\");\n } else {\n currentFlowlet = packet.getEchoFlowletId();\n tcpLogger.logMaxFlowlet(currentFlowlet);\n }\n\n // If all flow is confirmed, we do not handle any more acknowledgments as sender\n if (isAllFlowConfirmed()) {\n return;\n }\n\n // Log current congestion window\n tcpLogger.logCongestionWindow(this.congestionWindow);\n\n // Round-trip time estimation; follows RFC 6298\n double RAcc = (Simulator.getCurrentTime() - packet.getEchoDepartureTime());\n if (firstRttMeasurement) {\n smoothRoundTripTime = RAcc;\n roundTripTimeVariation = smoothRoundTripTime / 2;\n firstRttMeasurement = false;\n } else {\n roundTripTimeVariation = 0.75 * roundTripTimeVariation + 0.25 * Math.abs(smoothRoundTripTime - RAcc);\n smoothRoundTripTime = 0.875 * smoothRoundTripTime + 0.125 * RAcc;\n }\n roundTripTimeout = (long) Math.max(MINIMUM_ROUND_TRIP_TIMEOUT, (2 * smoothRoundTripTime + 4 * roundTripTimeVariation));\n\n int newPacketsAcked = 0;\n\n // FLOW ACKNOWLEDGMENT: SELECTIVE ACKNOWLEDGMENT RANGES\n Set<Long> outstandingSegmentSeqs = new HashSet<>(sentOutUnacknowledgedSegStartSeqNumbers);\n for (Long segSeq : outstandingSegmentSeqs) {\n long size = getFlowSizeByte(segSeq);\n long segAck = segSeq + size;\n\n // Check if an outstanding segment falls within the selective acknowledgment ranges\n for (AckRange r : packet.getSelectiveAck()) {\n if (r.isWithin(segSeq, segAck)) {\n confirmSegment(segSeq);\n newPacketsAcked++;\n }\n }\n\n }\n\n // FLOW ACKNOWLEDGMENT: CUMULATIVE ACKNOWLEDGMENT\n outstandingSegmentSeqs = new HashSet<>(sentOutUnacknowledgedSegStartSeqNumbers); // Set<Long>\n for (Long segSeq : outstandingSegmentSeqs) {\n long size = getFlowSizeByte(segSeq);\n long segAck = segSeq + size;\n if (segAck <= ack) {\n confirmSegment(segSeq);\n newPacketsAcked++;\n }\n }\n\n // MOVE WINDOW AS FAR AS POSSIBLE\n // Continue on with the other packets that have also have been\n // received already\n long acknowledgedBytes = 0;\n while (acknowledgedSegStartSeqNumbers.contains(sendUnackNumber)) {\n acknowledgedSegStartSeqNumbers.remove(sendUnackNumber);\n\n // Retrieve size of the already out-of-order (selectively) acknowledged packet\n long size = getFlowSizeByte(sendUnackNumber);\n\n // A packet's data is thus acknowledged\n this.confirmFlow(size);\n\n // Consume the window further\n sendUnackNumber += size;\n acknowledgedBytes += size;\n\n }\n\n // The window that we want to send can't start at already acknowledged numbers\n sendNextNumber = Math.max(sendNextNumber, sendUnackNumber);\n\n // Handle the action if it is marked with ECE\n if (packet.isECE()) {\n handleECEMarkedPacket();\n }\n\n // Increment window for every packet acknowledged by this acknowledgement\n for (int i = 0; i < newPacketsAcked; i++) {\n phaseIncrementCongestionWindow();\n }\n\n // Update alpha\n updateAlpha(packet, acknowledgedBytes);\n\n // Send out as much as possible\n sendPendingData();\n\n // Log current congestion window\n tcpLogger.logCongestionWindow(this.congestionWindow);\n\n // Flow is finished if nothing is sent and everything\n // has been acknowledged\n if (sendUnackNumber == sendNextNumber) {\n assert(isAllFlowConfirmed());\n assert(sentOutUnacknowledgedSegStartSeqNumbers == null || sentOutUnacknowledgedSegStartSeqNumbers.isEmpty());\n assert(acknowledgedSegStartSeqNumbers == null || acknowledgedSegStartSeqNumbers.isEmpty());\n assert(seqNumbToResendEventMap == null || seqNumbToResendEventMap.isEmpty());\n this.sentOutUnacknowledgedSegStartSeqNumbers = null;\n this.acknowledgedSegStartSeqNumbers = null;\n this.seqNumbToResendEventMap = null;\n this.selectiveAckSet = null;\n }\n\n }",
"private void pubackHandler(int messageId) {\n\n LOG.info(\"PUBACK [{}] from MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n\n // a PUBLISH message with QoS 1 was sent to remote MQTT client (not settled yet at source)\n // now PUBACK is received so it's time to settle\n this.rcvEndpoint.settle(messageId);\n }",
"@Override\n public void onAcknowledgement(RecordMetadata rm, Exception excptn) {\n }",
"public static void sendAcknowledgmentToClient(GameServer server, ChannelHandlerContext ctx, String message) {\n Command displayErrorCommand = new Command();\n displayErrorCommand.setCommandName(\"displayAcknowledgment\");\n displayErrorCommand.setCommandArgs(new Object[] {message});\n server.sendCommandToClient(displayErrorCommand, ctx.getChannel());\n }",
"private final void forwardVirtualConnectACKACK(long index, boolean succes) {\n try {\n synchronized (out) {\n out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_ACK_ACK);\n out.writeLong(index);\n out.writeBoolean(succes);\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n\n // System.err.println(\"****** ACK ACK OUT DONE \" + index + \" \" +\n // succes);\n }",
"public messages.Ackinterface.AckInterfaceOrBuilder getAckOrBuilder() {\n return ack_;\n }",
"protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }",
"public messages.Ackinterface.AckInterface getAck() {\n if (ackBuilder_ == null) {\n return ack_;\n } else {\n return ackBuilder_.getMessage();\n }\n }",
"public Builder setAck(boolean value) {\n bitField0_ |= 0x00000001;\n ack_ = value;\n onChanged();\n return this;\n }",
"protected void forward(IAnnounceEvent event){\r\n \t\ttry {\r\n \t\t\t_wrappedOut.write(event.getSerial());\r\n \t\t\t_output.writeASE(event.toSExp());\r\n \t\t} catch (IOException e) {\r\n \t\t\tSystem.err.println(\"Failed forwarding the message:\\n\"+event.toSExp()+\"\\nbecause: \"+e.getMessage());\r\n \t\t}\r\n \t}",
"void beforeAckMessages(Collection<Message> messages, MutationBatch mb);",
"private void sendACK(int SeqNr) {\r\n\t\ttry {\r\n\t\t\tif(SeqNr == 0) receivingSocket.send(new DatagramPacket(ACK0,ACK0.length,rcvpkt.getAddress(),rcvpkt.getPort()));\r\n\t\t\tif(SeqNr == 1) receivingSocket.send(new DatagramPacket(ACK1,ACK1.length,rcvpkt.getAddress(),rcvpkt.getPort()));\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void handleAckReceived(UUID channel, long messageID) throws AndesException {\n if(log.isDebugEnabled()) {\n log.debug(\"Ack Received message id= \" + messageID + \" channel id= \" + channel);\n }\n MsgData trackingData = getTrackingData(messageID);\n trackingData.ackreceived = true;\n setMessageStatus(MessageStatus.Acked, trackingData);\n sendButNotAckedMessageCount.decrementAndGet();\n //record how much time took between delivery and ack receive\n long timeTook = (System.currentTimeMillis() - trackingData.timestamp);\n PerformanceCounter.recordAckReceived(trackingData.queue, (int) timeTook);\n decrementMessageCountInSlotAndCheckToResend(trackingData.slot, trackingData.queue);\n //release delivery tracing\n releaseMessageDeliveryFromTracking(channel, messageID);\n }",
"private void ackWrite() throws SIMException\n\t\t{\n\t\t\tfor (;;)\n\t\t\t{\n\t\t\t\t// Read a byte from device\n\t\t\t\tif ((mode & MODE_TRANSFER_MASK) == MODE_TRANSFER_WRITE)\n\t\t\t\t{\n\t\t\t\t\tint v =requestWrite.getDmaValue();\n\t\t\t\t\ttransferToMemory(this,base.getValue(),v);\n\t\t\t\t}\n\n\t\t\t\t// Increment / decrement address if requested\n\t\t\t\tif (hold == false)\n\t\t\t\t{\n\t\t\t\t\tif ((mode & MODE_DECREMENT) != 0)\n\t\t\t\t\t\tbase.decrement();\n\t\t\t\t\telse\n\t\t\t\t\t\tbase.increment();\n\n\t\t\t\t}\n\n\t\t\t\tif (isTerminate(requestWrite))\n\t\t\t\t{\n\t\t\t\t\tterminateDma();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// In single transfer wait another dreq\n\t\t\t\tif ((mode & MODE_DMA_MASK) == MODE_DMA_SINGLE)\n\t\t\t\t{\n\t\t\t\t\tif (requestRead.getDmaDREQ() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\trequest = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}",
"private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }",
"@Test\n public void testAcknowledgeMessageDownloadAcknowledgeText() {\n Session session = HibernateUtil.getSessionFactory().openSession();\n session.beginTransaction();\n FrinmeDbText msgtext = new FrinmeDbText();\n msgtext.setText(textmsg_org);\n session.save(msgtext);\n FrinmeDbChats c = new FrinmeDbChats();\n c.setChatname(\"Test Chat Text\");\n c.setFrinmeDbUsers(u);\n session.save(c);\n FrinmeDbUserToChats u2c = new FrinmeDbUserToChats();\n u2c.setFrinmeDbChats(c);\n u2c.setFrinmeDbUsers(u);\n session.save(u2c);\n FrinmeDbMessages m = new FrinmeDbMessages();\n m.setFrinmeDbUsers(u);\n m.setMessageTyp(Constants.TYP_TEXT);\n m.setSendTimestamp(10);\n m.setFrinmeDbUserToChats(u2c);\n m.setFrinmeDbText(msgtext);\n session.save(m);\n session.getTransaction().commit();\n session.close();\n \n int hashCode = textmsg_org.hashCode();\n String sha1b64 = new String(\n Base64.encodeBase64(String.valueOf(hashCode).getBytes()),\n Charset.forName(Constants.CHARACTERSET));\n \n IAckMD in = new IAckMD();\n in.setMID(m.getId());\n in.setACK(sha1b64);\n OAckMD out = callTarget(in);\n LOGGER.debug(out.getACK());\n assertThat(out.getACK(), is(Constants.ACKNOWLEDGE_TRUE));\n }",
"void acknowledge(String topicName, int partition, long offset) throws IOException;",
"private void sendAck(char seqNum, byte advertisedWindow) throws IOException {\n\t\tDOPEPacket ack = new DOPEPacket(Control.ACK_OP_CODE, seqNum, advertisedWindow);\n\t\tsend(ack);\n\t\tSystem.out.println(\"Sent ack:\\n\" + ack);\n\t}",
"public boolean finAcked() { return (flags & FIN_ACKED) != 0; }",
"protected void sendAckMessage(WebSocketConnection conn, JSONObject message)\n\t\t\tthrows JSONException {\n\t\tconn.send(new JSONStringer().object()\n\t\t\t.key(\"id\").value(message.getInt(\"id\"))\n\t\t\t.key(\"result\").object().endObject().endObject().toString());\n\t}",
"private short acked(ActualSegment segment) {\n\t\tif(segment == rttSeg) {\n\t\t\tint newRtt = (int) (System.nanoTime()/1000 - rttSegTime);\n\t\t\t// rfc6298\n\t\t\trttvar = (rttvar * 3 + Math.abs(rtt - newRtt) + 3) >>> 2;\n\t\t\tsrtt = (srtt * 7 + newRtt + 7) >>> 3;\n\t\t\trtt = newRtt;\n\t\t\trttSeg = null;\n\t\t}\n\t\tcancel(segment);\n\t\t\n\t\tshort synFin = (short) (segment.controlBits() & (TcpPkt.SYN | TcpPkt.FIN));\n\t\t\n\t\tflags |= ((synFin & TcpPkt.FIN) != 0) ? FIN_ACKED : 0;\n\t\treturn synFin;\n\t}",
"protected void reply_ok() throws java.io.IOException {\n byte[] ok = PushCacheProtocol.instance().okPacket();\n _socket.getOutputStream().write(ok, 0, ok.length);\n }",
"public boolean hasAck() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"void getack(int datagram_id){\r\n\t\tSftpDatagram the_datagram = sendings.get(new Integer(datagram_id));\r\n\t\t//indeed ack\r\n\t\tif(the_datagram != null){\r\n\t\t\tthe_datagram.cancel_timer();\r\n\t\t\tsendings.remove(new Integer(datagram_id));\r\n\t\t\tnot_ack_yet--;\r\n\t\t\tcheck_and_send();\r\n\t\t}\r\n\t}",
"public boolean hasAck() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"SourceMessage onNewMessageReceived(PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer);",
"public static Message makeACK(Message message) throws HL7Exception, IOException {\n\t\treturn makeACK((Segment)message.get(\"MSH\"));\n\t}",
"public messages.Ackinterface.AckInterfaceOrBuilder getAckOrBuilder() {\n if (ackBuilder_ != null) {\n return ackBuilder_.getMessageOrBuilder();\n } else {\n return ack_;\n }\n }",
"public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }",
"protected void pktsAcked(int n, long rtt) {}",
"public Builder setAck(boolean value) {\n\n\t\t\t\tack_ = value;\n\t\t\t\tonChanged();\n\t\t\t\treturn this;\n\t\t\t}",
"public boolean hasAck() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasAck() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public Builder setAck(messages.Ackinterface.AckInterface value) {\n if (ackBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ack_ = value;\n onChanged();\n } else {\n ackBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000080;\n return this;\n }",
"public int AckReceivedFor(){//For a group call, should take an input ID, should be UPDATED\n return this.packet_ack;\n }",
"private void sendStatusAcknowledgment(FederationModel registration) throws Exception {\n\t\tif (!registration.sendStatus) {\n\t\t\t// skip status acknowledgment\n\t\t\treturn;\n\t\t}\n\t\tInetAddress addr = InetAddress.getLocalHost();\n\t\tString federationName = gitblit.getSettings().getString(Keys.federation.name, null);\n\t\tif (StringUtils.isEmpty(federationName)) {\n\t\t\tfederationName = addr.getHostName();\n\t\t}\n\t\tFederationUtils.acknowledgeStatus(addr.getHostAddress(), registration);\n\t\tlogger.info(MessageFormat.format(\"Pull status sent to {0}\", registration.url));\n\t}",
"public Builder setLockstepAck(boolean value) {\n \n lockstepAck_ = value;\n onChanged();\n return this;\n }",
"boolean hasJsonAckMsg();",
"@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }",
"private static DatagramPacket craftAck(int sequenceNumber) {\n\n HipsterPacket hipster = new HipsterPacket();\n hipster.setPayload(new byte[0]); // Empty payload\n hipster.setDestinationAddress(sourceAddress); // Source address\n hipster.setDestinationPort(hipsterSendPort); // Source port number\n hipster.setCode(HipsterPacket.ACK);\n hipster.setSequenceNumber(sequenceNumber);\n\n return hipster.toDatagram();\n }",
"CompletableFuture<Void> sendPushAck(HttpPushAck pushAck, int streamId);",
"@Override\r\n\tpublic void quack() {\n\t\tsuper.gobble();\r\n\t}",
"@Override\n public void onAcknowledgement(RecordMetadata recordMetadata, Exception e) {\n }",
"ServiceProblemAckResponse ackServiceProblem(ServiceProblemAckRequest serviceProblemAckRequest);",
"@Override\n\tpublic void msgAtCook() {\n\t\t\n\t}",
"void ackResult(boolean resultMatch);",
"@java.lang.Override\n public boolean getLockstepAck() {\n return lockstepAck_;\n }",
"@Override\n public void deliveryComplete(IMqttDeliveryToken arg0) {\n try {\n if(arg0.getMessage()==null){\n //messageDelivered = true;\n }\n } catch (MqttException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public Builder clearAck() {\n bitField0_ = (bitField0_ & ~0x00000001);\n ack_ = false;\n onChanged();\n return this;\n }",
"public synchronized void acknowledge(int ackNum){\n\t\tIterator<Segment> iter = this.window.iterator();\r\n\t\tSegment s = null;\r\n\t\twhile (iter.hasNext()) {\r\n\t\t s = iter.next();\r\n\r\n\t\t if (s.getSeqNumber() < ackNum){\r\n\t\t iter.remove();\r\n\t\t\t\t//System.out.println(\"Ack \"+ ackNum + \" - Remove \" + s.getSeqNumber() + \" AckNum in window \" + this.windowContainsSegment(ackNum));\r\n\t\t } else {\r\n\t\t \tbreak;\r\n\t\t }\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tthis.tw.updateWatchedSegment(s, Integer.toString(ackNum));\r\n\t\t\tif (s == null){\r\n\t\t\t\tthis.tw.stopRunningThread();\r\n\t\t\t}\r\n\t\t} catch (IndexOutOfBoundsException ex){\r\n\t\t\t//System.out.println(\"Tried updating but error occurred\");\r\n\t\t\t//System.out.println(ex.getMessage());\r\n\t\t}\r\n\t}",
"private void ackRead() throws SIMException\n\t\t{\n\t\t\tfor (;;)\n\t\t\t{\n\t\t\t\t// Read a byte from memory\n\t\t\t\tif ((mode & MODE_TRANSFER_MASK) == MODE_TRANSFER_READ)\n\t\t\t\t{\n\t\t\t\t\tint v = transferFromMemory(this,base.getValue());\n\t\t\t\t\trequestRead.setDmaValue(v);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Increment / decrement address if requested\n\t\t\t\tif (hold == false)\n\t\t\t\t{\n\t\t\t\t\tif ((mode & MODE_DECREMENT) != 0)\n\t\t\t\t\t\tbase.decrement();\n\t\t\t\t\telse\n\t\t\t\t\t\tbase.increment();\n\n\t\t\t\t}\n\n\t\t\t\tif (isTerminate(requestRead))\n\t\t\t\t{\n\t\t\t\t\tterminateDma();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// In single transfer wait another dreq\n\t\t\t\tif ((mode & MODE_DMA_MASK) == MODE_DMA_SINGLE)\n\t\t\t\t{\n\t\t\t\t\tif (requestRead.getDmaDREQ() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\trequest = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}",
"@Override\n public MQAckMessageDTO handleTalkMessage(MQMessageDTO mqMessageDTO) throws Exception {\n List<MQMessageItemDTO> mqMessageItemDTOs = mqMessageDTO.getItemDTOs();\n if (CollectionUtil.isEmpty(mqMessageItemDTOs)) return null;\n List<MQAckMessageItemDTO> ackItemDTOs = new ArrayList<MQAckMessageItemDTO>();\n for (MQMessageItemDTO itemDTO : mqMessageItemDTOs) {\n MQAckMessageItemDTO ackItemDTO = new MQAckMessageItemDTO();\n ackItemDTO.setId(itemDTO.getMsgId());\n ackItemDTOs.add(ackItemDTO);\n }\n MQAckMessageDTO ackMessageDTO = new MQAckMessageDTO();\n ackMessageDTO.setSendTime(System.currentTimeMillis());\n ackMessageDTO.setItemDTOs(ackItemDTOs);\n return ackMessageDTO;\n }",
"private void ackPacket(String _sender, long _sn)\n\t{\n\t\t// ACK packet\n\t\tsynchronized(acks)\n\t\t{\n\t\t\tif(!acks.containsKey(_sender))\n\t\t\t{\n\t\t\t\tacks.put(_sender, new LinkedList<Long>());\n\t\t\t}\n\t\t\tacks.get(_sender).add(_sn);\n\t\t}\n\t}",
"private void sendDataReceptionCompleteMessage(SelectionKey key, byte[] data) throws IOException {\n\t\tSocketChannel channel = (SocketChannel)key.channel();\n\t\tbyte[] ackData = new byte[4];\n\t\tackData[0]=00;\n\t\tackData[1]=00;\n\t\tackData[2]=00;\n\t\tackData[3]=data[9]; //bPacketRec[0];\n\n\t\tByteBuffer bSend = ByteBuffer.allocate(ackData.length);\n\t\tbSend.clear();\n\t\tbSend.put(ackData);\n\t\tbSend.flip();\n\t\twhile (bSend.hasRemaining()) {\n\t\t\ttry {\n\t\t\t\tchannel.write(bSend);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new IOException(\"Could not send Data Reception Acknowledgement\");\n\t\t\t}\n\t\t}\n\t}",
"public Message processMessage(Message in) throws ApplicationException {\n\t\ttry {\n\t\t\t// get default ACK\n\t\t\tMessage out = makeACK(in);\n\t\t\tfillDetails(out);\n\t\t\treturn out;\n\t\t} catch (Exception e) {\n\t\t\tthrow new ApplicationException(\"Couldn't create response message: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\n\t}",
"@java.lang.Override\n public boolean getLockstepAck() {\n return lockstepAck_;\n }",
"public void sendAck(int id, int serverId){\n StringBuilder ackMessage = new StringBuilder();\n // \"SERVER_CONNECTION;\"\n ackMessage.append(Symbols.serverMessageHeader);\n ackMessage.append(Symbols.messageDelimiter);\n // \"ACK;\"\n ackMessage.append(Symbols.ackMessageTag);\n ackMessage.append(Symbols.messageDelimiter);\n // \"<Server_Id>;\"\n ackMessage.append(Integer.toString(myServer.myId));\n ackMessage.append(Symbols.messageDelimiter);\n // \"<Time_Stamp>;\"\n ackMessage.append(Integer.toString(myServer.clock.sendAction()));\n ackMessage.append(Symbols.messageDelimiter);\n // \"<ACKed_Process_Id>\"\n ackMessage.append(Integer.toString(id));\n try {\n Socket s = getSocket(myServer.getServerList().get(serverId));\n PrintWriter pOut = new PrintWriter(s.getOutputStream());\n pOut.print(ackMessage.toString());\n pOut.flush();\n s.close();\n } catch (IOException ex) {\n Logger.getLogger(ServerRequestProcessor.class.getName()).log(Level.SEVERE, null, ex);\n }\n send(ackMessage.toString());\n }",
"public LsAcknowledge(OspfPacketHeader ospfHeader) {\n populateHeader(ospfHeader);\n }"
] | [
"0.8164537",
"0.73123705",
"0.7249804",
"0.7039703",
"0.69921064",
"0.6948043",
"0.6939136",
"0.68576634",
"0.68503016",
"0.6756463",
"0.674362",
"0.6740567",
"0.6651789",
"0.6647721",
"0.6643157",
"0.65167254",
"0.64896524",
"0.646323",
"0.6413445",
"0.63769174",
"0.6372565",
"0.6327328",
"0.6290736",
"0.6264267",
"0.6258835",
"0.6231138",
"0.6227521",
"0.62202936",
"0.6218923",
"0.61874694",
"0.61850786",
"0.6173415",
"0.6165246",
"0.6154907",
"0.6130486",
"0.6122472",
"0.6093386",
"0.60928357",
"0.6090637",
"0.60809207",
"0.6075902",
"0.60611385",
"0.6032644",
"0.6022457",
"0.5985855",
"0.5954255",
"0.5948015",
"0.59424084",
"0.59375024",
"0.59372234",
"0.59338635",
"0.5928417",
"0.5920247",
"0.5919134",
"0.5916868",
"0.59122086",
"0.5902824",
"0.5899538",
"0.5886212",
"0.58598036",
"0.58163905",
"0.5816068",
"0.5801443",
"0.578819",
"0.5780248",
"0.57587343",
"0.5752077",
"0.574307",
"0.57408184",
"0.57363045",
"0.5733556",
"0.57312036",
"0.5714771",
"0.57100326",
"0.57081944",
"0.567596",
"0.5674714",
"0.5670915",
"0.5662948",
"0.56580365",
"0.56457746",
"0.56428045",
"0.56271493",
"0.5625129",
"0.5622386",
"0.56171554",
"0.5614005",
"0.5603796",
"0.56018555",
"0.55838925",
"0.55769044",
"0.5569233",
"0.55671334",
"0.556413",
"0.5562839",
"0.55606353",
"0.5557741",
"0.55573076",
"0.55568284",
"0.5548163"
] | 0.6420999 | 18 |
Called when a connection to a client/hub is lost.... | protected void closeAllVirtualConnections(String prefix) {
LinkedList<VirtualConnection> l = virtualConnections.removeAll(prefix);
for (VirtualConnection vc : l) {
// We now have to figure out which of the two entries in the VC
// is ours. The easiest way is to simply compare the 'mfX'
// references.
if (this == vc.mfc1) {
if (vclogger.isInfoEnabled()) {
vclogger.info("forward close for 2: " + vc.index2);
}
vc.mfc2.forwardVirtualClose(vc.index2);
stats.closeTotal++;
} else if (this == vc.mfc2) {
if (vclogger.isInfoEnabled()) {
vclogger.info("forward close for 1: " + vc.index1);
}
stats.closeTotal++;
vc.mfc1.forwardVirtualClose(vc.index1);
} else {
stats.closeError++;
;
// This should never happen!
vclogger.warn("Virtual connection error: forwarder not found!",
new Exception());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void connectionLost(String channelID);",
"@Override\n public void connectionLost(Throwable thrwbl) {\n System.out.println(\"服务器的连接丢失\");\n }",
"private void connectionLost() {\n // Send a failure message back to the Activity\n Message msg = handler.obtainMessage(SdlRouterService.MESSAGE_LOG);\n Bundle bundle = new Bundle();\n bundle.putString(LOG, \"Device connection was lost\");\n msg.setData(bundle);\n handler.sendMessage(msg);\n handler.postDelayed(new Runnable() { //sends this stop back to the main thread to exit the reader thread\n @Override\n public void run() {\n stop();\n }\n }, 250);\n }",
"@Override\n public void connectionLost() {\n }",
"@Override\n public void connectionLost(Throwable t) {\n System.out.println(\"Connection lost!\");\n // code to reconnect to the broker would go here if desired\n }",
"@Override\r\n\tpublic void connectionLost(Throwable t) {\n\t}",
"void onConnectionLost();",
"public void connectionLost(Throwable throwable) {\n\t\tSystem.out.println(\"MQTT_CONNECTLOSS,\"+ System.currentTimeMillis() +\",bolt-\"+boltID);\n\t\tthrowable.printStackTrace();\n\t\t//System.out.println(\"***************************** lost connection to mqtt server\");\n\t}",
"@Override\n\t\t\tpublic void connectionLost(Throwable throwable) {\n\t\t\t\tSystem.out.println(\"connectionLost\");\n\t\t\t}",
"@Override\r\n\tpublic void connectionLost(Throwable cause) {\n\t\t\r\n\t}",
"@Override\n public void connectionLost(Throwable arg0) {\n\n }",
"@Override\n public void connectionLost(Throwable t) {\n System.out.println(\"Connection lost!\");\n }",
"@Override\n public void connectionLost(Throwable cause) {\n\n }",
"private void connectionLost() {\n Log.d(TAG, \"BluetoothManager :: connectionLost()\");\n setState(STATE_LISTEN); //추가됨\n\n // Send a failure message back to the Activity\n // WARNING: This makes too many toast.\n //이것도 어차피 연결잃었다고하는거 알려주는거라 안해도 상관 없다.\n /*\n Message msg = mHandler.obtainMessage(MESSAGE_TOAST);\n Bundle bundle = new Bundle();\n bundle.putString(SERVICE_HANDLER_MSG_KEY_TOAST, \"연결되있던장치와 연결을 잃었어요\");\n msg.setData(bundle);\n mHandler.sendMessage(msg);\n */\n // Reserve re-connect timer\n reserveRetryConnect(); //수정됨\n }",
"public void onClientDisconnected(Channel channel);",
"@Override\n public void connectionLost(Throwable cause) {\n }",
"@Override\n public void connectionLost(Throwable cause) {\n System.out.println(\"MQTT Connection Lost\");\n }",
"public void onConnectionClosed() {\r\n\t\tcurrentConnections.decrementAndGet();\r\n\t}",
"@Override\n public void connectionLost(Throwable cause) {\n Log.d(TAG, \"Connection lost\");\n }",
"@Override\n\tpublic void connectionLost(Throwable cause) {\n\t\t\n\t}",
"void serverLostConnection();",
"private void connectionLost() {\n// mConnectionLostCount++;\n// if (mConnectionLostCount < 3) {\n// \t// Send a reconnect message back to the Activity\n//\t Message msg = mHandler.obtainMessage(RemoteBluetooth.MESSAGE_TOAST);\n//\t Bundle bundle = new Bundle();\n//\t bundle.putString(RemoteBluetooth.TOAST, \"Device connection was lost. Reconnecting...\");\n//\t msg.setData(bundle);\n//\t mHandler.sendMessage(msg);\n//\t \n// \tconnect(mSavedDevice); \t\n// } else {\n \tsetState(STATE_LISTEN);\n\t // Send a failure message back to the Activity\n\t Message msg = mHandler.obtainMessage(RemoteBluetooth.MESSAGE_TOAST);\n\t Bundle bundle = new Bundle();\n\t bundle.putString(RemoteBluetooth.TOAST, \"Device connection was lost\");\n\t msg.setData(bundle);\n\t mHandler.sendMessage(msg);\n// }\n }",
"abstract protected void onDisconnection();",
"@Override\r\n \tpublic void clientDisconnectedCallback(RoMClient client) {\r\n \t\tthis.disconnectClient(client);\r\n \t}",
"protected void connectionClosed() {}",
"void onInternetConnectionLost();",
"private void connectionLost() {\n setState(EBluetoothStates.CONNECTING);\n // Send a failure message back to the Activity\n // updateActivity(General.MessageType.ERROR, General.OnDeviceConnectionLost);\n }",
"@Override\n public void connectionLost(final Throwable pThrowable) {\n if (DEBUG) {\n Log.d(LOG_TAG, \"Connection Lost...\");\n }\n // mClient = null;\n\n for (final RaspberryPiMessageListener listener : mListeners) {\n parentHandler.post(new Runnable() {\n\t@Override\n\tpublic void run() {\n\t listener.MqttConnectionLost(pThrowable.getLocalizedMessage());\n\t}\n });\n }\n \n// if (isNetworkAvailable()) {\n// if (DEBUG) {\n// Log.d(LOG_TAG, \"Network available, attempting to connect if possible...\");\n// }\n// reconnectIfNecessary();\n// }\n }",
"protected void onDisconnect() {}",
"private void onLost() {\n // TODO: broadcast\n }",
"@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t\tSystem.out.println(\"CONNECTION HAS BEEN LOST.\");\r\n\t\t\t\t}",
"public void disconnected(String reason) {}",
"@Override\n public void onDisconnected() {\n }",
"void handleConnectionClosed();",
"@Override\n\t\tpublic void connectionLost(Throwable cause) {\n\t\t\tif (connectionLostCallback != null) {\n\t\t\t\tint errorNumber = -1;\n\t\t\t\t\n\t\t\t\tif (cause == null) { // client initiated disconnect\n\t\t\t\t\terrorNumber = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (cause instanceof MqttException) {\n\t\t\t\t\terrorNumber = ((MqttException) cause).getReasonCode();\n\t\t\t\t}\n\t\t\t\tJSONObject callbackResult = new JSONObject();\n\t\t\t\tPluginResult result;\n\t\t\t\ttry {\n\t\t\t\t\tcallbackResult.put(\"errorMessage\",\n\t\t\t\t\t\t\t(cause != null) ? cause.getLocalizedMessage() : \"none\");\n\t\t\t\t\tcallbackResult.put(\"errorCode\", errorNumber);\n\t\t\t\t\ttraceDebug(TAG, \"connectionLost(\" + callbackResult + \")\");\n\t\t\t\t\tresult = new PluginResult(Status.OK, callbackResult);\n\t\t\t\t}\n\t\t\t\tcatch (JSONException e) {\n\t\t\t\t\ttraceDebug(TAG, \"connectionLost(\" + e + \")\");\n\t\t\t\t\tresult = new PluginResult(Status.ERROR, e.toString());\n\t\t\t\t}\n\t\t\t\tresult.setKeepCallback(true);\n\t\t\t\tconnectionLostCallback.sendPluginResult(result);\n\t\t\t}\n\t\t}",
"public void connectionLost(){\n\t\ttry {\n\t\t\tconnect(\"andrewTest\", false, (short) 100);\n\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e1) {\t\t\t\n\t\t\t}\n\t\t\tconnectionLost();\n\t\t\t\n\t\t}\n\t}",
"public void onDisconnected() {\n\t\t\r\n\t}",
"@Override public void onDisconnected() {\n }",
"@Override\n\t\t\tpublic void onNetworkDisconnected() {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t}",
"@Override\r\n\t\tpublic void onDisconnect(Connection connection) {\n\r\n\t\t}",
"public void connectionLost(Throwable cause) {\n\t}",
"@Override\n public void onDisconnected() {\n }",
"@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}",
"@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}",
"@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}",
"@Override\n\tpublic void onDisconnected() {\n\n\t}",
"void onDisconnectFailure();",
"@Override\r\n\tpublic void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {\n\t}",
"void disconnected(MqttClient client, Throwable cause, boolean reconnecting);",
"private void connectionClosed() {\n if (this.state != SessionState.DISCONNECTING) {\n // this came unexpected\n connectionClosed(new VertxException(\"Connection closed\"));\n }\n }",
"@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t}",
"public void onPeerConnectionClosed();",
"public void onDisconnected() {\n\n }",
"public void onDisconnected() {\n\n }",
"@Override\n\tpublic void onDisconnected() {\n\t\t// Display the connection status\n\t\tToast.makeText(this, \"Disconnected. Please re-connect.\", Toast.LENGTH_SHORT).show();\n\t}",
"void onDisconnected();",
"@Override\n public void onDisconnect(BinaryLogClient client) {\n }",
"public void disconnectedFromHost();",
"void onConnectionRemoved(SocketConnection connection);",
"@Override\n\tpublic void onDisconnected() {\n\t\tToast.makeText(context, \"Disconnected. Please re-connect.\",Toast.LENGTH_SHORT).show();\n\t}",
"@Override\n\tpublic void connectionClosed() {\n\t}",
"@Override\n public void afterConnectionClosed(WebSocketSession session, CloseStatus status) {\n System.out.println(\"SocketController: afterConnectionClosed rad 84\");\n socketService.removeSession(session);\n }",
"public void onDisconnected() {\r\n // Display the connection status\r\n Toast.makeText(this, \"Disconnected. Please re-connect.\",\r\n Toast.LENGTH_SHORT).show();\r\n }",
"@Override\r\n\tpublic void packetLost(Connection connection, BaseDatagram lostDatagram)\r\n\t{\n\t\t\r\n\t}",
"void onUserSessionDisconnected(WebSocketConnection connection, Session session, String accountId);",
"private void connectionClosed(final Throwable cause) {\n if (log.isDebugEnabled()) {\n log.debug(\"Connection closed\", cause);\n } else {\n log.info(\"Connection closed: \" + (cause != null ? cause.getMessage() : \"<unknown>\"));\n }\n\n if (this.client != null) {\n this.client.exceptionHandler(null);\n this.client.publishHandler(null);\n this.client.closeHandler(null);\n this.client.subscribeCompletionHandler(null);\n this.client.publishCompletionHandler(null);\n this.client.publishCompletionExpirationHandler(null);\n this.client.publishCompletionUnknownPacketIdHandler(null);\n this.client = null;\n }\n setState(SessionState.DISCONNECTED, cause);\n }",
"void clientDisconnected(Client client, DisconnectInfo info);",
"@Override\n \tpublic void connectionClosed() {\n \t\t\n \t}",
"@Override\n public void onChannelDisconnected() {\n ConnectionManager.getInstance().setDisconnectNow(true);\n ((P2PListener)activity).onAfterDisconnect();\n }",
"protected void onDisconnected(long hconv)\n {\n }",
"@Override\n\tprotected void onNetworkDisConnected() {\n\n\t}",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}",
"void onDisconnect( String errorMsg );",
"void onDisconnect();",
"void onDisconnect();",
"public void onDisconnect(IChatComponent reason) {\n\t\tlogger.info(this.getConnectionInfo() + \" lost connection: \" + reason.getUnformattedText());\n\t}",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n return;\n }",
"protected void onEndpointDisconnected(Endpoint endpoint) {}",
"@Disconnect\n public void disconnected(AtmosphereResourceEvent event){\n if (event.isCancelled()) {\n logger.info(\"User:\" + event.getResource().uuid() + \" unexpectedly disconnected\");\n } else if (event.isClosedByClient()) {\n logger.info(\"User:\" + event.getResource().uuid() + \" closed the connection\");\n }\n }",
"@Override\n public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {\n ctx.getChannel().getRemoteAddress();\n System.out.println(ctx.getChannel().getRemoteAddress()+\" Disconnected..\");\n Client user = ServerTools.getClientByChannel(ctx.getChannel());\n if(Server.live_clients.contains(user)){\n Server.live_clients.remove(user);\n System.out.println(\"User removed\");\n }\n }",
"private void connectionFailed() {\n if (debugging)\n Log.d(TAG, \"connection Failed\");\n setState(EBluetoothStates.DISCONNECTED);\n if (mConnectionManager != null) {\n mConnectionManager.closeSocket();\n }\n }",
"@SubscribeEvent\n public void onFMLNetworkClientDisconnectionFromServer(ClientDisconnectionFromServerEvent event) {\n hypixel = false;\n bedwars = false;\n }",
"public void socketDisconnected(PacketChannel pc, boolean failed);",
"public void disconnected(XMPPConnection connection) {}",
"@Override\n public void onClose(Connection connection, Session session) {\n }",
"protected void processDisconnection(){}",
"@Override\n\tpublic void listenerClosed(ConnectionListenerEvent evt) {\n\t\t\n\t}",
"public void onIceDisconnected();",
"@Override\r\n\tpublic void onClose(WebSocket conn, int code, String reason, boolean remote) {\n\r\n\t}",
"void firePeerDisconnected(ConnectionKey connectionKey);",
"@FunctionalInterface\npublic interface ConnectionLostListener {\n\n /**\n * Called when a connection is list\n * \n * @param channelID The ID of the channel that had the connection lost\n */\n public void connectionLost(String channelID);\n\n}",
"@Override\r\n\tpublic void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {\n\t\tsuper.afterConnectionClosed(session, status);\r\n\t}",
"public void disconnect() {}",
"public void onClose(WebSocket conn);",
"@Override\n\t\tpublic void disconnected() {\n\t\t\tsuper.disconnected();\n\t\t}",
"@Override\n public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) {\n log.error(\"Input Stream {} : Channel Disconnected - Stream Engine RTS process!\", name);\n channelAtomicReference.set(null);\n }",
"@Override\n public void disconnect() {\n\n }",
"void disconnect(String reason);",
"@Override\n public void Disconnect() {\n bReConnect = true;\n }",
"@Override\n public void onConnectionFailed(ConnectionResult conRes) {}"
] | [
"0.8049917",
"0.77447456",
"0.76976943",
"0.75845844",
"0.75813925",
"0.75458735",
"0.7537548",
"0.74954766",
"0.7485383",
"0.74643",
"0.7457632",
"0.7420859",
"0.73982775",
"0.7385809",
"0.7382068",
"0.73710304",
"0.73681927",
"0.73680127",
"0.73475724",
"0.7326061",
"0.73209125",
"0.7312352",
"0.72268486",
"0.7199512",
"0.7183175",
"0.7168723",
"0.71348405",
"0.71347",
"0.71025085",
"0.7093384",
"0.70775425",
"0.7071339",
"0.7071043",
"0.7062188",
"0.70400536",
"0.70363027",
"0.70303035",
"0.7022335",
"0.7006134",
"0.69919556",
"0.69802326",
"0.6964563",
"0.6961384",
"0.6948586",
"0.6948586",
"0.6948586",
"0.6937939",
"0.69322157",
"0.6931876",
"0.69238067",
"0.69178957",
"0.6915153",
"0.6913254",
"0.69098866",
"0.69098866",
"0.6879476",
"0.68774205",
"0.6869798",
"0.68580407",
"0.6856664",
"0.6855452",
"0.6851949",
"0.68497324",
"0.6848102",
"0.6829569",
"0.6790588",
"0.6764568",
"0.67642015",
"0.6743367",
"0.6740999",
"0.6739124",
"0.6738297",
"0.67372197",
"0.6734691",
"0.6705687",
"0.6705687",
"0.6690348",
"0.6684323",
"0.66551167",
"0.6626926",
"0.6609822",
"0.6585845",
"0.6580849",
"0.65801674",
"0.6577001",
"0.65763026",
"0.65667164",
"0.6560863",
"0.65484655",
"0.6545142",
"0.65433896",
"0.6537871",
"0.652768",
"0.6512122",
"0.65061015",
"0.64961344",
"0.649442",
"0.6490114",
"0.646479",
"0.64630955",
"0.6458924"
] | 0.0 | -1 |
Maps the request with all url starting with / | @RequestMapping(value = "/", method = RequestMethod.GET)
public String home()
{
return "welcome";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected String[] getServletMappings() {\n\t\treturn new String[] { \"/\" };\n\t}",
"@Override\n\tprotected String[] getServletMappings() {\n\t\treturn new String[] { \"/\" };\n\t}",
"void requestMapChange(String path);",
"public void processRequest(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n String url = req.getParameter(Constants.ORIGURL);\n log.info(String.format(\"Processing ShortenUrlServlet request for origurl: %s\", url));\n try {\n validateQueryUrl(url);\n CassandraUrlQueryUtil cassandraQueryClient = CassandraUrlQueryUtil.getInstance();\n UrlMapping urlMapping = cassandraQueryClient.queryByOrigUrl(url);\n\t\t\tif (urlMapping == null) {\n\t\t\t\turlMapping = new UrlMapping();\n\t\t\t\turlMapping.setOrigUrl(url);\n\t\t\t\turlMapping.setUrlHash(generateUrlHash());\n\t\t\t\tcassandraQueryClient.writeQuery(urlMapping);\n\t\t\t}\n resp.getOutputStream().print(XMLUtils.convertToXML(urlMapping));\n\t\t} catch (MinimeException mex) {\n\t\t\tsendErrorResponse(req, resp, mex.getMessage());\n\t\t} catch (Exception ex) {\n \tex.printStackTrace();\n sendErrorResponse(req, resp, ex.getMessage());\n }\n log.info(String.format(\"Done processing ShortenUrlServlet request for origurl: %s\", url));\n }",
"public abstract String getRequestServletPath();",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\r\n public String topLevel(HttpServletRequest request, ModelMap model) throws ServletException, IOException {\r\n System.out.println(\"***** Been redirected to fetch page / - will render default map from here!\");\r\n String mapName = env.getProperty(\"default.map\");\r\n if (mapName.startsWith(\"/restricted/\")) {\r\n /* Ensure that a top-level restricted map always shows the login page when redirected - Polarcode bug 23/04/2018 */\r\n return(\"redirect:\" + mapName); \r\n } else {\r\n return(renderPage(request, model, \"map\", env.getProperty(\"default.map\"), null, null, false));\r\n } \r\n }",
"@Override\r\n\tprotected String[] getServletMappings() {\n\t\treturn new String[]{\"*.htm\",\"*.js\",\"*.css\"};\r\n\t}",
"private void getMall(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}",
"void projectUriRequest(Request request);",
"static URITranslator map(String source, String target) {\n return map(URI.create(source), URI.create(target));\n }",
"public String determineURL(HttpServletRequest request)\n {\n String url = \"http://\"+request.getHeader(\"host\")+request.getContextPath()+\"/omserver\";\n return url;\n }",
"@Override\n\tprotected String[] getServletMappings() {\n\t\treturn null;\n\t}",
"@Override\n\tprotected String[] getServletMappings() {\n\t\treturn null;\n\t}",
"@RequestMapping(value=\"/\", method=RequestMethod.GET)\n \tpublic ModelAndView handleRoot(HttpServletRequest request){\n \t\tRedirectView rv = new RedirectView(\"/search\",true);\n \t\trv.setStatusCode(HttpStatus.MOVED_PERMANENTLY);\n \t\tModelAndView mv = new ModelAndView(rv);\n \t\treturn mv;\n \t}",
"@Override\r\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\r\n\t\t\tthrows Exception {\n\t\tString aaa= request.getRequestURI();\r\n\t\tSystem.out.println(\"拦截器准备数据中----\");\r\n\t\tSystem.out.println(\"请求地址---\"+aaa+\";上下文---\"+request.getContextPath());\r\n\t\t\r\n\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {\n\t\tHttpServletRequest httpServletRequest = (HttpServletRequest)request;\r\n\t\tHttpServletResponse httpServletResponse = (HttpServletResponse)response;\r\n\t\tString url = httpServletRequest.getServletPath(); //得到所有相对项目路径\r\n\t\tHttpRequestUtil requestUtil = new HttpRequestUtil(httpServletRequest,httpServletResponse,\"utf-8\");\r\n\t\tUrlFilter.filter(requestUtil,LOAD_CONTROLLER_URL,url);\r\n\t\t\r\n\t}",
"@GetMapping\n @RequestMapping(\"/\")\n public Map defaultHome() {\n Map map = new HashMap();\n map.put(\"app-version\", appVersion);\n map.put(\"api call 1\", \"/api/v1/sessions\");\n map.put(\"api call 2\", \"/api/v1/speakers\");\n return map;\n }",
"private String getUrlPrefix(HttpServletRequest req) {\n StringBuffer url = new StringBuffer();\n String scheme = req.getScheme();\n int port = req.getServerPort();\n url.append(scheme);\t\t// http, https\n url.append(\"://\");\n url.append(req.getServerName());\n if ((scheme.equals(\"http\") && port != 80)\n \t || (scheme.equals(\"https\") && port != 443)) {\n url.append(':');\n url.append(req.getServerPort());\n }\n return url.toString();\n }",
"public void map()\n\t{\n\t // key is the documentId\n\t\t// value is the url\n\t\t//fetch the document using the documentId\n\t\t\n\t}",
"public static void remapRequest(HttpServletRequest request) throws Exception {\n Request connectorReq = (Request) request;\n\n MappingData mappingData = connectorReq.getMappingData();\n mappingData.recycle();\n\n connectorReq.getConnector().\n getMapper().map(connectorReq.getCoyoteRequest().serverName(),\n connectorReq.getCoyoteRequest().decodedURI(), null,\n mappingData);\n\n connectorReq.setContext((Context) connectorReq.getMappingData().context);\n connectorReq.setWrapper((Wrapper) connectorReq.getMappingData().wrapper);\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 (URISyntaxException ex) {\r\n Logger.getLogger(Residencia.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"void dispatchRequest(String urlPath) throws Exception;",
"static String getHandler(HttpServletRequest request) {\n String requestURI = request.getRequestURI();\n return requestURI.substring(getDividingIndex(requestURI) + 1);\n }",
"@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}",
"@Override protected void configureServlets() {\n serveRegex(\"^/(?!_ah).*\").with(HandlerServlet.class);\n // serves xmpp urls\n serveRegex(\"/_ah/xmpp/.*\").with(HandlerServlet.class);\n }",
"@Override\npublic void get(String url) {\n\t\n}",
"@RequestMapping(value = \"/home/{map}\", method = RequestMethod.GET)\r\n public String mapHome(HttpServletRequest request, @PathVariable(\"map\") String map, ModelMap model) throws ServletException, IOException { \r\n return(renderPage(request, model, \"map\", map, null, null, false));\r\n }",
"List<GWTJahiaUrlMapping> getUrlMappings(GWTJahiaNode node, String locale) throws GWTJahiaServiceException;",
"@Override\n public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException {\n if (response.getStatus() == HttpServletResponse.SC_NOT_FOUND) {\n forward(redirectRoute, baseRequest, response);\n } else {\n super.handle(target, baseRequest, request, response);\n }\n }",
"@RequestMapping(\"/web/*\")\n\tpublic String oneFolder() {\n\t System.out.println(\"In /web/*\");\n\t return \"success\";\n\t}",
"public abstract String getRequestPathInfo();",
"String getRequestedUrl();",
"String getServletUrlPattern();",
"List<String> findMountPointsStartingWith(String urlPrefix);",
"private void setUrlPrefixMappingToMap(String[] prefixArr)\n\t{\n\t\tif( prefixArr != null )\n\t\t{\n\t\t\tfor(String urlPrefix : prefixArr)\n \t{ \n\t\t\t\tif(urlPrefix.contains(DELIMITER))\n\t\t\t\t{\n\t \t\tString[] keyVal = urlPrefix.split(\"::\");\n\t \t\tString key \t\t= keyVal[0];\n\t \t\tString value \t= keyVal[1].trim();\n\t \t\tlog.info(\"REST SERVICE Key------->>> \"+key);\n\t \t\tlog.info(\"REST SERVICE Value------->>> \"+value);\n\t \t\tappurlMap.put(key , value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlog.warn(\"NO DELEMETERS PROVIDED FOR REDIRECT SERVICE URL -------->>> \");\n\t\t\t\t}\n \t}\n\t\t}\n\t}",
"private String fill(String url, String requestPath, String... parameters) {\n String filledUrl = url.replaceFirst(\"\\\\{url\\\\}\", requestPath.substring(1,requestPath.length()));\n for (String parameter : parameters) {\n filledUrl = filledUrl.replaceFirst(\"\\\\{[^}]*\\\\}\", parameter);\n }\n\n return filledUrl;\n }",
"@GetMapping(value = \"/\")\n public String home(Locale locale, HttpServletRequest request) {\n// DEBUG level 이므로 trace는 출력안됨\n logger.trace(\"trace level: Welcome home! The client locale is {}\", locale);\n logger.debug(\"debug level: Welcome home! The client locale is {}\", locale);\n logger.info(\"info level: Welcome home! The client locale is {}\", locale);\n logger.warn(\"warn level: Welcome home! The client locale is {}\", locale);\n logger.error(\"error level: Welcome home! The client locale is {}\", locale);\n\n// 사용자 추적\n String url = request.getRequestURL().toString();\n String clientIPAddress = request.getRemoteAddr();\n logger.info(\"Request URL: \" + url);\n logger.info(\"Client IP: \" + clientIPAddress);\n\n return \"index\";\n }",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }",
"@Override\nprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n}",
"@Override\n\t\tvoid request(HttpURLConnection u, String prefix) {\n\t\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException \r\n{\nresponse.getWriter().append(\"Served at: \").append(request.getContextPath()); \r\n}",
"public abstract RequestMappingInfo build();",
"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 protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n response.setContentType(\"text/plain\");\r\n PrintWriter pw = response.getWriter();\r\n pw.println(\"Welcome to the Airline Server\");\r\n pw.flush();\r\n\r\n String name = getParameter(\"name\", request);\r\n String src = getParameter(\"src\", request);\r\n String dest = getParameter(\"dest\", request);\r\n\r\n if (name == null && src == null && dest == null) {\r\n writeAllMappings(response);\r\n } else if (name != null && src != null && dest != null) {\r\n writeAllMatchedMappings(response, name, src, dest);\r\n } else if (name != null && src == null && dest == null) {\r\n writeAllMatchedAirlineMappings(response, name);\r\n } else {\r\n pw.println(\"Error, this isn't valid URL\");\r\n pw.flush();\r\n }\r\n\r\n }",
"String getRequestURL();",
"@Routes( { @Route( method = Method.ANY, path = \":?path=(.*)\", binding = BindingType.raw ) } )\n public void handle( final HttpServerRequest request )\n {\n ResponseUtils.setStatus( ApplicationStatus.OK, request );\n\n request.pause();\n String path = request.params()\n .get( PathParam.path.key() );\n\n if ( path != null && ( path.length() < 1 || path.equals( \"/\" ) ) )\n {\n path = null;\n }\n\n VertXWebdavRequest req = null;\n final VertXWebdavResponse response = new VertXWebdavResponse( request.response() );\n\n try\n {\n String contextPath = masterRouter.getPrefix();\n if ( contextPath == null )\n {\n contextPath = \"\";\n }\n\n req = new VertXWebdavRequest( request, contextPath, \"/mavdav\", path, null );\n\n service.service( req, response );\n\n }\n catch ( WebdavException | IOException e )\n {\n logger.error( String.format( \"Failed to service mavdav request: %s\", e.getMessage() ), e );\n formatResponse( e, request );\n }\n finally\n {\n IOUtils.closeQuietly( req );\n IOUtils.closeQuietly( response );\n\n try\n {\n request.response()\n .end();\n }\n catch ( final IllegalStateException e )\n {\n }\n }\n }",
"private RequestNodePath() {\n }",
"protected Resource getResource(HttpServletRequest request) {\n String path = request.getPathInfo();\n /*\n * we want to extract everything after /spa/spaServlet from the path info.\n * This should cater for sub-directories\n */\n return getResourceLoaderBean().getResource(constructRemoteUrl(path));\n }",
"HttpGet getRequest(HttpServletRequest request, String address) throws IOException;",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n public List<URL> index() throws MalformedURLException {\n\n List<URL> urls = new ArrayList<URL>();\n\n urls.add(new URL(\"http://localhost:8080/halogens\"));\n urls.add(new URL(\"http://localhost:8080/neutrons\"));\n urls.add(new URL(\"http://localhost:8080/weight/50\"));\n\n return urls;\n }",
"static String getBase(HttpServletRequest request) {\n String fullPath = request.getRequestURI();\n int baseEnd = getDividingIndex(fullPath);\n return fullPath.substring(0, baseEnd + 1);\n }",
"@Override\n\tpublic String[] getRequestFilterIgnoreUrlPatterns() {\n\t\treturn aryIgnoreUrl;\n\t}",
"@RequestMapping(value = \"/homed/{map}\", method = RequestMethod.GET)\r\n public String mapHomeDebug(HttpServletRequest request, @PathVariable(\"map\") String map, ModelMap model) throws ServletException, IOException { \r\n return(renderPage(request, model, \"map\", map, null, null, true));\r\n }",
"@RequestMapping(\"/web/**\")\n\tpublic String allFolders() {\n\t System.out.println(\"In /web/**\");\n\t return \"success\";\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }",
"@Override\n protected void handleRequest (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,\n @Nonnull final UnifiedResponse aUnifiedResponse) throws Exception\n {\n String sKey = aRequestScope.getPathWithinServlet ();\n if (sKey.length () > 0)\n sKey = sKey.substring (1);\n\n SimpleURL aTargetURL = null;\n final GoMappingItem aGoItem = getResolvedGoMappingItem (sKey);\n if (aGoItem == null)\n {\n s_aLogger.warn (\"No such go-mapping item '\" + sKey + \"'\");\n // Goto start page\n aTargetURL = getURLForNonExistingItem (aRequestScope, sKey);\n s_aStatsError.increment (sKey);\n }\n else\n {\n // Base URL\n if (aGoItem.isInternal ())\n {\n final IMenuTree aMenuTree = getMenuTree ();\n if (aMenuTree != null)\n {\n // If it is an internal menu item, check if this internal item is an\n // \"external menu item\" and if so, directly use the URL of the\n // external menu item\n final IRequestManager aARM = ApplicationRequestManager.getRequestMgr ();\n final String sTargetMenuItemID = aARM.getMenuItemFromURL (aGoItem.getTargetURL ());\n\n final IMenuObject aMenuObj = aMenuTree.getItemDataWithID (sTargetMenuItemID);\n if (aMenuObj instanceof IMenuItemExternal)\n {\n aTargetURL = new SimpleURL (((IMenuItemExternal) aMenuObj).getURL ());\n }\n }\n }\n if (aTargetURL == null)\n {\n // Default case - use target link from go-mapping\n aTargetURL = aGoItem.getTargetURL ();\n }\n\n // Callback\n modifyResultURL (aRequestScope, sKey, aTargetURL);\n\n s_aStatsOK.increment (sKey);\n }\n\n // Append all request parameters of this request\n // Don't use the request attributes, as there might be more of them\n final Enumeration <?> aEnum = aRequestScope.getRequest ().getParameterNames ();\n while (aEnum.hasMoreElements ())\n {\n final String sParamName = (String) aEnum.nextElement ();\n final String [] aParamValues = aRequestScope.getRequest ().getParameterValues (sParamName);\n if (aParamValues != null)\n for (final String sParamValue : aParamValues)\n aTargetURL.add (sParamName, sParamValue);\n }\n\n if (s_aLogger.isDebugEnabled ())\n s_aLogger.debug (\"Following go-mapping item '\" + sKey + \"' to \" + aTargetURL.getAsString ());\n else\n if (GlobalDebug.isDebugMode ())\n s_aLogger.info (\"Following go-mapping item '\" + sKey + \"' to \" + aTargetURL.getAsString ());\n\n // Main redirect :)\n aUnifiedResponse.setRedirect (aTargetURL);\n }",
"public void startPrefixMapping(String prefix, String uri) {\n if (_prefixMapping == null) {\n _prefixMapping = new HashMap<>();\n }\n _prefixMapping.put(prefix, uri);\n }",
"String rewriteUrl(String originalUrl);",
"public void handleRequest(Request req) {\n\n }",
"@RequestMapping(value = \"/{pathVariable}\", method = RequestMethod.GET)\n public String rootMapping(@PathVariable(\"pathVariable\") String pathVariable, @RequestParam(\"requestParam\") String requestParam) {\n System.out.println( \"DummyController::rootMapping() : pathVariable=\" + pathVariable);\n\n return \"HELLO WORLD ! pathVariable=\" + pathVariable + \" requestParam=\" + requestParam;\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\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 (URISyntaxException ex) {\r\n Logger.getLogger(AsignarEstudiantes.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"private static String getRequestPath(final IWebRequest request) {\n\n String requestPath = request.getPathWithinApplication();\n\n final int fragmentIndex = requestPath.indexOf(';');\n if (fragmentIndex != -1) {\n requestPath = requestPath.substring(0, fragmentIndex);\n }\n\n return requestPath;\n\n }",
"public boolean isMine(HttpServletRequest request) {\r\n String path = request.getPathInfo();\r\n return path.startsWith(\"/thredds/obis/\");\r\n }",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"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 configureRoutes() {\n Service http = Service.ignite();\n\n http.port( 6001 );\n\n http.after( ( (request, response) -> response.type(\"application/json\" ) ) );\n\n http.post( \"/accounts/authenticate\", this.authRoutes.authenticate );\n http.post( \"/restaurants/authenticate\", this.authRoutes.authenticateRestaurant );\n\n http.post( \"*\", (req, res) -> {\n res.status( HttpStatus.NOT_FOUND_404 );\n\n return \"{}\";\n } );\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@GET(\"/routecollection/{startLocation}\")\n void getRoutes(@Path(\"startLocation\")String startLocation, Callback<Routes> routes);",
"@Key(\"mapserver.url\")\n\tString mapServerUrl();",
"private void buscarLista(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}",
"private String getHttpPath(String httpPath) {\n if(httpPath == null || httpPath.equals(\"\")) {\n httpPath = \"/*\";\n }\n else {\n if(!httpPath.startsWith(\"/\")) {\n httpPath = \"/\" + httpPath;\n }\n if(httpPath.endsWith(\"/\")) {\n httpPath = httpPath + \"*\";\n }\n if(!httpPath.endsWith(\"/*\")) {\n httpPath = httpPath + \"/*\";\n }\n }\n return httpPath;\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void map(\n String key,\n WebPage value,\n org.apache.hadoop.mapreduce.Mapper<String, WebPage, Text, Text>.Context context)\n throws IOException, InterruptedException {\n String url = value.getUrl();\n if (regex.matcher(url).matches()) {\n context.write(new Text(url),\n new Text(getPageRepresentation(key, value, dumpContent, dumpHeaders,\n dumpLinks, dumpText)));\n }\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"private void initRoutes() {\n if (MODUM_TOKENAPP_ENABLE_CORS) {\n options(\"/*\", (request, response) -> {\n String accessControlRequestHeaders = request.headers(\"Access-Control-Request-Headers\");\n if (accessControlRequestHeaders != null) {\n response.header(\"Access-Control-Allow-Headers\", accessControlRequestHeaders);\n }\n\n String accessControlRequestMethod = request.headers(\"Access-Control-Request-Method\");\n if (accessControlRequestMethod != null) {\n response.header(\"Access-Control-Allow-Methods\", accessControlRequestMethod);\n }\n\n return \"OK\";\n });\n }\n\n get(\"/\", (req, res) -> {\n if (MODUM_TOKENAPP_ENABLE_CORS) {\n res.header(\"Access-Control-Allow-Origin\", \"*\");\n res.header(\"Access-Control-Request-Method\", \"*\");\n res.header(\"Access-Control-Allow-Headers\", \"*\");\n }\n return getTotalRaisedUSD().toString();\n });\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request,response);\n }",
"protected void registerHandlers(Map<String, Object> urlMap)\r\n/* 39: */ throws BeansException\r\n/* 40: */ {\r\n/* 41:114 */ if (urlMap.isEmpty()) {\r\n/* 42:115 */ this.logger.warn(\"Neither 'urlMap' nor 'mappings' set on SimpleUrlHandlerMapping\");\r\n/* 43: */ } else {\r\n/* 44:118 */ for (Map.Entry<String, Object> entry : urlMap.entrySet())\r\n/* 45: */ {\r\n/* 46:119 */ String url = (String)entry.getKey();\r\n/* 47:120 */ Object handler = entry.getValue();\r\n/* 48:122 */ if (!url.startsWith(\"/\")) {\r\n/* 49:123 */ url = \"/\" + url;\r\n/* 50: */ }\r\n/* 51:126 */ if ((handler instanceof String)) {\r\n/* 52:127 */ handler = ((String)handler).trim();\r\n/* 53: */ }\r\n/* 54:129 */ registerHandler(url, handler);\r\n/* 55: */ }\r\n/* 56: */ }\r\n/* 57: */ }",
"@RequestMapping(value = \"/restricted/{map}\", method = RequestMethod.GET)\r\n public String mapRestricted(HttpServletRequest request, @PathVariable(\"map\") String map, ModelMap model) throws ServletException, IOException { \r\n return(renderPage(request, model, \"map\", map, null, null, false));\r\n }",
"@Override\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n RequestDispatcher dispatcher = req.getRequestDispatcher(\"/Servlet\");\n dispatcher.forward(req, resp);\n \n}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"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}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"public interface UrlConnector {\n /**\n * Obtains an HTTP GET request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpGet getRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP PUT request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPut putRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP POST request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPost postRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP DELETE request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpDelete deleteRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP PATCH request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPatch patchRequest(HttpServletRequest request, String address) throws IOException;\n}",
"private String getUrlBaseForLocalServer() {\n\t HttpServletRequest request = ((ServletRequestAttributes) \n\t\t\t RequestContextHolder.getRequestAttributes()).getRequest();\n\t String base = \"http://\" + request.getServerName() + ( \n\t (request.getServerPort() != 80) \n\t \t\t ? \":\" + request.getServerPort() \n\t\t\t\t : \"\");\n\t return base;\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@GetMapping(\"\")\r\n @ResponseStatus(code = HttpStatus.OK)\r\n public void main() {\r\n LOGGER.info(\"GET /\");\r\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n \n }",
"private static String getPrefixRewriteParams(String params) {\n\n URLMapping[] urlMappings = getParamsURLMappings(params);\n\n if (urlMappings == null) {\n return params;\n }\n\n StringBuilder sb = new StringBuilder();\n\n for (URLMapping urlMapping : urlMappings) {\n\n sb.append(urlMapping.getSplitKey()[3]);\n sb.append(\"=\");\n sb.append(urlMapping.getFinalValue());\n sb.append(\"&\");\n }\n\n return StringUtils.substring(sb.toString(), 0, sb.length() - 1);\n }",
"public static HashMap<String, String> generateRequest (String request){\n LOGGER.info(\"Request generator got line => \" + request);\n /**\n * we split on spaces as that is the http convention\n */\n String[] brokenDownRequest = request.split(\" \");\n\n /**\n * creating anf then filling up the request hashmap\n */\n HashMap<String, String> parsedRequest = new HashMap<>();\n parsedRequest.put(\"Type\", brokenDownRequest[0]);\n parsedRequest.put(\"Path\", brokenDownRequest[1]);\n parsedRequest.put(\"HttpVersion\", brokenDownRequest[2]);\n\n /**\n * returning the request hashmap\n */\n return parsedRequest;\n }",
"protected URLMappingHandler getURLMappingHanlder(final HttpServletRequest httpRequest)\n\t{\n\t\tURLMappingHandler urlMappingHandler = FilterSpringUtil.getSpringBean(httpRequest, \"cmsPageUrlHndlerMapping\",\n\t\t\t\tURLMappingHandler.class);\n\t\tif (urlMappingHandler == null)\n\t\t{\n\t\t\turlMappingHandler = new DefaultCMSPageURLMappingHandler();\n\t\t}\n\t\treturn urlMappingHandler;\n\t}",
"String getRequest(String url);",
"public URL standardizeURL(URL startingURL);",
"public interface BaseURL {\n\n //INFOQ网址[目前全为移动端]\n String INFOQ_PATH = \"http://www.infoq.com/cn/\";\n\n //CSDN网址\n String CSDN_PATH = \"http://geek.csdn.net/\";\n\n //CSDN ajax请求算法\n String GEEK_CSDN_PATH = \"http://geek.csdn.net/service/news/\";\n\n String ITEYE_PATH_SHORT = \"http://www.iteye.com\";\n\n //ITEYE网址\n String ITEYE_PATH = ITEYE_PATH_SHORT + \"/\";\n\n //泡在网上的日子[移动版块]\n String JCC_PATH = \"http://www.jcodecraeer.com/\";\n\n //开源中国 [使用ajax请求]\n String OS_CHINA_PATH = \"https://www.oschina.net/\";\n\n //开源中国 [使用ajax请求]\n String OS_CHINA_PATH_AJAX = \"https://www.oschina.net/action/ajax/\";\n\n //CSDN搜索区\n String SEARCH_CSDN = \"http://so.csdn.net/so/search/\";\n\n //OSCHINA搜索区\n String SEARCH_OSCHINA = \"https://www.oschina.net/\";\n\n //INFOQ搜索区\n String SEARCH_INFOQ = \"http://www.infoq.com/\";\n\n\n /**\n * 获取CSDN文章链接\n *\n * @return\n * @\n */\n @GET(\"get_category_news_list\")\n Observable<String> getCSDNArticle(@Query(\"category_id\") String category_id,\n @Query(\"jsonpcallback\") String jsonpcallback,\n @Query(\"username\") String username,\n @Query(\"from\") String from,\n @Query(\"size\") String size,\n @Query(\"type\") String type,\n @Query(\"_\") String other);\n\n /**\n * ITeye文章链接\n *\n * @param page\n * @return\n */\n @GET(\"{type}\")\n Observable<String> getITEyeArticle(@Path(\"type\") String path, @Query(\"page\") int page);\n\n /**\n * ITEye 专栏笔记 位于blog之下\n *\n * @param path\n * @return\n */\n @GET(\"{path}\")\n Observable<String> getITEyeSubject(@Path(\"path\") String path);\n\n\n /**\n * Info文章链接\n *\n * @param id\n * @return\n */\n @GET(\"{type}/articles/{id}\")\n Observable<String> getInfoQArticle(@Path(\"type\") String type, @Path(\"id\") int id);\n\n /**\n * 泡在网上的日子 链接\n *\n * @param tid\n * @param pageNo\n * @return\n */\n @GET(\"plus/list.php\")\n Observable<String> getJccArticle(@Query(\"tid\") int tid, @Query(\"PageNo\") int pageNo);\n\n /**\n * OSChina 链接 ?type=0&p=5#catalogs\n *\n * @return\n */\n @GET(\"get_more_recommend_blog\")\n Observable<String> getOSChinaArticle(@Query(\"classification\") String classification, @Query(\"p\") int p);\n\n /**\n * 获取网页详细内容\n *\n * @return\n */\n @GET(\"{path}\")\n Observable<String> getWebContent(@Path(\"path\") String path);\n\n //http://so.csdn.net/so/search/s.do?q=Android&t=blog&o=&s=&l=null\n @GET(\"s.do\")\n Observable<String> searchCSDNContent(@Query(\"q\") String keyWords,\n @Query(\"t\") String type,\n @Query(\"o\") String o,\n @Query(\"s\") String s,\n @Query(\"l\") String l);\n\n //https://www.oschina.net/search?scope=blog&q=Android&fromerr=Nigvshhe\n @GET(\"search\")\n Observable<String> searchOSChinaContent(@Query(\"q\") String keyWords,\n @Query(\"scope\") String type,\n @Query(\"fromerr\") String formerr);\n\n\n //http://www.iteye.com/search?query=Android&type=blog\n @GET(\"search\")\n Observable<String> searchItEyeContent(@Query(\"query\") String keyWords,\n @Query(\"type\") String type);\n\n\n //http://www.jcodecraeer.com/plus/search.php?kwtype=0&q=Java\n @GET(\"plus/search.php\")\n Observable<String> searchJCCContent(@Query(\"keyword\") String keyWord,\n @Query(\"searchtype\") String searchType,\n @Query(\"orderby\") String orderby,\n @Query(\"kwtype\") String type,\n @Query(\"pagesize\") String pagesize,\n @Query(\"typeid\") String typeid,\n @Query(\"pageNo\") String pageNo);\n\n //http://www.infoq.com/cn/search.action?queryString=java&page=1&searchOrder=&sst=o9OURhPD52ER0BUp\n //sst 在infoQ中为搜索验证时使用 不对的话 将会有HTTP 404 异常\n //o9OURhPD52ER0BUp\n @GET(\"search.action\")\n Observable<String> searchInfoQContent(@Query(\"queryString\") String keyWords,\n @Query(\"page\") int page,\n @Query(\"searchOrder\") String order,\n @Query(\"sst\") String sst);\n\n //获取INFOQ的sst用于搜索\n @GET(\"mobile\")\n Observable<String> searchInfoQSST();\n\n //文件下载\n @GET(\"{photoPath}\")\n Observable<ResponseBody> downloadFile(@Path(value = \"photoPath\") String photoPath);\n\n\n}",
"@Override\r\n\t\t public boolean isResourceFiltered(Resource resource) {\n\t\t return \"pathmap\".equals(resource.getURI().scheme());\r\n\t\t }",
"URI rewrite(URI uri);"
] | [
"0.6272249",
"0.6272249",
"0.6074595",
"0.5839209",
"0.5700979",
"0.55924207",
"0.55292195",
"0.54889137",
"0.5420663",
"0.53906435",
"0.53899413",
"0.5385013",
"0.5385013",
"0.5380385",
"0.5356833",
"0.5349984",
"0.5342376",
"0.5319266",
"0.5292914",
"0.5290392",
"0.52799153",
"0.52286303",
"0.519842",
"0.51814157",
"0.5170012",
"0.51672316",
"0.5165061",
"0.51601934",
"0.5149418",
"0.5137748",
"0.5135081",
"0.5132213",
"0.51309264",
"0.5129226",
"0.5127108",
"0.51122844",
"0.5109497",
"0.5096479",
"0.5085854",
"0.5077781",
"0.50711405",
"0.50635684",
"0.50608486",
"0.5054459",
"0.5048892",
"0.50439",
"0.5038616",
"0.50385046",
"0.50290364",
"0.502688",
"0.50265807",
"0.501607",
"0.5011199",
"0.5007694",
"0.5007632",
"0.50018495",
"0.49987286",
"0.4994894",
"0.4992106",
"0.49796647",
"0.4979075",
"0.49679527",
"0.49627116",
"0.49623433",
"0.4956187",
"0.494587",
"0.4943566",
"0.4941621",
"0.49279544",
"0.4914587",
"0.49108014",
"0.49107054",
"0.49100292",
"0.49074888",
"0.49048904",
"0.49000552",
"0.4893441",
"0.4892187",
"0.4884619",
"0.4884584",
"0.48829377",
"0.48749116",
"0.48749116",
"0.48739615",
"0.48729917",
"0.48729587",
"0.48676962",
"0.48676962",
"0.48666915",
"0.48615652",
"0.48601866",
"0.4859695",
"0.48577678",
"0.48560098",
"0.48539862",
"0.48538086",
"0.48499864",
"0.48424336",
"0.48394755",
"0.48388588",
"0.48374006"
] | 0.0 | -1 |
Creates a List of Tweet from a List of TweetWithUser | public static List<Tweet> getTweetList(List<TweetWithUser> tweetWithUsers) {
List<Tweet> tweets = new ArrayList<>();
for (int i = 0; i < tweetWithUsers.size(); i++) {
Tweet tweet = tweetWithUsers.get(i).tweet;
tweet.user = tweetWithUsers.get(i).user;
tweets.add(tweet);
}
return tweets;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<TweetDto> tweets(String username) {\n\t\tList<Tweet> convert = userRepository.findByUname(username).getTweets();\n\n\t\tList<TweetDto> dto = new ArrayList<>();\n\t\tfor(Tweet check : convert){\n\t\t\tswitch (check.getType()) {\n\t\t\tcase \"simple\":\n\t\t\t\tdto.add(tweetMapper.toSimpleDto(check));\n\t\t\t\tbreak;\n\t\t\tcase \"reply\":\n\t\t\t\tdto.add(tweetMapper.toReplyDto(check));\n\t\t\t\tbreak;\n\t\t\tcase \"repost\":\n\t\t\t\tdto.add(tweetMapper.toRepostDto(check));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tCollections.sort(dto, new TweetCompare());\n\t\tCollections.reverse(dto);\n\t\treturn dto;\n\t}",
"public TweeterAdapter (List<Tweet> tweets){\n mTweets=tweets;\n }",
"public List<TweetDto> feed(String username) {\n\t\tList<TweetDto> self = new ArrayList<>();\n\t\tfor (Tweet tweet : userRepository.findByUname(username).getTweets()) {\n\t\t\tif (tweet.isDeleted() == false){\n\t\t\t\tswitch (tweet.getType()) {\n\t\t\t\tcase \"simple\":\n\t\t\t\t\tself.add(tweetMapper.toSimpleDto(tweet));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"reply\":\n\t\t\t\t\tself.add(tweetMapper.toReplyDto(tweet));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"repost\":\n\t\t\t\t\tself.add(tweetMapper.toRepostDto(tweet));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n/* Gets their followers posts and determines if it is a new post, reply or a repost\nand sets it in the database accordingly */\n\t\tfor (User u : userRepository.findByUname(username).getFollowing()) {\n\t\t\tfor (Tweet tweet : u.getTweets()) {\n\t\t\t\tif (tweet.isDeleted() == false)\n\t\t\t\t\tif (tweet.isDeleted() == false){\n\t\t\t\t\t\tswitch (tweet.getType()) {\n\t\t\t\t\t\tcase \"simple\":\n\t\t\t\t\t\t\tself.add(tweetMapper.toSimpleDto(tweet));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"reply\":\n\t\t\t\t\t\t\tself.add(tweetMapper.toReplyDto(tweet));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"repost\":\n\t\t\t\t\t\t\tself.add(tweetMapper.toRepostDto(tweet));\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}\n\t\t}\n\t\tCollections.sort(self, new TweetCompare());\n\t\tCollections.reverse(self);\n\t\treturn self;\n\t}",
"public List<Tweet> getAllTweets() {\n\t\tList<Tweet> tweets = new ArrayList<Tweet>();\n\t\tString selectQuery = \"SELECT * FROM \" + TweetDataSource.TABLE_TWEETS;\n\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor c = db.rawQuery(selectQuery, null);\n\n\t\t// looping through all rows and adding to list\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tTweet tweet = TweetDataSource.cursorToTweet(c);\n\n\t\t\t\tUser user = getUserById(c.getLong(c\n\t\t\t\t\t\t.getColumnIndex(TweetDataSource.COLUMN_USER_UID)));\n\t\t\t\ttweet.setUser(user);\n\n\t\t\t\t// adding to list\n\t\t\t\ttweets.add(tweet);\n\t\t\t} while (c.moveToNext());\n\t\t}\n\n\t\treturn tweets;\n\t}",
"private List<User> createUserList() {\n for (int i = 1; i<=5; i++) {\n User u = new User();\n u.setId(i);\n u.setEmail(\"user\"+i+\"@mail.com\");\n u.setPassword(\"pwd\"+i);\n userList.add(u);\n }\n return userList;\n }",
"public static Set<String> getMentionedUsers(List<Tweet> tweets) {\n\n// throw new RuntimeException(\"not implemented\");\n Set<String> anSet = new HashSet<>();\n Pattern pattern=Pattern.compile(\"@[a-zA-Z]{1,}\");\n Matcher matcher=pattern.matcher(tweets.get(0).getText());\n\n return anSet;\n }",
"public ArrayList<Tweet> getTweetsByUserId(long id) {\n\t\tTweet tweet = null;\n\t\t\n\t\tString queryString = \n\t\t\t \"PREFIX sweb: <\" + Config.NS + \"> \" +\n\t\t\t \"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \" +\n\t\t\t \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \" +\n\t\t\t \"PREFIX foaf: <http://xmlns.com/foaf/0.1/>\" +\n\t\t\t \"select * \" +\n\t\t\t \"where { \" +\n\t\t\t \t\t\"?user sweb:id \" + id + \".\" +\n\t\t\t \t\t\"?tweet sweb:user ?user. \" +\n\t\t\t \"} \\n \";\n\n\t Query query = QueryFactory.create(queryString);\n\t \n\t QueryExecution qe = QueryExecutionFactory.create(query, this.model);\n\t ResultSet results = qe.execSelect();\n\t \n\t ArrayList<Tweet> tweets = new ArrayList<Tweet>();\n\t while(results.hasNext()) {\n\t \tQuerySolution solution = results.nextSolution() ;\n\t Resource currentResource = solution.getResource(\"tweet\");\n\n\t /* Taking care of the date */\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-d k:m:s\");\n\t\t\tString dateRaw = currentResource.getProperty(this.createdAt).getString();\n\t\t\tdateRaw = dateRaw.replace('T', ' ');\n\t\t\tdateRaw = dateRaw.replace(\"Z\", \"\");\n\t\t\t\n\t\t\tDate date = null;\n\t\t\ttry {\n\t\t\t\tdate = dateFormat.parse(dateRaw);\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t tweet = new Tweet(\n\t \t\tString.valueOf(id),\n\t \t\tcurrentResource.getProperty(this.text).getString(),\n\t \t\tdate\n\t );\t\n\t \n\t tweets.add(tweet);\n\t }\n\t \n\t return tweets;\n\t}",
"@Override\n\tpublic List<UserTweet> getFeed() throws Exception {\n\t\tList<UserTweet> usertweets = new ArrayList<UserTweet>();\n\t\t\n\t\tUserTweet userTweet1 = new UserTweet();\n\t\tuserTweet1.setUsername(\"aren from dao\");\n\t\tuserTweet1.setTweetMessage(\"hey was up\");\n\t\t\n\t\tUserTweet userTweet2 = new UserTweet();\n\t\tuserTweet2.setUsername(\"aren2 new\");\n\t\tuserTweet2.setTweetMessage(\"hey was up 2\");\n\t\t\n\t\tusertweets.add(userTweet1);\n\t\tusertweets.add(userTweet2);\n\t\t\n\t\treturn usertweets;\n\t}",
"List<Tweet> findAllByUserInOrderByCreatedAtDesc(List<User> users);",
"public TweetsAdapter(Context context, List<Tweet> tweets) {\n this.context = context;\n this.tweets = tweets;\n }",
"public void createUser(List<User> list) {\n\n Gson gson = new Gson();\n FileService writerService = new FileService();\n for (User user : list) {\n String userData = gson.toJson(user);\n writerService.writeToUserData(userData);\n }\n\n }",
"private List<ResponseList<Status>> get_tweet(long id) {\n\t\tList<ResponseList<Status>> tweets = new ArrayList(2);\n\t\ttry {\n\n\t\t\tPaging paging = new Paging(1, 200);\n\t\t\tResponseList<Status> tmp_Statues = twitter.getUserTimeline(id, paging); // get 200 Tweet\n\t\t\ttweets.add(0, tmp_Statues);\n\t\t\tpaging = new Paging(2, 200);\n\t\t\ttmp_Statues = twitter.getUserTimeline(id, paging);// get another 200 Tweet\n\t\t\ttweets.add(1, tmp_Statues);\n\n\t\t\tSystem.out.println(\"insert Tweets...\");\n\t\t\tSystem.out.println(\"path class\");\n\t\t\tSystem.getProperty(\"java.class.path\");\n\n\t\t\tfor (Status s : tweets.get(0))\n\t\t\t\tdb.insertTweets(s);\n\t\t\tSystem.out.println(\"tweets.get(1)\");\n\n\t\t\tfor (Status s : tweets.get(1))\n\t\t\t\tdb.insertTweets(s);\n\t\t\tSystem.out.println(\"Update_Creat_At(id);\");\n\n\t\t\tdb.Update_Creat_At(id);\n\t\t\tSystem.out.println(\"update_Complete_Tweets\");\n\n\t\t\tdb.update_Complete_Tweets(id);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\t\treturn tweets;\n\t}",
"public static List<User> createUserList() {\r\n\t\tList<User> users = new ArrayList<User>();\r\n\t\t\r\n\t\tusers.add(createUser(1, \"Isha\", \"Khandelwal\", \"[email protected]\", \"ishaa\", \"ThinkHR\"));\r\n\t\tusers.add(createUser(2, \"Sharmila\", \"Tagore\", \"[email protected]\", \"stagore\", \"ASI\"));\r\n\t\tusers.add(createUser(3, \"Surabhi\", \"Bhawsar\", \"[email protected]\", \"sbhawsar\", \"Pepcus\"));\r\n\t\tusers.add(createUser(4, \"Shubham\", \"Solanki\", \"[email protected]\", \"ssolanki\", \"Pepcus\"));\r\n\t\tusers.add(createUser(5, \"Ajay\", \"Jain\", \"[email protected]\", \"ajain\", \"TCS\"));\r\n\t\tusers.add(createUser(6, \"Sandeep\", \"Vishwakarma\", \"[email protected]\", \"svishwakarma\", \"CIS\"));\r\n\t\tusers.add(createUser(7, \"Sushil\", \"Mahajan\", \"[email protected]\", \"smahajan\", \"ASI\"));\r\n\t\tusers.add(createUser(8, \"Sumedha\", \"Wani\", \"[email protected]\", \"swani\", \"InfoBeans\"));\r\n\t\tusers.add(createUser(9, \"Mohit\", \"Jain\", \"[email protected]\", \"mjain\", \"Pepcus\"));\r\n\t\tusers.add(createUser(10, \"Avi\", \"Jain\", \"[email protected]\", \"ajain\", \"Pepcus\"));\r\n\t\t\r\n\t\treturn users;\r\n\t}",
"private ArrayList<TweetData> getTweets(JSONObject json, QueryTargetInfo info) {\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n\n JSONArray jsonArray = json.optJSONArray(\"statuses\");\n\n\n if (jsonArray == null) {\n return tweets;\n }\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n TweetData tweet = new TweetData();\n JSONObject tweetJson = jsonArray.getJSONObject(i);\n\n SimpleDateFormat df = new SimpleDateFormat(TIME_FORMAT);\n\n tweet.twitterId = tweetJson.getString(\"id_str\");\n tweet.published = (int)(df.parse(tweetJson.getString(\"created_at\")).getTime() / 1000);\n tweet.content = tweetJson.getString(\"text\");\n tweet.source = tweetJson.optString(\"source\", \"<No Source>\");\n tweet.lang = tweetJson.optString(\"lang\", \"en\");\n\n tweet.author = \"Jon Doe\";\n JSONObject user = tweetJson.optJSONObject(\"user\");\n if (user != null) {\n tweet.author = user.optString(\"screen_name\", \"Jon Doe\");\n }\n\n tweet.place = tweetJson.optString(\"place\", \"\");\n tweet.geo = tweetJson.optString(\"geo\", \"\");\n\n // Keep track of the smallest id.\n if (info.smallestId == null ||\n Long.valueOf(tweet.twitterId) < Long.valueOf(info.smallestId)) {\n info.smallestId = tweet.twitterId;\n }\n\n // Keep track of the last seen (max) id.\n if (info.lastSeenId == null ||\n Long.valueOf(tweet.twitterId) > Long.valueOf(info.lastSeenId)) {\n info.lastSeenId = tweet.twitterId;\n }\n\n tweets.add(tweet);\n } catch (Exception ex) {\n Logger.logError(\"Unable to parse tweet.\", ex);\n }\n }\n\n return tweets;\n }",
"public List<Tweet> getTweets(String file) {\n List<String[]> data = this.extract(file);\n ArrayList<Tweet> tweets = new ArrayList<>();\n for (String[] row : data) {\n Tweet t = new Tweet(Integer.parseInt(row[0]), Integer.parseInt(row[1]), row[2], row[3]);\n tweets.add(t);\n }\n return tweets;\n }",
"List<User> getRandomUsers(List<User> uList, int num);",
"public TweetsAdapter(Context context, List<Tweet> tweets) {\n mTweets = tweets;\n mContext = context;\n }",
"public void addAll(List<Tweet> list) {\n tweetList.addAll(list);\n notifyDataSetChanged();\n }",
"public void addAll(List<NYT> tweetList) {\n nyts.addAll(tweetList);\n notifyDataSetChanged();\n }",
"public void addAll(List<Tweet> tweetList) {\n tweets.addAll(tweetList);\n notifyDataSetChanged();\n }",
"public UserList createUsers(Set<User> usersToCreate);",
"public void addAll(List<Tweet> list) {\n mTweets.addAll(list);\n notifyDataSetChanged();\n }",
"public void addAll(List<Tweet> list) {\n mTweets.addAll(list);\n notifyDataSetChanged();\n }",
"public void postTweet(int userId, int tweetId) {\n tweetList.add(new Tweet(tweetId, userId));\n }",
"public void postTweet(int userId, int tweetId) {\n size++;\n Tweet newTweet = new Tweet(tweetId, size);\n User target = null;\n for (User user : users) {\n if (user.id == userId) {\n target = user;\n break;\n }\n }\n if (target == null) {\n target = new User(userId);\n users.add(target);\n }\n target.tweetList.add(newTweet);\n }",
"public List createUserList()\r\n{\r\n\tUser madhu=new User(\"[email protected]\", \"madhu\");\r\n\tUser krishna=new User(\"[email protected]\", \"krishna\");\t\r\n\r\n\tList listOfUsers = new ArrayList();\r\n\tlistOfUsers.add(madhu);\r\n\tlistOfUsers.add(krshna);\r\n\treturn listOfUsers;\r\n}",
"public List<MessageListItem> makeList(List<BMessage> list){\n return MessageListItem.makeList(mActivity, userID, list, customDateFormat);\n }",
"List<UserResponse> toUserResponses(List<User> users);",
"public List<TwitterData> getValidatedTweets() {\n return new ArrayList<>();\n }",
"public Twitter() {\n followees = new HashMap<>();\n tweetList = new ArrayList<>();\n }",
"private void addUsers(List<String> userList, SubscriptionList subscriptionList, SubscriptionEventType eventType) {\n\t\tSubscription subscription = null;\n\t\t\n\t\tfor (Subscription s : subscriptionList.getSubscription()) {\n\t\t\tif (s.getEventType() == eventType) {\n\t\t\t\tsubscription = s;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (subscription != null) {\n\t\t\tfor (String userId : subscription.getUser()) {\n\t\t\t\tif (!userList.contains( userId )) {\n\t\t\t\t\tuserList.add( userId );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"List<UserInfo> getUserListByIdLists(List<Integer> idList);",
"private void createUserList() {\n\t\tif (!userList.isEmpty() && !listUsers.isSelectionEmpty()) {\n\t\t\tlistUsers.clearSelection();\n\t\t}\t\t\n\t\tif (!archivedUserList.isEmpty() && !listArchivedUsers.isSelectionEmpty()) {\n\t\t\tlistArchivedUsers.clearSelection();\n\t\t}\t\t\n\t\tarchivedUserList.clear();\n\t\tuserList.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tif (users.get(i).active()) {\n\t\t\t\tuserList.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t\t} else {\n\t\t\t\tarchivedUserList.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t\t}\t\t\n\t\t}\n\t}",
"public List<Kweet> getMentionKweets(String username) {\n return kweetDAO.getMentionKweets(username);\n }",
"private List<Session> ConvertSessionT(List<SessionT> listT) {\r\n\t\tList<Session> listerep = new ArrayList<Session>();\r\n\t\tfor (SessionT st : listT) {\r\n\t\t\tSession session = new Session();\r\n\t\t\tsession.setSessionT(st);\r\n\t\t\tlisterep.add(session);\r\n\t\t}\r\n\t\treturn listerep;\r\n\t}",
"public TweetAdapter(List<Tweet> tweets, Activity timeLineActivity) {\n mTweets = tweets;\n this.timeLineActivity = timeLineActivity;\n }",
"private void createAllUsersList(){\n\t\tunassignedUsersList.clear();\n\t\tlistedUsersAvailList.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tunassignedUsersList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t\tlistedUsersAvailList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t}\n\t}",
"public void insertUserListFromStatusList(List<Status> statusList) {\n\t\tIterator<Status> it = statusList.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tStatus st = it.next();\n\t\t\tUser user = st.getUser();\n\t\t\tInsertUser(user);\n\t\t}\n\t}",
"public void addToFollowedUsers(List<String> followedUsers);",
"void makeTweet(OnTweetPostListener onTweetPostListener);",
"public void postTweet(int userId, int tweetId) {\n if(!users.containsKey(userId)){\n HashSet<Integer> uId = new HashSet<>(); // if the user Id is not there, how will it post the tweet?\n users.put(userId, uId); // Add the user to the database first\n }\n users.get(userId).add(userId);\n if(!tweets.containsKey(userId)){\n List<Tweet> t_id = new ArrayList<>();\n t_id.add(new Tweet(timestamp++, tweetId)); // Similarly add the same user with the tweet object\n tweets.put(userId, t_id);\n } else {\n tweets.get(userId).add(new Tweet(timestamp++, tweetId)); // User is tweeting more nowadays\n }\n }",
"public static List<User> toUserList(LazyList<UserModel> lazyList) {\n List<User> users = new ArrayList<>();\n lazyList.stream().forEach((model) -> users.add(toUser(model)));\n return users;\n }",
"public /*User*/ void createUser (String username) throws TwitterException, JAXBException{\n\t\t\n \tSystem.out.println(\"STEP 1 - \" + username);\n \ttwitter4j.User user1 = twitter.showUser(username);\n \ttwCount ++;\n \t\n \tList<Status> status = twitter.getHomeTimeline();\n \ttwCount ++;\n \t\n \tString name = user1.getName();\n \tString location = user1.getLocation();\n \tString description = user1.getDescription();\n \t\n \tArrayList<Integer> follower = new ArrayList<Integer>();\n \tArrayList<Integer> following = new ArrayList<Integer>();\n \tArrayList<Integer> friend = new ArrayList<Integer>();\n \t\n \tString tweets = getTweets((int)user1.getId(), 200);\n \tArrayList<String> tweetsFollowing = new ArrayList<String>();\n \tArrayList<String> tweetsFriends = new ArrayList<String>();\n \t\n\n\t\t\n\t\t\n \t\n\t\tIDs ids, ids2;\n\t\tids = twitter.getFollowersIDs(username, -1); // follower\n\t\ttwCount ++;\n\t\tids2 = twitter.getFriendsIDs(username, -1); // following\n\t\ttwCount ++;\n\t\t\n\n\t\t\n\t \tSystem.out.println(\"STEP 2 - \" + username);\n\t\t\n\n\t\t/*Follower*/ /*MAX 5000*/\n for (long id : ids.getIDs()) { \n\t \tfollower.add((int) id);\n\n\n }\n \n \n /**Following**/ /*MAX 5000*/\n for (long id : ids2.getIDs()) { \n \tfollowing.add((int) id);\n \n }\n \n\n \n /*Friends*/\n \n \t/*showFriendship(int sourceId,int targetId) throws TwitterException\n\t\tGets the detailed relationship status between a source user and a target user\n\t\tThis method calls http://api.twitter.com/1/friendships/show.json */\n \n Relationship r = null;\n int z = 0;\n for (long id : ids2.getIDs()){\n \t r = twitter.showFriendship(user1.getId(),id);\n \t if (r.isSourceFollowedByTarget()){\n \t\t z += 1;\n \t\t// System.out.println(id + \",number \"+ i );\n \t\t friend.add((int)id);\n \t }\n \t \n \t if (z >= 20){\n \t\t break;\n \t }\n \t\n }\n \n \n \n \n \n \n // \tSystem.out.println(\"\\n hddjkdsakjsadkjsdkj \" + friend.size() + \" \" + following.size());\n \n \n \n \tSystem.out.println(\"STEP 3 - \" + username);\n \t\n \t\n \t\n \t\n String u = \"\";\n \n \n int count = 0;\n /*tweetsFollowing*/\n for (int j : following){\n //\tSystem.out.println(\"\\n\\n\\n prints following: \" + j );\n \tu = getTweets(j, 10);\n // \tSystem.out.println(\"u.size \" + u.length() );\n \tif( u.length() > 0){\n \t\ttweetsFollowing.add(u);\n \t\tcount ++;\n \t}\n if (count >= 10){\n \tbreak;\n }\n \t\n }\n \n \n \n /*tweetsFriends*/\n\t\tcount = 0;\n if (friend.size() >= 10){\n\t for (int i : friend){\n\t // \tSystem.out.println(\"\\n there is some friends: \" + friend.size() );\n\t \tu = getTweets(i, 10);\n\t //\tSystem.out.println(\"\\n U.LENGHT \" + u.length() );\n\t \tif (u.length() > 0){\n\t \t\ttweetsFriends.add(u);\n\t \t\tcount ++;\n\t \t}\n\t \t\n\t if (count >= 10){\n\t \tbreak;\n\t }\n\t }\n\t \n }else if (following.size() > 21){ // no friends, I consider the following (not in tweetsFollowing) like friends \n //\tSystem.out.println(\"There is not a friend - > considers some following like friends\");\n \tfor (int i = 11; i < following.size(); i++){ // considers some following like friends\n\t \t//System.out.println(\"\\n\\n\\n prints follower: \" + i );\n\t \tu = getTweets(i, 10);\n\t // \tSystem.out.println(\"u.size friend\" + u.length() );\n\t \tif (u.length() > 0){\n\t \t\ttweetsFriends.add(u);\n\t \t\tcount ++;\n\t \t}\n\t \t\n\t if (count >= 10){\n\t \tbreak;\n\t }\n\t }\n \t\n }else{// I consider the following like friends\n \ttweetsFriends = tweetsFollowing;\n }\n \n \n//\t\t\n\n \n \n //System.out.println(tweetsFriends.size() + \"siiixx\");\n \n \ttwitter.User user = new twitter.User(username, name, location, friend, following, tweets, tweetsFriends, tweetsFollowing, description);\n //\tSystem.out.println(user.getTweetsFriends().size() + \"siiixx\");\n \t\n \tFile file = new File(\"otherFile/users/\"+username+\".xml\");\n\t\tJAXBContext jaxbContext = JAXBContext.newInstance(twitter.User.class);\n\t\tMarshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n\t\t// output pretty printed\n\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n\t\tjaxbMarshaller.marshal(user, file);\n\t\tjaxbMarshaller.marshal(user, System.out);\n\n \n }",
"private void createUsers() {\n\n\t\tList<User> UserList = Arrays.asList(new User(\"Kiran\", \"kumar\", \"[email protected]\", 20),\n\t\t\t\tnew User(\"Ram\", \"kumar\", \"[email protected]\", 22), new User(\"RamKiran\", \"LaxmiKiran\", \"[email protected]\", 30),\n\t\t\t\tnew User(\"Lakshamn\", \"Seth\", \"[email protected]\", 50), new User(\"Sita\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"Ganesh\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"KiranKiran\", \"kumar\", \"[email protected]\", 20),\n\t\t\t\tnew User(\"RamRam\", \"kumar\", \"[email protected]\", 22),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"LaxmiKiran\", \"[email protected]\", 30),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"Seth\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"SitaSita\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"GaneshSita\", \"Kumar\", \"[email protected]\", 50));\n\n\t\tIterable<User> list = userService.saveAllUsers(UserList);\n\t\tfor (User User : list) {\n\t\t\tSystem.out.println(\"User Object\" + User.toString());\n\n\t\t}\n\n\t}",
"public static void initializeUserList() {\r\n\t\tUser newUser1 = new User(1, \"Elijah Hickey\", \"snhuEhick\", \"4255\", \"Admin\");\r\n\t\tuserList.add(newUser1);\r\n\t\t\r\n\t\tUser newUser2 = new User(2, \"Bob Ross\", \"HappyClouds\", \"200\", \"Employee\");\r\n\t\tuserList.add(newUser2);\r\n\t\t\r\n\t\tUser newUser3 = new User(3, \"Jane Doe\", \"unknown person\", \"0\", \"Intern\");\r\n\t\tuserList.add(newUser3);\r\n\t}",
"public ArrayList<Tweet> getTweets() {\n Collections.sort(tweets, new Comparator<Tweet>() {\n public int compare(Tweet tweet1, Tweet tweet2) {\n return tweet1.getDate().compareTo(tweet2.getDate());\n }\n });\n\n return tweets;\n }",
"@Test\n @DisplayName(\"Test valid tweets by user identifier\")\n public void test06_getAllValidateTweetsByUserId() throws Exception {\n long tweetId = (getTweets().get(0).getId());\n tweetService.validateTweetById(tweetId);\n TweetModel validTweet = tweetService.getTweet(tweetId);\n\n // Then: the user has valid tweets\n long userId = validTweet.getUser().getId();\n System.out.println(\"userId: \" + userId);\n\n List<TweetModel> tweet = tweetService.getValidTweets(userId);\n assertTrue(tweet.size() > 0);\n }",
"public List<Kweet> getUserKweets(String username) {\n return kweetDAO.getUserKweets(username);\n }",
"public List<TwitterUser> getAllUsers(String table) {\n // Lista que almacenara el resultado\n List<TwitterUser> twitterUserList = new ArrayList<TwitterUser>();\n //hacemos una query porque queremos devolver un cursor\n\n String query = (table.equals(MyDBHelper.TABLE_UNFOLLOWERS)) ? \"select * from \" + table\n : \"select * from \" + table + \" order by \" + MyDBHelper.COLUMN_ORDER + \" asc \";\n\n Cursor cursor = database.rawQuery(query, null);\n\n if (cursor.moveToFirst()) {\n while (!cursor.isAfterLast()) {\n TwitterUser user = new TwitterUser(cursor.getLong(0), cursor.getString(1),\n cursor.getString(2), cursor.getString(3));\n\n twitterUserList.add(user);\n cursor.moveToNext();\n }\n }\n\n cursor.close();\n // Una vez obtenidos todos los datos y cerrado el cursor, devolvemos la\n // lista.\n return twitterUserList;\n }",
"public void postTweet(final int userId, final int tweetId) {\n List<int[]> userTweets = tweets.computeIfAbsent(userId, x -> new ArrayList<>());\n userTweets.add(new int[]{userId, tweetId, userTweets.size(), serial++});\n }",
"public void shuffleTweets() {\n Collections.shuffle(tweets);\n }",
"private void populateUserMap(List<User> list) {\n\t\tfor (User user : list) {\n\t\t\tuserMap.put(user.getUserName(), user);\n\t\t}\n\n\t}",
"public List<Status> getTweetList(){\n\t\treturn this.tweetList;\n\t}",
"public void postTweet(int userId, int tweetId) {\r\n\t\t\ttwi twitt = new twi(userId, tweetId, timeStamp++);\r\n\t\t\tList<twi> list = tweet.get(userId);\r\n\t\t\tif (list == null) {\r\n\t\t\t\tlist = new ArrayList<twi>();\r\n\t\t\t\tlist.add(twitt);\r\n\t\t\t\ttweet.put(userId, list);\r\n\t\t\t} else {\r\n\t\t\t\tif (list.size() == 10) {\r\n\t\t\t\t\tlist.remove(0);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(twitt);\r\n\t\t\t}\r\n\t\t\tList<Integer> friend = follower.get(userId);\r\n\t\t\tif (friend == null) {\r\n\t\t\t\tfriend = new LinkedList<Integer>();\r\n\t\t\t\tfriend.add(userId);\r\n\t\t\t\tfollower.put(userId, friend);\r\n\t\t\t}\r\n\t\t}",
"public TweetsByState(ArrayList<Tweet> tweets) {\n this.tweets = tweets;\n // Populate states hashmap and create arraylists of tweets for each\n states.put(\"AL\", new ArrayList<Tweet>());\n states.put(\"AK\", new ArrayList<Tweet>());\n states.put(\"AS\", new ArrayList<Tweet>());\n states.put(\"AZ\", new ArrayList<Tweet>());\n states.put(\"AR\", new ArrayList<Tweet>());\n states.put(\"CA\", new ArrayList<Tweet>());\n states.put(\"CO\", new ArrayList<Tweet>());\n states.put(\"CT\", new ArrayList<Tweet>());\n states.put(\"DE\", new ArrayList<Tweet>());\n states.put(\"DC\", new ArrayList<Tweet>());\n states.put(\"FL\", new ArrayList<Tweet>());\n states.put(\"GA\", new ArrayList<Tweet>());\n states.put(\"GU\", new ArrayList<Tweet>());\n states.put(\"HI\", new ArrayList<Tweet>());\n states.put(\"IA\", new ArrayList<Tweet>());\n states.put(\"ID\", new ArrayList<Tweet>());\n states.put(\"IL\", new ArrayList<Tweet>());\n states.put(\"IN\", new ArrayList<Tweet>());\n states.put(\"KS\", new ArrayList<Tweet>());\n states.put(\"KY\", new ArrayList<Tweet>());\n states.put(\"LA\", new ArrayList<Tweet>());\n states.put(\"ME\", new ArrayList<Tweet>());\n states.put(\"MD\", new ArrayList<Tweet>());\n states.put(\"MA\", new ArrayList<Tweet>());\n states.put(\"MI\", new ArrayList<Tweet>());\n states.put(\"MN\", new ArrayList<Tweet>());\n states.put(\"MS\", new ArrayList<Tweet>());\n states.put(\"MO\", new ArrayList<Tweet>());\n states.put(\"MT\", new ArrayList<Tweet>());\n states.put(\"NE\", new ArrayList<Tweet>());\n states.put(\"NV\", new ArrayList<Tweet>());\n states.put(\"NH\", new ArrayList<Tweet>());\n states.put(\"NJ\", new ArrayList<Tweet>());\n states.put(\"NM\", new ArrayList<Tweet>());\n states.put(\"NY\", new ArrayList<Tweet>());\n states.put(\"NC\", new ArrayList<Tweet>());\n states.put(\"ND\", new ArrayList<Tweet>());\n states.put(\"OH\", new ArrayList<Tweet>());\n states.put(\"OK\", new ArrayList<Tweet>());\n states.put(\"OR\", new ArrayList<Tweet>());\n states.put(\"PA\", new ArrayList<Tweet>());\n states.put(\"PR\", new ArrayList<Tweet>());\n states.put(\"RI\", new ArrayList<Tweet>());\n states.put(\"SC\", new ArrayList<Tweet>());\n states.put(\"SD\", new ArrayList<Tweet>());\n states.put(\"TN\", new ArrayList<Tweet>());\n states.put(\"TX\", new ArrayList<Tweet>());\n states.put(\"UT\", new ArrayList<Tweet>());\n states.put(\"VT\", new ArrayList<Tweet>());\n states.put(\"VI\", new ArrayList<Tweet>());\n states.put(\"VA\", new ArrayList<Tweet>());\n states.put(\"WA\", new ArrayList<Tweet>());\n states.put(\"WV\", new ArrayList<Tweet>());\n states.put(\"WI\", new ArrayList<Tweet>());\n states.put(\"WY\", new ArrayList<Tweet>());\n\n // iterate through tweets and add to the corresponding state ArrayList\n for (Tweet t : tweets) {\n if (t.getLocation().contains(\"Alaska\") || t.getLocation().contains(\"AK\")\n || t.getLocation().contains(\"alaska\")) {\n states.get(\"AK\").add(t);\n }\n if (t.getLocation().contains(\"Alabama\") || t.getLocation().contains(\"AL\")\n || t.getLocation().contains(\"alabama\")) {\n states.get(\"AL\").add(t);\n }\n\n if (t.getLocation().contains(\"Arkansas\") || t.getLocation().contains(\"AR\")\n || t.getLocation().contains(\"arkansas\")) {\n states.get(\"AR\").add(t);\n }\n\n if (t.getLocation().contains(\"American Samoa\") || t.getLocation().contains(\"AS\")\n || t.getLocation().contains(\"Samoa\")) {\n states.get(\"AS\").add(t);\n }\n\n if (t.getLocation().contains(\"Arizona\") || t.getLocation().contains(\"AZ\")\n || t.getLocation().contains(\"arizona\")) {\n states.get(\"AZ\").add(t);\n }\n\n if (t.getLocation().contains(\"California\") || t.getLocation().contains(\"CA\")\n || t.getLocation().contains(\"california\")) {\n states.get(\"CA\").add(t);\n }\n\n if (t.getLocation().contains(\"Colorado\") || t.getLocation().contains(\"CO\")\n || t.getLocation().contains(\"colorado\")) {\n states.get(\"CO\").add(t);\n }\n\n if (t.getLocation().contains(\"Connecticut\") || t.getLocation().contains(\"CT\")\n || t.getLocation().contains(\"connecticut\")) {\n states.get(\"CT\").add(t);\n }\n\n if (t.getLocation().contains(\"District of Columbia\") || t.getLocation().contains(\"DC\")\n || t.getLocation().contains(\"Washington DC\")) {\n states.get(\"DC\").add(t);\n }\n\n if (t.getLocation().contains(\"Delaware\") || t.getLocation().contains(\"DE\")\n || t.getLocation().contains(\"delaware\")) {\n states.get(\"DE\").add(t);\n }\n\n if (t.getLocation().contains(\"Florida\") || t.getLocation().contains(\"FL\")\n || t.getLocation().contains(\"florida\")) {\n states.get(\"FL\").add(t);\n }\n\n if (t.getLocation().contains(\"Georgia\") || t.getLocation().contains(\"GA\")\n || t.getLocation().contains(\"georgia\")) {\n states.get(\"GA\").add(t);\n }\n\n if (t.getLocation().contains(\"Guam\") || t.getLocation().contains(\"GU\")\n || t.getLocation().contains(\"guam\")) {\n states.get(\"GU\").add(t);\n }\n\n if (t.getLocation().contains(\"Hawaii\") || t.getLocation().contains(\"HI\")\n || t.getLocation().contains(\"hawaii\")) {\n states.get(\"HI\").add(t);\n }\n if (t.getLocation().contains(\"Idaho\") || t.getLocation().contains(\"ID\")\n || t.getLocation().contains(\"idaho\")) {\n states.get(\"ID\").add(t);\n }\n\n if (t.getLocation().contains(\"Iowa\") || t.getLocation().contains(\"IA\")\n || t.getLocation().contains(\"iowa\")) {\n states.get(\"IA\").add(t);\n }\n\n if (t.getLocation().contains(\"Indiana\") || t.getLocation().contains(\"IN\")\n || t.getLocation().contains(\"indiana\")) {\n states.get(\"IN\").add(t);\n }\n\n if (t.getLocation().contains(\"Illinois\") || t.getLocation().contains(\"IL\")\n || t.getLocation().contains(\"illinois\")) {\n states.get(\"IL\").add(t);\n }\n\n if (t.getLocation().contains(\"Kansas\") || t.getLocation().contains(\"KS\")\n || t.getLocation().contains(\"kansas\")) {\n states.get(\"KS\").add(t);\n }\n\n if (t.getLocation().contains(\"Kentucky\") || t.getLocation().contains(\"KY\")\n || t.getLocation().contains(\"kentucky\")) {\n states.get(\"KY\").add(t);\n }\n\n if (t.getLocation().contains(\"Louisiana\") || t.getLocation().contains(\"LA\")\n || t.getLocation().contains(\"louisiana\")) {\n states.get(\"LA\").add(t);\n }\n\n if (t.getLocation().contains(\"Massachusetts\") || t.getLocation().contains(\"MA\")\n || t.getLocation().contains(\"massachusetts\")) {\n states.get(\"MA\").add(t);\n }\n\n if (t.getLocation().contains(\"Maryland\") || t.getLocation().contains(\"MD\")\n || t.getLocation().contains(\"maryland\")) {\n states.get(\"MD\").add(t);\n }\n\n if (t.getLocation().contains(\"Maine\") || t.getLocation().contains(\"ME\")\n || t.getLocation().contains(\"maine\")) {\n states.get(\"ME\").add(t);\n }\n\n if (t.getLocation().contains(\"Michigan\") || t.getLocation().contains(\"MI\")\n || t.getLocation().contains(\"michigan\")) {\n states.get(\"MI\").add(t);\n }\n\n if (t.getLocation().contains(\"Minnesota\") || t.getLocation().contains(\"MN\")\n || t.getLocation().contains(\"minnesota\")) {\n states.get(\"MN\").add(t);\n }\n\n if (t.getLocation().contains(\"Missouri\") || t.getLocation().contains(\"MO\")\n || t.getLocation().contains(\"missouri\")) {\n states.get(\"MO\").add(t);\n }\n\n if (t.getLocation().contains(\"Mississippi\") || t.getLocation().contains(\"MS\")\n || t.getLocation().contains(\"mississippi\")) {\n states.get(\"MS\").add(t);\n }\n\n if (t.getLocation().contains(\"Montana\") || t.getLocation().contains(\"MT\")\n || t.getLocation().contains(\"montana\")) {\n states.get(\"MT\").add(t);\n }\n\n if (t.getLocation().contains(\"North Carolina\") || t.getLocation().contains(\"NC\")\n || t.getLocation().contains(\"north carolina\")) {\n states.get(\"NC\").add(t);\n }\n\n if (t.getLocation().contains(\"North Dakota\") || t.getLocation().contains(\"ND\")\n || t.getLocation().contains(\"north dakota\")) {\n states.get(\"ND\").add(t);\n }\n\n if (t.getLocation().contains(\"Nebraska\") || t.getLocation().contains(\"NE\")\n || t.getLocation().contains(\"nebraska\")) {\n states.get(\"NE\").add(t);\n }\n\n if (t.getLocation().contains(\"New Hampshire\") || t.getLocation().contains(\"NH\")\n || t.getLocation().contains(\"new hampshire\")) {\n states.get(\"NH\").add(t);\n }\n\n if (t.getLocation().contains(\"New Jersey\") || t.getLocation().contains(\"NJ\")\n || t.getLocation().contains(\"Jersey\")) {\n states.get(\"NJ\").add(t);\n }\n\n if (t.getLocation().contains(\"New Mexico\") || t.getLocation().contains(\"NM\")\n || t.getLocation().contains(\"new mexico\")) {\n states.get(\"NM\").add(t);\n }\n\n if (t.getLocation().contains(\"Nevada\") || t.getLocation().contains(\"NV\")\n || t.getLocation().contains(\"nevada\")) {\n states.get(\"NV\").add(t);\n }\n\n if (t.getLocation().contains(\"New York\") || t.getLocation().contains(\"NY\")\n || t.getLocation().contains(\"new york\")) {\n states.get(\"NY\").add(t);\n }\n\n if (t.getLocation().contains(\"Ohio\") || t.getLocation().contains(\"OH\")\n || t.getLocation().contains(\"ohio\")) {\n states.get(\"OH\").add(t);\n }\n\n if (t.getLocation().contains(\"Oklahoma\") || t.getLocation().contains(\"OK\")\n || t.getLocation().contains(\"oklahoma\")) {\n states.get(\"OK\").add(t);\n }\n\n if (t.getLocation().contains(\"Oregon\") || t.getLocation().contains(\"OR\")\n || t.getLocation().contains(\"oregon\")) {\n states.get(\"OR\").add(t);\n }\n\n if (t.getLocation().contains(\"Pennsylvania\") || t.getLocation().contains(\"PA\")\n || t.getLocation().contains(\"pennsylvania\")) {\n states.get(\"PA\").add(t);\n }\n\n if (t.getLocation().contains(\"Puerto Rico\") || t.getLocation().contains(\"PR\")\n || t.getLocation().contains(\"puerto rico\")) {\n states.get(\"PR\").add(t);\n }\n\n if (t.getLocation().contains(\"Rhode Island\") || t.getLocation().contains(\"RI\")\n || t.getLocation().contains(\"rhode island\")) {\n states.get(\"RI\").add(t);\n }\n\n if (t.getLocation().contains(\"South Carolina\") || t.getLocation().contains(\"SC\")\n || t.getLocation().contains(\"south carolina\")) {\n states.get(\"SC\").add(t);\n }\n\n if (t.getLocation().contains(\"South Dakota\") || t.getLocation().contains(\"SD\")\n || t.getLocation().contains(\"south dakota\")) {\n states.get(\"SD\").add(t);\n }\n\n if (t.getLocation().contains(\"Tennessee\") || t.getLocation().contains(\"TN\")\n || t.getLocation().contains(\"tennessee\")) {\n states.get(\"TN\").add(t);\n }\n\n if (t.getLocation().contains(\"Texas\") || t.getLocation().contains(\"TX\")\n || t.getLocation().contains(\"texas\")) {\n states.get(\"TX\").add(t);\n }\n\n if (t.getLocation().contains(\"Utah\") || t.getLocation().contains(\"UT\")\n || t.getLocation().contains(\"utah\")) {\n states.get(\"UT\").add(t);\n }\n\n if (t.getLocation().contains(\"Virginia\") || t.getLocation().contains(\"VA\")\n || t.getLocation().contains(\"virginia\")) {\n states.get(\"VA\").add(t);\n }\n\n if (t.getLocation().contains(\"Virgin Islands\") || t.getLocation().contains(\"VI\")\n || t.getLocation().contains(\"virgin islands\")) {\n states.get(\"VI\").add(t);\n }\n\n if (t.getLocation().contains(\"Vermont\") || t.getLocation().contains(\"VT\")\n || t.getLocation().contains(\"vermont\")) {\n states.get(\"VT\").add(t);\n }\n\n if (t.getLocation().contains(\"Washington State\") || t.getLocation().contains(\"WA\")\n || t.getLocation().contains(\"Washington state\")) {\n states.get(\"WA\").add(t);\n }\n\n if (t.getLocation().contains(\"Wisconsin\") || t.getLocation().contains(\"WI\")\n || t.getLocation().contains(\"wisconsin\")) {\n states.get(\"WI\").add(t);\n }\n\n if (t.getLocation().contains(\"West Virginia\") || t.getLocation().contains(\"WV\")\n || t.getLocation().contains(\"west virginia\")) {\n states.get(\"WV\").add(t);\n }\n\n if (t.getLocation().contains(\"Wyoming\") || t.getLocation().contains(\"WY\")\n || t.getLocation().contains(\"wyoming\")) {\n states.get(\"WY\").add(t);\n } else\n continue;\n }\n }",
"public Weet[] getWeetsByUserFromStore(User usr) {\n int uid = usr.getId(); // Declare a variable for storing the ID of the given user.\n int weetNo = 0; // Declare a variable for storing the number of weets by the given user.\n\n Weet[] allWeets = new Weet[weets.length]; // Array within which to contain all by the specified user, including null.\n Weet[] uidWeets = new Weet[weetNo]; // Array which will contain all weets by the specified user.\n\n /**\n * Iterate through the array of weets. If the ID of the user who weeted the weet at index\n * i in the array is equal to the given ID, insert it into the next available space in\n * the allWeets array. Increment the variable storing the number of weets by the given user.\n */\n for (int i = 0; i < weets.length; i++) {\n if (weets[i].getUserId() == uid) {\n weets[i] = allWeets[weetNo];\n weetNo++;\n }\n }\n\n /* Copy allWeets into the uidWeets array to eliminate null elements/sort the array. */\n System.arraycopy(allWeets, 0, uidWeets, 0, uidWeets.length);\n //uidWeets = allWeets.clone();\n sortArray(uidWeets);\n\n return uidWeets;\n }",
"StatusListResponse getStatuses(StatusListRequest statusListRequest) throws IOException, TweeterRemoteException;",
"public void postTweet(int userId, int tweetId) {\n tweets.put(tweetId, idx++);\n LinkedList<Integer> tweets = userToTwitter.computeIfAbsent(userId, e -> new LinkedList<>());\n tweets.addLast(tweetId);\n while (tweets.size() > 10) {\n tweets.removeFirst();\n }\n }",
"public FollowAdapter(List<FollowObject> usersList, Context context){\r\n this.usersList = usersList;\r\n this.context = context;\r\n }",
"public List<Kweet> getTimelineKweets(String username) {\n return kweetDAO.getTimelineKweets(username);\n }",
"public List<Integer> getNewsFeed(int userId) {\n User target = null;\n for (User user : users) {\n if (user.id == userId) {\n target = user;\n }\n }\n if (target == null) {\n return null;\n }\n List<Tweet> tweets = new ArrayList<>(target.tweetList);\n for (User follower : target.followers) {\n tweets.addAll(follower.tweetList);\n }\n tweets.sort((o1, o2) -> o2.publishTime - o1.publishTime);\n while (tweets.size() > 10) {\n tweets.remove(tweets.size() - 1);\n }\n List<Integer> list = new ArrayList<>();\n for (Tweet tweet : tweets) {\n list.add(tweet.Id);\n }\n return list;\n }",
"public List<TwitterDataExtract> GetData();",
"private Tweet tabToTweet(String[] tab) throws ParseException {\n \t// Initialisation d'un tweet\n TweetSample tweet = new TweetSample();\n // position dans le tableau de string. Ici initialisé à 1\n int position = 1;\n \n if (tab.length < 3) // Gère le fait que le tweet n'a pas toutes les bonnes infos nécessaire\n \treturn null;\n else if (tab[2].length() < 19) // Gère le fait que la date ne soit pas au bon format\n \treturn null;\n \n // Si la taille du tableau est supérieur à la position (position = 1)\n if (tab.length > position ) {\n \t// Si la tab[1] est égale à 000 normalement non vu que 000 (dans Foot.txt) serait en position 0 mais on ne sait jamais\n if (tab[position].equals(\"000\")) {\n // Incrémente position\n \tposition ++;\n }\n // On ajoute tab[position] dans l'attribut userId de l'objet tweet\n tweet.setUserId(tab[position]);\n // Incrémente position\n position ++;\n } else\n \t// Sinon rtid égale null dans le cas où il n'éxiste pas\n tweet.setRtid(null);\n\n // Si la taille du tableau est supérieur à la position (position = 2)\n if (tab.length > position ) {\n \t// Création d'un formateur de date\n \tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n \t// Création d'une date avec le string trouvé dans le tableau de string\n Date date = sdf.parse(tab[position]);\n // On ajoute date dans l'attribut date de l'objet tweet\n tweet.setDate(date);\n // Incrémente position\n position ++;\n } else\n \t// Sinon rtid égale null dans le cas où il n'éxiste pas\n tweet.setRtid(null);\n\n // Si la taille du tableau est supérieur à la position (position = 3)\n if (tab.length > position ) {\n \t// On ajoute le message trouvé dans le tableau dans l'attribut text de l'objet tweet\n tweet.setText(tab[position]);\n // Incrémente position\n position ++;\n } else\n \t// Sinon rtid égale null dans le cas où il n'éxiste pas\n tweet.setRtid(null);\n\n // Si la taille du tableau est supérieur à la position (position = 4)\n if (tab.length > position ) {\n \t// On ajoute le rtid trouvé dans le tableau dans l'attribut rtid de l'objet tweet\n tweet.setRtid(tab[position]);\n } else\n \t// On ajoute une chaine vide dans le cas où il n'y pas de rtid dans l'attribut rtid de l'objet tweet \n tweet.setRtid(\"\");\n \n // Retourne l'objet tweet\n return tweet;\n }",
"public List<Utilizator> creareLista(long id) {\r\n\r\n List<Utilizator> aux = new ArrayList<>();\r\n List<Long> l = service.getFriend2(id);\r\n for (Long e : l) {\r\n Utilizator u = service.findOne(e);\r\n aux.add(u);\r\n }\r\n return aux;\r\n\r\n }",
"private List<RestauranteDetailDTO> restauranteListEntity2DTO(List<RestauranteEntity> entityList){\n List<RestauranteDetailDTO> list = new ArrayList<>();\n for (RestauranteEntity entity : entityList) {\n list.add(new RestauranteDetailDTO(entity));\n }\n return list;\n }",
"public Twitter() {\n size = 0;\n users = new ArrayList<>();\n }",
"public static void main(String[] args) {\n Tweet tweet1 = new Tweet(\n \"@TheAdamFields\",\n \"I'm learning #spring development with @craigsdennis...\",\n new Date(1502769600000L)\n );\n\n Tweet tweet2 = new Tweet(\n \"@TheAdamFields\",\n \"I'm learning #android development with @craigsdennis...\",\n new Date(1502856000000L)\n );\n\n // Create an array of tweets in reverse order, then sort\n Tweet[] tweets = {tweet2, tweet1};\n Arrays.sort(tweets);\n\n // Save the tweets to a .ser file\n TweetList.save(tweets);\n\n // Load tweets from the file\n Tweet[] loadedTweets = TweetList.load();\n\n for (Tweet tweet : loadedTweets) {\n System.out.println(tweet);\n }\n\n Set<String> allHashTags = new HashSet<>();\n Set<String> allMentions = new HashSet<>();\n\n for (Tweet tweet : tweets) {\n allHashTags.addAll(tweet.getHashTags());\n allMentions.addAll(tweet.getMentions());\n }\n\n System.out.printf(\"Hashtags: %s %n\", allHashTags);\n System.out.printf(\"Mentions: %s %n\", allMentions);\n\n Map<String, Integer> hashTagCounts = new HashMap<>();\n\n for (Tweet tweet : tweets) {\n for (String hashTag : tweet.getHashTags()) {\n Integer count = hashTagCounts.get(hashTag);\n\n if (count == null) {\n count = 0;\n }\n\n count++;\n hashTagCounts.put(hashTag, count);\n }\n }\n\n System.out.printf(\"Hashtag Counts: %s %n\", hashTagCounts);\n\n Map<String, List<Tweet>> tweetsByAuthor = new HashMap<>();\n\n for (Tweet tweet : tweets) {\n List<Tweet> authoredTweets = tweetsByAuthor.get(tweet.getAuthor());\n\n if (authoredTweets == null) {\n authoredTweets = new ArrayList<>();\n tweetsByAuthor.put(tweet.getAuthor(), authoredTweets);\n }\n\n authoredTweets.add(tweet);\n }\n\n System.out.printf(\"Tweets by author: %s %n\", tweetsByAuthor);\n }",
"public UserList(ArrayList<User> users)\n\t\t{\n\t\t\tthis.users = users;\n\t }",
"public void addAll(ArrayList<Tweet> tweets) {\n\t\taTweets.addAll(tweets);\n\t}",
"public LobbyAction(List<LobbyUser> userList) {\n this.userList = userList;\n }",
"public List<UserExtraDTO> getSpecificUser(Set<UserExtra> list)\n\t{\n\t\tList<UserExtraDTO> users=new ArrayList<UserExtraDTO>();\n\n\t\tIterator<UserExtra> it=list.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tUserExtra userEx=it.next();\n\t\t\tOptional<User> user=userService.findByid(userEx.getId());\n\t\t\tusers.add(new UserExtraDTO(user.get(),userEx));\n\t\t}\n\n\n\n\t\treturn users;\n\t}",
"List<User> addUsersToShowableList(UserListRequest userListRequest);",
"public void postTweet(int userId, int tweetId) {\n Tweet tweet = new Tweet(tweetId, System.nanoTime());\n putSelfTweet(userId, tweet);\n if (userId2Followers.containsKey(userId)) {\n Set<Integer> followers = userId2Followers.get(userId);\n for (Integer followerId : followers) {\n putFollowerTweet(followerId, tweet);\n }\n }\n }",
"@PostMapping(\"/timeline\")\n\tpublic List<tweets> timelineList() {\n\n\t\tList<Tweet> timeline = twitter.timelineOperations().getHomeTimeline();\n\t\tfor (Tweet tweet : timeline) {\n\t\t\ttweets objTweets = new tweets(0, tweet.getText(), tweet.getProfileImageUrl(), tweet.getFromUser());\n\t\t\tservice.saveTweets(objTweets);\n\t\t}\n\t\tList<tweets> home = service.listAll();\n\t\treturn home;\n\t}",
"public static List<TweetWithSentiment> checkTweetListAgainstWordlistParallel(List<TweetWithSentiment> tweetList, String[] wordList) {\n\n // List of Tweets to be returned to caller\n List<TweetWithSentiment> problematicTweets = new ArrayList<>();\n\n // Loop through each tweet in the passed list of tweets\n // Parallelization of forEach loop\n tweetList.parallelStream().forEach(tweet -> {\n\n // Initialise boolean to check whether a tweet is contained in list\n boolean alreadyContainedInList = false;\n\n // Loop through prohibited words list, if any tweets contain prohibited word, increment count\n for (String problematicWord : wordList) {\n if (RegexToAWordInTweet.regexToAWordInTweet(problematicWord, tweet.tweetText)) {\n\n // check if we have saved any problem tweets, if not just add tweet to the list\n if (problematicTweets.size() > 0) {\n\n // loop through problem tweets, check if tweet id is already present,\n // if it is, then dont add it again\n for (TweetWithSentiment checkTweet : problematicTweets) {\n\n // Gets each tweet in the problematic tweets list,\n // used for checking if tweet is already in list\n // Check whether the current tweets id is\n // already in the problematic tweet list,\n // if it is then flag is set to true, if not it will remain false\n if (tweet.id.equals(checkTweet.id)) {\n alreadyContainedInList = true;\n break;\n }\n }\n\n // if the tweet isn't already in the list ,add it\n if (!alreadyContainedInList) {\n problematicTweets.add(tweet);\n }\n\n // after checking if it's in list, reset flag for next comparison\n alreadyContainedInList = false;\n\n // If we haven't saved any tweets yet, just save it\n } else {\n problematicTweets.add(tweet);\n }\n }\n }\n });\n\n // Sort list & return sorted list to method caller\n problematicTweets.sort(Comparator.comparing(TweetWithSentiment::getId).reversed());\n return problematicTweets;\n }",
"public SocialScreenAdapter(Context context, List<UserSocial> list) {\n this.users = list;\n this.context = context;\n }",
"public LinkedList<User> getUsers() throws TwitterException {\n System.out.println(\"##########Getting The Tweets##########\");\n LinkedList<User> users = new LinkedList<>();\n for (String keyword : this.wordsLookingFor) {\n //Search for tweets\n for (Status A : this.searchTweets(keyword)) {\n //System.out.println(A.getText());\n getUserFromStatus(users, A);\n }\n }\n\n System.out.println(\"Users Number is \".concat(Integer.toString(users.size())));\n return users;\n }",
"private List<Agent> ConvertAgentT(List<AgentT> listT) {\r\n\t\tList<Agent> listerep = new ArrayList<Agent>();\r\n\t\tfor (AgentT at : listT) {\r\n\t\t\tAgent agent = new Agent();\r\n\t\t\tagent.setAgentT(at);\r\n\t\t\tlisterep.add(agent);\r\n\t\t}\r\n\t\treturn listerep;\r\n\t}",
"public void postTweet(int userId, int tweetId) {\n\n }",
"public void postTweet(int userId, int tweetId) {\n List<Integer> userTweetList = twitterTweetMap.getOrDefault(userId, new LinkedList<>());\n userTweetList.add(0,tweetId);\n twitterTweetMap.put(userId, userTweetList);\n for(int followerId : reverseTwitterFollowMap.getOrDefault(userId, new HashSet<>())){\n List<Integer> followeeTweetList = twitterTweetMap.getOrDefault(followerId, new LinkedList<>());\n followeeTweetList.add(0,tweetId);\n twitterTweetMap.put(followerId, followeeTweetList);\n }\n }",
"public void appendToFollowedUsers(List<String> followedUsers);",
"private ArrayList<Answer> createAnswers(){\n\t\tlong[] timestamps = getTimestamps();\n\t\t\n\t\t//get questions\n\t\tQuestionDAO questionDAO = new QuestionDAO();\n \t\tList<Question> questions = questionDAO.getAllEntities();\n\t\t\n\t\t//get users\n\t\tString[] users = getTestUsers();\n\t\t\n\t\t//create answers for each user, timestamp with random rating\n\t\tArrayList<Answer> answers = new ArrayList<Answer>();\n\t\tAnswerDAO answerDAO = new AnswerDAO();\n\t\t\n\t\tfor(Question question : questions){\n\t\t\tfor(String user : users){\n\t\t\t\tfor(long timestamp : timestamps){\n\t\t\t\t\tAnswer answer = new Answer();\n\t\t\t\t\tanswer.setCreationTimestamp(timestamp);\n\t\t\t\t\tanswer.setQuestionCategory(question.getCategory());\n\t\t\t\t\tanswer.setQuestionCategoryId(question.getCategoryId());\n\t\t\t\t\tanswer.setQuestionId(question.getId());\n\t\t\t\t\tanswer.setQuestionText(question.getDescription());\n\t\t\t\t\tanswer.setRating(getRandomRating(0,10));\n\t\t\t\t\tanswer.setUser(user);\n\t\t\t\t\tanswers.add(answerDAO.createEntity(answer));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn answers;\n\t}",
"public final void mo69782a(List<SuggestUser> list) {\n Collection collection = list;\n if (!C6307b.m19566a(collection)) {\n StringBuilder sb = new StringBuilder();\n if (list == null) {\n C7573i.m23580a();\n }\n int size = collection.size();\n for (int i = 0; i < size; i++) {\n User user = ((SuggestUser) list.get(i)).user;\n if (user != null) {\n sb.append(user.getUid());\n if (i < list.size() - 1) {\n sb.append(\",\");\n }\n }\n }\n C6907h.m21524a(\"search_for_you_show\", (Map) C22984d.m75611a().mo59973a(\"search_type\", mo69547a()).mo59973a(\"user_list\", sb.toString()).f60753a);\n }\n }",
"public static StringList createFrom(String list1[], String list2[], String list3[]) {\n StringList list = new StringList(list1);\n list.merge(list2);\n list.merge(list3);\n return list;\n }",
"public Twitter() {\n\t\t\ttweets = new ArrayList<>();\n\t\t\tuserTweets = new HashMap<>();\n\t\t\ttweetOwner = new HashMap<>();\n\t\t\tuserRelation = new HashMap<>();\n\t\t}",
"public List<Integer> getNewsFeed(int userId) {\n if (!followees.containsKey(userId)) {\n followees.put(userId, new HashSet<>());\n followees.get(userId).add(userId);\n }\n List<Integer> result = new ArrayList<>();\n for (int i = tweetList.size() - 1; i >= 0; i--) {\n if (followees.get(userId).contains(tweetList.get(i).userId))\n result.add(tweetList.get(i).tweetId);\n if (result.size() == 10)\n break;\n }\n return result;\n }",
"public void postTweet(int userId, int tweetId) {\n tweetMap.putIfAbsent(userId, new ArrayList<>());\n tweetMap.get(userId).add(new int[]{time++, tweetId});\n }",
"public static ArrayList<User> getUsers() {\n users = new ArrayList<User>();\n /*users.add(new User(\"Парковый Гагарина 5а/1\", \"срочный\", \"общий\"));\n users.add(new User(\"Алексеевские планы Ореховая 15 возле шлагбаума\", \"срочный\", \"общий\"));\n users.add(new User(\"Фастовецкая Азина 26\", \"срочный\", \"индивидуальный\"));*/\n //users.add(new User(MainActivity.adres.get(0), \"срочный\", \"общий\"));\n users.add(new User(\"Нет заказов\",\"срочный\",\"общий\"));\n return users;\n }",
"List<Sex> getUsersWithCorrectedGender(List<User> users);",
"public static List<TuitionBean> populateTuitionBeanList(List<Tuition> tuitions) {\n\t\tList<TuitionBean> tuitionBeans = new ArrayList<TuitionBean>();\n\n\t\tif (isNotNull(tuitions) && !tuitions.isEmpty()) {\n\t\t\tfor (Tuition tuition : tuitions) {\n\t\t\t\tTuitionBean tuitionBean = new TuitionBean();\n\n\t\t\t\ttuitionBean.setOwnerName(tuition.getOwnerName());\n\t\t\t\ttuitionBean.setTuitionAddress(tuition.getTuitionAddress());\n\t\t\t\ttuitionBean.setTuitionContactNumber(tuition.getTuitionContactNumber());\n\t\t\t\ttuitionBean.setTuitionEmailAddress(tuition.getTuitionEmailAddress());\n\t\t\t\ttuitionBean.setTuitionEstablishedYear(tuition.getTuitionEstablishedYear());\n\t\t\t\ttuitionBean.setTuitionGstNumber(tuition.getTuitionGstNumber());\n\t\t\t\ttuitionBean.setTuitionId(tuition.getTuitionId());\n\t\t\t\ttuitionBean.setTuitionName(tuition.getTuitionName());\n\t\t\t\ttuitionBean.setTuitionRegistrationDate(tuition.getTuitionRegistrationDate() != null\n\t\t\t\t\t\t? tuition.getTuitionRegistrationDate().toString() : null);\n\t\t\t\ttuitionBean.setTuitionWebsiteAddress(tuition.getTuitionWebsiteAddress());\n\t\t\t\ttuitionBeans.add(tuitionBean);\n\t\t\t}\n\t\t}\n\t\treturn tuitionBeans;\n\t}",
"public List<Integer> getNewsFeed(int userId) {\n List<Integer> ret = new ArrayList<>();\n if (!map.containsKey(userId)) return ret;\n User u = map.get(userId);\n PriorityQueue<Tweet> q = new PriorityQueue<>(u.followee.size(), (a, b) -> (b.time - a.time));\n for (User usr: u.followee) {\n if (usr.tweet != null)\n q.add(usr.tweet);\n }\n for (int i = 0; i < 10 && !q.isEmpty(); i++) {\n Tweet t = q.poll();\n ret.add(t.ID);\n if (t.next != null)\n q.add(t.next);\n }\n return ret;\n }",
"Data<List<User>> getFollowers();",
"public HashMap<Integer, User> process(List<User> list) {\n HashMap<Integer, User> map = new HashMap<>();\n for (User user : list) {\n int userId = user.getId();\n map.putIfAbsent(userId, user);\n }\n return map;\n }",
"List<TicketDto> toDtoList(List<TicketEntity> ticketEntityList);",
"public void initUsers() {\n User user1 = new User(\"Alicja\", \"Grzyb\", \"111111\", \"grzyb\");\n User user2 = new User(\"Krzysztof\", \"Kowalski\", \"222222\", \"kowalski\");\n User user3 = new User(\"Karolina\", \"Nowak\", \"333333\", \"nowak\");\n User user4 = new User(\"Zbigniew\", \"Stonoga \", \"444444\", \"stonoga\");\n User user5 = new User(\"Olek\", \"Michnik\", \"555555\", \"michnik\");\n users.add(user1);\n users.add(user2);\n users.add(user3);\n users.add(user4);\n users.add(user5);\n }",
"public static Tweet fromJSON(JSONObject jsonObject) throws JSONException {\n Tweet tweet = new Tweet();\n //extract values from JSON\n tweet.body = jsonObject.getString(\"text\");\n tweet.uid = jsonObject.getLong(\"id\");\n tweet.createdAt = jsonObject.getString(\"created_at\");\n tweet.user = User.fromJSON(jsonObject.getJSONObject(\"user\"));\n tweet.retweet_count = jsonObject.getInt(\"retweet_count\");\n tweet.retweeted = jsonObject.getBoolean(\"retweeted\");\n tweet.favorite_count = jsonObject.getInt(\"favorite_count\");\n tweet.favorited = jsonObject.getBoolean(\"favorited\");\n tweet.id = jsonObject.getInt(\"id_str\");\n return tweet;\n\n }",
"public List<Utilizator> listUsers();",
"@Test\n public void whenMapUserListToUserDtoList_thenOk() {\n\n List<User> userList = InstanceFactory.users;\n\n List<UserDTO> userDTOList = UserMapper.INSTANCE.entitiesToDTOs(userList);\n\n assertEquals(userList.get(0).getId(), userDTOList.get(0).getId());\n assertEquals(userList.get(0).getLogin(), userDTOList.get(0).getLogin());\n assertEquals(userList.get(0).getPassword(), userDTOList.get(0).getPassword());\n\n }",
"List<User> getActivatedUserList();",
"public FriendList createFriendList();"
] | [
"0.66674274",
"0.644565",
"0.6140946",
"0.6113469",
"0.6042153",
"0.5939918",
"0.5877199",
"0.5858598",
"0.57797986",
"0.57400703",
"0.5710646",
"0.5706984",
"0.5687448",
"0.56453764",
"0.56230575",
"0.5622644",
"0.56136346",
"0.5576216",
"0.55751956",
"0.5552593",
"0.55429316",
"0.5484229",
"0.5484229",
"0.54724705",
"0.5470463",
"0.5447182",
"0.5415002",
"0.5406804",
"0.5388994",
"0.53888345",
"0.5382798",
"0.5364384",
"0.53540176",
"0.53491557",
"0.5299148",
"0.52756333",
"0.52737004",
"0.5273436",
"0.5267931",
"0.5240663",
"0.5239208",
"0.52266383",
"0.5212957",
"0.5197415",
"0.5168664",
"0.5166201",
"0.51594245",
"0.5141598",
"0.51385945",
"0.5122944",
"0.5118293",
"0.51155627",
"0.5106096",
"0.50794166",
"0.5067958",
"0.506642",
"0.50559515",
"0.5049269",
"0.50479203",
"0.50399154",
"0.50347054",
"0.5028091",
"0.50128615",
"0.50082076",
"0.50058275",
"0.5003235",
"0.49817446",
"0.49732143",
"0.49669933",
"0.4965802",
"0.4963538",
"0.49589005",
"0.49581403",
"0.49559698",
"0.4952585",
"0.4948266",
"0.49466723",
"0.4942052",
"0.49406415",
"0.49393612",
"0.49303296",
"0.49209845",
"0.4917054",
"0.4913812",
"0.49068218",
"0.49049708",
"0.4889737",
"0.48848176",
"0.4882097",
"0.48818246",
"0.48684776",
"0.48641607",
"0.48634118",
"0.48582047",
"0.48514217",
"0.484628",
"0.48447585",
"0.48409304",
"0.48363864",
"0.48305824"
] | 0.7606781 | 0 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_favorite_movie, container, false);
rvMovie = rootView.findViewById(R.id.lv_list);
movieAdapter = new MovieFavoriteAdapter(getActivity());
rvMovie.setHasFixedSize(true);
rvMovie.setLayoutManager(new LinearLayoutManager(getActivity()));
rvMovie.setAdapter(movieAdapter);
HandlerThread handlerThread = new HandlerThread("DataObserver");
handlerThread.start();
Handler handler = new Handler(handlerThread.getLooper());
myObserver = new DataObserver(handler, getActivity());
getActivity().getContentResolver().registerContentObserver(CONTENT_URI, true, myObserver);
new getData(getActivity(), this).execute();
return rootView;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}",
"@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }"
] | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.6625158",
"0.66195583",
"0.66164845",
"0.6608733",
"0.6596594",
"0.65928894",
"0.6585293",
"0.65842897",
"0.65730995",
"0.6571248",
"0.6569152",
"0.65689117",
"0.656853",
"0.6566686",
"0.65652984",
"0.6553419",
"0.65525705",
"0.65432084",
"0.6542382",
"0.65411425",
"0.6538022",
"0.65366334",
"0.65355957",
"0.6535043",
"0.65329415",
"0.65311074",
"0.65310687",
"0.6528645",
"0.65277404",
"0.6525902",
"0.6524516",
"0.6524048",
"0.65232015",
"0.65224624",
"0.65185034",
"0.65130377",
"0.6512968",
"0.65122765",
"0.65116245",
"0.65106046",
"0.65103024",
"0.6509013",
"0.65088093",
"0.6508651",
"0.6508225",
"0.6504662",
"0.650149",
"0.65011525",
"0.6500686",
"0.64974767",
"0.64935696",
"0.6492234",
"0.6490034",
"0.6487609",
"0.6487216",
"0.64872116",
"0.6486594",
"0.64861935",
"0.6486018",
"0.6484269",
"0.648366",
"0.6481476",
"0.6481086",
"0.6480985",
"0.6480396",
"0.64797544",
"0.647696",
"0.64758915",
"0.6475649",
"0.6474114",
"0.6474004",
"0.6470706",
"0.6470275",
"0.64702207",
"0.6470039",
"0.6467449",
"0.646602",
"0.6462256",
"0.64617974",
"0.6461681",
"0.6461214"
] | 0.0 | -1 |
Initializes the Jython runtime. This should only be called once, before any other Python objects (including PythonInterpreter) are created. | public static void
initialize(Properties preProperties, Properties postProperties, String[] argv) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void init() {\n safeLevel = config.getSafeLevel();\n \n // Construct key services\n loadService = config.createLoadService(this);\n posix = POSIXFactory.getPOSIX(new JRubyPOSIXHandler(this), RubyInstanceConfig.nativeEnabled);\n javaSupport = new JavaSupport(this);\n \n if (RubyInstanceConfig.POOLING_ENABLED) {\n executor = new ThreadPoolExecutor(\n RubyInstanceConfig.POOL_MIN,\n RubyInstanceConfig.POOL_MAX,\n RubyInstanceConfig.POOL_TTL,\n TimeUnit.SECONDS,\n new SynchronousQueue<Runnable>(),\n new DaemonThreadFactory());\n }\n \n // initialize the root of the class hierarchy completely\n initRoot();\n \n // Set up the main thread in thread service\n threadService.initMainThread();\n \n // Get the main threadcontext (gets constructed for us)\n ThreadContext tc = getCurrentContext();\n \n // Construct the top-level execution frame and scope for the main thread\n tc.prepareTopLevel(objectClass, topSelf);\n \n // Initialize all the core classes\n bootstrap();\n \n // Initialize the \"dummy\" class used as a marker\n dummyClass = new RubyClass(this, classClass);\n dummyClass.freeze(tc);\n \n // Create global constants and variables\n RubyGlobal.createGlobals(tc, this);\n \n // Prepare LoadService and load path\n getLoadService().init(config.loadPaths());\n \n booting = false;\n \n // initialize builtin libraries\n initBuiltins();\n \n if(config.isProfiling()) {\n getLoadService().require(\"jruby/profiler/shutdown_hook\");\n }\n \n // Require in all libraries specified on command line\n for (String scriptName : config.requiredLibraries()) {\n loadService.require(scriptName);\n }\n }",
"public void init() {\n\t\tif (!Rengine.versionCheck()) {\n\t\t System.err.println(\"** Version mismatch - Java files don't match library version.\");\n\t\t System.exit(1);\n\t\t}\n\t\t\n\t\tString[] args = {\"--vanilla\"};\n\t\tre = new Rengine(args, false, new TextConsole());\n\t\t\n\t\t// the engine creates R is a new thread, so we should wait until it's ready\n if (!re.waitForR()) {\n System.out.println(\"Cannot load R\");\n return;\n }\n\t\t\n\t}",
"public static void init() {\n if (!initialized) {\n try {\n System.loadLibrary(\"tensorflowlite_test_jni\");\n } catch (UnsatisfiedLinkError e) {\n System.loadLibrary(\"tensorflowlite_stable_test_jni\");\n }\n initTfLiteForTest();\n initialized = true;\n }\n }",
"public void startup() throws JyroException {\n\t\tClassLoader loader = java.lang.Thread.currentThread().getContextClassLoader();\n\t\tplatform = new JyroPlatform(name, home, loader, null);\n\t\tplatform.startup();\n\t\treturn;\n\t}",
"public void initialize(FrancRuntime runtime) {\n\t\tthis.nodeID = runtime.getNodeID();\n\t\tthis.mp = runtime.getMessagePool();\t\t\n }",
"private void startUp () {\n NativeMethodBroker.loadLibrary(false);\n try {\n start_up();\n } catch (UnsatisfiedLinkError e) {\n try {\n NativeMethodBroker.loadLibrary(true);\n NativeMethodBroker.traceln(AX_PROGRESS, \"There apparently were problems \" +\n \"in initially loading JavaContainer.dll. \" +\n \"It appears to be ok now. Error message \" +\n \"was \" + e.getMessage());\n start_up();\n } catch (UnsatisfiedLinkError e2) {\n NativeMethodBroker.traceln(AX_ERROR, fatalErrorMessage +\n \" Error message was: \" + e2.getMessage());\n // Really should exit here.\n // System.exit(-1);\n }\n }\n }",
"public void init() {\n\t\tThread appThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tSwingUtilities.invokeAndWait(doHelloWorld);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Finished on \" + Thread.currentThread());\n\t\t\t}\n\t\t};\n\t\tappThread.start();\n\t}",
"protected void initApplication() throws Exception {\r\n\t\tthis.updateDynamicWelcomeText(\"Initializing application subsystem...\");\r\n\r\n\t\t// default (true) is that ImageIO caches images to disk when they are\r\n\t\t// read!\r\n\t\tImageIO.setUseCache(false);\r\n\r\n\t\t// Use of MediaLib acceleration or not\r\n\t\t// JAI 1.1.3 native acceleration problems:\r\n\t\t// SubSampleAverage: sometimes black lines around tiles (Pyramid\r\n\t\t// Dimension)\r\n\t\tSystem.setProperty(\"com.sun.media.jai.disableMediaLib\", \"true\");\r\n\r\n\t\t// initialize all IQM user operators for JAI\r\n\t\tCommonTools.setDefaultToolTipDelays();\r\n\r\n\t\t// initialize the factories, registries and dynamic menus\r\n\t\tTaskFactory.getInstance();\r\n\t\tPluginRegistry.getInstance();\r\n\t\tOperatorRegistry.getInstance();\r\n\t\tPluginMenu.getInstance();\r\n\t\t// initialize the Groovy script engine\r\n\r\n\t\t// initialize the workflow control classes\r\n\t\tTank.getInstance();\r\n\t\tManager.getInstance();\r\n\t\tLook.getInstance();\r\n\t\tPlot.getInstance();\r\n\t\tTable.getInstance();\r\n\t\tText.getInstance();\r\n\r\n\t\t// register other singletons\r\n\t\tDialogUtil.getInstance();\r\n\r\n\t\t// register all standard operators\r\n\t\tOperatorRegistryHelper.registerImageOperators();\r\n\t\tOperatorRegistryHelper.registerPlotOperators();\r\n\r\n\t\t// initialize the custom cursors\r\n\t\tCursorFactory.initializeCustomCursors();\r\n\r\n\t\t// register the plugins\r\n\t\tthis.loadPlugins();\r\n\r\n\t\t// TileCache Memory, etc..\r\n\t\tthis.setJAIDefaultOptions();\r\n\t}",
"private void jbInit() throws Exception {\n }",
"public PythonInterpreter() {\n }",
"public void initEasyJWeb() {\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.execute.EasyJWeb.initialization.applications\"));\r\n\t\tif (resourceLoader == null) {\r\n\t\t\tif (servletContext != null)\r\n\t\t\t\tresourceLoader = new ServletContextResourceLoader(\r\n\t\t\t\t\t\tservletContext);\r\n\t\t\telse\r\n\t\t\t\tresourceLoader = new FileResourceLoader();\r\n\t\t}\r\n\t\tinitContainer();\r\n\t\tFrameworkEngine.setWebConfig(webConfig);// 初始化框架工具\r\n\t\tFrameworkEngine.setContainer(container);// 在引擎中安装容器\r\n\t\tAjaxUtil.setServiceContainer(new AjaxServiceContainer(container));// 初始化Ajax容器服务\r\n\t\tinitTemplate(); // 初始化模版\r\n\t\tinvokeApps();// 在应用启动的时候启动一些配置好的应用\r\n\t\thaveInitEasyJWeb = true;\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.EasyJWeb.initialized\"));\r\n\t}",
"@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }",
"private static void init() {\n __lib = new JnaGmpLib();\n }",
"private void init() throws LWJGLException {\n gameLogic.init(window);\n }",
"public static void init() {}",
"private void setup() {\n py.exec(\"from org.python.core import Py\");\n py.exec(\"import python.main.PythonTraceFunction\");\n py.set(\"ptf\", ptf);\n py.exec(\"Py.getThreadState().tracefunc = ptf\");\n py.set(\"console\", python.panel.getImplementation());\n py.set(\"__impl\", python.bot.getImplementation());\n }",
"protected native void init();",
"public void init() {\n // These data structures are initialized here because other\n // module's startUp() might be called before ours\n this.systemStartTime = System.currentTimeMillis();\n }",
"private void initJMeter() {\n\n JMeterUtils.setJMeterHome(PropertiesUtil.getBaseDir());\n JMeterUtils.loadJMeterProperties(PropertiesUtil.getJMeterPropertiesFile());\n JMeterUtils.initLogging();// you can comment this line out to see extra log messages of i.e. DEBUG level\n JMeterUtils.initLocale();\n userDefinedArguments = (Arguments) new ArgumentsPanel().createTestElement();\n }",
"public static void init() {\n }",
"public static void init() {\n }",
"private static native void init();",
"@Override\n public void init() throws Exception {\n // On Mac OS X Chromium engine must be initialized in non-UI thread.\n if (Environment.isMac()) {\n BrowserCore.initialize();\n }\n }",
"public abstract void init() throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException, RemoteReadException, InterruptedException;",
"public void init() throws InitializationException;",
"public /*static*/ native void init();",
"@VisibleForTesting\n public void initialize() {\n initializeNative();\n }",
"public void init() {\n log.info(\"initialization\");\n }",
"public void init() {}",
"public void init() {}",
"public void init() throws BuildException {\n setJavaVersionProperty();\n \n ComponentHelper.getComponentHelper(this).initDefaultDefinitions();\n \n setSystemProperties();\n }",
"protected void initJvmRuntime(MBeanServer paramMBeanServer) throws Exception {\n/* 342 */ String str = getGroupOid(\"JvmRuntime\", \"1.3.6.1.4.1.42.2.145.3.163.1.1.4\");\n/* 343 */ ObjectName objectName = null;\n/* 344 */ if (paramMBeanServer != null) {\n/* 345 */ objectName = getGroupObjectName(\"JvmRuntime\", str, this.mibName + \":name=sun.management.snmp.jvmmib.JvmRuntime\");\n/* */ }\n/* 347 */ JvmRuntimeMeta jvmRuntimeMeta = createJvmRuntimeMetaNode(\"JvmRuntime\", str, objectName, paramMBeanServer);\n/* 348 */ if (jvmRuntimeMeta != null) {\n/* 349 */ jvmRuntimeMeta.registerTableNodes(this, paramMBeanServer);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 355 */ JvmRuntimeMBean jvmRuntimeMBean = (JvmRuntimeMBean)createJvmRuntimeMBean(\"JvmRuntime\", str, objectName, paramMBeanServer);\n/* 356 */ jvmRuntimeMeta.setInstance(jvmRuntimeMBean);\n/* 357 */ registerGroupNode(\"JvmRuntime\", str, objectName, jvmRuntimeMeta, jvmRuntimeMBean, paramMBeanServer);\n/* */ } \n/* */ }",
"public static void init() {\n startTime = System.currentTimeMillis();\n if (clientExecutorEngine == null) {\n clientExecutorEngine = new ClientExecutorEngine();\n HzClient.initClient();\n }\n }",
"public void init() {\n\t\tregisterFunctions();\n\t\t\t\t\n\t\t//Start it\n\t\tconsole.startUserConsole();\n\t}",
"void jbInit() throws Exception\r\n\t{\r\n\t}",
"public DefaultJvmLauncher()\n {\n }",
"private void initializeBoot()\n {\n bootLoader = getClass().getClassLoader();\n\n // Get the home directory of the Java implementation we're being run by\n javaHomeDir = new File(System.getProperty(\"java.home\"));\n\n try {\n runtimeClassPath = getKnownJars(getBluejLibDir(), runtimeJars, false, numBuildJars);\n runtimeUserClassPath = getKnownJars(getBluejLibDir(), userJars, true, numUserBuildJars);\n }\n catch (Exception exc) {\n exc.printStackTrace();\n }\n }",
"public static void init() {\n\n }",
"public static void init() {\n\t\t\n\t}",
"public void init();",
"public void init();",
"public void init();",
"public void init();",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public static void initialize() {\n\n GUIResources.addResourcesFromClasspath();\n _initialize();\n\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"void init() {\n\t\tinitTypes();\n\t\tinitGlobalFunctions();\n\t\tinitFunctions();\n\t\tinitClasses();\n\t}",
"public void initialize() {\n // empty for now\n }",
"private void init() {\n }",
"private void initialize() {\r\n\t\tthis.setSize(733, 427);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"jProxyChecker\");\r\n\t}",
"public void init() { }",
"public void init() { }",
"public void init() {\n\t\t}",
"public void init() {\n\t}",
"public void init() {\n\t}",
"public void init() {\n\t}",
"static void init() {}",
"public void init()\n {\n }",
"@Override\n\tpublic void init() {\n\t\t// Nothing to do in this example\n\t}",
"public void init() {\n\t\n\t}",
"@Override\n public void initialize() {\n CallInvokerHolderImpl jsCallInvokerHolder = (CallInvokerHolderImpl) getReactApplicationContext().getCatalystInstance().getJSCallInvokerHolder();\n setupFlushUiQueue(jsCallInvokerHolder);\n }",
"@Override\n public void init() throws Exception {\n if (Environment.isMac()) {\n BrowserCore.initialize();\n }\n }",
"private synchronized void startRuntimeIfNeeded() {\n if (childProcess != null) {\n return;\n }\n\n // If JSII_DEBUG is set, enable traces.\n final String jsiiDebug = System.getenv(\"JSII_DEBUG\");\n final boolean traceEnabled = jsiiDebug != null\n && !jsiiDebug.isEmpty()\n && !jsiiDebug.equalsIgnoreCase(\"false\")\n && !jsiiDebug.equalsIgnoreCase(\"0\");\n\n // If JSII_RUNTIME is set, use it to find the jsii-server executable\n // otherwise, we default to \"jsii-runtime\" from PATH.\n final String jsiiRuntimeEnv = System.getenv(\"JSII_RUNTIME\");\n final List<String> jsiiRuntimeCommand = jsiiRuntimeEnv == null\n ? Arrays.asList(\"node\", BundledRuntime.extract(getClass()))\n : Collections.singletonList(jsiiRuntimeEnv);\n\n if (traceEnabled) {\n System.err.println(\"jsii-runtime: \" + String.join(\" \", jsiiRuntimeCommand));\n }\n\n try {\n final ProcessBuilder pb = new ProcessBuilder()\n .command(jsiiRuntimeCommand)\n .redirectError(ProcessBuilder.Redirect.PIPE)\n .redirectOutput(ProcessBuilder.Redirect.PIPE)\n .redirectInput(ProcessBuilder.Redirect.PIPE);\n pb.environment().put(\"JSII_AGENT\", String.format(\"Java/%s\", System.getProperty(\"java.version\")));\n if (jsiiDebug != null) {\n pb.environment().put(\"JSII_DEBUG\", jsiiDebug);\n }\n\n this.childProcess = pb.start();\n\n this.stdin = new OutputStreamWriter(this.childProcess.getOutputStream(), StandardCharsets.UTF_8);\n this.stdout = new BufferedReader(new InputStreamReader(this.childProcess.getInputStream(), StandardCharsets.UTF_8));\n\n this.errorStreamSink = new ErrorStreamSink(this.childProcess.getErrorStream());\n this.errorStreamSink.start();\n } catch (final IOException ioe) {\n throw new UncheckedIOException(ioe);\n }\n\n this.shutdownHook = new Thread(this::terminate, \"Terminate jsii client\");\n Runtime.getRuntime().addShutdownHook(this.shutdownHook);\n\n handshake();\n\n this.client = new JsiiClient(this);\n }",
"public static void init() {\n\t\ttry {\n\t\t\tvariables = new Variables(SaveDataUtilities.JSONIn(\"tmp/variables.json\"));\n\t\t} catch (JSONReloadException e) {\n\t\t\te.printStackTrace();\n\t\t\tvariables = new Variables();\n\t\t}\n\t\t\n\t\tLogger.print(\"Initializing.\");\n\t\t\n\t\t// Load modules\n\t\tLogger.print(\"Loading Handlers...\", 1);\n\t\t// Load default handlers\n\t\tReflections reflect = new Reflections(\"caris.framework.handlers\");\n\t\tfor( Class<?> c : reflect.getSubTypesOf( caris.framework.basehandlers.Handler.class ) ) {\n\t\t\tHandler h = null;\n\t\t\ttry {\n\t\t\t\th = (Handler) c.newInstance();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tif( h != null ) {\n\t\t\t\tLogger.print(\"Adding \" + h.name + \" to the Handler Map\", 2);\n\t\t\t\thandlers.put( h.name.toLowerCase(), h );\n\t\t\t}\n\t\t}\n\t\t// Load modular handlers\n\t\treflect = new Reflections(\"caris.modular.handlers\");\n\t\tfor( Class<?> c : reflect.getSubTypesOf( caris.framework.basehandlers.Handler.class ) ) {\n\t\t\tHandler h = null;\n\t\t\ttry {\n\t\t\t\th = (Handler) c.newInstance();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tif( h != null ) {\n\t\t\t\tLogger.print(\"Adding \" + h.name + \" to the Handler Map\", 2);\n\t\t\t\thandlers.put( h.name.toLowerCase(), h );\n\t\t\t}\n\t\t}\n\t\t\n\t\tLogger.print(\"Loaded Handlers:\", 1);\n\t\tfor( String s : handlers.keySet() ) {\n\t\t\tLogger.print(s, 2);\n\t\t}\n\t\t\t\t\n\t\tLogger.print(\"Initialization complete.\");\n\t}",
"public void init() {\r\n\r\n\t}",
"public PythonInterpreter(PyObject dict) {\n }",
"public void initialize() {\n // TODO\n }",
"private void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public abstract void init();",
"public abstract void init();",
"public abstract void init();",
"public abstract void init();",
"public abstract void init();",
"public abstract void init();",
"public abstract void init();",
"public abstract void init();",
"public abstract void init();",
"public abstract void init();",
"private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}",
"public void initialize() {\n //TODO: Initialization steps\n\n initialized = true;\n }",
"private void initializeJep(String filePath, List<String> preEvals)\n throws JepException {\n // this enables easy import of java classes in the python script\n jep.eval(\"import JavaImporter\");\n\n if (preEvals != null) {\n for (String statement : preEvals) {\n jep.eval(statement);\n }\n }\n\n if (filePath != null) {\n jep.runScript(filePath);\n }\n }",
"private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}",
"public void init()\n\t{\n\t\tsuper.init();\n\t\tM_log.info(\"init()\");\n\t}",
"public void init()\n\t{\n\t\tsuper.init();\n\t\tM_log.info(\"init()\");\n\t}",
"public void init() {\n\t\t\n\t}",
"public void init(){}",
"protected void initialize () {\r\n if (initCommand!=null) matlabEng.engEvalString (id,initCommand);\r\n }",
"private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}",
"public JsConsoleManagerTest() {\n console = new JsConsoleManager();\n }",
"public void init() {\n\t\twindow.init();\n\t\t\n\t\t//OBJModel test = new OBJModel(\"monkey.obj\");\n\t\t//IndexedModel model = test.toIndexedModel();\n\t\t//Model test2 = new Model(OBJLoader.loadMesh(\"monkey.obj\"));\n\t\t\n\t}",
"private void initialize() {\n if (!stopped.get()) {\n \tSystem.out.printf(\"Starting Red5 with args: %s\\n\", Arrays.toString(commandLineArgs));\n // start\n try {\n\t\t\t\tBootstrap.main(commandLineArgs);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n }",
"private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}"
] | [
"0.70488334",
"0.6714529",
"0.6306604",
"0.61423206",
"0.6114642",
"0.6052985",
"0.6028795",
"0.6019025",
"0.600341",
"0.599951",
"0.5985431",
"0.5984495",
"0.59511244",
"0.59353405",
"0.59131515",
"0.58958566",
"0.58764255",
"0.5861387",
"0.58505607",
"0.5835454",
"0.5835454",
"0.5829938",
"0.58105516",
"0.5796065",
"0.5771765",
"0.57716846",
"0.5764955",
"0.5758242",
"0.5752901",
"0.5752901",
"0.57443535",
"0.5729382",
"0.57158977",
"0.5708794",
"0.57034165",
"0.57027453",
"0.56931436",
"0.5692468",
"0.568102",
"0.5649068",
"0.5649068",
"0.5649068",
"0.5649068",
"0.56416726",
"0.56416726",
"0.56416726",
"0.56416726",
"0.563183",
"0.56238836",
"0.56238836",
"0.56238836",
"0.56238836",
"0.5618595",
"0.5612583",
"0.5609571",
"0.5602844",
"0.55955094",
"0.55955094",
"0.5593789",
"0.558812",
"0.558812",
"0.558812",
"0.5582088",
"0.5576587",
"0.5573524",
"0.5570591",
"0.5569529",
"0.5569222",
"0.5566869",
"0.55581605",
"0.5556946",
"0.55484396",
"0.5534429",
"0.55244964",
"0.55214596",
"0.55214596",
"0.55214596",
"0.5518495",
"0.5518495",
"0.5518495",
"0.5518495",
"0.5518495",
"0.5518495",
"0.5518495",
"0.5518495",
"0.5518495",
"0.5518495",
"0.55072856",
"0.5502717",
"0.54983735",
"0.54939574",
"0.54883146",
"0.54883146",
"0.5475496",
"0.54754865",
"0.5474788",
"0.546921",
"0.54665315",
"0.5450721",
"0.5447084",
"0.54463726"
] | 0.0 | -1 |
Creates a new interpreter with an empty local namespace. | public PythonInterpreter() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Interpreter() {\n super();\n instructionsStack.push(new ArrayList<>());\n }",
"InterpreterRuntimeContext createInterpreterRuntimeContext();",
"@SubL(source = \"cycl/stacks.lisp\", position = 1818) \n public static final SubLObject create_stack() {\n return clear_stack(make_stack(UNPROVIDED));\n }",
"Program createProgram();",
"Program createProgram();",
"Program createProgram();",
"public ProgramModule createRootModule(String treeName) throws DuplicateNameException;",
"protected VaryGrammarRuntimeModule createRuntimeModule() {\n\t\treturn new VaryGrammarRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn VaryGrammarInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}",
"@Override\n\tpublic IOProcessor create(Interpreter interpreter) {\n\t\tTestCustomIOProc ioProc = new TestCustomIOProc();\n\t\tioProc.interpreter = interpreter;\n\t\tioProc.swigReleaseOwnership();\n\t\treturn ioProc;\n\t}",
"public abstract ILanguageProtocol makeInterpreter(String source, String replQualifiedName, String... salixPath) throws IOException, URISyntaxException, Exception;",
"public Local() {\n }",
"@Override\r\n \tprotected IInterpreterInstall getInterpreter() {\n \t\treturn null;\r\n \t}",
"Scope createScope();",
"public LocalObject() {}",
"@Override\n public Object clone()\n {\n return new LocalEditorKit();\n }",
"public ExecutionFactoryImpl() {\n\t\tsuper();\n\t}",
"Interpreter getInterpreter();",
"public GlobalScope() {\n super(null);\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 LanguageInterpreterRegistry() {\r\n\t\t// hides default constructor.\r\n\t}",
"public StandardScriptFactory(String scriptEngineName, String scriptSourceLocator)\n/* */ {\n/* 87 */ this(scriptEngineName, scriptSourceLocator, (Class[])null);\n/* */ }",
"public PythonInterpreter(PyObject dict) {\n }",
"static Obj NewObj (String name,int kind) {\r\n\t\tObj p, obj = new Obj();\r\n obj.name = new String(name); \r\n\t\tobj.type = null; obj.kind = kind;\r\n\t\tobj.level = curLevel;\r\n\t\tp = topScope.locals;\r\n\t\t/*Para buscar si el nb de la variable nueva ya esta!!!*/\r\n\t\twhile (p != null) { \r\n \t \tif (p.name.equals(name)) Parser.SemError(1);\r\n\t\t\tp = p.next;\r\n\t\t}\r\n \t//FILO!!\r\n obj.next = topScope.locals; \r\n\t\ttopScope.locals = obj;\r\n \t//if (kind == vars) {}\r\n \t//obj.adr = topScope.nextAdr; topScope.nextAdr++;\r\n \t//obj.view();\r\n\t\treturn obj;\r\n }",
"public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }",
"public Ruby() {}",
"NOEMBED createNOEMBED();",
"public Universe() {\n for (int x = 0; x < universe.length; x++) {\n Planet p = new Planet();\n universe[x] = p;\n }\n }",
"public Local createLocal(Position pos, Local local) {\n return syn.createLocal(pos, local.localInstance());\n }",
"public SLogoCodeInterpreter(Visualizer vis) {\n\t\tinitializeDictionary();\n\t\tmyVis = vis;\n\t\tmyTurtles = new TurtleTracker(vis);\n\t\tmyTurtles.add();\n\t\tmyTurtles.get(0).setActive(true);\n\t\tmyTurtles.get(0).makeVisible();\n\t\tcommandGenerator = new CommandFactory();\n\t\ttry {\n\t\t\tsetProperties(DEFAULT_LANGUAGE);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SLogoException(\"Default language resource missing\");\n\t\t}\n\t}",
"EntryPoint createEntryPoint();",
"public static PythonInterpreter threadLocalStateInterpreter(PyObject dict) {\n return null;\n }",
"public static NamespaceContext create() {\n return new NamespaceContext();\n }",
"public Python() {\n\t\t// TODO Auto-generated constructor stub\n\t}",
"Program program() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tToken progName = match(IDENTIFIER);\r\n\t\tBlock block = block();\r\n\t\treturn new Program (first, progName, block);\r\n\t}",
"private InterpreterState(final String statename) {\n name = statename;\n }",
"public Blank()\n {\n // Here you set up your interface. You can look at other patch editors\n // to see how they were done. At the very end you typically would say something like:\n \n \n model.set(\"name\", \"InitName\"); // or whatever, to set the initial name of your patch (assuming you use \"name\" as the key for the patch name)\n loadDefaults(); // this tells Edisyn to load the \".init\" sysex file you created. If you haven't set that up, it won't bother\n }",
"private static Object createStandaloneTester() {\n List<URL> urls = new ArrayList<>();\n for (String path : Splitter.on(':').split(System.getProperty(\"java.class.path\"))) {\n\n // A small hack is needed since we didn't make example application under different groupId and not prefixed\n // the artifactId with something special (cdap- and hive-)\n // Check for io/cdap/cdap\n if (path.contains(\"/io/cdap/cdap/\")) {\n String artifactFile = Paths.get(path).getFileName().toString();\n if (!artifactFile.startsWith(\"cdap-\") && !artifactFile.startsWith(\"hive-\")) {\n continue;\n }\n }\n\n try {\n urls.add(Paths.get(path).toUri().toURL());\n } catch (MalformedURLException e) {\n throw Throwables.propagate(e);\n }\n }\n\n ClassLoader classLoader = new MainClassLoader(urls.toArray(new URL[urls.size()]), null);\n try {\n Class<?> clz = classLoader.loadClass(StandaloneTester.class.getName());\n Constructor<?> constructor = clz.getConstructor(Object[].class);\n return constructor.newInstance((Object) new Object[0]);\n } catch (Exception e) {\n throw Throwables.propagate(e);\n }\n }",
"public ProgramNode(String aName, DeclarationsNode globals, SubProgramDeclarationsNode functions, CompoundStatementNode main, Scope scope) {\n\t\tthis.name = aName;\n\t\tglobalVariables = globals;\n\t\tthis.functions = functions;\n\t\tthis.main = main;\n\t\tsymbolTable = scope;\n\t}",
"public static void main(String[] args) {\n\t\tWorkspace workspace = new Workspace();\r\n\t}",
"abstract public PyCode getMain();",
"public Scriptable construct(Context cx, Scriptable scope, Object[] args);",
"public static ExecutionFactory init() {\n\t\ttry {\n\t\t\tExecutionFactory theExecutionFactory = (ExecutionFactory)EPackage.Registry.INSTANCE.getEFactory(ExecutionPackage.eNS_URI);\n\t\t\tif (theExecutionFactory != null) {\n\t\t\t\treturn theExecutionFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ExecutionFactoryImpl();\n\t}",
"public Verif() {\n\t\tenv = new Environ();\n\t}",
"abstract AbstractRuntimeServiceNode<T> newRuntimeNode();",
"TopLevel createTopLevel();",
"public JseBaseSynthesizer() {\n this(null);\n }",
"private ServiceMonitoringStatusInterpreter() { /* do nothing */ }",
"protected Object newInitialFlow() {\n\t\treturn emptySet.clone();\n\t}",
"protected PlayLangRuntimeModule createRuntimeModule() {\n\t\treturn new PlayLangRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn PlayLangInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}",
"public static synchronized Engine resetEngine() {\n if (engineInstance != null) {\n engineInstance = new Engine();\n }\n return engineInstance;\n }",
"public View create(Element elem)\n {\n if(isTextEval) {\n return new bluej.debugmgr.texteval.TextEvalSyntaxView(elem);\n }\n else {\n return new MoeSyntaxView(elem, errorMgr);\n }\n }",
"public NewScript(NewScriptTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 17; i++) jj_la1[i] = -1;\n }",
"public StandardScriptFactory(String scriptSourceLocator)\n/* */ {\n/* 65 */ this(null, scriptSourceLocator, (Class[])null);\n/* */ }",
"VirtualMachine.DefinitionStages.Blank define(String name);",
"VirtualMachine.DefinitionStages.Blank define(String name);",
"public ProgramNode( String nameTmp,\n\t\t\tDeclarationsNode variablesTmp,\n\t\t\tSubProgramDeclarationsNode functionsTmp,\n\t\t\tCompoundStatementNode mainTmp ){\n\n\t\tname = nameTmp;\n\n\t\tvariables = variablesTmp;\n\n\t\tfunctions = functionsTmp;\n\n\t\tmain = mainTmp;\n\n\t}",
"Idiom createIdiom();",
"IfaceState createState(int nlocal,IfaceSafetyStatus sts);",
"public void removeDefaultInterpreter() {\n\t\ttry {\n\t\t\topenInterpreters();\n\t\t\tSWTBotShell shell = getBot().shell(DLG_PREFERENCES);\n\t\t\tSWTBotTable tableBot = getBot().table();\n\n\t\t\tcheckInterpreter(tableBot, DltkTestsHelper.ALT_INTERPRETER_PATH,\n\t\t\t\t\tDltkTestsHelper.ALT_INTERPRETER_ID, false, 0);\n\t\t\tcheckInterpreter(tableBot, DltkTestsHelper.DEF_INTERPRETER_PATH,\n\t\t\t\t\tDltkTestsHelper.DEF_INTERPRETER_ID, true, 1);\n\n\t\t\ttableBot.select(1);\n\t\t\tgetBot().button(BTN_REMOVE).click();\n\n\t\t\ttableBot = getBot().table();\n\t\t\tgetBot().waitUntil(Conditions.tableHasRows(tableBot, 1));\n\n\t\t\tcheckInterpreter(tableBot, DltkTestsHelper.ALT_INTERPRETER_PATH,\n\t\t\t\t\tDltkTestsHelper.ALT_INTERPRETER_ID, true, 0);\n\n\t\t\twaitEnableAndClick(BTN_OK);\n\t\t\tgetBot().waitUntil(Conditions.shellCloses(shell));\n\t\t} catch (WidgetNotFoundException ex) {\n\t\t\tSWTBotTestCase.fail(ex.getLocalizedMessage());\n\t\t} catch (TimeoutException ex) {\n\t\t\tSWTBotTestCase.fail(ex.getLocalizedMessage());\n\t\t}\n\t}",
"@NotNull\n @Contract(pure = true)\n public PsiScriptNameExpression create(int lineNumber) {\n return new PsiScriptNameExpression(lineNumber);\n }",
"protected PythonInterpreter registerEnv(String key) {\n\t\tPythonInterpreter p;\n\t\tif (environments.containsKey(key)) {p= environments.get(key);}\n\t\telse {\n\t\t\tp = new PythonInterpreter();\n\t\t\tenvironments.put(key, p);\n\t\t}\n\t\treturn p;\n\t}",
"private void BlockDeclarationInstantiation(Collection<Declaration> declarations,\n StatementVisitor mv) {\n // stack: [env] -> [env, envRec]\n mv.dup();\n mv.invoke(Methods.LexicalEnvironment_getEnvRec);\n \n for (Declaration d : declarations) {\n for (String dn : BoundNames(d)) {\n if (IsConstantDeclaration(d)) {\n mv.dup();\n mv.aconst(dn);\n // FIXME: spec bug (CreateImmutableBinding concrete method of `env`)\n mv.invoke(Methods.EnvironmentRecord_createImmutableBinding);\n } else {\n mv.dup();\n mv.aconst(dn);\n mv.iconst(false);\n // FIXME: spec bug (CreateMutableBinding concrete method of `env`)\n mv.invoke(Methods.EnvironmentRecord_createMutableBinding);\n }\n }\n }\n \n // stack: [env, envRec] -> [envRec, env]\n mv.swap();\n \n for (Declaration d : declarations) {\n if (d instanceof FunctionDeclaration) {\n FunctionDeclaration f = (FunctionDeclaration) d;\n codegen.compile(f);\n String fn = BoundName(f);\n \n // stack: [envRec, env] -> [envRec, env, envRec, realm, env, fd]\n mv.dup2();\n mv.loadExecutionContext();\n mv.swap();\n mv.invokestatic(codegen.getClassName(), codegen.methodName(f) + \"_rti\",\n Type.getMethodDescriptor(Types.RuntimeInfo$Function));\n \n // stack: [envRec, env, envRec, realm, env, fd] -> [envRec, env, envRec, fo]\n mv.invoke(Methods.ScriptRuntime_InstantiateFunctionObject);\n \n // stack: [envRec, env, envRec, fn, fo] -> [envRec, env]\n mv.aconst(fn);\n mv.swap();\n mv.invoke(Methods.EnvironmentRecord_initialiseBinding);\n } else if (d instanceof GeneratorDeclaration) {\n GeneratorDeclaration f = (GeneratorDeclaration) d;\n codegen.compile(f);\n String fn = BoundName(f);\n \n // stack: [envRec, env] -> [envRec, env, envRec, realm, env, fd]\n mv.dup2();\n mv.loadExecutionContext();\n mv.swap();\n mv.invokestatic(codegen.getClassName(), codegen.methodName(f) + \"_rti\",\n Type.getMethodDescriptor(Types.RuntimeInfo$Function));\n \n // stack: [envRec, env, envRec, realm, env, fd] -> [envRec, env, envRec, fo]\n mv.invoke(Methods.ScriptRuntime_InstantiateGeneratorObject);\n \n // stack: [envRec, env, envRec, fn, fo] -> [envRec, env]\n mv.aconst(fn);\n mv.swap();\n mv.invoke(Methods.EnvironmentRecord_initialiseBinding);\n }\n }\n \n // stack: [envRec, env] -> [env]\n mv.swap();\n mv.pop();\n }",
"public static void createPythonInterpreter(String name, IProgressMonitor monitor) throws Exception{\n\t\t\n\t\tfinal String path = PythonUtils.getProbablePythonPath();\n\n\t\tif (path !=null) {\n\t\t\tcreatePythonInterpreter(name, path, monitor);\n\t\t}\n\t}",
"void resetLocal();",
"public Interpreter(String fileName) throws FileNotFoundException {\n super(fileName);\n instructionsStack.push(new ArrayList<>());\n }",
"public static JSqVM sq_open(int initialStackSize) throws JSquirrelException {\r\n\t\tlong handle = sq_open_native(initialStackSize);\r\n\t\tif (handle == 0)\r\n\t\t\tthrow new JSquirrelException(\"Could not create a new Squirrel VM.\");\r\n\t\treturn new JSqVM(handle);\r\n\t}",
"protected CodeStub() {\n entry = new Label();\n continuation = new Label();\n }",
"public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }",
"private Operation creator(Scope scope, Vector queue)\r\n {\r\n Operation root = null;\r\n Type t = new Type();\r\n\r\n if ((t.type = basicType()) != Keyword.NONESY)\r\n {\r\n root = arrayCreatorRest(t, scope, queue);\r\n }\r\n else\r\n {\r\n Token x = nextToken;\r\n\r\n t.ident = new Token(nextToken);\r\n t.ident.string = x.string = qualident();\r\n unresolved.add(x.string);\r\n\r\n if (nextSymbol == Keyword.LBRACKETSY)\r\n {\r\n root = arrayCreatorRest(t, scope, queue);\r\n }\r\n else\r\n {\r\n root = classCreatorRest(x, scope, queue);\r\n }\r\n }\r\n\r\n return root;\r\n }",
"public NotebookWorkspaceInner() {\n }",
"public Module() {\n\t\tthis(new Function[0]);\n\t}",
"static Pool newVariablePool() {\n return new VariablePool();\n }",
"public Universe() {\n\t\tset = new HashSet<T>();\n\t}",
"InternalSession createEmptySession();",
"public StatespaceFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public final JavaliParser.newExpr_return newExpr() throws RecognitionException {\n\t\tJavaliParser.newExpr_return retval = new JavaliParser.newExpr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken kw=null;\n\t\tToken id=null;\n\t\tToken Identifier79=null;\n\t\tToken char_literal80=null;\n\t\tToken char_literal81=null;\n\t\tToken char_literal82=null;\n\t\tToken char_literal84=null;\n\t\tToken char_literal85=null;\n\t\tToken char_literal87=null;\n\t\tParserRuleReturnScope pt =null;\n\t\tParserRuleReturnScope simpleExpr83 =null;\n\t\tParserRuleReturnScope simpleExpr86 =null;\n\n\t\tObject kw_tree=null;\n\t\tObject id_tree=null;\n\t\tObject Identifier79_tree=null;\n\t\tObject char_literal80_tree=null;\n\t\tObject char_literal81_tree=null;\n\t\tObject char_literal82_tree=null;\n\t\tObject char_literal84_tree=null;\n\t\tObject char_literal85_tree=null;\n\t\tObject char_literal87_tree=null;\n\t\tRewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\n\t\tRewriteRuleTokenStream stream_93=new RewriteRuleTokenStream(adaptor,\"token 93\");\n\t\tRewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,\"token 70\");\n\t\tRewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,\"token Identifier\");\n\t\tRewriteRuleTokenStream stream_84=new RewriteRuleTokenStream(adaptor,\"token 84\");\n\t\tRewriteRuleTokenStream stream_85=new RewriteRuleTokenStream(adaptor,\"token 85\");\n\t\tRewriteRuleSubtreeStream stream_simpleExpr=new RewriteRuleSubtreeStream(adaptor,\"rule simpleExpr\");\n\t\tRewriteRuleSubtreeStream stream_primitiveType=new RewriteRuleSubtreeStream(adaptor,\"rule primitiveType\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:408:2: (kw= 'new' Identifier '(' ')' -> ^( NewObject[$kw, \\\"NewObject\\\"] Identifier ) |kw= 'new' id= Identifier '[' simpleExpr ']' -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr ) |kw= 'new' pt= primitiveType '[' simpleExpr ']' -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr ) )\n\t\t\tint alt24=3;\n\t\t\tint LA24_0 = input.LA(1);\n\t\t\tif ( (LA24_0==93) ) {\n\t\t\t\tint LA24_1 = input.LA(2);\n\t\t\t\tif ( (LA24_1==Identifier) ) {\n\t\t\t\t\tint LA24_2 = input.LA(3);\n\t\t\t\t\tif ( (LA24_2==69) ) {\n\t\t\t\t\t\talt24=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA24_2==84) ) {\n\t\t\t\t\t\talt24=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 24, 2, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA24_1==86||LA24_1==90||LA24_1==92) ) {\n\t\t\t\t\talt24=3;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 24, 1, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 24, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt24) {\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:408:4: kw= 'new' Identifier '(' ')'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1369); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tIdentifier79=(Token)match(input,Identifier,FOLLOW_Identifier_in_newExpr1371); \n\t\t\t\t\tstream_Identifier.add(Identifier79);\n\n\t\t\t\t\tchar_literal80=(Token)match(input,69,FOLLOW_69_in_newExpr1373); \n\t\t\t\t\tstream_69.add(char_literal80);\n\n\t\t\t\t\tchar_literal81=(Token)match(input,70,FOLLOW_70_in_newExpr1375); \n\t\t\t\t\tstream_70.add(char_literal81);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: 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_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// 409:3: -> ^( NewObject[$kw, \\\"NewObject\\\"] Identifier )\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:409:6: ^( NewObject[$kw, \\\"NewObject\\\"] Identifier )\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(NewObject, kw, \"NewObject\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_Identifier.nextNode());\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\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:410:4: kw= 'new' id= Identifier '[' simpleExpr ']'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1395); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tid=(Token)match(input,Identifier,FOLLOW_Identifier_in_newExpr1399); \n\t\t\t\t\tstream_Identifier.add(id);\n\n\t\t\t\t\tchar_literal82=(Token)match(input,84,FOLLOW_84_in_newExpr1401); \n\t\t\t\t\tstream_84.add(char_literal82);\n\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_newExpr1403);\n\t\t\t\t\tsimpleExpr83=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(simpleExpr83.getTree());\n\t\t\t\t\tchar_literal84=(Token)match(input,85,FOLLOW_85_in_newExpr1405); \n\t\t\t\t\tstream_85.add(char_literal84);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: simpleExpr, Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: 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_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// 411:3: -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr )\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:411:6: ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr )\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(NewArray, kw, \"NewArray\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (Object)adaptor.create(Identifier, id, (id!=null?id.getText():null) + \"[]\"));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_simpleExpr.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\t\t\t\tcase 3 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:412:4: kw= 'new' pt= primitiveType '[' simpleExpr ']'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1428); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tpushFollow(FOLLOW_primitiveType_in_newExpr1432);\n\t\t\t\t\tpt=primitiveType();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_primitiveType.add(pt.getTree());\n\t\t\t\t\tchar_literal85=(Token)match(input,84,FOLLOW_84_in_newExpr1434); \n\t\t\t\t\tstream_84.add(char_literal85);\n\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_newExpr1436);\n\t\t\t\t\tsimpleExpr86=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(simpleExpr86.getTree());\n\t\t\t\t\tchar_literal87=(Token)match(input,85,FOLLOW_85_in_newExpr1438); \n\t\t\t\t\tstream_85.add(char_literal87);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: simpleExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: 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_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// 413:3: -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr )\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:413:6: ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr )\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(NewArray, kw, \"NewArray\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (Object)adaptor.create(Identifier, (pt!=null?(pt.start):null), (pt!=null?input.toString(pt.start,pt.stop):null) + \"[]\"));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_simpleExpr.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\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}",
"@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }",
"public StandardScriptFactory(String scriptSourceLocator, Class<?>... scriptInterfaces)\n/* */ {\n/* 76 */ this(null, scriptSourceLocator, scriptInterfaces);\n/* */ }",
"Notentyp createNotentyp();",
"protected NamespaceStack createNamespaceStack() {\r\n // actually returns a XMLOutputter.NamespaceStack (see below)\r\n return new NamespaceStack();\r\n }",
"public final BaseNsContext createNonTransientNsContext(Location loc)\n {\n // No namespaces declared at this point?\n if (getTotalNsCount() == 0) {\n return EmptyNamespaceContext.getInstance();\n }\n /* 29-Dec-2005, TSa: Should be able to use a simple caching\n * scheme to reuse instances... but for 2.0.x, let's make this work\n * 100% ok by creating new instances.\n */\n int localCount = getCurrentNsCount() << 1;\n return new CompactNsContext(loc, getDefaultNsURI(), mNamespaces.asArray(),\n mNamespaces.size() - localCount);\n }",
"public static EvalEnv genExampleEnv2()\n {\n EvalEnv result = new EvalEnv();\n result.createVariable(Boolean.class, true);\n result.createVariable(Boolean.class, true);\n for (int x = 0; x < Environment.HalfObsWidth * 2; x++)\n {\n for (int y = 0; y < Environment.HalfObsHeight * 2; y++)\n {\n result.createVariable(Integer.class, 0);\n }\n }\n\n for (int i = 0; i < 5; i++)\n {\n result.createVariable(Integer.class, -1);\n result.createVariable(Float.class, -100.0);\n result.createVariable(Float.class, 10.0);\n }\n return result;\n }",
"private static Store liftGlobals(ScriptNode script, Trace trace, Environment env, Store store) {\n\tSet<String> globals = GlobalVisitor.getGlobals(script);\n\tint i = -1000;\n\tfor (String global : globals) {\n\t Address address = trace.makeAddr(i, \"\");\n\t // Create a dummy variable declaration. This will not exist in the\n\t // output, because the value and variable initialization exists\n\t // outside the file.\n\t Name dummyVariable = new Name();\n\t env.strongUpdateNoCopy(global, Variable.inject(global, address, Change.bottom(),\n\t\t Dependencies.injectVariable(dummyVariable)));\n\t store = store.alloc(address,\n\t\t BValue.top(Change.u(), Dependencies.injectValue(dummyVariable)), dummyVariable);\n\t i--;\n\t}\n\n\treturn store;\n\n }",
"VariableDeclaration createVariableDeclaration();",
"RoverProgram createRoverProgram();",
"private void createRootNode()\r\n {\r\n root = new Node(\"root\", null);\r\n Node.clear();\r\n }",
"@Override\n\tpublic Code apply(Env env, ParseTree t) {\n\t\treturn new VarNameCode(env.s(t));\n\t}",
"public ShadowOperation createEmptyShadowOperation() {\n\t\treturn new ShadowOperation();\n\t}",
"public Local createLocal(Position pos, LocalDecl decl) {\n return createLocal(pos, decl.localDef().asInstance());\n }",
"@Override\n\tpublic void enterStart(AplusplusParser.StartContext ctx) {\n\t\tglobalScope = new GlobalScope();\n\t\tcurrentScope = globalScope;\n\t\tsaveScope(ctx, currentScope);\n\t}",
"Module createModule();",
"public SimpleVM(BufferedReader reader) throws IOException {\r\n operations = new ArrayList<>();\r\n stack = new Stack<>();\r\n symbolTable = new SymbolTable();\r\n\r\n // Convert the text program into a list of Operation objects.\r\n // Parse the reader object.\r\n Parser p = new Parser(reader);\r\n ArrayList<Statement> statements;\r\n // If there's anything to parse, parse into Statements and add\r\n // Operations to the operations ArrayList\r\n if (p.parse()) {\r\n statements = p.getStatements();\r\n for (Statement s : statements) {\r\n operations.add(s.getOperation());\r\n }\r\n }\r\n }",
"public interface IGlobals {\n public void reset();\n}",
"public static LabelToNode createIncremental()\n { return new LabelToNode(new SingleScopePolicy(), nodeAllocatorDeterministic()); }",
"VirtualMachineTemplate.DefinitionStages.Blank define(String name);",
"@Override\n public Graph newInstance(int vertexesCount) {\n return new SimpleGraph();\n }",
"FunctionName createStartFunction() throws IOException {\n return new SyntheticFunctionName( \"\", \"<start>\", \"()V\" ) {\n /**\n * {@inheritDoc}\n */\n @Override\n protected boolean hasWasmCode() {\n return true;\n }\n\n /**\n * {@inheritDoc}\n */\n @Override\n protected WasmCodeBuilder getCodeBuilder( WatParser watParser ) {\n watParser.reset( null, null, getSignature( null ) );\n\n while( !clinits.isEmpty() ) {\n FunctionName name = clinits.pop();\n watParser.addCallInstruction( name, 0, -1 );\n scanAndPatchIfNeeded( name );\n }\n return watParser;\n }\n };\n }",
"public static TrackableEnvironment createEnvironment() {\n return null;\n }",
"@Override\n\tpublic AbstractOriental createOrientale() {\n\t\treturn new OrientalSN();\n\t}",
"public void createInterpreter(String path, String interprName,\n\t\t\tboolean isDefault, int index) {\n\t\ttry {\n\t\t\topenInterpreters();\n\n\t\t\tgetBot().button(BTN_ADD).click();\n\t\t\tgetBot().waitUntil(Conditions.shellIsActive(DLG_ADD_INTERPRETER));\n\t\t\tgetBot().textWithLabel(FLD_INTERPR_NAME).setText(interprName);\n\t\t\tgetBot().textWithLabel(FLD_INTERPR_PATH).setText(path);\n\n\t\t\tString type = getBot().comboBoxWithLabel(FLD_INTERPR_TYPE)\n\t\t\t\t\t.getText();\n\t\t\tSWTBotTestCase.assertEquals(TCL_INTERPRETER_TYPE, type);\n\n\t\t\twaitEnableAndClick(BTN_OK);\n\t\t\tgetBot().waitUntil(Conditions.shellIsActive(DLG_PREFERENCES));\n\t\t\tSWTBotShell shell = getBot().shell(DLG_PREFERENCES);\n\t\t\tSWTBotTable tableBot = getBot().table();\n\t\t\tgetBot().waitUntil(Conditions.tableHasRows(tableBot, index + 1));\n\n\t\t\t// Alternative interpreter will add to first row because table is\n\t\t\t// sorting by name.\n\t\t\tcheckInterpreter(tableBot, path, interprName, isDefault, 0);\n\n\t\t\twaitEnableAndClick(BTN_OK);\n\t\t\tgetBot().waitUntil(Conditions.shellCloses(shell));\n\t\t} catch (WidgetNotFoundException ex) {\n\t\t\tSWTBotTestCase.fail(ex.getLocalizedMessage());\n\t\t} catch (TimeoutException ex) {\n\t\t\tSWTBotTestCase.fail(ex.getLocalizedMessage());\n\t\t}\n\t}"
] | [
"0.57468134",
"0.55477613",
"0.5226505",
"0.51214415",
"0.51214415",
"0.51214415",
"0.5085498",
"0.504487",
"0.48730507",
"0.4838341",
"0.47862926",
"0.47842035",
"0.47280645",
"0.47263974",
"0.46970052",
"0.4655617",
"0.4622027",
"0.46219987",
"0.46069387",
"0.45969254",
"0.45841545",
"0.45719606",
"0.45697987",
"0.45610693",
"0.45289078",
"0.451537",
"0.4512725",
"0.4511355",
"0.45068145",
"0.4498129",
"0.4496628",
"0.44966093",
"0.44931716",
"0.44879213",
"0.446648",
"0.44575426",
"0.44362807",
"0.44263604",
"0.44178557",
"0.44160822",
"0.44154817",
"0.4402118",
"0.4387404",
"0.43753946",
"0.43718335",
"0.43685198",
"0.43671045",
"0.43662855",
"0.4364333",
"0.4361167",
"0.43586063",
"0.4351776",
"0.43489042",
"0.4346441",
"0.4346441",
"0.43443543",
"0.43414876",
"0.43336377",
"0.43336198",
"0.4332872",
"0.43265462",
"0.4324834",
"0.43232954",
"0.43229833",
"0.43173018",
"0.4307928",
"0.43062618",
"0.4300124",
"0.42919767",
"0.42916742",
"0.4289356",
"0.42890218",
"0.4289003",
"0.4288666",
"0.42874855",
"0.42849505",
"0.4284275",
"0.42827147",
"0.42809388",
"0.427841",
"0.42764634",
"0.42758802",
"0.4274296",
"0.42651585",
"0.42649052",
"0.4261112",
"0.42547634",
"0.42513922",
"0.42496008",
"0.4243787",
"0.42422202",
"0.42381224",
"0.42380315",
"0.42363775",
"0.42302865",
"0.4227073",
"0.422699",
"0.42239654",
"0.42230573",
"0.42186517"
] | 0.5740955 | 1 |
Creates a new interpreter with the ability to maintain a separate local namespace for each thread (set by invoking setLocals()). | public static PythonInterpreter threadLocalStateInterpreter(PyObject dict) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"InterpreterRuntimeContext createInterpreterRuntimeContext();",
"public PythonInterpreter() {\n }",
"public Interpreter() {\n super();\n instructionsStack.push(new ArrayList<>());\n }",
"protected PythonInterpreter registerEnv(String key) {\n\t\tPythonInterpreter p;\n\t\tif (environments.containsKey(key)) {p= environments.get(key);}\n\t\telse {\n\t\t\tp = new PythonInterpreter();\n\t\t\tenvironments.put(key, p);\n\t\t}\n\t\treturn p;\n\t}",
"protected VaryGrammarRuntimeModule createRuntimeModule() {\n\t\treturn new VaryGrammarRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn VaryGrammarInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}",
"static Pool newVariablePool() {\n return new VariablePool();\n }",
"Interpreter getInterpreter();",
"public PythonInterpreter(PyObject dict) {\n }",
"public abstract ILanguageProtocol makeInterpreter(String source, String replQualifiedName, String... salixPath) throws IOException, URISyntaxException, Exception;",
"@Override\n\tpublic IOProcessor create(Interpreter interpreter) {\n\t\tTestCustomIOProc ioProc = new TestCustomIOProc();\n\t\tioProc.interpreter = interpreter;\n\t\tioProc.swigReleaseOwnership();\n\t\treturn ioProc;\n\t}",
"private static Store liftGlobals(ScriptNode script, Trace trace, Environment env, Store store) {\n\tSet<String> globals = GlobalVisitor.getGlobals(script);\n\tint i = -1000;\n\tfor (String global : globals) {\n\t Address address = trace.makeAddr(i, \"\");\n\t // Create a dummy variable declaration. This will not exist in the\n\t // output, because the value and variable initialization exists\n\t // outside the file.\n\t Name dummyVariable = new Name();\n\t env.strongUpdateNoCopy(global, Variable.inject(global, address, Change.bottom(),\n\t\t Dependencies.injectVariable(dummyVariable)));\n\t store = store.alloc(address,\n\t\t BValue.top(Change.u(), Dependencies.injectValue(dummyVariable)), dummyVariable);\n\t i--;\n\t}\n\n\treturn store;\n\n }",
"public Scriptable construct(Context cx, Scriptable scope, Object[] args);",
"protected PlayLangRuntimeModule createRuntimeModule() {\n\t\treturn new PlayLangRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn PlayLangInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}",
"private static void createVars(JsProgram program, JsBlock block,\n Collection<JsStringLiteral> toCreate, Map<JsStringLiteral, JsName> names) {\n if (toCreate.size() > 0) {\n // Create the pool of variable names.\n JsVars vars = new JsVars(program.createSourceInfoSynthetic(\n JsStringInterner.class, \"Interned string pool\"));\n SourceInfo sourceInfo = program.createSourceInfoSynthetic(\n JsStringInterner.class, \"Interned string assignment\");\n for (JsStringLiteral literal : toCreate) {\n JsVar var = new JsVar(sourceInfo, names.get(literal));\n var.setInitExpr(literal);\n vars.add(var);\n }\n block.getStatements().add(0, vars);\n }\n }",
"public IVariable createInternalVariable(String name, IJavaType referencType) {\n IVariable var = new InterpreterVariable(name, referencType, fContext.getVM());\n fInternalVariables.put(name, var);\n return var;\n }",
"abstract public PyCode getMain();",
"public LocalContext(int returnip, int nlocals) {\n\t\tthis.returnip = returnip;\n\t\tlocals = new Object[nlocals];\n\t}",
"LuaScriptEngine(LuaScriptEngineFactory factory) {\n\t\tsuper();\n\t\tthis.factory = factory;\n\t\tluaState = new LuaState();\n\n\t\t// Configuration\n\t\tcontext.setBindings(createBindings(), ScriptContext.ENGINE_SCOPE);\n\t\tluaState.openLibs();\n\t\tluaState.load(\"io.stdout:setvbuf(\\\"no\\\")\", \"setvbuf\");\n\t\tluaState.call(0, 0);\n\t\tluaState.load(\"io.stderr:setvbuf(\\\"no\\\")\", \"setvbuf\");\n\t\tluaState.call(0, 0);\n\t}",
"Scope createScope();",
"private void BlockDeclarationInstantiation(Collection<Declaration> declarations,\n StatementVisitor mv) {\n // stack: [env] -> [env, envRec]\n mv.dup();\n mv.invoke(Methods.LexicalEnvironment_getEnvRec);\n \n for (Declaration d : declarations) {\n for (String dn : BoundNames(d)) {\n if (IsConstantDeclaration(d)) {\n mv.dup();\n mv.aconst(dn);\n // FIXME: spec bug (CreateImmutableBinding concrete method of `env`)\n mv.invoke(Methods.EnvironmentRecord_createImmutableBinding);\n } else {\n mv.dup();\n mv.aconst(dn);\n mv.iconst(false);\n // FIXME: spec bug (CreateMutableBinding concrete method of `env`)\n mv.invoke(Methods.EnvironmentRecord_createMutableBinding);\n }\n }\n }\n \n // stack: [env, envRec] -> [envRec, env]\n mv.swap();\n \n for (Declaration d : declarations) {\n if (d instanceof FunctionDeclaration) {\n FunctionDeclaration f = (FunctionDeclaration) d;\n codegen.compile(f);\n String fn = BoundName(f);\n \n // stack: [envRec, env] -> [envRec, env, envRec, realm, env, fd]\n mv.dup2();\n mv.loadExecutionContext();\n mv.swap();\n mv.invokestatic(codegen.getClassName(), codegen.methodName(f) + \"_rti\",\n Type.getMethodDescriptor(Types.RuntimeInfo$Function));\n \n // stack: [envRec, env, envRec, realm, env, fd] -> [envRec, env, envRec, fo]\n mv.invoke(Methods.ScriptRuntime_InstantiateFunctionObject);\n \n // stack: [envRec, env, envRec, fn, fo] -> [envRec, env]\n mv.aconst(fn);\n mv.swap();\n mv.invoke(Methods.EnvironmentRecord_initialiseBinding);\n } else if (d instanceof GeneratorDeclaration) {\n GeneratorDeclaration f = (GeneratorDeclaration) d;\n codegen.compile(f);\n String fn = BoundName(f);\n \n // stack: [envRec, env] -> [envRec, env, envRec, realm, env, fd]\n mv.dup2();\n mv.loadExecutionContext();\n mv.swap();\n mv.invokestatic(codegen.getClassName(), codegen.methodName(f) + \"_rti\",\n Type.getMethodDescriptor(Types.RuntimeInfo$Function));\n \n // stack: [envRec, env, envRec, realm, env, fd] -> [envRec, env, envRec, fo]\n mv.invoke(Methods.ScriptRuntime_InstantiateGeneratorObject);\n \n // stack: [envRec, env, envRec, fn, fo] -> [envRec, env]\n mv.aconst(fn);\n mv.swap();\n mv.invoke(Methods.EnvironmentRecord_initialiseBinding);\n }\n }\n \n // stack: [envRec, env] -> [env]\n mv.swap();\n mv.pop();\n }",
"@SubL(source = \"cycl/stacks.lisp\", position = 1818) \n public static final SubLObject create_stack() {\n return clear_stack(make_stack(UNPROVIDED));\n }",
"Program createProgram();",
"Program createProgram();",
"Program createProgram();",
"public ThreadLocal() {}",
"public static final SubLObject declare_inference_trampolines_file() {\n declareFunction(myName, \"inference_collectionP\", \"INFERENCE-COLLECTION?\", 1, 1, false);\n declareFunction(myName, \"inference_predicate_p\", \"INFERENCE-PREDICATE-P\", 1, 0, false); new $inference_predicate_p$UnaryFunction();\n declareFunction(myName, \"inference_commutative_relationP\", \"INFERENCE-COMMUTATIVE-RELATION?\", 1, 0, false);\n declareFunction(myName, \"inference_symmetric_predicateP\", \"INFERENCE-SYMMETRIC-PREDICATE?\", 1, 0, false); new $inference_symmetric_predicateP$UnaryFunction();\n declareFunction(myName, \"inference_commutative_predicate_p\", \"INFERENCE-COMMUTATIVE-PREDICATE-P\", 1, 0, false); new $inference_commutative_predicate_p$UnaryFunction();\n declareFunction(myName, \"inference_partially_commutative_predicate_p_internal\", \"INFERENCE-PARTIALLY-COMMUTATIVE-PREDICATE-P-INTERNAL\", 1, 0, false);\n declareFunction(myName, \"inference_partially_commutative_predicate_p\", \"INFERENCE-PARTIALLY-COMMUTATIVE-PREDICATE-P\", 1, 0, false); new $inference_partially_commutative_predicate_p$UnaryFunction();\n declareFunction(myName, \"inference_at_least_partially_commutative_predicate_p\", \"INFERENCE-AT-LEAST-PARTIALLY-COMMUTATIVE-PREDICATE-P\", 1, 0, false);\n //declareFunction(myName, \"inference_asymmetric_predicateP\", \"INFERENCE-ASYMMETRIC-PREDICATE?\", 1, 0, false);\n declareFunction(myName, \"inference_transitive_predicateP\", \"INFERENCE-TRANSITIVE-PREDICATE?\", 1, 0, false); new $inference_transitive_predicateP$UnaryFunction();\n declareFunction(myName, \"inference_evaluatable_predicateP\", \"INFERENCE-EVALUATABLE-PREDICATE?\", 1, 0, false); new $inference_evaluatable_predicateP$UnaryFunction();\n declareFunction(myName, \"inference_reflexive_predicateP\", \"INFERENCE-REFLEXIVE-PREDICATE?\", 1, 0, false); new $inference_reflexive_predicateP$UnaryFunction();\n declareFunction(myName, \"inference_irreflexive_predicateP\", \"INFERENCE-IRREFLEXIVE-PREDICATE?\", 1, 0, false);\n declareFunction(myName, \"inference_indeterminate_termP\", \"INFERENCE-INDETERMINATE-TERM?\", 1, 0, false);\n declareFunction(myName, \"clear_indeterminate_term_p\", \"CLEAR-INDETERMINATE-TERM-P\", 0, 0, false); new $clear_indeterminate_term_p$ZeroArityFunction();\n //declareFunction(myName, \"remove_indeterminate_term_p\", \"REMOVE-INDETERMINATE-TERM-P\", 1, 0, false);\n declareFunction(myName, \"indeterminate_term_p_internal\", \"INDETERMINATE-TERM-P-INTERNAL\", 1, 0, false);\n declareFunction(myName, \"indeterminate_term_p\", \"INDETERMINATE-TERM-P\", 1, 0, false);\n declareFunction(myName, \"memoized_inference_indeterminate_termP_internal\", \"MEMOIZED-INFERENCE-INDETERMINATE-TERM?-INTERNAL\", 1, 0, false);\n declareFunction(myName, \"memoized_inference_indeterminate_termP\", \"MEMOIZED-INFERENCE-INDETERMINATE-TERM?\", 1, 0, false);\n declareFunction(myName, \"inference_some_genl_pred_or_inverseP\", \"INFERENCE-SOME-GENL-PRED-OR-INVERSE?\", 1, 0, false); new $inference_some_genl_pred_or_inverseP$UnaryFunction();\n declareFunction(myName, \"inference_some_spec_pred_or_inverseP\", \"INFERENCE-SOME-SPEC-PRED-OR-INVERSE?\", 1, 0, false); new $inference_some_spec_pred_or_inverseP$UnaryFunction();\n //declareFunction(myName, \"inference_some_negation_pred_or_inverseP\", \"INFERENCE-SOME-NEGATION-PRED-OR-INVERSE?\", 1, 0, false);\n //declareFunction(myName, \"inference_all_genl_predicates_internal\", \"INFERENCE-ALL-GENL-PREDICATES-INTERNAL\", 1, 0, false);\n //declareFunction(myName, \"inference_all_genl_predicates\", \"INFERENCE-ALL-GENL-PREDICATES\", 1, 0, false);\n declareFunction(myName, \"inference_all_spec_predicates\", \"INFERENCE-ALL-SPEC-PREDICATES\", 1, 0, false);\n declareFunction(myName, \"inference_all_spec_predicates_int_internal\", \"INFERENCE-ALL-SPEC-PREDICATES-INT-INTERNAL\", 1, 0, false);\n declareFunction(myName, \"inference_all_spec_predicates_int\", \"INFERENCE-ALL-SPEC-PREDICATES-INT\", 1, 0, false);\n //declareFunction(myName, \"inference_all_genl_inverses_internal\", \"INFERENCE-ALL-GENL-INVERSES-INTERNAL\", 1, 0, false);\n //declareFunction(myName, \"inference_all_genl_inverses\", \"INFERENCE-ALL-GENL-INVERSES\", 1, 0, false);\n declareFunction(myName, \"inference_all_spec_inverses\", \"INFERENCE-ALL-SPEC-INVERSES\", 1, 0, false);\n declareFunction(myName, \"inference_all_spec_inverses_int_internal\", \"INFERENCE-ALL-SPEC-INVERSES-INT-INTERNAL\", 1, 0, false);\n declareFunction(myName, \"inference_all_spec_inverses_int\", \"INFERENCE-ALL-SPEC-INVERSES-INT\", 1, 0, false);\n //declareFunction(myName, \"inference_all_proper_genl_predicates_with_axiom_index_internal\", \"INFERENCE-ALL-PROPER-GENL-PREDICATES-WITH-AXIOM-INDEX-INTERNAL\", 2, 0, false);\n //declareFunction(myName, \"inference_all_proper_genl_predicates_with_axiom_index\", \"INFERENCE-ALL-PROPER-GENL-PREDICATES-WITH-AXIOM-INDEX\", 2, 0, false);\n declareFunction(myName, \"inference_all_proper_spec_predicates_with_axiom_index\", \"INFERENCE-ALL-PROPER-SPEC-PREDICATES-WITH-AXIOM-INDEX\", 2, 0, false);\n declareFunction(myName, \"inference_all_proper_spec_predicates_with_axiom_index_int_internal\", \"INFERENCE-ALL-PROPER-SPEC-PREDICATES-WITH-AXIOM-INDEX-INT-INTERNAL\", 2, 0, false);\n declareFunction(myName, \"inference_all_proper_spec_predicates_with_axiom_index_int\", \"INFERENCE-ALL-PROPER-SPEC-PREDICATES-WITH-AXIOM-INDEX-INT\", 2, 0, false);\n //declareFunction(myName, \"inference_all_negation_predicates_with_axiom_index_internal\", \"INFERENCE-ALL-NEGATION-PREDICATES-WITH-AXIOM-INDEX-INTERNAL\", 2, 0, false);\n //declareFunction(myName, \"inference_all_negation_predicates_with_axiom_index\", \"INFERENCE-ALL-NEGATION-PREDICATES-WITH-AXIOM-INDEX\", 2, 0, false);\n declareFunction(myName, \"inference_some_max_floor_mts\", \"INFERENCE-SOME-MAX-FLOOR-MTS\", 1, 0, false);\n declareFunction(myName, \"clear_some_max_floor_mtsP_cached\", \"CLEAR-SOME-MAX-FLOOR-MTS?-CACHED\", 0, 0, false);\n //declareFunction(myName, \"remove_some_max_floor_mtsP_cached\", \"REMOVE-SOME-MAX-FLOOR-MTS?-CACHED\", 1, 0, false);\n declareFunction(myName, \"some_max_floor_mtsP_cached_internal\", \"SOME-MAX-FLOOR-MTS?-CACHED-INTERNAL\", 1, 0, false);\n declareFunction(myName, \"some_max_floor_mtsP_cached\", \"SOME-MAX-FLOOR-MTS?-CACHED\", 1, 0, false);\n declareFunction(myName, \"inference_max_floor_mts_with_cycles_pruned\", \"INFERENCE-MAX-FLOOR-MTS-WITH-CYCLES-PRUNED\", 1, 1, false);\n declareFunction(myName, \"clear_inference_max_floor_mts_with_cycles_pruned_cached\", \"CLEAR-INFERENCE-MAX-FLOOR-MTS-WITH-CYCLES-PRUNED-CACHED\", 0, 0, false);\n //declareFunction(myName, \"remove_inference_max_floor_mts_with_cycles_pruned_cached\", \"REMOVE-INFERENCE-MAX-FLOOR-MTS-WITH-CYCLES-PRUNED-CACHED\", 1, 0, false);\n declareFunction(myName, \"inference_max_floor_mts_with_cycles_pruned_cached_internal\", \"INFERENCE-MAX-FLOOR-MTS-WITH-CYCLES-PRUNED-CACHED-INTERNAL\", 1, 0, false);\n declareFunction(myName, \"inference_max_floor_mts_with_cycles_pruned_cached\", \"INFERENCE-MAX-FLOOR-MTS-WITH-CYCLES-PRUNED-CACHED\", 1, 0, false);\n //declareFunction(myName, \"inference_max_floor_mts_of_nat_internal\", \"INFERENCE-MAX-FLOOR-MTS-OF-NAT-INTERNAL\", 1, 0, false);\n //declareFunction(myName, \"inference_max_floor_mts_of_nat\", \"INFERENCE-MAX-FLOOR-MTS-OF-NAT\", 1, 0, false);\n declareFunction(myName, \"some_max_floor_mtsP\", \"SOME-MAX-FLOOR-MTS?\", 1, 0, false);\n //declareFunction(myName, \"inference_applicable_sdctP_internal\", \"INFERENCE-APPLICABLE-SDCT?-INTERNAL\", 1, 0, false);\n //declareFunction(myName, \"inference_applicable_sdctP\", \"INFERENCE-APPLICABLE-SDCT?\", 1, 0, false);\n //declareMacro(myName, \"do_inference_gaf_lookup_index\", \"DO-INFERENCE-GAF-LOOKUP-INDEX\");\n declareFunction(myName, \"inference_gaf_lookup_index_internal\", \"INFERENCE-GAF-LOOKUP-INDEX-INTERNAL\", 2, 0, false);\n declareFunction(myName, \"inference_gaf_lookup_index\", \"INFERENCE-GAF-LOOKUP-INDEX\", 2, 0, false);\n declareFunction(myName, \"inference_num_gaf_lookup_index_internal\", \"INFERENCE-NUM-GAF-LOOKUP-INDEX-INTERNAL\", 2, 0, false);\n declareFunction(myName, \"inference_num_gaf_lookup_index\", \"INFERENCE-NUM-GAF-LOOKUP-INDEX\", 2, 0, false);\n //declareFunction(myName, \"inference_relevant_num_gaf_lookup_index_internal\", \"INFERENCE-RELEVANT-NUM-GAF-LOOKUP-INDEX-INTERNAL\", 3, 0, false);\n //declareFunction(myName, \"inference_relevant_num_gaf_lookup_index\", \"INFERENCE-RELEVANT-NUM-GAF-LOOKUP-INDEX\", 3, 0, false);\n //declareFunction(myName, \"inference_key_gaf_arg_index_internal\", \"INFERENCE-KEY-GAF-ARG-INDEX-INTERNAL\", 1, 2, false);\n //declareFunction(myName, \"inference_key_gaf_arg_index\", \"INFERENCE-KEY-GAF-ARG-INDEX\", 1, 2, false);\n declareFunction(myName, \"problem_backchain_requiredP\", \"PROBLEM-BACKCHAIN-REQUIRED?\", 1, 0, false);\n declareFunction(myName, \"inference_some_backchain_required_asent_in_clauseP\", \"INFERENCE-SOME-BACKCHAIN-REQUIRED-ASENT-IN-CLAUSE?\", 1, 0, false);\n declareFunction(myName, \"inference_backchain_required_contextualized_asentP\", \"INFERENCE-BACKCHAIN-REQUIRED-CONTEXTUALIZED-ASENT?\", 1, 0, false);\n declareFunction(myName, \"inference_backchain_required_asentP\", \"INFERENCE-BACKCHAIN-REQUIRED-ASENT?\", 2, 0, false);\n declareFunction(myName, \"inference_predicate_backchain_requiredP_internal\", \"INFERENCE-PREDICATE-BACKCHAIN-REQUIRED?-INTERNAL\", 2, 0, false);\n declareFunction(myName, \"inference_predicate_backchain_requiredP\", \"INFERENCE-PREDICATE-BACKCHAIN-REQUIRED?\", 2, 0, false);\n declareFunction(myName, \"inference_backchain_forbiddenP_internal\", \"INFERENCE-BACKCHAIN-FORBIDDEN?-INTERNAL\", 2, 0, false);\n declareFunction(myName, \"inference_backchain_forbiddenP\", \"INFERENCE-BACKCHAIN-FORBIDDEN?\", 2, 0, false);\n //declareFunction(myName, \"inference_collection_isa_backchain_encouragedP_internal\", \"INFERENCE-COLLECTION-ISA-BACKCHAIN-ENCOURAGED?-INTERNAL\", 2, 0, false);\n //declareFunction(myName, \"inference_collection_isa_backchain_encouragedP\", \"INFERENCE-COLLECTION-ISA-BACKCHAIN-ENCOURAGED?\", 2, 0, false);\n //declareFunction(myName, \"inference_collection_genls_backchain_encouragedP_internal\", \"INFERENCE-COLLECTION-GENLS-BACKCHAIN-ENCOURAGED?-INTERNAL\", 2, 0, false);\n //declareFunction(myName, \"inference_collection_genls_backchain_encouragedP\", \"INFERENCE-COLLECTION-GENLS-BACKCHAIN-ENCOURAGED?\", 2, 0, false);\n //declareFunction(myName, \"inference_collection_backchain_encouragedP_internal\", \"INFERENCE-COLLECTION-BACKCHAIN-ENCOURAGED?-INTERNAL\", 2, 0, false);\n //declareFunction(myName, \"inference_collection_backchain_encouragedP\", \"INFERENCE-COLLECTION-BACKCHAIN-ENCOURAGED?\", 2, 0, false);\n declareFunction(myName, \"inference_collection_backchain_requiredP_internal\", \"INFERENCE-COLLECTION-BACKCHAIN-REQUIRED?-INTERNAL\", 2, 0, false);\n declareFunction(myName, \"inference_collection_backchain_requiredP\", \"INFERENCE-COLLECTION-BACKCHAIN-REQUIRED?\", 2, 0, false);\n declareFunction(myName, \"inference_collection_isa_backchain_requiredP_internal\", \"INFERENCE-COLLECTION-ISA-BACKCHAIN-REQUIRED?-INTERNAL\", 2, 0, false);\n declareFunction(myName, \"inference_collection_isa_backchain_requiredP\", \"INFERENCE-COLLECTION-ISA-BACKCHAIN-REQUIRED?\", 2, 0, false);\n declareFunction(myName, \"inference_collection_genls_backchain_requiredP_internal\", \"INFERENCE-COLLECTION-GENLS-BACKCHAIN-REQUIRED?-INTERNAL\", 2, 0, false);\n declareFunction(myName, \"inference_collection_genls_backchain_requiredP\", \"INFERENCE-COLLECTION-GENLS-BACKCHAIN-REQUIRED?\", 2, 0, false);\n declareFunction(myName, \"backchain_control_mt\", \"BACKCHAIN-CONTROL-MT\", 1, 0, false);\n declareFunction(myName, \"inference_relevant_mtP\", \"INFERENCE-RELEVANT-MT?\", 1, 1, false);\n //declareFunction(myName, \"inference_relevant_assertionP\", \"INFERENCE-RELEVANT-ASSERTION?\", 1, 1, false);\n //declareFunction(myName, \"inference_relevant_predicate_assertionP\", \"INFERENCE-RELEVANT-PREDICATE-ASSERTION?\", 2, 1, false);\n //declareFunction(myName, \"inference_relevant_termP\", \"INFERENCE-RELEVANT-TERM?\", 1, 1, false);\n declareFunction(myName, \"inference_irrelevant_mtP\", \"INFERENCE-IRRELEVANT-MT?\", 1, 1, false);\n //declareFunction(myName, \"inference_irrelevant_assertionP\", \"INFERENCE-IRRELEVANT-ASSERTION?\", 1, 1, false);\n //declareFunction(myName, \"inference_irrelevant_predicate_assertionP\", \"INFERENCE-IRRELEVANT-PREDICATE-ASSERTION?\", 2, 1, false);\n //declareFunction(myName, \"inference_irrelevant_termP\", \"INFERENCE-IRRELEVANT-TERM?\", 1, 1, false);\n //declareFunction(myName, \"inference_rule_has_utilityP\", \"INFERENCE-RULE-HAS-UTILITY?\", 1, 1, false);\n //declareFunction(myName, \"inference_rule_utility\", \"INFERENCE-RULE-UTILITY\", 1, 1, false);\n //declareFunction(myName, \"inference_known_sentence_removal_query_internal\", \"INFERENCE-KNOWN-SENTENCE-REMOVAL-QUERY-INTERNAL\", 2, 1, false);\n //declareFunction(myName, \"inference_known_sentence_removal_query\", \"INFERENCE-KNOWN-SENTENCE-REMOVAL-QUERY\", 2, 1, false);\n //declareFunction(myName, \"inference_known_sentence_recursive_query\", \"INFERENCE-KNOWN-SENTENCE-RECURSIVE-QUERY\", 2, 1, false);\n //declareFunction(myName, \"inference_true_sentence_recursion_cycleP\", \"INFERENCE-TRUE-SENTENCE-RECURSION-CYCLE?\", 1, 0, false);\n //declareFunction(myName, \"inference_true_sentence_recursive_query_internal\", \"INFERENCE-TRUE-SENTENCE-RECURSIVE-QUERY-INTERNAL\", 2, 1, false);\n //declareFunction(myName, \"inference_true_sentence_recursive_query\", \"INFERENCE-TRUE-SENTENCE-RECURSIVE-QUERY\", 2, 1, false);\n //declareFunction(myName, \"inference_mts_where_gaf_sentence_true_internal\", \"INFERENCE-MTS-WHERE-GAF-SENTENCE-TRUE-INTERNAL\", 1, 0, false);\n //declareFunction(myName, \"inference_mts_where_gaf_sentence_true\", \"INFERENCE-MTS-WHERE-GAF-SENTENCE-TRUE\", 1, 0, false);\n //declareFunction(myName, \"inference_mts_where_gaf_sentence_true_justified_memoized_internal\", \"INFERENCE-MTS-WHERE-GAF-SENTENCE-TRUE-JUSTIFIED-MEMOIZED-INTERNAL\", 1, 0, false);\n //declareFunction(myName, \"inference_mts_where_gaf_sentence_true_justified_memoized\", \"INFERENCE-MTS-WHERE-GAF-SENTENCE-TRUE-JUSTIFIED-MEMOIZED\", 1, 0, false);\n //declareFunction(myName, \"inference_mts_where_gaf_sentence_true_justified\", \"INFERENCE-MTS-WHERE-GAF-SENTENCE-TRUE-JUSTIFIED\", 1, 0, false);\n //declareFunction(myName, \"determine_sentence_recursive_query_properties\", \"DETERMINE-SENTENCE-RECURSIVE-QUERY-PROPERTIES\", 2, 0, false);\n //declareFunction(myName, \"determine_sentence_recursive_query_properties_recursive\", \"DETERMINE-SENTENCE-RECURSIVE-QUERY-PROPERTIES-RECURSIVE\", 2, 0, false);\n //declareFunction(myName, \"inference_rule_type_constraints_internal\", \"INFERENCE-RULE-TYPE-CONSTRAINTS-INTERNAL\", 1, 0, false);\n //declareFunction(myName, \"inference_rule_type_constraints\", \"INFERENCE-RULE-TYPE-CONSTRAINTS\", 1, 0, false);\n return NIL;\n }",
"public static JSqVM sq_newthread(JSqVM friend, int initialStackSize) throws JSquirrelException {\r\n\t\tlong handle = sq_newthread_native(friend.m_nativeHandle, initialStackSize);\r\n\t\tif (handle == 0)\r\n\t\t\tthrow new JSquirrelException(\"Could not create a new thread.\");\r\n\t\treturn new JSqVM(handle);\r\n\t}",
"public static void createPythonInterpreter(String name, IProgressMonitor monitor) throws Exception{\n\t\t\n\t\tfinal String path = PythonUtils.getProbablePythonPath();\n\n\t\tif (path !=null) {\n\t\t\tcreatePythonInterpreter(name, path, monitor);\n\t\t}\n\t}",
"private IEngineExecutor m10434a(ISynthesizer bVar) {\n EngineExecutor cVar = new EngineExecutor();\n cVar.mo20566a(bVar);\n return cVar;\n }",
"public Local createLocal(Position pos, Local local) {\n return syn.createLocal(pos, local.localInstance());\n }",
"public StandardScriptFactory(String scriptEngineName, String scriptSourceLocator)\n/* */ {\n/* 87 */ this(scriptEngineName, scriptSourceLocator, (Class[])null);\n/* */ }",
"public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }",
"abstract AbstractRuntimeServiceNode<T> newRuntimeNode();",
"public ExecutionFactoryImpl() {\n\t\tsuper();\n\t}",
"public PythonInterpreter getEnvironment(String name) {return environments.get(name);}",
"VarAssignment createVarAssignment();",
"static Obj NewObj (String name,int kind) {\r\n\t\tObj p, obj = new Obj();\r\n obj.name = new String(name); \r\n\t\tobj.type = null; obj.kind = kind;\r\n\t\tobj.level = curLevel;\r\n\t\tp = topScope.locals;\r\n\t\t/*Para buscar si el nb de la variable nueva ya esta!!!*/\r\n\t\twhile (p != null) { \r\n \t \tif (p.name.equals(name)) Parser.SemError(1);\r\n\t\t\tp = p.next;\r\n\t\t}\r\n \t//FILO!!\r\n obj.next = topScope.locals; \r\n\t\ttopScope.locals = obj;\r\n \t//if (kind == vars) {}\r\n \t//obj.adr = topScope.nextAdr; topScope.nextAdr++;\r\n \t//obj.view();\r\n\t\treturn obj;\r\n }",
"private final void setupLocal() {\n _topLocal = true;\n // Check for global vs local work\n if( _nlo >= 0 && _nlo < _nhi-1 ) { // Have global work?\n // Note: some top-level calls have no other global work, so\n // \"topLocal==true\" does not imply \"nlo < nhi-1\".\n int selfidx = H2O.SELF.index();\n if( _nlo < selfidx ) _nleft = remote_compute(_nlo, selfidx );\n if( selfidx+1 < _nhi ) _nrite = remote_compute(selfidx+1,_nhi);\n }\n _lo = 0; _hi = _fr.firstReadable().nChunks(); // Do All Chunks\n // If we have any output vectors, make a blockable Futures for them to\n // block on.\n if( _fr.hasAppendables() )\n _fs = new Futures();\n init(); // Setup any user's shared local structures\n }",
"@Override\n public void enterMainClass(MiniJavaParser.MainClassContext ctx) {\n Klass mainKlass = klasses.get(ctx.Identifier(0).getText());\n String mainKlassName = mainKlass.getScopeName();\n\n cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cw.visit(V1_1, ACC_PUBLIC, mainKlassName, null, \"java/lang/Object\", null);\n\n mg = new GeneratorAdapter(ACC_PUBLIC, INIT(), null, null, cw);\n mg.loadThis();\n mg.invokeConstructor(Type.getType(Object.class), INIT());\n mg.returnValue();\n mg.endMethod();\n mg = new GeneratorAdapter(ACC_PUBLIC + ACC_STATIC, org.objectweb.asm.commons.Method.getMethod(\"void main (String[])\"), null, null, cw);\n }",
"public static LocalContext enter() {\n LocalContext ctx = current(LocalContext.class);\n if (ctx == null) { // Root.\n ctx = OSGiServices.getLocalContext();\n }\n return (LocalContext) ctx.enterInner();\n }",
"@Override\n\tpublic Code apply(Env env, ParseTree t) {\n\t\treturn new VarNameCode(env.s(t));\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t// creating local class objects \n\t\t\n\t}",
"public ScopeManager(){\n globalConstants = new HashMap<>();\n globalVariables = new HashMap<>();\n\n currentConstants = null;\n currentVariables = null;\n\n temporaryConstants = new ArrayList<>();\n temporaryVariables = new ArrayList<>();\n\n localVariableScopes = new HashMap<>();\n localConstantScopes = new HashMap<>();\n }",
"PythonThread(Python python, String code) {\n this.python = python;\n this.code = code;\n this.ptf = new PythonTraceFunction();\n this.py = new PythonInterpreter();\n }",
"private InterpreterState(final String statename) {\n name = statename;\n }",
"IfaceState createState(int nlocal,IfaceSafetyStatus sts);",
"public boolean createLocalScope(Function f){\n if(localConstantScopes.containsKey(f) || localVariableScopes.containsKey(f)){\n return false;\n }\n\n localConstantScopes.putIfAbsent(f, new HashMap<>());\n localVariableScopes.putIfAbsent(f, new HashMap<>());\n \n return true;\n }",
"Environment createEnvironment();",
"Environment createEnvironment();",
"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 }",
"public GlobalScope() {\n super(null);\n }",
"public NewScript(NewScriptTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 17; i++) jj_la1[i] = -1;\n }",
"public static JavaLang getInstance()\n\t{\n\t\treturn inst;\n\t}",
"public ProgramModule createRootModule(String treeName) throws DuplicateNameException;",
"private void initInstanceVars() {\n\t\tglobalSymTab = new Hashtable<String,ClassDecl>();\n\t\tcurrentClass = null;\n\t}",
"public static void main(String[] args) {\n\t\tWithoutThreadLocal safetask = new WithoutThreadLocal();\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tThread thread = new Thread(safetask);\n\t\t\tthread.start();\n\t\t\ttry {\n\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"This output is thread local\");\n\t\t//Thsi Code is with thread local cocept\n\t\tWithThreadLocal task = new WithThreadLocal();\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tThread thread = new Thread(task);\n\t\t\tthread.start();\n\t\t\ttry {\n\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}",
"void createLocalClass()\n\t{\n\t\tfinal int localVar = 10;\n\t\t\n\t\t//this is to create local class\n\t\tclass LocalClass{\n\t\t\tpublic void print(){\n\t\t\t\tSystem.out.println(\"THis is local class with Id:\");\n\t\t\t\tSystem.out.println(\"THis is local class with num:\"+nums);\n\t\t\t\tSystem.out.println(\"THis is local class with num:\"+localVar); // localVar must be final. scope is different. the value might change inside local method.\n\t\t\t}\n\t\t}\n\t\t\n\t\tLocalClass l = new LocalClass();\n\t\tl.print();\n\t}",
"public void interpreter(Context context){\n System.out.println(\"abstract interpr of context \" +\n \"and call teminal or not terminal context\");\n context.arrayOfActions.get(0).interpreter(context);\n context.arrayOfNumbers.get(0).interpreter(context);\n\n }",
"@JRubyMethod(name = \"new\")\n public static IRubyObject newObject(ThreadContext ctx, IRubyObject self) {\n return self.rbClone().callMethod(ctx, \"reset\");\n }",
"public static EvalEnv genExampleEnv2()\n {\n EvalEnv result = new EvalEnv();\n result.createVariable(Boolean.class, true);\n result.createVariable(Boolean.class, true);\n for (int x = 0; x < Environment.HalfObsWidth * 2; x++)\n {\n for (int y = 0; y < Environment.HalfObsHeight * 2; y++)\n {\n result.createVariable(Integer.class, 0);\n }\n }\n\n for (int i = 0; i < 5; i++)\n {\n result.createVariable(Integer.class, -1);\n result.createVariable(Float.class, -100.0);\n result.createVariable(Float.class, 10.0);\n }\n return result;\n }",
"public static void main(String[] args) {\n\t\tExecutorService es = new Executors.\n\t}",
"private LanguageInterpreterRegistry() {\r\n\t\t// hides default constructor.\r\n\t}",
"public PythonProcessManager(Ignite ignite) {\n this(new NativeProcessManager(ignite));\n }",
"public RhinoServlet() {\r\n if (!ContextFactory.hasExplicitGlobal())\r\n ContextFactory.initGlobal(new DynamicFactory());\r\n globalScope = new GlobalScope(this);\r\n }",
"public static ExecutionFactory init() {\n\t\ttry {\n\t\t\tExecutionFactory theExecutionFactory = (ExecutionFactory)EPackage.Registry.INSTANCE.getEFactory(ExecutionPackage.eNS_URI);\n\t\t\tif (theExecutionFactory != null) {\n\t\t\t\treturn theExecutionFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ExecutionFactoryImpl();\n\t}",
"public static void main(String[] args) {\n\t\tWorkspace workspace = new Workspace();\r\n\t}",
"Variables createVariables();",
"public Interpreter(String fileName) throws FileNotFoundException {\n super(fileName);\n instructionsStack.push(new ArrayList<>());\n }",
"public LocalObject() {}",
"public LocalEventLoopGroup(int nThreads) {\n/* 41 */ this(nThreads, null);\n/* */ }",
"private ScriptableObject makeChildScope(String name, Scriptable scope) {\r\n // This code is based on sample code from Rhino's website:\r\n // http://www.mozilla.org/rhino/scopes.html\r\n \r\n // I changed it to use a ScriptableObject instead of Context.newObject()\r\n ScriptableObject child = new NamedScriptableObject(name);\r\n \r\n // Set the prototype to the scope (so we have access to all its methods \r\n // and members). \r\n child.setPrototype(scope);\r\n \r\n // We want \"threadScope\" to be a new top-level scope, so set its parent \r\n // scope to null. This means that any variables created by assignments\r\n // will be properties of \"threadScope\".\r\n child.setParentScope(null);\r\n \r\n return child;\r\n }",
"public SLogoCodeInterpreter(Visualizer vis) {\n\t\tinitializeDictionary();\n\t\tmyVis = vis;\n\t\tmyTurtles = new TurtleTracker(vis);\n\t\tmyTurtles.add();\n\t\tmyTurtles.get(0).setActive(true);\n\t\tmyTurtles.get(0).makeVisible();\n\t\tcommandGenerator = new CommandFactory();\n\t\ttry {\n\t\t\tsetProperties(DEFAULT_LANGUAGE);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SLogoException(\"Default language resource missing\");\n\t\t}\n\t}",
"public Local createLocal(Position pos, LocalInstance li) {\n return (Local) xnf.Local(pos, xnf.Id(pos, li.name())).localInstance(li).type(li.type());\n }",
"public static JSqVM sq_open(int initialStackSize) throws JSquirrelException {\r\n\t\tlong handle = sq_open_native(initialStackSize);\r\n\t\tif (handle == 0)\r\n\t\t\tthrow new JSquirrelException(\"Could not create a new Squirrel VM.\");\r\n\t\treturn new JSqVM(handle);\r\n\t}",
"Program program() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tToken progName = match(IDENTIFIER);\r\n\t\tBlock block = block();\r\n\t\treturn new Program (first, progName, block);\r\n\t}",
"public interface PyRunnable {\n /**\n * Return the org.jpp.modules code object.\n */\n abstract public PyCode getMain();\n}",
"Variable createVariable();",
"Variable createVariable();",
"synchronized public Session newSysSession() {\n\n Session session = new Session(sysSession.database,\n sysSession.getUser(), false, false,\n sessionIdCount, null, 0);\n\n session.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n\n sessionMap.put(sessionIdCount, session);\n\n sessionIdCount++;\n\n return session;\n }",
"@Before\n public void setUp() throws Exception {\n testRootDir = new File(System.getProperty(\"java.io.tmpdir\") + \"/Zeppelin_Test_\" + System.currentTimeMillis());\n testRootDir.mkdirs();\n LOGGER.info(\"Create tmp directory: {} as root folder of ZEPPELIN_INTERPRETER_DIR & ZEPPELIN_CONF_DIR\", testRootDir.getAbsolutePath());\n interpreterDir = new File(testRootDir, \"interpreter\");\n confDir = new File(testRootDir, \"conf\");\n notebookDir = new File(testRootDir, \"notebook\");\n\n interpreterDir.mkdirs();\n confDir.mkdirs();\n notebookDir.mkdirs();\n\n FileUtils.copyDirectory(new File(\"src/test/resources/interpreter\"), interpreterDir);\n FileUtils.copyDirectory(new File(\"src/test/resources/conf\"), confDir);\n\n System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getVarName(), confDir.getAbsolutePath());\n System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_DIR.getVarName(), interpreterDir.getAbsolutePath());\n System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir.getAbsolutePath());\n System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_REMOTE_RUNNER.getVarName(), INTERPRETER_SCRIPT);\n\n conf = new ZeppelinConfiguration();\n interpreterSettingManager = new InterpreterSettingManager(conf,\n mock(AngularObjectRegistryListener.class), mock(RemoteInterpreterProcessListener.class), mock(ApplicationEventListener.class));\n interpreterFactory = new InterpreterFactory(interpreterSettingManager);\n }",
"private void init() {\n safeLevel = config.getSafeLevel();\n \n // Construct key services\n loadService = config.createLoadService(this);\n posix = POSIXFactory.getPOSIX(new JRubyPOSIXHandler(this), RubyInstanceConfig.nativeEnabled);\n javaSupport = new JavaSupport(this);\n \n if (RubyInstanceConfig.POOLING_ENABLED) {\n executor = new ThreadPoolExecutor(\n RubyInstanceConfig.POOL_MIN,\n RubyInstanceConfig.POOL_MAX,\n RubyInstanceConfig.POOL_TTL,\n TimeUnit.SECONDS,\n new SynchronousQueue<Runnable>(),\n new DaemonThreadFactory());\n }\n \n // initialize the root of the class hierarchy completely\n initRoot();\n \n // Set up the main thread in thread service\n threadService.initMainThread();\n \n // Get the main threadcontext (gets constructed for us)\n ThreadContext tc = getCurrentContext();\n \n // Construct the top-level execution frame and scope for the main thread\n tc.prepareTopLevel(objectClass, topSelf);\n \n // Initialize all the core classes\n bootstrap();\n \n // Initialize the \"dummy\" class used as a marker\n dummyClass = new RubyClass(this, classClass);\n dummyClass.freeze(tc);\n \n // Create global constants and variables\n RubyGlobal.createGlobals(tc, this);\n \n // Prepare LoadService and load path\n getLoadService().init(config.loadPaths());\n \n booting = false;\n \n // initialize builtin libraries\n initBuiltins();\n \n if(config.isProfiling()) {\n getLoadService().require(\"jruby/profiler/shutdown_hook\");\n }\n \n // Require in all libraries specified on command line\n for (String scriptName : config.requiredLibraries()) {\n loadService.require(scriptName);\n }\n }",
"@Override\r\n public Thread newThread(Runnable r) {\n Thread t = new Thread(r, \"example-runner\");\r\n t.setDaemon(true);\r\n return t;\r\n }",
"public static void main(String[] args) {\n\n String context = \"Tigers Bears\";\n\n Expression define = buildInterpreterTree();\n\n System.out.println(context + \" is \" + define.interpret(context));\n }",
"public StandardScriptFactory(String scriptSourceLocator)\n/* */ {\n/* 65 */ this(null, scriptSourceLocator, (Class[])null);\n/* */ }",
"public static void main(String[] args) {\n new MainFrame(new HelloUniverse1(), 256, 256);\n }",
"public Bmv2Interpreter interpreter() {\n return interpreter;\n }",
"public Local createLocal(Position pos, LocalDecl decl) {\n return createLocal(pos, decl.localDef().asInstance());\n }",
"private static Object createStandaloneTester() {\n List<URL> urls = new ArrayList<>();\n for (String path : Splitter.on(':').split(System.getProperty(\"java.class.path\"))) {\n\n // A small hack is needed since we didn't make example application under different groupId and not prefixed\n // the artifactId with something special (cdap- and hive-)\n // Check for io/cdap/cdap\n if (path.contains(\"/io/cdap/cdap/\")) {\n String artifactFile = Paths.get(path).getFileName().toString();\n if (!artifactFile.startsWith(\"cdap-\") && !artifactFile.startsWith(\"hive-\")) {\n continue;\n }\n }\n\n try {\n urls.add(Paths.get(path).toUri().toURL());\n } catch (MalformedURLException e) {\n throw Throwables.propagate(e);\n }\n }\n\n ClassLoader classLoader = new MainClassLoader(urls.toArray(new URL[urls.size()]), null);\n try {\n Class<?> clz = classLoader.loadClass(StandaloneTester.class.getName());\n Constructor<?> constructor = clz.getConstructor(Object[].class);\n return constructor.newInstance((Object) new Object[0]);\n } catch (Exception e) {\n throw Throwables.propagate(e);\n }\n }",
"EntryPoint createEntryPoint();",
"public interface Program {\n\n static EvalResult newEvalResult(Val val, EvalDetails evalDetails) {\n return new EvalResult(val, evalDetails);\n }\n\n /**\n * Eval returns the result of an evaluation of the Ast and environment against the input vars.\n *\n * <p>The vars value may either be an `interpreter.Activation` or a `map[string]interface{}`.\n *\n * <p>If the `OptTrackState` or `OptExhaustiveEval` flags are used, the `details` response will be\n * non-nil. Given this caveat on `details`, the return state from evaluation will be:\n *\n * <ul>\n * <li>`val`, `details`, `nil` - Successful evaluation of a non-error result.\n * <li>`val`, `details`, `err` - Successful evaluation to an error result.\n * <li>`nil`, `details`, `err` - Unsuccessful evaluation.\n * </ul>\n *\n * <p>An unsuccessful evaluation is typically the result of a series of incompatible `EnvOption`\n * or `ProgramOption` values used in the creation of the evaluation environment or executable\n * program.\n */\n EvalResult eval(Object vars);\n\n final class EvalResult {\n private final Val val;\n private final EvalDetails evalDetails;\n\n private EvalResult(Val val, EvalDetails evalDetails) {\n this.val = val;\n this.evalDetails = evalDetails;\n }\n\n public Val getVal() {\n return val;\n }\n\n public EvalDetails getEvalDetails() {\n return evalDetails;\n }\n }\n}",
"public static void addInterpreter(LanguageInterpreterDescriptor interpreter) {\r\n\t\tINTERPRETERS.add(interpreter);\r\n\t}",
"private TracingEngine getEngine() {\n try {\n return engine.get(\"\", reloadEngine());\n } catch (final ExecutionException e) {\n return new NoopTracingEngine();\n }\n }",
"ClassLoader getNewTempClassLoader() {\n return new ClassLoader(getClassLoader()) {\n };\n }",
"Variable(Object names[]) {\n _vname = makeName(names).intern();\n _names = names;\n \n }",
"Run createRun();",
"public static void main(String[] args) {\n\t\tthisconstructor rv = new thisconstructor();\n\t\n\t\n\t}",
"@Override\n\t\t\tpublic Thread newThread(final Runnable r) {\n\t\t\t\tint id = threadNumber.getAndIncrement();\n\t\t\t\tString threadName = leftPad(String.valueOf(id), 2, \"0\");\n\t\t\t\tThread th = new Thread(r);\n\t\t\t\tth.setName(threadName);\n\t\t\t\tth.setDaemon(false);\n\t\t\t\treturn th;\n\t\t\t}",
"MathinterpreterFactory getMathinterpreterFactory();",
"private void declareLocals() {\r\n\t\t// declare locals\r\n\t\tfor(Local local: method.retrieveActiveBody().getLocals()) {\r\n\t\t\tString cType = null;\r\n\t\t\t// null types need special treatment, we don't output them\r\n\t\t\t// we also won't generate statements that use a nullType\r\n\t\t\t// as a target.\r\n\t\t\tif(local.getType() instanceof NullType) {\r\n\t\t\t\tcType = \"java_lang_Object*\";\r\n\t\t\t} else {\r\n\t\t\t\tcType = CTypes.toCType(local.getType());\r\n\t\t\t}\r\n\t\t\twriter.wl(cType + \" \" + local.getName() + \" = 0;\");\r\n\t\t}\r\n\t\twriter.wl(\"java_lang_Object* _exception = 0;\");\r\n\t}",
"public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }"
] | [
"0.68938315",
"0.5751574",
"0.5719747",
"0.5470098",
"0.54133916",
"0.54005104",
"0.5371318",
"0.53516805",
"0.52378607",
"0.50486463",
"0.50256056",
"0.4956538",
"0.49275744",
"0.49142218",
"0.49046728",
"0.4877963",
"0.4854839",
"0.4818457",
"0.48002502",
"0.4751466",
"0.47432688",
"0.4740334",
"0.4740334",
"0.4740334",
"0.47080475",
"0.47061762",
"0.46961415",
"0.4690812",
"0.46660626",
"0.46322182",
"0.4628017",
"0.4622115",
"0.45877662",
"0.45863202",
"0.45861262",
"0.45793095",
"0.45743814",
"0.45618817",
"0.4561091",
"0.4558636",
"0.45447263",
"0.45201516",
"0.4514802",
"0.45094335",
"0.44922972",
"0.4489997",
"0.44849962",
"0.44842196",
"0.44842196",
"0.44757456",
"0.44735816",
"0.4467492",
"0.44484547",
"0.44472644",
"0.44328168",
"0.44306988",
"0.4419783",
"0.440329",
"0.43978593",
"0.4393232",
"0.43882817",
"0.43840697",
"0.43827367",
"0.43805817",
"0.4376996",
"0.43760782",
"0.43721005",
"0.43706718",
"0.43693313",
"0.43661216",
"0.43655673",
"0.43651384",
"0.43572077",
"0.43553597",
"0.43549204",
"0.43540898",
"0.43426046",
"0.43426046",
"0.43424794",
"0.4328599",
"0.43208367",
"0.43168706",
"0.43027744",
"0.43017763",
"0.42930487",
"0.4292289",
"0.42909947",
"0.42839053",
"0.42799684",
"0.42759824",
"0.42730972",
"0.42661026",
"0.42637712",
"0.42637596",
"0.4259571",
"0.42581174",
"0.4249549",
"0.42490566",
"0.42487088",
"0.42483115"
] | 0.5907251 | 1 |
Creates a new interpreter with a specified local namespace. | public PythonInterpreter(PyObject dict) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"InterpreterRuntimeContext createInterpreterRuntimeContext();",
"public Local createLocal(Position pos, Local local) {\n return syn.createLocal(pos, local.localInstance());\n }",
"public abstract ILanguageProtocol makeInterpreter(String source, String replQualifiedName, String... salixPath) throws IOException, URISyntaxException, Exception;",
"public Resource createFromNsAndLocalName(String nameSpace, String localName)\n\t{\n\t\treturn new ResourceImpl(model.getNsPrefixMap().get(nameSpace), localName);\n\t}",
"protected VaryGrammarRuntimeModule createRuntimeModule() {\n\t\treturn new VaryGrammarRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn VaryGrammarInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}",
"Scope createScope();",
"public Local createLocal(Position pos, LocalInstance li) {\n return (Local) xnf.Local(pos, xnf.Id(pos, li.name())).localInstance(li).type(li.type());\n }",
"Program createProgram();",
"Program createProgram();",
"Program createProgram();",
"public ProgramModule createRootModule(String treeName) throws DuplicateNameException;",
"public Local createLocal(Position pos, LocalDecl decl) {\n return createLocal(pos, decl.localDef().asInstance());\n }",
"public static NamespaceContext create() {\n return new NamespaceContext();\n }",
"@Override\n\tpublic IOProcessor create(Interpreter interpreter) {\n\t\tTestCustomIOProc ioProc = new TestCustomIOProc();\n\t\tioProc.interpreter = interpreter;\n\t\tioProc.swigReleaseOwnership();\n\t\treturn ioProc;\n\t}",
"public PythonInterpreter() {\n }",
"Interpreter getInterpreter();",
"public ASCompilationUnit newInterface(String qualifiedInterfaceName) {\n\t\treturn ASTBuilder.synthesizeInterface(qualifiedInterfaceName);\n\t}",
"public Scriptable construct(Context cx, Scriptable scope, Object[] args);",
"public static LabelToNode createScopeByGraph() {\n return new LabelToNode(new GraphScopePolicy(), nodeAllocatorByGraph());\n }",
"@Override\n\tpublic Code apply(Env env, ParseTree t) {\n\t\treturn new VarNameCode(env.s(t));\n\t}",
"static Obj NewObj (String name,int kind) {\r\n\t\tObj p, obj = new Obj();\r\n obj.name = new String(name); \r\n\t\tobj.type = null; obj.kind = kind;\r\n\t\tobj.level = curLevel;\r\n\t\tp = topScope.locals;\r\n\t\t/*Para buscar si el nb de la variable nueva ya esta!!!*/\r\n\t\twhile (p != null) { \r\n \t \tif (p.name.equals(name)) Parser.SemError(1);\r\n\t\t\tp = p.next;\r\n\t\t}\r\n \t//FILO!!\r\n obj.next = topScope.locals; \r\n\t\ttopScope.locals = obj;\r\n \t//if (kind == vars) {}\r\n \t//obj.adr = topScope.nextAdr; topScope.nextAdr++;\r\n \t//obj.view();\r\n\t\treturn obj;\r\n }",
"IfaceState createState(int nlocal,IfaceSafetyStatus sts);",
"abstract AbstractRuntimeServiceNode<T> newRuntimeNode();",
"VariableDeclaration createVariableDeclaration();",
"public static JSqVM sq_open(int initialStackSize) throws JSquirrelException {\r\n\t\tlong handle = sq_open_native(initialStackSize);\r\n\t\tif (handle == 0)\r\n\t\t\tthrow new JSquirrelException(\"Could not create a new Squirrel VM.\");\r\n\t\treturn new JSqVM(handle);\r\n\t}",
"private static void createVars(JsProgram program, JsBlock block,\n Collection<JsStringLiteral> toCreate, Map<JsStringLiteral, JsName> names) {\n if (toCreate.size() > 0) {\n // Create the pool of variable names.\n JsVars vars = new JsVars(program.createSourceInfoSynthetic(\n JsStringInterner.class, \"Interned string pool\"));\n SourceInfo sourceInfo = program.createSourceInfoSynthetic(\n JsStringInterner.class, \"Interned string assignment\");\n for (JsStringLiteral literal : toCreate) {\n JsVar var = new JsVar(sourceInfo, names.get(literal));\n var.setInitExpr(literal);\n vars.add(var);\n }\n block.getStatements().add(0, vars);\n }\n }",
"@NotNull\n @Contract(pure = true)\n public PsiScriptNameExpression create(int lineNumber) {\n return new PsiScriptNameExpression(lineNumber);\n }",
"Idiom createIdiom();",
"public View create(Element elem)\n {\n if(isTextEval) {\n return new bluej.debugmgr.texteval.TextEvalSyntaxView(elem);\n }\n else {\n return new MoeSyntaxView(elem, errorMgr);\n }\n }",
"protected PlayLangRuntimeModule createRuntimeModule() {\n\t\treturn new PlayLangRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn PlayLangInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}",
"public String createNamespace(IProject p, String ns) throws ThinklabException {\r\n \t\t\t\t\r\n \t\tFile ret = new File(getSourceDirectory() + File.separator + \r\n \t\t\t\t\t\t\tns.replace('.', File.separatorChar) + \".tql\");\r\n \t\tFile dir = new File(MiscUtilities.getFilePath(ret.toString()));\r\n \t\t\r\n \t\ttry {\r\n \t\t\tdir.mkdirs();\r\n \t\t\tPrintWriter out = new PrintWriter(ret);\r\n \t\t\tout.println(\"namespace \" + ns + \";\\n\");\r\n \t\t\tout.close();\r\n \t\t} catch (Exception e) {\r\n \t\t\tthrow new ThinklabClientException(e);\r\n \t\t}\r\n \t\t\r\n \t\treturn getSourceFolderNames().iterator().next() + File.separator + \r\n \t\t\t\tns.replace('.', File.separatorChar) + \".tql\";\r\n \t}",
"public IVariable createInternalVariable(String name, IJavaType referencType) {\n IVariable var = new InterpreterVariable(name, referencType, fContext.getVM());\n fInternalVariables.put(name, var);\n return var;\n }",
"public VariableIF createVariable(VariableDecl decl);",
"Environment createEnvironment();",
"Environment createEnvironment();",
"public StandardScriptFactory(String scriptEngineName, String scriptSourceLocator)\n/* */ {\n/* 87 */ this(scriptEngineName, scriptSourceLocator, (Class[])null);\n/* */ }",
"Module createModule();",
"private static Object createStandaloneTester() {\n List<URL> urls = new ArrayList<>();\n for (String path : Splitter.on(':').split(System.getProperty(\"java.class.path\"))) {\n\n // A small hack is needed since we didn't make example application under different groupId and not prefixed\n // the artifactId with something special (cdap- and hive-)\n // Check for io/cdap/cdap\n if (path.contains(\"/io/cdap/cdap/\")) {\n String artifactFile = Paths.get(path).getFileName().toString();\n if (!artifactFile.startsWith(\"cdap-\") && !artifactFile.startsWith(\"hive-\")) {\n continue;\n }\n }\n\n try {\n urls.add(Paths.get(path).toUri().toURL());\n } catch (MalformedURLException e) {\n throw Throwables.propagate(e);\n }\n }\n\n ClassLoader classLoader = new MainClassLoader(urls.toArray(new URL[urls.size()]), null);\n try {\n Class<?> clz = classLoader.loadClass(StandaloneTester.class.getName());\n Constructor<?> constructor = clz.getConstructor(Object[].class);\n return constructor.newInstance((Object) new Object[0]);\n } catch (Exception e) {\n throw Throwables.propagate(e);\n }\n }",
"public com.google.cloud.servicedirectory.v1beta1.Namespace createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateNamespaceMethod(), getCallOptions(), request);\n }",
"protected PythonInterpreter registerEnv(String key) {\n\t\tPythonInterpreter p;\n\t\tif (environments.containsKey(key)) {p= environments.get(key);}\n\t\telse {\n\t\t\tp = new PythonInterpreter();\n\t\t\tenvironments.put(key, p);\n\t\t}\n\t\treturn p;\n\t}",
"public static LocalContext enter() {\n LocalContext ctx = current(LocalContext.class);\n if (ctx == null) { // Root.\n ctx = OSGiServices.getLocalContext();\n }\n return (LocalContext) ctx.enterInner();\n }",
"VirtualMachine.DefinitionStages.Blank define(String name);",
"VirtualMachine.DefinitionStages.Blank define(String name);",
"EntryPoint createEntryPoint();",
"IFMLModule createIFMLModule();",
"public void createInterpreter(String path, String interprName,\n\t\t\tboolean isDefault, int index) {\n\t\ttry {\n\t\t\topenInterpreters();\n\n\t\t\tgetBot().button(BTN_ADD).click();\n\t\t\tgetBot().waitUntil(Conditions.shellIsActive(DLG_ADD_INTERPRETER));\n\t\t\tgetBot().textWithLabel(FLD_INTERPR_NAME).setText(interprName);\n\t\t\tgetBot().textWithLabel(FLD_INTERPR_PATH).setText(path);\n\n\t\t\tString type = getBot().comboBoxWithLabel(FLD_INTERPR_TYPE)\n\t\t\t\t\t.getText();\n\t\t\tSWTBotTestCase.assertEquals(TCL_INTERPRETER_TYPE, type);\n\n\t\t\twaitEnableAndClick(BTN_OK);\n\t\t\tgetBot().waitUntil(Conditions.shellIsActive(DLG_PREFERENCES));\n\t\t\tSWTBotShell shell = getBot().shell(DLG_PREFERENCES);\n\t\t\tSWTBotTable tableBot = getBot().table();\n\t\t\tgetBot().waitUntil(Conditions.tableHasRows(tableBot, index + 1));\n\n\t\t\t// Alternative interpreter will add to first row because table is\n\t\t\t// sorting by name.\n\t\t\tcheckInterpreter(tableBot, path, interprName, isDefault, 0);\n\n\t\t\twaitEnableAndClick(BTN_OK);\n\t\t\tgetBot().waitUntil(Conditions.shellCloses(shell));\n\t\t} catch (WidgetNotFoundException ex) {\n\t\t\tSWTBotTestCase.fail(ex.getLocalizedMessage());\n\t\t} catch (TimeoutException ex) {\n\t\t\tSWTBotTestCase.fail(ex.getLocalizedMessage());\n\t\t}\n\t}",
"Variable createVariable();",
"Variable createVariable();",
"VirtualMachineTemplate.DefinitionStages.Blank define(String name);",
"Package createPackage();",
"protected NamespaceStack createNamespaceStack() {\r\n // actually returns a XMLOutputter.NamespaceStack (see below)\r\n return new NamespaceStack();\r\n }",
"public Interpreter() {\n super();\n instructionsStack.push(new ArrayList<>());\n }",
"Script createScript();",
"public static QualifiedName create(final String namespace, final String name) {\n\t\treturn create(namespace + name);\n\t}",
"public static LabelToNode createIncremental()\n { return new LabelToNode(new SingleScopePolicy(), nodeAllocatorDeterministic()); }",
"public Variable addNewPrefixedVar(String prefix, String rootName, Type t) {\n\t\treturn addNewPrefixedVar(prefix, rootName, t, Use.LOCAL);\n\t}",
"public boolean createLocalScope(Function f){\n if(localConstantScopes.containsKey(f) || localVariableScopes.containsKey(f)){\n return false;\n }\n\n localConstantScopes.putIfAbsent(f, new HashMap<>());\n localVariableScopes.putIfAbsent(f, new HashMap<>());\n \n return true;\n }",
"public synchronized Literal createLiteral(String str) {\n\n // check whether we have it in the registry\n Literal r = (Literal)lmap.get(str);\n if(r == null) {\n r = new LiteralImpl(/*getUnusedNodeID(),*/ str);\n lmap.put(str, r);\n }\n return r;\n }",
"public Service(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String name) {\n super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);\n software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, \"scope is required\"), java.util.Objects.requireNonNull(name, \"name is required\") });\n }",
"public StandardScriptFactory(String scriptSourceLocator)\n/* */ {\n/* 65 */ this(null, scriptSourceLocator, (Class[])null);\n/* */ }",
"public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }",
"RefPackage newPackage(\n Jmi1Package_1_0 outermostPackage,\n String qualifiedName\n ) throws ServiceException;",
"public SLogoCodeInterpreter(Visualizer vis) {\n\t\tinitializeDictionary();\n\t\tmyVis = vis;\n\t\tmyTurtles = new TurtleTracker(vis);\n\t\tmyTurtles.add();\n\t\tmyTurtles.get(0).setActive(true);\n\t\tmyTurtles.get(0).makeVisible();\n\t\tcommandGenerator = new CommandFactory();\n\t\ttry {\n\t\t\tsetProperties(DEFAULT_LANGUAGE);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SLogoException(\"Default language resource missing\");\n\t\t}\n\t}",
"Program program() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tToken progName = match(IDENTIFIER);\r\n\t\tBlock block = block();\r\n\t\treturn new Program (first, progName, block);\r\n\t}",
"public Variable addNewPrefixedVar(String prefix, String rootName, Type t, Use u) {\n\t\t//System.out.println(\"symbol table addNewPrefixedVar \" + prefix + \" \" + n);\n\t\treturn addNewVar(prefix + \"_\" + rootName, t, u);\n\t}",
"@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }",
"public Variable addNewVar(String rootName, Type t, Use u) {\n\t\tNameSSA ssa = new NameSSA(rootName);\n\t\tname.put(rootName, ssa);\n\t\tVariable v = new Variable(ssa.current(), t, u);\n\t\tvar.put(ssa.current(), v);\n\t\tif (VerboseLevel.DEBUG.mayPrint()) {\n\t\t\tSystem.out.println(\"SymbolTable.addNewVar: \" + v.name());\n\t\t}\n\t\t// to add the old value of the variable (i.e. before function call)\n\t\tv.setOld(v);\n\t\treturn v;\n\t}",
"public StandardScriptFactory(String scriptSourceLocator, Class<?>... scriptInterfaces)\n/* */ {\n/* 76 */ this(null, scriptSourceLocator, scriptInterfaces);\n/* */ }",
"public Local() {\n }",
"public LocalObject() {}",
"public Tracing create(String serviceName) {\n return Tracing.newBuilder()\n .localServiceName(serviceName)\n .currentTraceContext(RequestContextCurrentTraceContext.ofDefault())\n .spanReporter(spanReporter())\n .build();\n }",
"@Override\n public Object clone()\n {\n return new LocalEditorKit();\n }",
"MathinterpreterFactory getMathinterpreterFactory();",
"public static final SpriteWorld newWorld (String name) {\n\t\tif (Top.tgame != null && !isBindedSpriteLifeCycleListener) {\n\t\t\tTop.tgame.registerLifecycleListener(SpriteLifeCycleListener);\n\t\t\tisBindedSpriteLifeCycleListener = true;\n\t\t}\n\n\t\t// create new world\n\t\tSpriteWorld world = mSpriteWorlds.get(name);\n\t\tif (world == null) {\n\t\t\tworld = new SpriteWorld();\n\t\t\tworld.bind(name);\n\t\t\tmSpriteWorlds.put(name, world);\n\t\t}\n\t\treturn world;\n\t}",
"public Stmt createEval(Expr expr) {\n return xnf.Eval(expr.position(), expr);\n }",
"void createLocalClass()\n\t{\n\t\tfinal int localVar = 10;\n\t\t\n\t\t//this is to create local class\n\t\tclass LocalClass{\n\t\t\tpublic void print(){\n\t\t\t\tSystem.out.println(\"THis is local class with Id:\");\n\t\t\t\tSystem.out.println(\"THis is local class with num:\"+nums);\n\t\t\t\tSystem.out.println(\"THis is local class with num:\"+localVar); // localVar must be final. scope is different. the value might change inside local method.\n\t\t\t}\n\t\t}\n\t\t\n\t\tLocalClass l = new LocalClass();\n\t\tl.print();\n\t}",
"TopLevelImport createTopLevelImport();",
"@Override\n\tpublic AbstractOriental createOrientale() {\n\t\treturn new OrientalSN();\n\t}",
"public LocalDecl createLocalDecl(Position pos, Flags flags, Name name, Expr init) {\n if (init.type().isVoid()) {\n System.err.println(\"ERROR: ForLoopOptimizer.createLocalDecl: creating void local assignment for \" +init+ \" at \" +pos);\n }\n return createLocalDecl(pos, flags, name, init.type(), init);\n }",
"public abstract ServiceLocator create(String name);",
"VM createVM();",
"<T> T newInstance(URI description) throws EnvironmentException;",
"public abstract World create(World world);",
"private InterpreterState(final String statename) {\n name = statename;\n }",
"VarAssignment createVarAssignment();",
"public ProgramNode(String aName, DeclarationsNode globals, SubProgramDeclarationsNode functions, CompoundStatementNode main, Scope scope) {\n\t\tthis.name = aName;\n\t\tglobalVariables = globals;\n\t\tthis.functions = functions;\n\t\tthis.main = main;\n\t\tsymbolTable = scope;\n\t}",
"TopLevel createTopLevel();",
"public JexlEvalContext(JexlContext context, JexlContext.NamespaceResolver namespace) {\n this.vars = context != null ? context : JexlEngine.EMPTY_CONTEXT;\n this.ns = namespace != null ? namespace : JexlEngine.EMPTY_NS;\n }",
"static Pool newVariablePool() {\n return new VariablePool();\n }",
"public StandardScriptFactory(String scriptEngineName, String scriptSourceLocator, Class<?>... scriptInterfaces)\n/* */ {\n/* 100 */ Assert.hasText(scriptSourceLocator, \"'scriptSourceLocator' must not be empty\");\n/* 101 */ this.scriptEngineName = scriptEngineName;\n/* 102 */ this.scriptSourceLocator = scriptSourceLocator;\n/* 103 */ this.scriptInterfaces = scriptInterfaces;\n/* */ }",
"Literal createLiteral();",
"Literal createLiteral();",
"Notentyp createNotentyp();",
"public JexlEvalContext(JexlContext context) {\n this(context, context instanceof JexlContext.NamespaceResolver ? (JexlContext.NamespaceResolver) context : null);\n }",
"Parse createParse();",
"SimPolicy.DefinitionStages.Blank define(String name);",
"public ASTQuery subCreate(){\r\n\t\tASTQuery ast = create();\r\n\t\tast.setGlobalAST(this);\r\n\t\tast.setNSM(getNSM());\r\n\t\treturn ast;\r\n\t}",
"public static NamespaceRegistrationTransactionFactory createRootNamespace(\n final NetworkType networkType,\n final String namespaceName,\n final BigInteger duration) {\n NamespaceId namespaceId = NamespaceId.createFromName(namespaceName);\n return create(networkType, namespaceName,\n namespaceId, NamespaceRegistrationType.ROOT_NAMESPACE, Optional.of(duration), Optional.empty());\n }",
"public LocalDecl createLocalDecl(Position pos, LocalDef def, Expr init) {\n return xnf.LocalDecl( pos.markCompilerGenerated(), \n xnf.FlagsNode(pos, def.flags()),\n xnf.CanonicalTypeNode(pos, def.type().get()), \n xnf.Id(pos, def.name()),\n init ).localDef(def);\n }",
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Namespace>\n createNamespace(com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request);\n }"
] | [
"0.576005",
"0.54277223",
"0.53635037",
"0.5057841",
"0.5018065",
"0.49885994",
"0.48954156",
"0.4876996",
"0.4876996",
"0.4876996",
"0.48514745",
"0.4829455",
"0.47902593",
"0.47887263",
"0.47573584",
"0.46637157",
"0.46579868",
"0.46329555",
"0.4607564",
"0.4598693",
"0.45513123",
"0.45479777",
"0.4546441",
"0.45286822",
"0.4516946",
"0.4506976",
"0.45028538",
"0.44528702",
"0.44482934",
"0.44444966",
"0.4429334",
"0.44180876",
"0.4411744",
"0.4400649",
"0.4400649",
"0.43815985",
"0.43790656",
"0.43779325",
"0.43698645",
"0.43618608",
"0.43513605",
"0.4347165",
"0.4347165",
"0.43428522",
"0.43324187",
"0.4330657",
"0.4330361",
"0.4330361",
"0.43190598",
"0.43137437",
"0.43088022",
"0.43061692",
"0.43022916",
"0.43002427",
"0.42887807",
"0.42868274",
"0.4276573",
"0.4264548",
"0.42631364",
"0.4262348",
"0.42540377",
"0.42453167",
"0.42434928",
"0.4229635",
"0.42267245",
"0.42265102",
"0.42190808",
"0.4218945",
"0.42158967",
"0.42157373",
"0.42028633",
"0.42022917",
"0.42013296",
"0.42000982",
"0.4198895",
"0.41977027",
"0.41901302",
"0.41894674",
"0.41824996",
"0.41815653",
"0.41770816",
"0.41730034",
"0.4172852",
"0.41713485",
"0.41538084",
"0.41447243",
"0.4141186",
"0.4135468",
"0.41329652",
"0.41250473",
"0.41202646",
"0.41202646",
"0.41199997",
"0.41171005",
"0.41146687",
"0.41135678",
"0.41093066",
"0.41046715",
"0.41039634",
"0.40996253"
] | 0.42415884 | 63 |
Evaluates a string as a Python expression and returns the result. | public PyObject eval(String s) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object eval(String expression) throws Exception;",
"public String evaluate(String expression);",
"String evaluate();",
"public Object eval (Object expression);",
"public T evaluate(String expr) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionBuilder.build(tokens);\n Visitor<T> visitor = new ExpressionVisitor<>();\n return visitor.visit(expression);\n }",
"public static IValueNode eval(@NonNull final String s) {\n return compile(s).eval();\n }",
"public int expressionEval(String expression){\n\n int result = 0;\n\n\n\n return result;\n }",
"public Expression determine(String s);",
"public static double eval(final String str) {\n return new Object() {\n int pos = -1, ch;\n\n void nextChar() {\n ch = (++pos < str.length()) ? str.charAt(pos) : -1;\n }\n\n boolean eat(int charToEat) {\n while (ch == ' ') nextChar();\n if (ch == charToEat) {\n nextChar();\n return true;\n }\n return false;\n }\n\n double parse() {\n nextChar();\n double x = parseExpression();\n if (pos < str.length()) throw new RuntimeException(\"Unexpected: \" + (char)ch);\n return x;\n }\n\n // Grammar:\n // expression = term | expression `+` term | expression `-` term\n // term = factor | term `*` factor | term `/` factor\n // factor = `+` factor | `-` factor | `(` expression `)`\n // | number | functionName factor | factor `^` factor\n\n double parseExpression() {\n double x = parseTerm();\n for (;;) {\n if (eat('+')) x += parseTerm(); // addition\n else if (eat('-')) x -= parseTerm(); // subtraction\n else return x;\n }\n }\n\n double parseTerm() {\n double x = parseFactor();\n for (;;) {\n if (eat('*')) x *= parseFactor(); // multiplication\n else if (eat('/')) x /= parseFactor(); // division\n else return x;\n }\n }\n\n double parseFactor() {\n if (eat('+')) return parseFactor(); // unary plus\n if (eat('-')) return -parseFactor(); // unary minus\n\n double x;\n int startPos = this.pos;\n if (eat('(')) { // parentheses\n x = parseExpression();\n eat(')');\n } else if ((ch >= '0' && ch <= '9') || ch == '.') { // numbers\n while ((ch >= '0' && ch <= '9') || ch == '.') nextChar();\n x = Double.parseDouble(str.substring(startPos, this.pos));\n } else if (ch >= 'a' && ch <= 'z') { // functions\n while (ch >= 'a' && ch <= 'z') nextChar();\n String func = str.substring(startPos, this.pos);\n x = parseFactor();\n if (func.equals(\"sqrt\")) x = Math.sqrt(x);\n else if (func.equals(\"sin\")) x = Math.sin(Math.toRadians(x));\n else if (func.equals(\"cos\")) x = Math.cos(Math.toRadians(x));\n else if (func.equals(\"tan\")) x = Math.tan(Math.toRadians(x));\n else throw new RuntimeException(\"Unknown function: \" + func);\n } else {\n throw new RuntimeException(\"Unexpected: \" + (char)ch);\n }\n\n if (eat('^')) x = Math.pow(x, parseFactor()); // exponentiation\n\n return x;\n }\n }.parse();\n }",
"public static String evaluate( String expr )\n {\n\n\tString[] arr = expr.split(\"//s+\");\n\tString ret = \"\";\n\tALStack<String> stack = new ALStack<String>();\n\tfor( String s: arr)\n\t stack.push(s);\n\n\tif( stack.peek().equals(\"(\")){\n\t stack.pop();\n\t int operator = findOp(stack.pop());\n\t ret = unload(operator, stack);\n\t return ret;\n\t}\n\treturn \"\";\n }",
"public static double eval(final String str) {\n return new Object() {\n int pos = -1, ch;\n\n void nextChar() {\n ch = (++pos < str.length()) ? str.charAt(pos) : -1;\n }\n\n boolean eat(int charToEat) {\n while (ch == ' ') nextChar();\n if (ch == charToEat) {\n nextChar();\n return true;\n }\n return false;\n }\n\n double parse() {\n nextChar();\n double x = parseExpression();\n if (pos < str.length()) throw new RuntimeException(\"Unexpected: \" + (char)ch);\n return x;\n }\n\n // Grammar:\n // expression = term | expression `+` term | expression `-` term\n // term = factor | term `×` factor | term `÷` factor\n // factor = `+` factor | `-` factor | `(` expression `)`\n // | number | functionName factor | factor `^` factor\n\n double parseExpression() {\n double x = parseTerm();\n for (;;) {\n if (eat('+')) x += parseTerm(); // addition\n else if (eat('-')) x -= parseTerm(); // subtraction\n else return x;\n }\n }\n\n double parseTerm() {\n double x = parseFactor();\n for (;;) {\n if (eat('×')) x *= parseFactor(); // multiplication\n else if (eat('÷')) x /= parseFactor(); // division\n else return x;\n }\n }\n\n double parseFactor() {\n if (eat('+')) return parseFactor(); // unary plus\n if (eat('-')) return -parseFactor(); // unary minus\n\n double x;\n int startPos = this.pos;\n if (eat('(')) { // parentheses\n x = parseExpression();\n eat(')');\n } else if ((ch >= '0' && ch <= '9') || ch == '.') { // numbers\n while ((ch >= '0' && ch <= '9') || ch == '.') nextChar();\n x = Double.parseDouble(str.substring(startPos, this.pos));\n } else {\n throw new RuntimeException(\"Unexpected: \" + (char)ch);\n }\n\n return x;\n }\n }.parse();\n }",
"public int evaluate(String expression) {\n\t\tStack oPSt = new Stack();\n\t\tfor (int i = 0; i < expression.length(); i++) {\n\t\t\tString x = expression.substring(i, i + 1);\n\t\t\tStringBuilder longIntegers = new StringBuilder();\n\t\t\tif (x.equals(\" \"))\n\t\t\t\tcontinue;\n\t\t\telse {\n\t\t\t\tint counter = 0;\n\t\t\t\twhile (counter + i < expression.length()\n\t\t\t\t\t\t&& !expression.substring(i + counter, i + counter + 1).equals(\" \")) {\n\t\t\t\t\tlongIntegers.append(expression.substring(i + counter, i + 1 + counter));\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\ti = i + counter;\n\t\t\t}\n\t\t\tx = longIntegers.toString();\n\t\t\tif (isNum(x)) {\n\t\t\t\toPSt.push(Float.parseFloat(x));\n\t\t\t} else if (x.equals(\"*\") || x.equals(\"+\") || x.equals(\"/\") || x.equals(\"-\")) {\n\t\t\t\tFloat num1 = (Float) oPSt.pop(), num2 = (Float) oPSt.pop();\n\t\t\t\tif (x.equals(\"+\"))\n\t\t\t\t\toPSt.push(num1 + num2);\n\t\t\t\telse if (x.equals(\"*\"))\n\t\t\t\t\toPSt.push(num1 * num2);\n\t\t\t\telse if (x.equals(\"/\"))\n\t\t\t\t\toPSt.push(num2 / num1);\n\t\t\t\telse\n\t\t\t\t\toPSt.push(num2 - num1);\n\t\t\t} else\n\t\t\t\tthrow new RuntimeException(\"Invalid Input\");\n\n\t\t}\n\t\tif (oPSt.size() == 0)\n\t\t\treturn 0;\n\t\treturn (int)Math.round((Float) oPSt.pop());\n\t}",
"public WebutilsExpression parse(String expressionStr)\r\n\t{\r\n\t\tExpression expression = expressionEvaluator.parse(expressionStr);\r\n\t\treturn new WebutilsExpression(expression, expressionRegistry);\r\n\t}",
"public String evaluate(final String jsExpression);",
"Hojas eval();",
"private String evaluateExpr(String expr){\n\t\t//bigdecimal used for long user inputs\n\t\tBigDecimal num1, num2, ans, temp = new BigDecimal(\"0\");\n\t\tint check = 1;\n\t\t//find the position of function\n\t\twhile(Character.isDigit(expr.charAt(check)) || expr.charAt(check) == '.')\n\t\t\tcheck++;\n\t\t//extract numbers from expression\n\t\tnum1 = new BigDecimal(expr.substring(0,check));\n\t\tnum2 = new BigDecimal(expr.substring(check + 1,expr.length()));\n\t\t//division by zero error\n\t\tif(num2.compareTo(temp) == 0 && expr.charAt(check) == '/')\n\t\t\treturn \"Invalid\";\n\t\t//evaluate functions\n\t\tif(expr.charAt(check) == '*')\n\t\t\tans = num1.multiply(num2);\n\t\telse if(expr.charAt(check) == '+')\n\t\t\tans = num1.add(num2);\n\t\telse if(expr.charAt(check) == '/')\n\t\t\tans = num1.divide(num2, MathContext.DECIMAL32);\n\t\telse\n\t\t\tans = num1.subtract(num2);\n\t\treturn ans.toString();\n\t}",
"public static double evaluate(String expression) {\n\n\t\tStack<String> operators = new Stack<String>();\n\t\tStack<Double> operands = new Stack<Double>();\n\n\t\tfor (String token : expression.split(\" \")) {\n\t\t\tswitch (token) {\n\t\t\t\tcase \"(\":\n\t\t\t\t\tcontinue;\n\t\t\t\tcase \"+\":\n\t\t\t\tcase \"-\":\n\t\t\t\tcase \"*\":\n\t\t\t\tcase \"/\":\n\t\t\t\tcase \"sqrt\":\n\t\t\t\t\toperators.push(token); break;\n\t\t\t\tcase \")\": // Pop operand, apply operator and push result\n\t\t\t\t\tString operator = operators.pop();\n\t\t\t\t\tdouble value = operands.pop();\n\n\t\t\t\t\tswitch (operator) {\n\t\t\t\t\t\tcase \"+\": value = operands.pop() + value; break;\n\t\t\t\t\t\tcase \"-\": value = operands.pop() - value; break;\n\t\t\t\t\t\tcase \"*\": value = operands.pop() * value; break;\n\t\t\t\t\t\tcase \"/\": value = operands.pop() / value; break;\n\t\t\t\t\t\tcase \"sqrt\": value = Math.sqrt(value); break;\n\t\t\t\t\t}\n\t\t\t\t\toperands.push(value);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\toperands.push(Double.parseDouble(token));\n\t\t\t}\n\t\t}\n\t\treturn operands.pop();\n\t}",
"public String eval(String p1 ) {\n\t}",
"@Test\n void scEvaluate() {\n StandardCalc sc = new StandardCalc();\n String expression = (\"( 5 * ( 6 + 7 ) ) - 2\");\n float result = 0f;\n try {\n result = sc.evaluate(expression);\n } catch (InvalidExpressionException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n assertEquals(result, 63);\n }",
"private String evaluate(String expression) {\n String separators = \"()*+/-\";\n String result;\n // Stack for using in algorithm\n Stack<String> stackOperations = new Stack<String>();\n // Stack for RPN - reverse polish notation\n Stack<String> stackRPN = new Stack<String>();\n // Stack for evaluating answer\n Stack<String> stackTemp = new Stack<String>();\n //splitting expression into tokens\n StringTokenizer stringTokenizer = new StringTokenizer(updateUnaryMinus(expression), separators, true);\n\n while (stringTokenizer.hasMoreTokens()) {\n String token = stringTokenizer.nextToken();\n if (isNumber(token)) {\n stackRPN.push(token);\n } else if (isOpenBracket(token)) {\n stackOperations.push(token);\n } else if (isCloseBracket(token)) {\n while (!isOpenBracket(stackOperations.lastElement())) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.pop();\n } else if (isOperator(token)) {\n while (!stackOperations.empty() && isOperator(stackOperations.lastElement())\n && getPrecedence(stackOperations.lastElement()) > getPrecedence(token)) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.push(token);\n }\n }\n while (!stackOperations.empty()) {\n stackRPN.push(stackOperations.pop());\n }\n Collections.reverse(stackRPN);\n\n // Evaluation if RPN expression\n while (!stackRPN.empty()) {\n if (isNumber(stackRPN.lastElement())) stackTemp.push(stackRPN.pop());\n else stackTemp.push(makeOperation(stackRPN.pop(), stackTemp.pop(), stackTemp.pop()));\n }\n result = stackTemp.pop();\n return result;\n }",
"public String eval(String input)\n\t{\n\t\ttry\n\t\t{\n\t\tProgramRule ptmp = new ProgramRule(this.value);\n\t\tString res = \"\";\n\t\tres = ptmp.transform(input);\n\t\t//recursively evaluate the children nodes.\n\t\tfor(ParseTreeNode ptn: this.children)\n\t\t{\n\t\t\tptn.eval(input);\n\t\t}\n\t\tthis.tmpEval = res;\n\t\treturn res;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t}",
"@Test\r\n public void testEval__call__1() throws ScriptException {\r\n Object value = engine.eval(\"java.lang.String()\");\r\n Assert.assertEquals(\"\", value);\r\n }",
"public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}",
"EvaluationResult evalExpression(ValueExp expr) { return evalExpression(expr, true); }",
"public static Expression compile(@NonNull final String s) {\n return new Expression(PARSER.parse(s));\n }",
"public Object parseValue(String expr);",
"public static int evaluateExpression(String expression) {\n\t\tif (expression.length() < 1)\n\t\t\treturn Integer.MAX_VALUE;\n\t\tExpression eBuilder = new ExpressionBuilder(expression).build();\n\t\treturn (int) eBuilder.evaluate();\n\t}",
"private boolean evaluate(final String input) {\n return evaluate(input, true);\n}",
"public static Expr parse(String str) {\r\n\t\tExprBinary at = new ExprBinary(null, null); // the root of the tree\r\n\t\tStringBuilder opstore = new StringBuilder(); // stores operator characters\r\n\t\tStringBuilder adder = new StringBuilder(); // stores value characters\r\n\t\tboolean text = false; // whether inside of a string\r\n\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar c = str.charAt(i);\r\n\t\t\tboolean add = (c != '\\\\'); // whether to add the char to adder. ignore escape char\r\n\t\t\tboolean leftSide = (opstore.length() == 0); // whether on the left side of the binary expression (before the operator)\r\n\t\t\tString adderStr = adder.toString();\r\n\t\t\tString opStr = opstore.toString();\r\n\r\n\t\t\tif (c == '\"') { // string\r\n\t\t\t\tif (i == 0 || str.charAt(i - 1) != '\\\\') {\r\n\t\t\t\t\ttext = !text; // ignore string contents\r\n\t\t\t\t}\r\n\t\t\t} else if (!text) {\r\n\t\t\t\tif (c == ' ') {\r\n\t\t\t\t\tadd = false; // ignore spaces\r\n\t\t\t\t} else if (c == '(') { // grouping or function\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tString contents = str.substring(i + 1, closeIndex);\r\n\t\t\t\t\tExpr group; // the expression denoted by the parentheses group\r\n\r\n\t\t\t\t\tif (i > 0 && (!isReserved(str.charAt(i - 1)) || str.charAt(i - 1) == ')')) { // function\r\n\t\t\t\t\t\tif (adderStr.isEmpty()) { // function reference call ... func()()\r\n\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(null, contents); // a reference call is only a parameter group, null name\r\n\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t} else { // function call\r\n\t\t\t\t\t\t\tif (adderStr.startsWith(\".\")) { // function sub call ... func().subfunc()\r\n\t\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t\t} else { // standalone function ... func()\r\n\t\t\t\t\t\t\t\tif (Character.toString(adderStr.charAt(0)).equals(Operator.REF.op)) { // @func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprFuncRef(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\t} else { // func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprCall(adderStr, contents);\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} else { // parenthetical grouping\r\n\t\t\t\t\t\tchar cc = (adderStr.length() == 1 ? adderStr.charAt(0) : 0); // operator before parenthesis ... !()\r\n\t\t\t\t\t\tif (isReserved(cc)) { // operation on the group\r\n\t\t\t\t\t\t\tgroup = new ExprUnary(Operator.get(Character.toString(cc)), parse(contents));\r\n\t\t\t\t\t\t} else { // ignore character, not an operator\r\n\t\t\t\t\t\t\tgroup = parse(contents);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// add to tree\r\n\t\t\t\t\tif (leftSide) at.setLeft(group);\r\n\t\t\t\t\telse at.setRight(group);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (c == '{') { // array initializer ... {}\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tExpr arr = new ExprArray(str.substring(i + 1, closeIndex), adderStr);\r\n\r\n\t\t\t\t\tif (adderStr.length() == 1 && isReserved(adderStr.charAt(0))) {\r\n\t\t\t\t\t\t// unary op done on array initializer ... !{}\r\n\t\t\t\t\t\tarr = new ExprUnary(Operator.get(Character.toString(adderStr.charAt(0))), arr);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (leftSide) at.setLeft(arr);\r\n\t\t\t\t\telse at.setRight(arr);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (isOp(c)) { // operator\r\n\t\t\t\t\t// add value used in operation to tree\r\n\t\t\t\t\tif (!adderStr.isEmpty()) {\r\n\t\t\t\t\t\tif (leftSide) { // ex: adderStr + ___\r\n\t\t\t\t\t\t\tat.setLeft(parseValue(adderStr));\r\n\t\t\t\t\t\t} else { // ex: (___ + adderStr) + ___\r\n\t\t\t\t\t\t\tat.setRight(parseValue(adderStr));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opStr.equals(\"\") || (i > 0 && isOp(str.charAt(i - 1)))) { // accumulate operator from adjacent operator characters (ex: != consists of ! and =)\r\n\t\t\t\t\t\tif (!(adderStr.isEmpty() && (opStr + c).equals(\"-\")) && (Operator.get(opStr + c) != null || (opStr.isEmpty() && isOp(c)))) {// if the operator exists, then it is an operator character\r\n\t\t\t\t\t\t\tif (opStr.equals(\"-\") && c == '-') { // this and the above line handle negatives and double negatives\r\n\t\t\t\t\t\t\t\topStr = \"+\";\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\topStr += c;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // existing operator operation must be added to tree ... in \"(a + b) * c\", \"(a+b)\" must be abstracted-out so we get \"x * c\"\r\n\t\t\t\t\t\tint endIndex = i + 1; // end index of operator\r\n\r\n\t\t\t\t\t\t// get entire operator if operator is more than 1 character long\r\n\t\t\t\t\t\tfor (int i2 = endIndex; i2 < str.length(); i2++) {\r\n\t\t\t\t\t\t\tif (isOp(str.charAt(i2))) endIndex++;\r\n\t\t\t\t\t\t\telse break;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tOperator nextOp = Operator.get(str.substring(i, endIndex)); // second (right-most) operator\r\n\t\t\t\t\t\tat.op = Operator.get(opStr); // first (left-most) operator\r\n\r\n\t\t\t\t\t\t// group values in operation by operator precedence\r\n\t\t\t\t\t\tint p1 = precedence(nextOp); // right-most op\r\n\t\t\t\t\t\tint p2 = precedence(at.op); // left-most op\r\n\r\n\t\t\t\t\t\tif (p1 > p2) { // group around the right-most op\r\n\t\t\t\t\t\t\tExprBinary right = new ExprBinary(at, nextOp);\r\n\t\t\t\t\t\t\tright.setLeft(at.right());\r\n\r\n\t\t\t\t\t\t\tat.setRight(right);\r\n\t\t\t\t\t\t\tat = right;\r\n\r\n\t\t\t\t\t\t} else if (p1 < p2) { // group around the left-most op\r\n\t\t\t\t\t\t\tExprBinary last = at;\r\n\t\t\t\t\t\t\tExprBinary match = at.parent();\r\n\r\n\t\t\t\t\t\t\t// correctly add to the binary tree based on precedence of operators\r\n\t\t\t\t\t\t\twhile (match instanceof ExprBinary && p1 < (p2 = precedence(((ExprBinary) match).op))) {\r\n\t\t\t\t\t\t\t\tlast = match;\r\n\t\t\t\t\t\t\t\tmatch = match.parent();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tExprBinary tr = new ExprBinary(match, nextOp);\r\n\t\t\t\t\t\t\ttr.setLeft(last);\r\n\r\n\t\t\t\t\t\t\tif (match != null) {\r\n\t\t\t\t\t\t\t\tif (last == match.right()) match.setRight(tr);\r\n\t\t\t\t\t\t\t\telse match.setLeft(tr);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tat = tr;\r\n\r\n\t\t\t\t\t\t} else { // group from left to right (equal operator precedence)\r\n\t\t\t\t\t\t\tExprBinary left = new ExprBinary(at, at.op); // group existing values into left node, add right to open right node spot\r\n\t\t\t\t\t\t\tleft.setLeft(at.left());\r\n\t\t\t\t\t\t\tleft.setRight(at.right());\r\n\r\n\t\t\t\t\t\t\tat.op = nextOp;\r\n\t\t\t\t\t\t\tat.setLeft(left);\r\n\t\t\t\t\t\t\tat.setRight(null);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\topStr = nextOp.op;\r\n\t\t\t\t\t\ti = endIndex - 1;\r\n\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// store valid value characters\r\n\t\t\tif (add) {\r\n\t\t\t\tadder.append(c);\r\n\r\n\t\t\t\t// if this is the last character, then add the stored value to the tree.\r\n\t\t\t\t// otherwise, would be incorrectly ignored because there is no next operator\r\n\t\t\t\tif (i + 1 == str.length()) {\r\n\t\t\t\t\tif (opstore.length() == 0) {\r\n\t\t\t\t\t\tat.setLeft(parseValue(adder.toString()));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tat.setRight(parseValue(adder.toString()));\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// initialize binary tree operator if not done so already\r\n\t\tif (at.op == null) {\r\n\t\t\tat.op = Operator.get(opstore.toString());\r\n\t\t}\r\n\r\n\t\t// after traversing the tree to some point, we need to get back to root so we can return the entire tree\r\n\t\twhile (at.parent() != null) {\r\n\t\t\tat = (ExprBinary) at.parent();\r\n\t\t}\r\n\r\n\t\t// the expression may not actually be a binary operation\r\n\t\tif (at.op == null && at.right() == NULL) {\r\n\t\t\tif (at.left() == NULL) return NULL; // the expression is empty\r\n\t\t\treturn at.left(); // the expression is a single value/unary-operation\r\n\t\t}\r\n\r\n\t\treturn at;\r\n\t}",
"@Test\n\tpublic void simple() throws Exception {\n\t\tEvalImpl t = new EvalImpl();\n\t\tassertEquals(3.0, t.eval(\"1 + 2\"), 0d);\n\t}",
"public String eval()\r\n\t{\r\n\t\treturn eval(null, null);\r\n\t}",
"public static String evaluate( String expr ) \n {\n\tString[] arr = expr.split(\"\\\\s+\");\n\tLLStack<String> nums = new LLStack<String>();\n\tLLStack<String> noClose = new LLStack<String>();\n\tint op = 0;\n\n\tfor(String i : arr){ \n\t if(i.equals(\")\")){ //when you reach the closing parenthesis\n\t\tString top = noClose.pop(); //start going through this part of the expression\n\t\tnums.push(i); //add ( to stack for unload\n\t\t\n\t\twhile(!top.equals(\"(\")){ //until you reach the (, where the expression ends\n\t\t\t \n\t\t if(top.equals(\"+\")) op = 1;\n\t\t else if(top.equals(\"-\")) op = 2;\n\t\t else if(top.equals(\"*\")) op = 3;\n\n\t\t else nums.push(top); //if it's not an operand\n\n\t\t top = noClose.pop();\n\t\t}\n\n\t\tnoClose.push(unload(op, nums));\n\t }\n\t \n\t else noClose.push(i); //pushed into a stack of what's in this ()\n \n\t}//end of for loop \n \n\treturn noClose.peek();\n }",
"private static Expr parseValue(String string) {\r\n\t\tif (string.isEmpty()) return null;\r\n\r\n\t\tchar first = string.charAt(0);\r\n\t\tif (first != '\"' && first != '-' && isReserved(first)) {\r\n\t\t\treturn new ExprUnary(Operator.get(Character.toString(first)), new ExprVal(string.substring(1)));\r\n\t\t} else {\r\n\t\t\treturn new ExprVal(string);\r\n\t\t}\r\n\t}",
"static BigInteger evaluate(String input) throws IllegalArgumentException{\n input = input.replace(\" \", \"\");\n\n //2. parsing.\n Matcher m = EXPRESSION_PATTERN.matcher(input);\n if(!m.matches()){//find는 일치하는 게 포함되면 T, matches()는 입력 전체가 일치해야 T.\n new IllegalArgumentException();\n }\n\n //3. extract unary, binary operators.\n bin_oper = m.group(3);\n una_oper1 = m.group(1).equals(\"\") ? \"+\" : m.group(1); //unary default = \"+\"\n una_oper2 = m.group(4).equals(\"\") ? \"+\" : m.group(4);\n\n //4. make operands instances.\n BigInteger num1 = new BigInteger(m.group(2));\n BigInteger num2 = new BigInteger(m.group(5));\n\n //5. binary oper == *, go to mul.\n if (bin_oper.equals(\"*\")) return num1.multiply(num2);\n\n //6. add/sub operator handle\n // By comparing binary and unary2, convert unary2 to \"+\", in order to simplify later calculation.\n if (una_oper2.equals(\"-\")){\n una_oper2 = \"+\";\n bin_oper = bin_oper.equals(\"+\") ? \"-\" : \"+\";\n }\n\n // if right input is not guaranteed, should do exception handling.\n return (una_oper1.equals(bin_oper)) ? num1.add(num2) : num1.subtract(num2);\n }",
"public int evaluate(){\r\n\t\tString value = expressionTree.getValue();\r\n\t\tint result = 0;\r\n\t\tif (isNumber(value)){\r\n\t\t\treturn stringToNumber(value);\r\n\t\t}\r\n\t\tif (value.equals(\"+\")){\r\n\t\t\tresult = 0;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult += (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"*\")){\r\n\t\t\tresult = 1;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult *= (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"-\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() -\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\tif (value.equals(\"/\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() /\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public String eval(final String input) {\n for (TokenMatcher tokenMatcher : matcherList) {\n if (tokenMatcher.matches(input)) {\n return tokenMatcher.eval(input);\n }\n }\n return \"ERROR: Invalid command. \" + usageString();\n }",
"ValueExp parseExpression(String s)\n\t{\n\t\tValueExp expr = null;\n\t\ttry\n\t\t{\n\t\t\texpr = m_exprCache.parse(s);\n\t\t}\n\t\tcatch(ParseException pe)\n\t\t{\n\t\t\t// bad operation code\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"expressionCouldNotBeParsed\") + \" \" + pe.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t}\n\t\tcatch(IOException io)\n\t\t{\n\t\t\t// thrown from parser\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"expressionCouldNotBeParsed\") + \" \" + s); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t}\n\t\treturn expr;\n\t}",
"private static Expression retrieveParseExpression(String expression) {\n return StaticJavaParser.parseExpression(expression);\n }",
"public abstract Object eval();",
"public static Object evaluate( String expression, Map<String, Object> vars )\n {\n Expression exp = JEXL.createExpression( expression );\n \n JexlContext context = vars != null ? new MapContext( vars ) : new MapContext();\n \n return exp.evaluate( context );\n }",
"public double evaluate(String expression) throws InvalidExpressionException {\n assertProperExpression(expression);\n \n // creating postfix\n String postfix = \"\";\n while (expression.length() > 0) {\n char item = expression.charAt(0);\n expression = expression.substring(1);\n // disregard spaces by\n if (item == ' ') continue;\n // add digits straight to postfix expression\n else if (isDigit(item)) postfix += item;\n // always push '(' on stack no matter what\n else if (item == '(') postfixStack.push('(');\n // dump stack until you hit end parenthesis which is voided\n else if (item == ')') {\n while (postfixStack.peek() != '(') {\n postfix += postfixStack.pop();\n }\n postfixStack.pop();\n continue;\n }\n // item must be operator, so push onto stack after removing higher precedents below it\n else if (isOperator(item)) {\n while (!postfixStack.isEmpty() &&\n isOperator(item) &&\n precedenceOf(postfixStack.peek()) >= precedenceOf(item)) postfix += postfixStack.pop();\n postfixStack.push(item);\n }\n }\n while (!postfixStack.isEmpty()) postfix += postfixStack.pop();\n\n // solving the postfix expression \n while (postfix.length() > 0) {\n char item = postfix.charAt(0);\n postfix = postfix.substring(1);\n\n if (isDigit(item)) solutionStack.push((double) (item - '0'));\n if (isOperator(item)) {\n double y = solutionStack.pop();\n double x = solutionStack.pop();\n if (item == '^') solutionStack.push(Math.pow(x, y));\n if (item == '*') solutionStack.push(x * y);\n if (item == '/') solutionStack.push(x / y);\n if (item == '+') solutionStack.push(x + y);\n if (item == '-') solutionStack.push(x - y);\n }\n }\n\n Double solution = solutionStack.pop();\n return solution;\n }",
"public void storeEval(final String expression, final String variableName);",
"public double parse(String inputString){\n\t\tclear();\n\t\tinput = inputString;\n\t\treturn expr(true);\n\t}",
"public static int evaluate(String expression) {\n\n\t\tchar[] tokens = expression.toCharArray();\n\t\t// Stack for numbers: 'values'\n\t\tStack<Integer> values = new Stack<Integer>();\n\t\t// Stack for Operators: 'operators'\n\t\tStack<Character> operators = new Stack<Character>();\n\n\t\tfor (int i = 0; i < tokens.length; i++) {\n\t\t\t// Current token is a whitespace, skip it\n\t\t\tif (tokens[i] == ' ')\n\t\t\t\tcontinue;\n\t\t\t// Current token is a number, push it to stack for numbers\n\t\t\tif (tokens[i] >= '0' && tokens[i] <= '9') {\n\t\t\t\tStringBuffer stringBuffer = new StringBuffer();\n\t\t\t\t// There may be more than one digits in number\n\t\t\t\twhile (i < tokens.length && tokens[i] >= '0' && tokens[i] <= '9') {\n\t\t\t\t\tstringBuffer.append(tokens[i++]);\n\t\t\t\t}\n\t\t\t\tvalues.push(Integer.parseInt(stringBuffer.toString()));\n\t\t\t i--;\n\t\t\t} else if (tokens[i] == '(') {\n\t\t\t // Current token is an opening brace, push it to 'operators'\n\t\t\t\toperators.push(tokens[i]);\n\t\t\t} else if (tokens[i] == ')') {\n\t\t\t // Closing brace encountered, solve entire brace\n\t\t\t\twhile (operators.peek() != '(') {\n\t\t\t\t values.push(applyOperation(operators.pop(), values.pop(), values.pop()));\n\t\t\t }\n\t\t\t\toperators.pop();\n\t\t\t} else if (tokens[i] == '+' || tokens[i] == '-' ||tokens[i] == '*' || tokens[i] == '/') {\n\t\t\t // Current token is an operator.\n\t\t\t\twhile (!operators.empty() && hasPrecedence(tokens[i], operators.peek())) {\n\t\t\t\t values.push(applyOperation(operators.pop(), values.pop(),values.pop()));\n\t\t\t // System.out.println(values.peek());\n\t\t\t }\n\t\t\t\t// Push current token to 'operators'.\n\t\t\t\toperators.push(tokens[i]);\n\t\t\t}\n\t\t}\n\t\t// Entire expression has been parsed at this point, apply remaining operators to remaining values\n\t\twhile (!operators.empty()) {\n\t\t\tvalues.push(applyOperation(operators.pop(), values.pop(), values.pop()));\n\t\t}\n\t\t// Top of 'values' contains result, return it\n\t\treturn values.pop();\n\t}",
"public static int evaluateExpression(String expression) {\r\n // Create operandStack of ints to store operands\r\n Stack<Integer> operandStack = new Stack<>();\r\n \r\n // Create operatorStack of characters to store operators\r\n Stack<Character> operatorStack = new Stack<>();\r\n \r\n // Insert Blanks\r\n expression = insertBlanks(expression);\r\n \r\n // Extract operands and operators by splitting around blanks\r\n String[] tokens = expression.split(\" \");\r\n \r\n /* Phase 1: Scan tokens\r\n Enhanced for loop, puts every element of tokens in token each time\r\n Like writing token = tokens[i] every time\r\n */\r\n for (String token: tokens) { \r\n if(token.length() == 0) // It's a blank\r\n continue; // Go to the while loop\r\n else if (token.charAt(0) == '+' || token.charAt(0) == '-') {\r\n // process all +, -, *, / in the top of the operator stack\r\n while (!operatorStack.isEmpty() && // While stack isn't empty\r\n (operatorStack.peek() == '+' || // and has an operator on top\r\n operatorStack.peek() == '-' || // Like if you had (2 * 3) + 5 \r\n operatorStack.peek() == '*' || // Or if you had (2 - 3) + 5, do that last no matter what b/c +- is lowest priority\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n // After processing the all the previous operations, push the +- operator onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '*' || token.charAt(0) == '/') {\r\n // Proess all *, / in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '*' ||\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the * or / onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '^') {\r\n // Proess all ^ in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the ^ onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if(token.trim().charAt(0) == '(') {\r\n operatorStack.push('(');\r\n } \r\n else if(token.trim().charAt(0) == ')') {\r\n while(operatorStack.peek() != '(') {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n operatorStack.pop(); // pop\r\n }\r\n else {\r\n operandStack.push(new Integer(token));\r\n }\r\n }\r\n // Phase two: process everything left over\r\n while (!operatorStack.isEmpty()) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n return operandStack.pop(); \r\n }",
"public String evaluateExpression(ValueExpression expr,CodeExecutionContext execCtx) throws JavascribeException;",
"public T evaluate(String expr, Map<String, Expression> dataSet) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionBuilder.build(tokens);\n Visitor<T> visitor = new ExpressionVisitor<>(dataSet);\n return visitor.visit(expression);\n }",
"public String evaluate(String expression, String variable) {\n Lexer lex = new Lexer(expression);\n Parser parser = new Parser(lex);\n Expression exp;\n exp = parser.parse();\n String output = differentiate(exp, variable);\n return output;\n \n }",
"Result evaluate();",
"public interface Expression {\n public boolean interpret(String context);\n}",
"public static String parseExecution(String value) throws DefinitionException{\n\t\tMatcher matcher = Pattern.compile(ConfigKey.REGIX_OF_PARSE_EXPRESSION).matcher(value);\n\t\tmatcher.find();\n\t\tString result = matcher.group();\n\t\tif(StringUtils.isNotBlank(result)){\n\t\t\treturn result;\t\n\t\t}else{\n\t\t\tthrow new DefinitionException(\"expression format error\");\n\t\t}\n\t}",
"@Test\n public void test01(){\n Object result = FelEngine.instance.eval(\"5000*12+7500\");\n System.out.println(result);\n }",
"Expr expr();",
"@Override\r\n\tpublic int evaluate(String expression) {\r\n\t\tString e =expression;\r\n\t\tfloat result=0; //the returned result \r\n\t\tif(e.length()==2) {\r\n\t\t\te = removespaces(e);\r\n\t\t\tint z =Integer.parseInt(e);\r\n\t\t\treturn z;\r\n\t\t}\r\n\t\tfor(int i =0 ;i<expression.length();i++){\r\n\t\t\tif(Character.isLetter(e.charAt(i))){\r\n\t\t\t\tthrow new RuntimeException(\"You Can't evaluate letters\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i =0 ;i<expression.length()-1;i++) {\r\n\t\t\twhile(e.charAt(i) != '+' &&e.charAt(i) != '/' &&e.charAt(i) != '-' &&e.charAt(i) != '*' ) {\r\n\t\t\t\tint j = 0;\r\n\t\t\t\twhile(e.charAt(i) != ' ' ) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\tif(j>0) {\r\n\t\t\t\t\tString k = e.substring(i-j, i);\r\n\t\t\t\t\tk = removespaces(k);\r\n\t\t\t\t\tfloat z = Integer.parseInt(k);\r\n\t\t\t\t\topr.push(z);}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tif(e.charAt(i)== '+') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result + x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i)== '*') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result * x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i)== '-') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result - x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i)== '/') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result / x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn (int)result;\r\n\r\n\t}",
"public interface Expression {\n public boolean interpret(String context);\n}",
"public interface Expression {\n public boolean interpret(String context);\n}",
"double eval();",
"public static int calculator(String expression) {\n int res = 0;\n char[] arr = expression.toCharArray();\n Integer operand = null;\n char operator = '+';\n int[] index = new int[1];\n for (int i = 0; i < arr.length; i++) {\n index[0] = i;\n if (!Character.isDigit(arr[i])) {\n operator = arr[i];\n } else {\n operand = getOperand(arr, index);\n i = index[0] - 1;\n if (operator == '+') {\n res = res + operand;\n } else if (operator == '-') {\n res = res - operand;\n }\n }\n }\n return res;\n }",
"@GetMapping(\"/evaluate\")\n public ResponseEntity<?> evaluateSimpleExpression(@RequestParam(\"expression\") String expression) {\n try {\n double result = Interpreter.evaluate(expression);\n return new ResponseEntity<>(result,HttpStatus.OK);\n } catch (SyntaxError | IllegalArgumentException e) {\n return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST);\n }\n }",
"@Test\n\tpublic void testExpression() throws ParseException {\n\t\tExpression expression = langParser(\"a\").expression();\n\t\tassertEquals(expression.getClass(), Identifier.class);\n\t\texpression = langParser(\"a()\").expression();\n\t\tassertEquals(expression.getClass(), FunctionCall.class);\n\t\texpression = langParser(\"a.b\").expression();\n\t\tassertEquals(expression.getClass(), MemberAccess.class);\n\t\texpression = langParser(\"1\").expression();\n\t\tassertEquals(expression.getClass(), LongLiteral.class);\n\t\texpression = langParser(\"1.1\").expression();\n\t\tassertEquals(expression.getClass(), DoubleLiteral.class);\n\t\texpression = langParser(\"if(a,b,c)\").expression();\n\t\tassertEquals(expression.getClass(), TernaryIf.class);\n\t}",
"public interface Expression {\n\t\n\t/**\n\t * Evaluates an arithmetic expression.\n\t * \n\t * @return the value to which this expression evaluates\n\t */\n\tdouble eval();\n\t\n\t/**\n\t * Creates a String representation of an arithmetic expression.\n\t * \n\t * @return this expression in standard form, suitable for inclusion\n\t * in a program or text document (e.g., \"(2 - 4 * (7 + 2))\"). Note\n\t * that the string can have \"unnecessary\" parentheses as this (toy)\n\t * system does not know about operator precedence. \n\t */\n\tString toString();\n\n}",
"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 }",
"private double getEval(String [] strarr){\r\n\t\t\tint size = strarr.length;\r\n\t\t\tdouble result = Double.parseDouble(strarr[0]);\r\n\t\t\tint i=0;\r\n\t\t\tdouble num2;\r\n\t\t\tchar op;\r\n\t\t\twhile(i<size-1){\r\n\t\t\t\top = strarr[i+1].charAt(0);\r\n\t\t\t\tnum2 = Double.parseDouble(strarr[i+1].substring(1));\r\n\t\t\t\tresult = operation(op, result, num2);\r\n\t\t\t\ti++;\r\n\t\t\t}return result;\r\n\t\t}",
"public interface Expression {\n boolean interpret(String info);\n}",
"@Test\n\t\tpublic void testExpression() throws LexicalException, SyntaxException {\n\t\t\tString input = \"x + 2\";\n\t\t\tPLPParser parser = makeParser(input);\n\t\t\tExpression e = parser.expression(); //call expression here instead of parse\n\t\t\tshow(e);\t\n\t\t\tassertEquals(ExpressionBinary.class, e.getClass());\n\t\t\tExpressionBinary b = (ExpressionBinary)e;\n\t\t\tassertEquals(ExpressionIdentifier.class, b.leftExpression.getClass());//\n\t\t\tExpressionIdentifier left = (ExpressionIdentifier)b.leftExpression;\n\t\t\tassertEquals(\"x\", left.name);\n\t\t\tassertEquals(ExpressionIntegerLiteral.class, b.rightExpression.getClass());\n\t\t\tExpressionIntegerLiteral right = (ExpressionIntegerLiteral)b.rightExpression;\n\t\t\tassertEquals(2, right.value);\n\t\t\tassertEquals(OP_PLUS, b.op);\n\t\t}",
"public static Expression parse(String input) {\n \n try {\n Parser<ExpressivoGrammar> parser = GrammarCompiler.compile(\n new File(\"src/expressivo/Expression.g\"), ExpressivoGrammar.ROOT);\n ParseTree<ExpressivoGrammar> concreteSymbolTree = parser.parse(input);\n \n// tree.display();\n \n return buildAST(concreteSymbolTree);\n \n }\n \n catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"Can't parse the expression...\");\n }\n catch (IOException e) {\n System.out.println(\"Cannot open file Expression.g\");\n throw new RuntimeException(\"Can't open the file with grammar...\");\n }\n }",
"public MathObject evaluate(Function input);",
"public static int Evaluate(String post){\n\t\tObjectStack postfix =new ObjectStack();\n\t\t\n\t\tfor (int i = 0; i < post.length(); i++) {\n\t\t\tchar ch = post.charAt(i);\n\t\t\tif (ch >= '0' && ch <= '9') {\n\t\t\t\tint number = ch - '0';\n\t\t\t\tpostfix.push(number);\n\t\t\t} else if ((ch == '*' || ch == '/' || ch == '+' || ch == '-' || ch == '^')) {\n\t\t\t\tint top2 = (Integer) postfix.pop();\n\t\t\t\tint top1 = (Integer) postfix.pop();\n\t\t\t\tchar operator = ch;\n\t\t\t\tif (operator == '+')\n\t\t\t\t\tpostfix.push(top1 + top2);\n\t\t\t\telse if (operator == '-')\n\t\t\t\t\tpostfix.push(top1 - top2);\n\t\t\t\telse if (operator == '*')\n\t\t\t\t\tpostfix.push(top1 * top2);\n\t\t\t\telse if (operator == '/')\n\t\t\t\t\tpostfix.push(top1 / top2);\n\t\t\t\telse if (operator == '^')\n\t\t\t\t\tpostfix.push((int) Math.pow(top1, top2));\n\t\t\t}\n\t\t}\n\t\treturn (Integer) postfix.pop();\n\t\n}",
"private double _evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n return _evaluate(exp,0,(exp.length()-1));\r\n }",
"public int calculate(String s) {\n Deque<Integer> stack = new ArrayDeque<>();\n\n // Init\n int result = 0; // For the on-going result\n int sign = 1; // 1 means positive, -1 means negative\n int operand = 0;\n\n // 1 + 2 + 1\n // The tricky part is that we find an operator/sign first, then we know\n // the operand after that. We save the sign first, and when we evaluate the\n // expression so far, we use that sign.\n\n // Go through the expression string character by character.\n // Evaluate to the left when we find '+', '-', ')', or end of loop.\n // We use a stack when we find parenthesis.\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (Character.isDigit(c)) {\n // Form operand, since it could be more than one digit.\n operand = 10 * operand + (c - '0');\n } else if (c == '+') {\n // We can evaluate the expression to the left,\n // with result, sign, operand\n result += sign * operand;\n // Save the recently encountered '+' sign\n sign = 1;\n // Reset operand\n operand = 0;\n } else if (c == '-') {\n // We can evaluate the expression to the left,\n result += sign * operand;\n // Save the '-' sign.\n sign = -1;\n operand = 0;\n } else if (c == '(') {\n // Push the result so far and sign onto the stack, for later use.\n // We push the result first, then sign in the stack.\n stack.push(result);\n stack.push(sign);\n // Reset result, sign, and operand, as if new evaluation begins for the new\n // sub-expression\n result = 0;\n sign = 1;\n operand = 0;\n } else if (c == ')') {\n // We can evaluate the sub-expression to the left.\n result += sign * operand;\n // Now that we know the sub-expression ended, we can also evaluate to the left.\n // First we take the sign out of the stack, and then add the result we saved\n // before to the result of the sub-expression.\n result *= stack.pop();\n result += stack.pop();\n // Reset sign and operand.\n sign = 1;\n operand = 0;\n }\n }\n\n // We need to evaluate again.\n result += sign * operand;\n\n return result;\n }",
"public ExpressionSolver(String s)\n\t{\n\t\tString[] ray = s.split(\" \");\n\t\tList<String> list = Arrays.asList(ray);\n\t\tfor (int i = 0; i < list.size()-1; i++) {\n\t\t\tif ( ray[i] == \"*\") {\n\t\t\t\tlist.remove(i + 1);\n\t\t\t\tlist.remove(i - 1);\n\t\t\t\tlist.set(i,Integer.parseInt(list.get(i-1)) * Integer.parseInt(list.get(i+1)) );\n\t\t\t}\n\t\t\tif ( ray[i] == \"/\") {\n\t\t\t\tlist.remove(i + 1);\n\t\t\t\tlist.remove(i - 1);\n\t\t\t\tlist.set(i,Integer.parseInt(list.get(i-1)) * Integer.parseInt(list.get(i+1)) );\n\t\t\t}\n\t\t}\n\t\tfor (int j = 0; j < list.size()-1; j++) {\n\t\t\tif (ray[j] == \"+\") {\n\t\t\t\tlist.remove(j + 1);\n\t\t\t\tlist.remove(j - 1);\n\t\t\t\tlist.set(j,Integer.parseInt(list.get(j-1)) * Integer.parseInt(list.get(j+1)) );\n\t\t\t}\n\t\t\tif ( ray[j] == \"-\") {\n\t\t\t\tlist.remove(j + 1);\n\t\t\t\tlist.remove(j - 1);\n\t\t\t\tlist.set(j,Integer.parseInt(list.get(j-1)) * Integer.parseInt(list.get(j+1)) );\n\t\t\t}\n\t\t}\n\t}",
"public interface IExpressionRuntime\n{\n Object evaluate();\n}",
"default Value eval(String script) throws Exception {\n return eval(script, false);\n }",
"public static Expression parse(String exp) {\n\t\texp = exp.replace(\" \", \"\");\r\n\t\tchar[] cs = exp.toCharArray();\r\n\t\tint i = 0;\r\n\t\twhile (i < cs.length && !Operator.validOp(cs[i])) {\r\n\t\t\t++i;\r\n\t\t}\r\n\t\tif (i == cs.length)\r\n\t\t\treturn new Expression(Token.parse(exp));\r\n\t\telse {\r\n\t\t\t//to preserve order of operations here, flip order accordingly\r\n\t\t\t//if the operator is * or /\r\n\t\t\treturn new Expression(\r\n\t\t\t\t\tExpression.parse(exp.substring(0,i)),\r\n\t\t\t\t\t(Operator)Token.parse(cs[i]),\r\n\t\t\t\t\tExpression.parse(exp.substring(i+1, exp.length()))\r\n\t\t\t);\r\n\t\t}\r\n\t}",
"public static int resolve(String expr) {\n //字符串判空不能用\"==\"\n if (expr.equals(\"\") || expr == null)\n return -1;\n expr = expr.replaceAll(\" \", \"\");\n int N = expr.length();\n Stack <Integer> stack = new Stack <Integer>();\n char c1;\n int tmp1, tmp2;\n for (int i = 0; i < N; i++) {\n c1 = expr.charAt(i);\n if (c1 != '^' && c1 != '+' && c1 != '*') {\n stack.push((int) (c1 - '0'));\n if (stack.size() > 16)\n return -2;\n } else {\n switch (c1) {\n case '^':\n if (stack.isEmpty())\n return -1;\n int tmp = stack.pop();\n stack.push(++tmp);\n break;\n case '+':\n if (stack.isEmpty())\n return -1;\n tmp1 = stack.pop();\n if (stack.isEmpty())\n return -1;\n tmp2 = stack.pop();\n stack.push(tmp1 + tmp2);\n break;\n case '*':\n if (stack.isEmpty())\n return -1;\n tmp1 = stack.pop();\n if (stack.isEmpty())\n return -1;\n tmp2 = stack.pop();\n stack.push(tmp1 * tmp2);\n break;\n }\n }\n }\n return stack.pop();\n }",
"boolean evaluate(E input);",
"private void testExpression(ASTExpression exp, ASTTerm expectedResult) {\n System.out.print(\"eval[\" + exp + \"] = \");\n ASTTerm result = null;\n try {\n result = interpreter.evaluate(exp);\n } catch (Exception e) {\n fail(e.getMessage());\n }\n System.out.println(result);\n\n assertEquals(expectedResult, result);\n }",
"public double evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n isConstant=true;\r\n return _evaluate(exp);\r\n }",
"JavaEvaluator createJavaEvaluator();",
"public static int exp(String str) {\n\t\tif(str == null || str.length() == 0) return -1;\n\t\t\n\t\tSet<Character> set = new HashSet();\n\t\tset.add('+');\n\t\tset.add('-');\n\t\tset.add('*');\n\t\tset.add('/');\n\t\t\n\t\tStack<Integer> operands = new Stack();\n\t\tStack<Character> operators = new Stack();\n\t\t\n\t\tint current = 0;\n\t\tfor(char c : str.toCharArray()) {\n\t\t\tif( c >= '0' && c <= '9') {\n\t\t\t\toperands.push(Integer.valueOf(c));\n\t\t\t}\n\t\t\telse if(c == '(') {\n\t\t\t\toperands.push(current);\n\t\t\t\tcurrent = 0;\n\t\t\t} else if (set.contains(c)) {\n\t\t\t\toperators.push(c);\n\t\t\t} else if( c == ')') {\n\t\t\t\t\n\t\t\t\tif(!operators.isEmpty()) {\n\t\t\t\t\tchar op = operators.pop();\n\t\t\t\t\tif(op == '+') {\n\t\t\t\t\t\tcurrent += operands.pop();\n\t\t\t\t\t\tcurrent += operands.pop();\n\t\t\t\t\t\t\n\t\t\t\t\t} else if(op == '-') {\n\t\t\t\t\t\tcurrent -= operands.pop();\n\t\t\t\t\t\tcurrent -= operands.pop();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\toperands.push(current);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn current;\n\t}",
"public static Object getValue(String expression, Object root)\n throws OgnlException {\n return getValue(expression, root, null);\n }",
"public static String parseAndExecute(String input)\n { int executeReturned;\n String[] tokens = input.split(\" \");\n try {\n \t execute(tokens);\n \tif (execute(tokens) == Integer.MIN_VALUE) {\n \t\treturn \"quit\";\n \t}\n \telse if(execute(tokens) == (int)(execute(tokens))) {\n \t\treturn String.format(\"The result is: %d\", execute(tokens));\n \t}\n \t\n \n }\n \tcatch (ArithmeticException e) {\n \t\treturn \"Attempted to divide by 0. Please try again.\";\n \t}\n \tcatch (NumberFormatException e) {\n \t\treturn \"Input number cannot be parsed to an int. Please try again.\";\n \t}\n \tcatch (CalculatorException e) {\n \t\treturn String.format(\"Calculator Exception, message is: %s\", e.getMessage());\n \t}\n return \"\";\n }",
"public interface Evaluator\n{\n /**\n * Return true if the given object is valid as an expression to\n * the evaluator. If an object is a valid expression, then the\n * evaluator is, in general, able to <code>eval()</code> it into\n * a result (or at least reasonably attempt to do so).\n *\n * @param value the value to check\n * @return true if it is valid as an expression, false if not\n */\n public boolean isExpression (Object value);\n\n /**\n * Return true if the given object is a possible result of evaluation.\n * If this returns true, then it is conceivable that the given object\n * was the result of a call to <code>eval()</code> on this evaluator.\n *\n * @param value the value to check\n * @return true if it is a possible result, false if not\n */\n public boolean isResult (Object value);\n\n /**\n * Evaluate the given value as an expression, yielding some result\n * value.\n *\n * @param expression the thing to evaluate\n * @return the result of evaluation\n */\n public Object eval (Object expression);\n}",
"private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }",
"@Override\r\n \tpublic int evaluate(final String expression) {\n \t\tif (expression.isEmpty()) {\r\n \t\t\tthrow new RuntimeException();\r\n \t\t}\r\n \t\tObject v, f;\r\n \t\tfloat k;\r\n \t\tfor (int i = 0; i < expression.length(); i++) {\r\n \t\t\t\tif (expression.charAt(i) == '/') {\r\n \t\t\t\t\tif (s.size() >= 2) {\r\n \t\t\t\t\t\tf = s.pop();\r\n \t\t\t\t\t\tv = s.pop();\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tthrow new RuntimeException();\r\n \t\t\t\t\t}\r\n \t\t\t\t k = (Float.valueOf(\r\n \t\t\t\t\t\tString.valueOf(v))\r\n \t\t\t\t\t\t/ (Float.valueOf(\r\n \t\t\t\t\t\t String.valueOf(f))));\r\n \t\t\t\ts.push(k);\r\n \t\t\t\t} else if (expression.charAt(i) == '*') {\r\n \t\t\t\t\tif (s.size() >= 2) {\r\n \t\t\t\t\t\tf = s.pop();\r\n \t\t\t\t\t\tv = s.pop();\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tthrow new RuntimeException();\r\n \t\t\t\t\t}\r\n \t\t\t\t k = (Float.valueOf(\r\n \t\t\t\t\t\t\tString.valueOf(v))\r\n \t\t\t\t\t\t\t* (Float.valueOf(\r\n \t\t\t\t\t\t\t String.valueOf(f))));\r\n \t\t\t\t\ts.push(k);\r\n \t\t\t\t\t} else if (\r\n \t\t\t\t\t\texpression.charAt(i) == '+') {\r\n \t\t\t\t\t\tif (s.size() >= 2) {\r\n \t \t\t\t\t\t\tf = s.pop();\r\n \t \t\t\t\t\t\tv = s.pop();\r\n \t \t\t\t\t\t} else {\r\n \t \t\t\t\t throw new RuntimeException();\r\n \t \t\t\t\t\t}\r\n \t\t\t\t k = (Float.valueOf(\r\n \t\t\t\t\t\t\tString.valueOf(v))\r\n \t\t\t\t\t\t\t+ (Float.valueOf(\r\n \t\t\t\t\t\t\t String.valueOf(f))));\r\n \t\t\t\t\ts.push(k);\r\n \t\t\t\t\t} else if (\r\n \t\t\t\t\texpression.charAt(i) == '-') {\r\n \t\t\t\t\t\tif (s.size() >= 2) {\r\n \t \t\t\t\t\t\tf = s.pop();\r\n \t \t\t\t\t\t\tv = s.pop();\r\n \t \t\t\t\t\t} else {\r\n \t \t\t\t \t throw new RuntimeException();\r\n \t \t\t\t\t\t}\r\n \t\t\t\t\t k = (Float.valueOf(\r\n \t\t\t\t\t\t\tString.valueOf(v))\r\n \t\t\t\t\t\t\t- (Float.valueOf(\r\n \t\t\t\t\t\t\t String.valueOf(f))));\r\n \t\t\t\t\ts.push(k);\r\n \t\t\t\t\t} else {\r\n \t\t\t\tif (expression.charAt(i) != ' ') {\r\n \t\t\t\t\tint r = 0;\r\n \t\t\t\t\tr += Integer.valueOf(\r\n \t\t\t\t\t\tString.valueOf(\r\n \t\t\t\t\t\texpression.charAt(i)));\r\n \t\t\t\t\twhile (\r\n \t\t\t\t\texpression.charAt(i + 1) != ' ') {\r\n \t\t\t\t\t\ti++;\r\n \t\t\t\t\t\tr *= magic10;\r\n \t\t\t\t\t\tr += Integer.valueOf(\r\n \t\t\t\t\t\t\tString.valueOf(\r\n \t\t\t\t\t\t\texpression.charAt(i)));\r\n \t\t\t\t\t}\r\n \t\t\t\ts.push(r);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n if (s.size() == 0) {\r\n \t\t\tthrow new RuntimeException();\r\n \t\t}\r\n \t\tfloat h = Float.parseFloat((String.valueOf(s.pop())));\r\n \t\tif (!s.isEmpty()) {\r\n \t\t\treturn 0;\r\n \t\t}\r\n \t\treturn (int) h;\r\n \t}",
"public String evaluate(ArrayList<String> expression)\n {\n Stack<String> Values = new Stack<String>(), Operations = new Stack<String>();\n\n for (int i = 0; i < expression.size(); i++)\n\t\t{\n\t\t\tif (expression.get(i).equals(\"(\"))\n Operations.push(expression.get(i));\n else if (expression.get(i).equals(\")\"))\n {\n while (Operations.peek().equals(\"(\"))\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n Operations.pop();\n }\n else if (expression.get(i).equals(\"+\") || expression.get(i).equals(\"-\") || expression.get(i).equals(\"*\") || expression.get(i).equals(\"/\"))\n {\n while (!Operations.empty() && precedence(expression.get(i), Operations.peek()))\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n Operations.push(expression.get(i));\n }\n\t\t\telse\n\t\t\t{\n\t\t\t\tValues.push(expression.get(i));\n\t\t\t}\n }\n while (!Operations.empty())\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n return Values.pop();\n }",
"public int calculate(String s) {\n final int len = s.length();\n final List<Object> notations = new ArrayList<>();\n final Stack<Operator> operatorStack = new Stack<>();\n for (int i = 0; i < len; i++) {\n final char ch = s.charAt(i);\n\n // case1: AS Space\n if (ch == SPACE) continue;\n \n // case2: AS operator\n Operator operator = Operator.parse(ch);\n if (operator != null) {\n while (!operatorStack.isEmpty() && operatorStack.peek().priority >= operator.priority) {\n notations.add(operatorStack.pop());\n }\n operatorStack.add(operator);\n continue;\n }\n\n // case3: AS integer\n int num = ch - '0';\n\n while (i + 1 < len && isDigit(s.charAt(i + 1))) {\n i++;\n num = num * 10 + (s.charAt(i) - '0');\n }\n notations.add(num);\n }\n // \n while (!operatorStack.isEmpty()) notations.add(operatorStack.pop());\n\n final Stack<CalculateFrame> stack = new Stack<>();\n Integer result = 0;\n for (int i = notations.size() - 1; i >= 0; i--) {\n final Object obj = notations.get(i);\n\n if (obj instanceof Operator) {\n stack.add(new CalculateFrame((Operator)obj));\n } else {\n result = (Integer)obj;\n \n\n while (!stack.isEmpty()) {\n stack.peek().setArg(result);\n if (!stack.peek().canCalculate()) break;\n\n result = stack.pop().calculate();\n }\n }\n }\n\n return result;\n }",
"public Expression makeExpression(String input) {\n\t\tmyInput = input;\n\t\tmyCurrentPosition = 0; // NEW LINE\n\t\tExpression result = parseExpression(new HashMap<String, Expression>());\n\t\tskipWhiteSpace();\n\t\tif (notAtEndOfString()) {\n\t\t\tthrow new ParserException(\n\t\t\t\t\t\"Unexpected characters at end of the string: \"\n\t\t\t\t\t\t\t+ myInput.substring(myCurrentPosition),\n\t\t\t\t\tParserException.Type.EXTRA_CHARACTERS);\n\t\t}\n\t\treturn result;\n\t}",
"private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }",
"public CompletableFuture<Object> eval(final String script) {\n return eval(script, null, new SimpleBindings());\n }",
"public int evalPostfix(String exp) \n { \n exp = exp.replaceAll(\"\\\\s\", \"\");\n \n if (exp == \"**Invalid Expression**\")\n return 0;\n // Scan all characters one by one \n for(int i=0;i<exp.length();i++) \n { \n char c=exp.charAt(i); \n \n // If the scanned character is an operand (number here), \n // push it to the stack. \n if(Character.isDigit(c)) \n finalStack.push(c - '0'); \n \n // If the scanned character is an operator, pop two \n // elements from stack apply the operator \n else\n { \n try{\n int val1 = (int) finalStack.pop(); \n int val2 = (int) finalStack.pop(); \n\n switch(c) \n { \n case '+': \n finalStack.push(val2+val1); \n break; \n\n case '-': \n finalStack.push(val2- val1); \n break; \n\n case '/': \n finalStack.push(val2/val1); \n break; \n\n case '*': \n finalStack.push(val2*val1); \n break;\n\n case '%':\n finalStack.push(val2%val1);\n break;\n } \n }\n catch(NullPointerException nullException){\n postfixExp = \"**Invalid Expression**\";\n throw nullException;\n \n }\n } \n } \n return (int) finalStack.pop(); \n }",
"public Const evaluate();",
"private IMathExpr parseMathElement(String expr)\r\n throws InvalidMathExprException {\r\n try {\r\n double val = Double.parseDouble(expr);\r\n \r\n return new MathExprConst(val);\r\n } catch (NumberFormatException ex) {\r\n throw new InvalidMathExprException(\"Invalid syntax, \"\r\n + \"unknown character: \" + expr);\r\n }\r\n }",
"public int eval(String expression) {\n String token;\n // The 3rd argument is true to indicate that the delimiters should be used\n // as tokens, too. \n this.tokenizer = new StringTokenizer(expression, DELIMITERS, true);\n\n //initialized with # operator, used as bogus to compare priorities and detect end of operatorStack.\n operatorStack.push(new PoundOperator());\n\n //Checks whether there are more tokens to be pushed in stacks\n while (this.tokenizer.hasMoreTokens()) {\n // filter out spaces\n if (!(token = this.tokenizer.nextToken()).equals(\" \")) {\n // check if token is an operand\n if (Operand.check(token)) {\n operandStack.push(new Operand(token));\n\n } else {\n if (!Operator.check(token)) {\n System.out.println(\"*****invalid token******\");\n System.exit(1);\n }\n\n //Gets a newOperator it matches from hashmap.\n Operator newOperator = Operator.getToken(token);\n\n //Processes only, when there is greater priority in stack and there are no '('\n while (operatorStack.peek().priority() >= newOperator.priority() && !newOperator.equals(Operator.getToken(\"(\"))) {\n\n //If the token read is ), then there is already '(' which is inserted in the operator stack.\n if (token.equals(\")\")) {\n //Perform until, the '(' is on top of the stack.\n while (!operatorStack.peek().equals(Operator.getToken(\"(\"))) {\n Operator oldOpr = operatorStack.pop();\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n\n }\n\n //If '(' found on top, pop and break, to continue to read more takens\n if (operatorStack.peek().equals(Operator.getToken(\"(\"))) {\n operatorStack.pop();\n break;\n }\n\n } \n //if ')' not found, it means either its in '(' or there are no parenthesis\n else {\n Operator oldOpr = operatorStack.pop();\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n }\n }\n //Pushes the operator, when the operator!=')'\n if (!newOperator.equals(Operator.getToken(\")\"))) {\n operatorStack.push(newOperator);\n }\n }\n }\n }\n // No more tokens to be read. All the tokens are in stacks, gets processed.\n if (!this.tokenizer.hasMoreTokens()) {\n //Keeps processing, until it reaches #\n while (operatorStack.size() != 1) {\n Operator oldOpr = operatorStack.pop();\n //Checks if there are operand left to be used,\n if (!operandStack.empty()) {\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n } else {\n System.exit(1);\n }\n }\n }\n // Returns, the final result\n return operandStack.pop().getValue();\n }",
"public String solveExpression(String expression) {\n Calculator calculator = new Calculator();\n ExpressionRootFinder rootFinder = new ExpressionRootFinder();\n if (rootFinder.isExpressionContainsInnerExpressions(expression)) {\n while (rootFinder.isExpressionContainsInnerExpressions(expression)) {\n String rootExpression = rootFinder.findRoot(expression);\n expression = expression.replace(\"(\" + rootExpression + \")\",\n calculator.calculate(rootExpression) + \"\");\n }\n String result = calculator.calculate(expression) + \"\";\n LOGGER.info(\"A complex expression was solved. Expression: \" + expression + \" Result: \" + result);\n return result;\n } else {\n String result = calculator.calculate(expression) + \"\";\n LOGGER.info(\"A simple expression was solved. Expression: \" + expression + \" Result: \" + result);\n return result;\n }\n }",
"public static String eval(final String valueToEval, String strategy, Object controller)\n throws ScriptException {\n Bindings bindings = new SimpleBindings();\n bindings.put(\"controller\", controller);\n\n Object res = null;\n if (\"eval_reader\".equals(strategy)) {\n Reader reader = new StringReader(valueToEval);\n res = groovyEngine.eval(reader, bindings);\n } else if (\"compile\".equals(strategy)) {\n // we're doing it with groovy, but could have used another language like js\n CompiledScript script = ((Compilable) groovyEngine).compile(valueToEval);\n\n res = script.eval(bindings);\n } else if (\"error\".equals(strategy)) {\n groovyEngine.eval(new ErrorReader());\n } else { // eval_string\n res = groovyEngine.eval(valueToEval, bindings);\n }\n\n return (res != null) ? res.toString() : \"(null)\";\n }",
"public String evaluate(Node root){\n\t\tObject[] args;\n\t\tClass[] types;\n\t\tint i= 0;\n\t\tNode nxt;\n\t\tString fun;\n\t\tfun = root.getValue();\n\t\tClass c=null;\n\t\t\n\t\tLinkedList<Node> children = root.getChildren();\n\n\t\tIterator<Node> iter = children.listIterator();\n\t\tif (!iter.hasNext()){\n\t\t\treturn fun;\n\t\t}\n\t\ttypes= new Class[children.size()];\n\t\targs = new Object[children.size()];\n\t\t\n\t\t//populates types[] for getmethod and args[] for invoke\n\t\twhile (iter.hasNext()) {\n\t\t\tnxt = iter.next();\n\t\t\tfun = evaluate(nxt);\n\t\t\tswitch ( root.getReturnType()[i+1] & 0b1111 ) {\n\t\t\t\t//the argument should be a string\n\t\t\t\tcase STRING:\n\t\t\t\t\tc=String.class;\n\t\t\t\t\targs[i]=fun.replace(\"\\\"\",\"\");\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be a float primitive\n\t\t\t\tcase FLOAT:\n\t\t\t\t\tc=float.class;\n\t\t\t\t\targs[i]=new Float(Float.parseFloat(fun));\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be a int primitive\n\t\t\t\tcase INTEGER:\n\t\t\t\t\tc=int.class;\n\t\t\t\t\targs[i]=new Integer(Integer.parseInt(fun));\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be a Float class\n\t\t\t\tcase BIGFLOAT:\n\t\t\t\t\tc=Float.class;\n\t\t\t\t\targs[i]=new Float(Float.parseFloat(fun));\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be an Integer class\n\t\t\t\tcase BIGINTEGER:\n\t\t\t\t\tc=Integer.class;\n\t\t\t\t\targs[i]=new Integer(Integer.parseInt(fun));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\n\t\t\ttypes[i]=c;\n\t\t\ti ++;\n\t\t\t\n\t\t}\n\t\tfun = root.getValue();\n\t\t\n\t\ttry {\n\t\t\t//get the method at this node and apply it to the evaluation of its children\n\t\t\tfun = \"\" + coms.getMethod(fun, types).invoke(coms, args);\n\t\t}catch (Exception e){\n\t\t\t//this will never ever happen\n\t\t}\n\t\t\n\t\treturn fun;\n\t}",
"public Stmt createEval(Expr expr) {\n return xnf.Eval(expr.position(), expr);\n }",
"public static Object parseExpression(String expression) throws OgnlException{\n final Integer currentExpressionMaxLength = Ognl.expressionMaxLength; // Limit access to the volatile variable to a single operation\n if (currentExpressionMaxLength != null && expression != null && expression.length() > currentExpressionMaxLength){\n throw new OgnlException(\n \"Parsing blocked due to security reasons!\",\n new SecurityException(\"This expression exceeded maximum allowed length: \" + expression));\n }\n try{\n OgnlParser parser = new OgnlParser(new StringReader(expression));\n return parser.topLevelExpression();\n }catch (ParseException e){\n throw new ExpressionSyntaxException(expression, e);\n }catch (TokenMgrError e){\n throw new ExpressionSyntaxException(expression, e);\n }\n }",
"public String solve(String postfixExp) {\n Stack<String> stack = new Stack<String>();\n char ch;\n int inputLength = postfixExp.length();\n\n for (int i = 0; i < inputLength; i++) {\n ch = postfixExp.charAt(i);\n\n if (ch == ' ') {\n // Do nothing, space found.\n }\n else if (isOperand(ch)) {\n int n = 0; // This will eventually hold our final value.\n\n while (isOperand(ch)) {\n n = (n * 10) + (int) (ch - '0');\n i++;\n ch = postfixExp.charAt(i);\n }\n i--;\n\n stack.push(Integer.toString(n));\n }\n else {\n double tempOne = Double.parseDouble(stack.pop());\n double tempTwo = Double.parseDouble(stack.pop());\n\n switch (ch) {\n case '+':\n stack.push(Double.toString(tempTwo + tempOne));\n break;\n case '-':\n stack.push(Double.toString(tempTwo - tempOne));\n break;\n case '*':\n stack.push(Double.toString(tempTwo * tempOne));\n break;\n case '/':\n if (tempOne == 0) {\n return \"Error: Division by 0\";\n } else {\n stack.push(Double.toString(tempTwo / tempOne));\n }\n break;\n case '^':\n double temp3 = (double)(Math.pow(tempTwo, tempOne));\n stack.push(Double.toString(temp3));\n break;\n }\n }\n }\n\n String evaluation = stack.pop();\n\n return evaluation;\n }"
] | [
"0.8094519",
"0.80332166",
"0.7370714",
"0.7258161",
"0.71265465",
"0.7119661",
"0.69229203",
"0.6793151",
"0.66666067",
"0.6643055",
"0.6608248",
"0.653355",
"0.64978844",
"0.64638615",
"0.64182574",
"0.63820374",
"0.6335233",
"0.6334831",
"0.632251",
"0.63033515",
"0.6292925",
"0.6276321",
"0.6271069",
"0.6254651",
"0.6226898",
"0.6202315",
"0.6175835",
"0.6155524",
"0.6150363",
"0.61218387",
"0.6050541",
"0.6028336",
"0.6025079",
"0.6021094",
"0.6009765",
"0.60095495",
"0.59893227",
"0.59764206",
"0.59678745",
"0.5942004",
"0.5917077",
"0.59022576",
"0.58923846",
"0.5881072",
"0.5872813",
"0.5868987",
"0.5861455",
"0.58584815",
"0.58560705",
"0.5851937",
"0.58356214",
"0.5828839",
"0.5810201",
"0.58094525",
"0.58018124",
"0.58018124",
"0.57735413",
"0.57607424",
"0.5755662",
"0.5754869",
"0.5740774",
"0.57277",
"0.57081366",
"0.5662562",
"0.56560373",
"0.5643593",
"0.56420887",
"0.56200624",
"0.56092125",
"0.5599639",
"0.5591718",
"0.5570344",
"0.55633044",
"0.5563065",
"0.55492985",
"0.5547746",
"0.5538772",
"0.55161697",
"0.5516167",
"0.5510987",
"0.55094767",
"0.5504743",
"0.55003196",
"0.5496579",
"0.5492059",
"0.54878664",
"0.5485422",
"0.5480182",
"0.54553133",
"0.5417026",
"0.54111093",
"0.53987455",
"0.5390719",
"0.5383788",
"0.53624785",
"0.53615093",
"0.5338288",
"0.53380644",
"0.53367907",
"0.53346497"
] | 0.6677059 | 8 |
Evaluates a Python code object and returns the result. | public PyObject eval(PyObject code) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object eval (Object expression);",
"Hojas eval();",
"public abstract Object eval();",
"String evaluate();",
"public Object eval(String expression) throws Exception;",
"Result evaluate();",
"public String evaluate(String expression);",
"private GenericVar run(String code) throws InterpreterException {\n\t\treturn evaluate(code);\n\t}",
"public Const evaluate();",
"@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }",
"public void exec(PyObject code) {\n }",
"JavaEvaluator createJavaEvaluator();",
"@Test\r\n public void testEval__call__1() throws ScriptException {\r\n Object value = engine.eval(\"java.lang.String()\");\r\n Assert.assertEquals(\"\", value);\r\n }",
"protected abstract Value evaluate();",
"Value eval(String script, String name, String contentType, boolean interactive) throws Exception;",
"double eval();",
"public String evaluateExpression(ValueExpression expr,CodeExecutionContext execCtx) throws JavascribeException;",
"public String eval()\r\n\t{\r\n\t\treturn eval(null, null);\r\n\t}",
"EvaluationResult evalExpression(ValueExp expr) { return evalExpression(expr, true); }",
"public MathObject evaluate(Function input);",
"public interface Evaluator\n{\n /**\n * Return true if the given object is valid as an expression to\n * the evaluator. If an object is a valid expression, then the\n * evaluator is, in general, able to <code>eval()</code> it into\n * a result (or at least reasonably attempt to do so).\n *\n * @param value the value to check\n * @return true if it is valid as an expression, false if not\n */\n public boolean isExpression (Object value);\n\n /**\n * Return true if the given object is a possible result of evaluation.\n * If this returns true, then it is conceivable that the given object\n * was the result of a call to <code>eval()</code> on this evaluator.\n *\n * @param value the value to check\n * @return true if it is a possible result, false if not\n */\n public boolean isResult (Object value);\n\n /**\n * Evaluate the given value as an expression, yielding some result\n * value.\n *\n * @param expression the thing to evaluate\n * @return the result of evaluation\n */\n public Object eval (Object expression);\n}",
"@Test\n\tpublic void simple() throws Exception {\n\t\tEvalImpl t = new EvalImpl();\n\t\tassertEquals(3.0, t.eval(\"1 + 2\"), 0d);\n\t}",
"public int expressionEval(String expression){\n\n int result = 0;\n\n\n\n return result;\n }",
"public boolean evaluate();",
"public interface IExpressionRuntime\n{\n Object evaluate();\n}",
"default Value eval(String script) throws Exception {\n return eval(script, false);\n }",
"public T evaluate(String expr) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionBuilder.build(tokens);\n Visitor<T> visitor = new ExpressionVisitor<>();\n return visitor.visit(expression);\n }",
"@Test\r\n public void testEval__declare_call__1() throws ScriptException {\r\n Object value = engine.eval(\"#() true\");\r\n Assert.assertTrue(value instanceof Function);\r\n Object result = ((Function) value).invoke(engine.createBindings());\r\n Assert.assertTrue((Boolean)result);\r\n }",
"public String evaluate(final String jsExpression);",
"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 }",
"public interface Value extends EvalCode {\n\n Object getValue();\n\n @Override\n default Object evalCode(Leaf leaf, Function<AppTree,Object> eval, int numArgs) {\n return getValue();\n }\n}",
"public T execute() {\n return GraalCompiler.compile(this);\n }",
"public String eval(String p1 ) {\n\t}",
"public CompletableFuture<Object> eval(final String script) {\n return eval(script, null, new SimpleBindings());\n }",
"boolean evaluate(E input);",
"public IRubyObject runInterpreterBody(Node scriptNode) {\n assert scriptNode != null : \"scriptNode is not null\";\n assert scriptNode instanceof RootNode : \"scriptNode is not a RootNode\";\n \n return runInterpreter(((RootNode) scriptNode).getBodyNode());\n }",
"public int evaluateAsInt();",
"void eval(Reader reader) throws ScriptRunnerException, IOException;",
"ScriptEvaluator createScriptEvaluator();",
"Object evaluate(CompiledExpressionHolder code, Object scopes, Object root, Object key, Object\n value) throws InvalidPathException;",
"abstract public interface Interpreter {\n\n /**\n * Evaluates a given JavaScript expression for a given userid.\n * \n * @param expression the expression to evaluate\n * @return the result of evaluating the expression\n */\n public String evaluate(String expression);\n}",
"public abstract void interpret(EvaluationContext context);",
"@Test\n public void test01(){\n Object result = FelEngine.instance.eval(\"5000*12+7500\");\n System.out.println(result);\n }",
"public static String compileAndRun(String code) throws Exception {\n\t\treturn run(LavaCompiler.compile(code));\n\t}",
"public interface Evaluable {\n HarrObject eval(Context context) throws HarrException;\n}",
"public PrimObject primitiveEval(PrimContext context) {\n Object[] values = (Object[]) javaValue();\n // Context is invocation context while values[1] is context of the creator of the block.\n context.setupCallContext((PrimContext) values[1]);\n PrimObject receiver = ((PrimContext) values[1]).receiver();\n return ((LambdaBlock) values[0]).apply(this, receiver, context);\n }",
"public int evaluate(){\r\n\t\tString value = expressionTree.getValue();\r\n\t\tint result = 0;\r\n\t\tif (isNumber(value)){\r\n\t\t\treturn stringToNumber(value);\r\n\t\t}\r\n\t\tif (value.equals(\"+\")){\r\n\t\t\tresult = 0;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult += (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"*\")){\r\n\t\t\tresult = 1;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult *= (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"-\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() -\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\tif (value.equals(\"/\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() /\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public PyObject eval(String s) {\n return null;\n }",
"public interface Code {\n //运行结果编号\n Integer getCode();\n //运行结果描述\n String getDescription();\n String toString();\n\n}",
"public Object eval( CallStack callstack, Interpreter interpreter )\n throws EvalError\n {\n NameSpace namespace = callstack.top();\n BSHAmbiguousName nameNode = getNameNode();\n\n // get caller info for assert fail\n if (\"fail\".equals(nameNode.text))\n interpreter.getNameSpace().setNode(this);\n\n // Do not evaluate methods this() or super() in class instance space\n // (i.e. inside a constructor)\n if ( namespace.getParent() != null && namespace.getParent().isClass\n && ( nameNode.text.equals(\"super\") || nameNode.text.equals(\"this\") )\n )\n return Primitive.VOID;\n\n Name name = nameNode.getName(namespace);\n Object[] args = getArgsNode().getArguments(callstack, interpreter);\n\n try {\n return name.invokeMethod( interpreter, args, callstack, this);\n } catch (ReflectError e) {\n throw new EvalError(\n \"Error in method invocation: \" + e.getMessage(),\n this, callstack, e);\n } catch (InvocationTargetException e) {\n throw Reflect.targetErrorFromTargetException(\n e, name.toString(), callstack, this);\n } catch ( UtilEvalError e ) {\n throw e.toEvalError( this, callstack );\n }\n }",
"private void evalExpression () {\n\tif (expr.type != null) {\n\t // Expression ist wie vorgesehen getypt\n\t if (expr.type instanceof M_Bool) {\n\t\t// Expression ist eine boolesche, also :\n\t\tdebug.addMsg(\"# expression to evaluate is boolean.\",3);\n\t\tSimulatorBoolEvaluator boolExpr = new SimulatorBoolEvaluator(process, expr);\n\t\tvalue = new SimulatorBoolValue ( boolExpr.giveResult() );\n\t }\n\t else if (expr.type instanceof M_Int) {\n\t\t// Expression ist eine zu Integer evaluierende, also :\n\t\tdebug.addMsg(\"# expression to evaluate is integer.\",3);\n\t\tSimulatorIntEvaluator intExpr = new SimulatorIntEvaluator(process, expr);\n\t\tvalue = new SimulatorIntValue ( intExpr.giveResult() ); \n\t }\n\t else {\n\t /* Platz für Exception, da Expression falsch getypt */\n\t debug.addMsg(\"!!! EXCEPTION !!! : Expression not properly typed \",0);\n\t debug.addMsg(\"!!! Class: SimulatorExprEvaluator \\n!!! Method : evalExpression\\n!!! Pos.:1 \",0);\n\t }\n\n\t} //--------- end if(1) ------------\n\telse {\n\t // Expression ist nicht getypt also :\n\t debug.addMsg(\"!!! EXCEPTION !!! : Expression not typed \",0);\n\t debug.addMsg(\"!!! Class: SimulatorExprEvaluator \\n!!! Method : evalExpression\\n!!! Pos.:2 \",0);\n\t} //-------- end else --------------\n }",
"Code getCode();",
"public abstract int evalFunction(Player nodePlayer);",
"public static Analytic rubyEval(Script script) throws ScriptException {\n System.setProperty(\"org.jruby.embed.localcontext.scope\", \"singleton\");\n System.setProperty(\"org.jruby.embed.compat.version\", \"JRuby1.9\");\n // keep local variables around between calls to eval\n System.setProperty(\"org.jruby.embed.localvariable.behavior\", \"persistent\");\n // make sure object hashing is consistent across all JVM instances, PR #640\n System.setProperty(\"jruby.consistent.hashing\", \"true\");\n\n // use ruby custom avro data\n AvroMode.GENERIC.override(new RubyReaderWriterFactory());\n\n ScriptEngine engine = new ScriptEngineManager().getEngineByName(\"jruby\");\n Bindings bindings = new SimpleBindings();\n bindings.put(\"$SCRIPT\", script);\n return (Analytic) engine.eval(\n new InputStreamReader(new ByteArrayInputStream(script.bytes)),\n bindings);\n }",
"public Object eval(Environment e) \n {\n return val;\n }",
"@Test\n void scEvaluate() {\n StandardCalc sc = new StandardCalc();\n String expression = (\"( 5 * ( 6 + 7 ) ) - 2\");\n float result = 0f;\n try {\n result = sc.evaluate(expression);\n } catch (InvalidExpressionException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n assertEquals(result, 63);\n }",
"protected abstract Object evalValue() throws JspException;",
"public ASTNode visitEvaluate(EvaluateContext ctx) {\n ASTExpr expr = (ctx.expr() == null) ? null : (ASTExpr)visit(ctx.expr());\n return new ASTEval(ctx, expr);\n }",
"public int eval() {\n\t\t\treturn eval(expression.root);\n\t\t}",
"Interpreter getInterpreter();",
"R getValue();",
"public interface Program {\n\n static EvalResult newEvalResult(Val val, EvalDetails evalDetails) {\n return new EvalResult(val, evalDetails);\n }\n\n /**\n * Eval returns the result of an evaluation of the Ast and environment against the input vars.\n *\n * <p>The vars value may either be an `interpreter.Activation` or a `map[string]interface{}`.\n *\n * <p>If the `OptTrackState` or `OptExhaustiveEval` flags are used, the `details` response will be\n * non-nil. Given this caveat on `details`, the return state from evaluation will be:\n *\n * <ul>\n * <li>`val`, `details`, `nil` - Successful evaluation of a non-error result.\n * <li>`val`, `details`, `err` - Successful evaluation to an error result.\n * <li>`nil`, `details`, `err` - Unsuccessful evaluation.\n * </ul>\n *\n * <p>An unsuccessful evaluation is typically the result of a series of incompatible `EnvOption`\n * or `ProgramOption` values used in the creation of the evaluation environment or executable\n * program.\n */\n EvalResult eval(Object vars);\n\n final class EvalResult {\n private final Val val;\n private final EvalDetails evalDetails;\n\n private EvalResult(Val val, EvalDetails evalDetails) {\n this.val = val;\n this.evalDetails = evalDetails;\n }\n\n public Val getVal() {\n return val;\n }\n\n public EvalDetails getEvalDetails() {\n return evalDetails;\n }\n }\n}",
"private void testExpression(ASTExpression exp, ASTTerm expectedResult) {\n System.out.print(\"eval[\" + exp + \"] = \");\n ASTTerm result = null;\n try {\n result = interpreter.evaluate(exp);\n } catch (Exception e) {\n fail(e.getMessage());\n }\n System.out.println(result);\n\n assertEquals(expectedResult, result);\n }",
"@Override\n\tpublic Integer evaluate() {\n\t\treturn Integer.parseInt(this.getValue());\n\t}",
"public String evaluate(Node root){\n\t\tObject[] args;\n\t\tClass[] types;\n\t\tint i= 0;\n\t\tNode nxt;\n\t\tString fun;\n\t\tfun = root.getValue();\n\t\tClass c=null;\n\t\t\n\t\tLinkedList<Node> children = root.getChildren();\n\n\t\tIterator<Node> iter = children.listIterator();\n\t\tif (!iter.hasNext()){\n\t\t\treturn fun;\n\t\t}\n\t\ttypes= new Class[children.size()];\n\t\targs = new Object[children.size()];\n\t\t\n\t\t//populates types[] for getmethod and args[] for invoke\n\t\twhile (iter.hasNext()) {\n\t\t\tnxt = iter.next();\n\t\t\tfun = evaluate(nxt);\n\t\t\tswitch ( root.getReturnType()[i+1] & 0b1111 ) {\n\t\t\t\t//the argument should be a string\n\t\t\t\tcase STRING:\n\t\t\t\t\tc=String.class;\n\t\t\t\t\targs[i]=fun.replace(\"\\\"\",\"\");\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be a float primitive\n\t\t\t\tcase FLOAT:\n\t\t\t\t\tc=float.class;\n\t\t\t\t\targs[i]=new Float(Float.parseFloat(fun));\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be a int primitive\n\t\t\t\tcase INTEGER:\n\t\t\t\t\tc=int.class;\n\t\t\t\t\targs[i]=new Integer(Integer.parseInt(fun));\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be a Float class\n\t\t\t\tcase BIGFLOAT:\n\t\t\t\t\tc=Float.class;\n\t\t\t\t\targs[i]=new Float(Float.parseFloat(fun));\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be an Integer class\n\t\t\t\tcase BIGINTEGER:\n\t\t\t\t\tc=Integer.class;\n\t\t\t\t\targs[i]=new Integer(Integer.parseInt(fun));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\n\t\t\ttypes[i]=c;\n\t\t\ti ++;\n\t\t\t\n\t\t}\n\t\tfun = root.getValue();\n\t\t\n\t\ttry {\n\t\t\t//get the method at this node and apply it to the evaluation of its children\n\t\t\tfun = \"\" + coms.getMethod(fun, types).invoke(coms, args);\n\t\t}catch (Exception e){\n\t\t\t//this will never ever happen\n\t\t}\n\t\t\n\t\treturn fun;\n\t}",
"final public Object EvalFunction(byte funcType) throws ParseException {\n /*@bgen(jjtree) EvalFunction */\n SimpleNode jjtn000 = new SimpleNode(JJTEVALFUNCTION);\n boolean jjtc000 = true;\n jjtree.openNodeScope(jjtn000);String funcName;\n Object func = null;\n log.trace(\"Entering EvalFunction\");\n try {\n funcName = QualifiedFunction();\n jjtree.closeNodeScope(jjtn000, true);\n jjtc000 = false;\n func = pigContext.instantiateFuncFromAlias(funcName);\n try{\n FunctionType.tryCasting(func, funcType);\n }catch (Exception e){\n ParseException pe = new ParseException(e.getMessage());\n pe.initCause(e);\n {if (true) throw pe;}\n }\n log.trace(\"Exiting EvalFunction\");\n\n {if (true) return func;}\n } catch (Throwable jjte000) {\n if (jjtc000) {\n jjtree.clearNodeScope(jjtn000);\n jjtc000 = false;\n } else {\n jjtree.popNode();\n }\n if (jjte000 instanceof RuntimeException) {\n {if (true) throw (RuntimeException)jjte000;}\n }\n if (jjte000 instanceof ParseException) {\n {if (true) throw (ParseException)jjte000;}\n }\n {if (true) throw (Error)jjte000;}\n } finally {\n if (jjtc000) {\n jjtree.closeNodeScope(jjtn000, true);\n }\n }\n throw new Error(\"Missing return statement in function\");\n }",
"Object eval(String script, int keyCount, String... params);",
"void evaluate()\n\t{\n\t\toperation.evaluate();\n\t}",
"public interface Expression {\n boolean interpret(String info);\n}",
"public double evaluate() throws Exception {\r\n // this expression compare from variable\r\n throw new Exception(\"this expression contains a variable\");\r\n }",
"public static Object evalSpecial(Context cx, Scriptable scope, \n Object thisArg, Object[] args, \n String filename, int lineNumber)\n throws JavaScriptException\n {\n if (args.length < 1)\n return Undefined.instance;\n Object x = args[0];\n if (!(x instanceof String)) {\n String message = Context.getMessage(\"msg.eval.nonstring\", null);\n Context.reportWarning(message);\n return x;\n }\n int[] linep = { lineNumber };\n if (filename == null) {\n filename = Context.getSourcePositionFromStack(linep);\n if (filename == null) {\n filename = \"<eval'ed string>\";\n linep[0] = 1;\n }\n }\n \n try {\n StringReader in = new StringReader((String) x);\n Object securityDomain = cx.getSecurityDomainForStackDepth(3);\n \n // Compile the reader with opt level of -1 to force interpreter\n // mode.\n int oldOptLevel = cx.getOptimizationLevel();\n cx.setOptimizationLevel(-1);\n Script script = cx.compileReader(null, in, filename, linep[0], \n securityDomain);\n cx.setOptimizationLevel(oldOptLevel);\n \n // if the compile fails, an error has been reported by the\n // compiler, but we need to stop execution to avoid\n // infinite looping on while(true) { eval('foo bar') } -\n // so we throw an EvaluatorException.\n if (script == null) {\n String message = Context.getMessage(\"msg.syntax\", null);\n throw new EvaluatorException(message);\n }\n \n InterpretedScript is = (InterpretedScript) script;\n Object result = is.call(cx, scope, (Scriptable) thisArg, null);\n \n return result;\n }\n catch (IOException ioe) {\n // should never happen since we just made the Reader from a String\n throw new RuntimeException(\"unexpected io exception\");\n }\n \n }",
"public final AstValidator.func_eval_return func_eval() throws RecognitionException {\n AstValidator.func_eval_return retval = new AstValidator.func_eval_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree FUNC_EVAL203=null;\n CommonTree INVOKER_FUNC_EVAL206=null;\n CommonTree IDENTIFIER208=null;\n AstValidator.func_name_return func_name204 =null;\n\n AstValidator.real_arg_return real_arg205 =null;\n\n AstValidator.func_name_return func_name207 =null;\n\n AstValidator.real_arg_return real_arg209 =null;\n\n\n CommonTree FUNC_EVAL203_tree=null;\n CommonTree INVOKER_FUNC_EVAL206_tree=null;\n CommonTree IDENTIFIER208_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:405:10: ( ^( FUNC_EVAL func_name ( real_arg )* ) | ^( INVOKER_FUNC_EVAL func_name IDENTIFIER ( real_arg )* ) )\n int alt56=2;\n int LA56_0 = input.LA(1);\n\n if ( (LA56_0==FUNC_EVAL) ) {\n alt56=1;\n }\n else if ( (LA56_0==INVOKER_FUNC_EVAL) ) {\n alt56=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 56, 0, input);\n\n throw nvae;\n\n }\n switch (alt56) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:405:12: ^( FUNC_EVAL func_name ( real_arg )* )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n FUNC_EVAL203=(CommonTree)match(input,FUNC_EVAL,FOLLOW_FUNC_EVAL_in_func_eval1882); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n FUNC_EVAL203_tree = (CommonTree)adaptor.dupNode(FUNC_EVAL203);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(FUNC_EVAL203_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_func_name_in_func_eval1884);\n func_name204=func_name();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, func_name204.getTree());\n\n\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:405:35: ( real_arg )*\n loop54:\n do {\n int alt54=2;\n int LA54_0 = input.LA(1);\n\n if ( (LA54_0==BIGDECIMALNUMBER||LA54_0==BIGINTEGERNUMBER||LA54_0==CUBE||LA54_0==DIV||LA54_0==DOLLARVAR||LA54_0==DOUBLENUMBER||LA54_0==FALSE||LA54_0==FLOATNUMBER||LA54_0==GROUP||LA54_0==IDENTIFIER||LA54_0==INTEGER||LA54_0==LONGINTEGER||LA54_0==MINUS||LA54_0==NULL||LA54_0==PERCENT||LA54_0==PLUS||LA54_0==QUOTEDSTRING||LA54_0==STAR||LA54_0==TRUE||(LA54_0 >= BAG_VAL && LA54_0 <= BIN_EXPR)||(LA54_0 >= CASE_COND && LA54_0 <= CASE_EXPR)||(LA54_0 >= CAST_EXPR && LA54_0 <= EXPR_IN_PAREN)||LA54_0==FUNC_EVAL||LA54_0==INVOKER_FUNC_EVAL||(LA54_0 >= MAP_VAL && LA54_0 <= NEG)||LA54_0==TUPLE_VAL) ) {\n alt54=1;\n }\n\n\n switch (alt54) {\n \tcase 1 :\n \t // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:405:35: real_arg\n \t {\n \t _last = (CommonTree)input.LT(1);\n \t pushFollow(FOLLOW_real_arg_in_func_eval1886);\n \t real_arg205=real_arg();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) \n \t adaptor.addChild(root_1, real_arg205.getTree());\n\n\n \t if ( state.backtracking==0 ) {\n \t }\n \t }\n \t break;\n\n \tdefault :\n \t break loop54;\n }\n } while (true);\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 2 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:405:49: ^( INVOKER_FUNC_EVAL func_name IDENTIFIER ( real_arg )* )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n INVOKER_FUNC_EVAL206=(CommonTree)match(input,INVOKER_FUNC_EVAL,FOLLOW_INVOKER_FUNC_EVAL_in_func_eval1895); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n INVOKER_FUNC_EVAL206_tree = (CommonTree)adaptor.dupNode(INVOKER_FUNC_EVAL206);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(INVOKER_FUNC_EVAL206_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_func_name_in_func_eval1897);\n func_name207=func_name();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, func_name207.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n IDENTIFIER208=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_func_eval1899); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n IDENTIFIER208_tree = (CommonTree)adaptor.dupNode(IDENTIFIER208);\n\n\n adaptor.addChild(root_1, IDENTIFIER208_tree);\n }\n\n\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:405:91: ( real_arg )*\n loop55:\n do {\n int alt55=2;\n int LA55_0 = input.LA(1);\n\n if ( (LA55_0==BIGDECIMALNUMBER||LA55_0==BIGINTEGERNUMBER||LA55_0==CUBE||LA55_0==DIV||LA55_0==DOLLARVAR||LA55_0==DOUBLENUMBER||LA55_0==FALSE||LA55_0==FLOATNUMBER||LA55_0==GROUP||LA55_0==IDENTIFIER||LA55_0==INTEGER||LA55_0==LONGINTEGER||LA55_0==MINUS||LA55_0==NULL||LA55_0==PERCENT||LA55_0==PLUS||LA55_0==QUOTEDSTRING||LA55_0==STAR||LA55_0==TRUE||(LA55_0 >= BAG_VAL && LA55_0 <= BIN_EXPR)||(LA55_0 >= CASE_COND && LA55_0 <= CASE_EXPR)||(LA55_0 >= CAST_EXPR && LA55_0 <= EXPR_IN_PAREN)||LA55_0==FUNC_EVAL||LA55_0==INVOKER_FUNC_EVAL||(LA55_0 >= MAP_VAL && LA55_0 <= NEG)||LA55_0==TUPLE_VAL) ) {\n alt55=1;\n }\n\n\n switch (alt55) {\n \tcase 1 :\n \t // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:405:91: real_arg\n \t {\n \t _last = (CommonTree)input.LT(1);\n \t pushFollow(FOLLOW_real_arg_in_func_eval1901);\n \t real_arg209=real_arg();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) \n \t adaptor.addChild(root_1, real_arg209.getTree());\n\n\n \t if ( state.backtracking==0 ) {\n \t }\n \t }\n \t break;\n\n \tdefault :\n \t break loop55;\n }\n } while (true);\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"public interface Expression {\n public boolean interpret(String context);\n}",
"public interface Expression {\n public boolean interpret(String context);\n}",
"public T evaluate(String expr, Map<String, Expression> dataSet) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionBuilder.build(tokens);\n Visitor<T> visitor = new ExpressionVisitor<>(dataSet);\n return visitor.visit(expression);\n }",
"public interface Expression {\n public boolean interpret(String context);\n}",
"public Object evaluate (Interpreter interp, List sexp)\n throws RunTimeException\n {\n Map<String,Object> shadowed = new HashMap<String,Object>();\n\n for (int i = 0; i < _args.size(); i++) {\n String name = ((Name)_args.elementAt(i)).toString();\n Object val = sexp.elementAt(i);\n\n // shadow this variable\n Object oval = interp.env.get(name);\n if (oval != null) shadowed.put(name, oval);\n else shadowed.put(name, NO_VAL);\n\n // evaluate the argument and bind it to the variable\n interp.env.put(name, interp.evaluateSExp(val));\n }\n\n // evaluate the sexps that constitute this function\n Object result = interp.interpret(_progn);\n\n // copy the values of the shadowed variables back into the environment\n for (Map.Entry<String,Object> entry : shadowed.entrySet()) {\n Object oval = entry.getValue();\n if (oval == NO_VAL) interp.env.remove(entry.getKey());\n else interp.env.put(entry.getKey(), oval);\n }\n\n return result;\n }",
"public interface EvalHandler {\n\tString getExpression();\n\tvoid handleResult(EvalResult er);\n}",
"@Test\r\n public void testEval__complex__000() throws ScriptException {\r\n final String script =\r\n \"(\" +\r\n \" platform: (swing: (frame: #() javax.swing.JFrame()))\" +\r\n \")\";\r\n Object value = engine.eval(script);\r\n Assert.assertNotNull(value);\r\n Assert.assertTrue(value instanceof Bindings);\r\n Assert.assertTrue(((Bindings) value).containsKey(\"platform\"));\r\n Assert.assertNotNull(((Bindings)value).get(\"platform\"));\r\n }",
"default Value eval(String script, boolean interactive) throws Exception {\n return eval(script, \"<eval>\", interactive);\n }",
"public String getEvaluate() {\n return evaluate;\n }",
"public interface JavaCode {\n\n /**\n * Get an unique identification code for an object\n * TODO: This method is not reliable as hash codes are not unique, should use an UUID generator singleton instead.\n *\n * @param obj the object\n * @return the unique identification code\n */\n static int getUniqueID(Object obj) {\n return obj.hashCode();\n }\n\n /**\n * Compiles this code. If an object implements both {@link JavaCode}\n * and {@link JavaExpression}, only one of this method and\n * {@link JavaExpression#compileExpression(Subroutine, JavaScope)} should be called.\n *\n * @param subroutine the subroutine which this code belongs to\n * @param parent the parent scope of this code\n * @throws JTAException if an error occurs\n */\n void compileCode(Subroutine subroutine, JavaScope parent) throws JTAException;\n}",
"public String readAndEvaluate(String lispCode) {\n StringBuilder reply = new StringBuilder();\n try {\n Lisp.read(lispCode).evaluate(environment).print(reply);\n return reply.toString();\n } catch (IOException e) {\n return e.getMessage();\n }\n }",
"@Test\r\n public void testEval__list_context__1() throws ScriptException {\r\n Object value = engine.eval(\"<java.util java.lang> String()\");\r\n Assert.assertEquals(\"\", value);\r\n }",
"public String getEvaluate() {\r\n return evaluate;\r\n }",
"public void evaluate() throws Throwable {\n }",
"public static void main(String[] args) {\n if (args.length != 1) {\r\n System.out.println(\r\n \"Usage: java EvaluateExpression \\\"expression\\\"\");\r\n System.exit(1);\r\n }\r\n \r\n /* Try to evaluate the expression and throw an exception if \r\n any problems occur */\r\n try {\r\n System.out.println(evaluateExpression(args[0]));\r\n }\r\n catch(Exception ex) {\r\n System.out.println(\"Wrong expression: \" + args[0]);\r\n }\r\n \r\n }",
"public static Analytic pyEval(Script script) throws ScriptException {\n List<Analytic> analytics = Lists.newArrayListWithCapacity(1);\n PySystemState engineSys = new PySystemState();\n PyObject builtins = engineSys.getBuiltins();\n builtins.__setitem__(\"_script\", Py.java2py(script));\n builtins.__setitem__(\"_analytics\", Py.java2py(analytics));\n Py.setSystemState(engineSys);\n\n // use ruby custom avro data\n AvroMode.GENERIC.override(new PyReaderWriterFactory());\n\n ScriptEngine engine = new ScriptEngineManager().getEngineByName(\"python\");\n Bindings bindings = new SimpleBindings();\n engine.eval(\n new InputStreamReader(new ByteArrayInputStream(script.bytes)),\n bindings);\n\n return analytics.get(0);\n }",
"public double evaluate(double x);",
"public IRubyObject runNormally(Node scriptNode) {\n Script script = null;\n boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();\n if (compile || config.isShowBytecode()) {\n script = tryCompile(scriptNode, null, new JRubyClassLoader(getJRubyClassLoader()), config.isShowBytecode());\n }\n \n if (script != null) {\n if (config.isShowBytecode()) {\n return getNil();\n }\n \n return runScript(script);\n } else {\n failForcedCompile(scriptNode);\n \n return runInterpreter(scriptNode);\n }\n }",
"protected E eval()\n\t\t{\n\t\tE e=this.e;\n\t\tthis.e=null;\n\t\treturn e;\n\t\t}",
"public double evaluate(Context context);",
"public interface FunctionEvaluator {\n\t/*\n\t * Evaluate the given function if possible. Otherwise should return null.\n\t */\n\tpublic MathObject evaluate(Function input);\n}",
"public abstract int code();",
"public Stmt createEval(Expr expr) {\n return xnf.Eval(expr.position(), expr);\n }",
"public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}",
"public CompletableFuture<Object> eval(final String script, final Bindings boundVars) {\n return eval(script, null, boundVars);\n }",
"@Override\n void execute(RolapEvaluator evaluator) {\n }",
"public void assertEvaluate(Object expectedReturnValue, String script) {\n evalCps(script, expectedReturnValue, e -> {\n throw new RuntimeException(\"Failed to evaluate CPS-transformed script: \" + script, e);\n });\n eval(script, expectedReturnValue, e -> {\n throw new RuntimeException(\"Failed to evaluate non-CPS-transformed script: \" + script, e);\n });\n }",
"public static String evaluate( String expr )\n {\n\n\tString[] arr = expr.split(\"//s+\");\n\tString ret = \"\";\n\tALStack<String> stack = new ALStack<String>();\n\tfor( String s: arr)\n\t stack.push(s);\n\n\tif( stack.peek().equals(\"(\")){\n\t stack.pop();\n\t int operator = findOp(stack.pop());\n\t ret = unload(operator, stack);\n\t return ret;\n\t}\n\treturn \"\";\n }"
] | [
"0.7211698",
"0.710799",
"0.7073301",
"0.7010001",
"0.6982851",
"0.6928985",
"0.66976684",
"0.6630523",
"0.6528296",
"0.64276844",
"0.630709",
"0.6298708",
"0.6297011",
"0.6194884",
"0.6185746",
"0.6165434",
"0.61368346",
"0.60906595",
"0.60739547",
"0.6020173",
"0.5974589",
"0.59653944",
"0.5964658",
"0.58981293",
"0.58853054",
"0.58845896",
"0.58729327",
"0.5870196",
"0.58360994",
"0.5832555",
"0.5783207",
"0.57566434",
"0.572697",
"0.5712818",
"0.5701025",
"0.56935525",
"0.56573886",
"0.56542987",
"0.5618403",
"0.56048054",
"0.5580097",
"0.55742127",
"0.55689377",
"0.55614036",
"0.5545962",
"0.55357414",
"0.5525191",
"0.55240804",
"0.55224776",
"0.55122036",
"0.5511258",
"0.5501599",
"0.54945123",
"0.54939973",
"0.5493242",
"0.5472713",
"0.5418604",
"0.5409588",
"0.53995305",
"0.5396494",
"0.53949845",
"0.5380034",
"0.5369393",
"0.5322605",
"0.5315606",
"0.5314659",
"0.5313511",
"0.530795",
"0.53059703",
"0.5304189",
"0.530144",
"0.52905524",
"0.52837914",
"0.52837914",
"0.52755123",
"0.5274382",
"0.52669203",
"0.5266811",
"0.524527",
"0.52419895",
"0.5240105",
"0.52379316",
"0.523541",
"0.52289605",
"0.5228474",
"0.5207035",
"0.5204039",
"0.51992685",
"0.519111",
"0.51745653",
"0.51717085",
"0.5166103",
"0.51634645",
"0.5160365",
"0.5156663",
"0.5148604",
"0.5144201",
"0.5141425",
"0.5138216",
"0.51352566"
] | 0.6683239 | 7 |
Executes a string of Python source in the local namespace. In some environments, such as Windows, Unicode characters in the script will be converted into ascii question marks (?). This can be avoided by first compiling the fragment using PythonInterpreter.compile(), and using the overridden form of this method which takes a PyCode object. Code page declarations are not supported. | public void exec(String s) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PyCode compile(String script) {\n return null;\n }",
"public void exec(PyObject code) {\n }",
"abstract public PyCode getMain();",
"public static String compileAndRun(String code) throws Exception {\n\t\treturn run(LavaCompiler.compile(code));\n\t}",
"public String build() {\n StringBuilder scriptBuilder = new StringBuilder();\n StringBuilder scriptBody = new StringBuilder();\n String importStmt = \"import \";\n \n try {\n if (scriptCode.contains(importStmt)) {\n BufferedReader reader = new BufferedReader(new StringReader(scriptCode));\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.trim().startsWith(importStmt)) {\n scriptBuilder.append(line);\n scriptBuilder.append(\"\\n\");\n } else {\n scriptBody.append((scriptBody.length() == 0 ? \"\" : \"\\n\"));\n scriptBody.append(line);\n }\n }\n } else {\n scriptBody.append(scriptCode);\n }\n } catch (IOException e) {\n throw new CitrusRuntimeException(\"Failed to construct script from template\", e);\n }\n \n scriptBuilder.append(scriptHead);\n scriptBuilder.append(scriptBody.toString());\n scriptBuilder.append(scriptTail);\n \n return scriptBuilder.toString();\n }",
"public abstract ILanguageProtocol makeInterpreter(String source, String replQualifiedName, String... salixPath) throws IOException, URISyntaxException, Exception;",
"public PyObject eval(String s) {\n return null;\n }",
"public final void source() throws RecognitionException {\n String string_literal95 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:638:3: ( ^( I_SOURCE ( string_literal )? ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:638:5: ^( I_SOURCE ( string_literal )? )\n {\n match(input, I_SOURCE, FOLLOW_I_SOURCE_in_source1614);\n if (input.LA(1) == Token.DOWN) {\n match(input, Token.DOWN, null);\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:638:16: ( string_literal )?\n int alt28 = 2;\n int LA28_0 = input.LA(1);\n if ((LA28_0 == STRING_LITERAL)) {\n alt28 = 1;\n }\n switch (alt28) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:638:16: string_literal\n {\n pushFollow(FOLLOW_string_literal_in_source1616);\n string_literal95 = string_literal();\n state._fsp--;\n\n }\n break;\n\n }\n\n match(input, Token.UP, null);\n }\n\n\n method_stack.peek().methodBuilder.addSetSourceFile(dexBuilder.internNullableStringReference(string_literal95));\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n }",
"public PyObject eval(PyObject code) {\n return null;\n }",
"public void parseSourceCode(String code) {\r\n sourceCode = code;\r\n index = 0;\r\n curlyBracketsLevel = 0;\r\n currentPackage = \"\";\r\n currentClass = null;\r\n inMethod = false;\r\n imports = new HashMap<>();\r\n parse();\r\n }",
"@Test\n public void needCustomFix() {\n final Context ctx = ContextFactory.getGlobal().enterContext();\n final ScriptableObject topScope = ctx.initStandardObjects();\n \n topScope.put(\"str\", topScope, str_);\n topScope.put(\"text\", topScope, text_);\n topScope.put(\"expected\", topScope, expected_);\n \n assertEquals(begin_ + end_, text_.replaceAll(str_, \"\"));\n try {\n ctx.evaluateString(topScope, src_, \"test script\", 0, null);\n }\n catch (final JavaScriptException e) {\n assertTrue(e.getMessage().indexOf(\"Expected >\") == 0);\n }\n }",
"public void generateCode(BlockScope currentScope, CodeStream codeStream) {\n\n\t\tif ((bits & IsReachable) == 0) {\n\t\t\treturn;\n\t\t}\n\t\tint pc = codeStream.position;\n\t\tif (statements != null) {\n\t\t\tfor (int i = 0, max = statements.length; i < max; i++) {\n\t\t\t\tstatements[i].generateCode(scope, codeStream);\n\t\t\t}\n\t\t} // for local variable debug attributes\n\t\tif (scope != currentScope) { // was really associated with its own scope\n\t\t\tcodeStream.exitUserScope(scope);\n\t\t}\n\t\tcodeStream.recordPositionsFrom(pc, this.sourceStart);\n\t}",
"String generateCode(\n InputSource input, String filename,\n ProgrammingLanguage programmingLanguage,\n SourceResolver resolver\n ) throws Exception;",
"private static native void eval(String script)\n /*-{\n try {\n if (script == null) return;\n $wnd.eval(script);\n } catch (e) {\n }\n }-*/;",
"String getSourceString();",
"private static native void eval(String script)\n /*-{\n try {\n \t if (script != null) \n eval(\"{ var document = $doc; var window = $wnd; \"+ script + \"}\");\n } catch (e) {\n }\n }-*/;",
"@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }",
"private native void eval(String script) /*-{\n \t try {\n \t eval(\"{ var document = $doc; var window = $wnd; \"+ script + \"}\");\n \t } catch (e) {\n \t }\n \t }-*/;",
"public void testParseLocalCodes() throws Exception {\r\n \t\tCObject node = archetype.node(\"/types[at0001]/items[at10003]/value\");\r\n \t\tString[] codeList = { \"at1311\",\"at1312\", \"at1313\", \"at1314\",\"at1315\" }; \r\n \t\tassertCCodePhrase(node, \"local\", codeList, null);\r\n \t}",
"public IRubyObject runNormally(Node scriptNode) {\n Script script = null;\n boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();\n if (compile || config.isShowBytecode()) {\n script = tryCompile(scriptNode, null, new JRubyClassLoader(getJRubyClassLoader()), config.isShowBytecode());\n }\n \n if (script != null) {\n if (config.isShowBytecode()) {\n return getNil();\n }\n \n return runScript(script);\n } else {\n failForcedCompile(scriptNode);\n \n return runInterpreter(scriptNode);\n }\n }",
"Interpreter getInterpreter();",
"java.lang.String getSource();",
"java.lang.String getSource();",
"public abstract String getFullCode();",
"Object parse(String line) throws IOException, FSException {\n int oldLine=code.curLine;\n try {\n code.curLine=-1;\n code.forError=line;\n char[] chars=line.toCharArray();\n LineLoader.checkLine(chars);\n tok=new LexAnn(chars);\n tok.nextToken();\n // a script must always start with a word...\n try {\n parseStmt();\n } catch (RetException e) {\n return retVal;\n }\n } finally {\n code.curLine=oldLine;\n }\n return null;\n }",
"public void interpretorMainMethod(String code, int mode) {\n\t\t\n\t\t//TODO comments\n\t\t\n\t\t// Used to count the bracket balance\n\t\tint bracket_depth = 0;\t\n\t\t\n\t\t// Loop variables, loop_active designates whether the current line\n\t\t// is a part of a loop, loop_length designates how many times the loop\n\t\t// will run\n\t\tboolean loop_active = false;\n\t\tint loop_length = 0;\t\n\t\t\n\t\t// If statement variable, designates if the if condition\n\t\t// allows for the code that follows it to execute\n\t\tboolean conditional_state = true;\t\n\t\t\n\t\t// A flag the determines whether the current line should\n\t\t// be interpreted\n\t\tboolean skip_line = false;\n\t\t\n\t\t// Function variables, function_name contains the name\n\t\t// of the function currently being ran or written, function_is_being_written\n\t\t// indicates that the current lien of code is part of the function being\n\t\t// written/saved, function_arguments contains the arguments that the\n\t\t// function comes with\n\t\tString function_name = \"\";\n\t\tboolean function_is_being_written = false;\n\t\tLinkedList<String> function_arguments = new LinkedList<>();\n\t\t\n\t\t// The current line number being interpreted\n\t\t// Note: lines in loops, if statements and functions\n\t\t// are counted separately\n\t\tint line_count = 0;\n\t\t\n\t\t// Scanner for the code String\n\t\tScanner line_scanner = new Scanner(code);\n\t\t\n\t\t// This String contains bracketed code which will be passed to\n\t\t// either a new function or to be ran via loop\n\t\tString passed_code = \"\";\n\t\t\n\t\t// Outer interpreter\n\t\twhile(line_scanner.hasNextLine()) {\n\t\t\tline_count++;\n\t\t\tString line_temp = line_scanner.nextLine();\n\t\t\tString line = \"\";\n\t\t\t\n\t\t\t// This code removes the leading spaces from the line\n\t\t\tfor(int i = 0; i<line_temp.length(); i++) {\n\t\t\t\tif(line_temp.charAt(i) != ' ') {\n\t\t\t\t\tline = line_temp.substring(i);\n\t\t\t\t\ti = 999;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Line length after clearing the leading spaces\n\t\t\tint line_length = line.length();\n\t\t\t\n\t\t\t// Bracket depth control\n\t\t\t// Counts bracket depth and makes the inner interpreter skip\n\t\t\t// the first and last bracket\n\t\t\tif(line.contains(\"(\")) {\n\t\t\t\tbracket_depth++;\n\t\t\t\tif(bracket_depth == 1)\n\t\t\t\t\tskip_line = true;\n\t\t\t} else if(line.contains(\")\")) {\n\t\t\t\tbracket_depth--;\n\t\t\t\tif(bracket_depth == 0)\n\t\t\t\t\tskip_line = true;\n\t\t\t} else if(line.isEmpty()) {\n\t\t\t\tskip_line = true;\n\t\t\t}\n\t\t\t\n\t\t\t// Comments skip\n\t\t\t// Makes the inner interpreter skip lines beginning with \"//\"\n\t\t\tif(line_length > 2) {\n\t\t\t\tif(line.substring(0, 2).equals(\"//\"))\n\t\t\t\t\tskip_line = true;\n\t\t\t}\n\t\t\t\n\t\t\t// if statement lock/skip\n\t\t\t// Makes the inner interpreter skip 'if' statement blocks if\n\t\t\t// the 'if' statement is false\n\t\t\tif(!conditional_state && bracket_depth != 0) {\n\t\t\t\tskip_line = true;\n\t\t\t} else if(!conditional_state && bracket_depth == 0) {\n\t\t\t\tconditional_state = true;\n\t\t\t}\n\t\t\t\t\n\t\t\t// Inner interpreter\n\t\t\t// Handles the syntax interpretation and execution\n\t\t\tif(!skip_line) {\n\t\t\t\t\n\t\t\t\t// This checks if we have reached the end of the function declaration,\n\t\t\t\t// should we do the function is saved in the function map\n\t\t\t\tif(bracket_depth == 0 && function_is_being_written) {\t\t\t\t\t\t\t\t\n\t\t\t\t\tfunction_is_being_written = false;\n\t\t\t\t\tfunctions.put(function_name, functionHandler(function_arguments, passed_code, \"write\"));\n\t\t\t\t\tfunction_arguments.clear();\n\t\t\t\t\tpassed_code = \"\";\n\t\t\t\t\t\n\t\t\t\t// This checks if we have reached the end of the code block contained in the loop,\n\t\t\t\t// should we do the code contained in the loop (the passed_code variable)\n\t\t\t\t// gets passed along in a recursive call to the interpreter main method.\n\t\t\t\t} else if(bracket_depth == 0 && loop_active){\n\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\tfor(int i=0; i<loop_length; i++)\n\t\t\t\t\t\t\tinterpretorMainMethod(passed_code, 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor(int i=0; i<loop_length; i++)\n\t\t\t\t\t\t\tinterpretorMainMethod(passed_code, 0);\n\t\t\t\t\t}\n\t\t\t\t\tloop_active = false;\n\t\t\t\t\tloop_length = 0;\n\t\t\t\t\tpassed_code = \"\";\n\t\t\t\t\t\n\t\t\t\t// This checks if we have reached the end of code block contained in the 'if'\n\t\t\t\t// Statement, should we do: the conditional_state variable is set to true\n\t\t\t\t} else if(bracket_depth == 0 && !conditional_state) {\t\t\n\t\t\t\t\tconditional_state = true;\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t// If either the function_is_being_written or loop_active variables are true\n\t\t\t\t// we simply pass the current line to a temporary string without\n\t\t\t\t// interpreting it\n\t\t\t\tif(function_is_being_written || loop_active) {\n\t\t\t\t\tpassed_code += line + \"\\n\";\n\t\t\t\t\t\n\t\t\t\t// Secondary bracket skips, this is here only on account of having to\n\t\t\t\t// check the function, loop, 'if' statement endings\n\t\t\t\t} else if(line.contains(\"(\") || line.contains(\")\")) {\n\t\t\t\t\t\n\t\t\t\t// The key words are checked\n\t\t\t\t} else {\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// This loop determines the location of the first non-space character.\n\t\t\t\t\t// However as the code above indicates, this will always be 0, because\n\t\t\t\t\t// we remove the empty spaces beforehand in the Outer interpreter.\n\t\t\t\t\t// The loop here is simply for debugging purposes.\n\t\t\t\t\tint empty_space = 0;\n\t\t\t\t\tboolean space_error = false;\t\t\t\t\n\t\t\t\t\twhile(line.charAt(empty_space) == ' ' || space_error) {\n\t\t\t\t\t\tempty_space++;\n\t\t\t\t\t\tif(empty_space == 50) {\n\t\t\t\t\t\t\tspace_error = true;\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// stop statement\n\t\t\t\t\t// Syntax: stop\n\t\t\t\t\t// Corresponds to: no java counterpart\n\t\t\t\t\t// Indicates the end of a code block\n\t\t\t\t\tif (line.contains(\"stop\") && line.length() < 7) {\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// def statement\n\t\t\t\t\t// Syntax: def x : y\n\t\t\t\t\t// Corresponds to: int x = y; OR Double x = y; OR String x = y;\n\t\t\t\t\telse if(line_length > 3 && line.substring(empty_space, empty_space+4).equals(\"def \")) {\n\t\t\t\t\t\tint end_of_word_offset;\n\t\t\t\t\t\tString var_name = \"\";\n\t\t\t\t\t\tString var_definition = \"\";\n\t\t\t\t\t\tboolean comma_present = false;\n\t\t\t\t\t\tint offset = empty_space+4;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// This loop finds and assigns the definition components:\n\t\t\t\t\t\t// the var_name - the name of the variable we are defining\n\t\t\t\t\t\t// the var_definition - the contents of the variable\n\t\t\t\t\t\twhile(offset < line_length) {\n\t\t\t\t\t\t\tif(line.charAt(offset) == ' ')\n\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif(var_name.isEmpty()) {\n\t\t\t\t\t\t\t\t\tend_of_word_offset = nextWordEndIndex(line, offset);\n\t\t\t\t\t\t\t\t\tvar_name = line.substring(offset, end_of_word_offset);\n\t\t\t\t\t\t\t\t\toffset = end_of_word_offset;\n\t\t\t\t\t\t\t\t} else if(!comma_present && line.charAt(offset) == ':') {\n\t\t\t\t\t\t\t\t\tcomma_present = true;\n\t\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t\t} else if(var_definition.isEmpty() && comma_present) {\n\t\t\t\t\t\t\t\t\tvar_definition = line.substring(offset, line_length);\n\t\t\t\t\t\t\t\t\toffset = line_length;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\toffset = line_length;\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\t\n\t\t\t\t\t\t// This checks if the definition syntax is correct\n\t\t\t\t\t\tif(var_name.isEmpty() || var_definition.isEmpty() || !comma_present) {\n\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad definition syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// This checks if we are using a reserved word as the name of the variable\n\t\t\t\t\t\t\tif(!(var_name.equals(\"def\") && var_name.equals(\"inc\") && var_name.equals(\"dec\") && var_name.equals(\"output\") && var_name.equals(\"loop\") && var_name.equals(\"if\") && var_name.equals(\"loadfile\"))) {\n\t\t\t\t\t\t\t\tif(isNumber(var_definition)) {\n\t\t\t\t\t\t\t\t\tif(mode == 0)\n\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name, 0.0 + Integer.parseInt(var_definition));\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tlocal_double_variables.put(var_name, 0.0 + Integer.parseInt(var_definition));\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(var_definition.length() > 4) {\n\t\t\t\t\t\t\t\t\t\tif(var_definition.substring(0, 4).equals(\"var.\")) {\n\t\t\t\t\t\t\t\t\t\t\tString key = var_definition.substring(4, var_definition.length());\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocal_double_variables.put(var_name, local_double_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse if(local_string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocal_string_variables.put(var_name, local_string_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse if(double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocal_double_variables.put(var_name, double_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse if(string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocal_string_variables.put(var_name, string_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad variable call in def. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name,double_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse if(string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tstring_variables.put(var_name,string_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad variable call in def. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif(mode == 0)\n\t\t\t\t\t\t\t\t\t\t\t\tstring_variables.put(var_name, var_definition);\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tlocal_string_variables.put(var_name, var_definition);\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} else {\n\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: prohibited reserved word use. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\n\t\t\t\t\t\n\t\t\t\t\t// inc statement\n\t\t\t\t\t// Syntax: inc x\n\t\t\t\t\t// Corresponds to: x++;\n\t\t\t\t\telse if(line_length > 3 && line.substring(empty_space, empty_space+4).equals(\"inc \")) {\n\t\t\t\t\t\tString var_name;\n\t\t\t\t\t\tint offset = empty_space+4;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(offset < line_length) {\n\t\t\t\t\t\t\tif(line.charAt(offset) == ' ') {\n\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar_name = line.substring(offset, line_length).replaceAll(\"\\\\s+\",\"\");\n\t\t\t\t\t\t\t\tif(!var_name.isEmpty()) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tlocal_double_variables.put(var_name, local_double_variables.get(var_name)+1.0);\n\t\t\t\t\t\t\t\t\t\telse if(double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name, double_variables.get(var_name)+1.0);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad increment syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name, double_variables.get(var_name)+1.0);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad increment syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad increment syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\toffset = line_length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// dec statement\n\t\t\t\t\t// Syntax: dec x\n\t\t\t\t\t// Corresponds to: x--;\n\t\t\t\t\telse if(line_length > 3 && line.substring(empty_space, empty_space+4).equals(\"dec \")) {\n\t\t\t\t\t\tString var_name;\n\t\t\t\t\t\tint offset = empty_space+4;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(offset < line_length) {\n\t\t\t\t\t\t\tif(line.charAt(offset) == ' ') {\n\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar_name = line.substring(offset, line_length).replaceAll(\"\\\\s+\",\"\");\n\t\t\t\t\t\t\t\tif(!var_name.isEmpty()) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tlocal_double_variables.put(var_name, local_double_variables.get(var_name)-1.0);\n\t\t\t\t\t\t\t\t\t\telse if(double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name, double_variables.get(var_name)-1.0);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad increment syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name, double_variables.get(var_name)-1.0);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad increment syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad decrement syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\toffset = line_length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// output statement\n\t\t\t\t\t// Syntax: output : x\n\t\t\t\t\t// Corresponds to: System.out.println(x);\t\t\t\t\n\t\t\t\t\telse if(line_length > 8 && line.substring(empty_space, empty_space+9).equals(\"output : \")) {\n\t\t\t\t\t\tint end_of_word_offset;\n\t\t\t\t\t\tString output_string = \"\";\n\t\t\t\t\t\tString temp_word;\n\t\t\t\t\t\tint offset = empty_space+9;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(offset < line_length) {\n\t\t\t\t\t\t\tif(line.charAt(offset) == ' ') {\n\t\t\t\t\t\t\t\toutput_string += line.charAt(offset);\n\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tend_of_word_offset = nextWordEndIndex(line, offset);\n\t\t\t\t\t\t\t\ttemp_word = line.substring(offset, end_of_word_offset);\n\t\t\t\t\t\t\t\toffset = end_of_word_offset;\n\t\t\t\t\t\t\t\tif(temp_word.length() > 4) {\n\t\t\t\t\t\t\t\t\tif(temp_word.substring(0, 4).equals(\"var.\")) {\n\t\t\t\t\t\t\t\t\t\tString key = temp_word.substring(4, temp_word.length());\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += local_double_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse if(local_string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += local_string_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse if(double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += double_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse if(string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += string_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad variable call in output. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += double_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse if(string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += string_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad variable call in output. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\toutput_string += temp_word;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\toutput_string += temp_word;\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\tminc.consolearea.append(output_string+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// loop statement\n\t\t\t\t\t// Syntax: loop x\n\t\t\t\t\t// Corresponds to: for(int i=0; i<x; i++)\n\t\t\t\t\telse if(line_length > 4 && line.substring(empty_space, empty_space+5).equals(\"loop \")) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString next_element = line.substring(empty_space+5, nextWordEndIndex(line, empty_space+5));\n\t\t\t\t\t\t\t// Flags the loop as active for the interpreter\n\t\t\t\t\t\t\tloop_active = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// These conditions attempt to retrieve the loop variable, or\n\t\t\t\t\t\t\t// the number of times the loop will execute\n\t\t\t\t\t\t\tif(isNumber(next_element)) {\n\t\t\t\t\t\t\t\tloop_length = Integer.parseInt(next_element);\n\t\t\t\t\t\t\t} else if(mode == 1) {\n\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(next_element))\n\t\t\t\t\t\t\t\t\tloop_length += local_double_variables.get(next_element);\n\t\t\t\t\t\t\t\telse if(double_variables.containsKey(next_element))\n\t\t\t\t\t\t\t\t\tloop_length += double_variables.get(next_element);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad loop syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif(double_variables.containsKey(next_element))\n\t\t\t\t\t\t\t\t\tloop_length += double_variables.get(next_element);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad loop syntax. line \"+line_count+\"\\n\");\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} catch (IndexOutOfBoundsException e) {\n\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad loop syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// if statement\n\t\t\t\t\t// Syntax and correspondent expressions explained below\n\t\t\t\t\t// This is a rather length segment of the interpreter, however the code logic\n\t\t\t\t\t// is very simple: the code checks for proper syntax and whether the called\n\t\t\t\t\t// variables are defined. The length is a product of the possible combinations of\n\t\t\t\t\t// variable types.\n\t\t\t\t\telse if(line_length > 2 && line.substring(empty_space, empty_space+3).equals(\"if \")) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString next_element = line.substring(empty_space+3, nextWordEndIndex(line, empty_space+3));\t\n\t\t\t\t\t\t\tString lhs;\n\t\t\t\t\t\t\tString rhs;\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Equals condition\n\t\t\t\t\t\t\t// Syntax: if eq x y\n\t\t\t\t\t\t\t// Corresponds to: if(x == y)\n\t\t\t\t\t\t\tif(next_element.equals(\"eq\")) {\n\t\t\t\t\t\t\t\tlhs = line.substring(empty_space+6, nextWordEndIndex(line, empty_space+6));\n\t\t\t\t\t\t\t\trhs = line.substring(empty_space+6+lhs.length()+1, nextWordEndIndex(line, empty_space+6+lhs.length()+1));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(isNumber(lhs) && isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) != Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(isNumber(lhs)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) != local_double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) != double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) != double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t} else if(isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs) != Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) != Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) != Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs) && local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs)+1 != local_double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs)+1 != double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs) && local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 != local_double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 != double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_string_variables.containsKey(rhs) && local_string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(!local_string_variables.get(lhs).equals(local_string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(!local_string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && local_string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(!string_variables.get(lhs).equals(local_string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(!string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 != double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(!string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Not equals condition\n\t\t\t\t\t\t\t// Syntax: if neq x y\n\t\t\t\t\t\t\t// Corresponds to: if(x != y)\n\t\t\t\t\t\t\t} else if(next_element.equals(\"neq\")) {\n\t\t\t\t\t\t\t\tlhs = line.substring(empty_space+7, nextWordEndIndex(line, empty_space+7));\n\t\t\t\t\t\t\t\trhs = line.substring(empty_space+7+lhs.length()+1, nextWordEndIndex(line, empty_space+7+lhs.length()+1));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(isNumber(lhs) && isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) == Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(isNumber(lhs)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) == local_double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) == double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) == double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t} else if(isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs) == Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) == Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) == Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs) && local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs)+1 == local_double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs)+1 == double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs) && local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 == local_double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 == double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_string_variables.containsKey(rhs) && local_string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_string_variables.get(lhs).equals(local_string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && local_string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(string_variables.get(lhs).equals(local_string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 == double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Less than condition\n\t\t\t\t\t\t\t// Syntax: if lt x y\n\t\t\t\t\t\t\t// Corresponds to: if(x < y)\n\t\t\t\t\t\t\t} else if(next_element.equals(\"lt\")) {\n\t\t\t\t\t\t\t\tlhs = line.substring(empty_space+6, nextWordEndIndex(line, empty_space+6));\n\t\t\t\t\t\t\t\trhs = line.substring(empty_space+6+lhs.length()+1, nextWordEndIndex(line, empty_space+6+lhs.length()+1));\n\t\t\t\t\t\t\t\tif(isNumber(lhs) && isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) >= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(isNumber(lhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) >= local_double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) >= double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) >= double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\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} else if(isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs) >= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) >= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) >= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 >= double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Greater than condition\n\t\t\t\t\t\t\t// Syntax: if gt x y\n\t\t\t\t\t\t\t// Corresponds to: if(x > y)\n\t\t\t\t\t\t\t} else if(next_element.equals(\"gt\")) {\n\t\t\t\t\t\t\t\tlhs = line.substring(empty_space+6, nextWordEndIndex(line, empty_space+6));\n\t\t\t\t\t\t\t\trhs = line.substring(empty_space+6+lhs.length()+1, nextWordEndIndex(line, empty_space+6+lhs.length()+1));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(isNumber(lhs) && isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) <= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(isNumber(lhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) <= local_double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) <= double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) <= double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\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} else if(isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs) <= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) <= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) <= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 <= double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\"\\n\");\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// loadfile statement\n\t\t\t\t\t// Syntax: loadfile filename.minl\n\t\t\t\t\t// Corresponds to: no java analog\n\t\t\t\t\t// This code simply executes the MinL code written on another file.\n\t\t\t\t\telse if(line_length > 8 && line.substring(empty_space, empty_space+9).equals(\"loadfile \")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString next_element = line.substring(empty_space+9, nextWordEndIndex(line, empty_space+9));\n\t\t\t\t\t\t\tfileLoaderMethod(next_element);\t\n\t\t\t\t\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\t\t\t\t\t//TODO error test\n\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad loadfile syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// function declaration/call\n\t\t\t\t\t// Syntax: f.function_name x y z\n\t\t\t\t\t// Corresponds to: public void function_name(int/Double/String x, int/Double/String y, int/Double/String z)\n\t\t\t\t\telse if(line_length > 1 && line.substring(empty_space, empty_space+2).equals(\"f.\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString next_element = line.substring(empty_space+2, nextWordEndIndex(line, empty_space+2));\t\t\t\t\t\n\t\t\t\t\t\t\tfunction_name = \"f.\"+next_element;\t\n\t\t\t\t\t\t\t// These two conditions identify whether the function called is defined or not\n\t\t\t\t\t\t\t// if it is the function is simply called, if not it is declared. The syntax for call is simple:\n\t\t\t\t\t\t\t// f.function_name argument1 argument2 etc...\n\t\t\t\t\t\t\t// The syntax for declare requires a code block:\n\t\t\t\t\t\t\t// f.function_name argument_name1 argument_name2 etc...\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\t// loop argument_name1\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\t// inc argument_name2\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tif(functions.containsKey(function_name)) {\n\t\t\t\t\t\t\t\t// Function call code\n\t\t\t\t\t\t\t\tif(function_name.length() == line_length) {\n\t\t\t\t\t\t\t\t\tinterpretorMainMethod(functions.get(function_name), 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tint offset = function_name.length()+1;\t\n\t\t\t\t\t\t\t\t\t// This loop retrieves and saves the function arguments in a list\n\t\t\t\t\t\t\t\t\twhile(offset < line.length()) {\n\t\t\t\t\t\t\t\t\t\tif(line.charAt(offset) == ' ') {\n\t\t\t\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tnext_element = line.substring(offset, nextWordEndIndex(line, offset));\n\t\t\t\t\t\t\t\t\t\t\toffset = nextWordEndIndex(line, offset);\n\t\t\t\t\t\t\t\t\t\t\tfunction_arguments.add(next_element);\n\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// The function is called via recursive call to the interpreterMainMethod\n\t\t\t\t\t\t\t\t\tinterpretorMainMethod(functionHandler(function_arguments, functions.get(function_name), \"read\"), 1);\n\t\t\t\t\t\t\t\t\tlocal_double_variables.clear();\n\t\t\t\t\t\t\t\t\tlocal_string_variables.clear();\n\t\t\t\t\t\t\t\t\tfunction_arguments.clear();\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// function declare code\n\t\t\t\t\t\t\t\t// take note the function isn't actually saved here, but in the code far above\n\t\t\t\t\t\t\t\tfunction_is_being_written = true;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(function_name.length() != line_length) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tint offset = function_name.length()+1;\n\t\t\t\t\t\t\t\t\t// This loop retrieves and saves the function arguments in a list\n\t\t\t\t\t\t\t\t\twhile(offset < line.length()) {\n\t\t\t\t\t\t\t\t\t\tif(line.charAt(offset) == ' ') {\n\t\t\t\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tnext_element = line.substring(offset, nextWordEndIndex(line, offset));\n\t\t\t\t\t\t\t\t\t\t\toffset = nextWordEndIndex(line, offset);\n\t\t\t\t\t\t\t\t\t\t\tfunction_arguments.add(next_element);\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} catch (IndexOutOfBoundsException e) {\n\t\t\t\t\t\t\t//TODO error test\n\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad function syntax. line \"+line_count+\"\\n\"+line);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t// report error\n\t\t\t\t\telse {\n\t\t\t\t\t\tminc.consolearea.append(\"Error: Unknown Operation. line \"+line_count+\"\\n\"+line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tskip_line = false;\n\t\t\t}\t\n\t\t}\n\t}",
"Code getCode();",
"public String getPyCode() {\n return pyCode;\n }",
"public String getPyCode() {\n return pyCode;\n }",
"void setCode(LineLoader in) {\n code=in;\n }",
"public ProgramParser(String[] args) throws InterpreterException {\n java.util.Scanner scanner;\n String text = \"\";\n try {\n scanner = new java.util.Scanner(new java.io.File(args[0]));\n text = scanner.useDelimiter(\"\\u005c\\u005cA\").next();\n scanner.close();\n ProgramParser.programCode = new java.io.StringReader(text);\n } catch (FileNotFoundException ex) {\n throw new InterpreterException(\"FileNotFoundException\", \"Check file path.\", ex.getMessage());\n }\n ProgramParser.stringInput = args[1];\n System.out.println(\"Program: \" + args[0] + \" - input: \" + stringInput);\n //System.out.println(\"code\\n\" + text + \"\\n---Done\");\n }",
"protected void runLexer()\n\t{\n\t\tString args[] = {input.getAbsolutePath(), \"*.java\", output.getAbsolutePath(), \"0\", \"full\", \"-1\", \"1.0\", \"--in_place\", \"--metadata_light\"};\n\t\tExternalOperation.callScript(\"python2.7\", lexer, args);\n\t}",
"public String getCode(){\n\t\treturn new SmartAPIModel().getCpSourceCode(cp.getLocalName());\n\t}",
"@Override\n\tpublic Object visitSource_StringLiteral(Source_StringLiteral source_StringLiteral, Object arg) throws Exception {\n\t\tmv.visitLdcInsn(source_StringLiteral.fileOrUrl);\n\t\treturn null;\n\t}",
"Value eval(String script, String name, String contentType, boolean interactive) throws Exception;",
"public abstract Source load(ModuleName name);",
"public IRubyObject runInterpreterBody(Node scriptNode) {\n assert scriptNode != null : \"scriptNode is not null\";\n assert scriptNode instanceof RootNode : \"scriptNode is not a RootNode\";\n \n return runInterpreter(((RootNode) scriptNode).getBodyNode());\n }",
"@Override\r\n\tpublic String execute(String script) {\n\t\treturn script+\"sb\";\r\n\t}",
"public static PythonInterpreter threadLocalStateInterpreter(PyObject dict) {\n return null;\n }",
"public void translateImplementation( Code code );",
"public String getCode(ClassDecl cl)\r\n\t{\r\n\t\tString testcode = \"#Region \\\"Testing code generated by KawigiEdit\\\"\\n\";\r\n\t\ttestcode += \"Module MainModule\\n\";\r\n\t\ttestcode += \"\\tSub Main()\\n\";\r\n\t\tEditorDataType returnType = cl.getMethod().getReturnType();\r\n\t\ttestcode += \"\\t\\tDim Errors As Boolean = False\\n\";\r\n\t\ttestcode += \"\\t\\tDim Answer, DesiredAnswer As \" + EditorLanguage.VB.getName(returnType) + \"\\n\";\r\n\t\ttestcode += \"\\t\\tDim Obj As \" + cl.getName() + \"\\n\";\r\n\t\ttestcode += \"\\t\\tDim Time As DateTime\\n\";\r\n\t\tif (returnType.isArrayType())\r\n\t\t{\r\n\t\t\ttestcode += \"\\t\\tDim Same As Boolean\\n\";\r\n\t\t\ttestcode += \"\\t\\tDim i As Integer\\n\";\r\n\t\t}\r\n\t\tboolean stringType = returnType.isType(EditorDataType.String);\r\n\t\tEditorDataType[] paramTypes = cl.getMethod().getParamTypes();\r\n\t\ttestcode += \"\\t\\t<%:start-tests%>\\n\";\r\n\t\tfor (int i=0; i<cl.countTests(); i++)\r\n\t\t{\r\n\t\t\ttestcode += \"\\t\\tObj = New \" + cl.getName() + \"()\\n\";\r\n\t\t\ttestcode += \"\\t\\tTime = DateTime.Now\\n\";\r\n\t\t\ttestcode += \"\\t\\tAnswer = Obj.\" + cl.getMethod().getName() + \"(\" + toTest(cl.getTest(i).getParameters(), paramTypes) + \")\\n\";\r\n\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Time: \\\" & (DateTime.Now.Subtract(Time)).TotalSeconds & \\\" seconds\\\")\\n\";\r\n\t\t\ttestcode += \"\\t\\tDesiredAnswer = \" + translateObject(returnType, cl.getTest(i).getAnswer()) + \"\\n\";\r\n\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Your Answer:\\\")\\n\";\r\n\t\t\tif (returnType.isArrayType())\r\n\t\t\t{\r\n\t\t\t\ttestcode += \"\\t\\tConsole.Write(\\\"{ \\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf (Answer.Length > 0) Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.Write(\" + (stringType ? \"\\\"\\\"\\\"\\\" & \" : \"\") + \"Answer(0)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tFor i = 1 To Answer.Length - 1\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tConsole.Write(\\\"\\t, \" + (stringType ? \"\\\"\\\"\" : \"\") + \"\\\" & Answer(i)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tNext\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\" }\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"}\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Desired Answer:\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.Write(\\\"{ \\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf (DesiredAnswer.Length > 0) Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.Write(\" + (stringType ? \"\\\"\\\"\\\"\\\" & \" : \"\") + \"DesiredAnswer(0)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tFor i = 1 To DesiredAnswer.Length - 1\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tConsole.Write(\\\", \" + (stringType ? \"\\\"\\\"\" : \"\") + \"\\\" & DesiredAnswer(i)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tNext\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\" }\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"}\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tSame = (Answer.Length = DesiredAnswer.Length)\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf (Same)\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tFor i = 0 To DesiredAnswer.Length - 1\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tIf Answer(i) <> DesiredAnswer(i) Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\t\\tSame = False\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tNext\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf Same Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"Match :-)\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"DOESN'T MATCH!!!!\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tErrors = True\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"\\t\" + (stringType ? \"\\\"\\\"\" : \"\") + \"\\\" & Answer\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Desired Answer:\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"\\t\" + (stringType ? \"\\\"\\\"\" : \"\") +\"\\\" & DesiredAnswer\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf Answer = DesiredAnswer Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"Match :-)\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"DOESN'T MATCH!!!!\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tErrors = True\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t}\r\n\t\t\ttestcode += \"\\t\\tConsole.WriteLine()\\n\";\r\n\t\t}\r\n\t\ttestcode += \"\\t\\t<%:end-tests%>\\n\";\r\n\t\ttestcode += \"\\t\\t\\n\\t\\tIf Errors Then\\n\";\r\n\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"Some of the test cases had errors :-(\\\")\\n\";\r\n\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"You're a stud (at least on the test data)! :-D \\\")\\n\";\r\n\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\ttestcode += \"\\tEnd Sub\\n\";\r\n\t\ttestcode += \"End Module\\n\";\r\n\t\ttestcode += \"#End Region\\n\";\r\n\t\treturn testcode;\r\n\t}",
"java.lang.String getSourceFile();",
"private GenericVar run(String code) throws InterpreterException {\n\t\treturn evaluate(code);\n\t}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 273,\n FQN=\"llvm::Module::setModuleInlineAsm\", NM=\"_ZN4llvm6Module18setModuleInlineAsmENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZN4llvm6Module18setModuleInlineAsmENS_9StringRefE\")\n //</editor-fold>\n public void setModuleInlineAsm(StringRef Asm) {\n GlobalScopeAsm.$assignMove(Asm.$string());\n if (!GlobalScopeAsm.empty() && GlobalScopeAsm.back() != $$LF) {\n GlobalScopeAsm.$addassign_T($$LF);\n }\n }",
"InterpreterRuntimeContext createInterpreterRuntimeContext();",
"public static XMLEncoder encoderFromScript (String script) {\n PythonInterpreter pi = new NoErrorPython();\n if (script != null)\n pi.exec(script);\n PyObject product = pi.eval(MAGIC_FUNCTION);\n if (product instanceof PyFunction) {\n return new Func((PyFunction) product);\n }\n else {\n Object obj = product.__tojava__(XMLEncoder.class);\n if (obj instanceof XMLEncoder)\n return (XMLEncoder) obj;\n }\n throw new IllegalArgumentException(\n \"JPython script did not yield a function or an XMLEncoder\");\n }",
"public CodeFragment getCode() {\n\t\treturn code;\n\t}",
"@Override\n public boolean isCodeFragmentEvaluationSupported() {\n // TODO: Add support for this if possible\n return false;\n }",
"public String sourceCode() {\n\t\treturn m_sourceCode;\n\t}",
"static String methodCode(Source code, Set<String> relevant){\n final UnitLocation located = locateUnit(code, relevant);\n final SourceSelection selection = new SourceSelection(ImmutableList.of(located));\n return selection.toCode();\n }",
"public interface PyRunnable {\n /**\n * Return the org.jpp.modules code object.\n */\n abstract public PyCode getMain();\n}",
"protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(request.backend, request.graph.getAssumptions(), request.graph.method(), request.graph.getMethods(), request.graph.getFields(), bytecodeSize, lirGenRes,\n request.compilationResult, request.installedCodeOwner, request.factory);\n }",
"public final void cpp() {\n }",
"protected String codeBlockSource(Block block) {\n block.removeFirstOperation(); // aload_0\n block.removeFirstOperation(); // aload_1\n block.removeFirstOperation(); // iload_2\n block.removeFirstOperation(); // invokespecial <init>\n\n if (getTopBlock().getOperations().size() == 1 &&\n getTopBlock().getOperations().get(0) instanceof ReturnView) {\n return null;\n }\n\n return super.codeBlockSource(block);\n }",
"public static void main(String[] args) throws Exception {\n\n VerbaCodePage codePage = VerbaCodePage.fromFile(null, \"SimpleSource.v\");\n StaticSpaceExpression staticSpaceExpression = new StaticSpaceExpression(codePage);\n\n }",
"WfExecutionObject source () throws BaseException, SourceNotAvailable;",
"public void setCodeBlock(String codeBlock) {\n this.codeBlock = codeBlock;\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 281,\n FQN=\"llvm::Module::appendModuleInlineAsm\", NM=\"_ZN4llvm6Module21appendModuleInlineAsmENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZN4llvm6Module21appendModuleInlineAsmENS_9StringRefE\")\n //</editor-fold>\n public void appendModuleInlineAsm(StringRef Asm) {\n $addassign_string_StringRef(GlobalScopeAsm, /*NO_COPY*/Asm);\n if (!GlobalScopeAsm.empty() && GlobalScopeAsm.back() != $$LF) {\n GlobalScopeAsm.$addassign_T($$LF);\n }\n }",
"public static void main(String[] args) {\n //Ersetzt jetzt mal unseren Parser, Stell Dir vor\n // das Ding liest das Beispiel da oben ^^.\n final StatementNode[] statementNodes = readStatements();\n \n //Zustände:\n // - FillSymbolTable (was für Symbole [variablen, ...] gibt es)\n // - TypInferenz (Was für Typen haben die Expressions und sind die eingaben semantisch korrekt)\n // - CodeGenerierung oder Ausführung (ersetzen wir mit \"schreibe die Werte aller Variablen nach Ende der Ausführung\")\n \n \n final SymbolTabelle symbolTabelle = new SymbolTabelle();\n //IDEE 2:\n //Ich gebe Statements und Expressions nur eine Methode mit Visitor als Callback\n final StatementVisitorSymbolTabelle statementVisitorSymbolTabelle = new StatementVisitorSymbolTabelle(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorSymbolTabelle);\n }\n \n final StatementVisitorTypInferenz statementVisitorTypInferenz = new StatementVisitorTypInferenz(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorTypInferenz);\n }\n \n PseudoLaufContext laufContext = new PseudoLaufContext();\n final StatementVisitorCodeGen statementVisitorCodeGen = new StatementVisitorCodeGen(laufContext);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorCodeGen);\n }\n \n laufContext.druckeVariablen();\n \n //Zusammenfassung:\n //Reduktion des Problems darauf, den Code nur noch von einem Abhängig zu machen\n //Jetzt nur noch abhängig vom Typ des Statements\n \n \n //Problem hierbei:\n //Ich muss selbst angeben, in welchem Zustand ich bin\n //Code-Duplizierung\n }",
"java.lang.String getCode();",
"java.lang.String getCode();",
"Value main(String main);",
"public void runScriptServerSide(String name, String code, INetworkManager manager, EntityPlayer player)\n {\n MinecraftServer minecraftServer = MinecraftServer.getServer();\n if (!minecraftServer.getConfigurationManager().isPlayerOpped(player.username))\n {\n System.out.printf(\"non op user is trying to run server side script %s with content:\\n%s\\n\", name, code);\n throw new WrongUsageException(\"commands.generic.permission\");\n }\n \n if (serverGlobals != null)\n {\n System.out.printf(\"running server side script %s with content:\\n%s\\n\", name, code);\n try {\n serverGlobals.loadString(code, name).call();\n } catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }\n }",
"public TemplateBasedScriptBuilder withCode(String code) {\n this.scriptCode = code;\n return this;\n }",
"public static void main(String[] args) {\n File file = new File(\"./src/testcode.c\");\n \n Compiler compiler = new Compiler(file);\n compiler.compile();\n }",
"public String CodeInterpreter() {\n\n\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\treturn \"DA\" + \"_\" + timeStamp;\n\t}",
"String getSource();",
"CodePosition getCodePosition();",
"public void compileScript( TemplateCompilerContext context )\r\n\t{\r\n\t\t// Compile to bytes\r\n\t\tCompilationUnit unit = new CompilationUnit();\r\n\t\tunit.addSource( context.getPath(), context.getScript().toString() );\r\n\t\tunit.compile( Phases.CLASS_GENERATION );\r\n\r\n\t\t// Results\r\n\t\t@SuppressWarnings( \"unchecked\" )\r\n\t\tList< GroovyClass > classes = unit.getClasses();\r\n\t\tAssert.isTrue( classes.size() > 0, \"Expecting 1 or more classes\" );\r\n\r\n\t\tClassLoader parent = Thread.currentThread().getContextClassLoader();\r\n\t\tif( parent == null )\r\n\t\t\tparent = GroovyTemplateCompiler.class.getClassLoader();\r\n\r\n\t\t// Define the class\r\n\t\t// TODO Configurable class loader\r\n\t\tDefiningClassLoader classLoader = new DefiningClassLoader( parent );\r\n\t\tClass< ? > first = null;\r\n\t\tfor( GroovyClass cls : classes )\r\n\t\t{\r\n\t\t\tClass< ? > clas = classLoader.defineClass( cls.getName(), cls.getBytes() );\r\n\t\t\tif( first == null )\r\n\t\t\t\tfirst = clas; // TODO Are we sure that the first one is always the right one?\r\n\t\t}\r\n\r\n\t\t// Instantiate the first\r\n\t\tGroovyObject object = (GroovyObject)Util.newInstance( first );\r\n\t\tClosure closure = (Closure)object.invokeMethod( \"getClosure\", null );\r\n\r\n\t\t// The old way:\r\n//\t\tClass< GroovyObject > groovyClass = new GroovyClassLoader().parseClass( new GroovyCodeSource( getSource(), getName(), \"x\" ) );\r\n\r\n\t\tcontext.setTemplate( new GroovyTemplate( closure ) );\r\n\t}",
"public static void generateCode()\n {\n \n }",
"public static Object evalSpecial(Context cx, Scriptable scope, \n Object thisArg, Object[] args, \n String filename, int lineNumber)\n throws JavaScriptException\n {\n if (args.length < 1)\n return Undefined.instance;\n Object x = args[0];\n if (!(x instanceof String)) {\n String message = Context.getMessage(\"msg.eval.nonstring\", null);\n Context.reportWarning(message);\n return x;\n }\n int[] linep = { lineNumber };\n if (filename == null) {\n filename = Context.getSourcePositionFromStack(linep);\n if (filename == null) {\n filename = \"<eval'ed string>\";\n linep[0] = 1;\n }\n }\n \n try {\n StringReader in = new StringReader((String) x);\n Object securityDomain = cx.getSecurityDomainForStackDepth(3);\n \n // Compile the reader with opt level of -1 to force interpreter\n // mode.\n int oldOptLevel = cx.getOptimizationLevel();\n cx.setOptimizationLevel(-1);\n Script script = cx.compileReader(null, in, filename, linep[0], \n securityDomain);\n cx.setOptimizationLevel(oldOptLevel);\n \n // if the compile fails, an error has been reported by the\n // compiler, but we need to stop execution to avoid\n // infinite looping on while(true) { eval('foo bar') } -\n // so we throw an EvaluatorException.\n if (script == null) {\n String message = Context.getMessage(\"msg.syntax\", null);\n throw new EvaluatorException(message);\n }\n \n InterpretedScript is = (InterpretedScript) script;\n Object result = is.call(cx, scope, (Scriptable) thisArg, null);\n \n return result;\n }\n catch (IOException ioe) {\n // should never happen since we just made the Reader from a String\n throw new RuntimeException(\"unexpected io exception\");\n }\n \n }",
"public PythonInterpreter() {\n }",
"abstract protected void pre(int code);",
"private void parse() {\r\n for (int length = sourceCode.length(); index < length; ++index) {\r\n char c = sourceCode.charAt(index);\r\n if (!Character.isWhitespace(c)) {\r\n ArrayList<String> tokens = tokenizeStatement(sourceCode);\r\n if (tokens != null) {\r\n parseStatementTokens(tokens);\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }",
"public static void main(String[] args) {\n\t\t\n\t\tchar[] buffer = \"\\\"use strict\\\";\\r\\nfunction sum(x, y){ return x + y }\".toCharArray();\n\t\tSource source = new Source(\"src\\\\test\\\\resources\\\\a.txt\", buffer);\n\t\t\n\t\tParseOption option = new ParseOption();\n\t\t\n\t\tParser parser = new Parser();\n\t\t\n\t\tparser.parse(source, option);\n\n\t}",
"public static void load(String string, boolean start) {\r\n\t\ttry {\r\n\t\t\tHamster._re_init();\r\n\t\t\tinitPython();\r\n\t\t\tinterpreter.exec(string);\r\n\t\t} catch (Throwable e) {\r\n\t\t\tif (!de.hamster.debugger.model.DebuggerModel.isStop) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.toString(),\r\n\t\t\t\t\t\t\"Python-Exception\", JOptionPane.ERROR_MESSAGE, null);\r\n\t\t\t}\r\n\t\t\tde.hamster.debugger.model.DebuggerModel.isStop = false;\r\n\t\t}\r\n\t}",
"public void runProgram() {\n\t\tJTextPane code = ((MinLFile) tabbedPane.getSelectedComponent()).CodeArea;\n\t\tminc.consolearea.setText(\"\");\n\t\tinterpretorMainMethod(code.getText(), 0);\n\t\tdouble_variables.clear();\n\t\tstring_variables.clear();\n\t\tfunctions.clear();\n\t}",
"@Override\n protected String getInitialSourceFragment(PythonParseTree.PythonParser.FuncdefContext function) {\n int startWithDecorators;\n RuleContext parent = function.getParent();\n if (parent instanceof PythonParseTree.PythonParser.Class_or_func_def_stmtContext) {\n startWithDecorators = ((PythonParseTree.PythonParser.Class_or_func_def_stmtContext) parent).getStart().getLine();\n } else {\n startWithDecorators = getNameLineNumber();\n }\n String source = getSourceFileContent() + \"\\n<EOF>\";\n // TODO remove trailing whitespace lines\n return Utl.getTextFragment(source, startWithDecorators, getEndLineNumber());\n }",
"public byte[] code();",
"java.lang.String getSourceContext();",
"public java.lang.String getSource() {\r\n return localSource;\r\n }",
"public void generateCode(String[] sourceCode) {\n LexicalAnalyser lexicalAnalyser = new LexicalAnalyser(Helper.getInstructionSet());\n SynaticAnalyser synaticAnalyser = new SynaticAnalyser(console);\n HashMap<Integer, Instruction> intermediateRepresentation =\n synaticAnalyser.generateIntermediateRepresentation(\n lexicalAnalyser.generateAnnotatedToken(sourceCode));\n\n if (intermediateRepresentation == null) {\n this.console.reportError(\"Terminating code generation\");\n return;\n }\n\n printCode(intermediateRepresentation);\n\n FileUtility.saveJavaProgram(null, new JavaProgramTemplate(intermediateRepresentation));\n }",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"private static Map collectReplacedTokens(String encodedSource, boolean escapeUnicode, TokenMapper tm) {\n \tint length = encodedSource.length();\n \t\n\t\tint i = 0;\n\t\tint prevToken = 0;\n\t\tint braceNesting = 0;\n\t\t\n\t\tboolean inArgsList = false;\n boolean primeFunctionNesting = false;\n boolean primeInArgsList = false;\n\t\t\n if (encodedSource.charAt(i) == Token.SCRIPT) {\n ++i;\n }\n\n Stack positionStack = new Stack();\n Stack functionPositionStack = new Stack();\n Map tokenLookup = new HashMap();\n \n\t\twhile (i < length) {\n\t\t\tif (i > 0) {\n\t\t\t\tprevToken = encodedSource.charAt(i - 1);\n\t\t\t}\n\t\t\tswitch (encodedSource.charAt(i)) {\n\t\t\t\tcase Token.NAME:\n\t\t\t\tcase Token.REGEXP: {\n\t\t\t\t\tint jumpPos = getSourceStringEnd(encodedSource, i + 1, escapeUnicode);\n\t\t\t\t\tif (Token.OBJECTLIT == encodedSource.charAt(jumpPos)) {\n\t\t\t\t\t\ti = printSourceString(encodedSource, i + 1, false, null, escapeUnicode);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ti = tm.sourceCompress(encodedSource, i + 1, false, null, prevToken, inArgsList, braceNesting, null);\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase Token.STRING: {\n\t\t\t\t\ti = printSourceString(encodedSource, i + 1, true, null, escapeUnicode);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase Token.NUMBER: {\n\t\t\t\t\ti = printSourceNumber(encodedSource, i + 1, null);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase Token.FUNCTION: {\n\t\t\t\t\t++i; // skip function type\n\t\t\t\t\ttm.incrementFunctionNumber();\n\t\t\t\t\tprimeInArgsList = true;\n\t\t\t\t\tprimeFunctionNesting = true;\n\t\t\t\t\tfunctionPositionStack.push(new Integer(i-1));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Token.LC: {\n\t\t\t\t\t++braceNesting;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Token.RC: {\n\t\t\t\t\tMap m = tm.getCurrentTokens();\n\t\t\t\t\tif (tm.leaveNestingLevel(braceNesting)) {\n\t\t\t\t\t\tInteger pos = (Integer)positionStack.pop();\n\t\t\t\t\t\tInteger functionPos = (Integer)functionPositionStack.pop();\n\t\t\t\t\t\tint[] parents = new int[positionStack.size()];\n\t\t\t\t\t\tint idx = 0;\n\t\t\t\t\t\tfor (Iterator itr = positionStack.iterator(); itr.hasNext();) {\n\t\t\t\t\t\t\tparents[idx++] = ((Integer)itr.next()).intValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDebugData debugData = tm.getDebugData(functionPos);\n\t\t\t\t\t\tReplacedTokens replacedTokens = new ReplacedTokens(m, parents, tokenLookup, debugData); \n\t\t\t\t\t\ttokenLookup.put(pos, replacedTokens);\n\t\t\t\t\t}\n\t\t\t\t\t--braceNesting;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Token.LP: {\n\t\t\t\t\tif (primeInArgsList) {\n\t\t\t\t\t\tinArgsList = true;\n\t\t\t\t\t\tprimeInArgsList = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (primeFunctionNesting) {\n\t\t\t\t\t\tpositionStack.push(new Integer(i));\n\t\t\t\t\t\ttm.enterNestingLevel(braceNesting);\n\t\t\t\t\t\tprimeFunctionNesting = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Token.RP: {\n\t\t\t\t\tif (inArgsList) {\n\t\t\t\t\t\tinArgsList = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t++i;\n\t\t}\n\t\treturn tokenLookup;\n\t}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 241,\n FQN=\"llvm::Module::getModuleInlineAsm\", NM=\"_ZNK4llvm6Module18getModuleInlineAsmEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module18getModuleInlineAsmEv\")\n //</editor-fold>\n public /*const*/std.string/*&*/ getModuleInlineAsm() /*const*/ {\n return GlobalScopeAsm;\n }",
"private String identingCode(int offset, String codeSnippet) {\n\t\tStringBuilder code = new StringBuilder();\n\t\tString[] lineBroken = codeSnippet.split(\"\\n\");\n\t\tfor(int index=0; index < lineBroken.length; index++) {\n\t\t\tString line = lineBroken[index];\n\t\t\tStringBuilder tmpLine = new StringBuilder();\n\t\t\tif(index != 0) {\n\t\t\t\tfor(int i=0; i<offset; i++) {\n\t\t\t\t\ttmpLine.append(\"\");\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\ttmpLine.append(line.replace(\"\\t\", \"\")).append(\"\\n\");\n\t\t\tcode.append(tmpLine);\n\t\t}\n\t\treturn code.toString();\n\t}",
"public void run()\n {\n mkdStack = translateMacroStack(mkdStack);\n //translate mkd to html\n translateMkdToHtml();\n //send html string to global variable\n Compiler.htmlString = htmlStackToString();\n }",
"public void outputSource(int module, int line, String s)\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tappendSource(sb, module, line, s, true);\n\t\tout( sb.toString() );\n\t}",
"protected abstract void runReflectionCodeRaw() throws ReflectionCodeException;",
"@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}",
"public boolean compile(String source) {\n\t return compile(source, true);\n\t}",
"@Nullable\n @Generated\n @Selector(\"sourceApplication\")\n public native String sourceApplication();",
"public String getCompilerSourceVM();",
"public PythXMLEncoder (String script) {\n delegate = encoderFromScript(script);\n }",
"private void instrumentCode(NodeTraversal traversal, Node block, String fnName) {\n block.addChildToFront(newInstrumentationNode(traversal, block, fnName));\n compiler.reportChangeToEnclosingScope(block);\n }",
"public SingleLineSkript(@NotNull SkriptLoader skriptLoader, @NotNull String input) {\n element = skriptLoader.tryParseElement(input, 1);\n }"
] | [
"0.64098126",
"0.59501284",
"0.58379465",
"0.5332252",
"0.53024155",
"0.5274264",
"0.52659327",
"0.52612054",
"0.521353",
"0.5197632",
"0.5059994",
"0.50246406",
"0.49952644",
"0.49616835",
"0.4933018",
"0.49138016",
"0.4889927",
"0.48841244",
"0.4882561",
"0.48652917",
"0.48605436",
"0.4848544",
"0.4848544",
"0.48319414",
"0.48112738",
"0.48027024",
"0.4802048",
"0.47928694",
"0.47928694",
"0.4788286",
"0.47879794",
"0.47734186",
"0.47682205",
"0.47677073",
"0.47555053",
"0.4729299",
"0.47212273",
"0.4711835",
"0.47002378",
"0.46963847",
"0.46817473",
"0.46805537",
"0.4678562",
"0.46774366",
"0.46596587",
"0.46519828",
"0.46501896",
"0.46298093",
"0.46255624",
"0.46252295",
"0.46248186",
"0.4620004",
"0.461474",
"0.46137995",
"0.46115634",
"0.46114075",
"0.46025366",
"0.45955113",
"0.4588333",
"0.45751378",
"0.45751378",
"0.45735177",
"0.45670614",
"0.45580673",
"0.45531014",
"0.45429096",
"0.45387542",
"0.4537647",
"0.45342886",
"0.4528079",
"0.45276543",
"0.45200053",
"0.4516843",
"0.45131758",
"0.4511262",
"0.4503339",
"0.45021772",
"0.44997936",
"0.44967785",
"0.44967604",
"0.44924647",
"0.44888714",
"0.44853473",
"0.44853473",
"0.44853473",
"0.44853473",
"0.44853473",
"0.447989",
"0.4478635",
"0.4473325",
"0.44692957",
"0.4468673",
"0.44606078",
"0.44530284",
"0.444775",
"0.44437033",
"0.44391388",
"0.4437982",
"0.44353187",
"0.4434921"
] | 0.45108983 | 75 |
Executes a Python code object in the local namespace. | public void exec(PyObject code) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T execute() {\n return GraalCompiler.compile(this);\n }",
"public PyObject eval(PyObject code) {\n return null;\n }",
"private GenericVar run(String code) throws InterpreterException {\n\t\treturn evaluate(code);\n\t}",
"public PyCode compile(String script) {\n return null;\n }",
"public IRubyObject runNormally(Node scriptNode) {\n Script script = null;\n boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();\n if (compile || config.isShowBytecode()) {\n script = tryCompile(scriptNode, null, new JRubyClassLoader(getJRubyClassLoader()), config.isShowBytecode());\n }\n \n if (script != null) {\n if (config.isShowBytecode()) {\n return getNil();\n }\n \n return runScript(script);\n } else {\n failForcedCompile(scriptNode);\n \n return runInterpreter(scriptNode);\n }\n }",
"public IRubyObject runInterpreterBody(Node scriptNode) {\n assert scriptNode != null : \"scriptNode is not null\";\n assert scriptNode instanceof RootNode : \"scriptNode is not a RootNode\";\n \n return runInterpreter(((RootNode) scriptNode).getBodyNode());\n }",
"R execute();",
"abstract public PyCode getMain();",
"void execute()\n\t{\n\t\tVM.top++;\n\t\tVM.opStack[VM.top] = arg();\n\t\tVM.pc++;\n\t}",
"@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }",
"CD withCode();",
"public void exec();",
"public static String compileAndRun(String code) throws Exception {\n\t\treturn run(LavaCompiler.compile(code));\n\t}",
"public IRubyObject runScriptBody(Script script) {\n ThreadContext context = getCurrentContext();\n \n try {\n return script.__file__(context, getTopSelf(), Block.NULL_BLOCK);\n } catch (JumpException.ReturnJump rj) {\n return (IRubyObject) rj.getValue();\n }\n }",
"InterpreterRuntimeContext createInterpreterRuntimeContext();",
"Value eval(String script, String name, String contentType, boolean interactive) throws Exception;",
"public void runProgram() {\n\t\tJTextPane code = ((MinLFile) tabbedPane.getSelectedComponent()).CodeArea;\n\t\tminc.consolearea.setText(\"\");\n\t\tinterpretorMainMethod(code.getText(), 0);\n\t\tdouble_variables.clear();\n\t\tstring_variables.clear();\n\t\tfunctions.clear();\n\t}",
"private static native void eval(String script)\n /*-{\n try {\n \t if (script != null) \n eval(\"{ var document = $doc; var window = $wnd; \"+ script + \"}\");\n } catch (e) {\n }\n }-*/;",
"public static void main(String[] args) {\n\t\tThisoperator op = new Thisoperator();\n\t\top.localmethod();\n\t\t\n\n\t}",
"Code getCode();",
"public void executeNode (Node node) {\n if (node.isExecutable()) {\n // If the node is running, we wait for it to stop\n while(isNodeRunning(node.getId())){\n try {\n Thread.sleep(200);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n // Then we launch the execution\n String code = node.getCode();\n\n Kernel k = kernels.get(node.getId());\n k.executeCode(code, node);\n }\n }",
"protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(request.backend, request.graph.getAssumptions(), request.graph.method(), request.graph.getMethods(), request.graph.getFields(), bytecodeSize, lirGenRes,\n request.compilationResult, request.installedCodeOwner, request.factory);\n }",
"private native void eval(String script) /*-{\n \t try {\n \t eval(\"{ var document = $doc; var window = $wnd; \"+ script + \"}\");\n \t } catch (e) {\n \t }\n \t }-*/;",
"public interface JavaCode {\n\n /**\n * Get an unique identification code for an object\n * TODO: This method is not reliable as hash codes are not unique, should use an UUID generator singleton instead.\n *\n * @param obj the object\n * @return the unique identification code\n */\n static int getUniqueID(Object obj) {\n return obj.hashCode();\n }\n\n /**\n * Compiles this code. If an object implements both {@link JavaCode}\n * and {@link JavaExpression}, only one of this method and\n * {@link JavaExpression#compileExpression(Subroutine, JavaScope)} should be called.\n *\n * @param subroutine the subroutine which this code belongs to\n * @param parent the parent scope of this code\n * @throws JTAException if an error occurs\n */\n void compileCode(Subroutine subroutine, JavaScope parent) throws JTAException;\n}",
"public void Execute() {\n\n }",
"protected abstract void runReflectionCodeRaw() throws ReflectionCodeException;",
"Hojas eval();",
"public interface PyRunnable {\n /**\n * Return the org.jpp.modules code object.\n */\n abstract public PyCode getMain();\n}",
"public void translateImplementation( Code code );",
"public abstract Object eval();",
"private static native void eval(String script)\n /*-{\n try {\n if (script == null) return;\n $wnd.eval(script);\n } catch (e) {\n }\n }-*/;",
"@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public <T> T execute(String scriptName) throws NyException {\n return (T) execute(scriptName, EMPTY_MAP);\n }",
"public interface Executable {\n\tvoid execute();\n}",
"public static PythonInterpreter threadLocalStateInterpreter(PyObject dict) {\n return null;\n }",
"public native int execute(String name);",
"public void _run() {\n String[] args = (String[])tEnv.getObjRelation(\"ARGS\");\n\n log.println(\"Running with arguments:\");\n for (int i=0; i< args.length; i++)\n log.println(\"#\" + i + \": \" + args[i]);\n\n oObj.run(args);\n\n tRes.tested(\"run()\", true);\n }",
"public void run() {\r\n // Execute the program\r\n int index = 0;\r\n\r\n while (index < operations.size()) {\r\n Operation o = operations.get(index);\r\n index = o.execute(index, stack, symbolTable);\r\n }\r\n }",
"public interface Code {\n //运行结果编号\n Integer getCode();\n //运行结果描述\n String getDescription();\n String toString();\n\n}",
"void execute(Executable executable);",
"public void execute();",
"public void execute();",
"public void execute();",
"public void execute();",
"private void instrumentCode(NodeTraversal traversal, Node block, String fnName) {\n block.addChildToFront(newInstrumentationNode(traversal, block, fnName));\n compiler.reportChangeToEnclosingScope(block);\n }",
"public CClass execute() {\n return this.executeOnScope(this.staticScope);\n }",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"@Override\n public String runOperation(CallingContext context, RaptureScript script, String ctx, Map<String, Object> params) {\n try {\n ScriptEngine engine = engineRef.get();\n CompiledScript cScript = getOperationScript(engine, script);\n addStandardContext(context, engine);\n engine.put(PARAMS, params);\n engine.put(CTX, ctx);\n Kernel.getKernel().getStat().registerRunScript();\n return JacksonUtil.jsonFromObject(cScript.eval());\n } catch (ScriptException e) {\n Kernel.writeAuditEntry(EXCEPTION, 2, e.getMessage());\n throw RaptureExceptionFactory.create(HttpURLConnection.HTTP_INTERNAL_ERROR, \"Error running script \" + script.getName(), e);\n }\n }",
"public void execute() {\n\t\t\n\t}",
"public PrimObject primitiveEval(PrimContext context) {\n Object[] values = (Object[]) javaValue();\n // Context is invocation context while values[1] is context of the creator of the block.\n context.setupCallContext((PrimContext) values[1]);\n PrimObject receiver = ((PrimContext) values[1]).receiver();\n return ((LambdaBlock) values[0]).apply(this, receiver, context);\n }",
"abstract void exec();",
"public void runScriptServerSide(String name, String code, INetworkManager manager, EntityPlayer player)\n {\n MinecraftServer minecraftServer = MinecraftServer.getServer();\n if (!minecraftServer.getConfigurationManager().isPlayerOpped(player.username))\n {\n System.out.printf(\"non op user is trying to run server side script %s with content:\\n%s\\n\", name, code);\n throw new WrongUsageException(\"commands.generic.permission\");\n }\n \n if (serverGlobals != null)\n {\n System.out.printf(\"running server side script %s with content:\\n%s\\n\", name, code);\n try {\n serverGlobals.loadString(code, name).call();\n } catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }\n }",
"public CompletableFuture<Object> eval(final String script) {\n return eval(script, null, new SimpleBindings());\n }",
"public interface Code {\r\n \r\n /**\r\n * Called to execute the \"next\" line of code in this\r\n * virtual hardware component.\r\n * \r\n * This can be any action (or sequence of actions) as desired by\r\n * the implementation to simulate hardware functions.\r\n * \r\n * @return true when this \"process\" wants to exit.\r\n */\r\n public boolean executeNext();\r\n \r\n /**\r\n * Called when this instruction set should terminate execution permanently.\r\n * This method SHOULD NOT modify the process Identifier or CPU. It should\r\n * only shut down any processing needs and reset internal data if this\r\n * process is executed again.\r\n */\r\n public void shutdown();\r\n\r\n /**\r\n * Get the program name.\r\n */\r\n public String getName();\r\n \r\n // </editor-fold>\r\n }",
"Interpreter getInterpreter();",
"public void interpretorMainMethod(String code, int mode) {\n\t\t\n\t\t//TODO comments\n\t\t\n\t\t// Used to count the bracket balance\n\t\tint bracket_depth = 0;\t\n\t\t\n\t\t// Loop variables, loop_active designates whether the current line\n\t\t// is a part of a loop, loop_length designates how many times the loop\n\t\t// will run\n\t\tboolean loop_active = false;\n\t\tint loop_length = 0;\t\n\t\t\n\t\t// If statement variable, designates if the if condition\n\t\t// allows for the code that follows it to execute\n\t\tboolean conditional_state = true;\t\n\t\t\n\t\t// A flag the determines whether the current line should\n\t\t// be interpreted\n\t\tboolean skip_line = false;\n\t\t\n\t\t// Function variables, function_name contains the name\n\t\t// of the function currently being ran or written, function_is_being_written\n\t\t// indicates that the current lien of code is part of the function being\n\t\t// written/saved, function_arguments contains the arguments that the\n\t\t// function comes with\n\t\tString function_name = \"\";\n\t\tboolean function_is_being_written = false;\n\t\tLinkedList<String> function_arguments = new LinkedList<>();\n\t\t\n\t\t// The current line number being interpreted\n\t\t// Note: lines in loops, if statements and functions\n\t\t// are counted separately\n\t\tint line_count = 0;\n\t\t\n\t\t// Scanner for the code String\n\t\tScanner line_scanner = new Scanner(code);\n\t\t\n\t\t// This String contains bracketed code which will be passed to\n\t\t// either a new function or to be ran via loop\n\t\tString passed_code = \"\";\n\t\t\n\t\t// Outer interpreter\n\t\twhile(line_scanner.hasNextLine()) {\n\t\t\tline_count++;\n\t\t\tString line_temp = line_scanner.nextLine();\n\t\t\tString line = \"\";\n\t\t\t\n\t\t\t// This code removes the leading spaces from the line\n\t\t\tfor(int i = 0; i<line_temp.length(); i++) {\n\t\t\t\tif(line_temp.charAt(i) != ' ') {\n\t\t\t\t\tline = line_temp.substring(i);\n\t\t\t\t\ti = 999;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Line length after clearing the leading spaces\n\t\t\tint line_length = line.length();\n\t\t\t\n\t\t\t// Bracket depth control\n\t\t\t// Counts bracket depth and makes the inner interpreter skip\n\t\t\t// the first and last bracket\n\t\t\tif(line.contains(\"(\")) {\n\t\t\t\tbracket_depth++;\n\t\t\t\tif(bracket_depth == 1)\n\t\t\t\t\tskip_line = true;\n\t\t\t} else if(line.contains(\")\")) {\n\t\t\t\tbracket_depth--;\n\t\t\t\tif(bracket_depth == 0)\n\t\t\t\t\tskip_line = true;\n\t\t\t} else if(line.isEmpty()) {\n\t\t\t\tskip_line = true;\n\t\t\t}\n\t\t\t\n\t\t\t// Comments skip\n\t\t\t// Makes the inner interpreter skip lines beginning with \"//\"\n\t\t\tif(line_length > 2) {\n\t\t\t\tif(line.substring(0, 2).equals(\"//\"))\n\t\t\t\t\tskip_line = true;\n\t\t\t}\n\t\t\t\n\t\t\t// if statement lock/skip\n\t\t\t// Makes the inner interpreter skip 'if' statement blocks if\n\t\t\t// the 'if' statement is false\n\t\t\tif(!conditional_state && bracket_depth != 0) {\n\t\t\t\tskip_line = true;\n\t\t\t} else if(!conditional_state && bracket_depth == 0) {\n\t\t\t\tconditional_state = true;\n\t\t\t}\n\t\t\t\t\n\t\t\t// Inner interpreter\n\t\t\t// Handles the syntax interpretation and execution\n\t\t\tif(!skip_line) {\n\t\t\t\t\n\t\t\t\t// This checks if we have reached the end of the function declaration,\n\t\t\t\t// should we do the function is saved in the function map\n\t\t\t\tif(bracket_depth == 0 && function_is_being_written) {\t\t\t\t\t\t\t\t\n\t\t\t\t\tfunction_is_being_written = false;\n\t\t\t\t\tfunctions.put(function_name, functionHandler(function_arguments, passed_code, \"write\"));\n\t\t\t\t\tfunction_arguments.clear();\n\t\t\t\t\tpassed_code = \"\";\n\t\t\t\t\t\n\t\t\t\t// This checks if we have reached the end of the code block contained in the loop,\n\t\t\t\t// should we do the code contained in the loop (the passed_code variable)\n\t\t\t\t// gets passed along in a recursive call to the interpreter main method.\n\t\t\t\t} else if(bracket_depth == 0 && loop_active){\n\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\tfor(int i=0; i<loop_length; i++)\n\t\t\t\t\t\t\tinterpretorMainMethod(passed_code, 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor(int i=0; i<loop_length; i++)\n\t\t\t\t\t\t\tinterpretorMainMethod(passed_code, 0);\n\t\t\t\t\t}\n\t\t\t\t\tloop_active = false;\n\t\t\t\t\tloop_length = 0;\n\t\t\t\t\tpassed_code = \"\";\n\t\t\t\t\t\n\t\t\t\t// This checks if we have reached the end of code block contained in the 'if'\n\t\t\t\t// Statement, should we do: the conditional_state variable is set to true\n\t\t\t\t} else if(bracket_depth == 0 && !conditional_state) {\t\t\n\t\t\t\t\tconditional_state = true;\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t// If either the function_is_being_written or loop_active variables are true\n\t\t\t\t// we simply pass the current line to a temporary string without\n\t\t\t\t// interpreting it\n\t\t\t\tif(function_is_being_written || loop_active) {\n\t\t\t\t\tpassed_code += line + \"\\n\";\n\t\t\t\t\t\n\t\t\t\t// Secondary bracket skips, this is here only on account of having to\n\t\t\t\t// check the function, loop, 'if' statement endings\n\t\t\t\t} else if(line.contains(\"(\") || line.contains(\")\")) {\n\t\t\t\t\t\n\t\t\t\t// The key words are checked\n\t\t\t\t} else {\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// This loop determines the location of the first non-space character.\n\t\t\t\t\t// However as the code above indicates, this will always be 0, because\n\t\t\t\t\t// we remove the empty spaces beforehand in the Outer interpreter.\n\t\t\t\t\t// The loop here is simply for debugging purposes.\n\t\t\t\t\tint empty_space = 0;\n\t\t\t\t\tboolean space_error = false;\t\t\t\t\n\t\t\t\t\twhile(line.charAt(empty_space) == ' ' || space_error) {\n\t\t\t\t\t\tempty_space++;\n\t\t\t\t\t\tif(empty_space == 50) {\n\t\t\t\t\t\t\tspace_error = true;\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// stop statement\n\t\t\t\t\t// Syntax: stop\n\t\t\t\t\t// Corresponds to: no java counterpart\n\t\t\t\t\t// Indicates the end of a code block\n\t\t\t\t\tif (line.contains(\"stop\") && line.length() < 7) {\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// def statement\n\t\t\t\t\t// Syntax: def x : y\n\t\t\t\t\t// Corresponds to: int x = y; OR Double x = y; OR String x = y;\n\t\t\t\t\telse if(line_length > 3 && line.substring(empty_space, empty_space+4).equals(\"def \")) {\n\t\t\t\t\t\tint end_of_word_offset;\n\t\t\t\t\t\tString var_name = \"\";\n\t\t\t\t\t\tString var_definition = \"\";\n\t\t\t\t\t\tboolean comma_present = false;\n\t\t\t\t\t\tint offset = empty_space+4;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// This loop finds and assigns the definition components:\n\t\t\t\t\t\t// the var_name - the name of the variable we are defining\n\t\t\t\t\t\t// the var_definition - the contents of the variable\n\t\t\t\t\t\twhile(offset < line_length) {\n\t\t\t\t\t\t\tif(line.charAt(offset) == ' ')\n\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif(var_name.isEmpty()) {\n\t\t\t\t\t\t\t\t\tend_of_word_offset = nextWordEndIndex(line, offset);\n\t\t\t\t\t\t\t\t\tvar_name = line.substring(offset, end_of_word_offset);\n\t\t\t\t\t\t\t\t\toffset = end_of_word_offset;\n\t\t\t\t\t\t\t\t} else if(!comma_present && line.charAt(offset) == ':') {\n\t\t\t\t\t\t\t\t\tcomma_present = true;\n\t\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t\t} else if(var_definition.isEmpty() && comma_present) {\n\t\t\t\t\t\t\t\t\tvar_definition = line.substring(offset, line_length);\n\t\t\t\t\t\t\t\t\toffset = line_length;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\toffset = line_length;\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\t\n\t\t\t\t\t\t// This checks if the definition syntax is correct\n\t\t\t\t\t\tif(var_name.isEmpty() || var_definition.isEmpty() || !comma_present) {\n\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad definition syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// This checks if we are using a reserved word as the name of the variable\n\t\t\t\t\t\t\tif(!(var_name.equals(\"def\") && var_name.equals(\"inc\") && var_name.equals(\"dec\") && var_name.equals(\"output\") && var_name.equals(\"loop\") && var_name.equals(\"if\") && var_name.equals(\"loadfile\"))) {\n\t\t\t\t\t\t\t\tif(isNumber(var_definition)) {\n\t\t\t\t\t\t\t\t\tif(mode == 0)\n\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name, 0.0 + Integer.parseInt(var_definition));\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tlocal_double_variables.put(var_name, 0.0 + Integer.parseInt(var_definition));\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(var_definition.length() > 4) {\n\t\t\t\t\t\t\t\t\t\tif(var_definition.substring(0, 4).equals(\"var.\")) {\n\t\t\t\t\t\t\t\t\t\t\tString key = var_definition.substring(4, var_definition.length());\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocal_double_variables.put(var_name, local_double_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse if(local_string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocal_string_variables.put(var_name, local_string_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse if(double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocal_double_variables.put(var_name, double_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse if(string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocal_string_variables.put(var_name, string_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad variable call in def. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name,double_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse if(string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\t\tstring_variables.put(var_name,string_variables.get(key));\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad variable call in def. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif(mode == 0)\n\t\t\t\t\t\t\t\t\t\t\t\tstring_variables.put(var_name, var_definition);\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tlocal_string_variables.put(var_name, var_definition);\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} else {\n\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: prohibited reserved word use. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\n\t\t\t\t\t\n\t\t\t\t\t// inc statement\n\t\t\t\t\t// Syntax: inc x\n\t\t\t\t\t// Corresponds to: x++;\n\t\t\t\t\telse if(line_length > 3 && line.substring(empty_space, empty_space+4).equals(\"inc \")) {\n\t\t\t\t\t\tString var_name;\n\t\t\t\t\t\tint offset = empty_space+4;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(offset < line_length) {\n\t\t\t\t\t\t\tif(line.charAt(offset) == ' ') {\n\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar_name = line.substring(offset, line_length).replaceAll(\"\\\\s+\",\"\");\n\t\t\t\t\t\t\t\tif(!var_name.isEmpty()) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tlocal_double_variables.put(var_name, local_double_variables.get(var_name)+1.0);\n\t\t\t\t\t\t\t\t\t\telse if(double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name, double_variables.get(var_name)+1.0);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad increment syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name, double_variables.get(var_name)+1.0);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad increment syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad increment syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\toffset = line_length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// dec statement\n\t\t\t\t\t// Syntax: dec x\n\t\t\t\t\t// Corresponds to: x--;\n\t\t\t\t\telse if(line_length > 3 && line.substring(empty_space, empty_space+4).equals(\"dec \")) {\n\t\t\t\t\t\tString var_name;\n\t\t\t\t\t\tint offset = empty_space+4;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(offset < line_length) {\n\t\t\t\t\t\t\tif(line.charAt(offset) == ' ') {\n\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar_name = line.substring(offset, line_length).replaceAll(\"\\\\s+\",\"\");\n\t\t\t\t\t\t\t\tif(!var_name.isEmpty()) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tlocal_double_variables.put(var_name, local_double_variables.get(var_name)-1.0);\n\t\t\t\t\t\t\t\t\t\telse if(double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name, double_variables.get(var_name)-1.0);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad increment syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(var_name))\n\t\t\t\t\t\t\t\t\t\t\tdouble_variables.put(var_name, double_variables.get(var_name)-1.0);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad increment syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad decrement syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\toffset = line_length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// output statement\n\t\t\t\t\t// Syntax: output : x\n\t\t\t\t\t// Corresponds to: System.out.println(x);\t\t\t\t\n\t\t\t\t\telse if(line_length > 8 && line.substring(empty_space, empty_space+9).equals(\"output : \")) {\n\t\t\t\t\t\tint end_of_word_offset;\n\t\t\t\t\t\tString output_string = \"\";\n\t\t\t\t\t\tString temp_word;\n\t\t\t\t\t\tint offset = empty_space+9;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(offset < line_length) {\n\t\t\t\t\t\t\tif(line.charAt(offset) == ' ') {\n\t\t\t\t\t\t\t\toutput_string += line.charAt(offset);\n\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tend_of_word_offset = nextWordEndIndex(line, offset);\n\t\t\t\t\t\t\t\ttemp_word = line.substring(offset, end_of_word_offset);\n\t\t\t\t\t\t\t\toffset = end_of_word_offset;\n\t\t\t\t\t\t\t\tif(temp_word.length() > 4) {\n\t\t\t\t\t\t\t\t\tif(temp_word.substring(0, 4).equals(\"var.\")) {\n\t\t\t\t\t\t\t\t\t\tString key = temp_word.substring(4, temp_word.length());\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += local_double_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse if(local_string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += local_string_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse if(double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += double_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse if(string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += string_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad variable call in output. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += double_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse if(string_variables.containsKey(key))\n\t\t\t\t\t\t\t\t\t\t\t\toutput_string += string_variables.get(key);\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad variable call in output. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\toutput_string += temp_word;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\toutput_string += temp_word;\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\tminc.consolearea.append(output_string+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// loop statement\n\t\t\t\t\t// Syntax: loop x\n\t\t\t\t\t// Corresponds to: for(int i=0; i<x; i++)\n\t\t\t\t\telse if(line_length > 4 && line.substring(empty_space, empty_space+5).equals(\"loop \")) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString next_element = line.substring(empty_space+5, nextWordEndIndex(line, empty_space+5));\n\t\t\t\t\t\t\t// Flags the loop as active for the interpreter\n\t\t\t\t\t\t\tloop_active = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// These conditions attempt to retrieve the loop variable, or\n\t\t\t\t\t\t\t// the number of times the loop will execute\n\t\t\t\t\t\t\tif(isNumber(next_element)) {\n\t\t\t\t\t\t\t\tloop_length = Integer.parseInt(next_element);\n\t\t\t\t\t\t\t} else if(mode == 1) {\n\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(next_element))\n\t\t\t\t\t\t\t\t\tloop_length += local_double_variables.get(next_element);\n\t\t\t\t\t\t\t\telse if(double_variables.containsKey(next_element))\n\t\t\t\t\t\t\t\t\tloop_length += double_variables.get(next_element);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad loop syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif(double_variables.containsKey(next_element))\n\t\t\t\t\t\t\t\t\tloop_length += double_variables.get(next_element);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad loop syntax. line \"+line_count+\"\\n\");\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} catch (IndexOutOfBoundsException e) {\n\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad loop syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// if statement\n\t\t\t\t\t// Syntax and correspondent expressions explained below\n\t\t\t\t\t// This is a rather length segment of the interpreter, however the code logic\n\t\t\t\t\t// is very simple: the code checks for proper syntax and whether the called\n\t\t\t\t\t// variables are defined. The length is a product of the possible combinations of\n\t\t\t\t\t// variable types.\n\t\t\t\t\telse if(line_length > 2 && line.substring(empty_space, empty_space+3).equals(\"if \")) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString next_element = line.substring(empty_space+3, nextWordEndIndex(line, empty_space+3));\t\n\t\t\t\t\t\t\tString lhs;\n\t\t\t\t\t\t\tString rhs;\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Equals condition\n\t\t\t\t\t\t\t// Syntax: if eq x y\n\t\t\t\t\t\t\t// Corresponds to: if(x == y)\n\t\t\t\t\t\t\tif(next_element.equals(\"eq\")) {\n\t\t\t\t\t\t\t\tlhs = line.substring(empty_space+6, nextWordEndIndex(line, empty_space+6));\n\t\t\t\t\t\t\t\trhs = line.substring(empty_space+6+lhs.length()+1, nextWordEndIndex(line, empty_space+6+lhs.length()+1));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(isNumber(lhs) && isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) != Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(isNumber(lhs)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) != local_double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) != double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) != double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t} else if(isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs) != Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) != Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) != Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs) && local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs)+1 != local_double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs)+1 != double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs) && local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 != local_double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 != double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_string_variables.containsKey(rhs) && local_string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(!local_string_variables.get(lhs).equals(local_string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(!local_string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && local_string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(!string_variables.get(lhs).equals(local_string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(!string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 != double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(!string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Not equals condition\n\t\t\t\t\t\t\t// Syntax: if neq x y\n\t\t\t\t\t\t\t// Corresponds to: if(x != y)\n\t\t\t\t\t\t\t} else if(next_element.equals(\"neq\")) {\n\t\t\t\t\t\t\t\tlhs = line.substring(empty_space+7, nextWordEndIndex(line, empty_space+7));\n\t\t\t\t\t\t\t\trhs = line.substring(empty_space+7+lhs.length()+1, nextWordEndIndex(line, empty_space+7+lhs.length()+1));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(isNumber(lhs) && isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) == Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(isNumber(lhs)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) == local_double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) == double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) == double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t} else if(isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs) == Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) == Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) == Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs) && local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs)+1 == local_double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs)+1 == double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs) && local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 == local_double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 == double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_string_variables.containsKey(rhs) && local_string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_string_variables.get(lhs).equals(local_string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(local_string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && local_string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(string_variables.get(lhs).equals(local_string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 == double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(string_variables.containsKey(rhs) && string_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(string_variables.get(lhs).equals(string_variables.get(rhs))) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Less than condition\n\t\t\t\t\t\t\t// Syntax: if lt x y\n\t\t\t\t\t\t\t// Corresponds to: if(x < y)\n\t\t\t\t\t\t\t} else if(next_element.equals(\"lt\")) {\n\t\t\t\t\t\t\t\tlhs = line.substring(empty_space+6, nextWordEndIndex(line, empty_space+6));\n\t\t\t\t\t\t\t\trhs = line.substring(empty_space+6+lhs.length()+1, nextWordEndIndex(line, empty_space+6+lhs.length()+1));\n\t\t\t\t\t\t\t\tif(isNumber(lhs) && isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) >= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(isNumber(lhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) >= local_double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) >= double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) >= double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\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} else if(isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs) >= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) >= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) >= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 >= double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Greater than condition\n\t\t\t\t\t\t\t// Syntax: if gt x y\n\t\t\t\t\t\t\t// Corresponds to: if(x > y)\n\t\t\t\t\t\t\t} else if(next_element.equals(\"gt\")) {\n\t\t\t\t\t\t\t\tlhs = line.substring(empty_space+6, nextWordEndIndex(line, empty_space+6));\n\t\t\t\t\t\t\t\trhs = line.substring(empty_space+6+lhs.length()+1, nextWordEndIndex(line, empty_space+6+lhs.length()+1));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(isNumber(lhs) && isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) <= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(isNumber(lhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) <= local_double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) <= double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(Integer.parseInt(lhs) <= double_variables.get(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+rhs+\"\\n\");\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} else if(isNumber(rhs)) {\n\t\t\t\t\t\t\t\t\tif(mode == 1) {\n\t\t\t\t\t\t\t\t\t\tif(local_double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(local_double_variables.get(lhs) <= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) <= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs) <= Integer.parseInt(rhs)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable: \"+lhs+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(double_variables.containsKey(rhs) && double_variables.containsKey(lhs)) {\n\t\t\t\t\t\t\t\t\t\tif(double_variables.get(lhs)+1 <= double_variables.get(rhs)+1) {\n\t\t\t\t\t\t\t\t\t\t\tconditional_state = false;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\". Unknown variable\\n\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad conditional syntax. line \"+line_count+\"\\n\");\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// loadfile statement\n\t\t\t\t\t// Syntax: loadfile filename.minl\n\t\t\t\t\t// Corresponds to: no java analog\n\t\t\t\t\t// This code simply executes the MinL code written on another file.\n\t\t\t\t\telse if(line_length > 8 && line.substring(empty_space, empty_space+9).equals(\"loadfile \")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString next_element = line.substring(empty_space+9, nextWordEndIndex(line, empty_space+9));\n\t\t\t\t\t\t\tfileLoaderMethod(next_element);\t\n\t\t\t\t\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\t\t\t\t\t//TODO error test\n\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad loadfile syntax. line \"+line_count+\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// function declaration/call\n\t\t\t\t\t// Syntax: f.function_name x y z\n\t\t\t\t\t// Corresponds to: public void function_name(int/Double/String x, int/Double/String y, int/Double/String z)\n\t\t\t\t\telse if(line_length > 1 && line.substring(empty_space, empty_space+2).equals(\"f.\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString next_element = line.substring(empty_space+2, nextWordEndIndex(line, empty_space+2));\t\t\t\t\t\n\t\t\t\t\t\t\tfunction_name = \"f.\"+next_element;\t\n\t\t\t\t\t\t\t// These two conditions identify whether the function called is defined or not\n\t\t\t\t\t\t\t// if it is the function is simply called, if not it is declared. The syntax for call is simple:\n\t\t\t\t\t\t\t// f.function_name argument1 argument2 etc...\n\t\t\t\t\t\t\t// The syntax for declare requires a code block:\n\t\t\t\t\t\t\t// f.function_name argument_name1 argument_name2 etc...\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\t// loop argument_name1\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\t// inc argument_name2\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tif(functions.containsKey(function_name)) {\n\t\t\t\t\t\t\t\t// Function call code\n\t\t\t\t\t\t\t\tif(function_name.length() == line_length) {\n\t\t\t\t\t\t\t\t\tinterpretorMainMethod(functions.get(function_name), 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tint offset = function_name.length()+1;\t\n\t\t\t\t\t\t\t\t\t// This loop retrieves and saves the function arguments in a list\n\t\t\t\t\t\t\t\t\twhile(offset < line.length()) {\n\t\t\t\t\t\t\t\t\t\tif(line.charAt(offset) == ' ') {\n\t\t\t\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tnext_element = line.substring(offset, nextWordEndIndex(line, offset));\n\t\t\t\t\t\t\t\t\t\t\toffset = nextWordEndIndex(line, offset);\n\t\t\t\t\t\t\t\t\t\t\tfunction_arguments.add(next_element);\n\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// The function is called via recursive call to the interpreterMainMethod\n\t\t\t\t\t\t\t\t\tinterpretorMainMethod(functionHandler(function_arguments, functions.get(function_name), \"read\"), 1);\n\t\t\t\t\t\t\t\t\tlocal_double_variables.clear();\n\t\t\t\t\t\t\t\t\tlocal_string_variables.clear();\n\t\t\t\t\t\t\t\t\tfunction_arguments.clear();\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// function declare code\n\t\t\t\t\t\t\t\t// take note the function isn't actually saved here, but in the code far above\n\t\t\t\t\t\t\t\tfunction_is_being_written = true;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(function_name.length() != line_length) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tint offset = function_name.length()+1;\n\t\t\t\t\t\t\t\t\t// This loop retrieves and saves the function arguments in a list\n\t\t\t\t\t\t\t\t\twhile(offset < line.length()) {\n\t\t\t\t\t\t\t\t\t\tif(line.charAt(offset) == ' ') {\n\t\t\t\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tnext_element = line.substring(offset, nextWordEndIndex(line, offset));\n\t\t\t\t\t\t\t\t\t\t\toffset = nextWordEndIndex(line, offset);\n\t\t\t\t\t\t\t\t\t\t\tfunction_arguments.add(next_element);\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} catch (IndexOutOfBoundsException e) {\n\t\t\t\t\t\t\t//TODO error test\n\t\t\t\t\t\t\tminc.consolearea.append(\"Error: bad function syntax. line \"+line_count+\"\\n\"+line);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t// report error\n\t\t\t\t\telse {\n\t\t\t\t\t\tminc.consolearea.append(\"Error: Unknown Operation. line \"+line_count+\"\\n\"+line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tskip_line = false;\n\t\t\t}\t\n\t\t}\n\t}",
"ProgramState execute(ProgramState state) ;",
"public void exec(String s) {\n }",
"@ReflectiveMethod(name = \"c\", types = {})\n public void c(){\n NMSWrapper.getInstance().exec(nmsObject);\n }",
"@ReflectiveMethod(name = \"c\", types = {})\n public void c(){\n NMSWrapper.getInstance().exec(nmsObject);\n }",
"public void execute(){\n\t\t\n\t}",
"public static void main(String[] args) {\n sayHello();\n\n //run code from anon class\n Runnable r1 = new Runnable() {\n @Override\n public void run() {\n System.out.println(\"Hello from anon Class\");\n }\n };\n r1.run();\n\n\n //run code from anon function\n //Lambda, Java 8 only\n Runnable r2 = () -> System.out.println(\"hello from anon Function\");\n r2.run();\n }",
"public Object executeScript(String command);",
"public static void generateCode()\n {\n \n }",
"public String getCode(ClassDecl cl)\r\n\t{\r\n\t\tString testcode = \"#Region \\\"Testing code generated by KawigiEdit\\\"\\n\";\r\n\t\ttestcode += \"Module MainModule\\n\";\r\n\t\ttestcode += \"\\tSub Main()\\n\";\r\n\t\tEditorDataType returnType = cl.getMethod().getReturnType();\r\n\t\ttestcode += \"\\t\\tDim Errors As Boolean = False\\n\";\r\n\t\ttestcode += \"\\t\\tDim Answer, DesiredAnswer As \" + EditorLanguage.VB.getName(returnType) + \"\\n\";\r\n\t\ttestcode += \"\\t\\tDim Obj As \" + cl.getName() + \"\\n\";\r\n\t\ttestcode += \"\\t\\tDim Time As DateTime\\n\";\r\n\t\tif (returnType.isArrayType())\r\n\t\t{\r\n\t\t\ttestcode += \"\\t\\tDim Same As Boolean\\n\";\r\n\t\t\ttestcode += \"\\t\\tDim i As Integer\\n\";\r\n\t\t}\r\n\t\tboolean stringType = returnType.isType(EditorDataType.String);\r\n\t\tEditorDataType[] paramTypes = cl.getMethod().getParamTypes();\r\n\t\ttestcode += \"\\t\\t<%:start-tests%>\\n\";\r\n\t\tfor (int i=0; i<cl.countTests(); i++)\r\n\t\t{\r\n\t\t\ttestcode += \"\\t\\tObj = New \" + cl.getName() + \"()\\n\";\r\n\t\t\ttestcode += \"\\t\\tTime = DateTime.Now\\n\";\r\n\t\t\ttestcode += \"\\t\\tAnswer = Obj.\" + cl.getMethod().getName() + \"(\" + toTest(cl.getTest(i).getParameters(), paramTypes) + \")\\n\";\r\n\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Time: \\\" & (DateTime.Now.Subtract(Time)).TotalSeconds & \\\" seconds\\\")\\n\";\r\n\t\t\ttestcode += \"\\t\\tDesiredAnswer = \" + translateObject(returnType, cl.getTest(i).getAnswer()) + \"\\n\";\r\n\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Your Answer:\\\")\\n\";\r\n\t\t\tif (returnType.isArrayType())\r\n\t\t\t{\r\n\t\t\t\ttestcode += \"\\t\\tConsole.Write(\\\"{ \\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf (Answer.Length > 0) Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.Write(\" + (stringType ? \"\\\"\\\"\\\"\\\" & \" : \"\") + \"Answer(0)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tFor i = 1 To Answer.Length - 1\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tConsole.Write(\\\"\\t, \" + (stringType ? \"\\\"\\\"\" : \"\") + \"\\\" & Answer(i)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tNext\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\" }\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"}\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Desired Answer:\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.Write(\\\"{ \\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf (DesiredAnswer.Length > 0) Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.Write(\" + (stringType ? \"\\\"\\\"\\\"\\\" & \" : \"\") + \"DesiredAnswer(0)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tFor i = 1 To DesiredAnswer.Length - 1\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tConsole.Write(\\\", \" + (stringType ? \"\\\"\\\"\" : \"\") + \"\\\" & DesiredAnswer(i)\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tNext\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\" }\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"}\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tSame = (Answer.Length = DesiredAnswer.Length)\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf (Same)\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tFor i = 0 To DesiredAnswer.Length - 1\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tIf Answer(i) <> DesiredAnswer(i) Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\t\\tSame = False\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tNext\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf Same Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"Match :-)\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"DOESN'T MATCH!!!!\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tErrors = True\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"\\t\" + (stringType ? \"\\\"\\\"\" : \"\") + \"\\\" & Answer\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"Desired Answer:\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tConsole.WriteLine(\\\"\\t\" + (stringType ? \"\\\"\\\"\" : \"\") +\"\\\" & DesiredAnswer\" + (stringType ? \" & \\\"\\\"\\\"\\\"\" : \"\") + \")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tIf Answer = DesiredAnswer Then\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"Match :-)\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"DOESN'T MATCH!!!!\\\")\\n\";\r\n\t\t\t\ttestcode += \"\\t\\t\\tErrors = True\\n\";\r\n\t\t\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\t\t}\r\n\t\t\ttestcode += \"\\t\\tConsole.WriteLine()\\n\";\r\n\t\t}\r\n\t\ttestcode += \"\\t\\t<%:end-tests%>\\n\";\r\n\t\ttestcode += \"\\t\\t\\n\\t\\tIf Errors Then\\n\";\r\n\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"Some of the test cases had errors :-(\\\")\\n\";\r\n\t\ttestcode += \"\\t\\tElse\\n\";\r\n\t\ttestcode += \"\\t\\t\\tConsole.WriteLine(\\\"You're a stud (at least on the test data)! :-D \\\")\\n\";\r\n\t\ttestcode += \"\\t\\tEnd If\\n\";\r\n\t\ttestcode += \"\\tEnd Sub\\n\";\r\n\t\ttestcode += \"End Module\\n\";\r\n\t\ttestcode += \"#End Region\\n\";\r\n\t\treturn testcode;\r\n\t}",
"@Override\r\n\tpublic String execute(String script) {\n\t\treturn script+\"sb\";\r\n\t}",
"public void execute() {\n }",
"void execute(VirtualFrame frame);",
"@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}",
"public static boolean exec(JsProgram program, JsBlock block, JsScope scope) {\n StringVisitor v = new StringVisitor(null, scope);\n v.accept(block);\n\n createVars(program, block, v.toCreate.keySet(), v.toCreate);\n\n return v.didChange();\n }",
"public Object invoke( Object[] args )\n {\n return invokeFromBytecode(args);\n }",
"public void execute() {\r\n\t\r\n\t}",
"public abstract int code();",
"<T> T runGroovyScript(String name, Map<String, Object> context);",
"public void execute() {\n\n\t}",
"public void compileScript( TemplateCompilerContext context )\r\n\t{\r\n\t\t// Compile to bytes\r\n\t\tCompilationUnit unit = new CompilationUnit();\r\n\t\tunit.addSource( context.getPath(), context.getScript().toString() );\r\n\t\tunit.compile( Phases.CLASS_GENERATION );\r\n\r\n\t\t// Results\r\n\t\t@SuppressWarnings( \"unchecked\" )\r\n\t\tList< GroovyClass > classes = unit.getClasses();\r\n\t\tAssert.isTrue( classes.size() > 0, \"Expecting 1 or more classes\" );\r\n\r\n\t\tClassLoader parent = Thread.currentThread().getContextClassLoader();\r\n\t\tif( parent == null )\r\n\t\t\tparent = GroovyTemplateCompiler.class.getClassLoader();\r\n\r\n\t\t// Define the class\r\n\t\t// TODO Configurable class loader\r\n\t\tDefiningClassLoader classLoader = new DefiningClassLoader( parent );\r\n\t\tClass< ? > first = null;\r\n\t\tfor( GroovyClass cls : classes )\r\n\t\t{\r\n\t\t\tClass< ? > clas = classLoader.defineClass( cls.getName(), cls.getBytes() );\r\n\t\t\tif( first == null )\r\n\t\t\t\tfirst = clas; // TODO Are we sure that the first one is always the right one?\r\n\t\t}\r\n\r\n\t\t// Instantiate the first\r\n\t\tGroovyObject object = (GroovyObject)Util.newInstance( first );\r\n\t\tClosure closure = (Closure)object.invokeMethod( \"getClosure\", null );\r\n\r\n\t\t// The old way:\r\n//\t\tClass< GroovyObject > groovyClass = new GroovyClassLoader().parseClass( new GroovyCodeSource( getSource(), getName(), \"x\" ) );\r\n\r\n\t\tcontext.setTemplate( new GroovyTemplate( closure ) );\r\n\t}",
"public void execute_local(Catalog rootCatalog) {\n }",
"@ReflectiveMethod(name = \"t_\", types = {})\n public void t_(){\n NMSWrapper.getInstance().exec(nmsObject);\n }",
"Object run(ObjectInput objectInput) throws IOException, ClassNotFoundException;",
"@Override\n public Data run(Data data) throws EngineException { \n Data res;\n if (getLoop() > 0){\n res = loop(data);\n }\n else {\n res = exec(data);\n }\n return res;\n }",
"public final void cpp() {\n }",
"public int execute();",
"TACBlock optimise(TACBlock code);",
"@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public <T> T execute(String scriptName, Map<String, Object> data) throws NyException {\n QScript script = null;\n try {\n script = parse(scriptName, data);\n return (T) configurations.getExecutorRegistry().defaultExecutorFactory().create().execute(script);\n } catch (Exception ex) {\n if (ex instanceof NyException) {\n throw (NyException) ex;\n } else {\n throw new NyScriptExecutionException(\"Ny script execution error!\", ex);\n }\n } finally {\n if (script != null) {\n script.free();\n }\n }\n }",
"abstract public void execute(FunctionContext context) throws Exception;",
"public void generateCode(BlockScope currentScope, CodeStream codeStream) {\n\n\t\tif ((bits & IsReachable) == 0) {\n\t\t\treturn;\n\t\t}\n\t\tint pc = codeStream.position;\n\t\tif (statements != null) {\n\t\t\tfor (int i = 0, max = statements.length; i < max; i++) {\n\t\t\t\tstatements[i].generateCode(scope, codeStream);\n\t\t\t}\n\t\t} // for local variable debug attributes\n\t\tif (scope != currentScope) { // was really associated with its own scope\n\t\t\tcodeStream.exitUserScope(scope);\n\t\t}\n\t\tcodeStream.recordPositionsFrom(pc, this.sourceStart);\n\t}",
"@Test\r\n public void testCodeExamples() throws SecurityException, NoSuchMethodException, ScriptException\r\n {\n \t// http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/\r\n \t\r\n \t// Code Example 1: Create a ScriptEngine object using the engine name.\r\n \t//\r\n \tScriptEngineManager mgr = new ScriptEngineManager();\r\n \tScriptEngine jsEngine = mgr.getEngineByName(\"jav8\");\r\n \t\r\n \tjsEngine.put(\"print\", this.getClass().getMethod(\"print\", String.class));\r\n \tjsEngine.put(\"println\", this.getClass().getMethod(\"println\", String.class));\r\n \r\n \tjsEngine.eval(\"print('Hello, world!')\");\r\n \t\r\n \t// Code Example 2: You can retrieve a list of all engines installed to your Java platform.\r\n \t//\r\n \tList<ScriptEngineFactory> factories = mgr.getEngineFactories();\r\n \t\r\n \tassertFalse(factories.isEmpty());\r\n \t\r\n \t// Code Example 3: A ScriptEngineFactory object provides detailed information about the engine it provides.\r\n \t//\r\n \tfor (ScriptEngineFactory factory: factories) {\r\n \t System.out.println(\"ScriptEngineFactory Info\");\r\n \t \r\n \t String engName = factory.getEngineName();\r\n \t String engVersion = factory.getEngineVersion();\r\n \t String langName = factory.getLanguageName();\r\n \t String langVersion = factory.getLanguageVersion();\r\n \t System.out.printf(\"\\tScript Engine: %s (%s)\\n\", engName, engVersion);\r\n \t \r\n \t List<String> engNames = factory.getNames();\r\n \t for(String name: engNames) {\r\n \t System.out.printf(\"\\tEngine Alias: %s\\n\", name);\r\n \t }\r\n \t System.out.printf(\"\\tLanguage: %s (%s)\\n\", langName, langVersion);\r\n \t}\r\n \t \t\r\n \t// Code Example 6: The eval method can read script files.\r\n \t//\r\n \tInputStream is = this.getClass().getResourceAsStream(\"/scripts/F1.js\");\r\n \t/*\r\n \ttry {\r\n \t Reader reader = new InputStreamReader(is);\r\n \t engine.eval(reader);\r\n \t} catch (ScriptException ex) {\r\n \t ex.printStackTrace();\r\n \t}\r\n \t*/\r\n \t// Code Example 7: You can use the Invocable interface to call specific methods in a script.\r\n \t//\r\n \tjsEngine.eval(\"function sayHello() {\" +\r\n \t \" println('Hello, world!');\" +\r\n \t \"}\");\r\n \tInvocable invocableEngine = (Invocable) jsEngine;\r\n \tinvocableEngine.invokeFunction(\"sayHello\");\r\n \t\r\n \t// Code Example 8: Java programming language code adds names to a list.\r\n \t//\r\n \tList<String> namesList = new ArrayList<String>();\r\n \t\r\n \tnamesList.add(\"Jill\");\r\n \tnamesList.add(\"Bob\");\r\n \tnamesList.add(\"Laureen\");\r\n \tnamesList.add(\"Ed\");\r\n \t\r\n \t// Code Example 9: Script code can both access and modify native Java objects.\r\n \t//\r\n \tjsEngine.put(\"namesListKey\", namesList);\r\n \t \r\n \tSystem.out.println(\"Executing in script environment...\");\r\n \t\r\n \tjsEngine.eval(\"var x;\" +\r\n \t \"var names = namesListKey.toArray();\" +\r\n \t \"for(x in names) {\" +\r\n \t //\" println(names[x]);\" +\r\n \t \"}\" +\r\n \t \"namesListKey.add('Dana');\");\r\n \t\r\n \tSystem.out.println(\"Executing in Java environment...\");\r\n \t\r\n \tfor (String name: namesList) {\r\n \t System.out.println(name);\r\n \t} \r\n \t\r\n \t// Code Example 10: Applications can pass values to script using the Invocable interface.\r\n \t// \t \t\r\n \t jsEngine.eval(\"function printNames1(namesList) {\" +\r\n \t \" var x;\" +\r\n \t \" var names = namesList.toArray();\" +\r\n \t \" for(x in names) {\" +\r\n \t \" println(names[x]);\" +\r\n \t \" }\" +\r\n \t \"}\" +\r\n \r\n \t \"function addName(namesList, name) {\" +\r\n \t \" namesList.add(name);\" +\r\n \t \"}\");\r\n \t invocableEngine.invokeFunction(\"printNames1\", namesList);\r\n \t invocableEngine.invokeFunction(\"addName\", namesList, \"Dana\");\r\n }",
"public PyObject eval(String s) {\n return null;\n }",
"public boolean runCode ( String theCode , String routine , String dataSegment ) throws EVASyntaxException , EVASemanticException\r\n\t{\r\n\t\taddToDataSegment ( dataSegment );\r\n\t\treturn runCode ( theCode , routine );\t\r\n\t}",
"public void generateCode() {\n new CodeGenerator(data).generateCode();\n }",
"public abstract void execute(VirtualMachine vm);",
"abstract public IValue executeRVMFunctionInVisit(Frame root);",
"public void execute (T target);",
"public abstract void recompileRun(int opcode);",
"WfExecutionObject source () throws BaseException, SourceNotAvailable;"
] | [
"0.58777493",
"0.5804124",
"0.579986",
"0.5678337",
"0.56425655",
"0.5591118",
"0.55570364",
"0.55509424",
"0.55132765",
"0.5492137",
"0.54269356",
"0.5362072",
"0.5294994",
"0.5293668",
"0.5281345",
"0.5270161",
"0.52479714",
"0.5247891",
"0.5239541",
"0.5233995",
"0.5229606",
"0.5211732",
"0.51989853",
"0.51806635",
"0.517238",
"0.5171286",
"0.5169606",
"0.5135017",
"0.51341003",
"0.5131768",
"0.5111274",
"0.50898075",
"0.5077114",
"0.5053513",
"0.5052119",
"0.50290006",
"0.5010824",
"0.50079745",
"0.49921885",
"0.4982986",
"0.4982986",
"0.4982986",
"0.4982986",
"0.49819267",
"0.4973498",
"0.4966111",
"0.4966111",
"0.4966111",
"0.4966111",
"0.4966111",
"0.4966111",
"0.4966111",
"0.49640065",
"0.49607417",
"0.4949006",
"0.49474102",
"0.49331304",
"0.49216467",
"0.49208847",
"0.4915626",
"0.49120867",
"0.49113542",
"0.49102008",
"0.48988497",
"0.48988497",
"0.4895216",
"0.48950806",
"0.48755926",
"0.48619187",
"0.4848907",
"0.48434594",
"0.4839824",
"0.48374218",
"0.4836947",
"0.48342472",
"0.48337308",
"0.48223084",
"0.4814436",
"0.48112828",
"0.4784964",
"0.47810754",
"0.4779813",
"0.47786942",
"0.47750822",
"0.47684374",
"0.47579607",
"0.47559294",
"0.47527677",
"0.47509882",
"0.47404507",
"0.4740311",
"0.47387505",
"0.47341245",
"0.47311094",
"0.47266635",
"0.4726647",
"0.47195554",
"0.47194153",
"0.4706465",
"0.47061756"
] | 0.7103875 | 0 |
Executes a file of Python source in the local namespace. | public void execfile(String filename) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void source(String path) throws Exception;",
"public void runFile(String filename) {\n }",
"public void exec(PyObject code) {\n }",
"public static void main(String[] args) {\n\t\t\n\t\tchar[] buffer = \"\\\"use strict\\\";\\r\\nfunction sum(x, y){ return x + y }\".toCharArray();\n\t\tSource source = new Source(\"src\\\\test\\\\resources\\\\a.txt\", buffer);\n\t\t\n\t\tParseOption option = new ParseOption();\n\t\t\n\t\tParser parser = new Parser();\n\t\t\n\t\tparser.parse(source, option);\n\n\t}",
"public static void main(String[] args) {\n File file = new File(\"./src/testcode.c\");\n \n Compiler compiler = new Compiler(file);\n compiler.compile();\n }",
"abstract public PyCode getMain();",
"public void load(File source);",
"public abstract Source load(ModuleName name);",
"public static void main(String[] args) throws Exception {\n Interpreter i = new Interpreter(readFile(\"yourFilePathGoesHERE\"));\n i.evalProgram();\n }",
"public void runBytecodeFile(String filePath, boolean toDebug) {\n try {\n try {\n readBin(filePath);\n readSym(filePath);\n } catch (IOException ex) {\n print(\"Error : \" + ex.toString());\n return;\n }\n pc = start;\n if (!toDebug) {\n run();\n println(\"RUN COMPLETE\");\n } else {\n debug();\n println(\"DEBUG COMPLETE\");\n }\n } catch (Exception e) {\n print(\"Error : \" + e.toString());\n\n } catch (Error e) {\n print(\"Error : \" + e.getMessage());\n }\n\n }",
"public void exec();",
"public WorkResult execute() {\n source = new SimpleFileCollection(source.getFiles());\n classpath = new SimpleFileCollection(Lists.newArrayList(classpath));\n\n for (File file : source) {\n if (!file.getName().endsWith(\".java\")) {\n throw new InvalidUserDataException(String.format(\"Cannot compile non-Java source file '%s'.\", file));\n }\n }\n configure(compiler);\n return compiler.execute();\n }",
"void execute(Executable executable);",
"public abstract ILanguageProtocol makeInterpreter(String source, String replQualifiedName, String... salixPath) throws IOException, URISyntaxException, Exception;",
"private static void executeBzlFile(\n Program prog,\n Label label,\n Module module,\n Map<String, Module> loadedModules,\n BzlInitThreadContext context,\n StarlarkSemantics starlarkSemantics,\n ExtendedEventHandler skyframeEventHandler)\n throws BzlLoadFailedException, InterruptedException {\n try (Mutability mu = Mutability.create(\"loading\", label)) {\n StarlarkThread thread = new StarlarkThread(mu, starlarkSemantics);\n thread.setLoader(loadedModules::get);\n\n // Wrap the skyframe event handler to listen for starlark errors.\n AtomicBoolean sawStarlarkError = new AtomicBoolean(false);\n EventHandler starlarkEventHandler =\n event -> {\n if (event.getKind() == EventKind.ERROR) {\n sawStarlarkError.set(true);\n }\n skyframeEventHandler.handle(event);\n };\n thread.setPrintHandler(Event.makeDebugPrintHandler(starlarkEventHandler));\n context.storeInThread(thread);\n\n execAndExport(prog, label, starlarkEventHandler, module, thread);\n if (sawStarlarkError.get()) {\n throw BzlLoadFailedException.executionFailed(label);\n }\n }\n }",
"public void run() {\n // Initialize\n imports = new HashSet<>();\n lines = new ArrayList<>();\n\n // Read and merge source files\n final File folder = new File(\"src\");\n recurseOverFolder(folder);\n\n // Output to file\n outputFile();\n }",
"public void compile(MindFile f) {\n \t\t\n \t}",
"@Override\n protected void execute(File file, int offset) throws IOException {\n }",
"public void enterFile(CymbolParser.FileContext ctx) {\n globals = new GlobalScope(null);\n currentScope = globals;\n }",
"protected void runLexer()\n\t{\n\t\tString args[] = {input.getAbsolutePath(), \"*.java\", output.getAbsolutePath(), \"0\", \"full\", \"-1\", \"1.0\", \"--in_place\", \"--metadata_light\"};\n\t\tExternalOperation.callScript(\"python2.7\", lexer, args);\n\t}",
"public static void main(String[] args) throws FileNotFoundException {\n\n Scanner input;\n PrintStream output;\n\n input = determineInputSource(args);\n output = determineOutputSource(args);\n\n TurtleInterpreter turtleInterpreter = new TurtleInterpreter(input,\n output);\n\n turtleInterpreter.processCommands();\n }",
"String generateCode(\n InputSource input, String filename,\n ProgrammingLanguage programmingLanguage,\n SourceResolver resolver\n ) throws Exception;",
"java.lang.String getSourceFile();",
"public static void main(String[] args)\r\n {\r\n\r\n if (args.length < 1) {\r\n System.out.println(\"\\n\\njava mylang file.txt\");//to give error if less than 1\r\n return;\r\n }\r\n\r\n String contents = readFile(args[0]);//read file is a methode not only this remember that arg[0] contains the path of the file because you write java mylang try.txt\r\n\r\n mylang mylob = new mylang();\r\n mylob.interpret(contents);\r\n\r\n }",
"public void doIt(File f) throws Exception\n {\n LuaParser parser=new LuaParser();\n Map<String,Object> data=parser.read(f);\n useData(data);\n }",
"public static void main(String[] args) {\n String s = \"We are testing import statements\";\n System.out.println(s);\n\n // We use simple name because we specified location in the import\n // statement\n VineVegetable.main(args);\n }",
"public PyCode compile(String script) {\n return null;\n }",
"public interface Interpreter {\n StringBuilder process(File file);\n}",
"public DataModel execute(File file) {\n\t\tGlobalEnv env = new GlobalEnv();\n\t\tFileNode fileNode = new FileNode(file);\n\n\t\tfileNode.execute(env); // TODO Consider the returned CONTROL value?\n\t\tenv.finishExecution();\n\t\t\n\t\tDataNode output = env.getCurrentOutput();\n\t\treturn new DataModel(output);\n\t}",
"public void runProgram(Path p) {\n\t\ttry {\n\t\t\tFile f = new File(p.toString());\n\t\t\tString dir = f.getParent();\n\t\t\tString filename = f.getName();\n\t\t\tString currentOS = System.getProperty(\"os.name\").toLowerCase();\n\n\t\t\t//System.out.println(\"OS: \" + currentOS);\n\t\t\t\n\t\t\tif (currentOS.indexOf(\"win\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")).concat(\".exe\"));\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Compiled File: \" + compiled);\n\n\t\t\t\tif (this.programIfExists(compiled)) {\n\t\t\t\t\tSystem.out.println(\"Finished Compiling\");\n\t\t\t\t\tProcessBuilder pb = new ProcessBuilder(\"cmd\", \"/k\", \"start\", compiled);\n\t\t\t\t\tProcess proc = pb.start();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Some compilation error occured\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if(currentOS.indexOf(\"mac\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")).concat(\".out\"));\n\t\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t\tProcess proc = rt.exec(compiled);\n\t\t\t}\n\n\t\t\telse if(currentOS.indexOf(\"nix\") >= 0 || currentOS.indexOf(\"nux\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")));\n\t\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t\tProcess proc = rt.exec(compiled);\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception ex) {\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}",
"private void doExecute() throws MojoExecutionException {\n URL buildUrl;\n try {\n buildUrl = buildDirectory.toURI().toURL();\n getLog().info(\"build directory \" + buildUrl.toString());\n } catch (MalformedURLException e1) {\n throw new MojoExecutionException(\"Cannot build URL for build directory\");\n }\n ClassLoader loader = makeClassLoader();\n Properties properties = new Properties(project.getProperties());\n properties.setProperty(\"lenskit.eval.dataDir\", dataDir);\n properties.setProperty(\"lenskit.eval.analysisDir\", analysisDir);\n dumpClassLoader(loader);\n EvalConfigEngine engine = new EvalConfigEngine(loader, properties);\n \n try {\n File f = new File(script);\n getLog().info(\"Loading evalution script from \" + f.getPath());\n engine.execute(f);\n } catch (CommandException e) {\n throw new MojoExecutionException(\"Invalid evaluation script\", e);\n } catch (IOException e) {\n throw new MojoExecutionException(\"IO Exception on script\", e);\n }\n }",
"public static void main(String[] args) {\n\r\n\t\tSnippet snippet = new Snippet();\r\n\t\tsnippet.load();\r\n\t}",
"public static void run(String path) {\n\n\t\t// Create a resource set with a base directory:\n\t\tHenshinResourceSet resourceSet = new HenshinResourceSet(path);\n\n\t\t// Load the module:\n\t\tModule module = resourceSet.getModule(\"javaimports.henshin\", false);\n\n\t\t// Create an empty EGraph:\n\t\tEGraph graph = new EGraphImpl();\n\n\t\t// Use a delegating class loader so that the script engine can find the helper class:\n\t\tThread thread = Thread.currentThread();\n\t\tthread.setContextClassLoader(new InterpreterUtil.DelegatingClassLoader(thread.getContextClassLoader(),\n\t\t\t\tJavaImportsExample.class.getClassLoader()));\n\n\t\t// Create an engine and a rule application:\n\t\tEngine engine = new EngineImpl();\n\t\tRuleApplication app = new RuleApplicationImpl(engine, graph, (Rule) module.getUnit(\"simple\"), null);\n\t\tString value = \"hello world\";\n\t\tapp.setParameterValue(\"x\", value);\n\t\tInterpreterUtil.executeOrDie(app);\n\n\t\t\n\t\t\n\t\t// retrieve the node that was created by the rule\n\t\tIterator<EObject> graphIt =graph.iterator(); \n\t\tEObject newObj = null;\n\t\tif(graphIt.hasNext()) \n\t\t\tnewObj = graphIt.next();\n\t\tif(newObj==null) \n\t\t\tthrow new RuntimeException(\"Unexpected result of rule application: no graph node was created (expected one node)\");\n\t\t\n\t\t// retrieve the attribute value of the node and check the expected result\n\t\tString newValue = (String) newObj.eGet(newObj.eClass().getEStructuralFeature(\"stringValue\"));\n\t\tif (!newValue.equals(value.toUpperCase())) {\n\t\t\tthrow new RuntimeException(\"Unexpected string value: \\\"\" + newValue + \"\\\" (expected \\\"\"\n\t\t\t\t\t+ value.toUpperCase() + \"\\\")\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Java Imports Example: Found correct value: \\\"\" + newValue + \"\\\"\");\n\t\t}\n\n\t}",
"public void runScript(File script) throws DataAccessLayerException {\n byte[] bytes = null;\n try {\n bytes = FileUtil.file2bytes(script);\n } catch (FileNotFoundException e) {\n throw new DataAccessLayerException(\n \"Unable to open input stream to sql script: \" + script);\n } catch (IOException e) {\n throw new DataAccessLayerException(\n \"Unable to read script contents for script: \" + script);\n }\n runScript(new StringBuffer().append(new String(bytes)));\n }",
"public interface PyRunnable {\n /**\n * Return the org.jpp.modules code object.\n */\n abstract public PyCode getMain();\n}",
"public void compileScript( TemplateCompilerContext context )\r\n\t{\r\n\t\t// Compile to bytes\r\n\t\tCompilationUnit unit = new CompilationUnit();\r\n\t\tunit.addSource( context.getPath(), context.getScript().toString() );\r\n\t\tunit.compile( Phases.CLASS_GENERATION );\r\n\r\n\t\t// Results\r\n\t\t@SuppressWarnings( \"unchecked\" )\r\n\t\tList< GroovyClass > classes = unit.getClasses();\r\n\t\tAssert.isTrue( classes.size() > 0, \"Expecting 1 or more classes\" );\r\n\r\n\t\tClassLoader parent = Thread.currentThread().getContextClassLoader();\r\n\t\tif( parent == null )\r\n\t\t\tparent = GroovyTemplateCompiler.class.getClassLoader();\r\n\r\n\t\t// Define the class\r\n\t\t// TODO Configurable class loader\r\n\t\tDefiningClassLoader classLoader = new DefiningClassLoader( parent );\r\n\t\tClass< ? > first = null;\r\n\t\tfor( GroovyClass cls : classes )\r\n\t\t{\r\n\t\t\tClass< ? > clas = classLoader.defineClass( cls.getName(), cls.getBytes() );\r\n\t\t\tif( first == null )\r\n\t\t\t\tfirst = clas; // TODO Are we sure that the first one is always the right one?\r\n\t\t}\r\n\r\n\t\t// Instantiate the first\r\n\t\tGroovyObject object = (GroovyObject)Util.newInstance( first );\r\n\t\tClosure closure = (Closure)object.invokeMethod( \"getClosure\", null );\r\n\r\n\t\t// The old way:\r\n//\t\tClass< GroovyObject > groovyClass = new GroovyClassLoader().parseClass( new GroovyCodeSource( getSource(), getName(), \"x\" ) );\r\n\r\n\t\tcontext.setTemplate( new GroovyTemplate( closure ) );\r\n\t}",
"@POST\n\t@Path(\"/execute/{id}\")\n\tpublic Response execute(@PathParam(\"id\") String id, String source) throws Exception {\n\t\t// Persist\n\t\tString target = persist(id, source);\n\t\t\n\t\t// Alter stdout\n\t\tPrintStream stdout = System.out;\n\t\tPrintStream stderr = System.err;\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tPrintStream capture = new PrintStream(baos);\n\t\t\n\t\ttry {\n\t\t\tSystem.setOut(capture);\n\t\t\tSystem.setErr(capture);\n\t\n\t\t\t// Compile source file.\n\t\t\tJavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n\t\t\tint result = compiler.run(null, capture, capture, Paths.get(target.toString(), \"/Main.java\").toString());\n\t\t\t\n\t\t\tif (result == 0) { // Successful compile, execute.\n\t\t\t\t// Load and instantiate compiled class.\n\t\t\t\tWhitelistClassLoader classLoader = new WhitelistClassLoader(\n\t\t\t\t\t\tURLClassLoader.newInstance(new URL[] { new URL(Paths.get(target).toUri() +\"/\") }));\n\t\t\n\t\t\t\t// Run\n\t\t\t\t// FIXME: Execute in separate JVM.\n\t\t\t\t// FIXME: Kill off if running for too long.\n\t\t String progClass = \"Main\";\n\t\t String[] args = {};\n\t\t Class<?> clazz = classLoader.loadClass(progClass);\n\t\t Class<?> mainArgType[] = { (new String[0]).getClass() };\n\t\t Method main = clazz.getMethod(\"main\", mainArgType);\n\t\t Object argsArray[] = { args };\n\t\t main.invoke(null, argsArray);\n\t\t\t}\n\t\t\t\n\t // Return output of last successful command\n\t\t\treturn Response.ok(baos.toString()).build();\n\t\t} finally {\n\t // Replace stdout\n\t System.out.flush();\n\t System.err.flush();\n\t \n\t System.setOut(stdout);\n\t System.setErr(stderr);\n\t\t}\n\t}",
"public void executePython()\n {\n\n Process pr;\n try {\n pr = Runtime.getRuntime().exec(\"/usr/local/bin//python3 /Users/jithinjose/Downloads/Corona-Tracker/src/main/resources/test12.py\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"R execute();",
"void run(String fin){\n\t\tScanner sc = null;\n\t\ttry{\n\t\t\tsc = new Scanner(new FileReader(fin));\n\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\texecuteLine(sc.nextLine());\n\t\t\t}\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.err.println(String.format(\"File %s not found\", fin));\n\t\t}\n\t\tfinally{\n\t\t\tif (sc != null){\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t}\n\t}",
"public SimpleDatabase executeSqlFile(String name) {\n // possibly trim .sql extension\n if (name.toLowerCase().endsWith(\".sql\")) {\n name = name.substring(0, name.length() - 4);\n }\n SQLiteDatabase db = context.openOrCreateDatabase(name);\n int id = context.getResourceId(name, \"raw\");\n return executeSqlFile(db, id);\n }",
"abstract void exec();",
"protected Object compileAndLoad() throws IOException {\n String generatedSource = printJCodeModel();\n return compileAndLoadSource(generatedSource, TEST_CLASS_NAME);\n }",
"public void startExecuting() {}",
"WfExecutionObject source () throws BaseException, SourceNotAvailable;",
"public ModuleScope requestParse(Context context) throws IOException {\n // TODO [AA] This needs to evolve to support scope execution\n if (cachedScope == null) {\n cachedScope = context.createScope();\n context.compiler().run(file, cachedScope);\n }\n return cachedScope;\n }",
"private static void test1() throws ParseException, IOException {\n\t\n\tFile classFile = new File(\"/home/sebastian/workspace3.7/yuigwt/java-tools/org/sgx/gwtjavatools/delegate/JYUIDelegateMethods.java\");\n\t\n// InputStream in = ParserTest.class.getClassLoader().getResourceAsStream(\"/java-tools/org/sgx/gwtjavatools/delegate/JYUIDelegateMethods.java\");//new FileInputStream(\"test.java\");\n\n\tFileInputStream in = new FileInputStream(classFile); \n\t\n CompilationUnit cu;\n try {\n // parse the file\n cu = JavaParser.parse(in);\n } finally {\n in.close();\n }\n\n // visit and print the methods names\n new MethodVisitor().visit(cu, null);\n\n // prints the resulting compilation unit to default system output\n// System.out.println(cu.toString());\n}",
"public static void main(String[] args) throws FileNotFoundException {\n\t\t\t\n\t\tScanner scan = new Scanner(new File(\"input.txt\"));\n\t\t\n\t\tParser parse;\n\t\tCode code = new Code();\n\t\tSymbolTable st = new SymbolTable();\n\t\t\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString inCode = scan.nextLine();\t\n\t\t\tparse = new Parser(inCode);\n\t\t}\n\t\t\n\t}",
"public void runProgram() {\n\t\tJTextPane code = ((MinLFile) tabbedPane.getSelectedComponent()).CodeArea;\n\t\tminc.consolearea.setText(\"\");\n\t\tinterpretorMainMethod(code.getText(), 0);\n\t\tdouble_variables.clear();\n\t\tstring_variables.clear();\n\t\tfunctions.clear();\n\t}",
"@Override\n public void genCode(CodeFile f){\n String testLabel = f.getLocalLabel(),\n endLabel = f.getLocalLabel();\n\n f.genInstr(testLabel, \"\", \"\", \"Start while-statment\");\n expr.genCode(f);\n f.genInstr(\"\", \"cmpl\", \"$0,%eax\", \"\");\n f.genInstr(\"\", \"je\", endLabel, \"\");\n body.genCode(f);\n f.genInstr(\"\", \"jmp\", testLabel, \"\");\n f.genInstr(endLabel, \"\", \"\", \"End while-statment\");\n }",
"public static void main(String[] args) \r\n\t{\r\n\t\tnew SyntaxTest().run();\r\n\t}",
"public static void execute(File program, InputStream input, OutputStream output, OutputStream debug) throws IOException {\n\t\tFileInputStream fis = new FileInputStream(program);\n\t\tCharStream codeInputStream = CharStreams.fromStream(fis);\n\t\tBrainfuckLexer lexer = new BrainfuckLexer(codeInputStream);\n\t\tCommonTokenStream tokens = new CommonTokenStream(lexer);\n\t\tBrainfuckParser parser = new BrainfuckParser(tokens);\n\t\tparser.setFile(program);\n\t\tProgram ast = parser.program().prog;\n\t\texecute(ast, input, output, null);\n\t}",
"DelegateCaseExecution getSourceExecution();",
"public LocalSource(FileNode fn, String alias){\n this.fn=fn;\n this.alias=alias;\n }",
"public static void realWorld() \r\n\t{\r\n\t\tStream<File> roots = Arrays.stream(new String[] { \".\" }).map(File::new); \r\n\t\t\r\n\t\tStream<File> files = roots.flatMap(Program::allFilesIn).filter(endsWith(\".java\"));\r\n\t\tStream<String> lines = files.flatMap(Program::readIn);\r\n\t\tStream<String> words = lines.flatMap(Program::splitIntoWords);\r\n\t\twords.forEach(System.out::println);\r\n\t\tSystem.out.println(\"Done\");\r\n\t}",
"public String run(Source source) {\r\n if (grammar == null) {\r\n System.err.println(\"Error: No grammar has been set up\");\r\n System.exit(1);\r\n }\r\n prepare(source);\r\n return runParser();\r\n }",
"public static void main(){\n\t}",
"private static void startWork()\n {{\n String ftnTxt= null;\n FileToFtnParser parser= new FileToFtnParser( arg_ir_filename );\n String hashes39= \"#######################################\";\n\n while( true ) {\n\t ftnTxt= parser.parseFtn();\n\t if ( ftnTxt == null ) { break; }\n\t if ( arg_verbosity > 1 ) {\n\t System.out.println ( hashes39+ hashes39 );\n\t System.out.println ( \"found function: <<EOF \" );\n\t System.out.println ( ftnTxt );\n\t System.out.println ( \"EOF\" );\n\t }\n\n\t FtnParts ftnParts= new FtnParts( ftnTxt );\n\n\t if ( arg_verbosity > 0 ) {\n System.out.println( \"---\" );\n\t System.out.println( \"function: \" );\n\t System.out.println( ftnParts.toString() );\n\t }\n\n\t TestGenerator generator= new TestGenerator( ftnParts, arg_numCalls );\n\t String outFilename= arg_outDirname+ File.separator+ \n\t ftnParts.getNameWithoutSigil()+ \".ll\";\n\t generator.generate( outFilename );\n }\n\n }}",
"private static void compileFile(String path) throws IOException {\n File f = new File(path);\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n File[] files = {f};\n Iterable<? extends JavaFileObject> compilationUnits =\n fileManager.getJavaFileObjectsFromFiles(Arrays.asList(files));\n compiler.getTask(null, fileManager, null, null, null, compilationUnits).call();\n fileManager.close();\n }",
"private static void compileAndRun(String fileName, String code) {\n\n if(verboseCompiling) println(\"Deleting old temp files...\", warning);\n new File(fileName + \".java\").delete();\n new File(fileName + \".class\").delete();\n\n if(verboseCompiling) println(\"Creating source file...\", progErr);\n file = new File(fileName + \".java\");\n\n if(verboseCompiling) println(\"Writing code to source file...\", progErr);\n try {\n new FileWriter(file).append(code).close();\n } catch (IOException i) {\n println(\"Had an IO Exception when trying to write the code. Stack trace:\", error);\n i.printStackTrace();\n return; //Exit on error\n }\n\n if(verboseCompiling) println(\"Compiling code...\", progErr);\n //This should only ever be called if the JDK isn't installed. How you'd get here, I don't know.\n if (compiler == null) {\n println(\"Fatal Error: JDK not installed. Go to java.sun.com and install.\", error);\n return;\n }\n\n //Tries to compile. Success code is 0, so if something goes wrong, report.\n int result = -1;\n if (compileOptions.trim().equals(\"\"))\n result = compiler.run(null, out, err, file.getAbsolutePath());\n else\n //result = compiler.run(null, out, err, compileOptions, file.getAbsolutePath());\n result = compiler.run(null, out, err, \"-cp\", \"/Users/student/Desktop/bluecove-2.1.0.jar\", file.getAbsolutePath());\n //ArrayList<String> files = new ArrayList<>();\n //files.add(fileName);\n //boolean result = compiler.getTask(null, null, new ErrorReporter(), null, files, null).call();\n if (result != 0) {\n displayLog();\n //println(\"end record\", error); //End recording and pull out the message\n\n //println(\"Error type: \" + result,error);\n println(\"Failed to compile.\", warning);\n return; //Return on error\n }\n\n if(verboseCompiling) println(\"Attempting to run code...\", progErr);\n try {\n //Makes sure the JVM resets if it's already running.\n if(JVMrunning) \n kill();\n\n //Clears terminal window on main method call.\n if(clearOnMethod)\n outputText.setText(\"\");\n\n //Some String constants for java path and OS-specific separators.\n String separator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"java.home\")\n + separator + \"bin\" + separator + \"java\";\n\n //Creates a new process that executes the source file.\n ProcessBuilder builder = null;\n if(runOptions.trim().equals(\"\")) \n builder = new ProcessBuilder(path, fileName);\n else \n builder = new ProcessBuilder(path, runOptions, fileName);\n\n //Everything should be good now. Everything past this is on you. Don't mess it up.\n println(\"Build succeeded on \" + java.util.Calendar.getInstance().getTime().toString(), progErr);\n println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\", progErr); \n\n //Tries to run compiled code.\n JVM = builder.start();\n JVMrunning = true;\n\n //Links runtime out/err to our terminal window. No support for input yet.\n Reader errorReader = new InputStreamReader(JVM.getErrorStream());\n Reader outReader = new InputStreamReader(JVM.getInputStream());\n //Writer inReader = new OutputStreamWriter(JVM.getOutputStream());\n\n redirectErr = redirectIOStream(errorReader, err);\n redirectOut = redirectIOStream(outReader, out);\n //redirectIn = redirectIOStream(null, inReader);\n } catch (IOException e) {\n //JVM = builder.start() can throw this.\n println(\"IOException when running the JVM.\", progErr);\n e.printStackTrace();\n displayLog();\n return;\n }\n }",
"private void cmdOpenUseFile(String file) {\n MModel model = null;\n FileInputStream specStream = null;\n\n String filename = getFilenameToOpen(file);\n \n try {\n Log.verbose(\"compiling specification...\");\n specStream = new FileInputStream(filename);\n model = USECompiler.compileSpecification(specStream, filename,\n new PrintWriter(System.err), new ModelFactory());\n } catch (FileNotFoundException e) {\n Log.error(\"File `\" + filename + \"' not found.\");\n } finally {\n if (specStream != null)\n try {\n \tspecStream.close();\n } catch (IOException ex) {}\n }\n\n // compile ok?\n if (model != null) {\n // print some info about model\n Log.verbose(model.getStats());\n\n // create system\n fSession.setSystem(new MSystem(model));\n }\n \n setFileClosed();\n }",
"@Test\n\tpublic void testLoad() {\n\t\tWriter writer = null ;\n\t\t\n\t\tString sourceFilePath = \"testLoad1.lisp\" ;\n\t\t\n\t\t//create the test source file\n\t\ttry {\n\t\t\twriter = new BufferedWriter(\n\t\t\t\t\t\tnew OutputStreamWriter(\n\t\t\t\t\t\t\t\tnew FileOutputStream(sourceFilePath), \"utf-8\")) ;\n\t\t\twriter.write(\"(define foo 37)\\n\");\n\t\t} catch (IOException except){\n\t\t\t\n\t\t} finally {\n\t\t\ttry {writer.close();} catch (Exception ex) {}\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tLispObject result = LispReader.load(sourceFilePath, env) ;\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\t\n\t\tenv.dump() ;\n\t\t//check that the environment contains the bindings as stated in the source file.\n\t\t\n\t\tSystem.out.println(\"testLoad(): got \" + env.get(\"BAR\")) ;\n\n\t\tassertTrue(env.get(\"FOO\").toString().equals(\"37\"));\n\t}",
"void eval(Reader reader) throws ScriptRunnerException, IOException;",
"WfExecutionObject source (SharkTransaction t) throws BaseException, SourceNotAvailable;",
"@Override\n public void startExecuting() {\n getActiveRoutine().startExecutingRoutine();\n }",
"public void parseFile(String fileLocation) {\n\t\tString sourceCode = null;\n\t\ttry {\n\t\t\tsourceCode = FileUtils.readFileToString(new File(fileLocation), \"ISO-8859-1\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// just in case somehow things escape the try-catch statement\n\t\tif(sourceCode == null) {\n\t\t\tthrow new IllegalStateException(\"[ERROR]: source code is null!\");\n\t\t}\n\n\t\t// create parser and set properties\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setUnitName(fileLocation);\n\t\tparser.setEnvironment(null, null, null, true);\n\t\tparser.setSource(sourceCode.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\tparser.setStatementsRecovery(true);\n\n\t\tfinal CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n//\t\tfor (Comment comment : (List<Comment>) cu.getCommentList()) {\n//\t\t\tcomment.accept(new ASTRefactor.CommentVisitor(cu, sourceCode));\n//\t\t}\n\n\t\tcu.accept(new ASTVisitor() {\n\t\t\tpublic boolean visit(AnonymousClassDeclaration node) {\n\t\t\t\tJavaClass co = new JavaClass();\n\n\t\t\t\tif(configProperties.get(\"AnonymousClassDeclaration\")) {\n\t\t\t\t\tITypeBinding binding = node.resolveBinding();\n\n\t\t\t\t\tint startLine = cu.getLineNumber(node.getStartPosition());\n\t\t\t\t\tint endLine = cu.getLineNumber(node.getStartPosition() + node.getLength() - 1);\n\n\t\t\t\t\tco.setIsAnonymous(binding.isAnonymous());\n\t\t\t\t\tco.setColumnNumber(cu.getColumnNumber(node.getStartPosition()));\n\t\t\t\t\tco.setEndLine(endLine);\n\t\t\t\t\tco.setLineNumber(startLine);\n\n\t\t\t\t\tSystem.out.println(startLine);\n\n\t\t\t\t\tco.setNumberOfCharacters(node.getLength());\n\t\t\t\t\tco.setFileName(fileLocation);\n\n\t\t\t\t\tList<String> genericParametersList = new ArrayList<>();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif(binding.isGenericType()) {\n\t\t\t\t\t\t\tco.setIsGenericType(binding.isGenericType());\n\t\t\t\t\t\t\tfor(Object o : binding.getTypeParameters()) {\n\t\t\t\t\t\t\t\tgenericParametersList.add(o.toString());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tco.setIsGenericType(false);\n\t\t\t\t\t}\n\t\t\t\t\tco.setGenericParametersList(genericParametersList);\n\n\t\t\t\t\tco.setHasComments(hasComments);\n\t\t\t\t\tco.setSourceCode(getClassSourceCode(fileLocation, startLine, endLine));\n\t\t\t\t\tco.setStartCharacter(node.getStartPosition());\n\t\t\t\t\tco.setEndCharacter(node.getStartPosition() + node.getLength() - 1);\n\t\t\t\t\tco.setImportList(importList);\n\t\t\t\t\tco.setPackage(packageObject);\n\t\t\t\t\tco.setIsAnonymous(true);\n\t\t\t\t}\n\n\t\t\t\tentityStack.push(co);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic void endVisit(AnonymousClassDeclaration node) {\n\t\t\t\tif(configProperties.get(\"AnonymousClassDeclaration\")) {\n\t\t\t\t\tJavaClass temp = (JavaClass) entityStack.pop();\n\n\t\t\t\t\ttemp.setIsInnerClass(true);\n\n\t\t\t\t\ttemp.setComplexities();\n\t\t\t\t\ttemp.setMethodDeclarationNames();\n\t\t\t\t\ttemp.setMethodInvocationNames();\n\n\t\t\t\t\tif(!containingClass.isEmpty()) {\n\t\t\t\t\t\ttemp.setContainingClass(containingClass);\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tentityStack.peek().addEntity(temp, Entity.EntityType.CLASS);\n\t\t\t\t\t} catch (EmptyStackException e) {\n\t\t\t\t\t\t// should not be possible\n\t\t\t\t\t}\n\n\t\t\t\t\tfileModel.addJavaClass(temp);\n\n\t\t\t\t\thasComments = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic boolean visit(CatchClause node) {\n\t\t\t\tif(inMethod && configProperties.get(\"CatchClause\")) {\n\t\t\t\t\tSimpleName name = node.getException().getName();\n\n\t\t\t\t\tSuperEntityClass cco = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t);\n\t\t\t\t\tcco.setType(node.getException().getType());\n\t\t\t\t\tentityStack.peek().addEntity(cco, Entity.EntityType.CATCH_CLAUSE);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(ConditionalExpression node){\n\t\t\t\tif(inMethod && configProperties.get(\"ConditionalExpression\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.CONDITIONAL_EXPRESSION\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(DoStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"DoStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.DO_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(EnhancedForStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"EnhancedForStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.FOR_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(FieldDeclaration node) {\n\t\t\t\tif(configProperties.get(\"FieldDeclaration\")) {\n\t\t\t\t\tType nodeType = node.getType();\n\n\t\t\t\t\tfor(Object v : node.fragments()) {\n\t\t\t\t\t\tSimpleName name = ((VariableDeclarationFragment) v).getName();\n\n\t\t\t\t\t\t// get fully qualified name\n\t\t\t\t\t\tITypeBinding binding = node.getType().resolveBinding();\n\t\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfullyQualifiedName = binding.getQualifiedName();\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tSuperEntityClass fdEntity = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\t\tnodeType,\n\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif(nodeType.isArrayType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.ARRAY);\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.GLOBAL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isParameterizedType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.GENERICS);\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.GLOBAL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isPrimitiveType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.PRIMITIVE);\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.GLOBAL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isSimpleType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.SIMPLE);\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.GLOBAL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"Something is missing \" + nodeType);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(ForStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"ForStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t), Entity.EntityType.FOR_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(IfStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"IfStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t), Entity.EntityType.IF_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(ImportDeclaration node) {\n\t\t\t\tif(configProperties.get(\"ImportDeclaration\")) {\n\t\t\t\t\tName name = node.getName();\n\n\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfullyQualifiedName = name.getFullyQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tfullyQualifiedName = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\timportList.add(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(InfixExpression node){\n\t\t\t\tif(inMethod && configProperties.get(\"InfixExpression\")) {\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tnode.getOperator().toString(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getLeftOperand().getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getLeftOperand().getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.INFIX_EXPRESSION\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(MethodDeclaration node) {\n\t\t\t\tinMethod = true;\n\t\t\t\tMethodDeclarationObject md = new MethodDeclarationObject();\n\n\t\t\t\tif(configProperties.get(\"MethodDeclaration\")) {\n\t\t\t\t\tSimpleName name = node.getName();\n\t\t\t\t\tboolean isStatic = false;\n\t\t\t\t\tboolean isAbstract = false;\n\n\t\t\t\t\t// get fully qualified name\n\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfullyQualifiedName = name.getFullyQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t}\n\n\t\t\t\t\t// is method declaration abstract?\n\t\t\t\t\tint mod = node.getModifiers();\n\t\t\t\t\tif(Modifier.isAbstract(mod)) {\n\t\t\t\t\t\tisAbstract = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// is method declaration static?\n\t\t\t\t\tif(Modifier.isStatic(mod)) {\n\t\t\t\t\t\tisStatic = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tIMethodBinding binding = node.resolveBinding();\n\n\t\t\t\t\t// get type of each parameter\n\t\t\t\t\tList<String> parameterTypes = new ArrayList<>();\n\t\t\t\t\tfor(Object obj : node.parameters()) {\n\t\t\t\t\t\tITypeBinding tb = ((SingleVariableDeclaration) obj).getType().resolveBinding();\n\t\t\t\t\t\tString fqn;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfqn = tb.getQualifiedName();\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tfqn = name.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparameterTypes.add(fqn);\n\t\t\t\t\t}\n\n\t\t\t\t\tmd.setColumnNumber(cu.getColumnNumber(name.getStartPosition()));\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmd.setDeclaringClass(binding.getDeclaringClass().getQualifiedName());\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tmd.setDeclaringClass(null);\n\t\t\t\t\t}\n\t\t\t\t\tmd.setEndCharacter(node.getStartPosition() + node.getLength() - 1);\n\t\t\t\t\tmd.setEndLine(cu.getLineNumber(node.getStartPosition() + node.getLength() - 1));\n\t\t\t\t\tmd.setFullyQualifiedName(fullyQualifiedName);\n\n\t\t\t\t\tmd.setIsAbstract(isAbstract);\n\t\t\t\t\tmd.setIsConstructor(node.isConstructor());\n\n\t\t\t\t\t// to avoid API from setting constructor return type to void\n\t\t\t\t\tif(node.isConstructor()) {\n\t\t\t\t\t\tmd.setReturnType(null);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmd.setReturnType(binding.getReturnType().getQualifiedName());\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tmd.setReturnType(null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// get generic parameters\n\t\t\t\t\tList<String> genericParametersList = new ArrayList<>();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif(binding.isGenericMethod()) {\n\t\t\t\t\t\t\tmd.setIsGenericType(binding.isGenericMethod());\n\t\t\t\t\t\t\tfor(Object o : binding.getTypeParameters()) {\n\t\t\t\t\t\t\t\tgenericParametersList.add(o.toString());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tmd.setIsGenericType(false);\n\t\t\t\t\t}\n\n\t\t\t\t\tmd.setGenericParametersList(genericParametersList);\n\t\t\t\t\tmd.setIsStatic(isStatic);\n\t\t\t\t\tmd.setIsVarargs(node.isVarargs());\n\t\t\t\t\tmd.setLineNumber(cu.getLineNumber(name.getStartPosition()));\n\t\t\t\t\tmd.setName(name.toString());\n\t\t\t\t\tmd.setNumberOfCharacters(node.getLength());\n\t\t\t\t\tmd.setParametersList(node.parameters());\n\t\t\t\t\tmd.setParameterTypesList(parameterTypes);\n\t\t\t\t\tmd.setStartCharacter(name.getStartPosition());\n\n\t\t\t\t\tif(node.thrownExceptionTypes().size() > 0) {\n\t\t\t\t\t\tfor(Object o : node.thrownExceptionTypes()) {\n\t\t\t\t\t\t\tmd.addThrowsException(o.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tentityStack.push(md);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic void endVisit(MethodDeclaration node) {\n\t\t\t\tMethodDeclarationObject temp = (MethodDeclarationObject) entityStack.pop();\n\n\t\t\t\tif(configProperties.get(\"MethodDeclaration\")) {\n\t\t\t\t\ttemp.setComplexities();\n\t\t\t\t\ttemp.setMethodDeclarationNames();\n\t\t\t\t\ttemp.setMethodInvocationNames();\n\t\t\t\t\tentityStack.peek().addEntity(temp, Entity.EntityType.METHOD_DECLARATION);\n\t\t\t\t}\n\n\t\t\t\tinMethod = false;\n\t\t\t}\n\n\t\t\tpublic boolean visit(MethodInvocation node) {\n\t\t\t\tif(configProperties.get(\"MethodInvocation\")) {\n\t\t\t\t\tSimpleName name = node.getName();\n\n\t\t\t\t\t// get fully qualified name\n\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfullyQualifiedName = name.getFullyQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t}\n\n\t\t\t\t\t// get declaring class\n\t\t\t\t\tIMethodBinding binding = node.resolveMethodBinding();\n\t\t\t\t\tString declaringClass;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdeclaringClass = binding.getDeclaringClass().getQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tdeclaringClass = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// get calling class\n\t\t\t\t\tString callingClass;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcallingClass = node.getExpression().resolveTypeBinding().getQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tcallingClass = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// get argument types\n\t\t\t\t\tList<String> argumentTypes = new ArrayList<>();\n\t\t\t\t\tfor(Object t : node.arguments()) {\n\t\t\t\t\t\tITypeBinding tb = ((Expression)t).resolveTypeBinding();\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\targumentTypes.add(tb.getQualifiedName());\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\targumentTypes.add(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tMethodInvocationObject mio = new MethodInvocationObject();\n\t\t\t\t\tmio.setName(name.toString());\n\t\t\t\t\tmio.setFullyQualifiedName(fullyQualifiedName);\n\t\t\t\t\tmio.setDeclaringClass(declaringClass);\n\t\t\t\t\tmio.setCallingClass(callingClass);\n\t\t\t\t\tmio.setArguments(node.arguments());\n\t\t\t\t\tmio.setArgumentTypes(argumentTypes);\n\t\t\t\t\tmio.setLineNumber(cu.getLineNumber(name.getStartPosition()));\n\t\t\t\t\tmio.setEndLine(cu.getLineNumber(node.getStartPosition() + node.getLength() - 1));\n\t\t\t\t\tmio.setStartCharacter(name.getStartPosition());\n\t\t\t\t\tmio.setEndCharacter(node.getStartPosition() + node.getLength() - 1);\n\t\t\t\t\tmio.setColumnNumber(cu.getColumnNumber(name.getStartPosition()));\n\t\t\t\t\tentityStack.peek().addEntity(mio, Entity.EntityType.METHOD_INVOCATION);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(PackageDeclaration node){\n\t\t\t\tif(configProperties.get(\"PackageDeclaration\")) {\n\t\t\t\t\tName name = node.getName();\n\n\t\t\t\t\t// get fully qualified name\n\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfullyQualifiedName = name.getFullyQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tfullyQualifiedName = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tpackageObject = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\tnode.getName().toString(),\n\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(SingleVariableDeclaration node) {\n\t\t\t\tif(configProperties.get(\"SingleVariableDeclaration\")) {\n\t\t\t\t\tSimpleName name = node.getName();\n\n\t\t\t\t\t// get fully qualified name\n\t\t\t\t\tITypeBinding binding = node.getType().resolveBinding();\n\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfullyQualifiedName = binding.getQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t}\n\n\t\t\t\t\tSuperEntityClass svdEntity = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\tnode.getType(),\n\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t);\n\n\t\t\t\t\tif(node.getType().isArrayType()) {\n\t\t\t\t\t\tentityStack.peek().addEntity(svdEntity, Entity.EntityType.ARRAY);\n\t\t\t\t\t}\n\t\t\t\t\telse if(node.getType().isParameterizedType()) {\n\t\t\t\t\t\tentityStack.peek().addEntity(svdEntity, Entity.EntityType.GENERICS);\n\t\t\t\t\t}\n\t\t\t\t\telse if(node.getType().isPrimitiveType()) {\n\t\t\t\t\t\tentityStack.peek().addEntity(svdEntity, Entity.EntityType.PRIMITIVE);\n\t\t\t\t\t}\n\t\t\t\t\telse if(node.getType().isSimpleType()) {\n\t\t\t\t\t\tentityStack.peek().addEntity(svdEntity, Entity.EntityType.SIMPLE);\n\t\t\t\t\t}\n\t\t\t\t\telse if(node.getType().isUnionType()) {\n\t\t\t\t\t\tentityStack.peek().addEntity(svdEntity, Entity.EntityType.UNION);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"Something is missing \" + node.getType());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(SwitchStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"SwitchStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tSuperEntityClass sso = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t);\n\n\t\t\t\t\tList<SuperEntityClass> switchCaseList = new ArrayList<>();\n\n\t\t\t\t\tfor(Object s : node.statements()) {\n\t\t\t\t\t\tif(s instanceof SwitchCase) {\n\t\t\t\t\t\t\tString expression;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\texpression = ((SwitchCase) s).getExpression().toString();\n\t\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\t\texpression = \"Default\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitchCaseList.add(\n\t\t\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texpression,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(((SwitchCase) s).getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(((SwitchCase)s).getStartPosition())\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tsso.addEntities(switchCaseList, Entity.EntityType.SWITCH_CASE);\n\t\t\t\t\tentityStack.peek().addEntity(sso, Entity.EntityType.SWITCH_STATEMENT);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(ThrowStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"ThrowStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.THROW_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(TryStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"TryStatement\")) {\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Try Statement\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.TRY_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(TypeDeclaration node) {\n\t\t\t\tJavaClass co = new JavaClass();\n\n\t\t\t\tif(configProperties.get(\"TypeDeclaration\")) {\n\t\t\t\t\tif(node.isInterface()) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint startLine = cu.getLineNumber(node.getStartPosition());\n\t\t\t\t\t\tint endLine = cu.getLineNumber(node.getStartPosition() + node.getLength() - 1);\n\n\t\t\t\t\t\tITypeBinding binding = node.resolveBinding();\n\n\t\t\t\t\t\t// get fully qualified name\n\t\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfullyQualifiedName = node.getName().getFullyQualifiedName();\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tfullyQualifiedName = node.getName().toString();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(containingClass.isEmpty()) {\n\t\t\t\t\t\t\tcontainingClass = node.getName().toString();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tco.setIsAnonymous(binding.isAnonymous());\n\t\t\t\t\t\tco.setColumnNumber(cu.getColumnNumber(node.getStartPosition()));\n\t\t\t\t\t\tco.setEndLine(endLine);\n\t\t\t\t\t\tco.setLineNumber(startLine);\n\t\t\t\t\t\tco.setName(node.getName().toString());\n\t\t\t\t\t\tco.setNumberOfCharacters(node.getLength());\n\t\t\t\t\t\tco.setFileName(fileLocation);\n\t\t\t\t\t\tco.setFullyQualifiedName(fullyQualifiedName);\n\n\t\t\t\t\t\t// get generic parameters\n\t\t\t\t\t\tList<String> genericParametersList = new ArrayList<>();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif(binding.isGenericType()) {\n\t\t\t\t\t\t\t\tco.setIsGenericType(binding.isGenericType());\n\t\t\t\t\t\t\t\tfor(Object o : binding.getTypeParameters()) {\n\t\t\t\t\t\t\t\t\tgenericParametersList.add(o.toString());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tco.setIsGenericType(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tco.setGenericParametersList(genericParametersList);\n\n\t\t\t\t\t\tco.setHasComments(hasComments);\n\t\t\t\t\t\tco.setImportList(importList);\n\t\t\t\t\t\tco.setPackage(packageObject);\n\t\t\t\t\t\tco.setSourceCode(getClassSourceCode(fileLocation, startLine, endLine));\n\t\t\t\t\t\tco.setStartCharacter(node.getStartPosition());\n\t\t\t\t\t\tco.setEndCharacter(node.getStartPosition() + node.getLength() - 1);\n\n\t\t\t\t\t\tif(node.getSuperclassType() != null) {\n\t\t\t\t\t\t\tco.setSuperClass(node.getSuperclassType().toString());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(node.superInterfaceTypes().size() > 0) {\n\t\t\t\t\t\t\tfor(Object o : node.superInterfaceTypes()) {\n\t\t\t\t\t\t\t\tco.addImplementsInterface(o.toString());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tint mod = node.getModifiers();\n\t\t\t\t\t\tif(Modifier.isAbstract(mod)) {\n\t\t\t\t\t\t\tco.setIsAbstract(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tco.setIsAbstract(false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tentityStack.push(co);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic void endVisit(TypeDeclaration node) {\n\t\t\t\tJavaClass temp = (JavaClass) entityStack.pop();\n\n\t\t\t\tif(!node.isInterface() && configProperties.get(\"TypeDeclaration\")) {\n\t\t\t\t\t// check if current class is an inner class\n\t\t\t\t\tboolean isInnerClass = true;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tentityStack.peek();\n\t\t\t\t\t} catch (EmptyStackException e) {\n\t\t\t\t\t\tisInnerClass = false;\n\t\t\t\t\t}\n\t\t\t\t\ttemp.setIsInnerClass(isInnerClass);\n\n\t\t\t\t\ttemp.setComplexities();\n\t\t\t\t\ttemp.setMethodDeclarationNames();\n\t\t\t\t\ttemp.setMethodInvocationNames();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif(!containingClass.isEmpty()) {\n\t\t\t\t\t\t\ttemp.setContainingClass(containingClass);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tentityStack.peek().addEntity(temp, Entity.EntityType.CLASS);\n\n\t\t\t\t\t} catch (EmptyStackException e) {\n\t\t\t\t\t\tcontainingClass = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tfileModel.addJavaClass(temp);\n\t\t\t\t}\n\n\t\t\t\thasComments = false;\n\t\t\t}\n\n\t\t\tpublic boolean visit(VariableDeclarationStatement node) {\n\t\t\t\tif(configProperties.get(\"VariableDeclarationStatement\")) {\n\t\t\t\t\tType nodeType = node.getType();\n\n\t\t\t\t\tfor(Object v : node.fragments()) {\n\t\t\t\t\t\tSimpleName name = ((VariableDeclarationFragment) v).getName();\n\n\t\t\t\t\t\t// get fully qualified name\n\t\t\t\t\t\tITypeBinding binding = node.getType().resolveBinding();\n\t\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfullyQualifiedName = binding.getQualifiedName();\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tSuperEntityClass vdsEntity = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\t\tnodeType,\n\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif(nodeType.isArrayType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdsEntity, Entity.EntityType.ARRAY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isParameterizedType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdsEntity, Entity.EntityType.GENERICS);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isPrimitiveType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdsEntity, Entity.EntityType.PRIMITIVE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isSimpleType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdsEntity, Entity.EntityType.SIMPLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"Something is missing \" + nodeType);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(VariableDeclarationExpression node) {\n\t\t\t\tif(configProperties.get(\"VariableDeclarationExpression\")) {\n\t\t\t\t\tType nodeType = node.getType();\n\n\t\t\t\t\tfor(Object v : node.fragments()) {\n\t\t\t\t\t\tSimpleName name = ((VariableDeclarationFragment) v).getName();\n\n\t\t\t\t\t\t// get fully qualified name\n\t\t\t\t\t\tITypeBinding binding = node.getType().resolveBinding();\n\t\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfullyQualifiedName = binding.getQualifiedName();\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tSuperEntityClass vdeEntity = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\t\tnodeType,\n\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif(nodeType.isArrayType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdeEntity, Entity.EntityType.ARRAY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isParameterizedType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdeEntity, Entity.EntityType.GENERICS);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isPrimitiveType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdeEntity, Entity.EntityType.PRIMITIVE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isSimpleType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdeEntity, Entity.EntityType.SIMPLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"Something is missing \" + nodeType);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(WhileStatement node){\n\t\t\t\tif(inMethod && configProperties.get(\"WhileStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.WHILE_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(WildcardType node) {\n\t\t\t\tif(inMethod && configProperties.get(\"WildcardType\")) {\n\t\t\t\t\tSuperEntityClass wo = new SuperEntityClass();\n\t\t\t\t\two.setName(\"Wildcard\");\n\n\t\t\t\t\tString bound;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbound = node.getBound().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tbound = \"none\";\n\t\t\t\t\t}\n\n\t\t\t\t\two.setBound(bound);\n\t\t\t\t\two.setType(((ParameterizedType) node.getParent()).getType());\n\t\t\t\t\two.setLineNumber(cu.getLineNumber(node.getStartPosition()));\n\t\t\t\t\two.setColumnNumber(cu.getColumnNumber(node.getStartPosition()));\n\t\t\t\t\tentityStack.peek().addEntity(wo, Entity.EntityType.WILDCARD);\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t});\n\t}",
"public final void cpp() {\n }",
"public void exec(String s) {\n }",
"public static void main(String argv[]) throws UnsupportedEncodingException, ExecutionException, FileNotFoundException {\r\n // Check arguments\r\n if(argv.length <= 0) { System.err.println(\"Usage: <filename>\"); return; }\r\n\r\n // Start the machine\r\n Main.traceStream = System.out;\r\n Machine.powerOn();\r\n\r\n // Assemble the file\r\n Assembler assembler = new Assembler();\r\n InputStream stream = new FileInputStream(argv[0]);\r\n try { assembler.Assemble(stream); }\r\n catch(InvalidInstructionException e)\r\n { System.err.println(e.getMessage()); return; }\r\n catch(LabelNotResolvedException e)\r\n { System.err.println(e.getMessage()); return; }\r\n catch(ProgramSizeException e)\r\n { System.err.println(e.getMessage()); return; }\r\n\r\n // Run the code\r\n Machine.setPC((short) 0);\r\n Machine.setMSP((short) assembler.getSize());\r\n Machine.setMLP((short) (Machine.memorySize - 1));\r\n Machine.run();\r\n }",
"final void compileTargetFile(ResolveFile file) {\n try {\n // Use ANTLR4 to build the AST\n ModuleDec targetModule = createModuleAST(file);\n\n // Add this file to our compile environment\n myCompileEnvironment.constructRecord(file, targetModule);\n if (myCompileEnvironment.flags.isFlagSet(ResolveCompiler.FLAG_DEBUG)) {\n myStatusHandler.info(null, \"Begin Compiling: \" + targetModule.getName().getName());\n }\n\n // Create a dependencies graph and search for import\n // dependencies.\n DefaultDirectedGraph<ModuleIdentifier, DefaultEdge> g = new DefaultDirectedGraph<>(DefaultEdge.class);\n g.addVertex(new ModuleIdentifier(targetModule));\n findDependencies(g, targetModule, file.getParentPath());\n\n // Perform different compilation tasks to each file\n for (ModuleIdentifier m : getCompileOrder(g)) {\n // Print the entire ModuleDec\n if (myCompileEnvironment.flags.isFlagSet(ResolveCompiler.FLAG_PRINT_MODULE)\n && m.equals(new ModuleIdentifier(targetModule))) {\n RawASTOutputPipeline rawASTOutputPipe = new RawASTOutputPipeline(myCompileEnvironment,\n mySymbolTable);\n rawASTOutputPipe.process(m);\n }\n\n // Output AST to Graphviz dot file. (Only for argument files)\n if (myCompileEnvironment.flags.isFlagSet(ResolveCompiler.FLAG_EXPORT_AST)\n && m.equals(new ModuleIdentifier(targetModule))) {\n GraphicalASTOutputPipeline astOutputPipe = new GraphicalASTOutputPipeline(myCompileEnvironment,\n mySymbolTable);\n astOutputPipe.process(m);\n }\n\n // Type and populate symbol table\n AnalysisPipeline analysisPipe = new AnalysisPipeline(myCompileEnvironment, mySymbolTable);\n analysisPipe.process(m);\n\n // Translate source file to target file\n if (myCompileEnvironment.flags.isFlagSet(AbstractTranslator.FLAG_TRANSLATE)\n && m.equals(new ModuleIdentifier(targetModule))) {\n TranslatorPipeline translatorPipeline = new TranslatorPipeline(myCompileEnvironment, mySymbolTable);\n translatorPipeline.process(m);\n }\n\n // Generate VCs\n if (myCompileEnvironment.flags.isFlagSet(VCGenerator.FLAG_VERIFY_VC)\n && m.equals(new ModuleIdentifier(targetModule))) {\n VCGenPipeline vcGenPipeline = new VCGenPipeline(myCompileEnvironment, mySymbolTable);\n vcGenPipeline.process(m);\n List<VerificationCondition> vcs = vcGenPipeline.getVerificationConditions();\n\n // Invoke Automated Prover (if requested)\n if (myCompileEnvironment.flags.isFlagSet(CongruenceClassProver.FLAG_PROVE)\n && m.equals(new ModuleIdentifier(targetModule))) {\n ProverPipeline proverPipeline = new ProverPipeline(myCompileEnvironment, mySymbolTable);\n proverPipeline.process(m);\n }\n\n // Invoke nProver (if requested)\n if (myCompileEnvironment.flags.isFlagSet(GeneralPurposeProver.FLAG_PROVE)\n && m.equals(new ModuleIdentifier(targetModule))) {\n NProverPipeline nproverPipeline = new NProverPipeline(myCompileEnvironment, mySymbolTable, vcs);\n nproverPipeline.process(m);\n }\n }\n\n // Complete compilation for this module\n myCompileEnvironment.completeRecord(m);\n if (myCompileEnvironment.flags.isFlagSet(ResolveCompiler.FLAG_DEBUG)) {\n myStatusHandler.info(null, \"Done Compiling: \" + m.toString());\n }\n }\n } catch (Throwable e) {\n Throwable cause = e;\n while (cause != null && !(cause instanceof CompilerException)) {\n cause = cause.getCause();\n }\n\n if (cause == null) {\n // All exceptions should extend the CompilerException class.\n if (e instanceof RuntimeException) {\n throw (RuntimeException) e;\n }\n throw new MiscErrorException(\"Unknown Exception\", e);\n } else {\n CompilerException see = (CompilerException) cause;\n myStatusHandler.error(see.getErrorLocation(), see.getMessage());\n if (myCompileEnvironment.flags.isFlagSet(ResolveCompiler.FLAG_DEBUG_STACK_TRACE)) {\n myStatusHandler.printStackTrace(see);\n }\n myStatusHandler.stopLogging();\n }\n }\n }",
"<T> T runGroovyScript(String name, Map<String, Object> context);",
"public void Main(){\n }",
"public T execute() {\n return GraalCompiler.compile(this);\n }",
"public void test() {\n\t\tFile file = new File(\"/home/students/\");\r\n\t\t\r\n\t\tString[] list = file.list(new FilenameFilter() {\r\n\t\t\tpublic boolean accept(File dir, String name) {\r\n\t\t\t\tif (name.toLowerCase().endsWith(\".py\")) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tfor (String f : list) {\r\n\t\t\tSystem.out.println(f);\r\n\t\t}\r\n\t}",
"void execute()\n\t{\n\t\tVM.top++;\n\t\tVM.opStack[VM.top] = arg();\n\t\tVM.pc++;\n\t}",
"public boolean compile(String name, String source) {\n\t return compile(source);\n\t}",
"public static void main(String... args) throws IOException, InterruptedException {\n new FileByFileTool().run(args);\n }",
"public void doRunScript(StaplerRequest req, StaplerResponse rsp, @QueryParameter(\"name\") String scriptName) throws IOException, ServletException {\n \t\tcheckPermission(Hudson.ADMINISTER);\n \n \t\tScript script = getScript(scriptName, true);\n \t\treq.setAttribute(\"script\", script);\n \t\t// set default selection\n \t\treq.setAttribute(\"currentNode\", \"(master)\");\n \t\treq.getView(this, \"runscript.jelly\").forward(req, rsp);\n \t}",
"public static void main(String[] args) {\n\t\tString docBody = null;\n\t\tMap<String,String> parameters = new HashMap<String, String>();\n\t\tMap<String,String> persistentParameters = new HashMap<String, String>();\n\t\tList<RCCookie> cookies = new ArrayList<RequestContext.RCCookie>();\n\t\t\n\t\ttry {\n\t\t\tdocBody = new String(Files.readAllBytes(Paths.get(\"examples/zbrajanje.smscr\")), StandardCharsets.UTF_8);\n\t\t} catch (IOException e1) {\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tSmartScriptParser parser = null;\n\n\t\ttry {\n\t\t\tparser = new SmartScriptParser(docBody);\n\t\t} catch (SmartScriptParserException e) {\n\t\t\tSystem.out.println(\"Unable to parse document!\");\n\t\t\tSystem.exit(-1);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"If this line ever executes, you have failed this class!\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\tDocumentNode document = parser.getDocumentNode();\n\t\tparameters.put(\"a\", \"4\");\n\t\tparameters.put(\"b\", \"2\");\n\t\t\n\t\tnew SmartScriptEngine(document, new RequestContext(System.out, parameters, persistentParameters, cookies)).execute();\n\t}",
"public Interpreter(String fileName) throws FileNotFoundException {\n super(fileName);\n instructionsStack.push(new ArrayList<>());\n }",
"protected void compile() throws FileNotFoundException, DebuggerCompilationException{\n String[] compileArgs = new String[5];\n String cOutFile = Integer.toString(handle);//filename + Integer.toString(handle);\n String outArg = cOutFile;\n compileArgs[0] = ocamlCompileC;\n compileArgs[1] = \"-g\";\n compileArgs[2] = filename;\n compileArgs[3] = \"-o\";\n compileArgs[4] = cOutFile;\n outFile = cOutFile;\n\n /* Start the ocamlc compiler */\n Process compileProcess;\n try{\n compileProcess = runtime.exec(compileArgs);\n }catch(IOException e){\n System.out.println(\"HERE\");\n throw new DebuggerCompilationException();\n //}catch(FileNotFoundException f){\n // throw new FileNotFoundException();\n }\n OutputStreamWriter compileWriter = new OutputStreamWriter(compileProcess.getOutputStream());\n\n InputStream processInputStream = compileProcess.getInputStream();\n\n /* Create a DebugListener to read the output */\n DebugListener compileReader = new DebugListener(processInputStream, this.observers, handle);\n\n compileReader.start();\n \n try{\n Thread.sleep(2000);\n }catch(Exception e){\n\n }\n\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 262,\n FQN=\"llvm::Module::setSourceFileName\", NM=\"_ZN4llvm6Module17setSourceFileNameENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZN4llvm6Module17setSourceFileNameENS_9StringRefE\")\n //</editor-fold>\n public void setSourceFileName(StringRef Name) {\n SourceFileName.$assignMove(Name.$string());\n }",
"private void instrumentCode(NodeTraversal traversal, Node block, String fnName) {\n block.addChildToFront(newInstrumentationNode(traversal, block, fnName));\n compiler.reportChangeToEnclosingScope(block);\n }",
"@MBeanInfo(\"Execute commands from a file\")\n String execfile(@MBeanInfo(\"Path to file\") String path);",
"@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tparseFile(\"english_file.txt\");\r\n\t\t\t\t}",
"protected void compileSFile(IModuleToolContext context, File srcFile, File outFile, String cflags) throws IOException {\n\t\tString command = AsInvocation.getAsCommand(context) + \" -o $\" + EcobuildFileUtil.getCanonicalPath(outFile) + \"$ \" + srcFile.getName();\n\t\tnew AsInvocation(context, context.getModuleSourceFolder(), command, context.getLogger()).invoke();\n\t}",
"void executeScript(Readable script) throws IOException;",
"public static void main(String[] args) {\n //Ersetzt jetzt mal unseren Parser, Stell Dir vor\n // das Ding liest das Beispiel da oben ^^.\n final StatementNode[] statementNodes = readStatements();\n \n //Zustände:\n // - FillSymbolTable (was für Symbole [variablen, ...] gibt es)\n // - TypInferenz (Was für Typen haben die Expressions und sind die eingaben semantisch korrekt)\n // - CodeGenerierung oder Ausführung (ersetzen wir mit \"schreibe die Werte aller Variablen nach Ende der Ausführung\")\n \n \n final SymbolTabelle symbolTabelle = new SymbolTabelle();\n //IDEE 2:\n //Ich gebe Statements und Expressions nur eine Methode mit Visitor als Callback\n final StatementVisitorSymbolTabelle statementVisitorSymbolTabelle = new StatementVisitorSymbolTabelle(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorSymbolTabelle);\n }\n \n final StatementVisitorTypInferenz statementVisitorTypInferenz = new StatementVisitorTypInferenz(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorTypInferenz);\n }\n \n PseudoLaufContext laufContext = new PseudoLaufContext();\n final StatementVisitorCodeGen statementVisitorCodeGen = new StatementVisitorCodeGen(laufContext);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorCodeGen);\n }\n \n laufContext.druckeVariablen();\n \n //Zusammenfassung:\n //Reduktion des Problems darauf, den Code nur noch von einem Abhängig zu machen\n //Jetzt nur noch abhängig vom Typ des Statements\n \n \n //Problem hierbei:\n //Ich muss selbst angeben, in welchem Zustand ich bin\n //Code-Duplizierung\n }",
"public static void main(String[] args) {\n\t\tThisoperator op = new Thisoperator();\n\t\top.localmethod();\n\t\t\n\n\t}",
"Value main(String main);",
"public void main(){\n }",
"private void runProject() {\n\t\t// displays text input dialog to get user JDK path\n\t\tString s = (String) JOptionPane.showInputDialog(new JFrame(), \"Java JDK Path:\", \"Run Process\",\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, null, path);\n\t\t// if the user did not cancel and the string is not empty\n\t\tif ((s != null) && (s.length() > 0)) {\n\t\t\t// set the path to input\n\t\t\tpath = s;\n\t\t\t// compile and run the process\n\t\t\ttry {\n\t\t\t\tArrayList<DraggableRect> startRects = Controller.getRectsByType(5);\n\t\t\t\tfor (DraggableRect r : startRects) {\n\t\t\t\t\tRun.genJava(r);\n\t\t\t\t}\n\t\t\t\trunProcess(Save.getFile() + \".java\");\n\t\t\t\t// catches invalid path exception\n\t\t\t} catch (IOException io) {\n\t\t\t\tJOptionPane.showMessageDialog(new JFrame(), \"Invalid Path\");\n\t\t\t\tio.printStackTrace();\n\t\t\t\t// catches other exceptions\n\t\t\t} catch (Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"void setLocalExecutionEnabled(final boolean localExecutionEnabled);",
"public abstract void runScript() throws Exception;",
"public static void main(String[] args) {\n \n fillArrayList();\n getNextToken();\n parseProgram();\n\n //TODO output into file ID.java\n //This seems to work\n// File f = new File(programID+\".java\");\n// try {\n// PrintWriter write = new PrintWriter(f);\n// write.print(sb.toString());\n// write.flush();\n// write.close();\n// } catch (FileNotFoundException ex) {\n// Logger.getLogger(setTranslator.class.getName()).log(Level.SEVERE, null, ex);\n// }\n System.out.println(sb.toString());\n \n }",
"public IRubyObject runNormally(Node scriptNode) {\n Script script = null;\n boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();\n if (compile || config.isShowBytecode()) {\n script = tryCompile(scriptNode, null, new JRubyClassLoader(getJRubyClassLoader()), config.isShowBytecode());\n }\n \n if (script != null) {\n if (config.isShowBytecode()) {\n return getNil();\n }\n \n return runScript(script);\n } else {\n failForcedCompile(scriptNode);\n \n return runInterpreter(scriptNode);\n }\n }",
"public static void createModifiedProgram(String testPath,\n String pythonFileName,\n String tempProgramFileName) throws FileNotFoundException, Exception {\n // Read the program \n\n try {\n TextFileReader pythonCodeFileIn = new TextFileReader(testPath + pythonFileName);\n List<String> pythonCode = pythonCodeFileIn.getText();\n\n // TODO - Jay's class needs to handle List<String>\n List<String> newText = new LinkedList<>();\n for (String text : pythonCode) {\n // text = TextReplacer.replaceAll( text, \"raw_input\", \"_test_raw_in_\" ); // if python 2\n text = TextReplacer.replaceAll(text, \"input\", \"_pytest_input_\");\n \n newText.add(text);\n }\n\n TextFileWriter pythonCodeFileOut = new TextFileWriter(testPath + tempProgramFileName);\n\n pythonCodeFileOut.writeLine(\"# *********************************\");\n pythonCodeFileOut.writeLine(\"# ** Added for automatic grading **\");\n pythonCodeFileOut.writeLine(\"def _pytest_input_( prompt = \\\"\\\" ):\");\n pythonCodeFileOut.writeLine(\" answer = input( prompt )\");\n pythonCodeFileOut.writeLine(\" print( answer )\");\n pythonCodeFileOut.writeLine(\" return answer\");\n pythonCodeFileOut.writeLine(\"# *********************************\");\n pythonCodeFileOut.writeLine(\"\");\n\n pythonCodeFileOut.writeLines(newText);\n pythonCodeFileOut.close();\n } catch (Exception ex) {\n throw ex;\n }\n }",
"public static void main()\n\t{\n\t}",
"public static void main(String[] args) throws Exception {\n\n VerbaCodePage codePage = VerbaCodePage.fromFile(null, \"SimpleSource.v\");\n StaticSpaceExpression staticSpaceExpression = new StaticSpaceExpression(codePage);\n\n }",
"MafSource readSource(File sourceFile);"
] | [
"0.6175434",
"0.5896738",
"0.58869964",
"0.56069565",
"0.5587817",
"0.5524488",
"0.54625994",
"0.546042",
"0.54237324",
"0.53288776",
"0.5287629",
"0.5281796",
"0.5179545",
"0.5161735",
"0.51518875",
"0.5144425",
"0.514052",
"0.51342404",
"0.51330215",
"0.5124069",
"0.5106872",
"0.504617",
"0.5044621",
"0.5031962",
"0.50291455",
"0.5023543",
"0.50034076",
"0.49919164",
"0.4986598",
"0.4956494",
"0.4949385",
"0.49429154",
"0.49030152",
"0.4899368",
"0.4889958",
"0.4875069",
"0.48732",
"0.48715833",
"0.48668474",
"0.48643184",
"0.4861847",
"0.48569912",
"0.4845818",
"0.48402858",
"0.48401785",
"0.48306206",
"0.47827742",
"0.47818017",
"0.47666377",
"0.47606495",
"0.47484553",
"0.4745573",
"0.47418156",
"0.47414312",
"0.4735787",
"0.47294885",
"0.47251788",
"0.47230503",
"0.47228447",
"0.472086",
"0.47205356",
"0.4718872",
"0.47173068",
"0.47116488",
"0.47017735",
"0.46923253",
"0.46883056",
"0.46850225",
"0.46702567",
"0.46614403",
"0.4660639",
"0.46586525",
"0.4656105",
"0.46518043",
"0.46446258",
"0.46434852",
"0.46350166",
"0.4629035",
"0.4624922",
"0.46242455",
"0.4617719",
"0.46125114",
"0.46119112",
"0.45978272",
"0.45947897",
"0.45946577",
"0.4591482",
"0.45877263",
"0.45850232",
"0.4583337",
"0.4582895",
"0.45801708",
"0.45800394",
"0.45793968",
"0.4568771",
"0.45622823",
"0.45583564",
"0.45566642",
"0.45555612",
"0.45478398"
] | 0.5972238 | 1 |
Compiles a string of Python source as either an expression (if possible) or a module. Designed for use by a JSR 223 implementation: "the Scripting API does not distinguish between scripts which return values and those which do not, nor do they make the corresponding distinction between evaluating or executing objects." (SCR.4.2.1) | public PyCode compile(String script) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object eval(String expression) throws Exception;",
"Hojas eval();",
"public PyObject eval(String s) {\n return null;\n }",
"public String compile () throws IOException, RhinoEvaluatorException {\n return compile(1, null);\n }",
"public Object eval (Object expression);",
"public String evaluate(String expression);",
"JavaEvaluator createJavaEvaluator();",
"public boolean compile(String source) {\n\t return compile(source, true);\n\t}",
"public abstract ILanguageProtocol makeInterpreter(String source, String replQualifiedName, String... salixPath) throws IOException, URISyntaxException, Exception;",
"public Module compileModule(String module) throws Exception, Error\n {\n Module m;\n while(containsCall(module))\n {\n \n Call call = getCall(module);\n module = resolveCall(module, call);\n }\n m = new Module(name(module), module);\n m.displayResults();\n return m;\n }",
"String evaluate();",
"@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }",
"public void compile(String str) throws PaleoException {\n\t\trunProcess(\"javac paleo/\" + str + \".java\");\n\t\tif (erreur.length() != 0) {\n\t\t\tthrow new JavacException(erreur.toString());\n\t\t}\n\t}",
"ScriptEvaluator createScriptEvaluator();",
"public static Expression compile(@NonNull final String s) {\n return new Expression(PARSER.parse(s));\n }",
"public final PythonParser.exec_stmt_return exec_stmt() throws RecognitionException {\n PythonParser.exec_stmt_return retval = new PythonParser.exec_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token EXEC123=null;\n Token IN125=null;\n Token COMMA126=null;\n PythonParser.test_return t1 = null;\n\n PythonParser.test_return t2 = null;\n\n PythonParser.expr_return expr124 = null;\n\n\n PythonTree EXEC123_tree=null;\n PythonTree IN125_tree=null;\n PythonTree COMMA126_tree=null;\n\n\n stmt stype = null;\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:862:5: ( EXEC expr[expr_contextType.Load] ( IN t1= test[expr_contextType.Load] ( COMMA t2= test[expr_contextType.Load] )? )? )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:862:7: EXEC expr[expr_contextType.Load] ( IN t1= test[expr_contextType.Load] ( COMMA t2= test[expr_contextType.Load] )? )?\n {\n root_0 = (PythonTree)adaptor.nil();\n\n EXEC123=(Token)match(input,EXEC,FOLLOW_EXEC_in_exec_stmt3319); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n EXEC123_tree = (PythonTree)adaptor.create(EXEC123);\n adaptor.addChild(root_0, EXEC123_tree);\n }\n pushFollow(FOLLOW_expr_in_exec_stmt3321);\n expr124=expr(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, expr124.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:862:40: ( IN t1= test[expr_contextType.Load] ( COMMA t2= test[expr_contextType.Load] )? )?\n int alt61=2;\n int LA61_0 = input.LA(1);\n\n if ( (LA61_0==IN) ) {\n alt61=1;\n }\n switch (alt61) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:862:41: IN t1= test[expr_contextType.Load] ( COMMA t2= test[expr_contextType.Load] )?\n {\n IN125=(Token)match(input,IN,FOLLOW_IN_in_exec_stmt3325); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n IN125_tree = (PythonTree)adaptor.create(IN125);\n adaptor.addChild(root_0, IN125_tree);\n }\n pushFollow(FOLLOW_test_in_exec_stmt3329);\n t1=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, t1.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:862:75: ( COMMA t2= test[expr_contextType.Load] )?\n int alt60=2;\n int LA60_0 = input.LA(1);\n\n if ( (LA60_0==COMMA) ) {\n alt60=1;\n }\n switch (alt60) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:862:76: COMMA t2= test[expr_contextType.Load]\n {\n COMMA126=(Token)match(input,COMMA,FOLLOW_COMMA_in_exec_stmt3333); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COMMA126_tree = (PythonTree)adaptor.create(COMMA126);\n adaptor.addChild(root_0, COMMA126_tree);\n }\n pushFollow(FOLLOW_test_in_exec_stmt3337);\n t2=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, t2.getTree());\n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n\n stype = new Exec(EXEC123, actions.castExpr((expr124!=null?((PythonTree)expr124.tree):null)), actions.castExpr((t1!=null?((PythonTree)t1.tree):null)), actions.castExpr((t2!=null?((PythonTree)t2.tree):null)));\n \n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = stype;\n\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }",
"public void exec(PyObject code) {\n }",
"public String eval(String p1 ) {\n\t}",
"@Test\r\n public void testEval__call__1() throws ScriptException {\r\n Object value = engine.eval(\"java.lang.String()\");\r\n Assert.assertEquals(\"\", value);\r\n }",
"public String getCompiler();",
"Value eval(String script, String name, String contentType, boolean interactive) throws Exception;",
"public boolean compile(String name, String source) {\n\t return compile(source);\n\t}",
"public abstract Object eval();",
"public static IValueNode eval(@NonNull final String s) {\n return compile(s).eval();\n }",
"public String build() {\n StringBuilder scriptBuilder = new StringBuilder();\n StringBuilder scriptBody = new StringBuilder();\n String importStmt = \"import \";\n \n try {\n if (scriptCode.contains(importStmt)) {\n BufferedReader reader = new BufferedReader(new StringReader(scriptCode));\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.trim().startsWith(importStmt)) {\n scriptBuilder.append(line);\n scriptBuilder.append(\"\\n\");\n } else {\n scriptBody.append((scriptBody.length() == 0 ? \"\" : \"\\n\"));\n scriptBody.append(line);\n }\n }\n } else {\n scriptBody.append(scriptCode);\n }\n } catch (IOException e) {\n throw new CitrusRuntimeException(\"Failed to construct script from template\", e);\n }\n \n scriptBuilder.append(scriptHead);\n scriptBuilder.append(scriptBody.toString());\n scriptBuilder.append(scriptTail);\n \n return scriptBuilder.toString();\n }",
"public void compileScript( TemplateCompilerContext context )\r\n\t{\r\n\t\t// Compile to bytes\r\n\t\tCompilationUnit unit = new CompilationUnit();\r\n\t\tunit.addSource( context.getPath(), context.getScript().toString() );\r\n\t\tunit.compile( Phases.CLASS_GENERATION );\r\n\r\n\t\t// Results\r\n\t\t@SuppressWarnings( \"unchecked\" )\r\n\t\tList< GroovyClass > classes = unit.getClasses();\r\n\t\tAssert.isTrue( classes.size() > 0, \"Expecting 1 or more classes\" );\r\n\r\n\t\tClassLoader parent = Thread.currentThread().getContextClassLoader();\r\n\t\tif( parent == null )\r\n\t\t\tparent = GroovyTemplateCompiler.class.getClassLoader();\r\n\r\n\t\t// Define the class\r\n\t\t// TODO Configurable class loader\r\n\t\tDefiningClassLoader classLoader = new DefiningClassLoader( parent );\r\n\t\tClass< ? > first = null;\r\n\t\tfor( GroovyClass cls : classes )\r\n\t\t{\r\n\t\t\tClass< ? > clas = classLoader.defineClass( cls.getName(), cls.getBytes() );\r\n\t\t\tif( first == null )\r\n\t\t\t\tfirst = clas; // TODO Are we sure that the first one is always the right one?\r\n\t\t}\r\n\r\n\t\t// Instantiate the first\r\n\t\tGroovyObject object = (GroovyObject)Util.newInstance( first );\r\n\t\tClosure closure = (Closure)object.invokeMethod( \"getClosure\", null );\r\n\r\n\t\t// The old way:\r\n//\t\tClass< GroovyObject > groovyClass = new GroovyClassLoader().parseClass( new GroovyCodeSource( getSource(), getName(), \"x\" ) );\r\n\r\n\t\tcontext.setTemplate( new GroovyTemplate( closure ) );\r\n\t}",
"public interface Expression {\n public boolean interpret(String context);\n}",
"public interface Expression {\n public boolean interpret(String context);\n}",
"public interface Expression {\n public boolean interpret(String context);\n}",
"@Override\n public void compile(LinkedList<Token> theStack, Compiler c) throws CompilerException {\n\n\tVariableToken vt;\n\tvt = c.getGlobalVariable(this.getTokenString());\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getLocalVariable(this.getTokenString());\n\t }\n\t}\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getParameter(this.getTokenString());\n\t }\n\t}\n\n\tif (vt == null) {\n\t throw new CompilerException(\"The variable \\\"\" + this.getTokenString() + \"\\\" cannot be used in an expression, as it is not a known variable in the current context!\");\n\t} else {\n\t NumberTokenFactory ntf = new NumberTokenFactory();\n\n//\t\t\tNumberToken nt = (NumberToken) ntf.create(Integer.toString(vt.getVariableID()), 0);\n\t //nt.compile(theStack, c);//when we compile the variable, we add the ID of the variable on the bytecode stack of the compiler c. We use NumberTokenFactory to decide, whether the ID is actually 1 byte long or 2 bytes long and then we add those bytes to the compiler bytecode stack.\n\t //theStack.pop();//well... the previous call had the side effect of placing the \"NumberToken\" on the working stack \"theStack\", which is not what we want, so we're removing it from the working stack here!\n\t extended = CompilableToken.compileNumber(vt.getVariableID(), c);\n\n\t //boolean extended = false;\n\t\t\t/*\n\t if (nt instanceof ByteNumberToken) {\n\t extended = false;\n\t } else {\n\t extended = true;\n\t }\n\t */\n\t this.type = vt.getType();\n\t this.context = vt.getContext();\n\n\t c.getByteCode().push(this);\n\n\t //TODO: Following code should have been here for ages, it seems suspicious\n\t // (impossible)\n\t //that everything even worked without it\n\t theStack.push(this.type);\n\t /*\n\t if (this.getType() == BYTE) {\n\t c.getByteCode().push(new PushByteVariableOnStackByteCodeToken(extended));\n\t theStack.push(new ByteNumberToken(\"0\"));\n\t } else if (this.getType() == INT) {\n\t c.getByteCode().push(new PushIntegerVariableOnStackByteCodeToken(extended));\n\t theStack.push(new IntegerNumberToken(\"0\"));\n\t } else {\n\t System.err.println(\"Cannot compile a variable reference; unknown variable type for variable \\\"\" + this.getTokenString() + \".\\\"\");\n\n\t }\n\t */\n\t}\n\n }",
"JavaExpression createJavaExpression();",
"public Script tryCompile(Node node) {\n return tryCompile(node, null, new JRubyClassLoader(getJRubyClassLoader()), false);\n }",
"public static Object evalSpecial(Context cx, Scriptable scope, \n Object thisArg, Object[] args, \n String filename, int lineNumber)\n throws JavaScriptException\n {\n if (args.length < 1)\n return Undefined.instance;\n Object x = args[0];\n if (!(x instanceof String)) {\n String message = Context.getMessage(\"msg.eval.nonstring\", null);\n Context.reportWarning(message);\n return x;\n }\n int[] linep = { lineNumber };\n if (filename == null) {\n filename = Context.getSourcePositionFromStack(linep);\n if (filename == null) {\n filename = \"<eval'ed string>\";\n linep[0] = 1;\n }\n }\n \n try {\n StringReader in = new StringReader((String) x);\n Object securityDomain = cx.getSecurityDomainForStackDepth(3);\n \n // Compile the reader with opt level of -1 to force interpreter\n // mode.\n int oldOptLevel = cx.getOptimizationLevel();\n cx.setOptimizationLevel(-1);\n Script script = cx.compileReader(null, in, filename, linep[0], \n securityDomain);\n cx.setOptimizationLevel(oldOptLevel);\n \n // if the compile fails, an error has been reported by the\n // compiler, but we need to stop execution to avoid\n // infinite looping on while(true) { eval('foo bar') } -\n // so we throw an EvaluatorException.\n if (script == null) {\n String message = Context.getMessage(\"msg.syntax\", null);\n throw new EvaluatorException(message);\n }\n \n InterpretedScript is = (InterpretedScript) script;\n Object result = is.call(cx, scope, (Scriptable) thisArg, null);\n \n return result;\n }\n catch (IOException ioe) {\n // should never happen since we just made the Reader from a String\n throw new RuntimeException(\"unexpected io exception\");\n }\n \n }",
"public String compile (int lineno, Object securityDomain) throws IOException, JavaScriptException {\n Context context = Context.enter();\n Reader reader = new InputStreamReader(program);\n Object ret = context.evaluateReader(instanceScope,\n reader,\n programName,\n lineno,\n securityDomain);\n if (ret instanceof org.mozilla.javascript.Undefined) {\n // This is really 'void'. Perhaps a separate 'compile' method\n // should be used that has 'void' as its return type, and that\n // get used by the likes of the RjsConfigCompiler\n return \"\";\n } else {\n return (String) ret;\n }\n }",
"public static String compileAndRun(String code) throws Exception {\n\t\treturn run(LavaCompiler.compile(code));\n\t}",
"@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }",
"public interface PyRunnable {\n /**\n * Return the org.jpp.modules code object.\n */\n abstract public PyCode getMain();\n}",
"public static XMLEncoder encoderFromScript (String script) {\n PythonInterpreter pi = new NoErrorPython();\n if (script != null)\n pi.exec(script);\n PyObject product = pi.eval(MAGIC_FUNCTION);\n if (product instanceof PyFunction) {\n return new Func((PyFunction) product);\n }\n else {\n Object obj = product.__tojava__(XMLEncoder.class);\n if (obj instanceof XMLEncoder)\n return (XMLEncoder) obj;\n }\n throw new IllegalArgumentException(\n \"JPython script did not yield a function or an XMLEncoder\");\n }",
"@Test\n\tpublic void testExpression() throws ParseException {\n\t\tExpression expression = langParser(\"a\").expression();\n\t\tassertEquals(expression.getClass(), Identifier.class);\n\t\texpression = langParser(\"a()\").expression();\n\t\tassertEquals(expression.getClass(), FunctionCall.class);\n\t\texpression = langParser(\"a.b\").expression();\n\t\tassertEquals(expression.getClass(), MemberAccess.class);\n\t\texpression = langParser(\"1\").expression();\n\t\tassertEquals(expression.getClass(), LongLiteral.class);\n\t\texpression = langParser(\"1.1\").expression();\n\t\tassertEquals(expression.getClass(), DoubleLiteral.class);\n\t\texpression = langParser(\"if(a,b,c)\").expression();\n\t\tassertEquals(expression.getClass(), TernaryIf.class);\n\t}",
"abstract public interface Interpreter {\n\n /**\n * Evaluates a given JavaScript expression for a given userid.\n * \n * @param expression the expression to evaluate\n * @return the result of evaluating the expression\n */\n public String evaluate(String expression);\n}",
"public abstract void compile();",
"public static String evaluate( String expr )\n {\n\n\tString[] arr = expr.split(\"//s+\");\n\tString ret = \"\";\n\tALStack<String> stack = new ALStack<String>();\n\tfor( String s: arr)\n\t stack.push(s);\n\n\tif( stack.peek().equals(\"(\")){\n\t stack.pop();\n\t int operator = findOp(stack.pop());\n\t ret = unload(operator, stack);\n\t return ret;\n\t}\n\treturn \"\";\n }",
"public String evaluateExpression(ValueExpression expr,CodeExecutionContext execCtx) throws JavascribeException;",
"Interpreter getInterpreter();",
"public CompilationObject compile(String code,\n com.microsoft.z3.Context z3Context,\n BlockingQueue<Object> messageQueue, Supplier<Boolean> symb)\n throws CompilationException, InterruptedException, ExecutionException {\n //LEX ->PARSE->COMPILE\n List<Token> codeInput = lexer.tokenise(code);\n AbstractSyntaxTree ast = parser.parse(codeInput, z3Context);\n messageQueue.add(new LogMessage(Runtime.class.getPackage().getImplementationVersion()+ \" XXXXXXXXX \"));\n messageQueue.add(new LogMessage(\"Compile starting symbolic \"+symb.get()));\n System.out.println(Runtime.class.getPackage().getImplementationVersion());\n System.out.println(\"Compiler called parse that output \" + ast.myString());\n return compile(ast, code, z3Context, messageQueue,symb);\n }",
"public interface Expression {\n boolean interpret(String info);\n}",
"@SuppressWarnings(\"unused\")\n\tprivate static void testFromStringToCompiledByteCode()\n\t{\n\t\tfinal String test = \"do end\";\n\t\tfinal int[] raw = compileFromRawString(test);\n\t\tfinal OpCodeMapper mapper = OpCodeMapper_v5_1.getInstance();\n\n\t\tfor (int i = raw.length - 1; i < raw.length; i++)\n\t\t{\n\t\t\tfinal int ByteCode = raw[i] & 0x3f;\n\t\t\tfinal AbstractOpCodes OpType = mapper.getOpCodeFor(ByteCode);\n\t\t\tfinal InstructionTypes instType = mapper.getTypeOf(OpType);\n\t\t\tfinal Instruction curInstruct;\n\n\t\t\tswitch (instType)\n\t\t\t{\n\t\t\t\tcase iABC:\n\t\t\t\t{\n\t\t\t\t\tcurInstruct = RawInstruction_iABC.parseFromRaw(raw[i], mapper);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase iABx:\n\t\t\t\t{\n\t\t\t\t\tcurInstruct = RawInstruction_iABx.parseFromRaw(raw[i], mapper);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase iAsBx:\n\t\t\t\t{\n\t\t\t\t\tcurInstruct = RawInstruction_iAsBx.parseFromRaw(raw[i], mapper);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t{\n\t\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//System.out.println(curInstruct.toString() + \"\\r\\n\\r\\n\");\n\t\t}\n\t}",
"public PyObject eval(PyObject code) {\n return null;\n }",
"Value main(String main);",
"String generateCode(\n InputSource input, String filename,\n ProgrammingLanguage programmingLanguage,\n SourceResolver resolver\n ) throws Exception;",
"public int expressionEval(String expression){\n\n int result = 0;\n\n\n\n return result;\n }",
"void eval(Reader reader) throws ScriptRunnerException, IOException;",
"@Test\r\n public void testEval__declare_call__1() throws ScriptException {\r\n Object value = engine.eval(\"#() true\");\r\n Assert.assertTrue(value instanceof Function);\r\n Object result = ((Function) value).invoke(engine.createBindings());\r\n Assert.assertTrue((Boolean)result);\r\n }",
"public Script tryCompile(Node node, ASTInspector inspector) {\n return tryCompile(node, null, new JRubyClassLoader(getJRubyClassLoader()), inspector, false);\n }",
"@Test\r\n\tpublic void testCompileOperator() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\")).sendKeys(\"a = 5\\nb = a - 1\\nc = a + (b / 2 * 4)\");\r\n\r\n\t\t// Look for the \"Compile\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(2).click();\r\n\r\n\t\t// Check that there contains the word \"opt_plus\", \"opt_minus\",\r\n\t\t// \"opt_mult\" and \"opt_div\"\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_plus\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_minus\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_mult\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_div\"));\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public org.mozilla.javascript.commonjs.module.ModuleScript getModuleScript(org.mozilla.javascript.Context r9, java.lang.String r10, java.net.URI r11, java.net.URI r12, org.mozilla.javascript.Scriptable r13) throws java.lang.Exception {\n /*\n r8 = this;\n r1 = r8.getLoadedModule(r10);\n r2 = getValidator(r1);\n if (r11 != 0) goto L_0x0019;\n L_0x000a:\n r0 = r8.moduleSourceProvider;\n r0 = r0.loadSource(r10, r13, r2);\n L_0x0010:\n r3 = org.mozilla.javascript.commonjs.module.provider.ModuleSourceProvider.NOT_MODIFIED;\n if (r0 != r3) goto L_0x0020;\n L_0x0014:\n r0 = r1.getModule();\n L_0x0018:\n return r0;\n L_0x0019:\n r0 = r8.moduleSourceProvider;\n r0 = r0.loadSource(r11, r12, r2);\n goto L_0x0010;\n L_0x0020:\n if (r0 != 0) goto L_0x0024;\n L_0x0022:\n r0 = 0;\n goto L_0x0018;\n L_0x0024:\n r3 = r0.getReader();\n r1 = r10.hashCode();\t Catch:{ all -> 0x007a }\n r4 = r8.loadLocks;\t Catch:{ all -> 0x007a }\n r5 = loadLockShift;\t Catch:{ all -> 0x007a }\n r1 = r1 >>> r5;\n r5 = loadLockMask;\t Catch:{ all -> 0x007a }\n r1 = r1 & r5;\n r4 = r4[r1];\t Catch:{ all -> 0x007a }\n monitor-enter(r4);\t Catch:{ all -> 0x007a }\n r1 = r8.getLoadedModule(r10);\t Catch:{ all -> 0x0077 }\n if (r1 == 0) goto L_0x0050;\n L_0x003d:\n r5 = getValidator(r1);\t Catch:{ all -> 0x0077 }\n r2 = equal(r2, r5);\t Catch:{ all -> 0x0077 }\n if (r2 != 0) goto L_0x0050;\n L_0x0047:\n r0 = r1.getModule();\t Catch:{ all -> 0x0077 }\n monitor-exit(r4);\t Catch:{ all -> 0x0077 }\n r3.close();\n goto L_0x0018;\n L_0x0050:\n r2 = r0.getUri();\t Catch:{ all -> 0x0077 }\n r1 = new org.mozilla.javascript.commonjs.module.ModuleScript;\t Catch:{ all -> 0x0077 }\n r5 = r2.toString();\t Catch:{ all -> 0x0077 }\n r6 = 1;\n r7 = r0.getSecurityDomain();\t Catch:{ all -> 0x0077 }\n r5 = r9.compileReader(r3, r5, r6, r7);\t Catch:{ all -> 0x0077 }\n r6 = r0.getBase();\t Catch:{ all -> 0x0077 }\n r1.<init>(r5, r2, r6);\t Catch:{ all -> 0x0077 }\n r0 = r0.getValidator();\t Catch:{ all -> 0x0077 }\n r8.putLoadedModule(r10, r1, r0);\t Catch:{ all -> 0x0077 }\n monitor-exit(r4);\t Catch:{ all -> 0x0077 }\n r3.close();\n r0 = r1;\n goto L_0x0018;\n L_0x0077:\n r0 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0077 }\n throw r0;\t Catch:{ all -> 0x007a }\n L_0x007a:\n r0 = move-exception;\n r3.close();\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.mozilla.javascript.commonjs.module.provider.CachingModuleScriptProviderBase.getModuleScript(org.mozilla.javascript.Context, java.lang.String, java.net.URI, java.net.URI, org.mozilla.javascript.Scriptable):org.mozilla.javascript.commonjs.module.ModuleScript\");\n }",
"private CompilationObject compile(AbstractSyntaxTree ast, String code,\n com.microsoft.z3.Context z3Context,\n BlockingQueue<Object> messageQueue,\n Supplier< Boolean> symb)\n throws CompilationException, InterruptedException, ExecutionException {\n HashMap<String, ProcessNode> processNodeMap = new HashMap<>();\n // HashMap<String, ProcessNode> dependencyMap = new HashMap<>();\n\n //System.out.println(\"\\nCOMPILER \"+ast.myString()+\" symb \"+symb.get()+\"\\n\");\n for (ProcessNode node : ast.getProcesses()) {\n //messageQueue.add(new LogMessage(\"Compile starting \"+node.getIdentifier()+\" s \"+symb.get()));\n //System.out.println(\"**COMPILER** Compiler Start node = \"+ node.myString());\n processNodeMap.put(node.getIdentifier(), (ProcessNode) node.copy());\n // dependencyMap.put(node.getIdentifier(), node);\n }\n\n AbstractSyntaxTree symbAST = ast.copy(); // to be used to build symbolic models\n //??????\n\n //System.out.println(\"symb \"+symb.get());\n if (!symb.get()) {\n ast = processAtomicAST(ast, z3Context, messageQueue);\n } else {\n //expander.expand(ast, messageQueue, z3Context); // use for error detection\n ast = symbAST;\n //ast = expander.expand(ast, messageQueue, z3Context);\n //System.out.println(\" COMPILER Before ReferenceReplacer \"+ast.processes2String());\n //ast = replacer.replaceReferences(ast, messageQueue);\n // If we replace the references then we lose the assignment information\n //System.out.println(\" COMPILER After ReferenceReplacer \"+ast.processes2String());\n\n }\n //\n //\n // ??????\n //store alphabet\n Set<String> alpha = ast.getAlphabet().stream().map(x -> x.getAction()).collect(Collectors.toSet());\n //System.out.println(\"Compiler alph = \"+alpha);\n\n //Having built the final AST now build the processes\n /*System.out.println(\"**COMPILER** Entering interpreter with ast for processes -> Types \"+\n ast.getProcesses().stream().map(x->\"\\n\"+x.getIdentifier()+\"->\"+x.getType())\n .reduce(\"\",(x,y)->x+\" \"+y)); */\n Interpreter.ProcessMapFull pmf = interpreter.interpret(ast,\n messageQueue, z3Context, alpha, symb.get());\n // Optional<Map<String, ProcessModel>> processMap = interpreter.interpret(ast,\n // messageQueue, z3Context, alpha, symb.get());\n\n //System.out.println(\" **COMPILER** before operation evaluation \"+processMap.keySet());\n List<OperationResult> opResults = new ArrayList<>();\n EquationEvaluator.EquationReturn eqResults = new EquationEvaluator.EquationReturn();\n if (pmf.getIsFull()) {\n\n //System.out.println(\" isPresent \"+pmf.getProcessMap().size()+\" \"+ast.getProcesses().size());\n // if (ast.getProcesses().size() <= processMap.get().size()) {\n //System.out.println(\"equal size\"); // not sure why <= and not ==\n opResults = evaluator.evaluateOperations(\n ast.getOperations(), pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(), code, z3Context, messageQueue, alpha);\n //System.out.println(\" **COMPILER** before equation evaluation \"+processMap.keySet());\n\n // HEAVY LIFTING need thread pool\n this.eqEvaluator = new EquationEvaluator(); // need to reset equationEvaluator else !!!!\n eqResults = eqEvaluator.evaluateEquations(\n pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(),\n ast.getEquations(), // one entry per equation\n z3Context, messageQueue, alpha);\n }\n\n\n //System.out.println(\"Compiler built pn \"+ pmf.getProcessMap().size());\n return new CompilationObject(pmf.getProcessMap(), opResults, eqResults.getResults());\n }",
"Value require(String module);",
"static public GCode fromString(String str) {\n int c = str.indexOf('(');\n if(c != -1) {\n str = str.substring(0,c-1);\n } \n String[] parts = str.split(\" \");\n GCode g = new GCode(parts[0]);\n // parse args\n for(int i=1; i < parts.length; i++) {\n String arg = parts[i].substring(0,1);\n if(parts[i].length() == 1) {\n g.arg(arg);\n } else {\n String value = parts[i].substring(1);\n g.arg(arg, value); \n }\n }\n return g;\n }",
"@Override\n public XPathExecutable compile(String source) throws SaxonApiException\n {\n final XPathCompiler compiler = XmlUtils.newXPathCompiler(xPathVersion, nsPrefixToUriMap);\n compiler.setAllowUndeclaredVariables(true);\n final XPathExecutable xpathExec = compiler.compile(source);\n final Iterator<QName> xpathVarsIterator = xpathExec.iterateExternalVariables();\n if(xpathVarsIterator.hasNext()) {\n if(this.allowedXPathVariables.isEmpty()) {\n throw new SaxonApiException(\"Input XPath expression contains variable(s) but there is no (XACML) VariableDefinition in this context: '\" +source+\"'\");\n }\n /*\n XPath variable(s) found, we need to validate them against allowedXPathVariables (from XACML VariableDefinitions in enclosing policy)\n */\n final XPathCompiler xpathCompiler = XmlUtils.newXPathCompiler(getXPathVersion(), getDeclaredNamespacePrefixToUriMap());\n xpathCompiler.setAllowUndeclaredVariables(false);\n do {\n final QName xpathVarName = xpathVarsIterator.next();\n final Optional<VariableReference<?>> matchedVarRef = this.allowedXPathVariables.stream().filter(varRef -> varRef.getXPathVariableName().equals(xpathVarName)).findAny();\n if(matchedVarRef.isEmpty()) {\n throw new SaxonApiException(\"Input XPath expression contains variable '\"+xpathVarName+\"' but there is no matching (XACML) VariableDefinition in this context\");\n }\n\n xpathCompiler.declareVariable(xpathVarName, matchedVarRef.get().getReturnType().getXPathItemType(), OccurrenceIndicator.ONE_OR_MORE);\n } while(xpathVarsIterator.hasNext());\n return xpathCompiler.compile(source);\n }\n\n // no XPath variable, we can use xpathExec directly.\n return xpathExec;\n }",
"public static Literal of(Source source, Object value) {\n if (value instanceof Literal) {\n return (Literal) value;\n }\n return new Literal(source, value, DataTypes.fromJava(value));\n }",
"final public Object EvalFunction(byte funcType) throws ParseException {\n /*@bgen(jjtree) EvalFunction */\n SimpleNode jjtn000 = new SimpleNode(JJTEVALFUNCTION);\n boolean jjtc000 = true;\n jjtree.openNodeScope(jjtn000);String funcName;\n Object func = null;\n log.trace(\"Entering EvalFunction\");\n try {\n funcName = QualifiedFunction();\n jjtree.closeNodeScope(jjtn000, true);\n jjtc000 = false;\n func = pigContext.instantiateFuncFromAlias(funcName);\n try{\n FunctionType.tryCasting(func, funcType);\n }catch (Exception e){\n ParseException pe = new ParseException(e.getMessage());\n pe.initCause(e);\n {if (true) throw pe;}\n }\n log.trace(\"Exiting EvalFunction\");\n\n {if (true) return func;}\n } catch (Throwable jjte000) {\n if (jjtc000) {\n jjtree.clearNodeScope(jjtn000);\n jjtc000 = false;\n } else {\n jjtree.popNode();\n }\n if (jjte000 instanceof RuntimeException) {\n {if (true) throw (RuntimeException)jjte000;}\n }\n if (jjte000 instanceof ParseException) {\n {if (true) throw (ParseException)jjte000;}\n }\n {if (true) throw (Error)jjte000;}\n } finally {\n if (jjtc000) {\n jjtree.closeNodeScope(jjtn000, true);\n }\n }\n throw new Error(\"Missing return statement in function\");\n }",
"public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}",
"private static Expression retrieveParseExpression(String expression) {\n return StaticJavaParser.parseExpression(expression);\n }",
"public abstract String parse(String name, List<CodeLine> c, Cluster cluster, Map<String,String> subs, Assemble compiler);",
"protected Object compileAndLoad() throws IOException {\n String generatedSource = printJCodeModel();\n return compileAndLoadSource(generatedSource, TEST_CLASS_NAME);\n }",
"public interface JavaCode {\n\n /**\n * Get an unique identification code for an object\n * TODO: This method is not reliable as hash codes are not unique, should use an UUID generator singleton instead.\n *\n * @param obj the object\n * @return the unique identification code\n */\n static int getUniqueID(Object obj) {\n return obj.hashCode();\n }\n\n /**\n * Compiles this code. If an object implements both {@link JavaCode}\n * and {@link JavaExpression}, only one of this method and\n * {@link JavaExpression#compileExpression(Subroutine, JavaScope)} should be called.\n *\n * @param subroutine the subroutine which this code belongs to\n * @param parent the parent scope of this code\n * @throws JTAException if an error occurs\n */\n void compileCode(Subroutine subroutine, JavaScope parent) throws JTAException;\n}",
"public T execute() {\n return GraalCompiler.compile(this);\n }",
"public T evaluate(String expr) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionBuilder.build(tokens);\n Visitor<T> visitor = new ExpressionVisitor<>();\n return visitor.visit(expression);\n }",
"Object eval(String script, int keyCount, String... params);",
"String getSourceExpression();",
"abstract public PyCode getMain();",
"Map<String, Equation> compile(InputStream stream) throws IOException;",
"public String evaluate(final String jsExpression);",
"public interface IExpressionRuntime\n{\n Object evaluate();\n}",
"public Expression determine(String s);",
"void compileToJava();",
"public static void main(String[] args){\r\n\r\n IStmt lab2ex1 = new CompStmt(new AssignStmt(\"v\", new ConstExp(2)), new PrintStmt(new VarExp(\"v\")));\r\n\r\n /*\r\n * lab2ex2\r\n * a = 2 + 3 * 5;\r\n * b = a + 1;\r\n * print(b)\r\n *\r\n * */\r\n\r\n IStmt lab2ex2 = new CompStmt(new AssignStmt(\"a\", new ArithExp('+', new ConstExp(2), new ArithExp('*', new ConstExp(3), new ConstExp(5)))), new CompStmt(new AssignStmt(\"b\", new ArithExp('+', new VarExp(\"a\"), new ConstExp(1))), new PrintStmt(new VarExp(\"b\"))));\r\n\r\n /*\r\n * lab2ex3\r\n * a = 2 - 2;\r\n * if a then v = 2 else v = 3\r\n * print(v)\r\n *\r\n * */\r\n\r\n IStmt lab2ex3 = new CompStmt(new AssignStmt(\"a\", new ArithExp('-', new ConstExp(2), new ConstExp(2))), new CompStmt(new IfStmt(new VarExp(\"a\"), new AssignStmt(\"v\", new ConstExp(2)), new AssignStmt(\"v\", new ConstExp(3))), new PrintStmt(new VarExp(\"v\"))));\r\n\r\n /*\r\n * lab3ex1\r\n * openRFile(var_f, \"test.in\");\r\n * readFile(var_f, var_c); print(var_c);\r\n * if var_c then readFile(var_f, var_c); print(var_c)\r\n * else print(0)\r\n * closeRFile(var_f)\r\n *\r\n * */\r\n\r\n IStmt lab3ex1 = new CompStmt(new OpenRFileStmt(\"var_f\", \"test1.in\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"var_c\")),\r\n new CompStmt(\r\n new IfStmt(\r\n new VarExp(\"var_c\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new PrintStmt(new VarExp(\"var_c\"))\r\n ),\r\n new PrintStmt(new ConstExp(0))\r\n ),\r\n new CloseRFileStmt(new VarExp(\"var_f\"))\r\n )\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * lab3ex2\r\n * openRFile(var_f + 2, var_c); print(var_c);\r\n * (if var_c then readFile(var_f, var_c); print(var_c)\r\n * else print(0));\r\n * closeRFile(var_f)\r\n *\r\n */\r\n\r\n IStmt lab3ex2 = new CompStmt(new OpenRFileStmt(\"var_f\", \"test.in\"),\r\n new CompStmt(\r\n new ReadFileStmt(new ArithExp('+', new VarExp(\"var_f\"), new ConstExp(2)), \"var_c\"),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"var_c\")),\r\n new CompStmt(\r\n new IfStmt(\r\n new VarExp(\"var_c\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new PrintStmt(new VarExp(\"var_c\"))\r\n ),\r\n new PrintStmt(new ConstExp(0))\r\n ),\r\n new CloseRFileStmt(new VarExp(\"var_f\"))\r\n )\r\n )\r\n )\r\n );\r\n\r\n\r\n /*\r\n * v = 10; new(v, 20); new(a, 22); wH(a, 30); print(a); print(rH(a)); a = 0;\r\n *\r\n * */\r\n\r\n IStmt lab4ex1 = new CompStmt(new AssignStmt(\"v\", new ConstExp(10)),\r\n new CompStmt(\r\n new NewStmt(\"v\", new ConstExp(20)),\r\n new CompStmt(\r\n new NewStmt(\"a\", new ConstExp(22)),\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"a\")),\r\n new CompStmt(\r\n new PrintStmt(new ReadHeapExp(\"a\")),\r\n new AssignStmt(\"a\", new ConstExp(0))\r\n )\r\n )\r\n )\r\n )\r\n )\r\n );\r\n\r\n\r\n /**\r\n *\r\n * Lab5ex1: 10 + (2 < 6) = 11\r\n *\r\n * */\r\n\r\n\r\n IStmt lab5ex1 = new CompStmt(new AssignStmt(\"P\", new ArithExp('+', new ConstExp(10),\r\n new BooleanExp(new ConstExp(2), new ConstExp(6), \"<\"))),\r\n new PrintStmt(new VarExp(\"P\")));\r\n\r\n\r\n /*\r\n *\r\n * Lab5ex2: (10 + 2) < 6\r\n *\r\n * **/\r\n\r\n IStmt lab5ex2 = new CompStmt(new AssignStmt(\"Q\", new BooleanExp(new ArithExp('+',\r\n new ConstExp(10), new ConstExp(2)), new ConstExp(6), \"<\")),\r\n new PrintStmt(new VarExp(\"Q\")));\r\n\r\n\r\n /*\r\n *\r\n * v = 6;\r\n * (while (v - 4) print(v); v = v - 1)\r\n * print(v)\r\n *\r\n ***/\r\n\r\n AssignStmt as = new AssignStmt(\"v\", new ConstExp(6));\r\n IStmt auxlab5ex3 = new CompStmt(new WhileStmt(new BooleanExp(new VarExp(\"v\"),\r\n new ConstExp(4), \">=\"), new CompStmt(new PrintStmt(new VarExp(\"v\")),\r\n new AssignStmt(\"v\", new ArithExp('-', new VarExp(\"v\"), new ConstExp(1))))),\r\n new PrintStmt(new VarExp(\"v\")));\r\n\r\n IStmt lab5ex3 = new CompStmt(as, auxlab5ex3);\r\n\r\n\r\n /**\r\n *\r\n * la6ex1\r\n * v = 10; new(a, 22);\r\n * fork(wH(a, 30); v = 32; print(v); print(rH(a)));\r\n * print(v); print(rH(a))\r\n *\r\n * */\r\n\r\n IStmt lab6ex1 = new CompStmt(\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(10)),\r\n new NewStmt(\"a\", new ConstExp(22))\r\n ),\r\n new CompStmt(\r\n new ForkStmt(\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(32)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n )\r\n ),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n );\r\n\r\n IStmt lab6ex2 = new CompStmt(\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(10)),\r\n new NewStmt(\"a\", new ConstExp(22))\r\n ),\r\n new CompStmt(\r\n new ForkStmt(\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(32)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n )\r\n ),\r\n new ForkStmt(new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\")))\r\n )\r\n )\r\n );\r\n\r\n\r\n\r\n TextMenu menu = new TextMenu(new MyDictionary<String, Command>(new HashMap<String, Command>()));\r\n menu.addCommand(new ExitCommand(\"0\", \"Exit\"));\r\n menu.addCommand(new RunExample(\"1\", lab2ex1.toString(), getNewController(lab2ex1)));\r\n menu.addCommand(new RunExample(\"2\", lab2ex2.toString(), getNewController(lab2ex2)));\r\n menu.addCommand(new RunExample(\"3\", lab2ex3.toString(), getNewController(lab2ex3)));\r\n menu.addCommand(new RunExample(\"4\", lab3ex1.toString(), getNewController(lab3ex1)));\r\n menu.addCommand(new RunExample(\"5\", lab3ex2.toString(), getNewController(lab3ex2)));\r\n menu.addCommand(new RunExample(\"6\", lab4ex1.toString(), getNewController(lab4ex1)));\r\n menu.addCommand(new RunExample(\"7\", lab5ex1.toString(), getNewController(lab5ex1)));\r\n menu.addCommand(new RunExample(\"8\", lab5ex2.toString(), getNewController(lab5ex2)));\r\n menu.addCommand(new RunExample(\"9\", lab5ex3.toString(), getNewController(lab5ex3)));\r\n menu.addCommand(new RunExample(\"10\", lab6ex1.toString(), getNewController(lab6ex1)));\r\n menu.addCommand(new RunExample(\"11\", lab6ex2.toString(), getNewController(lab6ex2)));\r\n\r\n menu.show();\r\n }",
"StringLiteralExp createStringLiteralExp();",
"<C> StringLiteralExp<C> createStringLiteralExp();",
"public static String parseExecution(String value) throws DefinitionException{\n\t\tMatcher matcher = Pattern.compile(ConfigKey.REGIX_OF_PARSE_EXPRESSION).matcher(value);\n\t\tmatcher.find();\n\t\tString result = matcher.group();\n\t\tif(StringUtils.isNotBlank(result)){\n\t\t\treturn result;\t\n\t\t}else{\n\t\t\tthrow new DefinitionException(\"expression format error\");\n\t\t}\n\t}",
"public Element compileStatements() throws CloneNotSupportedException {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\n\t\tboolean end = false;\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\tElement statementsParent = document.createElement(\"statements\");\n\n\t\tdo {\n\t\t\tif (token.equals(\"let\")) {\n\t\t\t\tele = compileLet();\n\t\t\t} else if (token.equals(\"do\")) {\n\t\t\t\tele = compileDo();\n\t\t\t} else if (token.equals(\"if\")) {\n\t\t\t\tele = compileIf();\n\t\t\t} else if (token.equals(\"while\")) {\n\t\t\t\tele = compileWhile();\n\t\t\t} else if (token.equals(\"return\")) {\n\t\t\t\tele = compileReturn();\n\t\t\t}\n\t\t\tif (ele != null)\n\t\t\t\tstatementsParent.appendChild(ele);\n\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\t\tif (!token.matches(\"let|if|while|do|return\"))\n\t\t\t\tend = true;\n\t\t} while (!end);\n\n\t\treturn statementsParent;\n\t}",
"public LiteralExpression (String str){\n _value = str;\n }",
"@Test\n public void testInterpretor() {\n String str1 = \"28 in Binary\"; \n String str2 = \"28 in Hexadecimal\"; \n \n InterpreterClient ec = new InterpreterClient(new InterpreterContext()); \n System.out.println(str1+\"= \"+ec.interpret(str1)); \n System.out.println(str2+\"= \"+ec.interpret(str2)); \n }",
"public interface Interpreter {\n StringBuilder process(File file);\n}",
"@Test\r\n public void testEval__complex__000() throws ScriptException {\r\n final String script =\r\n \"(\" +\r\n \" platform: (swing: (frame: #() javax.swing.JFrame()))\" +\r\n \")\";\r\n Object value = engine.eval(script);\r\n Assert.assertNotNull(value);\r\n Assert.assertTrue(value instanceof Bindings);\r\n Assert.assertTrue(((Bindings) value).containsKey(\"platform\"));\r\n Assert.assertNotNull(((Bindings)value).get(\"platform\"));\r\n }",
"private static Object createNewInstance(String implement, String header, String expression) {\n\n\t\t// a feeble attempt at preventing arbitrary code execution\n\t\t// by limiting expressions to a single statement.\n\t\t// Otherwise the expression can be something like:\n\t\t// \tf(); } Object f() { System.exit(0); return null\n\t\tif (expression.contains(\";\"))\n\t\t\treturn null;\n\n\t\t// since we might create multiple expressions, we need their names to be unique\n\t\tString className = \"MyExpression\" + classNum++;\n\n\t\t// if we compile the class susseccfully, try and instantiate it\n\t\tif (writeAndCompile(className, implement, header, expression)) {\n\t\t\ttry {\n\t\t\t\tFile classFile = new File(path + className + \".class\");\n\t\t\t\t// load the class into the JVM, and try and get an instance of it\n\t\t\t\t//Class<?> newClass = ClassLoader.getSystemClassLoader().loadClass(className);\n\n\t\t\t\tURLClassLoader classLoader = URLClassLoader.newInstance(new URL[] { classFile.toURI().toURL() });\n\t\t\t\tClass<?> newClass = Class.forName(className, true, classLoader);\n\n\t\t\t\t// delete the class file, so we leave no trace\n\t\t\t\t// this is okay because we already loaded the class\n\t\t\t\ttry {\n\t\t\t\t\tclassFile.delete();\n\n\t\t\t\t// meh, we tried\n\t\t\t\t} catch (Exception e) {}\n\n\t\t\t\treturn newClass.newInstance();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t//System.out.println(\"Couldn't load class\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Couldn't write / compile source\");\n\t\t}\n\n\t\t// the class didn't compile\n\t\treturn null;\n\t}",
"public static Expr parse(String str) {\r\n\t\tExprBinary at = new ExprBinary(null, null); // the root of the tree\r\n\t\tStringBuilder opstore = new StringBuilder(); // stores operator characters\r\n\t\tStringBuilder adder = new StringBuilder(); // stores value characters\r\n\t\tboolean text = false; // whether inside of a string\r\n\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar c = str.charAt(i);\r\n\t\t\tboolean add = (c != '\\\\'); // whether to add the char to adder. ignore escape char\r\n\t\t\tboolean leftSide = (opstore.length() == 0); // whether on the left side of the binary expression (before the operator)\r\n\t\t\tString adderStr = adder.toString();\r\n\t\t\tString opStr = opstore.toString();\r\n\r\n\t\t\tif (c == '\"') { // string\r\n\t\t\t\tif (i == 0 || str.charAt(i - 1) != '\\\\') {\r\n\t\t\t\t\ttext = !text; // ignore string contents\r\n\t\t\t\t}\r\n\t\t\t} else if (!text) {\r\n\t\t\t\tif (c == ' ') {\r\n\t\t\t\t\tadd = false; // ignore spaces\r\n\t\t\t\t} else if (c == '(') { // grouping or function\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tString contents = str.substring(i + 1, closeIndex);\r\n\t\t\t\t\tExpr group; // the expression denoted by the parentheses group\r\n\r\n\t\t\t\t\tif (i > 0 && (!isReserved(str.charAt(i - 1)) || str.charAt(i - 1) == ')')) { // function\r\n\t\t\t\t\t\tif (adderStr.isEmpty()) { // function reference call ... func()()\r\n\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(null, contents); // a reference call is only a parameter group, null name\r\n\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t} else { // function call\r\n\t\t\t\t\t\t\tif (adderStr.startsWith(\".\")) { // function sub call ... func().subfunc()\r\n\t\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t\t} else { // standalone function ... func()\r\n\t\t\t\t\t\t\t\tif (Character.toString(adderStr.charAt(0)).equals(Operator.REF.op)) { // @func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprFuncRef(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\t} else { // func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprCall(adderStr, contents);\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} else { // parenthetical grouping\r\n\t\t\t\t\t\tchar cc = (adderStr.length() == 1 ? adderStr.charAt(0) : 0); // operator before parenthesis ... !()\r\n\t\t\t\t\t\tif (isReserved(cc)) { // operation on the group\r\n\t\t\t\t\t\t\tgroup = new ExprUnary(Operator.get(Character.toString(cc)), parse(contents));\r\n\t\t\t\t\t\t} else { // ignore character, not an operator\r\n\t\t\t\t\t\t\tgroup = parse(contents);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// add to tree\r\n\t\t\t\t\tif (leftSide) at.setLeft(group);\r\n\t\t\t\t\telse at.setRight(group);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (c == '{') { // array initializer ... {}\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tExpr arr = new ExprArray(str.substring(i + 1, closeIndex), adderStr);\r\n\r\n\t\t\t\t\tif (adderStr.length() == 1 && isReserved(adderStr.charAt(0))) {\r\n\t\t\t\t\t\t// unary op done on array initializer ... !{}\r\n\t\t\t\t\t\tarr = new ExprUnary(Operator.get(Character.toString(adderStr.charAt(0))), arr);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (leftSide) at.setLeft(arr);\r\n\t\t\t\t\telse at.setRight(arr);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (isOp(c)) { // operator\r\n\t\t\t\t\t// add value used in operation to tree\r\n\t\t\t\t\tif (!adderStr.isEmpty()) {\r\n\t\t\t\t\t\tif (leftSide) { // ex: adderStr + ___\r\n\t\t\t\t\t\t\tat.setLeft(parseValue(adderStr));\r\n\t\t\t\t\t\t} else { // ex: (___ + adderStr) + ___\r\n\t\t\t\t\t\t\tat.setRight(parseValue(adderStr));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opStr.equals(\"\") || (i > 0 && isOp(str.charAt(i - 1)))) { // accumulate operator from adjacent operator characters (ex: != consists of ! and =)\r\n\t\t\t\t\t\tif (!(adderStr.isEmpty() && (opStr + c).equals(\"-\")) && (Operator.get(opStr + c) != null || (opStr.isEmpty() && isOp(c)))) {// if the operator exists, then it is an operator character\r\n\t\t\t\t\t\t\tif (opStr.equals(\"-\") && c == '-') { // this and the above line handle negatives and double negatives\r\n\t\t\t\t\t\t\t\topStr = \"+\";\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\topStr += c;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // existing operator operation must be added to tree ... in \"(a + b) * c\", \"(a+b)\" must be abstracted-out so we get \"x * c\"\r\n\t\t\t\t\t\tint endIndex = i + 1; // end index of operator\r\n\r\n\t\t\t\t\t\t// get entire operator if operator is more than 1 character long\r\n\t\t\t\t\t\tfor (int i2 = endIndex; i2 < str.length(); i2++) {\r\n\t\t\t\t\t\t\tif (isOp(str.charAt(i2))) endIndex++;\r\n\t\t\t\t\t\t\telse break;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tOperator nextOp = Operator.get(str.substring(i, endIndex)); // second (right-most) operator\r\n\t\t\t\t\t\tat.op = Operator.get(opStr); // first (left-most) operator\r\n\r\n\t\t\t\t\t\t// group values in operation by operator precedence\r\n\t\t\t\t\t\tint p1 = precedence(nextOp); // right-most op\r\n\t\t\t\t\t\tint p2 = precedence(at.op); // left-most op\r\n\r\n\t\t\t\t\t\tif (p1 > p2) { // group around the right-most op\r\n\t\t\t\t\t\t\tExprBinary right = new ExprBinary(at, nextOp);\r\n\t\t\t\t\t\t\tright.setLeft(at.right());\r\n\r\n\t\t\t\t\t\t\tat.setRight(right);\r\n\t\t\t\t\t\t\tat = right;\r\n\r\n\t\t\t\t\t\t} else if (p1 < p2) { // group around the left-most op\r\n\t\t\t\t\t\t\tExprBinary last = at;\r\n\t\t\t\t\t\t\tExprBinary match = at.parent();\r\n\r\n\t\t\t\t\t\t\t// correctly add to the binary tree based on precedence of operators\r\n\t\t\t\t\t\t\twhile (match instanceof ExprBinary && p1 < (p2 = precedence(((ExprBinary) match).op))) {\r\n\t\t\t\t\t\t\t\tlast = match;\r\n\t\t\t\t\t\t\t\tmatch = match.parent();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tExprBinary tr = new ExprBinary(match, nextOp);\r\n\t\t\t\t\t\t\ttr.setLeft(last);\r\n\r\n\t\t\t\t\t\t\tif (match != null) {\r\n\t\t\t\t\t\t\t\tif (last == match.right()) match.setRight(tr);\r\n\t\t\t\t\t\t\t\telse match.setLeft(tr);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tat = tr;\r\n\r\n\t\t\t\t\t\t} else { // group from left to right (equal operator precedence)\r\n\t\t\t\t\t\t\tExprBinary left = new ExprBinary(at, at.op); // group existing values into left node, add right to open right node spot\r\n\t\t\t\t\t\t\tleft.setLeft(at.left());\r\n\t\t\t\t\t\t\tleft.setRight(at.right());\r\n\r\n\t\t\t\t\t\t\tat.op = nextOp;\r\n\t\t\t\t\t\t\tat.setLeft(left);\r\n\t\t\t\t\t\t\tat.setRight(null);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\topStr = nextOp.op;\r\n\t\t\t\t\t\ti = endIndex - 1;\r\n\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// store valid value characters\r\n\t\t\tif (add) {\r\n\t\t\t\tadder.append(c);\r\n\r\n\t\t\t\t// if this is the last character, then add the stored value to the tree.\r\n\t\t\t\t// otherwise, would be incorrectly ignored because there is no next operator\r\n\t\t\t\tif (i + 1 == str.length()) {\r\n\t\t\t\t\tif (opstore.length() == 0) {\r\n\t\t\t\t\t\tat.setLeft(parseValue(adder.toString()));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tat.setRight(parseValue(adder.toString()));\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// initialize binary tree operator if not done so already\r\n\t\tif (at.op == null) {\r\n\t\t\tat.op = Operator.get(opstore.toString());\r\n\t\t}\r\n\r\n\t\t// after traversing the tree to some point, we need to get back to root so we can return the entire tree\r\n\t\twhile (at.parent() != null) {\r\n\t\t\tat = (ExprBinary) at.parent();\r\n\t\t}\r\n\r\n\t\t// the expression may not actually be a binary operation\r\n\t\tif (at.op == null && at.right() == NULL) {\r\n\t\t\tif (at.left() == NULL) return NULL; // the expression is empty\r\n\t\t\treturn at.left(); // the expression is a single value/unary-operation\r\n\t\t}\r\n\r\n\t\treturn at;\r\n\t}",
"public WebutilsExpression parse(String expressionStr)\r\n\t{\r\n\t\tExpression expression = expressionEvaluator.parse(expressionStr);\r\n\t\treturn new WebutilsExpression(expression, expressionRegistry);\r\n\t}",
"public String eval()\r\n\t{\r\n\t\treturn eval(null, null);\r\n\t}",
"default Value eval(String script) throws Exception {\n return eval(script, false);\n }",
"public abstract Source load(ModuleName name);",
"private GenericVar run(String code) throws InterpreterException {\n\t\treturn evaluate(code);\n\t}",
"@Test\n public void ensureCompileTreeWorksAsIntended() throws Exception {\n String formula = \"#euro{2$+25$}\";\n CommonTree ast = new MonetaryExpressionCompiler().compileTree(formula);\n boolean verdict = ast.toStringTree().equals(\"(euro (+ ($ 2) ($ 25)))\");\n assertEquals(true, verdict);\n }",
"@Test\n void testExample1() {\n List<Token> input = Arrays.asList(\n new Token(Token.Type.IDENTIFIER, \"LET\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \":\", -1),\n new Token(Token.Type.IDENTIFIER, \"INTEGER\", -1),\n new Token(Token.Type.OPERATOR, \"=\", -1),\n new Token(Token.Type.INTEGER, \"1\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"WHILE\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"!=\", -1),\n new Token(Token.Type.INTEGER, \"10\", -1),\n new Token(Token.Type.IDENTIFIER, \"DO\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"PRINT\", -1),\n new Token(Token.Type.OPERATOR, \"(\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \")\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"=\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"+\", -1),\n new Token(Token.Type.INTEGER, \"1\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"END\", -1)\n );\n Ast.Source expected = new Ast.Source(Arrays.asList(\n new Ast.Statement.Declaration(\"first\", \"INTEGER\",\n Optional.of(new Ast.Expression.Literal(BigInteger.valueOf(1)))),\n new Ast.Statement.While(\n new Ast.Expression.Binary(\"!=\",\n new Ast.Expression.Variable(\"first\"),\n new Ast.Expression.Literal(BigInteger.valueOf(10))\n ),\n Arrays.asList(\n new Ast.Statement.Expression(\n new Ast.Expression.Function(\"PRINT\", Arrays.asList(\n new Ast.Expression.Variable(\"first\"))\n )\n ),\n new Ast.Statement.Assignment(\"first\",\n new Ast.Expression.Binary(\"+\",\n new Ast.Expression.Variable(\"first\"),\n new Ast.Expression.Literal(BigInteger.valueOf(1))\n )\n )\n )\n )\n ));\n test(input, expected, Parser::parseSource);\n }",
"default Value eval(String script, String name, boolean literal) throws Exception {\n if (name.endsWith(\".mjs\")) {\n return eval(script, name, \"application/javascript+module\", literal);\n } else {\n return eval(script, name, \"application/javascript\", literal);\n }\n }",
"public Element compileLet() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString varName;\n\t\tboolean array = false;\n\t\tElement letParent = document.createElement(\"letStatement\");\n\n\t\t// let\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// identifier\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tvarName = jTokenizer.returnTokenVal();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// Checks if the variable is an array element\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\tif (token.equals(\"[\")) {\n\t\t\tarray = true;\n\t\t\t//Pushing base address\n\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t\t// [\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tletParent.appendChild(ele);\n\n\t\t\t// Pushing the offset, the expression that comes after [\n\t\t\tjTokenizer.advance();\n\t\t\tletParent.appendChild(compileExpression());\n\t\t\t\n\t\t\t// ]\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tletParent.appendChild(ele);\n\t\t\tjTokenizer.advance();\n\t\t\t\n\t\t\t//Adding the two to find the address of the element\n\t\t\twriter.writeArithmetic(\"add\");\n\t\t}\n\n\t\t// =\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// compiling the expression on the right side of the equals\n\t\tjTokenizer.advance();\n\t\tletParent.appendChild(compileExpression());\n\n\t\t// ;\n\t\tjTokenizer.advance();\n\t\tele = createXMLnode(jTokenizer.tokenType());\n\t\tletParent.appendChild(ele);\n\t\t\n\t\t//If it was an array, we have to push the result of the expression to the address\n\t\t//of the specific element\n\t\tif (array) {\n\t\t\t// *(base+offset)=expression\n\t\t\twriter.writePop(\"temp\", 0);\n\n\t\t\t// base +index->that\n\t\t\twriter.writePop(\"pointer\", 1);\n\n\t\t\t// Expression -> *(base+index)\n\t\t\twriter.writePush(\"temp\", 0);\n\t\t\twriter.writePop(\"that\", 0);\n\t\t} \n\t\t//If not array, just pop it to the variable directly\n\t\telse {\n\t\t\twriter.writePop(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t}\n\n\t\treturn letParent;\n\t}",
"public Object parseValue(String expr);",
"public Stmt createEval(Expr expr) {\n return xnf.Eval(expr.position(), expr);\n }",
"public String convertStatement (String oraStatement);"
] | [
"0.615322",
"0.601708",
"0.5979671",
"0.5933329",
"0.5870772",
"0.56527126",
"0.5647737",
"0.5644364",
"0.56363237",
"0.5615925",
"0.54857296",
"0.5373654",
"0.5355313",
"0.5355182",
"0.5345493",
"0.53190297",
"0.5298634",
"0.5296948",
"0.5290355",
"0.52870303",
"0.5285944",
"0.52216744",
"0.5193208",
"0.5191629",
"0.5190212",
"0.51602066",
"0.5146662",
"0.5146662",
"0.51351845",
"0.5133628",
"0.5127538",
"0.51266944",
"0.51254606",
"0.51250494",
"0.5104672",
"0.508499",
"0.5077188",
"0.5025525",
"0.5025518",
"0.5022935",
"0.50088835",
"0.5008103",
"0.50076574",
"0.5004279",
"0.49827266",
"0.49771756",
"0.49739325",
"0.495481",
"0.49545035",
"0.49252215",
"0.4920083",
"0.49194407",
"0.4907292",
"0.4907127",
"0.4901468",
"0.48971924",
"0.48898262",
"0.48881313",
"0.48828653",
"0.48524517",
"0.48441318",
"0.48357484",
"0.482346",
"0.48224095",
"0.48212972",
"0.48192194",
"0.48159152",
"0.48096436",
"0.48053223",
"0.47934353",
"0.47863472",
"0.4776913",
"0.4768268",
"0.47679305",
"0.47634333",
"0.47627708",
"0.47595888",
"0.47533894",
"0.47532824",
"0.4753114",
"0.47509724",
"0.47424453",
"0.4741763",
"0.4718278",
"0.47135445",
"0.470142",
"0.47013327",
"0.46917528",
"0.4689289",
"0.46888316",
"0.46887472",
"0.46857488",
"0.46826142",
"0.46825153",
"0.46751854",
"0.46734127",
"0.4658352",
"0.46557054",
"0.46479115",
"0.46393254"
] | 0.64047694 | 0 |
Sets a variable in the local namespace. | public void set(String name, Object value) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOriginalVariable(GlobalVariable var) {\n originalVariable = var;\n }",
"private void updateLocalVar(Node node, String localVarName) {\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\tNodeList localVarNodeList = ((Element) node).getElementsByTagName(LOCAL_VARIABLE_NAME);\n\t\tif (localVarNodeList != null && localVarNodeList.getLength() > 0) {\n\t\t\tElement localVar = (Element) localVarNodeList.item(0);\n\t\t\tlocalVar.setAttribute(VALUE, localVarName);\n\t\t}\n\t}",
"protected void SetVariable(SB_ExecutionFrame contextFrame, SB_Variable var)\r\n\t throws SB_Exception\r\n\t{\r\n\t\tSB_Variable classVar = contextFrame.GetVariable(_varName);\r\n\t\t\t\t\r\n\t\tif( classVar != null)\r\n\t\t{\r\n\t\t Object obj = classVar.getValue();\r\n\t\t\tClass cls = obj.getClass();\r\n\t\t\t\r\n\t\t\tif( !SetClassMemberField(cls, obj, _varMember, SB_SimInterface.ConvertObject(var)))\r\n\t\t\t{\r\n\t\t\t throw new SB_Exception(\"Can't find \" + _varName +\".\" + _varMember);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public final void setVarName(String varName){\n\t\tthis.varName = varName;\t\n\t}",
"public void setVariable(Name variable) {\n this.variable = variable;\n }",
"public void setVarName(String text) {\n\t\tvarName=text;\r\n\t}",
"public void setVar(String var) {\n\t\tstate.put(PropertyKeys.var, var);\n\t}",
"public void setVar(String var)\n {\n this.var = var;\n }",
"public MathEval setVariable(String nam, double val) {\r\n return setVariable(nam,Double.valueOf(val));\r\n }",
"protected void setLocal(int i, Node n) {\n if(TRACE_REGISTERS) System.out.println(this.method + \": setting \" + i + \" <- \" + n);\n s.registers[i] = n; \n }",
"public final void setName(final GenericName name) {\n this.value = name.toString();\n final NameSpace scope = name.scope();\n if (scope != null && !scope.isGlobal()) {\n codeSpace = scope.name().toString();\n }\n }",
"public void setVariable(Variable variable) {\n this.variable = variable;\n }",
"public void setVariableQName(StructuredQName s) {\n variableQName = s;\n }",
"public void set(T v) {\n\t\tset(v, ModSettings.currentContext);\n\t}",
"public void setVariable(String strVariable)\n {\n this.strVariable = strVariable;\n }",
"public void assign (String name, Value value){\n Closure exist = find_var(name);\n exist.getValues().put(name, value);\n }",
"public Boolean setVariable(String var_name) {\n\t\tthis.setTitle(var_name);\n\t\tthis.setVarName(var_name);\n\t\tthis.sT.addVariable(var_name);\n\t\treturn true;\n\t}",
"public void declareVariable(String name, String value) {\n checkNotNull(name);\n checkNotNull(value);\n addLine(VARIABLE_MODIFIER + ' ' + name + \" = \" + value + ';');\n }",
"private void setJstl(String var, Object val, int scope) {\n pageContext.setAttribute(var, val, scope);\n }",
"public void setVar(String var) {\n\t\tthis._var = var;\n\t}",
"public void setMakeVariable(String name, String value) {\n pkgBuilder.setMakeVariable(name, value);\n }",
"public void setGlobal(String name, Object value) {\n Preconditions.checkNotNull(value, \"Module.setGlobal(%s, null)\", name);\n globals.put(name, value);\n }",
"public void setLocal(gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Local local)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Local target = null;\r\n target = (gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Local)get_store().find_element_user(LOCAL$0, 0);\r\n if (target == null)\r\n {\r\n target = (gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Local)get_store().add_element_user(LOCAL$0);\r\n }\r\n target.set(local);\r\n }\r\n }",
"public MathEval setVariable(String nam, Double val) {\r\n if(!Character.isLetter(nam.charAt(0))) { throw new IllegalArgumentException(\"Variable must start with a letter\" ); }\r\n if(nam.indexOf('(')!=-1 ) { throw new IllegalArgumentException(\"Variable names may not contain a parenthesis\"); }\r\n if(nam.indexOf(')')!=-1 ) { throw new IllegalArgumentException(\"Variable names may not contain a parenthesis\"); }\r\n if(val==null) { variables.remove(nam); }\r\n else { variables.put(nam,val); }\r\n return this;\r\n }",
"public void setQName(javax.xml.namespace.QName param) {\n this.localQName = param;\n }",
"public void setVariable(String variable, Integer value) {\n _variables.put(variable, value);\n }",
"public void setLocal(boolean isLocal);",
"public void assign (String name, int value){\n Closure exist = find_var(name);\n exist.getValues().put(name, new IntegerValue(value));\n }",
"public void setVar(String var) {\n\t\tthis.var = var;\n\t}",
"public void setTransientVariable(String name, Object value) {\n transientVariables.put(name, value);\n }",
"void setNamespace(String namespace);",
"public void defineReadonlyVariable(String name, IRubyObject value) {\n globalVariables.defineReadonly(name, new ValueAccessor(value));\n }",
"public void defineReadonlyVariable(String name, IRubyObject value) {\n globalVariables.defineReadonly(name, new ValueAccessor(value));\n }",
"public void setValue(String variable, String value){\r\n if (matlabEng==null) return;\r\n matlabEng.engEvalString (id,variable + \"= [\" + value + \"]\");\r\n }",
"public IRubyObject setClassVar(String name, IRubyObject value) {\n RubyModule module = this;\n do {\n if (module.hasClassVariable(name)) {\n return module.storeClassVariable(name, value);\n }\n } while ((module = module.getSuperClass()) != null);\n \n return storeClassVariable(name, value);\n }",
"public void setName(String name) {\n this.name = name; // assigning a local variable value to a global variable\r\n }",
"void setNested(LocalScope scope) {\r\n nested = scope;\r\n }",
"public void setLocalFlag(String value) {\n setAttributeInternal(LOCALFLAG, value);\n }",
"public void setLocalFlag(String value) {\n setAttributeInternal(LOCALFLAG, value);\n }",
"void resetLocal();",
"public void setIdLocal(int idLocal) {\r\n this.idLocal = idLocal;\r\n }",
"public static void store(String varName) {\n emit(newVariable(varName).getStore());\n }",
"public void setX(int x) { loc.x = x; }",
"private void smem_variable_set(smem_variable_key variable_id, long variable_value) throws SQLException\n {\n final PreparedStatement var_set = db.var_set;\n \n var_set.setLong(1, variable_value);\n var_set.setInt(2, variable_id.ordinal());\n \n var_set.execute();\n }",
"public void setVar(String name,Object val) throws FSException {\n\n Object obj;\n\n if (val==null) parseError(\"set variable \"+name+\" with null value\");\n\n if (subParser!=null) {\n subParser.setVar(name,val);\n return;\n }\n\n if ( (obj=vars.get(name)) != null ) {\n if (val.getClass() != obj.getClass()) {\n //special case for FSObject allow asignment of either same\n //class or _any_ class if FSObject is already null\n //also allow assignment of null to any FSObject\n if (obj instanceof FSObject) {\n if (((FSObject)obj).getObject()==null){\n val=new FSObject(val);\n }\n else if(((FSObject)obj).getObject().getClass()==val.getClass()){\n val=new FSObject(val);\n }\n else {\n parseError(\"Incompatible types\");\n }\n }\n else{\n parseError(\"Incompatible types\");\n }\n }\n vars.remove(name);\n vars.put(name,val);\n } else if ( (obj=gVars.get(name)) != null ) {\n if (val.getClass() != obj.getClass()) {\n parseError(\"Incompatible types\");\n }\n gVars.remove(name);\n gVars.put(name,val);\n }\n\n }",
"public void setDeclaration(VariableTree decl) {\n this.decl = decl;\n }",
"protected static void setDependencies(GlobalVariable var, XPathContext context) throws XPathException {\n Controller controller = context.getController();\n if (!(context instanceof XPathContextMajor)) {\n context = getMajorCaller(context);\n }\n while (context != null) {\n do {\n ContextOriginator origin = ((XPathContextMajor) context).getOrigin();\n if (origin instanceof GlobalVariable) {\n controller.registerGlobalVariableDependency((GlobalVariable) origin, var);\n return;\n }\n context = getMajorCaller(context);\n } while (context != null);\n }\n }",
"public void addGlobalVariable(int adr, int x){\n initInstructions.add(\"# adding a global variable\");\n initInstructions.add(\"li $a0, \" + x);\n initInstructions.add(\"sw $a0, \" + adr + \"($gp)\");\n initInstructions.add(\"# end of adding a global variable\");\n }",
"@Override\n public void enterVariableAssignmentStatement(MiniJavaParser.VariableAssignmentStatementContext ctx) {\n Symbol variable = currentScope.lookup(ctx.Identifier().getText());\n if (variable.isField()) {\n mg.loadThis();\n }\n }",
"private void putVariable(String memVar, int value){\n\t\tram[Integer.parseInt(\n\t\t\t\tCharacter.toString(memVar.charAt(1)))]\n\t\t\t\t= value;\n\t}",
"public void set_int(int param) {\n this.local_int = param;\n }",
"public static final void setVar(final Str varNum, String val) {\n if (val == null)\n val = \"\";\n setUpLowVar(varNum, val.toUpperCase());\n }",
"private void localVariableDeclaration(Modifier modify, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.FINALSY)\r\n {\r\n modify.add(nextSymbol.value);\r\n lookAhead();\r\n }\r\n\r\n modify.check(modify.fields | modify.access);\r\n Type t = type();\r\n\r\n variableDeclarators(modify, t, scope, queue);\r\n }",
"public void setScope(JexlEngine.Scope theScope) {\r\n this.scope = theScope;\r\n }",
"public boolean putVar(String name){\n switch (currentScope()) {\n case GLOBAL:\n return putGlobVar(name);\n case LOCAL:\n return putLocalVar(name);\n case TEMPORARY:\n return putTemporaryVar(name);\n default:\n return false;\n }\n }",
"public void setVar(String name, double value){\n\t\tvar_map.put(name, value);\n\t}",
"public void setVars() {\n\t\tif (jEdit.getPlugin(\"console.ConsolePlugin\") != null) {\n\t\t\tconsole.ConsolePlugin.setSystemShellVariableValue(\"LUAJ\", getLuaJ());\n\t\t}\n\t}",
"public void assign(String varName, String varData) {\n vars.put(varName, varData);\n }",
"private boolean bindNewVariable(String name, Obj value) {\n if (name.equals(\"_\")) return true;\n \n // Bind the variable.\n return mScope.define(mIsMutable, name, value);\n }",
"private void storeValue(Object value)\n {\n if (getParent() instanceof ValueSupport)\n {\n ((ValueSupport) getParent()).setValue(value);\n }\n\n if (getVar() != null)\n {\n getContext().setVariable(getVar(), value);\n }\n }",
"public void setGlobalVariables(GlobalVariables globalVariables);",
"public static void setVariable(String name, double value) {\r\n\t\tvariables.put(name, value);\r\n\t}",
"public void set(String name, PyObject value) {\n }",
"public void setIdentifier(FactIdentifier param) {\r\n localIdentifierTracker = true;\r\n\r\n this.localIdentifier = param;\r\n\r\n\r\n }",
"Variable(String _var) {\n this._var = _var;\n }",
"public void setVariable(String name, Fraction value) {\n\n\t\tsymbolTable.put(name.trim(), value);\n\t}",
"void setNamespace(java.lang.String namespace);",
"public void setX(int a)\n {\n x = a;\n }",
"public void set_context(VariableSymbolTable context);",
"public Variable addNewPrefixedVar(String prefix, String rootName, Type t) {\n\t\treturn addNewPrefixedVar(prefix, rootName, t, Use.LOCAL);\n\t}",
"public void assign (String name, StatementParse node, Closure parent){\n Closure exist = find_var(name);\n Value newClosure;\n if (node.getName().equals(\"function\")){\n newClosure = new Closure(parent, node);\n } else {\n newClosure = new Environment(parent, node);\n }\n exist.getValues().put(name, newClosure);\n }",
"protected <T> void setSharedContextVariable(String name, Class<T> type, T value) {\r\n T typedValue = TypeCastUtility.castValue(value, type);\r\n m_sharedVariableMap.put(name, typedValue);\r\n }",
"public void declare (String name, Value value){\n if (contains(name)){\n throw new VariableAlreadyDefined();\n }\n this.values.put(name, value);\n }",
"public void setEntityValue(String name, NodeList value, boolean local) {\n ActiveEntity binding = getEntityBinding(name, local);\n if (binding != null) {\n binding.setValueNodes(this, value);\n } else {\n if (entities == null && (local || nameContext == null))\n\tentities = new BasicEntityTable();\n Tagset ts = this.getTopContext().getTagset();\n getEntities().setBinding(name, ts.createActiveEntity(name, value));\n } \n }",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void addVariable(String varName)\n\t{\n\t\tget(VARSTRATEGY).addVariable(this, varName);\n\t}",
"public void setName(java.lang.String param) {\r\n localNameTracker = true;\r\n\r\n this.localName = param;\r\n\r\n\r\n }",
"private void assignWithReference(String valueName, Variable lastAppearanceOfVar) throws\r\n\t\t\tIllegalOperationException,IncompatibleTypeException,TypeNotSupportedException {\r\n\t\t//we'll check if the assignment is made with a reference to another variable:\r\n\t\tVariable reference = findVariable(valueName);\r\n\t\tif(reference==null){//if not, valueName variable was ever declared and it's type isn't legal.\r\n\t\t\tthrow new IllegalOperationException();\r\n\t\t}else if(reference.isGlobal()&&!reference.isInitialized()){//reference's an uninitialised global var\r\n\t\t\treference = uninitialisedGlobalVariables.get(valueName);//see if it was assigned in this scope\r\n\t\t\tif(reference==null){//if not:\r\n\t\t\t\tthrow new IllegalOperationException();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!reference.isInitialized()) {//if the referenced variable was never initialised:\r\n\t\t\tthrow new IllegalOperationException();\r\n\t\t}\r\n\t\tlastAppearanceOfVar.compatibleWith(reference);//val's type's illegal-> exception\r\n\t\tif(lastAppearanceOfVar.isGlobal()&&!lastAppearanceOfVar.isInitialized()&&!scopeType.equals//\r\n\t\t\t\t(\"global\")){//we're trying, in a scope other than globalScope, to assign a value to an\r\n\t\t\t // uninitialised global variable\r\n\t\t\tassignUninitialisedGlobalVar(lastAppearanceOfVar,valueName);//see methods's documentation.\r\n\t\t}else{\r\n\t\t\tlastAppearanceOfVar.initialize();\r\n\t\t}\r\n\t}",
"@Override\n public CodeFragment visitAssignmentStat(AlangParser.AssignmentStatContext ctx) {\n String name = ctx.ID().getText();\n if (!variableExists(name)) {\n this.addError(ctx, name, \"Assignment to undeclared variable\");\n return new CodeFragment(\"\");\n }\n\n Variable v = this.globals.get(name);\n v.setValue(ctx.global_expression().getText());\n v.setHasValue();\n\n return new CodeFragment(\"\");\n }",
"public void setName(java.lang.String param) {\n localNameTracker = true;\n\n this.localName = param;\n }",
"public void setName(java.lang.String param) {\n localNameTracker = true;\n\n this.localName = param;\n }",
"public void setName(java.lang.String param) {\n localNameTracker = true;\n\n this.localName = param;\n }",
"public void setParentLocalScope(LocalScope localScope) {\n\t\tthis.parentLocalScope = localScope;\n\t}",
"public LocalVariable defineLocalVariable(QName name, XQType type,\n Expression declaring)\n {\n \n LocalVariable decl = newLocal(name, type, declaring);\n lastLocal.addAfter(decl);\n lastLocal = decl;\n return decl;\n }",
"public void setLocalAttribute(String name, String value) {\n\t\tlocalAttributes.put(name, value);\n\t}",
"public void setName(java.lang.String param) {\r\n localNameTracker = param != null;\r\n\r\n this.localName = param;\r\n }",
"public void assignValue (String variable, String x) {\n Map.Entry<String, Value> var = findVariable(variable);\n if (var != null) {\n if (var.getValue().getType() == Value.Type.STRING)\n var.getValue().setValue(x);\n else if (var.getValue().getType() == Value.Type.REAL && x.contains(\".\"))\n try {\n var.getValue().setValue(Double.parseDouble(x));\n } catch (Exception e) {\n throw new RuntimeException(\"Error Type mismatch\");\n }\n else if (var.getValue().getType() == Value.Type.INT)\n try {\n var.getValue().setValue(Integer.parseInt(x));\n } catch (Exception e) {\n throw new RuntimeException(\"Error Type mismatch\");\n }\n else if (var.getValue().getType() == Value.Type.BOOL) {\n try {\n var.getValue().setValue(Boolean.parseBoolean(x));\n } catch (Exception e) {\n throw new RuntimeException(\"Error Type mismatch\");\n }\n } else\n throw new RuntimeException(\"Error: Type mismatch\");\n } else {\n throw new RuntimeException(\"Error: Variable was not declared\");\n }\n }",
"public void setString(java.lang.String param) {\r\n this.localString = param;\r\n }",
"public static void m13177a(C3598a aVar) {\n f10779a = aVar;\n }",
"void xsetNamespace(org.apache.xmlbeans.XmlNMTOKEN namespace);",
"public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public void mo38277a(C7998s sVar) {\n this.f27041d = sVar;\n }",
"public void setString(java.lang.String param) {\n this.localString = param;\n }",
"public void setContext(String namespace, String key, String value) {\n if (context == null) {\n context = new HashMap<String, Map<String, String>>();\n }\n\n Map<String, String> namespaceMap = context.get(namespace);\n if (namespaceMap == null) {\n namespaceMap = new HashMap<String, String>();\n context.put(namespace, namespaceMap);\n }\n\n namespaceMap.put(key, value);\n }",
"public void setIdentifierValue(java.lang.String param) {\r\n localIdentifierValueTracker = true;\r\n\r\n this.localIdentifierValue = param;\r\n\r\n\r\n }",
"public void setVar42(java.lang.Integer value) {\n this.var42 = value;\n }",
"public void testBoundToVariable()\n throws Exception\n {\n String varname =\"ITEM\";\n String id = \"occ_hermes1\";\n Occurrence occ = (Occurrence) tm.getObjectByID(id);\n // resolver shall resolve by id\n tag.setOccurrence(occ);\n\n // resolved topic shall be stored in\n // the variable named TOPIC\n tag.setVar(varname);\n \n // resolve\n setScriptForTagBody(tag);\n tag.doTag(null);\n \n // the item should be stored in the variable\n assertEquals(occ, ctx.getVariable(varname));\n \n // make a new tag, bound to the same variable \n // set resolvement to non existant topic\n tag = new UseOccurrenceTag();\n tag.setContext(ctx);\n tag.setVar(varname);\n tag.setId(\"nonexistantntifd\");\n\n // resolve\n tag.doTag(null);\n\n // the variable should be resetted\n assertNull(ctx.getVariable(varname));\n \n }"
] | [
"0.6412899",
"0.6354694",
"0.6245931",
"0.6162933",
"0.6162933",
"0.6147463",
"0.61443514",
"0.6103241",
"0.6053576",
"0.59031546",
"0.58686185",
"0.5789237",
"0.5759505",
"0.5759147",
"0.57390237",
"0.57178247",
"0.570706",
"0.56947404",
"0.56889284",
"0.5625272",
"0.5625106",
"0.5620479",
"0.56117475",
"0.5584028",
"0.5579539",
"0.55679643",
"0.5565221",
"0.5554955",
"0.5538274",
"0.5506867",
"0.54940593",
"0.5487597",
"0.54717827",
"0.5464001",
"0.5464001",
"0.5458156",
"0.5445199",
"0.54299873",
"0.542526",
"0.5416941",
"0.5416941",
"0.5406492",
"0.54061735",
"0.5405931",
"0.5405597",
"0.5389658",
"0.53856546",
"0.5379525",
"0.5372245",
"0.53664654",
"0.5364996",
"0.5349006",
"0.5333515",
"0.5320589",
"0.53166914",
"0.5314987",
"0.53137934",
"0.52817154",
"0.52745116",
"0.52735025",
"0.5241011",
"0.5225389",
"0.52201074",
"0.5212157",
"0.52080065",
"0.52049524",
"0.5203451",
"0.5184035",
"0.5181042",
"0.5173365",
"0.51703054",
"0.51691926",
"0.51643944",
"0.51636845",
"0.51625234",
"0.5160075",
"0.51462656",
"0.51462656",
"0.51462656",
"0.5144864",
"0.5143776",
"0.5140442",
"0.5133185",
"0.51199865",
"0.51199865",
"0.51199865",
"0.51110524",
"0.5108832",
"0.5097899",
"0.5087367",
"0.507217",
"0.50716746",
"0.50696325",
"0.50644803",
"0.5055665",
"0.5048881",
"0.50310516",
"0.50189745",
"0.50141615",
"0.50086516",
"0.4999803"
] | 0.0 | -1 |
Sets a variable in the local namespace. | public void set(String name, PyObject value) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOriginalVariable(GlobalVariable var) {\n originalVariable = var;\n }",
"private void updateLocalVar(Node node, String localVarName) {\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\tNodeList localVarNodeList = ((Element) node).getElementsByTagName(LOCAL_VARIABLE_NAME);\n\t\tif (localVarNodeList != null && localVarNodeList.getLength() > 0) {\n\t\t\tElement localVar = (Element) localVarNodeList.item(0);\n\t\t\tlocalVar.setAttribute(VALUE, localVarName);\n\t\t}\n\t}",
"protected void SetVariable(SB_ExecutionFrame contextFrame, SB_Variable var)\r\n\t throws SB_Exception\r\n\t{\r\n\t\tSB_Variable classVar = contextFrame.GetVariable(_varName);\r\n\t\t\t\t\r\n\t\tif( classVar != null)\r\n\t\t{\r\n\t\t Object obj = classVar.getValue();\r\n\t\t\tClass cls = obj.getClass();\r\n\t\t\t\r\n\t\t\tif( !SetClassMemberField(cls, obj, _varMember, SB_SimInterface.ConvertObject(var)))\r\n\t\t\t{\r\n\t\t\t throw new SB_Exception(\"Can't find \" + _varName +\".\" + _varMember);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public final void setVarName(String varName){\n\t\tthis.varName = varName;\t\n\t}",
"public void setVariable(Name variable) {\n this.variable = variable;\n }",
"public void setVarName(String text) {\n\t\tvarName=text;\r\n\t}",
"public void setVar(String var) {\n\t\tstate.put(PropertyKeys.var, var);\n\t}",
"public void setVar(String var)\n {\n this.var = var;\n }",
"public MathEval setVariable(String nam, double val) {\r\n return setVariable(nam,Double.valueOf(val));\r\n }",
"protected void setLocal(int i, Node n) {\n if(TRACE_REGISTERS) System.out.println(this.method + \": setting \" + i + \" <- \" + n);\n s.registers[i] = n; \n }",
"public void setVariable(Variable variable) {\n this.variable = variable;\n }",
"public final void setName(final GenericName name) {\n this.value = name.toString();\n final NameSpace scope = name.scope();\n if (scope != null && !scope.isGlobal()) {\n codeSpace = scope.name().toString();\n }\n }",
"public void setVariableQName(StructuredQName s) {\n variableQName = s;\n }",
"public void set(T v) {\n\t\tset(v, ModSettings.currentContext);\n\t}",
"public void setVariable(String strVariable)\n {\n this.strVariable = strVariable;\n }",
"public void assign (String name, Value value){\n Closure exist = find_var(name);\n exist.getValues().put(name, value);\n }",
"public Boolean setVariable(String var_name) {\n\t\tthis.setTitle(var_name);\n\t\tthis.setVarName(var_name);\n\t\tthis.sT.addVariable(var_name);\n\t\treturn true;\n\t}",
"public void declareVariable(String name, String value) {\n checkNotNull(name);\n checkNotNull(value);\n addLine(VARIABLE_MODIFIER + ' ' + name + \" = \" + value + ';');\n }",
"private void setJstl(String var, Object val, int scope) {\n pageContext.setAttribute(var, val, scope);\n }",
"public void setVar(String var) {\n\t\tthis._var = var;\n\t}",
"public void setMakeVariable(String name, String value) {\n pkgBuilder.setMakeVariable(name, value);\n }",
"public void setGlobal(String name, Object value) {\n Preconditions.checkNotNull(value, \"Module.setGlobal(%s, null)\", name);\n globals.put(name, value);\n }",
"public void setLocal(gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Local local)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Local target = null;\r\n target = (gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Local)get_store().find_element_user(LOCAL$0, 0);\r\n if (target == null)\r\n {\r\n target = (gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Local)get_store().add_element_user(LOCAL$0);\r\n }\r\n target.set(local);\r\n }\r\n }",
"public MathEval setVariable(String nam, Double val) {\r\n if(!Character.isLetter(nam.charAt(0))) { throw new IllegalArgumentException(\"Variable must start with a letter\" ); }\r\n if(nam.indexOf('(')!=-1 ) { throw new IllegalArgumentException(\"Variable names may not contain a parenthesis\"); }\r\n if(nam.indexOf(')')!=-1 ) { throw new IllegalArgumentException(\"Variable names may not contain a parenthesis\"); }\r\n if(val==null) { variables.remove(nam); }\r\n else { variables.put(nam,val); }\r\n return this;\r\n }",
"public void setQName(javax.xml.namespace.QName param) {\n this.localQName = param;\n }",
"public void setVariable(String variable, Integer value) {\n _variables.put(variable, value);\n }",
"public void setLocal(boolean isLocal);",
"public void assign (String name, int value){\n Closure exist = find_var(name);\n exist.getValues().put(name, new IntegerValue(value));\n }",
"public void setVar(String var) {\n\t\tthis.var = var;\n\t}",
"public void setTransientVariable(String name, Object value) {\n transientVariables.put(name, value);\n }",
"void setNamespace(String namespace);",
"public void defineReadonlyVariable(String name, IRubyObject value) {\n globalVariables.defineReadonly(name, new ValueAccessor(value));\n }",
"public void defineReadonlyVariable(String name, IRubyObject value) {\n globalVariables.defineReadonly(name, new ValueAccessor(value));\n }",
"public void setValue(String variable, String value){\r\n if (matlabEng==null) return;\r\n matlabEng.engEvalString (id,variable + \"= [\" + value + \"]\");\r\n }",
"public IRubyObject setClassVar(String name, IRubyObject value) {\n RubyModule module = this;\n do {\n if (module.hasClassVariable(name)) {\n return module.storeClassVariable(name, value);\n }\n } while ((module = module.getSuperClass()) != null);\n \n return storeClassVariable(name, value);\n }",
"public void setName(String name) {\n this.name = name; // assigning a local variable value to a global variable\r\n }",
"void setNested(LocalScope scope) {\r\n nested = scope;\r\n }",
"public void setLocalFlag(String value) {\n setAttributeInternal(LOCALFLAG, value);\n }",
"public void setLocalFlag(String value) {\n setAttributeInternal(LOCALFLAG, value);\n }",
"void resetLocal();",
"public static void store(String varName) {\n emit(newVariable(varName).getStore());\n }",
"public void setIdLocal(int idLocal) {\r\n this.idLocal = idLocal;\r\n }",
"public void setX(int x) { loc.x = x; }",
"private void smem_variable_set(smem_variable_key variable_id, long variable_value) throws SQLException\n {\n final PreparedStatement var_set = db.var_set;\n \n var_set.setLong(1, variable_value);\n var_set.setInt(2, variable_id.ordinal());\n \n var_set.execute();\n }",
"public void setVar(String name,Object val) throws FSException {\n\n Object obj;\n\n if (val==null) parseError(\"set variable \"+name+\" with null value\");\n\n if (subParser!=null) {\n subParser.setVar(name,val);\n return;\n }\n\n if ( (obj=vars.get(name)) != null ) {\n if (val.getClass() != obj.getClass()) {\n //special case for FSObject allow asignment of either same\n //class or _any_ class if FSObject is already null\n //also allow assignment of null to any FSObject\n if (obj instanceof FSObject) {\n if (((FSObject)obj).getObject()==null){\n val=new FSObject(val);\n }\n else if(((FSObject)obj).getObject().getClass()==val.getClass()){\n val=new FSObject(val);\n }\n else {\n parseError(\"Incompatible types\");\n }\n }\n else{\n parseError(\"Incompatible types\");\n }\n }\n vars.remove(name);\n vars.put(name,val);\n } else if ( (obj=gVars.get(name)) != null ) {\n if (val.getClass() != obj.getClass()) {\n parseError(\"Incompatible types\");\n }\n gVars.remove(name);\n gVars.put(name,val);\n }\n\n }",
"public void setDeclaration(VariableTree decl) {\n this.decl = decl;\n }",
"protected static void setDependencies(GlobalVariable var, XPathContext context) throws XPathException {\n Controller controller = context.getController();\n if (!(context instanceof XPathContextMajor)) {\n context = getMajorCaller(context);\n }\n while (context != null) {\n do {\n ContextOriginator origin = ((XPathContextMajor) context).getOrigin();\n if (origin instanceof GlobalVariable) {\n controller.registerGlobalVariableDependency((GlobalVariable) origin, var);\n return;\n }\n context = getMajorCaller(context);\n } while (context != null);\n }\n }",
"public void addGlobalVariable(int adr, int x){\n initInstructions.add(\"# adding a global variable\");\n initInstructions.add(\"li $a0, \" + x);\n initInstructions.add(\"sw $a0, \" + adr + \"($gp)\");\n initInstructions.add(\"# end of adding a global variable\");\n }",
"@Override\n public void enterVariableAssignmentStatement(MiniJavaParser.VariableAssignmentStatementContext ctx) {\n Symbol variable = currentScope.lookup(ctx.Identifier().getText());\n if (variable.isField()) {\n mg.loadThis();\n }\n }",
"private void putVariable(String memVar, int value){\n\t\tram[Integer.parseInt(\n\t\t\t\tCharacter.toString(memVar.charAt(1)))]\n\t\t\t\t= value;\n\t}",
"public void set_int(int param) {\n this.local_int = param;\n }",
"public static final void setVar(final Str varNum, String val) {\n if (val == null)\n val = \"\";\n setUpLowVar(varNum, val.toUpperCase());\n }",
"private void localVariableDeclaration(Modifier modify, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.FINALSY)\r\n {\r\n modify.add(nextSymbol.value);\r\n lookAhead();\r\n }\r\n\r\n modify.check(modify.fields | modify.access);\r\n Type t = type();\r\n\r\n variableDeclarators(modify, t, scope, queue);\r\n }",
"public boolean putVar(String name){\n switch (currentScope()) {\n case GLOBAL:\n return putGlobVar(name);\n case LOCAL:\n return putLocalVar(name);\n case TEMPORARY:\n return putTemporaryVar(name);\n default:\n return false;\n }\n }",
"public void setScope(JexlEngine.Scope theScope) {\r\n this.scope = theScope;\r\n }",
"public void setVar(String name, double value){\n\t\tvar_map.put(name, value);\n\t}",
"public void setVars() {\n\t\tif (jEdit.getPlugin(\"console.ConsolePlugin\") != null) {\n\t\t\tconsole.ConsolePlugin.setSystemShellVariableValue(\"LUAJ\", getLuaJ());\n\t\t}\n\t}",
"public void assign(String varName, String varData) {\n vars.put(varName, varData);\n }",
"private boolean bindNewVariable(String name, Obj value) {\n if (name.equals(\"_\")) return true;\n \n // Bind the variable.\n return mScope.define(mIsMutable, name, value);\n }",
"private void storeValue(Object value)\n {\n if (getParent() instanceof ValueSupport)\n {\n ((ValueSupport) getParent()).setValue(value);\n }\n\n if (getVar() != null)\n {\n getContext().setVariable(getVar(), value);\n }\n }",
"public void setGlobalVariables(GlobalVariables globalVariables);",
"public static void setVariable(String name, double value) {\r\n\t\tvariables.put(name, value);\r\n\t}",
"public void setIdentifier(FactIdentifier param) {\r\n localIdentifierTracker = true;\r\n\r\n this.localIdentifier = param;\r\n\r\n\r\n }",
"Variable(String _var) {\n this._var = _var;\n }",
"public void setVariable(String name, Fraction value) {\n\n\t\tsymbolTable.put(name.trim(), value);\n\t}",
"void setNamespace(java.lang.String namespace);",
"public void setX(int a)\n {\n x = a;\n }",
"public Variable addNewPrefixedVar(String prefix, String rootName, Type t) {\n\t\treturn addNewPrefixedVar(prefix, rootName, t, Use.LOCAL);\n\t}",
"public void set_context(VariableSymbolTable context);",
"public void assign (String name, StatementParse node, Closure parent){\n Closure exist = find_var(name);\n Value newClosure;\n if (node.getName().equals(\"function\")){\n newClosure = new Closure(parent, node);\n } else {\n newClosure = new Environment(parent, node);\n }\n exist.getValues().put(name, newClosure);\n }",
"public void declare (String name, Value value){\n if (contains(name)){\n throw new VariableAlreadyDefined();\n }\n this.values.put(name, value);\n }",
"protected <T> void setSharedContextVariable(String name, Class<T> type, T value) {\r\n T typedValue = TypeCastUtility.castValue(value, type);\r\n m_sharedVariableMap.put(name, typedValue);\r\n }",
"public void setEntityValue(String name, NodeList value, boolean local) {\n ActiveEntity binding = getEntityBinding(name, local);\n if (binding != null) {\n binding.setValueNodes(this, value);\n } else {\n if (entities == null && (local || nameContext == null))\n\tentities = new BasicEntityTable();\n Tagset ts = this.getTopContext().getTagset();\n getEntities().setBinding(name, ts.createActiveEntity(name, value));\n } \n }",
"public void addVariable(String varName)\n\t{\n\t\tget(VARSTRATEGY).addVariable(this, varName);\n\t}",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setName(java.lang.String param) {\r\n localNameTracker = true;\r\n\r\n this.localName = param;\r\n\r\n\r\n }",
"private void assignWithReference(String valueName, Variable lastAppearanceOfVar) throws\r\n\t\t\tIllegalOperationException,IncompatibleTypeException,TypeNotSupportedException {\r\n\t\t//we'll check if the assignment is made with a reference to another variable:\r\n\t\tVariable reference = findVariable(valueName);\r\n\t\tif(reference==null){//if not, valueName variable was ever declared and it's type isn't legal.\r\n\t\t\tthrow new IllegalOperationException();\r\n\t\t}else if(reference.isGlobal()&&!reference.isInitialized()){//reference's an uninitialised global var\r\n\t\t\treference = uninitialisedGlobalVariables.get(valueName);//see if it was assigned in this scope\r\n\t\t\tif(reference==null){//if not:\r\n\t\t\t\tthrow new IllegalOperationException();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!reference.isInitialized()) {//if the referenced variable was never initialised:\r\n\t\t\tthrow new IllegalOperationException();\r\n\t\t}\r\n\t\tlastAppearanceOfVar.compatibleWith(reference);//val's type's illegal-> exception\r\n\t\tif(lastAppearanceOfVar.isGlobal()&&!lastAppearanceOfVar.isInitialized()&&!scopeType.equals//\r\n\t\t\t\t(\"global\")){//we're trying, in a scope other than globalScope, to assign a value to an\r\n\t\t\t // uninitialised global variable\r\n\t\t\tassignUninitialisedGlobalVar(lastAppearanceOfVar,valueName);//see methods's documentation.\r\n\t\t}else{\r\n\t\t\tlastAppearanceOfVar.initialize();\r\n\t\t}\r\n\t}",
"@Override\n public CodeFragment visitAssignmentStat(AlangParser.AssignmentStatContext ctx) {\n String name = ctx.ID().getText();\n if (!variableExists(name)) {\n this.addError(ctx, name, \"Assignment to undeclared variable\");\n return new CodeFragment(\"\");\n }\n\n Variable v = this.globals.get(name);\n v.setValue(ctx.global_expression().getText());\n v.setHasValue();\n\n return new CodeFragment(\"\");\n }",
"public void setName(java.lang.String param) {\n localNameTracker = true;\n\n this.localName = param;\n }",
"public void setName(java.lang.String param) {\n localNameTracker = true;\n\n this.localName = param;\n }",
"public void setName(java.lang.String param) {\n localNameTracker = true;\n\n this.localName = param;\n }",
"public LocalVariable defineLocalVariable(QName name, XQType type,\n Expression declaring)\n {\n \n LocalVariable decl = newLocal(name, type, declaring);\n lastLocal.addAfter(decl);\n lastLocal = decl;\n return decl;\n }",
"public void setParentLocalScope(LocalScope localScope) {\n\t\tthis.parentLocalScope = localScope;\n\t}",
"public void setLocalAttribute(String name, String value) {\n\t\tlocalAttributes.put(name, value);\n\t}",
"public void setName(java.lang.String param) {\r\n localNameTracker = param != null;\r\n\r\n this.localName = param;\r\n }",
"public void setString(java.lang.String param) {\r\n this.localString = param;\r\n }",
"public void assignValue (String variable, String x) {\n Map.Entry<String, Value> var = findVariable(variable);\n if (var != null) {\n if (var.getValue().getType() == Value.Type.STRING)\n var.getValue().setValue(x);\n else if (var.getValue().getType() == Value.Type.REAL && x.contains(\".\"))\n try {\n var.getValue().setValue(Double.parseDouble(x));\n } catch (Exception e) {\n throw new RuntimeException(\"Error Type mismatch\");\n }\n else if (var.getValue().getType() == Value.Type.INT)\n try {\n var.getValue().setValue(Integer.parseInt(x));\n } catch (Exception e) {\n throw new RuntimeException(\"Error Type mismatch\");\n }\n else if (var.getValue().getType() == Value.Type.BOOL) {\n try {\n var.getValue().setValue(Boolean.parseBoolean(x));\n } catch (Exception e) {\n throw new RuntimeException(\"Error Type mismatch\");\n }\n } else\n throw new RuntimeException(\"Error: Type mismatch\");\n } else {\n throw new RuntimeException(\"Error: Variable was not declared\");\n }\n }",
"public static void m13177a(C3598a aVar) {\n f10779a = aVar;\n }",
"void xsetNamespace(org.apache.xmlbeans.XmlNMTOKEN namespace);",
"public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public void mo38277a(C7998s sVar) {\n this.f27041d = sVar;\n }",
"public void setString(java.lang.String param) {\n this.localString = param;\n }",
"public void setIdentifierValue(java.lang.String param) {\r\n localIdentifierValueTracker = true;\r\n\r\n this.localIdentifierValue = param;\r\n\r\n\r\n }",
"public void setContext(String namespace, String key, String value) {\n if (context == null) {\n context = new HashMap<String, Map<String, String>>();\n }\n\n Map<String, String> namespaceMap = context.get(namespace);\n if (namespaceMap == null) {\n namespaceMap = new HashMap<String, String>();\n context.put(namespace, namespaceMap);\n }\n\n namespaceMap.put(key, value);\n }",
"public void setVar42(java.lang.Integer value) {\n this.var42 = value;\n }",
"public void testBoundToVariable()\n throws Exception\n {\n String varname =\"ITEM\";\n String id = \"occ_hermes1\";\n Occurrence occ = (Occurrence) tm.getObjectByID(id);\n // resolver shall resolve by id\n tag.setOccurrence(occ);\n\n // resolved topic shall be stored in\n // the variable named TOPIC\n tag.setVar(varname);\n \n // resolve\n setScriptForTagBody(tag);\n tag.doTag(null);\n \n // the item should be stored in the variable\n assertEquals(occ, ctx.getVariable(varname));\n \n // make a new tag, bound to the same variable \n // set resolvement to non existant topic\n tag = new UseOccurrenceTag();\n tag.setContext(ctx);\n tag.setVar(varname);\n tag.setId(\"nonexistantntifd\");\n\n // resolve\n tag.doTag(null);\n\n // the variable should be resetted\n assertNull(ctx.getVariable(varname));\n \n }"
] | [
"0.6413929",
"0.63565147",
"0.62455785",
"0.6164186",
"0.6164186",
"0.61492544",
"0.614487",
"0.61046755",
"0.6054664",
"0.5904529",
"0.58702534",
"0.57906455",
"0.57597595",
"0.57588506",
"0.57394767",
"0.5716729",
"0.5708473",
"0.5694575",
"0.5690377",
"0.56264853",
"0.5623733",
"0.5622335",
"0.5612059",
"0.55837053",
"0.5580914",
"0.556952",
"0.5565689",
"0.5554592",
"0.5539983",
"0.5507237",
"0.5495992",
"0.548726",
"0.546882",
"0.5464802",
"0.5464802",
"0.54593366",
"0.5443638",
"0.5430954",
"0.5425143",
"0.54185903",
"0.54185903",
"0.5409426",
"0.54085326",
"0.5408015",
"0.5405941",
"0.5389315",
"0.5385733",
"0.5380627",
"0.53716516",
"0.5368545",
"0.5367485",
"0.53506714",
"0.53352517",
"0.53218174",
"0.5319469",
"0.5315655",
"0.5314841",
"0.5283085",
"0.5276077",
"0.5274444",
"0.5242109",
"0.5224576",
"0.52208316",
"0.52134365",
"0.5206832",
"0.5206186",
"0.5185566",
"0.51785296",
"0.51732373",
"0.5172456",
"0.5170819",
"0.5164384",
"0.5163178",
"0.51619613",
"0.5159587",
"0.51472396",
"0.51466316",
"0.51466316",
"0.51466316",
"0.5144355",
"0.51411325",
"0.513605",
"0.5120614",
"0.5120614",
"0.5120614",
"0.5113018",
"0.5112759",
"0.5098297",
"0.5087554",
"0.50740266",
"0.50729334",
"0.50707376",
"0.5062636",
"0.50533116",
"0.50500625",
"0.5033482",
"0.501585",
"0.50151455",
"0.50097114",
"0.4999867"
] | 0.52075624 | 64 |
Returns the value of a variable in the local namespace. | public PyObject get(String name) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object getValue(String name) {\n Object value = localScope.get(name);\n if ( value!=null ) {\n return value;\n }\n // if not found\n BFlatGUI.debugPrint(0, \"undefined variable \"+name);\n return null;\n }",
"String getVariable();",
"public Variable getVariable(String name);",
"public String variable()\n\t{\n\t\treturn _var;\n\t}",
"Node getVariable();",
"public String getVariable();",
"public String getVar() {\n\t\treturn state.get(PropertyKeys.var);\n\t}",
"public String getVar () {\n\t\treturn var;\n\t}",
"java.lang.String getVarValue();",
"public String getVar()\n {\n return var;\n }",
"public String getVar() {\n\t\treturn _var;\n\t}",
"private Variable getVariable(String varName){\r\n\t\tif(contains(varName)){\r\n\t\t\treturn scopeVariables.get(varName);\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public double getVariable(String nam) {\r\n Double val=variables.get(nam);\r\n\r\n return (val==null ? 0 : val.doubleValue());\r\n }",
"public AbstractVariable getVariable () {\n try {\n RemoteStackVariable rsv = thread.getCurrentFrame ().getLocalVariable (\"this\"); // NOI18N\n return new ToolsVariable (\n (ToolsDebugger) getDebugger (),\n rsv.getName (),\n rsv.getValue (),\n rsv.getType ().toString ()\n );\n } catch (Exception e) {\n return null;\n }\n }",
"public Name getVariable() {\n return variable;\n }",
"public String getVariable()\n {\n return this.strVariable;\n }",
"public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }",
"public IExpressionValue getUserDefinedVariable(String key);",
"public java.lang.String getVarValue() {\n java.lang.Object ref = varValue_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n varValue_ = s;\n }\n return s;\n }\n }",
"public Integer getCurValue(Integer variable) {\n return variables.get(variable).getValue();\n }",
"public StructuredQName getVariableQName();",
"public Variable get(String rootName, int ssaNum) {\n\t\treturn var.get(rootName + \"_\" + ssaNum);\n\t}",
"public String getVariable() {\n return variable;\n }",
"public Integer lookupVariable(final String variableName) {\n if (isLocalVariable(variableName)) {\n return this.variables.get(variableName);\n } else {\n if (this.parent != null) {\n return this.parent.lookupVariable(variableName);\n } else {\n throw new InterpreterException(\"Variable \" + variableName + \" is not defined.\");\n }\n }\n }",
"public Double getVariable(Object var) {\n Double val = constraints.get(var);\n if (val == null)\n return 0.0;\n else\n return val;\n }",
"final SyntaxTreeNode lookupName(QName name) {\n // Is it a local var or param ?\n final SyntaxTreeNode result = _parser.lookupVariable(name);\n\tif (result != null)\n return(result);\n else\n\t return(_symbolTable.lookupName(name));\n }",
"public Integer value(State state) {\n return state.lookup(variableName);\n }",
"public StructuredQName getVariableQName() {\n return variableQName;\n }",
"public java.lang.String getVarValue() {\n java.lang.Object ref = varValue_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n varValue_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Variable getPrefixed(String methodName, String className, String unprefixedName, int ssaNum) {\n\t\t// Search for a global variable first\n\t\tVariable v = get(className + \"_\" + unprefixedName, ssaNum);\n\t\tif (v == null) // This is not a global variable but a local one\n\t\t\tv = get(methodName + \"_\" + unprefixedName, ssaNum);\t\t\n\t\treturn v;\n\t}",
"Variable resolve(String name) {\n Scope scope = this;\n while (scope != null) {\n if (scope.variables.containsKey(name)) {\n return scope.variables.get(name);\n }\n scope = scope.parent;\n }\n throw new IllegalArgumentException(\"Unresolved variable: \" + name);\n }",
"Var getVar();",
"public java.lang.String getVariableValue() {\r\n return variableValue;\r\n }",
"public IString getVariableIdentifier() {\n\treturn VARIABLE_IDENTIFIER.get(getNd(), this.address);\n }",
"public Double visitVariable(simpleCalcParser.VariableContext ctx){\n\t\tString varname = ctx.x.getText();\n\t\tDouble d = env.get(varname);\n\t\tif (d==null){\n\t\t\tSystem.err.println(\"Variable \" + varname + \" is not defined. \\n\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t \treturn d;\n \t}",
"public static String extractVariable(String s) {\n Matcher matcher = VARS_RE.matcher(s);\n return matcher.find() ? matcher.group(1) : null;\n }",
"public Variable getVariableContaining(int offset);",
"public java.lang.String getGlobalVariableValue() {\r\n return globalVariableValue;\r\n }",
"public ElementVariable getVariable() {\n\t\treturn variable;\n\t}",
"DirectVariableResolver getVariableResolver();",
"private LocalVariables locals(){\n\t\treturn frame.getLocals();\n\t}",
"public Variable getVariable() {\r\n\t\tObject ob = elementAt(0);\r\n\t\tif (size() == 1 && ob instanceof Variable) {\r\n\t\t\treturn (Variable) ob;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getLocal() {\n\t\treturn this.local;\n\t}",
"public Variable get(String rootName) {\n//\t\tSystem.out.println(\"symbolTable get \"+n);\n\t\tNameSSA ssa = name.get(rootName);\t\n//\t\tSystem.out.println(\"ssa \" + ssa);\n\t\tif (ssa != null) \n\t\t\treturn var.get(ssa.current());\n\t\telse\n\t\t\treturn null;\n\t}",
"protected Element myVar(){\n\t\treturn el(\"bpws:variable\", new Node[]{\n\t\t\t\tattr(\"messageType\", \"nswomo:receiveMessage\"),\n\t\t\t\tattr(\"name\", VARNAME)\n\t\t});\n\t}",
"private String getVariable(IInstallableUnit iu) {\n \t\tString v = (String) variables.get(iu);\n \t\tif (v == null) {\n \t\t\t//\t\t\tv = new String(\"x\" + (variables.size() + shift) + iu.toString()); //$NON-NLS-1$\n \t\t\tv = new String(\"x\" + (variables.size() + shift)); //$NON-NLS-1$\n \t\t\tvariables.put(iu, v);\n \t\t}\n \t\treturn v;\n \t}",
"String getVarName(String name);",
"public static String localVariable(String localVariableName, int occurrences) {\n\t\treturn \"\\t\\t\\t\\t<lvar name=\\\"\" + localVariableName +\"\\\" count=\\\"\" + occurrences +\"\\\"/>\" + \"\\n\";\n\t}",
"public Variable findVariable(String shortName) {\n if (shortName == null)\n return null;\n return memberHash.get(shortName);\n }",
"public Closure find_var(String name){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.contains(name)){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n throw new UndefinedVariable();\n }",
"String getVarName();",
"String getVarName();",
"String getVarName();",
"public static Variable variable( String name )\n {\n NullArgumentException.validateNotNull( \"Variable name\", name );\n return new Variable( name );\n }",
"public IVariable getInternalVariable(String name) {\n return fInternalVariables.get(name);\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 209,\n FQN=\"llvm::Module::getGlobalVariable\", NM=\"_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\")\n //</editor-fold>\n public GlobalVariable /*P*/ getGlobalVariable(StringRef Name) {\n return getGlobalVariable(Name, false);\n }",
"String getVarDeclare();",
"public double getVarValue(String variableName){\n\t\treturn var_map.get(variableName);\n\t}",
"Variable getTargetVariable();",
"public static final String getVar(final Str varNum) {\n try {\n return p().sysVars[varNum.ordinal()];\n } catch (final Exception t) {\n return \"\";\n }\n }",
"String getTargetVariablePart();",
"@Override\n public SymbolicName getSymbolicName() {\n return new SymbolicName(StandardNames.XSL_VARIABLE, variableQName);\n }",
"private Variable findVariable(String varToFind){\r\n\t\tScope curScope = this;\r\n\t\twhile (curScope!=null) {\r\n\t\t\tif(curScope.contains(varToFind)){\r\n\t\t\t\treturn curScope.getVariable(varToFind);\r\n\t\t\t}else{\r\n\t\t\t\tcurScope = curScope.parent;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getVariable(String _name) {\r\n\t\treturn getVariable(_name, \",\");\r\n\t}",
"private void updateLocalVar(Node node, String localVarName) {\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\tNodeList localVarNodeList = ((Element) node).getElementsByTagName(LOCAL_VARIABLE_NAME);\n\t\tif (localVarNodeList != null && localVarNodeList.getLength() > 0) {\n\t\t\tElement localVar = (Element) localVarNodeList.item(0);\n\t\t\tlocalVar.setAttribute(VALUE, localVarName);\n\t\t}\n\t}",
"Aliasing getVariable();",
"public String resolveVariableName(int slot, int l) {\n \t\treturn null;\n \t}",
"private String getVar(String s)\n {\n String var = null;\n Pattern pattern = Pattern.compile(\"[A-Z]+[a-z]*\");\n Matcher matcher = pattern.matcher(s);\n if(matcher.find())\n {\n var = matcher.group(0);\n }\n return var;\n }",
"private Value findLocalVDef(SootMethod method, Value value) {\n\t\tValue localV = null;\n\t\t//find the def of given value\n\t\tExceptionalUnitGraph ug = new ExceptionalUnitGraph(method.getActiveBody());\n\t\tfor(Iterator it = ug.iterator(); it.hasNext();){\n\n\t\t\tUnit u = (Unit)it.next();\n\t\t\tList<ValueBox> list = u.getDefBoxes();\n\t\t\tfor(ValueBox box : list){\n\t\t\t\tif(!box.getValue().equals(value)){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tList<ValueBox> useList = u.getUseBoxes();\n\t\t\t\tfor(ValueBox use: useList){\n\t\t\t\t\tValue val = use.getValue();\n\t\t\t\t\tif(val instanceof Local){\n\t\t\t\t\t\tDebug.printOb(\"local\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlocalV = val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn localV;\n\t}",
"public Object getTransientVariable(String name) {\n return transientVariables.get(name);\n }",
"public Variable getVariable(int i) {\r\n\t\treturn getVariables().get(i);\r\n\t}",
"public java.util.Collection<VariableInfo> getLocalVariables(){\n\t\tjava.util.Collection<VariableInfo> variables = new java.util.ArrayList<VariableInfo>();\n\n\t\treturn variables;\n\t}",
"protected String getVar(String variable) {\n\t\treturn myVarMap.get(variable);\n\t}",
"public Variable getPrefixed(String methodName, String className, String unprefixedName) {\n//\t\tSystem.out.println(\"symbolTable getPrefixed \" + methodName + \" \" + className + \" \" + n);\n\t\t\n\t\t// Search for a global variable first\n\t\tVariable v = get(className + \"_\" + unprefixedName);\n\t\tif (v == null) // This is not a global variable but a local one\n\t\t\tv = get(methodName + \"_\" + unprefixedName);\n\t\t\n\t\treturn v;\n\t}",
"String getSourceVariablePart();",
"Variable getSourceVariable();",
"public ValueDecl lookupValue(Identifier name) {\n Pair<Integer, ValueDecl> entry = valueScope.get(name);\n if (entry == null) return null;\n return entry.getRight();\n }",
"public java.lang.Integer getVar42() {\n return var42;\n }",
"private static boolean isLocalVariableForFunction(String scopedVarName, String function) {\n return scopedVarName.startsWith(function + \"::\");\n }",
"public java.lang.Integer getVar42() {\n return var42;\n }",
"private VariableDeclaration getVarDeclaration(Element statement) {\n VariableDeclaration variableDeclaration = statement.nearestAncestor(VariableDeclaration.class);\n if (variableDeclaration == null) {\n return getNearestElement(statement, VariableDeclaration.class);\n } else {\n return variableDeclaration;\n }\n }",
"private GradsVariable findVar(Variable v2) {\n List<GradsVariable> vars = gradsDDF.getVariables();\n String varName = v2.getFullName();\n for (GradsVariable var : vars) {\n if (var.getName().equals(varName)) {\n return var;\n }\n }\n\n return null; // can't happen?\n }",
"@Override String opStr() { return \"var\"; }",
"public java.lang.String getVarSrc() {\n java.lang.Object ref = varSrc_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n varSrc_ = s;\n }\n return s;\n }\n }",
"private String matchVariable(String key) {\n\t\treturn variables.get(key);\n\t}",
"public ASTVariableDeclaratorId getVarId() {\n return (ASTVariableDeclaratorId) getChild(1);\n }",
"String getVariableDefinition();",
"public LocalVariable latestLocalVariable()\n {\n return lastLocal;\n }",
"java.lang.String getVarSrc();",
"public int get_int() {\n return local_int;\n }",
"Variable createVariable();",
"Variable createVariable();",
"public String getVariableName() {\n\t\treturn variableName;\n\t}",
"public String getVariableName() {\n\t\treturn variableName;\n\t}",
"public IVariable getVariable(Integer id) {\n return null;\n }",
"public double getVariableValue(){\n\t\tObject valueKey = getEntries().keySet().stream().findFirst().orElseGet(()->{return 0d;});\n\t\tif (valueKey instanceof Double){\n\t\t\treturn (Double) valueKey;\n\t\t}\n\t\ttry {\n\t\t\tdouble value = Double.parseDouble(valueKey+\"\");\n\t\t\treturn value;\n\t\t}\n\t\tcatch (NumberFormatException ex){\n\t\t\treturn 0d;\n\t\t}\n\t}",
"VariableDeclarationWithInitCS getResultVariable();",
"public String getVariableName() {\n return _vname;\n }",
"private Integer varOffset( String defun, String varname ) {\n\treturn symbolTable.get( defun ).get( varname );\n }",
"public IDecisionVariable getNestedVariable(String slotName) {\r\n IDecisionVariable result = null;\r\n if (parent instanceof CompoundVariable) {\r\n result = ((CompoundVariable) parent).getNestedVariable(slotName);\r\n } else {\r\n Value tmp = Configuration.dereference(conf, value);\r\n if (tmp instanceof CompoundValue) { // not available for Container\r\n CompoundValue cValue = (CompoundValue) tmp;\r\n Compound type = (Compound) cValue.getType();\r\n DecisionVariableDeclaration slotDecl = type.getElement(slotName);\r\n if (null != slotDecl) {\r\n Value slotValue = cValue.getNestedValue(slotName);\r\n if (!Reference.TYPE.isAssignableFrom(slotDecl.getType())) { // don't dereference references\r\n slotValue = Configuration.dereference(conf, slotValue);\r\n }\r\n LocalDecisionVariable var = new LocalDecisionVariable(slotDecl, conf, null);\r\n if (null != slotValue) {\r\n try {\r\n var.setValue(slotValue, AssignmentState.ASSIGNED);\r\n } catch (ConfigurationException e) {\r\n }\r\n }\r\n result = var;\r\n }\r\n } \r\n }\r\n return result;\r\n }",
"@TableElement(index = 0, name = \"Variable\")\n public @NonNull String getVariable() {\n return variable;\n }"
] | [
"0.66311765",
"0.65774655",
"0.651751",
"0.6501784",
"0.6481067",
"0.6295432",
"0.62374973",
"0.62324464",
"0.62160593",
"0.61773455",
"0.6123486",
"0.60480374",
"0.59588796",
"0.5951477",
"0.59125376",
"0.58747894",
"0.58429235",
"0.58278203",
"0.5818993",
"0.58028895",
"0.578174",
"0.5734449",
"0.57096523",
"0.5703111",
"0.5697836",
"0.56830895",
"0.5683087",
"0.56791425",
"0.5677524",
"0.56538403",
"0.56537575",
"0.5649365",
"0.56302726",
"0.56223387",
"0.56198287",
"0.56034815",
"0.5591072",
"0.5558262",
"0.5546461",
"0.55363137",
"0.55292845",
"0.55219966",
"0.55144227",
"0.55102515",
"0.5501058",
"0.5500449",
"0.5494108",
"0.5485748",
"0.5467362",
"0.5463833",
"0.54585886",
"0.54585886",
"0.54585886",
"0.5430201",
"0.54284143",
"0.5420915",
"0.5420572",
"0.53991157",
"0.5368361",
"0.5368113",
"0.5360202",
"0.53490245",
"0.53317964",
"0.5331476",
"0.5328977",
"0.53230613",
"0.5317944",
"0.53161937",
"0.52912605",
"0.52904093",
"0.52884376",
"0.52693415",
"0.5243244",
"0.5239548",
"0.52265817",
"0.5217663",
"0.52026767",
"0.5170435",
"0.51614445",
"0.51552486",
"0.5147683",
"0.5140161",
"0.5139132",
"0.51196295",
"0.51188004",
"0.5113593",
"0.5103785",
"0.5099296",
"0.5089235",
"0.5088474",
"0.50861025",
"0.50861025",
"0.5081877",
"0.5081877",
"0.5079741",
"0.5077687",
"0.50691766",
"0.50336784",
"0.5021547",
"0.49984628",
"0.49957418"
] | 0.0 | -1 |
Returns the value of a variable in the local namespace. The value will be returned as an instance of the given Java class. interp.get("foo", Object.class) will return the most appropriate generic Java object. | public <T> T get(String name, Class<T> javaclass) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Variable getVariable(String name);",
"public Object getValue(String name) {\n Object value = localScope.get(name);\n if ( value!=null ) {\n return value;\n }\n // if not found\n BFlatGUI.debugPrint(0, \"undefined variable \"+name);\n return null;\n }",
"T get(GlobalVariableMap globalVariableMap);",
"String getVariable();",
"public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }",
"java.lang.String getVarValue();",
"public IExpressionValue getUserDefinedVariable(String key);",
"Var getVar();",
"public String getVariable();",
"Node getVariable();",
"public Variable getPrefixed(String methodName, String className, String unprefixedName, int ssaNum) {\n\t\t// Search for a global variable first\n\t\tVariable v = get(className + \"_\" + unprefixedName, ssaNum);\n\t\tif (v == null) // This is not a global variable but a local one\n\t\t\tv = get(methodName + \"_\" + unprefixedName, ssaNum);\t\t\n\t\treturn v;\n\t}",
"DirectVariableResolver getVariableResolver();",
"private Variable getVariable(String varName){\r\n\t\tif(contains(varName)){\r\n\t\t\treturn scopeVariables.get(varName);\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"protected <T> T getSharedContextVariable(String name, Class<T> type) {\r\n Object o = m_sharedVariableMap.get(name);\r\n return TypeCastUtility.castValue(o, type);\r\n }",
"String getVarName(String name);",
"public Type typeOf(Context ctxt, TypeEnv locals)\n throws Failure {\n TypeEnv te = ctxt.findVar(name, locals);\n loc = te.getLoc();\n return type = te.getType();\n }",
"@SuppressWarnings(\"unchecked\")\n public <T> T getValue(String expression, Map<String, String> namespaces, Class<T> cls) {\n Object result = evaluate(expression, namespaces, XPathConstants.STRING);\n return result == null ? null : (T)InjectionUtils.convertStringToPrimitive(result.toString(), cls);\n }",
"ISObject get(String key);",
"Object getValueFrom();",
"Type<?> get(String name);",
"Aliasing getVariable();",
"Variable resolve(String name) {\n Scope scope = this;\n while (scope != null) {\n if (scope.variables.containsKey(name)) {\n return scope.variables.get(name);\n }\n scope = scope.parent;\n }\n throw new IllegalArgumentException(\"Unresolved variable: \" + name);\n }",
"public E lookup(String var) throws IOException {\n E exp = get(var);\n if (exp != null) {\n return get(var);\n } else {\n throw new IOException(\"Exception ( VarID = \" + var + \") : Le VarId n'a pas été défini\");\n }\n }",
"String getVarName();",
"String getVarName();",
"String getVarName();",
"public Variable getVariableContaining(int offset);",
"public Object lookup(String key){\n ListNode<String,Object> temp = getNode(key);\n if(temp != null)\n return temp.value;\n else\n return null;\n }",
"public Variable getPrefixed(String methodName, String className, String unprefixedName) {\n//\t\tSystem.out.println(\"symbolTable getPrefixed \" + methodName + \" \" + className + \" \" + n);\n\t\t\n\t\t// Search for a global variable first\n\t\tVariable v = get(className + \"_\" + unprefixedName);\n\t\tif (v == null) // This is not a global variable but a local one\n\t\t\tv = get(methodName + \"_\" + unprefixedName);\n\t\t\n\t\treturn v;\n\t}",
"public IRubyObject getConstantAt(String name) {\n IRubyObject value = fetchConstant(name);\n \n return value == UNDEF ? resolveUndefConstant(getRuntime(), name) : value;\n }",
"public static Variable variable( String name )\n {\n NullArgumentException.validateNotNull( \"Variable name\", name );\n return new Variable( name );\n }",
"Object getValueFromLocalCache(Object key);",
"V get(Object key);",
"StoragePrimitive get(String key);",
"public AbstractVariable getVariable () {\n try {\n RemoteStackVariable rsv = thread.getCurrentFrame ().getLocalVariable (\"this\"); // NOI18N\n return new ToolsVariable (\n (ToolsDebugger) getDebugger (),\n rsv.getName (),\n rsv.getValue (),\n rsv.getType ().toString ()\n );\n } catch (Exception e) {\n return null;\n }\n }",
"Object get(String key);",
"Object get(String key);",
"public double getVariable(String nam) {\r\n Double val=variables.get(nam);\r\n\r\n return (val==null ? 0 : val.doubleValue());\r\n }",
"public Variable get(String rootName, int ssaNum) {\n\t\treturn var.get(rootName + \"_\" + ssaNum);\n\t}",
"@Override\n public T get(ResolveContext context) {\n T dv = defaultValue == null ? null : defaultValue.resolve(context);\n\n String paramName = name.toString();\n if (context.userParameters != null && context.userParameters.containsKey(paramName)) {\n Object value = context.userParameters.get(paramName);\n if (dv == null) {\n //noinspection unchecked\n return (T) value;\n }\n if (dv instanceof Boolean && value instanceof String) {\n //noinspection unchecked\n return (T) (Object) \"true\".equals(value);\n }\n //noinspection unchecked\n return (T) DefaultGroovyMethods.asType(value, dv.getClass());\n } else if (dv != null) {\n return dv;\n } else if (required) {\n throw new MissingVariableException(name);\n } else {\n return null;\n }\n }",
"Object get(Node node);",
"Object getProperty(String name);",
"Object get(Object key);",
"public void testSmartVarResolver()\r\n {\n System.setProperty( \"A\", \"Setski\" );\r\n assertEquals( 1,\r\n SmartVarResolver.INSTANCE.resolveVar( VarContext.of( \"A\", 1 ), \"A\" ) );\r\n\r\n //verify we can get System Properties\r\n System.setProperty( \"A\", \"Setski\" );\r\n assertEquals( \"Setski\",\r\n SmartVarResolver.INSTANCE.resolveVar( VarContext.of(), \"A\" ) );\r\n\r\n //we can get values that are set in expressions\r\n Template d = BindML.compile( \"{+A+}\" );\r\n assertEquals( \"Setski\", Author.toString( d ) ); //verify I can resolve a variable that is set as expression\r\n\r\n d = BindML.compile( \"{+A+}\" );\r\n TreeSet<Integer> ts = new TreeSet<Integer>();\r\n ts.add( 1 );\r\n ts.add( 2 );\r\n ts.add( 3 );\r\n ts.add( 4 );\r\n assertEquals( \"1, 2, 3, 4\", Author.toString( d, \"A\", ts ) );\r\n\r\n /*\r\n //I need a Better way of printing Maps \r\n // right now = {A=1, B=2, C=3}\r\n // should be A=1; B=2; C=3;\r\n Map<String, Integer> m = new HashMap<String, Integer>();\r\n m.put( \"A\", 1 );\r\n m.put( \"B\", 2 );\r\n m.put( \"C\", 3 );\r\n System.out.println( Author.toString( d, \"A\", m ) );\r\n\r\n d = BindML.compile( \"{+A+}\" );\r\n assertEquals( \"1, 2, 3, 4\", Author.toString( d ) ); //verify I can resolve a variable that is set as expression\r\n*/\r\n\r\n }",
"public VarType getVar(MappingType mapping, String docId) {\n\t\tEList<RepresentsType> repList = mapping.getRepresents();\n\t\tfor(RepresentsType rep : repList) {\n\t\t\ttry {\n\t\t\t\tfor (DocType doc : rep.getDocument()) {\n\t\t\t\t\tif(doc.getId().equals(docId)){\n\t\t\t\t\t\treturn rep.getVariable();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(Exception e) {\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public interface Binding {\n\n /**\n * Get the declared type of the variable\n * @return the declared type\n */\n\n public SequenceType getRequiredType();\n\n /**\n * Evaluate the variable\n * @param context the XPath dynamic evaluation context\n * @return the result of evaluating the variable\n */\n\n public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException;\n\n /**\n * Indicate whether the binding is local or global. A global binding is one that has a fixed\n * value for the life of a query or transformation; any other binding is local.\n * @return true if the binding is global\n */\n\n public boolean isGlobal();\n\n /**\n * If this is a local variable held on the local stack frame, return the corresponding slot number.\n * In other cases, return -1.\n * @return the slot number on the local stack frame\n */\n\n public int getLocalSlotNumber();\n\n /**\n * Get the name of the variable\n * @return the name of the variable, as a structured QName\n */\n\n public StructuredQName getVariableQName();\n\n}",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"public static Object get(Class clazz, String variableName) throws ReflectionException {\n\t\treturn get(clazz, null, variableName);\n\t}",
"@Override\n\tpublic Code apply(Env env, ParseTree t) {\n\t\treturn new VarNameCode(env.s(t));\n\t}",
"private String getVariable(IInstallableUnit iu) {\n \t\tString v = (String) variables.get(iu);\n \t\tif (v == null) {\n \t\t\t//\t\t\tv = new String(\"x\" + (variables.size() + shift) + iu.toString()); //$NON-NLS-1$\n \t\t\tv = new String(\"x\" + (variables.size() + shift)); //$NON-NLS-1$\n \t\t\tvariables.put(iu, v);\n \t\t}\n \t\treturn v;\n \t}",
"protected TopicMapObject identifyByVariable(JellyContext ctx)\n throws JellyTagException {\n\n // name of variable supplied?\n if (variable == null)\n return null;\n\n Object o = ctx.getVariable(variable);\n String identifier = \"Variable \" + variable;\n return getReference(o, identifier);\n\n }",
"final SyntaxTreeNode lookupName(QName name) {\n // Is it a local var or param ?\n final SyntaxTreeNode result = _parser.lookupVariable(name);\n\tif (result != null)\n return(result);\n else\n\t return(_symbolTable.lookupName(name));\n }",
"public static Object getLabelValue(String Label) {\n Object labels = new Items();\n\n try {\n Field field = labels.getClass().getField(Label);\n return field.get(labels);\n } catch (Exception e) {\n return \"PARSE_LABEL_ERROR\";\n }\n }",
"public VarType getVar(MappingType mapping, DocType doc) {\n\t\treturn getVar(mapping, doc.getId());\n\t}",
"Variable createVariable();",
"Variable createVariable();",
"public Object get(String key);",
"public VarTypeNative getFieldVarType();",
"public interface Variable<T> {\n /*\n Get type of the object\n */\n Class<T> getType();\n\n /*\n Returns the data based of what it got previously\n */\n T get(GlobalVariableMap globalVariableMap);\n\n default T getWithTiming(GlobalVariableMap globalVariableMap) {\n long start = System.currentTimeMillis();\n T t = get(globalVariableMap);\n System.out.println(\"Variable GET done took (\" + (System.currentTimeMillis() - start) + \"ms) value: \" + t);\n return t;\n }\n}",
"@SuppressWarnings(\"unchecked\")\n public <T> Variable<T> get(U utility) {\n return cache.computeIfAbsent(utility, u -> u.initTypeLikeVariable(name));\n }",
"public V lookup(K key);",
"public Variable get(String rootName) {\n//\t\tSystem.out.println(\"symbolTable get \"+n);\n\t\tNameSSA ssa = name.get(rootName);\t\n//\t\tSystem.out.println(\"ssa \" + ssa);\n\t\tif (ssa != null) \n\t\t\treturn var.get(ssa.current());\n\t\telse\n\t\t\treturn null;\n\t}",
"public IVariable getVariable(Integer id) {\n return null;\n }",
"public Variable getVariable() {\r\n\t\tObject ob = elementAt(0);\r\n\t\tif (size() == 1 && ob instanceof Variable) {\r\n\t\t\treturn (Variable) ob;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public V get(String key);",
"protected Object localLookup( final Name name )\n throws NamingException\n {\n final Object value = doLocalLookup( name );\n\n // Call getObjectInstance for using any object factories\n try\n {\n final Name atom = name.getPrefix( 1 );\n return m_namespace.getObjectInstance( value, atom, this, getRawEnvironment() );\n }\n catch ( final Exception e )\n {\n final NamingException ne = new NamingException( \"getObjectInstance failed\" );\n ne.setRootCause( e );\n throw ne;\n }\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 209,\n FQN=\"llvm::Module::getGlobalVariable\", NM=\"_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\")\n //</editor-fold>\n public GlobalVariable /*P*/ getGlobalVariable(StringRef Name) {\n return getGlobalVariable(Name, false);\n }",
"public String getVar()\n {\n return var;\n }",
"V get(K k) throws UndefinedException;",
"public Variable findVariable(String shortName) {\n if (shortName == null)\n return null;\n return memberHash.get(shortName);\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 }",
"<T> T get(String variable, int... indexes) throws ClassCastException, ArrayIndexOutOfBoundsException;",
"public Object get(String namespace, String key) {\n \t\tthis.init();\n \t\treturn this._get(this.getKey(namespace, key));\n \t}",
"default Object resolve(String name) {\n return resolve(name, Object.class);\n }",
"Symbol resolve(String name);",
"public IntegerVariable getIntegerVariable(String name) {\n return integerVariableMap.get(name);\n }",
"public Object getGlobal(String name) {\n return globals.get(name);\n }",
"public Object getParamValue(String label);",
"public Map<String, Object> getVariables();",
"public Object get(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null)\n\t\t\treturn null;\n\t\treturn value.value;\n\t}",
"Value get(ExecutionContext context, String propertyName);",
"Object getProperty(String key);",
"Variable getTargetVariable();",
"public Object resolve(String var) throws ErrorException { \n\t\treturn null;\n\t}",
"public static IRubyObject getObj(Object holder, Object index) {\n\n\t\t// rubyobject and string name?\n\t\tif (holder instanceof RubyObject && index instanceof String) {\n\t\t\t// get vars\n\t\t\tRubyObject rb = (RubyObject) holder;\n\t\t\tString var = (String) index;\n\n\t\t\treturn (IRubyObject) rb.getInternalVariable(var);\n\n\t\t}\n\n\t\t// arraylist and index id?\n\t\tif (holder instanceof ArrayList && index instanceof Integer) {\n\t\t\t// get vars\n\t\t\tArrayList<IRubyObject> ary = (ArrayList<IRubyObject>) holder;\n\t\t\tint id = (Integer) index;\n\n\t\t\treturn ary.get(id);\n\t\t}\n\n\t\t// nothing?\n\t\tYEx.info(\"Can not get obj for Ruby for holder \" + holder.getClass() + \" and index \" + index.getClass(),\n\t\t\t\tnew IllegalArgumentException(\"holder \" + holder.getClass() + \" and index \" + index.getClass()));\n\n\t\treturn null;\n\t}",
"ClassVariable getClassVariable();",
"String getValue(String type, String key);",
"@Override\n public Object evaluate(Environment env) {\n if (env.contains(name.getValue())) return new VariableExistsError(name);\n var value = expression.evaluate(env);\n env.put(name.getValue(), value);\n env.setCurrent(value);\n return value;\n }",
"public Double visitVariable(simpleCalcParser.VariableContext ctx){\n\t\tString varname = ctx.x.getText();\n\t\tDouble d = env.get(varname);\n\t\tif (d==null){\n\t\t\tSystem.err.println(\"Variable \" + varname + \" is not defined. \\n\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t \treturn d;\n \t}",
"VarReference createVarReference();",
"public Double getVariable(Object var) {\n Double val = constraints.get(var);\n if (val == null)\n return 0.0;\n else\n return val;\n }",
"public Integer lookupVariable(final String variableName) {\n if (isLocalVariable(variableName)) {\n return this.variables.get(variableName);\n } else {\n if (this.parent != null) {\n return this.parent.lookupVariable(variableName);\n } else {\n throw new InterpreterException(\"Variable \" + variableName + \" is not defined.\");\n }\n }\n }",
"public Variable getVariable(int i) {\r\n\t\treturn getVariables().get(i);\r\n\t}",
"public Object getTransientVariable(String name) {\n return transientVariables.get(name);\n }",
"String getVal();"
] | [
"0.63055956",
"0.59261024",
"0.59242654",
"0.58225566",
"0.581872",
"0.56904024",
"0.552103",
"0.5490422",
"0.54818773",
"0.5449335",
"0.534754",
"0.525976",
"0.52105916",
"0.51877195",
"0.51372176",
"0.51287585",
"0.51160955",
"0.5107954",
"0.5071696",
"0.50548625",
"0.504233",
"0.4991518",
"0.4977106",
"0.49743402",
"0.49743402",
"0.49743402",
"0.4969817",
"0.49678335",
"0.49675912",
"0.4961377",
"0.4949181",
"0.49113876",
"0.49084413",
"0.485379",
"0.4841941",
"0.48366344",
"0.48366344",
"0.48340422",
"0.483232",
"0.48284623",
"0.48181593",
"0.48098126",
"0.47934094",
"0.4792456",
"0.47706938",
"0.47662157",
"0.47586656",
"0.47586656",
"0.47586656",
"0.47586656",
"0.47586656",
"0.47586656",
"0.47586656",
"0.4752143",
"0.47498044",
"0.47475603",
"0.47394875",
"0.47375607",
"0.4735737",
"0.47274467",
"0.47271597",
"0.47271597",
"0.4725864",
"0.47171226",
"0.47122982",
"0.46931475",
"0.46908703",
"0.4686117",
"0.46812782",
"0.467292",
"0.46691212",
"0.46686304",
"0.46685392",
"0.4654836",
"0.46484366",
"0.4646302",
"0.4642036",
"0.46353105",
"0.46280214",
"0.46264657",
"0.46236616",
"0.4621436",
"0.46198714",
"0.4608619",
"0.4604762",
"0.46040463",
"0.46026942",
"0.4601452",
"0.4597211",
"0.4596431",
"0.45873386",
"0.45852113",
"0.45758903",
"0.45683563",
"0.4562956",
"0.45580497",
"0.4557225",
"0.45533434",
"0.45523018",
"0.45478946",
"0.4545507"
] | 0.0 | -1 |
This add function will add the values in a tree by taking its sequence and then taking each value and comparing it with the edge assigned to the root node. | public void add(String data, String sequence){
Node temp = this.root;
int i = 0;
for(i=0;i<sequence.length()-1;i++){
if(sequence.charAt(i)=='0'){
if(temp.left == null){
temp.left = new Node();
temp = temp.left;
}
else{
temp = (Node) temp.left;
}
}
else
if(sequence.charAt(i)=='1'){
if(temp.right == null){
temp.right = new Node();
temp = temp.right;
}
else{
temp = (Node) temp.right;
}
}
}
if(sequence.charAt(i)=='0'){
temp.left = new Node(data);
}
else{
temp.right = new Node(data);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void add(E val){\n if(mData.compareTo(val) > 0){\n if(mLeft == null){\n mLeft = new BSTNode(val);\n mLeft.mParent = this;\n }//End if null\n else if(mRight == null){\n mRight = new BSTNode(val);\n mRight.mParent = this;\n }//End Else\n }//End if\n else{\n mLeft.add(val);\n mLeft.mParent = this;\n }//End Else\n }",
"public Tree<T> add(Tree<T> tree) {\n checkForNull(tree);\n\n if (childrenValueSet.contains(tree.value)) {\n return null;\n }\n\n if (tree.parent != null) {\n tree.remove();\n }\n\n tree.parent = this;\n children.add(tree);\n childrenValueSet.add(tree.value);\n incModificationCount();\n\n return tree;\n }",
"public boolean add(T value) {\n NodePair<T> spl = split(root, value);\n\n if (spl.second != null && getLeft(spl.second).value.compareTo(value) == 0) {\n root = merge(spl.first, spl.second);\n return false;\n }\n\n root = merge(spl.first, merge(makeNode(value), spl.second));\n return true;\n }",
"private Node add(Node root, Integer value) {\n\t\tif(root==null)\n\t\t\troot=new Node(value);\n\t\telse if(value<root.value)\n\t\t\troot.left=add(root.left, value);\n\t\telse if(value>root.value)\n\t\t\troot.right=add(root.right,value);\n\t\telse\n\t\t\tthrow new RuleViolationException();\n\t\treturn root;\n\t}",
"@Override\n\tpublic void add(Integer value) {\n\t\troot=add(root,value);\n\t\tcount++;\n\t}",
"public void add(int value){\n \n // Case 1: The tree is empty - allocate the root\n if(root==null){\n root = new BSTNode(value);\n }\n \n // Case 2: The tree is not empty \n // find the right location to insert value\n else{\n addTo(root, value);\n } \n count++; // update the number of nodes\n }",
"public void add(int value, String name){\n \n Node newNode = new Node(value, name); //Intialize new node \n \n if(root == null){ //If the root is null \n root = newNode; //Set newNode to the root \n }\n else{ \n Node myNode = root; //Create a second new node\n Node parent; //Crete a parent Node \n\n while (true) { //While true....\n \n parent = myNode;//Set parent node to myNode\n \n if (value < myNode.value) { //If the value is less than my node \n \n myNode = myNode.left; //Set myNode to left \n \n if (myNode == null) { //If the value of myNode is null \n \n parent.left = newNode; //Set the left parent node to newNode\n return; \n \n }\n }else {\n \n myNode = myNode.right; //Set myNode to the right Node\n \n if (myNode == null) {\n \n parent.right = newNode; //Set the right node to the newNode\n return;\n \n }\n\n }\n\n }\n \n }\n \n \n }",
"private boolean add(E item, BinaryTree<E> tree)\r\n\t{\r\n\t\tif (item.compareTo(tree.value()) > 0 && tree.right() == null)\r\n\t\t{\r\n\t\t\ttree.setRight(new BinaryTree<E>(item));\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (item.compareTo(tree.value()) < 0 && tree.left() == null)\r\n\t\t{\r\n\t\t\ttree.setLeft(new BinaryTree<E>(item));\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (item.compareTo(tree.value()) == 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (item.compareTo(tree.value()) > 0)\r\n\t\t{\r\n\t\t\treturn add(item, tree.right());\r\n\t\t}\r\n\r\n\t\tif (item.compareTo(tree.value()) < 0)\r\n\t\t{\r\n\t\t\treturn add(item, tree.left());\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public void add(int value){\n if (value < this.value){\n if (this.left != null)\n left.add(value);\n else left = new MyBinaryTreeNode(value);\n }\n else if (value > this.value){\n if (this.right != null)\n right.add(value);\n else right = new MyBinaryTreeNode(value);\n }\n }",
"public boolean add(T value){\n int cmp = this.value.compareTo(value);\n boolean result;\n if(cmp == 0){\n result = false;\n } else if(cmp < 0){\n if(this.right != null){\n result = this.right.add(value);\n } else {\n result = addRight(value);\n }\n } else {\n if(this.left != null){\n result = this.left.add(value);\n } else {\n result = addLeft(value);\n }\n }\n return result;\n }",
"public void add(T value) {\n final Node node = new Node(value);\n if (root != null) {\n root.add(node);\n } else {\n root = node;\n }\n }",
"private IntTreeNode add(IntTreeNode root, int value) {\n if (root == null) {\n root = new IntTreeNode(value);\n } else if (value <= root.data) {\n root.left = add(root.left, value);\n } else {\n root.right = add(root.right, value);\n\t}\n return root;\n }",
"public boolean add(Object value) throws WrongInputException\n {\n \tif(! (value instanceof Integer)){\n \t\tthrow new WrongInputException();\n \t}\n Queue queue = new Queue();\n queue.enqueue(this);\n while( ! queue.isEmpty() )\n {\n BinaryTree tree = (BinaryTree)queue.dequeue();\n\n //if the current position is null, then we know we can place a\n //value here.\n //place the value in that position in the tree, and create new \n //BinaryTrees for its children, which will both initially be null.\n if (tree.isEmpty())\n {\n tree.data = value;\n tree.left = new BinaryTree();\n tree.right = new BinaryTree();\n return true;\n }\n //otherwise, if the position is not null (that is, we can't place\n //it at the current position), then we add the left and right children\n //to the queue (if we can) and go back to the beginning of the loop.\n queue.enqueue(tree.left);\n queue.enqueue(tree.right);\n }\n return false; //this statement should never be executed.\n }",
"@Override\n public boolean add(E value) {\n final AVLTreeNode<E> insert = insert(value);\n if(insert != null && insert != tree.getHead()){\n tree.setHead(insert);\n }\n return insert != null;\n }",
"public void add(int value) {\n\t\taddRecursive(root, value);\n\t\t// System.out.print(\"root\" + String.valueOf(root.value));\n\t}",
"private void recAdd(String data, Node root) {\r\n\t\tif (root == null) {\r\n\t\t\tSystem.out.println(\"OOPS, this shouldn't happen!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\r\n\t\tif (data.compareTo(root.getData()) < 0) {\r\n/////////////////////////////////\r\n/// go to left\t\t\t ///\r\n/////////////////////////////////\r\n\t\t\tif (root.getlChild() == null) {\r\n\t\t\t\t// put the data on the left child\r\n\t\t\t\tNode ng = new Node();\r\n\t\t\t\tng.setData(data);\r\n\t\t\t\tng.setCount();\r\n\t\t\t\troot.setlChild(ng);\r\n\t\t\t\tcount++;\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\trecAdd(data, root.getlChild());\r\n\t\t\t}\r\n\t\t} else {\r\n/////////////////////////////////\r\n/// go to right\t\t\t ///\r\n/////////////////////////////////\r\n\t\t\tif (root.getrChild() == null) {\r\n\t\t\t\t// put the data on the left child\r\n\t\t\t\tNode ng = new Node();\r\n\t\t\t\tng.setData(data);\r\n\t\t\t\tng.setCount();\r\n\t\t\t\troot.setrChild(ng);\r\n\t\t\t\tcount++;\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\trecAdd(data, root.getrChild());\r\n\t\t\t}\r\n\r\n\t\t\t// System.out.println(\"Count: \" + count);\r\n\t\t}\r\n\r\n\t}",
"public Tree<T> add(T value) {\n checkForNull(value);\n\n if (childrenValueSet.contains(value)) {\n return null;\n }\n\n Tree<T> tree = new Tree<>(value, this);\n incModificationCount();\n\n return tree;\n }",
"public static Node addNode(Node root, int value) {\n Node newNode = new Node(value);\n // Check if root is null make the new node root\n if (root == null) {\n // return New Node\n return newNode;\n }\n // If root is not null check value against current Node's data to determine which branch to travel\n Node trav = root;\n while (true) {\n\n // If lower\n if (value < trav.data) {\n if (trav.left != null) {\n trav = trav.left;\n continue;\n } else {\n trav.left = newNode;\n break;\n }\n }\n // If there's a current node then travel.\n // repeat line 25\n // else add Node to Current.left = New Node\n // If greater\n if (value > trav.data) {\n if (trav.right != null) {\n trav = trav.right;\n continue;\n } else {\n trav.right = newNode;\n break;\n }\n }\n // If there's a current node then travel.\n // repeat line 25\n // else add Node to Current.right= New Node\n // return root\n }\n return root;\n }",
"public void add(int value) {\n overallRoot = add(overallRoot, value);\n }",
"public boolean add(T value) {\n\t\tNode<T> last = null;\n\t\tfor (Node<T> current = start; current != null; current = current.next) {\n\t\t\tlast = current;\n\t\t}\n\t\tif (last != null) {\n\t\t\tlast.next = new Node<>(value);\n\t\t} else {\n\t\t\tstart = new Node<>(value);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n\tpublic void visit(AdditionNode node) {\n\t\t/**\n\t\t * verificam intai sintaxa: in cazde eroare nu mergem mai departe in\n\t\t * evaluare\n\t\t */\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * verificare pentru assert failed\n\t\t */\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam fiii nodului\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\t\tInteger i, j;\n\t\t/**\n\t\t * Salvam valorile calculate in urma evaluarii copiilor in 2 variabile\n\t\t * Integer. Daca unul dintre fii este de tip Variable ii luam valoarea\n\t\t * din HashMap-ul din Evaluator. Altfel, valoarea e reprezentata de\n\t\t * numele nodului.\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\t/**\n\t\t * realizam suna celor doua valori si updatam numele nodului curent cu\n\t\t * valoarea calculata\n\t\t */\n\t\tInteger n = i + j;\n\n\t\tnode.setName(n.toString());\n\n\t}",
"private Node<E> add(E item, Node<E> root){\n\t\t/** found a place to store the item */\n\t\tif(root == null){\n\t\t\taddReturn = true;\n\t\t\troot = new Node<E>(item);\n\t\t\treturn root;\n\t\t}\n\t\t\n\t\tint comparison = item.compareTo(root.item);\n\t\t\n\t\t/** item to add already exists in the tree */\n\t\tif(comparison == 0){\n\t\t\taddReturn = false;\n\t\t\treturn root;\n\t\t}\n\t\t/** item is less -> add to the left of the root */\n\t\telse if(comparison < 0){\n\t\t\troot.left = add(item, root.left);\n\t\t\treturn root;\n\t\t}\n\t\t/** item is greater -> add to the right of the root */\n\t\telse{\n\t\t\troot.right = add(item, root.right);\n\t\t\treturn root;\n\t\t}\n\t}",
"private Node<K, D> add(K key, D data, Node<K, D> root) {\n if (root == null)\n return new Node<K, D>(key, data);\n int c = key.compareTo(root.key);\n if (c <= 0) {\n root.left = add(key, data, root.left);\n return root;\n } else { // c > 0\n root.right = add(key, data, root.right);\n return root;\n }\n }",
"private Node<E> add(Node<E> localRoot, E item) {\n if (localRoot == null) {\n addReturn = true;\n return new Node<E>(item);\n } else if (item.compareTo(localRoot.data) == 0) {\n addReturn = false;\n return localRoot;\n } else if (item.compareTo(localRoot.data) < 0) {\n localRoot.left = add(localRoot.left, item);\n return localRoot;\n } else {\n localRoot.right = add(localRoot.right, item);\n return localRoot;\n }\n }",
"private static void recAdd(Node l, String value) {\n\t\tif (l.next == null) {\n\t\t\tl.next = new Node(value);\n\t\t\treturn;\n\t\t} else {\n\t\t\t// Base 2, the value behide the leader's value bigger than the value we want to add\n\t\t\tif (l.next.value.compareTo(value) > 0) {\n\t\t\t\tNode temp = new Node(value, l.next);\n\t\t\t\tl.next = temp;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Base 2, the value already in the list\n\t\t\telse if (l.next.value.equals(value)) {\n\t\t\t\treturn;\n\t\t\t} else\n\t\t\t\trecAdd(l.next, value);\n\t\t\t\treturn;\n\t\t}\n\n\t}",
"private boolean addElement(E value) {\n if (value.equals(this.value)) {\n return false;\n }\n\n if (((Comparable)value).compareTo(this.value) < 0) {\n if (this.leftChild != null) {\n if (!this.leftChild.addElement(value)) {\n return false;\n }\n this.leftChild = this.leftChild.balance();\n } else {\n this.leftChild = new Node(value, null, null, 1);\n }\n } else {\n if (this.rightChild != null) {\n if (!this.rightChild.addElement(value)) {\n return false;\n }\n this.rightChild = this.rightChild.balance();\n } else {\n this.rightChild = new Node(value, null, null, 1);\n }\n }\n return true;\n }",
"@Override\n\tpublic boolean add(E e) {\n\t\tStack<Node> stack = new Stack<Node>();\n\t\tStack<Node> stackForParent = new Stack<Node>();\n\t\t\n\t\t\n\t\tNode tempRoot = root;\n\t\tif(root == null) {\n\t\t\tsize += 1;\n\t\t\troot = new Node(e);\n\t\t\troot.height = max(heightOfNode(root.left) , heightOfNode(root.right)) + 1;\n\t\t} else {\n\n\t\t\tNode newNode = new Node(e);\n\n\t\t\tNode y = null;\n\n\t\t\twhile(tempRoot != null){\n\t\t\t\ty = tempRoot;\n\t\t\t\tif(e.compareTo(tempRoot.value) < 0){\n\t\t\t\t\tstack.push(tempRoot);\n\t\t\t\t\tstackForParent.push(tempRoot);\n\t\t\t\t\ttempRoot = tempRoot.left;\n\n\t\t\t\t} else {\n\t\t\t\t\tstack.push(tempRoot);\n\t\t\t\t\tstackForParent.push(tempRoot);\n\t\t\t\t\ttempRoot = tempRoot.right;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(y == null){\n\t\t\t\ty = newNode;\n\t\t\t\tsize += 1;\n\t\t\t\ty.balanceFactor = 0;\n\t\t\t} else if(e.compareTo(y.value) < 0){\n\t\t\t\ty.left = newNode;\n\t\t\t\ty.left.balanceFactor = 0;\n\t\t\t\tsize += 1;\n\t\t\t} else if(e.compareTo(y.value) == 0) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\ty.right = newNode;\n\t\t\t\ty.right.balanceFactor = 0;\n\t\t\t\tsize += 1;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tNode parent = null;\n\t\t\tNode walkBackNode;\n\t\t\tint lHeight,rHeight;\n\t\t\tif(!stackForParent.empty()) {\n\t\t\t\tstackForParent.pop();\n\t\t\t}\n\t\t\t\n//\t\t\tSystem.out.println(stack.pop().value);\n\t\t\twhile(!stack.empty()) {\n\t\t\t\twalkBackNode = stack.pop();\n//\t\t\t\twalkBackNode.height = walkBackNode.height + 1;\n\t\t\t\tif(!stackForParent.empty()) {\n\t\t\t\t\tparent = stackForParent.pop();\n\t\t\t\t}\n\t\t\t\tif(walkBackNode.left == null) {\n\t\t\t\t\tlHeight = -1;\n\t\t\t\t} else {\n\t\t\t\t\tlHeight = walkBackNode.left.height ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(walkBackNode.right == null) {\n\t\t\t\t\trHeight = -1;\n\t\t\t\t} else {\n\t\t\t\t\trHeight = walkBackNode.right.height;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twalkBackNode.balanceFactor = lHeight - rHeight;\n\t\t\t\t\n\t\t\t\twalkBackNode.height = 1 + max(lHeight,rHeight);\n\t\t\t\t\n\t\t\t\tif((walkBackNode.balanceFactor < -1) || walkBackNode.balanceFactor > 1) {\n\t\t\t\t\t// tree is violating the rules of AVL tree\n\t\t\t\t\tif(walkBackNode.balanceFactor > 1 && e.compareTo(walkBackNode.left.value) < 0) {\n\t\t\t\t\t\tif(walkBackNode.value == this.root.value) {\n\t\t\t\t\t\t\tthis.root = rrRotation(walkBackNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparent.right = rrRotation(walkBackNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif(walkBackNode.balanceFactor < -1 && e.compareTo(walkBackNode.right.value) > 0) {\n\t\t\t\t\t\tif(walkBackNode.value == this.root.value) {\n\t\t\t\t\t\t\tthis.root = lrRotation(walkBackNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparent.left = lrRotation(walkBackNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif(walkBackNode.balanceFactor > 1 && e.compareTo(walkBackNode.left.value) > 0) {\n\t\t\t\t\t\twalkBackNode.left = lrRotation(walkBackNode.left);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(walkBackNode.value == this.root.value) {\n\t\t\t\t\t\t\tthis.root = rrRotation(walkBackNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparent.left = rrRotation(walkBackNode);\n\t\t\t\t\t\t}\n//\t\t\t\t\t\trrRotation(walkBackNode);\n//\t\t\t\t\t\tSystem.out.println(\"Root value:= \" + values.balanceFactor);\n//\t\t\t\t\t\tSystem.out.println(\"Left value:= \" + values.left.balanceFactor);\n//\t\t\t\t\t\tSystem.out.println(\"Right value:= \" + values.right.balanceFactor);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif(walkBackNode.balanceFactor< -1 && e.compareTo(walkBackNode.right.value) < 0) {\n\t\t\t\t\t\twalkBackNode.right = rrRotation(walkBackNode.right);\n\t\t\t\t\t\tif(walkBackNode.value == this.root.value) {\n\t\t\t\t\t\t\tthis.root = lrRotation(walkBackNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparent.right = lrRotation(walkBackNode);\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tlrRotation(walkBackNode); \n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean add(E e) {\n if (root != null) {\n if (!root.addElement(e)) {\n return false;\n }\n root = root.balance();\n } else {\n root = new Node(e, null, null, 1);\n }\n size++;\n return true;\n }",
"T visit(Addition node);",
"public void add(T t) {\n if (root.getNumKeys() == 4 && root.isLeaf()) {\n BTreeNode<T> newRoot = new BTreeNode(false);\n\n newRoot.setChild(root, 0);\n\n insercionOrdenada(root, t);\n splitChild(newRoot, root, 0);\n\n this.root = newRoot;\n } else {\n insertarKey(root, t);\n }\n }",
"public void add(K key, V value) {\n Node<K,V> node = root, parent = null;\n int cmp = -1;\n\n while (node != null) {\n cmp = key.compareTo(node.key);\n parent = node;\n if (cmp < 0) {\n node = node.left;\n } else if (cmp > 0) {\n node = node.right;\n } else {\n node.value = value;\n return;\n }\n }\n\n Node<K,V> new_node = new Node<>(key, value);\n if (parent == null) {\n root = new_node;\n } else if (cmp < 0) {\n parent.left = new_node;\n } else {\n parent.right = new_node;\n }\n }",
"void add(int data){\n if (isEmpty()) { //tree is empty\n root = new Node(data);\n } else {\n Node current = root; //node yg saat ini bisa ter-update, tidak statis nilainya\n while(true){\n if (data < current.data) {\n if (current.left != null) {\n current = current.left;\n } else {\n current.left = new Node (data);\n break;\n }\n } else if (data > current.data){\n if (current.right != null) {\n current = current.right;\n } else {\n current.right = new Node (data);\n break;\n }\n } else {\n break;\n }\n }\n }\n }",
"public void add(Node node) {\n final int comparison = this.compare(node);\n if (comparison == 0) {\n // values are equal (not allowed in a binary tree)\n throw new IllegalArgumentException(\"Node is equal to already added node!\");\n }\n else if (comparison > 0) {\n // bigger (right side)\n if (this.right != null) {\n this.right.add(node);\n } else {\n this.right = node;\n }\n } else {\n // smaller (left side)\n if (this.left != null) {\n this.left.add(node);\n } else {\n this.left = node;\n }\n }\n }",
"@Override\n\tpublic boolean add(String s) {\n\t\t\n\t\tif(s.compareTo(value)<0) {\n\t\t\tif(left==null) {\n\t\t\t\tleft=new Node(s);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn left.add(s);\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\tif(right==null) {\n\t\t\t\tright=new Node(s);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn right.add(s);\n\t\t\t\n\t\t}\n\t\n\n\t}",
"public boolean add(Object value)\r\n {\r\n if (contains(value))\r\n return false;\r\n root = add(root, value);\r\n return true;\r\n }",
"private Node<Integer> addRecursive(Node<Integer> current, int value) {\n\t\tif (current == null) {\n\t\t\treturn new Node<Integer>(value);\n\n\t\t}\n\n\t\tif (value < current.value) {\n\t\t\tcurrent.left = addRecursive(current.left, value);\n\n\t\t} else if (value > current.value) {\n\t\t\tcurrent.right = addRecursive(current.right, value);\n\n\t\t} else\n\t\t\treturn current; // value exist\n\t\treturn current;\n\t}",
"@Override\n\tpublic V add(K key, V value) {\n\t\tV result = null;\n\t\tNode currentNode = firstNode;\n\t\t\n\t\tif(currentNode != null && key.equals(currentNode.getKey())){\n\t\t\tresult = (V) currentNode.getValue();\n\t\t\tcurrentNode.setValue(value);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tNode newNode = new Node(key, value);\n\t\t\tif(currentNode == null){\n\t\t\t\tnewNode.setNextNode(firstNode);\n\t\t\t\tfirstNode = newNode;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfirstNode.setNextNode(newNode);\n\t\t\t}\n\t\tnumberOfEntries++;\t\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"@Test\n public void addTest() {\n BinaryTree testTree = new BinaryTree();\n ComparableWords word=new ComparableWords(\"prueba\",\"test\",\"test\");\n assertNull(testTree.root);\n testTree.add(word);\n assertNotNull(testTree.root);\n }",
"private void addNode(Node<E> node, E value) {\n if (node.children == null) {\n node.children = new ArrayList<>();\n }\n node.children.add(new Node<>(value));\n }",
"public boolean add(E item) {\r\n\t\tif (value.compareTo(item) > 0) {\r\n\t\t\tif (this.left == null) {\r\n\t\t\t\tleft = new BSTNode<E>(item);\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn left.add(item);\r\n\t\t\t}\r\n\t\t} else if ((value.compareTo(item) < 0)) {\r\n\t\t\tif (right == null) {\r\n\t\t\t\tright = new BSTNode<E>(item);\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn right.add(item);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void add(int value) {\n // resize if necessary\n if (size + 1 >= elementData.length) {\n elementData = Arrays.copyOf(elementData, elementData.length * 2);\n }\n \n // insert as new rightmost leaf\n elementData[size + 1] = value;\n \n // \"bubble up\" toward root as necessary to fix ordering\n int index = size + 1;\n boolean found = false; // have we found the proper place yet?\n while (!found && hasParent(index)) {\n int parent = parent(index);\n if (elementData[index] < elementData[parent]) {\n swap(elementData, index, parent(index));\n index = parent(index);\n } else {\n found = true; // found proper location; stop the loop\n }\n }\n \n size++;\n }",
"public void add(T data, UUID id) { //Time Complexity: O(n)\n //checks for empty tree\n if (root == null) {\n root = new Node<>(id);\n root.data = data;\n\n } else {\n Node<T> currentnode = root;\n Node<T> adding = new Node<>(id);\n adding.data = data;\n //iterates through tree to get to node and add node\n while (currentnode != null) {\n\n if (currentnode.data.compareTo(data) < 0) {\n if (currentnode.right == null) {\n currentnode.right = adding;\n return;\n } else {\n currentnode = currentnode.right;\n }\n } else if (currentnode.data.compareTo(data) >= 0) {\n if (currentnode.left == null) {\n currentnode.left = adding;\n return;\n } else {\n currentnode = currentnode.left;\n }\n }\n }\n\n }\n }",
"public void addTo(BSTNode node, int value){\n // Allocate new node with specified value\n BSTNode newNode = new BSTNode(value);\n \n // Case 1: Value is less than the current node value\n if(value < node.value){\n // If there is no left child make this the new left\n if(node.left == null){\n node.left = newNode;\n }\n else{\n // else add it to the left node\n addTo(node.left, value);\n }\n } // End Case 1\n \n // Case 2: Value is equal to or greater than the current value\n else {\n // If there is no right, add it to the right\n if(node.right == null){\n node.right = newNode;\n }\n else{\n // else add it to the right node\n addTo(node.right, value);\n }\n } // End Case 2\n }",
"public boolean add(String value){\r\n\t\t//declare variables\r\n\t\tint testOrd = 0;\r\n\t\tDLBNode current = nodes;\r\n\t\tboolean lineFin = false;\r\n\t\tboolean output = false;\r\n\t\t\r\n\t\t//increment through the string to add the letter at its appropriate location\r\n\t\tfor(int i = 0; i < value.length(); i++){\r\n\t\t\t//node to house the current letter value being checked\r\n\t\t\tchar currentLetter = value.charAt(i);\r\n\t\t\t\r\n\t\t\tif(testOrd == 0){\r\n\t\t\t\t//checks to see if the list of letters being checked alread exists in the structure to avoid double-building\r\n\t\t\t\twhile(current != null){\r\n\t\t\t\t\t//generate a node value for the current letter being checked\r\n\t\t\t\t\tif(current.value == currentLetter){\r\n\t\t\t\t\t\tif(current.childNode != null){\r\n\t\t\t\t\t\t\t//step down to ensure you add to the lowest possible value in the viable list\r\n\t\t\t\t\t\t\tcurrent = current.childNode;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//stop the loop\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check siblings if children are not viable\r\n\t\t\t\t\tif(current.siblingNode != null){\r\n\t\t\t\t\t\tcurrent = current.siblingNode;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t//adjust trigger to end iteration\r\n\t\t\t\t\t\ttestOrd = 1;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//add the value to the list in the appropriate orientation\r\n\t\t\t\t//the node should have no viable children, this part adds it as a sibling to an already existing node in the chain of characters being checked\r\n\t\t\t\tif(testOrd == 1){\r\n\t\t\t\t\tcurrent.siblingNode = new DLBNode(currentLetter);\r\n\t\t\t\t\tcurrent = current.siblingNode;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcurrent.childNode = new DLBNode(currentLetter);\r\n\t\t\t\tcurrent = current.childNode;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//check for word endings/spaces\r\n\t\tif(current.childNode == null){\r\n\t\t\t\r\n\t\t\t//generate new child node that contains a terminating value (|)\r\n\t\t\tcurrent.childNode = new DLBNode('|');\r\n\t\t\toutput = true;\r\n\t\t\t\r\n\t\t\treturn output;\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tcurrent = current.childNode;\r\n\t\t\t//do the same as above, but instead of a child add as a sibling to another value existing in that line of characters\r\n\t\t\twhile(current != null){\r\n\t\t\t\t//avoid duplicate word endings\r\n\t\t\t\tif(current.value == '|'){\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn output;\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//sibling check\r\n\t\t\t\tif(current.siblingNode != null){\r\n\t\t\t\t\tcurrent = current.siblingNode;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(lineFin == false){\r\n\t\t\t\t\r\n\t\t\t\t//add a | if there is no other | value already present\r\n\t\t\t\tcurrent.siblingNode = new DLBNode('|');\r\n\t\t\t\toutput = true;\r\n\t\t\t\t\r\n\t\t\t\treturn output;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}",
"public void add(Comparable obj)\n { \n \t //TODO\n \t //add code\n \t Node n = new Node(); \n \t n.data = obj;\n \t // \tn.left = null;\n \t // \tn.right = null;\n\n \t Node y = null;\n \t // \tNode x = root;\n \t Node current = root;\n \t while(current != null)\n \t {\n \t\t y = current;\n \t\t if(n.data.compareTo(root.data) < 0)\n \t\t\t current = current.left;\n \t\t else\n \t\t\t current = current.right;\n \t }\n\n\n \t n.parent = y;\n \t if(y == null)\n \t\t root = n;\n \t else\n \t\t if(n.data.compareTo(y.data) < 0)\n \t\t\t y.left = n;\n \t\t else\n \t\t\t y.right = n;\n \t n.left = null;\n \t n.right = null;\n \t n.color = RED;\n \t // \troot = new Node();\n \t // \troot.data = \"k\";\n \t // \tNode test = new Node();\n \t // \ttest.data = \"g\";\n \t // \troot.left= test;\n// \t System.out.println(\"the insertion looks like:\");\n// \t System.out.println(BTreePrinter.printNode(root));\n\n \t fixup(root,n);\n \t /*\n \tThe insert() method places a data item into the tree.\n\n \tInsertions\n \tpseudocode for\n \tRB-Insert(T,z)\n \ty = nil[T]\n \tx = root[T]\n \twhile x != nil[T]\n \ty = x\n \tif key[z] < key[x] then\n \tx = left[x]\n \telse\n \tx = right[x]\n \tp[z] = y\n \tif y = nil[T]\n \troot[T] = z\n \telse\n \tif key[z] < key[y] then\n \tleft[y] = z\n \telse\n \tright[y] = z\n \tleft[z] = nil[T]\n \tright[z] = nil[T]\n \tcolor[z] = RED\n \tRB-Insert-fixup(T,z)\n \t */\n }",
"public void add(int v) {\n if (isIn(v)) return; // do not add if it v is in set\n TNode t = root;\n while (t != null) {\n if (v < t.element) { // if v is less than current node\n if (t.left == null) { // add node to left when left is null\n t.left = new TNode(v, null, null);\n return;\n }\n t = t.left;\n }\n else {\n if (t.right == null) { // add node to right when right is null\n t.right = new TNode(v, null, null);\n return;\n }\n t = t.right;\n }\n }\n }",
"public void alternateAdd(E value) {\n\t\talternateAdd(value, overallRoot);\n\t}",
"private Node<E> add(Node<E> localRoot, E item) {\r\n\t\tif(localRoot == null) {\r\n\t\t\t// item is not in the tree - insert it\r\n\t\t\taddReturn = true;\r\n\t\t\treturn new Node<E>(item);\r\n\t\t}\r\n\t\telse if(item.compareTo(localRoot.data) == 0) {\r\n\t\t\t// item is equal to localRoot.data\r\n\t\t\taddReturn = false;\r\n\t\t\treturn localRoot;\r\n\t\t}\r\n\t\telse if (item.compareTo(localRoot.data) < 0) {\r\n\t\t\t// item is less than localRoot.data\r\n\t\t\tlocalRoot.left = add(localRoot.left, item);\r\n\t\t\treturn localRoot;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// item is greater than localRoot.data\r\n\t\t\tlocalRoot.right = add(localRoot.right, item);\r\n\t\t\treturn localRoot;\r\n\t\t}\r\n\t}",
"@Test\n public void whenAddTwoNodesOnDifferentLevelsThenNextFromBottomLevel() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n Iterator iter = tree.iterator();\n assertThat(iter.next(), is(\"2\"));\n }",
"@Override\n\tpublic boolean add(T elem) {\n\t\tif (this.contains(elem)) { // no duplicates\n\t\t\treturn false;\n\t\t} else if (valCount < 3) { // if has space for more\n\t\t\tif (childCount == 0) { // add elem as direct descendant\n\t\t\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\t\t\tif (comp.compare(elem,values[i]) < 0) {\n\t\t\t\t\t\tfor (int j = 2; j > i; --j) { // shifts all other elements by 1\n\t\t\t\t\t\t\tvalues[j] = values[j - 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvalues[i] = elem;\n\t\t\t\t\t++valCount;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else { // add elem as indirect descendant\n\t\t\t\tfor (int i = 0; i < childCount; ++i) { // searching with which child elem belongs\n\t\t\t\t\tif (comp.compare(elem,values[i]) < 0) {\n\t\t\t\t\t\treturn children[i].add(elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn children[childCount].add(elem); // elem is greater than all other children and should be put rightmost\n\t\t\t}\n\t\t} else { // node is 4-tree and should be reduced\n\t\t\tTwoThreeFourTreeSet<T> tempLeft = new TwoThreeFourTreeSet<T>(); // generating new left and right children of reduced node\n\t\t\tTwoThreeFourTreeSet<T> tempRight = new TwoThreeFourTreeSet<T>();\n\t\t\t\n\t\t\ttempLeft.values[0] = values[0];\n\t\t\ttempLeft.valCount = 1;\n\t\t\ttempLeft.children[0] = this.children[0];\n\t\t\ttempLeft.children[1] = this.children[1];\n\t\t\ttempLeft.childCount = 2;\n\t\t\t\n\t\t\ttempRight.values[0] = values[2];\n\t\t\ttempRight.valCount = 1;\n\t\t\ttempRight.children[0] = this.children[2];\n\t\t\ttempRight.children[1] = this.children[3];\n\t\t\ttempRight.childCount = 2;\n\t\t\t\n\t\t\tif (parent == null) { // if no parent, create new node with middle value\n\t\t\t\tTwoThreeFourTreeSet<T> tempParent = new TwoThreeFourTreeSet<T>();\n\t\t\t\ttempParent.values[0] = values[1];\n\t\t\t\t\t\n\t\t\t\ttempParent.children[0] = tempLeft;\n\t\t\t\ttempParent.children[1] = tempRight;\n\t\t\t\ttempParent.childCount = 2;\n\t\t\t\tthis.parent = tempParent;\n\t\t\t} else { // else parent exists, and current node should be added\n\t\t\t\tif (comp.compare(parent.values[0],values[1]) < 0) { // if node belongs leftmost\n\t\t\t\t\tif (parent.valCount > 1) {\n\t\t\t\t\t\t// shift right element by 1\n\t\t\t\t\t\tparent.values[2] = parent.values[1];\n\t\t\t\t\t\tparent.children[3] = parent.children[2];\n\t\t\t\t\t}\n\t\t\t\t\t// shift left element by 1\n\t\t\t\t\tparent.values[1] = parent.values[0];\n\t\t\t\t\tparent.children[2] = parent.children[1];\n\t\t\t\t\t\n\t\t\t\t\t// push left;\n\t\t\t\t\tparent.values[0] = values[1];\n\t\t\t\t\tparent.children[0] = tempLeft;\n\t\t\t\t\tparent.children[1] = tempRight;\n\t\t\t\t} else if (parent.valCount < 2 || comp.compare(parent.values[1],values[1]) < 0) { // if node belongs in center\n\t\t\t\t\tif (parent.valCount > 1) { // should we shift?\n\t\t\t\t\t\tparent.values[2] = parent.values[1];\n\t\t\t\t\t\tparent.children[3] = parent.children[2];\n\t\t\t\t\t}\n\t\t\t\t\t// push center\n\t\t\t\t\tparent.values[1] = values[1];\n\t\t\t\t\tparent.children[1] = tempLeft;\n\t\t\t\t\tparent.children[2] = tempRight;\n\t\t\t\t} else { // if node belongs rightmost\n\t\t\t\t\t// push right\n\t\t\t\t\tparent.values[2] = values[1];\n\t\t\t\t\tparent.children[2] = tempLeft;\n\t\t\t\t\tparent.children[3] = tempRight;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tTwoThreeFourTreeSet<T> newTree = this;\n\t\t\tnewTree = newTree.parent; // changing this indirectly\n\t\t\t++newTree.valCount;\n\t\t\treturn newTree.add(elem);\n\t\t}\n\t\treturn false;\n\t}",
"public boolean add(E item)\r\n\t{\r\n\t\tif (root == null)\r\n\t\t{\t\r\n\t\t\troot = new BinaryTree<E>(item);\r\n\t\t}\r\n\t\treturn add(item, root);\r\n\t}",
"@Override\r\n public boolean add(E item) {\r\n if (root == null) {\r\n root = new Node<>(item);\r\n System.out.printf(\"Root : %s \\n\",root.toString());\r\n return true;\r\n }\r\n /*Dimension must be equal. */\r\n if (root.data.getNumberOfArgs() != item.getNumberOfArgs()) {\r\n\r\n System.out.printf(\"The dimension must be %d\",root.data.getNumberOfArgs());\r\n return false;\r\n }\r\n return addHelper(root,item,0);\r\n }",
"void addNode(int node);",
"private AVLNode<T> add(AVLNode<T> node, T data) {\n if(node == null) {\n elements++;\n return new AVLNode<>(data);\n }\n\n if(data.compareTo(node.data) == 0) {\n // hacer nothing\n return node;\n } else if(data.compareTo(node.data) > 0) {\n node.right = add(node.right, data);\n } else {\n node.left = add(node.left, data);\n }\n\n node = balance(node);\n\n return node;\n }",
"public void add(T value) {\n Node<T> newNode = new Node<T>();\n newNode.data = value;\n newNode.next = null;\n if (head == null) {\n head = newNode;\n } else {\n Node<T> last = head;\n while (last.next != null) {\n last = last.next;\n }\n last.next = newNode;\n }\n }",
"@Override\n\tpublic boolean add(E e) {\n\t\tTreeNode<E> newNode = new TreeNode(e);\n\t\tTreeNode<E> parent = null;\n\t\tTreeNode<E> curr = root;\n\t\twhile(curr != null) {\n\t\t\tif(e.compareTo( curr.element) < 0) {\n\t\t\t\tparent = curr;\n\t\t\t\tcurr = curr.left;\n\t\t\t}\n\t\t\telse if(e.compareTo(curr.element) > 0) {\n\t\t\t\tparent = curr;\n\t\t\t\tcurr = curr.right;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false; // this element is already there.\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(e.compareTo(parent.element) < 0) {\n\t\t\tparent.left = newNode;\n\t\t}\n\t\telse if (e.compareTo(parent.element) > 0){\n\t\t\tparent.right = newNode;\n\t\t}\n\t\tsize++;\n\t\treturn true;\n\t}",
"public boolean add(Node value) {\n //resize array\n if (size >= heap.length - 1) {\n heap = resize();\n }\n size++;\n int index = size;\n //place at the end\n heap[index] = value;\n\n shiftUp();\n return true;\n }",
"public final void add() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue + topMostValue);\n\t\t}\n\t}",
"@Override\n public BSTNode add(T object) {\n\n BSTNode newNode = new Leaf(object);\n\n\n if (object.compareTo(this.data) < 0) {\n // Put the new object below to the left.\n BSTNode convertedLead = new ElementNode(this.data, newNode, null);\n return convertedLead;\n } else {\n // Put the new object below to the right.\n BSTNode convertedLead = new ElementNode(this.data, null, newNode);\n return convertedLead;\n }\n\n }",
"public void add(String value) {\n\t\tif (head == null)\n\t\t\thead = new Node(value);\n\t\telse if (head.value.compareTo(value) > 0) {\n\t\t\thead = new Node(value, head);\n\t\t} else if (head.value.compareTo(value) == 0) {\n\t\t\treturn;\n\t\t} else\n\t\t\trecAdd(head, value);\n\t}",
"protected boolean addLeft(T value) {\n this.left = createTreeNode(value);\n return true;\n }",
"public void addNode(Node node){subNodes.add(node);}",
"public void addItem(int value) {\n if (root == null) {\n root = new Node(value);\n } else {\n addToNode(root, value);\n }\n }",
"boolean addNode(N node);",
"public Node<E> addNode(E value){\n Node<E> newNode = new Node<>(value);\n if(value != null){\n nodes.putIfAbsent(newNode, new HashSet<>());\n }\n return newNode;\n }",
"public void add( T obj )\n {\n // Any distinct object causes creation of a new tree-set.\n // We count any such sets as we go.\n if (!contains( obj ))\n {\n nodes.put(obj, new Node(obj));\n numSets++;\n }\n }",
"public void add(int d) {\n // if empty tree, new node is root\n if (root == null) {\n root = new Node(d);\n }\n // if non-empty tree, insert for completeness\n else {\n // go down the left branch of tree until a leaf is reached\n \n // check if leaf has a right sibling, if not, add to right, else go back one node and see if the node's right sibling has children\n // if right sibling \n \n // add to its left child\n\n }\n }",
"public void add(int value) {\n Node newNode = new Node(value);\n if(this.head == null) { //head is a pointer\n this.head = newNode;\n } else {\n Node runner = this.head;\n while(runner.next != null) {\n runner = runner.next;\n }\n runner.next = newNode;\n }\n }",
"public void add( Integer inputData ) {\n\t\tif ( root.getData() == null ) {\n\t\t\tthis.root = new TreeNode( inputData );\n\t\t\treturn;\n\t\t} else {\n\n\t\t\tTreeNode current = this.root;\n\n\t\t\tTreeNode newNode = new TreeNode( inputData );\n\n\t\t\twhile ( true ) {\n\n\t\t\t\t// reject duplicates\n\t\t\t\tif ( current.getData().equals( inputData ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t} \n\n\t\t\t\tif ( inputData < current.getData() ) {\n\t\t\t\t\tif ( current.getLeft() == null ) {\n\t\t\t\t\t\tcurrent.setLeft( newNode );\n\t\t\t\t\t\tnewNode.setParent( current );\n\t\t\t\t\t\tthis.size++;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrent = current.getLeft();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( current.getRight() == null ) {\n\t\t\t\t\t\tcurrent.setRight( newNode );\n\t\t\t\t\t\tnewNode.setParent( current );\n\t\t\t\t\t\tthis.size++;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrent = current.getRight();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}",
"private void addNodes(TreeNode root, int l, List<Integer> res) {\r\n if (l < 0 || root == null) return;\r\n\r\n if (l == 0) {\r\n res.add(root.val);\r\n return;\r\n }\r\n\r\n // l > 0\r\n addNodes(root.left, l - 1, res);\r\n addNodes(root.right, l - 1, res);\r\n return;\r\n }",
"private Node add(Node node, K k, V v, int depth){\n if(node == null){ //null then create\n Node newNode = new Node(k,v);\n newNode.depth = depth;\n newNode.size++; // update size of new node\n return newNode;\n }\n// recursively add\n if(k.compareTo(node.k)<0){ // less, add left\n node.left = add(node.left, k, v, depth+1);\n }\n else if(k.compareTo(node.k)>0) { // greater, add right\n node.right = add(node.right, k,v, depth+1);\n }else{\n if(allowCount)node.count++; //equal then add count 1\n }\n\n if(allowCount){\n node.size++; //any e will be added\n }else\n node.size = 1 + size(node.left) + size(node.right);\n return node; //not null, value equal, then return node itself\n }",
"public boolean add(Integer e, Integer f){\n\t\ttry{\n\t\t\tsearchNodeRef(f).addSubtree(new Node(e));\n\t\t\tcount++;\n\t\t\treturn true;\n\t\t} catch (Exception exc) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public void add(String data) {\r\n\t\t// System.out.println(\"Starting Add\");\r\n\t\tif (root == null) {\r\n\t\t\t// First item in tree\r\n\t\t\tNode ng = new Node();\r\n\t\t\tng.setData(data);\r\n\t\t\t// System.out.println(\"Ng data: \" + ng.getData());\r\n\r\n\t\t\troot = ng;\r\n\t\t\t// System.out.print(\"Root added : \" + root.getData());\r\n\t\t\tcount = 1;\r\n\r\n\t\t} else {\r\n\t\t\trecAdd(data, root);\r\n\t\t}\r\n\t}",
"public void add(final T value) {\n\n final var node = new Node<>(value);\n final var currentTail = this.tail;\n\n if (currentTail != null) {\n currentTail.next = node;\n }\n\n if (head == null) {\n this.head = node;\n }\n tail = node;\n size++;\n }",
"public void addRoot(BinaryNode node) throws Exception{\n if(root != null)\n {\n throw new Exception(\"The tree is not empty\");\n }\n root = node;\n size++;\n }",
"private void addNode(Node root, Node newNode) {\n\n int switchControl = newNode.getData().compareTo(root.getData());\n switch (switchControl) {\n case -1:\n //newNode<root\n if (root.getLeft() == null) {\n root.setLeft(newNode);\n newNode.setParent(root);\n fixBalanceValues(root, -1);\n } else {\n addNode(root.getLeft(), newNode);\n }\n\n default:\n //newNode==root || newNode>root\n if (root.getRight() == null) {\n root.setRight(newNode);\n newNode.setParent(root);\n fixBalanceValues(root, 1);\n } else {\n addNode(root.getRight(), newNode);\n }\n\n }\n }",
"@Test\n public void whenAddTwoNodesThenHasNextTrue() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n Iterator iter = tree.iterator();\n assertThat(iter.hasNext(), is(true));\n }",
"public void addAtNextOpenSpot(T value) {\n Node<T> newNode = new Node<>(value);\n if (this.root == null) {\n this.root = newNode;\n return;\n }\n LinkedList<Node<T>> nodesToCheck = new LinkedList<>();\n nodesToCheck.addLast(this.root);\n while(true) {\n Node<T> current = nodesToCheck.removeFirst();\n if(current.getLeftChildNode() == null) {\n current.setLeftChildNode(newNode);\n return;\n } else if (current.getRightChildNode() == null) {\n current.setRightChildNode(newNode);\n return;\n } else {\n nodesToCheck.addLast(current.getLeftChildNode());\n nodesToCheck.addLast(current.getRightChildNode());\n }\n }\n }",
"public void add(int data) {\n\n\t\tNode search = root;\n\t\tNode node = new Node(data, null, null);\n\t\tif (search == null) {\n\t\t\troot = node;\n\t\t\treturn;\n\t\t}\n\t\twhile (search != null) {\n\t\t\t// System.out.println(\"Deni\"+search.data);\n\t\t\tif (search.data > node.data) {\n\t\t\t\tif (search.left == null) {\n\t\t\t\t\tsearch.left = node;\n\t\t\t\t\t// System.out.println(\"Added \" + node.data + \" as the left of \" + search.data);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tsearch = search.left;\n\t\t\t} else if (search.data < node.data) {\n\t\t\t\tif (search.right == null) {\n\t\t\t\t\tsearch.right = node;\n\t\t\t\t\t// System.out.println(\"Added \" + node.data + \" as the right of \" + search.data);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tsearch = search.right;\n\t\t\t}\n\t\t}\n\t}",
"public boolean add(E item){\n\t\troot = add(item, root);\n\t\treturn addReturn;\n\t}",
"public void add(int value) {\nNode newNode = new Node(value);\nif (head == null) {\nhead = newNode;\nsize++;\nreturn;\n}\nNode current = head;\nwhile (current.next != null) {\ncurrent = current.next;\n}\ncurrent.next = newNode;\nsize++;\n}",
"public abstract void add(NestedInteger ni);",
"@Test\n public void whenAddNineNodesOnDifferentLevelsThenResultNineNodesFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(new TreeNode(), \"1\");\n tree.addChild(new TreeNode(), \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 3, 3, 2, 2, 2, 1, 1, 1]\"));\n }",
"private AVLTreeNode<E> insert(E value) {\n int cmp = this.getValue().compareTo(value);\n AVLTreeNode<E> result;\n if(cmp == 0){\n result = null;\n } else if(cmp < 0){\n result = this.getRight() != null ? this.getRight().insert(value) : createTreeNode(value);\n if(result != null){\n this.setRight(result);\n }\n } else {\n result = this.getLeft() != null ? this.getLeft().insert(value) : createTreeNode(value);\n if(result != null){\n this.setLeft(result);\n }\n }\n return result == null ? result : balancing(this);\n }",
"public void add(NestedInteger ni){}",
"public void add(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"Data cannot be null\");\n }\n if (root == null) {\n root = new BSTNode<T>(data);\n size++;\n } else {\n add(data, root);\n }\n\n }",
"public void add(T value) {\n\t\tNode newNode = new Node(value);\n\t\tif (head == null) {\n\t\t\thead = newNode;\n\t\t\treturn;\n\t\t}\n\t\tNode current = head;\n\t\twhile (current.next != null) {\n\t\t\tcurrent = current.next;\n\t\t}\n\t\tcurrent.next = newNode;\n\t}",
"public void add (Node n){\n //increment frequency if word already exist\n if (n.getWord().compareTo(word)==0)\n {\n freq++;\n }\n\n if(n.getWord().compareTo(word) <= 0){ //left\n if(left == null){ \n left = n;\n }else{\n left.add (n); //recursive call on the child - left\n }\n }else{ //right\n if(right == null){\n right = n;\n }else{\n right.add (n);\n }\n }\n\n }",
"@Test\n public void whenAddNodesOnDifferentLevelsThenResultThreeNodeFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 2, 1]\"));\n }",
"public static void populateTree(BinarySearchTree tree)\n {\n for(int i = 0; i < 20; i++)\n {\n tree.add(i);\n }\n }",
"public void add(NestedInteger ni);",
"@Override\n\tpublic void visit(Addition arg0) {\n\n\t}",
"@Override\n\tpublic void visit(Addition arg0) {\n\t\t\n\t}",
"public void add(int value) {\n SubArrayMinNode newNode = new SubArrayMinNode(value);\n newNode.left = SubArrayMinNode.LEAF;\n newNode.right = SubArrayMinNode.LEAF;\n if (root.isLeaf()) {\n root = newNode;\n newNode.augment();\n } else {\n SubArrayMinNode node = root.max();\n node.right = newNode;\n newNode.parent = node;\n newNode.isRed = true;\n root = newNode.fixInsertion();\n }\n }",
"public static void addSample() {\n System.out.println(\"==test for add(value) to tail\");\n Node ll1_5 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1 = new Node(1, null);\n Node lln = new Node();\n\n ll1_5 = ll1_5.add(6);\n ll1_5.printList();\n ll1_5 = ll1_5.add(7);\n ll1_5.printList();\n\n ll1 = ll1.add(2);\n ll1.printList();\n\n lln = lln.add(10);\n lln.printList();\n\n System.out.println(\"==test for add(value,pos) to delicated position\");\n Node ll1_5a = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5b = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5c = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5d = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5e = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5f = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n\n Node ll1_2 = new Node(1, null);\n Node lln_2 = new Node();\n\n Node ll0p = ll1_5a.add(-1, 0);\n ll0p.printList();\n Node ll1p = ll1_5b.add(-2, 1);\n ll1p.printList();\n Node ll2p = ll1_5c.add(-3, 2);\n ll2p.printList();\n Node ll3p = ll1_5d.add(-4, 3);\n ll3p.printList();\n Node ll4p = ll1_5e.add(-5, 4);\n ll4p.printList();\n Node ll5p = ll1_5f.add(-6, 5);\n ll5p.printList();\n\n ll1_2 = ll1_2.add(2, 1);\n ll1_2.printList();\n\n lln_2 = lln_2.add(10, 1);\n lln_2.printList();\n }",
"@Test\n\tpublic void addWorksForModeNone() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 10, 0)); // constant function = 10\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(5, 20, 25, 20, 0)); // constant function = 20\n\t\tfinal ReadOnlyTimeSeries sum = MultiTimeSeriesUtils.add(Arrays.<ReadOnlyTimeSeries> asList(t0, t1), 0, 120, true, null, false);\n\t\tAssert.assertEquals(\"Time series sum has wrong number of data points\", 13, sum.size());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 30, sum.getValue(20).getValue().getIntegerValue());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 20, sum.getValue(45).getValue().getIntegerValue());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 10, sum.getValue(80).getValue().getIntegerValue());\n\t}",
"public NonEmptyTree<K, V> add(K key, V value) {\n\t\tTree<K, V> t = this;\n\t\treturn add(t, key, value);\n\t}",
"public int insert(){ // Wrapper insert function, passes random values to insert integer data in the tree.\n Random rn = new Random();\n\n\n for (int i = 0; i < 10; ++i)\n {\n insert(3);\n insert(5);\n insert(9);\n insert(5);\n insert(8);\n insert(1);\n insert(7);\n insert(4);\n insert(3);\n }\n return 1;\n }",
"public void add(NODE node) {\n root = root == null ? node : root.add(node);\n }",
"TreeNode addChild(TreeNode node);"
] | [
"0.6358634",
"0.632887",
"0.62942314",
"0.6285818",
"0.62103647",
"0.6181992",
"0.6171988",
"0.6164574",
"0.6151475",
"0.61193824",
"0.61016816",
"0.61015534",
"0.60949254",
"0.6088183",
"0.60117495",
"0.5899937",
"0.5896894",
"0.5866232",
"0.5837573",
"0.58326024",
"0.57812613",
"0.5751528",
"0.5746396",
"0.5730031",
"0.57105273",
"0.5703417",
"0.5703006",
"0.57027906",
"0.5683638",
"0.56664956",
"0.5663103",
"0.565993",
"0.5657027",
"0.565637",
"0.5640769",
"0.5636264",
"0.562978",
"0.56019175",
"0.5597603",
"0.5595392",
"0.5593248",
"0.55786",
"0.55614954",
"0.5551766",
"0.5545062",
"0.55446506",
"0.55300784",
"0.55144453",
"0.5505987",
"0.54986167",
"0.54836714",
"0.54508066",
"0.54480565",
"0.54429394",
"0.54353726",
"0.5431063",
"0.54278374",
"0.54162335",
"0.54145247",
"0.5413357",
"0.53931606",
"0.539099",
"0.53673327",
"0.53645027",
"0.53555423",
"0.53537774",
"0.53535634",
"0.5343642",
"0.53409964",
"0.5337033",
"0.53220654",
"0.5307547",
"0.5305407",
"0.5282106",
"0.52742547",
"0.5273095",
"0.5272746",
"0.525973",
"0.52572197",
"0.5254781",
"0.5244767",
"0.52447087",
"0.52344644",
"0.5232419",
"0.5228501",
"0.52219665",
"0.52174294",
"0.520569",
"0.51947033",
"0.517596",
"0.51703835",
"0.51654184",
"0.5160331",
"0.51568353",
"0.5155922",
"0.5154169",
"0.514569",
"0.513897",
"0.5138016",
"0.513626"
] | 0.6655656 | 0 |
This getDecodedMessage function will take the encoded sequence, takes the first character in the sequence and compares it with the edge of the root node and traverses on the left or the right node. | public void getDecodedMessage(String encoding){
String output = "";
Node temp = this.root;
for(int i = 0;i<encoding.length();i++){
if(encoding.charAt(i) == '0'){
temp = temp.left;
if(temp.left == null && temp.right == null){
System.out.print(temp.getData());
temp = this.root;
}
}
else
{
temp = temp.right;
if(temp.left == null && temp.right == null){
System.out.print(temp.getData());
temp = this.root;
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void decodeMessage() {\n StringBuilder decoded = new StringBuilder();\n\n for (int i = 0; i < message.length(); i += 3) {\n if (message.charAt(i) == message.charAt(i + 1)) {\n decoded.append(message.charAt(i));\n } else if (message.charAt(i) == message.charAt(i + 2)) {\n decoded.append(message.charAt(i));\n } else {\n decoded.append(message.charAt(i + 1));\n }\n }\n\n message = decoded;\n }",
"public String decode(String codedMessage) {\n StringBuilder result = new StringBuilder(); //Create a new stringbuilder\n BinaryTree<HuffData> currentTree = huffTree; //Get the Huffman Tree\n for (int i = 0; i < codedMessage.length(); i++) { //Loop through the coded message\n //If the character is a 1, set currentTree to the right subtree\n if(codedMessage.charAt(i) == '1') { \n currentTree = currentTree.getRightSubtree();\n } else { //If the character is a 0, set currentTree to the left subtree\n currentTree = currentTree.getLeftSubtree();\n }\n if(currentTree.isLeaf()) { //Once you hit a leaf\n HuffData theData = currentTree.getData(); //Get the data of the leaf\n result.append(theData.symbol); //Append the symbol to the stringbuilder\n currentTree = huffTree; //Reset the currentTree to be the entire tree\n }\n }\n //Return the string of the stringbuilder\n return result.toString();\n }",
"public String decode(String encoded) {\n\t\t// TODO fill this in.\n\t\tchar[] encodedArray = encoded.toCharArray();\n\n\t\tString decoded = \"\";\n\n\t\tLeaf current = root;\n\n\t\tfor(char c : encodedArray) {\n\n\t\t\tif (c == '0' && current.left != null) {\n\t\t\t\tcurrent = current.left;\n\t\t\t}\n\t\t\telse if(c == '1' && current.right != null){\n\t\t\t\tcurrent = current.right;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchar letter = current.character;\n\t\t\t\tdecoded = decoded + letter;\n\t\t\t\tcurrent = root;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(textArray);\n\t\tSystem.out.println(decoded);\n\n\t\treturn decoded;\n\t}",
"public String decode(String encoded) {\n\t\t// TODO fill this in.\n\t\tStringBuilder decodedText = new StringBuilder();\n\t\tNode currentBit = huffmanTree;\n\t\tint index = 0;\n\t\t//System.out.println(currentBit.getLeft());\n\t\t//System.out.println(currentBit.getRight());\n\t\twhile (index < encoded.length()) {\n\t\t\tif (encoded.charAt(index) == '0') {\n\t\t\t\tif (currentBit.getLeft() != null) {\n\t\t\t\t\tcurrentBit = currentBit.getLeft();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdecodedText.append(currentBit.getCharacter());\n\t\t\t\t\tcurrentBit = huffmanTree;\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentBit.getRight() != null) {\n\t\t\t\t\tcurrentBit = currentBit.getRight();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdecodedText.append(currentBit.getCharacter());\n\t\t\t\t\tcurrentBit = huffmanTree;\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex++;\n if (index == encoded.length()) {\n decodedText.append(currentBit.getCharacter());\n }\n\t\t}\n System.out.println(\"EncondedText: \" + encoded);\n\t\tSystem.out.print(\"decodedText: \" + decodedText.toString());\n\t\treturn decodedText.toString();\n\n\t}",
"public String decode(String input) {\n String decoded = \"\";\n char[] message = input.toCharArray();\n for (int j = 0; j < message.length; j++) { //takes input into a array of chars\n decodingQueue.enqueue(message[j]);\n }\n char lastvalue =0;\n boolean islastvaluenum= false;\n for (int i = 0; i < input.length(); i++) {\n char character = decodingQueue.dequeue();\n if(character != ' ') { //if not a space\n String alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n if (islastvaluenum==false) { //if last value was not a num, then proceed normally with first set of numbers\n char decodedvalue = denumerate(character, 1);\n if (decodedvalue != 0) {\n islastvaluenum = true;\n decoded = decoded + decodedvalue;\n }\n else {\n islastvaluenum = false;\n int shiftvalue = -(5+(2*i));\n boolean charfound = false;\n char[] chararray = (alphabet.toUpperCase()).toCharArray();\n char output = 'n';\n for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby\n if (charfound==false) {\n if (character == chararray[j]) {\n output = chararray[(j+chararray.length+shiftvalue)% chararray.length];\n charfound = true;\n }\n }\n }\n character = output;\n decoded = decoded + character;\n }\n }\n else {\n char decodedvalue = denumerate(character, 2); //if last value was a num, then proceed with second set of numbers\n if (decodedvalue != 0) {\n islastvaluenum = true;\n decoded = decoded+ decodedvalue;\n }\n else {\n islastvaluenum = false;\n int shiftvalue1 = -5;\n boolean charfound = false;\n char[] chararray = (alphabet.toUpperCase()).toCharArray();\n char output = 'n';\n for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby\n if (charfound==false) {\n if (character == chararray[j]) {\n output = chararray[(j+chararray.length+shiftvalue1)% chararray.length];\n charfound = true;\n }\n }\n }\n character = output;\n int shiftvalue2 = (2 * (lastvalue - '0'))-(i * 2);\n charfound = false;\n chararray = (alphabet.toUpperCase()).toCharArray();\n output = 'n';\n for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby\n if (charfound==false) {\n if (character == chararray[j]) {\n output = chararray[(j+chararray.length+shiftvalue2)% chararray.length];\n charfound = true;\n }\n }\n }\n character = output;\n\n decoded = decoded + character;\n }\n }\n lastvalue = character;\n }\n else{\n decoded = decoded + ' ';\n }\n }\n return decoded;\n }",
"public String decode(String message) {\n if (message == null || message.isEmpty()) {\n return \"\";\n }\n StringBuilder source = new StringBuilder(message);\n StringBuilder target = new StringBuilder();\n while (source.length() >= 8) {\n String substring = source.substring(0,8);\n source.delete(0, 8);\n target.append(decodeByte(substring));\n }\n int bitOverlap = target.length() % 8;\n if (bitOverlap > 0 && target.length() > 8) {\n target.delete(target.length() - bitOverlap, target.length());\n }\n return target.toString();\n }",
"@Override\r\n public String decode(String message) throws IllegalStateException {\r\n StringBuilder sb = new StringBuilder();\r\n TrieNode currNode = root;\r\n //check validity of the encoded message\r\n for (char ch : message.toCharArray()) {\r\n if (!this.codeSymbolsSet.contains(ch)) {\r\n throw new IllegalStateException();\r\n }\r\n }\r\n //regular decoding\r\n for (int i = 0; i < message.length(); i++) {\r\n char currChar = message.charAt(i);\r\n if (currNode.getChildrenMap().containsKey(currChar)) {\r\n currNode = currNode.getChildrenMap().get(currChar);\r\n if (currNode.isLeaf()) {\r\n sb.append(currNode.getSymbol());\r\n currNode = root;\r\n }\r\n }\r\n //wrong decoding\r\n else {\r\n throw new IllegalStateException();\r\n }\r\n }\r\n if (!currNode.isLeaf() && currNode != root) {\r\n throw new IllegalStateException();\r\n }\r\n return sb.toString();\r\n }",
"private static void decode() throws IOException{\n File file = new File(_encodedBinFile);\n String longStringAsFile;\n \n //DataInputStream dis;\n FileWriter w;\n try {\n //dis = new DataInputStream(new FileInputStream(file));\n longStringAsFile = getLongStringAsFile();\n //dis.close();\n w = new FileWriter(\"decoded.txt\");\n Node traverser = root;\n for(int i=0; i < longStringAsFile.length(); i++){\n if(longStringAsFile.charAt(i) == '0'){\n //go to left\n if (traverser.getLeftPtr() == null){\n //fallen off the tree. Print to file\n if (i == longStringAsFile.length() - 1 ){\n w.write(((LeafNode)traverser).getData());\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getLeftPtr();\n }\n }\n else{\n traverser = traverser.getLeftPtr();\n }\n }\n else{\n //go to right of tree\n if (traverser.getRightPtr() == null){\n //fallen off the tree. PRint to file\n if (i == longStringAsFile.length() - 1){\n w.write(((LeafNode)traverser).getData() );\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getRightPtr();\n }\n\n }\n else{\n traverser = traverser.getRightPtr();\n }\n }\n \n }\n //dis.close();\n w.close();\n } catch (IOException ex) {\n Logger.getLogger(decoder.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"public static void decode()\n {\n \n \n int a = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int len = t.length();\n \n //variables for generating next[] array\n int[] next = new int[len];\n char[] original = t.toCharArray();\n char[] temp = t.toCharArray();\n boolean[] flag = new boolean[len];\n for(int i = 0 ; i < len; i++)\n {\n flag[i] = true;\n }\n \n //sort the encoded string\n decodeSort(temp);\n \n //generating next[] array\n for(int i = 0 ; i < len; i++)\n {\n for(int j = 0 ; j < len; j++)\n {\n if(flag[j])\n { \n if(original[j]==temp[i])\n {\n next[i] = j;\n flag[j]=false;\n break;\n }\n }\n }\n \n }\n \n // decode procedure\n int key = a;\n for (int count = 0; count < len; count++) {\n key = next[key];\n BinaryStdOut.write(t.charAt(key));\n }\n BinaryStdOut.close();\n }",
"private void decode_message(String receivedMessage) {\n String[] messageComponents = receivedMessage.split(\"##\");\n String actionName = messageComponents[0];\n int actionType = caseMaps.get(actionName);\n\n switch (actionType) {\n case 1:\n String nodeToConnect = messageComponents[1];\n break;\n case 2:\n String receivedPrevNode = messageComponents[1].split(\"&&\")[0];\n String receivedNextNode = messageComponents[1].split(\"&&\")[1];\n break;\n case 3:\n String key = messageComponents[1].split(\"&&\")[0];\n String value = messageComponents[1].split(\"&&\")[1];\n insertIntoDB(key,value);\n break;\n case 4:\n String portRequested = messageComponents[1].split(\"&&\")[0];\n String AllMessages = messageComponents[1].split(\"&&\")[1];\n break;\n case 5:\n String portRequestedSelect = messageComponents[1].split(\"&&\")[0];\n String selection = messageComponents[1].split(\"&&\")[1];\n break;\n case 6:\n String selectionDelete = messageComponents[1];\n DeleteKeys(selectionDelete);\n break;\n default:\n }\n\n }",
"@Override\n protected Message receiveMessage() throws IOException {\n String encoded = this.din.readUTF();\n this.lastMessage = new Date();\n String decodedXml = new String(\n DatatypeConverter.parseBase64Binary(encoded));\n\n return Message.msgFromXML(decodedXml);\n }",
"public String decode(String message)\n\t{\n\t\treturn decode(message, 0);\n\t}",
"@Override\n public String decode(String code) throws IllegalStateException {\n if (code == null || code.equals(\"\")) {\n throw new IllegalStateException(\"the code cannot be null or empty.\");\n }\n Tree iterator = root;\n decode = \"\";\n\n for (int i = 0; i < code.length(); i++) {\n if (!encodingArray.contains(code.charAt(i))) {\n throw new IllegalStateException(\"The encoded string contains illegal symbol\");\n }\n }\n\n code = decoder(code, iterator);\n\n if (code.length() != 0) {\n throw new IllegalStateException(\"there is some problem with decoding.\");\n }\n\n return decode;\n }",
"public static String decodeMessage(ArrayList<Boolean> data) {\n // get each group of 8 bits and assemble into a byte\n StringBuilder text = new StringBuilder();\n int counter = 0;\n for (int j=0; j<data.size()-11; j=j+9) {\n byte ascii = 0;\n for (int i = 0; i < 10; i++) {\n // DEBUG System.out.print(data.get(i+j) ? \"1\" : \"0\");\n if (data.get(i+j)) {\n ascii = set(ascii, i);\n }\n }\n\n if (!checkParity((int)ascii) == parityChecker.get(counter)) {\n text.append(\"[PARITY ERROR]\");\n } else {\n text.append(Character.toString((char) ascii));\n }\n\n\n // DEBUG System.out.println(\" \" + ascii + \" = \" + text);\n\n counter++;\n }\n return text.toString();\n }",
"public String getDecoded()\n\t{\n\t\treturn this.decodedText;\n\t}",
"static byte[] readMessage() {\n byte[] msg = new byte[0];\n try {\n msg = Hex.decodeHex(\n \"000600000003000000017d010000\" +\n \"bb931fd17f85fb26e8209eb7af5747258163df29a7dd8f87fa7617963fcfa1aa\" +\n \"b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe0400\"\n );\n } catch (DecoderException e) {\n e.printStackTrace();\n }\n return msg;\n }",
"public static String decode (String original){\n\n // WRITE YOUR RECURSIVE CODE HERE\n int length = original.length();\n if (length == 0){\n\t\t\treturn \"\";\n\t\t}\n String decodeString = new String();\n\t\tchar a = original.charAt(0);\n\t\tif (Character.isDigit(a)){\n\t\t\tint index = a-'0';\n\t\t\tif (index == 0){\n\t\t\t\treturn decode(original.substring(2));\n\t\t\t}else{\n\t\t\t\tint preIndex = index-1; \n\t\t\t\treturn original.charAt(1)+decode(preIndex+original.substring(1));\t\n\t\t\t}\n\t\t}else{\n\t\t\treturn a + decode(original.substring(1));\n\t\t\t}\n\t\t}",
"public static void decode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n int index = BinaryStdIn.readChar();\n char c = seq[index];\n BinaryStdOut.write(seq[index]);\n\n for (int i = index; i > 0; i--)\n seq[i] = seq[i - 1];\n seq[0] = c;\n }\n BinaryStdOut.close();\n }",
"public String encode(String input) {\n String encoded = \"\";\n char[] message = input.toCharArray();\n for (int j = 0; j < message.length; j++) { //takes input into a array of chars\n encodingQueue.enqueue(message[j]);\n }\n char lastvalue =0;\n boolean islastvaluenum= false;\n for(int i=0; i<message.length;i++) {\n char character = encodingQueue.dequeue();\n if(character != ' ') { //if not a space\n String alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n if(islastvaluenum ==false) { //if last value was not a num, then proceed normally with first set of numbers\n char encodedvalue=enumerate(character,1);\n if(encodedvalue !=0) {\n islastvaluenum = true;\n lastvalue = encodedvalue;\n encoded = encoded +encodedvalue;\n }\n else {\n islastvaluenum = false;\n int shiftvalue = 5+(2*i);\n boolean charfound = false;\n char[] chararray = (alphabet.toUpperCase()).toCharArray();\n char output = 'n';\n for (int j=0;j<chararray.length;j++) { // look through the alphabet and see if character matches, then shift accordingly to shiftby\n if (charfound==false) {\n if (character == chararray[j]) {\n output = chararray[(j+chararray.length+shiftvalue)% chararray.length];\n charfound = true;\n }\n }\n }\n character = output;\n lastvalue = character;\n encoded = encoded+ character;\n }\n }\n else {\n char encodedvalue=enumerate(character,2);//if last value was a num, then proceed with second set of numbers\n if(encodedvalue !=0) {\n islastvaluenum = true;\n lastvalue = encodedvalue;\n encoded = encoded +encodedvalue;\n }\n else {\n islastvaluenum = false;\n int shiftvalue = (5+(2*i))+((lastvalue-'0')*(-2));\n boolean charfound = false;\n char[] chararray = (alphabet.toUpperCase()).toCharArray();\n char output = 'n';\n for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby\n if (charfound==false) {\n if (character == chararray[j]) {\n output = chararray[(j+chararray.length+shiftvalue)% chararray.length];\n charfound = true;\n }\n }\n }\n character = output;\n lastvalue = character;\n encoded = encoded+ character;\n }\n }\n\n }\n else{\n encoded = encoded + ' ';\n }\n }\n return encoded;\n }",
"public String decode(String encoded) {\n\t\t// TODO fill this in.\n\t\tStringBuilder output = new StringBuilder();\n\n\t\tint i = 0;\n\t\twhile (i < encoded.length()) {\n\t\t\tStringBuilder characterBuilder = new StringBuilder();\n\n\t\t\twhile (!decodingTable.containsKey(characterBuilder.toString()))\n\t\t\t\tcharacterBuilder.append(encoded.charAt(i++));\n\n\t\t\toutput.append(decodingTable.get(characterBuilder.toString()));\n\t\t}\n\n\t\treturn output.toString();\n\t}",
"public static void decode () {\n // read the input\n int firstThing = BinaryStdIn.readInt();\n s = BinaryStdIn.readString();\n char[] t = s.toCharArray();\n char[] firstColumn = new char[t.length];\n int [] next = new int[t.length];\n \n // copy array and sort\n for (int i = 0; i < t.length; i++) {\n firstColumn[i] = t[i];\n }\n Arrays.sort(firstColumn);\n \n // decode\n int N = t.length;\n int [] count = new int[256];\n \n // counts frequency of each letter\n for (int i = 0; i < N; i++) {\n count[t[i]]++;\n }\n \n int m = 0, j = 0;\n \n // fills the next[] array with appropriate values\n while (m < N) {\n int _count = count[firstColumn[m]];\n while (_count > 0) {\n if (t[j] == firstColumn[m]) {\n next[m++] = j;\n _count--;\n }\n j++;\n }\n j = 0;\n }\n \n // decode the String\n int _next = next.length;\n int _i = firstThing;\n for (int i = 0; i < _next; i++) {\n _i = next[_i];\n System.out.print(t[_i]);\n } \n System.out.println();\n }",
"private String decoder(String code, Tree iterator) {\n for (int i = 0; i < code.length(); i++) {\n String decodedChar = iterator.decode(code.substring(0, i + 1));\n\n if (decodedChar != null) {\n decode = decode + decodedChar;\n code = code.substring(i + 1);\n i = -1;\n }\n }\n\n return code;\n }",
"public static String decompress(final String treeString, final String message) {\n\n BinaryNodeInterface<Character> rootNode = new BinaryNode<Character>();\n generateTree(rootNode, treeString);\n String result = message;\n\n if (result.length() == 0) {\n return result;\n }\n\n while (result.charAt(0) == '0' || result.charAt(0) == '1') {\n result = traverse(rootNode, result);\n result = result.substring(1);\n }\n\n return result;\n }",
"@Test\n public void decodeStringDelta()\n {\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 1.0);\n assertEquals(3.0, encoder.decode(\"0011\"), 0.0);\n }\n\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 2.0);\n assertEquals(0.0, encoder.decode(\"0001\"), 2.0);\n }\n\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 0.5);\n assertEquals(3.0, encoder.decode(\"00110\"), 0.0);\n }\n }",
"public static byte[] decode(byte[] code) throws CorruptedCodeException {\r\n\tboolean end;\r\n\tbyte[] output;\r\n\tbyte m;\r\n\tbyte a;\r\n\tbyte b;\r\n\tbyte c;\r\n\tbyte d;\r\n\tint i;\r\n\tint j;\r\n\tint k;\r\n\tint l;\r\n\r\n\tl = code.length;\r\n\tend = false;\r\n\r\n\tfor (i = 0, j = 0; i < l; i++) {\r\n\t if ((code[i] < 0) || (code[i] >= REVERSE.length)) {\r\n\t\tthrow new CorruptedCodeException(\"Code was not Base64 encoded\");\r\n\t }\r\n\t m = REVERSE[code[i]];\r\n\r\n\t if (m == PAD) {\r\n\t\tif (end) {\r\n\t\t break;\r\n\t\t}\r\n\t\tend = true;\r\n\t\tcontinue;\r\n\t }\r\n\t if (end) {\r\n\t\tthrow new CorruptedCodeException(\r\n\t\t\t\"Second pad character missing!\");\r\n\t }\r\n\t if (m == F) {\r\n\t\tcontinue;\r\n\t }\r\n\t code[j++] = m;\r\n\t}\r\n\tl = j >> 2;\r\n\ti = l * 3;\r\n\tk = j & 3;\r\n\r\n\tif (k == 1) {\r\n\t throw new CorruptedCodeException(\"One character is missing!\");\r\n\t}\r\n\tif (k > 0) {\r\n\t i = (i + k) - 1;\r\n\t}\r\n\toutput = new byte[i];\r\n\r\n\ti = 0;\r\n\tj = 0;\r\n\tb = 0;\r\n\r\n\twhile (l > 0) {\r\n\t a = code[i++];\r\n\t b = code[i++];\r\n\t c = code[i++];\r\n\t d = code[i++];\r\n\r\n\t output[j++] = (byte) ((a << 2) | ((b >>> 4) & 3));\r\n\t output[j++] = (byte) (((b & 15) << 4) | ((c >>> 2) & 15));\r\n\t output[j++] = (byte) (((c & 3) << 6) | d);\r\n\t l--;\r\n\t}\r\n\tif (k >= 2) {\r\n\t a = code[i++];\r\n\t b = code[i++];\r\n\t output[j++] = (byte) ((a << 2) | ((b >>> 4) & 3));\r\n\t}\r\n\tif (k >= 3) {\r\n\t c = code[i++];\r\n\t output[j++] = (byte) (((b & 15) << 4) | ((c >>> 2) & 15));\r\n\t}\r\n\treturn output;\r\n }",
"public String deciphe(List<Integer> message) {\n\n\t String result = \"\", candidateKey= \"\", encodedKey = \"\", mapKey = \"\";\n\t boolean foundKeyPrefix = false, foundKey = false, consume = false;\n\t int subListStart = 0, subListEnd = 1; \t//Define the start and end of the candidate key, start with the smallest size (1)\n\t int lastKeyEnd = 0; \t\t\t\t\t\t//Defines the end of the last candidate key that has been recognized as a map key \n\t Iterator<String> iterator;\n\t \n\t while (subListEnd < message.size()+1) {\n\n\t \tcandidateKey = messageToKey(message.subList(subListStart, subListEnd));\n\t \tconsume = true;\n\t \t\n\t \titerator = keySet.iterator();\n\t \twhile (iterator.hasNext()) {\n\t \t\t\n\t \t\tmapKey = iterator.next();\n\t \t\tfoundKey = mapKey.equals(candidateKey);\n\t \t\tfoundKeyPrefix = mapKey.startsWith(candidateKey);\n\t \t\t\n\t \t\tif (foundKey){ \t\t\t\t\t\t\t\t\t/* CASE 1: If subList is a valid key, annotate the input position so that we can return to this point in case of not finding a larger key */\n \t\t\t\tlastKeyEnd = subListEnd;\n \t\t\t\tencodedKey = mapKey; \t\t\n\t \t\t}\n \t\t\telse if (foundKeyPrefix){ \t\t\t\t\t\t/* The current substring is a key prefix, stop searching over the map key set because larger keys have precedence */\n \t\t\t\tconsume = (subListEnd == message.size());\n \t\t\t\tbreak; \t\t\t\t\t\n\t \t\t}\n\t \t}\n \t\t\n\t\tif (consume) {\n\t\t\t\n\t\t\tif (!foundKey) {\n\n\t\t\t\tif (lastKeyEnd != 0) { \t\t\t\t\t\t/* CASE 2 */\n\t\t\t\t\t\n\t\t\t\t\tsubListEnd = lastKeyEnd;\n\t\t\t\t\tlastKeyEnd = 0;\n\t \t\t\t \tcandidateKey = messageToKey(message.subList(subListStart, subListEnd));\n\t \t\t\t\tencodedKey = this.map.get(Integer.parseInt(candidateKey)).toString();\t\t\n\t\t\t\t}\n\t \t\t\telse { \t\t\t\t\t\t\t\t\t\t/* CASE 3 */\n\t \t\t\t\t\n\t \t\t\t\tif (subListEnd > subListStart+1) subListEnd--;\t \t\t\t\n\t \t\t\t \tcandidateKey = messageToKey(message.subList(subListStart, subListEnd));\n\t \t\t\t encodedKey = candidateKey;\n\t \t\t\t}\n\t\t\t}\n\n \t\t\t/*\n \t\t\t * Update the output message and move to the next candidate key\n \t\t\t */\n\t\t\t\n\t\t\tresult = result.concat(encodedKey);\n \t\t\tsubListStart = subListEnd;\n \t\t\tsubListEnd = subListStart+1;\n\t\t}\n\t\telse {\n\t\t\tsubListEnd++;\n\t\t}\n\n\t }\n\t\n\t logger.info(\"Result: \"+result);\n\t return result;\n }",
"public static String[] getCodes(HuffmanNode node, String code, boolean wentLeft, String[] encodings, boolean isRoot) {\n //the corner case of just a single node\n if(isRoot && node.getLeft() == null && node.getRight() == null) {\n encodings[node.getInChar() - 32] = \"0\";\n return encodings;\n }\n \n //ends the recussion if the tree is empty\n if(node == null) {\n return encodings;\n }\n\n //adds the \"binary\" to the string depending on going left or right\n if(wentLeft && !isRoot) {\n code += \"0\";\n } else if (!wentLeft && !isRoot){\n code += \"1\";\n }\n\n //if it hits the end, it saves the encoding, else it splits to the left and right\n if(node.getLeft() == null && node.getRight() == null) {\n encodings[node.getInChar() - 32] = code;\n } else {\n getCodes(node.getLeft(),code,true,encodings,false);\n getCodes(node.getRight(),code,false,encodings,false);\n }\n\n return encodings;\n }",
"private static void decodeString(String in){\n\t\t//reverse anything done in encoded string\n\t\tString demess = decrypt(in);\n\t\tString decodeMessage = bigIntDecode(demess);\n\n\t\tSystem.out.println(\"Decoded message: \" + decodeMessage + \"***make function to actually decode!\");\n\t}",
"public static byte[] decode(String encoded) {\n \n if (encoded == null)\n return null;\n \n char[] base64Data = encoded.toCharArray();\n // remove white spaces\n int len = removeWhiteSpace(base64Data);\n \n if (len%FOURBYTE != 0) {\n return null;//should be divisible by four\n }\n \n int numberQuadruple = (len/FOURBYTE );\n \n if (numberQuadruple == 0)\n return new byte[0];\n \n byte decodedData[] = null;\n byte b1=0,b2=0,b3=0, b4=0, marker0=0, marker1=0;\n char d1=0,d2=0,d3=0,d4=0;\n \n int i = 0;\n int encodedIndex = 0;\n int dataIndex = 0;\n decodedData = new byte[ (numberQuadruple)*3];\n \n for (; i<numberQuadruple-1; i++) {\n \n if (!isData( (d1 = base64Data[dataIndex++]) )||\n !isData( (d2 = base64Data[dataIndex++]) )||\n !isData( (d3 = base64Data[dataIndex++]) )||\n !isData( (d4 = base64Data[dataIndex++]) ))\n return null;//if found \"no data\" just return null\n \n b1 = base64Alphabet[d1];\n b2 = base64Alphabet[d2];\n b3 = base64Alphabet[d3];\n b4 = base64Alphabet[d4];\n \n decodedData[encodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ;\n decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );\n }\n \n if (!isData( (d1 = base64Data[dataIndex++]) ) ||\n !isData( (d2 = base64Data[dataIndex++]) )) {\n return null;//if found \"no data\" just return null\n }\n \n b1 = base64Alphabet[d1];\n b2 = base64Alphabet[d2];\n \n d3 = base64Data[dataIndex++];\n d4 = base64Data[dataIndex++];\n if (!isData( (d3 ) ) ||\n !isData( (d4 ) )) {//Check if they are PAD characters\n if (isPad( d3 ) && isPad( d4)) { //Two PAD e.g. 3c[Pad][Pad]\n if ((b2 & 0xf) != 0)//last 4 bits should be zero\n return null;\n byte[] tmp = new byte[ i*3 + 1 ];\n System.arraycopy( decodedData, 0, tmp, 0, i*3 );\n tmp[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ;\n return tmp;\n } else if (!isPad( d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad]\n b3 = base64Alphabet[ d3 ];\n if ((b3 & 0x3 ) != 0)//last 2 bits should be zero\n return null;\n byte[] tmp = new byte[ i*3 + 2 ];\n System.arraycopy( decodedData, 0, tmp, 0, i*3 );\n tmp[encodedIndex++] = (byte)( b1 <<2 | b2>>4 );\n tmp[encodedIndex] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n return tmp;\n } else {\n return null;//an error like \"3c[Pad]r\", \"3cdX\", \"3cXd\", \"3cXX\" where X is non data\n }\n } else { //No PAD e.g 3cQl\n b3 = base64Alphabet[ d3 ];\n b4 = base64Alphabet[ d4 ];\n decodedData[encodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ;\n decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );\n \n }\n \n return decodedData;\n }",
"@Test\n public void decodeStringNegative()\n {\n final BinaryEncoder encoder = new BinaryEncoder(-8, 8, 1.0);\n assertThat(encoder.decode(\"0011\"), is(-5.0));\n }",
"public void findPosition(String messageToDecode) throws Exception\n {\n myEnigma.clearPlugboard();\n myEnigma.addPlug('H','L');\n myEnigma.addPlug('G','P');\n\n for(int i=0;i<25;i++)\n {\n for(int j=0;j<25;j++)\n {\n for(int k=0;k<25;k++)\n {\n BasicRotor firstRotor = new BasicRotor(\"typeV\");\n firstRotor.setPosition(i);\n myEnigma.addRotor(firstRotor,0);\n\n BasicRotor secondRotor = new BasicRotor(\"typeIII\");\n secondRotor.setPosition(j);\n myEnigma.addRotor(secondRotor,1);\n\n BasicRotor thirdRotor = new BasicRotor(\"typeII\");\n thirdRotor.setPosition(k);\n myEnigma.addRotor(thirdRotor,2);\n\n Reflector myReflector = new Reflector(\"ReflectorI\");\n myEnigma.addReflector(myReflector);\n\n String outputEnigma = myEnigma.start(messageToDecode);\n\n if(outputEnigma.contains(\"ELECTRIC\"))\n {\n System.out.println(\"Position of the first rotor: \" + i);\n System.out.println(\"Position of the second rotor: \" + j);\n System.out.println(\"Position of the third rotor: \" + k);\n System.out.println(\"Message: \" + outputEnigma);\n }\n\n }\n\n }\n }\n\n\n }",
"private byte[] decode(byte[] msg) {\r\n\t\treturn Base64.decode(msg); \r\n\t}",
"public int decodeBytes(byte[] bytes) {\n if (bytes.length < 200)\n return 0;\n\n List<Code> createdCodes = null;\n // Size of symbol is 10 bytes, so we need to shift\n for (int i = 0; i < 10; i++) {\n byte[] tempBytes = new byte[bytes.length - i];\n System.arraycopy(bytes, i, tempBytes, 0, bytes.length - i);\n\n createdCodes = Code.createCodes(tempBytes);\n\n // Counter for incorrect symbols\n int bad = 0;\n\n // Check on errors\n for (Code sign : createdCodes)\n if (sign.equals(ERROR_CODE))\n bad++;\n\n if (!(tempBytes.length / 10 - bad < 10))\n break;\n }\n\n // Message ready for further decoding?\n int headPosition = findHeadPosition(createdCodes);\n // if we've found beginning then continue decoding\n // else remove 21 bytes\n if (headPosition < 0)\n return 21;\n\n // Do we need to put back into buffer and save?\n int endPosition = findEndingPosition(createdCodes);\n // if we've found end of sequence then continue decoding\n // else remove bytes\n if (endPosition < 0) {\n if (bytes.length > 2000)\n return 50;\n\n return 0;\n }\n\n // Is DSC with expanded sequence?\n int expandPosition = findExpandPosition(\n createdCodes, endPosition + endingPattern.size()\n );\n if (expandPosition < 0 && bytes.length < 2000) {\n return 0;\n }\n\n // To the end position adds two for decoding ECC symbol\n List<Code> message = processMessage(\n createdCodes, headPosition,\n expandPosition < 0 ? endPosition + 3 : expandPosition + 3,\n expandPosition > 0\n );\n\n String decodedSymbols = message.stream().map(\n (c) -> c.getSymbol() + \"\" + \" \"\n ).reduce(\n (s1, s2) -> s1 + s2\n ).orElse(\"\");\n\n logger.info(\"Decoded symbols: \" + decodedSymbols);\n\n codeDecoder.decodeCodes(message);\n\n return (endPosition * 10 + endingPattern.size() * 10);\n }",
"private String encodeMessage() {\n\t\tString encode = \"\";\n\t\tfor (int i = 0; i < message.length(); i++) {\n\t\t\tencode += map.get(message.charAt(i));\n\t\t}\n\t\tgenerateBack();\n\t\treturn encode;\n\t}",
"String decodeString();",
"public static void decode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n int c = BinaryStdIn.readChar();\r\n char t = charAtIndex[c];\r\n BinaryStdOut.write(t);\r\n for (int i = c - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = t;\r\n index[t] = 0;\r\n }\r\n BinaryStdOut.close(); \r\n }",
"@Override\n\tpublic void decodeMsg(byte[] message) {\n\t\t\n\t\tIoBuffer buf = IoBuffer.allocate(message.length).setAutoExpand(true);\n\t\tbuf.put(message);\n\t\tbuf.flip();\n\t\t\n\t\tslaveId = buf.get();\n\t\tcode = buf.get();\n\t\toffset = buf.getShort();\n\t\tdata = buf.getShort();\n\n\t\tif(buf.remaining() >= 2)\n\t\t\tcrc16 = buf.getShort();\n\t}",
"public String decode(String encoding) {\n\t\tString decoded = \"\";\n\t\tString currCode = \"\";\n\t\tMap<String, Character> revMap = new HashMap<String, Character>();\n\t\t\n\t\t// Build hashmap from value to key\n\t\tfor (Character code: this.mapping.keySet()) {\n\t\t\trevMap.put(this.mapping.get(code), code);\n\t\t}\n\t\t\n\t\tfor (Character c: encoding.toCharArray()) {\n\t\t\tcurrCode += c;\n\t\t\tCharacter toAdd = revMap.get(currCode);\n\t\t\tif (toAdd != null) {\n\t\t\t\tdecoded += toAdd;\n\t\t\t\tcurrCode = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn decoded;\n\t}",
"@Test\n public void decodeString()\n {\n final BinaryEncoder encoder = new BinaryEncoder(16);\n assertThat(encoder.decode(\"0011\"), is(3.0));\n }",
"static public byte[] decode(String encoded) {\n if (encoded == null)\n return null;\n int lengthData = encoded.length();\n if (lengthData % 2 != 0)\n return null;\n \n char[] binaryData = encoded.toCharArray();\n int lengthDecode = lengthData / 2;\n byte[] decodedData = new byte[lengthDecode];\n byte temp1, temp2;\n for( int i = 0; i<lengthDecode; i++ ){\n temp1 = hexNumberTable[binaryData[i*2]];\n if (temp1 == -1)\n return null;\n temp2 = hexNumberTable[binaryData[i*2+1]];\n if (temp2 == -1)\n return null;\n decodedData[i] = (byte)((temp1 << 4) | temp2);\n }\n return decodedData;\n }",
"@Override\n public Message decode( String string ) throws DecodeException {\n try {\n byte[] data = EncodeUtil.decodeBase64Zipped( string );\n InputStream is = new ByteArrayInputStream( data );\n ObjectInputStream ois = new ObjectInputStream( is );\n Object o = ois.readObject();\n ois.close();\n return (Message) o;\n } catch ( Exception e ) {\n throw new RuntimeException( \"Unexpected error trying to decode object.\", e );\n }\n }",
"public String decodeChromosome()\n throws IllegalArgumentException\n {\n // clear out the decoded chromosome\n decodedChromosome.setLength(0);\n for (int i = 0; i <= chromosome.length() - 4; i += 4)\n {\n String gene = chromosome.substring(i, i + 4);\n int geneIndex = Integer.parseInt(gene, 2);\n if (geneIndex >= geneTable.length)\n {\n // skip this \"gene\" we don't know what to do with it\n continue;\n }\n else\n {\n decodedChromosome.append(geneTable[geneIndex] + \" \");\n }\n }\n if (decodedChromosome.length() == 0)\n {\n throw new IllegalArgumentException(\"Invalid chromosome: \" + chromosome.toString());\n }\n return decodedChromosome.toString();\n }",
"public Decoded decode(String barcode){\n Decoded decoded = new Decoded();\n this.barcode = barcode;\n\n decoded.barcode = barcode;\n\n if(barcode == null || barcode.isEmpty()){\n decoded.error = Error.EMPTY_BARCODE;\n return decoded;\n }\n\n // remove leading * and check\n if(barcode.startsWith(\"*\")){\n barcode = barcode.substring(1);\n if(barcode.isEmpty()){\n decoded.error = Error.EMPTY_BARCODE;\n return decoded;\n }\n }\n\n // remove trailing * and check\n if(barcode.endsWith(\"*\")){\n barcode = barcode.substring(0, barcode.length() - 1);\n if(barcode.isEmpty()){\n decoded.error = Error.EMPTY_BARCODE;\n return decoded;\n }\n }\n\n // check for + character\n if(barcode.charAt(0) != '+'){\n decoded.error = Error.BARCODE_NOT_HIBC;\n return decoded;\n } else {\n barcode = barcode.substring(1);\n }\n\n // check minimum barcode length\n if(barcode.length() < 4){\n decoded.error = Error.INVALID_BARCODE;\n return decoded;\n }\n\n String potentialCheckAndLinkCharacters = barcode.substring(barcode.length() - 2);\n barcode = barcode.substring(0, barcode.length() - 2);\n\n String[] lines = barcode.split(\"[\\\\/]\");\n\n if(lines.length == 1){\n if(Character.isLetter(lines[0].charAt(0))){\n decoded = processLine1(decoded, Type.LINE_1, lines[0] + potentialCheckAndLinkCharacters);\n } else {\n decoded = processLine2(decoded, Type.LINE_2, lines[0] + potentialCheckAndLinkCharacters);\n }\n return decoded;\n\n }else if(lines.length == 2){\n decoded = processLine1(decoded, Type.CONCATENATED, lines[0]);\n decoded = assign(decoded, processLine2(new Decoded(), Type.CONCATENATED, lines[1] + potentialCheckAndLinkCharacters));\n } else {\n decoded.error = Error.INVALID_BARCODE;\n return decoded;\n }\n\n return decoded;\n\n }",
"private String base64Decode(String token) {\n\t\t \tBase64 base64 = new Base64();\n\t \tbyte[] decodedBytes = base64.decode(token.getBytes()); \t\n\t \tString decodeString = new String(decodedBytes, Charset.forName(\"UTF-8\"));\t\t\n\t \tint index1 = decodeString.indexOf(\"3du\");\n\t \tint index2 = decodeString.indexOf(\"l0g\");\n\t \tint lengthChar = decodeString.length();\n//\t \tif(lengthChar %4 != 0) {\n//\t \t\treturn \"\";\n//\t \t}\n\t \tif((index1 < 3) & (index2 >=3))\n\t \t{\n\t \t\tlengthChar = lengthChar - 3;\n\t \t}\n\t \tif(lengthChar > 0) {\n\t \t\tdecodeString = decodeString.substring(3, lengthChar);\n\t \t} \t\n\t \treturn decodeString;\n\t\t}",
"public void findPlugs(String messageToDecode) throws Exception {\n\n myEnigma.clearPlugboard();\n char fPlugEnd1 ='D';\n char sPlugEnd1 = 'S';\n\n for(int i=0;i<26;i++)\n {\n char fPlugEnd2 = (char)(i+ 65);\n for(int j=0;j<26;j++)\n {\n char sPlugEnd2 = (char) (j + 65);\n if(myEnigma.addPlug(fPlugEnd1,fPlugEnd2))\n {\n if(myEnigma.addPlug(sPlugEnd1,sPlugEnd2))\n {\n BasicRotor firstRotor = new BasicRotor(\"typeIV\");\n firstRotor.setPosition(8);\n myEnigma.addRotor(firstRotor,0);\n\n BasicRotor secondRotor = new BasicRotor(\"typeIII\");\n secondRotor.setPosition(4);\n myEnigma.addRotor(secondRotor,1);\n\n BasicRotor thirdRotor = new BasicRotor(\"typeII\");\n thirdRotor.setPosition(21);\n myEnigma.addRotor(thirdRotor,2);\n\n Reflector myReflector = new Reflector(\"ReflectorI\");\n myEnigma.addReflector(myReflector);\n\n String outputEnigma = myEnigma.start(messageToDecode);\n\n if(outputEnigma.contains(\"GIVEMEYOURANSWERDO\"))\n {\n System.out.println(fPlugEnd1 + \" - \" + fPlugEnd2);\n System.out.println(sPlugEnd1 + \" - \" + sPlugEnd2);\n System.out.println(\"Message: \" + outputEnigma);\n }\n\n myEnigma.clearPlugboard();\n }\n\n }\n\n myEnigma.clearPlugboard();\n\n\n }\n }\n\n }",
"String convert(String msg) {\n for (int i = 0; i < msg.length(); i++) {\n if (msg.charAt(i) < 65 || msg.charAt(i) > 90) {\n throw new EnigmaException(\"Illegal input\");\n }\n }\n int index = 0;\n String result = \"\";\n while (index < msg.length()) {\n int num = msg.charAt(index) - 65;\n if (manyRotors[4].atNotch() && !manyRotors[3].atNotch()) {\n manyRotors[4].advance();\n manyRotors[3].advance();\n } else if (manyRotors[3].atNotch()) {\n manyRotors[4].advance();\n manyRotors[3].advance();\n manyRotors[2].advance();\n } else manyRotors[4].advance();\n for (int i = manyRotors.length - 1; i > 0; i--) {\n num = manyRotors[i].convertForward(num);\n }\n for (int i = 0; i < manyRotors.length; i++) {\n num = manyRotors[i].convertBackward(num);\n }\n result += String.valueOf((char) (num + 65));\n index++;\n }\n return result;\n //return null;\n // FIXME\n }",
"public static String romaCoding(String s){\n s = s.toLowerCase().replaceAll(\" \", \"\");\n StringBuffer sb = new StringBuffer(s);\n System.out.println(s);\n /**\n * Step1: Reverse the string\n */\n String step1 = sb.reverse().toString();\n System.out.println(step1);\n\n /**\n * Step2: Rail Fence Cipher Coding\n */\n String step2 = RailFenceCipher.railFenceCipherCoding(step1);\n System.out.println(step2);\n\n /**\n * Step3: Computer Key Board Coding\n */\n String step3 = \"\";\n Map<Character, Character> map = KeyBoard.getCodingMap();\n for(int i = 0; i < step2.length(); i++){\n step3 = step3 + map.get(step2.charAt(i));\n }\n System.out.println(step3);\n\n /**\n * Step4: Covert string to numbers with Nokia phone keyboard\n */\n String step4 = \"\";\n Map nokiaMap = KeyBoard.getNokiaCodingMap();\n for(int i = 0; i < step3.length(); i++){\n step4 = step4 + nokiaMap.get(step3.charAt(i)) + \"\";\n }\n System.out.println(step4);\n\n /**\n * Step5: Convert string to morse code\n */\n String step5 = \"\";\n Map morseMap = MorseCode.getMorseMap();\n for(int i = 0; i < step4.length(); i++){\n Character c = step4.charAt(i);\n step5 = step5 + morseMap.get(c) + \"/\";\n }\n System.out.println(step5);\n return step5;\n }",
"public static void main(String[] args)\n { \n Scanner in = new Scanner(System.in);\n String Another;\n do\n {\n int[] key ={};\n int keysize;\n Integer keyValue;\n String encoded = \"\", decoded = \"\", message=\"\";\n \n System.out.println(\"Please enter the message that you wish to encrypt: \");\n\t\t message = in.nextLine();\n System.out.println(\"Please enter the length of the key that you wish to use\");\n\t\t keysize = in.nextInt();\n key = new int[keysize];\n for (int index = 0; index < keysize; index++)\n\t\t\t {\n\t\t\t\tSystem.out.println(\"Please enter key index \" + (index + 1)\n\t\t\t\t\t\t+ \": \");\n\t\t\t\tkey[index] = in.nextInt();\n\t\t\t }\n \n /*String message = \"All programmers are playwrights and all \" +\n \"computers are lousy actors.\";*/\n \n System.out.println(\"\\nOriginal Message: \\n\" + message + \"\\n\");\n \n LinkedQueue<Integer> encodingQueue = new LinkedQueue<Integer>();\n\t\t LinkedQueue<Integer> decodingQueue = new LinkedQueue<Integer>();\n \n // load key queues \n for (int scan = 0; scan < key.length; scan++)\n {\n encodingQueue.enqueue(key[scan]);\n decodingQueue.enqueue(key[scan]);\n\t\t }\n \n // encode message \n for (int scan = 0; scan < message.length(); scan++)\n {\n keyValue = encodingQueue.dequeue();\n encoded += (char) (message.charAt(scan) + keyValue);\n encodingQueue.enqueue(keyValue);\n }\n \n System.out.println (\"Encoded Message:\\n\" + encoded + \"\\n\");\n \n // decode message \n for (int scan = 0; scan < encoded.length(); scan++)\n {\n keyValue = decodingQueue.dequeue();\n decoded += (char) (encoded.charAt(scan) - keyValue);\n decodingQueue.enqueue(keyValue);\n }\n \n System.out.println (\"Decoded Message:\\n\" + decoded);\n System.out.println();\n in = new Scanner(System.in);//clears the scanner buffer\n System.out.println(\"Please enter 'y' to run again, or any other character to exit: \");\n Another = in.nextLine();\n \n }\n while(Another.equalsIgnoreCase(\"Y\"));\n \n System.out.println(\"Thank you!\");\n }",
"public static String decode(String inString) throws Exception{\r\n\t\tStringBuilder decodedString = new StringBuilder();\r\n\t\tString[] splitString = inString.split(\"\\\\s\");\r\n\t\tString type = splitString[3].substring(5, splitString[3].length());\r\n\t\tString Key = splitString[4].substring(4, splitString[4].length()-1);\r\n\t\tStringBuilder temp = new StringBuilder();\r\n\t\tfor(int j=0;j<5;j++){\r\n\t\t\tdecodedString.append(splitString[j]);\r\n\t\t\tdecodedString.append(\" \");\r\n\t\t}\r\n\t\tif(type.equals(\"Caesar\")){\r\n\t\t\tString encodedString = unHex(splitString[5]);\r\n\t\t\tinString = encodedString;\r\n\t\t\tchar[] alphabet ={'a','b','c','d','e','f','g','h','i','j','k','l','m',\r\n\t\t\t\t\t'n','o','p','q','r','s','t','u','v','w','x','y','z','å','ä','ö','A','B',\r\n\t\t\t\t\t'C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W',\r\n\t\t\t\t\t'X','Y','Z','Å','Ä','Ö','0','1','2','3',\r\n\t\t\t\t\t'4','5','6','7','8','9','!','?',')','(','=','>','<','/','&','%','#','@','$','[',']'};\r\n\t\t\tint Keyint = (int) (Long.parseLong(Key,16)%alphabet.length);\r\n\t\t\tSystem.out.println(\"Here is \"+ Keyint);\r\n\t\t\tfor(int i = 0; i < inString.length(); i++){\r\n\t\t\t\tchar a = inString.charAt(i);\r\n\t\t\t\tint used = 0;\r\n\t\t\t\tfor(char b: alphabet){\r\n\t\t\t\t\tif(b==a){\r\n\t\t\t\t\t\tif(indexOf(alphabet,b)<Keyint){\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tdecodedString.append(\r\n\t\t\t\t\t\t\t\t\t\talphabet[(alphabet.length-\r\n\t\t\t\t\t\t\t\t\t\t\t\tKeyint+indexOf(alphabet,b))]);\r\n\t\t\t\t\t\t\t\tused = 1;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}catch(Exception c){\r\n\t\t\t\t\t\t\t\tSystem.out.print(c.getMessage());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tdecodedString.append(alphabet[(indexOf(alphabet,b)\r\n\t\t\t\t\t\t\t\t\t\t-Keyint)]);\r\n\t\t\t\t\t\t\t\tused = 1;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}catch(Exception c){\r\n\t\t\t\t\t\t\t\tSystem.out.print(c.getMessage());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(used==0){\r\n\t\t\t\t\tdecodedString.append(a);\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse if(type.equals(\"AES\")){\r\n\t\t\tString neuKey = unHex(Key);\r\n\t\t\tbyte[] keyContent = Base64.getDecoder().decode(neuKey);\r\n\t\t\tString encodedString = unHex(splitString[5]);\r\n\t\t\tbyte[] encoded = hexStringToByteArray(splitString[5]);\r\n\t\t\tSystem.out.println(\"This is: \"+ new String(encoded,\"UTF8\"));\r\n\t\t\tinString = encodedString;\r\n\t\t\tSecretKeySpec decodeKey = new SecretKeySpec(keyContent, \"AES\");\r\n\t\t\tCipher AEScipher = Cipher.getInstance(\"AES\");\r\n\t\t\tAEScipher.init(Cipher.DECRYPT_MODE, decodeKey);\r\n\t\t\tbyte[] decryptedData;\r\n\t\t\tdecryptedData = AEScipher.doFinal(encoded);\r\n\t\t decodedString.append(new String(decryptedData,\"UTF8\"));\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Not a valid encryption\");\r\n\t\t}\r\n\t\tdecodedString.append(splitString[splitString.length-2]);\r\n\t\tdecodedString.append(\" \");\r\n\t\tdecodedString.append(splitString[splitString.length-1]);\r\n\t\treturn decodedString.toString();\r\n\t\t\r\n\t}",
"private void printEncodedMessage() {\n System.out.print(\"\\nPrinting the encoded message\");\n System.out.print(\"\\n\" + encodedMessage + \"\\n\");\n System.out.println();\n }",
"private static String decodeString(String encoded) throws NullPointerException {\n byte[] dataDec = Base64.decode(encoded, Base64.DEFAULT);\n String decodedString = \"\";\n try {\n decodedString = new String(dataDec, \"UTF-8\");\n } catch (UnsupportedEncodingException ignored) {\n }\n return decodedString;\n }",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n byteArray0[0] = (byte)60;\n byteArray0[1] = (byte)82;\n byte byte0 = (byte) (-73);\n byteArray0[2] = (byte) (-73);\n byteArray0[3] = (byte)86;\n defaultNucleotideCodec0.iterator(byteArray0);\n byteArray0[4] = (byte)8;\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.decode(byteArray0, 3555L);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // index 3555 corresponds to encodedIndex 1781 encodedglyph length is 9\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec\", e);\n }\n }",
"@Override\n public String decryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] decMsg = new char[msg.length()];\n int actKey = key % 65536;\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n decMsg[ind] = (char) ((letter - actKey < 0) ? letter - actKey + 65536 : letter - actKey);\n }\n return new String(decMsg);\n }\n }",
"private void decoding(String cipherText)\n\t{\n\t\ttextLength = cipherText.length();\n\n\t\tdo\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer(textLength);\n\t\t\tchar currentLetter[] = cipherText.toCharArray();\n\n\t\t\tfor(int i = ZERO; i < textLength; i++)\n\t\t\t{\n\t\t\t\tif(i % TWO ==0)\n\t\t\t\tsb.append(currentLetter[i]);\n\t\t\t} // Ending bracket of for loop\n\n\t\t\tfor(int i = ZERO; i < textLength; i++)\n\t\t\t{\n\t\t\t\tif(i % TWO != ZERO)\n\t\t\t\tsb.append(currentLetter[i]);\n\t\t\t} // Ending bracket of for loop\n\n\t\t\tdecodedText = sb.toString();\n\t\t\tcipherText = decodedText;\n\t\t\tloopIntDecode++;\n\t\t}while(loopIntDecode < shiftAmount);\n\t}",
"private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) {\n byte[] srcArray = src.array();\n int srcPosition = src.arrayOffset() + src.position();\n int srcLength = src.arrayOffset() + src.limit();\n\n char[] destArray = dst.array();\n int destPosition = dst.arrayOffset() + dst.position();\n int destLength = dst.arrayOffset() + dst.limit();\n int destLengthASCII = destPosition + Math.min(srcLength - srcPosition, destLength - destPosition);\n\n // ASCII only loop\n while (destPosition < destLengthASCII && srcArray[srcPosition] >= 0) {\n destArray[destPosition++] = (char) srcArray[srcPosition++];\n }\n\n while (srcPosition < srcLength) {\n int b1 = srcArray[srcPosition];\n if (b1 >= 0) {\n // 1 byte, 7 bits: 0xxxxxxx\n if (destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 1);\n }\n destArray[destPosition++] = (char) b1;\n srcPosition++;\n } else if ((b1 >> 5) == -2) {\n // 2 bytes, 11 bits: 110xxxxx 10xxxxxx\n if (srcLength - srcPosition < 2 || destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 2);\n }\n int b2 = srcArray[srcPosition + 1];\n if (isMalformed2(b1, b2)) {\n return malformed(src, srcPosition, dst, destPosition, 2);\n }\n destArray[destPosition++] = (char) (((b1 << 6) ^ b2) ^ 0x0f80);\n srcPosition += 2;\n } else if ((b1 >> 4) == -2) {\n // 3 bytes, 16 bits: 1110xxxx 10xxxxxx 10xxxxxx\n if (srcLength - srcPosition < 3 || destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 3);\n }\n int b2 = srcArray[srcPosition + 1];\n int b3 = srcArray[srcPosition + 2];\n if (isMalformed3(b1, b2, b3)) {\n return malformed(src, srcPosition, dst, destPosition, 3);\n }\n destArray[destPosition++] = (char) (((b1 << 12) ^ (b2 << 6) ^ b3) ^ 0x1f80);\n srcPosition += 3;\n } else if ((b1 >> 3) == -2) {\n // 4 bytes, 21 bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n if (srcLength - srcPosition < 4 || destLength - destPosition < 2) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 4);\n }\n int b2 = srcArray[srcPosition + 1];\n int b3 = srcArray[srcPosition + 2];\n int b4 = srcArray[srcPosition + 3];\n int uc = ((b1 & 0x07) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3f) << 06) | (b4 & 0x3f);\n if (isMalformed4(b2, b3, b4) || !((uc >= 0x10000) && (uc <= 1114111))) {\n return malformed(src, srcPosition, dst, destPosition, 4);\n }\n destArray[destPosition++] = (char) (0xd800 | (((uc - 0x10000) >> 10) & 0x3ff));\n destArray[destPosition++] = (char) (0xdc00 | ((uc - 0x10000) & 0x3ff));\n srcPosition += 4;\n } else {\n return malformed(src, srcPosition, dst, destPosition, 1);\n }\n }\n return xflow(src, srcPosition, srcLength, dst, destPosition, 0);\n }",
"public synchronized StompFrame nextMessage() {\n String message = null;\n int messageEnd = this._stringBuf.indexOf(this._messageSeparator);\n if (messageEnd > -1) {\n message = this._stringBuf.substring(0, messageEnd + this._messageSeparator.length());\n this._stringBuf.delete(0, messageEnd+this._messageSeparator.length());\n }\n System.out.println(\"Server recieved the following message: \" + message);\n return constructMessage(message);\n }",
"private String repMessageCharacter() {\n\t\tString temp = \"\";\n\t\tString interpret = \"\";\n\t\tint messL = message.length();\n\t\tint polyL = polybius.length;\n\t\tint polyR = polybius[0].length;\n\t\tif(this.key != \"\") {\n\t\t\timpArray = new String[messL];\n\t\t\tfor(int i = 0; i < messL; i++) {\n\t\t\t\ttemp = \"\" + message.charAt(i);\n\t\t\t\tfor(int j = 0; j < polyL;j++) {\n\t\t\t\t\tfor(int k = 0; k < polyR; k++) {\n\t\t\t\t\t\tif(temp.equalsIgnoreCase(polybius[j][k])) {\n\t\t\t\t\t\t\timpArray[i] = columnRowIndex(j,k);\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\tfor(int i = 0; i < message.length(); i++) {\n\t\t\t\tinterpret += impArray[i];\n\t\t\t}\n\t\t}else {\n\t\t\tinterpret = \"\";\n\t\t}\n\t\t//System.out.println(interpret);\n\t\treturn interpret;\n\t}",
"public void encodeMessage() {\n for (int i = message.length() - 1; i >= 0; i--) {\n message.insert(i, String.valueOf(message.charAt(i)).repeat(2));\n }\n }",
"public static void decode() {\n int first = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int n = t.length();\n int[] count = new int[256 + 1];\n int[] next = new int[n];\n int i = 0;\n while (i < n) {\n count[t.charAt(i) + 1]++;\n i++;\n }\n i = 1;\n while (i < 256 + 1) {\n count[i] += count[i - 1];\n i++;\n }\n i = 0;\n while (i < n) {\n next[count[t.charAt(i)]++] = i;\n i++;\n }\n i = next[first];\n int c = 0;\n while (c < n){\n BinaryStdOut.write(t.charAt(i));\n i = next[i];\n c++;\n }\n BinaryStdOut.close();\n }",
"protected abstract byte[] getCANMessage();",
"private void back(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex==0) return;//if at start of message\r\n --iIndex;//move back one character\r\n \r\n }",
"public abstract String decryptMsg(String msg);",
"public Encoder getEncoderLeft() {return encoderLeft;}",
"public static byte[] decode(String encoded) {\n if (CommonUtil.isNull(encoded)) {\n return new byte[0];\n }\n\n char[] base64Data = encoded.toCharArray();\n // remove white spaces\n int len = removeWhiteSpace(base64Data);\n\n if (len % FOURBYTE != 0) {\n return new byte[0]; // should be divisible by four\n }\n\n int numberQuadruple = (len / FOURBYTE);\n\n if (numberQuadruple == 0) {\n return new byte[0];\n }\n\n return decode(base64Data, numberQuadruple);\n }",
"private void encodeMessage() {\n encodedMessage = \"\";\n try(BufferedReader inputBuffer = Files.newBufferedReader(inputPath)) {\n String inputLine;\n while((inputLine = inputBuffer.readLine()) != null) {\n //walks the input message and builds the encode message\n for(int i = 0; i < inputLine.length(); i++) {\n encodedMessage = encodedMessage + codeTable[inputLine.charAt(i)];\n }\n encodedMessage = encodedMessage + codeTable[10];\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //writes to the output file\n try(BufferedWriter outputBuffer = Files.newBufferedWriter(outputPath)) {\n outputBuffer.write(encodedMessage, 0, encodedMessage.length());\n outputBuffer.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"public String decode(String message, int groupLength)\n\t{\n\t\tString value = null;\n\n\t\ttry\n\t\t{\n\t\t\tvalue = decode(new StringReader(message), groupLength);\n\t\t}\n\t\tcatch (IOException ioe)\n\t\t{\n\t\t\t// this should NEVER happen with a StringReader\n\t\t\tassert(false);\n\t\t\tioe.printStackTrace();\n\t\t}\n\n\t\treturn value;\n\t}",
"@Override\n public String decode(File fileName) throws IOException\n {\n HuffmanEncodedResult result = readFromFile(fileName);\n StringBuilder stringBuilder = new StringBuilder();\n\n BitSet bitSet = result.getEncodedData();\n\n for (int i = 0; bitSet.length() - 1 > i; )\n {\n Node currentNode = result.getRoot();\n while (!currentNode.isLeaf())\n {\n if (bitSet.get(i))\n {\n currentNode = currentNode.getLeftChild();\n }\n else\n {\n currentNode = currentNode.getRightChild();\n }\n i++;\n }\n stringBuilder.append(currentNode.getCharacter());\n }\n return stringBuilder.toString();\n }",
"IMessage decode(byte[] data) throws InvalidMessageException;",
"private String decodeFile(String encodedFileName, int bit) throws Exception{\r\n\r\n\t\tdouble maxSize = Math.pow(2, bit);\r\n\r\n\t\t//InputStream and Reader to read the encoded file\r\n\t\tInputStream fileEncoded = new FileInputStream(encodedFileName);\r\n\t\tReader reader = new InputStreamReader(fileEncoded,\"UTF-16BE\");\r\n\t\tReader br = new BufferedReader(reader);\r\n\t\tint tableSize = 255;\r\n\r\n\t\tList<Integer> encodedList = new ArrayList<Integer>();\r\n\t\tdouble fileData = 0;\r\n\t\twhile((fileData = br.read())!=-1){\r\n\t\t\tencodedList.add((int)fileData);\r\n\t\t}\r\n\t\tbr.close();\r\n\r\n\t\t//Map to store the Character in a HashMap and then compare it to check the key or Value\r\n\t\tMap<Integer, String> charTable = new HashMap<Integer,String>();\r\n\t\tfor(int i =0; i<=255;i++){\r\n\t\t\tcharTable.put( i, \"\" + (char)i);\r\n\t\t}\r\n\t\t//Implementing the LZW algorithm\r\n\t\tString encodeValue = encodedList.get(0).toString();\r\n\t\tStringBuffer decodedStringBuffer = new StringBuffer();\r\n\r\n\t\tfor (int key:encodedList) {\r\n\r\n\t\t\tString value = \"\";\r\n\t\t\tif (charTable.containsKey(key))\r\n\t\t\t{\t//Storing the string from the HashMap to value\r\n\t\t\t\tvalue = charTable.get(key);\r\n\t\t\t}\r\n\t\t\telse if (key == tableSize)\r\n\t\t\t{//Append if key==tablesize to value\r\n\t\t\t\tvalue = encodeValue + encodeValue.charAt(0);\r\n\t\t\t}\r\n\t\t\tdecodedStringBuffer.append(value);\r\n\r\n\t\t\tif(tableSize < maxSize )\r\n\t\t\t{\t//If not present then checking tablesize with maxsize and adding into the HashMap\r\n\t\t\t\tcharTable.put(tableSize++, encodeValue + value.charAt(0));\r\n\t\t\t}\r\n\t\t\tencodeValue = value;\r\n\t\t}\r\n\t\t//Return the decodedStringBuffer which contains the decoded values\r\n\t\treturn decodedStringBuffer.toString();\r\n\t}",
"public String processSeq (String seq)\n {\n\n\n unknownStatus = 0; // reinitialize this to 0\n\n // take out any spaces and numbers\n StringBuffer tempSeq = new StringBuffer(\"\");;\n for (int i = 0; i < seq.length(); i++)\n {\n if (Character.isLetter(seq.charAt(i)))\n tempSeq.append(seq.charAt(i));\n else\n continue;\n }\n seq = tempSeq.toString();\n\n if (seq.length() > 0)\n {\n\n // the three 5'3' reading frame translations\n\n String fiveThreeFrame1 = match (seq);\n String fiveThreeFrame2 = match (seq.substring(1, seq.length()));\n String fiveThreeFrame3 = match (seq.substring(2, seq.length()));\n\n \n\n // reverse and complement the string seq and rename rev\n\n String rev = \"\";\n for (int i = 0; i < seq.length(); i++)\n {\n // the unambiguous nucleotides\n if (seq.charAt(i) == 'A')\n rev = \"U\" + rev;\n else if ((seq.charAt(i) == 'U') || (seq.charAt(i) == 'T'))\n rev = \"A\" + rev;\n else if (seq.charAt(i) == 'C')\n rev = \"G\" + rev;\n else if (seq.charAt(i) == 'G')\n rev = \"C\" + rev;\n else // any other non-nucleotides\n rev = String.valueOf (seq.charAt(i)) + rev;\n }\n\n\n // the three 3'5' reading frame translations\n\n String threeFiveFrame1 = match (rev); \n String threeFiveFrame2 = match (rev.substring(1, rev.length()));\n String threeFiveFrame3 = match (rev.substring(2, rev.length()));\n\n return (\"5'3' Frame1: \" + \"<BR>\" + fiveThreeFrame1 + \n \"<BR><BR>5'3' Frame2: \" + \"<BR>\" + fiveThreeFrame2 +\n \"<BR><BR>5'3' Frame3: \" + \"<BR>\" + fiveThreeFrame3 +\n \"<BR><BR>3'5' Frame1: \" + \"<BR>\" + threeFiveFrame1 +\n \"<BR><BR>3'5' Frame2: \" + \"<BR>\" + threeFiveFrame2 +\n \"<BR><BR>3'5' Frame3: \" + \"<BR>\" + threeFiveFrame3 + \"<BR>\");\n }\n\n return \"\";\n }",
"public String decode(String cipher)\n {\n \treturn null;\n }",
"public String readNwrite() {\n if (encoded) {\n try {\n msgEncoded = Files.readAllLines(msgEncodedPath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n for (String line : msgEncoded) {\n try {\n Files.writeString(msgClearPath, transCoder.decodeMsg(line) + System.lineSeparator(), StandardOpenOption.CREATE, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return \"Votre message à bien été décodé, retrouvez le ici : \" + msgClearPath;\n } else {\n try {\n msgClear = Files.readAllLines(msgClearPath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n for (String line : msgClear) {\n try {\n Files.writeString(msgEncodedPath, transCoder.encodeMsg(line) + System.lineSeparator(), StandardOpenOption.CREATE, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return \"Votre message à bien été codé, retrouvez le ici : \" + msgEncodedPath;\n }\n }",
"protected String decodeByte(String given) {\n if (given == null || given.length() % 8 != 0 || given.isEmpty()) {\n return \"\";\n }\n StringBuilder source = new StringBuilder(given);\n StringBuilder target = new StringBuilder();\n while (source.length() > 0) {\n String pair = source.substring(0, 2);\n source.delete(0, 2);\n if (pair.charAt(0) == pair.charAt(1)) {\n target.append(pair.charAt(0));\n } else {\n target.append(\"?\");\n }\n }\n if (target.substring(0,4).contains(\"?\")) {\n target = new StringBuilder(decodeByteWithParity(target.toString()));\n }\n while (target.length() > 3) {\n target.deleteCharAt(target.length() - 1);\n }\n\n return target.toString();\n }",
"public String cipher() {\n int[] r1taps = {13, 16, 17, 18};\n int[] r2taps = {20, 21};\n int[] r3taps = {7, 20, 21, 22};\n\n // Set register size and majority bits\n final int R1 = 19;\n final int R1M = 8;\n final int R2 = 22;\n final int R2M = 10;\n final int R3 = 23;\n final int R3M = 10;\n\n // Initialize variables\n String bs = \"\";\n byte[] key = HexStringToBytes(symKey);\n BitSet keySet = new BitSet();\n BitSet keyStream = new BitSet();\n BitSet messageSet = new BitSet();\n\n // Create a byte array length of sample message\n byte[] messageArray = new byte[message.length()];\n\n // Convert the sample message to a byte array\n try {\n messageArray = message.getBytes(\"ISO-8859-1\");\n } catch (Exception e) {\n System.out.println(\"Error: \" + e);\n }\n\n // Convert message sample byte array to string\n String as = \"\";\n for (int i = 0; i < messageArray.length; i++) {\n byte b1 = messageArray[i];\n String s = String.format(\"%8s\", Integer.toBinaryString(b1 & 0xFF))\n .replace(' ', '0');\n as += s;\n }\n\n // Convert string of bits to a BitSet\n messageSet = BitStringToBitSet(as);\n\n // Creates string from key byte array\n for (int i = 0; i < 8; i++) {\n byte b1 = key[i];\n String s = String.format(\"%8s\", Integer.toBinaryString(b1 & 0xFF))\n .replace(' ', '0');\n bs += s;\n }\n\n // Convert string of bits to a BitSet\n keySet = BitStringToBitSet(bs);\n\n // Initialize registers\n BitSet r1 = new BitSet();\n BitSet r2 = new BitSet();\n BitSet r3 = new BitSet();\n\n // Process key into registers\n for (int i = 0; i < 64; i++) {\n r1 = ShiftSet(r1, R1, keySet.get(i) ^ Tap(r1, r1taps));\n r2 = ShiftSet(r2, R2, keySet.get(i) ^ Tap(r2, r2taps));\n r3 = ShiftSet(r3, R3, keySet.get(i) ^ Tap(r3, r3taps));\n }\n\n // Clock additional 100 times for additional security (GSM standard)\n for (int i = 0; i < 100; i++) {\n int maj = 0;\n boolean[] ar = {false, false, false};\n if (r1.get(R1M) == true) {\n ar[0] = true;\n maj += 1;\n }\n if (r2.get(R2M) == true) {\n ar[1] = true;\n maj += 1;\n }\n if (r3.get(R3M) == true) {\n ar[2] = true;\n maj += 1;\n }\n // If majority is false (0 bit)\n if (maj <= 1) {\n if (ar[0] == false) {\n r1 = ShiftSet(r1, R1, Tap(r1, r1taps));\n }\n if (ar[1] == false) {\n r2 = ShiftSet(r2, R2, Tap(r2, r2taps));\n }\n if (ar[2] == false) {\n r3 = ShiftSet(r3, R3, Tap(r3, r3taps));\n }\n // Else majority is true\n } else {\n if (ar[0] == true) {\n r1 = ShiftSet(r1, R1, Tap(r1, r1taps));\n }\n if (ar[1] == true) {\n r2 = ShiftSet(r2, R2, Tap(r2, r2taps));\n }\n if (ar[2] == true) {\n r3 = ShiftSet(r3, R3, Tap(r3, r3taps));\n }\n }\n }\n\n // Create keystream as long as the sample message\n for (int i = 0; i < message.length() * 8; i++) {\n\n // Get keystream bit\n keyStream.set(i, r1.get(R1 - 1) ^ r2.get(R2 - 1) ^ r3.get(R3 - 1));\n\n // Shift majority registers\n int maj = 0;\n boolean[] ar = {false, false, false};\n if (r1.get(R1M) == true) {\n ar[0] = true;\n maj += 1;\n }\n if (r2.get(R2M) == true) {\n ar[1] = true;\n maj += 1;\n }\n if (r3.get(R3M) == true) {\n ar[2] = true;\n maj += 1;\n }\n // If majority is false (0 bit)\n if (maj <= 1) {\n if (ar[0] == false) {\n r1 = ShiftSet(r1, R1, Tap(r1, r1taps));\n }\n if (ar[1] == false) {\n r2 = ShiftSet(r2, R2, Tap(r2, r2taps));\n }\n if (ar[2] == false) {\n r3 = ShiftSet(r3, R3, Tap(r3, r3taps));\n }\n // Else majority is true\n } else {\n if (ar[0] == true) {\n r1 = ShiftSet(r1, R1, Tap(r1, r1taps));\n }\n if (ar[1] == true) {\n r2 = ShiftSet(r2, R2, Tap(r2, r2taps));\n }\n if (ar[2] == true) {\n r3 = ShiftSet(r3, R3, Tap(r3, r3taps));\n }\n }\n\n }\n\n // XOR the message with the created keystream and return as string\n messageSet.xor(keyStream);\n return BitStringToText(ReturnSet(messageSet, message.length() * 8));\n }",
"@Test void longerMessage() {\n\t\tString message = \" ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ\" +\n\t\t\t\t\" ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t\tAztecCode marker = new AztecEncoder().addUpper(message).fixate();\n\t\tclearMarker(marker);\n\n\t\tassertTrue(new AztecDecoder().process(marker));\n\t\tassertEquals(message, marker.message);\n\t}",
"public String buildTreeFromMessage(){\n parseMsg();\n if(printOCCTable)printTable();\n constructTree();\n reconstructTree();\n if(printHuffTree)\n printTree();\n return printBFSTree();\n }",
"@Test\n public void testEncodeDecodeBase64() {\n ///////////////////////////////\n // plaintext=\"Text to convert.\";\n plaintext=\"ABCDEFGHIJKLMNOPQRSTUPVWYZ123456789\";\n /////////////////////////////////\n System.out.println(\"Convert following text: \"+plaintext);\n \n System.out.println(\"::encodeBase64::\");\n \n byte[] plaindata = plaintext.getBytes();\n byte[] tmp = Base64Encoder.encodeBase64(plaindata);\n this.storeEncoding=new String(tmp);\n System.out.println(storeEncoding);\n System.out.println(\"::decodeBase64::\");\n byte[] base64Message = this.storeEncoding.getBytes();\n byte[] expResult = plaindata;\n byte[] result = Base64Encoder.decodeBase64(base64Message);\n String decodedText=new String(result);\n System.out.println(\"Decoded Text: \"+decodedText);\n assertArrayEquals(expResult, result);\n }",
"private String decodageCesar(String text) {\n if (text == null || text.equals(\"\")) {\n throw new AssertionError(\"Aucun texte n'est saisie\");\n }\n String decoding = decodageMot(text);\n SubstCipher decodingText = new SubstCipher(this.shiftAlea);\n decodingText.ensureNegativeShift();\n decodingText.buildShiftedTextFor(decoding);\n return decodingText.getLastShiftedText();\n }",
"private static java.lang.String m25224a(java.lang.String r7, java.lang.String r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"\";\n r1 = \"\\\\?\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r2 = 1;\n if (r1 <= r2) goto L_0x0033;\n L_0x000c:\n r7 = r7[r2];\n r1 = \"&\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r3 = 0;\n r4 = r0;\n r0 = 0;\n L_0x0018:\n if (r0 >= r1) goto L_0x0032;\n L_0x001a:\n r5 = r7[r0];\n r6 = \"=\";\n r5 = r5.split(r6);\n r6 = r5.length;\n if (r6 <= r2) goto L_0x002f;\n L_0x0025:\n r6 = r5[r3];\n r6 = r6.equals(r8);\n if (r6 == 0) goto L_0x002f;\n L_0x002d:\n r4 = r5[r2];\n L_0x002f:\n r0 = r0 + 1;\n goto L_0x0018;\n L_0x0032:\n r0 = r4;\n L_0x0033:\n r7 = \"UTF-8\";\t Catch:{ Exception -> 0x003a }\n r7 = java.net.URLDecoder.decode(r0, r7);\t Catch:{ Exception -> 0x003a }\n goto L_0x003b;\n L_0x003a:\n r7 = r0;\n L_0x003b:\n return r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.leanplum.messagetemplates.BaseMessageDialog.a(java.lang.String, java.lang.String):java.lang.String\");\n }",
"private static void buildNewEncodingTableUtil(Node root , Map<Character,String> newTable , List<Character> path) {\n\t\t\n\t\tif(root!=null) {\n\t\t\t\n\t\t\tif(root.left==null && root.right==null) {//Leaf.. Put the sequence into the map.\n\t\t\t\t\n\t\t\t\tString encoding = path.stream().map(e->e.toString()).collect(Collectors.joining()); //Good stuff\n//\t\t\t\tSystem.out.println(\"--encoding : \" + encoding);\n\t\t\t\tnewTable.put(root.data, encoding);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpath.add('0');\n\t\t\t\tbuildNewEncodingTableUtil(root.left, newTable, path);\n\t\t\t\tpath.remove(path.size()-1);\n\t\t\t\tpath.add('1');\n\t\t\t\tbuildNewEncodingTableUtil(root.right, newTable, path);\n\t\t\t\tpath.remove(path.size()-1);\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"@Override\n protected String decodeFragment(String encodedFragment) {\n return encodedFragment;\n }",
"public String decode(Reader input) throws IOException\n\t{\n\t\treturn decode(input, 0);\n\t}",
"private common.messages.KVMessage receiveMessage() throws IOException {\r\n\t\t\r\n\t\tint index = 0;\r\n\t\tbyte[] msgBytes = null, tmp = null;\r\n\t\tbyte[] bufferBytes = new byte[BUFFER_SIZE];\r\n\t\t\r\n\t\t/* read first char from stream */\r\n\t\tbyte read = (byte) input.read();\t\r\n\t\tboolean reading = true;\r\n\t\t\r\n//\t\tlogger.info(\"First Char: \" + read);\r\n//\t\tCheck if stream is closed (read returns -1)\r\n//\t\tif (read == -1){\r\n//\t\t\tTextMessage msg = new TextMessage(\"\");\r\n//\t\t\treturn msg;\r\n//\t\t}\r\n\r\n\t\twhile(/*read != 13 && */ read != 10 && read !=-1 && reading) {/* CR, LF, error */\r\n\t\t\t/* if buffer filled, copy to msg array */\r\n\t\t\tif(index == BUFFER_SIZE) {\r\n\t\t\t\tif(msgBytes == null){\r\n\t\t\t\t\ttmp = new byte[BUFFER_SIZE];\r\n\t\t\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, 0, BUFFER_SIZE);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttmp = new byte[msgBytes.length + BUFFER_SIZE];\r\n\t\t\t\t\tSystem.arraycopy(msgBytes, 0, tmp, 0, msgBytes.length);\r\n\t\t\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, msgBytes.length,\r\n\t\t\t\t\t\t\tBUFFER_SIZE);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmsgBytes = tmp;\r\n\t\t\t\tbufferBytes = new byte[BUFFER_SIZE];\r\n\t\t\t\tindex = 0;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\t/* only read valid characters, i.e. letters and constants */\r\n\t\t\tbufferBytes[index] = read;\r\n\t\t\tindex++;\r\n\t\t\t\r\n\t\t\t/* stop reading is DROP_SIZE is reached */\r\n\t\t\tif(msgBytes != null && msgBytes.length + index >= DROP_SIZE) {\r\n\t\t\t\treading = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* read next char from stream */\r\n\t\t\tread = (byte) input.read();\r\n\t\t}\r\n\t\t\r\n\t\tif(msgBytes == null){\r\n\t\t\ttmp = new byte[index];\r\n\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, 0, index);\r\n\t\t} else {\r\n\t\t\ttmp = new byte[msgBytes.length + index];\r\n\t\t\tSystem.arraycopy(msgBytes, 0, tmp, 0, msgBytes.length);\r\n\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, msgBytes.length, index);\r\n\t\t}\r\n\t\t\r\n\t\tmsgBytes = tmp;\r\n\t\t\r\n\t\t/* build final String */\r\n\t\tcommon.messages.KVMessage msg = new common.messages.KVAdminMessage(msgBytes);\r\n\t\tlogger.debug(\"RECEIVE \\t<\" \r\n\t\t\t\t+ clientSocket.getInetAddress().getHostAddress() + \":\" \r\n\t\t\t\t+ clientSocket.getPort() + \">: '\" \r\n\t\t\t\t+ msg.getMsg().trim() + \"'\");\r\n\t\treturn msg;\r\n }",
"@Test\n public void testEncodingNegative()\n {\n byte[] orginalBytes = sensitiveString.getBytes();\n byte[] encoded = StateUtils.encode(orginalBytes);\n encoded[1] = (byte) 9;\n try\n {\n byte[] decoded = StateUtils.decode(encoded);\n Assertions.assertFalse(Arrays.equals(decoded, orginalBytes));\n }\n catch (Exception e)\n {\n // do nothing\n }\n }",
"private char next(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex>=iMessage.length()) return NONE;//return no character if beyond end of the message\r\n return iMessage.charAt(iIndex++);//return current character and advance to next\r\n \r\n }",
"int decode()\n throws IOException {\n final int start = _in.getBytesRead() - 4;\n \n _callback.objectStart();\n while ( decodeElement() );\n _callback.objectDone();\n \n final int read = _in.getBytesRead() - start;\n\n if ( read != _in._length ) {\n //throw new IllegalArgumentException( \"bad data. lengths don't match \" + read + \" != \" + len );\n }\n\n return _in._length;\n }",
"public String decode(String cipherText){\n String decodedMsg = cipherText;\n for(int i=0;i<n;i++)\n decodedMsg = reShuffle(decodedMsg);\n return decodedMsg;\n }",
"@Test\n\tvoid testDecodeString() {\n\t\tassertEquals(\"aaabcbc\", new DecodeString().decodeString(\"3[a]2[bc]\"));\n\t\tassertEquals(\"accaccacc\", new DecodeString().decodeString(\"3[a2[c]]\"));\n\t\tassertEquals(\"abcabccdcdcdef\", new DecodeString().decodeString(\"2[abc]3[cd]ef\"));\n\t\tassertEquals(\"absabcabccdcdcdef\", new DecodeString().decodeString(\"abs2[abc]3[cd]ef\"));\n\t\tassertEquals(\"f\", new DecodeString().decodeString(\"f\"));\n\t\tassertEquals(\"\", new DecodeString().decodeString(\"\"));\n\t\tassertEquals(\"abababababababababababab\", new DecodeString().decodeString(\"12[ab]\"));\n\t}",
"public String decode(String cipher)\n\t {\n\t \treturn null;\n\t }",
"@Override\n public Frame decodeNextByte(byte nextByte) {\n if (nextByte == '\\u0000') { // Fixme changed to \\u0000 and not \\n\n String result = new String(bytes, 0, len, StandardCharsets.UTF_8);\n len = 0;\n return createFrame(result);\n }\n\n pushByte(nextByte);\n return null; //not a line yet\n }",
"private static void decode(String encodeFilename, String decodeFilename) {\n ObjectReader reader = new ObjectReader(encodeFilename); // create an ObjectReader object\n BinaryTrie binaryTrie = (BinaryTrie) reader.readObject(); // read the Huffman encoding trie from encoded file\n int numSymbols = (int) reader.readObject(); // read the number of symbols\n BitSequence allBitsequences = (BitSequence) reader.readObject(); // read the single huge encoded Bitsequence\n\n char[] chars = new char[numSymbols]; // create a char array to store all the decoded symbols\n int readBits = 0; // count the read bits\n for (int i = 0; i < numSymbols; i++) { // repeat until there are no symbols\n // create a new Bitsequence containing the remaining unmatched bits\n BitSequence remainingBits = allBitsequences.allButFirstNBits(readBits);\n Match m = binaryTrie.longestPrefixMatch(remainingBits); // find a longest prefix match on the Bitsequence\n chars[i] = m.getSymbol(); // add the matched symbol to the chars array\n readBits += m.getSequence().length();\n }\n\n writer(decodeFilename, chars); // write the symbol array into the given file decodeFilename\n }",
"private String[] decode(String encoding) {\n ArrayList<String> components = new ArrayList<String>();\n StringBuilder builder = new StringBuilder();\n int index = 0;\n int length = encoding.length();\n while (index < length) {\n char currentChar = encoding.charAt(index);\n if (currentChar == SEPARATOR_CHAR) {\n if (index + 1 < length && encoding.charAt(index + 1) == SEPARATOR_CHAR) {\n builder.append(SEPARATOR_CHAR);\n index += 2;\n } else {\n components.add(builder.toString());\n builder.setLength(0);\n index++;\n }\n } else {\n builder.append(currentChar);\n index++;\n }\n }\n components.add(builder.toString());\n return components.toArray(new String[components.size()]);\n }",
"@Test\n\tpublic void testDecodeEncodeXML() {\n\n\t\tfinal DX_XC_Cuvol msg = new DX_XC_Cuvol();\n\n\t\tfinal ByteBuffer source = ByteBuffer.wrap(baXC1);\n\n\t\tsource.get(); // position + 1\n\n\t\tmsg.decodeXML(source);\n\n\t\tfinal ByteBuffer target = ByteBuffer.allocate(baXC1.length);\n\n\t\ttarget.put((byte) '%'); // position + 1\n\n\t\tmsg.encodeXML(target);\n\n\t\tSystem.out.println(new String(target.array()));\n\n\t\tfinal byte[] arraySource = source.array();\n\t\tfinal byte[] arrayTarget = target.array();\n\n\t\tSystem.out.println(\"source=\" + new String(arraySource));\n\t\tSystem.out.println(\"target=\" + new String(arrayTarget));\n\n\t\tassertTrue(Arrays.equals(arraySource, arrayTarget));\n\n\t}",
"public String getCodedMessage(){\r\n return codedMessage;\r\n }",
"private String base64Decode(String xmlAsBase64String, String xmlEncoding) throws UnsupportedEncodingException {\r\n\r\n byte[] xmlAsBase64 = Base64.decodeBase64(xmlAsBase64String.getBytes(\"ascii\"));\r\n\r\n return new String(xmlAsBase64, xmlEncoding);\r\n }",
"protected abstract int decodeLength ();",
"public String readMessage() {\r\n return new String(readMessageAsByte());\r\n }",
"public static String decode(String decode, String decodingName) {\r\n\t\tString decoder = \"\";\r\n\t\tif (decodingName.equalsIgnoreCase(\"base64\")) {\r\n\t\t\tbyte[] decoded = Base64.decodeBase64(decode);\r\n\t\t\ttry {\r\n\t\t\t\tdecoder = new String(decoded, \"UTF-8\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\t\t} else if (decodingName.equalsIgnoreCase(\"PBEWithMD5AndDES\")) {\r\n\t\t\t// Key generation for enc and desc\r\n\t\t\tKeySpec keySpec = new PBEKeySpec(secretKey.toCharArray(), salt, iterationCount);\r\n\t\t\tSecretKey key;\r\n\t\t\ttry {\r\n\t\t\t\tkey = SecretKeyFactory.getInstance(\"PBEWithMD5AndDES\").generateSecret(keySpec);\r\n\t\t\t\t// Prepare the parameter to the ciphers\r\n\t\t\t\tAlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);\r\n\t\t\t\t// Decryption process; same key will be used for decr\r\n\t\t\t\tdcipher = Cipher.getInstance(key.getAlgorithm());\r\n\t\t\t\tdcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);\r\n\t\t\t\tif (decode.indexOf(\"(\", 0) > -1) {\r\n\t\t\t\t\tdecode = decode.replace('(', '/');\r\n\t\t\t\t}\r\n\t\t\t\tbyte[] enc = Base64.decodeBase64(decode);\r\n\t\t\t\tbyte[] utf8 = dcipher.doFinal(enc);\r\n\t\t\t\tString charSet = \"UTF-8\";\r\n\t\t\t\tString plainStr = new String(utf8, charSet);\r\n\t\t\t\treturn plainStr;\r\n\t\t\t} catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException\r\n\t\t\t\t\t| InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException\r\n\t\t\t\t\t| IOException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\t\t} else if (decodingName.equalsIgnoreCase(\"DES/ECB/PKCS5Padding\")) {\r\n\t\t\t// Get a cipher object.\r\n\t\t\tCipher cipher;\r\n\t\t\ttry {\r\n\t\t\t\tcipher = Cipher.getInstance(\"DES/ECB/PKCS5Padding\");\r\n\t\t\t\tcipher.init(Cipher.DECRYPT_MODE, generateKey());\r\n\t\t\t\t// decode the BASE64 coded message\r\n\t\t\t\tBASE64Decoder decoder1 = new BASE64Decoder();\r\n\t\t\t\tbyte[] raw = decoder1.decodeBuffer(decode);\r\n\t\t\t\t// decode the message\r\n\t\t\t\tbyte[] stringBytes = cipher.doFinal(raw);\r\n\t\t\t\t// converts the decoded message to a String\r\n\t\t\t\tdecoder = new String(stringBytes, \"UTF8\");\r\n\t\t\t} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | IOException\r\n\t\t\t\t\t| IllegalBlockSizeException | BadPaddingException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn decoder;\r\n\t}",
"public void HuffmanCode()\n {\n String text=message;\n /* Count the frequency of each character in the string */\n //if the character does not exist in the list add it\n for(int i=0;i<text.length();i++)\n {\n if(!(c.contains(text.charAt(i))))\n c.add(text.charAt(i));\n } \n int[] freq=new int[c.size()];\n //counting the frequency of each character in the text\n for(int i=0;i<c.size();i++)\n for(int j=0;j<text.length();j++)\n if(c.get(i)==text.charAt(j))\n freq[i]++;\n /* Build the huffman tree */\n \n root= buildTree(freq); \n \n }",
"public String decrypt(String msg) {\n if (map == null) {\n getMapping();\n }\n\n // Find cipher match\n String ch = \"\";\n for (int j = 0; j < map.length; j++) {\n if ((map[j][0] + \"\").equals(msg)) {\n ch = (char)j + \"\";\n }\n }\n\n return ch;\n }"
] | [
"0.66275716",
"0.6413177",
"0.63858366",
"0.609118",
"0.591569",
"0.58386",
"0.58059365",
"0.5455758",
"0.5390628",
"0.5340612",
"0.5323122",
"0.5320734",
"0.53083193",
"0.51757205",
"0.5133429",
"0.50807405",
"0.5075929",
"0.5074009",
"0.5072767",
"0.5058519",
"0.50470257",
"0.50317425",
"0.49895394",
"0.4979149",
"0.4978214",
"0.49655613",
"0.49648085",
"0.49601382",
"0.49551535",
"0.49457464",
"0.49457386",
"0.4924427",
"0.49192244",
"0.4883347",
"0.48775756",
"0.48765576",
"0.4872186",
"0.48294687",
"0.48189488",
"0.48080304",
"0.480034",
"0.47787634",
"0.47745985",
"0.47546273",
"0.4752809",
"0.4736404",
"0.4733455",
"0.4707149",
"0.4674971",
"0.4667096",
"0.46651435",
"0.465236",
"0.46294418",
"0.46144202",
"0.46086517",
"0.46041337",
"0.4580499",
"0.4577099",
"0.4575213",
"0.45584387",
"0.45569903",
"0.45463452",
"0.45298603",
"0.45173338",
"0.45093912",
"0.45083693",
"0.45067126",
"0.4502664",
"0.45002285",
"0.44993997",
"0.44911867",
"0.44860107",
"0.4468867",
"0.44642943",
"0.44636783",
"0.44579214",
"0.4450839",
"0.44389194",
"0.44371894",
"0.44333857",
"0.44285005",
"0.4422293",
"0.4421966",
"0.4412787",
"0.44062316",
"0.44043306",
"0.44011772",
"0.43948275",
"0.43902946",
"0.43824553",
"0.43807328",
"0.43713802",
"0.4367307",
"0.43623132",
"0.43531662",
"0.4352217",
"0.43387896",
"0.43382248",
"0.43285224",
"0.43223596"
] | 0.7325749 | 0 |
This is the main function which does all the execution. | public static void main(String[] args)
{
Huffman tree= new Huffman();
Scanner sc=new Scanner(System.in);
noOfFrequencies=sc.nextInt();
// It adds all the user input values in the tree.
for(int i=1;i<=noOfFrequencies;i++)
{
String temp=sc.next();
tree.add(temp,sc.next());
}
int lengthToDecode=sc.nextInt();
String encodedValue=sc.next();
// This statement decodes the encoded values.
tree.getDecodedMessage(encodedValue);
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main() {\n \n }",
"public static void main()\n\t{\n\t}",
"public static void main(){\n\t}",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public static void main() {\n }",
"public static void main(String[] args) {\n \n \n \n \n }",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public static void main(String[] args) {\n \n \n \n\t}",
"public static void main(String[] args) {\r\n// Use for unit testing\r\n }",
"public void main(){\n }",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"public static void main(String... args) {\n doMain().run();\n }",
"public static void main (String args[]) {\n\t\t\n }",
"public static void main (String []args){\n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String args[]){\n\t\t\n\t\n\t}",
"public static void main(String[] args) {\n \n\n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \r\n\t}",
"public static void main(String[] args){\n\t\t\n\t\t\n \t}",
"public Main() {\n \n \n }",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args)\r\t{",
"public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String []args){\n\n }",
"public static void main(String args[]) throws IOException {\r\n\t\t\r\n\t}",
"public static void main(String []args){\n }",
"public static void main(String []args){\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}",
"public static void main(String args[]){\n \t\n \t\n }",
"public static void main (String[] args) {\r\n\t\t \r\n\t\t}",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\t\n\t\t\n\t}",
"public static void main(String args[]){\n\t\t\n\t}",
"public static void main(String[] args) {\n\n experiment();\n }",
"public static void main(String[] args) {\n \n\t}",
"public void Main(){\n }",
"public static void main (String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\n ArrayClone();\n //ArrayToString();\n //ArrayReverse();\n\n //ForToForeach();\n //SaveOurRAM();\n\n //Homework_Example_1();\n //Homework_Example_2();\n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}",
"public static void main (String[]args) throws IOException {\n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t}",
"public static void main(String args[]){\n\t\t\r\n\t}",
"public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }",
"public static void main(String[] args){\n \t\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args) {\n \n\t}",
"public static void main(String[] args){\n\n MyApp myApp = new MyApp(); //1\n myApp.runMyApp(); //2\n System.out.println(\"End of Program\"); //3\n }",
"public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t}",
"public static void main(String[] args) {\n \n\t\t}",
"public static void main(String[] args) {\n\t\t\t\t\n\t}",
"public static void main(String[] args) {\n\t\t \n\t}",
"public static void main(String[] args)\r\n {\n \r\n \r\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main (String [] args){\n\t}",
"public static void main(String args[]){\n }",
"static void main(String[] args)\n {\n }",
"public static void main(String[] args) {\n\n\t\tSystem.out.println(\"Enter your action:\");\n\n\t\tSystem.out.println(\"1->Data Generation\" + \"\\n2->Commit Change Analysis and Import Full Log\"\n\t\t\t\t+ \"\\n3->Differential Log Analysis and Import\" + \"\\n4->Perform Fault Localization on Full Log\"\n\t\t\t\t+ \"\\n5->Perform Fault Localization on Differenttial Log\"\n\t\t\t\t+ \"\\n6->Perform Fault Localization on Differenttial Log + File Change\" + \"\\n7->For Logging\"\n\t\t\t\t+ \"\\n8->Log Fail Part Line Similarity Generator\"\n\t\t\t\t+ \"\\n9->Perform Fault Localization on Fail Part Log with Similarity Limit\"\n\t\t\t\t+ \"\\n10->Build Dependency Analysis\" + \"\\n11->Log Analysis\" + \"\\n12->ASTParser Checking\"\n\t\t\t\t+ \"\\n13->Analyze Result\" + \"\\n14->Generate Similarity on Build Dependency Graph\"\n\t\t\t\t+ \"\\n21->Param Tunning for DiffFilter\" + \"\\n22->Set Tunning Dataset Tag\"\n\t\t\t\t+ \"\\n23->Set Failing Type\"\n\t\t\t\t\n\t\t\t\t+ \"\\n31->Performance Analysis for Reverting File\" \n\t\t\t\t+ \"\\n32->Full Log Based\" \n\t\t\t\t+ \"\\n33->Full Log AST Based\"\n\t\t\t\t+ \"\\n34->Diff filter+Dependency+BoostScore\" \n\t\t\t\t+ \"\\n35->Diff filter+Dependency\"\n\t\t\t\t+ \"\\n36->Diff filter+BoostScore\" \n\t\t\t\t+ \"\\n37->Full Log+Dependency+BoostScore\"\n\t\t\t\t+ \"\\n38->Baseline(Saha et al){Fail Part Log+Java File Rank+Then Gradle Build Script}\"\n\t\t\t\t+ \"\\n39->All Evaluation Experiment\"\n\t\t\t\t+ \"\\n41->Strace Experiment\");\n\n\t\t// create an object that reads integers:\n\t\tScanner cin = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Enter an integer: \");\n\t\tint inputid = cin.nextInt();\n\n\t\tif (inputid == 1) {\n\t\t\tdataFiltering();\n\t\t} else if (inputid == 2) {\n\t\t\tcommitChangeAnalysis();\n\t\t} else if (inputid == 3) {\n\t\t\tgenDifferentialBuildLog();\n\t\t} else if (inputid == 4) {\n\t\t\tgenerateSimilarity();\n\t\t\t// generateSimilarityDifferentialLog();\n\t\t\t// genSimDifferentialLogOnChange();\n\t\t} else if (inputid == 5) {\n\t\t\tgenerateSimilarityDifferentialLog();\n\t\t} else if (inputid == 6) {\n\t\t\tgenSimDifferentialLogOnChange();\n\t\t} else if (inputid == 7) {\n\t\t\tgenSimDifferentialLogOnChangeForLogging();\n\t\t} else if (inputid == 8) {\n\t\t\tgenerateStoreFailPartSimValue();\n\t\t} else if (inputid == 9) {\n\t\t\tgenSimFailLogPartWithSimLimit();\n\t\t} else if (inputid == 10) {\n\t\t\tgenerateBuildDependencyTree();\n\t\t} else if (inputid == 11) {\n\t\t\tgenerateLogForAnalysis();\n\t\t} else if (inputid == 12) {\n\t\t\tastParserChecker();\n\t\t} else if (inputid == 13) {\n\t\t\tperformResultAnalysis();\n\t\t} else if (inputid == 14) {\n\t\t\tgenerateSimilarityWithDependency();\n\n\t\t}\n\t\t// this is for 6,8,9,13 menu runnning together for analysis\n\t\telse if (inputid == 21) {\n\t\t\tparameterTunningDiffFilter();\n\t\t} else if (inputid == 22) {\n\t\t\tTunningDTSetter dtsetter = new TunningDTSetter();\n\t\t\ttry {\n\t\t\t\tdtsetter.setTunningDataTags(100);\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\t;\n\n\t\t}\n\t\telse if(inputid==23)\n\t\t{\n\t\t\tGenerateTestFailType typesetobj=new GenerateTestFailType();\n\t\t\ttypesetobj.generateFailType();\n\t\t}\n\n\t\telse if (inputid == 31) {\n\t\t\tEvaluationMgr.FixWithBuildFailChangeEval();\n\t\t} else if (inputid == 32) {\n\t\t\tEvaluationMgr.FullLogFaultLocalizationEval();\n\t\t} else if (inputid == 33) {\n\t\t\tEvaluationMgr.FullLogASTFaultLocalizationEval();\n\t\t} else if (inputid == 34) {\n\t\t\tEvaluationMgr.DiffFilterDependencyWithBoostScoreSimEval();\n\t\t} else if (inputid == 35) {\n\t\t\tEvaluationMgr.DiffFilterDependencySimEval();\n\t\t} else if (inputid == 36) {\n\t\t\tEvaluationMgr.DiffFilterBoostScoreSimEval();\n\t\t} else if (inputid == 37) {\n\t\t\tEvaluationMgr.FullLogDependencyBoostScoreSimEval();\n\t\t} else if (inputid == 38) {\n\t\t\tEvaluationMgr.BaseLineForISSTA();\n\t\t} \n\t\telse if((inputid == 39))\n\t\t{\n\t\t\tEvaluationMgr.FixWithBuildFailChangeEval();\n\t\t\tEvaluationMgr.FullLogFaultLocalizationEval();\n\t\t\tEvaluationMgr.FullLogASTFaultLocalizationEval();\n\t\t\tEvaluationMgr.DiffFilterDependencyWithBoostScoreSimEval();\n\t\t\tEvaluationMgr.DiffFilterDependencySimEval();\n\t\t\tEvaluationMgr.DiffFilterBoostScoreSimEval();\n\t\t\tEvaluationMgr.FullLogDependencyBoostScoreSimEval();\n\t\t\tEvaluationMgr.BaseLineForISSTA();\n\t\t\t\n\t\t}\t\t\n\t\telse if (inputid == 68913) {\n\t\t\tgenSimDifferentialLogOnChange();\n\t\t\tgenSimDifferentialLogOnChangeForLogging();\n\t\t\tgenSimFailLogPartWithSimLimit();\n\t\t\tperformResultAnalysis();\n\t\t}\n\t\telse if(inputid == 41)\n\t\t{\n\t\t\tRankingMgr straceraking=new RankingMgr();\n\t\t\tstraceraking.generateStraceRanking();\n\t\t}\n\n\t\telse {\n\t\t\tCommitChangeExtractor obj = new CommitChangeExtractor();\n\t\t\tobj.testCommit();\n\n\t\t\tSystem.out.println(\"Wrong Function Id Entered\");\n\n\t\t\tConfig.thresholdForSimFilter = 0.1;\n\n\t\t\tSystem.out.println(Config.thresholdForSimFilter);\n\t\t}\n\n\t\tcleanupResource();\n\t}",
"static void main(String[] args) {\n }",
"public static void main(String[] args){\r\n\t\t\r\n\tSystem.out.println(\"main method(-)\");\r\n\t\r\n\t}",
"public static void main(String[] args) \n\t{\n\t\t\n\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args){\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}"
] | [
"0.7878412",
"0.7747893",
"0.76762664",
"0.74245924",
"0.741774",
"0.72739816",
"0.7263218",
"0.7196411",
"0.7180009",
"0.7173713",
"0.7168664",
"0.7152493",
"0.7141398",
"0.71329015",
"0.71314406",
"0.71314406",
"0.7121422",
"0.7113771",
"0.7109786",
"0.70976025",
"0.70976025",
"0.70976025",
"0.70976025",
"0.70976025",
"0.70976025",
"0.7084091",
"0.70768803",
"0.7065546",
"0.7064919",
"0.70585304",
"0.70538706",
"0.70538706",
"0.7051782",
"0.7043995",
"0.70411795",
"0.70411795",
"0.7039241",
"0.7026319",
"0.7013528",
"0.7013528",
"0.7008993",
"0.70032907",
"0.7001673",
"0.6991959",
"0.6989536",
"0.69881946",
"0.69862497",
"0.698603",
"0.6978097",
"0.69759595",
"0.6973347",
"0.69694656",
"0.69690835",
"0.6966165",
"0.69516927",
"0.6945129",
"0.6943936",
"0.6943361",
"0.69361174",
"0.693583",
"0.6934683",
"0.6930302",
"0.6929236",
"0.6924879",
"0.6924576",
"0.6924576",
"0.6924576",
"0.6924576",
"0.69237083",
"0.69229287",
"0.69215286",
"0.6921479",
"0.691932",
"0.6919026",
"0.6919026",
"0.6919026",
"0.6919026",
"0.6915709",
"0.69098485",
"0.6905531",
"0.69037455",
"0.68985194",
"0.6896593",
"0.68957114",
"0.68943554",
"0.68929964",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371",
"0.6888371"
] | 0.0 | -1 |
the edge (weight) to neighbor vertex. | public Neighbor(Vertex v, int edgeWeight) {
vertex = v;
edge = edgeWeight;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getEdgeWeight();",
"public int getWeight(){\n\t\treturn this.edgeWeight;\n\t}",
"public int getWeight()\r\n\t{\r\n\t\treturn edgeWeight;\t\t\r\n\t}",
"@Override\n public double getEdgeWeight() {\n return edgeWeight;\n }",
"public Double getEdgeWeight(Edge p_edge) {\n\t\tint id = p_edge.hashCode();\n\t\treturn weights.get(id);\n\t}",
"List<WeightedEdge<Vertex>> neighbors(Vertex v);",
"public int getEdgeWeight(T vertex1, T vertex2){\n if (isEdge(vertex1, vertex2)){\n return edges[vertexIndex(vertex1)][vertexIndex(vertex2)];\n }\n return NOT_FOUND;\n }",
"public double getEdge()\n {\n return this.edge;\n }",
"@Override\r\n\tpublic int getEdgeWeight(E src, E dst) {\r\n\t\tif(containsVertex(src) && containsVertex(dst)) {\r\n\t\t\tArrayList<Edge<E>> srcAdj = adjacencyLists.get(src);\r\n\t\t\tfor(int i = 0; i < srcAdj.size(); i++) {\r\n\t\t\t\tif(srcAdj.get(i).getDst().equals(dst)) {\r\n\t\t\t\t\treturn srcAdj.get(i).getWeight();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(src.equals(dst)) {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Integer.MAX_VALUE;\r\n\t}",
"void addEdge(int source, int destination, int weight);",
"boolean addEdge(V v, V w, double weight);",
"public int getNeighbourDistance(Vertex v1, Vertex v2){\n for(Edge edge: edges){\n if(v1 == edge.getSource() && v2 == edge.getDestination())\n return edge.getWeight();\n if(v1 == edge.getDestination() && v2 == edge.getSource())\n return edge.getWeight();\n }\n return -1;\n }",
"Edge getEdge();",
"public Double getEdgeWeight(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\tint id = edge.hashCode();\n\t\treturn weights.get(id);\n\t}",
"public int edgeWeight (E vertex1, E vertex2) throws IllegalArgumentException\n {\n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n\n Node node = adjacencySequences[index1];\n int edgeWeight = -1;\n while(node != null)\n {\n if (node.neighbourIndex == index2)\n {\n edgeWeight = node.edgeWeight;\n break;\n }\n else\n node = node.nextNode;\n }\n\n return edgeWeight;\n }",
"public int edgeNum() {\r\n return edges.size();\r\n }",
"double getWeight(int node) {\n\n return this.neighbors.get(node);\n }",
"public Set<Pair<V,V>> neighbourEdgesOf(V vertex);",
"uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge getEdge(int index);",
"public long getEdgeCount() { return edgeCount; }",
"public void setEdgeWeight(double edgeWeight) {\n this.edgeWeight = edgeWeight;\n }",
"public HashMap<Integer, edge_data> getNeighborEdges() {\n return this.neighborEdges;\n }",
"public double getWeight(int vert1, int vert2) throws Exception {\n var vert1List = neighbors.get(vert1);\n for (Edge e : vert1List)\n if (e.getVert2() == vert2)\n return ((WeightedEdge) e).getWeight();\n throw new Exception(\"Edge {\" + vert1 + \",\" + vert2 + \"} does not exist\");\n }",
"public double getEdge(int node1, int node2)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2))\n\t{\n\t\tNode s=(Node) getNodes().get(node1);\n\t\tif(s.getEdgesOf().containsKey(node2))\n\t\t{\n \t\t\t\t\n\t\treturn s.getEdgesOf().get(node2).get_weight();\n\t\t\t\t\t\t\n\t\t}\n\t}\n\t \n\t return -1;\n\n}",
"public int other(int vertex) {\n if (vertex == v) return w;\n else if (vertex == w) return v;\n else throw new IllegalArgumentException(\"Illegal endpoint\");\n }",
"public int localEdgeNum() {\r\n return localEdgeCount;\r\n }",
"public int other(int vertex) {\n if (vertex == v) return w;\n else if (vertex == w) return v;\n else throw new IllegalArgumentException(\"Illegal endpoint\");\n }",
"public Edge(int source, int dest, int weight){\n\t\tthis.source = source;\n\t\tthis.dest = dest;\n\t\tthis.weight = weight;\n\t}",
"public void setWeight(int weightIn){\n\t\tthis.edgeWeight = weightIn;\n\t}",
"public int compareTo(Edge other){\n return this.weight - other.weight;\n }",
"public int getEdgeCount() {\n return edge_.size();\n }",
"public int getEdgeCount() \n {\n return 3;\n }",
"public Edge(int from, int to, Integer weight) {\n this.from = from;\n this.to = to;\n this.weight = weight;\n }",
"public int getEdgeCount()\n\t{\n\t\treturn edgeCount;\n\t}",
"public Edge(Object vertex1, Object vertex2, int w){\n v1 = vertex1;\n v2 = vertex2;\n weight = w;\n }",
"public int[] getNeighborsWeights(){\n\t\tint[] weights = new int[4];\n\t\tweights[0] = getNeighbor(\"east\").weight;\n\t\tweights[1] = getNeighbor(\"north\").weight;\n\t\tweights[2] = getNeighbor(\"west\").weight;\n\t\tweights[3] = getNeighbor(\"south\").weight;\t\t\n\t\treturn weights;\n\t}",
"public Edge<E, V> getUnderlyingEdge();",
"public edge_data getEdge(int nodeKey) {\n return this.neighborEdges.get(nodeKey);\n }",
"public AverageEdgeWeight() {\n super(\"avrgEdgeWeight\");\n }",
"public void addEdge(int start, int end, double weight);",
"public int edgeCount() {\n\treturn edgeList.size();\n }",
"int getEdgeCount();",
"@Override\n public int compareTo(Edge edge) {\n return Integer.compare(this.weight, edge.weight);\n }",
"public Edge(int from, int to, int weight) {\n this.from = from;\n this.to = to;\n this.weight = weight;\n }",
"protected Edge getEdge() {\r\n\t\treturn (Edge)getModel();\r\n\t}",
"public int getvertex() {\n\t\treturn this.v;\n\t}",
"public static int[][] getEdgeMatrix() {\n\t\treturn edge;\n\t}",
"VertexType getOtherVertexFromEdge( EdgeType r, VertexType oneVertex );",
"public double getTotalAdjacentInternalWeight(int nodeIndex) {\n\t\treturn this.inWeights[nodeIndex];\n\t}",
"public int getNumberOfEdges();",
"public WeightedEdge(){\n\t\t\n\t}",
"public void calculateEdgeWeights() {\n\n\t// Use a ListIterator so that we can modify the list\n\t// as we go\n\tListIterator<LayoutEdge>iter = edgeList.listIterator();\n\twhile (iter.hasNext()) {\n\t LayoutEdge edge = iter.next();\n\n\t // If we're only dealing with selected nodes, drop any edges\n\t // that don't have any selected nodes\n\t if (edge.getSource().isLocked() && edge.getTarget().isLocked()) {\n\t\titer.remove();\n\t } else if (edgeWeighter != null && edgeWeighter.normalizeWeight(edge) == false)\n\t\titer.remove();\n\n\t //logger.debug(\"Edge \"+edge.getEdge().getIdentifier()+\" now has weight \"+edge.getWeight());\n\t // logger.info( edge.toString() + \" now has weight \"+edge.getWeight());\n\t}\n }",
"public int getEdgeWeight(String a, String b) {\n\t\tInteger weight = edges.get(a + \" \" + b);\n\t\treturn weight == null ? -1 : weight;\n\t}",
"@Override\n public int edgeSize() {\n return this.numOfEdges;\n }",
"public int getEdgeSixe() {\n\t\treturn graph.edgeSet().size();\r\n\t}",
"public int get_edge(int from, int to){\n int temp=0;\n try{\n temp=adj_matrix[from][to];\n }\n catch(ArrayIndexOutOfBoundsException index){ // If invalid index\n System.out.println(\" Invalid Vertex!\");\n }\n return temp;\n }",
"public void addEdge(int u, int v, double w) {\n\t\t\n\t}",
"Edge(Node from,Node to, int length){\n this.source=from;\n this.destination=to;\n this.weight=length;\n }",
"public Edge(int weight){\n\t\tthis.EDGE_ID = IDToGive;\n\t\tthis.edgeWeight = weight;\n\t\tIDToGive++;\n\t}",
"public Edge(Node from, Node to, int weight) {\n this.from = from;\n this.to = to;\n this.weight = weight;\n }",
"@Override\n\t\tpublic int compareTo(Edge o) {\n\t\t\treturn Integer.compare(this.weight, o.weight);\n\t\t}",
"private int getWeight(Node source, Node target) {\n LinkedList<Edge> edges = source.getEdges();\n for (Edge edge : edges) {\n if (edge.getDestination() == target) {\n return edge.getWeight();\n }\n }\n return 0;\n }",
"E getEdge(int id);",
"public Edge<V> getEdge(V source, V target);",
"double getWeight(V v, V w);",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"@Override\r\n\tpublic E getVertexAtGivenDistance(E src, int distance) {\r\n\t\treturn graphForWarshall.getVertexAtGivenDistance(src, distance);\r\n\t}",
"Vertex getVertex();",
"public uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge getEdge(int index) {\n return edge_.get(index);\n }",
"int getNumberOfEdges();",
"private final void addEdge(int v1, int v2, float weight) {\n if (nEdges >= edgeWeights.length) {\n edgeWeights = Arrays.copyOf(edgeWeights, edgeWeights.length*2);\n }\n int edgeIndex = nEdges;\n\n // add edge to v1\n int v1Index;\n {\n v1Index = nOutgoingEdgess[v1];\n if (v1Index >= outgoingEdgess[v1].length) {\n int newLength = outgoingEdgess[v1].length*2;\n outgoingEdgess[v1] = Arrays.copyOf(outgoingEdgess[v1], newLength);\n outgoingEdgeIndexess[v1] = Arrays.copyOf(outgoingEdgeIndexess[v1], newLength);\n outgoingEdgeIsMarkeds[v1] = Arrays.copyOf(outgoingEdgeIsMarkeds[v1], newLength);\n outgoingEdgeOppositeIndexess[v1] = Arrays.copyOf(outgoingEdgeOppositeIndexess[v1], newLength);\n }\n outgoingEdgess[v1][v1Index] = v2;\n outgoingEdgeIndexess[v1][v1Index] = edgeIndex;\n nOutgoingEdgess[v1]++;\n }\n\n // add edge to v2\n int v2Index;\n {\n v2Index = nOutgoingEdgess[v2];\n if (v2Index >= outgoingEdgess[v2].length) {\n int newLength = outgoingEdgess[v2].length*2;\n outgoingEdgess[v2] = Arrays.copyOf(outgoingEdgess[v2], newLength);\n outgoingEdgeIndexess[v2] = Arrays.copyOf(outgoingEdgeIndexess[v2], newLength);\n outgoingEdgeIsMarkeds[v2] = Arrays.copyOf(outgoingEdgeIsMarkeds[v2], newLength);\n outgoingEdgeOppositeIndexess[v2] = Arrays.copyOf(outgoingEdgeOppositeIndexess[v2], newLength);\n }\n outgoingEdgess[v2][v2Index] = v1;\n outgoingEdgeIndexess[v2][v2Index] = edgeIndex;\n nOutgoingEdgess[v2]++;\n }\n\n outgoingEdgeOppositeIndexess[v1][v1Index] = v2Index;\n outgoingEdgeOppositeIndexess[v2][v2Index] = v1Index;\n \n edgeWeights[nEdges] = weight;\n ++nEdges;\n }",
"public Edge(int start, int end, int weight) {\n this.startVertex = start;\n this.endVertex = end;\n this.weight = weight;\n }",
"public int getEdge(int v1, int v2) {\n\n\t\treturn edges[v1][v2];\n\t}",
"public int getEdgeWeight(String srcLabel, String tarLabel) {\n // Implement me!\n int eInt = indexOf(srcLabel + tarLabel, edges);\n if (eInt != -1) {\n return weights[indexOf(srcLabel, vertices)][eInt];\n }\n\n // update return value\n return EDGE_NOT_EXIST;\n }",
"@Override\n\t\tpublic int get_weights() {\n\t\t\treturn weight;\n\t\t}",
"public int edgeCost(Vertex a, Vertex b) {\n if (!myGraph.containsKey(b) || !myGraph.containsKey(a)) {\n throw new IllegalArgumentException(\"Vertex is not valid\");\n }\n int cost = -1;\n if (adjacentVertices(a).contains(b)) {\n //create a copy of all the edges at the passed in Vertex a\n //to restrict any reference to interals of this class\n Collection<Edge> copyOfEdges = new ArrayList<Edge>();\n copyOfEdges.addAll(myGraph.get(a));\n\n Iterator<Edge> edges = copyOfEdges.iterator();\n while(edges.hasNext()){\n Edge currEdge = edges.next();\n if(currEdge.getDestination().equals(b)) {\n cost = currEdge.getWeight();\n }\n }\n }\n return cost;\n }",
"@Override\n\tpublic double getInternalWeight(int nodeIndex) {\n\t\treturn this.inWeights[nodeIndex];\n\t}",
"void addEdge(int v, int w) {\n adj [v].add(w);\n }",
"boolean addEdge(V v, V w);",
"public SimpleEdge getEdge() {\n return edge;\n }",
"public void setEdgeWeighter(EdgeWeighter edgeWeighter) {\n\tthis.edgeWeighter = edgeWeighter;\n }",
"public List<Edge> getNeighbors() {\n\t\treturn neighbors;\n\t}",
"public int[][] create_edge(int from, int to, boolean weighted, int weight){\n try{\n if(weighted==true) // If weighted edge\n adj_matrix[from][to]=weight;\n else\n adj_matrix[from][to]=1;\n }\n catch(ArrayIndexOutOfBoundsException index){ // If invalid index\n System.out.println(\" Invalid Vertex!\");\n }\n return adj_matrix;\n }",
"public BufferedImage getEdge() {\n\t\treturn edge;\n\t}",
"private Edge getKernelEdge(Edge edge){\n\t\tif (edge.getGraph() != null && (edge.getGraph().isLhs() || edge.getGraph().isRhs())) {\n\t\t\tRule rule = edge.getGraph().getRule();\n\t\t\treturn rule.getMultiMappings().getOrigin(edge);\n\t\t}\n\t\treturn null;\n\t}",
"void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}",
"public int compareTo(Edge other) {\n if (this.weight < other.weight) {\n return -1;\n } else if (this.weight > other.weight) {\n return 1;\n } else {\n return 0;\n }\n }",
"void addEdge(SimpleVertex vertexOne, SimpleVertex vertexTwo, int weight) {\n\n\t\tSimpleEdge edge = new SimpleEdge(vertexOne, vertexTwo);\n\t\tedge.weight = weight;\n\t\t// edgeList.add(edge);\n\t\t// System.out.println(edge);\n\t\tvertexOne.neighborhood.add(edge);\n\n\t}",
"@Override\n\tpublic int edgeSize() {\n\t\treturn numOfEdges;\n\t}",
"public E getParentEdge(V vertex);",
"public int getNumEdges();",
"Edge inverse() {\n return bond.inverse().edge(u, v);\n }",
"public Edge edgeAt( int index ) {\r\n return (Edge)edges.elementAt(index);\r\n }",
"void addEdge(int v,int w)\n {\n adj[v].add(w);\n }",
"public double getEdgeFlow() {\n\t\treturn this.flow;\r\n\t}",
"@Override\n public int compareTo(Edge e) {\n if (this.getWeight() > e.getWeight()) {\n return +1;\n } else if (this.getWeight() == e.getWeight()) {\n return 0;\n } else {\n return -1;\n }\n }",
"public Edge(int start, int end, int weight) {\n this.start = start;\n this.end = end;\n this.weight = weight;\n }",
"public int getNumEdges(){\n return numEdges;\n }",
"public int compareTo(Vertex v) {\n return this.weight - v.weight;\n }",
"public Edge(int w, int s, int e) {\n\t\tweight = w;\n\t\tstartVertex = s;\n\t\tendVertex = e;\n\t}"
] | [
"0.8031618",
"0.77162087",
"0.76065636",
"0.7582773",
"0.70660114",
"0.7062799",
"0.6950543",
"0.69468355",
"0.6685372",
"0.66744286",
"0.6662502",
"0.66060984",
"0.65968436",
"0.6550798",
"0.651725",
"0.6505973",
"0.649242",
"0.646324",
"0.6462055",
"0.64550096",
"0.6440794",
"0.6420858",
"0.64199424",
"0.63765794",
"0.63758516",
"0.6345926",
"0.63367957",
"0.63127965",
"0.6293269",
"0.62929577",
"0.6279671",
"0.6279074",
"0.6276504",
"0.62676585",
"0.62582344",
"0.62518615",
"0.6244219",
"0.62231",
"0.621439",
"0.62046796",
"0.6185193",
"0.61631185",
"0.6161313",
"0.6156619",
"0.61482793",
"0.61462593",
"0.6145545",
"0.61397266",
"0.6139514",
"0.6139114",
"0.6137928",
"0.6130023",
"0.6124341",
"0.6106974",
"0.61017466",
"0.6101632",
"0.6089875",
"0.6073691",
"0.6073243",
"0.60522085",
"0.60420185",
"0.60382104",
"0.6035584",
"0.60325485",
"0.6024675",
"0.60167396",
"0.601249",
"0.6012043",
"0.60020566",
"0.5999658",
"0.5990818",
"0.5980009",
"0.5977821",
"0.5976552",
"0.5975748",
"0.5968145",
"0.59655994",
"0.59632546",
"0.595469",
"0.59493387",
"0.5931984",
"0.5911596",
"0.59051657",
"0.5895105",
"0.58913964",
"0.5884287",
"0.5883046",
"0.58815646",
"0.58811766",
"0.58722293",
"0.5870017",
"0.5869897",
"0.58689225",
"0.5865137",
"0.5860765",
"0.58588797",
"0.58572966",
"0.5855897",
"0.5841363",
"0.5839896"
] | 0.636691 | 25 |
Initially the graph should have 26 vertices labeled 'A', 'B', 'C', ..., 'Z' and no edges, and the current vertex should be 'A' | Graph() {
vertices = new LinkedList<Vertex>();
edges = 0;
for (int i = 0; i < 26; i++) {
// ASCII value of 'A' is 65
Vertex vertex = new Vertex((char) (i + 65));
vertices.add(vertex);
}
currentVertex = vertices.get(0);
seen = new boolean[26];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tVertex vertexF = new Vertex(\"F\");\n\t\tVertex vertexG = new Vertex(\"G\");\n\n\t\tList<Edge> edges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 2));\n\t\tedges.add(new Edge(vertexD, 6));\n\t\tedges.add(new Edge(vertexF, 5));\n\t\tvertexA.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 2));\n\t\tedges.add(new Edge(vertexC, 7));\n\t\tvertexB.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 7));\n\t\tedges.add(new Edge(vertexD, 9));\n\t\tedges.add(new Edge(vertexF, 1));\n\t\tvertexC.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 6));\n\t\tedges.add(new Edge(vertexC, 9));\n\t\tedges.add(new Edge(vertexE, 4));\n\t\tedges.add(new Edge(vertexG, 8));\n\t\tvertexD.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 4));\n\t\tedges.add(new Edge(vertexF, 3));\n\t\tvertexE.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 5));\n\t\tedges.add(new Edge(vertexC, 1));\n\t\tedges.add(new Edge(vertexE, 3));\n\t\tvertexF.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 8));\n\t\tvertexG.incidentEdges = edges;\n\n\t\tgraph.add(vertexA);\n\t\tgraph.add(vertexB);\n\t\tgraph.add(vertexC);\n\t\tgraph.add(vertexD);\n\t\tgraph.add(vertexE);\n\t\tgraph.add(vertexF);\n\t\tgraph.add(vertexG);\n\n\t\treturn graph;\n\t}",
"public 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 Graph() // constructor\n{\n vertexList = new Vertex[MAX_VERTS];\n // adjacency matrix\n adjMat = new int[MAX_VERTS][MAX_VERTS];\n nVerts = 0;\n for (int j = 0; j < MAX_VERTS; j++) // set adjacency\n for (int k = 0; k < MAX_VERTS; k++) // matrix to 0\n adjMat[j][k] = INFINITY;\n}",
"public Vertex[] createGraph(){\n\t\t /* constructing a graph using matrices\n\t\t * If there is a connection between two adjacent LETTERS, the \n\t * cell will contain a num > 1, otherwise a 0. A value of -1 in the\n\t * cell denotes that the cities are not neighbors.\n\t * \n\t * GRAPH (with weights b/w nodes):\n\t * E+---12-------+B--------18-----+F----2---+C\n\t * +\t\t\t\t+\t\t\t\t +\t\t +\n\t * |\t\t\t\t|\t\t\t\t/\t\t |\n\t * |\t\t\t\t|\t\t\t |\t\t |\n\t * |\t\t\t\t|\t\t\t |\t\t 10\n\t * 24\t\t\t\t8\t\t\t 8\t |\n\t * |\t\t\t\t|\t\t\t |\t\t +\n\t * |\t\t\t\t|\t\t\t | H <+---11---I\n\t * |\t\t\t\t|\t\t\t /\n\t * +\t\t\t\t+\t\t\t +\n\t * G+---12----+A(start)+---10--+D\n\t * \n\t * NOTE: I is the only unidirectional node\n\t */\n\t\t\n\t\tint cols = 9;\n\t\tint rows = 9;\n\t\t//adjacency matrix\n\t\t\t\t //A B C D E F G H I\n\t int graph[][] = { {0,8,0,10,0,0,12,0,0}, //A\n\t {8,0,0,0,12,18,0,0,0}, //B\n\t {0,0,0,0,0,2,0,10,0}, //C\n\t {10,0,0,0,0,8,0,0,0}, //D\n\t {0,12,0,0,0,0,24,0,0}, //E\n\t {0,18,2,8,0,0,0,0,0}, //F\n\t {12,0,0,0,0,0,24,0,0}, //G\n\t {0,0,10,0,0,0,0,0,11}, //H\n\t {0,0,0,0,0,0,0,11,0}}; //I\n\t \n\t //initialize stores vertices\n\t Vertex[] vertices = new Vertex[rows]; \n\n\t //Go through each row and collect all [i,col] >= 1 (neighbors)\n\t int weight = 0; //weight of the neighbor\n\t for (int i = 0; i < rows; i++) {\n\t \tVector<Integer> vec = new Vector<Integer>(rows);\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tif (graph[i][j] >= 1) {\n\t\t\t\t\tvec.add(j);\n\t\t\t\t\tweight = j;\n\t\t\t\t}//is a neighbor\n\t\t\t}\n\t\t\tvertices[i] = new Vertex(Vertex.getVertexName(i), vec);\n\t\t\tvertices[i].state = weight;\n\t\t\tvec = null; // Allow garbage collection\n\t\t}\n\t return vertices;\n\t}",
"void graph4() {\n\t\tconnect(\"8\", \"9\");\n\t\tconnect(\"3\", \"1\");\n\t\tconnect(\"3\", \"2\");\n\t\tconnect(\"3\", \"9\");\n\t\tconnect(\"4\", \"3\");\n\t\t//connect(\"4\", \"5\");\n\t\t//connect(\"4\", \"7\");\n\t\t//connect(\"5\", \"7\");\t\t\n\t}",
"Graph(){\n\t\tadjlist = new HashMap<String, Vertex>();\n\t\tvertices = 0;\n\t\tedges = 0;\n\t\tkeys = new ArrayList<String>();\n\t}",
"public static ArrayList<Vertex> initializeGraph() {\n\t\tVertex uVertex = new Vertex('u');\n\t\tVertex vVertex = new Vertex('v');\n\t\tVertex wVertex = new Vertex('w');\n\t\tVertex xVertex = new Vertex('x');\n\t\tVertex yVertex = new Vertex('y');\n\t\tVertex zVertex = new Vertex('z');\n\t\t\n\t\tVertex[] uAdjacencyList = {xVertex, vVertex};\n\t\tuVertex.setAdjacencyList(createArrayList( uAdjacencyList ));\n\t\t\n\t\tVertex[] vAdjacencyList = {yVertex};\n\t\tvVertex.setAdjacencyList(createArrayList( vAdjacencyList ));\n\t\t\n\t\tVertex[] wAdjacencyList = {zVertex, yVertex};\n\t\twVertex.setAdjacencyList(createArrayList( wAdjacencyList ));\n\t\t\n\t\tVertex[] xAdjacencyList = {vVertex};\n\t\txVertex.setAdjacencyList(createArrayList( xAdjacencyList ));\n\t\t\n\t\tVertex[] yAdjacencyList = {xVertex};\n\t\tyVertex.setAdjacencyList(createArrayList( yAdjacencyList ));\n\t\t\n\t\tVertex[] zAdjacencyList = {zVertex};\n\t\tzVertex.setAdjacencyList(createArrayList( zAdjacencyList ));\n\n\t\tVertex[] graph = { uVertex, vVertex, wVertex, xVertex, yVertex, zVertex};\n\t\treturn createArrayList( graph );\n\n\t}",
"public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }",
"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 setUpCLRSGraph() {\n\t\tvertices = new HashMap<Character, DirectedOrderedDfsVertex>();\n\t\tfor (char i = 'a'; i <= 'h'; i++) {\n\t\t\tvertices.put(i, new DirectedOrderedDfsVertex());\n\t\t}\n\t\tgraph = new DirectedSimpleGraph<DirectedOrderedDfsVertex>(vertices.values());\n\t\tvertices.get('a').addAdjacency(vertices.get('b'));\n\t\tvertices.get('b').addAdjacency(vertices.get('f'));\n\t\tvertices.get('b').addAdjacency(vertices.get('e'));\n\t\tvertices.get('b').addAdjacency(vertices.get('c'));\n\t\tvertices.get('c').addAdjacency(vertices.get('d'));\n\t\tvertices.get('c').addAdjacency(vertices.get('g'));\n\t\tvertices.get('d').addAdjacency(vertices.get('c'));\n\t\tvertices.get('d').addAdjacency(vertices.get('h'));\n\t\tvertices.get('e').addAdjacency(vertices.get('a'));\n\t\tvertices.get('e').addAdjacency(vertices.get('f'));\n\t\tvertices.get('f').addAdjacency(vertices.get('g'));\n\t\tvertices.get('g').addAdjacency(vertices.get('f'));\n\t\tvertices.get('g').addAdjacency(vertices.get('h'));\n\t\tvertices.get('h').addAdjacency(vertices.get('h'));\n\t}",
"AdjacencyGraph(){\r\n vertices = new HashMap<>();\r\n }",
"void makeSampleGraph() {\n\t\tg.addVertex(\"a\");\n\t\tg.addVertex(\"b\");\n\t\tg.addVertex(\"c\");\n\t\tg.addVertex(\"d\");\n\t\tg.addVertex(\"e\");\n\t\tg.addVertex(\"f\");\n\t\tg.addVertex(\"g\");\n\t\tg.addEdge(\"a\", \"b\");\n\t\tg.addEdge(\"b\", \"c\");\n\t\tg.addEdge(\"b\", \"f\");\n\t\tg.addEdge(\"c\", \"d\");\n\t\tg.addEdge(\"d\", \"e\");\n\t\tg.addEdge(\"e\", \"f\");\n\t\tg.addEdge(\"e\", \"g\");\n\t}",
"protected void handleInitialVertex() {\r\n\t\tVertex v = nextUnvisited();\r\n\t\tif(v != null){\r\n\t\t\tsetHasBeenVisited(v);\r\n\t\t\tprocessVertex(v);\r\n\t\t\tstack.push(v);\r\n\t\t}\r\n\t}",
"public Graph(){\n\t\tthis.sizeE = 0;\n\t\tthis.sizeV = 0;\n\t}",
"private ProjectedVertex() {\n this.valid = false;\n this.edge = null;\n }",
"void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}",
"Vertex(){}",
"void graph3() {\n\t\tconnect(\"0\", \"0\");\n\t\tconnect(\"2\", \"2\");\n\t\tconnect(\"2\", \"3\");\n\t\tconnect(\"3\", \"0\");\n\t}",
"public wVertex(String s){\r\n name = s;\r\n adjacencies = new ArrayList<Edge>();\r\n }",
"public ParentVertex(){\n Random rand = new Random();\n key = rand.nextInt(Integer.MAX_VALUE);\n xPos = rand.nextDouble();\n yPos = rand.nextDouble();\n connectedKeys = new ArrayList<>();\n degree = 0;\n fitness = 0;\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 }",
"private void addVerticesToGraph()\n\t{\n\t\tString vertexName;\n\n\t\tMap<Long, IOFSwitch> switches = this.floodlightProvider.getSwitches();\n\t\tfor(IOFSwitch s :switches.values())\n\t\t{\n\t\t\tvertexName =Long.toString(s.getId());\n\t\t\tm_graph.addVertex(vertexName);\t\t\t \t\t\t \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}",
"public WeightedAdjacencyGraph() {\n this.vertices = new HashMap<>();\n }",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"Graph(){\n\t\taddNode();\n\t\tcurrNode=myNodes.get(0);\n\t}",
"private List<V> getNewVertexOrderIfAcyclic () {\n Map<V, Integer> indegree = inDegree();\n // Determine all vertices with zero in-degree\n Stack<V> zeroIncomingVertex = new Stack<V>(); \n for (V v: indegree.keySet()) {\n if (indegree.get(v) == 0) zeroIncomingVertex.push(v);\n }\n \n // Determine the vertex order\n List<V> result = new ArrayList<V>();\n while (!zeroIncomingVertex.isEmpty()) {\n V v = zeroIncomingVertex.pop(); // Choose a vertex with zero in-degree\n result.add(v); // Vertex v is next in vertex ordering\n // \"Remove\" vertex v by updating its neighbors\n for (V neighbor: dag.get(v)) {\n indegree.put(neighbor, indegree.get(neighbor) - 1);\n // Remember any vertices that now have zero in-degree\n if (indegree.get(neighbor) == 0) zeroIncomingVertex.push(neighbor);\n }\n }\n // Check that we have used the entire graph. If not then there was a cycle.\n if (result.size() != dag.size()) return null;\n return result;\n }",
"public void testEdgesSet_ofVertex() {\n System.out.println(\"edgesSet\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n Set<Edge<Integer>> set = graph.edgesSet(new Integer(i));\n\n Assert.assertEquals(set.size(), i % 2 == 0 ? 25 : 23);\n for (Edge<Integer> edge : set) {\n Assert.assertTrue((edge.getTargetVertex() + i) % 2 == 0);\n }\n }\n }",
"public void fill() {\r\n\t\tint vertexNumber = 1;\r\n\r\n\t\t\r\n\t\tfor (int i = 0; i < mazeSize; i++) {\r\n\t\t\tfor (int j = 0; j < mazeSize; j++) {\r\n\t\t\t\tVertex v = new Vertex(j, i);\r\n\t\t\t\tgraph[j][i] = v;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\tfor (int i = 0; i < mazeSize; i++) {\r\n\t\t\tfor (int j = 0; j < mazeSize; j++) {\r\n\t\t\t\tgraph[j][i].label = vertexNumber;\r\n\t\t\t\tgraph[j][i].parent = null;\r\n\t\t\t\tvertexNumber++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\tfor (int i = 0; i < mazeSize; i++) {\r\n\t\t\tfor (int j = 0; j < mazeSize; j++) {\r\n\t\t\t\tassignNeighbors(graph[j][i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tmazeGenerator();\r\n\t}",
"public Graph createGraph() {\n String fileName;\n// fileName =\"./428333.edges\";\n String line;\n Graph g = new Graph();\n// List<String> vertexNames = new ArrayList<>();\n// try\n// {\n// BufferedReader in=new BufferedReader(new FileReader(fileName));\n// line=in.readLine();\n// while (line!=null) {\n////\t\t\t\tSystem.out.println(line);\n// String src = line.split(\" \")[0];\n// String dst = line.split(\" \")[1];\n//// vertexNames.add(src);\n//// vertexNames.add(dst);\n//// System.out.println(src+\" \"+dst);\n// g.addEdge(src, dst, 1);\n// line=in.readLine();\n// }\n// in.close();\n// } catch (Exception e) {\n//\t\t\te.printStackTrace();\n// }\n\n fileName=\"./788813.edges\";\n// List<String> vertexNames = new ArrayList<>();\n try\n {\n BufferedReader in=new BufferedReader(new FileReader(fileName));\n line=in.readLine();\n while (line!=null) {\n//\t\t\t\tSystem.out.println(line);\n String src = line.split(\" \")[0];\n String dst = line.split(\" \")[1];\n g.addEdge(src, dst, 1);\n line=in.readLine();\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n// Graph g = new Graph(new String[]{\"v0\", \"v1\", \"v2\", \"v3\", \"v4\", \"v5\", \"v6\", \"v7\", \"v8\"});\n// // Add the required edges.\n// g.addEdge(\"v0\", \"v1\", 4); g.addEdge(\"v0\", \"v7\", 8);\n// g.addEdge(\"v1\", \"v2\", 8); g.addEdge(\"v1\", \"v7\", 11); g.addEdge(\"v2\", \"v1\", 8);\n// g.addEdge(\"v2\", \"v8\", 2); g.addEdge(\"v2\", \"v5\", 4); g.addEdge(\"v2\", \"v3\", 7);\n// g.addEdge(\"v3\", \"v2\", 7); g.addEdge(\"v3\", \"v5\", 14); g.addEdge(\"v3\", \"v4\", 9);\n// g.addEdge(\"v4\", \"v3\", 9); g.addEdge(\"v4\", \"v5\", 10);\n// g.addEdge(\"v5\", \"v4\", 10); g.addEdge(\"v5\", \"v3\", 9); g.addEdge(\"v5\", \"v2\", 4);\n// g.addEdge(\"v5\", \"v6\", 2);\n// g.addEdge(\"v6\", \"v7\", 1); g.addEdge(\"v6\", \"v8\", 6); g.addEdge(\"v6\", \"v5\", 2);\n// g.addEdge(\"v7\", \"v0\", 8); g.addEdge(\"v7\", \"v8\", 7); g.addEdge(\"v7\", \"v1\", 11);\n// g.addEdge(\"v7\", \"v6\", 1);\n// g.addEdge(\"v8\", \"v2\", 2); g.addEdge(\"v8\", \"v7\", 7); g.addEdge(\"v8\", \"v6\", 6);\n\n//\n return g;\n }",
"public GraphEdge()\r\n {\r\n cost = 1.0;\r\n indexFrom = -1;\r\n indexTo = -1;\r\n }",
"ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }",
"Graph(int vertices) {\r\n this.numVertices = vertices;\r\n adjacencylist = new LinkedList[vertices];\r\n //initialize adjacency lists for all the vertices\r\n for (int i = 0; i <vertices ; i++) {\r\n adjacencylist[i] = new LinkedList<>();\r\n }\r\n }",
"public void testEdgesSet_ofVertices() {\n System.out.println(\"edgesSet\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n Set<Edge<Integer>> set = graph.edgesSet(new Integer(i), new Integer(j));\n\n if ((i + j) % 2 == 0) {\n Assert.assertEquals(set.size(), 1);\n } else {\n Assert.assertEquals(set.size(), 0);\n }\n }\n }\n }",
"@Test\r\n void remove_nonexistent_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.removeVertex(\"D\");\r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\"))\r\n fail();\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\"))\r\n fail();\r\n \r\n }",
"public Vertex (String name)\n\t{\n\t vertexName = name ;\n\t adjacencyList = new DoublyLinkedList<>();\n\t indegree = 0;\n\t\t\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 public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }",
"public Graph() {\n\t\ttowns = new HashSet<Town>();\n\t\troads = new HashSet<Road>();\n\t\tprevVertex = new HashMap<String, Town>();\n\t}",
"NetworkGraph(int Vertex) {\n this.Vertex = Vertex;\n\n // Size == # of Vertices\n myNetwork = new LinkedList[Vertex];\n\n // Create a new list for each vertex\n // such that adjacent nodes can be stored\n for (int i = 0; i < Vertex; i++) {\n myNetwork[i] = new LinkedList<>();\n }\n }",
"public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}",
"public FixedGraph(int numOfVertices, int b, int seed) {\r\n super(numOfVertices);\r\n int adjVertex;\r\n double x = 0;\r\n int[] numOfEdges = new int[numOfVertices];\r\n Vector<Integer> graphVector = new Vector<Integer>();\r\n connectivity = b;\r\n\r\n\r\n Random random = new Random(seed);\r\n graphSeed = seed;\r\n\r\n for (int v = 0; v < numOfVertices; v++) {\r\n graphVector.add(new Integer(v));\r\n }\r\n\r\n for (int i = 0; i < numOfVertices; i++) {\r\n\r\n while ((numOfEdges[i] < b) && (graphVector.isEmpty() == false)) {\r\n x = random.nextDouble();\r\n do {\r\n adjVertex = (int) (x * numOfVertices);\r\n\r\n } while (adjVertex >= numOfVertices);\r\n\r\n\r\n if ((i == adjVertex) || (numOfEdges[adjVertex] >= b)) {\r\n if (numOfEdges[adjVertex] >= b) {\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n if (adjVertex == compInt) {\r\n graphVector.removeElementAt(v);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n if ((i != adjVertex) && (adjVertex < numOfVertices) && (numOfEdges[adjVertex] < b) && (super.isAdjacent(i, adjVertex) == false) && (numOfEdges[i] < b)) {\r\n super.addEdge(i, adjVertex);\r\n if (super.isAdjacent(i, adjVertex)) {\r\n numOfEdges[i] = numOfEdges[i] + 1;\r\n numOfEdges[adjVertex] = numOfEdges[adjVertex] + 1;\r\n }\r\n System.out.print(\"*\");\r\n\r\n }\r\n\r\n if (numOfEdges[i] >= b) {\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n if (i == compInt) {\r\n graphVector.removeElementAt(v);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n break;\r\n }\r\n if (graphVector.size() < b) {\r\n //boolean deadlock = false;\r\n System.out.println(\"Graph size= \" + graphVector.size());\r\n\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n //System.out.println(\"i:= \" + i + \" and compInt:= \" + compInt);\r\n if (super.isAdjacent(i, compInt) || (i == compInt)) {\r\n //System.out.println(\"\" + i + \" adjacent to \" + compInt + \" \" + super.isAdjacent(i, compInt));\r\n // deadlock = false;\r\n } else {\r\n if ((numOfEdges[compInt] < b) && (numOfEdges[i] < b) && (i != compInt)) {\r\n super.addEdge(i, compInt);\r\n numOfEdges[i] = numOfEdges[i] + 1;\r\n numOfEdges[compInt] = numOfEdges[compInt] + 1;\r\n if (numOfEdges[i] >= b) {\r\n for (int w = 0; w < graphVector.size(); w++) {\r\n\r\n int compW = ((Integer) graphVector.elementAt(w)).intValue();\r\n if (i == compW) {\r\n graphVector.removeElementAt(w);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n break;\r\n }\r\n if (numOfEdges[compInt] >= b) {\r\n for (int w = 0; w < graphVector.size(); w++) {\r\n\r\n int compW = ((Integer) graphVector.elementAt(w)).intValue();\r\n if (compInt == compW) {\r\n graphVector.removeElementAt(w);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n\r\n }\r\n // deadlock = true;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n\r\n System.out.println();\r\n }\r\n\r\n }",
"@Test \r\n void add_mutiple_edges_check_size(){\r\n for(int i = 0; i < 20; i++) {\r\n graph.addEdge(\"\" + i, \"\" + (i + 1));\r\n } \r\n List<String> adjacent;\r\n for(int i = 0; i < 20; i++) {\r\n adjacent = graph.getAdjacentVerticesOf(\"\"+i);\r\n if(!adjacent.contains(\"\" + (i+1))) {\r\n fail();\r\n }\r\n }\r\n if(graph.size() != 20 | graph.order() != 21) {\r\n fail();\r\n }\r\n \r\n }",
"private static void criaListaDeVertices(Graph graph) {\r\n\t\tfor (int i = 0; i < graph.getArestas().size(); i++) {\r\n\t\t\tif (!graph.getArestas().get(i).getV1().statusVertice()) {\r\n\t\t\t\tgraph.getVerticesGraph().add( graph.getArestas().get(i).getV1() );\r\n\t\t\t\tgraph.getArestas().get(i).getV1().alteraStatusVertice(true);\r\n\t\t\t}\r\n\r\n\t\t\tif (!graph.getArestas().get(i).getV2().statusVertice()) {\r\n\t\t\t\tgraph.getVerticesGraph().add( graph.getArestas().get(i).getV2() );\r\n\t\t\t\tgraph.getArestas().get(i).getV2().alteraStatusVertice(true);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static void makeConnection(Graph g, int key, Vertex prev, Vertex current, String string) {\n\t\tg.addEdge(new Edge(key, prev, current, string));\n\t}",
"public Graph(ArrayList<Vertex> vertices){\r\n this.vertices = new HashMap<String, Vertex>();\r\n this.edges = new HashMap<Integer, Edge>();\r\n \r\n for(Vertex v: vertices){\r\n this.vertices.put(v.getLabel(), v);\r\n }\r\n \r\n }",
"public Graph(int V){\n this.V = V;\n this.E = 0;//no edge at initial condition.\n //initialize the adjacency list\n this.adj = new Queue[V];\n //initialize the Queue\n for(int i=0;i<adj.length;i++) {\n //each element in adj is a Queue that stores all vertexes connected with the index i of adj.\n adj[i] = new Queue<Integer>();\n }\n }",
"@Test public void testPublic7() {\n Graph<Character> graph= TestGraphs.testGraph3();\n String[] results= {\"O\", \"\", \"\", \"E F\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n \"B K\", \"A N\", \"C G\", \"H K\", \"D\"};\n\n graph.removeEdge('A', 'I');\n graph.removeEdge('K', 'J');\n graph.removeEdge('M', 'L');\n graph.removeEdge('N', 'P');\n\n for (Character ch : graph.getVertices())\n assertEquals(results[ch - 'A'],\n TestGraphs.collToString(graph.getNeighbors(ch)));\n }",
"public void addedge(String fro, String to, int wt) {\r\n Edge e = new Edge(fro, to, wt);\r\n\r\n\r\n Set<String> keys = graph.keySet();\r\n// Object[] arr = keys.toArray();\r\n int f = 0;\r\n if(graph.containsKey(fro)&&graph.containsKey(to))\r\n {\r\n\r\n int[] bb2 = new int[2000];\r\n for(int zz=0;zz<5000;zz++){\r\n\r\n\r\n ArrayList<Integer> abcd = new ArrayList<>();\r\n abcd.add(zz);\r\n\r\n if(zz<2500)\r\n zz++;\r\n else\r\n zz++;\r\n\r\n bb2[zz%500]=zz;\r\n\r\n\r\n int qq= 5000;\r\n\r\n qq--;\r\n\r\n String nnn = \"aaa aa\";\r\n nnn+=\"df\";\r\n\r\n\r\n }\r\n\r\n }\r\n else\r\n {\r\n\r\n\r\n System.out.println(\"some vertices are not present\");\r\n return;\r\n }\r\n for ( String y : keys) {\r\n if (fro.compareTo(y) == 0) {\r\n f = 1;\r\n ArrayList<Edge> ee =graph.get(y);\r\n\r\n\r\n ee.add(e);\r\n }\r\n\r\n\r\n }\r\n if (f == 0) {}\r\n }",
"public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}",
"public Graph(int V) {\r\n \t \t\r\n if (V < 0) throw new IllegalArgumentException(\"Number of vertices in a Digraph must be nonnegative\");\r\n this.V = V;\r\n this.E = 0;\r\n this.indegree = new int[V];\r\n adj = (Bag<Edge>[]) new Bag[V];\r\n for (int v = 0; v < V; v++)\r\n adj[v] = new Bag<Edge>();\r\n }",
"public static void main(String[] args) {\n\t\tVertex v1, v2, v3, v4, v5, v6, v7;\n\t\tv1 = new Vertex(\"v1\");\n\t\tv2 = new Vertex(\"v2\");\n\t\tv3 = new Vertex(\"v3\");\n\t\tv4 = new Vertex(\"v4\");\n\t\tv5 = new Vertex(\"v5\");\n\t\tv6 = new Vertex(\"v6\");\n\t\tv7 = new Vertex(\"v7\");\n\n\t\tv1.addAdjacency(v2, 2);\n\t\tv1.addAdjacency(v3, 4);\n\t\tv1.addAdjacency(v4, 1);\n\n\t\tv2.addAdjacency(v1, 2);\n\t\tv2.addAdjacency(v4, 3);\n\t\tv2.addAdjacency(v5, 10);\n\n\t\tv3.addAdjacency(v1, 4);\n\t\tv3.addAdjacency(v4, 2);\n\t\tv3.addAdjacency(v6, 5);\n\n\t\tv4.addAdjacency(v1, 1);\n\t\tv4.addAdjacency(v2, 3);\n\t\tv4.addAdjacency(v3, 2);\n\t\tv4.addAdjacency(v5, 2);\n\t\tv4.addAdjacency(v6, 8);\n\t\tv4.addAdjacency(v7, 4);\n\n\t\tv5.addAdjacency(v2, 10);\n\t\tv5.addAdjacency(v4, 2);\n\t\tv5.addAdjacency(v7, 6);\n\n\t\tv6.addAdjacency(v3, 5);\n\t\tv6.addAdjacency(v4, 8);\n\t\tv6.addAdjacency(v7, 1);\n\n\t\tv7.addAdjacency(v4, 4);\n\t\tv7.addAdjacency(v5, 6);\n\t\tv7.addAdjacency(v6, 1);\n\n\t\tArrayList<Vertex> weightedGraph = new ArrayList<Vertex>();\n\t\tweightedGraph.add(v1);\n\t\tweightedGraph.add(v2);\n\t\tweightedGraph.add(v3);\n\t\tweightedGraph.add(v4);\n\t\tweightedGraph.add(v5);\n\t\tweightedGraph.add(v6);\n\t\tweightedGraph.add(v7);\n\t\t\n\t\tdijkstra( weightedGraph, v7 );\n\t\tprintPath( v1 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v2 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v3 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v4 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v5 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v6 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v7 );\n\t\tSystem.out.println(\"\");\n\t}",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"private static void setGraph()\n\t\t{\n\t\t\tmap = new HashMap();\n\t\t\t\n\t\t\twordNum = 0;\n\t\t\twordList = new String[txtStr.length()];\n\t\t\tfor(int i = 0; i<strList.length; i++)\n\t\t\t{\n\t\t\t\tif(!map.containsKey(strList[i]))\n\t\t\t\t{\n\t\t\t\t\tmap.put(strList[i], wordNum);\n\t\t\t\t\twordList[wordNum] = strList[i];\n\t\t\t\t\twordNum++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tg = new MyGraph(wordNum);\n\t\t\tfor(int i=0; i<strList.length - 1; i++)\n\t\t\t{\n\t\t\t\tint v0 = (int)(map.get(strList[i]));\n\t\t\t\tint v1 = (int)(map.get(strList[i+1]));\n\t\t\t\tint cost = g.getEdge(v0, v1);\n\t\t\t\t\n\t\t\t\tg.setEdge(v0, v1, cost+1);\n\t\t\t}\n\t\t//\treturn g;\n\t\t\t\t\t\n\t\t}",
"private void init(RawInput inCase){\n\t\t//store raw data\n\t\tN = Integer.parseInt(inCase.getData()[0]);\n\t\trawConnections = new int[N-1][2];\n\t\tfor(int i=1; i<N; i++){\n\t\t\tArrayList<Integer> xx = Util.splitStringToInt(inCase.getData()[i], null);\n\t\t\trawConnections[i-1][0] = xx.get(0);\n\t\t\trawConnections[i-1][1] = xx.get(1);\n\t\t}\n\t\tGraph g = new Graph(N, rawConnections);\n\t\tSystem.out.println(\"init :: N=\" + N + \", \" + (N-1) + \"th edge: \" + rawConnections[N-2][0] + \" <-> \" + rawConnections[N-2][1] + \" -> max(deg)=\" + g.getMaxDegree());\n\t}",
"@Test public void testPublic12() {\n Graph<Integer> graph= new Graph<Integer>();\n int i;\n\n // note this adds the adjacent vertices in the process\n for (i= 0; i < 10; i++)\n graph.addEdge(i, i + 1, 1);\n graph.addEdge(10, 0, 1);\n\n for (Integer vertex : graph.getVertices())\n assertTrue(graph.isInCycle(vertex));\n }",
"@Override\n public void addVertex(V vertex)\n {\n if (vertex.equals(null)){\n throw new IllegalArgumentException();\n }\n ArrayList <V> edges = new ArrayList<>();\n\t graph.put(vertex, edges);\n\n }",
"public Graph()\n\t{\n\t\tthis.total_verts = null;\n\t\tthis.total_edges = null;\n\t\tnodes = new HashMap<String, Node>();\n\t}",
"public void testContainsVertex() {\n System.out.println(\"containsVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.containsVertex(new Integer(i)));\n }\n }",
"private void initializeEdges() {\n for (NasmInst inst : nasm.listeInst) {\n if (inst.source == null || inst.destination == null)\n return;\n Node from = inst2Node.get(label2Inst.get(inst.source.toString()));\n Node to = inst2Node.get(label2Inst.get(inst.destination.toString()));\n if (from == null || to == null)\n return;\n graph.addEdge(from, to);\n }\n }",
"@SuppressWarnings(\"null\")\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(Paths.get(\"C:\\\\Users\\\\RIZERO\\\\Desktop\\\\text.txt\"),\"UTF-8\");\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tString s = \"[a-z]*\", word1 = \"\", word2 = \"\";\n\t\tPattern pattern = Pattern.compile(s);\n\t\tMatcher ma;\n\t\tString str;\n\t\tboolean flag1 = true, flag2 = true;\n\t\t\n\t\tList<Vertex> verList = new LinkedList<Graph.Vertex>();\n\n\t\tMap<String, List<Edge>> ve_Map = new HashMap<String, List<Edge>>();\n\n\t\t\n\t\tVertex vertex = null;\n\n\t\twhile(sc.hasNext()) \n\t\t{\n\t str = sc.next().toLowerCase();\n\t ma = pattern.matcher(str);\n\t\t\twhile(ma.find()) \n\t\t\t\tif(!ma.group().equals(\"\"))\n\t\t\t\t list.add(ma.group());\n\t\t}\n\t\t\tfor(String word : list) {\n\t\t\t\tword1 = word2;\n\t\t\t\tword2 = word;\n\t\t\t\tflag1 = true;\n\t\t\t\tflag2 = true;\n\t\t\t\tvertex = new Vertex(word1);\n\t\t\t\tfor(Vertex ver : verList) {\n\t\t\t\t\tif (word1.equals(ver.getName())|| word1.equals(\"\")) {\n\t\t\t\t\t\tflag1 = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n if(flag1) {\n \tvertex = new Vertex(word1);\n\t\t\t\t\tverList.add(vertex);\n\t\t\t\t\tve_Map.put(vertex.getName(), new LinkedList<Graph.Edge>());\n\t\t\t\t}\n \n for(Edge edge : ve_Map.get(word1)) {\n\t\t\t\t\tif (word2.equals(edge.getEnd().getName())) {\n\t\n\t\t\t\t\t\tedge.upWeight();\n\t\t\t\t\t\tflag2 = false;\n\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 if(flag2 && !(word1.equals(\"\"))) {\n \tvertex = new Vertex(word2);\n \tve_Map.get(word1).add(new Edge(vertex, 1));\n }\t\n\t\t\t}\n\t\t\n\t\tfor(Vertex ver : verList) {\n\t\t\tfor(Edge edge : ve_Map.get(ver.getName())) {\n\t\t\t\tSystem.out.println(ver.getName()+\"->\"+edge.getEnd().getName()+\" = \"+edge.getWeight());\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(list);\n\t\tSystem.out.println(new Date());\n\t\tsc.close();\n\t}",
"public void addVertex (){\t\t \n\t\tthis.graph.insert( new MyList<Integer>() );\n\t}",
"public void testAddVertex() {\n System.out.println(\"addVertex\");\n\n Graph<Integer, Edge<Integer>> graph = newGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.addVertex(new Integer(i)));\n }\n\n for (int i = 0; i < 25; i++) {\n Assert.assertFalse(graph.addVertex(new Integer(i)));\n }\n }",
"@Test \r\n void create_edge_between_to_nonexisted_vertexes() {\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }",
"public Graph(int V)\n {\n this.V = V;\n adj = (Bag<Integer>[]) new Bag[V];\n for (int v = 0; v < V; v++)\n adj[v] = new Bag<Integer>();\n }",
"public Graph()\r\n\t{\r\n\t\tthis.adjacencyMap = new HashMap<String, HashMap<String,Integer>>();\r\n\t\tthis.dataMap = new HashMap<String,E>();\r\n\t}",
"private void generateVertexSignatures() {\n \t this.create(0);\n \t this.vertexSignatures = new ArrayList<String>();\n \t this.vertexSignatures.add(this.toCanonicalVertexString());\n \t int count = this.getVertexCount();\n \t for (int vertexIndex = 1; vertexIndex < count; vertexIndex++) {\n \t this.resetDAG(vertexIndex);\n \t this.vertexSignatures.add(this.toCanonicalVertexString());\n \t }\n \t}",
"@Test\r\n void create_edge_between_null_vertexes() {\r\n graph.addEdge(null, \"B\");\r\n graph.addEdge(\"A\", null);\r\n graph.addEdge(null, null);\r\n vertices = graph.getAllVertices();\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.isEmpty() | !adjacentA.isEmpty() | !adjacentB.isEmpty()) {\r\n fail();\r\n } \r\n }",
"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 }",
"public void testRemoveVertex() {\n System.out.println(\"removeVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n for (int i = 24; i >= 0; i--) {\n Assert.assertTrue(graph.removeVertex(new Integer(i)));\n Assert.assertFalse(graph.containsVertex(new Integer(i)));\n Assert.assertEquals(graph.verticesSet().size(), i);\n }\n }",
"GraphObj() {\n this._V = 0;\n this._E = 0;\n inListArray = new ArrayList<>();\n inListArray.add(null);\n outListArray = new ArrayList<>();\n outListArray.add(null);\n selfEdges = new ArrayList<>();\n selfEdges.add(-1);\n edgeList = new ArrayList<>();\n edgeList.add(null);\n }",
"public Vertex(String aName)\r\n\t\t{\r\n\t\t\tthis.name = aName;\r\n\t\t\tthis.neighbors = new ArrayList<Edge>();\r\n\t\t}",
"@Test\n void test03_addEdgeBetweenVerticesWhichDontExist() {\n graph.addEdge(\"a\", \"b\");\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates mock up vertex list\n if (!graph.getAllVertices().equals(vertices)) { // compares vertices list\n fail(\"Graph didn't add the vertices correctly\");\n }\n List<String> adjOfA = new ArrayList<>();\n adjOfA.add(\"b\"); // creates mock up adjacent list\n if (!graph.getAdjacentVerticesOf(\"a\").equals(adjOfA)) { // compares adjacent lists\n fail(\"Graph didn't correctly place adjacent vertices\");\n }\n }",
"public static Graph buildGraph1() {\n Graph g = new Graph(\"Undirected graph For Kruskal Algorithm\");\n g.addEdge(\"A\", \"E\", 5);\n g.addEdge(\"A\", \"D\", 3);\n g.addEdge(\"A\", \"H\", 7);\n g.addEdge(\"A\", \"B\", 6);\n g.addEdge(\"D\", \"E\", 9);\n g.addEdge(\"D\", \"C\", 12);\n g.addEdge(\"C\", \"B\", 20);\n g.addEdge(\"B\", \"F\", 15);\n g.addEdge(\"F\", \"G\", 17);\n g.addEdge(\"G\", \"H\", 1);\n\n g.sortEdgesByIncreasingWeights();\n\n System.out.println(g);\n\n return g;\n }",
"public Graph(int V, int E) {\n this(V);\n if (E < 0) throw new RuntimeException(\"Number of edges must be nonnegative\");\n for (int i = 0; i < E; i++) {\n int v = (int) (Math.random() * V);\n int w = (int) (Math.random() * V);\n double weight = Math.round(100 * Math.random()) / 100.0;\n Edge e = new Edge(v, w, weight,0);\n //addEdge(e);\n }\n }",
"@Test public void testPublic10() {\n Graph<Character> graph= TestGraphs.testGraph3();\n char[] toRemove= {'I', 'H', 'B', 'J', 'C', 'G', 'E', 'F'};\n String[] results= {\"O\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"K\",\n \"A L N\", \"P\", \"K\", \"D\"};\n int i;\n\n for (i= 0; i < toRemove.length; i++)\n graph.removeVertex(toRemove[i]);\n\n for (Character ch : graph.getVertices())\n assertEquals(results[ch - 'A'],\n TestGraphs.collToString(graph.getNeighbors(ch)));\n }",
"public:\n Graph(int V); // Constructor\n void addEdge(int v, int w);",
"public String depthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n ConstantTimeStack<Vertex<AnyType>> stack = new ConstantTimeStack<Vertex<AnyType>>();\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 0;\n //loop through to set each vertex to not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if find the start vertex then set index position to counter\n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n }\n //if doesn't exist then through exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //if it does exist then push start node onto stack, set visited \n else if(exists){\n stack.push(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n Vertex <AnyType> e = vertex_adjacency_list.get(counter);\n counter = 2;\n int n = e.numberOfAdjacentVertices();\n try{\n \n while(true){\n //loop through e's adjacent vertices \n for (n = e.numberOfAdjacentVertices()-1; n >=0 ; n--){\n //if the adacent vertex has not been visited\n if(e.getAdjacentVertex(n).hasBeenVisited()==false){\n //change e to adjacent vertex and push onto stack\n e = e.getAdjacentVertex(n);\n stack.push(e);\n //set e as visited at counter\n e.setVisited(counter);\n counter++;\n //reset n to e's num of vertices\n n = e.numberOfAdjacentVertices();\n }\n //if it has been visited and it's the first node in list\n //then pop it off the stack and then set e to new top\n //set n to new num of vertices\n else if(e.getAdjacentVertex(n).hasBeenVisited() && n == 0){\n stack.pop();\n e = stack.peek();\n n = e.numberOfAdjacentVertices();\n }\n }\n }\n }catch(EmptyStackException m){\n }\n }\n //loop through the list and print each with when it was visited\n for(int k = 0; k< vertex_adjacency_list.size(); k++){\n buffer.append(vertex_adjacency_list.get(k) + \":\" + vertex_adjacency_list.get(k).getVisited()+ \"\\n\");\n }\n \n return buffer.toString();\n \n }",
"private void initialise(String initialWord, int size, SimpleGraph<String, DefaultEdge> graph){\n\t\tHashtable<String, ArrayList<String>> progress = new Hashtable<String, ArrayList<String>>(size);\t\t\t\t\t\n\t\tfor(String s: words){\n\t\t\tif(!(progress.containsKey(s)))\n\t\t\t\tprogress.put(s, matchingWords(s));\n\t\t}\n\t\tEnumeration<String> key = progress.keys();\n\t\tString keyword;\n\t\tArrayList<String> values = new ArrayList<String>();\n\t\twhile(key.hasMoreElements()){\n\t\t\tkeyword=(String)key.nextElement();\n\t\t\tvalues = progress.get(keyword);\n\t\t\tif(!(graph.containsVertex(keyword))){\n\t\t\t\tgraph.addVertex(keyword);\n\t\t\t\tfor(String s: values){\n\t\t\t\t\tgraph.addVertex(s);\n\t\t\t\t\tgraph.addEdge(keyword, s);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tfor(String s: values){\n\t\t\t\t\tif(!(graph.containsEdge(keyword,s))){\n\t\t\t\t\t\tgraph.addVertex(s);\n\t\t\t\t\t\tgraph.addEdge(keyword, s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public Graph(int V) {\n if (V < 0) throw new RuntimeException(\"Number of vertices must be nonnegative\");\n this.V = V;\n this.E = 0;\n\n\n adj = (LinkedList<Edge>[])new LinkedList[V];\n for (int v = 0; v < V; v++) adj[v] = new LinkedList<Edge>();\n }",
"@Override public Graph<String> emptyInstance() {\n return new ConcreteVerticesGraph<String>();\n }",
"public String breadthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 1;\n //make new vertex to check if its in list\n //make queue to hold vertices\n SemiConstantTimeQueue<Vertex<AnyType>> queue = new SemiConstantTimeQueue<Vertex<AnyType>>();\n //loop through and set not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if it's in list then set exists to true\n //and set visited \n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n } \n //if doesn't exist then throw the exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //make new queue\n queue.add(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n counter = 1;\n int k=0;\n Vertex<AnyType>e;\n //while the queue isn't empty\n while(queue.peek() !=null){\n //make e the top of the queue \n e = queue.peek(); \n //go through the list and if you reach the begining it exits loop\n for( k = 0; k < vertex_adjacency_list.size()-1; k++){\n if(vertex_adjacency_list.get(k).compareTo(e)==0){\n break;\n }\n } \n //go through loop and check if visited, if not then add it to queue, set visited\n for( int j = 0; j< vertex_adjacency_list.get(k).numberOfAdjacentVertices(); j++){\n if(vertex_adjacency_list.get(k).getAdjacentVertex(j).hasBeenVisited()==false){\n counter++;\n queue.add(vertex_adjacency_list.get(k).getAdjacentVertex(j));\n vertex_adjacency_list.get(k).getAdjacentVertex(j).setVisited(counter);\n }\n }\n //remove from queue when through loop once\n k++;\n queue.remove();\n }\n //loop through list and print vertex and when it was visited\n for(int o = 0; o< vertex_adjacency_list.size(); o++){\n buffer.append(vertex_adjacency_list.get(o) + \":\" + vertex_adjacency_list.get(o).getVisited()+ \"\\n\");\n }\n return buffer.toString();\n }",
"@Test public void testPublic4() {\n Graph<Character> graph= TestGraphs.testGraph1();\n\n assertEquals(\"B\", TestGraphs.collToString(graph.getNeighbors('A')));\n }",
"Graph(int n){\r\n numberOfVertices = n;\r\n adjacentVertices = new LinkedList[numberOfVertices];\r\n for (int i = 0; i < numberOfVertices; i++){\r\n adjacentVertices[i] = new LinkedList<>();\r\n }\r\n }",
"private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}",
"public Graph(){\r\n this.listEdges = new ArrayList<>();\r\n this.listNodes = new ArrayList<>();\r\n this.shown = true;\r\n }",
"public void addVertex (T vertex){\n if (vertexIndex(vertex) > 0) return; // vertex already in graph, return.\n if (n == vertices.length){ // need to expand capacity of arrays\n expandCapacity();\n }\n \n vertices[n] = vertex;\n for (int i = 0; i < n; i++){ // populating new edges with -1\n edges[n][i] = -1;\n edges[i][n] = -1;\n }\n n++;\n }",
"@Test\r\n void insert_multiple_vertexes_and_edges_remove_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"B\", \"D\");\r\n \r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n int numberOfEdges = graph.size();\r\n int numberOfVertices = graph.order();\r\n if(numberOfEdges != 4) {\r\n fail();\r\n }\r\n if(numberOfVertices != 4) {\r\n fail();\r\n }\r\n \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")|!vertices.contains(\"D\")) {\r\n fail();\r\n }\r\n \r\n // Check that A's outgoing edges are correct\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\") || !adjacent.contains(\"C\"))\r\n fail();\r\n // Check that B's outgoing edges are correct\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\") | !adjacent.contains(\"D\"))\r\n fail(); \r\n // C and D have no out going edges \r\n adjacent = graph.getAdjacentVerticesOf(\"C\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n adjacent = graph.getAdjacentVerticesOf(\"D\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n // Remove B from the graph \r\n graph.removeVertex(\"B\");\r\n // Check that A's outgoing edges are correct\r\n // An edge to B should no exist any more \r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (adjacent.contains(\"B\") || !adjacent.contains(\"C\"))\r\n fail();\r\n // There should be no elements in the list of successors\r\n // of B since its deleted form the graph\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n // Check that graph has still has all vertexes not removed\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"C\")|\r\n !vertices.contains(\"D\")) {\r\n fail();\r\n }\r\n //Check that vertex B was removed from graph \r\n if(vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n numberOfEdges = graph.size();\r\n numberOfVertices = graph.order();\r\n if(numberOfEdges != 1) {\r\n fail();\r\n }\r\n if(numberOfVertices != 3) {\r\n fail();\r\n }\r\n }",
"Graph(int v) {\n V = v;\n adj = new LinkedList[v];\n for (int i = 0; i < v; ++i)\n adj [i] = new LinkedList();\n }",
"public void newVertex(String name)\r\n\t{\r\n\t\t// new vertex initialized here\r\n\t\tmyGraph[graphSize] = new Vertex();\r\n\t\tmyGraph[graphSize].name = name;\r\n\t\tmyGraph[graphSize].adjVertexHead = null;\r\n\t\t// maintain the size counter\r\n\t\tgraphSize++;\r\n\t}",
"private void clearVisited(){\r\n\t\tfor(int i=0; i<graphSize; i++){\r\n\t\t\tmyGraph[i].visited = false;\r\n\t\t\tAdjVertex vert = myGraph[i].adjVertexHead;\r\n\t\t\twhile(vert != null){\r\n\t\t\t\tvert.visited = false;\r\n\t\t\t\tvert= vert.next;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"VertexNetwork() {\r\n /* This constructor creates an empty list of vertex locations. \r\n read The transmission range is set to 0.0. */\r\n transmissionRange = 0.0;\r\n location = new ArrayList<Vertex>(0);\r\n }",
"Graph<Integer, DefaultEdge> buildMap();",
"Vertex createVertex();",
"@Override\n\tpublic int graphOrder() {\n\t\treturn vertices.size();\n\t}",
"public ArangoDBVertex(String key, String label, ArangoDBGraph graph) {\n\t\tsuper(key, label, graph);\n\t}",
"private static void initGraphCheck(int V) {\r\n\t\tdfs_num = new int[V];\r\n\t\tArrays.fill(dfs_num, DFS_WHITE);// reinicio a no visitado\r\n\t\tnumComp = 0;\r\n\t\tdfs_parent = new int[V];\r\n\t\tArrays.fill(dfs_parent, -1);\r\n\r\n\t\tprintThis(\"Graph Edges Property Check\");\r\n\t\tfor (int i = 0; i < V; i++) {\r\n\t\t\tif (dfs_num[i] == DFS_WHITE) {\r\n\t\t\t\tSystem.out.printf(\"Component %d:\\n\", ++numComp);\r\n\t\t\t\tgraphCheck(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static void resetStatusVertex(Graph graph) {\r\n\t\tfor (int i = 0; i < graph.getVerticesGraph().size(); i++) {\r\n\t\t\tgraph.getVerticesGraph().get(i).alteraStatusVertice(false);\r\n\t\t}\r\n\t}",
"public static String graphTest(GraphInterface subject) {\n // Let the Test begin!\n System.out.println(\"Test beginnt...\");\n if (subject.getNumberOfVertices() != 10)\n return \"FEHLER: Liste nicht mit 10 Knoten initialisiert!\";\n // Lets now check the fail-safes\n subject.addEdge(11, 1, 1);\n subject.addEdge(-1, 2, 1);\n subject.removeEdge(13, 3);\n subject.removeEdge(-3, 3);\n subject.removeEdge(6, 0);// Does not exist (But the vertices do)!\n\n if (subject.getWeight(7, 0) != 0)\n return \"FEHLER: getWeight(7, 0): Kante 7<->0 existiert nicht!\";\n\n if (subject.getWeight(-7, 0) != 0)\n return \"FEHLER: getWeight(-7, 0):Kante -7<->0 existiert nicht!\";\n\n if (subject.getWeight(17, 0) != 0)\n return \"FEHLER: getWeight(17, 0): Kante 17<->0 existiert nicht!\";\n\n if (subject.getDegree(-10) != -1)\n return \"FEHLER: getDegree(-10): Knoten -10 existiert nicht!\";\n\n if (subject.getDegree(140) != -1)\n return \"FEHLER: getDegree(140): Knoten 140 existiert nicht!\";\n\n if (subject.getDegree(0) == -1)\n return \"FEHLER: getDegree(0): Knoten 0 existiert (Und hat Kanten)!\";\n\n if (subject.getNeighbours(-3) != null)\n return \"FEHLER: getNeighbours(-3): Knoten -3 existiert nicht!\";\n\n if (subject.getNeighbours(13) != null)\n return \"FEHLER: getNeighbours(13): Knoten 13 existiert nicht!\";\n\n // lets check if there are NO edges\n for (int i = 0; i < 10; i++)\n if (subject.getDegree(i) != 0)\n return \"FEHLER: getDegree(\" + i + \")!=0\";\n for (int i = 0; i < 10; i++)\n if (subject.getNeighbours(i).length != 0)\n return \"FEHLER: getNeighbours(\" + i + \").length!=0\";\n // create a network and check it\n for (int edge = 0; edge < edges.length; edge++) {\n if (subject.getWeight(edges[edge][0], edges[edge][1]) != 0)\n return \"FEHLER: getWeight(\" + edges[edge][0] + \", \"\n + edges[edge][1] + \")!=0\";\n subject.addEdge(edges[edge][0], edges[edge][1], edges[edge][2]);\n if (subject.getWeight(edges[edge][0], edges[edge][1]) != edges[edge][2])\n return \"FEHLER: getWeight(\" + edges[edge][0] + \", \"\n + edges[edge][1] + \")!=\" + edges[edge][2];\n int[] tempNeighbours = subject.getNeighbours(edges[edge][0]);\n boolean foundFlag = false;\n for (int j = 0; j < tempNeighbours.length; j++)\n if (edges[edge][1] == tempNeighbours[j]) {\n foundFlag = true;\n break;\n }\n if (!foundFlag)\n return \"Fehler: getNeighbours(\" + edges[edge][0]\n + \") enth�lt nicht die vorhandene Kante '\"\n + edges[edge][1] + \"'!\";\n }\n\n // and finally: delete some edges\n for (int edge = 0; edge < edges.length; edge++) {\n subject.addEdge(edges[edge][0], edges[edge][1], 14);\n if (subject.getWeight(edges[edge][0], edges[edge][1]) != 14)\n return \"FEHLER: getWeight(\" + edges[edge][0] + \", \"\n + edges[edge][1] + \")!=14\";\n subject.removeEdge(edges[edge][0], edges[edge][1]);\n if (subject.getWeight(edges[edge][0], edges[edge][1]) != 0)\n return \"FEHLER: getWeight(\" + edges[edge][0] + \", \"\n + edges[edge][1] + \")!=0\";\n }\n\n return \"Keine Fehler gefunden!\\n\";\n }",
"protected void resetGraph() {\n for (List<Edge> path : graph) {\r\n for (Edge e : path) {\r\n e.flow = 0;\r\n }\r\n }\r\n }",
"public static Graph createAcyclicGraph(int V, int E, boolean weighted, int[] perm) {\r\n\t\tif (E > (V*(V-1)) || E < V) {\r\n\t\t\tthrow new IllegalArgumentException(\"To many/few edges\");\r\n\t\t}\r\n\t\t\r\n\t\tRandom rand = new Random();\r\n\t\tArrayList<Integer> permutation = new ArrayList<Integer>();\r\n\t\t\r\n\t\tGraph g = new Graph(V);\r\n\t\t\r\n\t\t/* Create a random permutation if the user did not specify a permutation, otherwise it uses\r\n\t\t * the permutation of the user as permutation*/\r\n\t\tif (perm == null) {\r\n\t\t\tfor (int i = 0; i < V; i++) {\r\n\t\t\t\tpermutation.add(i);\r\n\t\t\t}\t\t\r\n\t\t\tCollections.shuffle(permutation);\t\t\t\r\n\t\t} else {\r\n\t\t\tfor (int i = 0; i < V; i++) {\r\n\t\t\t\tpermutation.add(perm[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(permutation.toString());\r\n\t\t\r\n\t\t/* This will create an unweighted graph*/\r\n\t\tif (weighted == false) {\r\n\t\t\tfor (int i = 0; i < V-1; i++) {\r\n\t\t\t\tint pos = i;\r\n\t\t\t\tif (!g.addRandomEdge(permutation.get(pos), permutation.get(rand.nextInt(V - pos) + pos), 1)) {i--;} \r\n\t\t\t\telse {E--;}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile (E > 0) {\r\n\t\t\t\tint srcIndex = rand.nextInt(V-1);\r\n\t\t\t\tint destIndex = rand.nextInt((V-1) - srcIndex) + srcIndex;\r\n\t\t\t\t\r\n\t\t\t\tif (g.addRandomEdge(permutation.get(srcIndex), permutation.get(destIndex), 1)) {E--;}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t/* This will create a weighted graph*/\r\n\t\t} else {\r\n\t\t\tfor (int i = 0; i < V-1; i++) {\r\n\t\t\t\tint pos = i;\r\n\t\t\t\tif (!g.addRandomEdge(permutation.get(pos), permutation.get(rand.nextInt(V - pos) + pos), rand.nextInt(20))) {i--;} \r\n\t\t\t\telse {E--;}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile (E > 0) {\r\n\t\t\t\tint srcIndex = rand.nextInt(V-1);\r\n\t\t\t\tint destIndex = rand.nextInt((V-1) - srcIndex) + srcIndex;\r\n\t\t\t\t\r\n\t\t\t\tif (g.addRandomEdge(permutation.get(srcIndex), permutation.get(destIndex), rand.nextInt(20))) {E--;}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn g;\r\n\t\t\r\n\t}"
] | [
"0.6646043",
"0.6602837",
"0.6386937",
"0.63093865",
"0.627911",
"0.6235726",
"0.61922807",
"0.61689734",
"0.6165844",
"0.61488265",
"0.6139718",
"0.6133006",
"0.6113054",
"0.6064468",
"0.6053043",
"0.60462815",
"0.60244447",
"0.60016155",
"0.5994447",
"0.59559625",
"0.5950492",
"0.5944713",
"0.59141064",
"0.5906043",
"0.59045196",
"0.58992904",
"0.5893165",
"0.58677816",
"0.586662",
"0.5865454",
"0.58595604",
"0.58472764",
"0.5833719",
"0.5832652",
"0.5825468",
"0.5825098",
"0.5811008",
"0.57997495",
"0.57930726",
"0.5782845",
"0.5775367",
"0.5766205",
"0.57641566",
"0.57538086",
"0.5749399",
"0.574773",
"0.5742001",
"0.574153",
"0.5740393",
"0.5729253",
"0.57251215",
"0.5724905",
"0.57143295",
"0.57105833",
"0.5704437",
"0.5703959",
"0.57003635",
"0.56981665",
"0.5696065",
"0.5694539",
"0.5692855",
"0.5691266",
"0.56843287",
"0.567986",
"0.56791854",
"0.5668035",
"0.56661445",
"0.56636614",
"0.56610984",
"0.563647",
"0.5634696",
"0.563125",
"0.562213",
"0.56143",
"0.5604699",
"0.56031924",
"0.5597349",
"0.55924416",
"0.5592081",
"0.5590028",
"0.55890566",
"0.55835253",
"0.5580523",
"0.55799353",
"0.557913",
"0.5576237",
"0.5573847",
"0.55661637",
"0.5561009",
"0.55591",
"0.555204",
"0.55507964",
"0.55484086",
"0.5540412",
"0.5534907",
"0.5533303",
"0.5532541",
"0.5530148",
"0.55267894",
"0.5525768"
] | 0.7379464 | 0 |
/ Return the number of edges in the graph. | public int numEdges() {
return edges;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getNumberOfEdges();",
"public int getNumEdges() {\n\t\treturn edges.size();\n\t}",
"public int numEdges();",
"public int getNumberOfEdges();",
"int getEdgeCount();",
"public int getEdgeCount() {\n return edge_.size();\n }",
"public int getNumEdges()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numEdges;\n\t}",
"public int getEdgeCount() {\n if (edgeBuilder_ == null) {\n return edge_.size();\n } else {\n return edgeBuilder_.getCount();\n }\n }",
"public int getNumEdges();",
"public int edgeCount() {\n\treturn edgeList.size();\n }",
"public int getEdgeCount()\n\t{\n\t\treturn edgeCount;\n\t}",
"int numEdges() {\n\t\treturn num_edges;\n\t}",
"public int getNumEdges() {\n return num_edges;\n }",
"public int numEdges()\r\n {\r\n\tint s = 0;\r\n\tfor (final EdgeTypeHolder eth : ethMap.values())\r\n\t s += eth.numEdges();\r\n\treturn s;\r\n }",
"public int edgeNum() {\r\n return edges.size();\r\n }",
"@Override\n public int edgeCount() {\n int count = 0;\n\n for(MyNode n : graphNodes.values()){\n count += n.inDegree();\n }\n\n return count;\n }",
"private int numEdges()\r\n\t{\r\n\t return eSet.size();\r\n\t}",
"public long getEdgeCount() { return edgeCount; }",
"@Override\n\tpublic long numEdges() {\n\t\treturn numEdges;\n\t}",
"public int getNumEdges() {\n\t\treturn this.actualTotalEdges;\n\t}",
"public int numEdges() {\n int tot = 0;\n\n ListIterator<EdgeList> curEdge = edgeListVector.listIterator();\n while (curEdge.hasNext()) {\n tot += curEdge.next().size();\n }\n\n return tot;\n }",
"public int size()\n {\n return numEdges;\n }",
"@Override\n\tpublic int edgeSize() {\n\t\treturn numOfEdges;\n\t}",
"@Override\n\tpublic int graphSize() {\n\t\treturn edges.size();\n\t}",
"public int getNumEdges(){\n return numEdges;\n }",
"@Override\n public int edgeSize() {\n return this.numOfEdges;\n }",
"public int getEdges() {\n return edgesNumber;\n }",
"public int getEdgeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n int counter = 0;\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n counter += node.outDeg();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return counter;\r\n }",
"public long getEdgesArrayLength() {\n\t\treturn edgesLength;\n\t}",
"private int size() {\n assert _vertices.size() == _edges.size();\n return _edges.size();\n }",
"public Integer numUnknownEdges()\n\t{\n\t\tif (total_edges == null) return null;\n\n\t\tint edges = 0;\n\t\tfor (Node n : nodes.values())\n\t\t{\n\t\t\tedges += n.neighbors.size();\n\t\t}\n\t\t// double-counts edges, so divide\n\t\treturn total_edges - edges / 2;\n\t}",
"private static int numEdges(Graph g) {\n\tint sum = 0;\n\t\n\tfor(int i =0;i<g.vertices;i++)\n\t{\n\t LinkedList<Integer> temp = null;\n\t if(g.adjacencyList[i]!=null) {\n\t\ttemp = g.adjacencyList[i];\n\t\tfor(int tmp:temp) {\n\t\t sum++;\n\t\t}\n\t\t\n\t }\n\t}\n\treturn sum/2;\n }",
"public int getEdgeCount() \n {\n return 3;\n }",
"public int getEdgeSixe() {\n\t\treturn graph.edgeSet().size();\r\n\t}",
"public int numEdges(String edgeTypeName)\r\n {\r\n\tfinal EdgeTypeHolder eth = ethMap.get(edgeTypeName);\r\n\treturn (eth == null) ? 0 : eth.numEdges();\r\n }",
"private static int getNumTotalEdges(){\r\n\t\t//return getMutMap().keySet().size();\r\n\t\treturn numCols+1;\r\n\t}",
"@Override\n public int nodeCount() {\n return graphNodes.size();\n }",
"int nbNode() {\n switch (type) {\n\n case EDGE:\n case PATH:\n case EVAL:\n if (edge.getEdgeVariable() == null) {\n return edge.nbNode();\n } else {\n return edge.nbNode() + 1;\n }\n\n case OPT_BIND:\n return size();\n }\n\n return 0;\n }",
"int getNumberOfVertexes();",
"public Object getNumberOfConnectedComponents() {\r\n\t\tConnectivityInspector<Country, DefaultEdge> inspector=new ConnectivityInspector<Country, DefaultEdge>(graph);\r\n\t\treturn inspector.connectedSets().size();\r\n\t}",
"@DisplayName(\"Get the number of edges that contains the graph and test if it is correct\")\n @Test\n public void testGetNumEdges() {\n Assertions.assertEquals(8, graph.getNumberEdges());\n }",
"public int getVertexCount()\n\t{\n\t\tint count = 0;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tcount++;\n\t\t\titr.next();\n\t\t}\n\t\treturn count;\n\t}",
"private int nonDirectionalEdgesNumber() {\n return selectedNonDirectionalEdges.size();\n }",
"private long nodesLength(Edge[] E) {\n\t\tlong nodesLength = 0;\n\t\tfor (Edge e:E ) {\n\t\t\tif (e.getTo() > nodesLength) nodesLength = e.getTo();\n\t\t\tif (e.getFrom() > nodesLength) nodesLength = e.getFrom();\n\t\t}\n\t\tnodesLength++;\t\n\t\treturn nodesLength;\t\t\n\t}",
"public int getNetSize() {\n return graph.size();\n }",
"public int getLayerCount(int edge) throws EdgeOutOfRangeException\n {\n if (edge==DataDirector.PAGE_EDGE)\n return 0;\n else\n return 1;\n }",
"@Test\r\n public void testNumEdges() {\r\n System.out.println(\"numEdges\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n int expResult = 0;\r\n int result = instance.numEdges();\r\n assertEquals(expResult, result);\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1Element, v2Element, edgeElement);\r\n\r\n expResult = 1;\r\n result = instance.numEdges();\r\n assertEquals(expResult, result);\r\n }",
"int getNodesCount();",
"int getNodesCount();",
"public int getOriginalEdgeCount() {\r\n return originalEdgeCount;\r\n }",
"public int getVertexSize() {\n\t\treturn graph.vertexSet().size();\r\n\t}",
"public int getVertexCount();",
"public int localEdgeNum() {\r\n return localEdgeCount;\r\n }",
"public int countPrimaryEdges() {\n\t\t\tint count = 0;\n\t\t\tArrayNode node = this;\n\t\t\twhile (node.mPrimaryEdge != null) {\n\t\t\t\tnode = node.mPrimaryEdge;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\treturn count;\n\t\t}",
"private int visitedNetworksCount() {\n final HashSet<String> visitedNetworksSet = new HashSet<>(mVisitedNetworks);\n return visitedNetworksSet.size();\n }",
"public int nodeCount(){\r\n\t\treturn size;\r\n\t}",
"int nodeCount();",
"int getTotalNumOfNodes() {\n\t\treturn adjList.size();\n\t}",
"int getNodeCount();",
"int getNodeCount();",
"public int nodesCount() {\n return nodes.size();\n }",
"int getNrNodes() {\n\t\treturn adjList.size();\n\t}",
"public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }",
"public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}",
"public int countNeighbours() {\n\t\tint count = 0;\n\t\tif (this.hasNeighbour(0))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(1))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(2))\n\t\t\tcount++;\n\t\treturn count;\n\t}",
"public int getNodeCount() {\n return node_.size();\n }",
"public int getFlowSize()\n\t{\n\t\tint result = 0;\n\t\t\n\t\tfor(Edge e : this.source.getOutgoingEdges())\n\t\t{\n\t\t\tresult += e.getFlow();\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public int getRiversAlongEdges() {\n return riversAlongEdges;\n }",
"public int getVertexCount() {\n return vertexCount;\n }",
"public int size(){\n\t\tNode<E> current = top;\n\t\tint size = 0;\n\t\t\n\t\twhile(current != null){\n\t\t\tcurrent = current.next;\n\t\t\tsize++;\n\t\t}\n\t\t\n\t\treturn size;\n\t}",
"public int nodeSize()\n{\n\treturn getNodes().size();\n}",
"public int size() {\n\t\treturn vertices.size();\n\t}",
"public int Sizeofnetwork() {\n\t\treturn Nodeswithconnect.size();\n\t}",
"public int size() {\n return nodes.size();\n }",
"public int size()\n {\n return nodes.size();\n }",
"public int getNumVertices() {\n\t\treturn vertices.size();\n\t}",
"public int getNumOfNodes() {\n\t\treturn getNumOfNodes(this);\n\t}",
"public int getEdgeCount(boolean biDirectional) {\n int count=0;\n for(T v: map.keySet()) {\n count += map.get(v).size();\n }\n\n if(biDirectional) count = count/2;\n\n return count;\n }",
"public int size() {\n\t\treturn adjacencyMatrix != null ? adjacencyMatrix.length : 0;\n\t}",
"public static int getEdgeNumber(Graph grafo) {\r\n\t\treturn grafo.getEdgeNumber();\r\n\t}",
"protected int getGraphWidth() {\r\n\t\treturn pv.graphWidth;\r\n\t\t/*\r\n\t\t * if (canPaintGraph()) return getWidth()-leftEdge-rightEdge; else\r\n\t\t * return 0;\r\n\t\t */\r\n\t}",
"public int size() {\n\t\treturn nodes.size();\n\t}",
"public static int countNodes() {\n\t\treturn count_nodes;\n\t}",
"public abstract int getVertexCount();",
"public int getVertexCount() {\n\t\treturn vertexCount;\n\t}",
"public int size()\r\n { \r\n return numNodes;\r\n }",
"public int getNumVertices();",
"public int getNodeCount() {\n return nodeCount;\n }",
"public final int size() {\n return nNodes;\n }",
"public int nodeCount() {\n\treturn nodeList.size();\n }",
"public int getSize() {\n\t\tint size=0;\n\t\tfor(Node<E> p=head.next;p!=null; p=p.next){\n\t\t\tsize++;\n\t\t}\n\t\treturn size;\n\t}",
"public int size(){\n return nodes.size();\n }",
"public int numVertices();",
"public int numVertices();",
"protected int getGraphHeight() {\r\n\t\treturn pv.graphHeight;\r\n\t\t/*\r\n\t\t * if (canPaintGraph()) return\r\n\t\t * (getHeight()-topEdge-bottomEdge)/channelCount; else return 0;\r\n\t\t */\r\n\t}",
"public int countNodes(){\r\n \treturn count(root);\r\n }",
"@Override\n\tpublic int size() {\n\t\tif(top == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tNode<T> tempNode = top;\n\t\tint counter = 1;\n\t\twhile(tempNode.getLink() != null) {\n\t\t\tcounter++;\n\t\t\ttempNode = tempNode.getLink();\n\t\t}\n\t\treturn counter;\n\t}",
"public int getNumNodes() {\n\t\treturn nodes.size();\n\t}",
"public int getVertexCount() {\n return map.keySet().size();\n }",
"public int getNumberOfVertices();"
] | [
"0.8651609",
"0.8564569",
"0.85052556",
"0.8477237",
"0.8429774",
"0.8371679",
"0.8344664",
"0.8320758",
"0.83171886",
"0.83145225",
"0.8270574",
"0.822289",
"0.8200661",
"0.8199919",
"0.8166396",
"0.812313",
"0.80748",
"0.8070937",
"0.80614215",
"0.8044037",
"0.8007625",
"0.79998446",
"0.79902303",
"0.7987655",
"0.7948517",
"0.78591067",
"0.7777657",
"0.77544796",
"0.75644594",
"0.74991524",
"0.74367243",
"0.74182963",
"0.7381926",
"0.7325192",
"0.72399926",
"0.7131721",
"0.70781213",
"0.7072165",
"0.70191085",
"0.698078",
"0.69731987",
"0.69517785",
"0.6941615",
"0.68992996",
"0.68725795",
"0.6831391",
"0.6807487",
"0.68055916",
"0.68055916",
"0.67575103",
"0.6725672",
"0.67255586",
"0.66955084",
"0.66238815",
"0.6585471",
"0.6569879",
"0.65646565",
"0.6529074",
"0.6515055",
"0.6515055",
"0.65008616",
"0.6494749",
"0.64757085",
"0.64602214",
"0.644373",
"0.64025474",
"0.6399083",
"0.63970035",
"0.6392455",
"0.63861084",
"0.6376239",
"0.6359495",
"0.63389856",
"0.6336209",
"0.6331979",
"0.6330499",
"0.6314702",
"0.6312404",
"0.63097405",
"0.63068527",
"0.6303039",
"0.6301466",
"0.62980264",
"0.62895596",
"0.6289156",
"0.627903",
"0.62779576",
"0.62746733",
"0.6258267",
"0.6245138",
"0.6230137",
"0.6225764",
"0.62214464",
"0.62214464",
"0.62090576",
"0.6204364",
"0.62024975",
"0.61809015",
"0.6177272",
"0.6176165"
] | 0.84571666 | 4 |
/ Given the label, return the vertex. | Vertex findVertex(char v) {
for (int i = 0; i < vertices.size(); i++) {
if (vertices.get(i).label == v)
return vertices.get(i);
}
return null; // return null if not found.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DSAGraphVertex getVertex(String label)\n\t{\n\t\tDSAGraphVertex temp, target = null;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\tif(vertices.isEmpty()) // case: list is empty\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Vertices list is empty.\");\n\t\t}\n\t\telse //searches for target\n\t\t{\n\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t{\n\t\t\t\ttemp = itr.next();\n\t\t\t\tif(temp.getLabel().equals(label))\n\t\t\t\t{\n\t\t\t\t\ttarget = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(target == null) // case: not found\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Label |\" + label + \"| not found\");\n\t\t}\n\n\t\treturn target;\n\t}",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"public Vertex(L l) {\n\t\tlabel = l;\n\t}",
"public boolean addVertex(T vertexLabel);",
"Vertex getVertex();",
"Vertex getVertex(int index);",
"public Vertex(T vertexLabel) {\r\n\t\tlabel = vertexLabel;\r\n\t\tedgeList = new LinkedList<Edge>();\r\n\t\tvisited = false;\r\n\t\tpreviousVertex = null;\r\n\t\tcost = 0;\r\n\t}",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"Vertex createVertex();",
"public V getVertex(int index);",
"public void gotoVertex(char v) {\r\n\t\tfor (int i = 0; i < vertices.size(); i++) {\r\n\t\t\tif (vertices.get(i).label == v) {\r\n\t\t\t\tcurrentVertex = vertices.get(i);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"The vertex \" + v + \" does not exist.\");\r\n\t}",
"private Vertice getVertex(String name) {\r\n Vertice v = (Vertice) vertices.get(name);\r\n if (v == null) {\r\n v = new Vertice(name);\r\n vertices.put(name, v);\r\n }\r\n return v;\r\n }",
"private int findVertIndex(T vertLabel) {\n ArrayList<T> labelRow = matrix.get(0);\n int vertIndex;\n if ((vertIndex = labelRow.indexOf(vertLabel)) == -1) {\n // System.out.println(\"Error: Vertex '\" + vertLabel + \"' does not exist in the matrix\");\n return -1;\n }\n vertIndex += 1; //Add 1 to account for the label cell\n return vertIndex;\n }",
"public Vertex getVertex(String name) {\n return mVertices.get(name);\n }",
"public Vertex getVertex(int name) {\n\t\treturn vertices.get(name);\n\t}",
"private Vertex getVertex( String vertexName )\n {\n Vertex v = vertexMap.get( vertexName );\n if( v == null )\n {\n v = new Vertex( vertexName );\n vertexMap.put( vertexName, v );\n }\n return v;\n }",
"public String vertexName();",
"private Vertex getVertexFor(Agent ag) {\n return getDataFor(ag).vertex;\n }",
"public DSAGraphVertex(String inLabel, Object inValue)\n\t\t{\n\t\t\tlabel = inLabel;\n\t\t\tvalue = inValue;\n\t\t\tlinks = new DSALinkedList();\n\t\t\tvisited = false;\n\t\t}",
"public Vertex(String name){\r\n this.name = name;\r\n }",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean hasVertex(String label)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tgetVertex(label);\n\t\t\tsucess = true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\tsucess = false;\n\t\t}\n\t\treturn sucess;\n\t}",
"public Vertex getVertex(String place)\n\t{\n\t\treturn vertices.get(place);\n\t}",
"@Test\n public void getlabelTest() {\n \tVertex<String> v=new Vertex<String>(\"v\");\n \tassertEquals(\"v\", v.getlabel());\n }",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public Town getVertex(String name) {\n\t\tfor (Town t : towns) {\n\t\t\tif (t.getName().equals(name)) {\n\t\t\t\treturn t;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public void removeVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) <0) {\n return;\n }\n vertices.remove(vertLabel);\n Iterator<String> iterator = edges.keySet().iterator();\n while (iterator.hasNext()) {\n String k = iterator.next();\n if (k.contains(vertLabel)) {\n iterator.remove();\n edges.remove(k);\n }\n }\n }",
"public DSALinkedList getAdjacent(String label)\n\t{\n\t\tDSAGraphVertex vx = getVertex(label);\n\t\treturn vx.getAdjacent();\n\t}",
"public V getParent(V vertex);",
"public V addVertex(V v);",
"public ArangoDBVertex(String key, String label, ArangoDBGraph graph) {\n\t\tsuper(key, label, graph);\n\t}",
"public Volume label(String label) {\n this.label = label;\n return this;\n }",
"Vertex(){}",
"public void findEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"public HitVertex getVertex(String id) {\n\t\treturn hitVertices.get(id);\n\t}",
"@Override\r\n\tpublic E getVertexAtGivenDistance(E src, int distance) {\r\n\t\treturn graphForWarshall.getVertexAtGivenDistance(src, distance);\r\n\t}",
"public V getVertex()\r\n/* */ {\r\n/* 198 */ return (V)this.vertex;\r\n/* */ }",
"public String getVertexName()\n\t{\n\t\treturn vertexName ;\n\t}",
"private Optional<Vertex> getVertexByIndex(GraphTraversalSource source, UUID id, String collectionName) {\n Optional<Vertex> vertexOpt = indexHandler.findById(id);\n\n // Return if the neo4j Node ID matches no vertex (extreme edge case)\n if (!vertexOpt.isPresent()) {\n LOG.error(Logmarkers.databaseInvariant,\n \"Vertex with tim_id {} is found in index with id {}L but not in graph database\", id);\n return Optional.empty();\n }\n\n // Get the latest version of the found Vertex\n Vertex foundVertex = vertexOpt.get();\n int infinityGuard = 0;\n while (foundVertex.vertices(Direction.OUT, \"VERSION_OF\").hasNext()) {\n // The neo4j index Node is one version_of behind the actual node\n foundVertex = foundVertex.vertices(Direction.OUT, \"VERSION_OF\").next();\n if (++infinityGuard >= MAX_VERSION_OF_DEPTH) {\n LOG.error(Logmarkers.databaseInvariant, \"Vertices with tim_id {} might have circular VERSION_OF\", id);\n return Optional.empty();\n }\n }\n\n // Only if this latest version is truly registered as latest return this as a successful hit\n if (foundVertex.value(\"isLatest\")) {\n return Optional.of(foundVertex);\n } else {\n LOG.error(Logmarkers.databaseInvariant,\n \"Last version of vertex with tim_id {} is not marked as isLatest=true\", id);\n }\n\n // Failed to find vertex in lucene index, so return\n return Optional.empty();\n }",
"public PhyloTreeNode findTreeNodeByLabel(String label) {\n return findTreeNodeByLabel(overallRoot, label);\n }",
"public String getVertex() {\n\t\treturn vertices.get(0);\n\t}",
"public E getParentEdge(V vertex);",
"@Deprecated\n public abstract Vertex getVertex(String vertexHash);",
"void addVertex(Vertex v);",
"public AdjVertex newAdjVertex(String name)\r\n\t{\r\n\t\t// new adjacent vertex\r\n\t\tAdjVertex newAdjVertex = new AdjVertex();\r\n\t\t// initialization\r\n\t\t//newAdjVertex.vertexNum = vertexNum;\r\n\t\tnewAdjVertex.name = name;\r\n\t\tnewAdjVertex.next = null;\r\n\t\t//newAdjVertex.id = some;\r\n\t\treturn newAdjVertex;\r\n\t}",
"protected void visit(Graph<VLabel, ELabel>.Vertex v) {\n }",
"public abstract String getVertexSymbol(int vertexIndex);",
"public boolean removeVertex(String label)\n\t{\n\t\tif(hasVertex(label)) //if vertex in in list\n\t\t{\n\t\t\tvertices.removeAt(getVertex(label));\n\t\t\t//System.out.println(\"Deleted: \" + label); //debug\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public Vertex<VV> getFrom()\r\n { return from; }",
"public Vertex(String argName) {\n name = argName;\n }",
"public Vertex(String aName)\r\n\t\t{\r\n\t\t\tthis.name = aName;\r\n\t\t\tthis.neighbors = new ArrayList<Edge>();\r\n\t\t}",
"public Vertex createVertex(String name) throws SQLException {\n\t\tVertex vert = new Vertex(name);\n\t\treturn rDb.createVert(vert);\n\t}",
"public Vertex addVertex(String name) {\n Vertex v;\n v = mVertices.get(name);\n if (v == null) {\n v = new Vertex(name);\n mVertices.put(name, v);\n mAdjList.put(v, new TreeSet<Vertex>());\n mNumVertices += 1;\n }\n return v;\n }",
"public static String getVertexId(Value value) {\n byte[] buffer = value.get();\n int offset = 0;\n\n // skip label\n int strLen = readInt(buffer, offset);\n offset += 4;\n if (strLen > 0) {\n offset += strLen;\n }\n\n strLen = readInt(buffer, offset);\n return readString(buffer, offset, strLen);\n }",
"public wVertex(String s){\r\n name = s;\r\n adjacencies = new ArrayList<Edge>();\r\n }",
"public void addVertex();",
"public Object getVertex(){\r\n return this.vertex;\r\n }",
"Vertex addVertex(String name){\n\t\t//if graph doesn't already have the key\n\t\tif (!adjlist.containsKey(name)) {\n\t\t\tkeys.add(name); //places keys in list in order they're added\n\t\t\tvertices++; //increases vertex count variable\n\t\t\treturn adjlist.put(name, new Vertex(name)); //adds to hashmap\n\t\t//if graph does already have the key\n\t\t} else {\n\t\t\treturn adjlist.get(name);\n\t\t}\n\t}",
"public int getvertex() {\n\t\treturn this.v;\n\t}",
"public Vertex getVertexFromList(int rank) {\r\n\t\treturn listVertex.get(rank);\r\n\t}",
"public static String translateVersionLabel(String label) {\r\n\t\tif(label == null) {\r\n\t\t\treturn NodeConstants.DEFAULT_VERSION_LABEL;\r\n\t\t}\r\n\t\treturn label;\r\n\t}",
"public Position insertVertex(Object o);",
"public Vertex toVertex() {\n return new Vertex(\n getX(),\n getY(),\n getZ()\n );\n }",
"public E3DTexturedVertex getVertex(int index){\r\n if(index >= 0 && index < 3)\r\n return vertices[index];\r\n else\r\n return null;\r\n }",
"abstract Vertex apply(Vertex v);",
"public Label\ngetStartLabel();",
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public Vertex (String name)\n\t{\n\t vertexName = name ;\n\t adjacencyList = new DoublyLinkedList<>();\n\t indegree = 0;\n\t\t\n\t}",
"boolean addVertex(V v);",
"void add(Vertex vertex);",
"public int getNodeLabel ();",
"public Vertex getFrom() {\r\n\r\n return from;\r\n }",
"public void findEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"public native VertexNode first();",
"@Override\n\tpublic boolean add(L vertex) {\n\t\tIterator<Vertex<L>> vertexiter = verticelist.iterator();\n\t\twhile (vertexiter.hasNext()) {\n\t\t\tVertex<L> v = vertexiter.next();\n\t\t\tL lab = v.getlabel();\n\t\t\tif (lab.equals(vertex))\n\t\t\t\treturn false;\n\t\t}\n\t\tVertex<L> v = new Vertex<L>(vertex);\n\t\tverticelist.add(v);\n\t\treturn true;\n\t}",
"VertexType getOtherVertexFromEdge( EdgeType r, VertexType oneVertex );",
"int addVertex(Vector position);",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"private Vertex<String> addLocation(String name) {\n if (!vertices.containsKey(name)) {\n Vertex<String> v = graph.insert(name);\n vertices.put(name, v);\n return v;\n }\n return vertices.get(name);\n }",
"public static Node buildLiteral(final String label) {\n\t\treturn NodeFactory.createLiteral(label);\n\t}",
"public abstract ArrayList<String> neighbours(String vertLabel);",
"public LabeledSDGEdge(SDGNode source, SDGNode sink, Kind kind, String label) {\n\t\tsuper(source, sink);\n\t\tthis.kind = kind;\n\t\tthis.label = label;\n\t}",
"private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }",
"public Vertex getVertex() {\n return curr;\n }",
"public void setLabel(Object v) \n {\n this.label = v;\n }",
"Label getLabel();",
"Label getLabel();",
"Label getLabel();",
"public boolean foiChecado(Vertice v){\n int i = v.label;\n return vertices[i];\n }",
"public VirtualNode(String id, String label){\n\t\tthis.id = id;\n\t\tthis.label = label;\n\t}",
"public void addVertex(int name) {\n\t\tVertex v = new Vertex(name, parent);\n\t\tthis.addVertex(v);\n\t}",
"public native GLatLng getVertex(GPolyline self, int index)/*-{\r\n\t\treturn self.getVertex(index);\r\n\t}-*/;",
"public DotGraph createSubGraph(String label) {\n // file name is used as label of sub graph.\n DotGraph subgraph = new DotGraph(label);\n subgraph.isSubGraph = true;\n\n this.drawElements.add(subgraph);\n\n return subgraph;\n }",
"@DISPID(74)\r\n\t// = 0x4a. The runtime will prefer the VTID if present\r\n\t@VTID(72)\r\n\tjava.lang.String label();",
"@DISPID(32)\r\n\t// = 0x20. The runtime will prefer the VTID if present\r\n\t@VTID(37)\r\n\tjava.lang.String label();",
"@Override\r\n public void add(V vertexName) {\r\n if(!contains(vertexName))\r\n map.put(vertexName, new Vertex(vertexName));\r\n }",
"public FAVertex next(FAVertex v, String mark){\n\t\tfor(FAEdge edge : edges)\n\t\t\tif(getVertex(edge.getStart())==v&&edge.getCharacter().equals(mark))\n\t\t\t\treturn getVertex(edge.getEnd());\n\t\treturn null;\n\t}",
"void add(int vertex);"
] | [
"0.7944401",
"0.7145686",
"0.7075981",
"0.693663",
"0.6894625",
"0.67946035",
"0.6735441",
"0.66198736",
"0.65875065",
"0.65341216",
"0.64441055",
"0.6366332",
"0.6363934",
"0.6303307",
"0.62608135",
"0.62365353",
"0.6209113",
"0.62011003",
"0.6199416",
"0.6166567",
"0.6166022",
"0.6154816",
"0.6138961",
"0.6123055",
"0.61139166",
"0.6025853",
"0.59981376",
"0.5898565",
"0.5887536",
"0.5872292",
"0.5863305",
"0.5851169",
"0.58024174",
"0.5770003",
"0.57373327",
"0.57278216",
"0.57277507",
"0.57158846",
"0.56819665",
"0.56722116",
"0.56636196",
"0.56583196",
"0.5644954",
"0.562131",
"0.5617575",
"0.56168693",
"0.5603314",
"0.55906826",
"0.55626404",
"0.5557328",
"0.5543104",
"0.55378395",
"0.552654",
"0.5516009",
"0.5513121",
"0.5506618",
"0.54912806",
"0.5477699",
"0.5462162",
"0.5457584",
"0.5431135",
"0.542979",
"0.541495",
"0.5414181",
"0.54121566",
"0.5410303",
"0.5383758",
"0.535845",
"0.5355795",
"0.5352335",
"0.53465766",
"0.5334186",
"0.53244776",
"0.5312868",
"0.53125215",
"0.53032315",
"0.53025675",
"0.5301231",
"0.5295584",
"0.52778697",
"0.5273479",
"0.52638996",
"0.52534103",
"0.52447426",
"0.52398133",
"0.5239567",
"0.5233287",
"0.5226727",
"0.5226727",
"0.5226727",
"0.520904",
"0.5199599",
"0.519517",
"0.51948386",
"0.5187173",
"0.517412",
"0.5171308",
"0.516655",
"0.51571804",
"0.51524293"
] | 0.7207521 | 1 |
/ Given a label & in/out list, return the Neighbor. | Neighbor findNeighbor(LinkedList<Neighbor> list, char v) {
for (int i = 0; i < list.size(); i++) {
if (list.get(i).vertex.label == v)
return list.get(i);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract ArrayList<String> neighbours(String vertLabel);",
"java.util.List<rina.object.gpb.Neighbour_t.neighbor_t> \n getNeighborList();",
"public List<MyPair> outNearestNeighbours(int k, String vertLabel) {\n /* Return out nearest neighbours, search for the rowLength that contains vertLabel.\n And search for any weights that larger than 0 */\n\n\n List<MyPair> neighbours = new ArrayList<MyPair>();\n if (indexOf(vertLabel, vertices) < 0) {\n return neighbours;\n }\n int index = indexOf(vertLabel, vertices);\n\n for (int i = 0; i < weights[index].length; i++) {\n if (weights[index][i] > 0) {\n String label = \"\";\n for (Map.Entry<String, Integer> entry : edges.entrySet()) {\n int value = entry.getValue();\n if (value == i) {\n label = entry.getKey().substring(1, 2);\n }\n }\n if (!label.isEmpty())\n neighbours.add(new MyPair(label, weights[index][i]));\n }\n }\n\n return sortAndTrim(k, neighbours);\n\n\n }",
"public DSALinkedList getAdjacent(String label)\n\t{\n\t\tDSAGraphVertex vx = getVertex(label);\n\t\treturn vx.getAdjacent();\n\t}",
"public List<Location> neighbors (Location pos);",
"public List<MyPair> inNearestNeighbours(int k, String vertLabel) {\n /* Return in nearest neighbours, search for the rowLength that contains vertLabel.\n And search for any weights that smaller than 0 */\n\n\n List<MyPair> neighbours = new ArrayList<MyPair>();\n if (indexOf(vertLabel, vertices) < 0) {\n return neighbours;\n }\n\n int index = indexOf(vertLabel, vertices);\n\n for (int i = 0; i < weights[index].length; i++) {\n if (weights[index][i] < 0) {\n String label = \"\";\n for (Map.Entry<String, Integer> entry : edges.entrySet()) {\n int value = entry.getValue();\n if (value == i) {\n label = entry.getKey().substring(0, 1);\n break;\n }\n }\n if (!label.isEmpty())\n\n neighbours.add(new MyPair(label, -weights[index][i]));\n }\n }\n\n return sortAndTrim(k, neighbours);\n\n\n }",
"public List<MoveLabel> getSimpleLabelNeighborhood(final LabeledUndirectedGraph<N, E> sk, final LabeledUndirectedGraph<N, E> objective) {\n final List<MoveLabel> neighborood = new ArrayList<>();\n final LabeledUndirectedGraph<N, E> csk = new LabeledUndirectedGraph<>(sk);\n\n Set<String> diff = csk.getLabels();\n diff.removeAll(objective.getLabels());\n\n Set<E> allEdges = new HashSet<>(sk.getEdges());\n allEdges.addAll(sk.getRemovedEdges());\n\n diff.forEach(label -> {\n final LabeledUndirectedGraph<N, E> test = new LabeledUndirectedGraph<>(csk);\n\n //Remove label\n test.removeLabel(label);\n\n //Add all edges for all active label in test graph\n test.getLabels().forEach(_label -> {\n allEdges.stream()\n .filter(_edge -> _edge.getLabel().equals(_label))\n .forEachOrdered(_edge -> test.addEdge(_edge));\n });\n\n //Select all labels of objective graph that are different from removed label\n Set<String> _labels = objective.getLabels();\n _labels.remove(label);\n\n _labels.forEach(_label -> {\n //Add label from candidates label in objective graph\n allEdges.stream()\n .filter(edge -> edge.getLabel().endsWith(_label))\n .forEachOrdered(edge -> test.addEdge(edge));\n\n final LabeledUndirectedGraph<N, E> stest;\n if (test.isConnected()) {\n stest = getSpanningTree(test);\n } else {\n stest = test;\n }\n Set<E> out = stest.getRemovedEdges(), in = stest.getEdges();\n out.removeAll(csk.getRemovedEdges());\n in.removeAll(csk.getEdges());\n neighborood.add(new MoveLabel(out, in, csk));\n\n test.removeLabel(_label);\n });\n });\n\n if (neighborood.isEmpty() && !csk.isConnected()) {\n diff = objective.getLabels();\n diff.removeAll(csk.getLabels());\n diff.forEach(label -> {\n Set<E> in = new HashSet<>();\n allEdges.stream()\n .filter(edge -> edge.getLabel().equals(label))\n .forEachOrdered(edge -> in.add(edge));\n neighborood.add(new MoveLabel(new HashSet<>(), in, csk));\n });\n }\n\n return neighborood;\n }",
"IsisNeighbor lookup(MacAddress isisNeighborMac);",
"private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }",
"public static LinkedList2 generateNeighbors(LocNode state) {\n\t \n\t \n\t\n\t LinkedList2 Neighbors = new LinkedList2();\n\t \n\n\t\n\tchar [][] Matrix = state.getData(); \n\t\n\t\n\t\n\tchar [][] Neighbor = copyMatrix(Matrix);\n\n\t\t\n\t\tfor(int i=0 ;i<size ;i++ ) {\n\t\tfor (int j=0 ;j<size ;j++) {\n\t\t\tif (Neighbor[i][j]=='-'||Neighbor[i][j]=='v') {\n\t\t\t\tNeighbor[i][j]='c';\n\t\t\t\t\n\t\t\t\t\n\t updateVisibility(i,j,Neighbor);\n\t \n\t Neighbors.insert(Neighbor, calculateOpjectiveFunction(Neighbor));\n\t \n\t \n\t \n\t\t\t\tNeighbor = copyMatrix(Matrix);\n\t\n\t\t\t\n\t\t\t}\n\t\t}\t\n\t\t}\n\t\t\n\tLinkedList2 ApplyingRemoveAction=removeOneCamera(state.data);\n\t\n\n\tif(!ApplyingRemoveAction.empty()){\n\t\t\n\t\tApplyingRemoveAction.findFirst();\n\t\twhile(!ApplyingRemoveAction.last()) {\n\t\t\t Neighbors.insert(ApplyingRemoveAction.retrieve_data(), ApplyingRemoveAction.retrieve_opjectiveFunctoin());\n\t\t\t ApplyingRemoveAction.findNext();\n\t\t}\n\t\t\n\t\t Neighbors.insert(ApplyingRemoveAction.retrieve_data(), ApplyingRemoveAction.retrieve_opjectiveFunctoin());\n\t}\n\t\t\n\t\t\n\t return Neighbors;\n\t \n\t \n}",
"public List<MoveLabel> getLabelNeighborhood(final LabeledUndirectedGraph<N, E> sk, final LabeledUndirectedGraph<N, E> objective) {\n final List<MoveLabel> neighborood = new ArrayList<>();\n final LabeledUndirectedGraph<N, E> csk = new LabeledUndirectedGraph<>(sk);\n\n Set<String> diff = csk.getLabels();\n diff.removeAll(objective.getLabels());\n\n Set<E> allEdges = new HashSet<>(sk.getEdges());\n allEdges.addAll(sk.getRemovedEdges());\n\n diff.forEach(label -> {\n final LabeledUndirectedGraph<N, E> test = new LabeledUndirectedGraph<>(csk);\n test.removeLabel(label);\n\n //Add all edges for all active label in test graph\n test.getLabels().forEach(_label -> {\n allEdges.stream()\n .filter(_edge -> _edge.getLabel().equals(_label))\n .forEachOrdered(_edge -> test.addEdge(_edge));\n });\n\n LabeledUndirectedGraph<N, E> new_graph;\n if (!test.isConnected()) {\n Set<String> _labels = objective.getLabels();\n _labels.removeAll(test.getLabels());\n _labels.remove(label);\n new_graph = repair(test, _labels, allEdges);\n } else {\n new_graph = test;\n }\n\n if (new_graph.isConnected()) {\n final LabeledUndirectedGraph<N, E> stest = getSpanningTree(new_graph);\n Set<E> out = stest.getRemovedEdges(), in = stest.getEdges();\n out.removeAll(csk.getRemovedEdges());\n in.removeAll(csk.getEdges());\n neighborood.add(new MoveLabel(out, in, sk));\n }\n });\n\n return neighborood;\n }",
"public ThresholdDataPoint(int label, PixelPos pixelPos, int cellBody, ArrayList<ThresholdDataPoint> eightNeighbours, ArrayList<ThresholdDataPoint> fourNeighbours){\n\t\tthis.label = label;\n\t\tthis.pixelPos = pixelPos;\n\t\tthis.cellBody = cellBody;\n\t\tthis.eightNeighbours = eightNeighbours;\n\t\tthis.fourNeighbours = fourNeighbours;\n\t\tthis.neighbourCellBodies = new HashSet<Integer>();\n\t}",
"public abstract List<GraphNode<N, E>> getNeighborNodes(N value);",
"public DSAGraphVertex getVertex(String label)\n\t{\n\t\tDSAGraphVertex temp, target = null;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\tif(vertices.isEmpty()) // case: list is empty\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Vertices list is empty.\");\n\t\t}\n\t\telse //searches for target\n\t\t{\n\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t{\n\t\t\t\ttemp = itr.next();\n\t\t\t\tif(temp.getLabel().equals(label))\n\t\t\t\t{\n\t\t\t\t\ttarget = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(target == null) // case: not found\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Label |\" + label + \"| not found\");\n\t\t}\n\n\t\treturn target;\n\t}",
"private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }",
"List<Integer> getNeighbors(int x);",
"ArrayList<PathFindingNode> neighbours(PathFindingNode node);",
"public Collection<N> neighbors();",
"public LabelModel getLabel(LabelUUID aLabelUUID);",
"public MapCell getNeighbor(String neighbor){\n\t\tMapCell neighborCell = null;\n\t\ttry {\n\t\t\tif(neighbor.equalsIgnoreCase(\"east\")){\t\t\t\t\n\t\t\t\tneighborCell = eastCell;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"north\")){\t\t\t\t\n\t\t\t\tneighborCell = northCell;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"west\")){\t\t\t\t\n\t\t\t\tneighborCell = westCell;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"south\")){\t\t\t\t\n\t\t\t\tneighborCell = southCell;\n\t\t\t}\n\t\t}catch(NullPointerException np){\n\t\t\treturn neighborCell;\n\t\t}catch(Exception e){\n\t\t\treturn neighborCell;\n\t\t}\n\t\treturn neighborCell;\n\t}",
"public List neighbors(int vertex) {\n// your code here\n LinkedList<Integer> result = new LinkedList<>();\n LinkedList<Edge> list = adjLists[vertex];\n for (Edge a : list) {\n result.add(a.to());\n }\n//List<Integer> list = new List<Integer>();\n return result;\n }",
"public ListNetwork labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }",
"private Board newNeighbor(int searchNode, int target)\n {\n char[] temp = blocks.clone();\n temp[searchNode] = temp[target];\n temp[target] = (char) 0;\n return new Board(convertTo2D(temp));\n }",
"public ArrayList<ThresholdDataPoint> getNeighbours(int connec) {\n\t\tif(connec == 8){\n\t\t\treturn eightNeighbours;\n\t\t} else if(connec == 4){\n\t\t\treturn fourNeighbours;\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"Invalid number of neighbours\");\n\t\t}\n\t}",
"Type.Remote<SomeRemoteType, SomeRemoteThing> label(Label label);",
"public ArrayList<ArrayList<Integer>> getNeighbors(\n ArrayList<Integer> config){\n\n //Set up the return value;\n ArrayList<ArrayList<Integer>> toReturn = \n new ArrayList<ArrayList<Integer>>();\n\n ArrayList<Integer> nextNeighbor;\n\n //Go through all characters and build moves\n for (int i = 0; i < config.size(); i++) {\n if(config.get(i) == '.'){ continue; }\n //Get legal moves\n ArrayList<Integer> myMoves = getMoves(i, config);\n\n //Generate all moves\n for(int t = 0; t < myMoves.size(); t++) {\n nextNeighbor = moveUnit(i, myMoves.get(t), config);\n //Check if done before.\n if (!tried.contains(nextNeighbor)) {\n tried.add(nextNeighbor);\n toReturn.add(nextNeighbor);\n }\n }\n }\n\n return toReturn;\n }",
"Label getLabel();",
"Label getLabel();",
"Label getLabel();",
"Set<MacAddress> neighbors();",
"public abstract LinkedList<Integer> getNeighbours(int index);",
"List<WeightedEdge<Vertex>> neighbors(Vertex v);",
"public ListClusterOperator labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }",
"public List<ParameterConfiguration> getNeighbourhood(ParameterConfiguration config) {\n\t\tSet<OrNode> assigned_or_nodes = new HashSet<OrNode>();\n\t\tSet<AndNode> assigned_and_nodes = new HashSet<AndNode>();\n\t\tfor (Parameter p: config.getParameter_instances().keySet()) {\n \t\tfor (AndNode n: getAndNodes()) {\n \t\t\tif (n == startNode) continue;\n \t\t\tif (n.getParameter().equals(p) && n.getDomain().contains(config.getParameterValue(p))) {\n \t\t\t\tassigned_or_nodes.add(preceedingNode(n));\n \t\t\t\tassigned_and_nodes.add(n);\n \t\t\t}\n \t\t}\n\t\t}\n\t\t\n\t\tList<ParameterConfiguration> nbh = new LinkedList<ParameterConfiguration>();\n\t\tfor (AndNode node: assigned_and_nodes) {\n\t\t\tfor (Object value: preceedingNode(node).getParameter().getDomain().getDiscreteValues()) {\n\t\t\t\tif (node.getDomain().contains(value)) { // same subdomain, different value\n\t\t\t\t\tif (valuesEqual(value, config.getParameterValue(node.getParameter()))) continue;\n\t\t\t\t\tParameterConfiguration neighbour = new ParameterConfiguration(config);\n\t\t\t\t\tneighbour.setParameterValue(node.getParameter(), value);\n\t\t\t\t\tneighbour.updateChecksum();\n\t\t\t\t\tnbh.add(neighbour);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn nbh;\n\t}",
"public abstract List<AStarNode> getNeighbours();",
"public String getOntologyUri(String label){\n \n for(Iterator it = listOfLabels.iterator();it.hasNext();){\n SemanticConcept sc = (SemanticConcept) it.next();\n if(sc.getName().equals(label))\n return sc.getUrl();\n }\n return \" \";\n }",
"Nda<V> withLabels( Map<Object, List<Object>> labels );",
"private void getNeighbouringCells(Index3D current, Index3D center, int clusterLabel) {\n\n int integerIndexForm = current.i1() + current.i2() * x + current.i3() * x * y;\n\n /**Check if the voxel is part of the cluster */\n if ((getLabel(current) == clusterLabel) &&\n !cellCluster.contains(integerIndexForm)) {\n\n if (!current.equals(center)) {\n voxelStack.push(current);\n }\n\n /**Spread recursively from the voxel if it exists within the\n * boundary of the center voxel */\n if (checkSubBoundary(current, center)) {\n cellCluster.add(integerIndexForm);\n\n /**Check for all 26-neighbour voxels reachable from the\n * current voxel */\n for (int i = current.i1() - 1; i < x\n && i >= 0 && i <= current.i1() + 1; i++) {\n for (int j = current.i2() - 1; j < y\n && j >= 0 && j <= current.i2() + 1; j++) {\n for (int k = current.i3() - 1; k < z\n && k >= 0 && k <= current.i3() + 1; k++) {\n getNeighbouringCells(new Index3D(i, j, k), center, clusterLabel);\n }\n }\n }\n }\n }\n }",
"public Location getNeighbor(int direction)\n\t{\n\t\tint\tnewX = mX;\n\t\tint newY = mY;\n\t\t\n\t\tswitch (direction)\n\t\t{\n\t\t\tcase NORTH: newY--; break;\n\t\t\tcase NORTHEAST: newX++; newY--; break;\n\t\t\tcase EAST: newX++; break;\n\t\t\tcase SOUTHEAST: newX++; newY++; break;\n\t\t\tcase SOUTH: newY++; break;\n\t\t\tcase SOUTHWEST: newX--; newY++; break;\n\t\t\tcase WEST: newX--; break;\n\t\t\tcase NORTHWEST: newX--; newY--; break;\n\t\t\tdefault: throw new IllegalArgumentException(\"No such direction\");\n\t\t}\n\t\t\n\t\treturn new Location(newX, newY);\n\t}",
"public String toString() {\n\t\treturn \"NearestNeighbourhood\";\n\t}",
"public interface INeighbor {\n public Set<Cell> getNeighbours();\n}",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public DrawObject\nfindLeafNode(double x, double y, Vector includeTypes, Vector excludeTypes)\nthrows Exception\n{\n\tif (this.getLabelList() != null)\n\t{\n\t\tfor (Enumeration e = getLabelList().elements();e.hasMoreElements();)\n\t\t{\n\t\t\tDrawObject drawObject = (DrawObject)e.nextElement();\n\t\t\tif (drawObject.contains(x - this.getX(), y + this.getY()))\n\t\t\t\treturn (drawObject);\n\t\t}\n\t}\n\n\t// check if nucs are excluded; if so return null\n\tif (excludeTypes != null)\n\t{\n\t\tfor (Enumeration e = excludeTypes.elements();e.hasMoreElements();)\n\t\t{\n\t\t\tString type = (String)e.nextElement();\n\t\t\tif (type.equals(\"Nuc2D\"))\n\t\t\t\treturn (null);\n\t\t}\n\t}\n\n\tif (this.contains(x - this.getX(), y + this.getY()))\n\t\treturn (this.getNucDrawObject());\n\n\treturn (null);\n}",
"public MapCell[] getNeighbors(){\n\t\tMapCell[] neighbors = new MapCell[4];\n\t\tneighbors[0] = getNeighbor(\"east\");\n\t\tneighbors[1] = getNeighbor(\"north\");;\n\t\tneighbors[2] = getNeighbor(\"west\");\n\t\tneighbors[3] = getNeighbor(\"south\");\n\t\treturn neighbors;\n\t}",
"public Field getNeighbor(Directions dir) {\n return neighbors[dir.ordinal()];\n }",
"public ArrayList<Integer> getOutNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> outNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of outgoing edge ids\r\n\t\tSet<Integer> edgeSet = mOutEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\toutNeighbors.add( getEdge(edgeId).getToId() );\r\n\t\t}\r\n\t\treturn outNeighbors;\r\n\t}",
"public static Router wrap(String label, String[] args) {\n\t\tIpVertex vertex = IpVertex.wrap(Router.class, label, args);\n\t\tif (null == vertex)\n\t\t\treturn null;\n\t\tif (vertex instanceof Router)\n\t\t\treturn (Router) vertex;\n\t\telse\n\t\t\tthrow new RuntimeException(\"Internal Error!\");\n\t}",
"@Override\n public List<V> getNeighbors(V v, TimeFrame pTimeFrame) {\n List<V> lstNeighbors = new ArrayList<>();\n// System.out.println(\"DynamicGraph.getNeighbor() : \" + darrGlobalAdjList.get(v.getId()).get(pTimeFrame));\n if (darrGlobalAdjList.get(v.getId()).containsKey(pTimeFrame)) {\n for (E e : darrGlobalAdjList.get(v.getId()).get(pTimeFrame)){\n if (e.getOtherEndPoint(v) != null) {\n lstNeighbors.add(e.getOtherEndPoint(v));\n }\n }\n }\n return lstNeighbors;\n }",
"public boolean isAdjacent(String label1, String label2)\n\t{\n\t\tboolean found = false;\n\t\ttry {\n\t\t\tDSAGraphVertex temp, vx1 = getVertex(label1);\n\t\t\tDSALinkedList adjList = vx1.getAdjacent();\n\t\t\tIterator<DSAGraphVertex> itr = adjList.iterator(); // - Maybe needs to check instance?\n\t\t\tif(!adjList.isEmpty()) // if list is not empty\n\t\t\t{\n\t\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t\t{\n\t\t\t\t\ttemp = itr.next();\n\t\t\t\t\tif(temp.getLabel().equals(label2))\n\t\t\t\t\t{\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Handles exception thrown by getVertex()\n\t\t\tfound = false;\n\t\t}\n\t\treturn found;\n\t}",
"public int findTargetBB(String label) {\n\t\tString targetLB = null;\n\t\tfor (int i = 1; i <= BasicBlocks.size(); i++) {\n\t\t\ttargetLB = BasicBlocks.get(i).get(0);\n\t\t\tint lbLen = 0;\n\t\t\tint j = 0;\n\t\t\twhile (targetLB.charAt(j) != ' ') {\n\t\t\t\tlbLen++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ttargetLB = targetLB.substring(0, lbLen);\n\t\t\tif (targetLB.equals(label)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"public List<String> getSiblingPodIPsByLabelAndValue(String label, String value){\n List<String> PodIPs = new ArrayList();\n \n Log.debug(\"Looking for K8S pods with label {} and value {}\", label, value);\n PodList siblings = K8Sclient.pods().withLabel(label, value).list();\n \n Log.info(\"Found a total of {} siblings to form a cluster :-)\", siblings.getItems().size());\n \n siblings.getItems().forEach((pod) -> {\n String name = pod.getMetadata().getName();\n String phase = pod.getStatus().getPhase();\n String ip = pod.getStatus().getPodIP();\n Log.debug(\"Found a sibling pod with name {} and IP {} currently in {} phase\", name, ip, phase);\n \n \n // Skip pods without valid IP address or which are not in running state\n if ( ip != null && InetAddressValidator.getInstance().isValid(ip) && phase.equals(\"Running\")){\n Log.debug(\"Adding pod {} (IP: {}) to list of cluster nodes\", name, ip);\n PodIPs.add(ip);\n }\n else{\n Log.debug(\"Skipping pod {} (IP: {}) currently in {} phase\", name, ip, phase);\n }\n });\n \n return PodIPs;\n }",
"private static PhyloTreeNode findTreeNodeByLabel(PhyloTreeNode node,String label) {\n if(node == null)\n return null;\n if(node.getLabel().equals(label))\n return node;\n if(node.getLeftChild() != null && node.getLeftChild().getLabel().contains(label))\n return findTreeNodeByLabel(node.getLeftChild(), label);\n if(node.getRightChild() != null && node.getRightChild().getLabel().contains(label))\n return findTreeNodeByLabel(node.getRightChild(), label);\n return null;\n }",
"@Override\n\tpublic List<Cell> getSurroundingNeighbors(Cell cell, int vision) {\n\t\tList<Cell> neighbors = new ArrayList<Cell>();\n\t\tCell northCell = cell, eastCell = cell, southCell = cell, westCell = cell;\n\t\tint north, east, south, west;\n\t\tfor (int i = 1; i <= vision; i++) {\n\t\t\tnorth = getNorthCell(northCell);\n\t\t\teast = getEastCell(eastCell);\n\t\t\tsouth = getSouthCell(southCell);\n\t\t\twest = getWestCell(westCell);\n\t\t\tif (north != -1) { \n\t\t\t\tnorthCell = getCellList().get(north);\n\t\t\t\tneighbors.add(northCell); }\n\t\t\tif (east != -1) { \n\t\t\t\teastCell = getCellList().get(east);\n\t\t\t\tneighbors.add(eastCell); }\n\t\t\tif (south != -1) { \n\t\t\t\tsouthCell = getCellList().get(south);\n\t\t\t\tneighbors.add(getCellList().get(south)); }\n\t\t\tif (west != -1) { \n\t\t\t\twestCell = getCellList().get(west);\n\t\t\t\tneighbors.add(getCellList().get(west)); }\n\t\t}\n\t\treturn neighbors;\n\t}",
"public void makeInput(ArrayList<double[][]> matricesList, double[][] myEntry, ArrayList<String> labels){\n\t\t int l=0;\t\t \n\t\t \n\t\t for(int i=0;i<matricesList.size();i++){\n\t\t\t double[][] aux = new double[XDIMENSION*YDIMENSION][1];\n\t\t\t for(int y=0;y<YDIMENSION;y++){\n\t\t\t\t for(int x=0;x<XDIMENSION;x++){\t\t\t\t \n\t\t\t\t\t aux[l++][0] = matricesList.get(i)[y][x];\n\t\t\t\t }\n\t\t\t }\t\t\t \n\t\t\t trainingChar.add(labels.get(i));\t \n\t\t\t trainingList.add(aux);\n\t\t\t l=0;\t \t\t \n\t\t }\n\t\t \n\t\t for(int y=0;y<YDIMENSION;y++){\n\t\t\t for(int x=0;x<XDIMENSION;x++){\n\t\t\t\t entryCoord[l++][0] = myEntry[y][x];\n\t\t\t }\n\t\t }\n\t }",
"public Vector getNeighbors()\n\t{\n\t\tVector neighbors = new Vector(8);\n\t\t\n\t\tneighbors.addElement(getNeighbor(NORTH));\n\t\tneighbors.addElement(getNeighbor(NORTHEAST));\n\t\tneighbors.addElement(getNeighbor(EAST));\n\t\tneighbors.addElement(getNeighbor(SOUTHEAST));\n\t\tneighbors.addElement(getNeighbor(SOUTH));\n\t\tneighbors.addElement(getNeighbor(SOUTHWEST));\n\t\tneighbors.addElement(getNeighbor(WEST));\n\t\tneighbors.addElement(getNeighbor(NORTHWEST));\n\n\t\treturn neighbors;\n\t}",
"protected void alter_for_neighbour_switch() {\n\t\tint this_l, tother_l, ns_i, ns_j, ns_n;\n\t\t\n\t\t// Let the user know...\n\t\tSystem.out.println(\" H THIS IS IN N_SWITCH (nn comparison) mode, for structure \"+INIT_NPHASE);\n\t\tSystem.out.println(\" H en_shift = \"+EN_SHIFT);\n\t\t\n\t\t// Check that there is room at the inn:\n\t\tif( n > MAX_NNS ) {\n\t\t\tthrow( new LSSimException(LSSimException.PARAM,\n\t\t\t\"neighbour switch needs \"+n+\" neighbours in MAX_NNS!\\n\"));\n\t\t}\n\t\t\n\t\t// Make both structures the same:\n\t\tthis_l = INIT_NPHASE;\n\t\ttother_l = 1 - this_l;\n\t\tfor( ns_i = 0; ns_i < n; ns_i++ ) {\n\t\t\tlatt[tother_l][ns_i].x = latt[this_l][ns_i].x;\n\t\t\tlatt[tother_l][ns_i].y = latt[this_l][ns_i].y;\n\t\t\tlatt[tother_l][ns_i].z = latt[this_l][ns_i].z;\n\t\t\t// copy nn lists as well!\n\t\t\tns_n = 0; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\twhile ( ns_j != NO_MORE_NNS ) {\n\t\t\t\tnns[tother_l][ns_i][ns_n] = nns[this_l][ns_i][ns_n];\n\t\t\t\tns_n++; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\t}\n\t\t\tnns[tother_l][ns_i][ns_n] = NO_MORE_NNS;\n\t\t}\n\t\t\n\t\t// Alter the neighbour list for structure 1;\n\t\tmake_it_order_n_squared(1);\n\t}",
"public PhyloTreeNode findTreeNodeByLabel(String label) {\n return findTreeNodeByLabel(overallRoot, label);\n }",
"GameBoardVertex(ArrayList<GameBoardVertex> neighbors){this.neighbors = neighbors;}",
"private ExtractorBuilder getBuilder(Annotation label) throws Exception {\r\n if(label instanceof ElementUnion) {\r\n return new ExtractorBuilder(ElementUnion.class, ElementExtractor.class);\r\n }\r\n if(label instanceof ElementListUnion) {\r\n return new ExtractorBuilder(ElementListUnion.class, ElementListExtractor.class);\r\n }\r\n if(label instanceof ElementMapUnion) {\r\n return new ExtractorBuilder(ElementMapUnion.class, ElementMapExtractor.class);\r\n }\r\n throw new PersistenceException(\"Annotation %s is not a union\", label);\r\n }",
"public static MultiLayerNetwork lenetModel(Integer numLabels) {\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(seed)\n .l2(0.005)\n .activation(Activation.RELU)\n .weightInit(WeightInit.XAVIER)\n .updater(new Nesterovs(0.0001, 0.9))\n .list()\n .layer(0, convInit(\"cnn1\", channels, 50, new int[]{5, 5}, new int[]{1, 1}, new int[]{0, 0}, 0))\n .layer(1, maxPool(\"maxpool1\", new int[]{2, 2}))\n .layer(2, conv5x5(\"cnn2\", 100, new int[]{5, 5}, new int[]{1, 1}, 0))\n .layer(3, maxPool(\"maxool2\", new int[]{2, 2}))\n .layer(4, new DenseLayer.Builder().nOut(500).build())\n .layer(5, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .nOut(numLabels)\n .activation(Activation.SOFTMAX)\n .build())\n .backprop(true).pretrain(false)\n .setInputType(InputType.convolutional(height, width, channels))\n .build();\n\n return new MultiLayerNetwork(conf);\n\n }",
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"private neighbor_t(Builder builder) {\n super(builder);\n }",
"List<GraphEdge> getNeighbors(NodeKey key);",
"@Override\n\tvoid createNeighbourhood() {\n\t\t\n\t}",
"public Node getNodeByCache(String label)\r\n\t{\r\n\t\treturn cacheNodes.get(label);\r\n\t}",
"OpList createOpList();",
"public ArrayList<Collidable> getNeighbors();",
"public java.util.List<Integer> getNeighbors(int index);",
"public LabeledSDGEdge(SDGNode source, SDGNode sink, Kind kind, String label) {\n\t\tsuper(source, sink);\n\t\tthis.kind = kind;\n\t\tthis.label = label;\n\t}",
"public INode addOrGetNode(String label);",
"protected abstract List<Integer> getNeighbors(int vertex);",
"public Value joinObject(ObjectLabel objlabel) {\n checkNotPolymorphicOrUnknown();\n if (object_labels != null && object_labels.contains(objlabel))\n return this;\n Value r = new Value(this);\n if (r.object_labels == null)\n r.object_labels = newSet();\n else\n r.object_labels = newSet(r.object_labels);\n r.object_labels.add(objlabel);\n return canonicalize(r);\n }",
"void registerLabel(SNode inputNode, Iterable<SNode> outputNodes, String mappingLabel);",
"public Label newLabel(Label oldLabel) {\r\n NegraLabel result;\r\n if(oldLabel instanceof NegraLabel) {\r\n NegraLabel l = (NegraLabel) oldLabel;\r\n result = new NegraLabel(l.value(), l.getEdge(), new HashMap<String,String>());\r\n for (Map.Entry<String,String> e : l.features.entrySet()) {\r\n result.features.put(e.getKey(), e.getValue());\r\n }\r\n } else {\r\n result = new NegraLabel(oldLabel.value());\r\n }\r\n return result;\r\n }",
"public ListOperatorHub labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }",
"@Override\n public BatchOperator linkFrom(List<BatchOperator> ins) {\n return linkFrom(ins.get(0));\n }",
"public Thing neighbor ( Animal animal, int direction ) {\n\n\t\tif ( direction == Direction.NONE ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tint drow = rowChange(direction), dcol = colChange(direction);\n\t\ttry {\n\n\t\t\treturn at(animal.getRow() + drow,animal.getColumn() + dcol);\n\n\t\t} catch ( ArrayIndexOutOfBoundsException e ) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public boolean accept( int i, int j, Label label );",
"public Instruction getInstruction(String label) {\n int s1; // Possible operands of the instruction\n int s2;\n String s3;\n int r;\n int x;\n\n if (line.equals(\"\"))\n return null;\n\n //Get the first word as a string\n String ins = scan();\n\n // Generate the instruction classname that corresponds with the label\n String instructionName = ins.substring(0, 1).toUpperCase() + ins.substring(1).toLowerCase() + \"Instruction\" ;\n\n //System.out.println(\"The scanned label is: \" + ins);\n //System.out.println(\"Use instruction class: \" + instructionName);\n\n // Make a list of the remaining words\n List<String> wordList = new ArrayList<>();\n List<Class> paramTypes = new ArrayList<>();\n\n //The first constructor param is always the label string\n wordList.add(label);\n paramTypes.add(String.class);\n\n String nextWord;\n\n /*\n if (!nextWord.equals(\"\")){\n wordList.add(nextWord);\n paramTypes.add(nextWord.getClass());\n }\n */\n\n while (!(nextWord = scan()).equals(\"\")){\n wordList.add(nextWord);\n }\n\n //System.out.println(\"The next word is: \" + instructionName);\n\n Object wordArray [] = wordList.toArray();\n Class<?> paramArray [] = new Class<?> [wordArray.length];\n\n try {\n for (int i = 0; i < wordArray.length; i++){\n String str = wordArray[i].toString();\n\n if (Pattern.matches((\"-?[0-9]+\"), str)){\n paramArray [i] = Integer.TYPE;\n wordArray [i] = Integer.parseInt((String) wordArray[i]);\n } else {\n paramArray [i] = String.class;\n\n }\n }\n\n //System.out.println(\"My word array contains: \" + Arrays.asList(wordArray));\n //System.out.println(\"My parameter array contains: \" + Arrays.asList(paramArray));\n //System.out.println(\"Instruction name is: \" + instructionName);\n\n //Reflect class\n Class reflectionClass = Class.forName(\"sml.\" + instructionName);\n\n //System.out.println(\"My reflection is: \" + reflectionClass);\n\n Constructor con = reflectionClass.getConstructor(paramArray);\n\n // Cast return back to an Instruction\n return ((Instruction)con.newInstance(wordArray));\n\n } catch (ClassNotFoundException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (NoSuchMethodException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (InvocationTargetException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (InstantiationException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (IllegalAccessException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n }\n\n/*\n // Commented out switch statement\n\n switch (ins) {\n case \"add\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new AddInstruction(label, r, s1, s2);\n case \"lin\":\n r = scanInt();\n s1 = scanInt();\n return new LinInstruction(label, r, s1);\n case \"out\":\n r = scanInt();\n return new OutInstruction(label, r);\n case \"sub\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new SubInstruction(label, r, s1, s2);\n case \"mul\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new MulInstruction(label, r, s1, s2);\n case \"div\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new DivInstruction(label, r, s1, s2);\n case \"bnz\":\n r = scanInt();\n s3 = scan();\n return new BnzInstruction(label, r, s3);\n }\n\n // You will have to write code here for the other instructions.\n*/\n\n return null;\n }",
"@Override\n\tpublic List<Location> getNeighbors(Location vertex) {\n\n\t\tArrayList<Location> neighbors = new ArrayList<Location>();\n\n\t\tfor (Path p : getOutEdges(vertex))\n\t\t\tneighbors.add(p.getDestination());\n\n\t\treturn neighbors;\n\n\n\t}",
"public boolean contains(N startNode, N endNode, E label)\r\n/* 62: */ {\r\n/* 63:121 */ assert (checkRep());\r\n/* 64:122 */ if ((this.map.containsKey(startNode)) && (this.map.containsKey(endNode))) {\r\n/* 65:123 */ return ((Map)this.map.get(startNode)).get(endNode).equals(label);\r\n/* 66: */ }\r\n/* 67:125 */ return false;\r\n/* 68: */ }",
"public abstract int getNumberOfLivingNeighbours(int x, int y);",
"public listNeighbors_args(listNeighbors_args other) {\n __isset_bitfield = other.__isset_bitfield;\n this.nome = other.nome;\n }",
"public Trip nearestNeighbor(int start){\n int nnPosition = 0;\n int prevLocationIndex = start;\n Trip trip = new Trip(locations.size() + 1);\n\n trip.addLoc(locations.get(start));\n locations.get(start).setVisited(true);\n\n for(int i = 0; i < locations.size() -1; ++i){\n nnPosition = findNN(prevLocationIndex);\n trip.addLoc(locations.get(nnPosition));\n locations.get(nnPosition).setVisited(true);\n\n prevLocationIndex = nnPosition;\n }\n\n trip.addLoc(locations.get(start));\n\n for(int i = 0; i < locations.size(); ++i){\n locations.get(i).setVisited(false);\n }\n\n return trip;\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}",
"@Override public ArrayList<Location> neighbors(final Location id) {\n ArrayList<Location> neighbours = new ArrayList<>();\n for (Location direction : directions){\n\n Location position = new Location(direction.x + id.x, direction.y + id.y);\n\n if (inBounds(position) && isPassable(position))\n neighbours.add(position);\n }\n return neighbours;\n }",
"void FindLstn (int boardID, short[] addrlist, short[] results, int limit);",
"public ArrayList<Node> getNeighbors(){\n ArrayList<Node> result = new ArrayList<Node>();\n for(Edge edge: edges){\n result.add(edge.end());\n }\n return result;\n }",
"public DoublyLinkedList<T>.ListNode\r\n \t\t\t\t\t getContainingListNode(DoublyLinkedList<T> lst);",
"public TrieNode<F> getChild(char label) {\r\n if(trieNodeMap.containsKey(label)){\r\n return trieNodeMap.get(label);\r\n }\r\n return null;\r\n }",
"@Override\r\n public List<INavMeshAtom> getNeighbours(NavMesh mesh) { \r\n List<INavMeshAtom> neighbours = new ArrayList<INavMeshAtom>();\r\n \r\n if(pId > 0) neighbours.add(new NavMeshPolygon(pId));\r\n \r\n for(OffMeshEdge oe : outgoingEdges) {\r\n neighbours.add(oe.getTo());\r\n }\r\n \r\n return neighbours;\r\n }",
"private void f0() \n\t{\n\t\tint elements = 0;\n\t\t\n\t\tfor(int i=0;i<f2.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<f2[0].length;j++)\n\t\t\t{\n\t\t\t\tif(f2[i][j])\n\t\t\t\t\telements++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(elements > 0){\n\t\t\tneighbors = new Neighbor[elements];\n\t\t\tint cy = (f2.length-1)/2; \n\t\t\tint cx = (f2[0].length-1)/2;\n\t\t\tint index=0;\n\t\t\t\n\t\t\tfor(int i=0;i<f2.length;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<f2[0].length;j++)\n\t\t\t\t{\n\t\t\t\t\tif(f2[i][j]){\n\t\t\t\t\t\tneighbors[index++] = new Neighbor(i-cy,j-cx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//No elements i.e all elements are false in the neighborhood buffer.\n\t\t\tneighbors = null;\n\t\t}\n\t\t\t\n\t}",
"com.google.ads.googleads.v6.resources.LabelOrBuilder getLabelOrBuilder();",
"private static Iterable<Cell> getNeighbors(Grid<Cell> grid, Cell cell) {\n\t\tMooreQuery<Cell> query = new MooreQuery<Cell>(grid, cell);\n\t\tIterable<Cell> neighbors = query.query();\n\t\treturn neighbors;\n\t}",
"public static Router wrap(String label, String ip) {\n\t\treturn wrap(label, new String[] { ip });\n\t}",
"static private Edge LocateEdge(ArrayList<Integer> v,ArrayList<Edge> edgesList)\n\t{\n\t\tfor (Iterator<Edge> iterator = edgesList.iterator(); iterator.hasNext();)\n\t\t{\n\t Edge e = iterator.next();\n\t int x = e.nodeI;\n\t int y = e.nodeJ;\n\t\t\tint xv = v.indexOf(x);\n\t\t\tint yv = v.indexOf(y);\n\t\t\tif (xv > -1 && yv == -1)\n\t\t\t{\n\t\t\t\treturn(e);\n\t\t\t}\n\t\t\tif (xv == -1 && yv > -1)\n\t\t\t{\n\t\t\t\treturn(e);\n\t\t\t}\n\t\t}\n\t\t//Error condition\n\t\treturn(new Edge(-1,-1,0.0));\n\t}",
"public List<MoveEdge> getEdgeNeighborhood(final LabeledUndirectedGraph<N, E> sk) {\n final List<MoveEdge> neighborood = new ArrayList<>();\n final LabeledUndirectedGraph<N, E> csk = new LabeledUndirectedGraph<>(sk);\n // For each spanning edges...\n csk.getEdges().forEach(edge -> {\n csk.removeEdge(edge);\n final List<Set<N>> nodes = new ArrayList<>(csk.getSubGraphsNodes());\n if (nodes.size() == 2) {\n final Set<E> candidates = new HashSet<>();\n csk.getRemovedEdges().stream()\n .filter(redge -> (!redge.equals(edge))\n && ((nodes.get(0).contains(redge.getNode1()) && nodes.get(1).contains(redge.getNode2()))\n || (nodes.get(0).contains(redge.getNode2()) && nodes.get(1).contains(redge.getNode1()))))\n .forEachOrdered(redge -> candidates.add(redge));\n candidates.forEach(candidate -> neighborood.add(new MoveEdge(edge, candidate, sk)));\n }\n csk.addEdge(edge);\n });\n return neighborood;\n }",
"int[] getOutEdges(int... nodes);",
"private void parseLabels(ByteBuffer response, StringBuilder dest) {\n int labelLen = Byte.toUnsignedInt(response.get());\n if (isPointer(labelLen)) {\n int completePointer = ((labelLen & 0x3f) << 8)\n | Byte.toUnsignedInt(response.get());\n int savedPosition = response.position();\n response.position(completePointer);\n parseLabels(response, dest);\n response.position(savedPosition);\n } else if (!isTerminatingOctet(labelLen)) {\n for (int i = 0; i < labelLen; i++) {\n dest.append((char)response.get());\n }\n dest.append('.');\n parseLabels(response, dest);\n }\n //else, it's the terminating octet, simply return.\n }",
"@Override\n\tpublic List<Integer> getNeighbours(int v) {\n\t\treturn null;\n\t}"
] | [
"0.61060053",
"0.60746694",
"0.5852161",
"0.5738095",
"0.57315046",
"0.55723995",
"0.5362553",
"0.5354315",
"0.5298424",
"0.52972996",
"0.526081",
"0.5237821",
"0.51745063",
"0.5158433",
"0.515126",
"0.5121952",
"0.5097362",
"0.5064862",
"0.5054934",
"0.5025902",
"0.50186586",
"0.5015454",
"0.49943048",
"0.49917358",
"0.49510166",
"0.49429515",
"0.494285",
"0.494285",
"0.494285",
"0.4937417",
"0.49302724",
"0.49194235",
"0.4830736",
"0.48291448",
"0.48208982",
"0.48185053",
"0.48036966",
"0.48033193",
"0.47924262",
"0.47693014",
"0.474928",
"0.47350997",
"0.47332144",
"0.47283658",
"0.4725897",
"0.4724906",
"0.47134763",
"0.46862832",
"0.46823016",
"0.46758807",
"0.46672592",
"0.46590635",
"0.46498215",
"0.4644669",
"0.464043",
"0.4633644",
"0.46284485",
"0.4627766",
"0.46277463",
"0.46276647",
"0.46247017",
"0.4623813",
"0.4619949",
"0.4619135",
"0.46118936",
"0.46061268",
"0.46025583",
"0.45807582",
"0.45787185",
"0.45659587",
"0.45605603",
"0.45559412",
"0.45450112",
"0.4535537",
"0.45346448",
"0.4534556",
"0.45330465",
"0.45276543",
"0.45247304",
"0.45222783",
"0.45125774",
"0.4509128",
"0.45069003",
"0.44951567",
"0.44941556",
"0.44925475",
"0.4489671",
"0.44802013",
"0.4476656",
"0.44683883",
"0.4466895",
"0.44663638",
"0.44647688",
"0.44626558",
"0.44597894",
"0.4459209",
"0.44587538",
"0.44581676",
"0.4456473",
"0.4452224"
] | 0.5642785 | 5 |
/ Set the current vertex to the vertex with label v. | public void gotoVertex(char v) {
for (int i = 0; i < vertices.size(); i++) {
if (vertices.get(i).label == v) {
currentVertex = vertices.get(i);
return;
}
}
System.out.println("The vertex " + v + " does not exist.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void set(int index, PVector v, String label) {\n\t\tif (index == points.size()) {\n\t\t\tpoints.add(new GPoint(v, label));\n\t\t} else {\n\t\t\tpoints.get(index).set(v, label);\n\t\t}\n\t}",
"public V addVertex(V v);",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"public void setLabel(Object v) \n {\n this.label = v;\n }",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"public void setTo(Vertex<VV> vertex)\r\n { this.to = vertex; }",
"public void setFrom(Vertex<VV> vertex)\r\n { this.from = vertex; }",
"protected void visit(Graph<VLabel, ELabel>.Vertex v) {\n }",
"public void setStartVertex(int v){\n if (v < vertexCount && v >= 0){\n startVertex = v;\n } else {\n throw new IllegalArgumentException(\"Cannot set iteration start vertex to \" + v + \".\");\n }\n }",
"public GameObject setPosition(Vertex v) {\n\t\tposition.x = v.x;\n\t\tposition.y = v.y;\n\t\treturn this;\n\t}",
"public void setStartVertex(int v){\r\n if (v < myVertexCount && v >= 0){\r\n myStartVertex = v;\r\n } else {\r\n throw new IllegalArgumentException(\"Cannot set iteration start vertex to \" + v + \".\");\r\n }\r\n }",
"public void setStartVertex(int v){\n if (v < myVertexCount && v >= 0){\n myStartVertex = v;\n } else {\n throw new IllegalArgumentException(\"Cannot set iteration start vertex to \" + v + \".\");\n }\n }",
"public Vertex(L l) {\n\t\tlabel = l;\n\t}",
"public void setPrevious(Vertex v){\n previous = v;\n }",
"public void setVertex(Object vertex2){\r\n this.vertex = vertex2;\r\n }",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"public void addVertex(Vertex v) {\n\t\tvertices.put(v.name(), v);\n\t}",
"public void addVertex(T v) {\n map.put(v, new LinkedList<>());\n }",
"public void setVisited(int v) {\n visited.set(v, true);\n nodeEnum.add(v);\n }",
"public Vertex(T vertexLabel) {\r\n\t\tlabel = vertexLabel;\r\n\t\tedgeList = new LinkedList<Edge>();\r\n\t\tvisited = false;\r\n\t\tpreviousVertex = null;\r\n\t\tcost = 0;\r\n\t}",
"public boolean addVertex(T vertexLabel);",
"void setGraphLabel(String label);",
"void addVertex(Vertex v);",
"public DSAGraphVertex(String inLabel, Object inValue)\n\t\t{\n\t\t\tlabel = inLabel;\n\t\t\tvalue = inValue;\n\t\t\tlinks = new DSALinkedList();\n\t\t\tvisited = false;\n\t\t}",
"public Vertex(String name){\r\n this.name = name;\r\n }",
"private void attachLabel(Vertex v, String string) throws IOException\n {\n if (string == null || string.length() == 0)\n return;\n String label = string.trim();\n// String label = trimQuotes(string).trim();\n// if (label.length() == 0)\n// return;\n if (unique_labels)\n {\n try\n {\n StringLabeller sl = StringLabeller.getLabeller((Graph)v.getGraph(), LABEL);\n sl.setLabel(v, label);\n }\n catch (StringLabeller.UniqueLabelException slule)\n {\n throw new FatalException(\"Non-unique label found: \" + slule);\n }\n }\n else\n {\n v.addUserDatum(LABEL, label, UserData.SHARED);\n }\n }",
"public ArangoDBVertex(String key, String label, ArangoDBGraph graph) {\n\t\tsuper(key, label, graph);\n\t}",
"public void setVertexAt(int i, Vertex vertex) {\n vertexPositions[3*i] = vertex.position.x;\n vertexPositions[3*i+1] = vertex.position.y;\n vertexPositions[3*i+2] = vertex.position.z;\n vertexNormals[3*i] = vertex.normal.x;\n vertexNormals[3*i+1] = vertex.normal.y;\n vertexNormals[3*i+2] = vertex.normal.z;\n vertexBinormals[3*i] = vertex.binormal.x;\n vertexBinormals[3*i+1] = vertex.binormal.y;\n vertexBinormals[3*i+2] = vertex.binormal.z;\n vertexTangents[3*i] = vertex.tangent.x;\n vertexTangents[3*i+1] = vertex.tangent.y;\n vertexTangents[3*i+2] = vertex.tangent.z;\n vertexUvs[2*i] = vertex.u;\n vertexUvs[2*i+1] = vertex.v;\n\n boundingVolume = null;\n }",
"@Override\r\n public void addVertex(Vertex v) {\r\n adjacencyList.put(v, new ArrayList<>()); //putting v into key, a new LinkedList into value for later use\r\n }",
"public void setVertexC(E3DTexturedVertex vertex){\r\n\t\tthis.vertices[2] = vertex;\r\n\t\tneedNormalRecalc = true;\r\n\t\tneedPlaneEquationRecalc = true;\r\n\t}",
"public void setVertexProperty(Agent ag, Object key, Object value) {\n\tVertex vertex = getVertexFor(ag);\n\n\tsynchronized(vertex) {\n\t while(vertexPropertiesLocked(vertex) \n\t\t && (getVertexPropertiesOwner(vertex) != ag)) {\n\t\ttry {\n\t\t vertex.wait();\n\t\t} catch(InterruptedException e) {\n\t\t throw new SimulationAbortError(e);\n\t\t}\n\t }\t\n stats.add(new VertexWBChangeStat(ag.getClass()));\n\n\n\t vertex.setProperty(key, value);\n\n\t if(key.equals(\"label\")) {\n Long num = new Long(numGen.alloc());\n LabelChangeEvent lce;\n lce = new LabelChangeEvent(num,vertex.identity(),\n (String)value);\n try{\n evtQ.put(lce);\t\t \n }catch(InterruptedException e){\n throw new SimulationAbortError(e);\n }\n }\n\t}\n }",
"public Vertex(final Vertex vertex){\n\t\tID = vertex.getID();\n\t}",
"public void setModelVertice(int i, Vertice vertex) {\n\t\t(modelVertices.get(i)).set(vertex);\n\t}",
"void visit(Graph.Vertex u, Graph.Vertex v) {\n\t\tDFSVertex bv = getVertex(v);\n\t\tbv.seen = true;\n\t\tbv.parent = u;\n\t\tbv.distance = distance(u) + 1;\n\t}",
"boolean addVertex(V v);",
"void setEdgeLabel(int edge, String label);",
"public void add(PVector v, String label) {\n\t\tpoints.add(new GPoint(v, label));\n\t}",
"public void addVertex(Vertex v)\n {\n this.vertices.add(v);\n connections.put(v, new ArrayList<>());\n }",
"public void setVertexB(E3DTexturedVertex vertex){\r\n\t\tthis.vertices[1] = vertex;\r\n\t\tneedNormalRecalc = true;\r\n\t\tneedPlaneEquationRecalc = true;\r\n\t}",
"public void add(int index, PVector v, String label) {\n\t\tpoints.add(index, new GPoint(v, label));\n\t}",
"public void setVertexA(E3DTexturedVertex vertex){\r\n\t\tthis.vertices[0] = vertex;\r\n\t\tneedNormalRecalc = true;\r\n\t\tneedPlaneEquationRecalc = true;\r\n\t}",
"public void addVertex(Vertex v) {\r\n if (vertexNum >= maxNum) {\r\n System.out.println(\"Error\");\r\n return;\r\n }\r\n vertexNum += 1;\r\n vertexList.add(v);\r\n }",
"public void addVertex(Vertex v) {\n\t \tif (!this.vertexes.contains(v)) {\r\n\t \t\tthis.vertexes.add(v);\r\n\t \t}\r\n\t \t//otherwise just ignore, the Graph already has this vertex\r\n\t }",
"Edge(Vertex u, Vertex v) {\n From = u;\n To = v;\n\n }",
"public void putVertexInfoToIndex(String vid, String targetIP);",
"public Vertex(int val)\r\n\t{\r\n\t\tthis.value=val;\r\n\t}",
"public void newVertex(String name)\r\n\t{\r\n\t\t// new vertex initialized here\r\n\t\tmyGraph[graphSize] = new Vertex();\r\n\t\tmyGraph[graphSize].name = name;\r\n\t\tmyGraph[graphSize].adjVertexHead = null;\r\n\t\t// maintain the size counter\r\n\t\tgraphSize++;\r\n\t}",
"public void setGraphLabel(String label) {\n label = DotGraphUtility.replaceQuotes(label);\n label = DotGraphUtility.replaceReturns(label);\n this.setGraphAttribute(\"label\", \"\\\"\" + label + \"\\\"\");\n }",
"void setLabel(Label label);",
"public void addVertex( VKeyT key, VDataT data );",
"public void assignNeighbors(Vertex v) {\r\n\t\t\r\n\t\tif (v.y != 0) {\r\n\t\t\tv.neighbors.add(graph[v.x][v.y - 1]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.y != (mazeSize - 1)) {\r\n\t\t\tv.neighbors.add(graph[v.x][v.y + 1]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.x != 0) {\r\n\t\t\tv.neighbors.add(graph[v.x - 1][v.y]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.x != mazeSize - 1) {\r\n\t\t\tv.neighbors.add(graph[v.x + 1][v.y]);\r\n\t\t}\r\n\t}",
"void ldraw_addVertexWithUV(double x, double y, double z, double u, double v) {\n lDraw.a(x, y, z, u, v);\n }",
"EdgeNode(VertexNode correspondingVertex){\n setCorrespondingVertex(correspondingVertex);\n }",
"public Node(int vertex) {\n\t\tv = vertex;\n\t\trank = 0;\n\t\tp = this;\n\t}",
"public V getVertex(int index);",
"public void setVertexNumber(Integer num) {\n\t\t_vertexId = num;\n\t}",
"public boolean addVertex(V vertex);",
"public boolean addVertex(V vertex);",
"public void setStartVertex(int s) {\n\t\tstartVertex = s;\n\t}",
"Vertex(){}",
"public Vertex(int value) {\n this(value, null);\n }",
"public abstract boolean putVertex(Vertex incomingVertex);",
"public void setVicarLabel(VicarLabel vl) {\n\t\tvicarLabel = vl;\n\t\t// when getNativeTree() is called a Document will be created from the\n\t\t// VicarLabel\n\t\t// the VicarLabel is the TRUE \"native\" metadata object which can be\n\t\t// obtained directly\n\t\t// for use by a VicarImageWriter\n\t\t// VicarLabelToDOM converts a VicarLabel to a DOM Document object\n\t\t// for the transcoder part I'll want a DOMtoVicarLabel so the\n\t\t// VicarImageWriter can use\n\t\t// it to write the output image's label\n\t}",
"abstract Vertex apply(Vertex v);",
"public void setVertexName(String newName)\n\t{\n\t\tvertexName = newName ;\n\t}",
"public void setXY(int index, PVector v) {\n\t\tpoints.get(index).setXY(v);\n\t}",
"private static void outputVertex(RootedTree tree, StringBuffer sb, Object v) {\r\n\t\tif (!tree.isLeaf(v)) {\r\n\t\t\tsb.append('(');\r\n\t\t\tList l = tree.getChildrenOf(v);\r\n\t\t\tfor (int i = 0; i < l.size(); i++) {\r\n\t\t\t\toutputVertex(tree, sb, l.get(i));\r\n\t\t\t\tif (i != l.size() - 1) sb.append(',');\r\n\t\t\t}\r\n\t\t\tsb.append(')');\r\n\t\t}\r\n\t\t// Call this to make the vertex's label nicely formatted for Nexus\r\n\t\t// output.\r\n\t\tString s = getNexusCompliantLabel(tree, v);\r\n\t\tif (s.length() != 0) sb.append(s);\r\n\t\tObject p = tree.getParentOf(v);\r\n\t\tif (p != null) {\r\n\t\t\tdouble ew = tree.getEdgeWeight(tree.getEdge(p, v));\r\n\t\t\tif (ew != 1.0) sb.append(\":\" + Double.toString(ew));\r\n\t\t}\r\n\t}",
"Vertex findVertex(char v) {\r\n\t\tfor (int i = 0; i < vertices.size(); i++) {\r\n\t\t\tif (vertices.get(i).label == v)\r\n\t\t\t\treturn vertices.get(i);\r\n\t\t}\r\n\t\treturn null; // return null if not found.\r\n\t}",
"@PortedFrom(file = \"Taxonomy.h\", name = \"setCurrent\")\n public void setCurrent(TaxonomyVertex cur) {\n current = cur;\n }",
"public void addVertex();",
"private void modifyFringe(int v, int w) {\n\t\tgetEdge(v, w).setSelected(true);\n\t\tgetEdge(getVertex(w).getParent(), w).setSelected(false);\n\t\tdouble cost = newCost(v, w);\n\t\tGreedyVertex vertex = getVertex(w);\n\t\tvertex.setParent(v);\n\t\tvertex.setCost(cost);\n\t\tp.promote(vertex);\n\t}",
"protected void postVisit(Graph<VLabel, ELabel>.Vertex v) {\n }",
"public void setLabel(String v) {\n if (ICEvent_Type.featOkTst && ((ICEvent_Type)jcasType).casFeat_label == null)\n jcasType.jcas.throwFeatMissing(\"label\", \"org.oaqa.model.ICEvent\");\n jcasType.ll_cas.ll_setStringValue(addr, ((ICEvent_Type)jcasType).casFeatCode_label, v);}",
"void add(Vertex vertex);",
"public void set(Vec2 v) {\r\n\t\tx = v.x;\r\n\t\ty = v.y;\r\n\t}",
"public void AgregarVertice(int v) {\n\t\tNodoGrafo aux = new NodoGrafo();\n\t\taux.nodo = v;\n\t\taux.arista = null;\n\t\taux.sigNodo = origen;\n\t\torigen = aux;\n\t}",
"public V removeVertex(V v);",
"private void vertexUp(String vertex) {\r\n\t\tIterator it = vertexMap.entrySet().iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pair = (Map.Entry) it.next();\r\n\t\t\tif (pair.getKey().equals(vertex)) {\r\n\t\t\t\tVertex v = (Vertex) pair.getValue();\r\n\t\t\t\tv.setStatus(true);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void addVertex(int name) {\n\t\tVertex v = new Vertex(name, parent);\n\t\tthis.addVertex(v);\n\t}",
"public wVertex(String s){\r\n name = s;\r\n adjacencies = new ArrayList<Edge>();\r\n }",
"public String storeVertex(VertexInfo vdata, EdgeCollectionWritable edata);",
"public void setSingleLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkIn(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}",
"void setLabel(String label);",
"public void setMark(int v, int val){\r\n\t\tMark[v]=val;\r\n\t}",
"public void addAdjVertex(String currentVertex, String connection)\r\n\t{\r\n\t\tAdjVertex newAdjVertex = newAdjVertex(connection);\r\n\t\t// insert this new node to the linked list\r\n\t\tnewAdjVertex.next = myGraph[getId(currentVertex)].adjVertexHead;\r\n\t\tmyGraph[getId(currentVertex)].adjVertexHead = newAdjVertex;\r\n\t}",
"public void setLabel(int index, String label) {\n\t\tpoints.get(index).setLabel(label);\n\t}",
"public Vertex( String nm )\n { name = nm; adjEdge = new TreeMap<String,Edge>( ); reset( ); }",
"@Override\r\n public void add(V vertexName) {\r\n if(!contains(vertexName))\r\n map.put(vertexName, new Vertex(vertexName));\r\n }",
"@Override\n public void addVertex(V vertex)\n {\n if (vertex.equals(null)){\n throw new IllegalArgumentException();\n }\n ArrayList <V> edges = new ArrayList<>();\n\t graph.put(vertex, edges);\n\n }",
"public void out_vertex(Site v) {\r\n\t\tif (triangulate == 0 & plot == 0 & debug == 0) {\r\n\t\t\tSystem.err.printf(\"v %f %f\\n\", v.coord.x, v.coord.y);\r\n\t\t}\r\n\r\n\t\tif (debug == 1) {\r\n\t\t\tSystem.err.printf(\"vertex(%d) at %f %f\\n\", v.sitenbr, v.coord.x,\r\n\t\t\t\t\tv.coord.y);\r\n\t\t}\r\n\t}",
"void add(int vertex);",
"protected void processVertex(Vertex w){\n\t}",
"public void set(int index, float x, float y, String label) {\n\t\tif (index == points.size()) {\n\t\t\tpoints.add(new GPoint(x, y, label));\n\t\t} else {\n\t\t\tpoints.get(index).set(x, y, label);\n\t\t}\n\t}",
"public Vertex (String name)\n\t{\n\t vertexName = name ;\n\t adjacencyList = new DoublyLinkedList<>();\n\t indegree = 0;\n\t\t\n\t}",
"public void addConnection(Vertex v){\n if(v != this){\r\n if(!connections.contains(v)){\r\n connections.add(v);\r\n }\r\n if(!v.getConnections().contains(this)){\r\n v.addConnection(this);\r\n } \r\n }\r\n\r\n \r\n }",
"public final void addVertex(final Vertex v) {\r\n final Outline lo = getLastOutline();\r\n lo.addVertex(v);\r\n if( 0 == ( dirtyBits & DIRTY_BOUNDS ) ) {\r\n bbox.resize(v.getCoord());\r\n }\r\n // vertices.add(v); // FIXME: can do and remove DIRTY_VERTICES ?\r\n dirtyBits |= DIRTY_TRIANGLES | DIRTY_VERTICES;\r\n }",
"Vertex createVertex();",
"void setVertices(int vertices);",
"void addEdgeTo(char v, int e) {\r\n\t\t// does an edge to v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e;\r\n\t\t\t\tfindNeighbor(findVertex(v).inList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.outList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.inList.add(current);\r\n\r\n\t\tedges++;\r\n\t}"
] | [
"0.7358518",
"0.6908976",
"0.6907744",
"0.6904689",
"0.6858007",
"0.6754518",
"0.6738055",
"0.67080146",
"0.668281",
"0.6678459",
"0.66601074",
"0.66454476",
"0.6645407",
"0.6641618",
"0.6507064",
"0.6436419",
"0.6422774",
"0.6385729",
"0.6380999",
"0.63615286",
"0.6334673",
"0.6320932",
"0.6284676",
"0.62386024",
"0.62378293",
"0.6224774",
"0.6207338",
"0.61910015",
"0.6152802",
"0.61328614",
"0.6089442",
"0.6086502",
"0.6071779",
"0.60647523",
"0.6054467",
"0.6041361",
"0.6025554",
"0.60196453",
"0.6005149",
"0.60050184",
"0.59821266",
"0.59548324",
"0.5906612",
"0.590635",
"0.5897306",
"0.5868148",
"0.585153",
"0.5842956",
"0.58333564",
"0.5824974",
"0.5823355",
"0.5821373",
"0.57647973",
"0.5763123",
"0.5758347",
"0.5745129",
"0.57414955",
"0.57402176",
"0.57402176",
"0.57344455",
"0.573177",
"0.57312936",
"0.57299876",
"0.572567",
"0.57162154",
"0.57068974",
"0.5705693",
"0.5676353",
"0.56735986",
"0.5672653",
"0.56710464",
"0.5656951",
"0.56318873",
"0.5630575",
"0.5628637",
"0.5622339",
"0.5600327",
"0.5597781",
"0.5593157",
"0.5586827",
"0.5583995",
"0.557755",
"0.5565908",
"0.5564468",
"0.5551023",
"0.55480003",
"0.5547632",
"0.55448335",
"0.5532053",
"0.55317026",
"0.55194134",
"0.5506655",
"0.5495904",
"0.5491704",
"0.5488691",
"0.5484914",
"0.5478576",
"0.5475168",
"0.54675335",
"0.54668003"
] | 0.7300225 | 1 |
/ Return the indegree of the current vertex. | public int inDegree() {
return currentVertex.inList.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getDegree(V vertex);",
"public int degreeOf(V vertex);",
"public int indegree(int v) {\r\n validateVertex(v);\r\n return indegree[v];\r\n }",
"public int getIndegree()\n\t{\n\t\treturn indegree ; \n\t}",
"public int getInDegree() {\n\t\treturn inDegree;\n\t}",
"int getIndegree() {\n return indegree;\n }",
"public int indegree()\n\t{\n\t\treturn this.interferences.size();\n\t}",
"public int outDegree() {\r\n\t\treturn currentVertex.outList.size();\r\n\t}",
"public int getIndegree() {\n return m_inputField.getText().isEmpty() ? 0 : Integer.valueOf(m_inputField.getText());\n }",
"@Override\n public int degree(V vertex)\n {\n if (contains(vertex)){\n Iterator graphIterator = graph.entrySet().iterator();\n Map.Entry graphElement = (Map.Entry) graphIterator.next();\n V vert = (V)graphElement.getKey();\n while (graphIterator.hasNext() && vert != vertex){\n graphElement = (Map.Entry) graphIterator.next();\n vert = (V)graphElement.getKey();\n }\n ArrayList<V> edges = graph.get(vert);\n return edges.size();\n }\n else{\n throw new RuntimeException();\n }\n\n }",
"public int getDegree() {\n this.polySolve();\n return this.degree;\n }",
"int getDegree(V v);",
"public int getDegree(int v);",
"public int getDegree()\r\n\t{\r\n\t\treturn degree;\r\n\t}",
"protected int degree(int vertex) {\n\t\treturn getNeighbors(vertex).size()\n\t\t\t\t+ getNeighboursIndegree(vertex).size();\n\t}",
"public int getDegree() {\n\t\treturn degree;\n\t}",
"public int inDegrees()\n {\n return dirInDegrees;\n }",
"public void updateIndegree()\n\t{\n\t\tint deg = 0 ;\n\t\tint numOfVertex = getAdjacencyList().size();\n\t\tdeg = adjacencyList.get(numOfVertex-1).getIndegree();\n\t\tadjacencyList.get(numOfVertex-1).setIndegree(deg + 1);\t\t\t\n\t}",
"public int inDegree(int vertex) {\n int count = 0;\n //your code here\n for (LinkedList<Edge> l : myAdjLists) {\n \tfor (Edge e : l) {\n \t\tif (e.to() == vertex) {\n \t\t\tcount++;\n \t\t\tbreak;\n \t\t}\n \t}\n }\n return count;\n }",
"public int getDegree() {\r\n\t\treturn this.degree;\r\n\t}",
"public int getDegree() {\n return degree_;\n }",
"public int getDegree() {\n return degree_;\n }",
"public int inDegree(int vertex) {\n int count = 0;\n//your code here\n for(int i=0; i<adjLists.length; i++){\n if(i==vertex){ continue;}\n if(isAdjacent(i,vertex)){\n count++;\n continue;\n }\n }\n return count;\n }",
"int getDegree();",
"int getDegree();",
"public int getDegree(Graph G, int vertex) {\r\n\t\tint counter = 0;\r\n\t\tfor(int j = 0; j < G.numVertices; j++) {\r\n\t\t\tif(vertex == j) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif(G.hasEdge(vertex, j)) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn counter;\r\n\t}",
"public double getDegreeNum() {\r\n return degreeNum;\r\n }",
"public int getInDegree(int node) {\n return inDegree[node];\n }",
"public int getDegree() {\n\t\t\t\treturn degree;\n\t\t\t}",
"public int degree(Position vp) throws InvalidPositionException;",
"final int getIndegree() {\n return parents.size();\n }",
"public int outDegree( VKeyT key );",
"public double getDegree() {\n return degree;\n }",
"public int inDegree(Position vp) throws InvalidPositionException;",
"public int getvertex() {\n\t\treturn this.v;\n\t}",
"private int sumOfGDegrees() {\n\n\t\tint total = 0;\n\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\ttotal += this.vertices.get(i).getVertexDegree();\n\t\t}\n\n\t\treturn total;\n\t}",
"public int getDegree () {\n int size = myCoefficients.size();\n if (size <= 0) {\n return -1;\n }\n else {\n return size - 1;\n }\n }",
"public int inDegree( VKeyT key );",
"public int outDegree(Position vp) throws InvalidPositionException;",
"public Map<V,Integer> inDegree () {\n Map<V,Integer> result = new HashMap<V,Integer>();\n for (V v: dag.keySet()) result.put(v, 0); // All in-degrees are 0. Will be updated later\n for (V from: dag.keySet()) {\n for (V to: dag.get(from)) {\n result.put(to, result.get(to) + 1); // Increment in-degree\n }\n }\n return result;\n }",
"public int inDegree(int vertex) {\r\n int count = 0;\r\n for (LinkedList<Edge> adjList : myAdjLists) {\r\n \tLinkedList<Edge> testList = adjList;\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tif (testList.get(counter).myTo == vertex) {\r\n \t\tcount++;\r\n \t}\r\n \tcounter++;\r\n }\r\n }\r\n return count;\r\n }",
"@Override\n\t\tpublic int getDegree() {\n\t\t\treturn 0;\n\t\t}",
"public int outdegree(int v) {\r\n validateVertex(v);\r\n return adj[v].size();\r\n }",
"public int getDegree(){\n return degree;\n }",
"public int inDegree(N v) {\n return getInEdges(v).size();\n }",
"@Override\n\t\tpublic int getDegree(Direction direction) {\n\t\t\treturn 0;\n\t\t}",
"public static int degree(Graph G, int v)\n {\n int degree = 0;\n for (int w : G.adj(v))\n degree++;\n return degree;\n }",
"@Override\r\n public int getDegree() {\r\n return head.getDegree();\r\n }",
"public int degree(int i)\n {\n return adjList[i].size();\n }",
"public void incrementInDegree() {\n\t\tthis.inDegree++;\n\t}",
"public int getVertexVal()\r\n\t{\r\n\t\treturn this.value;\r\n\t}",
"public ProcessVertex getInVertex() {\n\t\treturn this.inVertex;\n\t}",
"private int sumOfXDegrees() {\n\t\tint start = this.vertices.size() - this.numXVertices;\n\t\tint end = this.vertices.size();\n\t\tint total = 0;\n\n\t\tfor (int i = start; i < end; i++) {\n\t\t\ttotal += this.vertices.get(i).getVertexDegree();\n\t\t}\n\n\t\treturn total;\n\t}",
"abstract int degree(int i);",
"public int getDegree(){\n\t\treturn neighbours.size();\n\t}",
"public int getDegree() {\n return coefs.length - 1;\n }",
"public int getPolyAddDegree() {\n this.polyAddSolve();\n return this.adddegree;\n }",
"public int outdegree(int v) {\n return adj[v].size();\n }",
"public Degree getDegreeProgram()\n {\n return this.degree;\n }",
"@Override\n public int getDegree(V v, TimeFrame pTimeFrame) {\n return darrGlobalAdjList.get(v.getId()).get(pTimeFrame).size();\n }",
"public long getVertexCount(){\n return vertexCount;\n }",
"public double getPolynomialDegree() {\n\treturn this.polyDegree;\n }",
"public int getOutDegree() {\n\t\treturn outDegree;\n\t}",
"public int getVertexNumber() {\n\t\treturn _vertexId;\n\t}",
"public Vertex getVertex() {\n return curr;\n }",
"public String getDegreeName() {\n\t\treturn degreeName;\n\t}",
"public int getVertexCount();",
"public int updateDegree(){\r\n \r\n \tthis.degree = this.degree + this.rotSpeed;\r\n \tif (this.degree > 359) this.degree = 0;\r\n \t\r\n return this.degree;\r\n }",
"public double getSolDeg() {\n this.tanSolve();\n return this.xdeg;\n }",
"public int getNumberOfVertices();",
"public int outDegree(N v) {\n return getOutEdges(v).size();\n }",
"public int numVertices() { return numV; }",
"public int getVertexCount() {\n return vertexCount;\n }",
"public int getOutDegree(int node) {\n return outDegree[node];\n }",
"public int getBaseVertex() {\n return baseVertex;\n }",
"public int getVertices() {\n return verticesNumber;\n }",
"public int getVertexCount() {\n\t\treturn vertexCount;\n\t}",
"public int getNumVertices() {\n return num_vertices;\n }",
"public int getNumVertices(){\n return numVertices;\n }",
"public int getVertexIdentity(Agent ag) {\n return getVertexFor(ag).identity().intValue();\n }",
"public double getAverageDegree()\n\t{\n\n\t\tdouble avg = 0;\n\t\tfor(int i=0; i< pDist.length;i++)\n\t\t{\n\t\t\tavg = avg + (i*pDist[i]);\n\t\t}\n\t\treturn avg;\n\t}",
"public void setIndegree(int num)\n\t{\n\t\tindegree = num ;\n\t}",
"public int numVertices();",
"public int numVertices();",
"public int getVertexCount()\n\t{\n\t\tint count = 0;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tcount++;\n\t\t\titr.next();\n\t\t}\n\t\treturn count;\n\t}",
"public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}",
"public String getVertex() {\n\t\treturn vertices.get(0);\n\t}",
"public static <N, E extends Edge<N>> int getRegularDegree(final Graph<N, E> graph)\n\t{\n\t\tif( graph instanceof ConnectionismOptimizedGraph )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn ((ConnectionismOptimizedGraph)graph).getRegularDegree();\n\t\t\t}\n\t\t\tcatch(UnsupportedOperationException caught)\n\t\t\t{\n\t\t\t\t// if it is not supported, lets handle it as if it was not\n\t\t\t\t// optimized\n\t\t\t}\n\t\t}\n\n\t\tint degree = -1;\n\t\tfor(final N node : graph.getNodes())\n\t\t{\n\t\t\tif( degree == -1 )\n\t\t\t\tdegree = Topography.getDegree(graph, node);\n\t\t\telse if( degree != Topography.getDegree(graph, node) )\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tif( degree == -1 )\n\t\t\tthrow new IllegalStateException(\"This graph has no nodes!\");\n\n\t\treturn degree;\n\t}",
"int getNumberOfVertexes();",
"public int getDegrees() {\n\t\treturn (int) (value * (180.0d / Math.PI));\n\t}",
"private static int nonIsolatedVertex(Graph G) {\n for (int v = 0; v < G.V(); v++)\n if (G.degree(v) > 0)\n return v;\n return -1;\n }",
"public int getVertexSize() {\n\t\treturn graph.vertexSet().size();\r\n\t}",
"public int getPolySubDegree() {\n this.polySubSolve();\n return this.subdegree;\n }",
"public ExecutionVertexID getVertexID() {\n \n \t\treturn this.vertexID;\n \t}",
"int getVertices();",
"public String getVerticesCount() {\n long res = 0;\n Iterator<Vertex> itty = g.vertices();\n Vertex v;\n while (itty.hasNext()) {\n v = itty.next();\n res++;\n }\n return Long.toString(res);\n }",
"Vertex getVertex();",
"public String getVertexName()\n\t{\n\t\treturn vertexName ;\n\t}",
"public int getStartVertex() {\n\t\treturn startVertex;\n\t}",
"public String getDegreeName_() {\n return degreeName_;\n }"
] | [
"0.81221175",
"0.8048408",
"0.7621652",
"0.7596607",
"0.73841375",
"0.72686046",
"0.70981205",
"0.7010053",
"0.6902977",
"0.6891928",
"0.68688864",
"0.68593293",
"0.6828121",
"0.6793559",
"0.67924863",
"0.67256206",
"0.6723976",
"0.6717972",
"0.67119646",
"0.66846293",
"0.6681326",
"0.6657364",
"0.66556334",
"0.66509736",
"0.66509736",
"0.66501164",
"0.6636954",
"0.6636483",
"0.6616104",
"0.6586407",
"0.65555173",
"0.65304166",
"0.65264827",
"0.6523504",
"0.65042543",
"0.64661694",
"0.6459508",
"0.64585793",
"0.6452968",
"0.6435534",
"0.6404009",
"0.63587075",
"0.6330136",
"0.6311579",
"0.6310749",
"0.6304863",
"0.6282556",
"0.62789583",
"0.623395",
"0.62285453",
"0.61751896",
"0.6158031",
"0.6145335",
"0.61014354",
"0.60907215",
"0.60763097",
"0.60749453",
"0.60272664",
"0.6003655",
"0.5999388",
"0.5986683",
"0.5986539",
"0.59823227",
"0.5970061",
"0.5959068",
"0.5931243",
"0.5900871",
"0.5890553",
"0.58826476",
"0.58670455",
"0.5860112",
"0.58571935",
"0.58569735",
"0.58542705",
"0.58493567",
"0.58436877",
"0.584013",
"0.58342856",
"0.5833137",
"0.58329964",
"0.5829174",
"0.57967174",
"0.5793599",
"0.5793599",
"0.57921827",
"0.57891583",
"0.57824576",
"0.57795554",
"0.577939",
"0.57720125",
"0.5761892",
"0.57436925",
"0.57341564",
"0.5713339",
"0.571059",
"0.5708801",
"0.57045484",
"0.56580466",
"0.5657233",
"0.5630177"
] | 0.80606407 | 1 |
/ Return the outdegree of the current vertex. | public int outDegree() {
return currentVertex.outList.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int outdegree(int v) {\r\n validateVertex(v);\r\n return adj[v].size();\r\n }",
"public int getOutDegree() {\n\t\treturn outDegree;\n\t}",
"public int getDegree(V vertex);",
"public int getOutDegree(int node) {\n return outDegree[node];\n }",
"public int indegree(int v) {\r\n validateVertex(v);\r\n return indegree[v];\r\n }",
"public int outdegree(int v) {\n return adj[v].size();\n }",
"public int degreeOf(V vertex);",
"public int getIndegree()\n\t{\n\t\treturn indegree ; \n\t}",
"public int inDegree() {\r\n\t\treturn currentVertex.inList.size();\r\n\t}",
"public int outDegree(N v) {\n return getOutEdges(v).size();\n }",
"public int outDegree(Position vp) throws InvalidPositionException;",
"int getIndegree() {\n return indegree;\n }",
"private static int nonIsolatedVertex(Graph G) {\n for (int v = 0; v < G.V(); v++)\n if (G.degree(v) > 0)\n return v;\n return -1;\n }",
"public int outDegree( VKeyT key );",
"public int getInDegree() {\n\t\treturn inDegree;\n\t}",
"public int getIndegree() {\n return m_inputField.getText().isEmpty() ? 0 : Integer.valueOf(m_inputField.getText());\n }",
"public int getDegree(int v);",
"public int indegree()\n\t{\n\t\treturn this.interferences.size();\n\t}",
"int getDegree(V v);",
"public ProcessVertex getOutVertex() {\n\t\treturn this.outVertex;\n\t}",
"public int getDegree() {\n this.polySolve();\n return this.degree;\n }",
"public int getInDegree(int node) {\n return inDegree[node];\n }",
"public int inDegree(Position vp) throws InvalidPositionException;",
"public int getEndVertex() {\n\t\treturn endVertex;\n\t}",
"public int degree(Position vp) throws InvalidPositionException;",
"@Test\n public void testOutDegreesInvalidEdgeSrcId() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n env.setParallelism(PARALLELISM);\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeInvalidSrcData(env),\n env);\n\n try {\n graph.outDegrees().output(new DiscardingOutputFormat<>());\n env.execute();\n\n fail(\"graph.outDegrees() did not fail.\");\n } catch (Exception e) {\n // We expect the job to fail with an exception\n }\n }",
"int getDegree();",
"int getDegree();",
"public int getDegree () {\n int size = myCoefficients.size();\n if (size <= 0) {\n return -1;\n }\n else {\n return size - 1;\n }\n }",
"public double getdegVerticalToTarget() {\n NetworkTableEntry ty = m_table.getEntry(\"ty\");\n double y = ty.getDouble(0.0);\n return y;\n }",
"static int getExitAxis(S2Point n) {\n // assert (intersectsFace(n));\n if (intersectsOppositeEdges(n)) {\n // The line passes through opposite edges of the face.\n // It exits through the v=+1 or v=-1 edge if the u-component of N has a\n // larger absolute magnitude than the v-component.\n return (Math.abs(n.x) >= Math.abs(n.y)) ? 1 : 0;\n } else {\n // The line passes through two adjacent edges of the face.\n // It exits the v=+1 or v=-1 edge if an even number of the components of N\n // are negative. We test this using signbit() rather than multiplication\n // to avoid the possibility of underflow.\n // assert(n.x != 0 && n.y != 0 && n.z != 0);\n return ((n.x < 0) ^ (n.y < 0) ^ (n.z < 0)) ? 0 : 1;\n }\n }",
"public int inDegree(int vertex) {\n int count = 0;\n//your code here\n for(int i=0; i<adjLists.length; i++){\n if(i==vertex){ continue;}\n if(isAdjacent(i,vertex)){\n count++;\n continue;\n }\n }\n return count;\n }",
"public double getDegreeNum() {\r\n return degreeNum;\r\n }",
"public CVertex oppositeVertex(CEdge e){\n\t\tif(!e.containsPoint(p1)) \treturn (CVertex)p1;\n\t\tif(!e.containsPoint(p2)) \treturn (CVertex)p2;\n\t\telse\t\t\t\t\t\treturn (CVertex)p3;\n\t}",
"public int getDegree()\r\n\t{\r\n\t\treturn degree;\r\n\t}",
"public int inDegree( VKeyT key );",
"public int getDegree() {\r\n\t\treturn this.degree;\r\n\t}",
"public double getSolDeg() {\n this.tanSolve();\n return this.xdeg;\n }",
"@Override\n\t\tpublic int getDegree() {\n\t\t\treturn 0;\n\t\t}",
"public int inDegrees()\n {\n return dirInDegrees;\n }",
"public int findMaxDegree() {\n\t\tint gradoMax = 0;\n\t\t\n\t\tfor(String s : grafo.vertexSet()) {\n\t\t\tint grado = grafo.degreeOf(s);\n\t\t\t\n\t\t\tif(grado > gradoMax) {\n\t\t\t\tgradoMax = grado;\n\t\t\t\tverticeGradoMax = s;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn gradoMax;\n\t}",
"public void updateIndegree()\n\t{\n\t\tint deg = 0 ;\n\t\tint numOfVertex = getAdjacencyList().size();\n\t\tdeg = adjacencyList.get(numOfVertex-1).getIndegree();\n\t\tadjacencyList.get(numOfVertex-1).setIndegree(deg + 1);\t\t\t\n\t}",
"public int getDegree() {\n return degree_;\n }",
"public int getDegree() {\n\t\treturn degree;\n\t}",
"public int getDegree() {\n return degree_;\n }",
"public void incrementOutDegree() {\n\t\tthis.outDegree++;\n\t}",
"@Override\n\t\tpublic int getDegree(Direction direction) {\n\t\t\treturn 0;\n\t\t}",
"public int getDegree(Graph G, int vertex) {\r\n\t\tint counter = 0;\r\n\t\tfor(int j = 0; j < G.numVertices; j++) {\r\n\t\t\tif(vertex == j) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif(G.hasEdge(vertex, j)) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn counter;\r\n\t}",
"public int getPolySubDegree() {\n this.polySubSolve();\n return this.subdegree;\n }",
"public double getDegree() {\n return degree;\n }",
"public int getDegree() {\n\t\t\t\treturn degree;\n\t\t\t}",
"public int inDegree(N v) {\n return getInEdges(v).size();\n }",
"public void calculateOutDegree(int outdeg[]) {\n for (int i = 0; i < num_edges; ++i) {\n outdeg[sources[i]]++;\n }\n }",
"@Override\n public int degree(V vertex)\n {\n if (contains(vertex)){\n Iterator graphIterator = graph.entrySet().iterator();\n Map.Entry graphElement = (Map.Entry) graphIterator.next();\n V vert = (V)graphElement.getKey();\n while (graphIterator.hasNext() && vert != vertex){\n graphElement = (Map.Entry) graphIterator.next();\n vert = (V)graphElement.getKey();\n }\n ArrayList<V> edges = graph.get(vert);\n return edges.size();\n }\n else{\n throw new RuntimeException();\n }\n\n }",
"public int getDegree() {\n return coefs.length - 1;\n }",
"final int getIndegree() {\n return parents.size();\n }",
"public int inDegree(int vertex) {\n int count = 0;\n //your code here\n for (LinkedList<Edge> l : myAdjLists) {\n \tfor (Edge e : l) {\n \t\tif (e.to() == vertex) {\n \t\t\tcount++;\n \t\t\tbreak;\n \t\t}\n \t}\n }\n return count;\n }",
"public void setIndegree(int num)\n\t{\n\t\tindegree = num ;\n\t}",
"protected int degree(int vertex) {\n\t\treturn getNeighbors(vertex).size()\n\t\t\t\t+ getNeighboursIndegree(vertex).size();\n\t}",
"public int getDegree(){\n\t\treturn neighbours.size();\n\t}",
"public int inDegree(int vertex) {\r\n int count = 0;\r\n for (LinkedList<Edge> adjList : myAdjLists) {\r\n \tLinkedList<Edge> testList = adjList;\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tif (testList.get(counter).myTo == vertex) {\r\n \t\tcount++;\r\n \t}\r\n \tcounter++;\r\n }\r\n }\r\n return count;\r\n }",
"public int getDegree() {return getParametersArray().length - 1;}",
"public int getDegree(){\n return degree;\n }",
"Edge inverse() {\n return bond.inverse().edge(u, v);\n }",
"private int sumOfGDegrees() {\n\n\t\tint total = 0;\n\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\ttotal += this.vertices.get(i).getVertexDegree();\n\t\t}\n\n\t\treturn total;\n\t}",
"@Test\n public void testInDegreesInvalidEdgeTrgId() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n env.setParallelism(PARALLELISM);\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeInvalidTrgData(env),\n env);\n\n try {\n graph.inDegrees().output(new DiscardingOutputFormat<>());\n env.execute();\n\n fail(\"graph.inDegrees() did not fail.\");\n } catch (Exception e) {\n // We expect the job to fail with an exception\n }\n }",
"public String getDegreeName() {\n\t\treturn degreeName;\n\t}",
"abstract int degree(int i);",
"public Vertex getEnd()\n\t{\n\t\treturn end.copy();\n\t}",
"int getEndRotationDegree();",
"public int getvertex() {\n\t\treturn this.v;\n\t}",
"public static <N, E extends Edge<N>> int getRegularDegree(final Graph<N, E> graph)\n\t{\n\t\tif( graph instanceof ConnectionismOptimizedGraph )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn ((ConnectionismOptimizedGraph)graph).getRegularDegree();\n\t\t\t}\n\t\t\tcatch(UnsupportedOperationException caught)\n\t\t\t{\n\t\t\t\t// if it is not supported, lets handle it as if it was not\n\t\t\t\t// optimized\n\t\t\t}\n\t\t}\n\n\t\tint degree = -1;\n\t\tfor(final N node : graph.getNodes())\n\t\t{\n\t\t\tif( degree == -1 )\n\t\t\t\tdegree = Topography.getDegree(graph, node);\n\t\t\telse if( degree != Topography.getDegree(graph, node) )\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tif( degree == -1 )\n\t\t\tthrow new IllegalStateException(\"This graph has no nodes!\");\n\n\t\treturn degree;\n\t}",
"public Degree getDegreeProgram()\n {\n return this.degree;\n }",
"public static int degree(Graph G, int v)\n {\n int degree = 0;\n for (int w : G.adj(v))\n degree++;\n return degree;\n }",
"@Override\n public int getDegree(V v, TimeFrame pTimeFrame) {\n return darrGlobalAdjList.get(v.getId()).get(pTimeFrame).size();\n }",
"Direction invert() {\n switch (this) {\n case NORTH: return SOUTH;\n case SOUTH: return NORTH;\n case EAST: return WEST;\n case WEST: return EAST;\n case NORTH_EAST: return SOUTH_WEST;\n case NORTH_WEST: return SOUTH_EAST;\n case SOUTH_EAST: return NORTH_WEST;\n case SOUTH_WEST: return NORTH_EAST;\n default: return NULL;\n }\n }",
"@Test\n public void testGetDegreesInvalidEdgeSrcId() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n env.setParallelism(PARALLELISM);\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeInvalidSrcData(env),\n env);\n\n try {\n graph.getDegrees().output(new DiscardingOutputFormat<>());\n env.execute();\n\n fail(\"graph.getDegrees() did not fail.\");\n } catch (Exception e) {\n // We expect the job to fail with an exception\n }\n }",
"public double getEdge()\n {\n return this.edge;\n }",
"public java.lang.String getDegreeName() {\n java.lang.Object ref = degreeName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n degreeName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public double getPolynomialDegree() {\n\treturn this.polyDegree;\n }",
"@Test\n public void testGetDegreesInvalidEdgeTrgId() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n env.setParallelism(PARALLELISM);\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeInvalidTrgData(env),\n env);\n\n try {\n graph.getDegrees().output(new DiscardingOutputFormat<>());\n env.execute();\n\n fail(\"graph.getDegrees() did not fail.\");\n } catch (Exception e) {\n // We expect the job to fail with an exception\n }\n }",
"public java.lang.String getDegreeName() {\n java.lang.Object ref = degreeName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n degreeName_ = s;\n return s;\n }\n }",
"public int getVertexVal()\r\n\t{\r\n\t\treturn this.value;\r\n\t}",
"public int other(int vertex) {\n if (vertex == v) return w;\n else if (vertex == w) return v;\n else throw new IllegalArgumentException(\"Illegal endpoint\");\n }",
"public int other(int vertex) {\n if (vertex == v) return w;\n else if (vertex == w) return v;\n else throw new IllegalArgumentException(\"Illegal endpoint\");\n }",
"public double getVertexTolerance() {\n return vertexTolerance;\n }",
"public Direction getLeaveDirection() {\n if (!carrier.hasTile() || plan.cdst == plan.tdst) return null;\n TransportableAIObject t = getTransportable();\n PathNode path = t.getDeliveryPath(getCarrier(), plan.tdst);\n return (path == null || path.next == null) ? null\n : path.next.getDirection();\n }",
"@Override\n\t\t\t\tpublic int nextInt() {\n\t\t\t\t\toutdegree = -1;\n\t\t\t\t\treturn it0.nextInt();\n\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic int nextInt() {\n\t\t\t\t\t\toutdegree = -1;\n\t\t\t\t\t\treturn it0.nextInt();\n\t\t\t\t\t}",
"public int getPolyAddDegree() {\n this.polyAddSolve();\n return this.adddegree;\n }",
"@java.lang.SuppressWarnings(\"all\")\n\[email protected](\"lombok\")\n\tpublic Integer getVout() {\n\t\treturn this.vout;\n\t}",
"int getReverseEdgeKey();",
"EDataType getAngleDegrees();",
"public Map<V,Integer> inDegree () {\n Map<V,Integer> result = new HashMap<V,Integer>();\n for (V v: dag.keySet()) result.put(v, 0); // All in-degrees are 0. Will be updated later\n for (V from: dag.keySet()) {\n for (V to: dag.get(from)) {\n result.put(to, result.get(to) + 1); // Increment in-degree\n }\n }\n return result;\n }",
"public float getRemoteDegree() {\n\t\treturn this.reader.getRemoteDegree();\n\t}",
"@Override\r\n public int getDegree() {\r\n return head.getDegree();\r\n }",
"@Override\n public boolean isVertex()\n {\n return getAngle() > Math.PI && getAngle() < 2 * Math.PI;\n }",
"public Direction getOpposite() {\n if (equals(Direction.NORTH)) return Direction.SOUTH;\n else if (equals(Direction.EAST)) return Direction.WEST;\n else if (equals(Direction.SOUTH)) return Direction.NORTH;\n else if (equals(Direction.WEST)) return Direction.EAST;\n else return null;\n }",
"public int degree(int i)\n {\n return adjList[i].size();\n }",
"float getNominalVoltageOutOfPhase();"
] | [
"0.72136164",
"0.7192735",
"0.7028509",
"0.7001217",
"0.6872808",
"0.68479913",
"0.6824347",
"0.6802423",
"0.67758566",
"0.6612638",
"0.65732133",
"0.6556005",
"0.6432849",
"0.6404333",
"0.6381589",
"0.6159237",
"0.6154988",
"0.61444473",
"0.6066016",
"0.60585487",
"0.60232764",
"0.59980136",
"0.59881413",
"0.59654737",
"0.59329873",
"0.5932052",
"0.5845973",
"0.5845973",
"0.5844088",
"0.57968295",
"0.57891047",
"0.57718384",
"0.5731819",
"0.5730149",
"0.57030594",
"0.5693848",
"0.5674511",
"0.56664634",
"0.566197",
"0.56529677",
"0.5644996",
"0.56374496",
"0.5627031",
"0.5624797",
"0.56168604",
"0.5615307",
"0.5599484",
"0.55725783",
"0.556374",
"0.5561487",
"0.5554375",
"0.55429566",
"0.5538144",
"0.5536679",
"0.55256486",
"0.5487599",
"0.5480436",
"0.5479023",
"0.54304904",
"0.5424218",
"0.5394783",
"0.53738207",
"0.53731585",
"0.53646845",
"0.536223",
"0.533515",
"0.53164476",
"0.5305672",
"0.52759206",
"0.527463",
"0.5271164",
"0.52648455",
"0.5261617",
"0.52448136",
"0.5244237",
"0.52343386",
"0.5233655",
"0.52329826",
"0.52045816",
"0.5198254",
"0.5162179",
"0.5156468",
"0.5150326",
"0.51464623",
"0.51459455",
"0.5140979",
"0.5138469",
"0.5137665",
"0.51300305",
"0.512422",
"0.510846",
"0.5106596",
"0.5105588",
"0.51034343",
"0.5099395",
"0.50949967",
"0.5094504",
"0.5093421",
"0.5092579",
"0.5089592"
] | 0.7298364 | 0 |
/ [TEST] Print labels of all the vertices in graph. | public void printVertices() {
for (int i = 0; i < vertices.size(); i++)
System.out.print(vertices.get(i).label);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(name + \"=>\" + vertices.get(name).printNeighbors());\n\t\t}\n\t\tSystem.out.println(\"-------------------\");\n\t}",
"private static void printGraph(ArrayList<Vertex> graph) {\n\t\tSystem.out.print(\"---GRAPH PRINT START---\");\n\t\tfor (Vertex vertex: graph) {\n\t\t\tSystem.out.println(\"\\n\\n\" + vertex.getValue());\n\t\t\tSystem.out.print(\"Adjacent nodes: \");\n\t\t\tfor (Vertex v: vertex.getAdjacencyList()) {\n\t\t\t\tSystem.out.print(v.getValue() + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---GRAPH PRINT END---\\n\\n\");\n\t}",
"public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}",
"static void showGraph(ArrayList<ArrayList<Integer>> graph) {\n for(int i=0;i< graph.size(); i++ ){\n System.out.print(\"Vertex : \" + i + \" : \");\n for(int j = 0; j < graph.get(i).size(); j++) {\n System.out.print(\" -> \"+ graph.get(i).get(j));\n }\n }\n }",
"private void printGraph() {\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(v.getName() + \" DOWN\");\r\n\t\t\tsortEdges(v.adjacent);\r\n\t\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\t\t// v.adjacent.sort();\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus())\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost());\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost() + \" DOWN\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void printGraph()\n {\n Iterator<T> nodeIterator = nodeList.keySet().iterator();\n \n while (nodeIterator.hasNext())\n {\n GraphNode curr = nodeList.get(nodeIterator.next());\n \n while (curr != null)\n {\n System.out.print(curr.nodeId+\"(\"+curr.parentDist+\")\"+\"->\");\n curr = curr.next;\n }\n System.out.print(\"Null\");\n System.out.println();\n }\n }",
"public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}",
"void printGraph() {\n for (Vertex u : this) {\n System.out.print(u + \": \");\n for (Edge e : u.Adj) {\n System.out.print(e);\n }\n System.out.println();\n }\n }",
"void printGraph();",
"void printGraph() {\n System.out.println(\n \"All vertices in the graph are presented below.\\n\" +\n \"Their individual edges presented after a tab. \\n\" +\n \"-------\");\n\n for (Map.Entry<Vertex, LinkedList<Vertex>> entry : verticesAndTheirEdges.entrySet()) {\n LinkedList<Vertex> adj = entry.getValue();\n System.out.println(\"Vertex: \" + entry.getKey().getName());\n for (Vertex v : adj) {\n System.out.println(\" \" + v.getName());\n }\n }\n }",
"public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}",
"public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}",
"public static void printGraph(Graph g) {\r\n\t\tfor (int i = 0; i < g.V; i++) {\r\n\t\t\tSystem.out.print(\"Vertex \" + i + \": \");\r\n\t\t\t\r\n\t\t\tif (g.L.get(i).size() > 0) {\r\n\t\t\t\tSystem.out.print(g.L.get(i).get(0).printEdge());\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (int r = 1; r < g.L.get(i).size(); r++) {\r\n\t\t\t\tSystem.out.print(\", \" + g.L.get(i).get(r).printEdge());\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"void printNodesWithEdges()\n {\n for ( int i = 0; i < this.numNodes; i++ )\n {\n Node currNode = this.nodeList.get(i);\n System.out.println(\"Node id: \" + currNode.id );\n \n int numEdges = currNode.connectedNodes.size();\n for ( int j = 0; j < numEdges; j++ )\n {\n Node currEdge = currNode.connectedNodes.get(j);\n System.out.print(currEdge.id + \",\");\n }\n\n System.out.println();\n } \n\n \n }",
"public void print (){\r\n for (int i = 0; i < graph.size(); ++i){\r\n graph.get(i).print();\r\n }\r\n }",
"public static void printGraph( Graph graph ){\n\t\tint size = graph.getGraph().size();\n\t\tStringBuilder sb = new StringBuilder(); \n\t\tint weight = 0;\n\t\tfor( String start: graph.getGraph().keySet() ) {\n\t\t\tfor( String end : graph.getGraph().get(start).keySet() ) {\n\t\t\t\tweight = graph.getGraph().get(start).get(end);\n\t\t\t\tsb.append( start + end + String.valueOf(weight) + \", \" );\n\t\t\t}\n\t\t}\n\t\tsb.delete(sb.length()-2, sb.length());\n\t\tSystem.out.println(sb.toString());\n\t}",
"public void printAdjacencyList() {\n \n for ( int i=0; i<vertex_adjacency_list.size(); i++ ) {\n \n vertex_adjacency_list.get( i ).printVertex();\n \n }\n \n }",
"public void printGraph() {\n\t\tStringJoiner j = new StringJoiner(\", \");\n\t\tfor(Edge e : edgeList) {\n\t\t\tj.add(e.toString());\n\t\t}\n\t\t\n\t\tSystem.out.println(j.toString());\n\t}",
"public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public static void printEntireGraph(Graph g){\n \t\n \tfor(String v :g.vertexMap.keySet()){\n \t\t\n \t\tSystem.out.println(v+ ((g.vertexMap.get(v).isDown)?\" DOWN\":\"\"));\n \t\t\n \t\tfor (Edge adj :g.vertexMap.get(v).adjEdge.values()){\n \t\t\t\tSystem.out.print('\\t');\n \t\t\t\tSystem.out.print(adj.adjVertex.name+\" \");\n \t\t\t\tSystem.out.print(adj.dist+ ((adj.isDown)?\" DOWN\":\"\"));\n \t\t\t\tSystem.out.println();\n \t\t}\n \t\t\n \t}\n \t\n \t\n }",
"private Set<String> getVertexContextRelevantLabels(VertexControllerContext context) {\n return Stream.ofAll(context.getBulkVertices())\n .take(1)\n .map(Element::label)\n .toJavaSet();\n }",
"@Test\n public void getlabelTest() {\n \tVertex<String> v=new Vertex<String>(\"v\");\n \tassertEquals(\"v\", v.getlabel());\n }",
"private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }",
"public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}",
"public void outAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void print_root(){\r\n\t\tfor(int id = 0; id < label.length; id++){\r\n\t\t\tSystem.out.printf(\"\"%d \"\", find(id));\r\n\t\t}\r\n\t\tSystem.out.printf(\"\"\\n\"\");\r\n\t}",
"public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}",
"public String toString()\n\t{\n\t \n\t\tString str = vertexName + \": \" ;\n\t\tfor(int i = 0 ; i < adjacencyList.size(); i++)\n\t\t\tstr = str + adjacencyList.get(i).vertexName + \" \";\n\t\treturn str ;\n\t\t\n\t}",
"public void printVertices(PrintWriter os) {\n\n\n // Implement me!\n String s = \"\";\n for (String k : vertices.keySet()) {\n s = s + k + \" \";\n }\n os.println(s);\n\n\n }",
"public void printEdges()\n\t{\n\t\tSystem.out.println(\"Printing all Edges:\");\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\titr.next().printAdjacent();\n\t\t}\n\t}",
"void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }",
"@Override\n public String toString()\n {\n String builder = new String();\n \tfor (V vertex : graph.keySet()){\n \t\tString strVertex = vertex.toString();\n \t\tbuilder = builder + strVertex + \": \";\n \t\tArrayList <V> edges = graph.get(vertex);\n \t\tint degree = edges.size();\n \t\tint i = 0;\n \t\tif (degree > 0){\n \t\t\twhile (i < degree -1){\n \t\t\t\tString strEdge = edges.get(i).toString();\n \t\t\t\tbuilder = builder + strEdge + \", \";\n \t\t\t\ti++;\n \t\t\t}\n \t\tString strEdge = edges.get(i).toString();\n \t\tbuilder = builder + strEdge + \"\\n\";\n\n \t\t}\n \t\telse{\n \t\t\tstrVertex = vertex.toString();\n \t\t\tbuilder = builder + strVertex + \": \\n\";\n \t\t}\n\n \t}\n \treturn builder;\n }",
"public void print() {\n\t\tfor (int count = 0; count < adjacencyList.length; count++) {\n\t\t\tLinkedList<Integer> edges = adjacencyList[count];\n\t\t\tSystem.out.println(\"Adjacency list for \" + count);\n\n\t\t\tSystem.out.print(\"head\");\n\t\t\tfor (Integer edge : edges) {\n\t\t\t\tSystem.out.print(\" -> \" + edge);\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }",
"@Override\n public String toString()\n {\n StringBuilder sb = new StringBuilder();\n\n for(Vertex vertex: vertices)\n {\n sb.append(\"V: \" + vertex.toString() + '\\n');\n\n for(Edge edge: connections.get(vertex))\n {\n sb.append(\" -> \" + edge.other(vertex).toString() + \" (\" + edge.getWeight() + \")\\n\");\n }\n }\n\n return sb.toString();\n }",
"public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }",
"public void inIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"@Test\n\tpublic void testToString() {\n\t\tGraph<String> graph = emptyInstance();\n \tgraph.add(\"a\");\n \tgraph.add(\"b\");\n \tgraph.add(\"c\");\n \tgraph.add(\"d\");\n \tgraph.add(\"e\");\n \tassertEquals(\"Vertices: [a, b, c, d, e]\\n\" + \n \t\t\t\"Edges: []\", graph.toString());\n\t}",
"public String toString(){\n\t\treturn vertex.toString();\n\t}",
"public void display() {\r\n int v;\r\n Node n;\r\n \r\n for(v=1; v<=V; ++v){\r\n System.out.print(\"\\nadj[\" + toChar(v) + \"] ->\" );\r\n for(n = adj[v]; n != z; n = n.next) \r\n System.out.print(\" |\" + toChar(n.vert) + \" | \" + n.wgt + \"| ->\"); \r\n }\r\n System.out.println(\"\");\r\n }",
"public String toString() \n\t{\n\t\tString toReturn = \"\";\n\t\t\n\t\t\n\t\tfor(Vertex v : vertices) \n\t\t{\n\t\t\tHashMap<Vertex, Integer> E = getEdges(v);\n\t\t\t\n\t\t\tif(!E.isEmpty())\n\t\t\t{\n\t\t\t\ttoReturn = toReturn + v + \"(\";\n\t\t\t\tfor(Vertex edge : E.keySet()) \n\t\t\t\t{\n\t\t\t\t\ttoReturn = toReturn + edge.getName() + \", \";\n\t\t\t\t}\n\t\t\t\ttoReturn = toReturn.trim().substring(0, toReturn.length() - 2);\n\t\t\t\ttoReturn = toReturn + \")\\n\";\n\t\t\t}\n\t\t\telse {toReturn = toReturn + v + \"[]\\n\";}\n\t\t}\n\t\treturn toReturn;\n\t}",
"@Test public void testPublic4() {\n Graph<Character> graph= TestGraphs.testGraph1();\n\n assertEquals(\"B\", TestGraphs.collToString(graph.getNeighbors('A')));\n }",
"public void printNodes(){\n for(int i =0; i<n;i++)\n System.out.print(key[i]+\" \");\n System.out.println(isLeaf);\n if (!isLeaf){\n for(int i =0; i<=n;i++){\n c[i].printNodes();\n }\n }\n }",
"public String vertexName();",
"public static void printGraph(Model aGraph) {\r\n\t\tStmtIterator triples;\t\t\t\t\t//To loop through the triples\r\n\t\tStatement triple;\t\t\t\t\t\t//One of the triples\r\n\r\n\t\ttriples = aGraph.listStatements();\r\n\t\twhile (triples.hasNext()) {\r\n\t\t\ttriple = triples.next();\r\n//\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\tprintTriple(triple);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public void printDGraph(){\n System.out.println(this.toString());\n }",
"public void printAdjacencyMatrix();",
"public void printEdges() {\n\t\tSystem.out.println(\"Edges\");\n\t\tIterator<Edge> i = edges.iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tEdge e = i.next();\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\t}",
"@Override\n public String toString() {\n if (map == null || map.size() == 0)\n return \"\";\n StringBuilder sb = new StringBuilder();\n\n Set<String> visited = new HashSet<>();\n\n for (Map.Entry<String, Vertex> m : map.entrySet()) {\n dfs(sb, m.getKey(), m.getValue(), visited);\n }\n\n return sb.toString();\n }",
"private void printPath(int currentVertex, int[] parents) {\n // Base case : Source node has been processed \n if (currentVertex == NO_PARENT) {\n return;\n }\n printPath(parents[currentVertex], parents);\n System.out.print(currentVertex + \" \");\n }",
"Iterable<Long> vertices() {\n return nodes.keySet();\n }",
"public String toString() {\n \tString printStatements = \"\";\n \t\n \tfor (Vertex vertex : this) {\n \t\tprintStatements += vertex + \" \";\n \t}\n \treturn printStatements;\n }",
"public void testContainsVertex() {\n System.out.println(\"containsVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.containsVertex(new Integer(i)));\n }\n }",
"public void display() {\n\t\t\n\t\tint u,v;\n\t\t\n\t\tfor(v=1; v<=V; ++v) {\n\t\t\t\n\t\t\tSystem.out.print(\"\\nadj[\" + v + \"] = \");\n\t\t\t\n\t\t\tfor(u = 1 ; u <= V; ++u) {\n\t\t\t\t \n\t\t\t\tSystem.out.print(\" \" + adj[u][v]);\n\t\t\t}\n\t\t} \n\t\tSystem.out.println(\"\");\n\t}",
"@Override\n public String toString() {\n String str = \"graph [\\n\";\n\n Iterator<Node<E>> it = iterator();\n\n //Node display\n while(it.hasNext()){\n Node n = it.next();\n\n str += \"\\n\\tnode [\";\n str += \"\\n\\t\\tid \" + n;\n str += \"\\n\\t]\";\n }\n\n //Edge display\n it = iterator();\n\n while(it.hasNext()){\n Node n = it.next();\n\n Iterator<Node<E>> succsIt = n.succsOf();\n while(succsIt.hasNext()){\n Node succN = succsIt.next();\n\n str += \"\\n\\tedge [\";\n str += \"\\n\\t\\tsource \" + n;\n str += \"\\n\\t\\ttarget \" + succN;\n str += \"\\n\\t\\tlabel \\\"Edge from node \" + n + \" to node \" + succN + \" \\\"\";\n str += \"\\n\\t]\";\n }\n }\n\n str += \"\\n]\";\n\n return str;\n }",
"public String toString() {\n StringBuilder s = new StringBuilder();\n String NEWLINE = System.getProperty(\"line.separator\");\n s.append(vertices + \" \" + NEWLINE);\n for (int v = 0; v < vertices; v++) {\n s.append(String.format(\"%d: \", v));\n for (Map.Entry<Integer, Integer> e : adjacent(v).entrySet()) {\n s.append(String.format(\"%d (%d) \", e.getKey(), e.getValue()));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public void print() {\n\t\tint i = 1;\n\t\tfor (String s: g.keySet()) {\n\t\t\tSystem.out.print(\"Element: \" + i++ + \" \" + s + \" --> \");\n\t\t\tfor (String k: g.get(s)) {\n\t\t\t\tSystem.out.print(k + \" ### \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public String toString(){\r\n String result = \"[ \";\r\n result = result + vertex + \" ]\";\r\n return result;\r\n }",
"@Test\n public void tae4()\n {\n Graph graph = new Graph(4);\n graph.addEdge(0,0);\n graph.addEdge(0,1);\n graph.addEdge(0,2);\n graph.addEdge(0,3);\n graph.addEdge(1,0);\n graph.addEdge(1,1);\n graph.addEdge(1,2);\n graph.addEdge(1,3);\n graph.addEdge(2,0);\n graph.addEdge(2,1);\n graph.addEdge(2,2);\n graph.addEdge(2,3);\n graph.addEdge(3,0);\n graph.addEdge(3,1);\n graph.addEdge(3,2);\n graph.addEdge(3,3);\n System.out.println(graph);\n assertEquals(graph.toString(), \"numNodes: 4\\nedges: [[true, true, true, true], [true, true, true, true], \" +\n \"[true, true, true, true], [true, true, true, true]]\");\n }",
"public void visit(int i) {\r\n Vertex v = vertexList.get(i);\r\n v.isVisited = true;\r\n System.out.println(v.label);\r\n }",
"@Test\n public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }",
"public void printPath(Vertex v) {\n if ( v.dist == 0 )\n return;\n printPath(v.path);\n System.out.print(\"-> \" + v.graphLoc+\" \");\n }",
"@Test\n public void toStringTest() {\n \tConcreteVerticesGraph<String> graph=new ConcreteVerticesGraph<String>();\n \tassertEquals(\"Graph is empty\", graph.toString());\n \tgraph.set(\"v1\", \"v4\", 10);\n \tassertEquals(\"v1->v4:10\\n\", graph.toString());\n }",
"public String toString() {\n String s = \"\";\n for (Vertex v : mVertices.values()) {\n s += v + \": \";\n for (Vertex w : mAdjList.get(v)) {\n s += w + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }",
"@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}",
"public String toString()\r\n\t{\r\n\t\tString str = \"\";\r\n\t\t\r\n\t\tSortedSet<String> sortedVertices = new TreeSet<String>(this.getVertices());\r\n\t\t\r\n\t\tstr += \"Vertices: \" + sortedVertices.toString() + \"\\nEdges:\\n\";\r\n\t\t\r\n\t\tfor(String vertex : sortedVertices)\r\n\t\t{\r\n\t\t\tif(this.dataMap.containsKey(vertex))\r\n\t\t\t{\r\n\t\t\t\tHashMap<String,Integer> adjMap = this.adjacencyMap.get(vertex);\r\n\t\t\t\t\r\n\t\t\t\tSortedSet<String> sortedKeys = new TreeSet<String>(adjMap.keySet());\r\n\t\t\t\t\r\n\t\t\t\tstr += \"Vertex(\" + vertex + \")--->{\";\r\n\t\t\t\tfor(String adj : sortedKeys)\r\n\t\t\t\t{\r\n\t\t\t\t\tstr += adj +\"=\"+ adjMap.get(adj) +\", \";\r\n\t\t\t\t}\r\n\t\t\t\tstr = str.trim();\r\n\t\t\t\t\r\n\t\t\t\tif(!sortedKeys.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tStringBuilder s = new StringBuilder(str);\r\n\t\t\t\t\ts.deleteCharAt(str.length()-1);\r\n\t\t\t\t\tstr = s.toString();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tstr+=\"}\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn str;\r\n\t}",
"public void printAdjacents(ArrayList<Position> nodes){\r\n\t\tSystem.out.print(\"For node (\"+this.y+\",\"+this.x+\"):\");\r\n\t\tfor(Position node:nodes){\r\n\t\t\tSystem.out.print(\"(\"+node.getY()+\",\"+node.getX()+\")\");\r\n\t\t}\r\n\t\tSystem.out.print(\"\\n\");\r\n\t}",
"void printSCCs() {\n \tStack stack = new Stack(); \n \t\n \t// Mark all the vertices as not visited (For first DFS) \n boolean visited[] = new boolean[V]; \n for(int i = 0; i < V; i++) \n visited[i] = false; \n \n // Fill vertices in stack according to their finishing times\n // (topological order (reverse post order))\n for (int i = 0; i < V; i++) \n if (visited[i] == false) \n fillOrder(i, visited, stack); \n \n // Create a reversed graph \n GraphKosarajuSharirSCC gr = reverseGraph();\n \n // Mark all the vertices as not visited (For second DFS) \n for (int i = 0; i < V; i++) \n visited[i] = false; \n \n // Now process all vertices in order defined by Stack \n while (stack.empty() == false) { \n // Pop a vertex from stack \n int v = (int)stack.pop(); \n \n // Print Strongly connected component of the popped vertex \n if (visited[v] == false) { \n gr.DFSUtil(v, visited); \n System.out.println(); \n } \n } \n }",
"@Override\n\tpublic void processNode(DirectedGraphNode node) {\n\t\tSystem.out.print(node.getLabel()+\" \");\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"\\n\\n \\tVertice [label=\" + label + \"] \";\n\t}",
"public String toString(){\n String string = \"\" + nrVertices;\n for(DEdge edge : edges){\n string += \"\\n\" + (edge.getVertex1()) + \" \" + (edge.getVertex2());\n }\n return string;\n }",
"@Override\n\tpublic int graphOrder() {\n\t\treturn vertices.size();\n\t}",
"@Override\r\n public List<Vertex> getVertices() {\r\n List<Vertex> verticesList = new LinkedList<>(adjacencyList.keySet()); //getting the key set of adjacencyList i.e, a list of all vertices\r\n Collections.sort(verticesList, Comparator.comparing(Vertex::getLabel));\r\n return verticesList;\r\n }",
"public void outIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"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}",
"private String vertexNamesAndCoordsToString() {\n \n //make empty string\n String s = \"\";\n \n //add # of vertices & line break\n s += N + \"\\n\";\n \n //for loop to add names/coords to it\n for (int i = 0; i < arrayOfVertices.length; i++) {\n \n //add vertex name, xcoord, & ycoord separated by spaces \n s += arrayOfVertices[i].getName() + \" \" \n + arrayOfVertices[i].getX() + \" \" \n + arrayOfVertices[i].getY() + \"\\n\"; \n \n }\n \n //return the string\n return s;\n \n }",
"@Override\n\tpublic String toString()\n\t{\n\t\t/* output looks like this\n\t\t * \n\t\t * 20 - 10, 30 20 has edges with 10 and 30\n\t\t * 40 - 10, 30 \t\t40 has edges with 10 and 30\n\t\t * 10 - 20, 40 \t\t\t10 has edges with 20 and 40\n\t\t * 30 - 20, 40 \t\t\t30 has edges with 20 and 40\n\t\t */\n\t\tString str = new String();\n\t\tfor(Map.Entry<Object, SinglyLinkedList> vertex : map.entrySet())\n\t\t\tstr += vertex.getKey() + \" - \" + vertex.getValue() + '\\n';\t\t\t\t\n\t\treturn str;\n\t}",
"@Test public void testPublic8() {\n Graph<Integer> graph= TestGraphs.testGraph4();\n String[] results= {\"1 4\", \"2 4\", \"3 4\", \"0 4\", \"\"};\n Integer i;\n\n for (i= 0; i <= 4; i++)\n assertEquals(results[i],\n TestGraphs.collToString(graph.getNeighbors(i)));\n }",
"public static void printLookupTable(HashMap<Integer, String> map) {\n\t\tint size = map.size();\n\t\tfor(int i = 0; i < size; i++) { \n\t\t\tSystem.out.println(\"vertex descriptor:\\t\" + i + \"\\taddress:\\t\" + map.get(i));\n\t\t}\n\t}",
"@Test public void testPublic5() {\n Graph<Character> graph= TestGraphs.testGraph1();\n\n assertEquals(\"\", TestGraphs.collToString(graph.getNeighbors('B')));\n }",
"public String toString() {\n \tStringBuilder s = new StringBuilder();\n \ts.append(V + \" vertices, \" + E + \" edges \" + NEWLINE);\n \tfor(int v = 0; v < V; v++) {\n \t\ts.append(v + \": \");\n \t\tfor(int w : adj[v]) {\n \t\t\ts.append(w + \" \");\n \t\t}\n \t\ts.append(NEWLINE);\n \t}\n \t\n \treturn s.toString();\n }",
"private void printSolution(int startVertex, double[] distances, int[] parents) {\n int nVertices = distances.length;\n System.out.print(\"Vertex\\t Distance\\tPath\");\n\n for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) {\n if (vertexIndex != startVertex) {\n System.out.print(\"\\n\" + startVertex + \" -> \");\n System.out.print(vertexIndex + \" \\t\\t \");\n System.out.print(distances[vertexIndex] + \"\\t\\t\");\n printPath(vertexIndex, parents);\n }\n }\n }",
"public String graphToString(PlainGraph graph) {\n String result = graph.edgeSet().toString();\n for (Map.Entry<String, PlainNode> v : graphNodeMap.get(graph).entrySet()) {\n result = result.replace(v.getValue().toString(), v.getKey());\n }\n return result;\n }",
"String showAllNodes();",
"public static void main(String[] args) {\n\t\tVertex v1, v2, v3, v4, v5, v6, v7;\n\t\tv1 = new Vertex(\"v1\");\n\t\tv2 = new Vertex(\"v2\");\n\t\tv3 = new Vertex(\"v3\");\n\t\tv4 = new Vertex(\"v4\");\n\t\tv5 = new Vertex(\"v5\");\n\t\tv6 = new Vertex(\"v6\");\n\t\tv7 = new Vertex(\"v7\");\n\n\t\tv1.addAdjacency(v2, 2);\n\t\tv1.addAdjacency(v3, 4);\n\t\tv1.addAdjacency(v4, 1);\n\n\t\tv2.addAdjacency(v1, 2);\n\t\tv2.addAdjacency(v4, 3);\n\t\tv2.addAdjacency(v5, 10);\n\n\t\tv3.addAdjacency(v1, 4);\n\t\tv3.addAdjacency(v4, 2);\n\t\tv3.addAdjacency(v6, 5);\n\n\t\tv4.addAdjacency(v1, 1);\n\t\tv4.addAdjacency(v2, 3);\n\t\tv4.addAdjacency(v3, 2);\n\t\tv4.addAdjacency(v5, 2);\n\t\tv4.addAdjacency(v6, 8);\n\t\tv4.addAdjacency(v7, 4);\n\n\t\tv5.addAdjacency(v2, 10);\n\t\tv5.addAdjacency(v4, 2);\n\t\tv5.addAdjacency(v7, 6);\n\n\t\tv6.addAdjacency(v3, 5);\n\t\tv6.addAdjacency(v4, 8);\n\t\tv6.addAdjacency(v7, 1);\n\n\t\tv7.addAdjacency(v4, 4);\n\t\tv7.addAdjacency(v5, 6);\n\t\tv7.addAdjacency(v6, 1);\n\n\t\tArrayList<Vertex> weightedGraph = new ArrayList<Vertex>();\n\t\tweightedGraph.add(v1);\n\t\tweightedGraph.add(v2);\n\t\tweightedGraph.add(v3);\n\t\tweightedGraph.add(v4);\n\t\tweightedGraph.add(v5);\n\t\tweightedGraph.add(v6);\n\t\tweightedGraph.add(v7);\n\t\t\n\t\tdijkstra( weightedGraph, v7 );\n\t\tprintPath( v1 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v2 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v3 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v4 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v5 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v6 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v7 );\n\t\tSystem.out.println(\"\");\n\t}",
"protected void visit(Graph<VLabel, ELabel>.Vertex v) {\n }",
"public static void main(String [] args){\n\t\tSystem.out.println(\"Code by github: Vinay26k\");\n\t\t // create the graph given in above figure\n int V = 5;\n Graph graph = new Graph(V);\n addEdge(graph, 0, 1);\n addEdge(graph, 0, 4);\n addEdge(graph, 1, 2);\n addEdge(graph, 1, 3);\n addEdge(graph, 1, 4);\n addEdge(graph, 2, 3);\n addEdge(graph, 3, 4);\n \n // print the adjacency list representation of \n // the above graph\n printGraph(graph);\n\t}",
"private void initializeLabels() {\n labelVertexA = new Label(\"Vertex A\");\n labelVertexB = new Label(\"Vertex B\");\n labelVertexA.setTextFill(Color.web(\"#ffffff\"));\n labelVertexB.setTextFill(Color.web(\"#ffffff\"));\n }",
"@Test\n public void tae0()\n {\n Graph g = new Graph(2);\n g.addEdge(0, 1);\n System.out.println(g);\n assertEquals(g.toString(), \"numNodes: 2\\nedges: [[false, true], [false, false]]\");\n }",
"public String toString() {\n\t\tStringBuilder temp = new StringBuilder();\n\n\t\tfor (int index = 0; index < verticesNum; index++) {\n\t\t\tif(list[index] == null)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttemp.append(\"node:\");\n\t\t\ttemp.append(index);\n\t\t\ttemp.append(\": \");\n\t\t\ttemp.append(list[index].toString());\n\t\t\ttemp.append(\"\\n\");\n\t\t}\n\n\t\treturn temp.toString();\n\t}",
"public String toString() {\n\t\tString tester = \"\";\n\t\tfor(String node : nodes.keySet())\n\t\t{\n\t\t\ttester += \" \" + nodes.get(node) + \" \\n\";\n\t\t}\n\t\treturn tester;\n\t}",
"public void PrintKNeighbours() {\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tSystem.out.print(ptr.dim_weight+\" \");\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t}",
"void printMST(int[] parent) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < VERTICES; i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph[i][parent[i]]);\n }",
"public void printPath(int index){\n\t\tList<V> path=getPath(index);\n\n\t\tSystem.out.println(\"A path from \"+vertices.get(root)+\" to \"+vertices.get(index)+\": \");\n\t\tfor(int i=path.size()-1;i>=0;i--)\n\t\t\tSystem.out.print(path.get(i)+\" \");\n\n\t\t}",
"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 printEdges(){\n System.out.print(\" |\");\n for(int i=0;i<size;i++)\n System.out.print(\" \"+i+\" \");\n System.out.print(\"\\n\");\n for(int i=0;i<size+1;i++)\n System.out.print(\"-------\");\n System.out.print(\"\\n\");\n for(int i=0;i<size;i++){\n System.out.print(\" \"+i+\" |\");\n for(int j=0;j<size;j++){\n System.out.print(\" \"+Matrix[i][j]+\" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"public void printPath(ArrayList<Integer> parent, int index, Graph graph){\n if (parent.get(index)==-1)\r\n return;\r\n\r\n //recurse till we get src\r\n printPath(parent, parent.get(index), graph);\r\n shortestVerticesToPlot.add(graph.vertices.get(index).point);\r\n\r\n System.out.print(index + \"\\t\\t\");\r\n }",
"public void outputForGraphviz() {\n\t\tString label = \"\";\n\t\tfor (int j = 0; j <= lastindex; j++) {\n\t\t\tif (j > 0) label += \"|\";\n\t\t\tlabel += \"<p\" + ptrs[j].myname + \">\";\n\t\t\tif (j != lastindex) label += \"|\" + String.valueOf(keys[j+1]);\n\t\t\t// Write out any link now\n\t\t\tBTree.writeOut(myname + \":p\" + ptrs[j].myname + \" -> \" + ptrs[j].myname + \"\\n\");\n\t\t\t// Tell your child to output itself\n\t\t\tptrs[j].outputForGraphviz();\n\t\t}\n\t\t// Write out this node\n\t\tBTree.writeOut(myname + \" [shape=record, label=\\\"\" + label + \"\\\"];\\n\");\n\t}",
"public static void printAdjacencyList(ArrayList<LinkedList<Integer>> map) {\n\t\tint size = map.size();\n\t\tfor(int node = 0; node < size; node++) { \n\t\t\tLinkedList<Integer> ll = map.get(node);\n\t\t\tif(ll == null) continue;\n\t\t\tint len = ll.size();\n\t\t\tfor(int i = 0; i < len; i++) {\n\t\t\t\tSystem.out.println(node + \" \" + ll.get(i));\n\t\t\t}\t\t\n\t\t}\n\t}"
] | [
"0.71007115",
"0.6977866",
"0.6884188",
"0.6828852",
"0.6784143",
"0.67088276",
"0.66909224",
"0.6670032",
"0.6615184",
"0.65508384",
"0.65102315",
"0.6501796",
"0.6488034",
"0.6466866",
"0.64625955",
"0.64450073",
"0.644372",
"0.64288837",
"0.63994056",
"0.6340202",
"0.63154906",
"0.6303839",
"0.629483",
"0.62388664",
"0.62062544",
"0.617874",
"0.60931367",
"0.6085428",
"0.60793144",
"0.60351783",
"0.6030051",
"0.6028009",
"0.6014072",
"0.6007498",
"0.5996479",
"0.5982054",
"0.5979784",
"0.5976097",
"0.5960113",
"0.5952857",
"0.59479105",
"0.5928",
"0.5885912",
"0.58805025",
"0.58668184",
"0.585273",
"0.58193564",
"0.5818625",
"0.5804835",
"0.5792752",
"0.57854027",
"0.57847255",
"0.5782671",
"0.5758451",
"0.5739893",
"0.5723233",
"0.57176834",
"0.57125366",
"0.5691732",
"0.56908876",
"0.5688409",
"0.56835604",
"0.5654968",
"0.56471616",
"0.5646855",
"0.56448984",
"0.5635388",
"0.56350416",
"0.56213343",
"0.5610159",
"0.559305",
"0.5591198",
"0.55874693",
"0.55794805",
"0.5573789",
"0.55697095",
"0.55685765",
"0.55685675",
"0.5567297",
"0.5556145",
"0.55527633",
"0.5552289",
"0.5552236",
"0.5547385",
"0.55356187",
"0.553412",
"0.5517856",
"0.5510474",
"0.55074847",
"0.5505119",
"0.54976946",
"0.5496205",
"0.5496195",
"0.54900557",
"0.54716206",
"0.54643774",
"0.5460785",
"0.54607576",
"0.54547197",
"0.54498976"
] | 0.78364366 | 0 |
/ Print the labels of all incoming edges to current vertex. | public void inIncidentEdges() {
for (int i = 0; i < currentVertex.inList.size(); i++) {
System.out.print(currentVertex.inList.get(i).edge + " ");
}
printLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}",
"public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}",
"public void outAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void outIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void printEdges() {\n\t\tSystem.out.println(\"Edges\");\n\t\tIterator<Edge> i = edges.iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tEdge e = i.next();\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\t}",
"void printGraph() {\n for (Vertex u : this) {\n System.out.print(u + \": \");\n for (Edge e : u.Adj) {\n System.out.print(e);\n }\n System.out.println();\n }\n }",
"public void printEdges()\n\t{\n\t\tSystem.out.println(\"Printing all Edges:\");\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\titr.next().printAdjacent();\n\t\t}\n\t}",
"void printNodesWithEdges()\n {\n for ( int i = 0; i < this.numNodes; i++ )\n {\n Node currNode = this.nodeList.get(i);\n System.out.println(\"Node id: \" + currNode.id );\n \n int numEdges = currNode.connectedNodes.size();\n for ( int j = 0; j < numEdges; j++ )\n {\n Node currEdge = currNode.connectedNodes.get(j);\n System.out.print(currEdge.id + \",\");\n }\n\n System.out.println();\n } \n\n \n }",
"public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(name + \"=>\" + vertices.get(name).printNeighbors());\n\t\t}\n\t\tSystem.out.println(\"-------------------\");\n\t}",
"public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }",
"public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}",
"public void printGraph() {\n\t\tStringJoiner j = new StringJoiner(\", \");\n\t\tfor(Edge e : edgeList) {\n\t\t\tj.add(e.toString());\n\t\t}\n\t\t\n\t\tSystem.out.println(j.toString());\n\t}",
"private void printGraph() {\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(v.getName() + \" DOWN\");\r\n\t\t\tsortEdges(v.adjacent);\r\n\t\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\t\t// v.adjacent.sort();\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus())\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost());\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost() + \" DOWN\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}",
"@Override\n public String toString()\n {\n StringBuilder sb = new StringBuilder();\n\n for(Vertex vertex: vertices)\n {\n sb.append(\"V: \" + vertex.toString() + '\\n');\n\n for(Edge edge: connections.get(vertex))\n {\n sb.append(\" -> \" + edge.other(vertex).toString() + \" (\" + edge.getWeight() + \")\\n\");\n }\n }\n\n return sb.toString();\n }",
"private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }",
"void printGraph() {\n System.out.println(\n \"All vertices in the graph are presented below.\\n\" +\n \"Their individual edges presented after a tab. \\n\" +\n \"-------\");\n\n for (Map.Entry<Vertex, LinkedList<Vertex>> entry : verticesAndTheirEdges.entrySet()) {\n LinkedList<Vertex> adj = entry.getValue();\n System.out.println(\"Vertex: \" + entry.getKey().getName());\n for (Vertex v : adj) {\n System.out.println(\" \" + v.getName());\n }\n }\n }",
"public void print() {\n\t\tfor (int count = 0; count < adjacencyList.length; count++) {\n\t\t\tLinkedList<Integer> edges = adjacencyList[count];\n\t\t\tSystem.out.println(\"Adjacency list for \" + count);\n\n\t\t\tSystem.out.print(\"head\");\n\t\t\tfor (Integer edge : edges) {\n\t\t\t\tSystem.out.print(\" -> \" + edge);\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void printEdge(){\n\t\tint count = 0;\n\t\tSystem.out.print(\"\\t\");\n\t\tfor(Edge e: edgeArray){\n\t\t\tif(count > 5){\n\t\t\t\tSystem.out.println();\n\t\t\t\tcount = 0;\n\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t}\n\t\t\tcount ++;\n\t\t\tSystem.out.printf(\"%s (%d) \", e.getVertex().getRecord(), e.getCost());\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public String toString(){\n String string = \"\" + nrVertices;\n for(DEdge edge : edges){\n string += \"\\n\" + (edge.getVertex1()) + \" \" + (edge.getVertex2());\n }\n return string;\n }",
"public void printEdges(){\n System.out.print(\" |\");\n for(int i=0;i<size;i++)\n System.out.print(\" \"+i+\" \");\n System.out.print(\"\\n\");\n for(int i=0;i<size+1;i++)\n System.out.print(\"-------\");\n System.out.print(\"\\n\");\n for(int i=0;i<size;i++){\n System.out.print(\" \"+i+\" |\");\n for(int j=0;j<size;j++){\n System.out.print(\" \"+Matrix[i][j]+\" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"public void display() {\r\n int v;\r\n Node n;\r\n \r\n for(v=1; v<=V; ++v){\r\n System.out.print(\"\\nadj[\" + toChar(v) + \"] ->\" );\r\n for(n = adj[v]; n != z; n = n.next) \r\n System.out.print(\" |\" + toChar(n.vert) + \" | \" + n.wgt + \"| ->\"); \r\n }\r\n System.out.println(\"\");\r\n }",
"private static void printGraph(ArrayList<Vertex> graph) {\n\t\tSystem.out.print(\"---GRAPH PRINT START---\");\n\t\tfor (Vertex vertex: graph) {\n\t\t\tSystem.out.println(\"\\n\\n\" + vertex.getValue());\n\t\t\tSystem.out.print(\"Adjacent nodes: \");\n\t\t\tfor (Vertex v: vertex.getAdjacencyList()) {\n\t\t\t\tSystem.out.print(v.getValue() + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---GRAPH PRINT END---\\n\\n\");\n\t}",
"public void print (){\r\n for (int i = 0; i < graph.size(); ++i){\r\n graph.get(i).print();\r\n }\r\n }",
"static void showGraph(ArrayList<ArrayList<Integer>> graph) {\n for(int i=0;i< graph.size(); i++ ){\n System.out.print(\"Vertex : \" + i + \" : \");\n for(int j = 0; j < graph.get(i).size(); j++) {\n System.out.print(\" -> \"+ graph.get(i).get(j));\n }\n }\n }",
"public void printAdjacencyList() {\n \n for ( int i=0; i<vertex_adjacency_list.size(); i++ ) {\n \n vertex_adjacency_list.get( i ).printVertex();\n \n }\n \n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder out = new StringBuilder();\r\n\t\tMap<Integer,Integer> tmp;\r\n\t\tout.append(\"{\");\r\n\t\tfor(int i = 0; i < edges.length; i++) {\r\n\t\t\ttmp = edges[i];\r\n\t\t\tif (tmp == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor(Map.Entry entry : tmp.entrySet()) {\r\n\t\t\t\t\tif ((int)entry.getValue() == -1) {\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \")\" + \",\");\r\n\t\t\t\t} else{\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \",\" + entry.getValue() + \")\" + \",\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (out.length() > 2) {\r\n\t\tout.setLength(out.length() - 2);\r\n\t\tout.append(\")\");\r\n\t\t}\r\n\r\n\t\tout.append(\"}\");\r\n\t\treturn out.toString();\r\n\t}",
"@Override\n public String toString() {\n String str = \"graph [\\n\";\n\n Iterator<Node<E>> it = iterator();\n\n //Node display\n while(it.hasNext()){\n Node n = it.next();\n\n str += \"\\n\\tnode [\";\n str += \"\\n\\t\\tid \" + n;\n str += \"\\n\\t]\";\n }\n\n //Edge display\n it = iterator();\n\n while(it.hasNext()){\n Node n = it.next();\n\n Iterator<Node<E>> succsIt = n.succsOf();\n while(succsIt.hasNext()){\n Node succN = succsIt.next();\n\n str += \"\\n\\tedge [\";\n str += \"\\n\\t\\tsource \" + n;\n str += \"\\n\\t\\ttarget \" + succN;\n str += \"\\n\\t\\tlabel \\\"Edge from node \" + n + \" to node \" + succN + \" \\\"\";\n str += \"\\n\\t]\";\n }\n }\n\n str += \"\\n]\";\n\n return str;\n }",
"public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}",
"public String toString() {\n \tStringBuilder s = new StringBuilder();\n \ts.append(V + \" vertices, \" + E + \" edges \" + NEWLINE);\n \tfor(int v = 0; v < V; v++) {\n \t\ts.append(v + \": \");\n \t\tfor(int w : adj[v]) {\n \t\t\ts.append(w + \" \");\n \t\t}\n \t\ts.append(NEWLINE);\n \t}\n \t\n \treturn s.toString();\n }",
"private String edgeString()\n {\n Iterator<DSAGraphEdge<E>> iter = edgeList.iterator();\n String outputString = \"\";\n DSAGraphEdge<E> edge = null;\n while (iter.hasNext())\n {\n edge = iter.next();\n outputString = (outputString + edge.getLabel() + \", \");\n }\n return outputString;\n }",
"public void getInfo() {\n System.out.println(\"INFO Node : \"+address+ \" connected to nodes \");\n for(Node node : getConnectedNodes()){\n System.out.print(\"Node :\"+node.getAddress()+\" with edge : \");\n getEdge(this, node).printEdge();\n }\n \n }",
"public String toString() \n {\n String NEWLINE = System.getProperty(\"line.separator\");\n StringBuilder s = new StringBuilder();\n for (int v = 0; v < V; v++) \n {\n s.append(v + \": \");\n for (DirectedEdge e : adj[v]) \n {\n \tif(e.online)\n \t{\n \t\ts.append(e + \" \");\n \t}\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public void display() {\n\t\t\n\t\tint u,v;\n\t\t\n\t\tfor(v=1; v<=V; ++v) {\n\t\t\t\n\t\t\tSystem.out.print(\"\\nadj[\" + v + \"] = \");\n\t\t\t\n\t\t\tfor(u = 1 ; u <= V; ++u) {\n\t\t\t\t \n\t\t\t\tSystem.out.print(\" \" + adj[u][v]);\n\t\t\t}\n\t\t} \n\t\tSystem.out.println(\"\");\n\t}",
"public String toString() \n\t{\n\t\tString toReturn = \"\";\n\t\t\n\t\t\n\t\tfor(Vertex v : vertices) \n\t\t{\n\t\t\tHashMap<Vertex, Integer> E = getEdges(v);\n\t\t\t\n\t\t\tif(!E.isEmpty())\n\t\t\t{\n\t\t\t\ttoReturn = toReturn + v + \"(\";\n\t\t\t\tfor(Vertex edge : E.keySet()) \n\t\t\t\t{\n\t\t\t\t\ttoReturn = toReturn + edge.getName() + \", \";\n\t\t\t\t}\n\t\t\t\ttoReturn = toReturn.trim().substring(0, toReturn.length() - 2);\n\t\t\t\ttoReturn = toReturn + \")\\n\";\n\t\t\t}\n\t\t\telse {toReturn = toReturn + v + \"[]\\n\";}\n\t\t}\n\t\treturn toReturn;\n\t}",
"@Override\n public String toString()\n {\n String builder = new String();\n \tfor (V vertex : graph.keySet()){\n \t\tString strVertex = vertex.toString();\n \t\tbuilder = builder + strVertex + \": \";\n \t\tArrayList <V> edges = graph.get(vertex);\n \t\tint degree = edges.size();\n \t\tint i = 0;\n \t\tif (degree > 0){\n \t\t\twhile (i < degree -1){\n \t\t\t\tString strEdge = edges.get(i).toString();\n \t\t\t\tbuilder = builder + strEdge + \", \";\n \t\t\t\ti++;\n \t\t\t}\n \t\tString strEdge = edges.get(i).toString();\n \t\tbuilder = builder + strEdge + \"\\n\";\n\n \t\t}\n \t\telse{\n \t\t\tstrVertex = vertex.toString();\n \t\t\tbuilder = builder + strVertex + \": \\n\";\n \t\t}\n\n \t}\n \treturn builder;\n }",
"@Override\n\tpublic void processNode(DirectedGraphNode node) {\n\t\tSystem.out.print(node.getLabel()+\" \");\n\t}",
"public static void printGraph(Graph g) {\r\n\t\tfor (int i = 0; i < g.V; i++) {\r\n\t\t\tSystem.out.print(\"Vertex \" + i + \": \");\r\n\t\t\t\r\n\t\t\tif (g.L.get(i).size() > 0) {\r\n\t\t\t\tSystem.out.print(g.L.get(i).get(0).printEdge());\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (int r = 1; r < g.L.get(i).size(); r++) {\r\n\t\t\t\tSystem.out.print(\", \" + g.L.get(i).get(r).printEdge());\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"void setEdgeLabel(int edge, String label);",
"public String toString()\n {\n return \"Label: \" + label + \", Value: \" + value + \", List: \"+linkString()\n + \", Edges: \" + edgeString() + \", Visited: \" + visited + \", Previous: \"\n + previous.getLabel() + \", Distance From Source: \" + distanceFromSource;\n }",
"public void printGraph()\n {\n Iterator<T> nodeIterator = nodeList.keySet().iterator();\n \n while (nodeIterator.hasNext())\n {\n GraphNode curr = nodeList.get(nodeIterator.next());\n \n while (curr != null)\n {\n System.out.print(curr.nodeId+\"(\"+curr.parentDist+\")\"+\"->\");\n curr = curr.next;\n }\n System.out.print(\"Null\");\n System.out.println();\n }\n }",
"public String toString()\n\t{\n\t \n\t\tString str = vertexName + \": \" ;\n\t\tfor(int i = 0 ; i < adjacencyList.size(); i++)\n\t\t\tstr = str + adjacencyList.get(i).vertexName + \" \";\n\t\treturn str ;\n\t\t\n\t}",
"public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }",
"void printGraph();",
"public void outputForGraphviz() {\n\t\tString label = \"\";\n\t\tfor (int j = 0; j <= lastindex; j++) {\n\t\t\tif (j > 0) label += \"|\";\n\t\t\tlabel += \"<p\" + ptrs[j].myname + \">\";\n\t\t\tif (j != lastindex) label += \"|\" + String.valueOf(keys[j+1]);\n\t\t\t// Write out any link now\n\t\t\tBTree.writeOut(myname + \":p\" + ptrs[j].myname + \" -> \" + ptrs[j].myname + \"\\n\");\n\t\t\t// Tell your child to output itself\n\t\t\tptrs[j].outputForGraphviz();\n\t\t}\n\t\t// Write out this node\n\t\tBTree.writeOut(myname + \" [shape=record, label=\\\"\" + label + \"\\\"];\\n\");\n\t}",
"private void printPath(int currentVertex, int[] parents) {\n // Base case : Source node has been processed \n if (currentVertex == NO_PARENT) {\n return;\n }\n printPath(parents[currentVertex], parents);\n System.out.print(currentVertex + \" \");\n }",
"String getEdges();",
"public static void main(String[] args)\n {\n In in = new In(args[0]);\n Graph G = new Graph(in);\n\n // print out each edge (twice)\n for (int v = 0; v < G.V(); v++)\n for (int w : G.adj(v))\n System.out.println(v + \"-\" + w);\n }",
"public static void printEntireGraph(Graph g){\n \t\n \tfor(String v :g.vertexMap.keySet()){\n \t\t\n \t\tSystem.out.println(v+ ((g.vertexMap.get(v).isDown)?\" DOWN\":\"\"));\n \t\t\n \t\tfor (Edge adj :g.vertexMap.get(v).adjEdge.values()){\n \t\t\t\tSystem.out.print('\\t');\n \t\t\t\tSystem.out.print(adj.adjVertex.name+\" \");\n \t\t\t\tSystem.out.print(adj.dist+ ((adj.isDown)?\" DOWN\":\"\"));\n \t\t\t\tSystem.out.println();\n \t\t}\n \t\t\n \t}\n \t\n \t\n }",
"private String edgesLeavingVertexToString() {\n \n //make empty string\n String s = \"\";\n \n //for loop to go through all vertices; \n for (int j = 0; j < arrayOfVertices.length; j++) {\n \n //if it has any edges...\n if (arrayOfVertices[j].getDegree() > 0) {\n \n //go through its edges\n for (int k = 0; k < arrayOfVertices[j].getDegree(); k++) {\n \n //declare an array list\n ArrayList<Vertex> newArrayList = \n arrayOfVertices[j].getAdjacent();\n \n //add to string: the vertex itself + space + edge + line break\n s += j + \" \" + newArrayList.get(k).getID() + \"\\n\"; \n \n } \n } \n }\n \n //add -1, -1 after all the edges\n s += \"-1 -1\";\n \n return s; \n }",
"@Override\n\tpublic String toString() {\n\t\treturn (\"\"+label);\n\t}",
"public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"\\n\\n \\tVertice [label=\" + label + \"] \";\n\t}",
"public void visit(int i) {\r\n Vertex v = vertexList.get(i);\r\n v.isVisited = true;\r\n System.out.println(v.label);\r\n }",
"public String toString() {\n String s = \"\";\n for (Vertex v : mVertices.values()) {\n s += v + \": \";\n for (Vertex w : mAdjList.get(v)) {\n s += w + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }",
"@Override\n\tpublic String toString()\n\t{\n\t\t/* output looks like this\n\t\t * \n\t\t * 20 - 10, 30 20 has edges with 10 and 30\n\t\t * 40 - 10, 30 \t\t40 has edges with 10 and 30\n\t\t * 10 - 20, 40 \t\t\t10 has edges with 20 and 40\n\t\t * 30 - 20, 40 \t\t\t30 has edges with 20 and 40\n\t\t */\n\t\tString str = new String();\n\t\tfor(Map.Entry<Object, SinglyLinkedList> vertex : map.entrySet())\n\t\t\tstr += vertex.getKey() + \" - \" + vertex.getValue() + '\\n';\t\t\t\t\n\t\treturn str;\n\t}",
"private Set<String> getVertexContextRelevantLabels(VertexControllerContext context) {\n return Stream.ofAll(context.getBulkVertices())\n .take(1)\n .map(Element::label)\n .toJavaSet();\n }",
"public void printEdges(PrintWriter os) {\n\n\n // Implement me!\n for (String e : edges.keySet()) {\n String src = e.substring(0, 1);\n String tar = e.substring(1, 2);\n int srcInt = indexOf(e.substring(0, 1), vertices);\n int eInt = edges.get(e);\n int w = getEdgeWeight(src, tar);\n\n os.println(src + \" \" + tar + \" \" + w);\n\n }\n\n }",
"public String toString(){\n\t\treturn vertex.toString();\n\t}",
"public void printDGraph(){\n System.out.println(this.toString());\n }",
"@Override\n\tpublic String toString() {\n\t\treturn label;\n\t}",
"public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(ver + \" vertices, \" + edg + \" edges \" + NEWLINE);\n for (int v = 0; v < ver; v++) {\n s.append(String.format(\"%d: \", v));\n for (int w : adj[v]) {\n s.append(String.format(\"%d \", w));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public String toString() {\n return label;\n }",
"private void printPath( Vertex dest )\n {\n if( dest.prev != null )\n {\n printPath( dest.prev );\n // System.out.print( \" to \" );\n }\n System.out.print( dest.name +\" \" );\n }",
"public String toString()\n {\n return label;\n }",
"public String toString() {\n \tString printStatements = \"\";\n \t\n \tfor (Vertex vertex : this) {\n \t\tprintStatements += vertex + \" \";\n \t}\n \treturn printStatements;\n }",
"public static void printGraph( Graph graph ){\n\t\tint size = graph.getGraph().size();\n\t\tStringBuilder sb = new StringBuilder(); \n\t\tint weight = 0;\n\t\tfor( String start: graph.getGraph().keySet() ) {\n\t\t\tfor( String end : graph.getGraph().get(start).keySet() ) {\n\t\t\t\tweight = graph.getGraph().get(start).get(end);\n\t\t\t\tsb.append( start + end + String.valueOf(weight) + \", \" );\n\t\t\t}\n\t\t}\n\t\tsb.delete(sb.length()-2, sb.length());\n\t\tSystem.out.println(sb.toString());\n\t}",
"public abstract String edgeToStringWithDaikonInvs(int nodeSrc, int nodeDst, DaikonInvariants daikonInvs,\n Set<String> relations);",
"public void print_root(){\r\n\t\tfor(int id = 0; id < label.length; id++){\r\n\t\t\tSystem.out.printf(\"\"%d \"\", find(id));\r\n\t\t}\r\n\t\tSystem.out.printf(\"\"\\n\"\");\r\n\t}",
"@Override\n public String toString() {\n if (map == null || map.size() == 0)\n return \"\";\n StringBuilder sb = new StringBuilder();\n\n Set<String> visited = new HashSet<>();\n\n for (Map.Entry<String, Vertex> m : map.entrySet()) {\n dfs(sb, m.getKey(), m.getValue(), visited);\n }\n\n return sb.toString();\n }",
"public void printNode(){\n\t\tSystem.out.println(\"\\nCurrent neigbor: \" + serventList.size());\n\t\tfor(int i = 0;i<serventList.size();i++){\n\t\t\tServentInfo b = serventList.get(i);\n\t\t\tSystem.out.println(\"(\" + b.IP + \":\" + b.port + \"); \");\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}",
"public String toString()\r\n\t{\r\n\t\tString str = \"\";\r\n\t\t\r\n\t\tSortedSet<String> sortedVertices = new TreeSet<String>(this.getVertices());\r\n\t\t\r\n\t\tstr += \"Vertices: \" + sortedVertices.toString() + \"\\nEdges:\\n\";\r\n\t\t\r\n\t\tfor(String vertex : sortedVertices)\r\n\t\t{\r\n\t\t\tif(this.dataMap.containsKey(vertex))\r\n\t\t\t{\r\n\t\t\t\tHashMap<String,Integer> adjMap = this.adjacencyMap.get(vertex);\r\n\t\t\t\t\r\n\t\t\t\tSortedSet<String> sortedKeys = new TreeSet<String>(adjMap.keySet());\r\n\t\t\t\t\r\n\t\t\t\tstr += \"Vertex(\" + vertex + \")--->{\";\r\n\t\t\t\tfor(String adj : sortedKeys)\r\n\t\t\t\t{\r\n\t\t\t\t\tstr += adj +\"=\"+ adjMap.get(adj) +\", \";\r\n\t\t\t\t}\r\n\t\t\t\tstr = str.trim();\r\n\t\t\t\t\r\n\t\t\t\tif(!sortedKeys.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tStringBuilder s = new StringBuilder(str);\r\n\t\t\t\t\ts.deleteCharAt(str.length()-1);\r\n\t\t\t\t\tstr = s.toString();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tstr+=\"}\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn str;\r\n\t}",
"private void addVerticesToGraph()\n\t{\n\t\tString vertexName;\n\n\t\tMap<Long, IOFSwitch> switches = this.floodlightProvider.getSwitches();\n\t\tfor(IOFSwitch s :switches.values())\n\t\t{\n\t\t\tvertexName =Long.toString(s.getId());\n\t\t\tm_graph.addVertex(vertexName);\t\t\t \t\t\t \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}",
"public String toString() {\n StringBuilder s = new StringBuilder();\n String NEWLINE = System.getProperty(\"line.separator\");\n s.append(vertices + \" \" + NEWLINE);\n for (int v = 0; v < vertices; v++) {\n s.append(String.format(\"%d: \", v));\n for (Map.Entry<Integer, Integer> e : adjacent(v).entrySet()) {\n s.append(String.format(\"%d (%d) \", e.getKey(), e.getValue()));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public abstract String edgeToStringWithCnt(int nodeSrc, int nodeDst, int cnt, Set<String> relations);",
"@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"node:\\n\").append(nodeJo);\n\t\tsb.append(\"\\nedges:\\n\").append(edgesJa);\n\t\treturn sb.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \": \\\"\" + getLabel() + \"\\\"\";\n\t}",
"void printMST(int[] parent) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < VERTICES; i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph[i][parent[i]]);\n }",
"public void emit() {\n\t\tif (label != null)\n\t\t\tSystem.out.print(label + \":\");\n\n\t\tSystem.out.println(\n\t\t\t\t\"\\t\" + getOpcode() + \" \" + source1.toString() + \" => \" + source2.toString() + \" \" + dest.toString());\n\t}",
"private void colorNodeLabels() {\n for (NodeImpl n : supervisedNodes) {\n if (n.hasLabel()) {\n colorNodeLabel(n.getLabel());\n }\n }\n }",
"public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}",
"public String toString() {\n\t\tString s = \"\";\n\t\t// Loop through all the vertices and add their neighbors to a string\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\ts += this.vertices.get(i).toString() + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\\n\";\n\t\t}\n\t\ts += \"Number of Total Edges: \" + this.actualTotalEdges;\n\t\treturn s;\n\t}",
"public String toString () {\n StringBuffer s = new StringBuffer();\n for (V v: dag.keySet()) s.append(\"\\n \" + v + \" -> \" + dag.get(v));\n return s.toString(); \n }",
"public void printAdjacencyMatrix();",
"public String revealRelationshipsInX() {\n\t\tString x = \"\";\n\t\tif (this.numXVertices > 0) {\n\t\t\tint start = this.vertices.size() - this.numXVertices; // location where X vertices start\n\t\t\tfor (int i = start; i < this.vertices.size(); i++) {\n\t\t\t\t// find x_i and print it with all its neighbors\n\t\t\t\tx += this.vertices.get(i).toString() + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}",
"public abstract String edgeToStringWithNoProb(int nodeSrc, int nodeDst, Set<String> relations);",
"public void neighhbors(Village vertex) {\n\t\tIterable<Edge> neighbors = g.getNeighbors(vertex);\n\t\tSystem.out.println(\"------------\");\n\t\tSystem.out.println(\"vertex: \" + vertex.getName());\n\t\tfor(Edge e : neighbors) {\n\t\t\tSystem.out.println(\"edge: \" + e.getName());\n\t\t\tSystem.out.println(\"transit: \" + e.getTransit() + \" color: \" + e.getColor());\n\t\t}\n\t}",
"public String toString() {\n \t\t\tString string = \"\";\n \t\t\tfor (Node n : neighbors) {\n \t\t\t\tstring += n.shortName()+\" \";\n \t\t\t}\n \t\t\treturn \"Neighbours: \"+string;\n \t\t}",
"public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}",
"public void print() {\n\t\tint i = 1;\n\t\tfor (String s: g.keySet()) {\n\t\t\tSystem.out.print(\"Element: \" + i++ + \" \" + s + \" --> \");\n\t\t\tfor (String k: g.get(s)) {\n\t\t\t\tSystem.out.print(k + \" ### \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"@Override\n public String toString(){\n return \"Edge {\" + this.xyz.getX() + \",\" + this.xyz.getY() + \",\" + this.xyz.getZ() + \"} with facing \" + this.face;\n }",
"public static void printGraph(Model aGraph) {\r\n\t\tStmtIterator triples;\t\t\t\t\t//To loop through the triples\r\n\t\tStatement triple;\t\t\t\t\t\t//One of the triples\r\n\r\n\t\ttriples = aGraph.listStatements();\r\n\t\twhile (triples.hasNext()) {\r\n\t\t\ttriple = triples.next();\r\n//\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\tprintTriple(triple);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public void PrintKNeighbours() {\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tSystem.out.print(ptr.dim_weight+\" \");\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t}",
"@Override\n public final String toString() {\n final StringBuilder nodes = new StringBuilder();\n nodes.append(this.sizeNodes()).append(\" Nodes: {\");\n final StringBuilder edges = new StringBuilder();\n edges.append(this.sizeEdges()).append(\" Edges: {\");\n for (final Node<N> node : this.getNodes()) {\n nodes.append(node.toString()).append(',');\n }\n for (final Edge<N, E> edge : this.getEdges()) {\n edges.append(edge.toString()).append(',');\n }\n final String newLine = System.getProperty(\"line.separator\");\n nodes.append('}').append(newLine).append(edges).append('}').append(newLine);\n return nodes.toString();\n }",
"public void printPath(Vertex v) {\n if ( v.dist == 0 )\n return;\n printPath(v.path);\n System.out.print(\"-> \" + v.graphLoc+\" \");\n }",
"private String getLabelNodeAvl(){\n return concatLabel(this.root);\n }",
"void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }",
"public void printEdgeSet(Graph<V, Pair<V>> g, String filename)\r\n\t{\n\t\tPrintWriter writer = null;\r\n\t\ttry {\r\n\t\t\twriter = new PrintWriter(filename, \"UTF-8\");\r\n\t\t} catch (FileNotFoundException | UnsupportedEncodingException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor (Pair<V> e :g.getEdges())\r\n\t\t{\r\n\t\t\t\r\n\t\t\twriter.println(e.getFirst() + \"\\t\" + e.getSecond());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\twriter.close();\r\n\t\t\r\n\t\t\r\n\t}"
] | [
"0.728347",
"0.71666694",
"0.6925768",
"0.69068336",
"0.68868995",
"0.6791797",
"0.6762516",
"0.66989607",
"0.66834843",
"0.66052574",
"0.6586341",
"0.65670127",
"0.656309",
"0.654082",
"0.6518258",
"0.6328882",
"0.62789613",
"0.6230605",
"0.62292594",
"0.6217683",
"0.6198808",
"0.61612713",
"0.61538446",
"0.6150597",
"0.61494786",
"0.61465377",
"0.6059298",
"0.6057578",
"0.6033243",
"0.60305756",
"0.6008856",
"0.6005456",
"0.5993877",
"0.5986666",
"0.5953366",
"0.59323806",
"0.592352",
"0.5922569",
"0.59139115",
"0.58908844",
"0.5885894",
"0.5875999",
"0.58736444",
"0.58664036",
"0.5859402",
"0.58534104",
"0.58513474",
"0.584363",
"0.5843215",
"0.5837739",
"0.58150345",
"0.5805893",
"0.5804515",
"0.5800161",
"0.578365",
"0.5781101",
"0.57771367",
"0.57480115",
"0.5742435",
"0.5733249",
"0.57183737",
"0.5711413",
"0.57019",
"0.56817424",
"0.56607133",
"0.56286824",
"0.5620168",
"0.5607613",
"0.5600987",
"0.5600417",
"0.55598235",
"0.55485237",
"0.5535514",
"0.5527157",
"0.5517803",
"0.55065274",
"0.55033207",
"0.54862326",
"0.547555",
"0.5470703",
"0.54687107",
"0.54631805",
"0.54530257",
"0.5447341",
"0.5444801",
"0.5434306",
"0.5419381",
"0.538184",
"0.5376899",
"0.537682",
"0.53716063",
"0.5357125",
"0.5345986",
"0.53453165",
"0.534264",
"0.5341404",
"0.5337645",
"0.5335169",
"0.5334873",
"0.5287217"
] | 0.71913004 | 1 |
/ Print the labels of all outgoing edges from current vertex. | public void outIncidentEdges() {
for (int i = 0; i < currentVertex.outList.size(); i++) {
System.out.print(currentVertex.outList.get(i).edge + " ");
}
printLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void outAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void inIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void printEdges() {\n\t\tSystem.out.println(\"Edges\");\n\t\tIterator<Edge> i = edges.iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tEdge e = i.next();\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\t}",
"public void printEdges()\n\t{\n\t\tSystem.out.println(\"Printing all Edges:\");\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\titr.next().printAdjacent();\n\t\t}\n\t}",
"private void printGraph() {\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(v.getName() + \" DOWN\");\r\n\t\t\tsortEdges(v.adjacent);\r\n\t\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\t\t// v.adjacent.sort();\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus())\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost());\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost() + \" DOWN\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}",
"void printNodesWithEdges()\n {\n for ( int i = 0; i < this.numNodes; i++ )\n {\n Node currNode = this.nodeList.get(i);\n System.out.println(\"Node id: \" + currNode.id );\n \n int numEdges = currNode.connectedNodes.size();\n for ( int j = 0; j < numEdges; j++ )\n {\n Node currEdge = currNode.connectedNodes.get(j);\n System.out.print(currEdge.id + \",\");\n }\n\n System.out.println();\n } \n\n \n }",
"void printGraph() {\n for (Vertex u : this) {\n System.out.print(u + \": \");\n for (Edge e : u.Adj) {\n System.out.print(e);\n }\n System.out.println();\n }\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder out = new StringBuilder();\r\n\t\tMap<Integer,Integer> tmp;\r\n\t\tout.append(\"{\");\r\n\t\tfor(int i = 0; i < edges.length; i++) {\r\n\t\t\ttmp = edges[i];\r\n\t\t\tif (tmp == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor(Map.Entry entry : tmp.entrySet()) {\r\n\t\t\t\t\tif ((int)entry.getValue() == -1) {\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \")\" + \",\");\r\n\t\t\t\t} else{\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \",\" + entry.getValue() + \")\" + \",\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (out.length() > 2) {\r\n\t\tout.setLength(out.length() - 2);\r\n\t\tout.append(\")\");\r\n\t\t}\r\n\r\n\t\tout.append(\"}\");\r\n\t\treturn out.toString();\r\n\t}",
"public void printGraph() {\n\t\tStringJoiner j = new StringJoiner(\", \");\n\t\tfor(Edge e : edgeList) {\n\t\t\tj.add(e.toString());\n\t\t}\n\t\t\n\t\tSystem.out.println(j.toString());\n\t}",
"public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }",
"public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void printEdges(){\n System.out.print(\" |\");\n for(int i=0;i<size;i++)\n System.out.print(\" \"+i+\" \");\n System.out.print(\"\\n\");\n for(int i=0;i<size+1;i++)\n System.out.print(\"-------\");\n System.out.print(\"\\n\");\n for(int i=0;i<size;i++){\n System.out.print(\" \"+i+\" |\");\n for(int j=0;j<size;j++){\n System.out.print(\" \"+Matrix[i][j]+\" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"public String toString() \n {\n String NEWLINE = System.getProperty(\"line.separator\");\n StringBuilder s = new StringBuilder();\n for (int v = 0; v < V; v++) \n {\n s.append(v + \": \");\n for (DirectedEdge e : adj[v]) \n {\n \tif(e.online)\n \t{\n \t\ts.append(e + \" \");\n \t}\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public String toString() {\n \tStringBuilder s = new StringBuilder();\n \ts.append(V + \" vertices, \" + E + \" edges \" + NEWLINE);\n \tfor(int v = 0; v < V; v++) {\n \t\ts.append(v + \": \");\n \t\tfor(int w : adj[v]) {\n \t\t\ts.append(w + \" \");\n \t\t}\n \t\ts.append(NEWLINE);\n \t}\n \t\n \treturn s.toString();\n }",
"@Override\n public String toString()\n {\n StringBuilder sb = new StringBuilder();\n\n for(Vertex vertex: vertices)\n {\n sb.append(\"V: \" + vertex.toString() + '\\n');\n\n for(Edge edge: connections.get(vertex))\n {\n sb.append(\" -> \" + edge.other(vertex).toString() + \" (\" + edge.getWeight() + \")\\n\");\n }\n }\n\n return sb.toString();\n }",
"private String edgeString()\n {\n Iterator<DSAGraphEdge<E>> iter = edgeList.iterator();\n String outputString = \"\";\n DSAGraphEdge<E> edge = null;\n while (iter.hasNext())\n {\n edge = iter.next();\n outputString = (outputString + edge.getLabel() + \", \");\n }\n return outputString;\n }",
"public String toString(){\n String string = \"\" + nrVertices;\n for(DEdge edge : edges){\n string += \"\\n\" + (edge.getVertex1()) + \" \" + (edge.getVertex2());\n }\n return string;\n }",
"@Override\n public String toString()\n {\n String builder = new String();\n \tfor (V vertex : graph.keySet()){\n \t\tString strVertex = vertex.toString();\n \t\tbuilder = builder + strVertex + \": \";\n \t\tArrayList <V> edges = graph.get(vertex);\n \t\tint degree = edges.size();\n \t\tint i = 0;\n \t\tif (degree > 0){\n \t\t\twhile (i < degree -1){\n \t\t\t\tString strEdge = edges.get(i).toString();\n \t\t\t\tbuilder = builder + strEdge + \", \";\n \t\t\t\ti++;\n \t\t\t}\n \t\tString strEdge = edges.get(i).toString();\n \t\tbuilder = builder + strEdge + \"\\n\";\n\n \t\t}\n \t\telse{\n \t\t\tstrVertex = vertex.toString();\n \t\t\tbuilder = builder + strVertex + \": \\n\";\n \t\t}\n\n \t}\n \treturn builder;\n }",
"public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(name + \"=>\" + vertices.get(name).printNeighbors());\n\t\t}\n\t\tSystem.out.println(\"-------------------\");\n\t}",
"public void printEdge(){\n\t\tint count = 0;\n\t\tSystem.out.print(\"\\t\");\n\t\tfor(Edge e: edgeArray){\n\t\t\tif(count > 5){\n\t\t\t\tSystem.out.println();\n\t\t\t\tcount = 0;\n\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t}\n\t\t\tcount ++;\n\t\t\tSystem.out.printf(\"%s (%d) \", e.getVertex().getRecord(), e.getCost());\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}",
"String getEdges();",
"public void printEdges(PrintWriter os) {\n\n\n // Implement me!\n for (String e : edges.keySet()) {\n String src = e.substring(0, 1);\n String tar = e.substring(1, 2);\n int srcInt = indexOf(e.substring(0, 1), vertices);\n int eInt = edges.get(e);\n int w = getEdgeWeight(src, tar);\n\n os.println(src + \" \" + tar + \" \" + w);\n\n }\n\n }",
"public void display() {\r\n int v;\r\n Node n;\r\n \r\n for(v=1; v<=V; ++v){\r\n System.out.print(\"\\nadj[\" + toChar(v) + \"] ->\" );\r\n for(n = adj[v]; n != z; n = n.next) \r\n System.out.print(\" |\" + toChar(n.vert) + \" | \" + n.wgt + \"| ->\"); \r\n }\r\n System.out.println(\"\");\r\n }",
"public String toString() \n\t{\n\t\tString toReturn = \"\";\n\t\t\n\t\t\n\t\tfor(Vertex v : vertices) \n\t\t{\n\t\t\tHashMap<Vertex, Integer> E = getEdges(v);\n\t\t\t\n\t\t\tif(!E.isEmpty())\n\t\t\t{\n\t\t\t\ttoReturn = toReturn + v + \"(\";\n\t\t\t\tfor(Vertex edge : E.keySet()) \n\t\t\t\t{\n\t\t\t\t\ttoReturn = toReturn + edge.getName() + \", \";\n\t\t\t\t}\n\t\t\t\ttoReturn = toReturn.trim().substring(0, toReturn.length() - 2);\n\t\t\t\ttoReturn = toReturn + \")\\n\";\n\t\t\t}\n\t\t\telse {toReturn = toReturn + v + \"[]\\n\";}\n\t\t}\n\t\treturn toReturn;\n\t}",
"public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}",
"public void outputForGraphviz() {\n\t\tString label = \"\";\n\t\tfor (int j = 0; j <= lastindex; j++) {\n\t\t\tif (j > 0) label += \"|\";\n\t\t\tlabel += \"<p\" + ptrs[j].myname + \">\";\n\t\t\tif (j != lastindex) label += \"|\" + String.valueOf(keys[j+1]);\n\t\t\t// Write out any link now\n\t\t\tBTree.writeOut(myname + \":p\" + ptrs[j].myname + \" -> \" + ptrs[j].myname + \"\\n\");\n\t\t\t// Tell your child to output itself\n\t\t\tptrs[j].outputForGraphviz();\n\t\t}\n\t\t// Write out this node\n\t\tBTree.writeOut(myname + \" [shape=record, label=\\\"\" + label + \"\\\"];\\n\");\n\t}",
"@Override\n public String toString() {\n String str = \"graph [\\n\";\n\n Iterator<Node<E>> it = iterator();\n\n //Node display\n while(it.hasNext()){\n Node n = it.next();\n\n str += \"\\n\\tnode [\";\n str += \"\\n\\t\\tid \" + n;\n str += \"\\n\\t]\";\n }\n\n //Edge display\n it = iterator();\n\n while(it.hasNext()){\n Node n = it.next();\n\n Iterator<Node<E>> succsIt = n.succsOf();\n while(succsIt.hasNext()){\n Node succN = succsIt.next();\n\n str += \"\\n\\tedge [\";\n str += \"\\n\\t\\tsource \" + n;\n str += \"\\n\\t\\ttarget \" + succN;\n str += \"\\n\\t\\tlabel \\\"Edge from node \" + n + \" to node \" + succN + \" \\\"\";\n str += \"\\n\\t]\";\n }\n }\n\n str += \"\\n]\";\n\n return str;\n }",
"private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }",
"public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(ver + \" vertices, \" + edg + \" edges \" + NEWLINE);\n for (int v = 0; v < ver; v++) {\n s.append(String.format(\"%d: \", v));\n for (int w : adj[v]) {\n s.append(String.format(\"%d \", w));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"private String edgesLeavingVertexToString() {\n \n //make empty string\n String s = \"\";\n \n //for loop to go through all vertices; \n for (int j = 0; j < arrayOfVertices.length; j++) {\n \n //if it has any edges...\n if (arrayOfVertices[j].getDegree() > 0) {\n \n //go through its edges\n for (int k = 0; k < arrayOfVertices[j].getDegree(); k++) {\n \n //declare an array list\n ArrayList<Vertex> newArrayList = \n arrayOfVertices[j].getAdjacent();\n \n //add to string: the vertex itself + space + edge + line break\n s += j + \" \" + newArrayList.get(k).getID() + \"\\n\"; \n \n } \n } \n }\n \n //add -1, -1 after all the edges\n s += \"-1 -1\";\n \n return s; \n }",
"private static void printGraph(ArrayList<Vertex> graph) {\n\t\tSystem.out.print(\"---GRAPH PRINT START---\");\n\t\tfor (Vertex vertex: graph) {\n\t\t\tSystem.out.println(\"\\n\\n\" + vertex.getValue());\n\t\t\tSystem.out.print(\"Adjacent nodes: \");\n\t\t\tfor (Vertex v: vertex.getAdjacencyList()) {\n\t\t\t\tSystem.out.print(v.getValue() + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---GRAPH PRINT END---\\n\\n\");\n\t}",
"public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}",
"public Set<JmiAssocEdge> getAllOutgoingAssocEdges(JmiClassVertex vertex)\n {\n return getClassAttributes(vertex).allOutgoingAssocEdges;\n }",
"public String toString() {\n StringBuilder s = new StringBuilder();\n String NEWLINE = System.getProperty(\"line.separator\");\n s.append(vertices + \" \" + NEWLINE);\n for (int v = 0; v < vertices; v++) {\n s.append(String.format(\"%d: \", v));\n for (Map.Entry<Integer, Integer> e : adjacent(v).entrySet()) {\n s.append(String.format(\"%d (%d) \", e.getKey(), e.getValue()));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"void printGraph() {\n System.out.println(\n \"All vertices in the graph are presented below.\\n\" +\n \"Their individual edges presented after a tab. \\n\" +\n \"-------\");\n\n for (Map.Entry<Vertex, LinkedList<Vertex>> entry : verticesAndTheirEdges.entrySet()) {\n LinkedList<Vertex> adj = entry.getValue();\n System.out.println(\"Vertex: \" + entry.getKey().getName());\n for (Vertex v : adj) {\n System.out.println(\" \" + v.getName());\n }\n }\n }",
"public String toString() {\n String s = \"\";\n for (Vertex v : mVertices.values()) {\n s += v + \": \";\n for (Vertex w : mAdjList.get(v)) {\n s += w + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }",
"@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"node:\\n\").append(nodeJo);\n\t\tsb.append(\"\\nedges:\\n\").append(edgesJa);\n\t\treturn sb.toString();\n\t}",
"public String toString() {\n \t\t\tString string = \"\";\n \t\t\tfor (Node n : neighbors) {\n \t\t\t\tstring += n.shortName()+\" \";\n \t\t\t}\n \t\t\treturn \"Neighbours: \"+string;\n \t\t}",
"public String toString()\r\n\t{\r\n\t\tString str = \"\";\r\n\t\t\r\n\t\tSortedSet<String> sortedVertices = new TreeSet<String>(this.getVertices());\r\n\t\t\r\n\t\tstr += \"Vertices: \" + sortedVertices.toString() + \"\\nEdges:\\n\";\r\n\t\t\r\n\t\tfor(String vertex : sortedVertices)\r\n\t\t{\r\n\t\t\tif(this.dataMap.containsKey(vertex))\r\n\t\t\t{\r\n\t\t\t\tHashMap<String,Integer> adjMap = this.adjacencyMap.get(vertex);\r\n\t\t\t\t\r\n\t\t\t\tSortedSet<String> sortedKeys = new TreeSet<String>(adjMap.keySet());\r\n\t\t\t\t\r\n\t\t\t\tstr += \"Vertex(\" + vertex + \")--->{\";\r\n\t\t\t\tfor(String adj : sortedKeys)\r\n\t\t\t\t{\r\n\t\t\t\t\tstr += adj +\"=\"+ adjMap.get(adj) +\", \";\r\n\t\t\t\t}\r\n\t\t\t\tstr = str.trim();\r\n\t\t\t\t\r\n\t\t\t\tif(!sortedKeys.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tStringBuilder s = new StringBuilder(str);\r\n\t\t\t\t\ts.deleteCharAt(str.length()-1);\r\n\t\t\t\t\tstr = s.toString();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tstr+=\"}\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn str;\r\n\t}",
"public String toString() {\n\t\tString s = \"\";\n\t\t// Loop through all the vertices and add their neighbors to a string\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\ts += this.vertices.get(i).toString() + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\\n\";\n\t\t}\n\t\ts += \"Number of Total Edges: \" + this.actualTotalEdges;\n\t\treturn s;\n\t}",
"public static void printEntireGraph(Graph g){\n \t\n \tfor(String v :g.vertexMap.keySet()){\n \t\t\n \t\tSystem.out.println(v+ ((g.vertexMap.get(v).isDown)?\" DOWN\":\"\"));\n \t\t\n \t\tfor (Edge adj :g.vertexMap.get(v).adjEdge.values()){\n \t\t\t\tSystem.out.print('\\t');\n \t\t\t\tSystem.out.print(adj.adjVertex.name+\" \");\n \t\t\t\tSystem.out.print(adj.dist+ ((adj.isDown)?\" DOWN\":\"\"));\n \t\t\t\tSystem.out.println();\n \t\t}\n \t\t\n \t}\n \t\n \t\n }",
"public static void printGraph(Graph g) {\r\n\t\tfor (int i = 0; i < g.V; i++) {\r\n\t\t\tSystem.out.print(\"Vertex \" + i + \": \");\r\n\t\t\t\r\n\t\t\tif (g.L.get(i).size() > 0) {\r\n\t\t\t\tSystem.out.print(g.L.get(i).get(0).printEdge());\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (int r = 1; r < g.L.get(i).size(); r++) {\r\n\t\t\t\tSystem.out.print(\", \" + g.L.get(i).get(r).printEdge());\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public abstract String edgeToStringWithNoProb(int nodeSrc, int nodeDst, Set<String> relations);",
"@Override\n\tpublic String toString()\n\t{\n\t\t/* output looks like this\n\t\t * \n\t\t * 20 - 10, 30 20 has edges with 10 and 30\n\t\t * 40 - 10, 30 \t\t40 has edges with 10 and 30\n\t\t * 10 - 20, 40 \t\t\t10 has edges with 20 and 40\n\t\t * 30 - 20, 40 \t\t\t30 has edges with 20 and 40\n\t\t */\n\t\tString str = new String();\n\t\tfor(Map.Entry<Object, SinglyLinkedList> vertex : map.entrySet())\n\t\t\tstr += vertex.getKey() + \" - \" + vertex.getValue() + '\\n';\t\t\t\t\n\t\treturn str;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"\\n\\n \\tVertice [label=\" + label + \"] \";\n\t}",
"public void display() {\n\t\t\n\t\tint u,v;\n\t\t\n\t\tfor(v=1; v<=V; ++v) {\n\t\t\t\n\t\t\tSystem.out.print(\"\\nadj[\" + v + \"] = \");\n\t\t\t\n\t\t\tfor(u = 1 ; u <= V; ++u) {\n\t\t\t\t \n\t\t\t\tSystem.out.print(\" \" + adj[u][v]);\n\t\t\t}\n\t\t} \n\t\tSystem.out.println(\"\");\n\t}",
"public void print (){\r\n for (int i = 0; i < graph.size(); ++i){\r\n graph.get(i).print();\r\n }\r\n }",
"public abstract String edgeToStringWithCnt(int nodeSrc, int nodeDst, int cnt, Set<String> relations);",
"public void findEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"public void printDGraph(){\n System.out.println(this.toString());\n }",
"@Override\n public String toString() {\n if (map == null || map.size() == 0)\n return \"\";\n StringBuilder sb = new StringBuilder();\n\n Set<String> visited = new HashSet<>();\n\n for (Map.Entry<String, Vertex> m : map.entrySet()) {\n dfs(sb, m.getKey(), m.getValue(), visited);\n }\n\n return sb.toString();\n }",
"void printGraph();",
"public void print() {\n\t\tfor (int count = 0; count < adjacencyList.length; count++) {\n\t\t\tLinkedList<Integer> edges = adjacencyList[count];\n\t\t\tSystem.out.println(\"Adjacency list for \" + count);\n\n\t\t\tSystem.out.print(\"head\");\n\t\t\tfor (Integer edge : edges) {\n\t\t\t\tSystem.out.print(\" -> \" + edge);\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public String toString()\n {\n return \"Label: \" + label + \", Value: \" + value + \", List: \"+linkString()\n + \", Edges: \" + edgeString() + \", Visited: \" + visited + \", Previous: \"\n + previous.getLabel() + \", Distance From Source: \" + distanceFromSource;\n }",
"public String toString() {\n \tString printStatements = \"\";\n \t\n \tfor (Vertex vertex : this) {\n \t\tprintStatements += vertex + \" \";\n \t}\n \treturn printStatements;\n }",
"public String toString()\n\t{\n\t \n\t\tString str = vertexName + \": \" ;\n\t\tfor(int i = 0 ; i < adjacencyList.size(); i++)\n\t\t\tstr = str + adjacencyList.get(i).vertexName + \" \";\n\t\treturn str ;\n\t\t\n\t}",
"public String getEdges(){\n double Lx = super.getCentre().x - (this.length / 2);\r\n double Rx = super.getCentre().x + (this.length / 2);\r\n double Dy = super.getCentre().y - (this.width / 2);\r\n double Uy = super.getCentre().y + (this.width / 2);\r\n Point UL = new Point(Lx, Uy);\r\n Point UR = new Point(Rx, Uy);\r\n Point DL = new Point(Lx, Dy);\r\n Point DR = new Point(Rx, Dy);\r\n Point[] Edges = {DL, UL, UR, DR};\r\n this.edge = Edges;\r\n return Arrays.toString(Edges);\r\n }",
"static void showGraph(ArrayList<ArrayList<Integer>> graph) {\n for(int i=0;i< graph.size(); i++ ){\n System.out.print(\"Vertex : \" + i + \" : \");\n for(int j = 0; j < graph.get(i).size(); j++) {\n System.out.print(\" -> \"+ graph.get(i).get(j));\n }\n }\n }",
"public String toString(){\n\t\treturn vertex.toString();\n\t}",
"public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }",
"public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}",
"public String getOutput() {\n TopologicalOrderIterator<String, DefaultEdge> iterator =\n new TopologicalOrderIterator<>(steps, Comparator.comparing((String x) -> x));\n\n // Traverse the DAG and store each vertex to a StringBuilder\n // to output once traversal is completed\n StringBuilder sb = new StringBuilder();\n while (iterator.hasNext()) {\n sb.append(iterator.next());\n }\n\n return sb.toString();\n }",
"private void printPath( Vertex dest )\n {\n if( dest.prev != null )\n {\n printPath( dest.prev );\n // System.out.print( \" to \" );\n }\n System.out.print( dest.name +\" \" );\n }",
"public void dotGraph(BufferedWriter out) throws IOException {\n out.write(\"digraph \\\"\"+this.method+\"\\\" {\\n\");\n IndexMap m = new IndexMap(\"MethodCallMap\");\n for (Iterator i=nodeIterator(); i.hasNext(); ) {\n Node n = (Node) i.next();\n out.write(\"n\"+n.id+\" [label=\\\"\"+n.toString_short()+\"\\\"];\\n\");\n }\n for (Iterator i=getCalls().iterator(); i.hasNext(); ) {\n ProgramLocation mc = (ProgramLocation) i.next();\n int k = m.get(mc);\n out.write(\"mc\"+k+\" [label=\\\"\"+mc+\"\\\"];\\n\");\n }\n for (Iterator i=nodeIterator(); i.hasNext(); ) {\n Node n = (Node) i.next();\n for (Iterator j=n.getNonEscapingEdges().iterator(); j.hasNext(); ) {\n Map.Entry e = (Map.Entry) j.next();\n String fieldName = \"\"+e.getKey();\n Iterator k;\n if (e.getValue() instanceof Set) k = ((Set)e.getValue()).iterator();\n else k = Collections.singleton(e.getValue()).iterator();\n while (k.hasNext()) {\n Node n2 = (Node) k.next();\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"\"+fieldName+\"\\\"];\\n\");\n }\n }\n for (Iterator j=n.getAccessPathEdges().iterator(); j.hasNext(); ) {\n Map.Entry e = (Map.Entry) j.next();\n String fieldName = \"\"+e.getKey();\n Iterator k;\n if (e.getValue() instanceof Set) k = ((Set)e.getValue()).iterator();\n else k = Collections.singleton(e.getValue()).iterator();\n while (k.hasNext()) {\n Node n2 = (Node) k.next();\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"\"+fieldName+\"\\\",style=dashed];\\n\");\n }\n }\n if (n.getPassedParameters() != null) {\n for (Iterator j=n.getPassedParameters().iterator(); j.hasNext(); ) {\n PassedParameter pp = (PassedParameter) j.next();\n int k = m.get(pp.m);\n out.write(\"n\"+n.id+\" -> mc\"+k+\" [label=\\\"p\"+pp.paramNum+\"\\\",style=dotted];\\n\");\n }\n }\n if (n instanceof ReturnedNode) {\n ReturnedNode rn = (ReturnedNode) n;\n int k = m.get(rn.m);\n out.write(\"mc\"+k+\" -> n\"+n.id+\" [label=\\\"r\\\",style=dotted];\\n\");\n }\n }\n for (Iterator i=castMap.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry) i.next();\n Node n = (Node)((Pair)e.getKey()).left;\n Node n2 = (Node)e.getValue();\n if (nodes.containsKey(n2))\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"(cast)\\\"];\\n\");\n }\n out.write(\"}\\n\");\n }",
"public abstract String edgeToStringWithDaikonInvs(int nodeSrc, int nodeDst, DaikonInvariants daikonInvs,\n Set<String> relations);",
"public void getInfo() {\n System.out.println(\"INFO Node : \"+address+ \" connected to nodes \");\n for(Node node : getConnectedNodes()){\n System.out.print(\"Node :\"+node.getAddress()+\" with edge : \");\n getEdge(this, node).printEdge();\n }\n \n }",
"public static void printGraph( Graph graph ){\n\t\tint size = graph.getGraph().size();\n\t\tStringBuilder sb = new StringBuilder(); \n\t\tint weight = 0;\n\t\tfor( String start: graph.getGraph().keySet() ) {\n\t\t\tfor( String end : graph.getGraph().get(start).keySet() ) {\n\t\t\t\tweight = graph.getGraph().get(start).get(end);\n\t\t\t\tsb.append( start + end + String.valueOf(weight) + \", \" );\n\t\t\t}\n\t\t}\n\t\tsb.delete(sb.length()-2, sb.length());\n\t\tSystem.out.println(sb.toString());\n\t}",
"@Override\n public final String toString() {\n final StringBuilder nodes = new StringBuilder();\n nodes.append(this.sizeNodes()).append(\" Nodes: {\");\n final StringBuilder edges = new StringBuilder();\n edges.append(this.sizeEdges()).append(\" Edges: {\");\n for (final Node<N> node : this.getNodes()) {\n nodes.append(node.toString()).append(',');\n }\n for (final Edge<N, E> edge : this.getEdges()) {\n edges.append(edge.toString()).append(',');\n }\n final String newLine = System.getProperty(\"line.separator\");\n nodes.append('}').append(newLine).append(edges).append('}').append(newLine);\n return nodes.toString();\n }",
"public void printGraph()\n {\n Iterator<T> nodeIterator = nodeList.keySet().iterator();\n \n while (nodeIterator.hasNext())\n {\n GraphNode curr = nodeList.get(nodeIterator.next());\n \n while (curr != null)\n {\n System.out.print(curr.nodeId+\"(\"+curr.parentDist+\")\"+\"->\");\n curr = curr.next;\n }\n System.out.print(\"Null\");\n System.out.println();\n }\n }",
"public String toString () {\n StringBuffer s = new StringBuffer();\n for (V v: dag.keySet()) s.append(\"\\n \" + v + \" -> \" + dag.get(v));\n return s.toString(); \n }",
"@Override\n\tpublic void processNode(DirectedGraphNode node) {\n\t\tSystem.out.print(node.getLabel()+\" \");\n\t}",
"public Enumeration directedEdges();",
"int[] getOutEdges(int... nodes);",
"public static void main(String[] args)\n {\n In in = new In(args[0]);\n Graph G = new Graph(in);\n\n // print out each edge (twice)\n for (int v = 0; v < G.V(); v++)\n for (int w : G.adj(v))\n System.out.println(v + \"-\" + w);\n }",
"public void printAdjacencyList() {\n \n for ( int i=0; i<vertex_adjacency_list.size(); i++ ) {\n \n vertex_adjacency_list.get( i ).printVertex();\n \n }\n \n }",
"@Override\n\tpublic String toString() {\n\t\treturn (\"\"+label);\n\t}",
"public void printEdgeSet(Graph<V, Pair<V>> g, String filename)\r\n\t{\n\t\tPrintWriter writer = null;\r\n\t\ttry {\r\n\t\t\twriter = new PrintWriter(filename, \"UTF-8\");\r\n\t\t} catch (FileNotFoundException | UnsupportedEncodingException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor (Pair<V> e :g.getEdges())\r\n\t\t{\r\n\t\t\t\r\n\t\t\twriter.println(e.getFirst() + \"\\t\" + e.getSecond());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\twriter.close();\r\n\t\t\r\n\t\t\r\n\t}",
"public abstract String edgeToStringWithProb(int nodeSrc, int nodeDst, double prob, Set<String> relations);",
"Map<Node, Edge> getOutEdges() {\n return outEdges;\n }",
"public Enumeration undirectedEdges();",
"void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }",
"public void neighhbors(Village vertex) {\n\t\tIterable<Edge> neighbors = g.getNeighbors(vertex);\n\t\tSystem.out.println(\"------------\");\n\t\tSystem.out.println(\"vertex: \" + vertex.getName());\n\t\tfor(Edge e : neighbors) {\n\t\t\tSystem.out.println(\"edge: \" + e.getName());\n\t\t\tSystem.out.println(\"transit: \" + e.getTransit() + \" color: \" + e.getColor());\n\t\t}\n\t}",
"public String toString()\n {\n\treturn adjLists.toString();\n }",
"void setEdgeLabel(int edge, String label);",
"@Override\n public String toString(){\n return \"Edge {\" + this.xyz.getX() + \",\" + this.xyz.getY() + \",\" + this.xyz.getZ() + \"} with facing \" + this.face;\n }",
"public String toString(){\n String s = \"\";\n s += \"\\t\";\n \n for (int i = 0; i < n; i++){\n // adding vertices for columns\n s += vertices[i] + \"\\t\";\n }\n \n s += \"\\n\";\n \n for (int i = 0; i < n; i++){\n s += vertices[i] + \"\\t\"; // vertex for row\n for (int j = 0; j < n; j++){\n s += edges[j][i] + \"\\t\"; // adding edges across row\n }\n s += \"\\n\";\n }\n \n return s;\n }",
"public String toDotString() {\n StringBuilder builder = new StringBuilder();\n builder.append(\"digraph {\\n\");\n\n for (Connection connection : connections) {\n for (ConnectionEndPoint output : connection.outputs) {\n String edge = String.format(\" %s -> %s [label=\\\"%s\\\"];\\n\",\n connection.input.getStageName(), output.getStageName(), connection.getName());\n builder.append(edge);\n }\n }\n\n for (Stage stage : stages.values()) {\n builder.append(String.format(\" %s;\\n\", stage.name));\n }\n\n builder.append(\"}\\n\");\n return builder.toString();\n }",
"public void printAdjacencyMatrix();",
"public String toString()\r\n/* 112: */ {\r\n/* 113:199 */ String s = \"\";\r\n/* 114:200 */ for (N node : getNodes())\r\n/* 115: */ {\r\n/* 116:201 */ s = s + \"\\n{ \" + node + \" \";\r\n/* 117:202 */ for (N suc : getSuccessors(node)) {\r\n/* 118:203 */ s = s + \"\\n ( \" + getEdge(node, suc) + \" \" + suc + \" )\";\r\n/* 119: */ }\r\n/* 120:205 */ s = s + \"\\n} \";\r\n/* 121: */ }\r\n/* 122:207 */ return s;\r\n/* 123: */ }",
"void printPath(Coordinate endName) {\n if (!graph.containsKey(endName)) {\n // test use, display point\n // System.err.printf(\"Graph doesn't contain end vertex \\\"%s\\\"\\n\", endName);\n return;\n }\n graph.get(endName).printPath();\n }",
"private void printPath(LinkedList<String> visited) {\r\n\r\n if (flag == false) {\r\n System.out.println(\"Yes there exists a path between \" + START + \" and \" + END);\r\n }\r\n for (String node : visited) { //creating for loop to print the nodes stored in visited array \r\n System.out.print(node);\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n }",
"@Override\n\tpublic String toString() {\n\t\tString out = new String();\n\t\tfor (int i = 0; i < this.maxNumVertices; i++) {\n\t\t\tfor (int j = 0; j < this.maxNumVertices; j++) {\n\t\t\t\tout = out + this.reachabilityMatrix[i][j] + \" \";\n\t\t\t}\n\t\t\tout = out + \"\\n\";\n\t\t}\n\t\treturn out;\n\t}",
"public abstract String getEdgeSymbol(int vertexIndex, int otherVertexIndex);",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder(\"WeightedGraph: \");\n for (int i = 0; i < getSize(); i++) {\n sb.append(getVertex(i) + \"[\" + i + \"]:{\");\n for (Edge e : neighbors.get(i)) {\n sb.append(\"{\" + e.getVert1() + \",\" + e.getVert2() + \",\" + ((WeightedEdge) e).getWeight() + \"}\");\n }\n sb.append(\"\\n\");\n }\n return sb.toString();\n }",
"public String toString() {\r\n\t\tString s = \"\";\r\n\t\t\r\n\t\tfor ( IntNode i = this; i!= null; i = i.link ) {\r\n\t\t\tif (i.link == null)\r\n\t\t\t\ts = s + i.data;\r\n\t\t\telse\r\n\t\t\t\ts = s + i.data + \"->\";\r\n\t\t} // end for\r\n\t\t\r\n\t\treturn s;\r\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn label;\n\t}",
"public String toString()\n {\n return label;\n }"
] | [
"0.7109356",
"0.68756795",
"0.6850605",
"0.6809067",
"0.6734066",
"0.67262775",
"0.6616089",
"0.66052425",
"0.6593291",
"0.65877",
"0.6575377",
"0.6515346",
"0.64921695",
"0.64900905",
"0.6438033",
"0.640261",
"0.63866",
"0.6379",
"0.637627",
"0.63753533",
"0.6372398",
"0.6368631",
"0.6341677",
"0.6336793",
"0.6317229",
"0.6216664",
"0.6211705",
"0.6160333",
"0.61447144",
"0.61175025",
"0.60682577",
"0.60463405",
"0.60184103",
"0.60134184",
"0.60035294",
"0.598117",
"0.59483504",
"0.5942819",
"0.593647",
"0.5929729",
"0.5910468",
"0.59104663",
"0.5907118",
"0.59059155",
"0.59004766",
"0.59003574",
"0.5897811",
"0.5891329",
"0.5884701",
"0.58727086",
"0.5819913",
"0.5818458",
"0.5811968",
"0.58067954",
"0.5797218",
"0.57952756",
"0.5784081",
"0.5777253",
"0.576804",
"0.57558244",
"0.57514626",
"0.57337725",
"0.57227814",
"0.5708345",
"0.5702444",
"0.5691625",
"0.56872064",
"0.5683147",
"0.567881",
"0.5673932",
"0.5673199",
"0.5669073",
"0.56683093",
"0.5664361",
"0.5655806",
"0.56021976",
"0.5590265",
"0.55725193",
"0.55426943",
"0.55415946",
"0.5540648",
"0.5538634",
"0.55321926",
"0.55261725",
"0.55255914",
"0.5524668",
"0.5523871",
"0.55047566",
"0.54859746",
"0.5479647",
"0.54716915",
"0.54538727",
"0.54480326",
"0.5423473",
"0.54170895",
"0.5399458",
"0.5398338",
"0.5393777",
"0.5393402",
"0.539218"
] | 0.73081505 | 0 |
/ Print the labels of all vertices at other endpoint of incoming edges to current vertex. | public void inAdjacentVertices() {
for (int i = 0; i < currentVertex.inList.size(); i++) {
System.out.print(currentVertex.inList.get(i).vertex.label + " ");
}
printLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void outAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}",
"public void inIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void outIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}",
"public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}",
"void printNodesWithEdges()\n {\n for ( int i = 0; i < this.numNodes; i++ )\n {\n Node currNode = this.nodeList.get(i);\n System.out.println(\"Node id: \" + currNode.id );\n \n int numEdges = currNode.connectedNodes.size();\n for ( int j = 0; j < numEdges; j++ )\n {\n Node currEdge = currNode.connectedNodes.get(j);\n System.out.print(currEdge.id + \",\");\n }\n\n System.out.println();\n } \n\n \n }",
"void printGraph() {\n for (Vertex u : this) {\n System.out.print(u + \": \");\n for (Edge e : u.Adj) {\n System.out.print(e);\n }\n System.out.println();\n }\n }",
"private void printGraph() {\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(v.getName() + \" DOWN\");\r\n\t\t\tsortEdges(v.adjacent);\r\n\t\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\t\t// v.adjacent.sort();\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus())\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost());\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost() + \" DOWN\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(name + \"=>\" + vertices.get(name).printNeighbors());\n\t\t}\n\t\tSystem.out.println(\"-------------------\");\n\t}",
"public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }",
"public void printEdges()\n\t{\n\t\tSystem.out.println(\"Printing all Edges:\");\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\titr.next().printAdjacent();\n\t\t}\n\t}",
"@Override\n public String toString()\n {\n StringBuilder sb = new StringBuilder();\n\n for(Vertex vertex: vertices)\n {\n sb.append(\"V: \" + vertex.toString() + '\\n');\n\n for(Edge edge: connections.get(vertex))\n {\n sb.append(\" -> \" + edge.other(vertex).toString() + \" (\" + edge.getWeight() + \")\\n\");\n }\n }\n\n return sb.toString();\n }",
"public void printEdges() {\n\t\tSystem.out.println(\"Edges\");\n\t\tIterator<Edge> i = edges.iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tEdge e = i.next();\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\t}",
"public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void printGraph() {\n\t\tStringJoiner j = new StringJoiner(\", \");\n\t\tfor(Edge e : edgeList) {\n\t\t\tj.add(e.toString());\n\t\t}\n\t\t\n\t\tSystem.out.println(j.toString());\n\t}",
"static void showGraph(ArrayList<ArrayList<Integer>> graph) {\n for(int i=0;i< graph.size(); i++ ){\n System.out.print(\"Vertex : \" + i + \" : \");\n for(int j = 0; j < graph.get(i).size(); j++) {\n System.out.print(\" -> \"+ graph.get(i).get(j));\n }\n }\n }",
"private void printPath(int currentVertex, int[] parents) {\n // Base case : Source node has been processed \n if (currentVertex == NO_PARENT) {\n return;\n }\n printPath(parents[currentVertex], parents);\n System.out.print(currentVertex + \" \");\n }",
"public void display() {\r\n int v;\r\n Node n;\r\n \r\n for(v=1; v<=V; ++v){\r\n System.out.print(\"\\nadj[\" + toChar(v) + \"] ->\" );\r\n for(n = adj[v]; n != z; n = n.next) \r\n System.out.print(\" |\" + toChar(n.vert) + \" | \" + n.wgt + \"| ->\"); \r\n }\r\n System.out.println(\"\");\r\n }",
"private void printPath( Vertex dest )\n {\n if( dest.prev != null )\n {\n printPath( dest.prev );\n // System.out.print( \" to \" );\n }\n System.out.print( dest.name +\" \" );\n }",
"private Set<String> getVertexContextRelevantLabels(VertexControllerContext context) {\n return Stream.ofAll(context.getBulkVertices())\n .take(1)\n .map(Element::label)\n .toJavaSet();\n }",
"private static void printGraph(ArrayList<Vertex> graph) {\n\t\tSystem.out.print(\"---GRAPH PRINT START---\");\n\t\tfor (Vertex vertex: graph) {\n\t\t\tSystem.out.println(\"\\n\\n\" + vertex.getValue());\n\t\t\tSystem.out.print(\"Adjacent nodes: \");\n\t\t\tfor (Vertex v: vertex.getAdjacencyList()) {\n\t\t\t\tSystem.out.print(v.getValue() + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---GRAPH PRINT END---\\n\\n\");\n\t}",
"void printGraph() {\n System.out.println(\n \"All vertices in the graph are presented below.\\n\" +\n \"Their individual edges presented after a tab. \\n\" +\n \"-------\");\n\n for (Map.Entry<Vertex, LinkedList<Vertex>> entry : verticesAndTheirEdges.entrySet()) {\n LinkedList<Vertex> adj = entry.getValue();\n System.out.println(\"Vertex: \" + entry.getKey().getName());\n for (Vertex v : adj) {\n System.out.println(\" \" + v.getName());\n }\n }\n }",
"public static void main(String[] args)\n {\n In in = new In(args[0]);\n Graph G = new Graph(in);\n\n // print out each edge (twice)\n for (int v = 0; v < G.V(); v++)\n for (int w : G.adj(v))\n System.out.println(v + \"-\" + w);\n }",
"public void outputForGraphviz() {\n\t\tString label = \"\";\n\t\tfor (int j = 0; j <= lastindex; j++) {\n\t\t\tif (j > 0) label += \"|\";\n\t\t\tlabel += \"<p\" + ptrs[j].myname + \">\";\n\t\t\tif (j != lastindex) label += \"|\" + String.valueOf(keys[j+1]);\n\t\t\t// Write out any link now\n\t\t\tBTree.writeOut(myname + \":p\" + ptrs[j].myname + \" -> \" + ptrs[j].myname + \"\\n\");\n\t\t\t// Tell your child to output itself\n\t\t\tptrs[j].outputForGraphviz();\n\t\t}\n\t\t// Write out this node\n\t\tBTree.writeOut(myname + \" [shape=record, label=\\\"\" + label + \"\\\"];\\n\");\n\t}",
"public String toString(){\n String string = \"\" + nrVertices;\n for(DEdge edge : edges){\n string += \"\\n\" + (edge.getVertex1()) + \" \" + (edge.getVertex2());\n }\n return string;\n }",
"private String edgesLeavingVertexToString() {\n \n //make empty string\n String s = \"\";\n \n //for loop to go through all vertices; \n for (int j = 0; j < arrayOfVertices.length; j++) {\n \n //if it has any edges...\n if (arrayOfVertices[j].getDegree() > 0) {\n \n //go through its edges\n for (int k = 0; k < arrayOfVertices[j].getDegree(); k++) {\n \n //declare an array list\n ArrayList<Vertex> newArrayList = \n arrayOfVertices[j].getAdjacent();\n \n //add to string: the vertex itself + space + edge + line break\n s += j + \" \" + newArrayList.get(k).getID() + \"\\n\"; \n \n } \n } \n }\n \n //add -1, -1 after all the edges\n s += \"-1 -1\";\n \n return s; \n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"\\n\\n \\tVertice [label=\" + label + \"] \";\n\t}",
"public void printEdge(){\n\t\tint count = 0;\n\t\tSystem.out.print(\"\\t\");\n\t\tfor(Edge e: edgeArray){\n\t\t\tif(count > 5){\n\t\t\t\tSystem.out.println();\n\t\t\t\tcount = 0;\n\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t}\n\t\t\tcount ++;\n\t\t\tSystem.out.printf(\"%s (%d) \", e.getVertex().getRecord(), e.getCost());\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void printGraph()\n {\n Iterator<T> nodeIterator = nodeList.keySet().iterator();\n \n while (nodeIterator.hasNext())\n {\n GraphNode curr = nodeList.get(nodeIterator.next());\n \n while (curr != null)\n {\n System.out.print(curr.nodeId+\"(\"+curr.parentDist+\")\"+\"->\");\n curr = curr.next;\n }\n System.out.print(\"Null\");\n System.out.println();\n }\n }",
"public String revealRelationshipsInX() {\n\t\tString x = \"\";\n\t\tif (this.numXVertices > 0) {\n\t\t\tint start = this.vertices.size() - this.numXVertices; // location where X vertices start\n\t\t\tfor (int i = start; i < this.vertices.size(); i++) {\n\t\t\t\t// find x_i and print it with all its neighbors\n\t\t\t\tx += this.vertices.get(i).toString() + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}",
"void setEdgeLabel(int edge, String label);",
"public void display() {\n\t\t\n\t\tint u,v;\n\t\t\n\t\tfor(v=1; v<=V; ++v) {\n\t\t\t\n\t\t\tSystem.out.print(\"\\nadj[\" + v + \"] = \");\n\t\t\t\n\t\t\tfor(u = 1 ; u <= V; ++u) {\n\t\t\t\t \n\t\t\t\tSystem.out.print(\" \" + adj[u][v]);\n\t\t\t}\n\t\t} \n\t\tSystem.out.println(\"\");\n\t}",
"public void print (){\r\n for (int i = 0; i < graph.size(); ++i){\r\n graph.get(i).print();\r\n }\r\n }",
"public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}",
"public void print() {\n\t\tfor (int count = 0; count < adjacencyList.length; count++) {\n\t\t\tLinkedList<Integer> edges = adjacencyList[count];\n\t\t\tSystem.out.println(\"Adjacency list for \" + count);\n\n\t\t\tSystem.out.print(\"head\");\n\t\t\tfor (Integer edge : edges) {\n\t\t\t\tSystem.out.print(\" -> \" + edge);\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void getInfo() {\n System.out.println(\"INFO Node : \"+address+ \" connected to nodes \");\n for(Node node : getConnectedNodes()){\n System.out.print(\"Node :\"+node.getAddress()+\" with edge : \");\n getEdge(this, node).printEdge();\n }\n \n }",
"public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}",
"public String toString() \n\t{\n\t\tString toReturn = \"\";\n\t\t\n\t\t\n\t\tfor(Vertex v : vertices) \n\t\t{\n\t\t\tHashMap<Vertex, Integer> E = getEdges(v);\n\t\t\t\n\t\t\tif(!E.isEmpty())\n\t\t\t{\n\t\t\t\ttoReturn = toReturn + v + \"(\";\n\t\t\t\tfor(Vertex edge : E.keySet()) \n\t\t\t\t{\n\t\t\t\t\ttoReturn = toReturn + edge.getName() + \", \";\n\t\t\t\t}\n\t\t\t\ttoReturn = toReturn.trim().substring(0, toReturn.length() - 2);\n\t\t\t\ttoReturn = toReturn + \")\\n\";\n\t\t\t}\n\t\t\telse {toReturn = toReturn + v + \"[]\\n\";}\n\t\t}\n\t\treturn toReturn;\n\t}",
"public String toString() \n {\n String NEWLINE = System.getProperty(\"line.separator\");\n StringBuilder s = new StringBuilder();\n for (int v = 0; v < V; v++) \n {\n s.append(v + \": \");\n for (DirectedEdge e : adj[v]) \n {\n \tif(e.online)\n \t{\n \t\ts.append(e + \" \");\n \t}\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public void printEdges(PrintWriter os) {\n\n\n // Implement me!\n for (String e : edges.keySet()) {\n String src = e.substring(0, 1);\n String tar = e.substring(1, 2);\n int srcInt = indexOf(e.substring(0, 1), vertices);\n int eInt = edges.get(e);\n int w = getEdgeWeight(src, tar);\n\n os.println(src + \" \" + tar + \" \" + w);\n\n }\n\n }",
"public void printEdges(){\n System.out.print(\" |\");\n for(int i=0;i<size;i++)\n System.out.print(\" \"+i+\" \");\n System.out.print(\"\\n\");\n for(int i=0;i<size+1;i++)\n System.out.print(\"-------\");\n System.out.print(\"\\n\");\n for(int i=0;i<size;i++){\n System.out.print(\" \"+i+\" |\");\n for(int j=0;j<size;j++){\n System.out.print(\" \"+Matrix[i][j]+\" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"public void printAdjacencyList() {\n \n for ( int i=0; i<vertex_adjacency_list.size(); i++ ) {\n \n vertex_adjacency_list.get( i ).printVertex();\n \n }\n \n }",
"private String edgeString()\n {\n Iterator<DSAGraphEdge<E>> iter = edgeList.iterator();\n String outputString = \"\";\n DSAGraphEdge<E> edge = null;\n while (iter.hasNext())\n {\n edge = iter.next();\n outputString = (outputString + edge.getLabel() + \", \");\n }\n return outputString;\n }",
"public String toString()\n {\n return \"Label: \" + label + \", Value: \" + value + \", List: \"+linkString()\n + \", Edges: \" + edgeString() + \", Visited: \" + visited + \", Previous: \"\n + previous.getLabel() + \", Distance From Source: \" + distanceFromSource;\n }",
"public void findEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"public String toString() {\n \tStringBuilder s = new StringBuilder();\n \ts.append(V + \" vertices, \" + E + \" edges \" + NEWLINE);\n \tfor(int v = 0; v < V; v++) {\n \t\ts.append(v + \": \");\n \t\tfor(int w : adj[v]) {\n \t\t\ts.append(w + \" \");\n \t\t}\n \t\ts.append(NEWLINE);\n \t}\n \t\n \treturn s.toString();\n }",
"public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}",
"@Override\n\tpublic void processNode(DirectedGraphNode node) {\n\t\tSystem.out.print(node.getLabel()+\" \");\n\t}",
"public void printPath(ArrayList<Integer> parent, int index, Graph graph){\n if (parent.get(index)==-1)\r\n return;\r\n\r\n //recurse till we get src\r\n printPath(parent, parent.get(index), graph);\r\n shortestVerticesToPlot.add(graph.vertices.get(index).point);\r\n\r\n System.out.print(index + \"\\t\\t\");\r\n }",
"public static void printGraph(Graph g) {\r\n\t\tfor (int i = 0; i < g.V; i++) {\r\n\t\t\tSystem.out.print(\"Vertex \" + i + \": \");\r\n\t\t\t\r\n\t\t\tif (g.L.get(i).size() > 0) {\r\n\t\t\t\tSystem.out.print(g.L.get(i).get(0).printEdge());\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (int r = 1; r < g.L.get(i).size(); r++) {\r\n\t\t\t\tSystem.out.print(\", \" + g.L.get(i).get(r).printEdge());\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"void printPath(Coordinate endName) {\n if (!graph.containsKey(endName)) {\n // test use, display point\n // System.err.printf(\"Graph doesn't contain end vertex \\\"%s\\\"\\n\", endName);\n return;\n }\n graph.get(endName).printPath();\n }",
"public String toString() {\n StringBuilder s = new StringBuilder();\n String NEWLINE = System.getProperty(\"line.separator\");\n s.append(vertices + \" \" + NEWLINE);\n for (int v = 0; v < vertices; v++) {\n s.append(String.format(\"%d: \", v));\n for (Map.Entry<Integer, Integer> e : adjacent(v).entrySet()) {\n s.append(String.format(\"%d (%d) \", e.getKey(), e.getValue()));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"@Override\n public String toString() {\n String str = \"graph [\\n\";\n\n Iterator<Node<E>> it = iterator();\n\n //Node display\n while(it.hasNext()){\n Node n = it.next();\n\n str += \"\\n\\tnode [\";\n str += \"\\n\\t\\tid \" + n;\n str += \"\\n\\t]\";\n }\n\n //Edge display\n it = iterator();\n\n while(it.hasNext()){\n Node n = it.next();\n\n Iterator<Node<E>> succsIt = n.succsOf();\n while(succsIt.hasNext()){\n Node succN = succsIt.next();\n\n str += \"\\n\\tedge [\";\n str += \"\\n\\t\\tsource \" + n;\n str += \"\\n\\t\\ttarget \" + succN;\n str += \"\\n\\t\\tlabel \\\"Edge from node \" + n + \" to node \" + succN + \" \\\"\";\n str += \"\\n\\t]\";\n }\n }\n\n str += \"\\n]\";\n\n return str;\n }",
"String getEdges();",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder out = new StringBuilder();\r\n\t\tMap<Integer,Integer> tmp;\r\n\t\tout.append(\"{\");\r\n\t\tfor(int i = 0; i < edges.length; i++) {\r\n\t\t\ttmp = edges[i];\r\n\t\t\tif (tmp == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor(Map.Entry entry : tmp.entrySet()) {\r\n\t\t\t\t\tif ((int)entry.getValue() == -1) {\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \")\" + \",\");\r\n\t\t\t\t} else{\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \",\" + entry.getValue() + \")\" + \",\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (out.length() > 2) {\r\n\t\tout.setLength(out.length() - 2);\r\n\t\tout.append(\")\");\r\n\t\t}\r\n\r\n\t\tout.append(\"}\");\r\n\t\treturn out.toString();\r\n\t}",
"public static void printEntireGraph(Graph g){\n \t\n \tfor(String v :g.vertexMap.keySet()){\n \t\t\n \t\tSystem.out.println(v+ ((g.vertexMap.get(v).isDown)?\" DOWN\":\"\"));\n \t\t\n \t\tfor (Edge adj :g.vertexMap.get(v).adjEdge.values()){\n \t\t\t\tSystem.out.print('\\t');\n \t\t\t\tSystem.out.print(adj.adjVertex.name+\" \");\n \t\t\t\tSystem.out.print(adj.dist+ ((adj.isDown)?\" DOWN\":\"\"));\n \t\t\t\tSystem.out.println();\n \t\t}\n \t\t\n \t}\n \t\n \t\n }",
"@Override\n public String toString()\n {\n String builder = new String();\n \tfor (V vertex : graph.keySet()){\n \t\tString strVertex = vertex.toString();\n \t\tbuilder = builder + strVertex + \": \";\n \t\tArrayList <V> edges = graph.get(vertex);\n \t\tint degree = edges.size();\n \t\tint i = 0;\n \t\tif (degree > 0){\n \t\t\twhile (i < degree -1){\n \t\t\t\tString strEdge = edges.get(i).toString();\n \t\t\t\tbuilder = builder + strEdge + \", \";\n \t\t\t\ti++;\n \t\t\t}\n \t\tString strEdge = edges.get(i).toString();\n \t\tbuilder = builder + strEdge + \"\\n\";\n\n \t\t}\n \t\telse{\n \t\t\tstrVertex = vertex.toString();\n \t\t\tbuilder = builder + strVertex + \": \\n\";\n \t\t}\n\n \t}\n \treturn builder;\n }",
"public void emit() {\n\t\tif (label != null)\n\t\t\tSystem.out.print(label + \":\");\n\n\t\tSystem.out.println(\n\t\t\t\t\"\\t\" + getOpcode() + \" \" + source1.toString() + \" => \" + source2.toString() + \" \" + dest.toString());\n\t}",
"public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }",
"public abstract String edgeToStringWithCnt(int nodeSrc, int nodeDst, int cnt, Set<String> relations);",
"public String toString()\n\t{\n\t \n\t\tString str = vertexName + \": \" ;\n\t\tfor(int i = 0 ; i < adjacencyList.size(); i++)\n\t\t\tstr = str + adjacencyList.get(i).vertexName + \" \";\n\t\treturn str ;\n\t\t\n\t}",
"private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }",
"void printGraph();",
"public abstract String edgeToStringWithDaikonInvs(int nodeSrc, int nodeDst, DaikonInvariants daikonInvs,\n Set<String> relations);",
"@Override\n\tpublic String toString() {\n\t\treturn (\"\"+label);\n\t}",
"public void visit(int i) {\r\n Vertex v = vertexList.get(i);\r\n v.isVisited = true;\r\n System.out.println(v.label);\r\n }",
"void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }",
"public void dotGraph(BufferedWriter out) throws IOException {\n out.write(\"digraph \\\"\"+this.method+\"\\\" {\\n\");\n IndexMap m = new IndexMap(\"MethodCallMap\");\n for (Iterator i=nodeIterator(); i.hasNext(); ) {\n Node n = (Node) i.next();\n out.write(\"n\"+n.id+\" [label=\\\"\"+n.toString_short()+\"\\\"];\\n\");\n }\n for (Iterator i=getCalls().iterator(); i.hasNext(); ) {\n ProgramLocation mc = (ProgramLocation) i.next();\n int k = m.get(mc);\n out.write(\"mc\"+k+\" [label=\\\"\"+mc+\"\\\"];\\n\");\n }\n for (Iterator i=nodeIterator(); i.hasNext(); ) {\n Node n = (Node) i.next();\n for (Iterator j=n.getNonEscapingEdges().iterator(); j.hasNext(); ) {\n Map.Entry e = (Map.Entry) j.next();\n String fieldName = \"\"+e.getKey();\n Iterator k;\n if (e.getValue() instanceof Set) k = ((Set)e.getValue()).iterator();\n else k = Collections.singleton(e.getValue()).iterator();\n while (k.hasNext()) {\n Node n2 = (Node) k.next();\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"\"+fieldName+\"\\\"];\\n\");\n }\n }\n for (Iterator j=n.getAccessPathEdges().iterator(); j.hasNext(); ) {\n Map.Entry e = (Map.Entry) j.next();\n String fieldName = \"\"+e.getKey();\n Iterator k;\n if (e.getValue() instanceof Set) k = ((Set)e.getValue()).iterator();\n else k = Collections.singleton(e.getValue()).iterator();\n while (k.hasNext()) {\n Node n2 = (Node) k.next();\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"\"+fieldName+\"\\\",style=dashed];\\n\");\n }\n }\n if (n.getPassedParameters() != null) {\n for (Iterator j=n.getPassedParameters().iterator(); j.hasNext(); ) {\n PassedParameter pp = (PassedParameter) j.next();\n int k = m.get(pp.m);\n out.write(\"n\"+n.id+\" -> mc\"+k+\" [label=\\\"p\"+pp.paramNum+\"\\\",style=dotted];\\n\");\n }\n }\n if (n instanceof ReturnedNode) {\n ReturnedNode rn = (ReturnedNode) n;\n int k = m.get(rn.m);\n out.write(\"mc\"+k+\" -> n\"+n.id+\" [label=\\\"r\\\",style=dotted];\\n\");\n }\n }\n for (Iterator i=castMap.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry) i.next();\n Node n = (Node)((Pair)e.getKey()).left;\n Node n2 = (Node)e.getValue();\n if (nodes.containsKey(n2))\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"(cast)\\\"];\\n\");\n }\n out.write(\"}\\n\");\n }",
"public abstract String edgeToStringWithNoProb(int nodeSrc, int nodeDst, Set<String> relations);",
"public void printPath(Vertex v) {\n if ( v.dist == 0 )\n return;\n printPath(v.path);\n System.out.print(\"-> \" + v.graphLoc+\" \");\n }",
"public abstract String getEdgeSymbol(int vertexIndex, int otherVertexIndex);",
"public void PrintKNeighbours() {\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tSystem.out.print(ptr.dim_weight+\" \");\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t}",
"@Override\n\tpublic String toString()\n\t{\n\t\t/* output looks like this\n\t\t * \n\t\t * 20 - 10, 30 20 has edges with 10 and 30\n\t\t * 40 - 10, 30 \t\t40 has edges with 10 and 30\n\t\t * 10 - 20, 40 \t\t\t10 has edges with 20 and 40\n\t\t * 30 - 20, 40 \t\t\t30 has edges with 20 and 40\n\t\t */\n\t\tString str = new String();\n\t\tfor(Map.Entry<Object, SinglyLinkedList> vertex : map.entrySet())\n\t\t\tstr += vertex.getKey() + \" - \" + vertex.getValue() + '\\n';\t\t\t\t\n\t\treturn str;\n\t}",
"public void findEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"public String toString(){\n\t\treturn vertex.toString();\n\t}",
"public String toString() {\n String s = \"\";\n for (Vertex v : mVertices.values()) {\n s += v + \": \";\n for (Vertex w : mAdjList.get(v)) {\n s += w + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }",
"private void printSolution(int startVertex, double[] distances, int[] parents) {\n int nVertices = distances.length;\n System.out.print(\"Vertex\\t Distance\\tPath\");\n\n for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) {\n if (vertexIndex != startVertex) {\n System.out.print(\"\\n\" + startVertex + \" -> \");\n System.out.print(vertexIndex + \" \\t\\t \");\n System.out.print(distances[vertexIndex] + \"\\t\\t\");\n printPath(vertexIndex, parents);\n }\n }\n }",
"public abstract ArrayList<String> neighbours(String vertLabel);",
"public void printDGraph(){\n System.out.println(this.toString());\n }",
"private void addVerticesToGraph()\n\t{\n\t\tString vertexName;\n\n\t\tMap<Long, IOFSwitch> switches = this.floodlightProvider.getSwitches();\n\t\tfor(IOFSwitch s :switches.values())\n\t\t{\n\t\t\tvertexName =Long.toString(s.getId());\n\t\t\tm_graph.addVertex(vertexName);\t\t\t \t\t\t \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}",
"public static void printGraph( Graph graph ){\n\t\tint size = graph.getGraph().size();\n\t\tStringBuilder sb = new StringBuilder(); \n\t\tint weight = 0;\n\t\tfor( String start: graph.getGraph().keySet() ) {\n\t\t\tfor( String end : graph.getGraph().get(start).keySet() ) {\n\t\t\t\tweight = graph.getGraph().get(start).get(end);\n\t\t\t\tsb.append( start + end + String.valueOf(weight) + \", \" );\n\t\t\t}\n\t\t}\n\t\tsb.delete(sb.length()-2, sb.length());\n\t\tSystem.out.println(sb.toString());\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn label;\n\t}",
"public String toString() {\n return label;\n }",
"public void printNode(){\n\t\tSystem.out.println(\"\\nCurrent neigbor: \" + serventList.size());\n\t\tfor(int i = 0;i<serventList.size();i++){\n\t\t\tServentInfo b = serventList.get(i);\n\t\t\tSystem.out.println(\"(\" + b.IP + \":\" + b.port + \"); \");\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}",
"private void printPath(List<Edge<String>> path,\n double totalDistance) {\n if (path == null) {\n System.out.println(\"No path found\");\n return;\n }\n\n System.out.println(\"Total Distance: \" + totalDistance);\n for (int i = path.size() - 1; i >= 0; i--) {\n System.out.println(path.get(i).get() + \" \"\n + graph.label(path.get(i)));\n }\n }",
"public abstract String edgeToStringWithProb(int nodeSrc, int nodeDst, double prob, Set<String> relations);",
"void printMST(int[] parent) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < VERTICES; i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph[i][parent[i]]);\n }",
"private void backTrack(String start, AdjVertex end, Vertex parent){\r\n\t\tif(parent.name.compareToIgnoreCase(start) == 0){ \r\n\t\t\t//if we have found our way back to the start, then we print the result\r\n\t\t\tif(pathStack.isEmpty()){\r\n\t\t\t\tSystem.out.println(start + \" -- \" + end.name);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.print(start + \" -- \" + end.name);\r\n\t\t\t\twhile(!pathStack.isEmpty()){\r\n\t\t\t\t\tSystem.out.print(\" -- \" + pathStack.pop());\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we still have to find our way back to the first person,\r\n\t\t//we push the end name into the stack, \r\n\t\telse{ \r\n\t\t\tpathStack.push(end.name);\r\n\t\t\tconnector(start, parent.name);\r\n\t\t}\r\n\t}",
"public void print_root(){\r\n\t\tfor(int id = 0; id < label.length; id++){\r\n\t\t\tSystem.out.printf(\"\"%d \"\", find(id));\r\n\t\t}\r\n\t\tSystem.out.printf(\"\"\\n\"\");\r\n\t}",
"public String toString() {\n\t\tString s = \"\";\n\t\t// Loop through all the vertices and add their neighbors to a string\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\ts += this.vertices.get(i).toString() + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\\n\";\n\t\t}\n\t\ts += \"Number of Total Edges: \" + this.actualTotalEdges;\n\t\treturn s;\n\t}",
"public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}",
"public String toString() {\n \tString printStatements = \"\";\n \t\n \tfor (Vertex vertex : this) {\n \t\tprintStatements += vertex + \" \";\n \t}\n \treturn printStatements;\n }",
"public void printPath(int index){\n\t\tList<V> path=getPath(index);\n\n\t\tSystem.out.println(\"A path from \"+vertices.get(root)+\" to \"+vertices.get(index)+\": \");\n\t\tfor(int i=path.size()-1;i>=0;i--)\n\t\t\tSystem.out.print(path.get(i)+\" \");\n\n\t\t}",
"private void colorNodeLabels() {\n for (NodeImpl n : supervisedNodes) {\n if (n.hasLabel()) {\n colorNodeLabel(n.getLabel());\n }\n }\n }",
"public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(ver + \" vertices, \" + edg + \" edges \" + NEWLINE);\n for (int v = 0; v < ver; v++) {\n s.append(String.format(\"%d: \", v));\n for (int w : adj[v]) {\n s.append(String.format(\"%d \", w));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public void printVertices(PrintWriter os) {\n\n\n // Implement me!\n String s = \"\";\n for (String k : vertices.keySet()) {\n s = s + k + \" \";\n }\n os.println(s);\n\n\n }",
"public String toString()\n {\n return label;\n }",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }"
] | [
"0.72257316",
"0.69845",
"0.69502485",
"0.66344136",
"0.6475875",
"0.63701034",
"0.6354266",
"0.63284385",
"0.62181944",
"0.6158213",
"0.61448646",
"0.6139717",
"0.61168534",
"0.6019002",
"0.60014504",
"0.59846467",
"0.5983054",
"0.59536785",
"0.59453213",
"0.5934629",
"0.5907574",
"0.5902032",
"0.58631164",
"0.58438265",
"0.58245414",
"0.5787237",
"0.57639325",
"0.57591623",
"0.5757704",
"0.5745565",
"0.5706672",
"0.57019657",
"0.5686593",
"0.56826085",
"0.5675639",
"0.5675529",
"0.5652791",
"0.5651219",
"0.56459415",
"0.56387424",
"0.5629975",
"0.5625111",
"0.5621308",
"0.561405",
"0.56127405",
"0.56032044",
"0.5598336",
"0.5591687",
"0.558622",
"0.55538034",
"0.5550875",
"0.5545803",
"0.5540165",
"0.553816",
"0.5536491",
"0.55291045",
"0.55258816",
"0.55158776",
"0.5515296",
"0.55124617",
"0.551025",
"0.54976565",
"0.5482706",
"0.5481363",
"0.5481293",
"0.5474018",
"0.544873",
"0.5440379",
"0.54339427",
"0.5431011",
"0.54300284",
"0.54297477",
"0.54297084",
"0.5426455",
"0.5425583",
"0.54215956",
"0.5412738",
"0.5404683",
"0.53819495",
"0.53777766",
"0.53761727",
"0.53661776",
"0.5353014",
"0.53273934",
"0.53184664",
"0.529604",
"0.5290495",
"0.5289648",
"0.5287773",
"0.52709013",
"0.52706146",
"0.5254201",
"0.5217245",
"0.52171504",
"0.5212468",
"0.5206868",
"0.52057284",
"0.5203955",
"0.52022314",
"0.519899"
] | 0.74010736 | 0 |
/ Print the labels of all vertices at other endpoint of outgoing edges from current vertex. | public void outAdjacentVertices() {
for (int i = 0; i < currentVertex.outList.size(); i++) {
System.out.print(currentVertex.outList.get(i).vertex.label + " ");
}
printLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void outIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void inIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}",
"private void printGraph() {\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(v.getName() + \" DOWN\");\r\n\t\t\tsortEdges(v.adjacent);\r\n\t\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\t\t// v.adjacent.sort();\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus())\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost());\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost() + \" DOWN\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}",
"void printNodesWithEdges()\n {\n for ( int i = 0; i < this.numNodes; i++ )\n {\n Node currNode = this.nodeList.get(i);\n System.out.println(\"Node id: \" + currNode.id );\n \n int numEdges = currNode.connectedNodes.size();\n for ( int j = 0; j < numEdges; j++ )\n {\n Node currEdge = currNode.connectedNodes.get(j);\n System.out.print(currEdge.id + \",\");\n }\n\n System.out.println();\n } \n\n \n }",
"void printGraph() {\n for (Vertex u : this) {\n System.out.print(u + \": \");\n for (Edge e : u.Adj) {\n System.out.print(e);\n }\n System.out.println();\n }\n }",
"public void printEdges()\n\t{\n\t\tSystem.out.println(\"Printing all Edges:\");\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\titr.next().printAdjacent();\n\t\t}\n\t}",
"public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }",
"@Override\n public String toString()\n {\n StringBuilder sb = new StringBuilder();\n\n for(Vertex vertex: vertices)\n {\n sb.append(\"V: \" + vertex.toString() + '\\n');\n\n for(Edge edge: connections.get(vertex))\n {\n sb.append(\" -> \" + edge.other(vertex).toString() + \" (\" + edge.getWeight() + \")\\n\");\n }\n }\n\n return sb.toString();\n }",
"public void printEdges() {\n\t\tSystem.out.println(\"Edges\");\n\t\tIterator<Edge> i = edges.iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tEdge e = i.next();\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\t}",
"public void outputForGraphviz() {\n\t\tString label = \"\";\n\t\tfor (int j = 0; j <= lastindex; j++) {\n\t\t\tif (j > 0) label += \"|\";\n\t\t\tlabel += \"<p\" + ptrs[j].myname + \">\";\n\t\t\tif (j != lastindex) label += \"|\" + String.valueOf(keys[j+1]);\n\t\t\t// Write out any link now\n\t\t\tBTree.writeOut(myname + \":p\" + ptrs[j].myname + \" -> \" + ptrs[j].myname + \"\\n\");\n\t\t\t// Tell your child to output itself\n\t\t\tptrs[j].outputForGraphviz();\n\t\t}\n\t\t// Write out this node\n\t\tBTree.writeOut(myname + \" [shape=record, label=\\\"\" + label + \"\\\"];\\n\");\n\t}",
"public void printGraph() {\n\t\tStringJoiner j = new StringJoiner(\", \");\n\t\tfor(Edge e : edgeList) {\n\t\t\tj.add(e.toString());\n\t\t}\n\t\t\n\t\tSystem.out.println(j.toString());\n\t}",
"public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}",
"public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(name + \"=>\" + vertices.get(name).printNeighbors());\n\t\t}\n\t\tSystem.out.println(\"-------------------\");\n\t}",
"public void printEdges(PrintWriter os) {\n\n\n // Implement me!\n for (String e : edges.keySet()) {\n String src = e.substring(0, 1);\n String tar = e.substring(1, 2);\n int srcInt = indexOf(e.substring(0, 1), vertices);\n int eInt = edges.get(e);\n int w = getEdgeWeight(src, tar);\n\n os.println(src + \" \" + tar + \" \" + w);\n\n }\n\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder out = new StringBuilder();\r\n\t\tMap<Integer,Integer> tmp;\r\n\t\tout.append(\"{\");\r\n\t\tfor(int i = 0; i < edges.length; i++) {\r\n\t\t\ttmp = edges[i];\r\n\t\t\tif (tmp == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor(Map.Entry entry : tmp.entrySet()) {\r\n\t\t\t\t\tif ((int)entry.getValue() == -1) {\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \")\" + \",\");\r\n\t\t\t\t} else{\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \",\" + entry.getValue() + \")\" + \",\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (out.length() > 2) {\r\n\t\tout.setLength(out.length() - 2);\r\n\t\tout.append(\")\");\r\n\t\t}\r\n\r\n\t\tout.append(\"}\");\r\n\t\treturn out.toString();\r\n\t}",
"public void display() {\r\n int v;\r\n Node n;\r\n \r\n for(v=1; v<=V; ++v){\r\n System.out.print(\"\\nadj[\" + toChar(v) + \"] ->\" );\r\n for(n = adj[v]; n != z; n = n.next) \r\n System.out.print(\" |\" + toChar(n.vert) + \" | \" + n.wgt + \"| ->\"); \r\n }\r\n System.out.println(\"\");\r\n }",
"public String toString() \n {\n String NEWLINE = System.getProperty(\"line.separator\");\n StringBuilder s = new StringBuilder();\n for (int v = 0; v < V; v++) \n {\n s.append(v + \": \");\n for (DirectedEdge e : adj[v]) \n {\n \tif(e.online)\n \t{\n \t\ts.append(e + \" \");\n \t}\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private void printPath( Vertex dest )\n {\n if( dest.prev != null )\n {\n printPath( dest.prev );\n // System.out.print( \" to \" );\n }\n System.out.print( dest.name +\" \" );\n }",
"public String toString(){\n String string = \"\" + nrVertices;\n for(DEdge edge : edges){\n string += \"\\n\" + (edge.getVertex1()) + \" \" + (edge.getVertex2());\n }\n return string;\n }",
"public void printEdge(){\n\t\tint count = 0;\n\t\tSystem.out.print(\"\\t\");\n\t\tfor(Edge e: edgeArray){\n\t\t\tif(count > 5){\n\t\t\t\tSystem.out.println();\n\t\t\t\tcount = 0;\n\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t}\n\t\t\tcount ++;\n\t\t\tSystem.out.printf(\"%s (%d) \", e.getVertex().getRecord(), e.getCost());\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void dotGraph(BufferedWriter out) throws IOException {\n out.write(\"digraph \\\"\"+this.method+\"\\\" {\\n\");\n IndexMap m = new IndexMap(\"MethodCallMap\");\n for (Iterator i=nodeIterator(); i.hasNext(); ) {\n Node n = (Node) i.next();\n out.write(\"n\"+n.id+\" [label=\\\"\"+n.toString_short()+\"\\\"];\\n\");\n }\n for (Iterator i=getCalls().iterator(); i.hasNext(); ) {\n ProgramLocation mc = (ProgramLocation) i.next();\n int k = m.get(mc);\n out.write(\"mc\"+k+\" [label=\\\"\"+mc+\"\\\"];\\n\");\n }\n for (Iterator i=nodeIterator(); i.hasNext(); ) {\n Node n = (Node) i.next();\n for (Iterator j=n.getNonEscapingEdges().iterator(); j.hasNext(); ) {\n Map.Entry e = (Map.Entry) j.next();\n String fieldName = \"\"+e.getKey();\n Iterator k;\n if (e.getValue() instanceof Set) k = ((Set)e.getValue()).iterator();\n else k = Collections.singleton(e.getValue()).iterator();\n while (k.hasNext()) {\n Node n2 = (Node) k.next();\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"\"+fieldName+\"\\\"];\\n\");\n }\n }\n for (Iterator j=n.getAccessPathEdges().iterator(); j.hasNext(); ) {\n Map.Entry e = (Map.Entry) j.next();\n String fieldName = \"\"+e.getKey();\n Iterator k;\n if (e.getValue() instanceof Set) k = ((Set)e.getValue()).iterator();\n else k = Collections.singleton(e.getValue()).iterator();\n while (k.hasNext()) {\n Node n2 = (Node) k.next();\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"\"+fieldName+\"\\\",style=dashed];\\n\");\n }\n }\n if (n.getPassedParameters() != null) {\n for (Iterator j=n.getPassedParameters().iterator(); j.hasNext(); ) {\n PassedParameter pp = (PassedParameter) j.next();\n int k = m.get(pp.m);\n out.write(\"n\"+n.id+\" -> mc\"+k+\" [label=\\\"p\"+pp.paramNum+\"\\\",style=dotted];\\n\");\n }\n }\n if (n instanceof ReturnedNode) {\n ReturnedNode rn = (ReturnedNode) n;\n int k = m.get(rn.m);\n out.write(\"mc\"+k+\" -> n\"+n.id+\" [label=\\\"r\\\",style=dotted];\\n\");\n }\n }\n for (Iterator i=castMap.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry) i.next();\n Node n = (Node)((Pair)e.getKey()).left;\n Node n2 = (Node)e.getValue();\n if (nodes.containsKey(n2))\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"(cast)\\\"];\\n\");\n }\n out.write(\"}\\n\");\n }",
"public void printEdges(){\n System.out.print(\" |\");\n for(int i=0;i<size;i++)\n System.out.print(\" \"+i+\" \");\n System.out.print(\"\\n\");\n for(int i=0;i<size+1;i++)\n System.out.print(\"-------\");\n System.out.print(\"\\n\");\n for(int i=0;i<size;i++){\n System.out.print(\" \"+i+\" |\");\n for(int j=0;j<size;j++){\n System.out.print(\" \"+Matrix[i][j]+\" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"public void findEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"\\n\\n \\tVertice [label=\" + label + \"] \";\n\t}",
"public String toString() {\n \tStringBuilder s = new StringBuilder();\n \ts.append(V + \" vertices, \" + E + \" edges \" + NEWLINE);\n \tfor(int v = 0; v < V; v++) {\n \t\ts.append(v + \": \");\n \t\tfor(int w : adj[v]) {\n \t\t\ts.append(w + \" \");\n \t\t}\n \t\ts.append(NEWLINE);\n \t}\n \t\n \treturn s.toString();\n }",
"private String edgeString()\n {\n Iterator<DSAGraphEdge<E>> iter = edgeList.iterator();\n String outputString = \"\";\n DSAGraphEdge<E> edge = null;\n while (iter.hasNext())\n {\n edge = iter.next();\n outputString = (outputString + edge.getLabel() + \", \");\n }\n return outputString;\n }",
"public String toString() \n\t{\n\t\tString toReturn = \"\";\n\t\t\n\t\t\n\t\tfor(Vertex v : vertices) \n\t\t{\n\t\t\tHashMap<Vertex, Integer> E = getEdges(v);\n\t\t\t\n\t\t\tif(!E.isEmpty())\n\t\t\t{\n\t\t\t\ttoReturn = toReturn + v + \"(\";\n\t\t\t\tfor(Vertex edge : E.keySet()) \n\t\t\t\t{\n\t\t\t\t\ttoReturn = toReturn + edge.getName() + \", \";\n\t\t\t\t}\n\t\t\t\ttoReturn = toReturn.trim().substring(0, toReturn.length() - 2);\n\t\t\t\ttoReturn = toReturn + \")\\n\";\n\t\t\t}\n\t\t\telse {toReturn = toReturn + v + \"[]\\n\";}\n\t\t}\n\t\treturn toReturn;\n\t}",
"private static void printGraph(ArrayList<Vertex> graph) {\n\t\tSystem.out.print(\"---GRAPH PRINT START---\");\n\t\tfor (Vertex vertex: graph) {\n\t\t\tSystem.out.println(\"\\n\\n\" + vertex.getValue());\n\t\t\tSystem.out.print(\"Adjacent nodes: \");\n\t\t\tfor (Vertex v: vertex.getAdjacencyList()) {\n\t\t\t\tSystem.out.print(v.getValue() + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---GRAPH PRINT END---\\n\\n\");\n\t}",
"private String edgesLeavingVertexToString() {\n \n //make empty string\n String s = \"\";\n \n //for loop to go through all vertices; \n for (int j = 0; j < arrayOfVertices.length; j++) {\n \n //if it has any edges...\n if (arrayOfVertices[j].getDegree() > 0) {\n \n //go through its edges\n for (int k = 0; k < arrayOfVertices[j].getDegree(); k++) {\n \n //declare an array list\n ArrayList<Vertex> newArrayList = \n arrayOfVertices[j].getAdjacent();\n \n //add to string: the vertex itself + space + edge + line break\n s += j + \" \" + newArrayList.get(k).getID() + \"\\n\"; \n \n } \n } \n }\n \n //add -1, -1 after all the edges\n s += \"-1 -1\";\n \n return s; \n }",
"public String toString() {\n StringBuilder s = new StringBuilder();\n String NEWLINE = System.getProperty(\"line.separator\");\n s.append(vertices + \" \" + NEWLINE);\n for (int v = 0; v < vertices; v++) {\n s.append(String.format(\"%d: \", v));\n for (Map.Entry<Integer, Integer> e : adjacent(v).entrySet()) {\n s.append(String.format(\"%d (%d) \", e.getKey(), e.getValue()));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"@Override\n public String toString()\n {\n String builder = new String();\n \tfor (V vertex : graph.keySet()){\n \t\tString strVertex = vertex.toString();\n \t\tbuilder = builder + strVertex + \": \";\n \t\tArrayList <V> edges = graph.get(vertex);\n \t\tint degree = edges.size();\n \t\tint i = 0;\n \t\tif (degree > 0){\n \t\t\twhile (i < degree -1){\n \t\t\t\tString strEdge = edges.get(i).toString();\n \t\t\t\tbuilder = builder + strEdge + \", \";\n \t\t\t\ti++;\n \t\t\t}\n \t\tString strEdge = edges.get(i).toString();\n \t\tbuilder = builder + strEdge + \"\\n\";\n\n \t\t}\n \t\telse{\n \t\t\tstrVertex = vertex.toString();\n \t\t\tbuilder = builder + strVertex + \": \\n\";\n \t\t}\n\n \t}\n \treturn builder;\n }",
"String getEdges();",
"void printPath(Coordinate endName) {\n if (!graph.containsKey(endName)) {\n // test use, display point\n // System.err.printf(\"Graph doesn't contain end vertex \\\"%s\\\"\\n\", endName);\n return;\n }\n graph.get(endName).printPath();\n }",
"static void showGraph(ArrayList<ArrayList<Integer>> graph) {\n for(int i=0;i< graph.size(); i++ ){\n System.out.print(\"Vertex : \" + i + \" : \");\n for(int j = 0; j < graph.get(i).size(); j++) {\n System.out.print(\" -> \"+ graph.get(i).get(j));\n }\n }\n }",
"public abstract String edgeToStringWithNoProb(int nodeSrc, int nodeDst, Set<String> relations);",
"void printGraph() {\n System.out.println(\n \"All vertices in the graph are presented below.\\n\" +\n \"Their individual edges presented after a tab. \\n\" +\n \"-------\");\n\n for (Map.Entry<Vertex, LinkedList<Vertex>> entry : verticesAndTheirEdges.entrySet()) {\n LinkedList<Vertex> adj = entry.getValue();\n System.out.println(\"Vertex: \" + entry.getKey().getName());\n for (Vertex v : adj) {\n System.out.println(\" \" + v.getName());\n }\n }\n }",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"public static void main(String[] args)\n {\n In in = new In(args[0]);\n Graph G = new Graph(in);\n\n // print out each edge (twice)\n for (int v = 0; v < G.V(); v++)\n for (int w : G.adj(v))\n System.out.println(v + \"-\" + w);\n }",
"public void display() {\n\t\t\n\t\tint u,v;\n\t\t\n\t\tfor(v=1; v<=V; ++v) {\n\t\t\t\n\t\t\tSystem.out.print(\"\\nadj[\" + v + \"] = \");\n\t\t\t\n\t\t\tfor(u = 1 ; u <= V; ++u) {\n\t\t\t\t \n\t\t\t\tSystem.out.print(\" \" + adj[u][v]);\n\t\t\t}\n\t\t} \n\t\tSystem.out.println(\"\");\n\t}",
"public void print (){\r\n for (int i = 0; i < graph.size(); ++i){\r\n graph.get(i).print();\r\n }\r\n }",
"public abstract String edgeToStringWithCnt(int nodeSrc, int nodeDst, int cnt, Set<String> relations);",
"public void printGraph()\n {\n Iterator<T> nodeIterator = nodeList.keySet().iterator();\n \n while (nodeIterator.hasNext())\n {\n GraphNode curr = nodeList.get(nodeIterator.next());\n \n while (curr != null)\n {\n System.out.print(curr.nodeId+\"(\"+curr.parentDist+\")\"+\"->\");\n curr = curr.next;\n }\n System.out.print(\"Null\");\n System.out.println();\n }\n }",
"public static void printEntireGraph(Graph g){\n \t\n \tfor(String v :g.vertexMap.keySet()){\n \t\t\n \t\tSystem.out.println(v+ ((g.vertexMap.get(v).isDown)?\" DOWN\":\"\"));\n \t\t\n \t\tfor (Edge adj :g.vertexMap.get(v).adjEdge.values()){\n \t\t\t\tSystem.out.print('\\t');\n \t\t\t\tSystem.out.print(adj.adjVertex.name+\" \");\n \t\t\t\tSystem.out.print(adj.dist+ ((adj.isDown)?\" DOWN\":\"\"));\n \t\t\t\tSystem.out.println();\n \t\t}\n \t\t\n \t}\n \t\n \t\n }",
"void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }",
"@Override\n public String toString() {\n String str = \"graph [\\n\";\n\n Iterator<Node<E>> it = iterator();\n\n //Node display\n while(it.hasNext()){\n Node n = it.next();\n\n str += \"\\n\\tnode [\";\n str += \"\\n\\t\\tid \" + n;\n str += \"\\n\\t]\";\n }\n\n //Edge display\n it = iterator();\n\n while(it.hasNext()){\n Node n = it.next();\n\n Iterator<Node<E>> succsIt = n.succsOf();\n while(succsIt.hasNext()){\n Node succN = succsIt.next();\n\n str += \"\\n\\tedge [\";\n str += \"\\n\\t\\tsource \" + n;\n str += \"\\n\\t\\ttarget \" + succN;\n str += \"\\n\\t\\tlabel \\\"Edge from node \" + n + \" to node \" + succN + \" \\\"\";\n str += \"\\n\\t]\";\n }\n }\n\n str += \"\\n]\";\n\n return str;\n }",
"private Set<String> getVertexContextRelevantLabels(VertexControllerContext context) {\n return Stream.ofAll(context.getBulkVertices())\n .take(1)\n .map(Element::label)\n .toJavaSet();\n }",
"public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}",
"public String toString()\n {\n return \"Label: \" + label + \", Value: \" + value + \", List: \"+linkString()\n + \", Edges: \" + edgeString() + \", Visited: \" + visited + \", Previous: \"\n + previous.getLabel() + \", Distance From Source: \" + distanceFromSource;\n }",
"public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }",
"public static void printGraph(Graph g) {\r\n\t\tfor (int i = 0; i < g.V; i++) {\r\n\t\t\tSystem.out.print(\"Vertex \" + i + \": \");\r\n\t\t\t\r\n\t\t\tif (g.L.get(i).size() > 0) {\r\n\t\t\t\tSystem.out.print(g.L.get(i).get(0).printEdge());\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (int r = 1; r < g.L.get(i).size(); r++) {\r\n\t\t\t\tSystem.out.print(\", \" + g.L.get(i).get(r).printEdge());\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public String toString() {\n\t\tString s = \"\";\n\t\t// Loop through all the vertices and add their neighbors to a string\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\ts += this.vertices.get(i).toString() + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\\n\";\n\t\t}\n\t\ts += \"Number of Total Edges: \" + this.actualTotalEdges;\n\t\treturn s;\n\t}",
"public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}",
"public void emit() {\n\t\tif (label != null)\n\t\t\tSystem.out.print(label + \":\");\n\n\t\tSystem.out.println(\n\t\t\t\t\"\\t\" + getOpcode() + \" \" + source1.toString() + \" => \" + source2.toString() + \" \" + dest.toString());\n\t}",
"private void printPath(int currentVertex, int[] parents) {\n // Base case : Source node has been processed \n if (currentVertex == NO_PARENT) {\n return;\n }\n printPath(parents[currentVertex], parents);\n System.out.print(currentVertex + \" \");\n }",
"void printGraph();",
"public abstract String getEdgeSymbol(int vertexIndex, int otherVertexIndex);",
"public String revealRelationshipsInX() {\n\t\tString x = \"\";\n\t\tif (this.numXVertices > 0) {\n\t\t\tint start = this.vertices.size() - this.numXVertices; // location where X vertices start\n\t\t\tfor (int i = start; i < this.vertices.size(); i++) {\n\t\t\t\t// find x_i and print it with all its neighbors\n\t\t\t\tx += this.vertices.get(i).toString() + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}",
"public String toString() {\n String s = \"\";\n for (Vertex v : mVertices.values()) {\n s += v + \": \";\n for (Vertex w : mAdjList.get(v)) {\n s += w + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }",
"@Override\n\tpublic String toString()\n\t{\n\t\t/* output looks like this\n\t\t * \n\t\t * 20 - 10, 30 20 has edges with 10 and 30\n\t\t * 40 - 10, 30 \t\t40 has edges with 10 and 30\n\t\t * 10 - 20, 40 \t\t\t10 has edges with 20 and 40\n\t\t * 30 - 20, 40 \t\t\t30 has edges with 20 and 40\n\t\t */\n\t\tString str = new String();\n\t\tfor(Map.Entry<Object, SinglyLinkedList> vertex : map.entrySet())\n\t\t\tstr += vertex.getKey() + \" - \" + vertex.getValue() + '\\n';\t\t\t\t\n\t\treturn str;\n\t}",
"public void printDGraph(){\n System.out.println(this.toString());\n }",
"protected String printablePath(IVertex<String> target){\n\n String lineout = \"\";\n\n LinkedList<IVertex<String>> path = this.getPath(target);\n\n IVertex<String> previous = null;\n\n IVertex<String> next = null;\n\n if(path!=null) {\n Iterator<IVertex<String>> it = path.iterator();\n\n while (it.hasNext()) {\n\n previous = next;\n\n next = it.next();\n\n IWeightedEdge<String> prevedge = null;\n\n if(previous!=null && next!=null){\n prevedge = this.weightedGraph.getEdge(previous,next);\n }\n\n if(prevedge!=null)\n lineout+= \" \" +prevedge.getWeight() + \" \";\n\n lineout += \" \" + next.getValue() + \" \";\n }\n }\n return lineout;\n }",
"public void getInfo() {\n System.out.println(\"INFO Node : \"+address+ \" connected to nodes \");\n for(Node node : getConnectedNodes()){\n System.out.print(\"Node :\"+node.getAddress()+\" with edge : \");\n getEdge(this, node).printEdge();\n }\n \n }",
"public abstract String edgeToStringWithDaikonInvs(int nodeSrc, int nodeDst, DaikonInvariants daikonInvs,\n Set<String> relations);",
"public abstract ArrayList<String> neighbours(String vertLabel);",
"@Override\n\tpublic void processNode(DirectedGraphNode node) {\n\t\tSystem.out.print(node.getLabel()+\" \");\n\t}",
"public void print() {\n\t\tfor (int count = 0; count < adjacencyList.length; count++) {\n\t\t\tLinkedList<Integer> edges = adjacencyList[count];\n\t\t\tSystem.out.println(\"Adjacency list for \" + count);\n\n\t\t\tSystem.out.print(\"head\");\n\t\t\tfor (Integer edge : edges) {\n\t\t\t\tSystem.out.print(\" -> \" + edge);\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }",
"private void printPath(List<Edge<String>> path,\n double totalDistance) {\n if (path == null) {\n System.out.println(\"No path found\");\n return;\n }\n\n System.out.println(\"Total Distance: \" + totalDistance);\n for (int i = path.size() - 1; i >= 0; i--) {\n System.out.println(path.get(i).get() + \" \"\n + graph.label(path.get(i)));\n }\n }",
"public abstract String edgeToStringWithProb(int nodeSrc, int nodeDst, double prob, Set<String> relations);",
"public String toString() {\n\t\tif (label1 == null) return \"(\" + end + \")\";\n\t\tif (label2 == null) return \"(\" + label1 + \",\" + end + \")\";\n\t\treturn \"(\" + label1 + \",\" + label2 + \",\" + end + \")\";\n\t}",
"public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(ver + \" vertices, \" + edg + \" edges \" + NEWLINE);\n for (int v = 0; v < ver; v++) {\n s.append(String.format(\"%d: \", v));\n for (int w : adj[v]) {\n s.append(String.format(\"%d \", w));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public String getOutput() {\n TopologicalOrderIterator<String, DefaultEdge> iterator =\n new TopologicalOrderIterator<>(steps, Comparator.comparing((String x) -> x));\n\n // Traverse the DAG and store each vertex to a StringBuilder\n // to output once traversal is completed\n StringBuilder sb = new StringBuilder();\n while (iterator.hasNext()) {\n sb.append(iterator.next());\n }\n\n return sb.toString();\n }",
"public String toString() {\n \t\t\tString string = \"\";\n \t\t\tfor (Node n : neighbors) {\n \t\t\t\tstring += n.shortName()+\" \";\n \t\t\t}\n \t\t\treturn \"Neighbours: \"+string;\n \t\t}",
"@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"node:\\n\").append(nodeJo);\n\t\tsb.append(\"\\nedges:\\n\").append(edgesJa);\n\t\treturn sb.toString();\n\t}",
"void setEdgeLabel(int edge, String label);",
"public String toString()\n\t{\n\t \n\t\tString str = vertexName + \": \" ;\n\t\tfor(int i = 0 ; i < adjacencyList.size(); i++)\n\t\t\tstr = str + adjacencyList.get(i).vertexName + \" \";\n\t\treturn str ;\n\t\t\n\t}",
"public String toString() {\n \tString printStatements = \"\";\n \t\n \tfor (Vertex vertex : this) {\n \t\tprintStatements += vertex + \" \";\n \t}\n \treturn printStatements;\n }",
"public void printPath(Vertex v) {\n if ( v.dist == 0 )\n return;\n printPath(v.path);\n System.out.print(\"-> \" + v.graphLoc+\" \");\n }",
"public String toString()\r\n\t{\r\n\t\tString str = \"\";\r\n\t\t\r\n\t\tSortedSet<String> sortedVertices = new TreeSet<String>(this.getVertices());\r\n\t\t\r\n\t\tstr += \"Vertices: \" + sortedVertices.toString() + \"\\nEdges:\\n\";\r\n\t\t\r\n\t\tfor(String vertex : sortedVertices)\r\n\t\t{\r\n\t\t\tif(this.dataMap.containsKey(vertex))\r\n\t\t\t{\r\n\t\t\t\tHashMap<String,Integer> adjMap = this.adjacencyMap.get(vertex);\r\n\t\t\t\t\r\n\t\t\t\tSortedSet<String> sortedKeys = new TreeSet<String>(adjMap.keySet());\r\n\t\t\t\t\r\n\t\t\t\tstr += \"Vertex(\" + vertex + \")--->{\";\r\n\t\t\t\tfor(String adj : sortedKeys)\r\n\t\t\t\t{\r\n\t\t\t\t\tstr += adj +\"=\"+ adjMap.get(adj) +\", \";\r\n\t\t\t\t}\r\n\t\t\t\tstr = str.trim();\r\n\t\t\t\t\r\n\t\t\t\tif(!sortedKeys.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tStringBuilder s = new StringBuilder(str);\r\n\t\t\t\t\ts.deleteCharAt(str.length()-1);\r\n\t\t\t\t\tstr = s.toString();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tstr+=\"}\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn str;\r\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn (\"\"+label);\n\t}",
"public String toString(){\n\t\treturn vertex.toString();\n\t}",
"public static void printGraph( Graph graph ){\n\t\tint size = graph.getGraph().size();\n\t\tStringBuilder sb = new StringBuilder(); \n\t\tint weight = 0;\n\t\tfor( String start: graph.getGraph().keySet() ) {\n\t\t\tfor( String end : graph.getGraph().get(start).keySet() ) {\n\t\t\t\tweight = graph.getGraph().get(start).get(end);\n\t\t\t\tsb.append( start + end + String.valueOf(weight) + \", \" );\n\t\t\t}\n\t\t}\n\t\tsb.delete(sb.length()-2, sb.length());\n\t\tSystem.out.println(sb.toString());\n\t}",
"public void findEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}",
"@Override\n public String toString() {\n if (map == null || map.size() == 0)\n return \"\";\n StringBuilder sb = new StringBuilder();\n\n Set<String> visited = new HashSet<>();\n\n for (Map.Entry<String, Vertex> m : map.entrySet()) {\n dfs(sb, m.getKey(), m.getValue(), visited);\n }\n\n return sb.toString();\n }",
"public void PrintKNeighbours() {\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tSystem.out.print(ptr.dim_weight+\" \");\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t}",
"int[] getOutEdges(int... nodes);",
"public void printAdjacencyList() {\n \n for ( int i=0; i<vertex_adjacency_list.size(); i++ ) {\n \n vertex_adjacency_list.get( i ).printVertex();\n \n }\n \n }",
"void print_path(int[]parent,int[]dist,int s)\n {\n System.out.println(); \n \n //path from s to all other vertices\n \n for(int i=0;i<parent.length;i++)\n {\n System.out.println(\"From \"+s+\" to \"+i);\n System.out.print(\"path: \");\n print_node(parent,i);\n System.out.print(\"END\");\n if(dist[i]==INF)\n System.out.println(\" cost=INF\"); \n else\n System.out.println(\" cost=\"+dist[i]);\n\n }\n \n \n System.out.println();\n \n\n \n }",
"private void printPath(LinkedList<String> visited) {\r\n\r\n if (flag == false) {\r\n System.out.println(\"Yes there exists a path between \" + START + \" and \" + END);\r\n }\r\n for (String node : visited) { //creating for loop to print the nodes stored in visited array \r\n System.out.print(node);\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n }",
"public String revealAllRelationshipsInW() {\n\t\tString w = \"\";\n\t\tif (this.numWVertices > 0) {\n\t\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\t\t// find w_i and print it with all its neighbors\n\t\t\t\tw += \"w\" + i + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn w;\n\t}",
"public String toDotString() {\n StringBuilder builder = new StringBuilder();\n builder.append(\"digraph {\\n\");\n\n for (Connection connection : connections) {\n for (ConnectionEndPoint output : connection.outputs) {\n String edge = String.format(\" %s -> %s [label=\\\"%s\\\"];\\n\",\n connection.input.getStageName(), output.getStageName(), connection.getName());\n builder.append(edge);\n }\n }\n\n for (Stage stage : stages.values()) {\n builder.append(String.format(\" %s;\\n\", stage.name));\n }\n\n builder.append(\"}\\n\");\n return builder.toString();\n }",
"public abstract String edgeToStringWithProbCnt(int nodeSrc, int nodeDst, double prob, int cnt,\n Set<String> relations);",
"public void printVertices(PrintWriter os) {\n\n\n // Implement me!\n String s = \"\";\n for (String k : vertices.keySet()) {\n s = s + k + \" \";\n }\n os.println(s);\n\n\n }",
"private static void outputVertex(RootedTree tree, StringBuffer sb, Object v) {\r\n\t\tif (!tree.isLeaf(v)) {\r\n\t\t\tsb.append('(');\r\n\t\t\tList l = tree.getChildrenOf(v);\r\n\t\t\tfor (int i = 0; i < l.size(); i++) {\r\n\t\t\t\toutputVertex(tree, sb, l.get(i));\r\n\t\t\t\tif (i != l.size() - 1) sb.append(',');\r\n\t\t\t}\r\n\t\t\tsb.append(')');\r\n\t\t}\r\n\t\t// Call this to make the vertex's label nicely formatted for Nexus\r\n\t\t// output.\r\n\t\tString s = getNexusCompliantLabel(tree, v);\r\n\t\tif (s.length() != 0) sb.append(s);\r\n\t\tObject p = tree.getParentOf(v);\r\n\t\tif (p != null) {\r\n\t\t\tdouble ew = tree.getEdgeWeight(tree.getEdge(p, v));\r\n\t\t\tif (ew != 1.0) sb.append(\":\" + Double.toString(ew));\r\n\t\t}\r\n\t}",
"public String toString() {\n return label;\n }"
] | [
"0.7003865",
"0.6925489",
"0.6810123",
"0.6352597",
"0.6337031",
"0.6335268",
"0.6279289",
"0.6198015",
"0.6186791",
"0.6125036",
"0.6098945",
"0.60520667",
"0.60489523",
"0.59902626",
"0.5979188",
"0.5978863",
"0.5975857",
"0.59369344",
"0.5933917",
"0.59292173",
"0.5912686",
"0.58916175",
"0.58772725",
"0.58665335",
"0.58652276",
"0.5856706",
"0.58449394",
"0.5830917",
"0.5823299",
"0.5809409",
"0.5807378",
"0.5770264",
"0.57631063",
"0.5750404",
"0.5749766",
"0.5747522",
"0.5731462",
"0.573102",
"0.56785506",
"0.56413376",
"0.56268966",
"0.56249195",
"0.5611169",
"0.55811256",
"0.5578256",
"0.55748695",
"0.55667555",
"0.5564422",
"0.5545933",
"0.5543366",
"0.5540605",
"0.5532567",
"0.5525999",
"0.552416",
"0.55181336",
"0.55082095",
"0.5504456",
"0.548211",
"0.5480773",
"0.54800683",
"0.54677653",
"0.545958",
"0.5457306",
"0.54548156",
"0.54546505",
"0.5451675",
"0.54468894",
"0.5445337",
"0.54219425",
"0.5420031",
"0.54097116",
"0.53862625",
"0.53847635",
"0.53830546",
"0.53824896",
"0.5381801",
"0.5374665",
"0.5368404",
"0.53653795",
"0.53531873",
"0.5351819",
"0.5348707",
"0.5342225",
"0.5342124",
"0.53388494",
"0.5338564",
"0.5316517",
"0.5312783",
"0.5312728",
"0.53006643",
"0.52850825",
"0.52744687",
"0.5269254",
"0.5267581",
"0.52646023",
"0.5242189",
"0.52259576",
"0.5223061",
"0.5217681",
"0.5215465"
] | 0.7352096 | 0 |
/ Set current vertex to other endpoint of edge with label e outgoing from current vertex, if such edge exists. | public void followEdge(int e) {
for (int i = 0; i < currentVertex.outList.size(); i++) {
Neighbor neighbor = currentVertex.outList.get(i);
if (neighbor.edge == e) {
currentVertex = neighbor.vertex;
return;
}
}
System.out.println("Edge to " + e + " not exist.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addEdgeTo(char v, int e) {\r\n\t\t// does an edge to v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e;\r\n\t\t\t\tfindNeighbor(findVertex(v).inList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.outList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.inList.add(current);\r\n\r\n\t\tedges++;\r\n\t}",
"public void followEdgeInReverse(int e) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.edge == e) {\r\n\t\t\t\tcurrentVertex = neighbor.vertex;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge from \" + e + \" does not exist.\");\r\n\t}",
"public abstract boolean putEdge(Edge incomingEdge);",
"void setEdgeLabel(int edge, String label);",
"void addEdge(Edge e) {\n if (e.getTail().equals(this)) {\n outEdges.put(e.getHead(), e);\n\n return;\n } else if (e.getHead().equals(this)) {\n indegree++;\n inEdges.put(e.getTail(), e);\n\n return;\n }\n\n throw new RuntimeException(\"Cannot add edge that is unrelated to current node.\");\n }",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}",
"public void addEdgeFrom(char v, int e) {\r\n\t\t// does an edge from v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (currentVertex.inList.get(i).vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e; \r\n\t\t\t\tfindNeighbor(findVertex(v).outList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.inList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.outList.add(current);\r\n\r\n\t\tedges++;\r\n\t}",
"void setBestIncoming(E edge);",
"public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }",
"public void crossEdge(Edge e) {}",
"public static void mergeOutEdge(Vertex res, Vertex src) {\n res.outEdges.addAll(src.outEdges);\n }",
"public Edge(Edge other) {\n __isset_bitfield = other.__isset_bitfield;\n this.vertexOrigin = other.vertexOrigin;\n this.vertexDestiny = other.vertexDestiny;\n if (other.isSetDescription()) {\n this.description = other.description;\n }\n this.weight = other.weight;\n this.isDirected = other.isDirected;\n }",
"public void addEdge(Edge e) {\n incident.add(e);\n }",
"public void addEdge(DirectedEdge e) \n {\n int v = e.from();\n adj[v].add(e);\n E++;\n }",
"public void addEdge(Edge e) {\n int v = e.either();\n int w = e.other(v);\n adj[v].add(e);\n adj[w].add(e);\n E++;\n }",
"public void addEdge(Edge e){\n\t\tadjacentEdges.add(e);\n\t}",
"protected void processEdge(Edge e) {\n\t}",
"public void out_ep(Edge e) {\r\n\r\n\t\tif (triangulate == 0 & plot == 1) {\r\n\t\t\tclip_line(e);\r\n\t\t}\r\n\r\n\t\tif (triangulate == 0 & plot == 0) {\r\n\t\t\tSystem.err.printf(\"e %d\", e.edgenbr);\r\n\t\t\tSystem.err.printf(\" %d \", e.ep[le] != null ? e.ep[le].sitenbr : -1);\r\n\t\t\tSystem.err.printf(\"%d\\n\", e.ep[re] != null ? e.ep[re].sitenbr : -1);\r\n\t\t}\r\n\r\n\t}",
"VertexType getOtherVertexFromEdge( EdgeType r, VertexType oneVertex );",
"public void addVirtualEdge(E e){\n\t\tedges.add(e);\n\t\tvirtualEdges.add(e);\n\t}",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge1 = new Edge(v1, v2, edgeInfo);\n Edge edge2 = new Edge(v2, v1, edgeInfo);\n if(!adjLists[v1].contains(edge1)){\n adjLists[v1].addLast(edge1);\n }\n if(!adjLists[v2].contains(edge2)){\n adjLists[v2].addLast(edge2);\n }\n }",
"public void addEdge(Edge e)\r\n\t{\n\t\tint v = e.either(), w = e.other(v);\r\n\t\tadj[v].add(e);\r\n\t\tadj[w].add(e);\r\n\t}",
"public void editEdge(){\n\t}",
"private void edgeUp(String source, String dest) {\r\n\t\tVertex v = vertexMap.get(source);\r\n\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\tif (edge.getDestination().equals(dest))\r\n\t\t\t\tedge.setStatus(true);\r\n\t\t}\r\n\t}",
"public abstract void addEdge(Point p, Direction dir);",
"void addEdge(Edge e) {\n\t\t\tif(!_edges.containsKey(e.makeKey())) {\n\t\t\t\t_edges.put(e.makeKey(),e);\n\t\t\t\te._one.addNeighborEdge(e);\n\t\t\t\te._two.addNeighborEdge(e);\n\t\t\t}\n\t\t}",
"public Edge<V> addEdge(V source, V target);",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"public void addEdge(Edge e){\n\t\tedges.put(e.hashCode(), e);\n\t\te.getHead().addConnection(e);\n\t\te.getTail().addConnection(e);\n\t}",
"public void setEndVertex(int e) {\n\t\tendVertex = e;\n\t}",
"public void findEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"public void setEdge(Student curr, Student neighbor, Integer price) {\n curr.setNeighborAndPrice(neighbor, price);\n }",
"public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }",
"public void addEdge(E e){\n\t\tedges.add(e);\n\t}",
"void setupEdge(EdgeGraph edge) {\n\n\t\tif (UserParameters.socialInteraction) updateCrowdness(edge);\n\t\tcurrentEdge = edge;\n\t\t//transform GeomPlanarGraphEdge in Linestring\n\t\tLineString line = edge.getLine();\n\t\t//index the Linestring\n\t\tsegment = new LengthIndexedLine(line);\n\t\tstartIndex = segment.getStartIndex();\n\t\tendIndex = segment.getEndIndex();\n\t\tlinkDirection = 1;\n\n\t\t// check to ensure that Agent is moving in the right direction (direction)\n\t\tdouble distanceToStart = line.getStartPoint().distance(agentLocation.geometry);\n\t\tdouble distanceToEnd = line.getEndPoint().distance(agentLocation.geometry);\n\n\t\tif (distanceToStart <= distanceToEnd) {\n\t\t\t// closer to start\n\t\t\tcurrentIndex = startIndex;\n\t\t\tlinkDirection = 1;\n\t\t}\n\t\telse if (distanceToEnd < distanceToStart) {\n\t\t\t// closer to end\n\t\t\tcurrentIndex = endIndex;\n\t\t\tlinkDirection = -1;\n\t\t}\n\n\t}",
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finish vertex too \n if(!edge.isDirected()){\n Long finish = edge.getFinish();\n Vertex fVertex = vertexes.get(finish);\n if(fVertex != null){\n fVertex.addEdge(edge, false);\n }\n }\n }\n \n }",
"void addEdge(Edge e) {\n edges.add(e);\n addVerticle(e.v1);\n addVerticle(e.v2);\n }",
"public Edge(Vertex in_pointOne, Vertex in_pointTwo){\n\t\tthis.pointOne = in_pointOne;\n\t\tthis.pointTwo = in_pointTwo;\n\t}",
"@Override\n\tpublic void addEdge(Location src, Location dest, Path edge) {\n\t\tint i = locations.indexOf(src);\n\t\tpaths.get(locations.indexOf(src)).add(edge);\n\t}",
"public void addEdge(StubEdge e) {\n }",
"private void addUndirectedEdge(int i, int j) {\n\t\tNode first = nodeList.get(i-1);\r\n\t\tNode second = nodeList.get(j-1);\r\n//\t\tSystem.out.println(first.name);\r\n//\t\tSystem.out.println(second.name);\r\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\r\n\t\tsecond.getNeighbors().add(first);\r\n\t}",
"public void addEdge(Vertex other) {\n edges.add(other);\n other.edges.add(this);\n }",
"void downgradeLastEdge();",
"public void makeEdgeUp( String sourceName, String destName)\n {\n Vertex v = vertexMap.get( sourceName );\n Vertex w = vertexMap.get( destName );\n if(v!=null && w!=null)\n \tv.adjEdge.get(w.name).isDown =false;\n else if(v==null){\n \tSystem.out.println(\"Invalid Source vertex\");\n }\n else if(w==null){\n \tSystem.out.println(\"Invalid dest vertex\");\n }\n \n // v.weightnext.put(w.name,(Double) distance);\n }",
"boolean addEdge(E edge);",
"void addEdge(int x, int y);",
"public void addEdge(Edge e){\n edgeList.add(e);\n }",
"public void addEdge(Edge e) {\r\n int v = e.from();\r\n int w = e.to();\r\n validateVertex(v);\r\n validateVertex(w);\r\n adj[v].add(e);\r\n indegree[w]++;\r\n E++;\r\n }",
"private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }",
"public void addEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge = new Edge(v1, v2, edgeInfo);\n if(adjLists[v1].contains(edge)){\n return;\n }\n adjLists[v1].addLast(edge);\n }",
"public void makeEdgeDown( String sourceName, String destName)\n {\n \tVertex v = vertexMap.get( sourceName );\n Vertex w = vertexMap.get( destName );\n if(v!=null && w!=null)\n \tv.adjEdge.get(w.name).isDown =true;\n else if(v==null){\n \tSystem.out.println(\"Invalid Source vertex\");\n }\n else if(w==null){\n \tSystem.out.println(\"Invalid dest vertex\");\n }\n // v.weightnext.put(w.name,(Double) distance);\n }",
"public void addEdge(DocTokenInf newEdge) {\n\t\tlist[newEdge.end].put(newEdge);\n\t}",
"public void addEOGEdge(Node prev, Node next) {\n prev.getNextEOG().add(next);\n next.getPrevEOG().add(prev);\n }",
"protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"public void addEdge(Node from, Node to);",
"private void edgeDown(String source, String dest) {\r\n\t\tVertex v = vertexMap.get(source);\r\n\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\tif (edge.getDestination().equals(dest))\r\n\t\t\t\tedge.setStatus(false);\r\n\t\t}\r\n\t}",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \taddEdge(v1, v2, edgeInfo);\n \taddEdge(v2, v1, edgeInfo);\n \t\n }",
"EdgeNode(VertexNode correspondingVertex){\n setCorrespondingVertex(correspondingVertex);\n }",
"Edge createEdge(Vertex src, Vertex tgt, boolean directed);",
"public void setEdgeDirecter( EdgeDirecter directer )\n \t{\n \t\tedgeDirecter = directer;\n \t}",
"public void removeEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\t// remove from neighbor's inList\r\n\t\t\t\tneighbor.vertex.inList.remove(findNeighbor(neighbor.vertex.inList, currentVertex.label)); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\tcurrentVertex.outList.remove(neighbor); // remove from current's outList\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge to \" + v + \" does not exist.\");\r\n\t}",
"public void setEdge(IEdge<?> edge) {\n\t\tthis.edge = edge;\n\t}",
"public Edge(){\n\t\tvertices = null;\n\t\tnext = this;\n\t\tprev = this;\n\t\tpartner = null;\n\t\tweight = 0;\n\t}",
"void addEdge(int source, int destination, int weight);",
"public void addEdge(int start, int end);",
"public void addUndirectedEdge(int v1, int v2) {\r\n addUndirectedEdge(v1, v2, null);\r\n }",
"public void setSingleLinkOutTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkOut(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkOut(vertex, labels);\n\t}",
"public void edgeTailChanged(GraphEvent e);",
"public E addEdge(V tail, V head);",
"boolean addEdge(V v, V w);",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"public void addEdge(edge_type edge) {\n //first make sure the from and to nodes exist within the graph\n assert (edge.getFrom() < nextNodeIndex) && (edge.getTo() < nextNodeIndex) :\n \"<SparseGraph::AddEdge>: invalid node index\";\n\n //make sure both nodes are active before adding the edge\n if ((nodeVector.get(edge.getTo()).getIndex() != invalid_node_index)\n && (nodeVector.get(edge.getFrom()).getIndex() != invalid_node_index)) {\n //add the edge, first making sure it is unique\n if (isEdgeNew(edge.getFrom(), edge.getTo())) {\n edgeListVector.get(edge.getFrom()).add(edge);\n }\n\n //if the graph is undirected we must add another connection in the opposite\n //direction\n if (!isDirectedGraph) {\n //check to make sure the edge is unique before adding\n if (isEdgeNew(edge.getTo(), edge.getFrom())) {\n GraphEdge reversedEdge = new GraphEdge(edge.getTo(),edge.getFrom(),edge.getCost());\n edgeListVector.get(edge.getTo()).add(reversedEdge);\n }\n }\n }\n }",
"public void addEdge( EdgeIntf edge ) throws Exception {\r\n DirectedEdge dEdge = ( DirectedEdge ) edge;\r\n Vertex fromVertex = dEdge.getSource();\r\n Vertex toVertex = dEdge.getSink();\r\n\r\n if( !isPath( toVertex, fromVertex ))\r\n super.addEdge( dEdge );\r\n else\r\n throw new CycleException();\r\n }",
"public void setEdge(int v1, int v2, int weight) {\n LinkedList<Integer> tmp = adjList.elementAt(v1);\n if(adjList.elementAt(v1).contains(v2) == false) {\n tmp.add(v2);\n adjList.set(v1, tmp);\n totalEdges ++;\n LinkedList<Integer> tmp2 = adjWeight.elementAt(v1);\n tmp2.add(weight);\n adjWeight.set(v1, tmp2);\n }\n }",
"public Edge<E, V> getUnderlyingEdge();",
"Edge inverse() {\n return bond.inverse().edge(u, v);\n }",
"public void setEdge(int n1, int n2){\n\t\tif(outOfBounds(n1) || outOfBounds(n2))// if node indexes are bad return\n\t\t\treturn ;\n\t\t\n if((dGraph.getElement(n1, n2)) == 1){\n\t\t\treturn;\n\t}\n\t\tdGraph.setElement(n1, n2, 1); //shows that there is an edge going from n1 to n2\n\t\tdGraphin.setElement(n2, n1, 1);// show the edges going into n2\n\t\toutdegree[n1]++;\n\t\tindegree[n2]++;\n\t\t\n\t}",
"public void addUndirectedEdge(int vertexOne, int vertexTwo) {\n\t\tGraphNode first = nodeList.get(vertexOne - 1);\n\t\tGraphNode second = nodeList.get(vertexTwo - 1);\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\n\t\tsecond.getNeighbors().add(first);//Neighbour of second is first. Store it.\n\t\tSystem.out.println(first.getNeighbors());\n\t\tSystem.out.println(second.getNeighbors());\n\t}",
"public void setTo(Vertex<VV> vertex)\r\n { this.to = vertex; }",
"public void treeEdge(Edge e) {}",
"public void removeEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\t// remove from neighbor's outList\r\n\t\t\t\tneighbor.vertex.outList.remove(findNeighbor(neighbor.vertex.outList, currentVertex.label)); \t\t\r\n\t\t\t\tcurrentVertex.inList.remove(neighbor); // remove from current's inList\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Edge from \" + v + \" does not exist.\");\r\n\t}",
"public void addEdge(DirectedEdge edge){\r\n\t\tmEdgeList.offer(edge);\r\n\t\t\r\n\t\tint src=edge.from();\r\n\t\tint dest = edge.to();\r\n\t\t\r\n\t\tmVisitStatus.put(src,false);\r\n\t\tmVisitStatus.put(dest,false);\r\n\t\t\r\n\t\tmVertexList.add(src);\r\n\t\tmVertexList.add(dest);\r\n\t\t\r\n\t\t/* Forward Edge */\r\n\t\tList<DirectedEdge> edgeList = adjList.get(src);\r\n\t\tif(edgeList==null)\r\n\t\t\tedgeList = new ArrayList<DirectedEdge>();\r\n\t\t\r\n\t\tedgeList.add(edge);\r\n\t\tadjList.put(src, edgeList);\r\n\t}",
"public abstract void removeEdge(Point p, Direction dir);",
"public void setEdge(int start, int target){\n\t\tthis.graph.elementAt(start).insert(target);\n\t}",
"public Edge<V> getEdge(V source, V target);",
"private final void addEdge(int v1, int v2, float weight) {\n if (nEdges >= edgeWeights.length) {\n edgeWeights = Arrays.copyOf(edgeWeights, edgeWeights.length*2);\n }\n int edgeIndex = nEdges;\n\n // add edge to v1\n int v1Index;\n {\n v1Index = nOutgoingEdgess[v1];\n if (v1Index >= outgoingEdgess[v1].length) {\n int newLength = outgoingEdgess[v1].length*2;\n outgoingEdgess[v1] = Arrays.copyOf(outgoingEdgess[v1], newLength);\n outgoingEdgeIndexess[v1] = Arrays.copyOf(outgoingEdgeIndexess[v1], newLength);\n outgoingEdgeIsMarkeds[v1] = Arrays.copyOf(outgoingEdgeIsMarkeds[v1], newLength);\n outgoingEdgeOppositeIndexess[v1] = Arrays.copyOf(outgoingEdgeOppositeIndexess[v1], newLength);\n }\n outgoingEdgess[v1][v1Index] = v2;\n outgoingEdgeIndexess[v1][v1Index] = edgeIndex;\n nOutgoingEdgess[v1]++;\n }\n\n // add edge to v2\n int v2Index;\n {\n v2Index = nOutgoingEdgess[v2];\n if (v2Index >= outgoingEdgess[v2].length) {\n int newLength = outgoingEdgess[v2].length*2;\n outgoingEdgess[v2] = Arrays.copyOf(outgoingEdgess[v2], newLength);\n outgoingEdgeIndexess[v2] = Arrays.copyOf(outgoingEdgeIndexess[v2], newLength);\n outgoingEdgeIsMarkeds[v2] = Arrays.copyOf(outgoingEdgeIsMarkeds[v2], newLength);\n outgoingEdgeOppositeIndexess[v2] = Arrays.copyOf(outgoingEdgeOppositeIndexess[v2], newLength);\n }\n outgoingEdgess[v2][v2Index] = v1;\n outgoingEdgeIndexess[v2][v2Index] = edgeIndex;\n nOutgoingEdgess[v2]++;\n }\n\n outgoingEdgeOppositeIndexess[v1][v1Index] = v2Index;\n outgoingEdgeOppositeIndexess[v2][v2Index] = v1Index;\n \n edgeWeights[nEdges] = weight;\n ++nEdges;\n }",
"public static de.hpi.msd.salsa.serde.avro.Edge.Builder newBuilder(de.hpi.msd.salsa.serde.avro.Edge other) {\n return new de.hpi.msd.salsa.serde.avro.Edge.Builder(other);\n }",
"public void removeEdge(Position ep) throws InvalidPositionException;",
"public interface Edge\n{\n\t/**\n\t * Returns the node that the <i>head</i> of the head\n\t * is connected to.\n\t * @return The head Node.\n\t */\n\tpublic Node getHeadNode();\n\n\t/**\n\t * Returns the node that the <i>tail</i> of the edge\n\t * is connected to.\n\t * @return The tail Node.\n\t */\n\tpublic Node getTailNode();\n\n\t/**\n\t * Allows an object to be associated with the <code>Edge</code>\n\t * @param o The object to be set as the userObject\n\t */\n\tpublic void setUserObject(Object o);\n\n\t/**\n\t * Gets the userObject, previously set with <code>setUserObject(Object o)</code>\n\t * @return The userObject, or <code>null</code> if no object has been set.\n\t */\n\tpublic Object getUserObject();\n\n\t/**\n\t * Causes any information in the path that represents the <code>Egde</code>\n\t * to be cleared, such as origin location and any control points.\n\t */\n\tpublic void resetPath();\n\n\t/**\n\t * Sets the location of the start of the path that represents\n\t * the <code>Edge</code>.\n\t * @param x The horizontal location.\n\t * @param y The vertical location.\n\t */\n\tpublic void setPathOrigin(int x, int y);\n\n\t/**\n\t * Extends the <code>Edge</code> using the following control points to\n\t * form a Bezier curve extension to the end point (x3, y3).\n\t * @param x1 Horizontal location of control point 1\n\t * @param y1 Vertical location of control point 1\n\t * @param x2 Horizontal location of control point 2\n\t * @param y2 Vertical location of control point 2\n\t * @param x3 Horizontal location of the end point.\n\t * @param y3 Vertical location of the end point.\n\t */\n\tpublic void pathTo(int x1, int y1, int x2, int y2, int x3, int y3);\n\n\t/**\n\t * Extends the <code>Edge</code> to the specified location using\n\t * a straight line.\n\t * @param x The horizontal location of the end point.\n\t * @param y The vertical location of the end point.\n\t */\n\tpublic void pathTo(int x, int y);\n\n\t/**\n\t * Sets the <code>Edge's</code> arrowhead.\n\t * @param baseX The x location of the centre of the arrowhead baseline.\n\t * @param baseY The y location of the centre of the arrowhead tip.\n\t * @param tipX The x location of the tip of the arrowhead.\n\t * @param tipY The y location of the tip of the arrowhead.\n\t */\n\tpublic void setArrowHead(int baseX, int baseY, int tipX, int tipY);\n\n\t/**\n\t * Sets the <code>Edge's</code> arrowtail\n\t * @param baseX The x location of the centre of the arrowhead baseline.\n\t * @param baseY The y location of the centre of the arrowhead tip.\n\t * @param tipX The x location of the tip of the arrowhead.\n\t * @param tipY The y location of the tip of the arrowhead.\n\t */\n\tpublic void setArrowTail(int baseX, int baseY, int tipX, int tipY);\n\n\t/**\n\t * Sets the <code>Edge</code>'s label position.\n\t * @param x The horizontal location (in pixels).\n\t * @param y The vertical location (in pixels).\n\t */\n\tpublic void setLabelPosition(int x, int y);\n\n\t/**\n\t * Retrieves the position of the <code>Edge's</code> label.\n\t * @return A <code>Point</code> containing the position of\n\t * the label.\n\t */\n\tpublic Point getLabelPosition();\n\n\t/**\n\t * Gets the <code>Shape</code> that represents the <code>Edge</code>.\n\t * @return The <code>Shape</code> of the <code>Edge</code>.\n\t */\n\tpublic Shape getShape();\n\n\t/**\n\t * Gets the direction of the <code>Edge</code>. This is one of the\n\t * predefined direction from the <code>GraphModel</code> interface.\n\t * @return The direction of the <code>Edge</code>.\n\t */\n\tpublic int getDirection();\n\n\n}",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"public void addEdge(int start, int end, double weight);",
"public boolean hasEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void edgeHeadChanged(GraphEvent e);",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\r\n \tmyAdjLists[v1].add(new Edge(v1, v2, edgeInfo));\r\n \tmyAdjLists[v2].add(new Edge(v2, v1, edgeInfo));\r\n }",
"protected void attachEdgeTargetAnchor(String edge, String oldTargetPin, String targetPin) {\n ((ConnectionWidget) findWidget(edge)).setTargetAnchor(getPinAnchor(targetPin));\n }",
"private void pressedEdge(MouseEvent e) {\r\n if (e.getModifiers() >= MouseEvent.BUTTON1_MASK) {\r\n /* Click on a node */\r\n if (graphX.nodesContains(e.getPoint()) == true) {\r\n /* Set the first point in the tool */\r\n edgeTool.setFirstPoint(e.getPoint());\r\n }\r\n }\r\n }"
] | [
"0.6633826",
"0.64578766",
"0.6456439",
"0.6414332",
"0.6355611",
"0.6170315",
"0.6169539",
"0.6159715",
"0.615304",
"0.61495936",
"0.60937905",
"0.6062364",
"0.6057599",
"0.60348356",
"0.59956634",
"0.5973573",
"0.5925298",
"0.5903416",
"0.59019375",
"0.5895465",
"0.5889922",
"0.5885584",
"0.5879394",
"0.58792746",
"0.5874827",
"0.58599263",
"0.583249",
"0.5827441",
"0.582494",
"0.58240986",
"0.5798923",
"0.5780813",
"0.57680964",
"0.5762767",
"0.5762273",
"0.5744132",
"0.5729734",
"0.5712176",
"0.5706531",
"0.57031137",
"0.5700825",
"0.5698347",
"0.56942225",
"0.5693353",
"0.5689423",
"0.5680663",
"0.5668301",
"0.5668105",
"0.5666272",
"0.5661118",
"0.56591856",
"0.56545407",
"0.5650005",
"0.5648647",
"0.5637466",
"0.5636506",
"0.56342065",
"0.5627649",
"0.56268847",
"0.56263345",
"0.56226426",
"0.56169266",
"0.5616919",
"0.56012774",
"0.55980426",
"0.5597549",
"0.55974954",
"0.5597117",
"0.55961853",
"0.5590477",
"0.5577585",
"0.5563227",
"0.55632186",
"0.55632186",
"0.5539615",
"0.5535153",
"0.55343187",
"0.55209273",
"0.55203277",
"0.5506831",
"0.5503718",
"0.5490116",
"0.5489927",
"0.5486198",
"0.548383",
"0.5475778",
"0.54601145",
"0.5458759",
"0.5454582",
"0.5453012",
"0.5438911",
"0.54292613",
"0.5425124",
"0.5421821",
"0.54183245",
"0.5407713",
"0.5406781",
"0.54062563",
"0.5398357",
"0.53906906"
] | 0.68899906 | 0 |
/ Set current vertex to other endpoint of edge with label e incoming to current vertex, if such edge exists. | public void followEdgeInReverse(int e) {
for (int i = 0; i < currentVertex.inList.size(); i++) {
Neighbor neighbor = currentVertex.inList.get(i);
if (neighbor.edge == e) {
currentVertex = neighbor.vertex;
return;
}
}
System.out.println("Edge from " + e + " does not exist.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void followEdge(int e) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.edge == e) {\r\n\t\t\t\tcurrentVertex = neighbor.vertex;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge to \" + e + \" not exist.\");\r\n\t}",
"void addEdgeTo(char v, int e) {\r\n\t\t// does an edge to v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e;\r\n\t\t\t\tfindNeighbor(findVertex(v).inList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.outList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.inList.add(current);\r\n\r\n\t\tedges++;\r\n\t}",
"void setEdgeLabel(int edge, String label);",
"public void addEdgeFrom(char v, int e) {\r\n\t\t// does an edge from v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (currentVertex.inList.get(i).vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e; \r\n\t\t\t\tfindNeighbor(findVertex(v).outList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.inList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.outList.add(current);\r\n\r\n\t\tedges++;\r\n\t}",
"public abstract boolean putEdge(Edge incomingEdge);",
"void setBestIncoming(E edge);",
"void addEdge(Edge e) {\n if (e.getTail().equals(this)) {\n outEdges.put(e.getHead(), e);\n\n return;\n } else if (e.getHead().equals(this)) {\n indegree++;\n inEdges.put(e.getTail(), e);\n\n return;\n }\n\n throw new RuntimeException(\"Cannot add edge that is unrelated to current node.\");\n }",
"public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }",
"void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}",
"public void addEdge(Edge e) {\n incident.add(e);\n }",
"VertexType getOtherVertexFromEdge( EdgeType r, VertexType oneVertex );",
"protected void processEdge(Edge e) {\n\t}",
"public void addEdge(Edge e) {\n int v = e.either();\n int w = e.other(v);\n adj[v].add(e);\n adj[w].add(e);\n E++;\n }",
"public void addEdge(Edge e){\n\t\tedges.put(e.hashCode(), e);\n\t\te.getHead().addConnection(e);\n\t\te.getTail().addConnection(e);\n\t}",
"public void setEdge(Student curr, Student neighbor, Integer price) {\n curr.setNeighborAndPrice(neighbor, price);\n }",
"public void addEdge(Edge e)\r\n\t{\n\t\tint v = e.either(), w = e.other(v);\r\n\t\tadj[v].add(e);\r\n\t\tadj[w].add(e);\r\n\t}",
"public void addEdge(Edge e){\n\t\tadjacentEdges.add(e);\n\t}",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"void setupEdge(EdgeGraph edge) {\n\n\t\tif (UserParameters.socialInteraction) updateCrowdness(edge);\n\t\tcurrentEdge = edge;\n\t\t//transform GeomPlanarGraphEdge in Linestring\n\t\tLineString line = edge.getLine();\n\t\t//index the Linestring\n\t\tsegment = new LengthIndexedLine(line);\n\t\tstartIndex = segment.getStartIndex();\n\t\tendIndex = segment.getEndIndex();\n\t\tlinkDirection = 1;\n\n\t\t// check to ensure that Agent is moving in the right direction (direction)\n\t\tdouble distanceToStart = line.getStartPoint().distance(agentLocation.geometry);\n\t\tdouble distanceToEnd = line.getEndPoint().distance(agentLocation.geometry);\n\n\t\tif (distanceToStart <= distanceToEnd) {\n\t\t\t// closer to start\n\t\t\tcurrentIndex = startIndex;\n\t\t\tlinkDirection = 1;\n\t\t}\n\t\telse if (distanceToEnd < distanceToStart) {\n\t\t\t// closer to end\n\t\t\tcurrentIndex = endIndex;\n\t\t\tlinkDirection = -1;\n\t\t}\n\n\t}",
"public void addEdge(DirectedEdge e) \n {\n int v = e.from();\n adj[v].add(e);\n E++;\n }",
"void addEdge(Edge e) {\n\t\t\tif(!_edges.containsKey(e.makeKey())) {\n\t\t\t\t_edges.put(e.makeKey(),e);\n\t\t\t\te._one.addNeighborEdge(e);\n\t\t\t\te._two.addNeighborEdge(e);\n\t\t\t}\n\t\t}",
"public void addVirtualEdge(E e){\n\t\tedges.add(e);\n\t\tvirtualEdges.add(e);\n\t}",
"public void editEdge(){\n\t}",
"public void addEdge(E e){\n\t\tedges.add(e);\n\t}",
"public Edge(Edge other) {\n __isset_bitfield = other.__isset_bitfield;\n this.vertexOrigin = other.vertexOrigin;\n this.vertexDestiny = other.vertexDestiny;\n if (other.isSetDescription()) {\n this.description = other.description;\n }\n this.weight = other.weight;\n this.isDirected = other.isDirected;\n }",
"void addEdge(Edge e) {\n edges.add(e);\n addVerticle(e.v1);\n addVerticle(e.v2);\n }",
"EdgeNode(VertexNode correspondingVertex){\n setCorrespondingVertex(correspondingVertex);\n }",
"public void addEdge(Edge e){\n edgeList.add(e);\n }",
"public void addEdge(Vertex other) {\n edges.add(other);\n other.edges.add(this);\n }",
"public void crossEdge(Edge e) {}",
"public void addEdge(Edge e) {\r\n int v = e.from();\r\n int w = e.to();\r\n validateVertex(v);\r\n validateVertex(w);\r\n adj[v].add(e);\r\n indegree[w]++;\r\n E++;\r\n }",
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finish vertex too \n if(!edge.isDirected()){\n Long finish = edge.getFinish();\n Vertex fVertex = vertexes.get(finish);\n if(fVertex != null){\n fVertex.addEdge(edge, false);\n }\n }\n }\n \n }",
"boolean addEdge(E edge);",
"@Override\n\tpublic void addEdge(Location src, Location dest, Path edge) {\n\t\tint i = locations.indexOf(src);\n\t\tpaths.get(locations.indexOf(src)).add(edge);\n\t}",
"public void addEdge(StubEdge e) {\n }",
"private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }",
"public void edgeHeadChanged(GraphEvent e);",
"public Edge(Vertex in_pointOne, Vertex in_pointTwo){\n\t\tthis.pointOne = in_pointOne;\n\t\tthis.pointTwo = in_pointTwo;\n\t}",
"public abstract void addEdge(Point p, Direction dir);",
"public void setEdge(IEdge<?> edge) {\n\t\tthis.edge = edge;\n\t}",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge1 = new Edge(v1, v2, edgeInfo);\n Edge edge2 = new Edge(v2, v1, edgeInfo);\n if(!adjLists[v1].contains(edge1)){\n adjLists[v1].addLast(edge1);\n }\n if(!adjLists[v2].contains(edge2)){\n adjLists[v2].addLast(edge2);\n }\n }",
"public void addEdge( EdgeIntf edge ) throws Exception {\r\n DirectedEdge dEdge = ( DirectedEdge ) edge;\r\n Vertex fromVertex = dEdge.getSource();\r\n Vertex toVertex = dEdge.getSink();\r\n\r\n if( !isPath( toVertex, fromVertex ))\r\n super.addEdge( dEdge );\r\n else\r\n throw new CycleException();\r\n }",
"private void updateEdgeInfor(int index, int preWordIndex, String word, String preWord) {\n \tif (index == preWordIndex || word == preWord)\n \t\treturn;\n if (!nodes.get(index).inlinks.containsKey(preWordIndex))\n nodes.get(index).inlinks.put(preWordIndex, 1);\n else {\n \tint vOld = nodes.get(index).inlinks.get(preWordIndex);\n \tnodes.get(index).inlinks.put(preWordIndex, vOld + 1);\n }\n if (!nodes.get(preWordIndex).outlinks.containsKey(index))\n nodes.get(preWordIndex).outlinks.put(index, 1);\n else {\n \tint vOld = nodes.get(preWordIndex).outlinks.get(index);\n \tnodes.get(preWordIndex).outlinks.put(index, vOld + 1);\n }\n nodes.get(index).inlinkCount++;\n nodes.get(preWordIndex).outlinkCount++;\n }",
"public Edge<V> addEdge(V source, V target);",
"private void pressedEdge(MouseEvent e) {\r\n if (e.getModifiers() >= MouseEvent.BUTTON1_MASK) {\r\n /* Click on a node */\r\n if (graphX.nodesContains(e.getPoint()) == true) {\r\n /* Set the first point in the tool */\r\n edgeTool.setFirstPoint(e.getPoint());\r\n }\r\n }\r\n }",
"public void addIncomingEdge(Edge e) {\n\t\tincomingEdges.add(e);\n\t\tconnectedNodes.add(e.getStart());\n\t\taddIncomingWeight(e.getWeight());\n\t}",
"public void addEdge(DocTokenInf newEdge) {\n\t\tlist[newEdge.end].put(newEdge);\n\t}",
"public void setEdge(int start, int target){\n\t\tthis.graph.elementAt(start).insert(target);\n\t}",
"protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }",
"public void setEndVertex(int e) {\n\t\tendVertex = e;\n\t}",
"public Edge(){\n\t\tvertices = null;\n\t\tnext = this;\n\t\tprev = this;\n\t\tpartner = null;\n\t\tweight = 0;\n\t}",
"public void setEdge(int v1, int v2, int weight) {\n LinkedList<Integer> tmp = adjList.elementAt(v1);\n if(adjList.elementAt(v1).contains(v2) == false) {\n tmp.add(v2);\n adjList.set(v1, tmp);\n totalEdges ++;\n LinkedList<Integer> tmp2 = adjWeight.elementAt(v1);\n tmp2.add(weight);\n adjWeight.set(v1, tmp2);\n }\n }",
"public void edgeTailChanged(GraphEvent e);",
"void addEdge(int x, int y);",
"public void addEdge(int start, int end);",
"public void addEdge(edge_type edge) {\n //first make sure the from and to nodes exist within the graph\n assert (edge.getFrom() < nextNodeIndex) && (edge.getTo() < nextNodeIndex) :\n \"<SparseGraph::AddEdge>: invalid node index\";\n\n //make sure both nodes are active before adding the edge\n if ((nodeVector.get(edge.getTo()).getIndex() != invalid_node_index)\n && (nodeVector.get(edge.getFrom()).getIndex() != invalid_node_index)) {\n //add the edge, first making sure it is unique\n if (isEdgeNew(edge.getFrom(), edge.getTo())) {\n edgeListVector.get(edge.getFrom()).add(edge);\n }\n\n //if the graph is undirected we must add another connection in the opposite\n //direction\n if (!isDirectedGraph) {\n //check to make sure the edge is unique before adding\n if (isEdgeNew(edge.getTo(), edge.getFrom())) {\n GraphEdge reversedEdge = new GraphEdge(edge.getTo(),edge.getFrom(),edge.getCost());\n edgeListVector.get(edge.getTo()).add(reversedEdge);\n }\n }\n }\n }",
"public E addEdge(V tail, V head);",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"void updateEdgeData(EdgeGraph edge) {\n\t\tedge = PedSimCity.edgesMap.get(edge.getID()); //in case it was a subgraph edge\n\t\tif (UserParameters.empiricalABM) edge.densities.replace(agp.groupName, edge.densities.get(agp.groupName)+1);\n\t\telse edge.densities.replace(ap.routeChoice, edge.densities.get(ap.routeChoice)+1);\n\t}",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \taddEdge(v1, v2, edgeInfo);\n \taddEdge(v2, v1, edgeInfo);\n \t\n }",
"void addEdge(int source, int destination, int weight);",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"public void addEdge(DirectedEdge edge){\r\n\t\tmEdgeList.offer(edge);\r\n\t\t\r\n\t\tint src=edge.from();\r\n\t\tint dest = edge.to();\r\n\t\t\r\n\t\tmVisitStatus.put(src,false);\r\n\t\tmVisitStatus.put(dest,false);\r\n\t\t\r\n\t\tmVertexList.add(src);\r\n\t\tmVertexList.add(dest);\r\n\t\t\r\n\t\t/* Forward Edge */\r\n\t\tList<DirectedEdge> edgeList = adjList.get(src);\r\n\t\tif(edgeList==null)\r\n\t\t\tedgeList = new ArrayList<DirectedEdge>();\r\n\t\t\r\n\t\tedgeList.add(edge);\r\n\t\tadjList.put(src, edgeList);\r\n\t}",
"public void setEdgeDirecter( EdgeDirecter directer )\n \t{\n \t\tedgeDirecter = directer;\n \t}",
"public void addEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge = new Edge(v1, v2, edgeInfo);\n if(adjLists[v1].contains(edge)){\n return;\n }\n adjLists[v1].addLast(edge);\n }",
"Edge createEdge(Vertex src, Vertex tgt, boolean directed);",
"void addEdge(Vertex u, Vertex v) {\r\n\t\tu.addNeighbor(v);\r\n\t}",
"boolean addEdge(V v, V w);",
"public void addEOGEdge(Node prev, Node next) {\n prev.getNextEOG().add(next);\n next.getPrevEOG().add(prev);\n }",
"public void out_ep(Edge e) {\r\n\r\n\t\tif (triangulate == 0 & plot == 1) {\r\n\t\t\tclip_line(e);\r\n\t\t}\r\n\r\n\t\tif (triangulate == 0 & plot == 0) {\r\n\t\t\tSystem.err.printf(\"e %d\", e.edgenbr);\r\n\t\t\tSystem.err.printf(\" %d \", e.ep[le] != null ? e.ep[le].sitenbr : -1);\r\n\t\t\tSystem.err.printf(\"%d\\n\", e.ep[re] != null ? e.ep[re].sitenbr : -1);\r\n\t\t}\r\n\r\n\t}",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"Edge(Vertex u, Vertex v) {\n From = u;\n To = v;\n\n }",
"private void edgeUp(String source, String dest) {\r\n\t\tVertex v = vertexMap.get(source);\r\n\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\tif (edge.getDestination().equals(dest))\r\n\t\t\t\tedge.setStatus(true);\r\n\t\t}\r\n\t}",
"public void addEdge(int start, int end, double weight);",
"public void addEdge(Node from, Node to);",
"public void findEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"void add(Edge edge);",
"public void treeEdge(Edge e) {}",
"protected void attachEdgeTargetAnchor(String edge, String oldTargetPin, String targetPin) {\n ((ConnectionWidget) findWidget(edge)).setTargetAnchor(getPinAnchor(targetPin));\n }",
"protected void attachEdgeSourceAnchor(String edge, String oldSourcePin, String sourcePin) {\n ((ConnectionWidget) findWidget(edge)).setSourceAnchor(getPinAnchor(sourcePin));\n }",
"public void setTo(Vertex<VV> vertex)\r\n { this.to = vertex; }",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public void makeEdgeUp( String sourceName, String destName)\n {\n Vertex v = vertexMap.get( sourceName );\n Vertex w = vertexMap.get( destName );\n if(v!=null && w!=null)\n \tv.adjEdge.get(w.name).isDown =false;\n else if(v==null){\n \tSystem.out.println(\"Invalid Source vertex\");\n }\n else if(w==null){\n \tSystem.out.println(\"Invalid dest vertex\");\n }\n \n // v.weightnext.put(w.name,(Double) distance);\n }",
"public boolean addEdge(Edge e) {\n return g.addNode(e.getSrc())&&g.addNode(e.getDst())&&g.addEdge(e.getSrc(),e.getDst());\n }",
"protected void addEdge(IEdge edge) {\n\n if (edge != null) {\n\n this.ids.add(edge.getID());\n this.edgeMap.put(edge.getID(), edge);\n }\n }",
"public static void mergeOutEdge(Vertex res, Vertex src) {\n res.outEdges.addAll(src.outEdges);\n }",
"public void addUndirectedEdge(int v1, int v2) {\r\n addUndirectedEdge(v1, v2, null);\r\n }",
"void addEdge(JNode edge) {\n List<JNode> newEdges = this.getEdges();\n newEdges.add(edge);\n this.setEdges(newEdges);\n }",
"public void setNext(Vertex next) {\n\t\tthis.next = next;\n\t}",
"public Builder setEdge(\n int index, uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge value) {\n if (edgeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureEdgeIsMutable();\n edge_.set(index, value);\n onChanged();\n } else {\n edgeBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public boolean inSamePseudoNode(Edge e) {\n\t\tthrow new RuntimeException(\"Unimplemented\");\r\n\t}",
"private void addUndirectedEdge(int i, int j) {\n\t\tNode first = nodeList.get(i-1);\r\n\t\tNode second = nodeList.get(j-1);\r\n//\t\tSystem.out.println(first.name);\r\n//\t\tSystem.out.println(second.name);\r\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\r\n\t\tsecond.getNeighbors().add(first);\r\n\t}",
"public interface Edge\n{\n\t/**\n\t * Returns the node that the <i>head</i> of the head\n\t * is connected to.\n\t * @return The head Node.\n\t */\n\tpublic Node getHeadNode();\n\n\t/**\n\t * Returns the node that the <i>tail</i> of the edge\n\t * is connected to.\n\t * @return The tail Node.\n\t */\n\tpublic Node getTailNode();\n\n\t/**\n\t * Allows an object to be associated with the <code>Edge</code>\n\t * @param o The object to be set as the userObject\n\t */\n\tpublic void setUserObject(Object o);\n\n\t/**\n\t * Gets the userObject, previously set with <code>setUserObject(Object o)</code>\n\t * @return The userObject, or <code>null</code> if no object has been set.\n\t */\n\tpublic Object getUserObject();\n\n\t/**\n\t * Causes any information in the path that represents the <code>Egde</code>\n\t * to be cleared, such as origin location and any control points.\n\t */\n\tpublic void resetPath();\n\n\t/**\n\t * Sets the location of the start of the path that represents\n\t * the <code>Edge</code>.\n\t * @param x The horizontal location.\n\t * @param y The vertical location.\n\t */\n\tpublic void setPathOrigin(int x, int y);\n\n\t/**\n\t * Extends the <code>Edge</code> using the following control points to\n\t * form a Bezier curve extension to the end point (x3, y3).\n\t * @param x1 Horizontal location of control point 1\n\t * @param y1 Vertical location of control point 1\n\t * @param x2 Horizontal location of control point 2\n\t * @param y2 Vertical location of control point 2\n\t * @param x3 Horizontal location of the end point.\n\t * @param y3 Vertical location of the end point.\n\t */\n\tpublic void pathTo(int x1, int y1, int x2, int y2, int x3, int y3);\n\n\t/**\n\t * Extends the <code>Edge</code> to the specified location using\n\t * a straight line.\n\t * @param x The horizontal location of the end point.\n\t * @param y The vertical location of the end point.\n\t */\n\tpublic void pathTo(int x, int y);\n\n\t/**\n\t * Sets the <code>Edge's</code> arrowhead.\n\t * @param baseX The x location of the centre of the arrowhead baseline.\n\t * @param baseY The y location of the centre of the arrowhead tip.\n\t * @param tipX The x location of the tip of the arrowhead.\n\t * @param tipY The y location of the tip of the arrowhead.\n\t */\n\tpublic void setArrowHead(int baseX, int baseY, int tipX, int tipY);\n\n\t/**\n\t * Sets the <code>Edge's</code> arrowtail\n\t * @param baseX The x location of the centre of the arrowhead baseline.\n\t * @param baseY The y location of the centre of the arrowhead tip.\n\t * @param tipX The x location of the tip of the arrowhead.\n\t * @param tipY The y location of the tip of the arrowhead.\n\t */\n\tpublic void setArrowTail(int baseX, int baseY, int tipX, int tipY);\n\n\t/**\n\t * Sets the <code>Edge</code>'s label position.\n\t * @param x The horizontal location (in pixels).\n\t * @param y The vertical location (in pixels).\n\t */\n\tpublic void setLabelPosition(int x, int y);\n\n\t/**\n\t * Retrieves the position of the <code>Edge's</code> label.\n\t * @return A <code>Point</code> containing the position of\n\t * the label.\n\t */\n\tpublic Point getLabelPosition();\n\n\t/**\n\t * Gets the <code>Shape</code> that represents the <code>Edge</code>.\n\t * @return The <code>Shape</code> of the <code>Edge</code>.\n\t */\n\tpublic Shape getShape();\n\n\t/**\n\t * Gets the direction of the <code>Edge</code>. This is one of the\n\t * predefined direction from the <code>GraphModel</code> interface.\n\t * @return The direction of the <code>Edge</code>.\n\t */\n\tpublic int getDirection();\n\n\n}",
"public void removeEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\t// remove from neighbor's outList\r\n\t\t\t\tneighbor.vertex.outList.remove(findNeighbor(neighbor.vertex.outList, currentVertex.label)); \t\t\r\n\t\t\t\tcurrentVertex.inList.remove(neighbor); // remove from current's inList\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Edge from \" + v + \" does not exist.\");\r\n\t}",
"public void setEdge(int n1, int n2){\n\t\tif(outOfBounds(n1) || outOfBounds(n2))// if node indexes are bad return\n\t\t\treturn ;\n\t\t\n if((dGraph.getElement(n1, n2)) == 1){\n\t\t\treturn;\n\t}\n\t\tdGraph.setElement(n1, n2, 1); //shows that there is an edge going from n1 to n2\n\t\tdGraphin.setElement(n2, n1, 1);// show the edges going into n2\n\t\toutdegree[n1]++;\n\t\tindegree[n2]++;\n\t\t\n\t}",
"public TransitionSystemEdge addEdge(TransitionSystemEdge newEdge) {\n\t\tTransitionSystemVertex v1 = (TransitionSystemVertex) newEdge\n\t\t\t\t.getSource();\n\t\tTransitionSystemVertex v2 = (TransitionSystemVertex) newEdge.getDest();\n\n\t\tHashSet edges = this.getEdgesBetween(v1, v2);\n\t\tif ((v1 != v2) && (edges.size() > 1)) { // 1 - created edge\n\t\t\t// The edge has been created, hence the nodes v1 and v2 know about\n\t\t\t// it.\n\t\t\t// and newEdge is not an inEdge of v1 (hence false as 2nd argument)\n\t\t\tv1.removeEdge(newEdge, false);\n\t\t\t// The edge has been created, hence the nodes v1 and v2 know about\n\t\t\t// it.\n\t\t\t// and newEdge is an inEdge of v2 (hence true as 2nd argument)\n\t\t\tv2.removeEdge(newEdge, true);\n\n\t\t\tIterator it = edges.iterator();\n\t\t\treturn (TransitionSystemEdge) it.next();\n\t\t} else if ((v1 == v2) && (edges.size() >= 2)) { // a tricky check for\n\t\t\t// the case of loops\n\t\t\tIterator it = edges.iterator();\n\t\t\tTransitionSystemEdge existingEdge = null;\n\t\t\tint k = 0;\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tTransitionSystemEdge anEdge = (TransitionSystemEdge) it.next();\n\t\t\t\tif (anEdge.getIdentifier().equals(newEdge.getIdentifier())) {\n\t\t\t\t\tk++;\n\t\t\t\t\texistingEdge = anEdge;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (k == 1) {\n\t\t\t\tsuper.addEdge(newEdge);\n\t\t\t\treturn newEdge;\n\t\t\t} else {\n\t\t\t\t// The edge has been created, hence the nodes v1 and v2 know\n\t\t\t\t// about it.\n\t\t\t\t// and newEdge is not an inEdge of v1 (hence false as 2nd\n\t\t\t\t// argument)\n\t\t\t\tv1.removeEdge(newEdge, false);\n\t\t\t}\n\t\t\t// The edge has been created, hence the nodes v1 and v2 know about\n\t\t\t// it.\n\t\t\t// and newEdge is an inEdge of v2 (hence true as 2nd argument)\n\t\t\tv2.removeEdge(newEdge, true);\n\t\t\treturn existingEdge;\n\t\t} else {\n\t\t\tsuper.addEdge(newEdge);\n\t\t\treturn newEdge;\n\t\t}\n\t}",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }"
] | [
"0.7116414",
"0.6862044",
"0.67276233",
"0.6589464",
"0.65732616",
"0.6557151",
"0.6472403",
"0.6428967",
"0.6393935",
"0.62956333",
"0.62879807",
"0.62796247",
"0.62776613",
"0.6244268",
"0.6239309",
"0.6222674",
"0.6209657",
"0.6198871",
"0.6192979",
"0.61512274",
"0.614361",
"0.61254454",
"0.6121831",
"0.6096123",
"0.6091421",
"0.60722405",
"0.6056517",
"0.6007681",
"0.59840655",
"0.59795296",
"0.5964533",
"0.59318686",
"0.5922372",
"0.5916131",
"0.59143376",
"0.59049624",
"0.59004277",
"0.58877254",
"0.5864031",
"0.5850603",
"0.58324957",
"0.5816295",
"0.5789734",
"0.5787125",
"0.5786134",
"0.57860506",
"0.57794005",
"0.5776063",
"0.57725877",
"0.5769688",
"0.5725846",
"0.5718101",
"0.5710779",
"0.5709785",
"0.56979716",
"0.56867456",
"0.5683369",
"0.567878",
"0.5659343",
"0.5650764",
"0.5650358",
"0.56496733",
"0.5636583",
"0.5634786",
"0.5634457",
"0.5622193",
"0.56195533",
"0.5617181",
"0.56169593",
"0.5605023",
"0.56029105",
"0.55989903",
"0.55955255",
"0.55873936",
"0.5573942",
"0.5571765",
"0.55695766",
"0.55609316",
"0.5552657",
"0.55490506",
"0.5545768",
"0.5532343",
"0.55297923",
"0.5527791",
"0.5524072",
"0.55177844",
"0.55133426",
"0.551094",
"0.5509407",
"0.5504891",
"0.5500267",
"0.5494191",
"0.5481573",
"0.54804885",
"0.54767096",
"0.54715466",
"0.54704523",
"0.5470356",
"0.5469645",
"0.5469645"
] | 0.648305 | 6 |
/ Insert a directed edge from v to current vertex with label e, or change the label of existing such edge to e. | public void addEdgeFrom(char v, int e) {
// does an edge from v already exist?
for (int i = 0; i < currentVertex.inList.size(); i++) {
Neighbor neighbor = currentVertex.inList.get(i);
if (currentVertex.inList.get(i).vertex.label == v) {
neighbor.edge = e;
findNeighbor(findVertex(v).outList, currentVertex.label).edge = e;
return;
}
}
// add to current's inList
Neighbor newNeighbor = new Neighbor(findVertex(v), e);
currentVertex.inList.add(newNeighbor);
// add to neighbor's outList
Neighbor current = new Neighbor(currentVertex, e);
newNeighbor.vertex.outList.add(current);
edges++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addEdgeTo(char v, int e) {\r\n\t\t// does an edge to v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e;\r\n\t\t\t\tfindNeighbor(findVertex(v).inList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.outList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.inList.add(current);\r\n\r\n\t\tedges++;\r\n\t}",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"void setEdgeLabel(int edge, String label);",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public Edge<V> addEdge(V source, V target);",
"public E addEdge(V tail, V head);",
"public void addEdge(String srcLabel, String tarLabel, int weight) {\n // Implement me!\n\n String e = srcLabel + tarLabel;\n if (indexOf(e, edges) > -1) {\n return;\n }\n int sInt = indexOf(srcLabel, vertices);\n int tInt = indexOf(tarLabel, vertices);\n if (sInt < 0 ||tInt < 0) {\n return;\n }\n\n int eInt = edges.size();\n edges.put(e, eInt);\n weights = addOneCol(weights);\n weights[sInt][eInt] = weight;\n weights[tInt][eInt] = weight * (-1);\n\n\n }",
"public void addEdge(DirectedEdge e) \n {\n int v = e.from();\n adj[v].add(e);\n E++;\n }",
"void addEdge(Vertex u, Vertex v) {\r\n\t\tu.addNeighbor(v);\r\n\t}",
"public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }",
"protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"boolean addEdge(V v, V w);",
"Edge createEdge(Vertex src, Vertex tgt, boolean directed);",
"public Position insertDirectedEdge(Position vp, Position wp, Object o) throws InvalidPositionException;",
"public void addEdge(Node from, Node to);",
"public void addVirtualEdge(E e){\n\t\tedges.add(e);\n\t\tvirtualEdges.add(e);\n\t}",
"void add(Edge edge);",
"boolean addEdge(V v, V w, double weight);",
"public void addEdge(E e){\n\t\tedges.add(e);\n\t}",
"public void addEdge(K u, K v, int weight)\n {\n if (u.equals(v))\n {\n throw new IllegalArgumentException(\"adding self loop\");\n }\n\n\t// get u's adjacency list\n Map<K, Edge> adj = adjMaps.get(u);\n\n\t// check for edge already being there\n if (!adj.containsKey(v))\n {\n\t\t// edge is not already there -- add to both adjacency lists\n Edge e = new Edge(weight);\n adj.put(v, e);\n adjMaps.get(v).put(u, e);\n }\n }",
"public void addEdge(Edge e)\r\n\t{\n\t\tint v = e.either(), w = e.other(v);\r\n\t\tadj[v].add(e);\r\n\t\tadj[w].add(e);\r\n\t}",
"public void insertEdge(Vertex v, int cost){\n\t\tedgeArray.add(new Edge(v, cost));\n\t}",
"public void addEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge = new Edge(v1, v2, edgeInfo);\n if(adjLists[v1].contains(edge)){\n return;\n }\n adjLists[v1].addLast(edge);\n }",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge1 = new Edge(v1, v2, edgeInfo);\n Edge edge2 = new Edge(v2, v1, edgeInfo);\n if(!adjLists[v1].contains(edge1)){\n adjLists[v1].addLast(edge1);\n }\n if(!adjLists[v2].contains(edge2)){\n adjLists[v2].addLast(edge2);\n }\n }",
"private void attachLabel(Vertex v, String string) throws IOException\n {\n if (string == null || string.length() == 0)\n return;\n String label = string.trim();\n// String label = trimQuotes(string).trim();\n// if (label.length() == 0)\n// return;\n if (unique_labels)\n {\n try\n {\n StringLabeller sl = StringLabeller.getLabeller((Graph)v.getGraph(), LABEL);\n sl.setLabel(v, label);\n }\n catch (StringLabeller.UniqueLabelException slule)\n {\n throw new FatalException(\"Non-unique label found: \" + slule);\n }\n }\n else\n {\n v.addUserDatum(LABEL, label, UserData.SHARED);\n }\n }",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"public boolean addVertex(T vertexLabel);",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public IEdge addEdge(String from, String to, Double cost);",
"void addEdge(Edge e) {\n if (e.getTail().equals(this)) {\n outEdges.put(e.getHead(), e);\n\n return;\n } else if (e.getHead().equals(this)) {\n indegree++;\n inEdges.put(e.getTail(), e);\n\n return;\n }\n\n throw new RuntimeException(\"Cannot add edge that is unrelated to current node.\");\n }",
"@Override\r\n public void addEdge(Vertex v1, Vertex v2) {\r\n adjacencyList.get(v1).add(v2); //put v2 into the LinkedList of key v1.\r\n adjacencyList.get(v2).add(v1); //put v1 into the LinkedList of key v2.\r\n }",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"void addEdge(int source, int destination, int weight);",
"@Override\r\n\tpublic void link(E src, E dst, int weight) {\r\n\t\tinsertVertex(src); //Inserts src if not currently in the graph\r\n\t\tinsertVertex(dst); //Inserts dst if not currently in the graph\r\n\t\tEdge<E> newedge1 = new Edge<>(src, dst, weight);\r\n\r\n\t\tArrayList<Edge<E>> sEdges = adjacencyLists.get(src);\r\n\t\tsEdges.remove(newedge1); //if the edge already exists remove it\r\n\t\tsEdges.add(newedge1);\r\n\t\tif(!isDirected) { //Add the additional edge if this graph is undirected\r\n\t\t\tEdge<E> newedge2 = new Edge<>(dst, src, weight);\r\n\r\n\t\t\tArrayList<Edge<E>> dEdges = adjacencyLists.get(dst);\r\n\t\t\tdEdges.remove(newedge2); //if the edge already exists remove it\r\n\t\t\tdEdges.add(newedge2); \r\n\t\t}\r\n\t}",
"public void insert(Edge edge){\n edges[edge.getSource()].add(edge);\n if (isDirected()){\n edges[edge.getDest()].add(new Edge(edge.getDest(), edge.getSource(),edge.getWeight()));\n }\n }",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"public abstract void addEdge(Point p, Direction dir);",
"@Override\n\tpublic void addEdge(Location src, Location dest, Path edge) {\n\t\tint i = locations.indexOf(src);\n\t\tpaths.get(locations.indexOf(src)).add(edge);\n\t}",
"public void addEdge(Edge e) {\n int v = e.either();\n int w = e.other(v);\n adj[v].add(e);\n adj[w].add(e);\n E++;\n }",
"public void addEdge(Edge e){\n\t\tadjacentEdges.add(e);\n\t}",
"public void addEdge(String v1, String v2) {\n if (v1.equals(v2))\n throw new IllegalArgumentException(\"Vertexes are same\");\n\n // get the indexes of v1 and v2\n int index1 = -1;\n int index2 = -1;\n for (int i = 0; i < vertexes.length; i++) {\n if (v1.equals(vertexes[i])) index1 = i;\n if (v2.equals(vertexes[i])) index2 = i;\n }\n\n if (index1 == -1 || index2 == -1)\n throw new IllegalArgumentException(\"Vertexes are not exist.\");\n\n // add to the linked lists\n heads[index1].add(index2);\n heads[index2].add(index1);\n }",
"public void addEdge(Edge e) {\n incident.add(e);\n }",
"public void addEdge(Edge e){\n\t\tedges.put(e.hashCode(), e);\n\t\te.getHead().addConnection(e);\n\t\te.getTail().addConnection(e);\n\t}",
"public void insert(Edge edge) {\r\n edges[edge.getSource()].add(edge);\r\n if (!isDirected()) {\r\n edges[edge.getDest()].add(new Edge(edge.getDest(),\r\n edge.getSource(),\r\n edge.getWeight()));\r\n }\r\n }",
"public void addEdge(String inLabel, double inDistance, String inMode,\n int inTime, int inPeakTime, DSAGraphNode<E> inNode)\n {\n links.insertLast(inNode);\n DSAGraphEdge<E> edge = new DSAGraphEdge<E>(inLabel, inDistance, inMode,\n inTime, inPeakTime, this,\n inNode);\n edgeList.insertLast(edge);\n }",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"void addEdge(Edge e) {\n\t\t\tif(!_edges.containsKey(e.makeKey())) {\n\t\t\t\t_edges.put(e.makeKey(),e);\n\t\t\t\te._one.addNeighborEdge(e);\n\t\t\t\te._two.addNeighborEdge(e);\n\t\t\t}\n\t\t}",
"void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}",
"public void addEdge(int u, int v, int weight){\n this.edges.add(new DEdge(u,v,weight));\n }",
"void addEdge(int v, int w) {\n adj [v].add(w);\n }",
"public void addEdge(int start, int end, double weight);",
"public void addEdge(int u, int v) {\n if (u > nodes.size() || v > nodes.size() || u <= 0 || v <= 0) {\n throw new IllegalArgumentException(\"An invalid node was given\");\n }\n // note that we have to subtract 1 from each since node 1 is located in index 0\n nodes.get(u - 1).addEdge(nodes.get(v - 1));\n }",
"public void addEdge(Edge e){\n edgeList.add(e);\n }",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"boolean addEdge(E edge);",
"EdgeNode(VertexNode correspondingVertex){\n setCorrespondingVertex(correspondingVertex);\n }",
"@Override\n public void addEdge(V source, V destination, double weight)\n {\n super.addEdge(source, destination, weight);\n super.addEdge(destination, source, weight);\n }",
"public V addVertex(V v);",
"public abstract boolean putEdge(Edge incomingEdge);",
"void addEdge(Edge e) {\n edges.add(e);\n addVerticle(e.v1);\n addVerticle(e.v2);\n }",
"public void addEdge( String sourceName, String destName , Double distance)\n {\n Vertex v = getVertex( sourceName );\n Vertex w = getVertex( destName );\n v.adjEdge.put(w.name, new Edge(w,distance) );\n \n // v.weightnext.put(w.name,(Double) distance);\n }",
"public boolean addEdge(String label1, String label2)\n\t{\n\t\tif(!isAdjacent(label1, label2)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.addEdge(vx2);\n\t\t\tvx2.addEdge(vx1);\n\t\t\tedgeCount++;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"void addEdge(int v, int w)\n {\n adj[v].add(w);\n }",
"void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}",
"void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}",
"void addEdge(int x, int y);",
"public void addEdge(int v1, int v2) {\n\t\tedges[v1][v2] = 1;\n\t\tedges[v2][v1] = 1;\n\t\tsize++;\n\t}",
"public void addEdge(int u, int v)\n {\n // Add v to u's list.\n adjList[u].add(v);\n }",
"public void addEdge(int v1, int v2) {\r\n\t\tadjList[v1].add(v2);\r\n\t}",
"public Position insertEdge(Position vp,Position wp, Object o) throws InvalidPositionException;",
"void addEdge(int v,int w)\n {\n adj[v].add(w);\n }",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \taddEdge(v1, v2, edgeInfo);\n \taddEdge(v2, v1, edgeInfo);\n \t\n }",
"public void addEdge( EdgeIntf edge ) throws Exception {\r\n DirectedEdge dEdge = ( DirectedEdge ) edge;\r\n Vertex fromVertex = dEdge.getSource();\r\n Vertex toVertex = dEdge.getSink();\r\n\r\n if( !isPath( toVertex, fromVertex ))\r\n super.addEdge( dEdge );\r\n else\r\n throw new CycleException();\r\n }",
"public void insertEdge(Node u, Node v, int edgeType) throws GraphException\n\t{\n\t\tif (u.getName() >= nodeList.length || v.getName() >= nodeList.length ||\n\t\t\t\tnodeList[u.getName()] == null || nodeList[v.getName()] == null\n\t\t\t\t|| adjMatrix[u.getName()][v.getName()] != null)\n\t\t\tthrow new GraphException(\"Cannot insert the edge.\");\n\t\t\n\t\tadjMatrix[u.getName()][v.getName()] = new Edge(u,v,edgeType); \n\t\tadjMatrix[v.getName()][u.getName()] = new Edge(v,u,edgeType);\n\t}",
"public void addEdge(int start, int end);",
"private void addEdge(Vertex v1, Vertex v2) {\n LinkedList<Vertex> v1AdjacentVertices = verticesAndTheirEdges.get(v1);\n if (!v1AdjacentVertices.contains(v2)) {\n v1AdjacentVertices.add(v2);\n }\n }",
"private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }",
"public void addEdge(int v, int w) {\r\n adj[v].add(w);\r\n E++;\r\n }",
"public void followEdge(int e) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.edge == e) {\r\n\t\t\t\tcurrentVertex = neighbor.vertex;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge to \" + e + \" not exist.\");\r\n\t}",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"public void addUndirectedEdge(int v1, int v2) {\r\n addUndirectedEdge(v1, v2, null);\r\n }",
"public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }",
"private Edge addEdge(Node source, Node dest, double weight)\r\n\t{\r\n\t final Edge newEdge = new Edge(edgeType, source, dest, weight);\r\n\t if (!eSet.add(newEdge))\r\n\t\tthrow new RuntimeException(\"Edge already exists!\");\r\n\t source.addEdge(newEdge);\n\t return newEdge;\r\n\t}",
"public void addEdge(T v, T w) {\n\t\tadj[v].add(w);\r\n\t\tadj[w].add(v);\r\n\t}",
"public void addEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \tfor (Edge e : myAdjLists[v1]) {\n \t\tif (e.to() == v2) {\n \t\t\te.setObjectInfo(edgeInfo);\n \t\t\treturn;\n \t\t}\n \t}\n \tEdge toAdd = new Edge(v1, v2, edgeInfo);\n \tmyAdjLists[v1].add(toAdd);\t\n }",
"public void setEdge(int start, int target){\n\t\tthis.graph.elementAt(start).insert(target);\n\t}",
"public void addEdge(Character sourceId, Character destinationId) {\n Node sourceNode = getNode(sourceId);\n Node destinationNode = getNode(destinationId);\n sourceNode.adjacent.add(destinationNode);\n }",
"public void addEdge(String node1, String node2) {\n\r\n LinkedHashSet<String> adjacent = map.get(node1);\r\n// checking to see if adjacent node exist or otherwise is null \r\n if (adjacent == null) {\r\n adjacent = new LinkedHashSet<String>();\r\n map.put(node1, adjacent);\r\n }\r\n adjacent.add(node2); // if exist we add the instance node to adjacency list\r\n }",
"public Edge(T node_1, T node_2,S label) {\n\t\tparent = node_1;\n\t\tchild = node_2;\n\t\tl = label;\n\t\tcheckRep();\n\t}",
"protected void visit(Graph<VLabel, ELabel>.Vertex v) {\n }",
"public void addEdge(int v1, int v2) {\r\n addEdge(v1, v2, null);\r\n }",
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finish vertex too \n if(!edge.isDirected()){\n Long finish = edge.getFinish();\n Vertex fVertex = vertexes.get(finish);\n if(fVertex != null){\n fVertex.addEdge(edge, false);\n }\n }\n }\n \n }",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"public void addDirectedEdge(String startVertex, String endVertex, int cost)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.adjacencyMap.get(startVertex).put(endVertex, cost);\r\n\t}",
"public void addEdge(Vertex other) {\n edges.add(other);\n other.edges.add(this);\n }",
"public LabeledSDGEdge(SDGNode source, SDGNode sink, Kind kind, String label) {\n\t\tsuper(source, sink);\n\t\tthis.kind = kind;\n\t\tthis.label = label;\n\t}",
"public void addEdge(Integer id, UNode n1, UNode n2, String edge)\r\n {\r\n UEdge e = new UEdge(id, n1, n2, edge);\r\n n1.addOutEdge(e);\r\n n2.addInEdge(e);\r\n uEdges.put (id, e);\r\n }",
"void addEdge(String origin, String destination, double weight){\n\t\tadjlist.get(origin).addEdge(adjlist.get(destination), weight);\n\t\tedges++;\n\t}"
] | [
"0.74110556",
"0.71443707",
"0.7132387",
"0.68483657",
"0.684334",
"0.66115206",
"0.6478588",
"0.6470063",
"0.64693236",
"0.63849485",
"0.63475245",
"0.63407123",
"0.6293139",
"0.6277264",
"0.6273099",
"0.62725896",
"0.62602335",
"0.6253858",
"0.6245406",
"0.62377846",
"0.6233591",
"0.6211839",
"0.62114394",
"0.6210584",
"0.6208287",
"0.6203045",
"0.6190419",
"0.6180561",
"0.6179284",
"0.6179024",
"0.6163766",
"0.61616",
"0.6146577",
"0.61450386",
"0.6130089",
"0.61285377",
"0.61273444",
"0.6119916",
"0.61149395",
"0.6113943",
"0.6100237",
"0.6092007",
"0.6079867",
"0.60770106",
"0.60567284",
"0.6049624",
"0.60466665",
"0.60447335",
"0.60444427",
"0.60263675",
"0.60211915",
"0.60170686",
"0.60128325",
"0.6009519",
"0.6007465",
"0.6003444",
"0.6003395",
"0.5998473",
"0.5971051",
"0.59545225",
"0.59464365",
"0.59436405",
"0.59259796",
"0.59258133",
"0.59181446",
"0.59181446",
"0.591745",
"0.5917328",
"0.59146655",
"0.59146106",
"0.591397",
"0.59113187",
"0.58994126",
"0.5892471",
"0.58834124",
"0.5881552",
"0.58773315",
"0.58769137",
"0.58753514",
"0.58727527",
"0.58664227",
"0.5841764",
"0.583519",
"0.5831022",
"0.58309",
"0.58250135",
"0.5824706",
"0.58168787",
"0.58151007",
"0.58095205",
"0.58023614",
"0.58004105",
"0.57906705",
"0.5789538",
"0.5789538",
"0.57854295",
"0.5784548",
"0.5774338",
"0.5773251",
"0.5772944"
] | 0.7227673 | 1 |
/ Insert a directed edge from current vertex to v with label e, or change the label of existing such edge to e. | void addEdgeTo(char v, int e) {
// does an edge to v already exist?
for (int i = 0; i < currentVertex.outList.size(); i++) {
Neighbor neighbor = currentVertex.outList.get(i);
if (neighbor.vertex.label == v) {
neighbor.edge = e;
findNeighbor(findVertex(v).inList, currentVertex.label).edge = e;
return;
}
}
// add to current's inList
Neighbor newNeighbor = new Neighbor(findVertex(v), e);
currentVertex.outList.add(newNeighbor);
// add to neighbor's outList
Neighbor current = new Neighbor(currentVertex, e);
newNeighbor.vertex.inList.add(current);
edges++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"void setEdgeLabel(int edge, String label);",
"public void addEdgeFrom(char v, int e) {\r\n\t\t// does an edge from v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (currentVertex.inList.get(i).vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e; \r\n\t\t\t\tfindNeighbor(findVertex(v).outList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.inList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.outList.add(current);\r\n\r\n\t\tedges++;\r\n\t}",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public Edge<V> addEdge(V source, V target);",
"public E addEdge(V tail, V head);",
"public void addEdge(String srcLabel, String tarLabel, int weight) {\n // Implement me!\n\n String e = srcLabel + tarLabel;\n if (indexOf(e, edges) > -1) {\n return;\n }\n int sInt = indexOf(srcLabel, vertices);\n int tInt = indexOf(tarLabel, vertices);\n if (sInt < 0 ||tInt < 0) {\n return;\n }\n\n int eInt = edges.size();\n edges.put(e, eInt);\n weights = addOneCol(weights);\n weights[sInt][eInt] = weight;\n weights[tInt][eInt] = weight * (-1);\n\n\n }",
"public void addEdge(DirectedEdge e) \n {\n int v = e.from();\n adj[v].add(e);\n E++;\n }",
"public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }",
"void addEdge(Vertex u, Vertex v) {\r\n\t\tu.addNeighbor(v);\r\n\t}",
"protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"Edge createEdge(Vertex src, Vertex tgt, boolean directed);",
"public void addEdge(Node from, Node to);",
"public void addEdge(E e){\n\t\tedges.add(e);\n\t}",
"void add(Edge edge);",
"public void addEdge(Edge e)\r\n\t{\n\t\tint v = e.either(), w = e.other(v);\r\n\t\tadj[v].add(e);\r\n\t\tadj[w].add(e);\r\n\t}",
"public IEdge addEdge(String from, String to, Double cost);",
"boolean addEdge(V v, V w);",
"public void addVirtualEdge(E e){\n\t\tedges.add(e);\n\t\tvirtualEdges.add(e);\n\t}",
"public Position insertDirectedEdge(Position vp, Position wp, Object o) throws InvalidPositionException;",
"void addEdge(Edge e) {\n if (e.getTail().equals(this)) {\n outEdges.put(e.getHead(), e);\n\n return;\n } else if (e.getHead().equals(this)) {\n indegree++;\n inEdges.put(e.getTail(), e);\n\n return;\n }\n\n throw new RuntimeException(\"Cannot add edge that is unrelated to current node.\");\n }",
"public void addEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge = new Edge(v1, v2, edgeInfo);\n if(adjLists[v1].contains(edge)){\n return;\n }\n adjLists[v1].addLast(edge);\n }",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge1 = new Edge(v1, v2, edgeInfo);\n Edge edge2 = new Edge(v2, v1, edgeInfo);\n if(!adjLists[v1].contains(edge1)){\n adjLists[v1].addLast(edge1);\n }\n if(!adjLists[v2].contains(edge2)){\n adjLists[v2].addLast(edge2);\n }\n }",
"boolean addEdge(V v, V w, double weight);",
"public void addEdge(K u, K v, int weight)\n {\n if (u.equals(v))\n {\n throw new IllegalArgumentException(\"adding self loop\");\n }\n\n\t// get u's adjacency list\n Map<K, Edge> adj = adjMaps.get(u);\n\n\t// check for edge already being there\n if (!adj.containsKey(v))\n {\n\t\t// edge is not already there -- add to both adjacency lists\n Edge e = new Edge(weight);\n adj.put(v, e);\n adjMaps.get(v).put(u, e);\n }\n }",
"void addEdge(int source, int destination, int weight);",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"public void addEdge(Edge e){\n\t\tadjacentEdges.add(e);\n\t}",
"@Override\n\tpublic void addEdge(Location src, Location dest, Path edge) {\n\t\tint i = locations.indexOf(src);\n\t\tpaths.get(locations.indexOf(src)).add(edge);\n\t}",
"@Override\r\n\tpublic void link(E src, E dst, int weight) {\r\n\t\tinsertVertex(src); //Inserts src if not currently in the graph\r\n\t\tinsertVertex(dst); //Inserts dst if not currently in the graph\r\n\t\tEdge<E> newedge1 = new Edge<>(src, dst, weight);\r\n\r\n\t\tArrayList<Edge<E>> sEdges = adjacencyLists.get(src);\r\n\t\tsEdges.remove(newedge1); //if the edge already exists remove it\r\n\t\tsEdges.add(newedge1);\r\n\t\tif(!isDirected) { //Add the additional edge if this graph is undirected\r\n\t\t\tEdge<E> newedge2 = new Edge<>(dst, src, weight);\r\n\r\n\t\t\tArrayList<Edge<E>> dEdges = adjacencyLists.get(dst);\r\n\t\t\tdEdges.remove(newedge2); //if the edge already exists remove it\r\n\t\t\tdEdges.add(newedge2); \r\n\t\t}\r\n\t}",
"public void insert(Edge edge){\n edges[edge.getSource()].add(edge);\n if (isDirected()){\n edges[edge.getDest()].add(new Edge(edge.getDest(), edge.getSource(),edge.getWeight()));\n }\n }",
"public void insertEdge(Vertex v, int cost){\n\t\tedgeArray.add(new Edge(v, cost));\n\t}",
"public void addEdge(Edge e){\n\t\tedges.put(e.hashCode(), e);\n\t\te.getHead().addConnection(e);\n\t\te.getTail().addConnection(e);\n\t}",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public void addEdge(Edge e) {\n int v = e.either();\n int w = e.other(v);\n adj[v].add(e);\n adj[w].add(e);\n E++;\n }",
"public abstract void addEdge(Point p, Direction dir);",
"public void addEdge(String inLabel, double inDistance, String inMode,\n int inTime, int inPeakTime, DSAGraphNode<E> inNode)\n {\n links.insertLast(inNode);\n DSAGraphEdge<E> edge = new DSAGraphEdge<E>(inLabel, inDistance, inMode,\n inTime, inPeakTime, this,\n inNode);\n edgeList.insertLast(edge);\n }",
"public void addEdge(Edge e) {\n incident.add(e);\n }",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"void addEdge(Edge e) {\n\t\t\tif(!_edges.containsKey(e.makeKey())) {\n\t\t\t\t_edges.put(e.makeKey(),e);\n\t\t\t\te._one.addNeighborEdge(e);\n\t\t\t\te._two.addNeighborEdge(e);\n\t\t\t}\n\t\t}",
"void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}",
"public void insert(Edge edge) {\r\n edges[edge.getSource()].add(edge);\r\n if (!isDirected()) {\r\n edges[edge.getDest()].add(new Edge(edge.getDest(),\r\n edge.getSource(),\r\n edge.getWeight()));\r\n }\r\n }",
"public boolean addVertex(T vertexLabel);",
"public void addEdge(int start, int end, double weight);",
"@Override\r\n public void addEdge(Vertex v1, Vertex v2) {\r\n adjacencyList.get(v1).add(v2); //put v2 into the LinkedList of key v1.\r\n adjacencyList.get(v2).add(v1); //put v1 into the LinkedList of key v2.\r\n }",
"public void addEdge(Edge e){\n edgeList.add(e);\n }",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"private void attachLabel(Vertex v, String string) throws IOException\n {\n if (string == null || string.length() == 0)\n return;\n String label = string.trim();\n// String label = trimQuotes(string).trim();\n// if (label.length() == 0)\n// return;\n if (unique_labels)\n {\n try\n {\n StringLabeller sl = StringLabeller.getLabeller((Graph)v.getGraph(), LABEL);\n sl.setLabel(v, label);\n }\n catch (StringLabeller.UniqueLabelException slule)\n {\n throw new FatalException(\"Non-unique label found: \" + slule);\n }\n }\n else\n {\n v.addUserDatum(LABEL, label, UserData.SHARED);\n }\n }",
"public void addEdge(String v1, String v2) {\n if (v1.equals(v2))\n throw new IllegalArgumentException(\"Vertexes are same\");\n\n // get the indexes of v1 and v2\n int index1 = -1;\n int index2 = -1;\n for (int i = 0; i < vertexes.length; i++) {\n if (v1.equals(vertexes[i])) index1 = i;\n if (v2.equals(vertexes[i])) index2 = i;\n }\n\n if (index1 == -1 || index2 == -1)\n throw new IllegalArgumentException(\"Vertexes are not exist.\");\n\n // add to the linked lists\n heads[index1].add(index2);\n heads[index2].add(index1);\n }",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"boolean addEdge(E edge);",
"EdgeNode(VertexNode correspondingVertex){\n setCorrespondingVertex(correspondingVertex);\n }",
"void addEdge(Edge e) {\n edges.add(e);\n addVerticle(e.v1);\n addVerticle(e.v2);\n }",
"public void addEdge(int u, int v, int weight){\n this.edges.add(new DEdge(u,v,weight));\n }",
"@Override\n public void addEdge(V source, V destination, double weight)\n {\n super.addEdge(source, destination, weight);\n super.addEdge(destination, source, weight);\n }",
"public boolean addEdge(String label1, String label2)\n\t{\n\t\tif(!isAdjacent(label1, label2)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.addEdge(vx2);\n\t\t\tvx2.addEdge(vx1);\n\t\t\tedgeCount++;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public abstract boolean putEdge(Edge incomingEdge);",
"public void addEdge( String sourceName, String destName , Double distance)\n {\n Vertex v = getVertex( sourceName );\n Vertex w = getVertex( destName );\n v.adjEdge.put(w.name, new Edge(w,distance) );\n \n // v.weightnext.put(w.name,(Double) distance);\n }",
"public void addEdge( EdgeIntf edge ) throws Exception {\r\n DirectedEdge dEdge = ( DirectedEdge ) edge;\r\n Vertex fromVertex = dEdge.getSource();\r\n Vertex toVertex = dEdge.getSink();\r\n\r\n if( !isPath( toVertex, fromVertex ))\r\n super.addEdge( dEdge );\r\n else\r\n throw new CycleException();\r\n }",
"void addEdge(int x, int y);",
"void addEdge(int v, int w) {\n adj [v].add(w);\n }",
"public void addEdge(int start, int end);",
"public void addEdge(int u, int v) {\n if (u > nodes.size() || v > nodes.size() || u <= 0 || v <= 0) {\n throw new IllegalArgumentException(\"An invalid node was given\");\n }\n // note that we have to subtract 1 from each since node 1 is located in index 0\n nodes.get(u - 1).addEdge(nodes.get(v - 1));\n }",
"private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }",
"public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }",
"public void addEdge(int v1, int v2) {\n\t\tedges[v1][v2] = 1;\n\t\tedges[v2][v1] = 1;\n\t\tsize++;\n\t}",
"public void addEdge(int v1, int v2) {\r\n\t\tadjList[v1].add(v2);\r\n\t}",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \taddEdge(v1, v2, edgeInfo);\n \taddEdge(v2, v1, edgeInfo);\n \t\n }",
"public Edge(T node_1, T node_2,S label) {\n\t\tparent = node_1;\n\t\tchild = node_2;\n\t\tl = label;\n\t\tcheckRep();\n\t}",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"private Edge addEdge(Node source, Node dest, double weight)\r\n\t{\r\n\t final Edge newEdge = new Edge(edgeType, source, dest, weight);\r\n\t if (!eSet.add(newEdge))\r\n\t\tthrow new RuntimeException(\"Edge already exists!\");\r\n\t source.addEdge(newEdge);\n\t return newEdge;\r\n\t}",
"public Position insertEdge(Position vp,Position wp, Object o) throws InvalidPositionException;",
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finish vertex too \n if(!edge.isDirected()){\n Long finish = edge.getFinish();\n Vertex fVertex = vertexes.get(finish);\n if(fVertex != null){\n fVertex.addEdge(edge, false);\n }\n }\n }\n \n }",
"public void addEdge(Character sourceId, Character destinationId) {\n Node sourceNode = getNode(sourceId);\n Node destinationNode = getNode(destinationId);\n sourceNode.adjacent.add(destinationNode);\n }",
"public void addDirectedEdge(String startVertex, String endVertex, int cost)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.adjacencyMap.get(startVertex).put(endVertex, cost);\r\n\t}",
"public void addEdge(Integer id, UNode n1, UNode n2, String edge)\r\n {\r\n UEdge e = new UEdge(id, n1, n2, edge);\r\n n1.addOutEdge(e);\r\n n2.addInEdge(e);\r\n uEdges.put (id, e);\r\n }",
"public void followEdge(int e) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.edge == e) {\r\n\t\t\t\tcurrentVertex = neighbor.vertex;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge to \" + e + \" not exist.\");\r\n\t}",
"public void addEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \tfor (Edge e : myAdjLists[v1]) {\n \t\tif (e.to() == v2) {\n \t\t\te.setObjectInfo(edgeInfo);\n \t\t\treturn;\n \t\t}\n \t}\n \tEdge toAdd = new Edge(v1, v2, edgeInfo);\n \tmyAdjLists[v1].add(toAdd);\t\n }",
"public void addEdge(int u, int v)\n {\n // Add v to u's list.\n adjList[u].add(v);\n }",
"public void insertEdge(Node u, Node v, int edgeType) throws GraphException\n\t{\n\t\tif (u.getName() >= nodeList.length || v.getName() >= nodeList.length ||\n\t\t\t\tnodeList[u.getName()] == null || nodeList[v.getName()] == null\n\t\t\t\t|| adjMatrix[u.getName()][v.getName()] != null)\n\t\t\tthrow new GraphException(\"Cannot insert the edge.\");\n\t\t\n\t\tadjMatrix[u.getName()][v.getName()] = new Edge(u,v,edgeType); \n\t\tadjMatrix[v.getName()][u.getName()] = new Edge(v,u,edgeType);\n\t}",
"public void addEdge(Vertex other) {\n edges.add(other);\n other.edges.add(this);\n }",
"void addEdge(int v, int w)\n {\n adj[v].add(w);\n }",
"public void addEdge(String node1, String node2) {\n\r\n LinkedHashSet<String> adjacent = map.get(node1);\r\n// checking to see if adjacent node exist or otherwise is null \r\n if (adjacent == null) {\r\n adjacent = new LinkedHashSet<String>();\r\n map.put(node1, adjacent);\r\n }\r\n adjacent.add(node2); // if exist we add the instance node to adjacency list\r\n }",
"private void addEdge(Vertex v1, Vertex v2) {\n LinkedList<Vertex> v1AdjacentVertices = verticesAndTheirEdges.get(v1);\n if (!v1AdjacentVertices.contains(v2)) {\n v1AdjacentVertices.add(v2);\n }\n }",
"void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}",
"void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}",
"void addEdge(int v,int w)\n {\n adj[v].add(w);\n }",
"public void addUndirectedEdge(int v1, int v2) {\r\n addUndirectedEdge(v1, v2, null);\r\n }",
"public void setEdge(int start, int target){\n\t\tthis.graph.elementAt(start).insert(target);\n\t}",
"public void addEdge(int v1, int v2) {\r\n addEdge(v1, v2, null);\r\n }",
"public V addVertex(V v);",
"void addEdge(String origin, String destination, double weight){\n\t\tadjlist.get(origin).addEdge(adjlist.get(destination), weight);\n\t\tedges++;\n\t}",
"public LabeledSDGEdge(SDGNode source, SDGNode sink, Kind kind, String label) {\n\t\tsuper(source, sink);\n\t\tthis.kind = kind;\n\t\tthis.label = label;\n\t}",
"public void addEdge(int v, int w) {\r\n adj[v].add(w);\r\n E++;\r\n }",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"public void addEdge(DocTokenInf newEdge) {\n\t\tlist[newEdge.end].put(newEdge);\n\t}",
"public EdgeIntf addEdge( Vertex fromVertex, Vertex toVertex ) throws Exception {\r\n if( !isPath( toVertex, fromVertex ))\r\n return super.addEdge( fromVertex, toVertex );\r\n else\r\n throw new CycleException();\r\n }"
] | [
"0.72199696",
"0.71839714",
"0.7182563",
"0.69613236",
"0.68727136",
"0.6679027",
"0.65515435",
"0.6524904",
"0.6471557",
"0.6432774",
"0.6409813",
"0.6388265",
"0.63741803",
"0.6337667",
"0.63206726",
"0.6307744",
"0.62986916",
"0.62932014",
"0.6277827",
"0.62719375",
"0.6257964",
"0.62439734",
"0.6233512",
"0.62257856",
"0.62256896",
"0.6223938",
"0.6211009",
"0.62101156",
"0.6197398",
"0.61967456",
"0.6196526",
"0.61850244",
"0.61810935",
"0.6169688",
"0.6166856",
"0.6162926",
"0.61618024",
"0.61614686",
"0.61484677",
"0.61425334",
"0.6140118",
"0.61251175",
"0.6122086",
"0.6119608",
"0.6116359",
"0.611629",
"0.6106172",
"0.61037874",
"0.6086729",
"0.608397",
"0.6074251",
"0.60704774",
"0.60675126",
"0.60408515",
"0.60276955",
"0.60243344",
"0.6016879",
"0.60101664",
"0.6002758",
"0.6002742",
"0.5985955",
"0.5975986",
"0.59725773",
"0.5969441",
"0.59691906",
"0.5960959",
"0.5944658",
"0.59353715",
"0.5927499",
"0.5920222",
"0.5919391",
"0.5915532",
"0.5910163",
"0.59084886",
"0.5888787",
"0.58872133",
"0.5882931",
"0.5880351",
"0.5880285",
"0.58727",
"0.5867622",
"0.5866567",
"0.5861466",
"0.5859795",
"0.58596456",
"0.58553314",
"0.58547777",
"0.58547777",
"0.585344",
"0.58490485",
"0.583594",
"0.583096",
"0.58264923",
"0.58221006",
"0.58175343",
"0.58159435",
"0.5801206",
"0.5801206",
"0.57967204",
"0.5785275"
] | 0.73779285 | 0 |
/ Return true if there exists an edge from v to current vertex, otherwise return false. | public boolean hasEdgeFrom(char v) {
for (int i = 0; i < currentVertex.inList.size(); i++) {
Neighbor neighbor = currentVertex.inList.get(i);
if (neighbor.vertex.label == v)
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"boolean containsEdge(V v, V w);",
"public boolean hasEdge(K u, K v)\n {\n return adjMaps.get(u).containsKey(v);\n }",
"public boolean hasEdge(K u, K v)\n\t{\n \tList<HashMap<K, Integer>> adj = adjLists.get(u);\n\n \t// check for edge already being there\n \tint count=0;\n \tfor (HashMap<K, Integer> A:adj){\n \t\tfor (K vertex:A.keySet()){\n \t\t\tif (!vertex.equals(v))\n \t\t {\n \t\t\t\tcount++;\n\n \t\t }\n \t\t}\n \t\t\n \t}\n \tif (count==adj.size()) return false;\n \treturn true;\n\t}",
"boolean containsVertex(V v);",
"public boolean containsEdge(V source, V target);",
"@Override\r\n public boolean edgeExists(Vertex v1, Vertex v2) {\r\n return adjacencyList.get(v1).contains(v2); //checking if the list of adjacent vertices contains v2\r\n }",
"public boolean containsEdge(Edge<V> edge);",
"boolean hasIsVertexOf();",
"public boolean connectsVertex(V v);",
"public abstract boolean hasEdge(int from, int to);",
"public boolean hasVertex(T vert);",
"public boolean containsVertex(V vertex);",
"public boolean containsVertex(V vertex);",
"public boolean isEdge( VKeyT fromKey, VKeyT toKey )\n throws NoSuchVertexException;",
"public boolean isAdjacentTo(final Vertex other){\n\t\tboolean result = false;\n\t\tif(getNeighbours().contains(other))\n\t\t\tresult = true;\n\t\treturn result;\n\t}",
"public boolean hasEdge(Node k){\n for(int i = 0; i<edges.size(); i++){\n Edge edge = edges.get(i);\n if(edge.end() == k){\n return true;\n }\n }\n return false;\n }",
"public boolean containsVertex (E vertex)\n {\n return this.indexOf(vertex) != -1;\n }",
"public boolean isVertex( VKeyT key );",
"public boolean containsEdge(E edge);",
"@Override\n public boolean hasEdge(V from, V to)\n {\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n if (!contains(from)){\n return false;\n }\n else{\n Iterator graphIterator = graph.entrySet().iterator();\n Map.Entry graphElement = (Map.Entry) graphIterator.next();\n V vert = (V) graphElement.getKey();\n while (graphIterator.hasNext() && vert != from){\n graphElement = (Map.Entry) graphIterator.next();\n vert = (V)graphElement.getKey();\n }\n\t ArrayList <V> edges = graph.get(vert);\n\t return edges.contains(to);\n\t }\n }",
"public boolean hasEdge(T beg, T end);",
"public boolean foiChecado(Vertice v){\n int i = v.label;\n return vertices[i];\n }",
"public boolean containsEdge(V head, V tail);",
"public boolean detectCyclesContainingVertex(V v)\n {\n try {\n execute(null, v);\n } catch (CycleDetectedException ex) {\n return true;\n }\n\n return false;\n }",
"@Override\n public boolean contains(V vertex)\n {\n if (vertex.equals(null)){\n throw new IllegalArgumentException();\n }\n return graph.containsKey(vertex);\n }",
"private boolean hasANeighbour(Graph<V, E> g, Set<V> set, V v)\n {\n return set.stream().anyMatch(s -> g.containsEdge(s, v));\n }",
"public boolean hasEdge(Edge e) {\n for (Edge outEdge : outEdges) {\n if (outEdge.equals(e) && e.getTo() == outEdge.getTo()) {\n return true;\n }\n }\n return false;\n }",
"boolean hasPathTo(int v)\n\t{\n\t\treturn edgeTo[v].weight()!=Double.POSITIVE_INFINITY;\n\t}",
"boolean addEdge(V v, V w);",
"boolean contains(Edge edge);",
"public boolean hasPathTo(int v){\n\t\tvalidateVertex(v);\n\t\treturn distTo[v]<Double.POSITIVE_INFINITY;\n\t}",
"public boolean containsEdge(Edge e){\n\t\treturn edges.containsKey(e.hashCode());\n\t}",
"@Override\n\tpublic boolean contains(Object vertex) {\n\t\treturn vertices.contains(vertex);\n\t}",
"public boolean hasEdge(T begin, T end);",
"private boolean edgeExists() {\n for (int i = 1; i < parentMatrix[randomChild][0]; i++) {\n if (parentMatrix[randomChild][i] == randomParent) {\n return true;\n }\n }\n return false;\n }",
"public boolean areAdjacent(Node u, Node v) throws GraphException\n\t{\n\t\tif (u.getName() >= nodeList.length || v.getName() >= nodeList.length ||\n\t\t\t\tnodeList[u.getName()] == null || nodeList[v.getName()] == null)\n\t\t\tthrow new GraphException(\"Node not found.\");\n\t\t\n\t\tif (adjMatrix[u.getName()][v.getName()] == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public boolean hasPathTo(int v) {\n return visited[v];\n }",
"boolean contains(Vertex vertex);",
"public abstract boolean isUsing(Edge graphEdge);",
"public boolean containsEdge(Edge e)\n\t{\n\t\tif (e.getOne() == null || e.getTwo() == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn this.edges.containsKey(e.hashCode());\n\t}",
"public boolean isBipartiteUndirectedGraph (){\r\n int[] vertices = new int[getNumV()];\r\n for (int i = 0; i < getNumV(); ++i)\r\n vertices[i] = -1;\r\n\r\n vertices[0] = 1;\r\n\r\n Stack <Integer> q = new Stack<Integer>();\r\n q.push(0);\r\n\r\n while (!q.isEmpty()) {\r\n int current = q.pop();\r\n Iterator<Edge> iter = edgeIterator(current);\r\n while (iter.hasNext()) {\r\n Edge edge = iter.next();\r\n int neighbor = edge.getDest();\r\n if (vertices[neighbor] == -1) {\r\n vertices[neighbor] = 1 - vertices[current];\r\n q.push(neighbor);\r\n }\r\n else if (vertices[neighbor] == vertices[current])\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"@Override\r\n\tpublic boolean containsVertex(E key) {\r\n\t\treturn vertices.containsKey(key);\r\n\t}",
"public boolean hasVertex(String name) {\n return mVertices.containsKey(name);\n }",
"public boolean isEdge (T vertex1, T vertex2){\n int i1 = vertexIndex(vertex1);\n int i2 = vertexIndex(vertex2);\n if (i1 != NOT_FOUND && i2 != NOT_FOUND && edges[i1][i2] > 0){\n return true;\n }\n return false;\n }",
"public boolean isVertex(T vertex) {\n return vertexIndex(vertex) != -1;\n }",
"boolean contains(int vertex);",
"public boolean containsVertex(Vertex vertex)\n\t{\n\t\treturn this.vertices.get(vertex.getLabel()) != null;\n\t}",
"public boolean hasEdge(String from, String to) {\n Vertex v1 = mVertices.get(from);\n Vertex v2 = mVertices.get(to);\n if (v1 == null || v2 == null) return false;\n return mAdjList.get(v1).contains(v2);\n }",
"public boolean hasEdge(int i,int j){\n return Matrix[i][j];\n }",
"default boolean isEdge(int x, int y) {\n return getNeighbors(x).contains(y);\n }",
"public boolean isInEdge(int width, int height, Position position);",
"public boolean addVertex(Vertex vertex)\n\t{\n\t\tVertex current = this.vertices.get(vertex.getLabel());\n\t\tif (current != null)\n\t\t{\n\t\t\tcurrent.visit();//if vertex exists, increment visits\n\t\t\t\n\t\t\t//add edge between vertices\n\t\t\taddEdge(last,current);\n\t\t\t//overwrite last vertex\n\t\t\tlast = current;\n\t\t\t\n\t\t\treturn false;//vertex not added\n\t\t\t\n\t\t}\n\t\tvertices.put(vertex.getLabel(), vertex);\n\t\t//track last vertex to add edge\n\t\tif(last == null)//first vertex?\n\t\t{\n\t\t\tlast = vertex;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//add edge between vertices\n\t\t\taddEdge(last,vertex);\n\t\t\t//overwrite last vertex\n\t\t\tlast = vertex;\n\t\t}\n\t\treturn true;//vertex was added\n\t\t\n\t}",
"public boolean hasEdge(Node source, Node destination) {\n LinkedList<Edge> edges = source.getEdges();\n for (Edge edge : edges) {\n if (edge.getDestination() == destination) {\n return true;\n }\n }\n return false;\n }",
"public boolean hasEdge (E vertex1, E vertex2) throws IllegalArgumentException\n {\n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n \n Node node = adjacencySequences[index1];\n boolean hasEdge = false;\n while (!hasEdge && node != null)\n {\n if (node.neighbourIndex == index2)\n hasEdge = true;\n else\n node = node.nextNode;\n }\n\n return hasEdge;\n }",
"public boolean isEdge(int source, int destination){\n return edges[source].contains(new Edge(source, destination));\n }",
"public static boolean verifyGraph(Graph<V, DefaultEdge> g)\n {\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 if (v.color == -1)\n {\n System.out.println(\"Did not color vertex \" + v.getID());\n System.out.println(\"check neighbors of \" + v.getID());\n List<V> neighbors = Graphs.neighborListOf(g, v);\n System.out.println(\"Vertex \" + v.getID() + \" color: \" + v.color);\n for (V neighbor : neighbors)\n {\n System.out.println(\"neighbor \" + neighbor.getID() + \" color: \" + neighbor.color);\n }\n return false;\n }\n if (!verifyColor(g, v))\n {\n System.out.println(\"check neighbors of \" + v.getID());\n List<V> neighbors = Graphs.neighborListOf(g, v);\n for (V neighbor : neighbors)\n {\n if (v.color == neighbor.color)\n {\n System.out.println(\"Vertex \" + v.getID() + \" color: \" + v.color);\n System.out.println(\"neighbor \" + neighbor.getID() + \" color: \" + neighbor.color);\n }\n }\n return false;\n }\n }\n return true;\n }",
"public boolean isEdge(int source, int dest) {\r\n return edges[source].contains(new Edge(source, dest));\r\n }",
"private boolean isClosed(EdgeWeightedDigraph G, FlowEdge e, int V) {}",
"private boolean isFeasible(int v, int path[], int pos) {\n /* Check if this vertex is an adjacent vertex of the previously added vertex. */\n if (matrix[path[pos - 1]][v] == 0)\n return false;\n\n /* Check if the vertex has already been included.\n This step can be optimized by creating an array of size V */\n for (int i = 0; i < pos; i++)\n if (path[i] == v)\n return false;\n\n return true;\n }",
"private boolean hasANonneighbourInX(Graph<V, E> g, V v, Set<V> X)\n {\n return X.stream().anyMatch(x -> !g.containsEdge(v, x));\n }",
"public boolean hasEdge(Edge p_edge) {\n\t\treturn edges.contains(p_edge);\n\t}",
"public boolean pathExists(int startVertex, int stopVertex) {\r\n if (startVertex == stopVertex) {\r\n \treturn true;\r\n } else {\r\n \tif (visitAll(startVertex).contains(stopVertex)) {\r\n \t\treturn true;\r\n \t}\r\n }\r\n return false;\r\n }",
"public boolean isEdge(int s,int d) throws Exception\r\n\t{\r\n\t\tif(s>=0&&s<n&&d>=0&&d<n)\r\n\t\t{\r\n\t\t\tLinkedList l=g.get(s);\r\n\t\t\tNode temp=l.getHead();\r\n\t\t\twhile(temp!=null)\r\n\t\t\t{\r\n\t\t\t\tif(temp.getData()==g.get(d).getHead().getData())\r\n\t\t\t\t{\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\ttemp=temp.getNext();\t\t\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t\tthrow new Exception(\"Vertex is not present\");\r\n\t}",
"@Override\r\n\tpublic boolean containsEdge(E src, E dst) {\r\n\t\tif(containsVertex(src) && containsVertex(dst)) {\r\n\t\t\treturn adjacencyLists.get(src).contains(new Edge<E>(src, dst, Integer.MAX_VALUE));\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"boolean addVertex(V v);",
"public abstract boolean getEdge(Point a, Point b);",
"public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }",
"public boolean IsConnected() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tint counter = 0;\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn counter == 1;\r\n\t}",
"public boolean containsVertex(String node) {\n\t\treturn adj_list.containsKey(node);\n\t}",
"public boolean isGoal(Vertex v, ArrayList<Vertex> vertices) {\n for (int i = 0; i < vertices.size(); i++) {\n for (int k = 0; k < vertices.get(i).neighbors.size(); k++) {\n if (vertices.get(i).neighbors.get(k).color == vertices.get(i).color) {\n return false;\n }\n }\n }\n return true;\n }",
"public boolean isEqual(Edge e){\n if(v1.equals(e.v1) && v2.equals(e.v2)){\n return true;\n }\n else if(v1.equals(e.v2) && v2.equals(e.v1)){\n return true;\n }\n else{\n return false;\n }\n }",
"@Override\n\tpublic boolean containsEdge(Object src, Object dest)\n\t{\n\t\tif(this.map.containsKey(src))\n\t\t\tif(this.map.get(src).contains(dest))\n\t\t\t\treturn true;\t\t\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean hasVertex(String label)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tgetVertex(label);\n\t\t\tsucess = true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\tsucess = false;\n\t\t}\n\t\treturn sucess;\n\t}",
"public boolean isSafe(Vertex v, int j) {\n v.color = v.getFCColor();\n for (int i = 0; i < v.neighbors.size(); i++) {\n if (v.color == v.neighbors.get(i).color) {\n return false;\n }\n }\n return true;\n }",
"public boolean addEdge(Edge e) {\n return g.addNode(e.getSrc())&&g.addNode(e.getDst())&&g.addEdge(e.getSrc(),e.getDst());\n }",
"public boolean isConnectedTo(A e) {\n\t\n\t\tif (g == null) return false;\n\t\t\n\t\tfor (Object o: g.getEdges()) {\n\t\t\t\n\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().getValue().equals(e)) {\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean isEdge(int i,int j){\r\n\t\treturn matrix[i][j]!=0;\r\n\t}",
"public boolean hasPathTo(int v) {\n return distTo[v] < Double.POSITIVE_INFINITY;\n }",
"@Override\n\tpublic boolean containsEdge(Edge<?> edge)\n\t{\n\t\treturn edgeList.contains(edge);\n\t}",
"protected boolean isExternal(BTNode<E> v){\n\t\treturn (v.leftChild() == null && v.rightChild() == null); \n }",
"@Override\n public boolean isAdjacent(E vertex1, E vertex2) {\n if (vertex1 != null\n && vertex2 != null\n && vertex1 != vertex2\n && dictionary.containsKey(vertex1)\n && dictionary.containsKey(vertex2)) {\n return dictionary.get(vertex1).contains(vertex2) && dictionary.get(vertex2).contains(vertex1);\n } else {\n return false;\n }\n }",
"public boolean connectsVertices(Collection<V> vs);",
"public boolean containsVertex(String id) {\n\t\treturn hitVertices.containsKey(id);\n\t}",
"private boolean isEdge(Node node) {\n for (Node n: nodes){\n if(!node.equals(n)) {\n for(Edge e:n.getEdges()){\n if(e.getDestination().equals(node)) {\n return true;\n }\n }\n }\n }\n return false;\n }",
"public boolean pathExists(int startVertex, int stopVertex) {\n // your code here\n \tIterator iter = new DFSIterator(startVertex);\n \tInteger i = stopVertex;\n \twhile (iter.hasNext()) {\n \t\tif (iter.next().equals(i)) {\n \t\t\treturn true;\n \t\t}\n \t}\n return false;\n }",
"public boolean isConnected() {\r\n\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tArrayList<String> list = new ArrayList<>(vtces.keySet());\r\n\t\tint count = 0;\r\n\t\tfor (String key : list) {\r\n\t\t\tif (processed.containsKey(key))\r\n\t\t\t\tcontinue;\r\n\t\t\tcount++;\r\n\t\t\t// Create a new pair\r\n\t\t\tPair npr = new Pair();\r\n\t\t\tnpr.vname = key;\r\n\t\t\tnpr.psf = key;\r\n\r\n\t\t\t// put pair queue\r\n\t\t\tqueue.addLast(npr);\r\n\r\n\t\t\t// Work while queue is not empty\r\n\t\t\twhile (!queue.isEmpty()) {\r\n\r\n\t\t\t\t// Remove a pair from queue\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\tif (processed.containsKey(rp.vname))\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t// Put in processed hashmap\r\n\t\t\t\tprocessed.put(rp.vname, True);\r\n\r\n\t\t\t\t// nbrs\r\n\t\t\t\tVertex rpvertex = vtces.get(rp.vname);\r\n\t\t\t\tArrayList<String> nbrs = new ArrayList<>(rpvertex.nbrs.keySet());\r\n\r\n\t\t\t\tfor (String nbr : nbrs) {\r\n\t\t\t\t\t// Process only unprocessed vertex\r\n\t\t\t\t\tif (!processed.containsKey(nbr)) {\r\n\t\t\t\t\t\t// Create a new pair and put in queue\r\n\t\t\t\t\t\tPair np = new Pair();\r\n\t\t\t\t\t\tnp.vname = nbr;\r\n\t\t\t\t\t\tnp.psf = rp.psf + nbr;\r\n\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (count > 1)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"boolean addEdge(E edge);",
"public boolean hasEdge(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\treturn edges.contains(edge);\n\t}",
"private boolean hasAdjacentWalls(View v){\n\t\tDirection[] allDirections = Direction.values();\n\t\tfor (Direction d : allDirections) {\n\t\t\tif (!v.mayMove(d)) {\n\t\t\t\t//Yes, there is an adjacent wall\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean addVertex(V vertex);",
"public boolean addVertex(V vertex);",
"public boolean pathExists(int startVertex, int stopVertex) {\n// your code here\n ArrayList<Integer> fetch_result = visitAll(startVertex);\n if(fetch_result.contains(stopVertex)){\n return true;\n }\n return false;\n }",
"public boolean canAddEdge(Edge newEdge){\n\t\t/*\n\t\tif(v1.equals(v2)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tEdge newEdge = new Edge(v1, v2, weight);\n\t\t*/\n\t\tif(edges.containsKey(newEdge.hashCode())){\n\t\t\treturn false;\n\t\t\t\n\t\t\t/*\n\t\t// Edge already has been assigned to a vertex\n\t\t}else if(v1.containsConnection(newEdge) || v2.containsConnection(newEdge)){\n\t\t\treturn false;\n\t\t\t*/\n\t\t}\n\t\t\n\t\t\n\t\t// If edge passes all the above tests then add edge to graph\n\t\taddEdge(newEdge);\n\t\treturn true;\n\t}",
"public void findEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"public boolean isUnivSinkExistsSol1() {\n\t\t\tList<Integer> degrees = new ArrayList(this.indegreeCounts.values());\n\t\t\tfor (int degree : degrees) {\n\t\t\t\tif (degree == this.v - 1) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"boolean seen(Graph.Vertex u) {\n\t\treturn getVertex(u).seen;\n\t}",
"public boolean solve(Vertex v, ArrayList<Vertex> edges) {\n while (remainingVerticies(edges)) {\n // For the number of vertices, pick one, if it is yellow we need to color it.\n //TODO we hardcode the graph size now. We need to add user input later\n v = edges.get(this.r.nextInt(100));\n\n if (v.color == Color.YELLOW) {\n //We now know we need to color the vertex. We'll loop over each color and check each neighbor for consistency. If the color is not consistent\n //remove it from the available colros\n for (int j = 0; j < 4; j++) {\n if (!isConsistent(v)) {\n v.removeColor(v.color);\n }\n\n } \n // if all the colors are removed, we found a conflict and need to backtrack. Reset colors and try again.\n if (v.colorsTried.isEmpty()) {\n int n = this.r.nextInt(v.getNeighbors().size());\n resetColors(edges);\n v.color = Color.YELLOW;\n v.getNeighbors().get(n).color = Color.YELLOW;\n }\n }\n }\n //return if a solution was found\n return isGoal(v, edges);\n }",
"public boolean onVerticalEdge() {\n\t\treturn vertical != Side.None;\n\t}"
] | [
"0.7897568",
"0.7815787",
"0.7657973",
"0.7412674",
"0.73839694",
"0.7333488",
"0.7274417",
"0.7229458",
"0.7195288",
"0.7125301",
"0.7075894",
"0.70076025",
"0.6990144",
"0.6990144",
"0.69757175",
"0.6908974",
"0.6870386",
"0.68659735",
"0.6842381",
"0.68150157",
"0.6788164",
"0.6787908",
"0.6786754",
"0.6765019",
"0.6742479",
"0.67152",
"0.67124075",
"0.6648112",
"0.6635878",
"0.6634506",
"0.6623816",
"0.66216993",
"0.66035366",
"0.6583066",
"0.6580321",
"0.65247524",
"0.651487",
"0.6474281",
"0.64608425",
"0.645097",
"0.64354485",
"0.6429586",
"0.64190626",
"0.6412089",
"0.64105713",
"0.63983893",
"0.6394548",
"0.63815194",
"0.63723034",
"0.6346356",
"0.6319754",
"0.6316164",
"0.62923807",
"0.6286654",
"0.6265271",
"0.62636614",
"0.62487876",
"0.62292093",
"0.62198716",
"0.62152594",
"0.6194806",
"0.6187411",
"0.6182265",
"0.61801803",
"0.6178042",
"0.6166891",
"0.61594844",
"0.61469185",
"0.61431706",
"0.61409914",
"0.6107098",
"0.608839",
"0.60870457",
"0.60793453",
"0.6076898",
"0.60563314",
"0.6049719",
"0.6046417",
"0.60271347",
"0.6021687",
"0.6012917",
"0.60000527",
"0.59838426",
"0.5974028",
"0.59726316",
"0.59589154",
"0.59533095",
"0.5946823",
"0.59345865",
"0.5922725",
"0.59190506",
"0.59140724",
"0.59140724",
"0.5912411",
"0.58946824",
"0.5890791",
"0.58836347",
"0.58814645",
"0.58664644",
"0.5860623"
] | 0.77932006 | 2 |
/ Return true if there exists an edge to v from current vertex, otherwise return false. | public boolean hasEdgeTo(char v) {
for (int i = 0; i < currentVertex.outList.size(); i++) {
Neighbor neighbor = currentVertex.outList.get(i);
if (neighbor.vertex.label == v)
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean containsEdge(V v, V w);",
"public boolean hasEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean hasEdge(K u, K v)\n {\n return adjMaps.get(u).containsKey(v);\n }",
"public boolean hasEdge(K u, K v)\n\t{\n \tList<HashMap<K, Integer>> adj = adjLists.get(u);\n\n \t// check for edge already being there\n \tint count=0;\n \tfor (HashMap<K, Integer> A:adj){\n \t\tfor (K vertex:A.keySet()){\n \t\t\tif (!vertex.equals(v))\n \t\t {\n \t\t\t\tcount++;\n\n \t\t }\n \t\t}\n \t\t\n \t}\n \tif (count==adj.size()) return false;\n \treturn true;\n\t}",
"public boolean containsEdge(V source, V target);",
"boolean containsVertex(V v);",
"boolean hasIsVertexOf();",
"@Override\r\n public boolean edgeExists(Vertex v1, Vertex v2) {\r\n return adjacencyList.get(v1).contains(v2); //checking if the list of adjacent vertices contains v2\r\n }",
"public abstract boolean hasEdge(int from, int to);",
"public boolean containsEdge(Edge<V> edge);",
"public boolean isEdge( VKeyT fromKey, VKeyT toKey )\n throws NoSuchVertexException;",
"public boolean connectsVertex(V v);",
"public boolean isAdjacentTo(final Vertex other){\n\t\tboolean result = false;\n\t\tif(getNeighbours().contains(other))\n\t\t\tresult = true;\n\t\treturn result;\n\t}",
"public boolean hasVertex(T vert);",
"public boolean hasEdge(Node k){\n for(int i = 0; i<edges.size(); i++){\n Edge edge = edges.get(i);\n if(edge.end() == k){\n return true;\n }\n }\n return false;\n }",
"public boolean containsVertex(V vertex);",
"public boolean containsVertex(V vertex);",
"@Override\n public boolean hasEdge(V from, V to)\n {\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n if (!contains(from)){\n return false;\n }\n else{\n Iterator graphIterator = graph.entrySet().iterator();\n Map.Entry graphElement = (Map.Entry) graphIterator.next();\n V vert = (V) graphElement.getKey();\n while (graphIterator.hasNext() && vert != from){\n graphElement = (Map.Entry) graphIterator.next();\n vert = (V)graphElement.getKey();\n }\n\t ArrayList <V> edges = graph.get(vert);\n\t return edges.contains(to);\n\t }\n }",
"public boolean containsEdge(E edge);",
"public boolean containsVertex (E vertex)\n {\n return this.indexOf(vertex) != -1;\n }",
"private boolean hasANeighbour(Graph<V, E> g, Set<V> set, V v)\n {\n return set.stream().anyMatch(s -> g.containsEdge(s, v));\n }",
"public boolean hasEdge(Edge e) {\n for (Edge outEdge : outEdges) {\n if (outEdge.equals(e) && e.getTo() == outEdge.getTo()) {\n return true;\n }\n }\n return false;\n }",
"public boolean hasEdge(T beg, T end);",
"public boolean isVertex( VKeyT key );",
"public boolean containsEdge(V head, V tail);",
"boolean contains(Edge edge);",
"public boolean containsEdge(Edge e){\n\t\treturn edges.containsKey(e.hashCode());\n\t}",
"public boolean foiChecado(Vertice v){\n int i = v.label;\n return vertices[i];\n }",
"@Override\n public boolean contains(V vertex)\n {\n if (vertex.equals(null)){\n throw new IllegalArgumentException();\n }\n return graph.containsKey(vertex);\n }",
"boolean hasPathTo(int v)\n\t{\n\t\treturn edgeTo[v].weight()!=Double.POSITIVE_INFINITY;\n\t}",
"private boolean edgeExists() {\n for (int i = 1; i < parentMatrix[randomChild][0]; i++) {\n if (parentMatrix[randomChild][i] == randomParent) {\n return true;\n }\n }\n return false;\n }",
"public boolean hasPathTo(int v){\n\t\tvalidateVertex(v);\n\t\treturn distTo[v]<Double.POSITIVE_INFINITY;\n\t}",
"public boolean detectCyclesContainingVertex(V v)\n {\n try {\n execute(null, v);\n } catch (CycleDetectedException ex) {\n return true;\n }\n\n return false;\n }",
"public boolean hasEdge(T begin, T end);",
"@Override\n\tpublic boolean contains(Object vertex) {\n\t\treturn vertices.contains(vertex);\n\t}",
"public abstract boolean isUsing(Edge graphEdge);",
"public boolean containsEdge(Edge e)\n\t{\n\t\tif (e.getOne() == null || e.getTwo() == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn this.edges.containsKey(e.hashCode());\n\t}",
"public boolean areAdjacent(Node u, Node v) throws GraphException\n\t{\n\t\tif (u.getName() >= nodeList.length || v.getName() >= nodeList.length ||\n\t\t\t\tnodeList[u.getName()] == null || nodeList[v.getName()] == null)\n\t\t\tthrow new GraphException(\"Node not found.\");\n\t\t\n\t\tif (adjMatrix[u.getName()][v.getName()] == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public boolean hasEdge(String from, String to) {\n Vertex v1 = mVertices.get(from);\n Vertex v2 = mVertices.get(to);\n if (v1 == null || v2 == null) return false;\n return mAdjList.get(v1).contains(v2);\n }",
"boolean addEdge(V v, V w);",
"public boolean hasEdge(int i,int j){\n return Matrix[i][j];\n }",
"public boolean hasPathTo(int v) {\n return visited[v];\n }",
"boolean contains(Vertex vertex);",
"boolean contains(int vertex);",
"@Override\r\n\tpublic boolean containsVertex(E key) {\r\n\t\treturn vertices.containsKey(key);\r\n\t}",
"public boolean hasVertex(String name) {\n return mVertices.containsKey(name);\n }",
"public boolean isEdge (T vertex1, T vertex2){\n int i1 = vertexIndex(vertex1);\n int i2 = vertexIndex(vertex2);\n if (i1 != NOT_FOUND && i2 != NOT_FOUND && edges[i1][i2] > 0){\n return true;\n }\n return false;\n }",
"public boolean isInEdge(int width, int height, Position position);",
"default boolean isEdge(int x, int y) {\n return getNeighbors(x).contains(y);\n }",
"public boolean isBipartiteUndirectedGraph (){\r\n int[] vertices = new int[getNumV()];\r\n for (int i = 0; i < getNumV(); ++i)\r\n vertices[i] = -1;\r\n\r\n vertices[0] = 1;\r\n\r\n Stack <Integer> q = new Stack<Integer>();\r\n q.push(0);\r\n\r\n while (!q.isEmpty()) {\r\n int current = q.pop();\r\n Iterator<Edge> iter = edgeIterator(current);\r\n while (iter.hasNext()) {\r\n Edge edge = iter.next();\r\n int neighbor = edge.getDest();\r\n if (vertices[neighbor] == -1) {\r\n vertices[neighbor] = 1 - vertices[current];\r\n q.push(neighbor);\r\n }\r\n else if (vertices[neighbor] == vertices[current])\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public boolean containsVertex(Vertex vertex)\n\t{\n\t\treturn this.vertices.get(vertex.getLabel()) != null;\n\t}",
"public boolean hasEdge (E vertex1, E vertex2) throws IllegalArgumentException\n {\n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n \n Node node = adjacencySequences[index1];\n boolean hasEdge = false;\n while (!hasEdge && node != null)\n {\n if (node.neighbourIndex == index2)\n hasEdge = true;\n else\n node = node.nextNode;\n }\n\n return hasEdge;\n }",
"public boolean isVertex(T vertex) {\n return vertexIndex(vertex) != -1;\n }",
"public boolean hasEdge(Node source, Node destination) {\n LinkedList<Edge> edges = source.getEdges();\n for (Edge edge : edges) {\n if (edge.getDestination() == destination) {\n return true;\n }\n }\n return false;\n }",
"public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }",
"public static boolean verifyGraph(Graph<V, DefaultEdge> g)\n {\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 if (v.color == -1)\n {\n System.out.println(\"Did not color vertex \" + v.getID());\n System.out.println(\"check neighbors of \" + v.getID());\n List<V> neighbors = Graphs.neighborListOf(g, v);\n System.out.println(\"Vertex \" + v.getID() + \" color: \" + v.color);\n for (V neighbor : neighbors)\n {\n System.out.println(\"neighbor \" + neighbor.getID() + \" color: \" + neighbor.color);\n }\n return false;\n }\n if (!verifyColor(g, v))\n {\n System.out.println(\"check neighbors of \" + v.getID());\n List<V> neighbors = Graphs.neighborListOf(g, v);\n for (V neighbor : neighbors)\n {\n if (v.color == neighbor.color)\n {\n System.out.println(\"Vertex \" + v.getID() + \" color: \" + v.color);\n System.out.println(\"neighbor \" + neighbor.getID() + \" color: \" + neighbor.color);\n }\n }\n return false;\n }\n }\n return true;\n }",
"public boolean isEdge(int source, int destination){\n return edges[source].contains(new Edge(source, destination));\n }",
"public boolean hasEdge(Edge p_edge) {\n\t\treturn edges.contains(p_edge);\n\t}",
"public abstract boolean getEdge(Point a, Point b);",
"public boolean isConnectedTo(A e) {\n\t\n\t\tif (g == null) return false;\n\t\t\n\t\tfor (Object o: g.getEdges()) {\n\t\t\t\n\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().getValue().equals(e)) {\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"private boolean hasANonneighbourInX(Graph<V, E> g, V v, Set<V> X)\n {\n return X.stream().anyMatch(x -> !g.containsEdge(v, x));\n }",
"public boolean addVertex(Vertex vertex)\n\t{\n\t\tVertex current = this.vertices.get(vertex.getLabel());\n\t\tif (current != null)\n\t\t{\n\t\t\tcurrent.visit();//if vertex exists, increment visits\n\t\t\t\n\t\t\t//add edge between vertices\n\t\t\taddEdge(last,current);\n\t\t\t//overwrite last vertex\n\t\t\tlast = current;\n\t\t\t\n\t\t\treturn false;//vertex not added\n\t\t\t\n\t\t}\n\t\tvertices.put(vertex.getLabel(), vertex);\n\t\t//track last vertex to add edge\n\t\tif(last == null)//first vertex?\n\t\t{\n\t\t\tlast = vertex;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//add edge between vertices\n\t\t\taddEdge(last,vertex);\n\t\t\t//overwrite last vertex\n\t\t\tlast = vertex;\n\t\t}\n\t\treturn true;//vertex was added\n\t\t\n\t}",
"public boolean containsVertex(String node) {\n\t\treturn adj_list.containsKey(node);\n\t}",
"public boolean isEdge(int source, int dest) {\r\n return edges[source].contains(new Edge(source, dest));\r\n }",
"public boolean pathExists(int startVertex, int stopVertex) {\r\n if (startVertex == stopVertex) {\r\n \treturn true;\r\n } else {\r\n \tif (visitAll(startVertex).contains(stopVertex)) {\r\n \t\treturn true;\r\n \t}\r\n }\r\n return false;\r\n }",
"public boolean isEdge(int s,int d) throws Exception\r\n\t{\r\n\t\tif(s>=0&&s<n&&d>=0&&d<n)\r\n\t\t{\r\n\t\t\tLinkedList l=g.get(s);\r\n\t\t\tNode temp=l.getHead();\r\n\t\t\twhile(temp!=null)\r\n\t\t\t{\r\n\t\t\t\tif(temp.getData()==g.get(d).getHead().getData())\r\n\t\t\t\t{\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\ttemp=temp.getNext();\t\t\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t\tthrow new Exception(\"Vertex is not present\");\r\n\t}",
"@Override\r\n\tpublic boolean containsEdge(E src, E dst) {\r\n\t\tif(containsVertex(src) && containsVertex(dst)) {\r\n\t\t\treturn adjacencyLists.get(src).contains(new Edge<E>(src, dst, Integer.MAX_VALUE));\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private boolean isClosed(EdgeWeightedDigraph G, FlowEdge e, int V) {}",
"public boolean hasVertex(String label)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tgetVertex(label);\n\t\t\tsucess = true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\tsucess = false;\n\t\t}\n\t\treturn sucess;\n\t}",
"public boolean IsConnected() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tint counter = 0;\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn counter == 1;\r\n\t}",
"public boolean isEdge(int i,int j){\r\n\t\treturn matrix[i][j]!=0;\r\n\t}",
"@Override\n\tpublic boolean containsEdge(Object src, Object dest)\n\t{\n\t\tif(this.map.containsKey(src))\n\t\t\tif(this.map.get(src).contains(dest))\n\t\t\t\treturn true;\t\t\n\t\treturn false;\n\t}",
"private boolean isFeasible(int v, int path[], int pos) {\n /* Check if this vertex is an adjacent vertex of the previously added vertex. */\n if (matrix[path[pos - 1]][v] == 0)\n return false;\n\n /* Check if the vertex has already been included.\n This step can be optimized by creating an array of size V */\n for (int i = 0; i < pos; i++)\n if (path[i] == v)\n return false;\n\n return true;\n }",
"@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean addEdge(Edge e) {\n return g.addNode(e.getSrc())&&g.addNode(e.getDst())&&g.addEdge(e.getSrc(),e.getDst());\n }",
"public boolean isGoal(Vertex v, ArrayList<Vertex> vertices) {\n for (int i = 0; i < vertices.size(); i++) {\n for (int k = 0; k < vertices.get(i).neighbors.size(); k++) {\n if (vertices.get(i).neighbors.get(k).color == vertices.get(i).color) {\n return false;\n }\n }\n }\n return true;\n }",
"@Override\n\tpublic boolean containsEdge(Edge<?> edge)\n\t{\n\t\treturn edgeList.contains(edge);\n\t}",
"public boolean isEqual(Edge e){\n if(v1.equals(e.v1) && v2.equals(e.v2)){\n return true;\n }\n else if(v1.equals(e.v2) && v2.equals(e.v1)){\n return true;\n }\n else{\n return false;\n }\n }",
"private boolean isEdge(Node node) {\n for (Node n: nodes){\n if(!node.equals(n)) {\n for(Edge e:n.getEdges()){\n if(e.getDestination().equals(node)) {\n return true;\n }\n }\n }\n }\n return false;\n }",
"public boolean isSafe(Vertex v, int j) {\n v.color = v.getFCColor();\n for (int i = 0; i < v.neighbors.size(); i++) {\n if (v.color == v.neighbors.get(i).color) {\n return false;\n }\n }\n return true;\n }",
"public boolean containsVertex(String id) {\n\t\treturn hitVertices.containsKey(id);\n\t}",
"@Override\n public boolean isAdjacent(E vertex1, E vertex2) {\n if (vertex1 != null\n && vertex2 != null\n && vertex1 != vertex2\n && dictionary.containsKey(vertex1)\n && dictionary.containsKey(vertex2)) {\n return dictionary.get(vertex1).contains(vertex2) && dictionary.get(vertex2).contains(vertex1);\n } else {\n return false;\n }\n }",
"public boolean isEdge(int i, int j) {\n\t\n\treturn\n\t\t((Linkable)Network.node[i].getProtocol(protocolID)\n\t\t).contains(Network.node[j]) &&\n\t\tNetwork.node[j].isUp() &&\n\t\tNetwork.node[i].isUp();\n}",
"public boolean hasPathTo(int v) {\n return distTo[v] < Double.POSITIVE_INFINITY;\n }",
"boolean addVertex(V v);",
"public boolean hasEdge(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\treturn edges.contains(edge);\n\t}",
"public boolean pathExists(int startVertex, int stopVertex) {\n// your code here\n ArrayList<Integer> fetch_result = visitAll(startVertex);\n if(fetch_result.contains(stopVertex)){\n return true;\n }\n return false;\n }",
"public boolean connectsVertices(Collection<V> vs);",
"public boolean hasEdge(int node1, int node2)\n{\n\tNode s=(Node)this.getNodes().get(node1);\n return s.hasNi(node2);\n\t\n}",
"boolean addEdge(E edge);",
"public boolean pathExists(int startVertex, int stopVertex) {\n // your code here\n \tIterator iter = new DFSIterator(startVertex);\n \tInteger i = stopVertex;\n \twhile (iter.hasNext()) {\n \t\tif (iter.next().equals(i)) {\n \t\t\treturn true;\n \t\t}\n \t}\n return false;\n }",
"public boolean isConnected() {\r\n\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tArrayList<String> list = new ArrayList<>(vtces.keySet());\r\n\t\tint count = 0;\r\n\t\tfor (String key : list) {\r\n\t\t\tif (processed.containsKey(key))\r\n\t\t\t\tcontinue;\r\n\t\t\tcount++;\r\n\t\t\t// Create a new pair\r\n\t\t\tPair npr = new Pair();\r\n\t\t\tnpr.vname = key;\r\n\t\t\tnpr.psf = key;\r\n\r\n\t\t\t// put pair queue\r\n\t\t\tqueue.addLast(npr);\r\n\r\n\t\t\t// Work while queue is not empty\r\n\t\t\twhile (!queue.isEmpty()) {\r\n\r\n\t\t\t\t// Remove a pair from queue\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\tif (processed.containsKey(rp.vname))\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t// Put in processed hashmap\r\n\t\t\t\tprocessed.put(rp.vname, True);\r\n\r\n\t\t\t\t// nbrs\r\n\t\t\t\tVertex rpvertex = vtces.get(rp.vname);\r\n\t\t\t\tArrayList<String> nbrs = new ArrayList<>(rpvertex.nbrs.keySet());\r\n\r\n\t\t\t\tfor (String nbr : nbrs) {\r\n\t\t\t\t\t// Process only unprocessed vertex\r\n\t\t\t\t\tif (!processed.containsKey(nbr)) {\r\n\t\t\t\t\t\t// Create a new pair and put in queue\r\n\t\t\t\t\t\tPair np = new Pair();\r\n\t\t\t\t\t\tnp.vname = nbr;\r\n\t\t\t\t\t\tnp.psf = rp.psf + nbr;\r\n\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (count > 1)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"protected boolean isExternal(BTNode<E> v){\n\t\treturn (v.leftChild() == null && v.rightChild() == null); \n }",
"boolean seen(Graph.Vertex u) {\n\t\treturn getVertex(u).seen;\n\t}",
"@Test \r\n void create_edge_between_to_nonexisted_vertexes() {\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }",
"public boolean isUnivSinkExistsSol1() {\n\t\t\tList<Integer> degrees = new ArrayList(this.indegreeCounts.values());\n\t\t\tfor (int degree : degrees) {\n\t\t\t\tif (degree == this.v - 1) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"private boolean hasAdjacentWalls(View v){\n\t\tDirection[] allDirections = Direction.values();\n\t\tfor (Direction d : allDirections) {\n\t\t\tif (!v.mayMove(d)) {\n\t\t\t\t//Yes, there is an adjacent wall\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean isConnected(GraphStructure graph) {\r\n\t\tgetDepthFirstSearchTraversal(graph);\r\n\t\tif(pathList.size()==graph.getNumberOfVertices()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isUnivSinkExistsSol2() {\n\t\t\tList<Integer> degrees = new ArrayList(this.indegreeCounts.values());\n\t\t\tfor (int degree : degrees) {\n\t\t\t\tif (degree == this.v - 1) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public boolean canAddEdge(Edge newEdge){\n\t\t/*\n\t\tif(v1.equals(v2)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tEdge newEdge = new Edge(v1, v2, weight);\n\t\t*/\n\t\tif(edges.containsKey(newEdge.hashCode())){\n\t\t\treturn false;\n\t\t\t\n\t\t\t/*\n\t\t// Edge already has been assigned to a vertex\n\t\t}else if(v1.containsConnection(newEdge) || v2.containsConnection(newEdge)){\n\t\t\treturn false;\n\t\t\t*/\n\t\t}\n\t\t\n\t\t\n\t\t// If edge passes all the above tests then add edge to graph\n\t\taddEdge(newEdge);\n\t\treturn true;\n\t}"
] | [
"0.7792609",
"0.7757807",
"0.77024335",
"0.7475363",
"0.7347948",
"0.7324305",
"0.7306237",
"0.72730255",
"0.72674537",
"0.72554076",
"0.7113064",
"0.7038295",
"0.7031409",
"0.70134914",
"0.70078325",
"0.6942875",
"0.6942875",
"0.69396996",
"0.6918545",
"0.6885243",
"0.6816221",
"0.6814707",
"0.6812118",
"0.68095565",
"0.67758816",
"0.67637026",
"0.6722098",
"0.67158675",
"0.6702739",
"0.6685076",
"0.66840947",
"0.66538984",
"0.6639422",
"0.6634005",
"0.65931106",
"0.65786374",
"0.6574051",
"0.656167",
"0.6558682",
"0.65554476",
"0.65238756",
"0.6509134",
"0.65052253",
"0.64865065",
"0.64724207",
"0.6472351",
"0.64668244",
"0.64641094",
"0.6460656",
"0.64072686",
"0.63963014",
"0.6383467",
"0.63811517",
"0.63241065",
"0.63156676",
"0.6293218",
"0.62866974",
"0.6284079",
"0.62824994",
"0.62639594",
"0.62607557",
"0.6248465",
"0.6228608",
"0.62270296",
"0.6224814",
"0.62199956",
"0.6203056",
"0.61880785",
"0.6183336",
"0.617052",
"0.61540407",
"0.6144313",
"0.6132145",
"0.61300373",
"0.61293304",
"0.61256033",
"0.6125307",
"0.609257",
"0.60923827",
"0.609122",
"0.60698205",
"0.60664076",
"0.6053541",
"0.6050881",
"0.6049261",
"0.60400987",
"0.6019964",
"0.60089636",
"0.5992517",
"0.5992364",
"0.59897834",
"0.59814876",
"0.59642136",
"0.59516734",
"0.59460276",
"0.59252787",
"0.58934826",
"0.5886183",
"0.58733034",
"0.58712673"
] | 0.7979361 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.